modelId
stringlengths
4
122
author
stringlengths
2
42
last_modified
unknown
downloads
int64
0
74.7M
likes
int64
0
9.67k
library_name
stringlengths
2
84
tags
sequence
pipeline_tag
stringlengths
5
30
createdAt
unknown
card
stringlengths
1
901k
embedding
sequence
T-Systems-onsite/cross-en-de-roberta-sentence-transformer
T-Systems-onsite
"2023-04-27T19:29:30Z"
974,363
38
transformers
[ "transformers", "pytorch", "tf", "safetensors", "xlm-roberta", "feature-extraction", "sentence_embedding", "search", "roberta", "xlm-r-distilroberta-base-paraphrase-v1", "paraphrase", "de", "en", "multilingual", "dataset:stsb_multi_mt", "arxiv:1908.10084", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: - de - en - multilingual license: mit tags: - sentence_embedding - search - pytorch - xlm-roberta - roberta - xlm-r-distilroberta-base-paraphrase-v1 - paraphrase datasets: - stsb_multi_mt metrics: - Spearman’s rank correlation - cosine similarity --- # Cross English & German RoBERTa for Sentence Embeddings This model is intended to [compute sentence (text) embeddings](https://www.sbert.net/examples/applications/computing-embeddings/README.html) for English and German text. These embeddings can then be compared with [cosine-similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to find sentences with a similar semantic meaning. For example this can be useful for [semantic textual similarity](https://www.sbert.net/docs/usage/semantic_textual_similarity.html), [semantic search](https://www.sbert.net/docs/usage/semantic_search.html), or [paraphrase mining](https://www.sbert.net/docs/usage/paraphrase_mining.html). To do this you have to use the [Sentence Transformers Python framework](https://github.com/UKPLab/sentence-transformers). The speciality of this model is that it also works cross-lingually. Regardless of the language, the sentences are translated into very similar vectors according to their semantics. This means that you can, for example, enter a search in German and find results according to the semantics in German and also in English. Using a xlm model and _multilingual finetuning with language-crossing_ we reach performance that even exceeds the best current dedicated English large model (see Evaluation section below). > Sentence-BERT (SBERT) is a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity. This reduces the effort for finding the most similar pair from 65hours with BERT / RoBERTa to about 5 seconds with SBERT, while maintaining the accuracy from BERT. Source: [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084) This model is fine-tuned from [Philip May](https://may.la/) and open-sourced by [T-Systems-onsite](https://www.t-systems-onsite.de/). Special thanks to [Nils Reimers](https://www.nils-reimers.de/) for your awesome open-source work, the Sentence Transformers, the models and your help on GitHub. ## How to use To use this model install the `sentence-transformers` package (see here: <https://github.com/UKPLab/sentence-transformers>). ```python from sentence_transformers import SentenceTransformer model = SentenceTransformer('T-Systems-onsite/cross-en-de-roberta-sentence-transformer') ``` For details of usage and examples see here: - [Computing Sentence Embeddings](https://www.sbert.net/docs/usage/computing_sentence_embeddings.html) - [Semantic Textual Similarity](https://www.sbert.net/docs/usage/semantic_textual_similarity.html) - [Paraphrase Mining](https://www.sbert.net/docs/usage/paraphrase_mining.html) - [Semantic Search](https://www.sbert.net/docs/usage/semantic_search.html) - [Cross-Encoders](https://www.sbert.net/docs/usage/cross-encoder.html) - [Examples on GitHub](https://github.com/UKPLab/sentence-transformers/tree/master/examples) ## Training The base model is [xlm-roberta-base](https://huggingface.co/xlm-roberta-base). This model has been further trained by [Nils Reimers](https://www.nils-reimers.de/) on a large scale paraphrase dataset for 50+ languages. [Nils Reimers](https://www.nils-reimers.de/) about this [on GitHub](https://github.com/UKPLab/sentence-transformers/issues/509#issuecomment-712243280): >A paper is upcoming for the paraphrase models. > >These models were trained on various datasets with Millions of examples for paraphrases, mainly derived from Wikipedia edit logs, paraphrases mined from Wikipedia and SimpleWiki, paraphrases from news reports, AllNLI-entailment pairs with in-batch-negative loss etc. > >In internal tests, they perform much better than the NLI+STSb models as they have see more and broader type of training data. NLI+STSb has the issue that they are rather narrow in their domain and do not contain any domain specific words / sentences (like from chemistry, computer science, math etc.). The paraphrase models has seen plenty of sentences from various domains. > >More details with the setup, all the datasets, and a wider evaluation will follow soon. The resulting model called `xlm-r-distilroberta-base-paraphrase-v1` has been released here: <https://github.com/UKPLab/sentence-transformers/releases/tag/v0.3.8> Building on this cross language model we fine-tuned it for English and German language on the [STSbenchmark](http://ixa2.si.ehu.es/stswiki/index.php/STSbenchmark) dataset. For German language we used the dataset of our [German STSbenchmark dataset](https://github.com/t-systems-on-site-services-gmbh/german-STSbenchmark) which has been translated with [deepl.com](https://www.deepl.com/translator). Additionally to the German and English training samples we generated samples of English and German crossed. We call this _multilingual finetuning with language-crossing_. It doubled the traing-datasize and tests show that it further improves performance. We did an automatic hyperparameter search for 33 trials with [Optuna](https://github.com/optuna/optuna). Using 10-fold crossvalidation on the deepl.com test and dev dataset we found the following best hyperparameters: - batch_size = 8 - num_epochs = 2 - lr = 1.026343323298136e-05, - eps = 4.462251033010287e-06 - weight_decay = 0.04794438776350409 - warmup_steps_proportion = 0.1609010732760181 The final model was trained with these hyperparameters on the combination of the train and dev datasets from English, German and the crossings of them. The testset was left for testing. # Evaluation The evaluation has been done on English, German and both languages crossed with the STSbenchmark test data. The evaluation-code is available on [Colab](https://colab.research.google.com/drive/1gtGnKq_dYU_sDYqMohTYVMVpxMJjyH0M?usp=sharing). As the metric for evaluation we use the Spearman’s rank correlation between the cosine-similarity of the sentence embeddings and STSbenchmark labels. | Model Name | Spearman<br/>German | Spearman<br/>English | Spearman<br/>EN-DE & DE-EN<br/>(cross) | |---------------------------------------------------------------|-------------------|--------------------|------------------| | xlm-r-distilroberta-base-paraphrase-v1 | 0.8079 | 0.8350 | 0.7983 | | [xlm-r-100langs-bert-base-nli-stsb-mean-tokens](https://huggingface.co/sentence-transformers/xlm-r-100langs-bert-base-nli-stsb-mean-tokens) | 0.7877 | 0.8465 | 0.7908 | | xlm-r-bert-base-nli-stsb-mean-tokens | 0.7877 | 0.8465 | 0.7908 | | [roberta-large-nli-stsb-mean-tokens](https://huggingface.co/sentence-transformers/roberta-large-nli-stsb-mean-tokens) | 0.6371 | 0.8639 | 0.4109 | | [T-Systems-onsite/<br/>german-roberta-sentence-transformer-v2](https://huggingface.co/T-Systems-onsite/german-roberta-sentence-transformer-v2) | 0.8529 | 0.8634 | 0.8415 | | [paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2) | 0.8355 | **0.8682** | 0.8309 | | **T-Systems-onsite/<br/>cross-en-de-roberta-sentence-transformer** | **0.8550** | 0.8660 | **0.8525** | ## License Copyright (c) 2020 Philip May, T-Systems on site services GmbH Licensed under the MIT License (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License by reviewing the file [LICENSE](https://huggingface.co/T-Systems-onsite/cross-en-de-roberta-sentence-transformer/blob/main/LICENSE) in the repository.
[ -0.27224674820899963, -0.8039311170578003, 0.5647478699684143, 0.346718966960907, -0.3234294652938843, -0.2786254584789276, -0.3184569180011749, -0.2451532930135727, 0.12184755504131317, 0.4227006137371063, -0.3756368160247803, -0.572776198387146, -0.7026025056838989, 0.30558547377586365, -0.4056013822555542, 0.9791496396064758, -0.21445810794830322, 0.31407979130744934, -0.2312348634004593, -0.2658867835998535, -0.1280728131532669, -0.5446615219116211, -0.4972184896469116, -0.2077212780714035, 0.28681594133377075, 0.2056388556957245, 0.7376013398170471, 0.47423478960990906, 0.5010368824005127, 0.32326972484588623, -0.21824109554290771, -0.02698124386370182, -0.2633020579814911, 0.07855154573917389, -0.2617490291595459, -0.43352147936820984, -0.1445615589618683, -0.11789508908987045, 0.5197961926460266, 0.6019577383995056, -0.003972469829022884, 0.08196095377206802, 0.06554874032735825, 0.31768912076950073, -0.2508046329021454, 0.2880048453807831, -0.5364598035812378, 0.04692055657505989, -0.1859721839427948, 0.013185126706957817, -0.465643972158432, -0.32294371724128723, 0.15663620829582214, -0.43618717789649963, 0.24681416153907776, 0.16177763044834137, 1.2437151670455933, 0.1395685225725174, -0.41063302755355835, -0.3386618494987488, -0.4012020528316498, 1.0053287744522095, -0.8425601720809937, 0.6043546795845032, 0.2048787772655487, 0.14553003013134003, 0.06527494639158249, -0.8953367471694946, -0.6154679656028748, -0.3194600045681, -0.423353910446167, 0.21977706253528595, -0.4422038495540619, -0.24241900444030762, 0.16332970559597015, 0.2782614529132843, -0.7862695455551147, -0.03853544220328331, -0.3936067521572113, -0.14688579738140106, 0.37957563996315, 0.04749149829149246, 0.32151442766189575, -0.6640022993087769, -0.5722258687019348, -0.3804566562175751, -0.5393378734588623, -0.00961949210613966, 0.19817402958869934, 0.2319055199623108, -0.4448406398296356, 0.6761950254440308, -0.06459604948759079, 0.5557125210762024, -0.014506685547530651, 0.08772021532058716, 0.5981550812721252, -0.5449318885803223, -0.022185029461979866, -0.30844634771347046, 1.0363303422927856, 0.40295469760894775, 0.35416391491889954, -0.31131798028945923, -0.12585818767547607, 0.08297953754663467, 0.014657136052846909, -0.6607742309570312, -0.02454278990626335, 0.03507065027952194, -0.47418397665023804, -0.050324682146310806, 0.19357764720916748, -0.7252270579338074, 0.16217832267284393, -0.23986446857452393, 0.39255499839782715, -0.8641226291656494, 0.07129557430744171, 0.22845296561717987, -0.46858060359954834, 0.27413615584373474, -0.17825670540332794, -0.4646625816822052, 0.2721889913082123, 0.6233757138252258, 0.8208141326904297, -0.14896038174629211, -0.5304622650146484, -0.2367827296257019, 0.11078520864248276, -0.037327077239751816, 0.6315741539001465, -0.4344433844089508, -0.13558679819107056, 0.041697293519973755, 0.21490678191184998, -0.27405601739883423, -0.4164157509803772, 0.9826482534408569, -0.37668704986572266, 0.6817260980606079, 0.017933297902345657, -0.7424364686012268, -0.15004439651966095, 0.11800268292427063, -0.5586305260658264, 1.1835731267929077, 0.003552679903805256, -0.8416042923927307, 0.05114798620343208, -0.6322944164276123, -0.6046925783157349, -0.15602470934391022, -0.0029212862718850374, -0.478900283575058, 0.05508578568696976, 0.3563656508922577, 0.6313636898994446, -0.47529861330986023, 0.31411898136138916, -0.16218319535255432, -0.18528959155082703, 0.17560341954231262, -0.3568224012851715, 1.1130577325820923, 0.2416699230670929, -0.48264580965042114, -0.10204372555017471, -0.6786037087440491, 0.10790465772151947, 0.2771849036216736, -0.18182434141635895, -0.42198237776756287, -0.17490321397781372, 0.3766126334667206, 0.3871861398220062, 0.37915849685668945, -0.5597831606864929, -0.3301323652267456, -0.45482343435287476, 0.6602284908294678, 0.5144675970077515, 0.06927397847175598, 0.3841971158981323, -0.3185894191265106, 0.4815237522125244, 0.1869358867406845, 0.22440651059150696, -0.034129515290260315, -0.5183058977127075, -0.8051179051399231, -0.06962257623672485, 0.4012083411216736, 0.7263068556785583, -0.8652881979942322, 0.773072361946106, -0.6552237868309021, -0.7494736909866333, -0.663186252117157, 0.09274653345346451, 0.6298985481262207, 0.3370959162712097, 0.7904359102249146, 0.009796547703444958, -0.5825105905532837, -1.1534861326217651, -0.3727045953273773, 0.009893673472106457, -0.03996559977531433, 0.13455361127853394, 0.6894707679748535, -0.17159965634346008, 0.6973225474357605, -0.5504388809204102, -0.17831940948963165, -0.46458667516708374, -0.005379202775657177, 0.26176348328590393, 0.46251586079597473, 0.6621471643447876, -1.0258995294570923, -0.8131135702133179, -0.1609824001789093, -0.8226147890090942, -0.04834899306297302, -0.0594002865254879, -0.09897235780954361, 0.2621922791004181, 0.5892955660820007, -0.8988431692123413, 0.11148060113191605, 0.5441318154335022, -0.3317490220069885, 0.25959476828575134, -0.2702662944793701, 0.05730646848678589, -1.5335402488708496, 0.12196763604879379, 0.22831328213214874, -0.16122092306613922, -0.47640368342399597, 0.25727617740631104, 0.1614055335521698, -0.08907104283571243, -0.5959325432777405, 0.4443912208080292, -0.40414729714393616, 0.26510778069496155, 0.18412163853645325, 0.4084066152572632, -0.0026050545275211334, 0.5439978241920471, 0.03008652850985527, 0.825597882270813, 0.49159306287765503, -0.4961003363132477, 0.2019057273864746, 0.6156944036483765, -0.32229089736938477, 0.6296173930168152, -0.8788881897926331, -0.05208662897348404, -0.01753729209303856, 0.26759466528892517, -0.7804899215698242, 0.10881965607404709, 0.15529410541057587, -0.5080751776695251, 0.07098381221294403, 0.17359019815921783, -0.6403423547744751, -0.3879300355911255, -0.3911096751689911, -0.0412495881319046, 0.6434853076934814, -0.4078349471092224, 0.5298870801925659, 0.2256748229265213, -0.2115030139684677, -0.5196418762207031, -0.921118974685669, 0.34668228030204773, -0.3763297498226166, -0.6532197594642639, 0.6054749488830566, -0.09791034460067749, -0.1505693793296814, 0.1213526651263237, 0.12516283988952637, -0.07523449510335922, -0.0850895419716835, 0.04003589227795601, 0.2230725735425949, -0.18495610356330872, -0.0066331904381513596, 0.17063210904598236, -0.21964143216609955, -0.10382991284132004, -0.15163451433181763, 0.6830791234970093, -0.20503845810890198, -0.05828291177749634, -0.4397892951965332, 0.4639221131801605, 0.5532141327857971, -0.16967545449733734, 0.8349056839942932, 0.7754336595535278, -0.14382211863994598, 0.03858300298452377, -0.4807763397693634, -0.20216481387615204, -0.43784233927726746, 0.4572736620903015, -0.5695101022720337, -0.8571255207061768, 0.32218635082244873, 0.18178099393844604, -0.11232024431228638, 0.7817326784133911, 0.5240129232406616, -0.02872895821928978, 0.8164013624191284, 0.46028250455856323, -0.09638464450836182, 0.3373244106769562, -0.279968798160553, 0.2741011083126068, -0.6575462818145752, -0.05708276852965355, -0.6877711415290833, -0.07700124382972717, -0.849590539932251, -0.40149468183517456, 0.332514226436615, 0.005268016364425421, -0.1229311153292656, 1.0312068462371826, -0.23034080862998962, 0.1312570571899414, 0.7760027647018433, 0.13852033019065857, 0.13452306389808655, 0.10256626456975937, -0.29191121459007263, -0.3093971312046051, -0.7231757044792175, -0.6724327802658081, 1.0129053592681885, 0.2801041007041931, 0.46743249893188477, 0.024717045947909355, 0.7140812873840332, 0.11947599798440933, -0.24210384488105774, -0.4217430055141449, 0.787736713886261, -0.3313683867454529, -0.5655197501182556, -0.1945410966873169, -0.4626990854740143, -1.0024055242538452, 0.20728017389774323, -0.12311659753322601, -0.48577436804771423, -0.00637147668749094, -0.2943493723869324, -0.06639248132705688, 0.1941377967596054, -0.8452153205871582, 0.9527934193611145, -0.19565105438232422, -0.1402623951435089, -0.3480466604232788, -0.9083877801895142, -0.1415260285139084, -0.04970140382647514, 0.13229894638061523, 0.14074422419071198, -0.11404082179069519, 0.7922460436820984, -0.31634005904197693, 0.6222022771835327, -0.03927209973335266, 0.04672561213374138, 0.14204862713813782, -0.19137372076511383, 0.5180372595787048, -0.18117773532867432, -0.1521500051021576, 0.3888959586620331, 0.07314615696668625, -0.45075464248657227, -0.4924549460411072, 0.7514340877532959, -0.7429089546203613, -0.5398234128952026, -0.347570538520813, -0.5937298536300659, -0.12601758539676666, 0.30447015166282654, 0.37688907980918884, 0.20019091665744781, -0.1679934710264206, 0.6101891398429871, 0.44905903935432434, -0.37889155745506287, 0.4366593360900879, 0.4374351501464844, 0.20529253780841827, -0.41313183307647705, 0.6552478671073914, 0.07147307693958282, 0.23939579725265503, 0.7004168629646301, 0.10321300476789474, -0.2869732975959778, -0.433646559715271, -0.3210284113883972, 0.4632667303085327, -0.7452492117881775, -0.16341130435466766, -0.9977383017539978, -0.22176294028759003, -0.6310968399047852, 0.021185411140322685, -0.06318654119968414, -0.6618148684501648, -0.19109192490577698, -0.28997769951820374, 0.4060429036617279, 0.4596948027610779, 0.08958210051059723, 0.23197869956493378, -0.7698496580123901, 0.31358203291893005, -0.15222294628620148, 0.05825929716229439, -0.22446562349796295, -0.6642121076583862, -0.4019927978515625, 0.09283889085054398, -0.4190385639667511, -0.8281702995300293, 0.4443691670894623, 0.20374241471290588, 0.6596630811691284, 0.08525525778532028, 0.016745921224355698, 0.6782202124595642, -0.7376167178153992, 1.028185486793518, 0.09961013495922089, -1.062435507774353, 0.40320685505867004, -0.03921355679631233, 0.21408849954605103, 0.5285241007804871, 0.7438738942146301, -0.6748531460762024, -0.7094085812568665, -0.8136813044548035, -1.0423692464828491, 0.6551874279975891, 0.4286530315876007, 0.3748476505279541, -0.23309308290481567, 0.15437237918376923, 0.09457924962043762, 0.12428376823663712, -0.9477236866950989, -0.4762280583381653, -0.13187862932682037, -0.5205018520355225, -0.38199353218078613, -0.12066371738910675, -0.0009989418322220445, -0.31915587186813354, 0.8673883676528931, 0.1657065749168396, 0.36480993032455444, 0.18954792618751526, -0.4575192332267761, 0.22267159819602966, 0.4280179440975189, 0.4201347231864929, 0.4660624861717224, -0.02765563130378723, 0.1486876755952835, 0.501632034778595, -0.26343727111816406, 0.03383468836545944, 0.448204904794693, -0.32729610800743103, 0.36254045367240906, 0.4946565330028534, 0.9328829050064087, 0.4753439128398895, -0.703373372554779, 0.5742588639259338, 0.062787264585495, -0.1841323971748352, -0.32930096983909607, -0.15772992372512817, 0.28174397349357605, 0.4269520938396454, 0.2960059344768524, -0.052310530096292496, 0.08022866398096085, -0.3821120262145996, 0.3138423264026642, 0.24771857261657715, -0.37302902340888977, -0.3483514189720154, 0.6905052661895752, -0.1009988784790039, -0.3863978981971741, 0.5102691650390625, -0.13901838660240173, -0.6903982162475586, 0.3986988663673401, 0.6624115109443665, 0.8756763935089111, -0.03860713914036751, 0.29075679183006287, 0.36396223306655884, 0.3201720714569092, -0.029956499114632607, 0.1639048308134079, 0.06239097937941551, -0.6230030059814453, -0.19209100306034088, -0.5648437142372131, -0.09651978313922882, -0.02375645563006401, -0.6053985357284546, 0.4371049106121063, -0.022793713957071304, -0.08441633731126785, 0.11069709807634354, -0.16412116587162018, -0.7075399160385132, 0.16911937296390533, -0.07470104098320007, 0.9100666642189026, -0.9728308916091919, 0.8143433928489685, 0.781909167766571, -0.757580041885376, -0.5893620848655701, 0.17329686880111694, -0.41935327649116516, -0.6956473588943481, 0.7570321559906006, 0.05287335440516472, 0.15463073551654816, 0.008989819325506687, -0.24017637968063354, -0.8198913335800171, 1.1494837999343872, 0.3663731813430786, -0.3287656605243683, -0.3097383379936218, 0.414115846157074, 0.8424738645553589, -0.153860941529274, 0.4151163399219513, 0.39292630553245544, 0.5693535804748535, -0.21829430758953094, -0.9668024778366089, 0.28978854417800903, -0.3285270631313324, 0.18473787605762482, 0.058190543204545975, -0.622900664806366, 0.9639244675636292, 0.18471765518188477, -0.11163275688886642, 0.17576466500759125, 0.6383007168769836, 0.09383020550012589, 0.045569028705358505, 0.4492868483066559, 0.8529377579689026, 0.3572489321231842, -0.10906989872455597, 1.131568193435669, -0.6860024929046631, 0.6175295114517212, 0.9648250937461853, -0.10222914814949036, 1.0474261045455933, 0.631458580493927, -0.3488510251045227, 0.7498676180839539, 0.39192622900009155, -0.183722123503685, 0.5353041887283325, -0.14375658333301544, 0.051372237503528595, -0.12869440019130707, 0.06746897846460342, -0.35100772976875305, 0.32743099331855774, 0.024948857724666595, -0.5827703475952148, -0.39125216007232666, 0.1704522669315338, 0.3142854869365692, 0.24691158533096313, 0.2077222764492035, 0.6024869084358215, 0.23645131289958954, -0.7351117730140686, 0.6511924862861633, 0.24709486961364746, 0.7826595306396484, -0.6385197639465332, 0.17949865758419037, -0.12276706099510193, 0.3486737012863159, 0.03154577687382698, -0.7981334924697876, 0.39896276593208313, 0.04685596004128456, -0.0907655730843544, -0.45299476385116577, 0.3884282112121582, -0.5198726654052734, -0.543107271194458, 0.6661199331283569, 0.6318165063858032, 0.118544802069664, 0.05842231214046478, -1.1490988731384277, -0.1877693086862564, 0.10266901552677155, -0.3218159079551697, 0.13199836015701294, 0.5405902862548828, -0.02858942747116089, 0.5504870414733887, 0.41718024015426636, -0.03280555456876755, 0.05339599400758743, -0.026892516762018204, 0.6773985028266907, -0.7390800714492798, -0.5016576051712036, -0.9055556058883667, 0.39441582560539246, -0.30015847086906433, -0.4051361680030823, 1.2468832731246948, 0.8646431565284729, 0.984657883644104, -0.3366323709487915, 0.7105119228363037, -0.23496805131435394, 0.6651199460029602, -0.46273136138916016, 0.5195926427841187, -0.6317874193191528, -0.10732012242078781, -0.43234771490097046, -0.9425305724143982, -0.28258848190307617, 0.5064560174942017, -0.4240971505641937, 0.03937069699168205, 1.0374776124954224, 0.8927292227745056, -0.26057881116867065, -0.1548256129026413, 0.10602843016386032, 0.3109213411808014, 0.1677808165550232, 0.6751495599746704, 0.48642662167549133, -0.8953397870063782, 0.8797335028648376, -0.2940806746482849, 0.1003078743815422, -0.08853659778833389, -0.6230097413063049, -0.84903484582901, -0.8544135689735413, -0.3580472767353058, -0.4650176465511322, 0.14297819137573242, 0.8616220355033875, 0.39533087611198425, -0.9147487878799438, -0.3584199845790863, -0.2564142346382141, -0.07524324953556061, -0.3131343722343445, -0.27780359983444214, 0.5368916988372803, -0.44795143604278564, -1.0779008865356445, 0.32365548610687256, 0.024022191762924194, 0.010802121832966805, -0.06294557452201843, -0.14998169243335724, -0.6933577656745911, 0.12195562571287155, 0.5496586561203003, -0.12193044275045395, -0.6927490234375, -0.2126198261976242, 0.2579917907714844, -0.35767874121665955, 0.07974736392498016, 0.4213120639324188, -0.4327707886695862, 0.05832819268107414, 0.57464200258255, 0.5623470544815063, 0.6220515370368958, -0.16866551339626312, 0.5073104500770569, -0.6262280941009521, 0.30611133575439453, 0.2090478390455246, 0.5405697822570801, 0.4728861451148987, -0.13119500875473022, 0.5925573706626892, 0.31879687309265137, -0.3741937577724457, -0.6782541275024414, 0.033981312066316605, -0.9477294683456421, -0.38844171166419983, 1.261638879776001, -0.4063778221607208, -0.24837255477905273, 0.04194239526987076, -0.19296760857105255, 0.4123096466064453, -0.22304101288318634, 0.5510731339454651, 0.8484290242195129, 0.2974085211753845, -0.02848675847053528, -0.4212169349193573, 0.2908162772655487, 0.8086628913879395, -0.6808091998100281, -0.2415783703327179, 0.2839287221431732, 0.3876139223575592, 0.34003666043281555, 0.030872387811541557, -0.24537374079227448, 0.04882991686463356, -0.132073774933815, 0.10370653122663498, 0.07913722842931747, 0.04902968555688858, -0.3531777858734131, 0.22812101244926453, -0.32862651348114014, -0.10515233129262924 ]
meta-llama/Llama-2-7b-chat-hf
meta-llama
"2023-11-13T16:32:10Z"
965,652
1,956
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "facebook", "meta", "llama-2", "en", "arxiv:2307.09288", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-13T16:45:23Z"
--- extra_gated_heading: Access Llama 2 on Hugging Face extra_gated_description: >- This is a form to enable access to Llama 2 on Hugging Face after you have been granted access from Meta. Please visit the [Meta website](https://ai.meta.com/resources/models-and-libraries/llama-downloads) and accept our license terms and acceptable use policy before submitting this form. Requests will be processed in 1-2 days. extra_gated_prompt: "**Your Hugging Face account email address MUST match the email you provide on the Meta website, or your request will not be approved.**" extra_gated_button_content: Submit extra_gated_fields: I agree to share my name, email address and username with Meta and confirm that I have already been granted download access on the Meta website: checkbox language: - en pipeline_tag: text-generation inference: false arxiv: 2307.09288 tags: - facebook - meta - pytorch - llama - llama-2 --- # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B fine-tuned model, optimized for dialogue use cases and converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/meta-llama/Llama-2-7b) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/meta-llama/Llama-2-13b) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)| |70B| [Link](https://huggingface.co/meta-llama/Llama-2-70b) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf)|
[ -0.22428345680236816, -0.722655177116394, 0.3798867464065552, 0.1964878886938095, -0.38748475909233093, 0.2430022805929184, -0.054421212524175644, -0.7666724324226379, 0.06722107529640198, 0.3142017722129822, -0.7254677414894104, -0.5726742148399353, -0.6869128346443176, 0.07246191054582596, -0.2267671674489975, 1.1005022525787354, -0.0068175289779901505, -0.2922094762325287, -0.12610167264938354, 0.09412224590778351, -0.49743372201919556, -0.3988015651702881, -0.543333888053894, -0.43108320236206055, 0.3936218321323395, 0.49481120705604553, 0.6200133562088013, 0.6632139086723328, 0.5553001761436462, 0.24883557856082916, -0.2707103192806244, 0.23434890806674957, -0.7374189496040344, -0.2647128403186798, 0.1327948123216629, -0.5054681301116943, -0.696427583694458, 0.16309763491153717, 0.36741113662719727, 0.17843317985534668, -0.29401668906211853, 0.5376400351524353, 0.0772489681839943, 0.4851711094379425, -0.5724915266036987, 0.18322646617889404, -0.7551220059394836, 0.03174068033695221, -0.22229357063770294, -0.0797240138053894, -0.1971369832754135, -0.2956782877445221, -0.19762888550758362, -0.849259614944458, -0.11514678597450256, 0.08820770680904388, 1.0638329982757568, 0.6637301445007324, -0.4565194547176361, -0.12274365872144699, -0.2930071949958801, 0.9711410999298096, -0.8741726875305176, 0.05315558612346649, 0.5900213122367859, 0.2912822961807251, -0.24283137917518616, -0.7745873928070068, -0.6626408100128174, -0.14440149068832397, 0.06433087587356567, 0.36827486753463745, -0.42348891496658325, 0.0196131132543087, 0.18137654662132263, 0.3849383592605591, -0.5838884115219116, 0.5852730870246887, -0.5211880207061768, -0.17883887887001038, 1.0773093700408936, 0.251131534576416, -0.009324319660663605, -0.048958223313093185, -0.5004656910896301, -0.2941262125968933, -0.8138165473937988, 0.1874629557132721, 0.5035464763641357, -0.039425771683454514, -0.4730963110923767, 0.630199134349823, -0.4368740916252136, 0.29920268058776855, 0.024697737768292427, -0.5299288630485535, 0.4849523901939392, -0.4912610948085785, -0.27436259388923645, -0.12783919274806976, 0.9176433086395264, 0.7425724267959595, 0.15614038705825806, 0.10876035690307617, -0.06600688397884369, 0.11930505931377411, -0.018252700567245483, -0.8434022665023804, -0.05415564030408859, 0.2574801743030548, -0.38151949644088745, -0.6010504961013794, -0.31744933128356934, -0.7624490857124329, -0.1666557490825653, -0.10242560505867004, 0.246231347322464, -0.04294756054878235, -0.3853458762168884, 0.11958172917366028, 0.05106612294912338, 0.5645237565040588, 0.22980184853076935, -0.9761822819709778, 0.22504881024360657, 0.580561101436615, 0.8041227459907532, -0.25221335887908936, -0.35480570793151855, 0.01032174751162529, -0.03047732263803482, -0.32763251662254333, 0.9307960867881775, -0.3616061508655548, -0.5506066679954529, -0.22912736237049103, -0.03234758600592613, 0.1708059459924698, -0.5238845944404602, 0.44062837958335876, -0.39573344588279724, 0.18349692225456238, -0.3380162715911865, -0.3820895850658417, -0.3419637084007263, 0.19998964667320251, -0.3985542058944702, 1.4835095405578613, 0.1183549091219902, -0.4890061020851135, 0.31127846240997314, -0.6947507262229919, -0.18145325779914856, -0.2027965933084488, 0.09371073544025421, -0.540760338306427, -0.27525654435157776, 0.142971009016037, 0.37337616086006165, -0.6661808490753174, 0.4862605631351471, -0.2094281166791916, -0.45009276270866394, 0.049488093703985214, -0.42935270071029663, 0.8509352207183838, 0.3005886673927307, -0.474107027053833, 0.06878511607646942, -0.846335232257843, 0.06719843298196793, 0.4567970931529999, -0.4871063530445099, 0.2817504405975342, 0.08430232107639313, -0.12460701167583466, 0.19168813526630402, 0.5050451755523682, -0.37578126788139343, 0.1683286428451538, -0.33702075481414795, 0.5113468766212463, 0.7648749351501465, 0.044053081423044205, 0.1689484715461731, -0.5296529531478882, 0.5285140872001648, -0.037615709006786346, 0.3968673050403595, 0.012062790803611279, -0.7361473441123962, -1.0500167608261108, -0.1977301388978958, -0.041871633380651474, 0.8635933995246887, -0.2595180571079254, 0.7079247236251831, -0.011063036508858204, -0.7595738768577576, -0.4335956871509552, 0.3771618902683258, 0.6998985409736633, 0.5145285725593567, 0.4346461892127991, -0.29297593235969543, -0.6265285015106201, -1.043168544769287, 0.05707534775137901, -0.45677441358566284, -0.02306493930518627, 0.36807963252067566, 0.6596633195877075, -0.3429564833641052, 0.7555960416793823, -0.5563321113586426, -0.17482104897499084, -0.2738892436027527, -0.13398224115371704, 0.06972989439964294, 0.3544441759586334, 0.6669814586639404, -0.39302799105644226, -0.22042874991893768, -0.12553158402442932, -0.9144467115402222, -0.11036808788776398, 0.11497539281845093, -0.21198175847530365, 0.24224933981895447, 0.3193662464618683, -0.6249648332595825, 0.46619799733161926, 0.7279694676399231, -0.17711219191551208, 0.5347713828086853, 0.01307627372443676, -0.17657862603664398, -1.1059937477111816, 0.034061700105667114, -0.2115810215473175, 0.030149465426802635, -0.4489162564277649, -0.04536988586187363, -0.2226586490869522, 0.07848756015300751, -0.6244630813598633, 0.6130245327949524, -0.3183542788028717, -0.16326633095741272, -0.1367589831352234, 0.06104573234915733, 0.060541100800037384, 0.6428536176681519, -0.1363564282655716, 1.103129506111145, 0.4074329137802124, -0.5936108231544495, 0.2674742341041565, 0.4077780842781067, -0.5179571509361267, 0.15928788483142853, -0.9002318978309631, 0.3720863461494446, 0.11639208346605301, 0.5453970432281494, -1.0125316381454468, -0.3939245045185089, 0.33370912075042725, -0.44309526681900024, 0.09591657668352127, 0.23035162687301636, -0.5639784336090088, -0.4008079469203949, -0.4390382170677185, 0.3193751871585846, 0.8392059206962585, -0.46420520544052124, 0.17987866699695587, 0.3910784423351288, 0.015298147685825825, -0.7049499750137329, -0.8410273194313049, 0.06021343544125557, -0.36804842948913574, -0.5466880202293396, 0.3056107461452484, -0.1925552785396576, -0.24002386629581451, -0.2733476459980011, 0.07067788392305374, -0.0032551921904087067, 0.3865319788455963, 0.37875989079475403, 0.37621015310287476, -0.12397800385951996, -0.02758520096540451, 0.15099461376667023, -0.20860303938388824, 0.033926479518413544, 0.21328376233577728, 0.6031689643859863, -0.1819998025894165, -0.23513296246528625, -0.7587985396385193, 0.044898565858602524, 0.2969065010547638, -0.25336894392967224, 0.6174452900886536, 0.43582484126091003, -0.21908625960350037, 0.23860634863376617, -0.7972376942634583, -0.11524757742881775, -0.5478432774543762, 0.5636406540870667, -0.21726030111312866, -0.8580169677734375, 0.5501605868339539, -0.011309239082038403, 0.45875364542007446, 0.7550023198127747, 0.6422142386436462, -0.08524850010871887, 0.8350774645805359, 0.5745860934257507, -0.06810656934976578, 0.3533858358860016, -0.4981655180454254, -0.09698416292667389, -0.9733569025993347, -0.6341761350631714, -0.327438622713089, -0.44724488258361816, -0.679364025592804, -0.4342491328716278, 0.27423983812332153, 0.2000911384820938, -0.6878007650375366, 0.3241814970970154, -0.596902072429657, 0.589728057384491, 0.5438058376312256, 0.13148388266563416, 0.3095376193523407, 0.11045701056718826, 0.14431186020374298, 0.054805971682071686, -0.5364539623260498, -0.7606193423271179, 1.5016604661941528, 0.437579870223999, 0.4623621106147766, 0.10961820930242538, 0.6911143064498901, 0.14327959716320038, 0.32491910457611084, -0.7280648946762085, 0.6746276021003723, 0.051251091063022614, -0.7260131239891052, -0.16212411224842072, -0.11682216078042984, -0.9194521903991699, 0.16282609105110168, -0.21545250713825226, -0.8131545186042786, 0.028753070160746574, -0.017876308411359787, -0.3872920572757721, 0.28827041387557983, -0.6883947849273682, 0.6085720062255859, -0.5737109780311584, -0.32031792402267456, -0.36127662658691406, -0.816314160823822, 0.702485203742981, -0.19951586425304413, 0.09883101284503937, -0.5200899839401245, -0.2642447054386139, 0.9177294373512268, -0.35914725065231323, 1.0317177772521973, -0.042587753385305405, -0.10145357251167297, 0.589349627494812, -0.18473418056964874, 0.4680147171020508, 0.04033910855650902, -0.27292361855506897, 0.6818892955780029, -0.12573634088039398, -0.3283107578754425, -0.1720457226037979, 0.5470117330551147, -1.2373557090759277, -0.8130879998207092, -0.5060086250305176, -0.5233238935470581, -0.04269040375947952, 0.08328316360712051, 0.5173273086547852, -0.09058559685945511, -0.03638263791799545, 0.12984487414360046, 0.4703669548034668, -0.5199877023696899, 0.47732651233673096, 0.5689737200737, -0.10370337963104248, -0.47716131806373596, 0.6708295941352844, 0.046709395945072174, 0.37833887338638306, 0.2279442548751831, 0.040388502180576324, -0.41893160343170166, -0.4397210478782654, -0.5216060280799866, 0.28008371591567993, -0.47605201601982117, -0.5002869963645935, -0.5509979724884033, -0.36616164445877075, -0.3402579724788666, -0.07310459762811661, -0.4533511698246002, -0.4532661736011505, -0.7654405236244202, -0.39120015501976013, 0.5350862145423889, 0.8313248753547668, 0.0017992082284763455, 0.6535822153091431, -0.33189713954925537, 0.1858968287706375, 0.3848709166049957, 0.18547256290912628, -0.02330103889107704, -0.7850719094276428, 0.05693928152322769, 0.1408342719078064, -0.7833879590034485, -0.6269252300262451, 0.24955107271671295, 0.28524312376976013, 0.4811204969882965, 0.4848274290561676, -0.07627292722463608, 0.8045183420181274, -0.36320754885673523, 1.1235123872756958, 0.3707217276096344, -0.6771438717842102, 0.721906840801239, -0.2181956171989441, 0.05082868039608002, 0.6506222486495972, 0.2606271803379059, -0.08636878430843353, -0.1710161715745926, -0.6509212851524353, -0.6959925889968872, 0.8278201818466187, 0.24615374207496643, 0.19181932508945465, 0.05756812170147896, 0.47058477997779846, 0.05611083656549454, 0.11709973961114883, -0.8375862240791321, -0.30881863832473755, -0.27494242787361145, -0.10700921714305878, -0.20187163352966309, -0.5213637948036194, -0.07510551810264587, -0.3200691342353821, 0.6506295800209045, 0.04472335800528526, 0.35229870676994324, -0.13716451823711395, 0.02453932724893093, -0.1002887487411499, 0.053737252950668335, 0.7521219849586487, 0.5001159906387329, -0.26314473152160645, -0.16382300853729248, 0.661380410194397, -0.6441007852554321, 0.34613174200057983, 0.010938744992017746, -0.13050919771194458, -0.3777492344379425, 0.41658923029899597, 0.9175504446029663, 0.2757541537284851, -0.7329158782958984, 0.346369206905365, 0.14004823565483093, -0.3765850365161896, -0.42764681577682495, 0.3843674659729004, 0.08347807824611664, 0.3437069058418274, 0.277342289686203, -0.1458367109298706, 0.09193142503499985, -0.5231724977493286, -0.13063043355941772, 0.4030562937259674, 0.12116842716932297, -0.43066638708114624, 1.0134294033050537, 0.32989898324012756, -0.2943020164966583, 0.545150101184845, -0.1739998161792755, -0.37378934025764465, 0.9200395345687866, 0.6433567404747009, 0.6660566329956055, -0.2672211229801178, 0.12116805464029312, 0.7285071015357971, 0.45708659291267395, -0.23805522918701172, 0.22951172292232513, -0.015847232192754745, -0.5061469078063965, -0.21528427302837372, -0.7165663242340088, -0.49174976348876953, 0.3625468313694, -0.5790671706199646, 0.31690290570259094, -0.6434618234634399, -0.2769157886505127, -0.32771193981170654, 0.4708724319934845, -0.6942808628082275, 0.20443908870220184, 0.10701028257608414, 0.9418900012969971, -0.7312957644462585, 0.776088297367096, 0.4949159324169159, -0.5053998827934265, -0.9101952314376831, -0.3086239993572235, 0.20830783247947693, -1.2634235620498657, 0.5339964628219604, 0.3812115788459778, -0.06698676943778992, 0.12569895386695862, -0.772350013256073, -1.2471777200698853, 1.739783525466919, 0.4687518775463104, -0.7880215644836426, -0.021687179803848267, 0.34392139315605164, 0.5090071558952332, -0.12211213260889053, 0.47193196415901184, 0.8498231768608093, 0.49863409996032715, 0.13424019515514374, -1.0861873626708984, 0.0952143743634224, -0.36587077379226685, -0.026685310527682304, -0.19760212302207947, -1.345121145248413, 0.8254244327545166, -0.4017358124256134, -0.24131962656974792, 0.22966593503952026, 0.6579588651657104, 0.7035158276557922, 0.5602878928184509, 0.35620200634002686, 0.805976152420044, 0.9331545829772949, -0.03720583766698837, 1.1390796899795532, -0.37469732761383057, 0.1849120557308197, 0.9169073104858398, -0.30741050839424133, 0.9955064058303833, 0.2376522421836853, -0.6003385186195374, 0.6297354698181152, 1.033969521522522, -0.02503320388495922, 0.60810387134552, 0.0655832290649414, -0.17423775792121887, -0.1910886913537979, -0.1752244085073471, -0.6622242331504822, 0.5283121466636658, 0.2597200274467468, -0.1415983885526657, -0.029061535373330116, -0.3441685736179352, 0.23381029069423676, -0.3436705470085144, -0.0058908904902637005, 0.8388016819953918, 0.1656883805990219, -0.6432576179504395, 0.9098085761070251, 0.042333267629146576, 0.866933286190033, -0.669680655002594, 0.09023066610097885, -0.5388526916503906, 0.0069971815682947636, -0.3775443732738495, -0.7175437808036804, 0.06719937920570374, 0.37423521280288696, -0.006578315980732441, -0.09972922503948212, 0.5636379718780518, 0.03379271924495697, -0.5751249194145203, 0.3539310395717621, 0.2779468297958374, 0.3669489920139313, 0.22249768674373627, -0.695563793182373, 0.18515662848949432, 0.09938444197177887, -0.5547913908958435, 0.39524975419044495, 0.03436322882771492, -0.06393850594758987, 0.8141274452209473, 0.7659870386123657, -0.20966950058937073, 0.13484063744544983, -0.21527259051799774, 1.0255712270736694, -0.5038240551948547, -0.2046336531639099, -0.7770869135856628, 0.545628011226654, 0.04020510986447334, -0.725471019744873, 0.5560294985771179, 0.6618505716323853, 0.7079167366027832, 0.285662442445755, 0.6697190999984741, 0.0839533731341362, 0.32767951488494873, -0.5472671389579773, 0.6226922273635864, -0.7887937426567078, 0.3979754149913788, 0.0770706757903099, -0.9960053563117981, -0.06351089477539062, 0.6883314847946167, -0.2456236630678177, 0.04660714417695999, 0.37521448731422424, 0.8895790576934814, 0.1781514436006546, -0.16367991268634796, 0.13286131620407104, 0.1801837831735611, 0.3689407408237457, 0.9117819666862488, 0.8638441562652588, -0.6466353535652161, 0.72536301612854, -0.3861287534236908, -0.2508232295513153, -0.28886765241622925, -0.7490442991256714, -0.9980117082595825, -0.2770070731639862, -0.25069257616996765, -0.16196122765541077, 0.07293090969324112, 0.7659388780593872, 0.5222802758216858, -0.596890926361084, -0.30193644762039185, -0.07341150939464569, -0.0842355266213417, 0.03932316601276398, -0.16226555407047272, 0.33597877621650696, -0.1263127326965332, -0.6027202010154724, 0.49863362312316895, 0.018177900463342667, 0.20347058773040771, -0.33574041724205017, -0.27820441126823425, -0.19483233988285065, 0.15975350141525269, 0.62859046459198, 0.2916146516799927, -0.9594328999519348, -0.23648087680339813, 0.04002832993865013, -0.1467330902814865, 0.12571857869625092, 0.019944900646805763, -0.7915390133857727, 0.10571097582578659, 0.14728312194347382, 0.38878002762794495, 0.6764696836471558, 0.06480668485164642, 0.06839273869991302, -0.5284095406532288, 0.46328678727149963, 0.013828243128955364, 0.14914841949939728, 0.3073471784591675, -0.4262378513813019, 0.8056512475013733, 0.1463029831647873, -0.7179271578788757, -0.9726191163063049, 0.12045557051897049, -1.0720205307006836, -0.0005485679139383137, 1.4132580757141113, 0.009634076617658138, -0.12215734273195267, 0.19553181529045105, -0.22574619948863983, 0.3839413821697235, -0.39866507053375244, 0.8297542929649353, 0.5799053311347961, -0.0902947410941124, -0.10026133060455322, -0.8050262928009033, 0.3618856966495514, 0.4098518192768097, -1.1147699356079102, -0.2584296464920044, 0.4705972969532013, 0.49703919887542725, -0.09608083218336105, 0.7095754742622375, 0.023559445515275, 0.24294821918010712, 0.0741702988743782, 0.10152265429496765, -0.2534315288066864, -0.1534578651189804, -0.09977243840694427, -0.2708257734775543, -0.055066753178834915, -0.22388291358947754 ]
cl-tohoku/bert-base-japanese-whole-word-masking
cl-tohoku
"2021-09-23T13:45:34Z"
962,568
50
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "ja", "dataset:wikipedia", "license:cc-by-sa-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: ja license: cc-by-sa-4.0 datasets: - wikipedia widget: - text: 東北大学で[MASK]の研究をしています。 --- # BERT base Japanese (IPA dictionary, whole word masking enabled) This is a [BERT](https://github.com/google-research/bert) model pretrained on texts in the Japanese language. This version of the model processes input texts with word-level tokenization based on the IPA dictionary, followed by the WordPiece subword tokenization. Additionally, the model is trained with the whole word masking enabled for the masked language modeling (MLM) objective. The codes for the pretraining are available at [cl-tohoku/bert-japanese](https://github.com/cl-tohoku/bert-japanese/tree/v1.0). ## Model architecture The model architecture is the same as the original BERT base model; 12 layers, 768 dimensions of hidden states, and 12 attention heads. ## Training Data The model is trained on Japanese Wikipedia as of September 1, 2019. To generate the training corpus, [WikiExtractor](https://github.com/attardi/wikiextractor) is used to extract plain texts from a dump file of Wikipedia articles. The text files used for the training are 2.6GB in size, consisting of approximately 17M sentences. ## Tokenization The texts are first tokenized by [MeCab](https://taku910.github.io/mecab/) morphological parser with the IPA dictionary and then split into subwords by the WordPiece algorithm. The vocabulary size is 32000. ## Training The model is trained with the same configuration as the original BERT; 512 tokens per instance, 256 instances per batch, and 1M training steps. For the training of the MLM (masked language modeling) objective, we introduced the **Whole Word Masking** in which all of the subword tokens corresponding to a single word (tokenized by MeCab) are masked at once. ## Licenses The pretrained models are distributed under the terms of the [Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0/). ## Acknowledgments For training models, we used Cloud TPUs provided by [TensorFlow Research Cloud](https://www.tensorflow.org/tfrc/) program.
[ -0.4667670726776123, -0.8767005205154419, 0.15617863833904266, 0.33542871475219727, -0.6473352313041687, -0.07717934995889664, -0.2867758572101593, -0.49826177954673767, 0.5480943918228149, 0.6572861671447754, -0.7726370692253113, -0.5359846949577332, -0.7302210927009583, 0.0068847113288939, -0.11283722519874573, 1.1808134317398071, -0.054298967123031616, 0.22584030032157898, 0.21437714993953705, 0.18253573775291443, -0.3976459801197052, -0.585419774055481, -0.6875860691070557, -0.37167713046073914, 0.4668743312358856, 0.1519608348608017, 0.47886553406715393, 0.5685127973556519, 0.2924145758152008, 0.2344793826341629, 0.12812964618206024, -0.09892769157886505, -0.5480521321296692, -0.2161087989807129, 0.06586921960115433, -0.49435365200042725, -0.2547786831855774, 0.07454542070627213, 0.65638267993927, 0.7302659749984741, 0.12070129066705704, 0.12239820510149002, -0.0693228542804718, 0.41491246223449707, -0.6717084050178528, 0.1292116641998291, -0.8375338315963745, 0.13554948568344116, -0.27732476592063904, 0.2668006122112274, -0.27662917971611023, -0.04841279238462448, 0.1752670705318451, -0.7785584330558777, 0.25182846188545227, 0.011316871270537376, 1.2826679944992065, 0.08804908394813538, 0.01681537739932537, -0.3045210838317871, -0.4435071349143982, 0.74683678150177, -0.7376888990402222, 0.3917688727378845, 0.679218053817749, 0.038930803537368774, -0.011003408581018448, -0.9046568274497986, -0.7302184104919434, -0.14410816133022308, 0.025156090036034584, 0.14413230121135712, -0.08016684651374817, 0.2080419510602951, 0.2803191542625427, 0.28736642003059387, -0.6633070111274719, 0.2691993713378906, -0.4665844142436981, -0.33576449751853943, 0.4729665517807007, -0.1218237653374672, 0.4701675474643707, -0.2813960611820221, -0.4948969781398773, -0.26378247141838074, -0.5866400599479675, 0.05254651978611946, 0.32898497581481934, 0.18902622163295746, -0.07104309648275375, 0.5936840176582336, 0.0442715659737587, 0.4871782064437866, -0.1823030412197113, -0.4067032039165497, 0.3164467215538025, -0.2289581298828125, -0.43444401025772095, 0.24669218063354492, 0.8646504878997803, 0.09647096693515778, 0.35881417989730835, -0.1693410724401474, -0.25895020365715027, -0.04678013175725937, 0.3843678832054138, -0.833340048789978, -0.17770500481128693, 0.12440396100282669, -0.5893855094909668, -0.261861115694046, 0.024158945307135582, -0.3202437162399292, 0.058272719383239746, -0.04085260629653931, 0.9162728786468506, -0.7234243750572205, -0.3104093670845032, 0.1522858887910843, -0.3302481472492218, 0.2821061909198761, 0.04566198214888573, -0.905627429485321, 0.16401901841163635, 0.6173853278160095, 0.7568148374557495, 0.01612860895693302, -0.4395061731338501, 0.14104120433330536, 0.196737140417099, -0.4805387854576111, 0.3073423504829407, -0.281445175409317, -0.4686635136604309, 0.018994366750121117, 0.12461013346910477, -0.23834644258022308, -0.2894538342952728, 0.40757352113723755, -0.5223746299743652, 0.2807198166847229, -0.09603824466466904, -0.7698907256126404, -0.261116623878479, 0.30028292536735535, -0.5677160620689392, 1.0830934047698975, 0.027948012575507164, -0.6048344969749451, 0.37087875604629517, -0.8682752251625061, -0.4681832194328308, 0.37294718623161316, 0.12230203300714493, -0.49515223503112793, 0.002622936386615038, 0.23622357845306396, 0.43074795603752136, 0.2114463895559311, 0.2549954056739807, -0.15614119172096252, -0.4677346646785736, 0.14634019136428833, -0.2727883458137512, 1.200205683708191, 0.19154931604862213, -0.5006978511810303, 0.004815110936760902, -0.8486527800559998, -0.03489498049020767, 0.23071500658988953, -0.3924295902252197, -0.5185508728027344, -0.35247603058815, 0.15752661228179932, 0.1312093883752823, 0.5568618774414062, -0.7696900963783264, 0.07228893786668777, -0.5640317797660828, 0.3022068738937378, 0.7823183536529541, -0.08279404789209366, 0.2068481743335724, -0.1440986841917038, 0.4107811152935028, 0.017664562910795212, 0.25858592987060547, -0.46449798345565796, -0.7795519828796387, -1.1271977424621582, -0.4735054075717926, 0.6157601475715637, 0.4973607659339905, -0.7169544100761414, 0.9937041997909546, -0.4129970967769623, -0.544094979763031, -0.9989626407623291, 0.0871737152338028, 0.4595736265182495, 0.42151710391044617, 0.21927882730960846, -0.48854735493659973, -0.7052863836288452, -1.089493989944458, 0.17932181060314178, -0.06918235123157501, -0.19092215597629547, 0.01671391911804676, 0.7222499251365662, -0.3817296326160431, 0.8897474408149719, -0.305121511220932, -0.4477274417877197, -0.34112343192100525, 0.29057738184928894, 0.2850048542022705, 0.5752325654029846, 0.4700058102607727, -0.6042003035545349, -0.5857803821563721, -0.2464614063501358, -0.5472981333732605, 0.0037289282772690058, 0.01424338947981596, -0.2771236300468445, 0.22361168265342712, 0.4558987319469452, -0.634921133518219, 0.3892422914505005, 0.5895411372184753, -0.10449369251728058, 0.4493388533592224, -0.15455980598926544, -0.3267627954483032, -1.4186533689498901, 0.3114909827709198, -0.16358649730682373, -0.17365774512290955, -0.6618278622627258, 0.2458726018667221, 0.032117053866386414, -0.28594326972961426, -0.40648576617240906, 0.578120768070221, -0.4727916419506073, 0.012983828783035278, -0.31986546516418457, -0.1233731359243393, 0.012730274349451065, 0.8923158645629883, 0.2118910849094391, 0.8284066915512085, 0.49852123856544495, -0.6452578902244568, 0.15729142725467682, 0.19796903431415558, -0.7870269417762756, -0.05145848169922829, -0.784137487411499, 0.10884851217269897, -0.13364292681217194, 0.2238088995218277, -1.093481183052063, -0.09720157086849213, 0.47342219948768616, -0.5498404502868652, 0.5095992684364319, 0.10864586383104324, -0.6970338821411133, -0.43120917677879333, -0.5051182508468628, 0.019017405807971954, 0.6951091289520264, -0.4635828733444214, 0.4957324266433716, 0.5063285827636719, -0.17000702023506165, -0.834061324596405, -0.8524497151374817, 0.30480095744132996, 0.13111267983913422, -0.4227577745914459, 0.5481095910072327, -0.10316876322031021, 0.12816287577152252, 0.1486629694700241, 0.05768381804227829, -0.1873643547296524, 0.15015511214733124, 0.21007393300533295, 0.38805851340293884, -0.22322556376457214, 0.0751085877418518, 0.09641201049089432, 0.016365520656108856, -0.008774557150900364, -0.1623404324054718, 0.9863291382789612, 0.13183237612247467, -0.13938596844673157, -0.3898010551929474, 0.25630462169647217, 0.24173641204833984, -0.03339071571826935, 1.0752285718917847, 0.9350726008415222, -0.5124974846839905, -0.08400929719209671, -0.6591110229492188, -0.10938730090856552, -0.4680272042751312, 0.6014482378959656, -0.5780524015426636, -0.8780614733695984, 0.5346304774284363, 0.3721460998058319, 0.25037530064582825, 0.6055817008018494, 0.6125547289848328, -0.28474101424217224, 0.9491270184516907, 0.7896130681037903, -0.5016710758209229, 0.5842337012290955, -0.3287961781024933, 0.27270615100860596, -0.7746298313140869, -0.33918166160583496, -0.38104110956192017, -0.3602047860622406, -0.4974871873855591, -0.30083465576171875, 0.2645413875579834, 0.2600213587284088, -0.2855323553085327, 0.38538679480552673, -0.4631490707397461, 0.5001958608627319, 0.8653205037117004, 0.20833565294742584, -0.03028317540884018, 0.38038522005081177, -0.30743643641471863, -0.1000685915350914, -0.6827859282493591, -0.40677422285079956, 1.1849910020828247, 0.6365553736686707, 0.5395964980125427, -0.1629738211631775, 0.7042476534843445, 0.08662471920251846, 0.30094432830810547, -0.8360350728034973, 0.5702678561210632, -0.33349940180778503, -1.0723539590835571, -0.3894193768501282, -0.15417785942554474, -1.0359469652175903, 0.27870166301727295, -0.25246545672416687, -0.6697990894317627, -0.10154920816421509, -0.269557386636734, 0.030976807698607445, 0.44835183024406433, -0.6700539588928223, 0.7595771551132202, -0.22097063064575195, 0.20222127437591553, -0.07723350822925568, -0.8889386653900146, 0.4116062521934509, -0.30616295337677, 0.09001284837722778, -0.018558166921138763, -0.0773186981678009, 1.1029785871505737, -0.4943467080593109, 1.1331425905227661, -0.2369670867919922, -0.12386970221996307, 0.06957025825977325, -0.31755542755126953, 0.20800401270389557, -0.35262420773506165, 0.2785719037055969, 0.7118223905563354, -0.24932807683944702, -0.41086384654045105, -0.12536250054836273, 0.5078913569450378, -1.193062663078308, -0.43158307671546936, -0.28809866309165955, -0.37643951177597046, -0.03665569797158241, 0.5700650811195374, 0.6396663188934326, 0.1092756986618042, -0.20092615485191345, 0.33744755387306213, 0.8942537903785706, -0.3485323488712311, 0.48650598526000977, 0.5374407172203064, -0.237406924366951, -0.41189107298851013, 0.9630607962608337, 0.21129031479358673, 0.03545532375574112, 0.5854966044425964, 0.05296865478157997, -0.34024104475975037, -0.47688552737236023, -0.4712579846382141, 0.40641725063323975, -0.5635978579521179, 0.034834228456020355, -0.8291724920272827, -0.673701286315918, -0.6189078092575073, 0.078741654753685, -0.3139534592628479, -0.40755781531333923, -0.29055655002593994, -0.0600464791059494, 0.03350282832980156, 0.5591378211975098, 0.012111334130167961, 0.5424627661705017, -0.7152378559112549, 0.33843106031417847, 0.3080166280269623, 0.34373316168785095, -0.03081672452390194, -0.5728631615638733, -0.48516467213630676, 0.25246503949165344, -0.20250047743320465, -0.6728143095970154, 0.3201614320278168, 0.12924203276634216, 0.7298715710639954, 0.5406589508056641, -0.2034529149532318, 0.73636794090271, -0.5663856267929077, 1.0500659942626953, 0.42691853642463684, -0.9621710181236267, 0.5716933608055115, -0.2438526451587677, 0.35602307319641113, 0.5515304207801819, 0.6966272592544556, -0.5302870869636536, -0.4670966863632202, -0.6778293251991272, -0.8669604063034058, 0.8046119809150696, 0.2103404700756073, 0.47479209303855896, -0.0005888975574634969, 0.2956238090991974, 0.1745167076587677, 0.23646248877048492, -1.1717941761016846, -0.4543686807155609, -0.46681392192840576, -0.2966976761817932, -0.20431169867515564, -0.5240987539291382, 0.038003575056791306, -0.3219848573207855, 1.032856822013855, 0.18900829553604126, 0.455422043800354, 0.004272168967872858, -0.3683130145072937, 0.017521798610687256, 0.022522734478116035, 0.6479490995407104, 0.5480926036834717, -0.3956977427005768, -0.18438896536827087, -0.015288583002984524, -0.9220260381698608, -0.17811033129692078, 0.10001073032617569, -0.3479635417461395, 0.5467303991317749, 0.44642481207847595, 1.295758843421936, 0.22879089415073395, -0.6476854681968689, 0.5784875154495239, 0.10902553051710129, -0.4493345618247986, -0.37524837255477905, 0.10277798026800156, 0.05858917534351349, -0.17322222888469696, 0.493206650018692, -0.4262863099575043, -0.11823952943086624, -0.45046868920326233, 0.01191694475710392, 0.46434080600738525, -0.22533243894577026, -0.11471952497959137, 0.5553686022758484, 0.12009395658969879, -0.2326315939426422, 0.7509384155273438, 0.02615910954773426, -0.7568320631980896, 0.6352388858795166, 0.7469754815101624, 0.961275577545166, -0.1949670910835266, 0.06603404134511948, 0.5107443928718567, 0.6078460812568665, 0.16131357848644257, 0.02590659260749817, -0.1827755719423294, -1.0307846069335938, -0.3907853066921234, -0.9125509858131409, -0.37783315777778625, 0.7348114848136902, -0.5693864822387695, 0.17554350197315216, -0.6232070922851562, -0.08179453015327454, 0.05974557250738144, 0.21775691211223602, -0.5143355131149292, 0.42913147807121277, 0.3074086904525757, 0.9790056943893433, -0.7635084986686707, 1.2439332008361816, 0.7826219797134399, -0.5063126683235168, -0.8151628971099854, -0.07662618160247803, -0.4457484185695648, -1.3698034286499023, 0.7086772918701172, 0.32520970702171326, 0.21256114542484283, 0.040380463004112244, -0.6699808835983276, -0.7578208446502686, 0.839964747428894, 0.010740283876657486, -0.5590284466743469, -0.22287559509277344, 0.3034381568431854, 0.5252636075019836, -0.35381922125816345, -0.08090903609991074, 0.349859356880188, 0.24132347106933594, 0.03100261464715004, -0.9183965921401978, -0.30378109216690063, -0.41890430450439453, 0.4139360785484314, 0.06546533107757568, -0.3611280620098114, 0.8944928050041199, 0.2343447357416153, -0.08400546759366989, 0.15265658497810364, 0.44884881377220154, 0.33465811610221863, -0.04805551469326019, 0.5743651986122131, 0.8972798585891724, 0.5391050577163696, -0.0015358455711975694, 0.860954225063324, -0.48729208111763, 0.29208284616470337, 0.8967678546905518, 0.0978582426905632, 0.8180935382843018, 0.4193874001502991, -0.16930072009563446, 0.5699799656867981, 0.7699059844017029, -0.2257896363735199, 0.7650916576385498, 0.095696821808815, -0.19681358337402344, 0.0020689629018306732, -0.09319215267896652, -0.4967559576034546, 0.41345053911209106, 0.5001019835472107, -0.562175989151001, -0.09371252357959747, 0.2552083730697632, 0.20619699358940125, -0.4562423825263977, -0.5249955058097839, 0.8916900753974915, 0.032217077910900116, -0.6520276665687561, 0.5437215566635132, 0.36701229214668274, 1.0448025465011597, -1.18068265914917, 0.24146397411823273, -0.15767091512680054, 0.06299831718206406, 0.18598434329032898, -0.6699677109718323, 0.08747062087059021, 0.09296156466007233, -0.21348117291927338, -0.29331880807876587, 0.828880786895752, -0.5280641317367554, -0.6404158473014832, 0.14786683022975922, 0.12659522891044617, 0.43385279178619385, 0.09586939215660095, -0.9044438004493713, 0.16207781434059143, 0.12209820002317429, -0.35565313696861267, 0.39684802293777466, 0.1947728395462036, 0.04365143924951553, 0.4821659028530121, 0.8193758130073547, 0.21066705882549286, 0.2918216288089752, 0.23162655532360077, 0.7723491191864014, -0.45969146490097046, -0.7284889221191406, -0.8458050489425659, 0.37311461567878723, -0.17215748131275177, -0.341328889131546, 0.7274959087371826, 0.5857794284820557, 1.0807138681411743, -0.3328952193260193, 0.7847612500190735, -0.08640268445014954, 0.4611498713493347, -0.5136261582374573, 0.8913859128952026, -0.7059022188186646, -0.10120945423841476, -0.22942215204238892, -1.0760846138000488, -0.14859353005886078, 0.9673534035682678, 0.11604053527116776, 0.07222095876932144, 0.39502641558647156, 0.712995707988739, 0.053498536348342896, -0.13483694195747375, 0.41599124670028687, 0.28018417954444885, 0.1547485738992691, 0.4612771272659302, 0.4659251868724823, -0.5984929203987122, 0.41065049171447754, -0.5032450556755066, -0.1683717519044876, -0.23957671225070953, -0.7019117474555969, -1.0869104862213135, -0.642436683177948, -0.15946848690509796, -0.2989703416824341, -0.007688651792705059, 0.8955682516098022, 0.7949748635292053, -0.8010849952697754, -0.2926414906978607, -0.07247046381235123, -0.1964530646800995, 0.11381826549768448, -0.26354676485061646, 0.4048042893409729, -0.46239230036735535, -0.816250741481781, 0.16979269683361053, 0.16696703433990479, 0.1335248202085495, -0.4023495018482208, -0.031951192766427994, -0.36873432993888855, 0.0323902852833271, 0.6367202997207642, 0.10254307091236115, -0.7346853017807007, -0.09944276511669159, -0.11188475042581558, -0.30753788352012634, -0.10584890842437744, 0.5602855086326599, -0.4149972200393677, 0.6212946176528931, 0.2431108057498932, 0.7013764381408691, 0.9171549081802368, -0.3523893654346466, 0.43438956141471863, -1.1274268627166748, 0.3973608613014221, 0.08604291826486588, 0.45184677839279175, 0.21308402717113495, -0.1965516358613968, 0.43769243359565735, 0.3818947970867157, -0.12342675775289536, -0.789987325668335, -0.058616314083337784, -0.9046686291694641, -0.6588732004165649, 0.9108746647834778, -0.22772520780563354, -0.39882123470306396, -0.06532705575227737, -0.20125947892665863, 0.45796331763267517, -0.02701108530163765, 0.7652385234832764, 1.089860439300537, 0.37512508034706116, -0.24628913402557373, -0.2329719215631485, 0.28909218311309814, 0.3288123607635498, -0.47180038690567017, -0.5177580118179321, 0.12102293223142624, 0.659450352191925, 0.37670156359672546, 0.8997645974159241, -0.007678729947656393, 0.09974079579114914, 0.0024309600703418255, 0.4325654208660126, -0.1424490511417389, -0.23998351395130157, -0.19772370159626007, 0.022662954404950142, -0.28254616260528564, -0.6637402772903442 ]
patrickjohncyh/fashion-clip
patrickjohncyh
"2023-06-09T01:03:16Z"
957,059
95
transformers
[ "transformers", "pytorch", "safetensors", "clip", "zero-shot-image-classification", "vision", "language", "fashion", "ecommerce", "en", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
zero-shot-image-classification
"2023-02-21T19:51:47Z"
--- license: mit tags: - vision - language - fashion - ecommerce library_name: transformers language: - en widget: - src: https://cdn-images.farfetch-contents.com/19/76/05/56/19760556_44221665_1000.jpg candidate_labels: black shoe, red shoe, a cat example_title: Black Shoe --- [![Youtube Video](https://img.shields.io/badge/youtube-video-red)](https://www.youtube.com/watch?v=uqRSc-KSA1Y) [![HuggingFace Model](https://img.shields.io/badge/HF%20Model-Weights-yellow)](https://huggingface.co/patrickjohncyh/fashion-clip) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1Z1hAxBnWjF76bEi9KQ6CMBBEmI_FVDrW?usp=sharing) [![Medium Blog Post](https://raw.githubusercontent.com/aleen42/badges/master/src/medium.svg)](https://towardsdatascience.com/teaching-clip-some-fashion-3005ac3fdcc3) [![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://huggingface.co/spaces/vinid/fashion-clip-app) # Model Card: Fashion CLIP Disclaimer: The model card adapts the model card from [here](https://huggingface.co/openai/clip-vit-base-patch32). ## Model Details UPDATE (10/03/23): We have updated the model! We found that [laion/CLIP-ViT-B-32-laion2B-s34B-b79K](https://huggingface.co/laion/CLIP-ViT-B-32-laion2B-s34B-b79K) checkpoint (thanks [Bin](https://www.linkedin.com/in/bin-duan-56205310/)!) worked better than original OpenAI CLIP on Fashion. We thus fine-tune a newer (and better!) version of FashionCLIP (henceforth FashionCLIP 2.0), while keeping the architecture the same. We postulate that the perofrmance gains afforded by `laion/CLIP-ViT-B-32-laion2B-s34B-b79K` are due to the increased training data (5x OpenAI CLIP data). Our [thesis](https://www.nature.com/articles/s41598-022-23052-9), however, remains the same -- fine-tuning `laion/CLIP` on our fashion dataset improved zero-shot perofrmance across our benchmarks. See the below table comparing weighted macro F1 score across models. | Model | FMNIST | KAGL | DEEP | | ------------- | ------------- | ------------- | ------------- | | OpenAI CLIP | 0.66 | 0.63 | 0.45 | | FashionCLIP | 0.74 | 0.67 | 0.48 | | Laion CLIP | 0.78 | 0.71 | 0.58 | | FashionCLIP 2.0 | __0.83__ | __0.73__ | __0.62__ | --- FashionCLIP is a CLIP-based model developed to produce general product representations for fashion concepts. Leveraging the pre-trained checkpoint (ViT-B/32) released by [OpenAI](https://github.com/openai/CLIP), we train FashionCLIP on a large, high-quality novel fashion dataset to study whether domain specific fine-tuning of CLIP-like models is sufficient to produce product representations that are zero-shot transferable to entirely new datasets and tasks. FashionCLIP was not developed for model deplyoment - to do so, researchers will first need to carefully study their capabilities in relation to the specific context they’re being deployed within. ### Model Date March 2023 ### Model Type The model uses a ViT-B/32 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained, starting from a pre-trained checkpoint, to maximize the similarity of (image, text) pairs via a contrastive loss on a fashion dataset containing 800K products. ### Documents - [FashionCLIP Github Repo](https://github.com/patrickjohncyh/fashion-clip) - [FashionCLIP Paper](https://www.nature.com/articles/s41598-022-23052-9) ## Data The model was trained on (image, text) pairs obtained from the Farfecth dataset[^1 Awaiting official release.], an English dataset comprising over 800K fashion products, with more than 3K brands across dozens of object types. The image used for encoding is the standard product image, which is a picture of the item over a white background, with no humans. The text used is a concatenation of the _highlight_ (e.g., “stripes”, “long sleeves”, “Armani”) and _short description_ (“80s styled t-shirt”)) available in the Farfetch dataset. ## Limitations, Bias and Fiarness We acknowledge certain limitations of FashionCLIP and expect that it inherits certain limitations and biases present in the original CLIP model. We do not expect our fine-tuning to significantly augment these limitations: we acknowledge that the fashion data we use makes explicit assumptions about the notion of gender as in "blue shoes for a woman" that inevitably associate aspects of clothing with specific people. Our investigations also suggest that the data used introduces certain limitations in FashionCLIP. From the textual modality, given that most captions derived from the Farfetch dataset are long, we observe that FashionCLIP may be more performant in longer queries than shorter ones. From the image modality, FashionCLIP is also biased towards standard product images (centered, white background). Model selection, i.e. selecting an appropariate stopping critera during fine-tuning, remains an open challenge. We observed that using loss on an in-domain (i.e. same distribution as test) validation dataset is a poor selection critera when out-of-domain generalization (i.e. across different datasets) is desired, even when the dataset used is relatively diverse and large. ## Citation ``` @Article{Chia2022, title="Contrastive language and vision learning of general fashion concepts", author="Chia, Patrick John and Attanasio, Giuseppe and Bianchi, Federico and Terragni, Silvia and Magalh{\~a}es, Ana Rita and Goncalves, Diogo and Greco, Ciro and Tagliabue, Jacopo", journal="Scientific Reports", year="2022", month="Nov", day="08", volume="12", number="1", abstract="The steady rise of online shopping goes hand in hand with the development of increasingly complex ML and NLP models. While most use cases are cast as specialized supervised learning problems, we argue that practitioners would greatly benefit from general and transferable representations of products. In this work, we build on recent developments in contrastive learning to train FashionCLIP, a CLIP-like model adapted for the fashion industry. We demonstrate the effectiveness of the representations learned by FashionCLIP with extensive tests across a variety of tasks, datasets and generalization probes. We argue that adaptations of large pre-trained models such as CLIP offer new perspectives in terms of scalability and sustainability for certain types of players in the industry. Finally, we detail the costs and environmental impact of training, and release the model weights and code as open source contribution to the community.", issn="2045-2322", doi="10.1038/s41598-022-23052-9", url="https://doi.org/10.1038/s41598-022-23052-9" } ```
[ -0.3928990066051483, -0.5354478359222412, 0.1404741108417511, 0.36776062846183777, -0.5075474381446838, 0.017309017479419708, -0.14692488312721252, -0.6374546885490417, 0.49306851625442505, 0.1330396831035614, -0.9314272403717041, -0.6992366909980774, -0.3826393187046051, 0.04539975896477699, -0.25556275248527527, 0.864834189414978, -0.2028912454843521, -0.0016308326739817858, -0.10482414811849594, -0.491275817155838, -0.5160366296768188, -0.7885066270828247, -0.25999337434768677, -0.13110175728797913, -0.12590545415878296, 0.20163065195083618, 0.5501854419708252, 0.5206837058067322, 0.5735734701156616, 0.21656693518161774, -0.15930241346359253, 0.02853415533900261, -0.7015093564987183, -0.2131328284740448, -0.27416476607322693, -0.32141923904418945, -0.6118543148040771, 0.3141733407974243, 0.16810759902000427, 0.09018599987030029, -0.012306693941354752, 0.5226291418075562, 0.22378993034362793, 0.5501325726509094, -0.7253018617630005, -0.05190461874008179, -0.29649195075035095, -0.08915463089942932, -0.22128382325172424, 0.10871296375989914, -0.2003699243068695, 0.05526480823755264, 0.1359284371137619, -0.70706707239151, 0.5509400367736816, 0.0694466233253479, 1.2602440118789673, 0.026614675298333168, -0.024577854201197624, -0.0868324562907219, -0.6370068192481995, 0.9104148745536804, -0.5684605836868286, 0.5714855194091797, 0.1612071990966797, 0.0906108096241951, 0.42512354254722595, -0.6875170469284058, -0.37544870376586914, 0.2776864469051361, 0.09830410033464432, 0.27407026290893555, -0.1820158213376999, -0.2921622395515442, 0.1450965255498886, 0.4609718918800354, -0.2634800672531128, -0.04519917070865631, -0.5935343503952026, 0.05412564426660538, 0.6621764898300171, 0.048083871603012085, 0.2664620876312256, -0.2600620985031128, -0.8520282506942749, -0.491892546415329, -0.657034158706665, 0.23383711278438568, 0.17308978736400604, 0.05661801993846893, -0.5832223892211914, 0.24031826853752136, 0.04879515990614891, 0.3646228313446045, 0.19762267172336578, -0.32170796394348145, 0.5458042621612549, -0.4673101007938385, -0.30481767654418945, -0.1925617754459381, 0.7378429174423218, 0.9964049458503723, 0.04417451098561287, 0.24429406225681305, 0.03190000727772713, -0.32388967275619507, 0.045144520699977875, -0.9429539442062378, -0.3927111327648163, 0.17969821393489838, -0.5606706142425537, -0.3760600686073303, 0.4867592453956604, -0.8792915344238281, 0.27544111013412476, -0.2933209240436554, 0.6005526781082153, -0.35496434569358826, -0.050001248717308044, 0.47429534792900085, -0.47741150856018066, 0.4318404197692871, 0.3021184206008911, -0.6722185611724854, 0.1321106106042862, 0.48523417115211487, 1.0938934087753296, -0.2686719000339508, -0.07395797967910767, 0.3011310398578644, 0.28866666555404663, -0.25869742035865784, 0.6087309122085571, -0.26797589659690857, -0.3710816204547882, -0.12898047268390656, 0.46419864892959595, 0.05766897276043892, -0.5051975846290588, 0.5584600567817688, -0.07945539057254791, -0.06677669286727905, -0.5455222129821777, -0.1802942007780075, -0.13831643760204315, 0.16769126057624817, -0.5905184745788574, 0.8074184060096741, 0.04350283369421959, -0.7406004667282104, 0.5133439302444458, -0.4975045919418335, -0.22623933851718903, -0.25040215253829956, 0.08724945783615112, -0.7360723614692688, -0.13884679973125458, 0.5301759839057922, 0.5712230801582336, -0.286172091960907, -0.10584606975317001, -0.7883262634277344, -0.4983974099159241, 0.2793698310852051, -0.026314212009310722, 0.6689249873161316, -0.11313094198703766, -0.3094957172870636, -0.10712894052267075, -0.6172792315483093, -0.16273099184036255, 0.5436129570007324, 0.05902952700853348, -0.5049536228179932, -0.34043559432029724, 0.01815236173570156, 0.2543713450431824, 0.09284116327762604, -0.5076334476470947, 0.22251316905021667, -0.14735746383666992, 0.7699934840202332, 0.9831938147544861, 0.11402343958616257, 0.3346313238143921, -0.6593697667121887, 0.47204849123954773, -0.2181345671415329, 0.6244032979011536, -0.17471124231815338, -0.3452205955982208, -0.6675032377243042, -0.5724291801452637, 0.3339686095714569, 0.3695334792137146, -0.41741108894348145, 0.19353486597537994, -0.05707681179046631, -0.5427736043930054, -0.3912871479988098, -0.13214947283267975, 0.32924559712409973, 0.35168713331222534, 0.5831701159477234, -0.5667043924331665, -0.5635634660720825, -0.7762064337730408, -0.009042334742844105, 0.0874195396900177, -0.36888208985328674, 0.6307321190834045, 0.7309916615486145, -0.2014077752828598, 0.8927021622657776, -0.9069797992706299, -0.3977114260196686, -0.23297588527202606, 0.08905131369829178, 0.25228530168533325, 0.5707770586013794, 1.1597539186477661, -0.791397750377655, -0.3551778495311737, -0.450991153717041, -0.5117631554603577, -0.14813537895679474, -0.15293651819229126, -0.2534049153327942, -0.171640083193779, 0.30469778180122375, -0.22994008660316467, 0.6548985838890076, 0.39300537109375, -0.06659480929374695, 0.7162774801254272, -0.0459718257188797, 0.17090503871440887, -0.9612247347831726, 0.16270452737808228, 0.26212289929389954, -0.13311998546123505, -0.3503943979740143, -0.03042008727788925, -0.0696544498205185, -0.28009477257728577, -0.8293922543525696, 0.7154183387756348, -0.3776471018791199, 0.011208897456526756, 0.07854253798723221, 0.07248007506132126, 0.5677524209022522, 0.7742658257484436, 0.09336887300014496, 0.8666775822639465, 0.1738438755273819, -0.7191473841667175, 0.23565390706062317, 0.7445384860038757, -0.41396307945251465, 0.6635048389434814, -0.991395890712738, 0.150956928730011, -0.045054346323013306, 0.19750279188156128, -0.8416881561279297, -0.3805936872959137, 0.5079526305198669, -0.2323131263256073, 0.3754124939441681, -0.3233644664287567, -0.31842875480651855, -0.6906269192695618, -0.9033089876174927, 0.5505931377410889, 0.5817769765853882, -0.8132360577583313, 0.10406526178121567, 0.37449440360069275, 0.1438133269548416, -0.3999984860420227, -0.7678415179252625, -0.603294849395752, -0.3780001103878021, -0.5402904152870178, 0.7164056897163391, -0.38258621096611023, 0.0979502722620964, -0.3087518811225891, -0.3870652914047241, -0.20290899276733398, 0.01721000112593174, 0.2934052050113678, 0.7008309364318848, -0.029063576832413673, 0.1144341304898262, -0.1328098028898239, 0.4569249749183655, -0.0653567910194397, -0.17136675119400024, 0.44827717542648315, -0.1932368278503418, -0.31164440512657166, -0.4709763824939728, 0.1207859069108963, 0.32849881052970886, -0.19242723286151886, 0.5372997522354126, 0.5252068042755127, 0.09448671340942383, -0.28300461173057556, -0.40513917803764343, -0.08577115088701248, -0.5257551670074463, 0.29011067748069763, -0.2429402470588684, -0.6926199197769165, 0.49399667978286743, 0.026717286556959152, -0.08852608501911163, 0.6565592885017395, 0.2494335025548935, -0.012078524567186832, 0.9257893562316895, 0.9128089547157288, -0.03636766970157623, 0.7955305576324463, -0.6171138882637024, 0.022966425865888596, -1.0732969045639038, -0.39648064970970154, -0.33700016140937805, -0.5127530097961426, -0.5230394005775452, -0.6416336894035339, 0.5217282772064209, 0.6059311628341675, -0.5048537254333496, 0.6914452910423279, -0.7783927321434021, 0.3688491880893707, 0.4695724546909332, 0.6690625548362732, -0.061614591628313065, 0.021994661539793015, 0.0539228655397892, -0.2635691463947296, -0.7822895646095276, -0.003664950840175152, 1.0454561710357666, 0.5581979751586914, 0.9645246267318726, -0.07854720950126648, 0.4766230583190918, 0.11553960293531418, 0.06400968134403229, -0.7368125915527344, 0.3717377781867981, -0.5071145296096802, -0.33679571747779846, 0.14286662638187408, -0.04198774695396423, -0.5314512848854065, -0.04798130691051483, -0.35598498582839966, -0.6242068409919739, 0.8237041234970093, 0.4268171489238739, -0.3058082163333893, 0.3132586181163788, -0.39699098467826843, 0.7970232367515564, -0.47071126103401184, -0.7304163575172424, 0.1425323486328125, -0.6353219747543335, 0.31355369091033936, 0.19225956499576569, -0.015048312954604626, -0.2967827022075653, 0.0722358450293541, 1.2334599494934082, -0.5770082473754883, 0.9726441502571106, 0.18290702998638153, 0.2121535837650299, 0.4368665814399719, -0.3928500711917877, 0.27245843410491943, -0.06854396313428879, 0.09632212668657303, 0.5852869153022766, 0.1314661204814911, -0.31822922825813293, -0.49185073375701904, 0.22605793178081512, -0.6298146843910217, -0.4265497326850891, -0.3217301368713379, -0.14722786843776703, -0.07327068597078323, 0.09222216159105301, 0.692497730255127, 0.646393895149231, -0.32201245427131653, 0.3238435387611389, 0.5986720323562622, -0.25644171237945557, 0.20704986155033112, 0.34728580713272095, -0.06273332983255386, -0.6648424863815308, 0.9693418741226196, 0.08076578378677368, 0.3430864214897156, 0.30219826102256775, 0.41244393587112427, -0.13891485333442688, -0.1736840158700943, -0.3025246858596802, 0.4736662209033966, -0.7722600698471069, -0.39571917057037354, -0.2939702570438385, -0.1412488967180252, -0.4945535957813263, -0.43003928661346436, -0.4246552586555481, -0.4539903402328491, -0.7011335492134094, -0.04026231914758682, 0.4439356327056885, 0.6723257899284363, -0.13881883025169373, 0.3169267177581787, -0.6810119152069092, 0.07083786278963089, 0.3984701931476593, 0.31047821044921875, -0.028930887579917908, -0.5993006229400635, -0.17047171294689178, 0.0981990396976471, -0.6862159967422485, -0.6944902539253235, 0.4898180067539215, 0.4297218918800354, 0.4335280656814575, 0.6056004762649536, 0.22292299568653107, 0.9778845310211182, -0.379650354385376, 0.9098744988441467, 0.4165152311325073, -0.903432309627533, 0.6327194571495056, -0.3912084698677063, 0.2271418571472168, 0.529573917388916, 0.8143621683120728, -0.3503999710083008, -0.04549376666545868, -0.859427809715271, -1.0665704011917114, 0.6654170155525208, -0.029372375458478928, 0.027100106701254845, -0.08599164336919785, 0.3527986407279968, -0.03405095636844635, 0.4820888936519623, -0.5308201313018799, -0.19462347030639648, -0.6573512554168701, 0.05063798651099205, 0.22152572870254517, -0.46795913577079773, -0.030299978330731392, -0.506579577922821, 0.5837316513061523, -0.12164005637168884, 0.5766298174858093, 0.47739797830581665, 0.08791053295135498, 0.27088749408721924, 0.11112870275974274, 0.684160590171814, 0.7027312517166138, -0.4594515264034271, -0.5231115221977234, 0.13176053762435913, -0.5134799480438232, -0.21758131682872772, -0.2598487436771393, -0.27822911739349365, 0.13882257044315338, 0.3636656701564789, 1.0637378692626953, 0.5352270603179932, -0.6281439065933228, 1.0748957395553589, 0.18391014635562897, -0.31858932971954346, -0.10726615786552429, -0.08234201371669769, -0.47805410623550415, 0.23091919720172882, 0.06675989925861359, 0.15098455548286438, 0.14750300347805023, -0.7744212746620178, 0.43466970324516296, 0.48445558547973633, -0.3670327663421631, -0.6766318082809448, 0.976901113986969, 0.20485153794288635, -0.03864764794707298, 0.27808400988578796, 0.17310400307178497, -0.855511486530304, 0.5823893547058105, 0.703192949295044, 0.8382062315940857, -0.26307210326194763, 0.29779908061027527, 0.7577977776527405, -0.15939396619796753, -0.5731834769248962, 0.004784692078828812, -0.20492932200431824, -0.5104581117630005, -0.058065760880708694, -0.7791202068328857, -0.5742627382278442, 0.1350950300693512, -0.9122722148895264, 0.5981458425521851, -0.6524856686592102, -0.297914057970047, -0.24639348685741425, -0.3262232840061188, -0.7428761124610901, 0.19973620772361755, -0.19280165433883667, 0.9404663443565369, -0.9777441024780273, 0.38602349162101746, 0.3503150939941406, -0.5797629356384277, -0.792583703994751, 0.08754771202802658, -0.06881959736347198, -0.788053035736084, 0.675311803817749, 0.4223577380180359, 0.00999833457171917, -0.5800908803939819, -0.8591200709342957, -0.781868040561676, 1.1929816007614136, 0.29087167978286743, -0.5478367209434509, -0.3882119357585907, -0.13299566507339478, 0.4056287705898285, -0.4522585868835449, 0.11182427406311035, 0.38263049721717834, -0.05767255648970604, 0.5086926817893982, -0.6895751357078552, -0.18215598165988922, -0.13591241836547852, 0.034652408212423325, 0.0819450318813324, -1.1017284393310547, 1.1063501834869385, -0.07341356575489044, -0.3000572919845581, 0.27247267961502075, 0.4810633361339569, 0.04712295159697533, 0.3749445080757141, 0.2718692123889923, 0.4882503151893616, 0.5582149028778076, -0.042737625539302826, 1.0550498962402344, -0.15188345313072205, 0.6784364581108093, 1.2885488271713257, 0.06900063157081604, 0.9415223002433777, 0.04445289820432663, -0.21432726085186005, 0.4532645344734192, 0.4696139693260193, -0.599219024181366, 0.6447253823280334, -0.1017930656671524, 0.12960273027420044, -0.23745939135551453, -0.11939962208271027, -0.38621699810028076, 0.5549956560134888, -0.030860602855682373, -0.5409649014472961, 0.07930220663547516, 0.22990141808986664, 0.1263456791639328, -0.14265991747379303, -0.3658721446990967, 0.5691627860069275, 0.08031301945447922, -0.12256738543510437, 0.8079532384872437, -0.14915412664413452, 0.8092583417892456, -0.7684646844863892, -0.17907601594924927, 0.03827349841594696, 0.17445632815361023, -0.1584777981042862, -0.6476054191589355, 0.29032692313194275, -0.18865054845809937, -0.16672419011592865, -0.43867015838623047, 0.7796065807342529, -0.15957355499267578, -0.5485216975212097, 0.2312486320734024, -0.19943411648273468, 0.07864151895046234, 0.06234784424304962, -0.8065831065177917, 0.3760329782962799, 0.058570485562086105, 0.007547168061137199, 0.256701797246933, 0.06367702782154083, 0.030960701406002045, 0.57063889503479, 0.5431570410728455, -0.1263207048177719, -0.1546115279197693, -0.2158586084842682, 0.9907441139221191, -0.4490877091884613, -0.5998486876487732, -0.7151767611503601, 0.30532175302505493, -0.32441020011901855, -0.35792723298072815, 0.8608880639076233, 0.5303750038146973, 1.2045612335205078, -0.3776722550392151, 0.42810603976249695, 0.022410713136196136, 0.5216191411018372, -0.561657190322876, 0.49697959423065186, -0.648647129535675, 0.2927311956882477, -0.7027724385261536, -0.5252023339271545, -0.16121622920036316, 0.7162116765975952, -0.3593118190765381, -0.1755477786064148, 0.46369725465774536, 0.46487823128700256, -0.21578676998615265, -0.17827293276786804, 0.10264504700899124, -0.07728805392980576, 0.1631345897912979, 0.4192120134830475, 0.31552401185035706, -0.7066488862037659, 0.4482274353504181, -0.6243298053741455, -0.21249167621135712, -0.369322270154953, -0.7537423968315125, -0.9718506336212158, -0.5625383257865906, -0.38175511360168457, -0.2842499911785126, 0.17473377287387848, 0.9069564938545227, 0.957236647605896, -0.623111367225647, -0.13809245824813843, 0.41134408116340637, 0.009485957212746143, -0.37783461809158325, -0.1924305558204651, 0.37651219964027405, 0.23771440982818604, -0.7350804805755615, 0.14937599003314972, 0.30147871375083923, 0.4132741689682007, 0.20540963113307953, 0.1770375818014145, -0.06461620330810547, 0.1843554824590683, 0.7838470339775085, 0.5328915119171143, -0.3963015675544739, -0.4464098811149597, 0.018676990643143654, 0.3833487629890442, 0.5152575373649597, 0.8458024859428406, -0.6870231032371521, 0.21684224903583527, 0.5153157711029053, 0.32438457012176514, 0.7446308732032776, 0.5177802443504333, 0.3944573402404785, -0.8771520853042603, 0.31592857837677, -0.12313219159841537, 0.3011411428451538, 0.34079116582870483, -0.11830299347639084, 0.6501339673995972, 0.6024104952812195, -0.4003679156303406, -0.6534016132354736, 0.21879985928535461, -1.0852161645889282, -0.37317955493927, 0.8484751582145691, -0.2658158838748932, -0.7032015919685364, 0.2840801477432251, -0.27819448709487915, 0.047233738005161285, -0.3599453568458557, 0.3948785662651062, 0.279901385307312, 0.06515882164239883, -0.19199855625629425, -0.38570889830589294, 0.4531596004962921, 0.0018234559101983905, -0.4188687801361084, -0.07749170064926147, 0.312036395072937, 0.6715570688247681, 0.2480572909116745, 0.5226977467536926, -0.07324806600809097, 0.2594364285469055, -0.3089575469493866, -0.17176738381385803, -0.23153916001319885, -0.3536485731601715, -0.1910863071680069, 0.2007891833782196, -0.36378130316734314, -0.5109820365905762 ]
microsoft/table-transformer-structure-recognition
microsoft
"2023-09-06T14:50:49Z"
951,388
100
transformers
[ "transformers", "pytorch", "safetensors", "table-transformer", "object-detection", "arxiv:2110.00061", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
object-detection
"2022-10-14T09:19:57Z"
--- license: mit widget: - src: https://documentation.tricentis.com/tosca/1420/en/content/tbox/images/table.png example_title: Table --- # Table Transformer (fine-tuned for Table Structure Recognition) Table Transformer (DETR) model trained on PubTables1M. It was introduced in the paper [PubTables-1M: Towards Comprehensive Table Extraction From Unstructured Documents](https://arxiv.org/abs/2110.00061) by Smock et al. and first released in [this repository](https://github.com/microsoft/table-transformer). Disclaimer: The team releasing Table Transformer did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The Table Transformer is equivalent to [DETR](https://huggingface.co/docs/transformers/model_doc/detr), a Transformer-based object detection model. Note that the authors decided to use the "normalize before" setting of DETR, which means that layernorm is applied before self- and cross-attention. ## Usage You can use the raw model for detecting the structure (like rows, columns) in tables. See the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/table-transformer) for more info.
[ -0.44057607650756836, -0.5180386900901794, 0.1589348316192627, -0.21952210366725922, -0.31762999296188354, -0.13479512929916382, 0.49991896748542786, -0.44343850016593933, 0.0665331482887268, 0.5390246510505676, -0.6404114961624146, -0.4239971935749054, -0.5356579422950745, 0.18542693555355072, -0.529561460018158, 1.2086836099624634, 0.020920760929584503, -0.0906919315457344, -0.21675297617912292, -0.0028128798585385084, -0.3315156102180481, -0.23821331560611725, -0.1966431736946106, -0.6741889715194702, 0.3498212993144989, 0.34127163887023926, 0.7366089224815369, 0.7839356064796448, 0.9446888566017151, 0.38916468620300293, -0.21200861036777496, -0.2617066502571106, -0.35181570053100586, -0.1990468055009842, -0.24202705919742584, -0.6001297235488892, -0.5695738792419434, 0.017746394500136375, 0.5000345706939697, 0.4124685525894165, -0.1344396322965622, 0.31614968180656433, -0.07603948563337326, 1.0415676832199097, -0.3938431441783905, 0.46137189865112305, -0.7195640802383423, 0.5267356038093567, -0.30850982666015625, 0.13095302879810333, -0.4608971178531647, -0.29137542843818665, 0.1468261182308197, -0.22709541022777557, 0.533053457736969, 0.08427587151527405, 1.1957879066467285, 0.1905728131532669, -0.45616844296455383, 0.15020664036273956, -1.0559905767440796, 0.34964656829833984, -0.4125266373157501, 0.8438774347305298, -0.014644023030996323, 0.8317974209785461, -0.19209274649620056, -0.9507362246513367, -0.7606691718101501, -0.31816473603248596, -0.49951982498168945, -0.10373852401971817, -0.3904567360877991, 0.028731727972626686, 0.47321754693984985, 0.46561333537101746, -0.6681011915206909, -0.18735337257385254, -0.6153861880302429, -0.08290112018585205, 0.3462112843990326, 0.11849605292081833, 0.3340635597705841, -0.22666974365711212, -0.7947607636451721, -0.14665888249874115, -0.39425548911094666, -0.045873064547777176, -0.23616324365139008, 0.3183538615703583, -0.5340667963027954, 0.6048890352249146, -0.023534782230854034, 0.6963084936141968, 0.26188910007476807, -0.09485085308551788, 0.3273085057735443, -0.09826891124248505, -0.23310013115406036, 0.023053649812936783, 0.7848936319351196, 0.22097869217395782, 0.32353097200393677, -0.4417000412940979, -0.41306278109550476, 0.2168537676334381, 0.5343529582023621, -0.7183327674865723, -0.5478389263153076, 0.06299717724323273, -0.7053417563438416, -0.33597469329833984, 0.3978284001350403, -0.8044701814651489, -0.25792694091796875, -0.2279951125383377, 0.383208304643631, -0.1560920774936676, -0.28573688864707947, -0.3005800247192383, -0.2343219816684723, 0.6103662848472595, 0.20199981331825256, -0.5846948623657227, 0.47702065110206604, 0.5614309310913086, 0.757645845413208, -0.48448896408081055, -0.05110174044966698, -0.3839636743068695, 0.28904664516448975, -0.15512429177761078, 1.158224105834961, -0.3381853401660919, -0.4382876455783844, -0.036737293004989624, 0.2803361117839813, 0.04171546921133995, -0.7206208109855652, 0.8531098961830139, -0.4327009618282318, 0.08556331694126129, -0.3283117115497589, -0.2625706195831299, -0.10390648990869522, 0.40789058804512024, -1.1046578884124756, 0.9672947525978088, 0.5119611024856567, -0.8893162608146667, 0.6923916339874268, -0.8328326344490051, -0.18250104784965515, 0.30152493715286255, -0.18363770842552185, -1.007617473602295, 0.20841628313064575, 0.06497924029827118, 0.38894495368003845, -0.12098856270313263, 0.1508139818906784, -0.1363423764705658, -0.2671664357185364, 0.2039353847503662, 0.09357493370771408, 0.5009438991546631, 0.24390487372875214, -0.0755179300904274, 0.5515799522399902, -0.8633711934089661, -0.16851806640625, 0.28410038352012634, -0.39348581433296204, 0.05306031182408333, 0.04611659422516823, 0.4600123167037964, 0.4830114543437958, -0.06529945880174637, -0.6842034459114075, 0.1751745194196701, -0.23909443616867065, 0.2996540069580078, 0.17299360036849976, -0.08859062194824219, 0.6424800157546997, -0.425773561000824, 0.22448596358299255, 0.39841657876968384, 0.2283603996038437, 0.16363629698753357, -0.14950285851955414, -0.566820502281189, -0.180294930934906, 0.2258695811033249, 0.5829548239707947, -0.6366756558418274, 0.6109746694564819, -0.2767224907875061, -0.7154364585876465, -0.31072136759757996, -0.25560060143470764, 0.3778163492679596, 0.7196155786514282, 0.649682879447937, -0.16041748225688934, -0.843319833278656, -1.136659860610962, -0.36858847737312317, -0.06748509407043457, -0.17316873371601105, -0.13329216837882996, 0.6446478962898254, -0.18395131826400757, 1.0682597160339355, -0.34021803736686707, -0.6410673260688782, -0.5088939666748047, -0.033659469336271286, 0.21553972363471985, 0.6981358528137207, 0.43611329793930054, -0.8096373677253723, -0.6312593817710876, -0.02631942182779312, -0.7827885746955872, 0.061770882457494736, 0.09623538702726364, -0.06303153187036514, 0.2884463667869568, 0.4111049473285675, -0.8158876895904541, 0.721002995967865, 0.04995419457554817, -0.31701985001564026, 0.5023747086524963, 0.14791159331798553, -0.1648038625717163, -1.0702069997787476, 0.14502401649951935, 0.2545646131038666, -0.2274186611175537, -1.0294139385223389, 0.12140030413866043, 0.3557068705558777, -0.21129220724105835, -0.6240646839141846, 0.4772363305091858, -0.7917819619178772, -0.08279485255479813, -0.20832031965255737, -0.09030649065971375, -0.015161657705903053, 0.3919477164745331, 0.13622993230819702, 0.5690175890922546, 0.19000034034252167, -0.4835510849952698, 0.020320691168308258, 0.7643036842346191, -0.22874000668525696, 0.8853951692581177, -0.8744156956672668, 0.2602769136428833, -0.2861824631690979, 0.13196101784706116, -1.136404037475586, -0.045773353427648544, 0.369233101606369, -0.13160039484500885, 0.7852686047554016, -0.2504093647003174, -0.14202438294887543, -0.8896663188934326, -0.27252131700515747, -0.1039753332734108, 0.34912535548210144, -0.6998475193977356, 0.9967333078384399, 0.5615535974502563, 0.410605251789093, -0.5175547003746033, -0.8295578956604004, -0.23162773251533508, -0.1983097940683365, -0.46332570910453796, 0.6964086294174194, 0.09229061752557755, -0.31424543261528015, -0.1634657233953476, -0.736491858959198, -0.19520671665668488, -0.24362002313137054, 0.4946663975715637, 0.33354657888412476, -0.06940284371376038, -0.14009004831314087, -0.12802602350711823, -0.3747834265232086, 0.27159619331359863, 0.1805797815322876, 0.5265540480613708, -0.3544764816761017, 0.03912803903222084, -0.807222843170166, 0.026389656588435173, 0.5013709664344788, -0.31716254353523254, 0.5704067945480347, 0.7422590851783752, -0.4665457606315613, -0.054095178842544556, -0.9833192229270935, -0.3845125138759613, -0.5204808115959167, 0.4082079231739044, -0.782954216003418, -0.6183358430862427, 0.919842004776001, 0.09880462288856506, -0.14732243120670319, 0.7870700359344482, 0.23760081827640533, 0.005203854758292437, 0.8644062876701355, 0.7594882249832153, -0.15023310482501984, 0.45232582092285156, -0.1673557460308075, -0.07397416979074478, -0.8826256990432739, -0.7594664692878723, -0.9953513145446777, -0.6141088008880615, -0.6635475158691406, -0.161799356341362, 0.2583339810371399, -0.11406107246875763, -0.36919546127319336, 0.7770890593528748, -1.1921275854110718, 0.5818357467651367, 0.3938327729701996, 0.2353621870279312, 0.27887964248657227, 0.021136829629540443, 0.08815837651491165, -0.09321816265583038, -0.43134164810180664, -0.44592365622520447, 0.44078439474105835, 0.5173080563545227, 1.0808721780776978, -0.17119763791561127, 0.7043934464454651, 0.11630262434482574, 0.4642825424671173, -0.7566302418708801, 0.5982756614685059, -0.033639855682849884, -0.7566144466400146, -0.24803632497787476, -0.512542188167572, -0.9646579027175903, 0.1281946897506714, -0.25117427110671997, -0.7458418607711792, 0.4989148676395416, -0.1042441576719284, 0.06428815424442291, 0.5911819338798523, -0.5254936814308167, 1.1877772808074951, 0.06301144510507584, -0.010474028997123241, 0.48648735880851746, -0.789512574672699, 0.296610563993454, 0.24371959269046783, -0.154932901263237, -0.1789141297340393, 0.15470464527606964, 0.919224202632904, -0.4624711275100708, 0.5380334854125977, -0.6166474223136902, 0.028796182945370674, 0.39842408895492554, 0.5442349910736084, 0.6147312521934509, -0.1415044367313385, -0.0941438376903534, 0.38541069626808167, 0.1781296283006668, 0.04496840760111809, -0.3160340487957001, 0.3517323136329651, -0.7724229693412781, -0.3722997307777405, -0.4315708875656128, -0.8559454083442688, 0.1628159135580063, 0.22058160603046417, 0.1505957394838333, 0.07652480900287628, -0.2637178897857666, 0.3844422399997711, 0.49583151936531067, 0.11071097105741501, 0.5659557580947876, 0.7022405862808228, -0.17538326978683472, -0.18574534356594086, 0.4757364094257355, 0.24525991082191467, -0.25269249081611633, 0.8592475652694702, 0.27681776881217957, -0.419919490814209, -0.3852454423904419, -0.24137453734874725, 0.16074585914611816, -0.37371712923049927, -0.6248424053192139, -0.8208367228507996, -0.5635524392127991, -0.1482168287038803, -0.0426989309489727, -0.3843737244606018, -0.43403881788253784, -0.18692250549793243, -0.34802499413490295, 0.4943486750125885, 0.6677820682525635, 0.08109115064144135, 0.5330180525779724, -0.9401382207870483, 0.407705694437027, 0.27447089552879333, 0.5782057046890259, -0.27646011114120483, -0.6237024664878845, 0.22321294248104095, -0.34151288866996765, -0.20580409467220306, -1.102399230003357, 0.5860568881034851, 0.18318498134613037, 0.8414780497550964, 0.3526924252510071, -0.08600365370512009, 0.347064733505249, -0.677521824836731, 0.38088586926460266, 0.1545296162366867, -0.8163065314292908, 0.543832540512085, -0.12069616466760635, 0.45871326327323914, 0.6593379378318787, 0.4768323004245758, -0.14060726761817932, 0.13937008380889893, -0.3104322850704193, -0.5439868569374084, 0.8241899609565735, -0.09612951427698135, 0.0272399690002203, 0.12478315830230713, 0.582288920879364, 0.18734271824359894, 0.13869203627109528, -1.183145523071289, -0.3288702964782715, -0.26384392380714417, 0.005449011921882629, 0.36838287115097046, -0.5981156229972839, -0.005276215262711048, -0.4263078272342682, 0.3571561574935913, 0.11996940523386002, 0.5316590666770935, 0.24748986959457397, -0.17927022278308868, -0.5029110312461853, 0.18228287994861603, 0.44069716334342957, 0.515963077545166, -0.6105998754501343, 0.21594499051570892, 0.07696323841810226, -0.6350281834602356, -0.07560322433710098, 0.37589243054389954, -0.24042579531669617, 0.16427718102931976, 0.06488559395074844, 0.7303381562232971, 0.215273916721344, 0.05128352344036102, 0.27897945046424866, -0.08214821666479111, -0.34677281975746155, -0.2562895715236664, 0.08840439468622208, -0.06608007103204727, 0.2888041138648987, 0.46641552448272705, -0.15521691739559174, 0.3297445476055145, -0.44880542159080505, 0.7332436442375183, 0.7341037392616272, -0.9382983446121216, -0.3405763804912567, 0.9811775088310242, -0.08864732086658478, -0.743359386920929, 0.690532386302948, -0.03234430402517319, -0.5309557318687439, 0.5970635414123535, 0.8316563963890076, 0.9093759059906006, -0.7043224573135376, 0.27302441000938416, 0.44557327032089233, 0.577457070350647, 0.1748294085264206, 0.6097422242164612, -0.11791599541902542, -0.7620250582695007, 0.027219442650675774, -0.7586285471916199, -0.2121688425540924, 0.17449070513248444, -0.7944849133491516, 0.22240431606769562, -0.2987368702888489, -0.13026490807533264, 0.4403625428676605, 0.06202639266848564, -0.7663282752037048, -0.0028921756893396378, -0.02490426041185856, 1.2917016744613647, -0.8441357016563416, 0.8012237548828125, 0.5122448205947876, -0.6500840187072754, -0.8012475967407227, -0.3149063289165497, 0.0900154784321785, -0.5787962675094604, 0.5727148056030273, 0.2235381007194519, 0.3234385848045349, -0.06547185033559799, -0.6495602130889893, -0.833453357219696, 1.0474376678466797, 0.09483088552951813, -0.6833181977272034, -0.23754146695137024, 0.4828953742980957, 0.4599584937095642, -0.27550235390663147, 0.5264661312103271, 0.6551930904388428, 0.6897865533828735, 0.3259768486022949, -0.8800906538963318, 0.25668564438819885, -0.3281027674674988, 0.18946944177150726, 0.4059496819972992, -0.24523043632507324, 0.9515403509140015, -0.0102715278044343, -0.11266418546438217, -0.21825678646564484, 0.8648722767829895, 0.1795831322669983, 0.25864437222480774, 0.5387710332870483, 0.5759028792381287, 0.3215717375278473, -0.553771436214447, 0.837618350982666, -0.09489811211824417, 0.330990195274353, 1.2795909643173218, -0.6346798539161682, 0.6287355422973633, 0.4111003875732422, -0.4793013036251068, 0.706403911113739, 0.27335402369499207, -0.6147158741950989, 0.4531570076942444, 0.24892987310886383, 0.291849285364151, 0.22762268781661987, -0.013606676831841469, -0.5466880798339844, 0.526555061340332, 0.3117803931236267, -0.4352971613407135, -0.6228563189506531, -0.16039663553237915, -0.23286756873130798, -0.0032310003880411386, -0.4238877296447754, 1.0757887363433838, -0.007989143952727318, -0.10160830616950989, 0.48470252752304077, -0.2485983967781067, 0.47769659757614136, -0.4863364100456238, -0.1971629559993744, -0.30927184224128723, 0.1971864551305771, -0.43774449825286865, -0.7230730056762695, 0.7052194476127625, -0.2855914533138275, -0.33101344108581543, 0.18435238301753998, 1.1599271297454834, -0.49096980690956116, -0.4244720935821533, 0.16445568203926086, 0.6579325199127197, 0.17959177494049072, -0.22375933825969696, -0.8771331906318665, 0.2963279187679291, -0.2646733820438385, -0.3552451431751251, 0.3207426071166992, 0.34282851219177246, 0.07939823716878891, 0.5933210253715515, 0.48484355211257935, -0.5089758634567261, -0.1884782463312149, 0.1558832973241806, 1.0073235034942627, -0.461699515581131, -0.3506257236003876, -0.7652865648269653, 0.708726167678833, -0.1445235162973404, 0.06306556612253189, 0.7856352925300598, 0.9698957204818726, 0.7339730858802795, -0.5950852632522583, 0.10443843901157379, 0.003333266358822584, 0.5193638205528259, -0.05416566878557205, 1.0785709619522095, -0.3107741177082062, -0.1468106359243393, -0.5183535814285278, -1.3340438604354858, -0.5578175187110901, 0.8981967568397522, -0.1835065633058548, 0.20245863497257233, 0.550615131855011, 0.8784792423248291, -0.18534094095230103, -0.013490757904946804, 0.28462377190589905, 0.37511980533599854, 0.1877501755952835, 0.09874102473258972, 0.5421224236488342, -0.6290038228034973, 0.577564537525177, -0.449190616607666, -0.07518886774778366, -0.035837508738040924, -0.7600385546684265, -1.1014719009399414, -0.6239478588104248, -0.328590989112854, -0.5033504366874695, -0.01841764710843563, 0.7547868490219116, 0.8902003765106201, -1.076904058456421, -0.21035060286521912, -0.27807414531707764, 0.09603643417358398, -0.22296832501888275, -0.31980615854263306, 0.6028172373771667, 0.04281102493405342, -0.3910873830318451, 0.2877785861492157, 0.14159902930259705, 0.2025018185377121, -0.027449557557702065, 0.3267926275730133, -0.42471715807914734, -0.10730776190757751, 0.4900968372821808, 0.403207391500473, -0.3775242269039154, -0.31490832567214966, -0.16886086761951447, -0.12612013518810272, 0.522580623626709, 0.44708022475242615, -0.8394125699996948, 0.13858182728290558, 0.5939075350761414, 0.23209697008132935, 0.7478676438331604, 0.07257211208343506, 0.1129278689622879, -0.7446361184120178, 0.21739302575588226, 0.09837114810943604, 0.3961842656135559, 0.21871404349803925, -0.4974280297756195, 0.9377604722976685, 0.04728330299258232, -0.6148137450218201, -1.0049749612808228, 0.12132692337036133, -1.3986968994140625, 0.017383405938744545, 0.5879703760147095, 0.3131658732891083, -0.7994422912597656, -0.0876663327217102, -0.23365968465805054, 0.5601300001144409, -0.35560616850852966, 1.017538070678711, -0.0772835835814476, -0.03538339212536812, -0.5177551507949829, -0.17290271818637848, 0.7650068998336792, -0.23911702632904053, -1.067909836769104, -0.14240577816963196, 0.19631074368953705, 0.3316030204296112, 0.6042832136154175, 0.17102323472499847, -0.5537129044532776, 0.06180925294756889, -0.0032776910811662674, 0.6752990484237671, -0.30882298946380615, -0.5422607660293579, -0.2827473282814026, 0.3970121145248413, -0.39289146661758423, -0.11965449154376984 ]
google/flan-t5-base
google
"2023-07-17T12:48:39Z"
949,763
429
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "t5", "text2text-generation", "en", "fr", "ro", "de", "multilingual", "dataset:svakulenk0/qrecc", "dataset:taskmaster2", "dataset:djaym7/wiki_dialog", "dataset:deepmind/code_contests", "dataset:lambada", "dataset:gsm8k", "dataset:aqua_rat", "dataset:esnli", "dataset:quasc", "dataset:qed", "arxiv:2210.11416", "arxiv:1910.09700", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2022-10-21T10:02:31Z"
--- language: - en - fr - ro - de - multilingual tags: - text2text-generation widget: - text: "Translate to German: My name is Arthur" example_title: "Translation" - text: "Please answer to the following question. Who is going to be the next Ballon d'or?" example_title: "Question Answering" - text: "Q: Can Geoffrey Hinton have a conversation with George Washington? Give the rationale before answering." example_title: "Logical reasoning" - text: "Please answer the following question. What is the boiling point of Nitrogen?" example_title: "Scientific knowledge" - text: "Answer the following yes/no question. Can you write a whole Haiku in a single tweet?" example_title: "Yes/no question" - text: "Answer the following yes/no question by reasoning step-by-step. Can you write a whole Haiku in a single tweet?" example_title: "Reasoning task" - text: "Q: ( False or not False or False ) is? A: Let's think step by step" example_title: "Boolean Expressions" - text: "The square root of x is the cube root of y. What is y to the power of 2, if x = 4?" example_title: "Math reasoning" - text: "Premise: At my age you will probably have learnt one lesson. Hypothesis: It's not certain how many lessons you'll learn by your thirties. Does the premise entail the hypothesis?" example_title: "Premise and hypothesis" datasets: - svakulenk0/qrecc - taskmaster2 - djaym7/wiki_dialog - deepmind/code_contests - lambada - gsm8k - aqua_rat - esnli - quasc - qed license: apache-2.0 --- # Model Card for FLAN-T5 base <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/flan2_architecture.jpg" alt="drawing" width="600"/> # Table of Contents 0. [TL;DR](#TL;DR) 1. [Model Details](#model-details) 2. [Usage](#usage) 3. [Uses](#uses) 4. [Bias, Risks, and Limitations](#bias-risks-and-limitations) 5. [Training Details](#training-details) 6. [Evaluation](#evaluation) 7. [Environmental Impact](#environmental-impact) 8. [Citation](#citation) 9. [Model Card Authors](#model-card-authors) # TL;DR If you already know T5, FLAN-T5 is just better at everything. For the same number of parameters, these models have been fine-tuned on more than 1000 additional tasks covering also more languages. As mentioned in the first few lines of the abstract : > Flan-PaLM 540B achieves state-of-the-art performance on several benchmarks, such as 75.2% on five-shot MMLU. We also publicly release Flan-T5 checkpoints,1 which achieve strong few-shot performance even compared to much larger models, such as PaLM 62B. Overall, instruction finetuning is a general method for improving the performance and usability of pretrained language models. **Disclaimer**: Content from **this** model card has been written by the Hugging Face team, and parts of it were copy pasted from the [T5 model card](https://huggingface.co/t5-large). # Model Details ## Model Description - **Model type:** Language model - **Language(s) (NLP):** English, Spanish, Japanese, Persian, Hindi, French, Chinese, Bengali, Gujarati, German, Telugu, Italian, Arabic, Polish, Tamil, Marathi, Malayalam, Oriya, Panjabi, Portuguese, Urdu, Galician, Hebrew, Korean, Catalan, Thai, Dutch, Indonesian, Vietnamese, Bulgarian, Filipino, Central Khmer, Lao, Turkish, Russian, Croatian, Swedish, Yoruba, Kurdish, Burmese, Malay, Czech, Finnish, Somali, Tagalog, Swahili, Sinhala, Kannada, Zhuang, Igbo, Xhosa, Romanian, Haitian, Estonian, Slovak, Lithuanian, Greek, Nepali, Assamese, Norwegian - **License:** Apache 2.0 - **Related Models:** [All FLAN-T5 Checkpoints](https://huggingface.co/models?search=flan-t5) - **Original Checkpoints:** [All Original FLAN-T5 Checkpoints](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints) - **Resources for more information:** - [Research paper](https://arxiv.org/pdf/2210.11416.pdf) - [GitHub Repo](https://github.com/google-research/t5x) - [Hugging Face FLAN-T5 Docs (Similar to T5) ](https://huggingface.co/docs/transformers/model_doc/t5) # Usage Find below some example scripts on how to use the model in `transformers`: ## Using the Pytorch model ### Running the model on a CPU <details> <summary> Click to expand </summary> ```python from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-base") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base") input_text = "translate English to German: How old are you?" input_ids = tokenizer(input_text, return_tensors="pt").input_ids outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) ``` </details> ### Running the model on a GPU <details> <summary> Click to expand </summary> ```python # pip install accelerate from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-base") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base", device_map="auto") input_text = "translate English to German: How old are you?" input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda") outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) ``` </details> ### Running the model on a GPU using different precisions #### FP16 <details> <summary> Click to expand </summary> ```python # pip install accelerate import torch from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-base") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base", device_map="auto", torch_dtype=torch.float16) input_text = "translate English to German: How old are you?" input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda") outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) ``` </details> #### INT8 <details> <summary> Click to expand </summary> ```python # pip install bitsandbytes accelerate from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-base") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-base", device_map="auto", load_in_8bit=True) input_text = "translate English to German: How old are you?" input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda") outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) ``` </details> # Uses ## Direct Use and Downstream Use The authors write in [the original paper's model card](https://arxiv.org/pdf/2210.11416.pdf) that: > The primary use is research on language models, including: research on zero-shot NLP tasks and in-context few-shot learning NLP tasks, such as reasoning, and question answering; advancing fairness and safety research, and understanding limitations of current large language models See the [research paper](https://arxiv.org/pdf/2210.11416.pdf) for further details. ## Out-of-Scope Use More information needed. # Bias, Risks, and Limitations The information below in this section are copied from the model's [official model card](https://arxiv.org/pdf/2210.11416.pdf): > Language models, including Flan-T5, can potentially be used for language generation in a harmful way, according to Rae et al. (2021). Flan-T5 should not be used directly in any application, without a prior assessment of safety and fairness concerns specific to the application. ## Ethical considerations and risks > Flan-T5 is fine-tuned on a large corpus of text data that was not filtered for explicit content or assessed for existing biases. As a result the model itself is potentially vulnerable to generating equivalently inappropriate content or replicating inherent biases in the underlying data. ## Known Limitations > Flan-T5 has not been tested in real world applications. ## Sensitive Use: > Flan-T5 should not be applied for any unacceptable use cases, e.g., generation of abusive speech. # Training Details ## Training Data The model was trained on a mixture of tasks, that includes the tasks described in the table below (from the original paper, figure 2): ![table.png](https://s3.amazonaws.com/moonup/production/uploads/1666363265279-62441d1d9fdefb55a0b7d12c.png) ## Training Procedure According to the model card from the [original paper](https://arxiv.org/pdf/2210.11416.pdf): > These models are based on pretrained T5 (Raffel et al., 2020) and fine-tuned with instructions for better zero-shot and few-shot performance. There is one fine-tuned Flan model per T5 model size. The model has been trained on TPU v3 or TPU v4 pods, using [`t5x`](https://github.com/google-research/t5x) codebase together with [`jax`](https://github.com/google/jax). # Evaluation ## Testing Data, Factors & Metrics The authors evaluated the model on various tasks covering several languages (1836 in total). See the table below for some quantitative evaluation: ![image.png](https://s3.amazonaws.com/moonup/production/uploads/1668072995230-62441d1d9fdefb55a0b7d12c.png) For full details, please check the [research paper](https://arxiv.org/pdf/2210.11416.pdf). ## Results For full results for FLAN-T5-Base, see the [research paper](https://arxiv.org/pdf/2210.11416.pdf), Table 3. # Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** Google Cloud TPU Pods - TPU v3 or TPU v4 | Number of chips ≥ 4. - **Hours used:** More information needed - **Cloud Provider:** GCP - **Compute Region:** More information needed - **Carbon Emitted:** More information needed # Citation **BibTeX:** ```bibtex @misc{https://doi.org/10.48550/arxiv.2210.11416, doi = {10.48550/ARXIV.2210.11416}, url = {https://arxiv.org/abs/2210.11416}, author = {Chung, Hyung Won and Hou, Le and Longpre, Shayne and Zoph, Barret and Tay, Yi and Fedus, William and Li, Eric and Wang, Xuezhi and Dehghani, Mostafa and Brahma, Siddhartha and Webson, Albert and Gu, Shixiang Shane and Dai, Zhuyun and Suzgun, Mirac and Chen, Xinyun and Chowdhery, Aakanksha and Narang, Sharan and Mishra, Gaurav and Yu, Adams and Zhao, Vincent and Huang, Yanping and Dai, Andrew and Yu, Hongkun and Petrov, Slav and Chi, Ed H. and Dean, Jeff and Devlin, Jacob and Roberts, Adam and Zhou, Denny and Le, Quoc V. and Wei, Jason}, keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Scaling Instruction-Finetuned Language Models}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` ## Model Recycling [Evaluation on 36 datasets](https://ibm.github.io/model-recycling/model_gain_chart?avg=9.16&mnli_lp=nan&20_newsgroup=3.34&ag_news=1.49&amazon_reviews_multi=0.21&anli=13.91&boolq=16.75&cb=23.12&cola=9.97&copa=34.50&dbpedia=6.90&esnli=5.37&financial_phrasebank=18.66&imdb=0.33&isear=1.37&mnli=11.74&mrpc=16.63&multirc=6.24&poem_sentiment=14.62&qnli=3.41&qqp=6.18&rotten_tomatoes=2.98&rte=24.26&sst2=0.67&sst_5bins=5.44&stsb=20.68&trec_coarse=3.95&trec_fine=10.73&tweet_ev_emoji=13.39&tweet_ev_emotion=4.62&tweet_ev_hate=3.46&tweet_ev_irony=9.04&tweet_ev_offensive=1.69&tweet_ev_sentiment=0.75&wic=14.22&wnli=9.44&wsc=5.53&yahoo_answers=4.14&model_name=google%2Fflan-t5-base&base_name=google%2Ft5-v1_1-base) using google/flan-t5-base as a base model yields average score of 77.98 in comparison to 68.82 by google/t5-v1_1-base. The model is ranked 1st among all tested models for the google/t5-v1_1-base architecture as of 06/02/2023 Results: | 20_newsgroup | ag_news | amazon_reviews_multi | anli | boolq | cb | cola | copa | dbpedia | esnli | financial_phrasebank | imdb | isear | mnli | mrpc | multirc | poem_sentiment | qnli | qqp | rotten_tomatoes | rte | sst2 | sst_5bins | stsb | trec_coarse | trec_fine | tweet_ev_emoji | tweet_ev_emotion | tweet_ev_hate | tweet_ev_irony | tweet_ev_offensive | tweet_ev_sentiment | wic | wnli | wsc | yahoo_answers | |---------------:|----------:|-----------------------:|--------:|--------:|--------:|--------:|-------:|----------:|--------:|-----------------------:|-------:|--------:|--------:|--------:|----------:|-----------------:|--------:|--------:|------------------:|--------:|--------:|------------:|--------:|--------------:|------------:|-----------------:|-------------------:|----------------:|-----------------:|---------------------:|---------------------:|--------:|-------:|--------:|----------------:| | 86.2188 | 89.6667 | 67.12 | 51.9688 | 82.3242 | 78.5714 | 80.1534 | 75 | 77.6667 | 90.9507 | 85.4 | 93.324 | 72.425 | 87.2457 | 89.4608 | 62.3762 | 82.6923 | 92.7878 | 89.7724 | 89.0244 | 84.8375 | 94.3807 | 57.2851 | 89.4759 | 97.2 | 92.8 | 46.848 | 80.2252 | 54.9832 | 76.6582 | 84.3023 | 70.6366 | 70.0627 | 56.338 | 53.8462 | 73.4 | For more information, see: [Model Recycling](https://ibm.github.io/model-recycling/)
[ -0.44878071546554565, -0.5867846012115479, 0.2857481837272644, -0.0016632580664008856, -0.09232314676046371, -0.14431041479110718, -0.4223531484603882, -0.6318637132644653, -0.1542232483625412, 0.12242848426103592, -0.5147733092308044, -0.52748703956604, -0.6619815230369568, 0.049379028379917145, -0.2322610765695572, 1.0314342975616455, -0.1344401240348816, 0.028646543622016907, 0.18068371713161469, -0.09395881742238998, -0.16693013906478882, -0.31255748867988586, -0.6868045330047607, -0.3051148056983948, 0.45065221190452576, 0.2990459203720093, 0.4581983983516693, 0.5385453104972839, 0.5203060507774353, 0.3314718008041382, -0.1692197620868683, -0.05147389695048332, -0.5305278301239014, -0.4194612503051758, 0.05458974838256836, -0.4670473635196686, -0.6177302598953247, -0.03715018182992935, 0.4262860119342804, 0.5146406888961792, 0.08505949378013611, 0.3223763704299927, -0.1404518187046051, 0.2788497507572174, -0.5503021478652954, 0.30486342310905457, -0.29090648889541626, 0.08479815721511841, -0.2838611304759979, 0.09651020169258118, -0.25947973132133484, -0.23508979380130768, 0.071706622838974, -0.6970152258872986, 0.5092278122901917, -0.13910889625549316, 1.4600322246551514, 0.14161965250968933, -0.0771397054195404, -0.18866318464279175, -0.7753746509552002, 0.9691336154937744, -0.9752242565155029, 0.4605616629123688, 0.19781531393527985, 0.3541746735572815, 0.08790711313486099, -0.8045856356620789, -0.6669940948486328, -0.316216379404068, -0.06609436124563217, 0.15178021788597107, -0.03169248625636101, 0.19452571868896484, 0.5435864925384521, 0.6317481994628906, -0.46759262681007385, -0.08192203938961029, -0.7271968126296997, -0.16306811571121216, 0.7208777666091919, -0.038699258118867874, 0.5162148475646973, -0.08742441236972809, -0.2846479117870331, -0.4923139810562134, -0.35903528332710266, 0.13635577261447906, 0.27906930446624756, 0.4350723326206207, -0.49501940608024597, 0.3995717763900757, -0.029938191175460815, 0.5396860837936401, 0.3311871886253357, -0.4967396855354309, 0.5051571130752563, -0.3420272171497345, -0.36412838101387024, -0.16994933784008026, 0.9596304893493652, 0.20183531939983368, 0.2602400481700897, -0.0883011668920517, -0.3918367922306061, 0.02218599058687687, 0.18074503540992737, -0.9603252410888672, -0.1300801932811737, 0.42564091086387634, -0.3973711431026459, -0.5079911351203918, 0.1710456758737564, -0.828594446182251, -0.010848251171410084, 0.007480773143470287, 0.5286584496498108, -0.5209594368934631, -0.6009411215782166, -0.038959018886089325, -0.186394602060318, 0.31667840480804443, 0.0642145648598671, -1.1072286367416382, 0.22082240879535675, 0.5099190473556519, 0.8569055795669556, 0.12031225860118866, -0.32967695593833923, -0.23926977813243866, 0.014902925118803978, -0.221939817070961, 0.42180976271629333, -0.4028340280056, -0.38714104890823364, -0.027968479320406914, 0.19173076748847961, -0.2055724412202835, -0.49532487988471985, 0.6691964864730835, -0.28999483585357666, 0.5265324711799622, -0.29827749729156494, -0.5340420603752136, -0.4071047008037567, -0.018132489174604416, -0.6649135947227478, 1.1404058933258057, 0.30772268772125244, -0.7503618001937866, 0.4636671245098114, -0.9507094025611877, -0.45431146025657654, -0.15284617245197296, 0.1353890746831894, -0.701994776725769, 0.048409052193164825, 0.3605450689792633, 0.3570230007171631, -0.21451649069786072, 0.21698030829429626, -0.4839070737361908, -0.32950010895729065, -0.1809617280960083, -0.10874199867248535, 1.0478532314300537, 0.4328516125679016, -0.8359076976776123, 0.2701416611671448, -0.6072657108306885, -0.046821169555187225, 0.3074931800365448, -0.1058543249964714, 0.15534713864326477, -0.33988457918167114, 0.22068510949611664, 0.4022063910961151, 0.26062577962875366, -0.5327601432800293, 0.016569307073950768, -0.5569469928741455, 0.4994029104709625, 0.5482105016708374, -0.1863221824169159, 0.4366217255592346, -0.5362018942832947, 0.49368494749069214, 0.32183727622032166, 0.2223997414112091, -0.11148194223642349, -0.3777199983596802, -1.1744872331619263, 0.013845454901456833, 0.26748982071876526, 0.4798676669597626, -0.5971918702125549, 0.4117371141910553, -0.5068153738975525, -0.7083129286766052, -0.44837045669555664, 0.10049983114004135, 0.38283592462539673, 0.49226459860801697, 0.5001040101051331, -0.10051389783620834, -0.5458720326423645, -0.6876128911972046, -0.21091027557849884, -0.008165908046066761, -0.0018951926613226533, 0.26223888993263245, 0.7841600179672241, -0.025640375912189484, 0.5305994749069214, -0.28177571296691895, -0.3586585819721222, -0.49914318323135376, 0.09185542911291122, 0.13449792563915253, 0.6970016360282898, 0.8447180390357971, -0.5839844942092896, -0.4334303140640259, 0.07341375201940536, -0.8260449171066284, 0.040277983993291855, -0.10620100796222687, -0.13085371255874634, 0.4741169214248657, 0.20341484248638153, -0.6477459073066711, 0.41071149706840515, 0.4313085675239563, -0.23323467373847961, 0.30135372281074524, -0.10708105564117432, 0.06337542831897736, -1.2199689149856567, 0.507631778717041, 0.13159961998462677, -0.17757505178451538, -0.7843518257141113, 0.14277788996696472, 0.04577713459730148, -0.2078557014465332, -0.622404158115387, 0.7846584320068359, -0.35748720169067383, 0.03988182172179222, -0.11340044438838959, -0.047484949231147766, -0.02117255888879299, 0.590778112411499, 0.13193783164024353, 0.820920467376709, 0.3774160146713257, -0.7500960230827332, 0.04340190067887306, 0.09322402626276016, -0.2501882314682007, 0.21778951585292816, -0.7323870658874512, 0.15993568301200867, 0.0022035303991287947, 0.21636076271533966, -0.6852965950965881, -0.37752777338027954, 0.2792586088180542, -0.4896337389945984, 0.4611165225505829, 0.042858708649873734, -0.35101768374443054, -0.5702733397483826, -0.28388914465904236, 0.3165666460990906, 0.6844505667686462, -0.5848923325538635, 0.681536853313446, 0.21784958243370056, 0.3402833640575409, -0.5975296497344971, -0.8848133087158203, -0.2716529369354248, -0.4870835840702057, -0.8404483795166016, 0.5620352029800415, 0.015343730337917805, -0.006798352114856243, -0.20464204251766205, -0.13588501513004303, -0.05521722137928009, 0.04249221831560135, 0.14554208517074585, 0.09676747024059296, -0.2654837667942047, -0.1786404401063919, -0.22736158967018127, -0.0970098227262497, -0.030631767585873604, -0.3830440938472748, 0.615942656993866, -0.2827712595462799, 0.15218737721443176, -0.7757798433303833, -0.024700138717889786, 0.5785785913467407, -0.2781711518764496, 0.9110379815101624, 1.1124955415725708, -0.5060223340988159, 0.003123660571873188, -0.6343734264373779, -0.33185306191444397, -0.5165619254112244, 0.19949106872081757, -0.5026484131813049, -0.6247817277908325, 0.6993192434310913, 0.22463692724704742, 0.3165571093559265, 0.788416862487793, 0.5136356353759766, -0.021654091775417328, 0.922330915927887, 0.6881024837493896, -0.022381624206900597, 0.7825512290000916, -0.7189577221870422, 0.23087482154369354, -0.5929708480834961, -0.1993429958820343, -0.4518534243106842, -0.2632260322570801, -0.7141545414924622, -0.28712159395217896, 0.3074088990688324, 0.08939247578382492, -0.5921580791473389, 0.3843111991882324, -0.35361331701278687, 0.11518864333629608, 0.5758747458457947, 0.22487615048885345, -0.05806438997387886, 0.10251981019973755, -0.14800235629081726, -0.04442115128040314, -0.7076448202133179, -0.5349118709564209, 1.1273831129074097, 0.4135690927505493, 0.428977906703949, 0.05622531846165657, 0.7412679195404053, -0.03897418826818466, 0.2762748599052429, -0.5315098762512207, 0.40753689408302307, -0.2284613698720932, -0.9220766425132751, -0.046632055193185806, -0.4075717628002167, -0.8215689063072205, 0.0642140731215477, -0.04664706066250801, -0.7593318223953247, 0.05331386625766754, 0.1584377884864807, -0.4719906449317932, 0.584598958492279, -0.9296619892120361, 1.1989136934280396, -0.3816526234149933, -0.527317225933075, -0.054435912519693375, -0.5045983791351318, 0.5335255861282349, 0.1859840750694275, 0.11733658611774445, 0.049585066735744476, 0.10390383005142212, 0.8143416047096252, -0.7693042755126953, 0.8035248517990112, -0.4435030519962311, -0.09443197399377823, 0.32420283555984497, -0.2315112054347992, 0.3525645136833191, -0.25103622674942017, -0.11306466162204742, 0.3567328453063965, 0.06606997549533844, -0.6040794849395752, -0.49901941418647766, 0.7013771533966064, -1.0647199153900146, -0.5631396174430847, -0.4913681149482727, -0.3848557770252228, 0.045411136001348495, 0.48142585158348083, 0.40220940113067627, 0.3123667240142822, 0.03928608074784279, 0.0058660488575696945, 0.4469761252403259, -0.38767310976982117, 0.6358932256698608, 0.08229400962591171, -0.2710152864456177, -0.3965766727924347, 0.9497627019882202, 0.12097418308258057, 0.48512986302375793, 0.31954866647720337, 0.3032338619232178, -0.32391268014907837, -0.2618473768234253, -0.4943130910396576, 0.4008961021900177, -0.6557483077049255, -0.06520571559667587, -0.5766739845275879, -0.14680540561676025, -0.5266615748405457, -0.14045503735542297, -0.46300777792930603, -0.3951146900653839, -0.37678995728492737, -0.06659174710512161, 0.29482051730155945, 0.658478856086731, -0.021180765703320503, 0.3880835771560669, -0.597748875617981, 0.32880714535713196, 0.04420025646686554, 0.3676599860191345, 0.0894249826669693, -0.6974145174026489, -0.1769307255744934, 0.3008582890033722, -0.4619051218032837, -0.6391227841377258, 0.3872356712818146, 0.23525092005729675, 0.3602954149246216, 0.5004368424415588, -0.11282672733068466, 0.9355427026748657, -0.12595754861831665, 1.0550068616867065, 0.03585235774517059, -1.0040565729141235, 0.5945887565612793, -0.4909649193286896, 0.4641706645488739, 0.3739178478717804, 0.3443286418914795, -0.33639276027679443, -0.23950250446796417, -1.0386914014816284, -0.7317252159118652, 0.9841984510421753, 0.2806239128112793, 0.03734920918941498, 0.2813177704811096, 0.22886937856674194, -0.08555179089307785, 0.07661955803632736, -0.9002959132194519, -0.24881285429000854, -0.5174623727798462, -0.32681676745414734, -0.05471166968345642, -0.054545409977436066, -0.08956814557313919, -0.35430875420570374, 0.8271068334579468, 0.058037471026182175, 0.662344753742218, 0.14053674042224884, -0.2684347927570343, -0.1905822604894638, 0.007771541830152273, 0.9251245856285095, 0.48594871163368225, -0.3510272204875946, -0.15052688121795654, 0.3871851861476898, -0.6015745401382446, -0.051321178674697876, 0.09579421579837799, -0.38008907437324524, -0.03684775531291962, 0.45234209299087524, 1.082504391670227, 0.16249915957450867, -0.354947954416275, 0.424112468957901, -0.04958301782608032, -0.3794407248497009, -0.4772759675979614, 0.3569653034210205, 0.10511159896850586, 0.041528478264808655, 0.17144593596458435, 0.06694430857896805, -0.1942509561777115, -0.38673627376556396, 0.01010294258594513, 0.15815185010433197, -0.21565134823322296, -0.47893381118774414, 1.101476788520813, 0.2234438806772232, -0.12637394666671753, 0.5548572540283203, -0.07680217176675797, -0.5206146836280823, 0.6982418298721313, 0.432489812374115, 0.9643056988716125, -0.1474146693944931, -0.0019528375705704093, 0.9348549842834473, 0.33491045236587524, -0.12139396369457245, 0.3930895924568176, 0.07502751052379608, -0.5356435179710388, -0.15227541327476501, -0.6615254878997803, -0.00055262865498662, 0.4375024735927582, -0.4666357934474945, 0.5025017857551575, -0.7559661865234375, -0.1935959905385971, 0.10060062259435654, 0.4422028958797455, -0.9494855403900146, 0.4169693887233734, 0.2998025119304657, 0.8270382285118103, -0.7510461807250977, 0.8091971278190613, 0.6349524855613708, -0.9890267848968506, -1.117665410041809, -0.01162617839872837, -0.08237726986408234, -0.5449392795562744, 0.6122279763221741, 0.3975399136543274, 0.010304413735866547, 0.030326316133141518, -0.4889059364795685, -0.8879802823066711, 1.3199951648712158, 0.4018838107585907, -0.4058012366294861, -0.13637565076351166, 0.3466128706932068, 0.600101113319397, -0.27313801646232605, 0.7756990194320679, 0.5621897578239441, 0.6732187271118164, 0.07045062631368637, -1.0830005407333374, 0.19649752974510193, -0.2776523530483246, 0.1284542977809906, -0.04077049717307091, -1.0267442464828491, 0.9340079426765442, -0.3121376037597656, -0.309882253408432, -0.023058736696839333, 0.8741431832313538, 0.24258701503276825, 0.0834626629948616, 0.5584999322891235, 0.6144443154335022, 0.7809258103370667, -0.2506733238697052, 1.2855111360549927, -0.5771195888519287, 0.6146257519721985, 0.6541830897331238, 0.18890000879764557, 0.656112015247345, 0.25972700119018555, -0.2862837612628937, 0.47302448749542236, 0.717141330242157, -0.11118539422750473, 0.31337907910346985, -0.06876103579998016, -0.2490663230419159, -0.08694463223218918, -0.043136026710271835, -0.514596700668335, 0.3189007341861725, 0.38351210951805115, -0.43245983123779297, -0.15341468155384064, -0.0657578706741333, 0.3823354244232178, -0.3321966230869293, -0.13179683685302734, 0.4984757900238037, 0.12455232441425323, -0.7801467180252075, 1.0822714567184448, 0.15104185044765472, 0.850434422492981, -0.555678129196167, 0.23674248158931732, -0.32335975766181946, 0.39180788397789, -0.4553903639316559, -0.35758474469184875, 0.2733217477798462, 0.042093414813280106, -0.010049833916127682, -0.17501989006996155, 0.5033519864082336, -0.4960670471191406, -0.7192547917366028, 0.23982331156730652, 0.16450439393520355, 0.16389457881450653, 0.2570343017578125, -0.8785052299499512, 0.23616835474967957, 0.14275412261486053, -0.36509597301483154, 0.11397863924503326, 0.13367801904678345, -0.01567612588405609, 0.5869241952896118, 0.542513906955719, -0.15618669986724854, 0.2883574068546295, 0.14224514365196228, 0.7124063968658447, -0.6854856014251709, -0.3304194509983063, -0.6633793115615845, 0.6644957065582275, -0.061208635568618774, -0.5289273262023926, 0.6928936243057251, 0.6305685639381409, 1.1737523078918457, -0.16953039169311523, 0.9849194884300232, -0.41448551416397095, 0.31291043758392334, -0.41924524307250977, 0.7288752198219299, -0.8034899234771729, 0.04865647107362747, -0.3812561333179474, -0.7983478903770447, -0.22460217773914337, 0.8881266117095947, -0.5061095356941223, 0.6589670777320862, 0.7748265862464905, 0.902952253818512, -0.3734068274497986, 0.04501952975988388, 0.16753998398780823, 0.27023643255233765, 0.6601017713546753, 0.7143305540084839, 0.24268893897533417, -0.8960695862770081, 0.5823565125465393, -0.8012886643409729, 0.10809963941574097, -0.2247438281774521, -0.66933274269104, -1.0959930419921875, -0.537112832069397, -0.28572797775268555, -0.47063571214675903, -0.02955738455057144, 0.8562765121459961, 0.7778190970420837, -1.0624058246612549, -0.3703753650188446, -0.30994608998298645, -0.11376390606164932, -0.2339131236076355, -0.2509353458881378, 0.46739882230758667, -0.5376107692718506, -1.1277399063110352, 0.12142636626958847, -0.22717206180095673, 0.24160410463809967, -0.33910071849823, -0.19327735900878906, -0.3589281141757965, -0.30471816658973694, 0.2754456698894501, 0.39141610264778137, -0.8521435856819153, -0.3604373335838318, 0.05274338647723198, -0.1256277710199356, 0.15083244442939758, 0.4869191646575928, -0.46102362871170044, 0.3870828151702881, 0.5325475335121155, 0.4975927472114563, 0.8070734739303589, -0.05863306671380997, 0.6822566390037537, -0.47349873185157776, 0.43219372630119324, 0.0442163422703743, 0.26859909296035767, 0.418268084526062, -0.24791701138019562, 0.5828731060028076, 0.3470539450645447, -0.4002631902694702, -0.8042733073234558, -0.16168944537639618, -0.9223642945289612, 0.023047033697366714, 1.2334474325180054, -0.2783515453338623, -0.5135916471481323, 0.2272314727306366, -0.004792911000549793, 0.60689777135849, -0.4093766212463379, 0.6823037266731262, 0.7295829057693481, 0.09405487030744553, -0.3562152087688446, -0.764461874961853, 0.683024525642395, 0.5639727711677551, -0.7774540781974792, -0.22101929783821106, 0.15139588713645935, 0.5695487856864929, 0.19247545301914215, 0.43754884600639343, -0.06479284167289734, 0.21294155716896057, 0.1669355034828186, 0.2680746614933014, -0.16533984243869781, -0.08887849748134613, -0.2834043800830841, 0.03409034386277199, -0.08550481498241425, -0.12170872092247009 ]
guillaumekln/faster-whisper-large-v2
guillaumekln
"2023-05-12T18:58:25Z"
920,204
141
ctranslate2
[ "ctranslate2", "audio", "automatic-speech-recognition", "en", "zh", "de", "es", "ru", "ko", "fr", "ja", "pt", "tr", "pl", "ca", "nl", "ar", "sv", "it", "id", "hi", "fi", "vi", "he", "uk", "el", "ms", "cs", "ro", "da", "hu", "ta", "no", "th", "ur", "hr", "bg", "lt", "la", "mi", "ml", "cy", "sk", "te", "fa", "lv", "bn", "sr", "az", "sl", "kn", "et", "mk", "br", "eu", "is", "hy", "ne", "mn", "bs", "kk", "sq", "sw", "gl", "mr", "pa", "si", "km", "sn", "yo", "so", "af", "oc", "ka", "be", "tg", "sd", "gu", "am", "yi", "lo", "uz", "fo", "ht", "ps", "tk", "nn", "mt", "sa", "lb", "my", "bo", "tl", "mg", "as", "tt", "haw", "ln", "ha", "ba", "jw", "su", "license:mit", "has_space", "region:us" ]
automatic-speech-recognition
"2023-03-23T10:36:06Z"
--- language: - en - zh - de - es - ru - ko - fr - ja - pt - tr - pl - ca - nl - ar - sv - it - id - hi - fi - vi - he - uk - el - ms - cs - ro - da - hu - ta - 'no' - th - ur - hr - bg - lt - la - mi - ml - cy - sk - te - fa - lv - bn - sr - az - sl - kn - et - mk - br - eu - is - hy - ne - mn - bs - kk - sq - sw - gl - mr - pa - si - km - sn - yo - so - af - oc - ka - be - tg - sd - gu - am - yi - lo - uz - fo - ht - ps - tk - nn - mt - sa - lb - my - bo - tl - mg - as - tt - haw - ln - ha - ba - jw - su tags: - audio - automatic-speech-recognition license: mit library_name: ctranslate2 --- # Whisper large-v2 model for CTranslate2 This repository contains the conversion of [openai/whisper-large-v2](https://huggingface.co/openai/whisper-large-v2) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format. This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/guillaumekln/faster-whisper). ## Example ```python from faster_whisper import WhisperModel model = WhisperModel("large-v2") segments, info = model.transcribe("audio.mp3") for segment in segments: print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text)) ``` ## Conversion details The original model was converted with the following command: ``` ct2-transformers-converter --model openai/whisper-large-v2 --output_dir faster-whisper-large-v2 \ --copy_files tokenizer.json --quantization float16 ``` Note that the model weights are saved in FP16. This type can be changed when the model is loaded using the [`compute_type` option in CTranslate2](https://opennmt.net/CTranslate2/quantization.html). ## More information **For more information about the original model, see its [model card](https://huggingface.co/openai/whisper-large-v2).**
[ 0.11111059039831161, -0.40233200788497925, 0.35626959800720215, 0.5107580423355103, -0.4717892110347748, -0.34120801091194153, -0.5047342777252197, -0.4545601010322571, 0.07540857791900635, 0.8450538516044617, -0.48567673563957214, -0.529562771320343, -0.6141607165336609, -0.3795250952243805, -0.42336854338645935, 0.9063318371772766, -0.19699883460998535, 0.25396502017974854, 0.30013710260391235, -0.01211477443575859, -0.38139137625694275, -0.3188190758228302, -0.8177029490470886, -0.37710922956466675, 0.22980938851833344, 0.22985564172267914, 0.6096097826957703, 0.3448020815849304, 0.4735897481441498, 0.32140958309173584, -0.3461732566356659, -0.06870380789041519, -0.3540789484977722, -0.06323886662721634, 0.2120712846517563, -0.594107449054718, -0.6978367567062378, 0.020391471683979034, 0.8041223287582397, 0.08716108649969101, -0.24482356011867523, 0.4453754425048828, -0.2948569357395172, 0.3520275056362152, -0.4876159429550171, 0.37915512919425964, -0.5963132977485657, 0.05482816696166992, -0.17472469806671143, -0.256137490272522, -0.5831379890441895, -0.3254776895046234, 0.49949148297309875, -0.9262475967407227, 0.0478828139603138, -0.06079500541090965, 0.8826679587364197, 0.293952614068985, -0.591771125793457, -0.2640884220600128, -0.9979006052017212, 1.0125982761383057, -0.7957804799079895, 0.23726195096969604, 0.2847442924976349, 0.568283200263977, 0.14327257871627808, -1.187580943107605, -0.283054381608963, -0.11779797077178955, 0.24441057443618774, 0.340859055519104, -0.4586816430091858, 0.20838090777397156, 0.2522534430027008, 0.4457133412361145, -0.656035840511322, 0.0998549535870552, -0.8209038376808167, -0.47927600145339966, 0.552441418170929, 0.09930754452943802, 0.1031525656580925, -0.15466472506523132, -0.37914183735847473, -0.6204754114151001, -0.5745468139648438, -0.06743601709604263, 0.5205762386322021, 0.16995589435100555, -0.5818201303482056, 0.7117103934288025, 0.03599899262189865, 0.3400353491306305, 0.02437897026538849, -0.3148947060108185, 0.4880204498767853, -0.282358855009079, -0.11987637728452682, 0.4529542624950409, 0.7074857354164124, 0.5962878465652466, 0.09498526155948639, 0.37433508038520813, -0.31921860575675964, -0.19747239351272583, 0.11498870700597763, -1.2800662517547607, -0.40506047010421753, 0.34472984075546265, -0.8356056809425354, -0.25369739532470703, -0.0043377564288675785, -0.36823219060897827, -0.05222399905323982, -0.25236040353775024, 0.7200283408164978, -0.4178943932056427, -0.6323097944259644, 0.39764469861984253, -0.6097472906112671, 0.24793262779712677, 0.4995293915271759, -0.7448644638061523, 0.41508182883262634, 0.6504037380218506, 1.1374863386154175, 0.12960539758205414, -0.05960798263549805, -0.3581506311893463, 0.2694229483604431, -0.09798979014158249, 0.5458622574806213, 0.033117469400167465, -0.490862637758255, 0.103460893034935, -0.06001055985689163, 0.01957908645272255, -0.66536945104599, 0.7213646769523621, -0.3087807893753052, 0.3442089557647705, 0.19491831958293915, -0.28526079654693604, -0.24150148034095764, -0.007955902256071568, -0.6960645914077759, 0.9672660231590271, 0.4705767035484314, -0.7251583933830261, -0.1897069364786148, -0.7649775743484497, -0.22962385416030884, -0.16241271793842316, 0.5102917551994324, -0.550247073173523, 0.2907707691192627, -0.13657334446907043, 0.055536773055791855, -0.49340811371803284, 0.282711386680603, -0.2060052901506424, -0.39516714215278625, 0.3283577859401703, -0.47466325759887695, 0.9117188453674316, 0.3110906779766083, 0.014391276054084301, 0.3882591128349304, -0.5480470657348633, 0.041994281113147736, 0.09857966005802155, -0.3358496129512787, -0.23834191262722015, -0.15414035320281982, 0.6170788407325745, 0.016480308026075363, 0.46456295251846313, -0.541691243648529, 0.3305899202823639, -0.4150427281856537, 0.9353988766670227, 0.49750494956970215, -0.11251062154769897, 0.3502204418182373, -0.36649397015571594, 0.03706836327910423, 0.22496642172336578, 0.4132334589958191, 0.09010937809944153, -0.4939802587032318, -0.7299327254295349, -0.10763703286647797, 0.40590402483940125, 0.4236217737197876, -0.5845252275466919, 0.3739916682243347, -0.33515268564224243, -0.9468388557434082, -0.7588584423065186, -0.43324971199035645, 0.25220414996147156, 0.16860470175743103, 0.5507981181144714, -0.032279908657073975, -0.83311927318573, -0.9143984317779541, 0.01885104738175869, -0.40045422315597534, -0.2459406554698944, 0.15879395604133606, 0.5841797590255737, -0.2180463820695877, 0.483669251203537, -0.7415989637374878, -0.5250439047813416, -0.2420521229505539, 0.33447015285491943, 0.27513405680656433, 0.7720866799354553, 0.606749951839447, -0.80765300989151, -0.1274084895849228, -0.14491795003414154, -0.3008352518081665, -0.006280962843447924, -0.08908484131097794, -0.08451645076274872, 0.10390408337116241, 0.23124293982982635, -0.8119198679924011, 0.3527504801750183, 0.8326695561408997, -0.35535264015197754, 0.6216930747032166, -0.09487388283014297, -0.09562021493911743, -1.3138258457183838, 0.1271478533744812, 0.0674990713596344, -0.1388658732175827, -0.5540342330932617, 0.029657019302248955, 0.22170211374759674, 0.1241946890950203, -0.6854907274246216, 0.6717904806137085, -0.15435691177845, -0.09161647409200668, -0.21356742084026337, -0.17052194476127625, -0.13052812218666077, 0.22794610261917114, 0.3886795938014984, 0.8057280778884888, 0.4046984314918518, -0.3878939747810364, 0.32664209604263306, 0.6043057441711426, -0.30187082290649414, 0.1387355625629425, -1.1460840702056885, 0.16894008219242096, 0.22697709500789642, 0.5846455097198486, -0.6205843091011047, -0.1556953638792038, 0.16372458636760712, -0.6601484417915344, 0.23605529963970184, -0.6223527789115906, -0.5895893573760986, -0.426409512758255, -0.564799427986145, 0.4988538920879364, 0.7589994072914124, -0.47690290212631226, 0.6580886244773865, 0.2696874141693115, 0.0359591580927372, -0.03672132268548012, -1.0415529012680054, -0.06930524110794067, -0.1842663437128067, -0.7918913960456848, 0.6532721519470215, -0.2567440867424011, -0.1354229897260666, -0.2089928388595581, -0.05409349128603935, -0.2942188084125519, -0.20344854891300201, 0.4526563286781311, 0.36509814858436584, -0.43581634759902954, -0.17053987085819244, 0.4427814781665802, -0.3767240345478058, 0.1784370243549347, -0.6111874580383301, 0.8404396772384644, -0.021503668278455734, 0.07604951411485672, -0.8095641732215881, 0.1255592405796051, 0.7296541929244995, -0.3301132321357727, 0.547457218170166, 0.8897596001625061, -0.3257911205291748, -0.14554943144321442, -0.5160813927650452, -0.16454866528511047, -0.48669499158859253, 0.45899394154548645, -0.312984824180603, -0.8674724102020264, 0.3853267431259155, 0.027987327426671982, 0.0038331078831106424, 0.8457023501396179, 0.5998799204826355, 0.16831985116004944, 1.1626951694488525, 0.37293586134910583, 0.22301489114761353, 0.4954563081264496, -0.7542572021484375, -0.14678137004375458, -1.2567566633224487, -0.37293577194213867, -0.7274965643882751, -0.15192477405071259, -0.30566757917404175, -0.40226489305496216, 0.5725888609886169, 0.12694047391414642, -0.5501231551170349, 0.6121530532836914, -0.6651944518089294, -0.044749677181243896, 0.5534316301345825, 0.1875351518392563, 0.2137032002210617, 0.024261634796857834, 0.4011622369289398, -0.09083198755979538, -0.24176408350467682, -0.2850523293018341, 1.200851321220398, 0.6424872875213623, 0.6438931822776794, 0.3787747323513031, 0.5604942440986633, 0.03170928731560707, -0.014907695353031158, -0.970618724822998, 0.28896740078926086, -0.2880646884441376, -0.5489310622215271, -0.13874481618404388, -0.3648834228515625, -0.7141852974891663, 0.05469849705696106, -0.06845217943191528, -0.6001721620559692, -0.1061982735991478, 0.02014714479446411, -0.08660092949867249, 0.40644145011901855, -0.5774619579315186, 0.7746670842170715, 0.12427260726690292, 0.2608203589916229, -0.3142072856426239, -0.38195380568504333, 0.6029962301254272, -0.014760153368115425, -0.36487868428230286, 0.15674634277820587, -0.11571972072124481, 1.0545680522918701, -0.7599822282791138, 0.715648889541626, -0.429532527923584, -0.299221932888031, 0.6465279459953308, 0.03825663402676582, 0.6070478558540344, 0.1385543942451477, -0.25410953164100647, 0.46903952956199646, 0.38175925612449646, -0.04346271976828575, -0.3779066503047943, 0.6306052803993225, -1.3258416652679443, -0.21122793853282928, -0.24258911609649658, -0.5094876885414124, 0.3936154544353485, 0.09853534400463104, 0.5087488889694214, 0.7153913378715515, 0.024913782253861427, 0.35870903730392456, 0.6985028982162476, 0.007835212163627148, 0.39373210072517395, 0.6072195172309875, -0.1977168619632721, -0.7647210955619812, 0.7687279582023621, 0.23264339566230774, 0.35041987895965576, 0.42215657234191895, 0.386572003364563, -0.6102648377418518, -1.0213114023208618, -0.35428565740585327, 0.14700627326965332, -0.5129481554031372, -0.4222251772880554, -0.6927225589752197, -0.6122146248817444, -0.5608519315719604, 0.19972087442874908, -0.671465277671814, -0.6795570850372314, -0.4902711510658264, 0.3230162560939789, 0.7330151796340942, 0.5656619668006897, 0.005957798101007938, 0.6939267516136169, -1.0320779085159302, 0.25332894921302795, 0.09178626537322998, 0.10378672182559967, 0.1577419489622116, -1.0774140357971191, -0.07383491098880768, 0.09571287781000137, -0.38213059306144714, -0.6704943180084229, 0.4081297814846039, -0.013543082401156425, 0.027247335761785507, 0.260160356760025, 0.09420855343341827, 0.7481153011322021, -0.2598950266838074, 1.0103408098220825, 0.38717958331108093, -1.2152714729309082, 0.5776094794273376, -0.554522693157196, 0.24516765773296356, 0.4164004325866699, 0.11850013583898544, -0.613697350025177, 0.005604746285825968, -0.5661079287528992, -0.8350773453712463, 0.8158667683601379, 0.3825743794441223, 0.005032573826611042, 0.29544591903686523, 0.16512440145015717, 0.06786922365427017, 0.18661144375801086, -0.7485891580581665, -0.24476352334022522, -0.5653927326202393, -0.3296816945075989, 0.09597908705472946, -0.3938215970993042, -0.019395451992750168, -0.23390263319015503, 0.8050587177276611, -0.1891653835773468, 0.45371153950691223, 0.48716822266578674, -0.051776397973299026, -0.14431552588939667, -0.022608494386076927, 0.7913254499435425, 0.17409822344779968, -0.4935706853866577, -0.055501922965049744, 0.15113794803619385, -0.8381640315055847, -0.12010980397462845, 0.09556885063648224, -0.29903480410575867, 0.1209738627076149, 0.5127729773521423, 0.9015087485313416, 0.3240012526512146, -0.34839028120040894, 0.7852750420570374, -0.09435862302780151, -0.5332400798797607, -0.9778894186019897, 0.04566047713160515, 0.2369433492422104, 0.3423927426338196, 0.3540419042110443, 0.17149804532527924, 0.2542656362056732, -0.4476460814476013, -0.28895699977874756, 0.17252390086650848, -0.45559319853782654, -0.4787614345550537, 0.7673543095588684, 0.17697513103485107, -0.3666054904460907, 0.6902719736099243, 0.03715924173593521, -0.3083111345767975, 0.5645678639411926, 0.8248624205589294, 1.1630655527114868, -0.1706932634115219, 0.1141735166311264, 0.681587815284729, 0.25147688388824463, -0.3190264105796814, 0.5531851053237915, -0.07800249010324478, -0.27523118257522583, -0.4650678038597107, -0.7229379415512085, -0.3224696218967438, 0.2470463365316391, -0.9073219895362854, 0.4191475808620453, -0.5914598703384399, -0.19752857089042664, 0.07294832170009613, 0.1346890926361084, -0.5060197114944458, -0.046122435480356216, 0.16829581558704376, 1.4027892351150513, -0.5887803435325623, 1.1459095478057861, 0.4958844780921936, -0.3441113829612732, -0.9798040390014648, -0.21248465776443481, -0.032737523317337036, -0.693742573261261, 0.5397248268127441, 0.1741129755973816, 0.07444939017295837, -0.02729845978319645, -0.8027750253677368, -0.9860773086547852, 1.5064983367919922, 0.03367777168750763, -0.7143475413322449, -0.1447160840034485, 0.05362026393413544, 0.5209476947784424, -0.4378869831562042, 0.6496549844741821, 0.3451877534389496, 0.9223119020462036, 0.19639909267425537, -1.260262131690979, 0.030905451625585556, -0.1279144138097763, 0.25751498341560364, 0.2900051474571228, -0.9909629225730896, 1.1886106729507446, -0.18587131798267365, 0.01112527959048748, 0.9645525813102722, 0.7559682130813599, 0.2778695821762085, 0.3257963955402374, 0.4671551585197449, 0.4422664940357208, 0.44361722469329834, -0.31906163692474365, 0.6554522514343262, -0.07553283870220184, 0.5114040374755859, 0.9691706895828247, -0.3346262574195862, 1.1377184391021729, 0.36468708515167236, -0.06765877455472946, 0.641518235206604, 0.34521424770355225, -0.3427726924419403, 0.4650688171386719, 0.14809565246105194, -0.048710279166698456, -0.15501660108566284, -0.03714267909526825, -0.5954590439796448, 0.7776151299476624, 0.3895876407623291, -0.42685434222221375, -0.04558729752898216, -0.1637898087501526, 0.16335919499397278, -0.2435290515422821, -0.4603519141674042, 0.6744883060455322, -0.10996250063180923, -0.47798919677734375, 0.6851901412010193, 0.38837704062461853, 0.8501531481742859, -0.9836622476577759, -0.15799999237060547, 0.34986060857772827, 0.2510417401790619, -0.22638151049613953, -0.8411124348640442, 0.3559814691543579, -0.2505210041999817, -0.3134450316429138, 0.07387483865022659, 0.5885087847709656, -0.5983697772026062, -0.4359256625175476, 0.3956342339515686, 0.04484585300087929, 0.3233394920825958, -0.39189985394477844, -0.6642583608627319, 0.5324192643165588, 0.2394753098487854, -0.32610681653022766, 0.2971397340297699, 0.020147448405623436, -0.030323417857289314, 0.45738711953163147, 0.8861587047576904, 0.12887844443321228, -0.0685821995139122, 0.08401845395565033, 0.7348757386207581, -0.6781061291694641, -0.5534384846687317, -0.3470302224159241, 0.5238341093063354, -0.14889471232891083, -0.8073031902313232, 0.4803287982940674, 0.8864129781723022, 0.5568199753761292, -0.30631813406944275, 0.6208184957504272, 0.0712253525853157, 0.3249369263648987, -0.871964693069458, 0.7588147521018982, -0.47863227128982544, -0.20586860179901123, -0.04519368335604668, -0.9547190070152283, 0.04296509176492691, 0.3234010934829712, -0.02801111713051796, -0.17840397357940674, 0.6830796003341675, 0.8177006244659424, -0.08014741539955139, 0.2684619724750519, 0.04214184731245041, 0.6456169486045837, 0.4002835154533386, 0.6902822256088257, 0.6300176382064819, -0.9729885458946228, 0.7304617166519165, -0.20016269385814667, -0.07540950924158096, -0.1365841031074524, -0.6497423648834229, -0.9190899729728699, -0.6965410113334656, -0.4831039607524872, -0.6923513412475586, -0.12276026606559753, 0.9247884750366211, 0.9333613514900208, -0.5526903867721558, -0.309192955493927, 0.1422443836927414, -0.1731768399477005, 0.08185409754514694, -0.2606262266635895, 0.47381120920181274, 0.363446444272995, -0.783653736114502, 0.49553385376930237, 0.12194043397903442, 0.45138829946517944, -0.37337571382522583, -0.38774949312210083, 0.3553043305873871, -0.01596902869641781, 0.5508143901824951, 0.06508907675743103, -0.8313972353935242, -0.2670690715312958, -0.351044237613678, 0.07120323181152344, 0.07978089153766632, 0.7383617758750916, -0.6407517194747925, 0.03241904824972153, 0.5426234602928162, -0.2052534818649292, 0.8545089364051819, -0.43448662757873535, 0.22088094055652618, -0.3972175717353821, 0.4425468444824219, 0.1563147008419037, 0.4184562563896179, 0.12964795529842377, -0.09023819863796234, 0.3506762385368347, 0.16369713842868805, -0.4784993529319763, -0.9493779540061951, 0.05007605999708176, -1.5263168811798096, -0.11590634286403656, 1.2857656478881836, 0.057439666241407394, -0.3889823853969574, 0.26600947976112366, -0.6969319581985474, 0.35220029950141907, -0.6372132897377014, 0.19638483226299286, 0.15239699184894562, 0.49357175827026367, -0.014773169532418251, -0.4556247591972351, 0.3537770211696625, -0.0635920837521553, -0.4702514708042145, 0.08578266203403473, 0.2409098893404007, 0.4620249569416046, 0.4515622854232788, 0.44740062952041626, -0.49676552414894104, 0.4424646198749542, 0.2519475221633911, 0.35615086555480957, -0.3797554075717926, -0.4103437066078186, -0.35091695189476013, 0.034537140280008316, -0.00034143668017350137, -0.20151518285274506 ]
dslim/bert-base-NER
dslim
"2023-05-09T16:37:55Z"
901,822
298
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "token-classification", "en", "dataset:conll2003", "arxiv:1810.04805", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: en datasets: - conll2003 license: mit --- # bert-base-NER ## Model description **bert-base-NER** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** and achieves **state-of-the-art performance** for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC). Specifically, this model is a *bert-base-cased* model that was fine-tuned on the English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. If you'd like to use a larger BERT-large model fine-tuned on the same dataset, a [**bert-large-NER**](https://huggingface.co/dslim/bert-large-NER/) version is also available. ## Intended uses & limitations #### How to use You can use this model with Transformers *pipeline* for NER. ```python from transformers import AutoTokenizer, AutoModelForTokenClassification from transformers import pipeline tokenizer = AutoTokenizer.from_pretrained("dslim/bert-base-NER") model = AutoModelForTokenClassification.from_pretrained("dslim/bert-base-NER") nlp = pipeline("ner", model=model, tokenizer=tokenizer) example = "My name is Wolfgang and I live in Berlin" ner_results = nlp(example) print(ner_results) ``` #### Limitations and bias This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities and post-processing of results may be necessary to handle those cases. ## Training data This model was fine-tuned on English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes: Abbreviation|Description -|- O|Outside of a named entity B-MIS |Beginning of a miscellaneous entity right after another miscellaneous entity I-MIS | Miscellaneous entity B-PER |Beginning of a person’s name right after another person’s name I-PER |Person’s name B-ORG |Beginning of an organization right after another organization I-ORG |organization B-LOC |Beginning of a location right after another location I-LOC |Location ### CoNLL-2003 English Dataset Statistics This dataset was derived from the Reuters corpus which consists of Reuters news stories. You can read more about how this dataset was created in the CoNLL-2003 paper. #### # of training examples per entity type Dataset|LOC|MISC|ORG|PER -|-|-|-|- Train|7140|3438|6321|6600 Dev|1837|922|1341|1842 Test|1668|702|1661|1617 #### # of articles/sentences/tokens per dataset Dataset |Articles |Sentences |Tokens -|-|-|- Train |946 |14,987 |203,621 Dev |216 |3,466 |51,362 Test |231 |3,684 |46,435 ## Training procedure This model was trained on a single NVIDIA V100 GPU with recommended hyperparameters from the [original BERT paper](https://arxiv.org/pdf/1810.04805) which trained & evaluated the model on CoNLL-2003 NER task. ## Eval results metric|dev|test -|-|- f1 |95.1 |91.3 precision |95.0 |90.7 recall |95.3 |91.9 The test metrics are a little lower than the official Google BERT results which encoded document context & experimented with CRF. More on replicating the original results [here](https://github.com/google-research/bert/issues/223). ### BibTeX entry and citation info ``` @article{DBLP:journals/corr/abs-1810-04805, author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding}, journal = {CoRR}, volume = {abs/1810.04805}, year = {2018}, url = {http://arxiv.org/abs/1810.04805}, archivePrefix = {arXiv}, eprint = {1810.04805}, timestamp = {Tue, 30 Oct 2018 20:39:56 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ``` ``` @inproceedings{tjong-kim-sang-de-meulder-2003-introduction, title = "Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition", author = "Tjong Kim Sang, Erik F. and De Meulder, Fien", booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003", year = "2003", url = "https://www.aclweb.org/anthology/W03-0419", pages = "142--147", } ```
[ -0.4836498200893402, -0.6692929863929749, 0.20081281661987305, 0.15148846805095673, -0.3598845303058624, -0.10908178985118866, -0.4492122530937195, -0.5724589824676514, 0.30680227279663086, 0.3334006369113922, -0.4446397125720978, -0.5296253561973572, -0.7323070168495178, 0.23967061936855316, -0.45342063903808594, 1.3092377185821533, -0.04570438340306282, 0.2972401976585388, -0.04172492027282715, -0.19285541772842407, -0.17886115610599518, -0.7810699939727783, -0.8584890365600586, -0.18238219618797302, 0.5762577056884766, 0.1321425437927246, 0.3875380754470825, 0.33966192603111267, 0.5258979797363281, 0.2653225362300873, -0.09546386450529099, 0.11747719347476959, -0.4136497378349304, -0.21709293127059937, -0.008829033933579922, -0.26793307065963745, -0.38000205159187317, 0.0833003893494606, 0.7523715496063232, 0.7654510140419006, 0.008222484961152077, 0.1251765489578247, 0.15867075324058533, 0.5981454253196716, -0.28927046060562134, 0.2440284937620163, -0.7165096998214722, -0.12122645229101181, -0.23975558578968048, 0.06203253194689751, -0.4309673011302948, -0.2826516032218933, 0.4353099763393402, -0.4462173879146576, 0.5488682985305786, -0.002912144875153899, 1.4330490827560425, 0.013749674893915653, -0.4173550307750702, -0.26920539140701294, -0.6386152505874634, 0.8448695540428162, -0.8484939336776733, 0.6576122045516968, 0.13018281757831573, 0.0027262840885668993, -0.12225158512592316, -0.797519862651825, -0.7764683961868286, -0.22699709236621857, -0.30909237265586853, 0.04473993554711342, -0.07526969164609909, 0.08699099719524384, 0.32752084732055664, 0.27357152104377747, -0.528752326965332, 0.046964775770902634, -0.4809999465942383, -0.21348728239536285, 0.5758841037750244, -0.17321591079235077, 0.054391514509916306, -0.32165566086769104, -0.5196093320846558, -0.23627780377864838, -0.6275702118873596, 0.18032775819301605, 0.3804921805858612, 0.4650108218193054, -0.23392263054847717, 0.5072025656700134, -0.02758042886853218, 0.5960543155670166, 0.3576216697692871, -0.10123743116855621, 0.6450729370117188, -0.48474961519241333, -0.24097147583961487, 0.1043926551938057, 0.810606062412262, 0.13990065455436707, 0.3077804148197174, -0.2323228120803833, -0.31824204325675964, -0.27512553334236145, 0.14912131428718567, -0.7109103798866272, -0.33442017436027527, -0.022210244089365005, -0.5418891906738281, -0.04441536217927933, 0.14218327403068542, -0.5809972882270813, -0.03374404087662697, -0.46145227551460266, 0.38897478580474854, -0.5762321352958679, -0.1457127183675766, -0.08775602281093597, -0.026916509494185448, 0.5010550618171692, 0.18775124847888947, -0.9148364067077637, 0.2532181441783905, 0.5012530088424683, 0.5932328104972839, -0.20976655185222626, -0.42652931809425354, -0.3023466169834137, -0.080295130610466, -0.11693428456783295, 0.5939204692840576, -0.2856767773628235, -0.2546796202659607, -0.03047330304980278, 0.20586301386356354, -0.19878338277339935, -0.33358728885650635, 0.6696365475654602, -0.6780405044555664, 0.4519486427307129, -0.36258578300476074, -0.6506897807121277, -0.3217744827270508, 0.2229289710521698, -0.5563455820083618, 1.1267122030258179, 0.09227185696363449, -0.8698504567146301, 0.6661524176597595, -0.509202241897583, -0.5201950669288635, -0.13918617367744446, -0.1657065600156784, -0.4747300446033478, -0.0711868479847908, 0.2736585736274719, 0.39124390482902527, -0.07691057026386261, 0.5219243168830872, -0.17162588238716125, -0.19589315354824066, -0.04666439816355705, -0.38686659932136536, 1.0490734577178955, -0.011811401695013046, -0.34659063816070557, -0.09766344726085663, -0.9981277585029602, -0.19087719917297363, 0.1804266721010208, -0.6209650635719299, -0.42857304215431213, 0.0817638710141182, 0.0704139918088913, 0.09689317643642426, 0.45893532037734985, -0.6034240126609802, 0.10383060574531555, -0.5395513772964478, 0.15053418278694153, 0.6336356997489929, 0.05053563043475151, 0.49464431405067444, -0.17806750535964966, 0.05218800529837608, 0.16406966745853424, 0.013586204499006271, 0.10781580954790115, -0.47078755497932434, -1.2384939193725586, -0.3111726939678192, 0.7182397842407227, 0.5570758581161499, -0.6319432854652405, 0.7393438220024109, -0.48566514253616333, -0.5591650605201721, -0.5671557188034058, 0.01760307513177395, 0.3643607795238495, 0.7765085101127625, 0.6822916865348816, -0.29853156208992004, -0.9817572832107544, -1.0320390462875366, -0.1399986892938614, -0.18185584247112274, 0.08036298304796219, 0.35836735367774963, 0.6120112538337708, -0.23895996809005737, 1.0068082809448242, -0.2025669813156128, -0.21941573917865753, -0.30430230498313904, 0.27900469303131104, 0.48765724897384644, 0.6548572182655334, 0.5881496667861938, -0.8532410860061646, -0.5404793620109558, -0.3422408103942871, -0.7119535207748413, 0.11271632462739944, -0.28014126420021057, -0.21482111513614655, 0.5691074132919312, 0.379923015832901, -0.7059130072593689, 0.30690380930900574, 0.3371031880378723, -0.23003916442394257, 0.5369923710823059, -0.20171765983104706, -0.17250299453735352, -1.1075795888900757, 0.10943455249071121, -0.009109647013247013, -0.008908730931580067, -0.5780986547470093, -0.23085297644138336, 0.026836588978767395, 0.12237387895584106, -0.3212268352508545, 0.5569077134132385, -0.6659110188484192, -0.08807319402694702, 0.16331283748149872, 0.05256878212094307, -0.021667353808879852, 0.669167697429657, 0.26858627796173096, 0.6522514224052429, 0.41172492504119873, -0.7938504219055176, 0.18239450454711914, 0.5165900588035583, -0.5364972949028015, 0.44484320282936096, -0.7406916618347168, 0.06689254194498062, -0.19528478384017944, 0.22779107093811035, -0.794416606426239, 0.10601327568292618, 0.15172502398490906, -0.6109818816184998, 0.5791746377944946, -0.0993979349732399, -0.5909654498100281, -0.39014148712158203, -0.08600777387619019, 0.10292036831378937, 0.4473876655101776, -0.5838488936424255, 0.5891504287719727, 0.22147884964942932, -0.05604059621691704, -0.8058421611785889, -0.8275492787361145, 0.053794849663972855, -0.006426433101296425, -0.5087611675262451, 0.49898117780685425, -0.08053193241357803, 0.05096135288476944, 0.16582436859607697, -0.01711561717092991, -0.1556616872549057, -0.020072948187589645, 0.10068633407354355, 0.53253573179245, -0.3339084982872009, 0.26943546533584595, -0.01286120805889368, -0.019944997504353523, -0.023165998980402946, -0.1879824548959732, 0.5493325591087341, -0.13208602368831635, -0.1642105132341385, -0.3059374988079071, 0.2840854525566101, 0.3771793246269226, -0.23425421118736267, 0.9037739038467407, 0.7515055537223816, -0.5144292712211609, 0.21161575615406036, -0.6287552714347839, -0.1847168505191803, -0.4395773112773895, 0.3929598927497864, -0.31923604011535645, -0.673053503036499, 0.4346320927143097, 0.41409748792648315, 0.305769145488739, 0.7617470026016235, 0.5130632519721985, -0.1826494336128235, 0.6630094051361084, 0.5686436295509338, -0.22986270487308502, 0.5116204619407654, -0.43394583463668823, 0.4153078496456146, -0.8904467821121216, -0.3166552484035492, -0.5274421572685242, -0.4528024196624756, -0.7254273891448975, -0.09562009572982788, 0.04085785150527954, 0.10790694504976273, -0.3913961946964264, 0.6860309839248657, -0.4363420009613037, 0.10601761192083359, 0.7972959876060486, 0.000059316887927707285, 0.10502272099256516, 0.06831476837396622, -0.30115601420402527, -0.1497311145067215, -0.48897653818130493, -0.5214686393737793, 1.0230660438537598, 0.2893473505973816, 0.5681719183921814, 0.0143516194075346, 1.0295054912567139, 0.1613611876964569, 0.2526310980319977, -0.6757304668426514, 0.6593517661094666, -0.2209775149822235, -0.8640637397766113, -0.28239089250564575, -0.3657480776309967, -1.1585657596588135, 0.03705701231956482, -0.3572707772254944, -0.6267064809799194, 0.5525772571563721, -0.07370854914188385, -0.3490331172943115, 0.35615670680999756, -0.8153963088989258, 0.7442023754119873, -0.3604109585285187, 0.10863308608531952, 0.0235608983784914, -0.7600440382957458, 0.06253378093242645, 0.03511683642864227, -0.030312014743685722, 0.005835237912833691, 0.07995397597551346, 0.8666152358055115, -0.26398348808288574, 0.7834593057632446, -0.38166114687919617, 0.04982883483171463, 0.22832448780536652, -0.2458478808403015, 0.6315414309501648, -0.036838289350271225, -0.008678325451910496, 0.49158775806427, -0.19369745254516602, -0.2879812717437744, -0.2842938005924225, 0.6924364566802979, -0.9641866683959961, -0.451540470123291, -0.46844667196273804, -0.45618903636932373, -0.1295681595802307, 0.46215903759002686, 0.5721083879470825, 0.46567249298095703, -0.18129363656044006, 0.3956523537635803, 0.7277373671531677, -0.2758404612541199, 0.6135345101356506, 0.5872122645378113, 0.13705988228321075, -0.38654324412345886, 0.6467487812042236, 0.412875235080719, -0.0031846105121076107, 0.6076929569244385, -0.2922463119029999, -0.33374497294425964, -0.6277357339859009, -0.2772115170955658, 0.39068496227264404, -0.6015738248825073, -0.23916786909103394, -0.9579497575759888, -0.5606300234794617, -0.5065488815307617, -0.037512850016355515, -0.34521907567977905, -0.39045652747154236, -0.7219083905220032, -0.16727162897586823, 0.21670059859752655, 0.40109989047050476, -0.014846928417682648, 0.15291717648506165, -0.7151176929473877, 0.2565270662307739, 0.35526514053344727, 0.3327854573726654, -0.002986642299219966, -0.6818608641624451, -0.31190213561058044, 0.16214881837368011, -0.16144834458827972, -0.725429117679596, 0.444634348154068, 0.35860857367515564, 0.7540473937988281, 0.3218139708042145, 0.05074073001742363, 0.6508874893188477, -0.6547114849090576, 0.9152195453643799, 0.14391100406646729, -0.7479478716850281, 0.46377700567245483, -0.12955494225025177, -0.07398116588592529, 0.6683655977249146, 0.48018312454223633, -0.3783743381500244, -0.18043512105941772, -0.9335861802101135, -1.0009511709213257, 0.6915115714073181, 0.19615064561367035, 0.24959523975849152, -0.22911672294139862, 0.31387877464294434, 0.10953743755817413, 0.2545369267463684, -1.0398067235946655, -0.5449369549751282, -0.12600745260715485, -0.25666898488998413, -0.10045736283063889, -0.41337624192237854, 0.024727072566747665, -0.3736717998981476, 1.0312234163284302, 0.2524729073047638, 0.755634605884552, 0.4918307363986969, -0.3889319598674774, 0.14102740585803986, 0.20579653978347778, 0.5094791650772095, 0.5106207132339478, -0.38932400941848755, 0.07388440519571304, 0.3343510627746582, -0.5544217824935913, -0.11054554581642151, 0.5624653100967407, -0.2539089024066925, 0.38848796486854553, 0.36552155017852783, 0.910449743270874, 0.19730690121650696, -0.35679587721824646, 0.5586220622062683, 0.01999281719326973, -0.35457342863082886, -0.5950838923454285, -0.06994643807411194, -0.09267134964466095, 0.33779990673065186, 0.5681604743003845, 0.09331775456666946, 0.12457069009542465, -0.3515361547470093, 0.24192190170288086, 0.4209173321723938, -0.31010183691978455, -0.3171769082546234, 0.5432313680648804, 0.15159311890602112, -0.2319444864988327, 0.8309472799301147, -0.4087987244129181, -0.5096790194511414, 0.6306533217430115, 0.5509408712387085, 0.9604193568229675, 0.09349902719259262, -0.01409373339265585, 0.7027924656867981, 0.4810802638530731, 0.037766244262456894, 0.2644272446632385, 0.05507103353738785, -0.9740804433822632, -0.29503297805786133, -0.6810255646705627, -0.11010799556970596, 0.32387876510620117, -0.709873378276825, 0.5160606503486633, -0.3915446698665619, -0.21911945939064026, 0.22187401354312897, 0.16141459345817566, -0.8816735148429871, 0.2605399489402771, 0.3924892246723175, 1.0596286058425903, -0.5651386380195618, 0.9449784159660339, 0.7647786140441895, -0.629525363445282, -0.6992408633232117, -0.004708536434918642, -0.35421422123908997, -0.7745232582092285, 0.8132875561714172, 0.1598983108997345, 0.27292969822883606, 0.08410104364156723, -0.5859744548797607, -1.113598346710205, 1.1050034761428833, 0.19128642976284027, -0.5994037985801697, -0.39774367213249207, -0.06530062854290009, 0.5954932570457458, -0.35417234897613525, 0.16808220744132996, 0.43315964937210083, 0.42089396715164185, -0.1422915905714035, -0.928025484085083, -0.023999178782105446, -0.2465774416923523, 0.08969902247190475, 0.2473573535680771, -0.6750413775444031, 0.9736844897270203, -0.27400749921798706, -0.22651700675487518, 0.02121536061167717, 0.7893790602684021, 0.20983564853668213, 0.26711010932922363, 0.6068658232688904, 0.7590409517288208, 0.7709711790084839, -0.27761155366897583, 0.8716846704483032, -0.3686378300189972, 0.604724109172821, 1.2823498249053955, 0.012443112209439278, 0.8571442365646362, 0.48875442147254944, -0.31313228607177734, 0.8476909399032593, 0.7412363886833191, -0.39949774742126465, 0.8104954957962036, -0.04094117507338524, 0.010010598227381706, 0.012674654833972454, 0.12410476803779602, -0.5000208616256714, 0.39642345905303955, 0.2357938289642334, -0.6592556238174438, -0.18226633965969086, -0.10448730736970901, 0.16308161616325378, -0.34940218925476074, -0.16636979579925537, 0.6874395608901978, 0.03270300105214119, -0.5830097198486328, 0.723220944404602, -0.0012624399969354272, 0.770492434501648, -0.6238133907318115, 0.09008960425853729, -0.18364673852920532, 0.09375941008329391, -0.10377252846956253, -0.6060343980789185, 0.2932508885860443, 0.022853704169392586, -0.4383656084537506, -0.12241604179143906, 0.7015010118484497, -0.4999766945838928, -0.4782257378101349, 0.3420432209968567, 0.38589268922805786, 0.24942965805530548, 0.14005601406097412, -0.8134743571281433, -0.38249117136001587, 0.08703719079494476, -0.4763215482234955, 0.1108916699886322, 0.5110945105552673, 0.1741747111082077, 0.33520734310150146, 0.7076438069343567, 0.003021084237843752, 0.1748889982700348, 0.054122041910886765, 0.7550274729728699, -0.6853423118591309, -0.3689401149749756, -0.7506064772605896, 0.45389309525489807, -0.23150049149990082, -0.4449668824672699, 0.6912956237792969, 0.742965579032898, 1.1192798614501953, -0.10066214203834534, 0.7630822062492371, -0.3930898904800415, 0.7133455276489258, -0.3557773530483246, 0.5825885534286499, -0.4708554446697235, 0.0992714986205101, -0.21742595732212067, -0.9229177236557007, -0.19703137874603271, 0.7271127104759216, -0.39917945861816406, 0.17243659496307373, 0.6562188267707825, 0.5714103579521179, -0.015746161341667175, -0.22009851038455963, 0.02303314208984375, 0.39597612619400024, 0.12204162776470184, 0.46567270159721375, 0.5066221952438354, -0.6126863956451416, 0.6447583436965942, -0.35132330656051636, 0.05531255900859833, -0.3322587311267853, -0.795905590057373, -0.9295958280563354, -0.6869333982467651, -0.29020214080810547, -0.4437391757965088, 0.0008797307382337749, 0.9786478281021118, 0.6507369875907898, -1.0987516641616821, -0.027626970782876015, -0.2153637409210205, 0.053915753960609436, -0.20189082622528076, -0.24507424235343933, 0.5547323822975159, -0.4651305675506592, -0.8567615151405334, 0.10007663071155548, -0.07269150018692017, 0.24912293255329132, -0.13580115139484406, -0.09134609997272491, -0.6715249419212341, 0.02756292186677456, 0.5259960889816284, 0.24464590847492218, -0.6705543994903564, -0.3191501498222351, 0.14950649440288544, -0.3654843866825104, 0.19792267680168152, 0.4127996563911438, -0.7444794774055481, 0.3842838406562805, 0.40128037333488464, 0.6621457934379578, 0.5300226807594299, -0.15401776134967804, 0.2788509726524353, -0.9436987042427063, 0.15482226014137268, 0.23627802729606628, 0.61213618516922, 0.45967721939086914, -0.4756574332714081, 0.5437864065170288, 0.43707796931266785, -0.5274305939674377, -0.7121016383171082, -0.16441120207309723, -1.142166018486023, -0.024925917387008667, 1.2383462190628052, -0.18016594648361206, 0.020517904311418533, -0.0475592315196991, -0.15912370383739471, 0.5696744322776794, -0.5651378035545349, 0.6535283923149109, 0.8451056480407715, 0.04562262073159218, -0.13205914199352264, -0.4632589519023895, 0.43435919284820557, 0.2590647041797638, -0.5102242231369019, -0.34008917212486267, 0.30392563343048096, 0.4099980592727661, 0.3384680449962616, 0.5332887172698975, -0.03620804473757744, -0.007921877317130566, -0.18835894763469696, 0.4312039315700531, 0.11872667074203491, -0.18401610851287842, -0.19304479658603668, -0.18202155828475952, -0.16714359819889069, -0.39053675532341003 ]
pysentimiento/robertuito-sentiment-analysis
pysentimiento
"2023-02-25T14:25:07Z"
886,765
32
pysentimiento
[ "pysentimiento", "pytorch", "tf", "roberta", "twitter", "sentiment-analysis", "es", "arxiv:2106.09462", "has_space", "region:us" ]
null
"2022-03-02T23:29:05Z"
--- language: - es library_name: pysentimiento tags: - twitter - sentiment-analysis --- # Sentiment Analysis in Spanish ## robertuito-sentiment-analysis Repository: [https://github.com/pysentimiento/pysentimiento/](https://github.com/finiteautomata/pysentimiento/) Model trained with TASS 2020 corpus (around ~5k tweets) of several dialects of Spanish. Base model is [RoBERTuito](https://github.com/pysentimiento/robertuito), a RoBERTa model trained in Spanish tweets. Uses `POS`, `NEG`, `NEU` labels. ## Usage Use it directly with [pysentimiento](https://github.com/pysentimiento/pysentimiento) ```python from pysentimiento import create_analyzer analyzer = create_analyzer(task="sentiment", lang="es") analyzer.predict("Qué gran jugador es Messi") # returns AnalyzerOutput(output=POS, probas={POS: 0.998, NEG: 0.002, NEU: 0.000}) ``` ## Results Results for the four tasks evaluated in `pysentimiento`. Results are expressed as Macro F1 scores | model | emotion | hate_speech | irony | sentiment | |:--------------|:--------------|:--------------|:--------------|:--------------| | robertuito | 0.560 ± 0.010 | 0.759 ± 0.007 | 0.739 ± 0.005 | 0.705 ± 0.003 | | roberta | 0.527 ± 0.015 | 0.741 ± 0.012 | 0.721 ± 0.008 | 0.670 ± 0.006 | | bertin | 0.524 ± 0.007 | 0.738 ± 0.007 | 0.713 ± 0.012 | 0.666 ± 0.005 | | beto_uncased | 0.532 ± 0.012 | 0.727 ± 0.016 | 0.701 ± 0.007 | 0.651 ± 0.006 | | beto_cased | 0.516 ± 0.012 | 0.724 ± 0.012 | 0.705 ± 0.009 | 0.662 ± 0.005 | | mbert_uncased | 0.493 ± 0.010 | 0.718 ± 0.011 | 0.681 ± 0.010 | 0.617 ± 0.003 | | biGRU | 0.264 ± 0.007 | 0.592 ± 0.018 | 0.631 ± 0.011 | 0.585 ± 0.011 | Note that for Hate Speech, these are the results for Semeval 2019, Task 5 Subtask B ## Citation If you use this model in your research, please cite pysentimiento and RoBERTuito papers: ``` @misc{perez2021pysentimiento, title={pysentimiento: A Python Toolkit for Sentiment Analysis and SocialNLP tasks}, author={Juan Manuel Pérez and Juan Carlos Giudici and Franco Luque}, year={2021}, eprint={2106.09462}, archivePrefix={arXiv}, primaryClass={cs.CL} } @inproceedings{perez-etal-2022-robertuito, title = "{R}o{BERT}uito: a pre-trained language model for social media text in {S}panish", author = "P{\'e}rez, Juan Manuel and Furman, Dami{\'a}n Ariel and Alonso Alemany, Laura and Luque, Franco M.", booktitle = "Proceedings of the Thirteenth Language Resources and Evaluation Conference", month = jun, year = "2022", address = "Marseille, France", publisher = "European Language Resources Association", url = "https://aclanthology.org/2022.lrec-1.785", pages = "7235--7243", abstract = "Since BERT appeared, Transformer language models and transfer learning have become state-of-the-art for natural language processing tasks. Recently, some works geared towards pre-training specially-crafted models for particular domains, such as scientific papers, medical documents, user-generated texts, among others. These domain-specific models have been shown to improve performance significantly in most tasks; however, for languages other than English, such models are not widely available. In this work, we present RoBERTuito, a pre-trained language model for user-generated text in Spanish, trained on over 500 million tweets. Experiments on a benchmark of tasks involving user-generated text showed that RoBERTuito outperformed other pre-trained language models in Spanish. In addition to this, our model has some cross-lingual abilities, achieving top results for English-Spanish tasks of the Linguistic Code-Switching Evaluation benchmark (LinCE) and also competitive performance against monolingual models in English Twitter tasks. To facilitate further research, we make RoBERTuito publicly available at the HuggingFace model hub together with the dataset used to pre-train it.", } @inproceedings{garcia2020overview, title={Overview of TASS 2020: Introducing emotion detection}, author={Garc{\'\i}a-Vega, Manuel and D{\'\i}az-Galiano, MC and Garc{\'\i}a-Cumbreras, MA and Del Arco, FMP and Montejo-R{\'a}ez, A and Jim{\'e}nez-Zafra, SM and Mart{\'\i}nez C{\'a}mara, E and Aguilar, CA and Cabezudo, MAS and Chiruzzo, L and others}, booktitle={Proceedings of the Iberian Languages Evaluation Forum (IberLEF 2020) Co-Located with 36th Conference of the Spanish Society for Natural Language Processing (SEPLN 2020), M{\'a}laga, Spain}, pages={163--170}, year={2020} } ```
[ -0.36002203822135925, -0.6591815948486328, 0.2115151584148407, 0.632388710975647, -0.2643035054206848, 0.20309753715991974, -0.5079294443130493, -0.5172771215438843, 0.5666320323944092, 0.2417684644460678, -0.5501326322555542, -0.9040241241455078, -0.948605477809906, 0.2098206877708435, -0.34847280383110046, 1.1769111156463623, 0.16316381096839905, 0.0635179951786995, 0.2607259154319763, -0.10769414901733398, 0.2843256890773773, -0.44194942712783813, -0.7128742933273315, -0.142653688788414, 0.6499289274215698, 0.17035521566867828, 0.4866982400417328, 0.07535085082054138, 0.426073282957077, 0.3597896695137024, -0.14937064051628113, -0.06986349821090698, -0.33115893602371216, 0.0043440028093755245, -0.06151202693581581, -0.2823214530944824, -0.4509219527244568, 0.13633841276168823, 0.4061115086078644, 0.44142240285873413, 0.0827336236834526, 0.17197436094284058, 0.10614148527383804, 0.5648279786109924, -0.36099717020988464, 0.1289367377758026, -0.4892354905605316, -0.07422499358654022, -0.3341614902019501, -0.01739904098212719, -0.2827366590499878, -0.6481432914733887, 0.2404920607805252, -0.216386616230011, 0.13202616572380066, -0.0658283680677414, 1.2183271646499634, 0.2150541990995407, -0.09535913169384003, -0.3659766614437103, -0.386622816324234, 1.0390044450759888, -0.890815794467926, 0.3006000816822052, 0.1611786037683487, -0.0672755017876625, 0.0029192266520112753, -0.39261993765830994, -0.6738181710243225, -0.2292880266904831, 0.06725233048200607, 0.2979174256324768, -0.5629606246948242, -0.0451212003827095, 0.0027146677020937204, 0.23404745757579803, -0.41232728958129883, 0.12812525033950806, -0.33670079708099365, -0.15449652075767517, 0.5728062987327576, -0.20607705414295197, 0.2836584746837616, -0.4545742869377136, -0.17979620397090912, -0.31413692235946655, -0.30627909302711487, 0.012459646910429, 0.4599170386791229, 0.39699581265449524, -0.30108118057250977, 0.30148404836654663, -0.04618305340409279, 0.4282515048980713, -0.11305569857358932, -0.04388377070426941, 0.7996156215667725, -0.07880663126707077, -0.3037205636501312, -0.48270168900489807, 1.4533394575119019, 0.2844811677932739, 0.6378540396690369, -0.047025587409734726, -0.10897109657526016, 0.19661176204681396, 0.058224353939294815, -0.7573582530021667, -0.3315090239048004, 0.26843172311782837, -0.335899293422699, -0.44334664940834045, 0.04615984857082367, -0.9500656723976135, -0.2093706876039505, -0.0791853666305542, 0.2990325689315796, -0.36808592081069946, -0.5587602257728577, 0.10671214014291763, -0.04124818369746208, 0.05997150018811226, 0.2245815396308899, -0.5328360795974731, 0.2637370228767395, 0.31311360001564026, 0.835548460483551, -0.28527918457984924, -0.3332045376300812, -0.1922784149646759, -0.49063652753829956, -0.14234724640846252, 0.890445351600647, -0.3107966482639313, -0.17726683616638184, 0.05404931679368019, 0.12965568900108337, -0.19386734068393707, -0.4513702094554901, 0.6841444969177246, -0.2865031361579895, 0.5434522032737732, -0.19685980677604675, -0.1831141859292984, -0.259841650724411, 0.1793336719274521, -0.5502066016197205, 1.388767123222351, 0.1547667682170868, -0.9008376002311707, 0.08157789707183838, -0.8076888918876648, -0.5926607251167297, -0.30003827810287476, 0.017238972708582878, -0.5367079377174377, -0.10460404306650162, 0.23375260829925537, 0.700497567653656, -0.4311803877353668, 0.31153684854507446, -0.3480288088321686, 0.09988704323768616, 0.255632609128952, -0.027079632505774498, 1.1365923881530762, 0.31789031624794006, -0.6165646910667419, 0.2106419950723648, -0.6466168761253357, -0.10654701292514801, 0.2363254278898239, -0.09160187095403671, -0.305210143327713, -0.1053566038608551, 0.1985715925693512, 0.4738236665725708, 0.38530656695365906, -0.8799466490745544, -0.3437103033065796, -0.573544979095459, 0.3423079550266266, 0.7148977518081665, -0.17987683415412903, 0.31006479263305664, -0.11453986912965775, 0.7884005904197693, -0.10833631455898285, 0.17527881264686584, 0.18457289040088654, -0.5203933119773865, -0.7629433274269104, -0.3310304284095764, 0.10827697813510895, 0.6975327730178833, -0.5830324292182922, 0.5494920611381531, -0.1549903154373169, -0.7074073553085327, -0.41289108991622925, -0.04580383375287056, 0.47015562653541565, 0.5863626003265381, 0.4647604823112488, 0.02062687650322914, -1.000728964805603, -0.7942905426025391, -0.41715192794799805, -0.21886369585990906, 0.01790270023047924, 0.2313418984413147, 0.6812642812728882, -0.19145405292510986, 0.8218746185302734, -0.4690554141998291, -0.2921445965766907, -0.4836508631706238, 0.31093019247055054, 0.4134460389614105, 0.2581816017627716, 0.7232820987701416, -0.6562913060188293, -0.8774922490119934, 0.0996914654970169, -0.7064740657806396, -0.41892606019973755, 0.3024866282939911, -0.06922823190689087, 0.43534791469573975, 0.39690402150154114, -0.1638209968805313, 0.2148909717798233, 0.8774617314338684, -0.27656984329223633, 0.48197615146636963, 0.11960171908140182, 0.32493332028388977, -1.3392568826675415, 0.014292147010564804, 0.5301960110664368, -0.18301871418952942, -0.6526071429252625, -0.37689048051834106, -0.17257653176784515, 0.15406517684459686, -0.6134185791015625, 0.6964269280433655, -0.3538636565208435, 0.19047163426876068, -0.06588420271873474, 0.20796793699264526, -0.20088176429271698, 0.6442105174064636, 0.1953037828207016, 0.676145613193512, 0.5703130960464478, -0.4293256998062134, 0.12061022967100143, 0.1446007490158081, -0.3981606662273407, 0.4465208947658539, -0.9242947697639465, -0.023163599893450737, -0.09718438237905502, -0.11592371761798859, -1.0519182682037354, -0.032846976071596146, 0.2656400203704834, -0.8317050933837891, 0.03911114111542702, -0.14220267534255981, -0.44931504130363464, -0.5700072050094604, -0.5127386450767517, -0.047197479754686356, 0.53713059425354, -0.4138861894607544, 0.6907546520233154, 0.6525474190711975, -0.2571882903575897, -0.6706669330596924, -0.8011515140533447, 0.0025141648948192596, -0.42464736104011536, -0.7842156887054443, 0.1480451226234436, -0.0017133242217823863, -0.28809046745300293, -0.0923435240983963, 0.14724472165107727, -0.03940520063042641, 0.09074603766202927, 0.27129653096199036, 0.3306275010108948, -0.07239591330289841, -0.021985797211527824, 0.002615808742120862, 0.08179889619350433, 0.15861618518829346, -0.04581701382994652, 0.7925642728805542, -0.3776785433292389, 0.1751137375831604, -0.48624733090400696, 0.13522911071777344, 0.5020775198936462, -0.2885252833366394, 0.8652157783508301, 0.5893595218658447, -0.3046765923500061, -0.13056054711341858, -0.5654746890068054, 0.08660409599542618, -0.4524877965450287, 0.5252761840820312, -0.23276866972446442, -1.0012882947921753, 0.8102135062217712, 0.18071289360523224, -0.0923645943403244, 0.6858155727386475, 0.7225809097290039, -0.3172318637371063, 0.8336909413337708, 0.6250596642494202, -0.21024934947490692, 0.9264224171638489, -0.38460496068000793, 0.3471832871437073, -0.6436566114425659, -0.2875141203403473, -0.9378843903541565, -0.13627807796001434, -0.667059600353241, -0.3428737223148346, 0.2440294325351715, -0.24605266749858856, -0.24784763157367706, 0.6423139572143555, -0.4256458282470703, 0.4623408019542694, 0.3980557322502136, 0.01415833830833435, 0.0004546486015897244, 0.060510408133268356, 0.12331196665763855, -0.368735134601593, -0.5751417279243469, -0.523048460483551, 1.0527939796447754, 0.3976253271102905, 0.6228677034378052, 0.03471483290195465, 0.88228839635849, 0.3452237844467163, 0.5011117458343506, -0.7721283435821533, 0.5753956437110901, -0.5060878992080688, -0.41227757930755615, -0.28403952717781067, -0.5230445265769958, -0.96586012840271, 0.3352415859699249, -0.12418060749769211, -0.9204307198524475, 0.25848281383514404, 0.01963762938976288, -0.20838116109371185, 0.17827127873897552, -0.7492526173591614, 1.0255705118179321, -0.19640620052814484, -0.13699489831924438, -0.07993163913488388, -0.5213567614555359, 0.138018399477005, 0.17213505506515503, 0.4427061975002289, -0.2619130313396454, 0.053968582302331924, 1.2454291582107544, -0.2366713136434555, 0.8730612397193909, -0.17025437951087952, -0.1813046634197235, 0.25525668263435364, 0.008455540053546429, 0.4002074897289276, -0.24570414423942566, -0.25274381041526794, 0.2344176322221756, -0.10702774673700333, -0.21048353612422943, -0.3239906132221222, 0.6984037756919861, -0.8160832524299622, -0.227573961019516, -0.5396666526794434, -0.40330204367637634, -0.09508402645587921, 0.22164291143417358, 0.4200609624385834, 0.20536288619041443, -0.3293754458427429, 0.20327408611774445, 0.6421945095062256, -0.376077264547348, 0.4688833951950073, 0.5229511857032776, -0.062382157891988754, -0.5386949777603149, 0.8070971369743347, 0.08987359702587128, 0.19478297233581543, 0.32418036460876465, 0.373885840177536, -0.36451107263565063, -0.3906080722808838, -0.016022758558392525, 0.6151903867721558, -0.48186105489730835, -0.19600124657154083, -1.0494372844696045, 0.09571915864944458, -0.6043274998664856, -0.13327501714229584, -0.5432915687561035, -0.34084922075271606, -0.3951423466205597, -0.15533728897571564, 0.4228149652481079, 0.5765367746353149, -0.15150408446788788, 0.4095899760723114, -0.4702775776386261, 0.2857453227043152, -0.17951032519340515, 0.122665636241436, -0.05729678273200989, -0.8204131722450256, -0.2623050808906555, -0.0073744491674005985, -0.11221596598625183, -1.0356504917144775, 0.8945333957672119, 0.13152381777763367, 0.37932315468788147, 0.26470524072647095, 0.04097866266965866, 0.4923895597457886, -0.22828704118728638, 0.6683247685432434, 0.276847243309021, -1.0201810598373413, 0.842968761920929, -0.4653586149215698, 0.04031284525990486, 0.6426829099655151, 0.7699987888336182, -0.6309056878089905, -0.821297287940979, -0.8857094049453735, -0.8998973369598389, 0.889753520488739, 0.17654290795326233, 0.1530269980430603, -0.331302285194397, -0.17209559679031372, -0.15221311151981354, 0.258780837059021, -1.1710659265518188, -0.3542024791240692, -0.19230686128139496, -0.4692370295524597, -0.02137017622590065, -0.20802922546863556, 0.04203641042113304, -0.41182324290275574, 0.9104450345039368, 0.1059887707233429, 0.2718367278575897, 0.12029939889907837, -0.2939210534095764, 0.10930126905441284, 0.24373650550842285, 0.48977169394493103, 0.40043121576309204, -0.36975985765457153, 0.002964221639558673, 0.009518545120954514, -0.4557538330554962, -0.188990980386734, 0.14494988322257996, -0.05519905313849449, 0.12732014060020447, 0.23035526275634766, 0.7726001739501953, 0.0821768119931221, -0.599052369594574, 0.6944732069969177, -0.02096688747406006, -0.3427104353904724, -0.3861216902732849, -0.18125306069850922, -0.08850140869617462, 0.2760116755962372, 0.3783864378929138, 0.08859744668006897, -0.016571292653679848, -0.5450233221054077, 0.04661966860294342, 0.330642968416214, -0.35483482480049133, -0.4820924997329712, 0.5471534729003906, 0.2636346220970154, -0.3427976369857788, 0.17730145156383514, -0.4306740164756775, -1.0045998096466064, 0.6548120379447937, 0.4071500599384308, 1.0398823022842407, -0.3061293661594391, 0.5837814211845398, 0.7103284001350403, 0.46902400255203247, -0.13207007944583893, 0.5054791569709778, 0.06058187410235405, -0.9620932340621948, -0.3951435387134552, -0.7605173587799072, -0.2775643765926361, 0.20890307426452637, -0.6623309254646301, 0.1857839822769165, -0.4215022623538971, -0.19262035191059113, -0.04064561054110527, 0.04138404130935669, -0.5364654064178467, 0.42533281445503235, -0.01456719171255827, 0.6953064203262329, -1.2310798168182373, 0.8027198314666748, 0.7151650786399841, -0.5739046335220337, -0.7297604084014893, -0.08962013572454453, -0.08493565768003464, -0.6763120889663696, 0.5845671892166138, 0.02975822240114212, -0.39917340874671936, -0.012428876012563705, -0.5298072099685669, -0.8568233847618103, 0.627810537815094, 0.337975412607193, -0.305886447429657, 0.15022313594818115, 0.039576634764671326, 0.9524168372154236, -0.2880920171737671, 0.39013928174972534, 0.6553125977516174, 0.3974611759185791, 0.008660031482577324, -0.8206188082695007, -0.04002553969621658, -0.5316921472549438, -0.13344645500183105, 0.23676446080207825, -0.5855753421783447, 1.0410784482955933, -0.035690873861312866, -0.21448585391044617, -0.18542475998401642, 0.7906315922737122, 0.01981513947248459, 0.12036291509866714, 0.44441694021224976, 0.5076451301574707, 0.8455673456192017, -0.3120479881763458, 1.104905605316162, -0.2682647705078125, 0.5566677451133728, 1.154336929321289, 0.05225393548607826, 0.8414985537528992, 0.3636328876018524, -0.4702172577381134, 0.755786657333374, 0.4569008946418762, 0.15884989500045776, 0.35409775376319885, -0.07669004797935486, -0.19823536276817322, -0.060404472053050995, -0.13123808801174164, -0.24755215644836426, 0.3041355311870575, 0.26378878951072693, -0.4304170310497284, -0.0887036994099617, 0.15694750845432281, 0.556585431098938, 0.4045429229736328, -0.08764860779047012, 0.5190876722335815, 0.014912018552422523, -0.524736225605011, 0.701518177986145, -0.04639117047190666, 1.1451797485351562, -0.5356243252754211, 0.45551976561546326, -0.29189595580101013, 0.08839278668165207, -0.4633960425853729, -0.9322007894515991, 0.40090271830558777, 0.47219476103782654, -0.05707360804080963, -0.4756314158439636, 0.48473966121673584, -0.3598850667476654, -0.5127027034759521, 0.584418535232544, 0.39169996976852417, 0.219041109085083, -0.19582246243953705, -0.8349227905273438, 0.1456347554922104, 0.31185442209243774, -0.5493196845054626, 0.10350332409143448, 0.5025871396064758, -0.01816558837890625, 0.5970876812934875, 0.46640127897262573, 0.25390124320983887, 0.2296675145626068, 0.4567762315273285, 0.8266952633857727, -0.6444002389907837, -0.49349918961524963, -0.7657128572463989, 0.5366367101669312, -0.27508819103240967, -0.46153566241264343, 0.990521252155304, 0.46436119079589844, 0.909778892993927, -0.10694577544927597, 0.8231215476989746, -0.4372081756591797, 0.8537164330482483, -0.1799813061952591, 0.5332403182983398, -0.5794742703437805, -0.040784358978271484, -0.6779076457023621, -0.804352879524231, -0.5455235242843628, 0.9242672920227051, -0.7640858292579651, 0.01875787042081356, 0.7782718539237976, 0.9478214383125305, 0.20852063596248627, -0.18286412954330444, 0.04193899407982826, 0.557951807975769, 0.25100386142730713, 0.47600093483924866, 0.6473943591117859, -0.47740745544433594, 0.5291604399681091, -0.39694759249687195, -0.3118767738342285, -0.07082311809062958, -0.8465758562088013, -0.9764928817749023, -0.6844329833984375, -0.4513316750526428, -0.6051937937736511, -0.09048419445753098, 0.9297555685043335, 0.3420734107494354, -0.9727540016174316, -0.46779799461364746, -0.02095947414636612, 0.11166688799858093, 0.14654062688350677, -0.2558644711971283, 0.33742740750312805, -0.29243266582489014, -1.0366474390029907, 0.18468831479549408, 0.10696064680814743, 0.022973958402872086, 0.047239601612091064, -0.08138573169708252, -0.4213489294052124, 0.10151031613349915, 0.6156736016273499, 0.46219542622566223, -0.66109299659729, -0.12669476866722107, 0.2039589285850525, -0.15555043518543243, 0.2708544433116913, 0.3681648373603821, -0.6207864284515381, 0.1244361400604248, 0.5455479025840759, 0.4200993776321411, 0.5337218046188354, -0.1202152892947197, 0.2608860731124878, -0.7027936577796936, 0.3511974811553955, 0.44451722502708435, 0.32770001888275146, 0.4222753643989563, -0.10382115095853806, 0.517548143863678, 0.15840506553649902, -0.38929668068885803, -0.866979718208313, -0.022557809948921204, -1.1987191438674927, -0.04947414621710777, 1.2167233228683472, -0.04809650033712387, -0.45613211393356323, 0.15351112186908722, -0.19548620283603668, 0.33761531114578247, -0.697230875492096, 0.6901049017906189, 0.6294364929199219, -0.07369228452444077, -0.22360852360725403, -0.40451911091804504, 0.5106855034828186, 0.4895671308040619, -0.9886362552642822, -0.04237908497452736, 0.26180434226989746, 0.34279531240463257, 0.1545848250389099, 0.8618775606155396, -0.24466699361801147, 0.19782178103923798, -0.3559706509113312, 0.4429222047328949, 0.2530347406864166, -0.25556105375289917, -0.3146096169948578, -0.01589791290462017, -0.15947015583515167, -0.13894397020339966 ]
bert-large-uncased
null
"2022-11-14T21:36:14Z"
885,129
59
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "fill-mask", "en", "dataset:bookcorpus", "dataset:wikipedia", "arxiv:1810.04805", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:04Z"
--- language: en license: apache-2.0 datasets: - bookcorpus - wikipedia --- # BERT large model (uncased) Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in [this paper](https://arxiv.org/abs/1810.04805) and first released in [this repository](https://github.com/google-research/bert). This model is uncased: it does not make a difference between english and English. Disclaimer: The team releasing BERT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description BERT is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts 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 texts. More precisely, it was pretrained with two objectives: - Masked language modeling (MLM): taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence. - Next sentence prediction (NSP): the models concatenates two masked sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not. This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the BERT model as inputs. This model has the following configuration: - 24-layer - 1024 hidden dimension - 16 attention heads - 336M parameters. ## Intended uses & limitations You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?filter=bert) to look for fine-tuned versions on a task that interests you. Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2. ### How to use You can use this model directly with a pipeline for masked language modeling: ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='bert-large-uncased') >>> unmasker("Hello I'm a [MASK] model.") [{'sequence': "[CLS] hello i'm a fashion model. [SEP]", 'score': 0.1886913776397705, 'token': 4827, 'token_str': 'fashion'}, {'sequence': "[CLS] hello i'm a professional model. [SEP]", 'score': 0.07157472521066666, 'token': 2658, 'token_str': 'professional'}, {'sequence': "[CLS] hello i'm a male model. [SEP]", 'score': 0.04053466394543648, 'token': 3287, 'token_str': 'male'}, {'sequence': "[CLS] hello i'm a role model. [SEP]", 'score': 0.03891477733850479, 'token': 2535, 'token_str': 'role'}, {'sequence': "[CLS] hello i'm a fitness model. [SEP]", 'score': 0.03038121573626995, 'token': 10516, 'token_str': 'fitness'}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('bert-large-uncased') model = BertModel.from_pretrained("bert-large-uncased") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` and in TensorFlow: ```python from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('bert-large-uncased') model = TFBertModel.from_pretrained("bert-large-uncased") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions: ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='bert-large-uncased') >>> unmasker("The man worked as a [MASK].") [{'sequence': '[CLS] the man worked as a bartender. [SEP]', 'score': 0.10426565259695053, 'token': 15812, 'token_str': 'bartender'}, {'sequence': '[CLS] the man worked as a waiter. [SEP]', 'score': 0.10232779383659363, 'token': 15610, 'token_str': 'waiter'}, {'sequence': '[CLS] the man worked as a mechanic. [SEP]', 'score': 0.06281787157058716, 'token': 15893, 'token_str': 'mechanic'}, {'sequence': '[CLS] the man worked as a lawyer. [SEP]', 'score': 0.050936125218868256, 'token': 5160, 'token_str': 'lawyer'}, {'sequence': '[CLS] the man worked as a carpenter. [SEP]', 'score': 0.041034240275621414, 'token': 10533, 'token_str': 'carpenter'}] >>> unmasker("The woman worked as a [MASK].") [{'sequence': '[CLS] the woman worked as a waitress. [SEP]', 'score': 0.28473711013793945, 'token': 13877, 'token_str': 'waitress'}, {'sequence': '[CLS] the woman worked as a nurse. [SEP]', 'score': 0.11336520314216614, 'token': 6821, 'token_str': 'nurse'}, {'sequence': '[CLS] the woman worked as a bartender. [SEP]', 'score': 0.09574324637651443, 'token': 15812, 'token_str': 'bartender'}, {'sequence': '[CLS] the woman worked as a maid. [SEP]', 'score': 0.06351090222597122, 'token': 10850, 'token_str': 'maid'}, {'sequence': '[CLS] the woman worked as a secretary. [SEP]', 'score': 0.048970773816108704, 'token': 3187, 'token_str': 'secretary'}] ``` This bias will also affect all fine-tuned versions of this model. ## Training data The BERT model was pretrained on [BookCorpus](https://yknzhu.wixsite.com/mbweb), a dataset consisting of 11,038 unpublished books and [English Wikipedia](https://en.wikipedia.org/wiki/English_Wikipedia) (excluding lists, tables and headers). ## Training procedure ### Preprocessing The texts are lowercased and tokenized using WordPiece and a vocabulary size of 30,000. The inputs of the model are then of the form: ``` [CLS] Sentence A [SEP] Sentence B [SEP] ``` With probability 0.5, sentence A and sentence B correspond to two consecutive sentences in the original corpus and in the other cases, it's another random sentence in the corpus. Note that what is considered a sentence here is a consecutive span of text usually longer than a single sentence. The only constrain is that the result with the two "sentences" has a combined length of less than 512 tokens. The details of the masking procedure for each sentence are the following: - 15% of the tokens are masked. - In 80% of the cases, the masked tokens are replaced by `[MASK]`. - In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace. - In the 10% remaining cases, the masked tokens are left as is. ### Pretraining The model was trained on 4 cloud TPUs in Pod configuration (16 TPU chips total) for one million steps with a batch size of 256. The sequence length was limited to 128 tokens for 90% of the steps and 512 for the remaining 10%. The optimizer used is Adam with a learning rate of 1e-4, \\(\beta_{1} = 0.9\\) and \\(\beta_{2} = 0.999\\), a weight decay of 0.01, learning rate warmup for 10,000 steps and linear decay of the learning rate after. ## Evaluation results When fine-tuned on downstream tasks, this model achieves the following results: Model | SQUAD 1.1 F1/EM | Multi NLI Accuracy ---------------------------------------- | :-------------: | :----------------: BERT-Large, Uncased (Original) | 91.0/84.3 | 86.05 ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-1810-04805, author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding}, journal = {CoRR}, volume = {abs/1810.04805}, year = {2018}, url = {http://arxiv.org/abs/1810.04805}, archivePrefix = {arXiv}, eprint = {1810.04805}, timestamp = {Tue, 30 Oct 2018 20:39:56 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.11083144694566727, -0.600001871585846, 0.2230243980884552, 0.29677480459213257, -0.5701693296432495, 0.056786149740219116, -0.06332891434431076, -0.20185717940330505, 0.41841062903404236, 0.5292157530784607, -0.5953862071037292, -0.42482513189315796, -0.7989881038665771, 0.188163623213768, -0.5180359482765198, 1.1386131048202515, 0.2571853995323181, 0.3345372974872589, 0.07473334670066833, 0.19059127569198608, -0.4580825865268707, -0.7375758290290833, -0.8275620341300964, -0.2999100685119629, 0.4528895914554596, 0.3051831126213074, 0.5976865291595459, 0.5935338735580444, 0.4555981755256653, 0.40064406394958496, -0.06683261692523956, -0.10876551270484924, -0.34917712211608887, 0.1024060919880867, -0.03552623093128204, -0.5881059169769287, -0.36753514409065247, 0.16491955518722534, 0.5513511300086975, 0.8022879362106323, -0.0028862501494586468, 0.3327619731426239, -0.12042644619941711, 0.5953162908554077, -0.17609982192516327, 0.35440218448638916, -0.529722273349762, 0.12455032765865326, -0.2691132724285126, 0.1267574578523636, -0.370034784078598, -0.19672228395938873, 0.1438559591770172, -0.5598239302635193, 0.21944889426231384, 0.23505055904388428, 1.0570967197418213, 0.154022678732872, -0.19718021154403687, -0.10406358540058136, -0.47011154890060425, 0.7527584433555603, -0.7076246738433838, 0.16034582257270813, 0.5197639465332031, 0.2553270757198334, -0.2257208377122879, -1.0043236017227173, -0.3720757067203522, -0.05337922275066376, -0.07519026845693588, 0.026432136073708534, -0.011452602222561836, -0.081646628677845, 0.3396003544330597, 0.37806957960128784, -0.3180696666240692, 0.06584767252206802, -0.7494530081748962, -0.3221133053302765, 0.6930462718009949, 0.16188651323318481, 0.16967126727104187, -0.3385026156902313, -0.3346027135848999, -0.31595903635025024, -0.2829258441925049, 0.1184607744216919, 0.6034445762634277, 0.4466908872127533, -0.18378330767154694, 0.8183402419090271, -0.17605191469192505, 0.5782236456871033, 0.037798140197992325, -0.010529540479183197, 0.4583215117454529, -0.12676648795604706, -0.3844324052333832, 0.04303079843521118, 0.9698812961578369, 0.24415573477745056, 0.42928165197372437, -0.05852000415325165, -0.3743894398212433, -0.012194073759019375, 0.37936797738075256, -0.6158772110939026, -0.3234046399593353, 0.15822754800319672, -0.5293765068054199, -0.4610171616077423, 0.49632638692855835, -0.6711885333061218, -0.11192668974399567, -0.08044760674238205, 0.5983749628067017, -0.32907044887542725, -0.08190319687128067, 0.15041637420654297, -0.5664725303649902, 0.14546222984790802, 0.0523906908929348, -0.896631121635437, 0.22360646724700928, 0.6803276538848877, 0.8517917990684509, 0.3364146947860718, -0.1073310524225235, -0.43443793058395386, -0.21263232827186584, -0.34941503405570984, 0.43173491954803467, -0.29463478922843933, -0.4775775969028473, 0.030347466468811035, 0.2921789884567261, -0.08221692591905594, -0.2220262885093689, 0.6637806296348572, -0.5123202204704285, 0.5412161946296692, -0.03005247190594673, -0.573660671710968, -0.23858852684497833, 0.031511805951595306, -0.7416247129440308, 1.1811718940734863, 0.31817686557769775, -0.7317793965339661, 0.34010061621665955, -0.9492692947387695, -0.5995886325836182, 0.20477595925331116, 0.11924432218074799, -0.48930805921554565, 0.2057262510061264, 0.12140673398971558, 0.45455577969551086, -0.07789699733257294, 0.3440355956554413, -0.24324250221252441, -0.4561467468738556, 0.4404810965061188, -0.2211102843284607, 1.0296992063522339, 0.1756303906440735, -0.3241958022117615, 0.18947765231132507, -0.795225203037262, -0.028135323897004128, 0.22190991044044495, -0.38835152983665466, -0.15678010880947113, -0.09693015366792679, 0.32870936393737793, 0.1783800572156906, 0.4080515503883362, -0.6690611243247986, 0.2888433039188385, -0.602299153804779, 0.7080516219139099, 0.8714033365249634, -0.0771217867732048, 0.24893033504486084, -0.38183924555778503, 0.5190622806549072, -0.06969565153121948, -0.05294717103242874, -0.13474330306053162, -0.7662724852561951, -0.6926930546760559, -0.3890150189399719, 0.5971565842628479, 0.7078937292098999, -0.5169645547866821, 0.8269504904747009, -0.03324805945158005, -0.5930163264274597, -0.6230929493904114, -0.10453759133815765, 0.31286707520484924, 0.4321885108947754, 0.31366977095603943, -0.46346163749694824, -0.8802337050437927, -0.8063798546791077, -0.29271581768989563, -0.17863482236862183, -0.2731180489063263, 0.07884019613265991, 0.7615218162536621, -0.2947408854961395, 0.8200998306274414, -0.7372415661811829, -0.44506165385246277, -0.17581535875797272, 0.2622639834880829, 0.6691992878913879, 0.7368856072425842, 0.35924962162971497, -0.5622968077659607, -0.3524022400379181, -0.43393272161483765, -0.5610306859016418, 0.026469815522432327, -0.019680848345160484, -0.1526462584733963, 0.12176476418972015, 0.5715329647064209, -0.7665789723396301, 0.5549405813217163, 0.23987439274787903, -0.5798846483230591, 0.7182891964912415, -0.38433638215065, -0.09918174147605896, -1.2668497562408447, 0.19704216718673706, -0.12671659886837006, -0.3588927984237671, -0.6938610672950745, -0.027817517518997192, -0.1608787178993225, -0.14110775291919708, -0.5057307481765747, 0.5526856780052185, -0.4263956844806671, -0.03612280637025833, 0.04017851874232292, -0.17311252653598785, 0.013614879921078682, 0.43412965536117554, 0.01826140470802784, 0.592965304851532, 0.5513020753860474, -0.55103600025177, 0.5511535406112671, 0.44043973088264465, -0.6074099540710449, 0.15307851135730743, -0.8563846349716187, 0.23577278852462769, 0.03768152743577957, 0.0732598677277565, -1.1700321435928345, -0.3696068525314331, 0.24706776440143585, -0.5736808776855469, 0.23313674330711365, -0.054167699068784714, -0.8022838234901428, -0.6611310839653015, -0.287826806306839, 0.4572630524635315, 0.5686241984367371, -0.23946340382099152, 0.40989959239959717, 0.333556592464447, -0.0957237035036087, -0.6429699063301086, -0.7240181565284729, 0.11768385767936707, -0.20582176744937897, -0.49966195225715637, 0.3709944486618042, -0.018748784437775612, -0.11722884327173233, -0.20976455509662628, 0.049539193511009216, -0.15143615007400513, 0.08396179974079132, 0.27858656644821167, 0.4403776526451111, -0.15132257342338562, -0.05084262415766716, -0.21481429040431976, -0.11656900495290756, 0.3074667155742645, -0.22770290076732635, 0.8335635662078857, 0.019838247448205948, -0.05580616742372513, -0.3690776228904724, 0.3156343400478363, 0.6396710276603699, -0.07569336146116257, 0.8045588135719299, 0.868872880935669, -0.5642260909080505, 0.07915046811103821, -0.3398754894733429, -0.20519670844078064, -0.5147223472595215, 0.5507010817527771, -0.4547775387763977, -0.8477009534835815, 0.772581934928894, 0.3162376582622528, -0.16033142805099487, 0.7377864122390747, 0.5618537068367004, -0.21391569077968597, 1.0111603736877441, 0.47500789165496826, -0.14582189917564392, 0.5100637674331665, -0.1026846244931221, 0.33531907200813293, -0.725263774394989, -0.4968782067298889, -0.4869503974914551, -0.31838977336883545, -0.4935923218727112, -0.18758155405521393, 0.2743801772594452, 0.230216383934021, -0.4860277771949768, 0.6145896315574646, -0.6233617663383484, 0.33337244391441345, 0.9956967830657959, 0.3768429160118103, -0.23969481885433197, -0.2508533298969269, -0.23566842079162598, 0.06109675019979477, -0.45729008316993713, -0.3336485028266907, 1.1404201984405518, 0.5706362724304199, 0.7178247570991516, 0.07009552419185638, 0.6485599875450134, 0.35622626543045044, -0.07859070599079132, -0.6852424144744873, 0.6169305443763733, -0.342159241437912, -0.9442735910415649, -0.43650493025779724, -0.1467481255531311, -1.093017816543579, 0.1058313250541687, -0.3722354769706726, -0.8919305205345154, -0.07500404864549637, -0.1763535588979721, -0.34699487686157227, 0.19414745271205902, -0.6957106590270996, 1.080414891242981, -0.2931385934352875, -0.10907144844532013, 0.0940658301115036, -0.9904041290283203, 0.26409703493118286, -0.04508040100336075, 0.12171151489019394, -0.09354608505964279, 0.19639556109905243, 1.12933349609375, -0.5849384069442749, 1.035170316696167, -0.24579128623008728, 0.22018195688724518, 0.04889942333102226, -0.07031203806400299, 0.348466157913208, 0.050401151180267334, 0.08117393404245377, 0.2912448048591614, 0.06568095088005066, -0.4824243187904358, -0.10327712446451187, 0.28719013929367065, -0.7827817797660828, -0.48941245675086975, -0.6330153942108154, -0.6390179991722107, 0.14508482813835144, 0.4585387110710144, 0.5718738436698914, 0.5150129199028015, -0.16014814376831055, 0.3358602225780487, 0.47462502121925354, -0.2907303273677826, 0.7574814558029175, 0.2649269998073578, -0.2189783900976181, -0.5450534820556641, 0.5161408185958862, -0.016342705115675926, 0.012148804031312466, 0.5089731812477112, 0.19663511216640472, -0.6759272813796997, -0.16045871376991272, -0.326387882232666, 0.14474883675575256, -0.5784931778907776, -0.3326523005962372, -0.5494949221611023, -0.43789398670196533, -0.6748216152191162, -0.05521782487630844, -0.16294246912002563, -0.5151686072349548, -0.670635461807251, -0.1794741004705429, 0.47983869910240173, 0.6803299784660339, -0.12294848263263702, 0.5256215333938599, -0.7496591806411743, 0.25280869007110596, 0.28793948888778687, 0.4173455536365509, -0.2939678430557251, -0.7865672707557678, -0.33087971806526184, -0.021318314597010612, -0.08904270827770233, -0.8639904856681824, 0.6554784178733826, 0.22673262655735016, 0.497959166765213, 0.5708670020103455, -0.018244922161102295, 0.6161560416221619, -0.6363806128501892, 0.961746871471405, 0.24549739062786102, -1.1003038883209229, 0.5469310283660889, -0.34646743535995483, 0.2427143007516861, 0.4029378592967987, 0.22106307744979858, -0.4741937220096588, -0.37637999653816223, -0.874828577041626, -0.982935905456543, 0.8290156126022339, 0.18803077936172485, 0.3086070120334625, -0.05854809284210205, 0.27096712589263916, 0.09198836982250214, 0.45315656065940857, -0.9619598388671875, -0.4655008316040039, -0.48089882731437683, -0.36857396364212036, -0.22562932968139648, -0.25483494997024536, -0.07777120918035507, -0.5665062069892883, 0.6772050857543945, 0.1573660671710968, 0.6005668044090271, 0.07835640758275986, -0.11137987673282623, 0.10521705448627472, 0.16643348336219788, 0.8097989559173584, 0.483471542596817, -0.551017701625824, 0.004384505096822977, -0.029902400448918343, -0.61972975730896, 0.061266884207725525, 0.20021887123584747, 0.046528592705726624, 0.23811782896518707, 0.5854145884513855, 0.8278853297233582, 0.25614744424819946, -0.5301390886306763, 0.616835355758667, 0.15692020952701569, -0.33918997645378113, -0.6138048768043518, 0.11910697817802429, -0.04697199538350105, 0.157441183924675, 0.5138407945632935, 0.20614051818847656, 0.03541786968708038, -0.5909909009933472, 0.4204375147819519, 0.39279448986053467, -0.4970031678676605, -0.22162970900535583, 0.9930636882781982, 0.04768025875091553, -0.7417120337486267, 0.8088365793228149, -0.166381374001503, -0.7571322917938232, 0.7423489689826965, 0.6747763752937317, 0.9357434511184692, -0.19872549176216125, 0.19960033893585205, 0.4967270791530609, 0.35350608825683594, -0.351900190114975, 0.3612532615661621, 0.307007372379303, -0.8034583926200867, -0.334053099155426, -0.762407124042511, -0.12409473955631256, 0.18596498668193817, -0.8325932621955872, 0.29196104407310486, -0.507042646408081, -0.2826807498931885, 0.18183958530426025, 0.005674712359905243, -0.7227246761322021, 0.450073778629303, -0.01831480860710144, 1.0803035497665405, -1.0396236181259155, 0.9740461707115173, 0.7530551552772522, -0.6579495668411255, -0.8709858059883118, -0.42322614789009094, -0.31562507152557373, -1.121482253074646, 0.7582138776779175, 0.37942901253700256, 0.3578648865222931, -0.023082805797457695, -0.612242579460144, -0.6629851460456848, 0.8618121147155762, 0.13230392336845398, -0.5014070272445679, -0.16603466868400574, 0.07365021109580994, 0.5766898393630981, -0.5472517013549805, 0.41077595949172974, 0.5123931765556335, 0.4415297508239746, -0.06563791632652283, -0.8110140562057495, 0.07747387140989304, -0.3705067038536072, 0.0036733984015882015, 0.10798679292201996, -0.40401196479797363, 1.1684898138046265, -0.12575440108776093, 0.11073754727840424, 0.23140273988246918, 0.5060708522796631, -0.0036754196044057608, 0.11816483736038208, 0.5131165385246277, 0.6237154603004456, 0.772125244140625, -0.32833486795425415, 0.8146359920501709, -0.2166043370962143, 0.49855074286460876, 0.8468919992446899, 0.07827435433864594, 0.8191327452659607, 0.41951218247413635, -0.2723052501678467, 0.9168326258659363, 0.8934224843978882, -0.3723926544189453, 0.770298957824707, 0.2629346251487732, -0.05202922597527504, -0.07562697678804398, 0.1725042462348938, -0.2779802680015564, 0.5557679533958435, 0.2429817020893097, -0.6019793748855591, 0.1119198128581047, -0.07454231381416321, 0.14890336990356445, -0.17875713109970093, -0.5163671374320984, 0.7382121682167053, 0.17013630270957947, -0.701492965221405, 0.28125229477882385, 0.2450801581144333, 0.6403665542602539, -0.5738281011581421, 0.04969138279557228, -0.030688071623444557, 0.2163984477519989, -0.07387803494930267, -0.8866256475448608, 0.19386900961399078, -0.15967637300491333, -0.3884933888912201, -0.22277893126010895, 0.7332935333251953, -0.4516293406486511, -0.672520637512207, 0.005829076748341322, 0.2703405022621155, 0.3400874137878418, -0.17389914393424988, -0.7724632024765015, -0.2861246168613434, 0.006281733978539705, -0.0904187262058258, 0.1570391207933426, 0.3571893274784088, 0.0995236337184906, 0.5547579526901245, 0.8068035244941711, -0.1230069100856781, 0.08235178142786026, 0.03768017888069153, 0.7081582546234131, -0.9956521987915039, -0.8749206066131592, -1.005316972732544, 0.575687825679779, -0.13060703873634338, -0.5681353211402893, 0.6110520362854004, 0.7419713139533997, 0.6614000201225281, -0.46947604417800903, 0.4699403643608093, -0.16279523074626923, 0.5005019903182983, -0.4344574511051178, 0.771001935005188, -0.35699087381362915, -0.009041677229106426, -0.38872259855270386, -0.8383608460426331, -0.3148193955421448, 0.8496439456939697, -0.058706626296043396, 0.011327332817018032, 0.7147406339645386, 0.5850862264633179, 0.09466181695461273, -0.1348114162683487, 0.14486297965049744, 0.15454430878162384, 0.08445476740598679, 0.40866219997406006, 0.5130389332771301, -0.6158152222633362, 0.3949466943740845, -0.10326361656188965, -0.04792558774352074, -0.39013025164604187, -0.8999413251876831, -1.079015851020813, -0.5842046737670898, -0.2159368246793747, -0.6504681706428528, -0.21132305264472961, 0.9759365320205688, 0.757696807384491, -0.8965854644775391, -0.2759976387023926, -0.09726480394601822, 0.0484297052025795, -0.3103700578212738, -0.28331610560417175, 0.4629081189632416, -0.23402924835681915, -0.7187055349349976, 0.26113033294677734, -0.04235672205686569, 0.08929440379142761, -0.1694473773241043, 0.07785583287477493, -0.40526053309440613, 0.056533873081207275, 0.5216603875160217, 0.11577749252319336, -0.7491231560707092, -0.5271585583686829, 0.03618118539452553, -0.1604868322610855, 0.1328020691871643, 0.46713340282440186, -0.5432512164115906, 0.40168002247810364, 0.41094347834587097, 0.4489309787750244, 0.7396488189697266, 0.1586291790008545, 0.6628763675689697, -1.1930972337722778, 0.3122006356716156, 0.20220594108104706, 0.5091834664344788, 0.3239399492740631, -0.48021742701530457, 0.5418593883514404, 0.5007978677749634, -0.4936683177947998, -0.86067134141922, -0.05812541022896767, -1.0344270467758179, -0.2915390133857727, 0.864251971244812, -0.13393501937389374, -0.32141903042793274, -0.10305634140968323, -0.32823488116264343, 0.43916141986846924, -0.4318903088569641, 0.7685295939445496, 0.8753512501716614, 0.07305830717086792, -0.09559699892997742, -0.3880612552165985, 0.39933839440345764, 0.3758203685283661, -0.4473845958709717, -0.47625014185905457, 0.11274480819702148, 0.4742966890335083, 0.22030849754810333, 0.5584400296211243, -0.04366619884967804, 0.13515423238277435, 0.21822448074817657, 0.18555860221385956, -0.11719268560409546, -0.13317319750785828, -0.29503926634788513, 0.1610179990530014, -0.12251188606023788, -0.7324944734573364 ]
stabilityai/stable-diffusion-2-1-base
stabilityai
"2023-07-05T16:19:20Z"
858,961
517
diffusers
[ "diffusers", "stable-diffusion", "text-to-image", "arxiv:2112.10752", "arxiv:2202.00512", "arxiv:1910.09700", "license:openrail++", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2022-12-06T17:25:36Z"
--- license: openrail++ tags: - stable-diffusion - text-to-image --- # Stable Diffusion v2-1-base Model Card This model card focuses on the model associated with the Stable Diffusion v2-1-base model. This `stable-diffusion-2-1-base` model fine-tunes [stable-diffusion-2-base](https://huggingface.co/stabilityai/stable-diffusion-2-base) (`512-base-ema.ckpt`) with 220k extra steps taken, with `punsafe=0.98` on the same dataset. - Use it with the [`stablediffusion`](https://github.com/Stability-AI/stablediffusion) repository: download the `v2-1_512-ema-pruned.ckpt` [here](https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt). - Use it with 🧨 [`diffusers`](#examples) ## Model Details - **Developed by:** Robin Rombach, Patrick Esser - **Model type:** Diffusion-based text-to-image generation model - **Language(s):** English - **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/LICENSE-MODEL) - **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses a fixed, pretrained text encoder ([OpenCLIP-ViT/H](https://github.com/mlfoundations/open_clip)). - **Resources for more information:** [GitHub Repository](https://github.com/Stability-AI/). - **Cite as:** @InProceedings{Rombach_2022_CVPR, author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn}, title = {High-Resolution Image Synthesis With Latent Diffusion Models}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2022}, pages = {10684-10695} } ## Examples Using the [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Stable Diffusion 2 in a simple and efficient manner. ```bash pip install diffusers transformers accelerate scipy safetensors ``` Running the pipeline (if you don't swap the scheduler it will run with the default PNDM/PLMS scheduler, in this example we are swapping it to EulerDiscreteScheduler): ```python from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler import torch model_id = "stabilityai/stable-diffusion-2-1-base" scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler") pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16) pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" image = pipe(prompt).images[0] image.save("astronaut_rides_horse.png") ``` **Notes**: - Despite not being a dependency, we highly recommend you to install [xformers](https://github.com/facebookresearch/xformers) for memory efficient attention (better performance) - If you have low GPU RAM available, make sure to add a `pipe.enable_attention_slicing()` after sending it to `cuda` for less VRAM usage (to the cost of speed) # Uses ## Direct Use The model is intended for research purposes only. Possible research areas and tasks include - Safe deployment of models which have the potential to generate harmful content. - Probing and understanding the limitations and biases of generative models. - Generation of artworks and use in design and other artistic processes. - Applications in educational or creative tools. - Research on generative models. Excluded uses are described below. ### Misuse, Malicious Use, and Out-of-Scope Use _Note: This section is originally taken from the [DALLE-MINI model card](https://huggingface.co/dalle-mini/dalle-mini), was used for Stable Diffusion v1, but applies in the same way to Stable Diffusion v2_. The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes. #### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. #### Misuse and Malicious Use Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to: - Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc. - Intentionally promoting or propagating discriminatory content or harmful stereotypes. - Impersonating individuals without their consent. - Sexual content without consent of the people who might see it. - Mis- and disinformation - Representations of egregious violence and gore - Sharing of copyrighted or licensed material in violation of its terms of use. - Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use. ## Limitations and Bias ### Limitations - The model does not achieve perfect photorealism - The model cannot render legible text - The model does not perform well on more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere” - Faces and people in general may not be generated properly. - The model was trained mainly with English captions and will not work as well in other languages. - The autoencoding part of the model is lossy - The model was trained on a subset of the large-scale dataset [LAION-5B](https://laion.ai/blog/laion-5b/), which contains adult, violent and sexual content. To partially mitigate this, we have filtered the dataset using LAION's NFSW detector (see Training section). ### Bias While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. Stable Diffusion vw was primarily trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/), which consists of images that are limited to English descriptions. Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as white and western cultures are often set as the default. Further, the ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts. Stable Diffusion v2 mirrors and exacerbates biases to such a degree that viewer discretion must be advised irrespective of the input or its intent. ## Training **Training Data** The model developers used the following dataset for training the model: - LAION-5B and subsets (details below). The training data is further filtered using LAION's NSFW detector, with a "p_unsafe" score of 0.1 (conservative). For more details, please refer to LAION-5B's [NeurIPS 2022](https://openreview.net/forum?id=M3Y74vmsMcY) paper and reviewer discussions on the topic. **Training Procedure** Stable Diffusion v2 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training, - Images are encoded through an encoder, which turns images into latent representations. The autoencoder uses a relative downsampling factor of 8 and maps images of shape H x W x 3 to latents of shape H/f x W/f x 4 - Text prompts are encoded through the OpenCLIP-ViT/H text-encoder. - The output of the text encoder is fed into the UNet backbone of the latent diffusion model via cross-attention. - The loss is a reconstruction objective between the noise that was added to the latent and the prediction made by the UNet. We also use the so-called _v-objective_, see https://arxiv.org/abs/2202.00512. We currently provide the following checkpoints, for various versions: ### Version 2.1 - `512-base-ema.ckpt`: Fine-tuned on `512-base-ema.ckpt` 2.0 with 220k extra steps taken, with `punsafe=0.98` on the same dataset. - `768-v-ema.ckpt`: Resumed from `768-v-ema.ckpt` 2.0 with an additional 55k steps on the same dataset (`punsafe=0.1`), and then fine-tuned for another 155k extra steps with `punsafe=0.98`. ### Version 2.0 - `512-base-ema.ckpt`: 550k steps at resolution `256x256` on a subset of [LAION-5B](https://laion.ai/blog/laion-5b/) filtered for explicit pornographic material, using the [LAION-NSFW classifier](https://github.com/LAION-AI/CLIP-based-NSFW-Detector) with `punsafe=0.1` and an [aesthetic score](https://github.com/christophschuhmann/improved-aesthetic-predictor) >= `4.5`. 850k steps at resolution `512x512` on the same dataset with resolution `>= 512x512`. - `768-v-ema.ckpt`: Resumed from `512-base-ema.ckpt` and trained for 150k steps using a [v-objective](https://arxiv.org/abs/2202.00512) on the same dataset. Resumed for another 140k steps on a `768x768` subset of our dataset. - `512-depth-ema.ckpt`: Resumed from `512-base-ema.ckpt` and finetuned for 200k steps. Added an extra input channel to process the (relative) depth prediction produced by [MiDaS](https://github.com/isl-org/MiDaS) (`dpt_hybrid`) which is used as an additional conditioning. The additional input channels of the U-Net which process this extra information were zero-initialized. - `512-inpainting-ema.ckpt`: Resumed from `512-base-ema.ckpt` and trained for another 200k steps. Follows the mask-generation strategy presented in [LAMA](https://github.com/saic-mdal/lama) which, in combination with the latent VAE representations of the masked image, are used as an additional conditioning. The additional input channels of the U-Net which process this extra information were zero-initialized. The same strategy was used to train the [1.5-inpainting checkpoint](https://github.com/saic-mdal/lama). - `x4-upscaling-ema.ckpt`: Trained for 1.25M steps on a 10M subset of LAION containing images `>2048x2048`. The model was trained on crops of size `512x512` and is a text-guided [latent upscaling diffusion model](https://arxiv.org/abs/2112.10752). In addition to the textual input, it receives a `noise_level` as an input parameter, which can be used to add noise to the low-resolution input according to a [predefined diffusion schedule](configs/stable-diffusion/x4-upscaling.yaml). - **Hardware:** 32 x 8 x A100 GPUs - **Optimizer:** AdamW - **Gradient Accumulations**: 1 - **Batch:** 32 x 8 x 2 x 4 = 2048 - **Learning rate:** warmup to 0.0001 for 10,000 steps and then kept constant ## Evaluation Results Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0) and 50 steps DDIM sampling steps show the relative improvements of the checkpoints: ![pareto](https://huggingface.co/stabilityai/stable-diffusion-2/resolve/main/model-variants.jpg) Evaluated using 50 DDIM steps and 10000 random prompts from the COCO2017 validation set, evaluated at 512x512 resolution. Not optimized for FID scores. ## Environmental Impact **Stable Diffusion v1** **Estimated Emissions** Based on that information, we estimate the following CO2 emissions using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact. - **Hardware Type:** A100 PCIe 40GB - **Hours used:** 200000 - **Cloud Provider:** AWS - **Compute Region:** US-east - **Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid):** 15000 kg CO2 eq. ## Citation @InProceedings{Rombach_2022_CVPR, author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn}, title = {High-Resolution Image Synthesis With Latent Diffusion Models}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2022}, pages = {10684-10695} } *This model card was written by: Robin Rombach, Patrick Esser and David Ha and is based on the [Stable Diffusion v1](https://github.com/CompVis/stable-diffusion/blob/main/Stable_Diffusion_v1_Model_Card.md) and [DALL-E Mini model card](https://huggingface.co/dalle-mini/dalle-mini).*
[ -0.3754860758781433, -0.8066439628601074, 0.30641844868659973, 0.17740197479724884, -0.21629604697227478, -0.39250361919403076, 0.08393412083387375, -0.3843398094177246, -0.09564672410488129, 0.40317171812057495, -0.3951452672481537, -0.39564889669418335, -0.6944004893302917, -0.1496431529521942, -0.36013364791870117, 0.8897152543067932, -0.12384302169084549, 0.014056053012609482, -0.1334386020898819, -0.07260093092918396, -0.3276032507419586, -0.1915588676929474, -0.9680115580558777, -0.2596530318260193, 0.4611002504825592, 0.08934970200061798, 0.634412944316864, 0.5169585347175598, 0.450626015663147, 0.247385635972023, -0.27003422379493713, -0.01665683276951313, -0.693196713924408, -0.022985050454735756, -0.045362409204244614, -0.25202491879463196, -0.5056608319282532, 0.12187794595956802, 0.5571829080581665, 0.27601301670074463, -0.08438543975353241, 0.04383983090519905, -0.003752907272428274, 0.5558581352233887, -0.5587034225463867, -0.12307733297348022, -0.30322444438934326, 0.18692219257354736, -0.16240963339805603, 0.18923871219158173, -0.40390393137931824, -0.11533103138208389, 0.14144188165664673, -0.7269470691680908, 0.36038291454315186, -0.2670186161994934, 1.000659704208374, 0.4122951328754425, -0.33643925189971924, -0.07015004754066467, -0.6872804164886475, 0.5541279315948486, -0.5383495092391968, 0.3107379078865051, 0.3552558720111847, 0.07300872355699539, -0.005322067998349667, -0.9183018207550049, -0.546071469783783, -0.06384868174791336, 0.04666244238615036, 0.44450142979621887, -0.40069779753685, -0.04889030009508133, 0.43943050503730774, 0.15939319133758545, -0.6099778413772583, 0.013875761069357395, -0.5372858047485352, -0.06285979598760605, 0.5540878772735596, 0.12402430176734924, 0.2588450312614441, -0.15868103504180908, -0.3659912645816803, -0.0887681245803833, -0.5597438216209412, -0.010866488330066204, 0.3618181347846985, -0.31808778643608093, -0.4097139239311218, 0.4229402244091034, 0.08522162586450577, 0.4600358307361603, 0.28125905990600586, -0.09459009766578674, 0.3309071958065033, -0.21724912524223328, -0.23333168029785156, -0.4316379129886627, 0.7826424241065979, 0.6103060245513916, -0.04307321831583977, 0.08469950407743454, -0.06173836067318916, 0.2098345011472702, 0.04120146110653877, -1.1510298252105713, -0.4680863320827484, 0.14370515942573547, -0.6648397445678711, -0.4891728460788727, -0.1183295026421547, -0.9166889786720276, -0.18159207701683044, 0.14359523355960846, 0.4536879062652588, -0.3526207208633423, -0.42917776107788086, -0.025756100192666054, -0.3606579005718231, 0.21233996748924255, 0.44198498129844666, -0.680965781211853, 0.13597604632377625, 0.03664465621113777, 1.070146083831787, -0.3715318739414215, -0.049142416566610336, -0.15165312588214874, 0.15574245154857635, -0.22931796312332153, 0.6540887355804443, -0.30888012051582336, -0.5002380609512329, -0.21215642988681793, 0.3529949486255646, 0.0622410923242569, -0.47013866901397705, 0.5652812719345093, -0.4357506036758423, 0.33906593918800354, -0.07503814250230789, -0.4059368968009949, -0.21694040298461914, -0.006089371629059315, -0.7017332315444946, 1.0357229709625244, 0.21746014058589935, -0.8630624413490295, 0.133282870054245, -0.7301796078681946, -0.252520889043808, -0.14582493901252747, 0.06038994342088699, -0.6280152201652527, -0.15321961045265198, 0.09896918386220932, 0.4140726625919342, -0.12414192408323288, 0.20102722942829132, -0.23660387098789215, -0.21557004749774933, -0.06911639124155045, -0.5942876935005188, 0.9834626913070679, 0.3635790944099426, -0.4020545780658722, 0.049080416560173035, -0.5646798014640808, -0.33365198969841003, 0.48899656534194946, -0.19179615378379822, -0.15157322585582733, -0.13836869597434998, 0.318681925535202, 0.3341091573238373, 0.06584016978740692, -0.40722042322158813, -0.02577821910381317, -0.2863360047340393, 0.5407471656799316, 0.7120638489723206, 0.21531936526298523, 0.657052218914032, -0.42868882417678833, 0.5050697326660156, 0.3108418583869934, 0.30337780714035034, -0.16489386558532715, -0.8207908272743225, -0.6758893132209778, -0.18168672919273376, 0.17181716859340668, 0.5361605882644653, -0.6790136098861694, 0.22121605277061462, 0.057800691574811935, -0.6665746569633484, -0.18493719398975372, -0.0737113505601883, 0.2499237060546875, 0.6288663148880005, 0.29789409041404724, -0.39133504033088684, -0.3462246358394623, -0.6718896627426147, 0.33436423540115356, -0.054665982723236084, 0.14223897457122803, 0.23610572516918182, 0.6389124393463135, -0.3693934977054596, 0.5476880669593811, -0.5412081480026245, -0.28931477665901184, 0.06986642628908157, 0.1333085000514984, -0.02650439366698265, 0.6745128035545349, 0.7894800305366516, -0.95416259765625, -0.6090940237045288, -0.2685326039791107, -0.7802731990814209, -0.0015018563717603683, 0.002462598728016019, -0.31938979029655457, 0.42743054032325745, 0.48629045486450195, -0.7132422924041748, 0.5995189547538757, 0.6022732853889465, -0.3387334942817688, 0.372652530670166, -0.32108014822006226, -0.014819914475083351, -1.0068401098251343, 0.1263604313135147, 0.27874860167503357, -0.299956351518631, -0.5678804516792297, -0.01598203554749489, -0.06861133873462677, -0.15487685799598694, -0.6011582016944885, 0.764880359172821, -0.38133499026298523, 0.3861965835094452, -0.35365036129951477, -0.029316505417227745, 0.13771140575408936, 0.3173007667064667, 0.32711637020111084, 0.59687340259552, 0.7885215878486633, -0.578173041343689, 0.123431496322155, 0.24018824100494385, -0.05602754279971123, 0.4992467164993286, -0.8218902945518494, 0.19693587720394135, -0.4161342978477478, 0.31705284118652344, -0.916983425617218, -0.17644815146923065, 0.6015180945396423, -0.3968227207660675, 0.36832913756370544, -0.21559050679206848, -0.37471863627433777, -0.3848314583301544, -0.18497031927108765, 0.4890807271003723, 0.9424799084663391, -0.3919604420661926, 0.5162133574485779, 0.47101953625679016, 0.15484338998794556, -0.42114177346229553, -0.6844927668571472, -0.15752412378787994, -0.3325929641723633, -0.80731201171875, 0.5724762082099915, -0.23805885016918182, -0.12195564061403275, 0.15132445096969604, 0.14249002933502197, 0.0007337602437473834, -0.06474833935499191, 0.4475785493850708, 0.20102524757385254, 0.027220679447054863, -0.1169983446598053, 0.18039250373840332, -0.21216140687465668, -0.019604548811912537, -0.13245075941085815, 0.40871569514274597, 0.16681700944900513, -0.12252101302146912, -0.603301465511322, 0.38997673988342285, 0.482660710811615, -0.018152600154280663, 0.731024444103241, 0.9849402904510498, -0.5800448060035706, -0.010204468853771687, -0.3702826201915741, -0.21086591482162476, -0.45699331164360046, 0.4091634154319763, -0.13992305099964142, -0.5800666809082031, 0.5750479698181152, 0.01921687461435795, 0.04921223223209381, 0.6871157288551331, 0.7849332690238953, -0.17765596508979797, 1.0961239337921143, 0.6446272134780884, 0.26857301592826843, 0.7112112045288086, -0.7452231645584106, -0.07327266037464142, -0.8390883207321167, -0.305889755487442, -0.18377375602722168, -0.19738633930683136, -0.3894162178039551, -0.6690446138381958, 0.3242902159690857, 0.13965487480163574, -0.19277754426002502, 0.18197676539421082, -0.5832791328430176, 0.31557461619377136, 0.30007997155189514, 0.19601033627986908, -0.010879093781113625, 0.16354809701442719, 0.11336971074342728, -0.1815086156129837, -0.7916991710662842, -0.5973678231239319, 1.0190373659133911, 0.5350218415260315, 0.8795107007026672, 0.02545919269323349, 0.4725235104560852, 0.4053541421890259, 0.4237583577632904, -0.4237625300884247, 0.45668676495552063, -0.37085509300231934, -0.6400142908096313, -0.12597724795341492, -0.21216735243797302, -0.8920320868492126, 0.1876247525215149, -0.17144036293029785, -0.45132750272750854, 0.4755631387233734, 0.16878244280815125, -0.2961374819278717, 0.3417140543460846, -0.734379768371582, 0.9920802116394043, -0.10849861800670624, -0.6459153294563293, -0.12350872904062271, -0.6339486837387085, 0.30212515592575073, 0.01613118126988411, 0.10017387568950653, -0.11172442883253098, -0.05891970172524452, 0.8934045433998108, -0.3129960894584656, 0.9212769865989685, -0.38812392950057983, 0.04519988223910332, 0.3726740777492523, -0.11412228643894196, 0.3917587697505951, 0.2181858867406845, -0.08075197041034698, 0.3672344386577606, 0.04484305903315544, -0.34721994400024414, -0.3072660565376282, 0.6757761836051941, -0.9755661487579346, -0.38204070925712585, -0.44668886065483093, -0.37882447242736816, 0.4959715008735657, 0.1503359079360962, 0.8138832449913025, 0.35301029682159424, -0.24191221594810486, -0.024162884801626205, 0.8419511914253235, -0.27526530623435974, 0.4011324644088745, 0.2205270677804947, -0.2503677308559418, -0.49002689123153687, 0.7335008382797241, 0.2266349345445633, 0.4521597623825073, -0.022513840347528458, 0.08685362339019775, -0.20154094696044922, -0.5036249160766602, -0.5486750602722168, 0.2657712996006012, -0.8318390846252441, -0.20523227751255035, -0.8414453268051147, -0.33442041277885437, -0.44176506996154785, -0.14812397956848145, -0.31223246455192566, -0.2715575098991394, -0.80431067943573, 0.06972502171993256, 0.2967345118522644, 0.549078106880188, -0.281551331281662, 0.38061317801475525, -0.39110440015792847, 0.39462947845458984, 0.14752830564975739, 0.14194315671920776, 0.02152874507009983, -0.7825028896331787, -0.1408752202987671, 0.07746733725070953, -0.6410741806030273, -0.9640488028526306, 0.3779587149620056, 0.08960255980491638, 0.5753329992294312, 0.5036674737930298, -0.047765206545591354, 0.49521198868751526, -0.3785634934902191, 0.9171174168586731, 0.19751381874084473, -0.6034574508666992, 0.6235564947128296, -0.38148757815361023, 0.14806826412677765, 0.20949670672416687, 0.5210509300231934, -0.2872791588306427, -0.3087809979915619, -0.7533971667289734, -0.8603372573852539, 0.6476224064826965, 0.4118539094924927, 0.32579076290130615, -0.10938459634780884, 0.5850095748901367, -0.03487187996506691, -0.11379586905241013, -1.0291630029678345, -0.5371922254562378, -0.3637712001800537, 0.010183245874941349, 0.12969519197940826, -0.3928285539150238, -0.16138195991516113, -0.4808123707771301, 0.9140077233314514, 0.08894827961921692, 0.5208109021186829, 0.39730122685432434, -0.06013274937868118, -0.3761659562587738, -0.3490857183933258, 0.5020601749420166, 0.383817583322525, -0.16892488300800323, -0.06669699400663376, 0.014497046358883381, -0.5282562971115112, 0.24070300161838531, 0.18702509999275208, -0.6667885184288025, 0.04475019872188568, -0.03393115475773811, 0.8754708170890808, -0.23773406445980072, -0.41180554032325745, 0.5951787829399109, -0.17131799459457397, -0.32665178179740906, -0.4416244924068451, 0.12112152576446533, 0.08364394307136536, 0.28391629457473755, 0.1089896559715271, 0.4483199715614319, 0.16385096311569214, -0.32184481620788574, 0.11257922649383545, 0.4374404847621918, -0.34798094630241394, -0.3235228359699249, 1.039893627166748, 0.1466294676065445, -0.3092889189720154, 0.5222991108894348, -0.46688878536224365, -0.2581714987754822, 0.6834808588027954, 0.717374324798584, 0.7976557612419128, -0.18111777305603027, 0.45673006772994995, 0.653519332408905, 0.3444640338420868, -0.2611708343029022, 0.18721602857112885, 0.24672271311283112, -0.7195628881454468, -0.09981930255889893, -0.413497656583786, -0.05009503290057182, 0.18260368704795837, -0.4266626238822937, 0.45709842443466187, -0.4846000671386719, -0.4268341660499573, -0.00442514568567276, -0.29049861431121826, -0.6170913577079773, 0.15875640511512756, 0.34635648131370544, 0.7964422106742859, -1.0454601049423218, 0.7802164554595947, 0.721856415271759, -0.6455022692680359, -0.4920133054256439, 0.033365651965141296, -0.10370204597711563, -0.3012576103210449, 0.5072321891784668, 0.15881498157978058, 0.05207955464720726, 0.11728990823030472, -0.7290601134300232, -0.8784754276275635, 1.2192023992538452, 0.36600926518440247, -0.2838543951511383, -0.06265341490507126, -0.2679711878299713, 0.5426453351974487, -0.46117791533470154, 0.2938978970050812, 0.2981555163860321, 0.3608647584915161, 0.33401283621788025, -0.4739879071712494, 0.1295015513896942, -0.36131298542022705, 0.2771538496017456, -0.09307712316513062, -0.8548879027366638, 0.9517474174499512, -0.3346317708492279, -0.3028452396392822, 0.25066307187080383, 0.6597579121589661, 0.20096911489963531, 0.31568965315818787, 0.4092745780944824, 0.8130909204483032, 0.551250159740448, -0.13955378532409668, 0.9329385757446289, -0.104156494140625, 0.4072627127170563, 0.7364020347595215, -0.09019908308982849, 0.6307642459869385, 0.40464457869529724, -0.13578613102436066, 0.5313187837600708, 0.7068911790847778, -0.34653353691101074, 0.7381286025047302, -0.0577930212020874, -0.15156222879886627, -0.0766293853521347, -0.01738499477505684, -0.4759790897369385, 0.12169075012207031, 0.310682088136673, -0.5623522400856018, -0.2007138878107071, 0.25126394629478455, 0.023759275674819946, -0.22437834739685059, -0.08122336119413376, 0.5427541732788086, 0.05650113895535469, -0.40509021282196045, 0.5247599482536316, 0.21366702020168304, 0.8248319029808044, -0.44579848647117615, -0.15980632603168488, -0.12648499011993408, 0.12334978580474854, -0.2268090397119522, -0.684584379196167, 0.4428008198738098, -0.10088248550891876, -0.285316526889801, -0.20779205858707428, 0.8444916605949402, -0.3371671140193939, -0.5986036658287048, 0.37805718183517456, 0.31584131717681885, 0.2904524505138397, 0.025199204683303833, -1.0079175233840942, 0.18317003548145294, -0.06167254224419594, -0.3497314453125, 0.2167014628648758, 0.21677576005458832, 0.019159873947501183, 0.4752943515777588, 0.5479289889335632, -0.07077326625585556, 0.12212479114532471, 0.009030895307660103, 0.7989827990531921, -0.3058086335659027, -0.33512595295906067, -0.736355185508728, 0.6658372282981873, -0.07361941039562225, -0.2730584442615509, 0.6454384922981262, 0.5833333134651184, 0.7942877411842346, -0.11594951152801514, 0.751566469669342, -0.3260798156261444, 0.0009827222675085068, -0.4842492640018463, 0.837486743927002, -0.6843842267990112, 0.05454188212752342, -0.34463629126548767, -0.8504699468612671, -0.16821429133415222, 0.8904985785484314, -0.2756657302379608, 0.2590290904045105, 0.4648772180080414, 0.9527880549430847, -0.12621136009693146, -0.20567189157009125, 0.3331052362918854, 0.24022138118743896, 0.3288566768169403, 0.35492464900016785, 0.756345808506012, -0.7444546818733215, 0.39399805665016174, -0.49569377303123474, -0.24048198759555817, -0.03200991079211235, -0.7855149507522583, -0.8829089999198914, -0.642996072769165, -0.7419483065605164, -0.663731575012207, -0.01835956797003746, 0.46683716773986816, 0.9190560579299927, -0.5338402986526489, -0.017468709498643875, -0.18739746510982513, 0.01569383777678013, -0.047367848455905914, -0.2553645968437195, 0.3166571855545044, 0.08289849758148193, -0.8470249772071838, -0.09537091106176376, 0.2640860378742218, 0.5044257640838623, -0.4765968918800354, -0.24678999185562134, -0.25873494148254395, -0.11065267771482468, 0.5438071489334106, 0.12959465384483337, -0.6248050928115845, -0.01610482484102249, -0.03423309698700905, -0.07867089658975601, 0.13277514278888702, 0.37318187952041626, -0.5901200175285339, 0.35612812638282776, 0.5176917314529419, 0.207821786403656, 0.8020592927932739, -0.10374777764081955, 0.1816757768392563, -0.438132643699646, 0.3270590901374817, 0.12012218683958054, 0.4192577302455902, 0.33538681268692017, -0.5257734060287476, 0.5129734873771667, 0.5981166958808899, -0.6741856336593628, -0.7431288957595825, 0.15288077294826508, -1.0066790580749512, -0.22560331225395203, 1.245521903038025, -0.16445890069007874, -0.327303409576416, -0.006749315652996302, -0.39331862330436707, 0.3109930753707886, -0.3379795253276825, 0.49055156111717224, 0.5209038257598877, -0.11979690939188004, -0.47411489486694336, -0.6099452376365662, 0.520865261554718, 0.1606050729751587, -0.6402867436408997, -0.23484522104263306, 0.5888545513153076, 0.6674032211303711, 0.21910406649112701, 0.936879575252533, -0.3028853237628937, 0.303280234336853, 0.06935971975326538, 0.04548923671245575, 0.03857073187828064, -0.2511293590068817, -0.4443502128124237, 0.0381811261177063, -0.1736099123954773, -0.03765695542097092 ]
timbrooks/instruct-pix2pix
timbrooks
"2023-07-05T16:19:25Z"
850,529
730
diffusers
[ "diffusers", "image-to-image", "license:mit", "has_space", "diffusers:StableDiffusionInstructPix2PixPipeline", "region:us" ]
image-to-image
"2023-01-20T04:27:06Z"
--- license: mit tags: - image-to-image --- # InstructPix2Pix: Learning to Follow Image Editing Instructions GitHub: https://github.com/timothybrooks/instruct-pix2pix <img src='https://instruct-pix2pix.timothybrooks.com/teaser.jpg'/> ## Example To use `InstructPix2Pix`, install `diffusers` using `main` for now. The pipeline will be available in the next release ```bash pip install diffusers accelerate safetensors transformers ``` ```python import PIL import requests import torch from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler model_id = "timbrooks/instruct-pix2pix" pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None) pipe.to("cuda") pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config) url = "https://raw.githubusercontent.com/timothybrooks/instruct-pix2pix/main/imgs/example.jpg" def download_image(url): image = PIL.Image.open(requests.get(url, stream=True).raw) image = PIL.ImageOps.exif_transpose(image) image = image.convert("RGB") return image image = download_image(url) prompt = "turn him into cyborg" images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images images[0] ```
[ -0.25788429379463196, -0.485965758562088, 0.5933087468147278, 0.12553173303604126, -0.2164975255727768, -0.021454425528645515, 0.08745486289262772, -0.14942924678325653, -0.24090221524238586, 0.31708839535713196, -0.5813894271850586, -0.27160272002220154, -0.703848123550415, -0.16646425426006317, -0.1471203863620758, 0.8760749101638794, -0.11626771092414856, -0.008258061483502388, 0.28850090503692627, 0.24062232673168182, -0.42262014746665955, 0.31268855929374695, -1.0660306215286255, 0.0027399174869060516, 0.4284960627555847, 0.38338702917099, 0.7789018154144287, 0.31012454628944397, 0.3627811074256897, 0.2893288731575012, -0.23254384100437164, -0.1073327586054802, -0.20345474779605865, 0.04655739665031433, -0.39989855885505676, -0.4482983648777008, 0.06796468049287796, 0.012537920847535133, 0.5149930715560913, 0.09819678962230682, 0.16931885480880737, 0.060500480234622955, -0.005566856823861599, 0.73603755235672, -0.6953832507133484, 0.20712025463581085, -0.43783047795295715, 0.057606056332588196, -0.018913036212325096, -0.13540054857730865, -0.35829591751098633, -0.304207444190979, -0.0864449143409729, -0.6384533047676086, 0.37935182452201843, -0.1866830587387085, 0.8835778832435608, 0.35578203201293945, -0.3692682683467865, -0.258958637714386, -0.46736517548561096, 0.5616024732589722, -0.4316578805446625, 0.15635918080806732, 0.10658963769674301, 0.33341220021247864, -0.055604442954063416, -1.4298256635665894, -0.39627906680107117, 0.30756500363349915, -0.1370491087436676, 0.17834924161434174, -0.5077190399169922, 0.10913408547639847, 0.5751276612281799, -0.028523020446300507, -0.5112893581390381, -0.17452988028526306, -1.100489616394043, -0.2797287404537201, 0.5882578492164612, 0.12121599167585373, 0.33379945158958435, 0.06197499856352806, -0.3448658883571625, -0.25438785552978516, -0.36836016178131104, 0.25919485092163086, 0.4067407250404358, -0.37335383892059326, -0.2127244621515274, 0.5993635058403015, 0.12118399888277054, 0.29754191637039185, 0.4976683557033539, 0.1039496585726738, 0.29593217372894287, 0.18502074480056763, -0.14240780472755432, -0.15896667540073395, 0.76596599817276, 0.6801562905311584, 0.02035801112651825, 0.13379503786563873, 0.09611711651086807, -0.04367266595363617, 0.3459480404853821, -1.1758127212524414, -0.8058831095695496, 0.6448173522949219, -0.40334969758987427, -0.1766643077135086, -0.02298809587955475, -0.858028769493103, -0.09230729192495346, 0.044721271842718124, 0.697994589805603, -0.49940627813339233, -0.2319279909133911, -0.0699281170964241, -0.5775557160377502, 0.24251990020275116, 0.4428405165672302, -0.803558349609375, 0.0021189108956605196, 0.44083723425865173, 1.0456551313400269, 0.12546253204345703, -0.3853614926338196, -0.3238793909549713, 0.09875860810279846, -0.34873074293136597, 0.8573619723320007, -0.16101744771003723, -0.344329833984375, -0.05508330464363098, 0.6681939959526062, -0.01194681040942669, -0.43098708987236023, 0.44924283027648926, -0.5822298526763916, 0.3197958469390869, 0.15802575647830963, -0.4425944685935974, -0.3724312484264374, -0.13532045483589172, -0.17993906140327454, 0.9770597815513611, 0.5320250988006592, -0.8484666347503662, 0.09522257000207901, -0.8392618894577026, -0.3059617280960083, -0.011998388916254044, 0.188768669962883, -0.7598835229873657, 0.09241266548633575, 0.10460551828145981, 0.4931439459323883, 0.5993140935897827, -0.24493834376335144, -0.23844778537750244, -0.3186817765235901, 0.18059833347797394, -0.1984044760465622, 1.2458839416503906, 0.3461081385612488, -0.4726259112358093, 0.35654282569885254, -0.2985103726387024, 0.3250151574611664, 0.021616589277982712, -0.15045087039470673, 0.24706551432609558, -0.3143160045146942, 0.5228654146194458, 0.2760676145553589, 0.025383561849594116, -0.6741651296615601, 0.37641283869743347, -0.3087809085845947, 0.7649216055870056, 0.642331063747406, 0.2226993441581726, 0.44724127650260925, -0.07625389099121094, 0.32169416546821594, -0.001739409053698182, 0.40208613872528076, -0.21191298961639404, -0.5458921194076538, -0.8367303013801575, -0.30552488565444946, -0.2772209644317627, 0.5328450202941895, -0.6920525431632996, 0.3300008177757263, 0.2010166496038437, -0.6629634499549866, -0.15390439331531525, 0.03421040624380112, 0.2043115645647049, 0.1995122730731964, 0.24253208935260773, -0.44841518998146057, -0.3337593674659729, -0.66224604845047, -0.03681653365492821, 0.14867161214351654, -0.25537869334220886, -0.018596231937408447, 0.6060325503349304, -0.23499000072479248, 0.6355404853820801, -0.6842063069343567, -0.10539289563894272, -0.062138669192790985, -0.026396581903100014, 0.3880089521408081, 0.855191707611084, 0.5471993684768677, -0.551364541053772, -0.7925122976303101, -0.25235575437545776, -0.44739070534706116, 0.11674948781728745, -0.12852811813354492, -0.33473989367485046, 0.170909583568573, 0.28873738646507263, -0.7940947413444519, 0.7938963174819946, 0.3072546422481537, -0.6620679497718811, 0.7721739411354065, -0.48772555589675903, 0.27652856707572937, -1.007494330406189, -0.1162012591958046, -0.009792477823793888, -0.3961438238620758, -0.3519340455532074, 0.42591142654418945, 0.3876812756061554, -0.3351779282093048, -0.881079375743866, 0.5333478450775146, -0.5029725432395935, 0.1075974553823471, -0.4564010500907898, -0.7086551189422607, 0.14643238484859467, 0.4747728407382965, 0.2136005163192749, 0.9180077314376831, 1.0775333642959595, -0.5609889626502991, 0.6825308203697205, 0.25537726283073425, -0.2053520381450653, 0.27994072437286377, -0.8784341812133789, 0.5312538146972656, 0.022719526663422585, 0.08205386251211166, -1.1109563112258911, -0.4658395051956177, 0.6950670480728149, -0.3868134617805481, 0.41609540581703186, -0.6098058223724365, -0.37804126739501953, -0.38781529664993286, -0.3694842755794525, 0.4628208577632904, 0.8015182018280029, -0.5420283675193787, 0.22614352405071259, 0.13125872611999512, -0.0672871470451355, -0.27262112498283386, -0.66355299949646, -0.04836175590753555, -0.23199760913848877, -0.6536993384361267, 0.3942295014858246, -0.16711744666099548, -0.18298307061195374, 0.014740265905857086, 0.16467882692813873, -0.3964967727661133, -0.2811242341995239, 0.30229294300079346, 0.2997575104236603, 0.23329892754554749, -0.21107329428195953, 0.3033463656902313, -0.4954095184803009, 0.24261748790740967, -0.39513924717903137, 0.39221829175949097, -0.11378028243780136, -0.48646995425224304, -1.0883933305740356, 0.21762360632419586, 0.590329110622406, 0.19263505935668945, 0.4654310345649719, 0.9256651401519775, -0.3072394132614136, 0.11731254309415817, -0.4645389914512634, -0.2978420555591583, -0.5254573225975037, 0.5489928126335144, -0.019621895626187325, -0.15743142366409302, 0.2799503207206726, -0.22472450137138367, 0.3583189845085144, 0.3609112799167633, 0.6113642454147339, -0.5375885367393494, 0.865449845790863, 0.6064170598983765, 0.5374795198440552, 0.744796097278595, -1.046164870262146, -0.12283635139465332, -0.9348335266113281, -0.23296184837818146, -0.2744589149951935, -0.40193936228752136, -0.1890842765569687, -0.5762750506401062, 0.7493739128112793, 0.2988833487033844, -0.5310376286506653, 0.5403264760971069, -0.8474036455154419, 0.8186798095703125, 0.48967286944389343, 0.4770929515361786, -0.21565720438957214, 0.39633285999298096, 0.11474590003490448, -0.29801011085510254, -0.4870494306087494, -0.46518123149871826, 0.9640088081359863, 0.25916236639022827, 0.8689066767692566, 0.00555835198611021, 0.3729313313961029, 0.04678386449813843, -0.15066546201705933, -0.8912190794944763, 0.17832081019878387, 0.1560775637626648, -0.8553923964500427, -0.12976688146591187, 0.24321815371513367, -0.8631070256233215, 0.040169764310121536, -0.11058133095502853, -0.6755263805389404, 0.3933413028717041, 0.15691569447517395, -0.34592634439468384, 0.5496861338615417, -0.8345043063163757, 0.8197707533836365, -0.2745964229106903, -0.9479135274887085, -0.3990013003349304, -0.6396316885948181, 0.19511725008487701, 0.363058865070343, 0.01456515397876501, -0.05567517876625061, -0.24875549972057343, 0.5911645889282227, -0.55900639295578, 0.7328596711158752, -0.3418824076652527, 0.3271322548389435, 0.48620131611824036, 0.08845695853233337, 0.40046268701553345, 0.2853221595287323, -0.2568631172180176, 0.1452210694551468, 0.6171595454216003, -0.6139373779296875, -0.7286479473114014, 0.40560203790664673, -0.8799011707305908, -0.2571655809879303, -0.5003424882888794, -0.4724433422088623, 0.46385306119918823, 0.11863873153924942, 0.7332879900932312, 0.4972633123397827, 0.303384929895401, -0.02810347080230713, 0.623379647731781, -0.13769938051700592, 1.0270435810089111, -0.08452743291854858, -0.18227438628673553, -0.8150613307952881, 0.3798830509185791, -0.06386598199605942, 0.37973010540008545, -0.026800496503710747, 0.13913831114768982, -0.3511783182621002, -0.45639386773109436, -0.7966780066490173, -0.11289535462856293, -0.8201713562011719, -0.31587332487106323, -0.5013754367828369, -0.2766733169555664, -0.31673169136047363, -0.5188691020011902, -0.40494611859321594, -0.4567267894744873, -0.5869573354721069, 0.36677953600883484, 0.75665283203125, 0.538102388381958, -0.3372340798377991, 0.5547412037849426, -0.6736084222793579, 0.11180713027715683, 0.37007102370262146, 0.07581089437007904, -0.1186496838927269, -0.6418067216873169, -0.2104652225971222, -0.1031200960278511, -0.8989763855934143, -0.8585403561592102, 0.630545437335968, 0.1319175362586975, 0.340871125459671, 0.6015110611915588, -0.04348590224981308, 0.7775963544845581, -0.3899904787540436, 0.7936945557594299, 0.5242579579353333, -0.9412980675697327, 0.8178037405014038, -0.1589721143245697, 0.2644345462322235, 0.20272018015384674, 0.36620935797691345, -0.5254334211349487, -0.1659608632326126, -0.794872522354126, -0.804462194442749, 0.76252281665802, 0.46240320801734924, 0.38934943079948425, 0.2859915494918823, 0.6281915903091431, 0.15537749230861664, -0.1699235737323761, -0.8345156908035278, -0.23518897593021393, -0.2013643980026245, 0.05240065976977348, 0.1920301765203476, -0.2698776423931122, -0.11543869972229004, -0.7739967107772827, 1.031638741493225, -0.07376142591238022, 0.47178858518600464, 0.473453551530838, 0.013290331698954105, -0.29961827397346497, 0.24264582991600037, 0.3313634395599365, 0.817866861820221, -0.1823156476020813, 0.09341233968734741, -0.011612219735980034, -0.5902268886566162, 0.2560880482196808, -0.2571921646595001, -0.258867472410202, 0.06523433327674866, 0.24590682983398438, 0.6425323486328125, -0.26916491985321045, -0.19531242549419403, 0.3866114318370819, -0.01103380136191845, -0.24422942101955414, -0.5658361315727234, 0.34317755699157715, 0.12018044292926788, 0.5916365385055542, 0.2693677842617035, 0.7152439951896667, 0.03074338473379612, -0.3854636549949646, -0.04078297317028046, 0.31831082701683044, -0.4313228130340576, -0.3276558518409729, 0.8224174976348877, 0.08123122155666351, -0.425718754529953, 0.7839813828468323, -0.3323476016521454, -0.3609638512134552, 0.7282617688179016, 0.4465278387069702, 0.9360047578811646, 0.3575640022754669, 0.008291619829833508, 0.759810209274292, 0.2567056715488434, 0.18740324676036835, 0.5517454147338867, 0.07611484825611115, -0.35989001393318176, -0.0852256566286087, -0.23127488791942596, -0.2822989523410797, -0.10745341330766678, -0.3325497508049011, 0.5523541569709778, -0.7511323094367981, -0.012899323366582394, 0.02978469431400299, 0.06586668640375137, -0.6911758184432983, -0.04716237261891365, -0.08538106828927994, 0.9798605442047119, -0.5160934329032898, 0.9437512159347534, 0.6611745953559875, -0.4753148555755615, -0.9991537928581238, -0.008244908414781094, 0.08902005851268768, -0.7049334049224854, 0.4726234972476959, 0.29521018266677856, 0.12262380123138428, 0.341339111328125, -0.8279933333396912, -0.5258606672286987, 1.1696487665176392, 0.4667642414569855, -0.41054588556289673, 0.19256487488746643, -0.2912110984325409, 0.18269342184066772, -0.23529118299484253, 0.6428230404853821, 0.032828107476234436, 0.4433586597442627, 0.5431270003318787, -0.5318562388420105, -0.10834261029958725, -0.25146257877349854, 0.07033544033765793, -0.04386270418763161, -0.6003283262252808, 0.9245719909667969, -0.8182316422462463, -0.2894081175327301, 0.43188583850860596, 0.5325459241867065, -0.019132152199745178, 0.32671448588371277, 0.4083231985569, 0.6519721150398254, 0.2542933523654938, -0.06984001398086548, 0.7003796100616455, -0.2958361804485321, 0.7540269494056702, 0.6691626310348511, 0.2916002571582794, 0.7093002796173096, 0.5015439987182617, -0.4647144675254822, 0.6079537272453308, 1.0961018800735474, -0.31341254711151123, 0.6888803839683533, -0.051717374473810196, -0.43198227882385254, 0.008625851944088936, 0.48540520668029785, -0.5042281150817871, 0.14343734085559845, 0.3640705645084381, -0.5141477584838867, -0.3283408582210541, 0.11862630397081375, 0.005101262126117945, -0.35009726881980896, -0.43346959352493286, 0.5954132676124573, -0.25440067052841187, -0.36230942606925964, 0.6506631374359131, -0.022681383416056633, 0.7875246405601501, -0.523943305015564, -0.1563701331615448, 0.16157294809818268, 0.3779783248901367, -0.5779424905776978, -1.2797092199325562, 0.8188855051994324, -0.10348010808229446, -0.17397642135620117, -0.16067329049110413, 0.7270107269287109, -0.12809666991233826, -0.8563245534896851, -0.03463833034038544, -0.028987262398004532, 0.7314797043800354, -0.09839456528425217, -0.835459291934967, 0.08706841617822647, 0.21364149451255798, -0.1753884255886078, 0.05247987061738968, 0.0816599503159523, 0.46979665756225586, 0.5399071574211121, 0.6331014633178711, -0.13600462675094604, 0.15100952982902527, -0.37262168526649475, 0.6734185218811035, -0.35305875539779663, -0.27345800399780273, -0.7781317830085754, 0.8274745345115662, -0.009050149470567703, -0.27695202827453613, 0.42288097739219666, 0.720747709274292, 0.9271544218063354, -0.5817973017692566, 0.6938164234161377, -0.4901818037033081, -0.0830310583114624, -0.5939885377883911, 0.9280423521995544, -0.3590356409549713, -0.16181154549121857, -0.22042979300022125, -0.7512208223342896, -0.1879308968782425, 0.7817631959915161, -0.21207773685455322, -0.22767260670661926, 0.7219602465629578, 1.27699613571167, -0.5567904710769653, -0.23356156051158905, 0.13741587102413177, -0.14486537873744965, 0.17194262146949768, 0.36821362376213074, 0.7200312614440918, -0.749147355556488, 0.5000616312026978, -0.81793212890625, -0.1226678341627121, 0.31507551670074463, -0.8187373876571655, -0.6475386023521423, -0.5024487376213074, -0.8700534105300903, -0.6111440658569336, -0.03283912315964699, 0.9645020365715027, 1.3290495872497559, -0.7142508029937744, -0.19281776249408722, -0.4111860990524292, 0.2057349979877472, -0.33808284997940063, -0.26865968108177185, 0.4861818850040436, -0.2659646272659302, -1.1436986923217773, -0.22359678149223328, 0.24541476368904114, 0.21215006709098816, -0.07685872912406921, -0.10675881057977676, -0.08068171888589859, -0.3979823887348175, 0.2921275496482849, 0.48579907417297363, -0.726003110408783, -0.1878751963376999, -0.5109995007514954, 0.17087791860103607, 0.22027437388896942, 0.5316063165664673, -0.6601521372795105, 0.4456091523170471, 0.47064071893692017, -0.03319352865219116, 0.5148298740386963, -0.5810313820838928, 0.05206809192895889, -0.4838102161884308, 0.45316797494888306, -0.019826199859380722, 0.5104889869689941, 0.10416841506958008, -0.5982070565223694, 0.5214948654174805, 0.38690465688705444, -0.6589188575744629, -0.4094967544078827, 0.17452672123908997, -1.0365301370620728, -0.37605318427085876, 0.9982991218566895, -0.4203697741031647, -0.18729530274868011, -0.11415719985961914, -0.8201964497566223, 0.3937424123287201, -0.4005943536758423, 0.7935447692871094, 0.20754775404930115, -0.4832099378108978, -0.7766231298446655, -0.30526426434516907, 0.2307719588279724, -0.2053912878036499, -0.7084192037582397, -0.12185658514499664, 0.5733100175857544, 0.8601921200752258, 0.34318026900291443, 0.3062150180339813, -0.15757665038108826, 0.4593757390975952, 0.18778708577156067, 0.2885335683822632, -0.23286494612693787, -0.04950379952788353, -0.36099860072135925, 0.023461097851395607, -0.07043201476335526, -0.5848956108093262 ]
facebook/opt-1.3b
facebook
"2023-09-15T13:09:33Z"
850,215
121
transformers
[ "transformers", "pytorch", "tf", "jax", "opt", "text-generation", "en", "arxiv:2205.01068", "arxiv:2005.14165", "license:other", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2022-05-11T08:26:00Z"
--- language: en inference: false tags: - text-generation - opt license: other commercial: false --- # OPT : Open Pre-trained Transformer Language Models OPT was first introduced in [Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) and first released in [metaseq's repository](https://github.com/facebookresearch/metaseq) on May 3rd 2022 by Meta AI. **Disclaimer**: The team releasing OPT wrote an official model card, which is available in Appendix D of the [paper](https://arxiv.org/pdf/2205.01068.pdf). Content from **this** model card has been written by the Hugging Face team. ## Intro To quote the first two paragraphs of the [official paper](https://arxiv.org/abs/2205.01068) > Large language models trained on massive text collections have shown surprising emergent > capabilities to generate text and perform zero- and few-shot learning. While in some cases the public > can interact with these models through paid APIs, full model access is currently limited to only a > few highly resourced labs. This restricted access has limited researchers’ ability to study how and > why these large language models work, hindering progress on improving known challenges in areas > such as robustness, bias, and toxicity. > We present Open Pretrained Transformers (OPT), a suite of decoder-only pre-trained transformers ranging from 125M > to 175B parameters, which we aim to fully and responsibly share with interested researchers. We train the OPT models to roughly match > the performance and sizes of the GPT-3 class of models, while also applying the latest best practices in data > collection and efficient training. Our aim in developing this suite of OPT models is to enable reproducible and responsible research at scale, and > to bring more voices to the table in studying the impact of these LLMs. Definitions of risk, harm, bias, and toxicity, etc., should be articulated by the > collective research community as a whole, which is only possible when models are available for study. ## Model description OPT was predominantly pretrained with English text, but a small amount of non-English data is still present within the training corpus via CommonCrawl. The model was pretrained using a causal language modeling (CLM) objective. OPT belongs to the same family of decoder-only models like [GPT-3](https://arxiv.org/abs/2005.14165). As such, it was pretrained using the self-supervised causal language modedling objective. For evaluation, OPT follows [GPT-3](https://arxiv.org/abs/2005.14165) by using their prompts and overall experimental setup. For more details, please read the [official paper](https://arxiv.org/abs/2205.01068). ## Intended uses & limitations The pretrained-only model can be used for prompting for evaluation of downstream tasks as well as text generation. In addition, the model can be fine-tuned on a downstream task using the [CLM example](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling). For all other OPT checkpoints, please have a look at the [model hub](https://huggingface.co/models?filter=opt). ### How to use You can use this model directly with a pipeline for text generation. ```python >>> from transformers import pipeline >>> generator = pipeline('text-generation', model="facebook/opt-1.3b") >>> generator("What are we having for dinner?") [{'generated_text': 'What are we having for dinner?\nI'm not sure. I'm not a chef. I'}] ``` By default, generation is deterministic. In order to use the top-k sampling, please set `do_sample` to `True`. ```python >>> from transformers import pipeline, set_seed >>> set_seed(32) >>> generator = pipeline('text-generation', model="facebook/opt-1.3b", do_sample=True) >>> generator("What are we having for dinner?") [{'generated_text': "What are we having for dinner?\nI have had chicken and rice for lunch. It is delicious"}] ``` ### Limitations and bias As mentioned in Meta AI's model card, given that the training data used for this model contains a lot of unfiltered content from the internet, which is far from neutral the model is strongly biased : > Like other large language models for which the diversity (or lack thereof) of training > data induces downstream impact on the quality of our model, OPT-175B has limitations in terms > of bias and safety. OPT-175B can also have quality issues in terms of generation diversity and > hallucination. In general, OPT-175B is not immune from the plethora of issues that plague modern > large language models. Here's an example of how the model can have biased predictions: ```python >>> from transformers import pipeline, set_seed >>> set_seed(32) >>> generator = pipeline('text-generation', model="facebook/opt-1.3b", do_sample=True, num_return_sequences=5) >>> generator("The woman worked as a") [{'generated_text': 'The woman worked as a bartender for six months before getting to the job she always dreamed of. She'}, {'generated_text': 'The woman worked as a nanny in a house near The White Horse Farm in the Yorkshire Dales'}, {'generated_text': "The woman worked as a translator at the British Broadcasting Corporation's headquarters and was also an acquaintance of some"}, {'generated_text': 'The woman worked as a secretary and went to school full-time, and also worked as a waitress'}, {'generated_text': 'The woman worked as a beautician with her baby and the little girl is now at the age where'}] ``` compared to: ```python >>> from transformers import pipeline, set_seed >>> set_seed(32) >>> generator = pipeline('text-generation', model="facebook/opt-1.3b", do_sample=True, num_return_sequences=5) >>> generator("The man worked as a") [{'generated_text': 'The man worked as a janitor and the owner of the house he worked at caught him cheating on'}, {'generated_text': 'The man worked as a software engineer.\n\nFor over 10 years, he had been at Amazon'}, {'generated_text': 'The man worked as a car salesman - and was a man of his word to her\nA T'}, {'generated_text': 'The man worked as a private contractor for five years. He went to the Bahamas in the summer of'}, {'generated_text': 'The man worked as a computer systems consultant. After leaving the job, he became a prolific internet hacker'}] ``` This bias will also affect all fine-tuned versions of this model. ## Training data The Meta AI team wanted to train this model on a corpus as large as possible. It is composed of the union of the following 5 filtered datasets of textual documents: - BookCorpus, which consists of more than 10K unpublished books, - CC-Stories, which contains a subset of CommonCrawl data filtered to match the story-like style of Winograd schemas, - The Pile, from which * Pile-CC, OpenWebText2, USPTO, Project Gutenberg, OpenSubtitles, Wikipedia, DM Mathematics and HackerNews* were included. - Pushshift.io Reddit dataset that was developed in Baumgartner et al. (2020) and processed in Roller et al. (2021) - CCNewsV2 containing an updated version of the English portion of the CommonCrawl News dataset that was used in RoBERTa (Liu et al., 2019b) The final training data contains 180B tokens corresponding to 800GB of data. The validation split was made of 200MB of the pretraining data, sampled proportionally to each dataset’s size in the pretraining corpus. The dataset might contains offensive content as parts of the dataset are a subset of public Common Crawl data, along with a subset of public Reddit data, which could contain sentences that, if viewed directly, can be insulting, threatening, or might otherwise cause anxiety. ### Collection process The dataset was collected form internet, and went through classic data processing algorithms and re-formatting practices, including removing repetitive/non-informative text like *Chapter One* or *This ebook by Project Gutenberg.* ## Training procedure ### Preprocessing The texts are tokenized using the **GPT2** byte-level version of Byte Pair Encoding (BPE) (for unicode characters) and a vocabulary size of 50272. The inputs are sequences of 2048 consecutive tokens. The 175B model was trained on 992 *80GB A100 GPUs*. The training duration was roughly ~33 days of continuous training. ### BibTeX entry and citation info ```bibtex @misc{zhang2022opt, title={OPT: Open Pre-trained Transformer Language Models}, author={Susan Zhang and Stephen Roller and Naman Goyal and Mikel Artetxe and Moya Chen and Shuohui Chen and Christopher Dewan and Mona Diab and Xian Li and Xi Victoria Lin and Todor Mihaylov and Myle Ott and Sam Shleifer and Kurt Shuster and Daniel Simig and Punit Singh Koura and Anjali Sridhar and Tianlu Wang and Luke Zettlemoyer}, year={2022}, eprint={2205.01068}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.23166987299919128, -0.8484238982200623, 0.24584759771823883, 0.15480761229991913, -0.2455841302871704, -0.24989621341228485, -0.38194695115089417, -0.36447733640670776, 0.02687535621225834, 0.6492210626602173, -0.7192671895027161, -0.3701033890247345, -0.5984693765640259, 0.28184396028518677, -0.5138988494873047, 1.1890445947647095, -0.043126657605171204, -0.04741955175995827, 0.030484125018119812, 0.19505445659160614, -0.21154600381851196, -0.4727307856082916, -0.6461652517318726, -0.09493568539619446, 0.32731854915618896, 0.1879318505525589, 0.6831783652305603, 0.5915473103523254, 0.399863064289093, 0.28571152687072754, -0.03333542123436928, 0.07240378856658936, -0.7293022274971008, -0.21788130700588226, -0.06442681699991226, -0.3621523976325989, -0.29613974690437317, 0.19548818469047546, 0.5561121106147766, 0.515313982963562, 0.07962694019079208, 0.21770276129245758, 0.14104555547237396, 0.5721687078475952, -0.4570722281932831, 0.12613439559936523, -0.7485313415527344, -0.09069870412349701, -0.28763842582702637, 0.0950995609164238, -0.6266079545021057, -0.28677886724472046, 0.04203736409544945, -0.4434119462966919, 0.21829241514205933, -0.07701858878135681, 1.1912355422973633, 0.33910149335861206, -0.30126509070396423, -0.18981048464775085, -0.6788327693939209, 0.8566353917121887, -0.8103418350219727, 0.27657628059387207, 0.3561946153640747, 0.034275270998477936, -0.028747517615556717, -0.8317651152610779, -0.6552391648292542, -0.07750073820352554, -0.21390900015830994, 0.26483699679374695, -0.3119678199291229, -0.018624121323227882, 0.22346097230911255, 0.30063194036483765, -0.588473379611969, 0.038870811462402344, -0.5414999723434448, -0.29102271795272827, 0.717766284942627, 0.0004962043021805584, 0.3192596733570099, -0.3260965049266815, -0.2470313161611557, -0.11174049973487854, -0.5479788780212402, -0.06703533232212067, 0.5729556679725647, 0.4097597599029541, -0.2030707150697708, 0.6415448188781738, -0.24022920429706573, 0.7168986201286316, 0.03789760172367096, 0.015603487379848957, 0.45505931973457336, -0.5149829983711243, -0.12475748360157013, -0.13083694875240326, 1.1695500612258911, 0.3119474947452545, 0.5152779221534729, 0.061252411454916, -0.03549744933843613, 0.10779987275600433, 0.26576417684555054, -0.7149450778961182, -0.07646717876195908, 0.303930401802063, -0.5282058119773865, -0.42221593856811523, -0.0029920905362814665, -0.8444633483886719, 0.006645052693784237, -0.13493391871452332, 0.31194692850112915, -0.3855056166648865, -0.33438828587532043, 0.16417120397090912, -0.06861782819032669, 0.2196422964334488, -0.02397064119577408, -0.7817159295082092, 0.03395764157176018, 0.48154157400131226, 0.6629523038864136, -0.03648219630122185, -0.37256306409835815, -0.22944118082523346, -0.10265472531318665, -0.18633414804935455, 0.5061044692993164, -0.4042540490627289, 0.0037059299647808075, 0.1884150207042694, 0.10728035122156143, -0.13311028480529785, -0.2734815180301666, 0.7614260911941528, -0.48689213395118713, 0.5308874249458313, -0.04965050145983696, -0.3465072512626648, -0.033933062106370926, -0.02031121961772442, -0.6284083724021912, 1.0389328002929688, 0.21973444521427155, -1.0417671203613281, 0.38431206345558167, -0.6279624104499817, -0.4398341178894043, -0.04065527766942978, 0.09321944415569305, -0.3966195285320282, -0.12507009506225586, 0.3793608546257019, 0.4340462386608124, -0.24086296558380127, 0.4227113723754883, -0.1066245436668396, -0.1946476548910141, 0.13932344317436218, -0.5223617553710938, 1.068657636642456, 0.3424798548221588, -0.363847553730011, 0.020464099943637848, -0.6281925439834595, -0.020687924697995186, 0.3182377219200134, -0.4062611758708954, -0.15851862728595734, 0.08537226915359497, 0.1716488152742386, 0.30204933881759644, 0.3079921007156372, -0.5035834908485413, 0.10333332419395447, -0.6015644073486328, 0.7063864469528198, 0.7147983312606812, -0.18005803227424622, 0.360793799161911, -0.20685918629169464, 0.4123547673225403, 0.05876762419939041, 0.23879793286323547, -0.31207218766212463, -0.41286569833755493, -0.8874747157096863, -0.15665553510189056, 0.3332591652870178, 0.559958279132843, -0.7135605812072754, 0.6273456811904907, -0.3612307906150818, -0.5767265558242798, -0.6095498204231262, 0.026263047009706497, 0.42910459637641907, 0.30061623454093933, 0.46741828322410583, -0.05141359567642212, -0.670663058757782, -0.872836172580719, -0.40083473920822144, -0.14574256539344788, -0.009358738549053669, 0.2640731632709503, 0.565266489982605, -0.4840087294578552, 1.0293537378311157, -0.5800401568412781, -0.24016769230365753, -0.5322072505950928, -0.01560496911406517, 0.41462576389312744, 0.48142319917678833, 0.4371797740459442, -0.7890934944152832, -0.6071639060974121, -0.18719248473644257, -0.6065402030944824, -0.18055352568626404, -0.16800466179847717, -0.3233632445335388, 0.39522668719291687, 0.5182996392250061, -0.7657753229141235, 0.16183918714523315, 0.6329711675643921, -0.30191075801849365, 0.6717875599861145, 0.14828211069107056, -0.19741547107696533, -1.2919636964797974, 0.15323631465435028, -0.03628942742943764, -0.18749234080314636, -0.5861751437187195, -0.10776360332965851, -0.04040217027068138, -0.17603589594364166, -0.5624017715454102, 0.5942980647087097, -0.3477347195148468, 0.30744725465774536, -0.01133471168577671, 0.1022414043545723, -0.168047696352005, 0.5635610222816467, 0.09498673677444458, 0.6361710429191589, 0.5374493598937988, -0.5774275064468384, 0.09242955595254898, 0.3134860098361969, -0.26574358344078064, 0.24193550646305084, -0.6217324137687683, 0.0717579647898674, -0.24322685599327087, 0.2573900818824768, -0.8742649555206299, -0.3516148626804352, 0.3125492036342621, -0.5747796893119812, 0.20993632078170776, 0.10089322924613953, -0.5206244587898254, -0.6897468566894531, -0.12615831196308136, 0.22047159075737, 0.6323983073234558, -0.44016698002815247, 0.529496967792511, 0.3936096429824829, -0.07730918377637863, -0.7329853177070618, -0.6632156372070312, -0.0004433607973624021, -0.1045028567314148, -0.670989453792572, 0.3213232457637787, -0.06993718445301056, -0.07255442440509796, 0.10184621065855026, 0.14464500546455383, -0.15450771152973175, -0.10310528427362442, 0.039002906531095505, 0.22088603675365448, -0.13345181941986084, 0.025202123448252678, 0.043007995933294296, -0.18489117920398712, 0.09509317576885223, -0.3044756352901459, 0.7640732526779175, -0.09508286416530609, -0.036270905286073685, -0.40243008732795715, 0.20783859491348267, 0.36748307943344116, -0.2944899797439575, 0.8118758201599121, 0.7003637552261353, -0.3210269510746002, -0.2062317579984665, -0.5010385513305664, -0.22229258716106415, -0.4995230734348297, 0.6415406465530396, -0.0046881018206477165, -0.8751598000526428, 0.31690967082977295, 0.17192330956459045, 0.1768975406885147, 0.735606849193573, 0.5795314908027649, 0.09503080695867538, 0.9801796078681946, 0.5651958584785461, -0.23195356130599976, 0.5132399201393127, -0.2806969881057739, 0.24447961151599884, -0.5325285792350769, 0.03187183663249016, -0.5203655362129211, -0.0783601701259613, -0.5878807902336121, -0.25766563415527344, 0.05673767253756523, 0.037987686693668365, -0.43659108877182007, 0.5135608911514282, -0.6174585223197937, 0.4660520851612091, 0.6170603036880493, 0.10966097563505173, 0.07563687860965729, 0.02253599651157856, -0.10343845188617706, -0.03645610809326172, -0.753415584564209, -0.5678198933601379, 1.2049541473388672, 0.3926296830177307, 0.628229558467865, -0.30762484669685364, 0.713150680065155, 0.14639601111412048, 0.3496587574481964, -0.45596274733543396, 0.576944887638092, -0.2795494496822357, -0.8608056306838989, -0.1925322711467743, -0.5529088377952576, -0.9791165590286255, 0.06679869443178177, -0.17250441014766693, -0.6961095333099365, -0.09806330502033234, 0.14283758401870728, -0.1324501782655716, 0.23599080741405487, -0.815689742565155, 1.0954961776733398, -0.3257676064968109, -0.36603671312332153, 0.0076228599064052105, -0.7008908987045288, 0.43035808205604553, -0.15951655805110931, 0.33543655276298523, 0.18906590342521667, 0.21535170078277588, 0.8346934914588928, -0.4047747552394867, 1.0146214962005615, -0.05778562277555466, 0.030997805297374725, 0.4857436418533325, -0.19157648086547852, 0.42241373658180237, -0.15610669553279877, -0.12590594589710236, 0.40711313486099243, -0.20525982975959778, -0.2866300642490387, -0.027857068926095963, 0.45859983563423157, -0.9677529335021973, -0.3790411055088043, -0.39337873458862305, -0.4364854395389557, 0.11464977264404297, 0.5690438747406006, 0.6475525498390198, 0.3134647011756897, -0.1479179412126541, 0.2944020628929138, 0.3532015383243561, -0.5456737279891968, 0.49394673109054565, 0.2693953812122345, -0.1903177946805954, -0.41595131158828735, 0.735558807849884, 0.04985849931836128, 0.29689913988113403, 0.4181877672672272, 0.16180270910263062, -0.37723082304000854, -0.2876003682613373, -0.30064427852630615, 0.4372539520263672, -0.6289364695549011, -0.24801228940486908, -0.9080122113227844, -0.4895656406879425, -0.5103060603141785, -0.21318703889846802, -0.4915832579135895, -0.11395502090454102, -0.48656463623046875, -0.13333916664123535, 0.17397703230381012, 0.5519721508026123, 0.051518287509679794, 0.5238234400749207, -0.7118995189666748, 0.28505128622055054, 0.10243891179561615, 0.2968767583370209, -0.07084287703037262, -0.49170491099357605, -0.29202908277511597, 0.302590548992157, -0.5235915780067444, -0.8447042107582092, 0.4925668239593506, 0.11983581632375717, 0.52912437915802, 0.5000003576278687, 0.14445307850837708, 0.3771671950817108, -0.5261486768722534, 0.9120983481407166, 0.08287401497364044, -0.9210235476493835, 0.47838547825813293, -0.517867922782898, 0.27036646008491516, 0.532356858253479, 0.5210151672363281, -0.442426472902298, -0.5402095913887024, -0.6882314682006836, -1.0014467239379883, 0.9339143633842468, 0.4313713610172272, 0.40693792700767517, -0.19717054069042206, 0.3064236044883728, 0.06396161764860153, 0.26973289251327515, -1.3756864070892334, -0.3294493556022644, -0.2968229651451111, -0.4138632118701935, -0.17426258325576782, -0.3305836021900177, 0.1917363405227661, -0.27925148606300354, 0.8359090089797974, 0.04000489041209221, 0.441949725151062, 0.14051023125648499, -0.26076212525367737, -0.07614012807607651, 0.17035017907619476, 0.3590593934059143, 0.517624020576477, -0.09613488614559174, -0.01818815805017948, 0.06392206251621246, -0.5743414163589478, -0.08575921505689621, 0.19579024612903595, -0.4420923590660095, -0.016857493668794632, 0.4367660880088806, 0.9574373364448547, 0.002549506491050124, -0.6625871062278748, 0.5825296640396118, 0.08486828207969666, -0.2920020520687103, -0.4001655876636505, 0.036751843988895416, 0.13126115500926971, 0.024115944281220436, 0.3009130358695984, 0.035845883190631866, -0.11021485924720764, -0.43348169326782227, 0.23291891813278198, 0.4077604115009308, -0.32189491391181946, -0.28330865502357483, 0.852267861366272, 0.2981709837913513, -0.3524883985519409, 0.7300371527671814, -0.31206950545310974, -0.7607002854347229, 0.5378357768058777, 0.6539310216903687, 0.912552535533905, -0.09587906301021576, 0.3982299268245697, 0.6950889229774475, 0.6428934335708618, -0.14670158922672272, 0.08845575153827667, 0.2282683551311493, -0.85123610496521, -0.5569391250610352, -0.8029600381851196, -0.00202409946359694, 0.3604179620742798, -0.39992755651474, 0.5210095047950745, -0.09422452747821808, -0.1368848830461502, -0.16574956476688385, -0.1452680081129074, -0.7579817771911621, 0.18314582109451294, 0.06709028035402298, 0.7846969366073608, -1.030829906463623, 0.5612751841545105, 0.5506997108459473, -0.5044097900390625, -0.82701176404953, 0.1299092024564743, -0.2385687530040741, -0.7599901556968689, 0.5874981880187988, 0.5339148640632629, 0.34730154275894165, 0.2571789026260376, -0.7742754220962524, -0.9046062231063843, 0.8180778622627258, 0.30233874917030334, -0.4713946580886841, -0.14398479461669922, 0.40174412727355957, 0.6904419660568237, -0.24045634269714355, 0.43444228172302246, 0.45873913168907166, 0.47116923332214355, -0.16679196059703827, -0.8105379939079285, 0.09391968697309494, -0.26611098647117615, -0.18430398404598236, 0.11695200204849243, -0.6856904029846191, 1.0401936769485474, -0.14104793965816498, -0.31310704350471497, -0.10164701193571091, 0.46450233459472656, -0.006733846850693226, 0.07051412761211395, 0.45873525738716125, 0.5970513820648193, 0.49220508337020874, -0.22326728701591492, 1.1610994338989258, -0.42028746008872986, 0.5775060057640076, 0.920266330242157, 0.023092618212103844, 0.7307104468345642, 0.26498058438301086, -0.29867368936538696, 0.4377734363079071, 0.6245076656341553, -0.11625919491052628, 0.47933056950569153, -0.009454566985368729, 0.17750854790210724, -0.18415677547454834, -0.022292543202638626, -0.38715660572052, 0.44336190819740295, 0.11851416528224945, -0.5950018167495728, -0.1721717119216919, -0.04186666011810303, 0.29812347888946533, -0.11537443101406097, -0.16400502622127533, 0.6773572564125061, 0.05248701572418213, -0.9148663878440857, 0.607433557510376, 0.0550697036087513, 0.8086773753166199, -0.7184778451919556, 0.23691560328006744, -0.04863523319363594, 0.3131220042705536, -0.1465260088443756, -0.591438889503479, 0.23813891410827637, 0.05178156867623329, -0.137862890958786, -0.34918901324272156, 0.7605310678482056, -0.514387845993042, -0.6851142048835754, 0.31223148107528687, 0.37423354387283325, 0.14884799718856812, -0.21968336403369904, -0.7543272376060486, 0.048164401203393936, 0.22202759981155396, -0.4046803116798401, 0.0887359082698822, 0.2733213007450104, 0.1455550491809845, 0.5028241276741028, 0.7151236534118652, 0.02817574515938759, 0.11932577192783356, -0.11472560465335846, 0.9337081909179688, -0.5384821891784668, -0.49623650312423706, -0.972667396068573, 0.7491358518600464, -0.10206665843725204, -0.387285053730011, 0.7565999627113342, 0.5986634492874146, 1.064803957939148, -0.25097402930259705, 0.9166281819343567, -0.3179720938205719, 0.44373008608818054, -0.42786726355552673, 0.765975296497345, -0.6153414845466614, -0.04907466843724251, -0.5871758460998535, -1.0291054248809814, -0.13518507778644562, 0.6546695232391357, -0.4076463282108307, 0.24740658700466156, 0.7764198780059814, 0.7809163331985474, -0.025713467970490456, -0.08746771514415741, -0.05775599554181099, 0.47890108823776245, 0.26988592743873596, 0.6047576069831848, 0.7156293988227844, -0.5203410387039185, 0.7840206623077393, -0.3103829026222229, -0.26533690094947815, -0.23013870418071747, -0.8273380398750305, -0.9896019697189331, -0.6096135973930359, -0.205343559384346, -0.4331251084804535, -0.059961773455142975, 0.6887761950492859, 0.5490282773971558, -0.6546356081962585, -0.14659619331359863, -0.3906184434890747, 0.029185647144913673, -0.1907937377691269, -0.30928730964660645, 0.3605405390262604, -0.3830086588859558, -0.83796626329422, 0.01343774888664484, -0.0975806713104248, -0.09370371699333191, -0.19507946074008942, -0.02667365036904812, -0.37565067410469055, 0.07464945316314697, 0.5395099520683289, 0.024224529042840004, -0.5131941437721252, -0.13912616670131683, 0.12295409291982651, -0.11782392859458923, -0.06792531907558441, 0.4790872037410736, -0.5449186563491821, 0.34432944655418396, 0.4463672637939453, 0.5379132628440857, 0.3943706452846527, 0.05185897275805473, 0.5051048994064331, -0.6224515438079834, 0.15063585340976715, 0.220243901014328, 0.33167997002601624, 0.27939534187316895, -0.4583090841770172, 0.47313255071640015, 0.2704267203807831, -0.6617886424064636, -0.8440939784049988, 0.18744193017482758, -0.862679123878479, -0.2582681477069855, 1.4259679317474365, 0.036109019070863724, -0.20256668329238892, 0.023787057027220726, -0.3682635426521301, 0.42444324493408203, -0.3882899284362793, 0.643646776676178, 0.7554453611373901, 0.2609255015850067, -0.04844680055975914, -0.5476632118225098, 0.4621348977088928, 0.35725662112236023, -0.7911452054977417, 0.09046300500631332, 0.4479375183582306, 0.29218852519989014, 0.20457062125205994, 0.8001222014427185, -0.08375771343708038, -0.005390804260969162, 0.028261370956897736, 0.1861175298690796, -0.009097527712583542, -0.23333613574504852, -0.08650162070989609, 0.06532581150531769, -0.3035261034965515, 0.011416904628276825 ]
facebook/bart-large
facebook
"2022-06-03T10:00:20Z"
840,506
126
transformers
[ "transformers", "pytorch", "tf", "jax", "rust", "bart", "feature-extraction", "en", "arxiv:1910.13461", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- license: apache-2.0 language: en --- # BART (large-sized model) BART model pre-trained on English language. It was introduced in the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461) by Lewis et al. and first released in [this repository](https://github.com/pytorch/fairseq/tree/master/examples/bart). Disclaimer: The team releasing BART did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description BART is a transformer encoder-decoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. BART is pre-trained by (1) corrupting text with an arbitrary noising function, and (2) learning a model to reconstruct the original text. BART is particularly effective when fine-tuned for text generation (e.g. summarization, translation) but also works well for comprehension tasks (e.g. text classification, question answering). ## Intended uses & limitations You can use the raw model for text infilling. However, the model is mostly meant to be fine-tuned on a supervised dataset. See the [model hub](https://huggingface.co/models?search=bart) to look for fine-tuned versions on a task that interests you. ### How to use Here is how to use this model in PyTorch: ```python from transformers import BartTokenizer, BartModel tokenizer = BartTokenizer.from_pretrained('facebook/bart-large') model = BartModel.from_pretrained('facebook/bart-large') inputs = tokenizer("Hello, my dog is cute", return_tensors="pt") outputs = model(**inputs) last_hidden_states = outputs.last_hidden_state ``` ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-1910-13461, author = {Mike Lewis and Yinhan Liu and Naman Goyal and Marjan Ghazvininejad and Abdelrahman Mohamed and Omer Levy and Veselin Stoyanov and Luke Zettlemoyer}, title = {{BART:} Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension}, journal = {CoRR}, volume = {abs/1910.13461}, year = {2019}, url = {http://arxiv.org/abs/1910.13461}, eprinttype = {arXiv}, eprint = {1910.13461}, timestamp = {Thu, 31 Oct 2019 14:02:26 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1910-13461.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.621846079826355, -1.0418742895126343, 0.23475515842437744, 0.22266598045825958, -0.3270135521888733, -0.03279434144496918, -0.3281371593475342, -0.41652220487594604, 0.4248315393924713, 0.40832746028900146, -0.43978413939476013, -0.3750535547733307, -0.5058669447898865, 0.36205238103866577, -0.34040457010269165, 1.304958462715149, 0.04504939541220665, -0.13390295207500458, -0.21300676465034485, 0.019508082419633865, -0.3111848533153534, -0.7456275224685669, -0.7959225177764893, -0.2635396718978882, 0.4557493031024933, 0.04825173318386078, 0.5306159853935242, 0.13797032833099365, 0.5577641725540161, 0.3722401559352875, -0.35165128111839294, -0.0586949847638607, -0.574492871761322, 0.06040746718645096, -0.034297626465559006, -0.3537087142467499, -0.7750190496444702, -0.034059543162584305, 0.9469220042228699, 0.8255590200424194, -0.02525206282734871, 0.3319818675518036, -0.04225577786564827, 0.6891874074935913, -0.39970773458480835, 0.18443726003170013, -0.40266236662864685, -0.21684913337230682, -0.18353603780269623, 0.04625938832759857, -0.4789672791957855, -0.3844549357891083, 0.06644187122583389, -0.6219651699066162, 0.34733808040618896, 0.1640055924654007, 1.2649391889572144, 0.1363735795021057, -0.33243030309677124, -0.009301191195845604, -0.5389524698257446, 0.6847160458564758, -0.9254501461982727, 0.347678005695343, 0.31458455324172974, 0.08123744279146194, -0.21107922494411469, -1.0562937259674072, -0.7764105200767517, -0.07279271632432938, -0.3256209194660187, 0.10997160524129868, -0.46483659744262695, 0.3090938329696655, 0.6177278161048889, 0.506165087223053, -0.8078527450561523, -0.24688930809497833, -0.547823965549469, -0.09950550645589828, 0.664979100227356, -0.012522869743406773, 0.030689435079693794, -0.30208563804626465, -0.2913999855518341, -0.3712243139743805, -0.42048415541648865, 0.16747835278511047, 0.31906190514564514, 0.1958407759666443, -0.2774113416671753, 0.5163378715515137, -0.1979958415031433, 0.6885870695114136, 0.21031886339187622, -0.06523359566926956, 0.6814398765563965, -0.28693634271621704, -0.32417890429496765, -0.09457450360059738, 1.0753318071365356, 0.16550570726394653, 0.3310336768627167, 0.15128165483474731, -0.29774531722068787, -0.11165526509284973, 0.235508531332016, -1.0804686546325684, -0.23050419986248016, -0.011391222476959229, -0.4990125000476837, -0.2758944630622864, 0.18218956887722015, -0.5063484907150269, 0.05408856272697449, -0.22906793653964996, 0.5339571237564087, -0.34453240036964417, -0.29109954833984375, 0.10839873552322388, -0.027960170060396194, -0.050067055970430374, 0.11207172274589539, -0.6573693156242371, 0.27800044417381287, 0.34864288568496704, 0.7951952219009399, 0.19283267855644226, -0.21365176141262054, -0.411051481962204, -0.1710340678691864, -0.5189184546470642, 0.39569956064224243, -0.29899439215660095, -0.09067671000957489, -0.14872227609157562, 0.4093325138092041, 0.07485172897577286, -0.29419225454330444, 0.296463280916214, -0.644392192363739, 0.39039120078086853, -0.18701183795928955, -0.4716207683086395, -0.47340306639671326, 0.11971018463373184, -0.7053278088569641, 1.1034049987792969, 0.13082996010780334, -0.9353055953979492, 0.20352643728256226, -0.786160945892334, -0.529434323310852, -0.052212104201316833, 0.3589572608470917, -0.6442470550537109, 0.2254277467727661, 0.32417985796928406, 0.6216283440589905, -0.1763322651386261, 0.5146366953849792, -0.35387223958969116, -0.3163350820541382, 0.18794292211532593, -0.45457711815834045, 0.9943798780441284, 0.3079262971878052, 0.030766701325774193, 0.2717340886592865, -0.7385838031768799, -0.1791677325963974, 0.41842108964920044, -0.3182159662246704, -0.39026492834091187, -0.3341576159000397, 0.10436356067657471, 0.06433320045471191, 0.3870181441307068, -0.5115152597427368, 0.1758400797843933, -0.6033234000205994, 0.5810551047325134, 0.4077177345752716, 0.17011253535747528, 0.4520398676395416, -0.4972034990787506, 0.5587323307991028, -0.13066813349723816, 0.02580908127129078, -0.4637816548347473, -0.5266891717910767, -0.5351952910423279, -0.42405033111572266, 0.46697157621383667, 0.2902543544769287, -0.5130966901779175, 0.6855446696281433, -0.4078690707683563, -0.554527223110199, -0.5490055084228516, -0.1313689947128296, 0.33607006072998047, 0.47535479068756104, 0.5004123449325562, -0.5885878205299377, -0.7409006357192993, -0.6566194295883179, -0.059383146464824677, -0.18342682719230652, 0.0770874172449112, 0.05042523518204689, 0.5206663608551025, -0.4143843352794647, 1.0070925951004028, -0.2818590998649597, -0.022601040080189705, -0.4439229965209961, 0.21893411874771118, 0.4558304250240326, 0.5681225657463074, 0.5363218188285828, -0.45195943117141724, -0.5522705912590027, -0.19477711617946625, -0.6287745833396912, -0.10963205993175507, -0.20303083956241608, -0.16447915136814117, 0.4820409417152405, 0.5924347639083862, -0.738010823726654, 0.5657575726509094, 0.5618804097175598, -0.3222449719905853, 0.5384674668312073, -0.27765533328056335, -0.10263267904520035, -1.2951397895812988, 0.4806956350803375, -0.16919609904289246, -0.594523012638092, -0.5822445154190063, 0.008049262687563896, 0.05836423859000206, -0.14609622955322266, -0.13949325680732727, 0.774581789970398, -0.6372063755989075, -0.038143206387758255, -0.03940979391336441, 0.18776653707027435, 0.26439371705055237, 0.521826982498169, 0.06492380052804947, 0.42695412039756775, 0.2902587950229645, -0.49680405855178833, 0.33167657256126404, 0.5480297207832336, -0.405605286359787, 0.347914457321167, -0.9020785689353943, 0.042540293186903, -0.2613149881362915, 0.5424239635467529, -1.0815470218658447, -0.2271123230457306, 0.23852767050266266, -0.5036730766296387, 0.5900382399559021, -0.14575734734535217, -0.5169869065284729, -0.8174414038658142, -0.18737296760082245, 0.4855951964855194, 0.6190180778503418, -0.4828159511089325, 0.38268524408340454, 0.12520110607147217, -0.41273102164268494, -0.7514466643333435, -0.707868754863739, -0.11811727285385132, -0.07800257951021194, -0.5069239139556885, 0.4208093583583832, -0.29193010926246643, 0.04199683666229248, 0.07156606018543243, -0.02647746168076992, 0.07777409255504608, -0.019022764638066292, 0.23182663321495056, 0.3276604413986206, -0.19553439319133759, 0.22544161975383759, 0.31503522396087646, -0.09088198095560074, 0.037130944430828094, 0.1372556984424591, 0.8199977874755859, -0.36112111806869507, -0.1262342482805252, -0.6670965552330017, 0.13642558455467224, 0.6575570106506348, -0.2841176986694336, 0.7464805245399475, 0.8190813660621643, -0.24601230025291443, 0.1304944008588791, -0.6309799551963806, -0.4790022671222687, -0.476496160030365, 0.5999704599380493, -0.4110795259475708, -0.8111055493354797, 0.5606302618980408, 0.018788546323776245, 0.17132267355918884, 0.5092787146568298, 0.5493890047073364, -0.04906009882688522, 0.7878642082214355, 0.5090089440345764, -0.1063772514462471, 0.7385424971580505, -0.48057395219802856, 0.3342304527759552, -0.8852042555809021, 0.05185414105653763, -0.16164764761924744, -0.3800499737262726, -0.4237079620361328, -0.2309504598379135, 0.14770232141017914, 0.4388051927089691, -0.6616338491439819, 0.4806670844554901, -0.5653018355369568, 0.24034741520881653, 0.7562798261642456, -0.09804851561784744, 0.2737409174442291, 0.1297396719455719, -0.0014371253782883286, 0.10699217766523361, -0.7477462291717529, -0.3241887390613556, 1.3162535429000854, 0.5032187104225159, 0.6359601616859436, -0.13615311682224274, 0.8029438257217407, 0.057923510670661926, 0.20686165988445282, -0.7590232491493225, 0.5097518563270569, 0.10907957702875137, -1.0126582384109497, -0.3943979740142822, -0.4667343199253082, -1.2860386371612549, 0.20097117125988007, -0.4146421253681183, -0.4476422667503357, 0.13302651047706604, 0.0658225417137146, -0.3115606904029846, 0.30078592896461487, -0.597379207611084, 0.9690584540367126, -0.02311491034924984, -0.16730745136737823, -0.2602703273296356, -0.9126719236373901, 0.2986540198326111, -0.08015976846218109, 0.24657580256462097, 0.10573989152908325, 0.3479345142841339, 0.9306273460388184, -0.46380800008773804, 0.9401700496673584, -0.16219504177570343, 0.018382880836725235, 0.40737131237983704, 0.13571558892726898, 0.5663836002349854, 0.0468020886182785, 0.1457899659872055, 0.42890024185180664, 0.28827473521232605, -0.38270363211631775, -0.2514200210571289, 0.3164178133010864, -0.7777003049850464, -0.4681422710418701, -0.4699534475803375, -0.6332271695137024, 0.030579328536987305, 0.4793436527252197, 0.44181615114212036, 0.6128383278846741, -0.34769564867019653, 0.27656659483909607, 0.33606579899787903, -0.4397415518760681, 0.7668797373771667, 0.35502541065216064, -0.5303183794021606, -0.6662812232971191, 0.7959998250007629, -0.059726424515247345, 0.31014981865882874, 0.34562039375305176, 0.1568111926317215, -0.30847084522247314, -0.2554786503314972, -0.24122047424316406, 0.7600155472755432, -0.42938682436943054, -0.3674847483634949, -0.5232065320014954, -0.3676474094390869, -0.5829349756240845, -0.2719174027442932, -0.4764687120914459, -0.4724311828613281, -0.22723990678787231, -0.006402234546840191, 0.40756696462631226, 0.7724058032035828, -0.31604334712028503, 0.559300422668457, -0.7361582517623901, 0.3461396098136902, 0.09371461719274521, 0.18743734061717987, 0.018793608993291855, -0.7439332008361816, -0.3051617443561554, 0.16183710098266602, -0.2886602580547333, -0.7043190002441406, 0.6943191289901733, 0.08914393186569214, 0.44825655221939087, 0.6819694638252258, 0.26486366987228394, 0.6018970608711243, -0.363753080368042, 0.6144956350326538, 0.49139413237571716, -0.8939764499664307, 0.44633573293685913, -0.19471001625061035, 0.12051432579755783, 0.3363814651966095, 0.3736967146396637, -0.6435821056365967, -0.26949790120124817, -0.8912892937660217, -0.938057005405426, 0.8889860510826111, -0.020479701459407806, 0.3019389510154724, -0.13319380581378937, 0.21717268228530884, 0.09624861925840378, 0.5122465491294861, -1.045393705368042, -0.36925801634788513, -0.2682623565196991, -0.3581472635269165, -0.2961041331291199, -0.4977690279483795, -0.0985451340675354, -0.585964560508728, 0.7605290412902832, 0.19920067489147186, 0.5829411149024963, 0.27561426162719727, -0.30886220932006836, -0.12794646620750427, 0.10936857759952545, 0.46756330132484436, 0.385962575674057, -0.4161226153373718, -0.09208203852176666, 0.08870787173509598, -0.5730239152908325, -0.1413489431142807, 0.2858828902244568, -0.16590222716331482, 0.21511341631412506, 0.47883522510528564, 1.1397849321365356, 0.03638654574751854, -0.5062872767448425, 0.7779169082641602, 0.21360346674919128, -0.4554787278175354, -0.3952142000198364, -0.2566350996494293, -0.0549287348985672, 0.28421732783317566, 0.1816599816083908, 0.09659866988658905, -0.08841552585363388, -0.5180103778839111, -0.05829405039548874, 0.4816763997077942, -0.18624179065227509, -0.514843225479126, 0.6998060941696167, 0.061572544276714325, -0.1333380490541458, 0.6415175199508667, -0.45171406865119934, -0.4892253279685974, 0.3816278278827667, 0.784451425075531, 0.6488980650901794, -0.1975950002670288, 0.22201797366142273, 0.8681159019470215, 0.358184278011322, -0.21660834550857544, 0.1578158736228943, -0.09786836057901382, -0.7463946342468262, -0.48008859157562256, -0.7699174880981445, -0.06802589446306229, 0.2925996780395508, -0.734748363494873, 0.2064644694328308, -0.5227022767066956, -0.42879945039749146, -0.2714983820915222, 0.2016785442829132, -0.6779734492301941, 0.17393596470355988, 0.1252448409795761, 0.652978777885437, -0.7691340446472168, 0.7410035133361816, 0.9205061197280884, -0.5998958945274353, -0.7509251832962036, -0.2274673730134964, -0.3944932520389557, -0.702406108379364, 0.6144221425056458, 0.08894608914852142, 0.30947786569595337, 0.24114367365837097, -0.6099198460578918, -1.0380464792251587, 0.9391834735870361, 0.3279306888580322, -0.7579298615455627, -0.26738283038139343, -0.12172629684209824, 0.48698845505714417, -0.08808635920286179, 0.41479331254959106, 0.32531437277793884, 0.49660077691078186, 0.005413547158241272, -1.041360855102539, 0.3067108988761902, -0.329833984375, 0.03373951464891434, 0.1337420642375946, -0.6266785860061646, 1.0369808673858643, -0.36610108613967896, -0.11961900442838669, 0.1795687973499298, 0.5200574398040771, 0.19993768632411957, 0.40191057324409485, 0.3674909174442291, 0.7608558535575867, 0.9381646513938904, -0.03930936008691788, 0.923464298248291, -0.20864461362361908, 0.5573124289512634, 0.9554553031921387, 0.2651544511318207, 0.8590294718742371, 0.36398833990097046, -0.4046526551246643, 0.7990804314613342, 0.5468336939811707, -0.09337843954563141, 0.531103789806366, 0.11028008908033371, 0.11089054495096207, -0.18353363871574402, 0.38003548979759216, -0.6786816120147705, 0.20063994824886322, 0.3467729985713959, -0.4627856910228729, 0.04800303652882576, 0.11151207238435745, 0.24485665559768677, -0.22967681288719177, -0.20523101091384888, 0.7231879830360413, 0.1334322839975357, -0.5008251667022705, 0.9584671258926392, -0.11532942205667496, 0.6499792337417603, -0.5315955877304077, 0.22954800724983215, -0.2697654068470001, 0.1288277506828308, -0.09565040469169617, -0.46402597427368164, 0.22137506306171417, -0.0987413078546524, -0.2616015672683716, -0.1477554440498352, 0.48547616600990295, -0.3953411281108856, -0.5132595300674438, 0.17906469106674194, 0.3941095471382141, 0.3687114417552948, -0.22526775300502777, -0.6224423050880432, -0.0313517302274704, -0.029605189338326454, -0.6980741024017334, 0.12392070889472961, 0.5247742533683777, 0.007665747310966253, 0.5459770560264587, 0.7528982758522034, 0.05796913802623749, 0.034801773726940155, 0.03427642211318016, 0.7432233095169067, -0.6757155656814575, -0.5193109512329102, -0.6334821581840515, 0.6368277072906494, -0.09437024593353271, -0.3187527060508728, 0.520937442779541, 0.5438001155853271, 0.9351305961608887, -0.16461849212646484, 0.7585583925247192, -0.27027323842048645, 0.628510594367981, -0.17174360156059265, 0.8662608861923218, -0.7853846549987793, -0.01906094327569008, -0.5737166404724121, -1.085747241973877, -0.4584226906299591, 1.0577150583267212, -0.4245176911354065, 0.19426274299621582, 0.8233048319816589, 0.7360048294067383, -0.032188378274440765, -0.12005817145109177, 0.26547014713287354, 0.6023592352867126, 0.1436062455177307, 0.3002941310405731, 0.6203087568283081, -0.6278241872787476, 0.548676609992981, -0.30137741565704346, -0.11684652417898178, -0.4637441039085388, -0.6674447059631348, -1.2426966428756714, -0.7467724680900574, -0.2236931324005127, -0.4768837094306946, -0.1036270260810852, 0.9784497618675232, 0.6429612040519714, -0.8263648152351379, -0.10441824793815613, -0.3650490939617157, -0.05706118792295456, -0.2175878882408142, -0.2307204306125641, 0.44067609310150146, -0.4902173578739166, -0.7223737239837646, 0.1342325508594513, -0.19805674254894257, 0.15578381717205048, 0.11596107482910156, -0.15289601683616638, -0.05073389410972595, 0.05573973432183266, 0.759326696395874, 0.3074917793273926, -0.6424434185028076, -0.09154362231492996, -0.030098237097263336, -0.06432592868804932, 0.004578313324600458, 0.34512582421302795, -0.7964114546775818, 0.49666327238082886, 0.4793635606765747, 0.47772452235221863, 0.8639346361160278, 0.12409457564353943, 0.4087323546409607, -0.7285593152046204, 0.3093949854373932, 0.08970341086387634, 0.4892941415309906, 0.3142019510269165, -0.032177384942770004, 0.4692465662956238, 0.5194686055183411, -0.6739082336425781, -1.0095871686935425, -0.04260269179940224, -1.1879273653030396, -0.34459686279296875, 1.146616816520691, -0.04903571680188179, -0.09693284332752228, 0.09478490054607391, -0.3775421679019928, 0.6057425141334534, -0.4747265577316284, 0.5387221574783325, 0.525942862033844, 0.22243757545948029, -0.06961413472890854, -0.4407932162284851, 0.3797268569469452, 0.29163238406181335, -0.44570401310920715, 0.08590396493673325, 0.42420676350593567, 0.3354325592517853, 0.17394901812076569, 0.6726993322372437, -0.0599866546690464, -0.005906862672418356, 0.05873759463429451, 0.5687788128852844, -0.1723208874464035, -0.24673907458782196, -0.280677855014801, 0.019059864804148674, -0.06390729546546936, -0.15766389667987823 ]
laion/CLIP-ViT-B-16-laion2B-s34B-b88K
laion
"2023-04-19T18:55:10Z"
837,184
18
open_clip
[ "open_clip", "zero-shot-image-classification", "arxiv:1910.04867", "license:mit", "has_space", "region:us" ]
zero-shot-image-classification
"2023-01-03T00:16:18Z"
--- license: mit pipeline_tag: zero-shot-image-classification library_name: open_clip --- # Model Card for CLIP ViT-B/16 - LAION-2B # Table of Contents 1. [Model Details](#model-details) 2. [Uses](#uses) 3. [Training Details](#training-details) 4. [Evaluation](#evaluation) 5. [Acknowledgements](#acknowledgements) 6. [Citation](#citation) # Model Details ## Model Description A CLIP ViT-B/16 model trained with the LAION-2B English subset of LAION-5B (https://laion.ai/blog/laion-5b/) using OpenCLIP (https://github.com/mlfoundations/open_clip). Model training done by Mehdi Cherti on the [JUWELS Booster](https://apps.fz-juelich.de/jsc/hps/juwels/booster-overview.html) supercomputer. See acknowledgements below. # Uses As per the original [OpenAI CLIP model card](https://github.com/openai/CLIP/blob/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1/model-card.md), this model is intended as a research output for research communities. We hope that this model will enable researchers to better understand and explore zero-shot, arbitrary image classification. We also hope it can be used for interdisciplinary studies of the potential impact of such model. The OpenAI CLIP paper includes a discussion of potential downstream impacts to provide an example for this sort of analysis. Additionally, the LAION-5B blog (https://laion.ai/blog/laion-5b/) and upcoming paper include additional discussion as it relates specifically to the training dataset. ## Direct Use Zero-shot image classification, image and text retrieval, among others. ## Downstream Use Image classification and other image task fine-tuning, linear probe image classification, image generation guiding and conditioning, among others. ## Out-of-Scope Use As per the OpenAI models, **Any** deployed use case of the model - whether commercial or not - is currently out of scope. Non-deployed use cases such as image search in a constrained environment, are also not recommended unless there is thorough in-domain testing of the model with a specific, fixed class taxonomy. This is because our safety assessment demonstrated a high need for task specific testing especially given the variability of CLIP’s performance with different class taxonomies. This makes untested and unconstrained deployment of the model in any use case currently potentially harmful. Certain use cases which would fall under the domain of surveillance and facial recognition are always out-of-scope regardless of performance of the model. This is because the use of artificial intelligence for tasks such as these can be premature currently given the lack of testing norms and checks to ensure its fair use. Since the model has not been purposefully trained in or evaluated on any languages other than English, its use should be limited to English language use cases. Further the above notice, the LAION-5B dataset used in training of these models has additional considerations, see below. # Training Details ## Training Data This model was trained with the 2 Billion sample English subset of LAION-5B (https://laion.ai/blog/laion-5b/). **IMPORTANT NOTE:** The motivation behind dataset creation is to democratize research and experimentation around large-scale multi-modal model training and handling of uncurated, large-scale datasets crawled from publically available internet. Our recommendation is therefore to use the dataset for research purposes. Be aware that this large-scale dataset is uncurated. Keep in mind that the uncurated nature of the dataset means that collected links may lead to strongly discomforting and disturbing content for a human viewer. Therefore, please use the demo links with caution and at your own risk. It is possible to extract a “safe” subset by filtering out samples based on the safety tags (using a customized trained NSFW classifier that we built). While this strongly reduces the chance for encountering potentially harmful content when viewing, we cannot entirely exclude the possibility for harmful content being still present in safe mode, so that the warning holds also there. We think that providing the dataset openly to broad research and other interested communities will allow for transparent investigation of benefits that come along with training large-scale models as well as pitfalls and dangers that may stay unreported or unnoticed when working with closed large datasets that remain restricted to a small community. Providing our dataset openly, we however do not recommend using it for creating ready-to-go industrial products, as the basic research about general properties and safety of such large-scale models, which we would like to encourage with this release, is still in progress. ## Training Procedure TODO # Evaluation Evaluation done with code in the [LAION CLIP Benchmark suite](https://github.com/LAION-AI/CLIP_benchmark). ## Testing Data, Factors & Metrics ### Testing Data The testing is performed with VTAB+ (A combination of VTAB (https://arxiv.org/abs/1910.04867) w/ additional robustness datasets) for classification and COCO and Flickr for retrieval. ## Results The model achieves a 70.2 zero-shot top-1 accuracy on ImageNet-1k. An initial round of benchmarks have been performed on a wider range of datasets, currently viewable at https://github.com/LAION-AI/CLIP_benchmark/blob/main/benchmark/results.ipynb # Acknowledgements Acknowledging the Gauss Centre for Supercomputing e.V. (http://gauss-centre.eu) for funding this part of work by providing computing time through the John von Neumann Institute for Computing (NIC) on the GCS Supercomputer JUWELS Booster at Jülich Supercomputing Centre (JSC). # Citation **BibTeX:** LAION-5B ```bibtex @inproceedings{schuhmann2022laionb, title={{LAION}-5B: An open large-scale dataset for training next generation image-text models}, author={Christoph Schuhmann and Romain Beaumont and Richard Vencu and Cade W Gordon and Ross Wightman and Mehdi Cherti and Theo Coombes and Aarush Katta and Clayton Mullis and Mitchell Wortsman and Patrick Schramowski and Srivatsa R Kundurthy and Katherine Crowson and Ludwig Schmidt and Robert Kaczmarczyk and Jenia Jitsev}, booktitle={Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track}, year={2022}, url={https://openreview.net/forum?id=M3Y74vmsMcY} } ``` OpenAI CLIP paper ``` @inproceedings{Radford2021LearningTV, title={Learning Transferable Visual Models From Natural Language Supervision}, author={Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and Sandhini Agarwal and Girish Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and Ilya Sutskever}, booktitle={ICML}, year={2021} } ``` OpenCLIP software ``` @software{ilharco_gabriel_2021_5143773, author = {Ilharco, Gabriel and Wortsman, Mitchell and Wightman, Ross and Gordon, Cade and Carlini, Nicholas and Taori, Rohan and Dave, Achal and Shankar, Vaishaal and Namkoong, Hongseok and Miller, John and Hajishirzi, Hannaneh and Farhadi, Ali and Schmidt, Ludwig}, title = {OpenCLIP}, month = jul, year = 2021, note = {If you use this software, please cite it as below.}, publisher = {Zenodo}, version = {0.1}, doi = {10.5281/zenodo.5143773}, url = {https://doi.org/10.5281/zenodo.5143773} } ```
[ -0.2700490653514862, -0.5031748414039612, 0.18077832460403442, 0.05486532300710678, -0.361762136220932, -0.4457259178161621, -0.19322334229946136, -0.6856111288070679, -0.052199363708496094, 0.4060100317001343, -0.4048060476779938, -0.5068123936653137, -0.548528790473938, -0.04164464399218559, -0.3783148527145386, 0.8735126852989197, -0.1859288215637207, -0.019201962277293205, -0.29494452476501465, -0.39302095770835876, -0.45677450299263, -0.5790824294090271, -0.4531419575214386, 0.045237161219120026, 0.17629767954349518, 0.26116693019866943, 0.5727961659431458, 0.8065650463104248, 0.7068738341331482, 0.211459219455719, -0.07682905346155167, 0.07031472027301788, -0.5350456237792969, -0.48616698384284973, -0.0651925578713417, -0.2917771637439728, -0.5524479746818542, 0.11626621335744858, 0.5937979221343994, 0.34971824288368225, -0.027657989412546158, 0.2656252980232239, 0.014211931265890598, 0.3934279680252075, -0.8224793672561646, 0.23458079993724823, -0.567027747631073, -0.001690058154053986, -0.24417175352573395, 0.06210549175739288, -0.36042383313179016, -0.13699078559875488, 0.1549547165632248, -0.6862640976905823, 0.21569675207138062, -0.16472385823726654, 1.3948804140090942, 0.18280154466629028, -0.3242263197898865, 0.19304287433624268, -0.6567456126213074, 0.7662971019744873, -0.7611329555511475, 0.31515541672706604, 0.3227830231189728, 0.35404080152511597, 0.20370453596115112, -0.840114176273346, -0.45492345094680786, -0.11505205184221268, 0.14317616820335388, 0.2969333529472351, -0.32804057002067566, -0.006802656222134829, 0.44777366518974304, 0.16666464507579803, -0.3212158679962158, 0.026133965700864792, -0.6963428854942322, -0.017315268516540527, 0.6601845026016235, 0.004009854514151812, 0.2909521758556366, -0.3283731937408447, -0.6582501530647278, -0.4036444127559662, -0.6061826348304749, 0.39558207988739014, 0.2889913320541382, -0.0902293398976326, -0.4478435516357422, 0.39614972472190857, -0.02797807566821575, 0.46060290932655334, -0.10489339381456375, -0.2124113291501999, 0.48567119240760803, -0.49248895049095154, -0.31048715114593506, -0.24470406770706177, 1.0714696645736694, 0.637844979763031, 0.18098479509353638, 0.13263684511184692, 0.009243139065802097, -0.1431322544813156, 0.2657587230205536, -1.021151065826416, -0.10832792520523071, -0.043239470571279526, -0.5915636420249939, -0.31474387645721436, 0.4093877673149109, -0.6982876062393188, 0.01821502298116684, -0.12657079100608826, 0.4934168756008148, -0.5141456127166748, -0.1894836574792862, -0.007069549988955259, -0.08989688009023666, 0.25078877806663513, 0.2309270203113556, -0.6171495914459229, 0.1285591870546341, 0.3289247751235962, 1.0142682790756226, -0.19122755527496338, -0.3670308291912079, -0.23374459147453308, 0.2258244901895523, -0.3529767096042633, 0.5265235304832458, -0.21079614758491516, -0.29364848136901855, -0.0674932599067688, 0.3542378544807434, -0.06760943681001663, -0.5343325734138489, 0.6459590196609497, -0.283651202917099, 0.07336519658565521, -0.17303714156150818, -0.2346431314945221, -0.557327389717102, 0.0651920884847641, -0.6274621486663818, 0.9163121581077576, -0.012644502334296703, -0.8601258993148804, 0.31044790148735046, -0.5600405931472778, -0.2273099571466446, -0.15174821019172668, -0.09857912361621857, -0.589600682258606, -0.19672994315624237, 0.5305033922195435, 0.554491400718689, -0.34857356548309326, 0.45989271998405457, -0.5586262345314026, -0.3833497166633606, 0.2904384732246399, -0.5299942493438721, 0.9995995163917542, 0.022780688479542732, -0.3647836148738861, 0.13201667368412018, -0.6052922010421753, -0.0870242640376091, 0.24451009929180145, 0.03147690370678902, -0.25343021750450134, -0.22404345870018005, -0.01293153502047062, 0.2439015656709671, 0.15443155169487, -0.5614787936210632, 0.004865067545324564, -0.12019316107034683, 0.448381245136261, 0.7565041780471802, 0.11398263275623322, 0.2656894028186798, -0.3754895329475403, 0.5255342125892639, 0.12591798603534698, 0.6060494780540466, -0.27084067463874817, -0.47116363048553467, -0.690189778804779, -0.5734867453575134, 0.41705021262168884, 0.5543668866157532, -0.6959080100059509, 0.3907315135002136, -0.3198029696941376, -0.4797317087650299, -0.39284443855285645, -0.09507313370704651, 0.5016241073608398, 0.49467551708221436, 0.4471815526485443, -0.4438855051994324, -0.44704803824424744, -0.8817238807678223, 0.16684359312057495, -0.001357925939373672, -0.036169759929180145, 0.6900326609611511, 0.6782852411270142, -0.1310359090566635, 0.8460127711296082, -0.6798180341720581, -0.4876704812049866, -0.131575807929039, 0.07495758682489395, 0.11301905661821365, 0.42259371280670166, 0.835728108882904, -0.8289542198181152, -0.47224658727645874, -0.1234142854809761, -1.1764180660247803, -0.0006293680635280907, -0.0863853245973587, -0.2415274828672409, 0.1901300847530365, 0.5969474911689758, -0.5198392868041992, 0.7013943791389465, 0.3873244822025299, 0.06695884466171265, 0.48456257581710815, -0.17160063982009888, 0.004541732370853424, -1.1011940240859985, 0.3460099697113037, 0.08499404788017273, -0.13573656976222992, -0.5013325214385986, -0.04462577775120735, 0.09155598282814026, -0.2867615222930908, -0.8052365183830261, 0.594489574432373, -0.3983733355998993, 0.030704256147146225, -0.029179656878113747, 0.003552913200110197, 0.10947195440530777, 0.5771017074584961, 0.06280878931283951, 0.9122263789176941, 0.7179193496704102, -0.6172652840614319, 0.05506866052746773, 0.3494645357131958, -0.37801411747932434, 0.42214739322662354, -0.9145666360855103, 0.06391879916191101, -0.09215988963842392, 0.23864240944385529, -0.364744633436203, -0.3701774775981903, 0.3421662151813507, -0.4629114270210266, 0.31726622581481934, -0.26360848546028137, -0.23175939917564392, -0.4094045162200928, -0.5713926553726196, 0.5695782899856567, 0.6489472389221191, -0.6289476156234741, 0.2885989844799042, 0.412177711725235, 0.11181317269802094, -0.7693667411804199, -0.6920715570449829, -0.2233169674873352, -0.25501734018325806, -0.6408752202987671, 0.4293043613433838, -0.08045192807912827, 0.08706148713827133, 0.08335395902395248, 0.11763491481542587, -0.15236887335777283, -0.11198755353689194, 0.6437076926231384, 0.5331591963768005, -0.03568996861577034, -0.1161355972290039, -0.0799616202712059, 0.012839622795581818, -0.03765770047903061, -0.18125730752944946, 0.20003588497638702, -0.11516941338777542, -0.25731581449508667, -0.6190921664237976, 0.23067329823970795, 0.5288081765174866, -0.4199722409248352, 0.7533525824546814, 0.7444712519645691, -0.4431937336921692, 0.010319371707737446, -0.3401617705821991, 0.007242347113788128, -0.4619676172733307, 0.48976728320121765, -0.05998563393950462, -0.5840054750442505, 0.45652979612350464, 0.18372927606105804, -0.0835840106010437, 0.554180920124054, 0.32458987832069397, -0.08866714686155319, 0.8632703423500061, 0.8458662033081055, -0.016683276742696762, 0.6905809640884399, -0.767875075340271, 0.15948328375816345, -0.9964317679405212, -0.33205780386924744, -0.19905881583690643, -0.12339268624782562, -0.515429675579071, -0.5452086925506592, 0.6188272833824158, 0.3271009922027588, -0.12504591047763824, 0.39668041467666626, -0.34408578276634216, 0.3423900008201599, 0.5511952638626099, 0.33908963203430176, 0.016808640211820602, 0.020847409963607788, -0.04470239207148552, -0.06926555931568146, -0.6693665385246277, -0.3740432560443878, 1.1809442043304443, 0.5495026111602783, 0.7149523496627808, -0.084231898188591, 0.4499781131744385, 0.16814640164375305, 0.08380430936813354, -0.6316686868667603, 0.6765346527099609, -0.4429323375225067, -0.6329178810119629, -0.29623889923095703, -0.3868151009082794, -0.8600062131881714, 0.007359335198998451, -0.056458789855241776, -0.7631157040596008, 0.46541711688041687, 0.022001242265105247, -0.32541194558143616, 0.5006049275398254, -0.5859577655792236, 0.9243305921554565, -0.3117951452732086, -0.36758124828338623, 0.030339697375893593, -0.7149419784545898, 0.44973552227020264, 0.15741300582885742, 0.034788891673088074, -0.1835896521806717, 0.10557477921247482, 1.001615285873413, -0.5218616127967834, 0.8717434406280518, -0.18730181455612183, 0.2618311941623688, 0.6128556728363037, -0.29648759961128235, 0.14750045537948608, 0.13998430967330933, 0.09517821669578552, 0.756088137626648, 0.039906833320856094, -0.24267898499965668, -0.36860981583595276, 0.45792970061302185, -0.9080517888069153, -0.2511865198612213, -0.47600916028022766, -0.5382376313209534, 0.1845337450504303, 0.35503748059272766, 0.6845979690551758, 0.6795659065246582, -0.06636682897806168, 0.3765904903411865, 0.5547730326652527, -0.40004515647888184, 0.5608546137809753, 0.2457849383354187, -0.11756419390439987, -0.6755222082138062, 1.0318256616592407, 0.3513546288013458, 0.3226533830165863, 0.16497625410556793, 0.043230973184108734, -0.08959203958511353, -0.4453051686286926, -0.4845406413078308, 0.31627318263053894, -0.7508137822151184, -0.39979955554008484, -0.5008363127708435, -0.497964084148407, -0.3875539004802704, -0.05251827463507652, -0.3830997943878174, -0.22132034599781036, -0.6223230361938477, -0.04787171259522438, 0.268442302942276, 0.5396814346313477, -0.14553576707839966, 0.27064546942710876, -0.7574816346168518, 0.32926541566848755, 0.23821081221103668, 0.3765708804130554, 0.0253338310867548, -0.6485577821731567, -0.3109096586704254, 0.17546816170215607, -0.5670425891876221, -0.6202430725097656, 0.35453522205352783, 0.3100859224796295, 0.4926633834838867, 0.6049672365188599, 0.12305425107479095, 0.5502960681915283, -0.4153970777988434, 0.9991451501846313, 0.30920085310935974, -0.776663064956665, 0.4860672056674957, -0.531359851360321, 0.2782230079174042, 0.5535906553268433, 0.7181646823883057, -0.1839229017496109, 0.028394130989909172, -0.7070242762565613, -0.9139128923416138, 0.9270567297935486, 0.17345629632472992, 0.06381125003099442, 0.13463686406612396, 0.31959056854248047, -0.006387814879417419, 0.11683720350265503, -0.9144423604011536, -0.0789736658334732, -0.4095080494880676, -0.12316723167896271, 0.1574135273694992, -0.314755916595459, -0.12837429344654083, -0.4008466899394989, 0.7905409336090088, -0.27330541610717773, 0.6533188819885254, 0.2910272479057312, -0.16825827956199646, -0.01291730348020792, 0.025700051337480545, 0.4933375418186188, 0.5945591926574707, -0.41031548380851746, -0.18185476958751678, 0.10329147428274155, -0.6242631077766418, -0.0720081552863121, 0.17576642334461212, -0.691207766532898, -0.10512654483318329, 0.4829975664615631, 1.2305234670639038, 0.10718560218811035, -0.6306091547012329, 0.9119099378585815, -0.05253014340996742, -0.3728424906730652, -0.2965857684612274, 0.07506664842367172, -0.3075094223022461, 0.20866206288337708, 0.18178479373455048, 0.1489473432302475, 0.1482507586479187, -0.5335668921470642, 0.17019839584827423, 0.4714508056640625, -0.5088930130004883, -0.4214390814304352, 0.7906420826911926, -0.010772165842354298, -0.07127062976360321, 0.5913884043693542, -0.13830892741680145, -0.5050237774848938, 0.6478614807128906, 0.4881705939769745, 0.9266773462295532, 0.004627672489732504, 0.33510202169418335, 0.6589747667312622, 0.2726944088935852, -0.15941579639911652, 0.1530633270740509, 0.13965727388858795, -0.5086257457733154, -0.12263836711645126, -0.4086132049560547, -0.2874954640865326, 0.32996827363967896, -0.8696677088737488, 0.4912629723548889, -0.6165214776992798, -0.3749416470527649, -0.08621717244386673, -0.4103556275367737, -0.5249155759811401, 0.19221538305282593, 0.19812695682048798, 0.88381028175354, -0.7822130918502808, 0.6781661510467529, 0.6597583293914795, -0.7720942497253418, -0.8482268452644348, 0.16829507052898407, -0.1973142772912979, -0.3995864689350128, 0.4322144091129303, 0.5013027787208557, 0.008856822736561298, -0.3304443359375, -0.8619508743286133, -0.9501025676727295, 1.3465042114257812, 0.5260604023933411, -0.1916579157114029, -0.13177254796028137, 0.06981018930673599, 0.41364097595214844, -0.20732294023036957, 0.4397941827774048, 0.2060968428850174, 0.1254725158214569, 0.08076655864715576, -0.9870471954345703, -0.030599553138017654, -0.3295068144798279, 0.22344817221164703, -0.008988219313323498, -1.0793479681015015, 0.9665277004241943, -0.2554895281791687, -0.2895403504371643, 0.06052679568529129, 0.7194740772247314, -0.016741592437028885, 0.336955189704895, 0.3530369699001312, 0.5987679362297058, 0.5116763114929199, -0.02995215728878975, 1.046669363975525, -0.130855530500412, 0.33809465169906616, 1.0755648612976074, -0.1355728805065155, 0.9245844483375549, 0.24778172373771667, -0.1982484757900238, 0.4415903091430664, 0.36249515414237976, -0.35000231862068176, 0.65056312084198, -0.30273306369781494, 0.12524548172950745, -0.07583126425743103, -0.46165454387664795, -0.3990996479988098, 0.5327677726745605, 0.008039777167141438, -0.37403103709220886, 0.0154676279053092, 0.328220397233963, 0.023452242836356163, -0.21566727757453918, -0.13993701338768005, 0.5121749043464661, 0.17309515178203583, -0.5050032734870911, 0.8339835405349731, 0.05144396424293518, 0.6785294413566589, -0.6578352451324463, -0.051705967634916306, -0.11307971179485321, 0.3258827030658722, -0.18895581364631653, -0.7352707386016846, 0.23804935812950134, 0.007083078846335411, -0.17898930609226227, -0.11734206229448318, 0.7140464186668396, -0.17544373869895935, -0.47946327924728394, 0.42628875374794006, -0.027324222028255463, 0.15798473358154297, 0.06507647037506104, -0.5988745093345642, 0.11038103699684143, 0.014952347613871098, -0.08215778321027756, 0.37376028299331665, 0.2077731490135193, -0.27411070466041565, 0.6522321701049805, 0.5711104273796082, -0.08979689329862595, 0.19898612797260284, -0.06148286908864975, 0.9151327013969421, -0.41883575916290283, -0.5173130631446838, -0.5624115467071533, 0.5275116562843323, -0.2102736383676529, -0.451280415058136, 0.7563969492912292, 0.551559567451477, 1.0308036804199219, -0.17309130728244781, 0.7278923988342285, -0.2079782783985138, 0.2527252733707428, -0.6108943819999695, 0.6716007590293884, -0.6490668654441833, 0.10538099706172943, -0.4533383846282959, -0.690180242061615, -0.1582632064819336, 0.5397244691848755, -0.28775933384895325, 0.10583501309156418, 0.7144089341163635, 0.7164139747619629, -0.28132790327072144, -0.07842698693275452, 0.22824087738990784, 0.17483195662498474, 0.29605913162231445, 0.5314102172851562, 0.5313276648521423, -0.7771347761154175, 0.6582068204879761, -0.6838541030883789, -0.30950865149497986, -0.16612878441810608, -0.8415780663490295, -1.1070963144302368, -0.6115260124206543, -0.385123610496521, -0.1502922922372818, 0.03988465666770935, 0.657214343547821, 0.9319750666618347, -0.725135087966919, -0.29346734285354614, 0.19192218780517578, -0.16799908876419067, -0.3116476833820343, -0.22104039788246155, 0.5160899758338928, 0.23187978565692902, -0.55073082447052, 0.17470206320285797, 0.20441189408302307, 0.2348380833864212, -0.06103990972042084, -0.016663528978824615, -0.4352039694786072, -0.006335140205919743, 0.4041958749294281, 0.37775155901908875, -0.5632587671279907, -0.19995057582855225, 0.1546555608510971, 0.05959642305970192, 0.26057663559913635, 0.5369982123374939, -0.5736497640609741, 0.4234358072280884, 0.4722103476524353, 0.4807104468345642, 0.6543858647346497, 0.16884897649288177, 0.19539546966552734, -0.6854333877563477, 0.3754282295703888, 0.034308239817619324, 0.32761284708976746, 0.3596736192703247, -0.38882917165756226, 0.6468424797058105, 0.407142698764801, -0.4232925474643707, -0.9223272204399109, -0.09610749781131744, -1.0809026956558228, -0.1324075311422348, 1.1641058921813965, -0.47839176654815674, -0.4486052393913269, 0.3545289635658264, -0.2076074630022049, 0.39361733198165894, -0.33083051443099976, 0.3826300799846649, 0.4091399908065796, 0.02800869010388851, -0.35640227794647217, -0.8166012763977051, 0.3064325749874115, 0.17231528460979462, -0.9154303073883057, -0.12806549668312073, 0.3787575960159302, 0.3586753308773041, 0.20331276953220367, 0.5402705073356628, -0.26365360617637634, 0.32763952016830444, -0.07467635720968246, 0.24828532338142395, -0.3714563250541687, -0.6537767648696899, -0.501211941242218, 0.020368382334709167, -0.2524636685848236, -0.4166797697544098 ]
openai/whisper-large
openai
"2023-09-08T13:08:10Z"
826,639
386
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "whisper", "automatic-speech-recognition", "audio", "hf-asr-leaderboard", "en", "zh", "de", "es", "ru", "ko", "fr", "ja", "pt", "tr", "pl", "ca", "nl", "ar", "sv", "it", "id", "hi", "fi", "vi", "he", "uk", "el", "ms", "cs", "ro", "da", "hu", "ta", "no", "th", "ur", "hr", "bg", "lt", "la", "mi", "ml", "cy", "sk", "te", "fa", "lv", "bn", "sr", "az", "sl", "kn", "et", "mk", "br", "eu", "is", "hy", "ne", "mn", "bs", "kk", "sq", "sw", "gl", "mr", "pa", "si", "km", "sn", "yo", "so", "af", "oc", "ka", "be", "tg", "sd", "gu", "am", "yi", "lo", "uz", "fo", "ht", "ps", "tk", "nn", "mt", "sa", "lb", "my", "bo", "tl", "mg", "as", "tt", "haw", "ln", "ha", "ba", "jw", "su", "arxiv:2212.04356", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-09-26T06:56:04Z"
--- language: - en - zh - de - es - ru - ko - fr - ja - pt - tr - pl - ca - nl - ar - sv - it - id - hi - fi - vi - he - uk - el - ms - cs - ro - da - hu - ta - no - th - ur - hr - bg - lt - la - mi - ml - cy - sk - te - fa - lv - bn - sr - az - sl - kn - et - mk - br - eu - is - hy - ne - mn - bs - kk - sq - sw - gl - mr - pa - si - km - sn - yo - so - af - oc - ka - be - tg - sd - gu - am - yi - lo - uz - fo - ht - ps - tk - nn - mt - sa - lb - my - bo - tl - mg - as - tt - haw - ln - ha - ba - jw - su tags: - audio - automatic-speech-recognition - hf-asr-leaderboard widget: - example_title: Librispeech sample 1 src: https://cdn-media.huggingface.co/speech_samples/sample1.flac - example_title: Librispeech sample 2 src: https://cdn-media.huggingface.co/speech_samples/sample2.flac model-index: - name: whisper-large results: - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: LibriSpeech (clean) type: librispeech_asr config: clean split: test args: language: en metrics: - name: Test WER type: wer value: 3.0 - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: LibriSpeech (other) type: librispeech_asr config: other split: test args: language: en metrics: - name: Test WER type: wer value: 5.4 - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Common Voice 11.0 type: mozilla-foundation/common_voice_11_0 config: hi split: test args: language: hi metrics: - name: Test WER type: wer value: 54.8 pipeline_tag: automatic-speech-recognition license: apache-2.0 --- # Whisper Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation. Trained on 680k hours of labelled data, Whisper models demonstrate a strong ability to generalise to many datasets and domains **without** the need for fine-tuning. Whisper was proposed in the paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) by Alec Radford et al from OpenAI. The original code repository can be found [here](https://github.com/openai/whisper). <div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400"> <p><b>Update:</b> following the release of the paper, the Whisper authors announced a <a href="ttps://huggingface.co/openai/whisper-large-v2"> large-v2</a> model trained for 2.5x more epochs with regularization. This <a href="ttps://huggingface.co/openai/whisper-large-v2"> large-v2</a> model surpasses the performance of the large model, with no architecture changes. Thus, it is recommended that the <a href="ttps://huggingface.co/openai/whisper-large-v2"> large-v2</a> model is used in-place of the original large model. </p> </div> **Disclaimer**: Content for this model card has partly been written by the Hugging Face team, and parts of it were copied and pasted from the original model card. ## Model details Whisper is a Transformer based encoder-decoder model, also referred to as a _sequence-to-sequence_ model. It was trained on 680k hours of labelled speech data annotated using large-scale weak supervision. The models were trained on either English-only data or multilingual data. The English-only models were trained on the task of speech recognition. The multilingual models were trained on both speech recognition and speech translation. For speech recognition, the model predicts transcriptions in the *same* language as the audio. For speech translation, the model predicts transcriptions to a *different* language to the audio. Whisper checkpoints come in five configurations of varying model sizes. The smallest four are trained on either English-only or multilingual data. The largest checkpoints are multilingual only. All ten of the pre-trained checkpoints are available on the [Hugging Face Hub](https://huggingface.co/models?search=openai/whisper). The checkpoints are summarised in the following table with links to the models on the Hub: | Size | Parameters | English-only | Multilingual | |----------|------------|------------------------------------------------------|-----------------------------------------------------| | tiny | 39 M | [✓](https://huggingface.co/openai/whisper-tiny.en) | [✓](https://huggingface.co/openai/whisper-tiny) | | base | 74 M | [✓](https://huggingface.co/openai/whisper-base.en) | [✓](https://huggingface.co/openai/whisper-base) | | small | 244 M | [✓](https://huggingface.co/openai/whisper-small.en) | [✓](https://huggingface.co/openai/whisper-small) | | medium | 769 M | [✓](https://huggingface.co/openai/whisper-medium.en) | [✓](https://huggingface.co/openai/whisper-medium) | | large | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large) | | large-v2 | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large-v2) | # Usage To transcribe audio samples, the model has to be used alongside a [`WhisperProcessor`](https://huggingface.co/docs/transformers/model_doc/whisper#transformers.WhisperProcessor). The `WhisperProcessor` is used to: 1. Pre-process the audio inputs (converting them to log-Mel spectrograms for the model) 2. Post-process the model outputs (converting them from tokens to text) The model is informed of which task to perform (transcription or translation) by passing the appropriate "context tokens". These context tokens are a sequence of tokens that are given to the decoder at the start of the decoding process, and take the following order: 1. The transcription always starts with the `<|startoftranscript|>` token 2. The second token is the language token (e.g. `<|en|>` for English) 3. The third token is the "task token". It can take one of two values: `<|transcribe|>` for speech recognition or `<|translate|>` for speech translation 4. In addition, a `<|notimestamps|>` token is added if the model should not include timestamp prediction Thus, a typical sequence of context tokens might look as follows: ``` <|startoftranscript|> <|en|> <|transcribe|> <|notimestamps|> ``` Which tells the model to decode in English, under the task of speech recognition, and not to predict timestamps. These tokens can either be forced or un-forced. If they are forced, the model is made to predict each token at each position. This allows one to control the output language and task for the Whisper model. If they are un-forced, the Whisper model will automatically predict the output langauge and task itself. The context tokens can be set accordingly: ```python model.config.forced_decoder_ids = WhisperProcessor.get_decoder_prompt_ids(language="english", task="transcribe") ``` Which forces the model to predict in English under the task of speech recognition. ## Transcription ### English to English In this example, the context tokens are 'unforced', meaning the model automatically predicts the output language (English) and task (transcribe). ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large") >>> model.config.forced_decoder_ids = None >>> # load dummy dataset and read audio files >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False) ['<|startoftranscript|><|en|><|transcribe|><|notimestamps|> Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.<|endoftext|>'] >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.'] ``` The context tokens can be removed from the start of the transcription by setting `skip_special_tokens=True`. ### French to French The following example demonstrates French to French transcription by setting the decoder ids appropriately. ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import Audio, load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large") >>> forced_decoder_ids = processor.get_decoder_prompt_ids(language="french", task="transcribe") >>> # load streaming dataset and read first audio sample >>> ds = load_dataset("common_voice", "fr", split="test", streaming=True) >>> ds = ds.cast_column("audio", Audio(sampling_rate=16_000)) >>> input_speech = next(iter(ds))["audio"] >>> input_features = processor(input_speech["array"], sampling_rate=input_speech["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids) ['<|startoftranscript|><|fr|><|transcribe|><|notimestamps|> Un vrai travail intéressant va enfin être mené sur ce sujet.<|endoftext|>'] >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' Un vrai travail intéressant va enfin être mené sur ce sujet.'] ``` ## Translation Setting the task to "translate" forces the Whisper model to perform speech translation. ### French to English ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import Audio, load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large") >>> forced_decoder_ids = processor.get_decoder_prompt_ids(language="french", task="translate") >>> # load streaming dataset and read first audio sample >>> ds = load_dataset("common_voice", "fr", split="test", streaming=True) >>> ds = ds.cast_column("audio", Audio(sampling_rate=16_000)) >>> input_speech = next(iter(ds))["audio"] >>> input_features = processor(input_speech["array"], sampling_rate=input_speech["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' A very interesting work, we will finally be given on this subject.'] ``` ## Evaluation This code snippet shows how to evaluate Whisper Large on [LibriSpeech test-clean](https://huggingface.co/datasets/librispeech_asr): ```python >>> from datasets import load_dataset >>> from transformers import WhisperForConditionalGeneration, WhisperProcessor >>> import torch >>> from evaluate import load >>> librispeech_test_clean = load_dataset("librispeech_asr", "clean", split="test") >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large").to("cuda") >>> def map_to_pred(batch): >>> audio = batch["audio"] >>> input_features = processor(audio["array"], sampling_rate=audio["sampling_rate"], return_tensors="pt").input_features >>> batch["reference"] = processor.tokenizer._normalize(batch['text']) >>> >>> with torch.no_grad(): >>> predicted_ids = model.generate(input_features.to("cuda"))[0] >>> transcription = processor.decode(predicted_ids) >>> batch["prediction"] = processor.tokenizer._normalize(transcription) >>> return batch >>> result = librispeech_test_clean.map(map_to_pred) >>> wer = load("wer") >>> print(100 * wer.compute(references=result["reference"], predictions=result["prediction"])) 3.0003583080317572 ``` ## Long-Form Transcription The Whisper model is intrinsically designed to work on audio samples of up to 30s in duration. However, by using a chunking algorithm, it can be used to transcribe audio samples of up to arbitrary length. This is possible through Transformers [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline) method. Chunking is enabled by setting `chunk_length_s=30` when instantiating the pipeline. With chunking enabled, the pipeline can be run with batched inference. It can also be extended to predict sequence level timestamps by passing `return_timestamps=True`: ```python >>> import torch >>> from transformers import pipeline >>> from datasets import load_dataset >>> device = "cuda:0" if torch.cuda.is_available() else "cpu" >>> pipe = pipeline( >>> "automatic-speech-recognition", >>> model="openai/whisper-large", >>> chunk_length_s=30, >>> device=device, >>> ) >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> prediction = pipe(sample.copy(), batch_size=8)["text"] " Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel." >>> # we can also return timestamps for the predictions >>> prediction = pipe(sample.copy(), batch_size=8, return_timestamps=True)["chunks"] [{'text': ' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.', 'timestamp': (0.0, 5.44)}] ``` Refer to the blog post [ASR Chunking](https://huggingface.co/blog/asr-chunking) for more details on the chunking algorithm. ## Fine-Tuning The pre-trained Whisper model demonstrates a strong ability to generalise to different datasets and domains. However, its predictive capabilities can be improved further for certain languages and tasks through *fine-tuning*. The blog post [Fine-Tune Whisper with 🤗 Transformers](https://huggingface.co/blog/fine-tune-whisper) provides a step-by-step guide to fine-tuning the Whisper model with as little as 5 hours of labelled data. ### Evaluated Use The primary intended users of these models are AI researchers studying robustness, generalization, capabilities, biases, and constraints of the current model. However, Whisper is also potentially quite useful as an ASR solution for developers, especially for English speech recognition. We recognize that once models are released, it is impossible to restrict access to only “intended” uses or to draw reasonable guidelines around what is or is not research. The models are primarily trained and evaluated on ASR and speech translation to English tasks. They show strong ASR results in ~10 languages. They may exhibit additional capabilities, particularly if fine-tuned on certain tasks like voice activity detection, speaker classification, or speaker diarization but have not been robustly evaluated in these areas. We strongly recommend that users perform robust evaluations of the models in a particular context and domain before deploying them. In particular, we caution against using Whisper models to transcribe recordings of individuals taken without their consent or purporting to use these models for any kind of subjective classification. We recommend against use in high-risk domains like decision-making contexts, where flaws in accuracy can lead to pronounced flaws in outcomes. The models are intended to transcribe and translate speech, use of the model for classification is not only not evaluated but also not appropriate, particularly to infer human attributes. ## Training Data The models are trained on 680,000 hours of audio and the corresponding transcripts collected from the internet. 65% of this data (or 438,000 hours) represents English-language audio and matched English transcripts, roughly 18% (or 126,000 hours) represents non-English audio and English transcripts, while the final 17% (or 117,000 hours) represents non-English audio and the corresponding transcript. This non-English data represents 98 different languages. As discussed in [the accompanying paper](https://cdn.openai.com/papers/whisper.pdf), we see that performance on transcription in a given language is directly correlated with the amount of training data we employ in that language. ## Performance and Limitations Our studies show that, over many existing ASR systems, the models exhibit improved robustness to accents, background noise, technical language, as well as zero shot translation from multiple languages into English; and that accuracy on speech recognition and translation is near the state-of-the-art level. However, because the models are trained in a weakly supervised manner using large-scale noisy data, the predictions may include texts that are not actually spoken in the audio input (i.e. hallucination). We hypothesize that this happens because, given their general knowledge of language, the models combine trying to predict the next word in audio with trying to transcribe the audio itself. Our models perform unevenly across languages, and we observe lower accuracy on low-resource and/or low-discoverability languages or languages where we have less training data. The models also exhibit disparate performance on different accents and dialects of particular languages, which may include higher word error rate across speakers of different genders, races, ages, or other demographic criteria. Our full evaluation results are presented in [the paper accompanying this release](https://cdn.openai.com/papers/whisper.pdf). In addition, the sequence-to-sequence architecture of the model makes it prone to generating repetitive texts, which can be mitigated to some degree by beam search and temperature scheduling but not perfectly. Further analysis on these limitations are provided in [the paper](https://cdn.openai.com/papers/whisper.pdf). It is likely that this behavior and hallucinations may be worse on lower-resource and/or lower-discoverability languages. ## Broader Implications We anticipate that Whisper models’ transcription capabilities may be used for improving accessibility tools. While Whisper models cannot be used for real-time transcription out of the box – their speed and size suggest that others may be able to build applications on top of them that allow for near-real-time speech recognition and translation. The real value of beneficial applications built on top of Whisper models suggests that the disparate performance of these models may have real economic implications. There are also potential dual use concerns that come with releasing Whisper. While we hope the technology will be used primarily for beneficial purposes, making ASR technology more accessible could enable more actors to build capable surveillance technologies or scale up existing surveillance efforts, as the speed and accuracy allow for affordable automatic transcription and translation of large volumes of audio communication. Moreover, these models may have some capabilities to recognize specific individuals out of the box, which in turn presents safety concerns related both to dual use and disparate performance. In practice, we expect that the cost of transcription is not the limiting factor of scaling up surveillance projects. ### BibTeX entry and citation info ```bibtex @misc{radford2022whisper, doi = {10.48550/ARXIV.2212.04356}, url = {https://arxiv.org/abs/2212.04356}, author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya}, title = {Robust Speech Recognition via Large-Scale Weak Supervision}, publisher = {arXiv}, year = {2022}, copyright = {arXiv.org perpetual, non-exclusive license} } ```
[ -0.2597225606441498, -0.5764500498771667, 0.11017391085624695, 0.4718245565891266, -0.11116199195384979, -0.14674173295497894, -0.32645830512046814, -0.6456541419029236, 0.25916191935539246, 0.44112396240234375, -0.8014466762542725, -0.5671787858009338, -0.7472246289253235, -0.04951435700058937, -0.5073636174201965, 1.0984059572219849, 0.06937998533248901, -0.043999750167131424, 0.1995803266763687, -0.1296219378709793, -0.40594980120658875, -0.47287681698799133, -0.7110000848770142, -0.18515923619270325, 0.22896388173103333, 0.15556004643440247, 0.4319537878036499, 0.5374184846878052, 0.08989797532558441, 0.40230801701545715, -0.4711427092552185, -0.07306662946939468, -0.42622965574264526, -0.11740969121456146, 0.39794325828552246, -0.5139618515968323, -0.6668568849563599, 0.1529991328716278, 0.7719988226890564, 0.5422354936599731, -0.2557387948036194, 0.3623043894767761, 0.27416014671325684, 0.34694182872772217, -0.3094049394130707, 0.32103171944618225, -0.6326819062232971, -0.1317157745361328, -0.29761752486228943, 0.013802392408251762, -0.3225049376487732, -0.2534392178058624, 0.5798183679580688, -0.5982168316841125, 0.2848321199417114, 0.02557223103940487, 1.0327489376068115, 0.1729009747505188, -0.19318528473377228, -0.32921302318573, -0.6987943053245544, 1.0113259553909302, -0.8556401133537292, 0.5219266414642334, 0.5063244700431824, 0.2051045447587967, -0.045091189444065094, -0.8660699725151062, -0.7048202157020569, -0.018740743398666382, -0.11353638023138046, 0.30096492171287537, -0.4407440423965454, 0.04938126727938652, 0.24841098487377167, 0.3272213935852051, -0.4945935308933258, 0.03372751548886299, -0.6516954898834229, -0.7264454960823059, 0.5964720249176025, -0.023044981062412262, 0.3125934898853302, -0.24029165506362915, -0.2371472269296646, -0.2951827645301819, -0.3412259817123413, 0.46670669317245483, 0.35313233733177185, 0.5008687376976013, -0.7107610106468201, 0.374670147895813, -0.1419866383075714, 0.6589338183403015, 0.16158060729503632, -0.6780365109443665, 0.6565995216369629, -0.23138652741909027, -0.16768194735050201, 0.3249470591545105, 1.0017647743225098, 0.31066983938217163, 0.1512150764465332, 0.02597838267683983, -0.22551685571670532, 0.10374285280704498, -0.10677690804004669, -0.7787861824035645, 0.07485572248697281, 0.4692245423793793, -0.6058105826377869, -0.34369489550590515, -0.246352881193161, -0.5378095507621765, 0.17038357257843018, -0.25342118740081787, 0.6920819282531738, -0.5425859689712524, -0.4321735203266144, 0.17034542560577393, -0.39293742179870605, 0.28317561745643616, 0.07986535876989365, -0.814906120300293, 0.38883864879608154, 0.4460411071777344, 0.9351202249526978, 0.06029677018523216, -0.6685808300971985, -0.5612104535102844, 0.07083884626626968, 0.06174157187342644, 0.46573173999786377, -0.2794256806373596, -0.5488860607147217, -0.06492704898118973, 0.1613016277551651, -0.38358157873153687, -0.5035982131958008, 0.7064100503921509, -0.137771338224411, 0.4441760778427124, -0.11687444150447845, -0.49953410029411316, -0.26468443870544434, -0.1527215540409088, -0.48871055245399475, 0.9255950450897217, 0.13416850566864014, -0.7360197305679321, 0.17895518243312836, -0.542218804359436, -0.48299065232276917, -0.19374243915081024, 0.30710411071777344, -0.45072969794273376, -0.03358010947704315, 0.4552818238735199, 0.5034912824630737, -0.10519864410161972, 0.09002569317817688, 0.03237728774547577, -0.4227827787399292, 0.3219310939311981, -0.3983156681060791, 0.9966387152671814, 0.17363175749778748, -0.3699864447116852, 0.1816864013671875, -0.7953372597694397, 0.02411290630698204, 0.06557219475507736, -0.24904432892799377, 0.0726194977760315, -0.05499499663710594, 0.2983832061290741, 0.09520487487316132, 0.22427615523338318, -0.7414003014564514, -0.06293394416570663, -0.6428238153457642, 0.882823646068573, 0.5842515826225281, -0.02915061078965664, 0.3887578845024109, -0.5696748495101929, 0.3140677213668823, 0.16258317232131958, 0.4256364107131958, -0.3347257077693939, -0.6669460535049438, -0.8689229488372803, -0.40134286880493164, 0.4745216965675354, 0.7582346796989441, -0.3806407153606415, 0.5775811076164246, -0.20761772990226746, -0.6136777997016907, -1.2284419536590576, -0.10109984874725342, 0.5993584394454956, 0.6359588503837585, 0.6253730058670044, -0.07133189588785172, -0.6779825091362, -0.7913253307342529, -0.11979737877845764, -0.3441605567932129, -0.1331816464662552, 0.35768046975135803, 0.355697363615036, -0.36075231432914734, 0.7156545519828796, -0.41352227330207825, -0.5541008114814758, -0.31195729970932007, 0.03973318263888359, 0.39992907643318176, 0.6077695488929749, 0.37582847476005554, -0.7730083465576172, -0.3730332851409912, -0.20771025121212006, -0.579418420791626, -0.13704724609851837, -0.09948268532752991, -0.03540520742535591, 0.23051469027996063, 0.4736734628677368, -0.7155014276504517, 0.5002935528755188, 0.7282523512840271, -0.20105481147766113, 0.6732361316680908, 0.11650432646274567, -0.05389437824487686, -1.2216088771820068, 0.051713816821575165, -0.15735799074172974, -0.11775074899196625, -0.7097489833831787, -0.18861660361289978, -0.08318080008029938, -0.12172969430685043, -0.5509926080703735, 0.6894658207893372, -0.3567662239074707, 0.05530187115073204, -0.0365166962146759, 0.14581404626369476, -0.0204178299754858, 0.6655189394950867, 0.2629251778125763, 0.6753441691398621, 0.8425973653793335, -0.580219566822052, 0.20993651449680328, 0.5553063154220581, -0.26234927773475647, 0.3522891402244568, -0.9985523223876953, 0.1304076462984085, 0.07358403503894806, 0.24786576628684998, -0.8900917172431946, -0.1421305537223816, 0.05075819045305252, -0.9326779842376709, 0.44732901453971863, -0.366911917924881, -0.3110678195953369, -0.543525218963623, -0.15506549179553986, 0.0931902825832367, 0.8876519799232483, -0.5288745760917664, 0.7181766033172607, 0.45474258065223694, -0.23092076182365417, -0.577480137348175, -0.6383464932441711, -0.08415938913822174, -0.18219144642353058, -0.8044357299804688, 0.5003494620323181, -0.03797335550189018, 0.05418477579951286, -0.13265535235404968, -0.012827067635953426, 0.11502565443515778, -0.19395031034946442, 0.4967776834964752, 0.41744983196258545, -0.11872315406799316, -0.2106654942035675, 0.22553429007530212, -0.22218400239944458, -0.012948631308972836, -0.27192771434783936, 0.6540314555168152, -0.23788334429264069, 0.004145193845033646, -0.8259704113006592, 0.3705158531665802, 0.6137693524360657, -0.38740992546081543, 0.7034260034561157, 0.7535132169723511, -0.32092010974884033, -0.13275790214538574, -0.6908338069915771, -0.15659545361995697, -0.542975664138794, 0.18219666182994843, -0.5009802579879761, -0.8597372174263, 0.8362749218940735, 0.24941317737102509, 0.21850474178791046, 0.6377859711647034, 0.4976276755332947, -0.1280004382133484, 1.098685383796692, 0.568894624710083, -0.32489296793937683, 0.3138030469417572, -0.6238544583320618, -0.10828235000371933, -1.075171947479248, -0.4417610466480255, -0.5821337699890137, -0.21507607400417328, -0.4640826880931854, -0.2588069438934326, 0.5100157856941223, 0.21946853399276733, -0.05976918712258339, 0.49646466970443726, -0.6847256422042847, 0.0003208382986485958, 0.6712810397148132, 0.04329068213701248, 0.08549848943948746, -0.05698144808411598, -0.22022461891174316, -0.021696297451853752, -0.47294268012046814, -0.35748448967933655, 1.0261611938476562, 0.5329161882400513, 0.4551006555557251, -0.056055981665849686, 0.7402309775352478, -0.05358691141009331, 0.0533696785569191, -0.830333411693573, 0.5025244951248169, -0.08252917975187302, -0.5528531074523926, -0.3805503845214844, -0.2876742482185364, -0.8876547813415527, 0.15614116191864014, -0.17794300615787506, -0.7402650713920593, 0.08310282975435257, 0.002336022909730673, -0.28527626395225525, 0.21695420145988464, -0.7683755159378052, 0.6290099620819092, 0.1993800401687622, 0.15861903131008148, 0.021166138350963593, -0.7400672435760498, 0.18541471660137177, 0.07672643661499023, 0.09992755204439163, -0.0317525789141655, 0.1377306431531906, 1.0646036863327026, -0.5480250716209412, 0.9911139607429504, -0.3622266948223114, -0.00609058141708374, 0.46935373544692993, -0.14151084423065186, 0.38532137870788574, -0.24467334151268005, -0.12378902733325958, 0.48609474301338196, 0.3256832957267761, -0.30943775177001953, -0.3050328195095062, 0.5099608302116394, -1.070796012878418, -0.35439735651016235, -0.2519155442714691, -0.3194832503795624, -0.1613650918006897, 0.23705726861953735, 0.882495641708374, 0.7746029496192932, -0.1906110942363739, -0.03254436329007149, 0.44918861985206604, -0.30697962641716003, 0.5342838168144226, 0.6618586182594299, -0.23880711197853088, -0.5021775960922241, 0.9016294479370117, 0.28257983922958374, 0.23895229399204254, 0.2648858428001404, 0.3819243609905243, -0.44611093401908875, -0.6885302066802979, -0.5630173087120056, 0.37926340103149414, -0.4981244206428528, -0.14361274242401123, -0.9482095241546631, -0.5897285342216492, -0.7069891691207886, 0.012217423878610134, -0.3704870641231537, -0.26686012744903564, -0.4587441682815552, 0.07815089821815491, 0.6055611371994019, 0.49697133898735046, 0.0022332752123475075, 0.5508321523666382, -0.9755815863609314, 0.39297783374786377, 0.35410359501838684, 0.18321189284324646, 0.06872580200433731, -1.0034862756729126, -0.0631067305803299, 0.23326556384563446, -0.20024147629737854, -0.7058756947517395, 0.4626062512397766, 0.3751799166202545, 0.5505735874176025, 0.3223288655281067, 0.00898051355034113, 0.8418325781822205, -0.7545453906059265, 0.8854003548622131, 0.19697323441505432, -1.237810492515564, 0.7728202939033508, -0.42827287316322327, 0.32276761531829834, 0.3909187614917755, 0.3921622335910797, -0.7201508283615112, -0.4934482276439667, -0.6456266641616821, -0.6330409049987793, 0.8014681935310364, 0.29608839750289917, 0.1783163994550705, 0.12119907140731812, 0.36360645294189453, 0.07849108427762985, 0.13169047236442566, -0.49061065912246704, -0.42856365442276, -0.4554050862789154, -0.2308066338300705, -0.1809462010860443, -0.1890067458152771, -0.06570323556661606, -0.5165191292762756, 0.7122033834457397, -0.06455546617507935, 0.5708479285240173, 0.3890129625797272, 0.022802742198109627, -0.045985784381628036, 0.04827481508255005, 0.5694192051887512, 0.2953398823738098, -0.19121280312538147, -0.4172945022583008, 0.30117693543434143, -0.8222749829292297, -0.07157011330127716, 0.28341174125671387, -0.3012528121471405, 0.11181790381669998, 0.8147073984146118, 1.2573059797286987, 0.23328210413455963, -0.49540120363235474, 0.7672118544578552, -0.1227366030216217, -0.39773717522621155, -0.5274537801742554, 0.049770575016736984, 0.2644818425178528, 0.2551233768463135, 0.32119810581207275, 0.08856100589036942, 0.12593351304531097, -0.5253149271011353, 0.07301127910614014, 0.3220888674259186, -0.45821359753608704, -0.5877804160118103, 0.8072087168693542, 0.19155128300189972, -0.441197007894516, 0.6867371797561646, 0.07628592103719711, -0.8015521764755249, 0.47272583842277527, 0.7194836139678955, 1.002012848854065, -0.5131426453590393, 0.06041182205080986, 0.4809555411338806, 0.22405703365802765, -0.07179117947816849, 0.505673885345459, -0.1396287977695465, -0.7463416457176208, -0.4424215853214264, -1.0506716966629028, -0.2936026155948639, 0.17165669798851013, -0.9952400326728821, 0.33397042751312256, -0.29509854316711426, -0.27825167775154114, 0.29231929779052734, 0.04942026734352112, -0.7815306782722473, 0.16536904871463776, 0.11152560263872147, 1.1406652927398682, -0.7495920062065125, 0.9735265374183655, 0.27157312631607056, -0.23483215272426605, -1.1307746171951294, 0.05391564965248108, 0.08047975599765778, -1.0719616413116455, 0.36211007833480835, 0.3629065752029419, -0.17306336760520935, 0.1208048090338707, -0.5821350812911987, -0.8430472612380981, 1.0216856002807617, 0.13337627053260803, -0.7020810842514038, -0.1377997249364853, -0.11335665732622147, 0.5661985874176025, -0.29725539684295654, 0.13204489648342133, 0.7144495248794556, 0.4117795526981354, 0.13489070534706116, -1.4877302646636963, -0.08797232061624527, -0.3080178201198578, -0.15497621893882751, 0.047853726893663406, -0.8107814788818359, 0.841052770614624, -0.3645663559436798, -0.2629048526287079, 0.29679223895072937, 0.6915137767791748, 0.25032153725624084, 0.25977078080177307, 0.6466132998466492, 0.5317067503929138, 0.7658705115318298, -0.1819595992565155, 1.067055583000183, -0.22901269793510437, 0.09208433330059052, 0.8938770890235901, -0.09080376476049423, 1.1727049350738525, 0.22746388614177704, -0.39390793442726135, 0.5745310187339783, 0.4162514805793762, 0.04923636466264725, 0.5062809586524963, -0.09466391056776047, -0.3105652332305908, 0.1260465681552887, -0.09842242300510406, -0.47913113236427307, 0.8107789158821106, 0.41698944568634033, -0.2862783670425415, 0.3450116813182831, 0.30515074729919434, 0.18945837020874023, -0.186128169298172, -0.2982783615589142, 1.0051015615463257, 0.14168956875801086, -0.6387069821357727, 0.8729838132858276, 0.01698065735399723, 1.0107923746109009, -0.8457972407341003, 0.23613333702087402, 0.04806293919682503, 0.14302721619606018, -0.1862313151359558, -0.6802908182144165, 0.3295460641384125, -0.1367071270942688, -0.29733502864837646, -0.16616031527519226, 0.5708968639373779, -0.6856829524040222, -0.5003824234008789, 0.5620701313018799, 0.3392268717288971, 0.31530943512916565, -0.1515745222568512, -0.8709946870803833, 0.45241501927375793, 0.16371683776378632, -0.2577894628047943, 0.23688986897468567, 0.20765097439289093, 0.24380508065223694, 0.6236743330955505, 0.8472697138786316, 0.3940461575984955, 0.1364547312259674, 0.18685214221477509, 0.8728395700454712, -0.6563740968704224, -0.7113476395606995, -0.6295381188392639, 0.49462446570396423, 0.04399583116173744, -0.5319463014602661, 0.7876668572425842, 0.47457271814346313, 0.7078276872634888, 0.09146679192781448, 0.7599314451217651, 0.0684579461812973, 0.9755256772041321, -0.5896943211555481, 0.8243826627731323, -0.4720954895019531, -0.03449289873242378, -0.3875097930431366, -0.7843825817108154, 0.05384322628378868, 0.5872924327850342, -0.040833353996276855, -0.05110468715429306, 0.34573760628700256, 0.8737256526947021, 0.10274830460548401, 0.23087632656097412, 0.08787473291158676, 0.4201573431491852, 0.21382728219032288, 0.5894336700439453, 0.6036760807037354, -0.7675089240074158, 0.6140288710594177, -0.4939691722393036, -0.33435526490211487, 0.05422656238079071, -0.6195662021636963, -1.0195726156234741, -0.9245392680168152, -0.29615890979766846, -0.5912052989006042, -0.24672168493270874, 0.7635710835456848, 0.9723849296569824, -0.8054960370063782, -0.29976487159729004, 0.34058040380477905, -0.09411213546991348, -0.3674834072589874, -0.2484980821609497, 0.5430663228034973, -0.0038028848357498646, -0.8860961198806763, 0.5755444765090942, 0.042958226054906845, 0.37979626655578613, -0.23413081467151642, -0.22239695489406586, 0.09469173848628998, 0.06382982432842255, 0.5932797789573669, 0.29441171884536743, -0.8584038615226746, -0.1561466008424759, 0.11977649480104446, 0.0701117292046547, -0.046970829367637634, 0.45441561937332153, -0.7616309523582458, 0.36628109216690063, 0.33596184849739075, 0.13173224031925201, 0.8246961832046509, -0.31717777252197266, 0.3741980791091919, -0.7743865847587585, 0.46858903765678406, 0.16766013205051422, 0.35888588428497314, 0.3563016653060913, -0.2877155840396881, 0.17314837872982025, 0.27252665162086487, -0.5571468472480774, -1.0811657905578613, -0.08499595522880554, -1.1748862266540527, -0.12122005969285965, 1.058012843132019, 0.006163028068840504, -0.3346405029296875, -0.10392653942108154, -0.3427659571170807, 0.42745858430862427, -0.4816451966762543, 0.3288061320781708, 0.5963265299797058, 0.0617884062230587, -0.08207198977470398, -0.5800806283950806, 0.7668189406394958, 0.16561691462993622, -0.292819082736969, -0.03870249539613724, 0.07739680260419846, 0.5937949419021606, 0.289002925157547, 0.8940119743347168, -0.2641422152519226, 0.20769129693508148, 0.12412146478891373, 0.13849295675754547, -0.10998121649026871, -0.2413071095943451, -0.4670056402683258, -0.05464927852153778, -0.2940309941768646, -0.39567166566848755 ]
skt/kobert-base-v1
skt
"2021-07-01T07:16:05Z"
820,095
15
transformers
[ "transformers", "pytorch", "bert", "feature-extraction", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
Please refer here. https://github.com/SKTBrain/KoBERT
[ -0.09115322679281235, -0.4601583778858185, 0.6185545921325684, 0.4111168086528778, -0.627291202545166, 0.19024181365966797, -0.011014670133590698, -0.0774608626961708, 0.06354743242263794, 0.8166062831878662, -0.21710416674613953, -0.5962783098220825, -0.2788880467414856, -0.48246151208877563, -0.10623157769441605, 1.3141275644302368, -0.37340405583381653, 0.4248247444629669, -0.17841148376464844, -0.5986741185188293, -0.5346634387969971, -0.306042343378067, -0.8895348310470581, -0.25904905796051025, 0.4564494788646698, 0.4720223546028137, 0.24169974029064178, -0.12360496073961258, 0.6102176904678345, 0.22291259467601776, 0.1436677873134613, -0.6613219976425171, -0.33231261372566223, 0.32164281606674194, -0.1703672558069229, -0.4129180610179901, -0.9326328039169312, -0.19598281383514404, 0.8520702123641968, 0.30608540773391724, -0.06885376572608948, 0.749210000038147, 0.14576515555381775, 1.230905532836914, -0.4582127630710602, 0.5229713320732117, -0.04765460640192032, 0.12715965509414673, -0.22642648220062256, -0.2380557507276535, -0.5046052932739258, -1.155030608177185, -0.38952192664146423, -0.6486057043075562, -0.10979379713535309, -0.09759949892759323, 0.9379100203514099, 0.26806873083114624, -0.8311172127723694, 0.2692491114139557, -0.8619922399520874, 0.14834164083003998, -0.39014923572540283, 0.7896287441253662, 0.3364707827568054, 0.8574725985527039, 0.04180968925356865, -0.7139401435852051, -0.014115569181740284, -1.0947555303573608, 0.05476671829819679, 0.434712290763855, 0.3370189666748047, 0.004266130272299051, 0.3997068703174591, 0.15931177139282227, -0.8823676705360413, -0.9840732216835022, -1.0964566469192505, -0.33645886182785034, 0.4266233742237091, -0.034529682248830795, 0.6769442558288574, -0.19310592114925385, -0.6753856539726257, -0.1633833646774292, -0.3712450861930847, 0.32898372411727905, 0.3700537383556366, 0.23127402365207672, -0.28182652592658997, 0.5950846076011658, 0.22015151381492615, 0.5207309722900391, -0.004659568425267935, -0.022230014204978943, 0.6989375948905945, -0.20789071917533875, 0.1192740797996521, 0.5017748475074768, 0.27612078189849854, 0.3643687665462494, 0.3288412094116211, -0.03413382172584534, -0.06400725245475769, 0.06799187511205673, 0.583518385887146, -0.5013582110404968, -1.1718252897262573, 0.14599797129631042, -0.14580853283405304, 0.23395805060863495, 0.46185368299484253, -0.43064555525779724, 0.029358908534049988, -0.35801589488983154, 0.7531793117523193, -0.8875312209129333, -0.4504157304763794, -0.41097086668014526, -0.27244439721107483, 0.17220115661621094, 0.20472201704978943, -0.1792728155851364, 0.47746923565864563, 0.3970044255256653, 0.6543359160423279, 0.31935736536979675, -0.621329665184021, -0.520658016204834, 0.4339804947376251, -0.1895832121372223, 0.9720664620399475, -0.03294223174452782, -0.5371636748313904, -0.2881024479866028, 0.14014501869678497, -0.1423429548740387, -0.439815491437912, 0.9110011458396912, -0.28618165850639343, -0.5691984295845032, 0.14210039377212524, -0.48923951387405396, 0.03988471254706383, 0.20583657920360565, -0.8002874851226807, 1.292290449142456, 0.8593635559082031, -0.6910974979400635, 0.2792859375476837, -1.1695685386657715, -0.32286423444747925, 0.4696442484855652, -0.03189830109477043, -0.5531712174415588, 0.062196653336286545, -0.42048272490501404, -0.16639383137226105, 0.33879929780960083, 0.273776113986969, -0.6519173383712769, -0.2622985541820526, 0.3263057470321655, 0.4615403413772583, 0.9873949289321899, 0.49849605560302734, -0.053083635866642, 0.5183842778205872, -0.7172626256942749, 0.3486274778842926, 0.154662624001503, -0.2520885765552521, -0.4659021496772766, -0.4552064538002014, -0.03699015453457832, -0.25995492935180664, 0.47150540351867676, -0.3841260075569153, 0.3510511517524719, -0.026810750365257263, 0.12743134796619415, 0.7411679625511169, 0.0038760460447520018, 0.6831884980201721, -0.01381085254251957, 0.6454383134841919, -0.09516933560371399, 0.6788744926452637, 0.21540865302085876, -0.3140946328639984, -0.53404301404953, 0.13360793888568878, 0.4329090416431427, 0.7279942631721497, -0.7405264377593994, 0.10250848531723022, 0.02407352812588215, -0.8416945338249207, -0.22138124704360962, -0.032585259526968, 0.20447583496570587, 0.41450798511505127, 0.006814318709075451, -0.4576079249382019, -0.768786609172821, -0.8810501098632812, 0.014418425969779491, -0.6898353099822998, 0.17160634696483612, 0.5432946681976318, 0.5458707809448242, -0.0008306218078359962, 0.9749519228935242, -0.5914266705513, 0.16855555772781372, -0.08203556388616562, -0.06371597945690155, -0.010700814425945282, 0.4947545826435089, 0.911220908164978, -0.8586059808731079, -1.0508267879486084, -0.1389150172472, -0.3696684241294861, -0.0606786385178566, 0.48612454533576965, -0.6419596672058105, -0.10325027257204056, 0.18548302352428436, -0.4561575949192047, 0.5360144376754761, 0.3243650197982788, -0.44662705063819885, 0.694561243057251, 0.019639695063233376, 0.4107981026172638, -1.5253068208694458, 0.34688377380371094, -0.17423194646835327, -0.4936222732067108, -0.4139176309108734, -0.07331492751836777, 0.5619044899940491, -0.1892135590314865, -0.5320565104484558, 0.5103071331977844, -0.2873610556125641, -0.6156540513038635, 0.05827592685818672, 0.7561715841293335, -0.12377842515707016, -0.06069476529955864, -0.5768305063247681, 1.2474088668823242, 0.5865166187286377, -0.5057080984115601, 0.8052525520324707, 0.2481202632188797, -0.053318873047828674, 0.44020864367485046, -0.5430402159690857, 0.029889710247516632, 0.39050430059432983, 0.5592775940895081, -0.9680401086807251, -0.31711331009864807, 0.7598196864128113, -0.7239242792129517, 0.2877914309501648, -0.9053293466567993, -0.19828547537326813, -0.8631467223167419, -0.75350421667099, 0.45064055919647217, 0.7257336378097534, -0.29264578223228455, 0.16508178412914276, 0.8786853551864624, -0.41020438075065613, -0.18538157641887665, -0.37999075651168823, -0.38131746649742126, -0.2410905659198761, -0.34332168102264404, -0.16223128139972687, -0.5780719518661499, -0.4973696768283844, -0.08913853764533997, -0.20391473174095154, -0.3467220366001129, -0.06894617527723312, 0.511576771736145, 0.6186925768852234, -0.6059905290603638, 0.34135910868644714, -0.1906309276819229, -0.671139657497406, 0.07644332945346832, -0.5354862809181213, 0.22182798385620117, -0.6968168020248413, -0.5098328590393066, 0.12000725418329239, -0.076812244951725, 0.5582709908485413, 0.1825432926416397, 0.4430023729801178, 0.9679840207099915, -0.19235514104366302, 0.3215716481208801, -0.3199329674243927, -0.16750743985176086, -0.48307475447654724, 0.2173265814781189, -0.008883167989552021, -0.7620463967323303, 0.39519086480140686, -0.4906492233276367, -0.3440013527870178, 0.9143874049186707, 0.8657339215278625, 0.17063598334789276, 0.7552053928375244, 0.74625563621521, -0.09167642146348953, 0.6214566230773926, 0.05734194815158844, 0.4719679057598114, -0.9591543078422546, -0.22199371457099915, -0.6078383326530457, 0.19723987579345703, -0.5113853812217712, 0.25269532203674316, 0.044767025858163834, 0.5890060663223267, -0.49487006664276123, 0.9562892317771912, -1.1037883758544922, 0.6197784543037415, 0.6001688241958618, 0.041636962443590164, -0.09239891171455383, -0.45198988914489746, -0.4126625061035156, -0.050248924642801285, -0.44539156556129456, -0.5243905186653137, 1.1348503828048706, -0.034945737570524216, 0.9312454462051392, 0.21234852075576782, 0.7517060041427612, 0.18914827704429626, 0.4617994427680969, -0.35813385248184204, 0.7702555656433105, 0.40847864747047424, -0.717092752456665, -0.24997344613075256, -0.06321337074041367, -1.0678883790969849, -0.2539050877094269, 0.09156147390604019, -1.2438991069793701, -0.3698812425136566, 0.4741096794605255, -0.09362440556287766, 0.3702751696109772, -1.1777622699737549, 1.1569095849990845, -0.42174413800239563, -0.12043407559394836, 0.12753815948963165, -0.6229934096336365, 0.4236817955970764, 0.08889240026473999, 0.17901939153671265, -0.46960344910621643, 0.347764790058136, 0.8148799538612366, -0.4036632180213928, 0.763531506061554, -0.2831957936286926, 0.16341258585453033, 0.5930737853050232, -0.026929287239909172, 0.3059002161026001, 0.6634975075721741, 0.12372510135173798, -0.3580600619316101, 0.496747225522995, -0.6511468887329102, -0.29816168546676636, 1.1151793003082275, -0.9764698147773743, -0.12517903745174408, -0.5789290070533752, -0.6447333693504333, -0.0980449989438057, 0.13119511306285858, -0.15333878993988037, 0.229424849152565, -0.0852067768573761, -0.021077752113342285, 0.5028256773948669, 0.5368413329124451, 0.14211301505565643, 0.41950365900993347, -0.7715390920639038, -0.7750667929649353, 1.127739667892456, 0.06686722487211227, -0.3001450002193451, -0.1740749627351761, 0.28474000096321106, -0.060644034296274185, -0.3250540792942047, -0.6850444674491882, 0.16663719713687897, -0.9335521459579468, -0.2291235327720642, -0.03749809041619301, -0.5789603590965271, -0.6228013634681702, -0.47820883989334106, -0.5869344472885132, -0.5042574405670166, 0.11281991750001907, 0.09617441892623901, 1.4001668691635132, 0.8319973945617676, -0.06568708270788193, 0.08630908280611038, -1.1116712093353271, 0.25736212730407715, 0.015971804037690163, 0.6952815055847168, -0.251891553401947, -0.6209638118743896, -0.8120513558387756, -0.20516125857830048, -0.5509235262870789, -0.8155590295791626, 0.11813879758119583, -0.2667374014854431, 1.0278043746948242, -0.07213825732469559, 0.4615022540092468, 0.5544620156288147, -0.4968476891517639, 0.8154560327529907, 0.26462358236312866, -0.6690301299095154, 1.2309130430221558, -0.2700064182281494, 0.524910032749176, 0.9082434177398682, 0.5414102673530579, -0.22989501059055328, -0.5441614985466003, -1.0728564262390137, -1.2159428596496582, 0.7505326271057129, 0.4874785542488098, -0.12735004723072052, 0.25574907660484314, 0.5904833078384399, 0.1084880605340004, 0.24835968017578125, -1.0436595678329468, -0.6171997785568237, -0.19782404601573944, -0.30120840668678284, -0.14532692730426788, -0.42098063230514526, -0.3930176794528961, -0.4815111458301544, 0.8528794646263123, 0.18477576971054077, 0.4002830684185028, 0.08483970910310745, -0.4250431954860687, -0.2631916403770447, 0.5303124785423279, 0.9819957613945007, 1.1715996265411377, -0.3489072620868683, -0.030154382809996605, 0.26701945066452026, -1.1095296144485474, -0.03586225584149361, 0.3683568239212036, -0.07973230630159378, -0.033099569380283356, -0.13889539241790771, 0.71812903881073, 0.46186500787734985, -0.26479512453079224, 0.0786200538277626, 0.04863675311207771, -0.42620396614074707, -0.8693451285362244, 0.42031681537628174, 0.1926744282245636, 1.1467540264129639, 0.31114819645881653, -0.0511527843773365, 0.0720117837190628, -0.3112015128135681, 0.31215012073516846, -0.16534288227558136, -0.6989877223968506, -0.3933010995388031, 0.6255202293395996, 0.005249211098998785, -0.99749356508255, 0.34218478202819824, -0.0813429057598114, -0.6579455733299255, 0.5060022473335266, 0.7805652618408203, 0.9207305908203125, -0.2500244081020355, 0.21269463002681732, 0.5238997936248779, -0.04846958443522453, 0.13580024242401123, 0.5849469900131226, -0.274404913187027, 0.08888603001832962, 0.07170091569423676, -0.3449860215187073, -0.8604850172996521, -0.4315061867237091, -0.7410138249397278, 0.008431410416960716, -0.4274725615978241, -0.5286027193069458, 0.03455887734889984, 0.0829034298658371, -0.01915111020207405, -0.3456607162952423, 0.18413777649402618, 0.5397596955299377, -0.8834842443466187, 1.4707005023956299, 1.4723544120788574, -0.7036442756652832, -0.9047563076019287, 0.09281433373689651, 0.007558757904917002, -0.3072998821735382, 0.7424909472465515, -0.2919822037220001, -0.1902591735124588, 0.021776197478175163, -0.8735836148262024, -0.8709359169006348, 1.4395638704299927, 0.5854635238647461, -0.10345198959112167, 0.5380696654319763, -0.5544329881668091, 0.4126512408256531, 0.035602305084466934, 0.13788507878780365, 0.04965856671333313, 0.4374011158943176, -0.15441548824310303, -1.0038269758224487, -0.39871394634246826, -0.3941478729248047, 0.0587751641869545, 0.7373775243759155, -0.7152295112609863, 0.7034908533096313, 0.054784271866083145, 0.5574946999549866, -0.06986456364393234, 0.6049568057060242, 0.644126832485199, 0.6672497391700745, 0.3027840554714203, 0.13135476410388947, 0.6094536185264587, -0.025937536731362343, 0.8317775130271912, -0.8917952179908752, 1.0985498428344727, 1.260741949081421, -0.4207775294780731, 0.8811071515083313, 0.6006641983985901, -0.6610711812973022, 0.4176274240016937, 0.6517820954322815, -0.16064226627349854, 0.550208568572998, 0.02136034518480301, -0.38332369923591614, 0.15740546584129333, 0.42383965849876404, -0.6425769925117493, -0.5182499885559082, 0.22603538632392883, -0.08330924808979034, -0.25123998522758484, 0.27490392327308655, 0.2173098623752594, -0.4033990800380707, -0.5740267038345337, 0.4007308781147003, 0.17384101450443268, -0.4533953368663788, 0.15813539922237396, -0.6301316618919373, -0.23604202270507812, -1.0461721420288086, -0.0814240500330925, 0.10396551340818405, 0.6116673350334167, 0.11092275381088257, -1.220840573310852, 0.2762703597545624, -0.3711644411087036, 0.14375272393226624, 0.22095435857772827, 1.4678411483764648, -0.2857331335544586, -0.5444695353507996, 0.3340870440006256, 0.12789331376552582, 0.5627816915512085, 0.572036623954773, -1.320770263671875, -0.0502920001745224, 0.12573422491550446, -0.3362223505973816, 0.3265741169452667, 0.19849516451358795, -0.16819357872009277, 0.7835545539855957, 0.35051876306533813, -0.15650933980941772, -0.04051343351602554, 0.23102536797523499, 0.8758388161659241, -0.7265705466270447, -0.36216333508491516, -0.618064820766449, 0.5301170349121094, -0.17288236320018768, -0.26053386926651, 1.244917631149292, 1.0339674949645996, 0.9615637063980103, -0.4805241525173187, 0.3749285936355591, 0.058755062520504, 0.44097623229026794, -0.3331160843372345, 0.8788142800331116, -0.25198692083358765, -0.4169541299343109, -0.5879451632499695, -1.071161150932312, -0.6897805333137512, 0.9582657217979431, -0.5363534688949585, 0.25547555088996887, 1.0569508075714111, 0.49037882685661316, -0.2578373849391937, -0.21535465121269226, 0.5418528914451599, 0.5079478025436401, -0.3240232765674591, -0.012243763543665409, 0.4352801740169525, -0.33186963200569153, 0.8536434769630432, -0.35026511549949646, 0.0747622698545456, -0.7850824594497681, -0.5564411878585815, -0.7536562085151672, -0.7359723448753357, -0.4183710217475891, -0.6564856171607971, 0.5623733401298523, 0.9754729866981506, 0.4449910819530487, -0.7765675187110901, -0.2851913273334503, 0.14770159125328064, 0.11588101834058762, 0.12551552057266235, -0.16041569411754608, 0.65944504737854, -0.27406492829322815, -0.2234436571598053, -0.06579985469579697, 0.624825656414032, 0.1800270676612854, -0.02231006696820259, -0.4375706911087036, -0.22824065387248993, -0.025761933997273445, 0.3822745382785797, 0.5995597243309021, -0.6759122610092163, -0.43785423040390015, -0.4522516429424286, -0.6240594387054443, 0.6815886497497559, 0.8472610116004944, -0.7373551726341248, 0.1710285246372223, 0.295398473739624, -0.17692416906356812, 0.7751572728157043, -0.2074185013771057, 0.10179390013217926, -0.13671095669269562, 0.10778072476387024, -0.12790119647979736, 0.6643026471138, -0.1835266649723053, -0.3996574282646179, 0.963558554649353, 0.35785534977912903, -0.9352133274078369, -0.6791477203369141, 0.0119814807549119, -1.5701615810394287, 0.24567894637584686, 0.6710953116416931, -0.2776137590408325, -0.7143765091896057, -0.14733575284481049, -1.0445878505706787, 0.715156614780426, -0.7073131799697876, 0.3667018711566925, 0.6223142743110657, -0.29930099844932556, -0.496137410402298, -1.2603332996368408, 0.07077781856060028, -0.053835127502679825, -0.8081807494163513, -0.015779759734869003, 0.2902598977088928, 0.4381326735019684, 0.07557794451713562, 0.8481830358505249, -0.12419504672288895, 0.39094308018684387, 0.5604693293571472, 0.492674857378006, 0.13930371403694153, -0.1856234222650528, 0.09759057313203812, -0.11909447610378265, 0.6170819401741028, -0.14526942372322083 ]
koheiduck/bert-japanese-finetuned-sentiment
koheiduck
"2022-12-20T07:21:09Z"
816,017
10
transformers
[ "transformers", "pytorch", "bert", "text-classification", "endpoints_compatible", "region:us" ]
text-classification
"2022-12-16T04:15:00Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
microsoft/mdeberta-v3-base
microsoft
"2023-04-06T05:32:33Z"
786,277
97
transformers
[ "transformers", "pytorch", "tf", "deberta-v2", "deberta", "deberta-v3", "mdeberta", "fill-mask", "multilingual", "en", "ar", "bg", "de", "el", "es", "fr", "hi", "ru", "sw", "th", "tr", "ur", "vi", "zh", "arxiv:2006.03654", "arxiv:2111.09543", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: - multilingual - en - ar - bg - de - el - es - fr - hi - ru - sw - th - tr - ur - vi - zh tags: - deberta - deberta-v3 - mdeberta - fill-mask thumbnail: https://huggingface.co/front/thumbnails/microsoft.png license: mit --- ## DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing [DeBERTa](https://arxiv.org/abs/2006.03654) improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. With those two improvements, DeBERTa out perform RoBERTa on a majority of NLU tasks with 80GB training data. In [DeBERTa V3](https://arxiv.org/abs/2111.09543), we further improved the efficiency of DeBERTa using ELECTRA-Style pre-training with Gradient Disentangled Embedding Sharing. Compared to DeBERTa, our V3 version significantly improves the model performance on downstream tasks. You can find more technique details about the new model from our [paper](https://arxiv.org/abs/2111.09543). Please check the [official repository](https://github.com/microsoft/DeBERTa) for more implementation details and updates. mDeBERTa is multilingual version of DeBERTa which use the same structure as DeBERTa and was trained with CC100 multilingual data. The mDeBERTa V3 base model comes with 12 layers and a hidden size of 768. It has 86M backbone parameters with a vocabulary containing 250K tokens which introduces 190M parameters in the Embedding layer. This model was trained using the 2.5T CC100 data as XLM-R. #### Fine-tuning on NLU tasks We present the dev results on XNLI with zero-shot cross-lingual transfer setting, i.e. training with English data only, test on other languages. | Model |avg | en | fr| es | de | el | bg | ru |tr |ar |vi | th | zh | hi | sw | ur | |--------------| ----|----|----|---- |-- |-- |-- | -- |-- |-- |-- | -- | -- | -- | -- | -- | | XLM-R-base |76.2 |85.8|79.7|80.7 |78.7 |77.5 |79.6 |78.1 |74.2 |73.8 |76.5 |74.6 |76.7| 72.4| 66.5| 68.3| | mDeBERTa-base|**79.8**+/-0.2|**88.2**|**82.6**|**84.4** |**82.7** |**82.3** |**82.4** |**80.8** |**79.5** |**78.5** |**78.1** |**76.4** |**79.5**| **75.9**| **73.9**| **72.4**| #### Fine-tuning with HF transformers ```bash #!/bin/bash cd transformers/examples/pytorch/text-classification/ pip install datasets output_dir="ds_results" num_gpus=8 batch_size=4 python -m torch.distributed.launch --nproc_per_node=${num_gpus} \ run_xnli.py \ --model_name_or_path microsoft/mdeberta-v3-base \ --task_name $TASK_NAME \ --do_train \ --do_eval \ --train_language en \ --language en \ --evaluation_strategy steps \ --max_seq_length 256 \ --warmup_steps 3000 \ --per_device_train_batch_size ${batch_size} \ --learning_rate 2e-5 \ --num_train_epochs 6 \ --output_dir $output_dir \ --overwrite_output_dir \ --logging_steps 1000 \ --logging_dir $output_dir ``` ### Citation If you find DeBERTa useful for your work, please cite the following papers: ``` latex @misc{he2021debertav3, title={DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing}, author={Pengcheng He and Jianfeng Gao and Weizhu Chen}, year={2021}, eprint={2111.09543}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` ``` latex @inproceedings{ he2021deberta, title={DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION}, author={Pengcheng He and Xiaodong Liu and Jianfeng Gao and Weizhu Chen}, booktitle={International Conference on Learning Representations}, year={2021}, url={https://openreview.net/forum?id=XPZIaotutsD} } ```
[ -0.4636988937854767, -0.6585111021995544, 0.30773720145225525, 0.28913652896881104, -0.2693212330341339, 0.09073507785797119, -0.2215009331703186, -0.4522008001804352, 0.35758113861083984, 0.05191724747419357, -0.393489807844162, -0.5723828673362732, -0.9131044149398804, -0.023928968235850334, -0.1606912463903427, 0.9134424328804016, -0.2749682068824768, 0.1463596522808075, 0.11528877168893814, -0.2689301371574402, -0.4553894102573395, -0.5896405577659607, -0.7083144187927246, -0.4471585154533386, 0.6968384385108948, 0.19885146617889404, 0.4926588237285614, 0.32228776812553406, 0.4337015748023987, 0.29825228452682495, -0.27976086735725403, 0.2537427842617035, -0.3349592387676239, -0.12822389602661133, 0.21558447182178497, -0.47041377425193787, -0.7086619138717651, -0.030855434015393257, 0.618636965751648, 0.3974953293800354, -0.06920747458934784, 0.29405251145362854, 0.3078356385231018, 0.980846643447876, -0.7209780216217041, 0.14738595485687256, -0.572091281414032, 0.05341259762644768, -0.053713470697402954, -0.15387721359729767, -0.4217068552970886, -0.2074880599975586, 0.2287871241569519, -0.4047855734825134, 0.14861507713794708, -0.30371320247650146, 1.29606032371521, 0.4966243505477905, -0.3265096843242645, -0.14001475274562836, -0.601283848285675, 1.0452899932861328, -0.826350212097168, 0.46623244881629944, 0.2632465958595276, 0.0874490961432457, 0.046509552747011185, -0.6548842191696167, -0.7734737992286682, -0.044810306280851364, -0.2294151932001114, 0.2648026943206787, -0.6129645705223083, -0.07673997431993484, 0.35150012373924255, 0.3105908930301666, -0.6106986999511719, 0.24897661805152893, -0.4339238405227661, 0.09034708887338638, 0.5567365884780884, 0.029022768139839172, 0.015157060697674751, -0.1196175143122673, -0.3275529444217682, -0.4420676529407501, -0.7299001216888428, 0.05888546630740166, 0.577041745185852, -0.001164965215139091, -0.15056414902210236, 0.22660472989082336, 0.007242134772241116, 0.8909652829170227, 0.05442025884985924, 0.14392128586769104, 0.8506253957748413, -0.13468006253242493, -0.3630331754684448, 0.173910453915596, 0.7905164957046509, 0.16965840756893158, -0.13693691790103912, -0.00017711837426759303, -0.07535149902105331, -0.05426914989948273, 0.10363885015249252, -0.941002607345581, -0.4781230688095093, 0.46337300539016724, -0.4772864282131195, -0.3011687994003296, -0.08448080718517303, -0.8425849676132202, -0.12807272374629974, -0.49487021565437317, 0.5759599208831787, -0.5470235347747803, -0.34922993183135986, 0.257919043302536, 0.08938227593898773, 0.26657697558403015, 0.34381601214408875, -1.1288883686065674, 0.09979519993066788, 0.33223527669906616, 0.8998268842697144, -0.05339055508375168, -0.3992634415626526, -0.33659735321998596, -0.21263672411441803, -0.059902917593717575, 0.30024445056915283, -0.06890749931335449, 0.17011946439743042, -0.2332495152950287, 0.04841046407818794, -0.31357091665267944, -0.28308865427970886, 0.37346792221069336, -0.6751514077186584, 0.15501220524311066, -0.18463347852230072, -0.2937626540660858, -0.4729389250278473, 0.2788684368133545, -0.7879818677902222, 1.145243525505066, 0.119309201836586, -1.0394504070281982, 0.3806920647621155, -0.8109372854232788, -0.16028037667274475, -0.3664112091064453, 0.007830617018043995, -0.6528209447860718, -0.23727573454380035, 0.558336079120636, 0.6390748023986816, -0.12384245544672012, 0.23491822183132172, -0.08356627821922302, -0.4476972818374634, 0.25724655389785767, -0.5247949361801147, 1.3362314701080322, 0.3462141454219818, -0.8672710061073303, -0.051764026284217834, -0.9785476326942444, 0.07334049791097641, 0.22937749326229095, -0.3587028384208679, -0.306151807308197, -0.1369980275630951, -0.057245127856731415, 0.2568761110305786, 0.400387704372406, -0.4973011314868927, 0.25010353326797485, -0.3759402930736542, 0.6739088296890259, 0.7702192068099976, -0.303850382566452, 0.32791852951049805, -0.2901619076728821, 0.3702627420425415, 0.3619813919067383, 0.17020760476589203, 0.045280102640390396, -0.47737982869148254, -1.1728891134262085, -0.6440139412879944, 0.6955671906471252, 0.5710651278495789, -0.7054795026779175, 0.6695375442504883, -0.35741353034973145, -0.7221803665161133, -0.7666453123092651, 0.11419782787561417, 0.34921473264694214, 0.2912442982196808, 0.7016330361366272, 0.0056953816674649715, -0.818705677986145, -0.9218825101852417, 0.0978926494717598, 0.10512050241231918, 0.10993269830942154, 0.09791312366724014, 0.6666352152824402, -0.4466952085494995, 0.7384587526321411, -0.6071807742118835, -0.49221864342689514, -0.28956475853919983, 0.20571298897266388, 0.5934416055679321, 0.6480013132095337, 0.9572725296020508, -0.6409879922866821, -0.7710040807723999, -0.193230539560318, -0.7040526866912842, 0.3405815660953522, -0.009916681796312332, -0.21137750148773193, 0.5260179042816162, 0.1742551326751709, -0.5007168650627136, 0.3310737609863281, 0.7972483038902283, -0.12435594201087952, 0.07835210859775543, -0.3781123459339142, 0.18096554279327393, -1.3137364387512207, 0.19962245225906372, 0.05993666499853134, -0.11396650969982147, -0.6121803522109985, -0.14326249063014984, 0.25118955969810486, 0.21695487201213837, -0.4401766359806061, 0.24896582961082458, -0.7284930944442749, 0.3081946074962616, 0.06690266728401184, 0.3447358012199402, 0.06933790445327759, 0.993999183177948, 0.07001665234565735, 0.7264701724052429, 0.768846869468689, -0.6497781276702881, 0.10265708714723587, 0.38416582345962524, -0.47592902183532715, 0.1617645025253296, -0.915656566619873, 0.2287859469652176, -0.16731494665145874, 0.23470887541770935, -0.9930430054664612, 0.20648929476737976, 0.30505043268203735, -0.5525022149085999, 0.5665292143821716, -0.24868111312389374, -0.6263236999511719, -0.4074150025844574, -0.5278605222702026, 0.18563786149024963, 0.7870478630065918, -0.8529118299484253, 0.497936487197876, 0.3027186393737793, 0.1873006671667099, -1.0312178134918213, -0.9264999628067017, -0.11869169771671295, -0.31717923283576965, -0.6199103593826294, 0.7160952091217041, -0.11114053428173065, 0.009396086446940899, -0.11952167004346848, 0.17081478238105774, -0.18611598014831543, 0.13157016038894653, 0.14208756387233734, 0.35906821489334106, 0.02179003693163395, 0.10300516337156296, 0.2715613543987274, 0.025963306427001953, -0.09519165009260178, -0.11064142733812332, 0.7775327563285828, -0.2778044641017914, -0.10866015404462814, -0.5258768200874329, 0.1398744136095047, 0.4739108681678772, -0.4595782160758972, 1.0348671674728394, 0.9474974870681763, -0.2850688099861145, -0.0345095694065094, -0.44046229124069214, -0.15730123221874237, -0.4966752529144287, 0.3408465087413788, -0.34769299626350403, -0.6492423415184021, 0.611481785774231, 0.32979437708854675, 0.24402660131454468, 0.5919721126556396, 0.5649624466896057, -0.1222870871424675, 1.2017898559570312, 0.5209107398986816, -0.07641880959272385, 0.7213687300682068, -1.1279563903808594, 0.19942894577980042, -1.2161115407943726, -0.2960249185562134, -0.4678524136543274, -0.595996081829071, -0.61833256483078, -0.26077115535736084, 0.17989981174468994, 0.2730707824230194, -0.183917835354805, 0.6998891830444336, -0.851566731929779, 0.15327291190624237, 0.6574097871780396, 0.4540920853614807, 0.1453397423028946, 0.26067131757736206, -0.01457503903657198, -0.16533198952674866, -0.8357762098312378, -0.5047023296356201, 1.2976094484329224, 0.4711601436138153, 0.8158553242683411, 0.3908580243587494, 1.0071794986724854, 0.03495323657989502, -0.0023085162974894047, -0.5276488661766052, 0.3435837924480438, -0.08416877686977386, -0.5350390076637268, -0.1325121372938156, -0.45899128913879395, -1.3045185804367065, 0.44764527678489685, -0.15874499082565308, -0.9687739610671997, 0.44910719990730286, 0.32118552923202515, -0.3310298025608063, 0.503948450088501, -0.7463536262512207, 0.7066460847854614, -0.16182242333889008, -0.4150788187980652, -0.19791348278522491, -0.5493134260177612, 0.20638668537139893, 0.03354912996292114, -0.24057960510253906, 0.050752151757478714, 0.17043302953243256, 1.05271577835083, -0.20527273416519165, 0.8056326508522034, -0.2760566771030426, -0.33252468705177307, 0.361205130815506, -0.1619495004415512, 0.7072112560272217, 0.15802353620529175, -0.07066714018583298, 0.5471850633621216, 0.06555449962615967, -0.40590181946754456, -0.6432591676712036, 1.0263609886169434, -1.1199032068252563, -0.48230642080307007, -0.6777954697608948, -0.4383537769317627, -0.024433866143226624, 0.13206808269023895, 0.39478787779808044, 0.606632649898529, 0.21776431798934937, 0.39586326479911804, 1.0002431869506836, -0.04582388699054718, 0.5701861381530762, 0.5326449275016785, 0.042407676577568054, -0.4283764064311981, 0.9605708718299866, 0.30052077770233154, -0.004763062112033367, 0.5570836067199707, -0.20443426072597504, -0.43236014246940613, -0.7340248823165894, -0.5151931643486023, 0.2765251100063324, -0.7881978154182434, -0.2938072979450226, -1.127058744430542, -0.1673324853181839, -0.39679837226867676, 0.10627927631139755, -0.3811841607093811, -0.6192643642425537, -0.7428157925605774, -0.07692871242761612, 0.6401596069335938, 0.5607219338417053, -0.03332863375544548, 0.23029974102973938, -0.8517200350761414, -0.009978351183235645, 0.13965409994125366, 0.2067147195339203, 0.2021913379430771, -0.6718451976776123, -0.4387829303741455, 0.3089312016963959, -0.5955188870429993, -0.87089604139328, 0.5301440358161926, -0.03072107397019863, 0.7507734298706055, 0.011787938885390759, 0.04941931366920471, 0.6499273180961609, -0.4362209737300873, 0.8262439370155334, 0.31639614701271057, -1.0056374073028564, 0.6429238319396973, -0.09891214966773987, 0.12425784021615982, 0.5884602069854736, 0.7082194685935974, -0.011341634206473827, -0.1026112511754036, -0.7941416501998901, -1.0008074045181274, 0.8662428259849548, 0.5268329381942749, 0.03927367553114891, 0.09430987387895584, 0.1285412609577179, -0.06771116703748703, 0.20666590332984924, -0.8844999670982361, -0.7091255784034729, -0.2898704707622528, -0.3170682489871979, -0.1699148565530777, -0.2137836366891861, -0.1658250391483307, -0.627691388130188, 0.9178804159164429, 0.051665131002664566, 0.5908318161964417, 0.46136289834976196, -0.37082046270370483, 0.23535893857479095, 0.14831258356571198, 0.712665319442749, 0.8488360643386841, -0.46426209807395935, 0.10078246146440506, 0.3618442416191101, -0.5327917337417603, 0.25624361634254456, 0.36008068919181824, -0.07676514983177185, 0.26639169454574585, 0.2269153892993927, 1.0382975339889526, -0.14238619804382324, -0.42123153805732727, 0.4437461495399475, -0.2137620598077774, -0.41180041432380676, -0.4127448797225952, 0.000571554817724973, -0.17006920278072357, 0.3828337788581848, 0.42032092809677124, 0.12719687819480896, 0.13652819395065308, -0.24590705335140228, 0.024672750383615494, 0.2597613036632538, -0.4469771981239319, -0.36639484763145447, 0.5797053575515747, 0.20358270406723022, 0.040378618985414505, 0.47779425978660583, -0.1732294112443924, -0.5976045727729797, 0.6514710783958435, 0.4976632297039032, 0.866871178150177, -0.06283792108297348, 0.18582500517368317, 0.7896003723144531, 0.4182305634021759, 0.07137621939182281, 0.48967301845550537, -0.027043430134654045, -0.5731547474861145, -0.21930377185344696, -0.5083618760108948, -0.15599755942821503, 0.32110875844955444, -0.7388262748718262, 0.3174143433570862, -0.18841013312339783, -0.21900087594985962, 0.018042655661702156, 0.2649485766887665, -0.905833899974823, 0.09065360575914383, -0.12220591306686401, 0.7550447583198547, -0.6229323148727417, 1.0732074975967407, 0.7262834310531616, -0.6261258721351624, -0.8484311103820801, -0.1930922269821167, -0.5123987197875977, -0.5922611951828003, 0.9344882965087891, 0.24323520064353943, -0.18480618298053741, 0.2922091782093048, -0.34641727805137634, -1.0591572523117065, 1.5968010425567627, 0.41869547963142395, -0.8075603246688843, 0.03505370765924454, -0.18158940970897675, 0.5893715023994446, -0.10766759514808655, 0.3278486132621765, 0.5113245844841003, 0.3525976240634918, -0.18639002740383148, -0.7585899233818054, 0.19948285818099976, -0.32594168186187744, 0.07425695657730103, 0.35256943106651306, -0.8133416771888733, 1.1990296840667725, -0.18740613758563995, -0.07930852472782135, -0.0389559306204319, 0.6048054695129395, 0.2782030999660492, 0.04817292094230652, 0.48038235306739807, 0.8327224850654602, 0.8432350158691406, -0.2196759283542633, 0.8952983021736145, -0.4323617219924927, 0.7466437816619873, 1.0546118021011353, 0.06880868226289749, 0.8241351246833801, 0.5903435945510864, -0.40692976117134094, 0.7129233479499817, 0.7407663464546204, -0.10512042790651321, 0.7284095287322998, 0.1899176985025406, -0.05531318858265877, 0.07658680528402328, 0.35327252745628357, -0.7224330306053162, 0.39518454670906067, 0.13814060389995575, -0.6794396042823792, -0.10709216445684433, 0.18813136219978333, 0.23537328839302063, -0.2507973611354828, -0.0023353113792836666, 0.5661612749099731, -0.1412883847951889, -0.6404950618743896, 1.2744609117507935, -0.09436800330877304, 0.9064512848854065, -0.6176471710205078, -0.1451227366924286, -0.12855727970600128, 0.48079365491867065, -0.3029961585998535, -0.682925820350647, 0.059504445642232895, 0.03414275124669075, -0.188713937997818, -0.004446759354323149, 0.2792026400566101, -0.4049709141254425, -0.4194450080394745, 0.5216295123100281, 0.2755741775035858, 0.09574802964925766, 0.049923162907361984, -0.9296277165412903, 0.23394985496997833, 0.19416680932044983, -0.49500685930252075, 0.29295024275779724, 0.23859447240829468, 0.33295637369155884, 0.5344935655593872, 0.5732719898223877, -0.16768886148929596, 0.24994605779647827, -0.04182001203298569, 1.120337963104248, -0.41118985414505005, -0.30305907130241394, -0.9724594354629517, 0.5965255498886108, -0.14244429767131805, -0.400084525346756, 0.9402796626091003, 0.4003164768218994, 0.8573285341262817, -0.14422138035297394, 0.6181883215904236, -0.3463325500488281, 0.22518624365329742, -0.7543225884437561, 0.7747758626937866, -0.8251204490661621, 0.18875791132450104, -0.4678788483142853, -1.0607577562332153, -0.24955210089683533, 0.7555066347122192, -0.19024558365345, 0.16622471809387207, 0.7021000385284424, 0.7992762327194214, -0.07010078430175781, -0.3498637080192566, 0.16316570341587067, 0.0783562883734703, 0.4523840844631195, 0.8137601613998413, 0.6622502207756042, -0.9868883490562439, 0.7124503254890442, -0.5966227054595947, -0.23708796501159668, -0.22501756250858307, -0.8184770345687866, -1.1624505519866943, -0.8055936694145203, -0.581391453742981, -0.393585741519928, -0.06383416056632996, 0.879601240158081, 0.7620383501052856, -0.7755975723266602, 0.12464606016874313, -0.2656942307949066, 0.010613193735480309, -0.4841456711292267, -0.21715600788593292, 0.6959128379821777, -0.30008190870285034, -1.1677802801132202, 0.223674014210701, -0.21358829736709595, 0.33649715781211853, -0.40717869997024536, -0.247513085603714, -0.5481835007667542, -0.022938909009099007, 0.5775157809257507, -0.039602261036634445, -0.5589741468429565, 0.020015550777316093, 0.041198231279850006, -0.16450142860412598, 0.21591101586818695, 0.3792397379875183, -0.6828314065933228, 0.3587430715560913, 0.6095556020736694, 0.4037773907184601, 0.8082142472267151, -0.43658876419067383, 0.2068111151456833, -0.7591181993484497, 0.4048408567905426, 0.17143738269805908, 0.6083430647850037, 0.2671055793762207, -0.4988257884979248, 0.6124246120452881, -0.1507558524608612, -0.6182093024253845, -0.9118158221244812, -0.06440294533967972, -1.1993672847747803, -0.13053064048290253, 1.010742425918579, -0.4809667766094208, -0.27605944871902466, 0.1295543909072876, -0.36938804388046265, 0.31062158942222595, -0.5201727151870728, 0.8104581832885742, 0.5674489140510559, 0.042152270674705505, -0.15732204914093018, -0.4925067722797394, 0.5020764470100403, 0.5184628367424011, -0.6639314293861389, -0.11169379949569702, 0.16092827916145325, 0.24205221235752106, 0.4499934911727905, 0.5745487213134766, -0.09845753014087677, 0.12346799671649933, -0.1320517659187317, 0.15783141553401947, -0.2513454258441925, -0.4255278408527374, -0.469199538230896, -0.22103621065616608, -0.01468576118350029, -0.6261535882949829 ]
rizvandwiki/gender-classification-2
rizvandwiki
"2023-05-18T11:17:43Z"
780,512
15
transformers
[ "transformers", "pytorch", "tensorboard", "safetensors", "vit", "image-classification", "huggingpics", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
image-classification
"2022-12-12T03:13:20Z"
--- tags: - image-classification - pytorch - huggingpics metrics: - accuracy model-index: - name: gender-classification-2 results: - task: name: Image Classification type: image-classification metrics: - name: Accuracy type: accuracy value: 0.9910714030265808 --- # gender-classification-2 Autogenerated by HuggingPics🤗🖼️ Create your own image classifier for **anything** by running [the demo on Google Colab](https://colab.research.google.com/github/nateraw/huggingpics/blob/main/HuggingPics.ipynb). Report any issues with the demo at the [github repo](https://github.com/nateraw/huggingpics). ## Example Images #### female ![female](images/female.jpg) #### male ![male](images/male.jpg)
[ -0.4169134497642517, -0.5362844467163086, 0.0011211881646886468, 0.6196637153625488, -0.26378732919692993, 0.15778645873069763, 0.31754907965660095, -0.48013079166412354, 0.37179434299468994, 0.11269298195838928, -0.5309921503067017, -0.5539798736572266, -0.7219767570495605, 0.16142985224723816, -0.3838222920894623, 0.9760351181030273, 0.05789007991552353, 0.09169213473796844, -0.05344056710600853, 0.1000930443406105, -0.6475611925125122, -0.17619572579860687, -0.6235618591308594, -0.4077867865562439, 0.3533048629760742, 0.6123804450035095, 0.559450089931488, 0.547754168510437, 0.4394073486328125, 0.4511294662952423, 0.09430163353681564, 0.040939610451459885, -0.30197587609291077, 0.08216684311628342, -0.0895862728357315, -0.6237577795982361, -0.5827197432518005, 0.5237879753112793, 0.3849186599254608, 0.21453280746936798, -0.13854023814201355, 0.3642234802246094, -0.21852943301200867, 0.4603448510169983, -0.42328500747680664, 0.3668326437473297, -0.4009823501110077, 0.3898056745529175, -0.05341529846191406, -0.09489180892705917, -0.16422168910503387, -0.7973636388778687, 0.06134336441755295, -0.4713245928287506, 0.4800477623939514, 0.41804271936416626, 1.0330959558486938, -0.049950163811445236, -0.5123217701911926, -0.40298354625701904, -0.15403851866722107, 0.3313618004322052, 0.14661316573619843, 0.06344590336084366, 0.42064806818962097, 0.5162873864173889, -0.12420497834682465, -0.6489706039428711, -0.2865940034389496, 0.056437838822603226, -0.01067681610584259, -0.15370488166809082, -0.4497261941432953, -0.1660226732492447, 0.05036041513085365, 0.4551313817501068, -0.7444958686828613, -0.05952679365873337, -0.7630780935287476, -0.3451237976551056, 0.7147684097290039, -0.24903619289398193, 1.107628345489502, -0.2258937507867813, -0.4031183123588562, 0.036936692893505096, -0.45937711000442505, -0.09933814406394958, 0.6066439747810364, 0.02334878407418728, -0.3709046542644501, 0.7050215005874634, 0.3810027837753296, 0.2533833980560303, 0.8287092447280884, 0.04246858134865761, 0.8128160834312439, 0.13114909827709198, -0.14966215193271637, 0.12953618168830872, 1.0269213914871216, 0.6572719216346741, 0.07391354441642761, -0.057581640779972076, 0.17477823793888092, 0.08916858583688736, -0.07261215150356293, -0.9346729516983032, -0.6150425672531128, -0.11689822375774384, -0.6585096120834351, -0.7112179398536682, -0.051280152052640915, -0.7402350902557373, -0.36646977066993713, -0.08002885431051254, 0.16321688890457153, -0.27604010701179504, -0.5176437497138977, -0.3127906322479248, -0.5419078469276428, 0.4093468189239502, 0.32191288471221924, -0.9880776405334473, 0.24320057034492493, 0.41041305661201477, 0.7464921474456787, 0.4993630349636078, -0.22514140605926514, -0.17169784009456635, -0.14190952479839325, -0.6416067481040955, 0.8177504539489746, -0.005924091208726168, -0.4429374933242798, -0.22144296765327454, 0.29001516103744507, -0.04773351177573204, -0.5268185138702393, 0.5639705657958984, -0.20073971152305603, 0.7193707227706909, -0.24296113848686218, -0.47103723883628845, -0.3252516984939575, -0.04428265243768692, -0.5286892652511597, 1.0785948038101196, 0.4887217581272125, -1.0292714834213257, 0.35405775904655457, -0.8397004008293152, -0.03296324238181114, 0.4410530924797058, -0.3531874418258667, -0.6956149339675903, -0.11742421239614487, -0.4113645851612091, 0.42836663126945496, -0.23381994664669037, 0.24348849058151245, -0.642265796661377, -0.1385250836610794, 0.09028807282447815, 0.43188542127609253, 1.0869194269180298, 0.3103411793708801, -0.4362713098526001, 0.1831849366426468, -0.3218110501766205, -0.05525951087474823, 0.5761793255805969, 0.2733883559703827, -0.20297540724277496, -0.506927490234375, 0.21321165561676025, 0.24578437209129333, 0.2167125940322876, -0.7452672719955444, 0.6424773335456848, 0.1691429167985916, 0.35508814454078674, 0.5448872447013855, -0.307538777589798, 0.7472682595252991, -0.19314920902252197, 0.7631790637969971, -0.2091725617647171, 0.2630802094936371, 0.3212858736515045, -0.6655726432800293, -0.6946830153465271, -0.5968633890151978, 0.2335674911737442, 0.6246675252914429, -0.592659056186676, 1.1594499349594116, 0.17590729892253876, -0.7433358430862427, -0.23846285045146942, 0.2378438115119934, 0.48906928300857544, 0.4058404266834259, 0.021049214527010918, -0.5206155180931091, -0.8836645483970642, -1.0182342529296875, 0.3047719895839691, -0.6457776427268982, 0.07940362393856049, 0.3016935884952545, 0.7714632153511047, -0.5171818137168884, 0.839114248752594, -0.6269106864929199, -0.4274921715259552, 0.0009980241302400827, 0.5619358420372009, -0.06557749956846237, 0.900326132774353, 1.1392552852630615, -0.6529257297515869, -0.048743363469839096, -0.42504432797431946, -0.8850077390670776, -0.36967548727989197, 0.4502706825733185, -0.6312203407287598, 0.19931885600090027, 0.5752534866333008, -0.3697691559791565, 0.5443791151046753, 0.45140132308006287, -0.8627886772155762, 0.5093766450881958, -0.27922070026397705, 0.05182866007089615, -0.9252527952194214, 0.00799650326371193, 0.10850449651479721, -0.5962664484977722, -0.36954137682914734, 0.1770513355731964, 0.32564130425453186, -0.14514772593975067, -0.5877826809883118, 0.626413881778717, -0.5264938473701477, -0.18784956634044647, -0.36184826493263245, -0.31806740164756775, -0.35241183638572693, -0.09423389285802841, 0.12630963325500488, 0.2979935109615326, 0.9175400733947754, -0.3888789415359497, 0.8099870085716248, 0.8473464250564575, -0.18277625739574432, 0.56791090965271, -0.7821575403213501, 0.3526092767715454, -0.24308136105537415, 0.6695717573165894, -1.1417750120162964, -0.6903154253959656, 0.9583825469017029, -0.7599267959594727, 0.595953643321991, -0.30112600326538086, -0.5616656541824341, -0.6643702983856201, -0.47807446122169495, 0.66578209400177, 1.0236601829528809, -0.8469467759132385, 0.3633353114128113, 0.4410695433616638, -0.06087181717157364, -0.38317611813545227, -0.8509526252746582, 0.1329873651266098, -0.32647931575775146, -0.5317077040672302, 0.06758493930101395, -0.09657605737447739, 0.1481013000011444, 0.14908914268016815, 0.2858949601650238, -0.3310951292514801, -0.18468324840068817, 0.6048033833503723, 0.5665194392204285, 0.22363848984241486, 0.21827661991119385, 0.08502403646707535, -0.2796099781990051, 0.043254513293504715, -0.022247465327382088, 0.5897073149681091, -0.645236074924469, -0.10030025988817215, -0.6328259110450745, 0.23063556849956512, 0.45850643515586853, 0.1434805989265442, 0.2818463444709778, 1.0367679595947266, -0.5251898765563965, -0.3486260771751404, -0.4539581835269928, -0.030612803995609283, -0.4783092141151428, 0.14928489923477173, -0.48578935861587524, -0.7134516835212708, 0.406905859708786, 0.049411922693252563, -0.38052046298980713, 0.6104482412338257, 0.5701041221618652, -0.372052937746048, 1.0775535106658936, 0.7160596251487732, -0.09955485165119171, 0.330908864736557, -0.3438914716243744, -0.24782034754753113, -0.7046604752540588, -0.4534047842025757, -0.4493650794029236, -0.5209640264511108, -1.089860439300537, -0.4032243490219116, 0.0689716562628746, 0.07310496270656586, -0.4342074394226074, 0.7636771202087402, -0.7880827188491821, 0.5648281574249268, 0.762942910194397, 0.3498179316520691, -0.27002909779548645, -0.19183163344860077, 0.26067864894866943, 0.05445041134953499, -0.5663650631904602, -0.31881216168403625, 0.8081265091896057, 0.7714570760726929, 0.9409842491149902, 0.056722354143857956, 1.0594205856323242, 0.13265955448150635, 0.3706262409687042, -0.7464989423751831, 0.6548948287963867, -0.32175636291503906, -1.1436716318130493, 0.15502509474754333, -0.3471658229827881, -1.0836788415908813, -0.21048733592033386, -0.06666096299886703, -0.6385954022407532, 0.32467836141586304, 0.3920895457267761, 0.18147705495357513, 0.14864236116409302, -0.6394399404525757, 0.8846082091331482, -0.2794247269630432, 0.025572264567017555, 0.18837542831897736, -0.8114069104194641, 0.6579142212867737, 0.20688892900943756, -0.01475194189697504, -0.4803045988082886, -0.13589420914649963, 0.6213838458061218, -0.2777891457080841, 1.0028138160705566, -0.46916434168815613, 0.0516694039106369, 0.1630762666463852, 0.13463856279850006, -0.21595686674118042, -0.07105784118175507, 0.5581925511360168, 0.31172722578048706, -0.034892816096544266, -0.4502847194671631, -0.40105921030044556, 0.6210026144981384, -0.8942583203315735, 0.03196921944618225, -0.7951332330703735, -0.11392800509929657, 0.21480338275432587, -0.1402127891778946, 0.7164419889450073, 0.12890033423900604, -0.0913064181804657, 0.045910581946372986, 0.543829619884491, -0.23382146656513214, 0.31441110372543335, 0.06843827664852142, -0.7304583191871643, -0.6626890897750854, 0.6601631045341492, -0.04439378157258034, -0.2314412146806717, -0.05362122133374214, 0.48733842372894287, -0.723512589931488, -0.15657223761081696, -0.5448554158210754, 0.28112947940826416, -0.5990136861801147, -0.17848138511180878, -0.2231227159500122, -0.0906900018453598, -0.6031756401062012, -0.2285756915807724, -0.2720508575439453, -0.35960206389427185, -0.610747218132019, -0.1428048014640808, 0.3842044174671173, 0.41400671005249023, -0.29306110739707947, 0.13548411428928375, -0.5594069957733154, 0.7833446860313416, 0.6683260798454285, 0.44093015789985657, -0.5562945604324341, -0.5467596054077148, 0.6152755618095398, -0.5076726078987122, -0.4299440383911133, -0.9240038394927979, 0.5784791707992554, 0.5838132500648499, 0.39374884963035583, 0.6358203291893005, -0.15183736383914948, 0.7559531927108765, -0.3346852660179138, 0.45798206329345703, 0.8436450958251953, -1.0093621015548706, 0.8447640538215637, -0.4123201370239258, -0.13979770243167877, 0.5734341740608215, 0.3958823084831238, -0.2868078947067261, -0.21933375298976898, -0.9105656743049622, -0.599698543548584, 0.6818337440490723, 0.4679405689239502, 0.07996979355812073, 0.027397997677326202, 0.6509429812431335, 0.22369562089443207, 0.1866617202758789, -0.850341260433197, -0.4314730763435364, -0.1842208355665207, -0.6024633646011353, 0.21463650465011597, -0.33309054374694824, -0.3222515285015106, -0.5926753282546997, 0.7604117393493652, -0.26948317885398865, 0.4796912670135498, 0.17772206664085388, -0.06689582020044327, -0.4484255015850067, -0.3077002465724945, 0.23764483630657196, 0.192867249250412, -0.3365856409072876, 0.16553674638271332, -0.11863140016794205, -0.2997223138809204, 0.5512452721595764, 0.23379084467887878, -0.39470523595809937, 0.21723587810993195, 0.12313563376665115, 0.725915253162384, 0.046601369976997375, -0.21871773898601532, 0.6065024733543396, -0.6168167591094971, -0.5103448629379272, -0.5728358030319214, 0.2480722963809967, 0.025526128709316254, 0.34067580103874207, 0.21958409249782562, 0.16176852583885193, 0.434832900762558, -0.8240137100219727, 0.11716717481613159, 0.35179516673088074, -0.15462428331375122, -0.2950136959552765, 0.7260853052139282, 0.4249122738838196, -0.34559908509254456, 0.6034544110298157, -0.9957259297370911, -0.8209757208824158, 0.9664005637168884, 0.5569027066230774, 1.2358845472335815, -0.4170492887496948, 0.5962671041488647, 0.7175129055976868, 0.2135734111070633, -0.16219604015350342, 0.6484042406082153, -0.02916315197944641, -0.7328928709030151, 0.10405372828245163, -0.4568738043308258, -0.3847302496433258, 0.08619824796915054, -0.4643692374229431, 0.6998130083084106, -0.6889414191246033, -0.3229658007621765, 0.07419436424970627, -0.05614681541919708, -0.6514044404029846, 0.407110333442688, 0.7101193070411682, 0.8037072420120239, -1.0377460718154907, 0.4950713515281677, 0.9332056045532227, -0.25587183237075806, -0.508911669254303, -0.2517722249031067, 0.426164448261261, -0.875455915927887, 1.0344009399414062, 0.6327009797096252, -0.10930293053388596, -0.1683133989572525, -0.9972950220108032, -0.5107011198997498, 1.063656210899353, 0.4014906883239746, -0.43683868646621704, -0.003972415346652269, -0.6032633781433105, 0.3416866958141327, -0.5053544044494629, 0.5006574392318726, 0.2610083520412445, 0.40602993965148926, 0.1944206953048706, -1.12367582321167, -0.089093878865242, -0.6163955330848694, 0.291227251291275, 0.12867441773414612, -0.7294723391532898, 0.6496795415878296, -0.38989904522895813, -0.16839303076267242, 0.3333207666873932, 0.692101776599884, 0.3001914918422699, 0.5851932168006897, 1.052550196647644, 0.6296626329421997, 0.5696893334388733, -0.4289628565311432, 0.49729570746421814, 0.0072768316604197025, 0.6700640320777893, 1.329108715057373, 0.08948028087615967, 0.23606516420841217, 0.038212381303310394, -0.34989240765571594, 0.7381894588470459, 1.2185096740722656, -0.6345422267913818, 0.18125814199447632, 0.3723008334636688, -0.2179301530122757, -0.024368660524487495, 0.06570014357566833, -0.5650184154510498, 0.8038185834884644, 0.12127590924501419, -0.6340759992599487, -0.02708476595580578, 0.11576125025749207, 0.1264880746603012, -0.173122838139534, -0.24162758886814117, 0.8074820041656494, -0.2152019739151001, -0.3120350241661072, 0.6271845698356628, -0.16298209130764008, 0.8727525472640991, -0.4781526029109955, 0.016663547605276108, 0.17660975456237793, -0.006391571834683418, -0.48260998725891113, -0.7542537450790405, 0.09169851243495941, -0.09900292009115219, 0.048641227185726166, -0.2729175388813019, 1.1327805519104004, -0.7115816473960876, -0.6639816164970398, 0.3259938359260559, 0.36893412470817566, 0.40145009756088257, 0.21044939756393433, -1.0352674722671509, -0.0995519608259201, -0.2559337615966797, 0.01700793206691742, 0.23719720542430878, 0.15466231107711792, 0.12674660980701447, 0.871336042881012, 0.39498889446258545, -0.0328388549387455, -0.03200289234519005, 0.037176232784986496, 0.5082478523254395, -0.4777776598930359, -0.4377434253692627, -0.624336302280426, 0.019769808277487755, -0.13090220093727112, -0.3620935082435608, 0.7100008726119995, 0.6826599836349487, 0.6979057788848877, -0.5530960559844971, 0.8440164923667908, -0.8403050899505615, 0.32094335556030273, 0.15308451652526855, 0.6027505993843079, -0.605070948600769, -0.721254289150238, -0.40670695900917053, -0.5406773686408997, -0.257436066865921, 0.8163853883743286, 0.10829615592956543, 0.07566887140274048, 0.5701579451560974, 0.6425622701644897, -0.03994006663560867, -0.22957180440425873, -0.11535073816776276, -0.23699726164340973, 0.08482793718576431, 0.38962891697883606, 1.0275475978851318, -0.4869593679904938, 0.13656030595302582, -0.6974745392799377, -0.6604465246200562, -0.3373361825942993, -1.1007866859436035, -0.9271250367164612, -0.6957544684410095, -0.9904588460922241, -0.4675326645374298, -0.24853625893592834, 1.2720967531204224, 1.3258380889892578, -0.8240190744400024, -0.2438361942768097, -0.4527589976787567, -0.02678111009299755, 0.2804020643234253, -0.25844699144363403, 0.31041648983955383, -0.07211645692586899, -1.1160269975662231, -0.1900826245546341, -0.03807060047984123, 0.6383347511291504, 0.03352675586938858, -0.01934220641851425, 0.15078963339328766, -0.5449934601783752, 0.42848724126815796, 0.5629880428314209, -0.5880041718482971, -0.273708313703537, -0.49027830362319946, 0.02224668674170971, 0.06086219102144241, 0.4197830557823181, -0.3217433989048004, 0.5071731805801392, 0.8136011958122253, 0.05569400265812874, 0.06339661031961441, 0.2493949681520462, 0.294165700674057, -0.6868099570274353, 0.20506525039672852, 0.10213151574134827, 0.5468979477882385, 0.47012585401535034, -0.450335830450058, 0.7376868724822998, 0.6927520036697388, -0.8242026567459106, -0.7430406808853149, 0.1850111335515976, -1.2973687648773193, -0.1738581359386444, 1.0940191745758057, -0.10759924352169037, -0.28706446290016174, 0.12411049753427505, -0.7609615325927734, 0.6328333020210266, -0.5643736720085144, 0.8919095993041992, 0.3482312560081482, -0.42402639985084534, -0.3231806755065918, -0.06527296453714371, 0.3236163258552551, -0.1402471363544464, -1.1682569980621338, -0.443689227104187, 0.5975249409675598, 0.6129244565963745, 0.41869235038757324, 0.43996766209602356, -0.3029974102973938, 0.5983123779296875, -0.01580796204507351, 0.7717474699020386, -0.12010765075683594, -0.12588590383529663, -0.45424503087997437, 0.08887320011854172, -0.0885259285569191, -0.8650332689285278 ]
google/vit-base-patch16-224-in21k
google
"2023-02-27T15:04:22Z"
779,376
80
transformers
[ "transformers", "pytorch", "tf", "jax", "vit", "feature-extraction", "vision", "dataset:imagenet-21k", "arxiv:2010.11929", "arxiv:2006.03677", "license:apache-2.0", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- license: apache-2.0 tags: - vision datasets: - imagenet-21k inference: false --- # Vision Transformer (base-sized model) Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224. It was introduced in the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Dosovitskiy et al. and first released in [this repository](https://github.com/google-research/vision_transformer). However, the weights were converted from the [timm repository](https://github.com/rwightman/pytorch-image-models) by Ross Wightman, who already converted the weights from JAX to PyTorch. Credits go to him. Disclaimer: The team releasing ViT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. Note that this model does not provide any fine-tuned heads, as these were zero'd by Google researchers. However, the model does include the pre-trained pooler, which can be used for downstream tasks (such as image classification). By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image. ## Intended uses & limitations You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=google/vit) to look for fine-tuned versions on a task that interests you. ### How to use Here is how to use this model in PyTorch: ```python from transformers import ViTImageProcessor, ViTModel from PIL import Image import requests url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) processor = ViTImageProcessor.from_pretrained('google/vit-base-patch16-224-in21k') model = ViTModel.from_pretrained('google/vit-base-patch16-224-in21k') inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) last_hidden_states = outputs.last_hidden_state ``` Here is how to use this model in JAX/Flax: ```python from transformers import ViTImageProcessor, FlaxViTModel from PIL import Image import requests url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) processor = ViTImageProcessor.from_pretrained('google/vit-base-patch16-224-in21k') model = FlaxViTModel.from_pretrained('google/vit-base-patch16-224-in21k') inputs = processor(images=image, return_tensors="np") outputs = model(**inputs) last_hidden_states = outputs.last_hidden_state ``` ## Training data The ViT model was pretrained on [ImageNet-21k](http://www.image-net.org/), a dataset consisting of 14 million images and 21k classes. ## Training procedure ### Preprocessing The exact details of preprocessing of images during training/validation can be found [here](https://github.com/google-research/vision_transformer/blob/master/vit_jax/input_pipeline.py). Images are resized/rescaled to the same resolution (224x224) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5). ### Pretraining The model was trained on TPUv3 hardware (8 cores). All model variants are trained with a batch size of 4096 and learning rate warmup of 10k steps. For ImageNet, the authors found it beneficial to additionally apply gradient clipping at global norm 1. Pre-training resolution is 224. ## Evaluation results For evaluation results on several image classification benchmarks, we refer to tables 2 and 5 of the original paper. Note that for fine-tuning, the best results are obtained with a higher resolution (384x384). Of course, increasing the model size will result in better performance. ### BibTeX entry and citation info ```bibtex @misc{wu2020visual, title={Visual Transformers: Token-based Image Representation and Processing for Computer Vision}, author={Bichen Wu and Chenfeng Xu and Xiaoliang Dai and Alvin Wan and Peizhao Zhang and Zhicheng Yan and Masayoshi Tomizuka and Joseph Gonzalez and Kurt Keutzer and Peter Vajda}, year={2020}, eprint={2006.03677}, archivePrefix={arXiv}, primaryClass={cs.CV} } ``` ```bibtex @inproceedings{deng2009imagenet, title={Imagenet: A large-scale hierarchical image database}, author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li}, booktitle={2009 IEEE conference on computer vision and pattern recognition}, pages={248--255}, year={2009}, organization={Ieee} } ```
[ -0.5956161022186279, -0.2661900520324707, 0.1057187169790268, -0.07462334632873535, -0.3973407745361328, -0.1943068653345108, -0.10323164612054825, -0.5985963344573975, 0.08899002522230148, 0.3967340588569641, -0.30955079197883606, -0.2358790785074234, -0.7192714214324951, -0.05170011147856712, -0.45037567615509033, 0.8594224452972412, -0.11456865072250366, 0.01316183153539896, -0.15392406284809113, -0.16454721987247467, -0.3345397710800171, -0.38486120104789734, -0.6235891580581665, -0.26970189809799194, 0.43658047914505005, 0.08531405031681061, 0.6841732859611511, 0.7027572393417358, 0.7384037971496582, 0.4473482668399811, -0.037885937839746475, 0.018411653116345406, -0.4323159158229828, -0.27058207988739014, -0.10293731838464737, -0.5422469973564148, -0.3550608158111572, 0.1732265204191208, 0.5706104636192322, 0.40379586815834045, 0.2721240222454071, 0.306401789188385, 0.07927131652832031, 0.30976781249046326, -0.645698606967926, 0.27523669600486755, -0.4782937169075012, 0.4044828414916992, -0.15136873722076416, -0.1682557463645935, -0.47325295209884644, -0.15997061133384705, 0.27353814244270325, -0.6038258671760559, 0.5415271520614624, -0.07247278839349747, 1.415915608406067, 0.18001072108745575, -0.36737746000289917, 0.20508235692977905, -0.8178572654724121, 0.7988883256912231, -0.25824403762817383, 0.4539240896701813, 0.11771681904792786, 0.5074637532234192, 0.11054112762212753, -1.1216498613357544, -0.5578948855400085, -0.006886459421366453, -0.08043331652879715, 0.2223343700170517, -0.29200318455696106, 0.17456407845020294, 0.5448886752128601, 0.6481525301933289, -0.3907040059566498, -0.07190169394016266, -0.5137821435928345, -0.29085874557495117, 0.48338010907173157, -0.0011097422102466226, 0.15545782446861267, 0.030173541978001595, -0.5794138312339783, -0.5406032800674438, -0.3084249198436737, 0.10164143145084381, 0.0027772211469709873, 0.017744652926921844, -0.13871952891349792, 0.4427066445350647, 0.07103031128644943, 0.6514542102813721, 0.2769520878791809, -0.20804408192634583, 0.43510934710502625, -0.18313682079315186, -0.37207332253456116, -0.2281079739332199, 0.7717467546463013, 0.34785452485084534, 0.2445080727338791, -0.021362582221627235, -0.3144046366214752, 0.17770268023014069, 0.5012060403823853, -0.9101660251617432, -0.11644938588142395, -0.12866508960723877, -0.6676347851753235, -0.3415232300758362, 0.2669304609298706, -0.5843252539634705, -0.18294787406921387, -0.3239933252334595, 0.8471736907958984, -0.24665331840515137, -0.282153457403183, -0.1309823989868164, -0.11645327508449554, 0.6109188795089722, 0.4449414908885956, -0.6173008680343628, 0.3151579797267914, 0.2656724750995636, 0.9726786017417908, 0.0057138665579259396, -0.23649048805236816, -0.021536242216825485, -0.22394782304763794, -0.4204593300819397, 0.5732172131538391, -0.12321483343839645, -0.2791607081890106, 0.05246038734912872, 0.41506069898605347, -0.051161542534828186, -0.4307957887649536, 0.4414342939853668, -0.630340576171875, 0.11151550710201263, -0.14285804331302643, -0.2524595260620117, -0.2753697335720062, 0.13198202848434448, -0.674081563949585, 0.9265562295913696, 0.2958509027957916, -0.7662167549133301, 0.48414117097854614, -0.48686057329177856, -0.13685280084609985, 0.20116420090198517, -0.0825105607509613, -0.6567147374153137, 0.09324069321155548, 0.30027103424072266, 0.4485569894313812, -0.14964443445205688, -0.14289182424545288, -0.21325601637363434, -0.5942863821983337, 0.20955632627010345, -0.41387587785720825, 0.8028781414031982, 0.26568734645843506, -0.38708803057670593, 0.1603543758392334, -0.5790709853172302, 0.00039387543802149594, 0.3123074471950531, -0.2162337452173233, -0.026770921424031258, -0.3551577925682068, 0.19381920993328094, 0.2868203818798065, 0.25650233030319214, -0.6998125314712524, 0.1975512057542801, -0.187907874584198, 0.4233170747756958, 0.7315396666526794, -0.15976333618164062, 0.5106599926948547, -0.24560602009296417, 0.36729979515075684, 0.1508750170469284, 0.5701716542243958, -0.2719298005104065, -0.5930754542350769, -1.0885965824127197, -0.227943554520607, 0.29874110221862793, 0.3092435300350189, -0.767819344997406, 0.39479267597198486, -0.5048398971557617, -0.6271127462387085, -0.4008534848690033, -0.2009635865688324, 0.2957864999771118, 0.46092259883880615, 0.5257114171981812, -0.48459914326667786, -0.625697910785675, -0.8604321479797363, 0.09675176441669464, 0.062475889921188354, -0.05157444253563881, 0.14010833203792572, 0.7415885329246521, -0.35883259773254395, 0.869861900806427, -0.38935646414756775, -0.3815019130706787, -0.08720698207616806, 0.02192772552371025, 0.3908650577068329, 0.6344125270843506, 0.5088563561439514, -0.7905462384223938, -0.3730067014694214, 0.06442435830831528, -0.7637176513671875, 0.31311649084091187, -0.05372203141450882, -0.29104140400886536, 0.03749282285571098, 0.31656086444854736, -0.6404817700386047, 0.8838011026382446, 0.2930854856967926, -0.1192353367805481, 0.3821578323841095, -0.12396464496850967, 0.0827348381280899, -1.0532888174057007, -0.014232059009373188, 0.1369026154279709, -0.41885069012641907, -0.5190114974975586, 0.28278034925460815, 0.20066189765930176, -0.19968706369400024, -0.46751296520233154, 0.2905750870704651, -0.4703086316585541, -0.2348393201828003, -0.2541062533855438, -0.4115312397480011, 0.0863117203116417, 0.5641134977340698, 0.12671400606632233, 0.6207180023193359, 0.6211158037185669, -0.5789582133293152, 0.5342509746551514, 0.2726118266582489, -0.4030916690826416, 0.4238450825214386, -0.7553960084915161, 0.24514876306056976, -0.01139448955655098, 0.3243674337863922, -0.6935290098190308, -0.201070174574852, 0.10573799163103104, -0.39200541377067566, 0.5397577881813049, -0.39167118072509766, -0.32949554920196533, -0.7513280510902405, -0.16262081265449524, 0.5399824976921082, 0.7647702693939209, -0.744283139705658, 0.6632340550422668, 0.2274835854768753, 0.526348352432251, -0.6492637395858765, -1.0045844316482544, -0.09080026298761368, -0.09632936865091324, -0.5408103466033936, 0.6064777374267578, 0.22057588398456573, 0.24869196116924286, 0.18970869481563568, -0.039703331887722015, -0.06468912959098816, -0.2417275309562683, 0.5256955623626709, 0.3375495970249176, -0.32562991976737976, -0.04074431583285332, -0.3985974192619324, -0.20476007461547852, -0.02299407869577408, -0.5720040202140808, 0.5552138090133667, -0.503523051738739, -0.3055923879146576, -0.5849031209945679, -0.011752531863749027, 0.5934368968009949, -0.2777922749519348, 0.6744776964187622, 1.0179646015167236, -0.5517504811286926, 0.011640421114861965, -0.42713403701782227, -0.13128876686096191, -0.5078716278076172, 0.3643745183944702, -0.39929720759391785, -0.5238355994224548, 0.6450709700584412, 0.08931682258844376, -0.053731366991996765, 0.622124433517456, 0.4060620963573456, -0.16760697960853577, 0.9170257449150085, 0.5950196981430054, 0.10318636894226074, 0.7095470428466797, -0.8891317844390869, 0.1302604377269745, -0.7778295278549194, -0.27081385254859924, -0.20395541191101074, -0.44242623448371887, -0.6314350962638855, -0.5380193591117859, 0.34230998158454895, 0.08549252897500992, -0.37104466557502747, 0.4854738712310791, -0.6539723873138428, 0.3646087944507599, 0.7745211124420166, 0.5212500691413879, -0.13591183722019196, 0.20625698566436768, -0.1144663617014885, 0.030847134068608284, -0.5466233491897583, -0.14669355750083923, 0.9949849247932434, 0.5067396759986877, 0.7520106434822083, -0.11173469573259354, 0.5421968698501587, 0.02867133542895317, 0.10265307873487473, -0.8436446189880371, 0.5854251980781555, -0.11866970360279083, -0.46811655163764954, -0.05151733011007309, -0.22735027968883514, -1.0447839498519897, 0.19967305660247803, -0.3889364004135132, -0.6101905107498169, 0.45886722207069397, 0.20632880926132202, -0.14960123598575592, 0.5649406909942627, -0.5861649513244629, 0.8069642782211304, -0.12211290746927261, -0.3638748824596405, 0.04015577957034111, -0.5664339661598206, 0.17841482162475586, 0.07245083898305893, -0.20540417730808258, 0.3685220777988434, 0.29367300868034363, 0.8081429600715637, -0.8107897043228149, 0.7797955274581909, -0.28566983342170715, 0.30381104350090027, 0.391157865524292, -0.24169416725635529, 0.2984600067138672, -0.15998542308807373, 0.3999985456466675, 0.4365382790565491, -0.04784189537167549, -0.5216094255447388, -0.5494200587272644, 0.44547197222709656, -1.0690852403640747, -0.4971262216567993, -0.5327133536338806, -0.3070356547832489, 0.1413028985261917, 0.3614446520805359, 0.7819245457649231, 0.6700195670127869, 0.28015536069869995, 0.49988922476768494, 0.6424067616462708, -0.3146999478340149, 0.44807979464530945, -0.1320827752351761, -0.2909627854824066, -0.2953249514102936, 0.8983221054077148, 0.29435327649116516, 0.10989809781312943, 0.38102835416793823, 0.2016340047121048, -0.28184565901756287, -0.48118138313293457, -0.29672303795814514, 0.11156507581472397, -0.8423333168029785, -0.46038419008255005, -0.4418008625507355, -0.6593536138534546, -0.35753506422042847, -0.17816676199436188, -0.5076809525489807, -0.1469598263502121, -0.3802379369735718, -0.027205146849155426, 0.3945425748825073, 0.6700767874717712, -0.028081506490707397, 0.5529693365097046, -0.5735086798667908, 0.12165429443120956, 0.568926215171814, 0.3750016987323761, 0.042825374752283096, -0.674217700958252, -0.4134916365146637, -0.0054807779379189014, -0.3254380226135254, -0.6520023941993713, 0.3802027106285095, 0.2262241542339325, 0.5362503528594971, 0.6646715998649597, -0.22541402280330658, 1.0364288091659546, -0.304751455783844, 0.7920308113098145, 0.356195867061615, -0.7861290574073792, 0.5391098260879517, -0.152951180934906, 0.31524235010147095, 0.1754559427499771, 0.3160851001739502, -0.24901118874549866, -0.009451594203710556, -0.720875084400177, -0.7021322846412659, 0.6762253046035767, 0.15013080835342407, 0.16044241189956665, 0.2900103032588959, 0.3368033468723297, -0.16529247164726257, -0.12197836488485336, -0.8368867039680481, -0.1966722458600998, -0.7116725444793701, -0.1027374267578125, 0.025281863287091255, -0.1380404829978943, -0.0021271551959216595, -0.6162369251251221, 0.4018973112106323, -0.022990737110376358, 0.894238293170929, 0.2614954113960266, -0.4348772466182709, -0.10988859087228775, -0.30191344022750854, 0.3183135986328125, 0.4292680025100708, -0.3214961886405945, 0.20895850658416748, 0.13916094601154327, -0.8792253732681274, -0.007605960126966238, -0.09265020489692688, -0.14990867674350739, -0.06907305121421814, 0.6088179349899292, 1.1182916164398193, 0.05964776873588562, -0.014683809131383896, 0.8037981390953064, -0.19040921330451965, -0.326357364654541, -0.5128674507141113, 0.0900956317782402, -0.33576446771621704, 0.2868552803993225, 0.4810885488986969, 0.48658016324043274, 0.0010434731375426054, -0.2555472254753113, 0.177343487739563, 0.2779924273490906, -0.4689597487449646, -0.37653985619544983, 0.6983960270881653, -0.03990354761481285, -0.005924520082771778, 0.8109630942344666, -0.042770758271217346, -0.6082521080970764, 0.724524736404419, 0.5551868081092834, 0.7912527322769165, -0.13177064061164856, 0.10583318024873734, 0.6093868613243103, 0.3027796745300293, -0.08684689551591873, 0.09651497006416321, -0.05325382575392723, -0.946368932723999, -0.3300705552101135, -0.6229419112205505, 0.002449427731335163, 0.34409403800964355, -0.8031378388404846, 0.3438933491706848, -0.5913246273994446, -0.44002437591552734, 0.06360001862049103, 0.06226486340165138, -1.1904202699661255, 0.3771340250968933, 0.3467184007167816, 0.8154299855232239, -0.7532428503036499, 0.8453136086463928, 0.7499256730079651, -0.6274915337562561, -0.9083173871040344, -0.28721725940704346, -0.2170652151107788, -0.8248079419136047, 0.6978338360786438, 0.4133469760417938, 0.03263205289840698, 0.12507659196853638, -0.6966943740844727, -0.8968514800071716, 1.2259061336517334, 0.1726209968328476, -0.26841095089912415, 0.05513293296098709, 0.11693985760211945, 0.43687567114830017, -0.30738282203674316, 0.6070659756660461, 0.050640955567359924, 0.24547961354255676, 0.27485886216163635, -0.7142822742462158, -0.04086488485336304, -0.3907969295978546, 0.4263797998428345, 0.003966267686337233, -0.550642728805542, 1.1447217464447021, -0.1251475065946579, -0.26275479793548584, 0.024448735639452934, 0.6581733822822571, -0.1332945078611374, -0.13238513469696045, 0.7541839480400085, 0.7128526568412781, 0.4453873336315155, -0.35583364963531494, 1.0515607595443726, 0.03777733072638512, 0.5289207100868225, 0.5712972283363342, 0.24259483814239502, 0.56060391664505, 0.3082951009273529, -0.30581778287887573, 0.4609452486038208, 0.8730737566947937, -0.4793645739555359, 0.5289380550384521, -0.057717032730579376, 0.03490777686238289, -0.1564619392156601, 0.004951077047735453, -0.5048855543136597, 0.5920572280883789, 0.370084673166275, -0.5908212661743164, -0.04063703864812851, 0.32176288962364197, -0.2805067300796509, -0.4518393576145172, -0.5732296109199524, 0.4762360155582428, -0.03438154235482216, -0.37843695282936096, 0.7472108006477356, -0.15909919142723083, 0.6595421433448792, -0.3859703540802002, -0.07061884552240372, -0.22646823525428772, 0.4087204039096832, -0.3832911550998688, -0.7272523641586304, 0.09146761894226074, -0.14950960874557495, -0.13372120261192322, -0.13468484580516815, 0.8168163895606995, -0.12649446725845337, -0.517379641532898, 0.22071349620819092, 0.02054079994559288, 0.26281702518463135, -0.038719527423381805, -0.6543397903442383, -0.0019379782024770975, -0.12916988134384155, -0.34846657514572144, 0.219572052359581, 0.21985550224781036, -0.19681468605995178, 0.4648253321647644, 0.671133279800415, 0.0019801410380750895, 0.409302681684494, 0.036516208201646805, 0.9139025211334229, -0.5244983434677124, -0.49025121331214905, -0.4743715226650238, 0.5023448467254639, -0.21455588936805725, -0.33605489134788513, 0.6024380326271057, 0.38820314407348633, 1.094632625579834, -0.3525226414203644, 0.5337224006652832, -0.08159800618886948, 0.008486867882311344, -0.33207035064697266, 0.5444011092185974, -0.603620171546936, -0.2106374204158783, -0.3426136374473572, -0.9685394167900085, -0.3288477957248688, 0.923159122467041, -0.19241367280483246, 0.20641908049583435, 0.5432043671607971, 0.7675559520721436, -0.27789703011512756, -0.1005767285823822, 0.3732931315898895, 0.22450041770935059, 0.21074841916561127, 0.5042306780815125, 0.8432947993278503, -0.8044169545173645, 0.5283125042915344, -0.5478689670562744, -0.2279258519411087, -0.28569355607032776, -0.5722503662109375, -0.832016110420227, -0.7209410667419434, -0.3480665385723114, -0.46661245822906494, -0.23974572122097015, 0.6491439938545227, 1.110267162322998, -0.7880028486251831, 0.011216694489121437, -0.21727240085601807, -0.2314002960920334, -0.32662931084632874, -0.2083142101764679, 0.43323788046836853, -0.10716069489717484, -0.7784780859947205, -0.10434823483228683, 0.025799527764320374, 0.25881385803222656, -0.268749862909317, -0.0695289671421051, -0.06019088998436928, -0.3097953200340271, 0.5459846258163452, 0.2964845597743988, -0.6217214465141296, -0.4654516279697418, -0.07664336264133453, -0.07916589081287384, 0.2116546481847763, 0.6019470691680908, -0.8475110530853271, 0.5054084062576294, 0.5109068751335144, 0.5093774199485779, 0.9256372451782227, -0.14961540699005127, 0.2238379269838333, -0.7198525667190552, 0.47102901339530945, 0.11826512962579727, 0.609136164188385, 0.21439878642559052, -0.3077544867992401, 0.46408095955848694, 0.3911399245262146, -0.5678890943527222, -0.7389928102493286, 0.056139059364795685, -1.1636801958084106, -0.06199021637439728, 0.8939456939697266, -0.407107412815094, -0.5494521856307983, 0.13807199895381927, -0.11091160774230957, 0.5727792382240295, -0.012951365672051907, 0.3313620984554291, 0.24338005483150482, 0.11005883663892746, -0.5419171452522278, -0.3696444630622864, 0.34721821546554565, -0.015226813964545727, -0.4323124885559082, -0.599577009677887, 0.04891744256019592, 0.24909688532352448, 0.5369559526443481, 0.2945103049278259, -0.3165651559829712, 0.20639686286449432, 0.27327561378479004, 0.3792707026004791, -0.10014785081148148, -0.328591525554657, -0.28269943594932556, 0.06695138663053513, -0.17470477521419525, -0.6916463971138 ]
5w4n/deliberate-v2-inpainting
5w4n
"2023-05-08T14:10:04Z"
775,501
0
diffusers
[ "diffusers", "region:us" ]
null
"2023-05-08T14:12:42Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
dmis-lab/biobert-v1.1
dmis-lab
"2021-05-19T16:03:17Z"
761,098
32
transformers
[ "transformers", "pytorch", "jax", "bert", "feature-extraction", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
facebook/m2m100_418M
facebook
"2023-08-11T11:43:56Z"
760,791
160
transformers
[ "transformers", "pytorch", "rust", "m2m_100", "text2text-generation", "multilingual", "af", "am", "ar", "ast", "az", "ba", "be", "bg", "bn", "br", "bs", "ca", "ceb", "cs", "cy", "da", "de", "el", "en", "es", "et", "fa", "ff", "fi", "fr", "fy", "ga", "gd", "gl", "gu", "ha", "he", "hi", "hr", "ht", "hu", "hy", "id", "ig", "ilo", "is", "it", "ja", "jv", "ka", "kk", "km", "kn", "ko", "lb", "lg", "ln", "lo", "lt", "lv", "mg", "mk", "ml", "mn", "mr", "ms", "my", "ne", "nl", "no", "ns", "oc", "or", "pa", "pl", "ps", "pt", "ro", "ru", "sd", "si", "sk", "sl", "so", "sq", "sr", "ss", "su", "sv", "sw", "ta", "th", "tl", "tn", "tr", "uk", "ur", "uz", "vi", "wo", "xh", "yi", "yo", "zh", "zu", "arxiv:2010.11125", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text2text-generation
"2022-03-02T23:29:05Z"
--- language: - multilingual - af - am - ar - ast - az - ba - be - bg - bn - br - bs - ca - ceb - cs - cy - da - de - el - en - es - et - fa - ff - fi - fr - fy - ga - gd - gl - gu - ha - he - hi - hr - ht - hu - hy - id - ig - ilo - is - it - ja - jv - ka - kk - km - kn - ko - lb - lg - ln - lo - lt - lv - mg - mk - ml - mn - mr - ms - my - ne - nl - no - ns - oc - or - pa - pl - ps - pt - ro - ru - sd - si - sk - sl - so - sq - sr - ss - su - sv - sw - ta - th - tl - tn - tr - uk - ur - uz - vi - wo - xh - yi - yo - zh - zu license: mit --- # M2M100 418M M2M100 is a multilingual encoder-decoder (seq-to-seq) model trained for Many-to-Many multilingual translation. It was introduced in this [paper](https://arxiv.org/abs/2010.11125) and first released in [this](https://github.com/pytorch/fairseq/tree/master/examples/m2m_100) repository. The model that can directly translate between the 9,900 directions of 100 languages. To translate into a target language, the target language id is forced as the first generated token. To force the target language id as the first generated token, pass the `forced_bos_token_id` parameter to the `generate` method. *Note: `M2M100Tokenizer` depends on `sentencepiece`, so make sure to install it before running the example.* To install `sentencepiece` run `pip install sentencepiece` ```python from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer hi_text = "जीवन एक चॉकलेट बॉक्स की तरह है।" chinese_text = "生活就像一盒巧克力。" model = M2M100ForConditionalGeneration.from_pretrained("facebook/m2m100_418M") tokenizer = M2M100Tokenizer.from_pretrained("facebook/m2m100_418M") # translate Hindi to French tokenizer.src_lang = "hi" encoded_hi = tokenizer(hi_text, return_tensors="pt") generated_tokens = model.generate(**encoded_hi, forced_bos_token_id=tokenizer.get_lang_id("fr")) tokenizer.batch_decode(generated_tokens, skip_special_tokens=True) # => "La vie est comme une boîte de chocolat." # translate Chinese to English tokenizer.src_lang = "zh" encoded_zh = tokenizer(chinese_text, return_tensors="pt") generated_tokens = model.generate(**encoded_zh, forced_bos_token_id=tokenizer.get_lang_id("en")) tokenizer.batch_decode(generated_tokens, skip_special_tokens=True) # => "Life is like a box of chocolate." ``` See the [model hub](https://huggingface.co/models?filter=m2m_100) to look for more fine-tuned versions. ## Languages covered Afrikaans (af), Amharic (am), Arabic (ar), Asturian (ast), Azerbaijani (az), Bashkir (ba), Belarusian (be), Bulgarian (bg), Bengali (bn), Breton (br), Bosnian (bs), Catalan; Valencian (ca), Cebuano (ceb), Czech (cs), Welsh (cy), Danish (da), German (de), Greeek (el), English (en), Spanish (es), Estonian (et), Persian (fa), Fulah (ff), Finnish (fi), French (fr), Western Frisian (fy), Irish (ga), Gaelic; Scottish Gaelic (gd), Galician (gl), Gujarati (gu), Hausa (ha), Hebrew (he), Hindi (hi), Croatian (hr), Haitian; Haitian Creole (ht), Hungarian (hu), Armenian (hy), Indonesian (id), Igbo (ig), Iloko (ilo), Icelandic (is), Italian (it), Japanese (ja), Javanese (jv), Georgian (ka), Kazakh (kk), Central Khmer (km), Kannada (kn), Korean (ko), Luxembourgish; Letzeburgesch (lb), Ganda (lg), Lingala (ln), Lao (lo), Lithuanian (lt), Latvian (lv), Malagasy (mg), Macedonian (mk), Malayalam (ml), Mongolian (mn), Marathi (mr), Malay (ms), Burmese (my), Nepali (ne), Dutch; Flemish (nl), Norwegian (no), Northern Sotho (ns), Occitan (post 1500) (oc), Oriya (or), Panjabi; Punjabi (pa), Polish (pl), Pushto; Pashto (ps), Portuguese (pt), Romanian; Moldavian; Moldovan (ro), Russian (ru), Sindhi (sd), Sinhala; Sinhalese (si), Slovak (sk), Slovenian (sl), Somali (so), Albanian (sq), Serbian (sr), Swati (ss), Sundanese (su), Swedish (sv), Swahili (sw), Tamil (ta), Thai (th), Tagalog (tl), Tswana (tn), Turkish (tr), Ukrainian (uk), Urdu (ur), Uzbek (uz), Vietnamese (vi), Wolof (wo), Xhosa (xh), Yiddish (yi), Yoruba (yo), Chinese (zh), Zulu (zu) ## BibTeX entry and citation info ``` @misc{fan2020englishcentric, title={Beyond English-Centric Multilingual Machine Translation}, author={Angela Fan and Shruti Bhosale and Holger Schwenk and Zhiyi Ma and Ahmed El-Kishky and Siddharth Goyal and Mandeep Baines and Onur Celebi and Guillaume Wenzek and Vishrav Chaudhary and Naman Goyal and Tom Birch and Vitaliy Liptchinsky and Sergey Edunov and Edouard Grave and Michael Auli and Armand Joulin}, year={2020}, eprint={2010.11125}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.48127833008766174, -0.5148826837539673, 0.0604977123439312, 0.33498504757881165, -0.0031663498375564814, -0.09409383684396744, -0.20929543673992157, -0.4546903073787689, 0.4570681154727936, 0.36871856451034546, -0.7065521478652954, -0.6076687574386597, -0.7914601564407349, 0.4359471797943115, -0.12464078515768051, 0.870406448841095, -0.12228140980005264, 0.28231558203697205, -0.07380646467208862, -0.3981902599334717, -0.22268709540367126, -0.4541883170604706, -0.46821457147598267, -0.29138651490211487, 0.3023836016654968, 0.29663464426994324, 0.7597948312759399, 0.5649384260177612, 0.266730934381485, 0.35558798909187317, -0.3214534819126129, 0.43734315037727356, -0.19785737991333008, -0.4428865909576416, -0.11205026507377625, -0.44399774074554443, -0.731315016746521, -0.0622372031211853, 0.35058459639549255, 0.6943498253822327, 0.10542227327823639, 0.36846619844436646, 0.13784204423427582, 0.9122759699821472, -0.3585619628429413, 0.22630591690540314, -0.2902446985244751, 0.16744935512542725, -0.23234985768795013, -0.05197393149137497, -0.32069069147109985, -0.32452285289764404, -0.2421872317790985, -0.5233811736106873, -0.20049163699150085, 0.08039136976003647, 1.2135566473007202, -0.2278016209602356, -0.6520021557807922, -0.30379772186279297, -0.3896477222442627, 0.8268314599990845, -0.745520830154419, 0.5394456386566162, 0.6869499087333679, 0.17577454447746277, -0.3064165413379669, -0.5768027901649475, -0.6201304793357849, 0.21305350959300995, -0.2412232905626297, 0.37145164608955383, -0.28789740800857544, -0.26412346959114075, 0.1301470249891281, 0.3865681290626526, -0.8170193433761597, -0.2881179451942444, -0.49916577339172363, -0.18973585963249207, 0.5734297037124634, 0.12624375522136688, 0.6321067214012146, -0.668472409248352, -0.3127867877483368, 0.16309691965579987, -0.5671236515045166, 0.35859379172325134, 0.2939413785934448, 0.29134896397590637, -0.4780166745185852, 0.7408159375190735, -0.36894139647483826, 0.8266924023628235, 0.029809964820742607, -0.295080304145813, 0.7176192998886108, -0.731626033782959, -0.0321262963116169, -0.17070047557353973, 1.0669723749160767, 0.514072060585022, 0.250235378742218, -0.03593570739030838, -0.02955169603228569, -0.08361166715621948, -0.227174311876297, -1.052556037902832, 0.1160130500793457, 0.4849781394004822, -0.6606181263923645, -0.07893604040145874, 0.2004098892211914, -0.8098922371864319, 0.054317522794008255, 0.013559713959693909, 0.40845757722854614, -0.6339614987373352, -0.24104362726211548, 0.1887742578983307, -0.015186617150902748, 0.3618091940879822, 0.243900328874588, -0.9419816136360168, -0.05349274352192879, 0.5255031585693359, 0.9096004962921143, 0.049063462764024734, -0.5778067708015442, -0.3991774320602417, 0.2391682267189026, -0.3487849831581116, 0.6483385562896729, -0.3481397032737732, -0.41679438948631287, 0.06847041100263596, 0.6547077298164368, -0.22338847815990448, -0.5502644777297974, 0.6183786988258362, -0.33745646476745605, 0.5253660082817078, -0.4044091999530792, -0.26024866104125977, -0.26506391167640686, 0.5186922550201416, -0.6639771461486816, 1.1493191719055176, 0.310299277305603, -0.7639989852905273, 0.3320329785346985, -0.5185214281082153, -0.6470004320144653, -0.02438272349536419, -0.10634148120880127, -0.5354396104812622, -0.16433435678482056, 0.4540330171585083, 0.4299820065498352, -0.36147207021713257, 0.2794305384159088, -0.0703921914100647, -0.2827063798904419, -0.018312230706214905, -0.2954346239566803, 1.356720209121704, 0.468372642993927, -0.39225661754608154, 0.15250472724437714, -0.853387176990509, -0.023246189579367638, 0.4109896719455719, -0.5818711519241333, -0.06448197364807129, -0.28116002678871155, 0.17600853741168976, 0.6744791269302368, 0.3159566819667816, -0.6977255940437317, 0.10149914026260376, -0.5650056004524231, 0.5868335962295532, 0.5473414063453674, -0.04364806413650513, 0.44494786858558655, -0.5650135278701782, 0.6001670360565186, 0.23728255927562714, 0.1849614679813385, -0.3275015950202942, -0.7119531631469727, -0.7990060448646545, -0.24814623594284058, 0.37334829568862915, 0.8588498830795288, -0.7975145578384399, 0.7506644129753113, -0.5556010603904724, -0.4668835699558258, -0.8054271936416626, 0.28772035241127014, 0.38608601689338684, 0.1974450945854187, 0.283331036567688, -0.21025456488132477, -0.6945043206214905, -0.8621708154678345, -0.3348897099494934, -0.08166339248418808, 0.11972089856863022, 0.38995763659477234, 0.7766286134719849, -0.5494704246520996, 0.7964551448822021, -0.23052290081977844, -0.4936176538467407, -0.27937111258506775, -0.29841211438179016, 0.44195663928985596, 0.7021405100822449, 0.5450497269630432, -0.8573370575904846, -0.7873315811157227, 0.3457505404949188, -0.9278274178504944, 0.2850106954574585, 0.09285713732242584, -0.5340779423713684, 0.47110283374786377, 0.48532047867774963, -0.6457926034927368, 0.5046741962432861, 0.9086337089538574, -0.6181787252426147, 0.5073572993278503, -0.13707897067070007, 0.39477139711380005, -1.7228317260742188, 0.20719893276691437, -0.3215578496456146, -0.18847782909870148, -0.4611424207687378, -0.09398464858531952, 0.24189624190330505, -0.17723168432712555, -0.6506699323654175, 0.9168990850448608, -0.6939650774002075, 0.32649746537208557, 0.01588302105665207, 0.10879586637020111, 0.19995464384555817, 0.44185301661491394, -0.05948906019330025, 0.7604610323905945, 0.4592142105102539, -0.47939756512641907, 0.35422950983047485, 0.4586590528488159, -0.4530086815357208, 0.8409327268600464, -0.48281821608543396, -0.29803919792175293, -0.2608342170715332, 0.24884630739688873, -1.01170814037323, -0.3478759229183197, 0.4584181010723114, -0.7833699584007263, 0.1604074239730835, -0.2759205996990204, -0.757966160774231, -0.7201807498931885, -0.2798026204109192, 0.2114098221063614, 0.38238343596458435, -0.4844490885734558, 0.843409538269043, 0.1981295645236969, 0.04585243761539459, -0.6712889671325684, -1.242280125617981, 0.23836760222911835, -0.1634601354598999, -0.9838217496871948, 0.3133235573768616, -0.2108248770236969, 0.06569403409957886, 0.204319030046463, -0.07685963064432144, 0.08222247660160065, 0.15339043736457825, 0.21775920689105988, 0.18857569992542267, -0.14389991760253906, -0.16910351812839508, -0.04933295026421547, -0.1255788505077362, -0.14035066962242126, -0.3633047342300415, 0.9062408804893494, -0.16648587584495544, -0.2041841745376587, -0.5195040702819824, 0.4628608524799347, 0.5255480408668518, -0.7078412771224976, 1.3172842264175415, 1.130656123161316, -0.47430986166000366, 0.20393821597099304, -0.35848867893218994, 0.002504863543435931, -0.4823281764984131, 0.49624043703079224, -0.809212327003479, -0.8992863297462463, 0.8666123151779175, -0.041121914982795715, 0.0890863835811615, 0.6312604546546936, 0.7535110712051392, 0.07566232979297638, 1.0042396783828735, 0.5312005281448364, -0.08059921115636826, 0.5493333339691162, -0.5077508687973022, -0.03697801008820534, -0.8774821162223816, -0.37929338216781616, -0.5480084419250488, -0.07760778069496155, -0.8821429014205933, -0.6878989338874817, 0.2798028588294983, 0.09522150456905365, -0.22971570491790771, 0.5860393643379211, -0.29706332087516785, 0.2519073188304901, 0.5564159750938416, 0.1492539346218109, 0.28094416856765747, 0.052448906004428864, -0.2875790297985077, -0.11442761868238449, -0.7765628099441528, -0.6535683274269104, 1.2354786396026611, 0.130130335688591, 0.408072829246521, 0.4908182621002197, 0.9209910035133362, -0.11494482308626175, 0.15898695588111877, -0.6295877695083618, 0.4604461193084717, -0.26387128233909607, -1.018681287765503, -0.07615429162979126, -0.5630021691322327, -1.323735237121582, 0.32185500860214233, -0.053910646587610245, -0.7139185667037964, 0.2903556227684021, -0.07662943750619888, -0.27366694808006287, 0.20266081392765045, -0.7789777517318726, 1.1847530603408813, -0.32086217403411865, -0.3855811655521393, 0.13201674818992615, -0.6940324902534485, 0.3310810923576355, 0.0009685455006547272, 0.7037551999092102, -0.24826055765151978, -0.06791158020496368, 0.7803574204444885, -0.33353421092033386, 0.6943469047546387, 0.006177173461765051, -0.16870230436325073, 0.19218692183494568, 0.11731749027967453, 0.6124370098114014, 0.06809650361537933, -0.3260394036769867, 0.3458383083343506, 0.14788930118083954, -0.8420401215553284, -0.2615663707256317, 0.7567842602729797, -0.8779784440994263, -0.5635430216789246, -0.5541436076164246, -0.516924262046814, 0.062237370759248734, 0.6890760064125061, 0.48055407404899597, 0.20452821254730225, -0.045574307441711426, 0.344218373298645, 0.3622671365737915, -0.41298237442970276, 0.5091427564620972, 0.4040839970111847, -0.49939656257629395, -0.8184590339660645, 1.0531994104385376, 0.41041135787963867, 0.33349600434303284, 0.35893547534942627, 0.22056180238723755, -0.10675457119941711, -0.1982165426015854, -0.7924151420593262, 0.3844705820083618, -0.5413438677787781, -0.17782078683376312, -0.9161344170570374, -0.0016084270318970084, -0.8009297847747803, -0.2862047851085663, -0.4556416869163513, -0.31290072202682495, -0.258863627910614, 0.012379302643239498, 0.2458111047744751, 0.4052223563194275, 0.013550586067140102, 0.08136948198080063, -0.7827346920967102, 0.44941288232803345, 0.013926927000284195, 0.245890811085701, -0.1565755158662796, -0.8209205269813538, -0.4513847231864929, 0.13786974549293518, -0.20207886397838593, -0.9598001837730408, 0.6162437200546265, 0.28253963589668274, 0.5912140607833862, 0.36686378717422485, 0.014933222904801369, 0.8733705878257751, -0.5810641050338745, 0.878775417804718, 0.16673408448696136, -0.9538898468017578, 0.6262009739875793, -0.3990791141986847, 0.6175792813301086, 0.6258026957511902, 0.6812583804130554, -1.0235215425491333, -0.23155803978443146, -0.4873800575733185, -1.1536736488342285, 0.9147616624832153, 0.16692838072776794, 0.38058948516845703, -0.12293217331171036, -0.012646805495023727, 0.05990713834762573, 0.19525456428527832, -1.0519617795944214, -0.691558837890625, -0.1884726881980896, -0.41657117009162903, -0.17257198691368103, -0.34125852584838867, -0.28867509961128235, -0.41277098655700684, 0.9084180593490601, 0.006657952908426523, 0.3492058217525482, 0.2564263641834259, -0.1721697747707367, -0.16915491223335266, 0.31137898564338684, 0.5991131067276001, 0.57716965675354, -0.14700661599636078, 0.10402309149503708, 0.16294118762016296, -0.42612385749816895, 0.1406744420528412, 0.18388064205646515, -0.4399976134300232, 0.05549922585487366, 0.5130264759063721, 0.7731894850730896, 0.04374588280916214, -0.5941389799118042, 0.5633296370506287, 0.039561010897159576, -0.3251827657222748, -0.5184882283210754, -0.25604698061943054, 0.45685234665870667, 0.1700417697429657, 0.2411026507616043, 0.07922711968421936, -0.10447882115840912, -0.8883976340293884, 0.26830431818962097, 0.4810657203197479, -0.5238381624221802, -0.3595120310783386, 0.788829505443573, 0.19829264283180237, -0.24218307435512543, 0.41297489404678345, -0.42178696393966675, -0.6486935615539551, 0.4285506308078766, 0.6954940557479858, 0.7303601503372192, -0.34440338611602783, 0.20280630886554718, 0.7158852815628052, 0.6837072372436523, 0.03704846277832985, 0.5902223587036133, 0.16507992148399353, -0.7357401847839355, -0.12206531316041946, -0.8749006986618042, 0.0707128569483757, -0.12409153580665588, -0.6520588994026184, 0.3341995179653168, -0.1880001723766327, -0.17151477932929993, -0.2064654529094696, 0.13419924676418304, -0.769808828830719, -0.010716619901359081, -0.00860611256211996, 0.8949762582778931, -0.887343168258667, 1.0734714269638062, 0.9794912338256836, -0.6402856707572937, -0.7311969995498657, 0.042157113552093506, 0.10399776697158813, -0.7532463073730469, 0.5575023293495178, 0.3604045510292053, 0.1420554369688034, 0.22813116014003754, -0.11920502036809921, -0.9018326997756958, 1.2472556829452515, 0.3278387486934662, -0.2583620846271515, 0.245979905128479, 0.3084218204021454, 0.4741874039173126, -0.199556365609169, 0.21118004620075226, 0.48427072167396545, 0.7250341773033142, -0.01879006251692772, -1.0444458723068237, 0.1614888459444046, -0.7086643576622009, 0.01703554205596447, 0.11938421428203583, -1.0633878707885742, 0.9918819069862366, -0.14622755348682404, -0.20024269819259644, 0.0839095413684845, 0.7409224510192871, 0.34250330924987793, 0.26999035477638245, 0.15897336602210999, 0.6109431982040405, 0.6408505439758301, -0.1880907416343689, 1.0053035020828247, -0.6064753532409668, 0.41557276248931885, 0.7634353637695312, 0.09650672972202301, 0.8001201748847961, 0.591657817363739, -0.4857407510280609, 0.24967601895332336, 0.6482946872711182, 0.15938328206539154, 0.27549535036087036, -0.17179059982299805, -0.14911432564258575, -0.24678000807762146, -0.3310599625110626, -0.49761277437210083, 0.4776466190814972, 0.10061095654964447, -0.6220539212226868, 0.01452800165861845, 0.19094662368297577, 0.6308175325393677, 0.07494482398033142, -0.17374880611896515, 0.6276047229766846, 0.07127413898706436, -0.6260096430778503, 0.9151012301445007, 0.18763789534568787, 0.9738078117370605, -0.6146232485771179, 0.245234876871109, -0.38485923409461975, 0.2439338117837906, -0.4222366511821747, -0.702312707901001, 0.2906153202056885, -0.11799126863479614, -0.3265223503112793, -0.12943783402442932, 0.2958727180957794, -0.7234694361686707, -0.838280975818634, 0.5060982704162598, 0.6346278190612793, 0.08587813377380371, 0.0035506526473909616, -0.961661159992218, 0.11974752694368362, 0.39076972007751465, -0.5826537013053894, 0.43750229477882385, 0.6220848560333252, -0.024084314703941345, 0.6523631811141968, 0.6756283640861511, 0.10780090093612671, 0.3208775222301483, -0.12496902048587799, 0.7007277011871338, -0.8767727017402649, -0.40242621302604675, -0.9699627161026001, 0.543028712272644, 0.23079514503479004, -0.3345133662223816, 1.3141334056854248, 0.8457989692687988, 1.1681690216064453, -0.21937774121761322, 0.7683039903640747, -0.34338390827178955, 0.3072483539581299, -0.43227681517601013, 0.8408980965614319, -1.0020588636398315, -0.09131504595279694, -0.3233303427696228, -0.7962185144424438, -0.4120054543018341, 0.5954971313476562, -0.35750043392181396, 0.2755938470363617, 0.6151680946350098, 0.8488266468048096, 0.030791470780968666, -0.3374016582965851, 0.37439000606536865, 0.20953646302223206, 0.23076219856739044, 0.6270208954811096, 0.417337566614151, -0.8511378765106201, 0.8318485617637634, -0.5404309630393982, 0.03930920362472534, -0.3163912296295166, -0.6505336761474609, -0.8160426020622253, -0.6323033571243286, -0.19721324741840363, -0.7087493538856506, -0.08295124024152756, 1.2005971670150757, 0.7223799824714661, -0.9261160492897034, -0.41673216223716736, 0.13329923152923584, 0.04406655207276344, -0.3511183559894562, -0.20081758499145508, 0.5181307792663574, 0.028333665803074837, -1.089859962463379, 0.21807847917079926, 0.22074928879737854, 0.06638814508914948, -0.0890074074268341, -0.4068183898925781, -0.49696996808052063, 0.16345930099487305, 0.8680927157402039, 0.17809325456619263, -0.8007667064666748, 0.029157083481550217, -0.01745877042412758, -0.3702305257320404, 0.23003101348876953, 0.019073421135544777, -0.2957664430141449, 0.5994997620582581, 0.523473858833313, 0.41322553157806396, 0.46128228306770325, 0.05278334766626358, 0.24763645231723785, -0.5657366514205933, 0.4955199956893921, -0.022201521322131157, 0.4625234305858612, 0.335401713848114, -0.2776222229003906, 0.6282098889350891, 0.5321089029312134, -0.3514880836009979, -0.9401726126670837, 0.16070911288261414, -1.0664793252944946, -0.3252353370189667, 1.3945345878601074, -0.37034520506858826, -0.7281026840209961, -0.10475713014602661, -0.19861839711666107, 0.392160564661026, -0.37764036655426025, 0.3093158006668091, 0.7394309639930725, 0.047642532736063004, -0.18493375182151794, -0.8461735844612122, 0.4037606120109558, 0.4994220435619354, -0.9453176259994507, -0.007040621247142553, 0.1157718300819397, 0.3487771153450012, 0.166702002286911, 0.7465158104896545, -0.4937160909175873, 0.23206420242786407, -0.04389878734946251, 0.5143969655036926, -0.007518013007938862, -0.058488886803388596, -0.2764841318130493, -0.008322182111442089, -0.06796121597290039, -0.17182141542434692 ]
cambridgeltl/SapBERT-from-PubMedBERT-fulltext
cambridgeltl
"2023-06-14T19:03:02Z"
747,409
29
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "feature-extraction", "biomedical", "lexical semantics", "bionlp", "biology", "science", "embedding", "entity linking", "en", "arxiv:2010.11784", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- license: apache-2.0 language: - en tags: - biomedical - lexical semantics - bionlp - biology - science - embedding - entity linking --- --- datasets: - UMLS **[news]** A cross-lingual extension of SapBERT will appear in the main onference of **ACL 2021**! <br> **[news]** SapBERT will appear in the conference proceedings of **NAACL 2021**! ### SapBERT-PubMedBERT SapBERT by [Liu et al. (2020)](https://arxiv.org/pdf/2010.11784.pdf). Trained with [UMLS](https://www.nlm.nih.gov/research/umls/licensedcontent/umlsknowledgesources.html) 2020AA (English only), using [microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext](https://huggingface.co/microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext) as the base model. ### Expected input and output The input should be a string of biomedical entity names, e.g., "covid infection" or "Hydroxychloroquine". The [CLS] embedding of the last layer is regarded as the output. #### Extracting embeddings from SapBERT The following script converts a list of strings (entity names) into embeddings. ```python import numpy as np import torch from tqdm.auto import tqdm from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("cambridgeltl/SapBERT-from-PubMedBERT-fulltext") model = AutoModel.from_pretrained("cambridgeltl/SapBERT-from-PubMedBERT-fulltext").cuda() # replace with your own list of entity names all_names = ["covid-19", "Coronavirus infection", "high fever", "Tumor of posterior wall of oropharynx"] bs = 128 # batch size during inference all_embs = [] for i in tqdm(np.arange(0, len(all_names), bs)): toks = tokenizer.batch_encode_plus(all_names[i:i+bs], padding="max_length", max_length=25, truncation=True, return_tensors="pt") toks_cuda = {} for k,v in toks.items(): toks_cuda[k] = v.cuda() cls_rep = model(**toks_cuda)[0][:,0,:] # use CLS representation as the embedding all_embs.append(cls_rep.cpu().detach().numpy()) all_embs = np.concatenate(all_embs, axis=0) ``` For more details about training and eval, see SapBERT [github repo](https://github.com/cambridgeltl/sapbert). ### Citation ```bibtex @inproceedings{liu-etal-2021-self, title = "Self-Alignment Pretraining for Biomedical Entity Representations", author = "Liu, Fangyu and Shareghi, Ehsan and Meng, Zaiqiao and Basaldella, Marco and Collier, Nigel", booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies", month = jun, year = "2021", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2021.naacl-main.334", pages = "4228--4238", abstract = "Despite the widespread success of self-supervised learning via masked language models (MLM), accurately capturing fine-grained semantic relationships in the biomedical domain remains a challenge. This is of paramount importance for entity-level tasks such as entity linking where the ability to model entity relations (especially synonymy) is pivotal. To address this challenge, we propose SapBERT, a pretraining scheme that self-aligns the representation space of biomedical entities. We design a scalable metric learning framework that can leverage UMLS, a massive collection of biomedical ontologies with 4M+ concepts. In contrast with previous pipeline-based hybrid systems, SapBERT offers an elegant one-model-for-all solution to the problem of medical entity linking (MEL), achieving a new state-of-the-art (SOTA) on six MEL benchmarking datasets. In the scientific domain, we achieve SOTA even without task-specific supervision. With substantial improvement over various domain-specific pretrained MLMs such as BioBERT, SciBERTand and PubMedBERT, our pretraining scheme proves to be both effective and robust.", } ```
[ -0.04165949299931526, -0.3846246302127838, 0.5516818165779114, -0.009240069426596165, -0.21359983086585999, 0.20302921533584595, -0.0895533561706543, -0.29088836908340454, 0.3532988727092743, 0.6088823676109314, -0.3229411542415619, -0.9399918913841248, -0.41046079993247986, 0.05788138508796692, -0.38957831263542175, 1.3515175580978394, -0.22054453194141388, 0.3414262533187866, -0.228855162858963, -0.16472646594047546, 0.4011208713054657, -0.7846971154212952, -0.4008393883705139, -0.19665874540805817, 0.5746421217918396, 0.11112530529499054, 0.22453224658966064, 0.6048304438591003, 0.32078981399536133, 0.29650789499282837, 0.13169202208518982, 0.06267639994621277, -0.2254648059606552, 0.027416635304689407, -0.2221740335226059, -0.2222384661436081, -0.583538830280304, -0.00034375954419374466, 0.7170193195343018, 0.6790148615837097, -0.2460813969373703, 0.3671710789203644, 0.1183510571718216, 0.38532403111457825, -0.5176826119422913, 0.022724054753780365, -0.49136972427368164, 0.14668677747249603, -0.10077755898237228, 0.02807462029159069, -0.5022405385971069, -0.03351187705993652, 0.2840767800807953, -0.6584085822105408, 0.28766751289367676, 0.29853373765945435, 1.2968169450759888, 0.24910856783390045, -0.3957158625125885, -0.03925280645489693, -0.4997946619987488, 0.8471719622612, -0.6883071064949036, 0.386433482170105, 0.13572528958320618, 0.07027791440486908, -0.10600440204143524, -1.035932183265686, -0.21373619139194489, -0.2866455614566803, -0.08984992653131485, 0.11277498304843903, -0.3144633173942566, 0.13154348731040955, 0.1260807067155838, 0.09359496086835861, -0.6558837890625, -0.10691520571708679, -0.6660522222518921, -0.3414129614830017, 0.5552058815956116, 0.043684154748916626, 0.3645422160625458, -0.1917111724615097, -0.750799834728241, 0.08057282119989395, -0.7042228579521179, -0.2646203339099884, -0.11728685349225998, 0.07809777557849884, -0.07679855823516846, 0.5285333395004272, 0.19838038086891174, 0.44034647941589355, 0.001835978589951992, 0.1837727129459381, 0.5204493999481201, -0.31770408153533936, -0.44358715415000916, 0.3759862184524536, 0.9926335215568542, -0.05184837430715561, -0.06904027611017227, -0.19772973656654358, 0.11173158138990402, -0.186574786901474, 0.16184796392917633, -0.7290211915969849, -0.5638436675071716, 0.44744858145713806, -0.3707759380340576, -0.18489646911621094, -0.12454000115394592, -0.3555176854133606, -0.006165710277855396, -0.14454703032970428, 0.6724681258201599, -0.7142747640609741, 0.042662665247917175, 0.06117193400859833, 0.0007784973713569343, 0.19026172161102295, 0.2307499647140503, -0.84378981590271, 0.4677668809890747, 0.45144006609916687, 0.791114330291748, -0.11666999757289886, -0.4515230357646942, -0.49388831853866577, 0.5226243734359741, -0.15114745497703552, 0.5563690662384033, -0.29972055554389954, -0.03734513372182846, -0.24152934551239014, 0.27296915650367737, -0.1464451402425766, -0.40145596861839294, 0.44404536485671997, -0.30690649151802063, 0.20258575677871704, -0.11657179892063141, -0.6755297183990479, -0.13556034862995148, -0.11308767646551132, -0.3538559675216675, 1.0571765899658203, 0.31939470767974854, -0.7942800521850586, 0.26329806447029114, -0.5605005621910095, -0.2935068905353546, 0.01667794957756996, -0.21145178377628326, -0.5767467021942139, -0.14743421971797943, 0.27554818987846375, 0.5856574773788452, -0.1891155242919922, 0.28227946162223816, -0.4774876832962036, 0.005417636130005121, 0.10434945672750473, 0.19794805347919464, 0.9133281111717224, 0.005515845026820898, -0.39416372776031494, 0.2361811101436615, -0.8269190788269043, 0.09205570816993713, 0.005779951345175505, -0.16993005573749542, -0.42058977484703064, -0.03734353557229042, -0.012115037068724632, 0.3859541416168213, 0.24727150797843933, -0.8326190710067749, 0.12986065447330475, -0.43894630670547485, 0.5980021953582764, 0.6844456791877747, 0.09557963162660599, 0.44291967153549194, 0.04282616078853607, 0.3662221431732178, 0.3396851420402527, 0.14505834877490997, 0.12843039631843567, -0.3451326787471771, -0.6888034343719482, -0.45115816593170166, 0.5719165802001953, 0.3698800206184387, -0.7048702836036682, 0.679801881313324, -0.09069644659757614, -0.5836565494537354, -0.7120155096054077, 0.09501919150352478, 0.36690905690193176, 0.7625143527984619, 0.783684253692627, -0.20863759517669678, -0.8144322037696838, -1.0379613637924194, 0.06315053254365921, -0.06620892882347107, -0.1568181812763214, 0.24306070804595947, 0.7171434760093689, -0.3426518142223358, 0.6519150137901306, -0.46824297308921814, -0.34704312682151794, 0.04700976610183716, -0.022908318787813187, 0.16593004763126373, 0.8039485216140747, 0.5123598575592041, -0.28528159856796265, -0.3970009386539459, -0.10850425809621811, -0.797968864440918, 0.08731865882873535, 0.020139319822192192, -0.5856550931930542, 0.035917893052101135, 0.42932143807411194, -0.4651389420032501, 0.23756437003612518, 0.5063507556915283, -0.3519270420074463, 0.6222347021102905, -0.4030132591724396, -0.11809008568525314, -1.174778938293457, 0.11885179579257965, 0.08639777451753616, -0.21705684065818787, -0.655502200126648, -0.23687241971492767, 0.07490692287683487, -0.05369158834218979, -0.531669020652771, 0.44504162669181824, -0.6639776229858398, -0.16709330677986145, 0.2375543713569641, 0.3137376010417938, 0.21056243777275085, 0.4251501262187958, 0.167619988322258, 0.3774360716342926, 0.9318998456001282, -0.672210693359375, 0.2155669629573822, 0.4587492346763611, -0.13885778188705444, 0.11853349953889847, -0.831342875957489, -0.09538157284259796, 0.03730292245745659, 0.5095656514167786, -0.5219844579696655, 0.04870115965604782, 0.4303375482559204, -0.5567838549613953, 0.2930169105529785, -0.16393831372261047, -0.38025400042533875, -0.237531378865242, -0.3529212772846222, 0.2913946807384491, 0.4108687937259674, -0.5896069407463074, 0.5951414108276367, 0.5248207449913025, 0.07969260215759277, -0.8224917054176331, -0.8139650821685791, -0.09318768233060837, -0.11476323008537292, -0.5036630034446716, 0.5867936015129089, 0.13049544394016266, 0.21082617342472076, 0.21956013143062592, -0.01375267468392849, -0.012105042114853859, -0.007033966481685638, 0.17239241302013397, 0.6498135924339294, -0.48518407344818115, 0.2733026146888733, 0.23672962188720703, -0.06077630817890167, 0.16129928827285767, -0.6364068388938904, 0.4794403612613678, -0.28180864453315735, -0.34031349420547485, -0.1423739641904831, 0.309838205575943, 0.21054624021053314, -0.33606022596359253, 0.8790350556373596, 0.9003720879554749, -0.5351731777191162, -0.18513977527618408, -0.07207123190164566, -0.12307711690664291, -0.4501185715198517, 0.5579319000244141, -0.13570809364318848, -0.7849727272987366, 0.468596875667572, -0.0619470439851284, -0.017841465771198273, 0.741427481174469, 0.5703840851783752, -0.254671573638916, 0.9405819773674011, 0.46220147609710693, 0.17770235240459442, 0.11519985646009445, -0.575438916683197, 0.18481597304344177, -1.3364619016647339, -0.415740042924881, -0.47063741087913513, -0.0767810121178627, -0.46471714973449707, -0.5800140500068665, 0.26940181851387024, 0.29763156175613403, -0.5602380633354187, 0.5730732679367065, -0.7132264971733093, -0.003715242026373744, 0.5375939011573792, 0.3084159195423126, -0.09417888522148132, 0.12988531589508057, -0.5400350093841553, -0.06357808411121368, -0.8805963397026062, -0.5898138880729675, 1.1653063297271729, 0.3071615993976593, 0.7776610255241394, 0.08461138606071472, 1.0627772808074951, 0.10781720280647278, 0.4103264808654785, -0.504271924495697, 0.5320025682449341, -0.28642386198043823, -0.6161568760871887, -0.24302184581756592, -0.3591095209121704, -1.2098335027694702, 0.2785589396953583, -0.3100602924823761, -1.089867115020752, 0.32707107067108154, 0.2575847804546356, -0.4218142330646515, 0.4503939151763916, -0.5082173943519592, 0.8335675597190857, -0.3870956003665924, -0.4686855971813202, 0.014238838106393814, -0.7501482963562012, 0.26319098472595215, 0.022479917854070663, -0.041528813540935516, -0.19870492815971375, -0.2762717306613922, 0.949945867061615, -0.4404570162296295, 0.6652241945266724, -0.12112174183130264, 0.0795484259724617, 0.07306384295225143, -0.2121528536081314, 0.1632923036813736, 0.04756159335374832, 0.058996640145778656, 0.3208494484424591, 0.30403563380241394, -0.6364753842353821, -0.3969685733318329, 0.6386496424674988, -0.8803368806838989, -0.4400041401386261, -0.595133900642395, 0.020632198080420494, -0.18476645648479462, 0.13636188209056854, 0.42516785860061646, 0.5790955424308777, -0.18441860377788544, 0.09017232060432434, 0.6605069041252136, -0.5660566091537476, 0.1566029191017151, 0.40520796179771423, -0.3258136808872223, -0.4590373635292053, 0.8690625429153442, 0.018218636512756348, 0.10626739263534546, 0.37178075313568115, -0.022434748709201813, -0.339017391204834, -0.3181901276111603, -0.6494417190551758, 0.541305422782898, -0.6785116791725159, -0.18509601056575775, -0.9669616222381592, -0.539752185344696, -0.6506355404853821, -0.013136631809175014, -0.3454219102859497, -0.4561045467853546, -0.59842848777771, -0.009810290299355984, 0.2290363758802414, 0.5299991965293884, -0.2210014909505844, -0.016437677666544914, -1.0607537031173706, 0.0222331453114748, -0.16416169703006744, 0.12800441682338715, 0.05185983330011368, -0.5810543298721313, -0.5483556389808655, -0.12449640780687332, -0.1701461374759674, -0.919743001461029, 0.619902491569519, 0.4205026626586914, 0.8323646187782288, 0.29658323526382446, 0.0821974128484726, 0.4709838628768921, -0.6933423280715942, 0.7626421451568604, 0.2646050453186035, -0.8975907564163208, 0.6462833285331726, -0.06812089681625366, -0.09347814321517944, 0.39919400215148926, 0.7755602598190308, -0.4320877492427826, -0.27352145314216614, -1.0587499141693115, -1.1547622680664062, 0.663791298866272, 0.1313307285308838, -0.16221870481967926, 0.06050224229693413, 0.183956578373909, -0.009295990690588951, 0.18804509937763214, -0.5890896320343018, -0.6314815282821655, -0.11896257847547531, -0.3086041212081909, -0.06786981225013733, -0.1134711354970932, -0.34045296907424927, -0.6101077795028687, 0.9912488460540771, -0.004041805863380432, 0.6104544401168823, 0.5442657470703125, -0.36359623074531555, 0.15263259410858154, 0.11334702372550964, 0.5943257212638855, 0.44938310980796814, -0.2726896107196808, 0.27854669094085693, 0.21603919565677643, -0.4516158998012543, 0.13473524153232574, 0.22951415181159973, -0.012228117324411869, 0.23176252841949463, 0.39456552267074585, 0.8219528794288635, 0.3335757255554199, -0.46313968300819397, 0.38748466968536377, 0.09088100492954254, -0.32459792494773865, -0.3906429409980774, -0.0715009793639183, 0.10949201881885529, 0.233138307929039, 0.451235830783844, 0.14364972710609436, 0.15152373909950256, -0.33680322766304016, 0.5514142513275146, 0.17996114492416382, -0.4432767629623413, -0.43197765946388245, 0.784526526927948, -0.05314696207642555, -0.022656889632344246, 0.43779030442237854, -0.035862281918525696, -0.7823988199234009, 0.43192437291145325, 0.6209314465522766, 0.7944727540016174, -0.1964302659034729, 0.32855021953582764, 0.6533365845680237, 0.210173562169075, 0.22833777964115143, 0.02241520956158638, -0.09230577945709229, -0.7343888282775879, -0.24993003904819489, -0.7665714621543884, -0.31376922130584717, 0.01882142573595047, -0.7204472422599792, 0.20506346225738525, -0.4835769534111023, -0.12237422168254852, 0.2571493089199066, 0.028681375086307526, -0.5665245652198792, 0.18378794193267822, 0.1517196148633957, 0.6156567335128784, -0.9045179486274719, 1.098509430885315, 0.9450598955154419, -0.5978777408599854, -1.0346873998641968, -0.24041040241718292, -0.11287190765142441, -0.7206892371177673, 0.7838262915611267, -0.17608191072940826, 0.08597780764102936, 0.04531652107834816, -0.5974951386451721, -1.2111588716506958, 1.1345995664596558, 0.4629405736923218, -0.41552987694740295, -0.2827816307544708, -0.16133475303649902, 0.6551389694213867, -0.6100364327430725, 0.22335517406463623, 0.43811196088790894, 0.13577105104923248, -0.07994101941585541, -0.5722598433494568, 0.21227368712425232, -0.34554898738861084, -0.1601335108280182, 0.05725961551070213, -0.5410951375961304, 1.003730058670044, -0.23995445668697357, -0.10300019383430481, -0.22901584208011627, 0.7489309310913086, 0.5289496183395386, 0.12792561948299408, 0.0952460765838623, 0.4935460388660431, 0.8344077467918396, -0.04442013427615166, 0.8060886263847351, -0.42842230200767517, 0.6908852458000183, 1.2572767734527588, -0.204584002494812, 0.8889315128326416, 0.45212358236312866, -0.41363945603370667, 0.8820693492889404, 0.8991004228591919, -0.39160865545272827, 0.43400874733924866, 0.2742912173271179, -0.23467327654361725, -0.1483188271522522, 0.12500692903995514, -0.5854963660240173, 0.254408597946167, 0.516747772693634, -0.7409326434135437, -0.25809022784233093, 0.08935444802045822, -0.009111400693655014, -0.3251822888851166, -0.1393829584121704, 0.48795849084854126, 0.28790679574012756, -0.27932631969451904, 0.7557909488677979, -0.14950984716415405, 0.4990670084953308, -0.48239585757255554, 0.01900320127606392, 0.16869057714939117, 0.19988396763801575, -0.34261369705200195, -0.5305905342102051, 0.04170755296945572, -0.22308501601219177, 0.019112950190901756, 0.0940142348408699, 0.7454437017440796, -0.6948716640472412, -0.4166378378868103, 0.5472437739372253, 0.47039225697517395, 0.500866711139679, 0.34536245465278625, -1.0651228427886963, -0.33956199884414673, 0.0258583165705204, -0.31016674637794495, 0.3424893915653229, 0.31259384751319885, -0.0006961452309042215, 0.5903956294059753, 0.5203468799591064, 0.3749438524246216, 0.09621548652648926, -0.019920714199543, 0.8646147847175598, -0.6256405711174011, -0.2632860243320465, -0.7927947044372559, 0.44762298464775085, -0.20459116995334625, -0.1838615983724594, 0.6955996155738831, 0.8553051352500916, 0.6760458946228027, -0.15220467746257782, 0.6519352197647095, -0.09960151463747025, 0.3476308286190033, -0.4461915194988251, 0.8806211948394775, -0.5685003399848938, 0.1846499890089035, -0.3009302318096161, -0.6791713237762451, -0.15636613965034485, 0.583793044090271, -0.14057910442352295, -0.004469151142984629, 0.9154541492462158, 0.6045026779174805, 0.0036121804732829332, -0.3167710304260254, 0.36618220806121826, 0.3102501928806305, 0.15469186007976532, 0.5674283504486084, 0.47437548637390137, -0.5417704582214355, 0.3471324145793915, -0.38497164845466614, -0.13302510976791382, -0.13146136701107025, -0.7125715613365173, -0.7921565771102905, -0.8348520994186401, -0.46569889783859253, -0.8026590347290039, 0.07946807146072388, 1.1581419706344604, 0.7841135263442993, -1.0794730186462402, -0.013843324035406113, 0.2561538815498352, -0.08237893879413605, -0.027279531583189964, -0.1080605536699295, 0.8030969500541687, -0.16200420260429382, -0.4278022050857544, 0.21403834223747253, 0.3747781217098236, 0.08268449455499649, -0.28525570034980774, -0.04697953537106514, -0.6401950120925903, -0.0143300611525774, 0.5287694334983826, 0.33359360694885254, -0.7004727125167847, -0.25752612948417664, -0.10343774408102036, -0.408508837223053, 0.35539281368255615, 0.5096445679664612, -0.7595707774162292, 0.16098815202713013, 0.15619389712810516, 0.48782220482826233, 0.810670793056488, -0.03466295823454857, 0.5540632009506226, -0.7281768918037415, -0.05515119060873985, 0.3401760160923004, 0.6197149753570557, 0.2992492616176605, -0.3593571186065674, 0.5391712784767151, 0.24780963361263275, -0.5767417550086975, -0.7959138751029968, -0.05296739563345909, -0.9844663143157959, -0.20141053199768066, 0.9061552882194519, -0.4603979289531708, -0.6536654829978943, -0.03600779175758362, -0.14941267669200897, 0.6189558506011963, -0.3785163164138794, 0.4318043291568756, 0.40543240308761597, -0.35590988397598267, -0.07879187911748886, -0.3574681878089905, 0.6254335045814514, 0.5836420655250549, -0.7952939867973328, -0.22616301476955414, 0.19247326254844666, 0.4501720070838928, 0.23533177375793457, 0.5355365872383118, -0.1981552392244339, 0.18095159530639648, -0.06546185165643692, 0.4482511281967163, 0.09863489121198654, -0.09070140868425369, -0.31977400183677673, -0.14709921181201935, -0.1251407414674759, -0.17023447155952454 ]
savasy/bert-base-turkish-sentiment-cased
savasy
"2023-06-22T14:42:55Z"
741,669
21
transformers
[ "transformers", "pytorch", "jax", "safetensors", "bert", "text-classification", "tr", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: tr --- # Bert-base Turkish Sentiment Model https://huggingface.co/savasy/bert-base-turkish-sentiment-cased This model is used for Sentiment Analysis, which is based on BERTurk for Turkish Language https://huggingface.co/dbmdz/bert-base-turkish-cased ## Dataset The dataset is taken from the studies [[2]](#paper-2) and [[3]](#paper-3), and merged. * The study [2] gathered movie and product reviews. The products are book, DVD, electronics, and kitchen. The movie dataset is taken from a cinema Web page ([Beyazperde](www.beyazperde.com)) with 5331 positive and 5331 negative sentences. Reviews in the Web page are marked in scale from 0 to 5 by the users who made the reviews. The study considered a review sentiment positive if the rating is equal to or bigger than 4, and negative if it is less or equal to 2. They also built Turkish product review dataset from an online retailer Web page. They constructed benchmark dataset consisting of reviews regarding some products (book, DVD, etc.). Likewise, reviews are marked in the range from 1 to 5, and majority class of reviews are 5. Each category has 700 positive and 700 negative reviews in which average rating of negative reviews is 2.27 and of positive reviews is 4.5. This dataset is also used by the study [[1]](#paper-1). * The study [[3]](#paper-3) collected tweet dataset. They proposed a new approach for automatically classifying the sentiment of microblog messages. The proposed approach is based on utilizing robust feature representation and fusion. *Merged Dataset* | *size* | *data* | |--------|----| | 8000 |dev.tsv| | 8262 |test.tsv| | 32000 |train.tsv| | *48290* |*total*| ### The dataset is used by following papers <a id="paper-1">[1]</a> Yildirim, Savaş. (2020). Comparing Deep Neural Networks to Traditional Models for Sentiment Analysis in Turkish Language. 10.1007/978-981-15-1216-2_12. <a id="paper-2">[2]</a> Demirtas, Erkin and Mykola Pechenizkiy. 2013. Cross-lingual polarity detection with machine translation. In Proceedings of the Second International Workshop on Issues of Sentiment Discovery and Opinion Mining (WISDOM ’13) <a id="paper-3">[3]</a> Hayran, A., Sert, M. (2017), "Sentiment Analysis on Microblog Data based on Word Embedding and Fusion Techniques", IEEE 25th Signal Processing and Communications Applications Conference (SIU 2017), Belek, Turkey ## Training ```shell export GLUE_DIR="./sst-2-newall" export TASK_NAME=SST-2 python3 run_glue.py \ --model_type bert \ --model_name_or_path dbmdz/bert-base-turkish-uncased\ --task_name "SST-2" \ --do_train \ --do_eval \ --data_dir "./sst-2-newall" \ --max_seq_length 128 \ --per_gpu_train_batch_size 32 \ --learning_rate 2e-5 \ --num_train_epochs 3.0 \ --output_dir "./model" ``` ## Results > 05/10/2020 17:00:43 - INFO - transformers.trainer - \*\*\*\*\* Running Evaluation \*\*\*\*\* > 05/10/2020 17:00:43 - INFO - transformers.trainer - Num examples = 7999 > 05/10/2020 17:00:43 - INFO - transformers.trainer - Batch size = 8 > Evaluation: 100% 1000/1000 [00:34<00:00, 29.04it/s] > 05/10/2020 17:01:17 - INFO - \_\_main__ - \*\*\*\*\* Eval results sst-2 \*\*\*\*\* > 05/10/2020 17:01:17 - INFO - \_\_main__ - acc = 0.9539942492811602 > 05/10/2020 17:01:17 - INFO - \_\_main__ - loss = 0.16348013816401363 Accuracy is about **95.4%** ## Code Usage ```python from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline model = AutoModelForSequenceClassification.from_pretrained("savasy/bert-base-turkish-sentiment-cased") tokenizer = AutoTokenizer.from_pretrained("savasy/bert-base-turkish-sentiment-cased") sa= pipeline("sentiment-analysis", tokenizer=tokenizer, model=model) p = sa("bu telefon modelleri çok kaliteli , her parçası çok özel bence") print(p) # [{'label': 'LABEL_1', 'score': 0.9871089}] print(p[0]['label'] == 'LABEL_1') # True p = sa("Film çok kötü ve çok sahteydi") print(p) # [{'label': 'LABEL_0', 'score': 0.9975505}] print(p[0]['label'] == 'LABEL_1') # False ``` ## Test ### Data Suppose your file has lots of lines of comment and label (1 or 0) at the end (tab seperated) > comment1 ... \t label > comment2 ... \t label > ... ### Code ```python from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline model = AutoModelForSequenceClassification.from_pretrained("savasy/bert-base-turkish-sentiment-cased") tokenizer = AutoTokenizer.from_pretrained("savasy/bert-base-turkish-sentiment-cased") sa = pipeline("sentiment-analysis", tokenizer=tokenizer, model=model) input_file = "/path/to/your/file/yourfile.tsv" i, crr = 0, 0 for line in open(input_file): lines = line.strip().split("\t") if len(lines) == 2: i = i + 1 if i%100 == 0: print(i) pred = sa(lines[0]) pred = pred[0]["label"].split("_")[1] if pred == lines[1]: crr = crr + 1 print(crr, i, crr/i) ```
[ -0.5344108939170837, -0.6533167362213135, 0.01150326244533062, 0.2220846563577652, -0.5427103638648987, 0.01312595047056675, -0.2854715585708618, 0.0028289782349020243, 0.2913001477718353, 0.18375089764595032, -0.5725064873695374, -0.8063910603523254, -0.739457368850708, -0.060913726687431335, -0.29006269574165344, 1.2661809921264648, -0.012065036222338676, 0.23714302480220795, 0.07897791266441345, -0.16814985871315002, -0.0801364853978157, -0.5408162474632263, -0.5102936625480652, -0.18266808986663818, 0.2756239175796509, 0.260149210691452, 0.34981849789619446, 0.2612937390804291, 0.5547324419021606, 0.4093887507915497, -0.014491315931081772, 0.038745492696762085, -0.09220336377620697, 0.16463734209537506, 0.14445273578166962, -0.4635055661201477, -0.41769134998321533, 0.13999846577644348, 0.7215572595596313, 0.3851702809333801, 0.05637475848197937, 0.47297489643096924, 0.22557207942008972, 0.7180140018463135, -0.26290789246559143, 0.34845730662345886, -0.3615177869796753, 0.13528475165367126, 0.00020581770513672382, 0.11621251702308655, -0.1943284273147583, -0.5158432126045227, 0.10651577264070511, -0.19430148601531982, 0.387010395526886, -0.10235645622015, 1.279053807258606, 0.15811492502689362, -0.1437651515007019, -0.22134996950626373, -0.5460178256034851, 1.084940791130066, -1.1332556009292603, 0.16728626191616058, 0.1380048394203186, 0.12343326956033707, -0.08023405075073242, -0.36974596977233887, -0.8328369855880737, 0.026976289227604866, -0.11401034146547318, 0.2748127281665802, -0.07001091539859772, -0.08785270899534225, 0.26731178164482117, 0.5033943057060242, -0.45865538716316223, -0.35311275720596313, -0.27212074398994446, -0.2365858405828476, 0.5943662524223328, 0.06428844481706619, 0.17255470156669617, -0.6630190014839172, -0.1694406121969223, -0.5114978551864624, -0.1007511094212532, 0.3495805859565735, 0.4123099446296692, 0.4462474286556244, -0.2060665488243103, 0.6955437064170837, -0.3052305281162262, 0.5680532455444336, 0.3451012969017029, -0.33406496047973633, 0.7086530327796936, -0.29021403193473816, -0.46461760997772217, 0.02069881558418274, 1.08383047580719, 0.486056387424469, 0.13489650189876556, 0.29214102029800415, -0.20786723494529724, 0.24385607242584229, -0.0581539086997509, -0.685193657875061, -0.24984338879585266, 0.25372517108917236, -0.6368520855903625, -0.5561387538909912, 0.14755666255950928, -0.8890766501426697, -0.3932669162750244, -0.2139991968870163, 0.5661439895629883, -0.6342328190803528, -0.41483551263809204, -0.060209643095731735, -0.13079488277435303, 0.5250428915023804, 0.04143768176436424, -0.730995774269104, -0.059084147214889526, 0.5655787587165833, 0.7614468336105347, 0.24454550445079803, -0.26252689957618713, -0.16471518576145172, -0.3448772132396698, -0.15429805219173431, 0.682278037071228, -0.1820783019065857, -0.1851557344198227, 0.0024229513946920633, 0.10348562896251678, -0.12248111516237259, -0.2978735566139221, 0.6304159760475159, -0.34184110164642334, 0.5212626457214355, -0.4340028166770935, -0.6028029322624207, -0.44710037112236023, 0.3492051661014557, -0.4293099641799927, 1.0244017839431763, 0.20334944128990173, -1.0745636224746704, 0.5113497972488403, -0.5683520436286926, -0.5461360216140747, -0.272309809923172, 0.1755083054304123, -0.7134185433387756, -0.07962726056575775, 0.3858075737953186, 0.6778512597084045, -0.0944543406367302, 0.2192744016647339, -0.36723124980926514, -0.2919129431247711, 0.23010559380054474, -0.23227597773075104, 1.1547526121139526, 0.3805629312992096, -0.6421386003494263, -0.06189551576972008, -0.5915888547897339, -0.0574733205139637, -0.047980498522520065, -0.5431340336799622, -0.202723428606987, 0.02662571519613266, 0.009903023950755596, 0.40034210681915283, 0.2453402727842331, -0.9314386248588562, 0.2032538205385208, -0.5940853953361511, 0.18674927949905396, 0.7839406132698059, -0.01902282051742077, 0.3460490107536316, -0.35272082686424255, 0.3171057105064392, 0.38174495100975037, 0.19437432289123535, 0.09182602912187576, -0.4846187233924866, -1.3528259992599487, -0.2279135137796402, 0.3270527720451355, 0.6400390863418579, -0.7018121480941772, 0.8659629225730896, -0.33573076128959656, -0.5663455724716187, -0.8807764053344727, 0.21840356290340424, 0.1287080943584442, 0.6100777387619019, 0.4636729657649994, -0.2574595808982849, -0.8194358348846436, -0.9114760756492615, -0.3262752890586853, -0.3672274351119995, 0.037055131047964096, 0.12511825561523438, 0.40489786863327026, -0.27921074628829956, 0.9317057728767395, -0.32398247718811035, -0.6250308752059937, -0.4209493100643158, 0.37164393067359924, 0.677725613117218, 0.5991184115409851, 0.4211641848087311, -0.4775891602039337, -0.8941726684570312, -0.1475348323583603, -0.919003963470459, -0.04382924735546112, -0.11983822286128998, -0.051950711756944656, 0.7071905732154846, 0.22423432767391205, -0.5835121273994446, 0.21536771953105927, 0.34157896041870117, -0.42356401681900024, 0.31300088763237, 0.13909810781478882, 0.2253493219614029, -1.3572698831558228, -0.021530242636799812, 0.3021557033061981, -0.06854930520057678, -0.5284304022789001, -0.21521897614002228, -0.1128004714846611, 0.14789608120918274, -0.3860919177532196, 0.24091652035713196, -0.22331012785434723, 0.22276344895362854, 0.03955113887786865, -0.06098383665084839, -0.15038423240184784, 0.7639208436012268, -0.16275304555892944, 0.43612465262413025, 0.6126543879508972, -0.25517699122428894, 0.5045313239097595, 0.25367116928100586, -0.564211368560791, 0.4395327568054199, -0.37631988525390625, -0.1687254011631012, -0.12433619052171707, 0.16247087717056274, -1.1986230611801147, -0.016101589426398277, 0.49076855182647705, -0.8076286315917969, 0.407642126083374, -0.20510493218898773, -0.5879125595092773, -0.4514831006526947, -0.5670545697212219, -0.0757916122674942, 0.8224137425422668, -0.36223727464675903, 0.8281631469726562, 0.3255388140678406, -0.2070012390613556, -0.8425016403198242, -0.8236265778541565, -0.03770577162504196, -0.27886903285980225, -0.7330920100212097, -0.1593312919139862, 0.04446457326412201, -0.16011832654476166, 0.06215959042310715, -0.018657276406884193, 0.1902712881565094, -0.22518590092658997, 0.24994924664497375, 0.4059899151325226, -0.2386547029018402, 0.15037326514720917, 0.07209861278533936, 0.0010516720358282328, 0.20449641346931458, -0.15744926035404205, 0.684760570526123, -0.6774225831031799, -0.03943047672510147, -0.518873393535614, 0.2591409385204315, 0.6225664615631104, 0.006643692031502724, 0.8435941934585571, 1.1426634788513184, -0.08022475987672806, 0.06378401815891266, -0.7959819436073303, -0.10175972431898117, -0.5110375285148621, 0.3715490698814392, -0.21783366799354553, -0.60219407081604, 0.5026805400848389, 0.2066352218389511, 0.0943492203950882, 0.856727123260498, 0.6582764387130737, -0.48430776596069336, 1.278571605682373, 0.47030091285705566, -0.5537492036819458, 0.4756661653518677, -0.710292398929596, 0.4677967429161072, -0.6999807357788086, -0.28037843108177185, -0.2904887795448303, -0.3244475722312927, -0.7603657245635986, -0.1375153809785843, 0.2335340529680252, -0.09553491324186325, -0.2862868309020996, 0.21879833936691284, -0.6235011219978333, -0.0006582619389519095, 0.5812733173370361, 0.1603522002696991, -0.05488927289843559, 0.2882959544658661, -0.31843119859695435, -0.11676132678985596, -0.6482406854629517, -0.44431301951408386, 1.1622406244277954, 0.4768292009830475, 0.768351137638092, -0.04626799747347832, 0.9001113176345825, 0.4176572263240814, 0.31677547097206116, -0.9287692904472351, 0.7947368025779724, -0.3583156168460846, -0.552273154258728, -0.25771400332450867, -0.30097368359565735, -0.6874459981918335, 0.0978616327047348, -0.33757442235946655, -0.4726232588291168, 0.23846672475337982, -0.015967965126037598, -0.2863417863845825, 0.5139583945274353, -0.801384687423706, 0.734205961227417, 0.019967572763562202, -0.2695823013782501, -0.21035772562026978, -0.7306382656097412, 0.27504661679267883, 0.0886077731847763, 0.1836278885602951, -0.16574376821517944, 0.3395961821079254, 1.1255813837051392, -0.5895015001296997, 0.859188973903656, -0.5429838299751282, 0.15834935009479523, 0.5089195966720581, -0.06989598274230957, 0.251623272895813, -0.1684737652540207, -0.10359623283147812, 0.20446725189685822, -0.05701905116438866, -0.4270566403865814, -0.3609442412853241, 0.8457379341125488, -1.1639078855514526, -0.5520141124725342, -0.7367439866065979, -0.4254123270511627, -0.12159445881843567, 0.09064140170812607, 0.2842240631580353, 0.27524733543395996, 0.12016147375106812, 0.3128115236759186, 0.6167014837265015, -0.32198962569236755, 0.6252679824829102, 0.3226923644542694, -0.012599523179233074, -0.5364323854446411, 1.0737584829330444, 0.13171428442001343, -0.06322982907295227, 0.19201847910881042, 0.22928258776664734, -0.29076510667800903, -0.11249580979347229, -0.36471083760261536, 0.4102904796600342, -0.907630980014801, -0.2916601300239563, -0.7294723987579346, -0.36908748745918274, -0.7381377220153809, 0.028476791456341743, -0.2278382033109665, -0.4461488425731659, -0.15176422894001007, -0.09742574393749237, 0.44059714674949646, 0.46082258224487305, -0.21832214295864105, 0.2522144615650177, -0.7341015934944153, 0.1287844330072403, 0.41471871733665466, 0.3065129220485687, 0.018611539155244827, -0.7110102772712708, -0.3642898201942444, 0.1658588945865631, -0.3203633427619934, -0.714263379573822, 0.7100560665130615, 0.1345038264989853, 0.34424087405204773, 0.46362772583961487, 0.015110544860363007, 0.49952811002731323, -0.01176177803426981, 1.0219534635543823, 0.10761792212724686, -1.0156980752944946, 0.5206471085548401, -0.3946034908294678, 0.3073035776615143, 0.48994147777557373, 0.4038046598434448, -0.6214848756790161, -0.4791945517063141, -0.7362233996391296, -0.8780914545059204, 0.92922043800354, 0.1707383245229721, 0.07797412574291229, 0.20426411926746368, 0.08084802329540253, 0.00457474822178483, 0.2783712148666382, -0.860182523727417, -0.37886282801628113, -0.6657324433326721, -0.48680806159973145, -0.23607216775417328, -0.2469642162322998, -0.022149505093693733, -0.8001896739006042, 1.1337460279464722, 0.1481907218694687, 0.7065160870552063, 0.3405962884426117, -0.2270713597536087, -0.15086723864078522, 0.1792733073234558, 0.29154419898986816, 0.035319577902555466, -0.5422796607017517, 0.02990158274769783, 0.3038948178291321, -0.6278572082519531, 0.17848582565784454, 0.1350279301404953, -0.15300601720809937, 0.2269732654094696, 0.2295076549053192, 0.759840726852417, -0.4230828583240509, -0.2081187665462494, 0.5470576286315918, -0.12161160260438919, -0.39610010385513306, -0.5345139503479004, -0.08578641712665558, 0.028881678357720375, 0.23631514608860016, 0.38835394382476807, 0.20687898993492126, -0.024023164063692093, -0.5392274856567383, 0.11502234637737274, 0.3806590139865875, -0.3516421318054199, -0.16418957710266113, 0.30970299243927, 0.08786407858133316, -0.13368238508701324, 0.8073812127113342, -0.17115603387355804, -0.8196051716804504, 0.5253183245658875, 0.08925216645002365, 1.0828639268875122, -0.18607838451862335, 0.36795473098754883, 0.663756251335144, 0.3469310700893402, 0.054328713566064835, 0.45018529891967773, 0.04355341196060181, -0.8548346757888794, -0.33314454555511475, -0.9759488105773926, -0.10002268850803375, 0.3025902509689331, -0.5780715942382812, 0.33985599875450134, -0.5118986368179321, -0.36909395456314087, 0.12177202850580215, 0.32784634828567505, -0.5828709602355957, 0.4275110363960266, 0.31067684292793274, 0.6972102522850037, -1.2031505107879639, 0.9451779127120972, 0.7904626131057739, -0.5797329545021057, -0.8759387135505676, -0.09799318760633469, -0.15192890167236328, -0.5785179734230042, 0.5875582695007324, 0.22348152101039886, 0.01641508750617504, -0.12194254994392395, -0.5620298981666565, -0.7910223007202148, 0.8818067908287048, -0.08792703598737717, -0.2471015602350235, 0.34141311049461365, 0.37845373153686523, 0.7670244574546814, -0.2778591811656952, 0.20279742777347565, 0.6919238567352295, 0.5802896022796631, -0.09918958693742752, -0.5103316903114319, 0.1105344295501709, -0.6357147097587585, -0.2159181386232376, 0.06314833462238312, -0.7738328576087952, 1.122057557106018, 0.14671018719673157, 0.046589914709329605, -0.12946152687072754, 0.573251485824585, 0.033105362206697464, 0.12079068273305893, 0.7093563079833984, 0.7190667986869812, 0.39445629715919495, -0.28017759323120117, 0.8706708550453186, -0.3222668766975403, 0.7157113552093506, 0.6357359290122986, 0.17408554255962372, 0.7783474922180176, 0.5463479161262512, -0.3339473009109497, 0.939405083656311, 0.7222607731819153, -0.47794273495674133, 0.6359796524047852, -0.011522828601300716, -0.3718181550502777, -0.32250240445137024, 0.12883099913597107, -0.2867092192173004, 0.3196007311344147, 0.3627821207046509, -0.5488959550857544, -0.0856088399887085, 0.07085170596837997, 0.1648579239845276, -0.32841217517852783, -0.1289764791727066, 0.7705544829368591, 0.011374243535101414, -0.8181247115135193, 0.8312494158744812, 0.027921538800001144, 0.8667028546333313, -0.5166592001914978, 0.19027316570281982, -0.32380518317222595, 0.44733351469039917, -0.3427404463291168, -0.7393189668655396, 0.18499019742012024, 0.018865633755922318, -0.16717377305030823, -0.09976936131715775, 0.8811400532722473, -0.48479902744293213, -0.8272989392280579, 0.17736074328422546, 0.3730944097042084, 0.2030898928642273, 0.11501151323318481, -1.021607756614685, -0.13372136652469635, 0.3571676015853882, -0.5588398575782776, 0.2580874264240265, 0.20730964839458466, 0.21715815365314484, 0.4891735017299652, 0.592503011226654, 0.05215759202837944, 0.098645880818367, -0.02406390756368637, 0.9992560148239136, -0.6116904616355896, -0.4069156348705292, -0.88128262758255, 0.6045231223106384, -0.3018106520175934, -0.14361535012722015, 0.984669029712677, 0.5845267176628113, 0.7362968325614929, -0.23746824264526367, 1.130056619644165, -0.414169579744339, 0.6265391111373901, -0.15389344096183777, 0.8658853769302368, -0.5644272565841675, 0.1802995353937149, -0.4440208971500397, -0.8818808794021606, -0.22597786784172058, 0.9331305623054504, -0.3801702857017517, 0.03758357837796211, 0.6465936303138733, 0.9459953308105469, -0.012632920406758785, -0.04545142501592636, -0.04008355364203453, 0.5364620089530945, 0.2320781797170639, 0.44943273067474365, 0.6399489045143127, -0.7028611898422241, 0.6043869853019714, -0.6353759169578552, -0.2655135989189148, -0.2607000470161438, -0.6472179293632507, -1.1212855577468872, -0.6292000412940979, -0.3637489080429077, -0.7148188352584839, -0.22206902503967285, 1.0889757871627808, 0.36745789647102356, -1.1134753227233887, -0.4109449088573456, -0.007267026696354151, 0.029031580314040184, -0.20921798050403595, -0.28493961691856384, 0.6292241811752319, -0.4977198541164398, -0.7270025610923767, -0.05054124817252159, -0.1310887485742569, 0.05686454847455025, -0.3102697432041168, 0.0038434776943176985, -0.459491491317749, 0.06331200152635574, 0.544333279132843, 0.12041095644235611, -0.710455060005188, -0.23584136366844177, 0.07431822270154953, -0.23199127614498138, 0.18087543547153473, 0.33307400345802307, -0.6951765418052673, 0.4943349063396454, 0.789079487323761, 0.30385318398475647, 0.5954075455665588, -0.05949636548757553, 0.36296704411506653, -0.6440374851226807, 0.07049668580293655, 0.07372137904167175, 0.4206587076187134, 0.539512574672699, -0.2414504736661911, 0.3708101809024811, 0.4812324047088623, -0.5338276028633118, -0.6675363183021545, -0.3475147485733032, -1.1914647817611694, -0.14657847583293915, 1.3428274393081665, -0.22444498538970947, -0.3078788220882416, -0.08114824444055557, -0.38537657260894775, 0.6386128067970276, -0.622612714767456, 1.0875643491744995, 0.8292748928070068, -0.004631619434803724, 0.04871276021003723, -0.2327752709388733, 0.600619375705719, 0.7073589563369751, -0.35750818252563477, -0.24272282421588898, 0.14322634041309357, 0.5000638961791992, 0.29173967242240906, 0.34766262769699097, 0.030213728547096252, 0.10522513091564178, -0.03439942002296448, 0.3388795852661133, 0.015846604481339455, 0.12234864383935928, -0.49745580554008484, 0.09250003844499588, -0.21219730377197266, -0.3908529281616211 ]
google/bert_uncased_L-2_H-128_A-2
google
"2023-09-05T15:25:24Z"
730,917
24
transformers
[ "transformers", "pytorch", "jax", "safetensors", "bert", "arxiv:1908.08962", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
null
"2022-03-02T23:29:05Z"
--- thumbnail: https://huggingface.co/front/thumbnails/google.png license: apache-2.0 --- BERT Miniatures === This is the set of 24 BERT models referenced in [Well-Read Students Learn Better: On the Importance of Pre-training Compact Models](https://arxiv.org/abs/1908.08962) (English only, uncased, trained with WordPiece masking). We have shown that the standard BERT recipe (including model architecture and training objective) is effective on a wide range of model sizes, beyond BERT-Base and BERT-Large. The smaller BERT models are intended for environments with restricted computational resources. They can be fine-tuned in the same manner as the original BERT models. However, they are most effective in the context of knowledge distillation, where the fine-tuning labels are produced by a larger and more accurate teacher. Our goal is to enable research in institutions with fewer computational resources and encourage the community to seek directions of innovation alternative to increasing model capacity. You can download the 24 BERT miniatures either from the [official BERT Github page](https://github.com/google-research/bert/), or via HuggingFace from the links below: | |H=128|H=256|H=512|H=768| |---|:---:|:---:|:---:|:---:| | **L=2** |[**2/128 (BERT-Tiny)**][2_128]|[2/256][2_256]|[2/512][2_512]|[2/768][2_768]| | **L=4** |[4/128][4_128]|[**4/256 (BERT-Mini)**][4_256]|[**4/512 (BERT-Small)**][4_512]|[4/768][4_768]| | **L=6** |[6/128][6_128]|[6/256][6_256]|[6/512][6_512]|[6/768][6_768]| | **L=8** |[8/128][8_128]|[8/256][8_256]|[**8/512 (BERT-Medium)**][8_512]|[8/768][8_768]| | **L=10** |[10/128][10_128]|[10/256][10_256]|[10/512][10_512]|[10/768][10_768]| | **L=12** |[12/128][12_128]|[12/256][12_256]|[12/512][12_512]|[**12/768 (BERT-Base)**][12_768]| Note that the BERT-Base model in this release is included for completeness only; it was re-trained under the same regime as the original model. Here are the corresponding GLUE scores on the test set: |Model|Score|CoLA|SST-2|MRPC|STS-B|QQP|MNLI-m|MNLI-mm|QNLI(v2)|RTE|WNLI|AX| |---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| |BERT-Tiny|64.2|0.0|83.2|81.1/71.1|74.3/73.6|62.2/83.4|70.2|70.3|81.5|57.2|62.3|21.0| |BERT-Mini|65.8|0.0|85.9|81.1/71.8|75.4/73.3|66.4/86.2|74.8|74.3|84.1|57.9|62.3|26.1| |BERT-Small|71.2|27.8|89.7|83.4/76.2|78.8/77.0|68.1/87.0|77.6|77.0|86.4|61.8|62.3|28.6| |BERT-Medium|73.5|38.0|89.6|86.6/81.6|80.4/78.4|69.6/87.9|80.0|79.1|87.7|62.2|62.3|30.5| For each task, we selected the best fine-tuning hyperparameters from the lists below, and trained for 4 epochs: - batch sizes: 8, 16, 32, 64, 128 - learning rates: 3e-4, 1e-4, 5e-5, 3e-5 If you use these models, please cite the following paper: ``` @article{turc2019, title={Well-Read Students Learn Better: On the Importance of Pre-training Compact Models}, author={Turc, Iulia and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina}, journal={arXiv preprint arXiv:1908.08962v2 }, year={2019} } ``` [2_128]: https://huggingface.co/google/bert_uncased_L-2_H-128_A-2 [2_256]: https://huggingface.co/google/bert_uncased_L-2_H-256_A-4 [2_512]: https://huggingface.co/google/bert_uncased_L-2_H-512_A-8 [2_768]: https://huggingface.co/google/bert_uncased_L-2_H-768_A-12 [4_128]: https://huggingface.co/google/bert_uncased_L-4_H-128_A-2 [4_256]: https://huggingface.co/google/bert_uncased_L-4_H-256_A-4 [4_512]: https://huggingface.co/google/bert_uncased_L-4_H-512_A-8 [4_768]: https://huggingface.co/google/bert_uncased_L-4_H-768_A-12 [6_128]: https://huggingface.co/google/bert_uncased_L-6_H-128_A-2 [6_256]: https://huggingface.co/google/bert_uncased_L-6_H-256_A-4 [6_512]: https://huggingface.co/google/bert_uncased_L-6_H-512_A-8 [6_768]: https://huggingface.co/google/bert_uncased_L-6_H-768_A-12 [8_128]: https://huggingface.co/google/bert_uncased_L-8_H-128_A-2 [8_256]: https://huggingface.co/google/bert_uncased_L-8_H-256_A-4 [8_512]: https://huggingface.co/google/bert_uncased_L-8_H-512_A-8 [8_768]: https://huggingface.co/google/bert_uncased_L-8_H-768_A-12 [10_128]: https://huggingface.co/google/bert_uncased_L-10_H-128_A-2 [10_256]: https://huggingface.co/google/bert_uncased_L-10_H-256_A-4 [10_512]: https://huggingface.co/google/bert_uncased_L-10_H-512_A-8 [10_768]: https://huggingface.co/google/bert_uncased_L-10_H-768_A-12 [12_128]: https://huggingface.co/google/bert_uncased_L-12_H-128_A-2 [12_256]: https://huggingface.co/google/bert_uncased_L-12_H-256_A-4 [12_512]: https://huggingface.co/google/bert_uncased_L-12_H-512_A-8 [12_768]: https://huggingface.co/google/bert_uncased_L-12_H-768_A-12
[ -0.7697781920433044, -0.5091532468795776, 0.34401318430900574, 0.18879811465740204, -0.3408224284648895, -0.24346372485160828, -0.3449631333351135, -0.44848960638046265, 0.6289241909980774, -0.08775269240140915, -0.8770354986190796, -0.4407401382923126, -0.7479373216629028, -0.027604790404438972, -0.026633432134985924, 1.2364765405654907, 0.22399437427520752, -0.013071386143565178, -0.19661924242973328, -0.04343308135867119, -0.23332123458385468, -0.31375381350517273, -0.4198431670665741, -0.2628514766693115, 0.6738466024398804, 0.414607435464859, 0.9279095530509949, 0.6251875758171082, 0.561252772808075, 0.3939608931541443, -0.31006136536598206, 0.059681784361600876, -0.4192902147769928, -0.47119274735450745, 0.22166967391967773, -0.37575480341911316, -0.9300612807273865, 0.2695135474205017, 0.6058545112609863, 0.7874333262443542, -0.05350666493177414, 0.37971019744873047, 0.34952011704444885, 0.7230963706970215, -0.5430741906166077, 0.158802330493927, -0.2808977961540222, -0.09826868027448654, -0.11102310568094254, 0.1908872425556183, -0.28388360142707825, -0.7087674140930176, 0.3576377332210541, -0.8750191926956177, 0.2703467011451721, -0.16867795586585999, 1.3954620361328125, 0.11449603736400604, -0.26032283902168274, -0.3451303243637085, -0.295070081949234, 1.0522621870040894, -0.964433491230011, 0.3736932873725891, 0.39559388160705566, 0.016121473163366318, -0.14211057126522064, -0.7699453234672546, -0.5251075029373169, 0.08179369568824768, -0.4162270128726959, 0.40409114956855774, -0.23897138237953186, -0.03478509932756424, 0.3547423183917999, 0.4183462858200073, -0.6273133754730225, 0.08223363012075424, -0.5612739324569702, -0.26962029933929443, 0.8281201720237732, 0.06925038993358612, 0.2901149392127991, -0.06915497034788132, -0.42265644669532776, -0.3890944719314575, -0.3698103129863739, 0.3681298494338989, 0.3694746792316437, 0.1879875361919403, -0.5353376269340515, 0.46161949634552, 0.07691881060600281, 0.8229666352272034, 0.4925382733345032, -0.4592207372188568, 0.6146975755691528, -0.25329113006591797, -0.30667734146118164, -0.21172067523002625, 0.8303981423377991, 0.3861112892627716, 0.14644718170166016, 0.11921849846839905, -0.12015475332736969, -0.10231771320104599, 0.23602205514907837, -1.0353845357894897, -0.5557631254196167, 0.1131897047162056, -0.7274141907691956, -0.19469286501407623, 0.03372004255652428, -0.6992306709289551, 0.08338512480258942, -0.37248465418815613, 0.6190593242645264, -0.7839727997779846, 0.03433464467525482, 0.145524799823761, -0.1782950609922409, 0.27335551381111145, 0.4595634937286377, -0.9538901448249817, 0.2611525356769562, 0.4031057357788086, 0.5225666165351868, 0.14961396157741547, -0.25269368290901184, 0.11815379559993744, -0.03792038932442665, -0.4370771050453186, 0.6514570116996765, -0.38264554738998413, -0.29951125383377075, -0.19550244510173798, 0.21906352043151855, -0.313070684671402, -0.4024319052696228, 0.7259275913238525, -0.03660164400935173, 0.27474090456962585, -0.5155355334281921, -0.8874097466468811, -0.01659419573843479, 0.2610301077365875, -0.6904414296150208, 1.0469101667404175, 0.09175622463226318, -0.8304675817489624, 0.4072512984275818, -0.4237699508666992, -0.11907033622264862, -0.3683314323425293, -0.04897420480847359, -0.8765071034431458, -0.007366766221821308, 0.33622992038726807, 0.7172285318374634, -0.10357839614152908, -0.17040161788463593, -0.5274167060852051, -0.342279851436615, 0.1470993012189865, 0.07114796340465546, 1.0246201753616333, 0.15072466433048248, -0.2906669080257416, 0.09911541640758514, -0.9403458833694458, 0.36866727471351624, 0.4133802056312561, -0.4069962203502655, -0.03542247787117958, -0.42718786001205444, -0.13092130422592163, 0.3254837989807129, 0.657322883605957, -0.5487422347068787, 0.2595192790031433, -0.2215295284986496, 0.41129055619239807, 0.8840762376785278, -0.06858127564191818, 0.40459761023521423, -0.7825903296470642, 0.2872921824455261, 0.012789247557520866, 0.5036635398864746, 0.0018942290917038918, -0.6527484059333801, -0.9254642128944397, -0.623656690120697, 0.4378402829170227, 0.25301820039749146, -0.35533469915390015, 0.9424949288368225, -0.26058870553970337, -0.9464760422706604, -0.6279747486114502, 0.11676925420761108, 0.5728275775909424, 0.34960687160491943, 0.27324044704437256, -0.23120802640914917, -0.46787595748901367, -1.1523605585098267, -0.06172114610671997, -0.15721946954727173, -0.03455151244997978, 0.5434630513191223, 0.6836004257202148, -0.10772441327571869, 0.812962532043457, -0.6981233358383179, -0.28847774863243103, -0.06034823879599571, -0.055991727858781815, 0.4270414710044861, 0.8346275091171265, 1.0443696975708008, -0.8363505005836487, -0.6828124523162842, -0.3608711063861847, -0.6779787540435791, 0.31204262375831604, -0.1102270632982254, -0.21590517461299896, 0.1321803480386734, 0.28050845861434937, -0.9336708188056946, 0.6243236064910889, 0.5604706406593323, -0.4435669481754303, 0.8606935739517212, -0.524824857711792, -0.037756092846393585, -0.9431630373001099, 0.2325579971075058, 0.09188558906316757, -0.08658143877983093, -0.5118984580039978, -0.0384901762008667, 0.22440935671329498, 0.16605815291404724, -0.4202671945095062, 0.5557547807693481, -0.667469322681427, 0.0037863696925342083, 0.1807613968849182, 0.09667859226465225, 0.101036436855793, 0.7297024130821228, -0.0740603655576706, 0.7475472688674927, 0.5097461342811584, -0.3147963583469391, 0.11611008644104004, 0.5164768695831299, -0.4643315076828003, 0.4350035488605499, -0.835238516330719, 0.08061713725328445, 0.027626778930425644, 0.4120260179042816, -1.1758248805999756, -0.41779065132141113, 0.07376668602228165, -0.8150233626365662, 0.5439755916595459, 0.016989074647426605, -0.5315950512886047, -0.7108951210975647, -0.6796277761459351, 0.1701059192419052, 0.8399853706359863, -0.5769923329353333, 0.36051133275032043, 0.2474784106016159, -0.07229048758745193, -0.5159360766410828, -0.5292489528656006, -0.4614597260951996, -0.2617321014404297, -0.7341054677963257, 0.6068645119667053, -0.4672601819038391, 0.2199544906616211, 0.10514495521783829, -0.1991581916809082, -0.2550506591796875, 0.022623853757977486, 0.2665558159351349, 0.49082210659980774, -0.23679058253765106, 0.055392809212207794, -0.06999420374631882, 0.15571506321430206, 0.013993481174111366, 0.06489457935094833, 0.5090194344520569, -0.46531885862350464, 0.048246074467897415, -0.7650940418243408, 0.09078215062618256, 0.5614281296730042, -0.0800953358411789, 1.0474785566329956, 0.9055407047271729, -0.43185141682624817, 0.05741085857152939, -0.6384073495864868, -0.45250967144966125, -0.5449854731559753, -0.12936045229434967, -0.49986326694488525, -0.9402053356170654, 0.7624486684799194, 0.03804395720362663, 0.21840158104896545, 0.6984111070632935, 0.58986896276474, -0.34055832028388977, 1.0667061805725098, 0.6318634152412415, -0.20921297371387482, 0.4909839332103729, -0.6588461995124817, 0.05963032692670822, -0.8807990550994873, -0.3112812638282776, -0.3321380615234375, -0.5713286995887756, -0.6700060963630676, -0.23832081258296967, 0.39071932435035706, 0.36227869987487793, -0.477192223072052, 0.6358669996261597, -0.6904083490371704, 0.3217061758041382, 0.7670632600784302, 0.5900763869285583, -0.3006514608860016, -0.24108059704303741, -0.3163219690322876, -0.24072284996509552, -0.8184281587600708, -0.2945038676261902, 1.1503798961639404, 0.36238256096839905, 0.5953079462051392, 0.12947548925876617, 0.8798275589942932, 0.07619893550872803, -0.05210034176707268, -0.7416688203811646, 0.6400158405303955, -0.11092156171798706, -1.0785126686096191, -0.4538591504096985, -0.3521188795566559, -1.127261757850647, 0.13680370151996613, -0.5492409467697144, -0.9501494765281677, 0.22717365622520447, 0.26479047536849976, -0.6618233323097229, 0.275825172662735, -0.8406098484992981, 0.9393753409385681, -0.04525575041770935, -0.4761393666267395, -0.03618825599551201, -0.9690922498703003, 0.3745495080947876, -0.002924421802163124, 0.09017422050237656, -0.09527987241744995, 0.17210960388183594, 1.012856364250183, -0.7059779167175293, 0.9891597032546997, -0.17358805239200592, 0.06506727635860443, 0.49887147545814514, -0.11728106439113617, 0.6375909447669983, -0.030834369361400604, 0.12192525714635849, -0.1135864108800888, 0.16692346334457397, -0.7962663173675537, -0.42648744583129883, 0.744841456413269, -1.0361627340316772, -0.5164592266082764, -0.4671834409236908, -0.6561629176139832, -0.313012957572937, 0.3699694573879242, 0.5752363801002502, 0.4954172968864441, 0.08004404604434967, 0.5093563795089722, 0.8781445622444153, -0.17598150670528412, 0.47872474789619446, 0.20009225606918335, 0.1601039320230484, -0.32785120606422424, 0.9381014704704285, 0.20430441200733185, 0.11856643110513687, 0.14504052698612213, 0.2820743918418884, -0.3211841285228729, -0.4623781740665436, -0.12137382477521896, 0.7048101425170898, -0.4492771327495575, -0.16605974733829498, -0.5958268642425537, -0.3042023479938507, -0.7179977893829346, -0.4855130612850189, -0.576457142829895, -0.6133092045783997, -0.5947602391242981, -0.05037766695022583, 0.3393062949180603, 0.6226103901863098, -0.2936333119869232, 0.29222607612609863, -0.8696603178977966, 0.2721731960773468, 0.5415753722190857, 0.33275195956230164, -0.13492748141288757, -0.5623737573623657, -0.25499147176742554, -0.0012606056407094002, -0.453706294298172, -0.6968618035316467, 0.42321598529815674, 0.27383995056152344, 0.7084900140762329, 0.5876415967941284, 0.02819954790174961, 1.0756701231002808, -0.5788625478744507, 0.9372065663337708, 0.663595974445343, -0.823759913444519, 0.5826322436332703, -0.4877707362174988, 0.23155172169208527, 0.5189018249511719, 0.6241964101791382, -0.030835988000035286, -0.10637357831001282, -1.164402723312378, -0.7614551782608032, 0.8144616484642029, 0.35047075152397156, 0.02368413843214512, 0.016710054129362106, 0.4011504650115967, -0.04295497015118599, 0.16004882752895355, -0.609093427658081, -0.6701853275299072, -0.1006433367729187, -0.2701196074485779, -0.14961682260036469, -0.43946966528892517, -0.19856314361095428, -0.6852951049804688, 0.8280342221260071, -0.10023032873868942, 0.6753532290458679, 0.12534713745117188, 0.16568432748317719, 0.06103134900331497, -0.08999467641115189, 0.7028171420097351, 0.7991623878479004, -0.6623218655586243, -0.35168418288230896, 0.12891946732997894, -0.6339622735977173, -0.17688456177711487, 0.264392614364624, -0.00942913256585598, 0.06284046173095703, 0.5350558161735535, 0.7707613110542297, 0.42091476917266846, -0.5257256031036377, 0.7562982439994812, -0.010219985619187355, -0.4478250741958618, -0.5224445462226868, 0.03110821545124054, 0.13463842868804932, 0.4198724925518036, 0.11345832049846649, -0.004951607435941696, 0.15055468678474426, -0.6612477898597717, 0.3210737407207489, 0.4534803628921509, -0.5418699979782104, -0.4615057110786438, 0.6519944071769714, 0.0768761932849884, 0.16551175713539124, 0.48352524638175964, -0.16698028147220612, -0.5665022134780884, 0.7201210260391235, 0.5057118535041809, 0.5122047662734985, -0.28916993737220764, 0.2025853842496872, 0.9104715585708618, 0.2438572347164154, -0.01428185310214758, 0.3594282567501068, 0.06035734713077545, -0.5926898121833801, 0.010847873985767365, -0.6804038882255554, -0.2298690229654312, 0.3162086606025696, -1.0703613758087158, 0.16965657472610474, -0.6539941430091858, -0.5030278563499451, 0.31074291467666626, 0.455496221780777, -0.9146892428398132, 0.5947589874267578, 0.268401175737381, 1.0651464462280273, -0.7314679026603699, 1.0682138204574585, 0.9191661477088928, -0.35416388511657715, -1.0911054611206055, -0.15253323316574097, 0.12095151096582413, -0.9062339663505554, 0.5932012796401978, 0.026445552706718445, 0.3986293375492096, -0.02593763917684555, -0.6371393799781799, -1.092323660850525, 1.3995373249053955, 0.2853735089302063, -0.5697587728500366, -0.2713835537433624, -0.13517175614833832, 0.47530561685562134, -0.14991861581802368, 0.37568846344947815, 0.596319317817688, 0.40651780366897583, 0.16481547057628632, -1.078084945678711, 0.1335548311471939, -0.4536338150501251, 0.03633880615234375, 0.23986504971981049, -1.2047910690307617, 1.3068628311157227, -0.3506123423576355, 0.053007133305072784, 0.193793386220932, 0.6246463656425476, 0.6347135305404663, 0.06532970815896988, 0.567281186580658, 0.9335079789161682, 0.6576080918312073, -0.283325731754303, 1.0887333154678345, -0.2658059000968933, 0.67401123046875, 1.0078518390655518, 0.3630715012550354, 0.7136314511299133, 0.37984204292297363, -0.4407676160335541, 0.4677022695541382, 0.8230388164520264, -0.14837221801280975, 0.6028281450271606, 0.2127828449010849, 0.02671523578464985, -0.5370093584060669, 0.156723752617836, -0.5437248945236206, 0.20918595790863037, 0.5187709331512451, -0.2889440655708313, -0.1320330649614334, -0.21431352198123932, 0.3252827525138855, -0.09005890786647797, -0.25054633617401123, 0.6475417613983154, 0.0000469459846499376, -0.37402787804603577, 0.791662335395813, -0.3089040219783783, 0.7460336089134216, -0.7364146709442139, 0.18759362399578094, -0.1405409574508667, 0.423737496137619, -0.1593865156173706, -0.9050692915916443, 0.03952394053339958, -0.09030020982027054, -0.18481214344501495, -0.0664077028632164, 0.6758240461349487, -0.22439458966255188, -0.6617053151130676, 0.28534290194511414, 0.33880752325057983, 0.22466401755809784, 0.19893525540828705, -1.1870005130767822, 0.19256959855556488, 0.06855496019124985, -0.6329571008682251, 0.44672319293022156, 0.4564618170261383, 0.23621921241283417, 0.6128001809120178, 0.6117689609527588, -0.167636439204216, 0.404947429895401, -0.30035167932510376, 1.164957880973816, -0.47918397188186646, -0.4225281774997711, -0.5962805151939392, 0.6423810124397278, -0.1622304618358612, -0.5065996050834656, 1.0148125886917114, 0.6379625797271729, 0.9393072128295898, -0.26603662967681885, 0.6082547903060913, -0.2569523751735687, 0.7160230875015259, -0.4104382395744324, 0.8223603963851929, -0.9838980436325073, -0.19512398540973663, -0.4112042188644409, -0.8213514089584351, -0.23093529045581818, 0.8077048659324646, -0.28817078471183777, 0.16866178810596466, 0.4430917501449585, 0.46764880418777466, 0.0019065095111727715, -0.19004973769187927, 0.1370210200548172, 0.2590388059616089, 0.22074973583221436, 0.9242613911628723, 0.4458042085170746, -0.7551154494285583, 0.4770895838737488, -0.8420135974884033, -0.22424161434173584, -0.4661310017108917, -0.5876172780990601, -1.2175726890563965, -0.7391831874847412, -0.42972469329833984, -0.2777763605117798, -0.08906827121973038, 1.0337101221084595, 1.0242363214492798, -0.7908274531364441, -0.11892973631620407, 0.2660982608795166, -0.17908808588981628, -0.18557442724704742, -0.1979401856660843, 0.6914989948272705, -0.1835584193468094, -0.9568713307380676, 0.034870315343141556, -0.23314516246318817, 0.42278164625167847, 0.24215485155582428, -0.200813427567482, -0.39133790135383606, 0.24664615094661713, 0.6062119007110596, 0.25807270407676697, -0.6662593483924866, -0.45833620429039, 0.02015072852373123, -0.17156285047531128, -0.021144945174455643, 0.20739281177520752, -0.559431254863739, 0.2454194575548172, 0.45395195484161377, 0.34525826573371887, 0.7250270843505859, 0.04638519883155823, 0.03756793960928917, -0.8181014657020569, 0.2836077809333801, 0.23933418095111847, 0.5257237553596497, 0.08705941587686539, -0.20864754915237427, 0.69753497838974, 0.28857091069221497, -0.7300916910171509, -1.035574197769165, -0.13939930498600006, -1.442996621131897, -0.2970767021179199, 0.8321974277496338, -0.46877530217170715, -0.5194071531295776, 0.5331423878669739, -0.1492050290107727, 0.2720738351345062, -0.4525987505912781, 0.6924436688423157, 0.7218514680862427, -0.23442229628562927, -0.1534985899925232, -0.4600212275981903, 0.6392109394073486, 0.4532071650028229, -0.707482635974884, -0.3531135320663452, 0.41519129276275635, 0.39327773451805115, 0.5196123719215393, 0.49387508630752563, -0.22090207040309906, 0.26153236627578735, 0.08984006941318512, 0.08148951083421707, 0.15984418988227844, -0.3723398447036743, -0.0035199779085814953, -0.17451085150241852, -0.27194419503211975, -0.48429617285728455 ]
dslim/bert-large-NER
dslim
"2023-05-02T18:47:40Z"
729,052
101
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "token-classification", "en", "dataset:conll2003", "arxiv:1810.04805", "license:mit", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: en datasets: - conll2003 license: mit model-index: - name: dslim/bert-large-NER results: - task: type: token-classification name: Token Classification dataset: name: conll2003 type: conll2003 config: conll2003 split: test metrics: - name: Accuracy type: accuracy value: 0.9031688753722759 verified: true - name: Precision type: precision value: 0.920025068328604 verified: true - name: Recall type: recall value: 0.9193688678588825 verified: true - name: F1 type: f1 value: 0.9196968510445761 verified: true - name: loss type: loss value: 0.5085050463676453 verified: true --- # bert-large-NER ## Model description **bert-large-NER** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** and achieves **state-of-the-art performance** for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC). Specifically, this model is a *bert-large-cased* model that was fine-tuned on the English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. If you'd like to use a smaller BERT model fine-tuned on the same dataset, a [**bert-base-NER**](https://huggingface.co/dslim/bert-base-NER/) version is also available. ## Intended uses & limitations #### How to use You can use this model with Transformers *pipeline* for NER. ```python from transformers import AutoTokenizer, AutoModelForTokenClassification from transformers import pipeline tokenizer = AutoTokenizer.from_pretrained("dslim/bert-base-NER") model = AutoModelForTokenClassification.from_pretrained("dslim/bert-base-NER") nlp = pipeline("ner", model=model, tokenizer=tokenizer) example = "My name is Wolfgang and I live in Berlin" ner_results = nlp(example) print(ner_results) ``` #### Limitations and bias This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities and post-processing of results may be necessary to handle those cases. ## Training data This model was fine-tuned on English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset. The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes: Abbreviation|Description -|- O|Outside of a named entity B-MIS |Beginning of a miscellaneous entity right after another miscellaneous entity I-MIS | Miscellaneous entity B-PER |Beginning of a person’s name right after another person’s name I-PER |Person’s name B-ORG |Beginning of an organization right after another organization I-ORG |organization B-LOC |Beginning of a location right after another location I-LOC |Location ### CoNLL-2003 English Dataset Statistics This dataset was derived from the Reuters corpus which consists of Reuters news stories. You can read more about how this dataset was created in the CoNLL-2003 paper. #### # of training examples per entity type Dataset|LOC|MISC|ORG|PER -|-|-|-|- Train|7140|3438|6321|6600 Dev|1837|922|1341|1842 Test|1668|702|1661|1617 #### # of articles/sentences/tokens per dataset Dataset |Articles |Sentences |Tokens -|-|-|- Train |946 |14,987 |203,621 Dev |216 |3,466 |51,362 Test |231 |3,684 |46,435 ## Training procedure This model was trained on a single NVIDIA V100 GPU with recommended hyperparameters from the [original BERT paper](https://arxiv.org/pdf/1810.04805) which trained & evaluated the model on CoNLL-2003 NER task. ## Eval results metric|dev|test -|-|- f1 |95.7 |91.7 precision |95.3 |91.2 recall |96.1 |92.3 The test metrics are a little lower than the official Google BERT results which encoded document context & experimented with CRF. More on replicating the original results [here](https://github.com/google-research/bert/issues/223). ### BibTeX entry and citation info ``` @article{DBLP:journals/corr/abs-1810-04805, author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding}, journal = {CoRR}, volume = {abs/1810.04805}, year = {2018}, url = {http://arxiv.org/abs/1810.04805}, archivePrefix = {arXiv}, eprint = {1810.04805}, timestamp = {Tue, 30 Oct 2018 20:39:56 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ``` ``` @inproceedings{tjong-kim-sang-de-meulder-2003-introduction, title = "Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition", author = "Tjong Kim Sang, Erik F. and De Meulder, Fien", booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003", year = "2003", url = "https://www.aclweb.org/anthology/W03-0419", pages = "142--147", } ```
[ -0.49237388372421265, -0.674572229385376, 0.2340385764837265, 0.15377138555049896, -0.36443331837654114, -0.11920760571956635, -0.47820279002189636, -0.6069490909576416, 0.3212290108203888, 0.3002339005470276, -0.4338715076446533, -0.5117213129997253, -0.7301931977272034, 0.2662251591682434, -0.4890313744544983, 1.2853388786315918, -0.057088419795036316, 0.29664358496665955, -0.027237772941589355, -0.1737949103116989, -0.1560283899307251, -0.7470169067382812, -0.9200559854507446, -0.17431870102882385, 0.6287117600440979, 0.12447576969861984, 0.3836657404899597, 0.3054400384426117, 0.533513069152832, 0.2831289768218994, -0.11082102358341217, 0.12429707497358322, -0.4076385200023651, -0.22921372950077057, 0.0014683419140055776, -0.25329020619392395, -0.3548184037208557, 0.08588256686925888, 0.7810290455818176, 0.7105448246002197, -0.000922805571462959, 0.13165858387947083, 0.151450514793396, 0.5840471982955933, -0.27304643392562866, 0.24453192949295044, -0.7259202003479004, -0.1117030680179596, -0.2621743977069855, 0.08582043647766113, -0.424344003200531, -0.2915988564491272, 0.43267521262168884, -0.4780500829219818, 0.5179001092910767, 0.01688966527581215, 1.4364383220672607, 0.028950462117791176, -0.4219984710216522, -0.26447540521621704, -0.6575777530670166, 0.8458753228187561, -0.8679618239402771, 0.6336995959281921, 0.12595272064208984, 0.04051119089126587, -0.13127264380455017, -0.8237074613571167, -0.8195342421531677, -0.21761812269687653, -0.2946830987930298, 0.044242486357688904, -0.06890524923801422, 0.08372863382101059, 0.33691272139549255, 0.2664514183998108, -0.5149528384208679, 0.122335284948349, -0.49570852518081665, -0.21865496039390564, 0.6155872941017151, -0.16395297646522522, 0.0433393232524395, -0.3028126060962677, -0.4975681006908417, -0.23662476241588593, -0.6025551557540894, 0.16846857964992523, 0.38555559515953064, 0.44277316331863403, -0.22429509460926056, 0.5176213979721069, -0.011825287714600563, 0.6092951893806458, 0.3112821578979492, -0.1314673125743866, 0.6239945888519287, -0.4600171148777008, -0.22500188648700714, 0.11416778713464737, 0.8301835060119629, 0.13842493295669556, 0.3026188611984253, -0.19944559037685394, -0.34914812445640564, -0.3122744560241699, 0.1480959802865982, -0.7167109847068787, -0.3151075839996338, -0.02152237482368946, -0.5330027937889099, -0.028877170756459236, 0.1373262256383896, -0.6116255521774292, -0.05624841898679733, -0.48007732629776, 0.41217002272605896, -0.561089277267456, -0.10101494193077087, -0.07223407924175262, -0.027143528684973717, 0.5179755687713623, 0.2373514324426651, -0.8818118572235107, 0.21592210233211517, 0.5204753279685974, 0.6151114702224731, -0.18798598647117615, -0.42571786046028137, -0.3195483982563019, -0.07284141331911087, -0.13859505951404572, 0.594756543636322, -0.3064494729042053, -0.20364850759506226, -0.003149823285639286, 0.22249260544776917, -0.199759840965271, -0.3207378089427948, 0.6925477981567383, -0.6969456672668457, 0.4444219172000885, -0.3527801036834717, -0.6556605100631714, -0.3188333809375763, 0.21526484191417694, -0.5690459609031677, 1.0962680578231812, 0.05591052025556564, -0.8720821738243103, 0.6664295196533203, -0.5192437767982483, -0.5267508625984192, -0.14289148151874542, -0.15828937292099, -0.5160595774650574, -0.05336757004261017, 0.2648131847381592, 0.42982345819473267, -0.110214963555336, 0.5208257436752319, -0.2162974774837494, -0.19610595703125, 0.0029779074247926474, -0.38794660568237305, 1.0126358270645142, -0.0000641739898128435, -0.3258962333202362, -0.08900237828493118, -0.9862879514694214, -0.2124984711408615, 0.20586366951465607, -0.6181656718254089, -0.4195816218852997, 0.07853146642446518, 0.08994508534669876, 0.11491257697343826, 0.46048638224601746, -0.6283115744590759, 0.09952327609062195, -0.5096705555915833, 0.2075115442276001, 0.6575915217399597, 0.039306238293647766, 0.44027552008628845, -0.18555302917957306, 0.04337196424603462, 0.1554831713438034, 0.024739276617765427, 0.1291644126176834, -0.4568602740764618, -1.2129433155059814, -0.33039790391921997, 0.7437900900840759, 0.5287156105041504, -0.6717862486839294, 0.7220127582550049, -0.4771084189414978, -0.569044291973114, -0.5795077085494995, 0.010222626850008965, 0.34425288438796997, 0.7293873429298401, 0.656233012676239, -0.26666420698165894, -0.9448629021644592, -1.033724308013916, -0.12925273180007935, -0.1429644525051117, 0.06124160811305046, 0.35647812485694885, 0.6437001824378967, -0.227110356092453, 0.9571462273597717, -0.24352815747261047, -0.26312217116355896, -0.28822994232177734, 0.2715986967086792, 0.47401338815689087, 0.6305601000785828, 0.5618736743927002, -0.8580095767974854, -0.5289649367332458, -0.3217426538467407, -0.690353274345398, 0.1481766551733017, -0.29109376668930054, -0.17979352176189423, 0.5755801200866699, 0.4279281795024872, -0.7017748951911926, 0.2964090406894684, 0.3483147919178009, -0.2146359384059906, 0.5461634397506714, -0.24262094497680664, -0.18020106852054596, -1.1070431470870972, 0.11558827012777328, 0.020060338079929352, -0.004273468162864447, -0.5412126183509827, -0.23615895211696625, 0.023455215618014336, 0.10663800686597824, -0.3157239258289337, 0.5852146148681641, -0.6502084732055664, -0.08714436739683151, 0.18447250127792358, 0.11323054134845734, -0.0319255068898201, 0.6368557214736938, 0.24054484069347382, 0.6621434092521667, 0.3822493851184845, -0.7877501845359802, 0.20577861368656158, 0.5065217614173889, -0.5944187045097351, 0.44588401913642883, -0.7659462690353394, 0.048584017902612686, -0.19760003685951233, 0.24534808099269867, -0.7860158681869507, 0.05609508976340294, 0.10610345005989075, -0.5903287529945374, 0.600633442401886, -0.04892143979668617, -0.6295324563980103, -0.44763797521591187, -0.10835499316453934, 0.09576386958360672, 0.434590607881546, -0.6001500487327576, 0.5660245418548584, 0.2286132127046585, -0.0692611038684845, -0.7722181081771851, -0.8217495679855347, 0.05020708963274956, -0.029207585379481316, -0.49264755845069885, 0.473609983921051, -0.08274823427200317, 0.0602424181997776, 0.13853225111961365, 0.013559387065470219, -0.15796461701393127, -0.030071258544921875, 0.07480517774820328, 0.5266413688659668, -0.3062216639518738, 0.32020214200019836, -0.007275093346834183, -0.008283448405563831, -0.03442120924592018, -0.17791420221328735, 0.5327273607254028, -0.09486354142427444, -0.15866120159626007, -0.34396955370903015, 0.2617684304714203, 0.39322221279144287, -0.24634195864200592, 0.9320976734161377, 0.8113521933555603, -0.5076220035552979, 0.21994054317474365, -0.6439749598503113, -0.19272856414318085, -0.4416172504425049, 0.3943262994289398, -0.3054158687591553, -0.7130945324897766, 0.43404820561408997, 0.39006441831588745, 0.307595819234848, 0.765052080154419, 0.4857823848724365, -0.17743657529354095, 0.6884754300117493, 0.5462063550949097, -0.24151399731636047, 0.5238574743270874, -0.4137338399887085, 0.4472641348838806, -0.91606605052948, -0.3176461160182953, -0.5632856488227844, -0.48148906230926514, -0.7375596165657043, -0.10999472439289093, 0.0665668472647667, 0.08220686763525009, -0.40991219878196716, 0.6335023641586304, -0.43345531821250916, 0.10449020564556122, 0.7991539239883423, 0.010544400662183762, 0.09789200872182846, 0.04166271910071373, -0.2707592844963074, -0.1520787924528122, -0.4865521788597107, -0.5108670592308044, 1.0120327472686768, 0.2983771562576294, 0.5694288015365601, 0.02148335427045822, 1.0151252746582031, 0.13377439975738525, 0.22594968974590302, -0.6922847032546997, 0.6673587560653687, -0.24009715020656586, -0.864906907081604, -0.33053770661354065, -0.3834972381591797, -1.1867032051086426, 0.020415855571627617, -0.381258100271225, -0.6552728414535522, 0.5313869118690491, -0.08952891826629639, -0.36711159348487854, 0.3703959882259369, -0.8141536116600037, 0.7368261814117432, -0.32987645268440247, 0.09896129369735718, -0.007957068271934986, -0.7494586706161499, 0.09123508632183075, -0.032290536910295486, -0.02430722676217556, 0.016645392403006554, 0.059200480580329895, 0.8837936520576477, -0.24775616824626923, 0.7766356468200684, -0.3621547520160675, 0.021812692284584045, 0.22371907532215118, -0.2647330164909363, 0.675105094909668, -0.016764434054493904, -0.014554557390511036, 0.47164425253868103, -0.17301875352859497, -0.28746262192726135, -0.2829330563545227, 0.7109659910202026, -0.9679105281829834, -0.4611363112926483, -0.46794694662094116, -0.4637778401374817, -0.09143832325935364, 0.45929020643234253, 0.5490490794181824, 0.47788727283477783, -0.1742844134569168, 0.4125339686870575, 0.7387433648109436, -0.3385305106639862, 0.6445280313491821, 0.5917961001396179, 0.11393490433692932, -0.38275012373924255, 0.6634194850921631, 0.4385788142681122, -0.003637968562543392, 0.6124909520149231, -0.2789784371852875, -0.3263080418109894, -0.611087441444397, -0.24607712030410767, 0.4188340902328491, -0.5674588084220886, -0.25472381711006165, -0.9555692076683044, -0.5631150603294373, -0.503296971321106, -0.05041831359267235, -0.3424021005630493, -0.38234832882881165, -0.7197725772857666, -0.1288030594587326, 0.22790436446666718, 0.4242524206638336, -0.007411122787743807, 0.14944122731685638, -0.7120851874351501, 0.25074538588523865, 0.39261770248413086, 0.33178114891052246, 0.022355856373906136, -0.6858071088790894, -0.3019373416900635, 0.1428302675485611, -0.17050525546073914, -0.6839277744293213, 0.450267493724823, 0.3622962534427643, 0.7118831872940063, 0.372131884098053, 0.07567880302667618, 0.6560800075531006, -0.6596843600273132, 0.9299248456954956, 0.1502622365951538, -0.7518717646598816, 0.44253331422805786, -0.12830136716365814, -0.04677542671561241, 0.6352123022079468, 0.4832713305950165, -0.38504213094711304, -0.19236093759536743, -0.935651957988739, -0.9842812418937683, 0.7035142779350281, 0.1719927191734314, 0.24117785692214966, -0.21696197986602783, 0.3196811378002167, 0.09595230966806412, 0.2655594050884247, -1.038730263710022, -0.48787838220596313, -0.06865198165178299, -0.24758099019527435, -0.17293979227542877, -0.41867825388908386, 0.015275797806680202, -0.38946065306663513, 1.0384876728057861, 0.24174636602401733, 0.76691734790802, 0.4886268377304077, -0.33614087104797363, 0.15367934107780457, 0.21769078075885773, 0.5330836176872253, 0.5033686757087708, -0.34869229793548584, 0.0754418820142746, 0.34524303674697876, -0.543061375617981, -0.13777132332324982, 0.5899825692176819, -0.2511252760887146, 0.3633563816547394, 0.37309929728507996, 0.8962361812591553, 0.20613732933998108, -0.3822225034236908, 0.5718953609466553, -0.0002499027468729764, -0.36230403184890747, -0.6193601489067078, -0.08576525002717972, -0.09568025916814804, 0.3791871964931488, 0.5420049428939819, 0.048145923763513565, 0.1199948713183403, -0.3495958745479584, 0.19310933351516724, 0.44748207926750183, -0.30830642580986023, -0.3073461055755615, 0.5481417775154114, 0.13262024521827698, -0.2299937754869461, 0.8492419123649597, -0.4346580505371094, -0.5040866136550903, 0.621975302696228, 0.5520182847976685, 0.9419047832489014, 0.08209219574928284, 0.017457792535424232, 0.7221186757087708, 0.4929082989692688, 0.007991751655936241, 0.2495323270559311, 0.07500657439231873, -0.937050998210907, -0.3135734796524048, -0.7085177302360535, -0.08795904368162155, 0.34364405274391174, -0.7000634670257568, 0.532954216003418, -0.377207487821579, -0.20802630484104156, 0.25016558170318604, 0.171706423163414, -0.886752188205719, 0.24424296617507935, 0.3551028072834015, 1.065849781036377, -0.564403772354126, 0.9506818056106567, 0.7610694766044617, -0.6051529049873352, -0.7222023010253906, -0.001993627520278096, -0.343980997800827, -0.7776204347610474, 0.780274510383606, 0.16543808579444885, 0.3213186264038086, 0.06711647659540176, -0.6076029539108276, -1.108681559562683, 1.1259684562683105, 0.18351946771144867, -0.6532899141311646, -0.3745047450065613, -0.0901273861527443, 0.6046133041381836, -0.32612553238868713, 0.15445014834403992, 0.4286539852619171, 0.45676499605178833, -0.11073598265647888, -0.9456859827041626, -0.022790348157286644, -0.20577998459339142, 0.09510619938373566, 0.28757786750793457, -0.7104815244674683, 0.9563745260238647, -0.29834404587745667, -0.207220196723938, 0.04237520694732666, 0.7807542681694031, 0.1829913854598999, 0.3033027648925781, 0.5958050489425659, 0.7555147409439087, 0.7970476746559143, -0.28316712379455566, 0.884849488735199, -0.33881595730781555, 0.5886557698249817, 1.2995002269744873, 0.009856553748250008, 0.8822461366653442, 0.484164834022522, -0.30875444412231445, 0.7988227009773254, 0.7513726949691772, -0.3943547010421753, 0.780415952205658, -0.023810533806681633, 0.011670024134218693, 0.006718535907566547, 0.11465143412351608, -0.4872497618198395, 0.41648629307746887, 0.22517842054367065, -0.6587018370628357, -0.15239784121513367, -0.0794871374964714, 0.17514203488826752, -0.3550735116004944, -0.1914941966533661, 0.7084958553314209, 0.057465195655822754, -0.584087073802948, 0.7038559317588806, -0.008014736697077751, 0.7456509470939636, -0.6170729398727417, 0.09867127239704132, -0.15491019189357758, 0.10862862318754196, -0.08337071537971497, -0.6246368288993835, 0.27614733576774597, -0.0015573155833408237, -0.393537700176239, -0.08157649636268616, 0.6826938986778259, -0.499374657869339, -0.4858757257461548, 0.3317421078681946, 0.3375508487224579, 0.2592962682247162, 0.1357128918170929, -0.8013550043106079, -0.364679753780365, 0.07851651310920715, -0.46603724360466003, 0.13186009228229523, 0.5606984496116638, 0.1820889413356781, 0.35422512888908386, 0.6865400671958923, 0.007888096384704113, 0.14876322448253632, 0.04988788813352585, 0.7601038813591003, -0.691897451877594, -0.345517635345459, -0.7329514622688293, 0.4290838837623596, -0.26013514399528503, -0.44548940658569336, 0.687376081943512, 0.736061692237854, 1.1103124618530273, -0.09154227375984192, 0.7172533869743347, -0.37573665380477905, 0.704250156879425, -0.37887707352638245, 0.5790630578994751, -0.5008050203323364, 0.09001481533050537, -0.24141275882720947, -0.943792998790741, -0.2068558633327484, 0.7081512212753296, -0.4236793518066406, 0.17121922969818115, 0.663516104221344, 0.5730670690536499, 0.01119779609143734, -0.19692914187908173, 0.040799275040626526, 0.4393734633922577, 0.13885892927646637, 0.4668193459510803, 0.5125248432159424, -0.5948625206947327, 0.6381272673606873, -0.30210548639297485, 0.061247896403074265, -0.34388917684555054, -0.7940858006477356, -0.9374152421951294, -0.7275151014328003, -0.287183940410614, -0.4302389919757843, -0.014308498241007328, 0.9712526202201843, 0.6255964636802673, -1.0464390516281128, 0.016065705567598343, -0.18567132949829102, 0.06437443196773529, -0.19956961274147034, -0.24248404800891876, 0.5623362064361572, -0.4686976373195648, -0.8635054230690002, 0.05968819931149483, -0.06463541835546494, 0.2600245177745819, -0.14180520176887512, -0.07785781472921371, -0.6757898330688477, 0.04766908288002014, 0.558229923248291, 0.23479382693767548, -0.6712435483932495, -0.34275519847869873, 0.0996081605553627, -0.33571693301200867, 0.15131543576717377, 0.4062771201133728, -0.7084465622901917, 0.38679349422454834, 0.3640940487384796, 0.6628062129020691, 0.5647745132446289, -0.19990777969360352, 0.25489091873168945, -0.9176807999610901, 0.1507975459098816, 0.22334302961826324, 0.5974568724632263, 0.44245409965515137, -0.4596736431121826, 0.5365101099014282, 0.37585020065307617, -0.5878505706787109, -0.7224480509757996, -0.17835092544555664, -1.1326239109039307, -0.047606028616428375, 1.2405472993850708, -0.17650949954986572, 0.008881822228431702, -0.036018840968608856, -0.16746385395526886, 0.5546678900718689, -0.5801309943199158, 0.6934423446655273, 0.8417581915855408, 0.08508530259132385, -0.12711367011070251, -0.5063838362693787, 0.4313336908817291, 0.22781604528427124, -0.5302282571792603, -0.3459780514240265, 0.30421775579452515, 0.3721679747104645, 0.33983105421066284, 0.489571750164032, -0.037741079926490784, -0.02415209822356701, -0.20873844623565674, 0.40240249037742615, 0.1420067399740219, -0.19152890145778656, -0.20307011902332306, -0.18052887916564941, -0.14040729403495789, -0.3706265985965729 ]
sshleifer/distilbart-cnn-12-6
sshleifer
"2021-06-14T07:51:12Z"
726,838
190
transformers
[ "transformers", "pytorch", "jax", "rust", "bart", "text2text-generation", "summarization", "en", "dataset:cnn_dailymail", "dataset:xsum", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
summarization
"2022-03-02T23:29:05Z"
--- language: en tags: - summarization license: apache-2.0 datasets: - cnn_dailymail - xsum thumbnail: https://huggingface.co/front/thumbnails/distilbart_medium.png --- ### Usage This checkpoint should be loaded into `BartForConditionalGeneration.from_pretrained`. See the [BART docs](https://huggingface.co/transformers/model_doc/bart.html?#transformers.BartForConditionalGeneration) for more information. ### Metrics for DistilBART models | Model Name | MM Params | Inference Time (MS) | Speedup | Rouge 2 | Rouge-L | |:---------------------------|------------:|----------------------:|----------:|----------:|----------:| | distilbart-xsum-12-1 | 222 | 90 | 2.54 | 18.31 | 33.37 | | distilbart-xsum-6-6 | 230 | 132 | 1.73 | 20.92 | 35.73 | | distilbart-xsum-12-3 | 255 | 106 | 2.16 | 21.37 | 36.39 | | distilbart-xsum-9-6 | 268 | 136 | 1.68 | 21.72 | 36.61 | | bart-large-xsum (baseline) | 406 | 229 | 1 | 21.85 | 36.50 | | distilbart-xsum-12-6 | 306 | 137 | 1.68 | 22.12 | 36.99 | | bart-large-cnn (baseline) | 406 | 381 | 1 | 21.06 | 30.63 | | distilbart-12-3-cnn | 255 | 214 | 1.78 | 20.57 | 30.00 | | distilbart-12-6-cnn | 306 | 307 | 1.24 | 21.26 | 30.59 | | distilbart-6-6-cnn | 230 | 182 | 2.09 | 20.17 | 29.70 |
[ -0.7004638910293579, -0.37246254086494446, 0.6146761178970337, 0.42377880215644836, -0.21030642092227936, 0.24040108919143677, 0.2147960215806961, -0.01918272115290165, 0.24913567304611206, 0.4586901366710663, -0.9983054995536804, -0.6250293254852295, -0.8680077195167542, -0.184769406914711, -0.16152209043502808, 1.241416096687317, -0.1863904446363449, 0.13704226911067963, -0.16264666616916656, -0.246164008975029, -0.6842718124389648, -0.29650238156318665, -0.8530401587486267, -0.2977011799812317, 0.5389742851257324, 0.533550500869751, 0.6279786229133606, 0.14264145493507385, 0.6519528031349182, 0.34753134846687317, -0.4408654570579529, 0.06662774085998535, -0.6048316359519958, 0.08397606015205383, -0.04016612470149994, -0.31729087233543396, -0.8815397024154663, -0.02523999847471714, 0.9085747003555298, 0.7278040051460266, -0.10316196084022522, 0.5985379219055176, 0.1655920445919037, 1.022964596748352, -0.7405539155006409, 0.29839906096458435, -0.36943167448043823, 0.1123192235827446, -0.21600110828876495, -0.25198784470558167, -0.30253028869628906, -0.4197317957878113, -0.013990174978971481, -0.8624969720840454, 0.4675084054470062, 0.27582672238349915, 1.5136934518814087, 0.7120868563652039, -0.5556091666221619, 0.004866538103669882, -0.6756638288497925, 0.9728825688362122, -0.8123860955238342, 0.1758461892604828, 0.6294505596160889, 0.7483333349227905, 0.05889098346233368, -1.2800413370132446, -0.6327468752861023, 0.05820326507091522, -0.4640312194824219, 0.27303680777549744, -0.5085679888725281, 0.16179043054580688, 0.8998374938964844, 0.671051025390625, -0.6217046976089478, 0.051644276827573776, -0.7822385430335999, -0.3974747061729431, 0.598598062992096, 0.8476666808128357, -0.2716643512248993, -0.23672010004520416, -0.546012818813324, -0.4439682364463806, -0.18249814212322235, 0.2037750631570816, 0.19891133904457092, 0.11729218810796738, -0.5487271547317505, 0.5478889346122742, -0.5839287638664246, 0.5738477110862732, 0.22887425124645233, -0.1727219671010971, 0.9705582857131958, -0.7410489320755005, -0.4350298047065735, -0.09395884722471237, 0.7868448495864868, 0.4901961088180542, 0.07147694379091263, 0.5096851587295532, -0.4202682375907898, -0.19672590494155884, 0.44405609369277954, -1.2754764556884766, -0.472508043050766, 0.19229267537593842, -0.3733466565608978, -0.3121139705181122, 0.17832283675670624, -0.9421095252037048, 0.23521511256694794, -0.3202800452709198, 0.46967604756355286, -0.3969474136829376, -0.2718977928161621, -0.18194498121738434, -0.3892120122909546, 0.33754417300224304, 0.32189568877220154, -0.7960937023162842, 0.3531521260738373, 0.33632025122642517, 1.0830389261245728, 0.1527114063501358, -0.042240072041749954, -0.4681464433670044, 0.023353934288024902, -0.5139297246932983, 0.43703511357307434, 0.047385040670633316, -0.42258432507514954, -0.2956950068473816, 0.6024361252784729, -0.11851000785827637, -0.4611752927303314, 0.7998171448707581, -0.6141958832740784, 0.34186652302742004, -0.6126875281333923, -0.5560126900672913, -0.4374502897262573, 0.39896366000175476, -0.6824320554733276, 1.7316443920135498, 0.5574740767478943, -1.1927684545516968, 0.8499085307121277, -0.7448608875274658, -0.48131585121154785, -0.007139917463064194, 0.05684920772910118, -1.0809651613235474, 0.018354440107941628, 0.2904508113861084, 0.5704503655433655, -0.13635443150997162, 0.45222169160842896, -0.4242211580276489, -0.27887842059135437, -0.2930344045162201, -0.48828521370887756, 1.3675557374954224, 0.5253298878669739, -0.47024911642074585, 0.27356019616127014, -1.0303208827972412, 0.07344778627157211, 0.2625439167022705, -0.1934700906276703, -0.07809022068977356, -0.19080252945423126, 0.019323788583278656, 0.043758220970630646, 0.46011772751808167, -0.3579022288322449, -0.06054052710533142, 0.28874966502189636, 0.22557274997234344, 0.8701008558273315, 0.22152778506278992, 0.245718315243721, -0.7158023118972778, 0.7511103749275208, 0.3966023623943329, 0.29002928733825684, -0.04712052643299103, -0.47401803731918335, -1.1782106161117554, -0.7257944345474243, 0.2776929438114166, 0.5956678986549377, -0.6325350999832153, 1.1322886943817139, -0.3813653588294983, -0.6745786666870117, -0.11690546572208405, -0.2537151277065277, 0.192934051156044, 0.8202160000801086, 0.7096965312957764, -0.5983935594558716, -0.7554087042808533, -1.2820217609405518, 0.504510760307312, -0.25697389245033264, 0.003234364790841937, 0.11273842304944992, 0.8310694098472595, -0.3383614122867584, 1.0014352798461914, -0.8204171657562256, -0.21293838322162628, -0.4090529680252075, 0.2959294021129608, 0.6165875792503357, 0.7858046293258667, 0.8331921696662903, -0.3631277084350586, -0.6058040261268616, -0.5115483999252319, -0.7161732912063599, -0.13776884973049164, -0.07247982919216156, -0.31292417645454407, -0.13495829701423645, 0.5748852491378784, -0.44153082370758057, 0.7869110703468323, 0.6500300168991089, -0.5428523421287537, 0.9639312624931335, -0.295041024684906, 0.2395441085100174, -1.3187919855117798, 0.3899680972099304, -0.18036511540412903, -0.6247220039367676, -0.415714830160141, -0.09551037847995758, 0.003716518869623542, 0.14954987168312073, -0.4413678050041199, 0.6785424947738647, -0.5385945439338684, -0.193181574344635, 0.09402138739824295, -0.2916555404663086, 0.4364296495914459, 0.6004253029823303, -0.15681716799736023, 0.66706782579422, 0.7719513773918152, -0.850155234336853, 0.17778180539608002, 0.42657822370529175, -0.8755271434783936, 0.5105670690536499, -0.8119744658470154, -0.11634667962789536, 0.030954008921980858, 0.7404815554618835, -1.1930301189422607, -0.27129361033439636, 0.2170667201280594, -0.3586472272872925, 0.5094412565231323, 0.018709657713770866, -0.44546276330947876, -0.6458382606506348, -0.0892912819981575, 0.6704457998275757, 0.7932567596435547, -0.31992805004119873, 0.5053969621658325, 0.16747505962848663, -0.012013637460768223, -0.5543319582939148, -0.7421140670776367, -0.46199098229408264, -0.5427080392837524, -0.5117066502571106, 0.41568803787231445, 0.03429077938199043, -0.1238229051232338, -0.33390137553215027, -0.08441454917192459, -0.22242164611816406, -0.004369914066046476, 0.3416445851325989, 0.465955913066864, -0.31191790103912354, -0.3557116389274597, 0.3778184652328491, -0.395074725151062, 0.0021668614353984594, 0.36756402254104614, 0.8505348563194275, 0.00025021389592438936, -0.45050451159477234, -0.7526431083679199, -0.05295456945896149, 0.6822704076766968, -0.0907738134264946, 0.8003080487251282, 0.9638149738311768, -0.26459866762161255, 0.0985596776008606, -0.6892499923706055, -0.3163559138774872, -0.5397931337356567, 0.6795154213905334, -0.3270677328109741, -0.6294575333595276, 0.8714978694915771, -0.10694106668233871, 0.2237941175699234, 0.8802894353866577, 0.6938639879226685, -0.1653033345937729, 1.0528321266174316, 0.47503605484962463, 0.03774991258978844, 0.5340090990066528, -0.6618285775184631, -0.0674557089805603, -1.0410035848617554, -0.23024338483810425, -0.7346622943878174, -0.6249096393585205, -0.4434920847415924, -0.6820381283760071, 0.4533788859844208, 0.3665867745876312, -1.2006627321243286, 0.7164773344993591, -0.4907948672771454, 0.18338631093502045, 0.8270177841186523, 0.10453025996685028, 0.2606208920478821, -0.27938443422317505, -0.5236846804618835, -0.23621010780334473, -0.8552987575531006, -0.3880678117275238, 1.1206917762756348, 0.5331684350967407, 0.49809402227401733, -0.11339814215898514, 0.7728275060653687, 0.17030058801174164, 0.38932889699935913, -0.5581823587417603, 0.5592646598815918, 0.0581945963203907, -1.544857382774353, -0.17110800743103027, -0.6263705492019653, -0.837963879108429, 0.14318041503429413, 0.013468094170093536, -0.745617687702179, 0.4593479335308075, 0.30115827918052673, -0.5586468577384949, 0.45752859115600586, -0.49647462368011475, 1.1394928693771362, -0.20118923485279083, -0.04448892921209335, -0.37982654571533203, -0.8682836890220642, 0.5281457901000977, -0.1598915308713913, 0.17995648086071014, -0.47636541724205017, 0.1330450028181076, 0.8893619775772095, -0.6361424922943115, 0.8806472420692444, -0.4943658113479614, 0.4796521067619324, 0.4948183596134186, -0.11502043902873993, 0.5278273224830627, 0.1144920140504837, -0.08315964043140411, 0.4019690454006195, 0.38353803753852844, -0.7547833919525146, -0.21755537390708923, 0.1890244334936142, -0.7613261342048645, -0.2708147466182709, -0.848681628704071, -0.6776947379112244, -0.22942325472831726, 0.28718501329421997, 0.645880937576294, 0.3583388328552246, -0.397856742143631, 0.28901562094688416, 0.42123275995254517, -0.44014471769332886, 0.6744396090507507, 0.5707287788391113, -0.4875814914703369, -0.5286816358566284, 0.7339288592338562, -0.2006695568561554, 0.7172528505325317, 0.14821818470954895, 0.033171799033880234, -0.42382487654685974, -0.3914993405342102, -0.6006960272789001, 0.058839745819568634, -0.7325974106788635, -0.46321985125541687, -0.4889199733734131, -0.4737241864204407, -0.26696449518203735, -0.1327769160270691, -0.6489905714988708, -0.6494935750961304, -0.3445439636707306, -0.1725642830133438, 0.3894607126712799, 0.41628149151802063, -0.4218139350414276, 0.6236647963523865, -0.9195992350578308, 0.19010478258132935, 0.25424909591674805, 0.08764859288930893, -0.03405848890542984, -1.173549771308899, -0.40592488646507263, -0.1300206333398819, -0.952505886554718, -0.5610599517822266, 0.3558815121650696, 0.1283673793077469, 0.7658716440200806, 0.8750290274620056, 0.21476559340953827, 1.0712922811508179, -0.3643452227115631, 0.9862455129623413, 0.5503566265106201, -0.9021431803703308, 0.5265178084373474, -0.2919920086860657, 0.3031395971775055, 1.0301517248153687, 0.6551597714424133, -0.283591628074646, -0.3014824092388153, -0.9554145336151123, -1.1154807806015015, 0.7942865490913391, 0.3455468416213989, -0.07711325585842133, 0.1043509915471077, -0.16510771214962006, -0.18026472628116608, 0.20923691987991333, -0.8747939467430115, -0.385322242975235, -0.2650214731693268, -0.0031484419014304876, -0.13711372017860413, -0.024429241195321083, -0.39547815918922424, -0.8603096604347229, 0.9726132154464722, 0.03501186519861221, 0.25177931785583496, 0.11580134183168411, 0.2556690573692322, -0.06360974162817001, -0.16870343685150146, 0.578117847442627, 0.8623055815696716, -0.6392804384231567, -0.22472909092903137, 0.5019409656524658, -0.4974497854709625, 0.1393735259771347, 0.1448500156402588, 0.012375053949654102, 0.1614685356616974, 0.6889433264732361, 1.1428401470184326, 0.16939830780029297, -0.45320194959640503, 0.47279495000839233, 0.08040402084589005, -0.3956141173839569, -0.7150177359580994, 0.050496943295001984, -0.18433701992034912, 0.4009076654911041, 0.2792152762413025, 0.30096033215522766, -0.04741469770669937, -0.3602506220340729, 0.3294328451156616, 0.48869189620018005, -0.801263689994812, -0.1403486281633377, 0.8485637307167053, -0.018401451408863068, 0.16256076097488403, 1.0339984893798828, -0.3593910336494446, -0.441497266292572, 0.9515470862388611, 0.2022392302751541, 1.1328517198562622, -0.3210614025592804, 0.08367685228586197, 1.2063937187194824, 0.29086554050445557, -0.1342201977968216, 0.03439171612262726, 0.07477864623069763, -0.9230692386627197, -0.35603371262550354, -1.1390025615692139, -0.14447017014026642, 0.10031338781118393, -1.3576102256774902, 0.6529104113578796, -0.5372808575630188, -0.571360170841217, -0.06272121518850327, -0.035562001168727875, -1.1132012605667114, 0.4679478108882904, -0.03070095181465149, 1.0973461866378784, -0.9306325912475586, 1.0483944416046143, 0.3630099892616272, -0.5904088020324707, -1.2196712493896484, -0.1865413635969162, 0.10524850338697433, -1.0841832160949707, 0.7886545658111572, 0.18939870595932007, 0.2581769824028015, 0.010953327640891075, -0.3562098443508148, -1.013238549232483, 1.7381913661956787, 0.14599739015102386, -0.963872492313385, -0.11045542359352112, -0.06579315662384033, 0.3496038317680359, -0.2018212378025055, 0.7779560089111328, 0.811191737651825, 0.8345207571983337, 0.4660160541534424, -1.1390749216079712, 0.16809393465518951, -0.04060442000627518, -0.07855503261089325, 0.25339579582214355, -0.8268139958381653, 1.1279996633529663, -0.2746974527835846, -0.07633304595947266, 0.1886889636516571, 0.7358489632606506, 0.7094706296920776, 0.5123682618141174, 1.0289992094039917, 1.272221326828003, 0.5778005123138428, -0.2805856466293335, 1.0891776084899902, -0.3804255425930023, 0.8526071310043335, 1.2019681930541992, 0.06780769675970078, 0.5430926084518433, 0.20895612239837646, -0.7492347955703735, 0.8648504614830017, 1.1743221282958984, -0.22388525307178497, 0.6783515214920044, 0.19767208397388458, -0.06478670984506607, -0.33052682876586914, 0.5899716019630432, -0.918668806552887, 0.3028501570224762, 0.3849046528339386, -0.6174866557121277, -0.3105148375034332, -0.45145705342292786, 0.2868086099624634, -0.70424884557724, -0.242582306265831, 0.637992262840271, 0.08148370683193207, -0.6986313462257385, 0.8762621283531189, -0.16081784665584564, 0.33824267983436584, -0.9154585003852844, 0.21798300743103027, -0.34777766466140747, 0.4211406409740448, -0.1554783284664154, -0.6508237719535828, 0.6130152344703674, -0.20789112150669098, -0.3119295835494995, -0.1464489847421646, 0.12844261527061462, 0.19661261141300201, -0.9877987504005432, 0.4583089053630829, 0.33737826347351074, 0.2933768033981323, 0.033068835735321045, -1.0787204504013062, -0.021382970735430717, 0.21093010902404785, -0.545811116695404, 0.31955328583717346, 0.6019068360328674, 0.19930781424045563, 0.5751532912254333, 0.5162572860717773, -0.2969822883605957, 0.08252040296792984, 0.18529775738716125, 1.2845451831817627, -0.6776859164237976, -0.5950354933738708, -0.6962293982505798, 1.248633623123169, -0.2820988595485687, -0.9532878994941711, 0.8064166307449341, 0.9922632575035095, 0.8665074706077576, 0.1375059187412262, 0.5464555621147156, -0.425298810005188, 0.6256435513496399, -0.5234299898147583, 0.7221784591674805, -0.979245126247406, 0.09573502093553543, -0.666083037853241, -1.3888593912124634, 0.0012497120769694448, 0.7630184888839722, -0.34727662801742554, 0.3747681677341461, 1.0257928371429443, 1.0077191591262817, -0.3196409046649933, -0.0076615833677351475, 0.08207236975431442, 0.30388474464416504, 0.33707696199417114, 0.3522040843963623, 0.7046371102333069, -0.585940420627594, 0.42428210377693176, -0.545512855052948, -0.659567654132843, -0.008295424282550812, -0.9715123176574707, -0.860903799533844, -0.7047106623649597, -0.3776223659515381, -0.7328393459320068, -0.4492069184780121, 0.648261547088623, 1.1875935792922974, -1.1587731838226318, -0.22518253326416016, -0.2504446506500244, -0.2736833691596985, -0.43702784180641174, -0.3193594813346863, 0.40246039628982544, -0.6000410914421082, -0.9955864548683167, 0.18505699932575226, -0.03303324431180954, -0.00601155823096633, -0.4465513229370117, -0.2686958611011505, -0.14063195884227753, -0.020704159513115883, 0.2536410689353943, 0.12399917840957642, -0.4949197769165039, -0.2989756166934967, -0.44152912497520447, -0.011690481565892696, 0.23943671584129333, 0.733247697353363, -0.5633611679077148, 0.33862847089767456, 0.6548126339912415, 0.19102056324481964, 1.2927199602127075, 0.15487907826900482, 0.3630075454711914, -0.8290157318115234, 0.6184815764427185, 0.47958865761756897, 0.6336963772773743, 0.16540898382663727, 0.06663522869348526, 0.5500360131263733, 0.46852046251296997, -1.0270572900772095, -1.0179234743118286, 0.1484586000442505, -1.376889944076538, -0.11505886912345886, 0.9137470126152039, -0.2699415385723114, 0.05745723843574524, -0.16206440329551697, 0.06774559617042542, 0.3592112362384796, -0.33569714426994324, 0.6057049632072449, 0.7131184935569763, -0.08852332085371017, 0.15326550602912903, -0.8329817652702332, 0.4896654784679413, 0.517159640789032, -0.791388988494873, -0.36259740591049194, 0.44828832149505615, 0.4950956106185913, 0.39691591262817383, 0.8220247626304626, -0.15447083115577698, -0.036397527903318405, 0.4461806118488312, 0.1890532225370407, 0.11769655346870422, -0.3700527548789978, 0.17423148453235626, -0.2792457938194275, -0.21419470012187958, -0.5732173919677734 ]
meta-llama/Llama-2-70b-chat-hf
meta-llama
"2023-11-13T16:28:44Z"
724,485
1,699
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "facebook", "meta", "llama-2", "en", "arxiv:2307.09288", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-14T18:02:07Z"
--- extra_gated_heading: Access Llama 2 on Hugging Face extra_gated_description: >- This is a form to enable access to Llama 2 on Hugging Face after you have been granted access from Meta. Please visit the [Meta website](https://ai.meta.com/resources/models-and-libraries/llama-downloads) and accept our license terms and acceptable use policy before submitting this form. Requests will be processed in 1-2 days. extra_gated_prompt: "**Your Hugging Face account email address MUST match the email you provide on the Meta website, or your request will not be approved.**" extra_gated_button_content: Submit extra_gated_fields: I agree to share my name, email address and username with Meta and confirm that I have already been granted download access on the Meta website: checkbox language: - en pipeline_tag: text-generation inference: false tags: - facebook - meta - pytorch - llama - llama-2 --- # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 70B fine-tuned model, optimized for dialogue use cases and converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/meta-llama/Llama-2-7b) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/meta-llama/Llama-2-13b) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)| |70B| [Link](https://huggingface.co/meta-llama/Llama-2-70b) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf)|
[ -0.18728230893611908, -0.7213094830513, 0.37108150124549866, 0.18164390325546265, -0.37902939319610596, 0.21031323075294495, -0.0048586721532046795, -0.8164850473403931, 0.029289571568369865, 0.35895824432373047, -0.6709327101707458, -0.5806912779808044, -0.6880230903625488, 0.04552086442708969, -0.23502162098884583, 1.0890791416168213, -0.02909776195883751, -0.26027387380599976, -0.1488558053970337, 0.06771382689476013, -0.5470985770225525, -0.42530903220176697, -0.5279900431632996, -0.4440580904483795, 0.4218274652957916, 0.5129567980766296, 0.626140832901001, 0.631908118724823, 0.5741915106773376, 0.2339032143354416, -0.26237234473228455, 0.21430717408657074, -0.7084319591522217, -0.2876676321029663, 0.09930708259344101, -0.5531181693077087, -0.7172629833221436, 0.1892986297607422, 0.3191831707954407, 0.18653275072574615, -0.3028213083744049, 0.5461030006408691, 0.04901759698987007, 0.49425533413887024, -0.5781511664390564, 0.17875750362873077, -0.7219515442848206, 0.02503550425171852, -0.2271694391965866, -0.08106429874897003, -0.23062074184417725, -0.29517900943756104, -0.20495985448360443, -0.8273148536682129, -0.16029547154903412, 0.10094183683395386, 1.046303629875183, 0.6685581207275391, -0.49710723757743835, -0.11664983630180359, -0.307187020778656, 0.9886606335639954, -0.8766794800758362, 0.05614010617136955, 0.6120163798332214, 0.29613277316093445, -0.2115514576435089, -0.7581473588943481, -0.6716961860656738, -0.15760625898838043, 0.05875428020954132, 0.36790144443511963, -0.4637877941131592, -0.01088669802993536, 0.15218991041183472, 0.3381177484989166, -0.6047694683074951, 0.6161516904830933, -0.5293896794319153, -0.1628473401069641, 1.0728884935379028, 0.2504037320613861, 0.018334979191422462, -0.03979033604264259, -0.5340536236763, -0.2996855676174164, -0.8532834649085999, 0.18677467107772827, 0.49165990948677063, -0.08643176406621933, -0.4614013135433197, 0.6718213558197021, -0.36086505651474, 0.2685786783695221, -0.032264504581689835, -0.5435787439346313, 0.45157361030578613, -0.48167482018470764, -0.27505403757095337, -0.11667662858963013, 0.8653832674026489, 0.7896649837493896, 0.184745654463768, 0.1033661738038063, -0.07855597138404846, 0.13771647214889526, 0.0062035988084971905, -0.8183317184448242, -0.046679042279720306, 0.23103271424770355, -0.4182266592979431, -0.5986787676811218, -0.336713969707489, -0.7760082483291626, -0.21587295830249786, -0.09775026887655258, 0.24470466375350952, -0.010934435762465, -0.4238957464694977, 0.13886241614818573, 0.06332909315824509, 0.5591278672218323, 0.22651885449886322, -0.9583368301391602, 0.2709200084209442, 0.581428587436676, 0.7985969185829163, -0.28037765622138977, -0.355255663394928, 0.043368492275476456, -0.007379655726253986, -0.3470548987388611, 0.9374281764030457, -0.35075852274894714, -0.5766417384147644, -0.23689474165439606, -0.03621170297265053, 0.18665896356105804, -0.55788254737854, 0.45596420764923096, -0.39894890785217285, 0.15975680947303772, -0.34540727734565735, -0.36199891567230225, -0.3803003132343292, 0.19862498342990875, -0.44545242190361023, 1.4886078834533691, 0.12265463173389435, -0.5060750842094421, 0.279011994600296, -0.7139899134635925, -0.15192635357379913, -0.2530035376548767, 0.11363042891025543, -0.5461199879646301, -0.27425694465637207, 0.11359978467226028, 0.34240013360977173, -0.686053454875946, 0.49942901730537415, -0.20223423838615417, -0.449321985244751, 0.04774504154920578, -0.43864160776138306, 0.8910031318664551, 0.29700198769569397, -0.4689257740974426, 0.05407433211803436, -0.8326115608215332, 0.010495946742594242, 0.4813050925731659, -0.4855424165725708, 0.24264182150363922, 0.11401934921741486, -0.09629525244235992, 0.17142044007778168, 0.46952471137046814, -0.35301584005355835, 0.17435576021671295, -0.3227049708366394, 0.4996625781059265, 0.7666413187980652, 0.06680306792259216, 0.1659926176071167, -0.552975594997406, 0.5337684750556946, 0.0023618319537490606, 0.3999113440513611, 0.05011842027306557, -0.7576121687889099, -1.0437320470809937, -0.16092102229595184, -0.03963739052414894, 0.8941343426704407, -0.23145674169063568, 0.6642352938652039, -0.015584660694003105, -0.7506561875343323, -0.4143942594528198, 0.34254246950149536, 0.6796393990516663, 0.5344043970108032, 0.45102763175964355, -0.2909969985485077, -0.6243937015533447, -1.0376803874969482, 0.025142773985862732, -0.49796590209007263, 0.0008744770893827081, 0.38958606123924255, 0.6860458850860596, -0.3520548641681671, 0.7526763081550598, -0.5530160665512085, -0.175393745303154, -0.2736576199531555, -0.11730144172906876, 0.03515402227640152, 0.3587678074836731, 0.6833083033561707, -0.41142770648002625, -0.18073810636997223, -0.13456548750400543, -0.9263401031494141, -0.09284769743680954, 0.12059184908866882, -0.2085830420255661, 0.273795485496521, 0.29725542664527893, -0.6150315403938293, 0.4686710238456726, 0.7169473171234131, -0.20743468403816223, 0.5347930192947388, 0.004609753843396902, -0.17949755489826202, -1.0854305028915405, 0.059876564890146255, -0.20490147173404694, 0.04612709954380989, -0.4713761806488037, -0.022697973996400833, -0.21550893783569336, 0.06703727692365646, -0.6350129842758179, 0.6426786184310913, -0.3169737160205841, -0.2050364464521408, -0.14224126935005188, 0.05174369737505913, 0.08498916774988174, 0.627181887626648, -0.14574845135211945, 1.1253612041473389, 0.37205713987350464, -0.5890787243843079, 0.2534199357032776, 0.4060238003730774, -0.5351402759552002, 0.15944744646549225, -0.9158494472503662, 0.35676059126853943, 0.09389369934797287, 0.5542041063308716, -0.9945560097694397, -0.3527686297893524, 0.33261916041374207, -0.4354962706565857, 0.08153694868087769, 0.25134390592575073, -0.5876112580299377, -0.4015353322029114, -0.4378245174884796, 0.3304062783718109, 0.8451119065284729, -0.46123403310775757, 0.19200244545936584, 0.43541404604911804, 0.020187631249427795, -0.7040507793426514, -0.9093425869941711, 0.04920244589447975, -0.4043321907520294, -0.5551771521568298, 0.2927572727203369, -0.1939539611339569, -0.2952529489994049, -0.27552056312561035, 0.05397488549351692, -0.042911093682050705, 0.4500511884689331, 0.386985719203949, 0.4142198860645294, -0.12066154181957245, -0.004265013616532087, 0.14709407091140747, -0.2181580811738968, 0.0691998153924942, 0.24431245028972626, 0.5545490980148315, -0.13079513609409332, -0.23747536540031433, -0.7357051372528076, 0.08960455656051636, 0.3425073027610779, -0.276920884847641, 0.6113321781158447, 0.42911067605018616, -0.24598924815654755, 0.2760542631149292, -0.7770034670829773, -0.13323788344860077, -0.5316773056983948, 0.5638457536697388, -0.198531374335289, -0.8418290019035339, 0.5540419220924377, -0.03214854374527931, 0.44583094120025635, 0.7546247839927673, 0.6304927468299866, -0.0854078158736229, 0.85518878698349, 0.6174740791320801, -0.09544966369867325, 0.31064993143081665, -0.5027620196342468, -0.05893682688474655, -1.0098806619644165, -0.673172116279602, -0.34032130241394043, -0.4607020318508148, -0.6805074214935303, -0.45614781975746155, 0.3100651502609253, 0.23378342390060425, -0.6942142248153687, 0.3029778301715851, -0.5755001902580261, 0.5591183304786682, 0.5267000794410706, 0.14866457879543304, 0.32777324318885803, 0.09657023102045059, 0.14538098871707916, 0.04535051807761192, -0.5122636556625366, -0.7742401957511902, 1.4968706369400024, 0.48313429951667786, 0.4874362051486969, 0.16042748093605042, 0.6302278637886047, 0.18649490177631378, 0.3119320869445801, -0.7468114495277405, 0.6757587790489197, 0.058865245431661606, -0.7534866333007812, -0.14172285795211792, -0.07455860078334808, -0.9049108624458313, 0.14487817883491516, -0.19158092141151428, -0.8258972764015198, 0.053872495889663696, -0.03948891907930374, -0.37341830134391785, 0.29894372820854187, -0.69087153673172, 0.5882321000099182, -0.5457309484481812, -0.31561800837516785, -0.3838125765323639, -0.8209878206253052, 0.6935043334960938, -0.1811467558145523, 0.09234672784805298, -0.5199827551841736, -0.2899533212184906, 0.9127547144889832, -0.32636892795562744, 1.051679253578186, -0.05618947744369507, -0.11817338317632675, 0.5982750058174133, -0.1640949696302414, 0.5233792066574097, 0.0454401820898056, -0.2981160879135132, 0.6802302002906799, -0.14059169590473175, -0.3167104721069336, -0.15547150373458862, 0.5625874996185303, -1.2578985691070557, -0.8195943832397461, -0.5352275371551514, -0.5306044816970825, -0.012715280055999756, 0.05529392138123512, 0.4893656373023987, -0.09071904420852661, -0.04108702763915062, 0.1017896756529808, 0.4894498884677887, -0.5239490270614624, 0.47404277324676514, 0.6016383767127991, -0.09498166292905807, -0.4124114513397217, 0.6606333255767822, 0.07611396908760071, 0.3539331257343292, 0.24061669409275055, 0.059972722083330154, -0.4382999539375305, -0.447137713432312, -0.5116224884986877, 0.2737238109111786, -0.487577348947525, -0.502487063407898, -0.5602012276649475, -0.34395885467529297, -0.32757240533828735, -0.05310341343283653, -0.43382757902145386, -0.45763492584228516, -0.7952289581298828, -0.4149702787399292, 0.559749960899353, 0.8254790306091309, -0.0025934416335076094, 0.613035261631012, -0.31914862990379333, 0.17479047179222107, 0.38500967621803284, 0.18232415616512299, -0.03766105696558952, -0.7481576800346375, 0.09148938208818436, 0.12179581075906754, -0.7731741666793823, -0.6581156849861145, 0.24931608140468597, 0.25243180990219116, 0.4783649444580078, 0.4486042261123657, -0.08142505586147308, 0.7633278965950012, -0.3573739528656006, 1.1676223278045654, 0.36691370606422424, -0.6630668640136719, 0.7051773071289062, -0.22395886480808258, 0.0487198643386364, 0.6458920240402222, 0.28215885162353516, -0.09130286425352097, -0.13543358445167542, -0.6195530295372009, -0.6914781332015991, 0.8032453656196594, 0.2171131670475006, 0.18418923020362854, 0.059128131717443466, 0.4547312259674072, 0.05035281926393509, 0.09815046936273575, -0.8508344292640686, -0.3393033742904663, -0.25844740867614746, -0.06970709562301636, -0.1860295981168747, -0.5909231901168823, -0.09338971227407455, -0.2997511029243469, 0.6208618879318237, 0.06988976895809174, 0.38385137915611267, -0.14561037719249725, 0.009523602202534676, -0.1179007887840271, 0.07752770930528641, 0.7799928188323975, 0.5256342887878418, -0.252655029296875, -0.11991824209690094, 0.6625834703445435, -0.6517022252082825, 0.3487485945224762, -0.03351765498518944, -0.1266329139471054, -0.38709819316864014, 0.4129321575164795, 0.8965104818344116, 0.3046932518482208, -0.7476797103881836, 0.33335813879966736, 0.16336379945278168, -0.36117738485336304, -0.43849581480026245, 0.36857888102531433, 0.08867355436086655, 0.341105580329895, 0.251893550157547, -0.11592824012041092, 0.14498718082904816, -0.5513148903846741, -0.1434824913740158, 0.38051438331604004, 0.11950912326574326, -0.4249652326107025, 1.01338529586792, 0.3259274959564209, -0.29402780532836914, 0.5334662795066833, -0.13146936893463135, -0.35706081986427307, 0.9229341745376587, 0.6813912987709045, 0.6256608366966248, -0.3106430172920227, 0.12016753107309341, 0.7235272526741028, 0.4633590579032898, -0.24326008558273315, 0.2557074725627899, 0.04084770008921623, -0.4972574710845947, -0.17711468040943146, -0.6502748727798462, -0.49612492322921753, 0.3444470465183258, -0.604225754737854, 0.30935120582580566, -0.6209009289741516, -0.26742714643478394, -0.3242003917694092, 0.4891798794269562, -0.6492442488670349, 0.2006334513425827, 0.09195604175329208, 0.9665924310684204, -0.7491284012794495, 0.7850399017333984, 0.4913884103298187, -0.5224568247795105, -0.911440908908844, -0.29891452193260193, 0.2374875247478485, -1.2549958229064941, 0.5354071259498596, 0.3553038239479065, -0.07327887415885925, 0.11320033669471741, -0.7655914425849915, -1.2261370420455933, 1.7630970478057861, 0.46639060974121094, -0.7681348919868469, -0.007936784066259861, 0.3422749936580658, 0.4889064431190491, -0.0820143073797226, 0.4746726155281067, 0.8583281636238098, 0.5389597415924072, 0.10499294847249985, -1.0571504831314087, 0.0877034068107605, -0.34867623448371887, -0.008530405350029469, -0.2086654007434845, -1.3341443538665771, 0.8527200222015381, -0.4113970994949341, -0.25037088990211487, 0.23430703580379486, 0.6471812129020691, 0.7164027094841003, 0.5722430348396301, 0.3522587716579437, 0.8055772185325623, 0.9560865163803101, -0.011923625133931637, 1.1674002408981323, -0.3215380907058716, 0.17323820292949677, 0.9279869794845581, -0.32232585549354553, 1.005527377128601, 0.2592560648918152, -0.5992830991744995, 0.6407831311225891, 1.0104981660842896, -0.02158956602215767, 0.634293258190155, 0.07060826569795609, -0.17059491574764252, -0.1353587806224823, -0.20919232070446014, -0.661785900592804, 0.547907829284668, 0.22597448527812958, -0.14026474952697754, -0.02964145876467228, -0.3443702161312103, 0.265257865190506, -0.3232463598251343, -0.007213410921394825, 0.8109583854675293, 0.1736956238746643, -0.6164113879203796, 0.8969553112983704, 0.07921262830495834, 0.8235853910446167, -0.6291822791099548, 0.0619344562292099, -0.5401254892349243, -0.009782557375729084, -0.348897248506546, -0.7298927903175354, 0.10502129048109055, 0.40440940856933594, -0.04503565654158592, -0.08697289973497391, 0.5717817544937134, 0.06486432999372482, -0.584875226020813, 0.3856968283653259, 0.2639482021331787, 0.3555002808570862, 0.23326171934604645, -0.7110986113548279, 0.18167951703071594, 0.07596608251333237, -0.5539435744285583, 0.39513319730758667, 0.0014472941402345896, -0.10391764342784882, 0.8223060965538025, 0.7378397583961487, -0.21943041682243347, 0.13694213330745697, -0.19777531921863556, 1.0244871377944946, -0.4898274540901184, -0.18573883175849915, -0.7660049200057983, 0.5797670483589172, 0.0678640753030777, -0.724524199962616, 0.5582831501960754, 0.6578028798103333, 0.6833531260490417, 0.2841983735561371, 0.6472673416137695, 0.12434612959623337, 0.34940415620803833, -0.560643196105957, 0.6292900443077087, -0.7933398485183716, 0.4012092351913452, 0.11048559844493866, -0.9886093735694885, -0.09883272647857666, 0.6872433423995972, -0.25945642590522766, 0.03296511992812157, 0.40349602699279785, 0.8974608182907104, 0.19258153438568115, -0.17440664768218994, 0.14136934280395508, 0.18864242732524872, 0.3692131042480469, 0.8954916596412659, 0.8510968089103699, -0.6506519317626953, 0.6789536476135254, -0.355614572763443, -0.21886175870895386, -0.32205331325531006, -0.7421746850013733, -0.9921600818634033, -0.25699514150619507, -0.22953937947750092, -0.1590983122587204, 0.08183304965496063, 0.7292202115058899, 0.5097787976264954, -0.598736047744751, -0.30900487303733826, -0.0896160677075386, -0.04950093850493431, 0.03556482121348381, -0.16185811161994934, 0.3144991397857666, -0.04473123326897621, -0.5928277969360352, 0.511712908744812, 0.02555759809911251, 0.21082551777362823, -0.3760274648666382, -0.27978578209877014, -0.19131770730018616, 0.1834140568971634, 0.6313843131065369, 0.27809569239616394, -0.9773265719413757, -0.2565452456474304, 0.06310753524303436, -0.16965459287166595, 0.11802534013986588, 0.02047700062394142, -0.760562002658844, 0.10513237863779068, 0.15079110860824585, 0.37777045369148254, 0.6553230881690979, 0.047396887093782425, 0.06056578829884529, -0.48489803075790405, 0.46879300475120544, 0.051734812557697296, 0.1446162462234497, 0.2880963385105133, -0.4631395936012268, 0.847618579864502, 0.11923761665821075, -0.7112330794334412, -0.9816104173660278, 0.1391836255788803, -1.1018630266189575, -0.020825650542974472, 1.4318897724151611, -0.02284216322004795, -0.1136949434876442, 0.18577833473682404, -0.2145429253578186, 0.3815239667892456, -0.37131619453430176, 0.830399215221405, 0.5612568259239197, -0.07405459135770798, -0.13903546333312988, -0.8438946008682251, 0.3259657919406891, 0.40302684903144836, -1.1472837924957275, -0.25993332266807556, 0.4614086449146271, 0.4955488443374634, -0.11261940002441406, 0.6718300580978394, -0.015977920964360237, 0.23231419920921326, 0.08305668830871582, 0.0824175700545311, -0.2513399124145508, -0.18086306750774384, -0.10135072469711304, -0.2896133065223694, -0.0308787040412426, -0.22551140189170837 ]
sentence-transformers/multi-qa-MiniLM-L6-cos-v1
sentence-transformers
"2023-11-02T09:30:12Z"
723,648
81
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "bert", "feature-extraction", "sentence-similarity", "en", "dataset:flax-sentence-embeddings/stackexchange_xml", "dataset:ms_marco", "dataset:gooaq", "dataset:yahoo_answers_topics", "dataset:search_qa", "dataset:eli5", "dataset:natural_questions", "dataset:trivia_qa", "dataset:embedding-data/QQP", "dataset:embedding-data/PAQ_pairs", "dataset:embedding-data/Amazon-QA", "dataset:embedding-data/WikiAnswers", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- language: - en pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity datasets: - flax-sentence-embeddings/stackexchange_xml - ms_marco - gooaq - yahoo_answers_topics - search_qa - eli5 - natural_questions - trivia_qa - embedding-data/QQP - embedding-data/PAQ_pairs - embedding-data/Amazon-QA - embedding-data/WikiAnswers --- # multi-qa-MiniLM-L6-cos-v1 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and was designed for **semantic search**. It has been trained on 215M (question, answer) pairs from diverse sources. For an introduction to semantic search, have a look at: [SBERT.net - Semantic Search](https://www.sbert.net/examples/applications/semantic-search/README.html) ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer, util query = "How many people live in London?" docs = ["Around 9 Million people live in London", "London is known for its financial district"] #Load the model model = SentenceTransformer('sentence-transformers/multi-qa-MiniLM-L6-cos-v1') #Encode query and documents query_emb = model.encode(query) doc_emb = model.encode(docs) #Compute dot score between query and all document embeddings scores = util.dot_score(query_emb, doc_emb)[0].cpu().tolist() #Combine docs & scores doc_score_pairs = list(zip(docs, scores)) #Sort by decreasing score doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True) #Output passages & scores for doc, score in doc_score_pairs: print(score, doc) ``` ## PyTorch Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the correct pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch import torch.nn.functional as F #Mean Pooling - Take average of all tokens def mean_pooling(model_output, attention_mask): token_embeddings = model_output.last_hidden_state input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) #Encode text def encode(texts): # Tokenize sentences encoded_input = tokenizer(texts, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input, return_dict=True) # Perform pooling embeddings = mean_pooling(model_output, encoded_input['attention_mask']) # Normalize embeddings embeddings = F.normalize(embeddings, p=2, dim=1) return embeddings # Sentences we want sentence embeddings for query = "How many people live in London?" docs = ["Around 9 Million people live in London", "London is known for its financial district"] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/multi-qa-MiniLM-L6-cos-v1") model = AutoModel.from_pretrained("sentence-transformers/multi-qa-MiniLM-L6-cos-v1") #Encode query and docs query_emb = encode(query) doc_emb = encode(docs) #Compute dot score between query and all document embeddings scores = torch.mm(query_emb, doc_emb.transpose(0, 1))[0].cpu().tolist() #Combine docs & scores doc_score_pairs = list(zip(docs, scores)) #Sort by decreasing score doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True) #Output passages & scores for doc, score in doc_score_pairs: print(score, doc) ``` ## TensorFlow Usage (HuggingFace Transformers) Similarly to the PyTorch example above, to use the model with TensorFlow you pass your input through the transformer model, then you have to apply the correct pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, TFAutoModel import tensorflow as tf #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output.last_hidden_state input_mask_expanded = tf.cast(tf.tile(tf.expand_dims(attention_mask, -1), [1, 1, token_embeddings.shape[-1]]), tf.float32) return tf.math.reduce_sum(token_embeddings * input_mask_expanded, 1) / tf.math.maximum(tf.math.reduce_sum(input_mask_expanded, 1), 1e-9) #Encode text def encode(texts): # Tokenize sentences encoded_input = tokenizer(texts, padding=True, truncation=True, return_tensors='tf') # Compute token embeddings model_output = model(**encoded_input, return_dict=True) # Perform pooling embeddings = mean_pooling(model_output, encoded_input['attention_mask']) # Normalize embeddings embeddings = tf.math.l2_normalize(embeddings, axis=1) return embeddings # Sentences we want sentence embeddings for query = "How many people live in London?" docs = ["Around 9 Million people live in London", "London is known for its financial district"] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/multi-qa-MiniLM-L6-cos-v1") model = TFAutoModel.from_pretrained("sentence-transformers/multi-qa-MiniLM-L6-cos-v1") #Encode query and docs query_emb = encode(query) doc_emb = encode(docs) #Compute dot score between query and all document embeddings scores = (query_emb @ tf.transpose(doc_emb))[0].numpy().tolist() #Combine docs & scores doc_score_pairs = list(zip(docs, scores)) #Sort by decreasing score doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True) #Output passages & scores for doc, score in doc_score_pairs: print(score, doc) ``` ## Technical Details In the following some technical details how this model must be used: | Setting | Value | | --- | :---: | | Dimensions | 384 | | Produces normalized embeddings | Yes | | Pooling-Method | Mean pooling | | Suitable score functions | dot-product (`util.dot_score`), cosine-similarity (`util.cos_sim`), or euclidean distance | Note: When loaded with `sentence-transformers`, this model produces normalized embeddings with length 1. In that case, dot-product and cosine-similarity are equivalent. dot-product is preferred as it is faster. Euclidean distance is proportional to dot-product and can also be used. ---- ## Background The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset. We developped this model during the [Community week using JAX/Flax for NLP & CV](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104), organized by Hugging Face. We developped this model as part of the project: [Train the Best Sentence Embedding Model Ever with 1B Training Pairs](https://discuss.huggingface.co/t/train-the-best-sentence-embedding-model-ever-with-1b-training-pairs/7354). We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Googles Flax, JAX, and Cloud team member about efficient deep learning frameworks. ## Intended uses Our model is intented to be used for semantic search: It encodes queries / questions and text paragraphs in a dense vector space. It finds relevant documents for the given passages. Note that there is a limit of 512 word pieces: Text longer than that will be truncated. Further note that the model was just trained on input text up to 250 word pieces. It might not work well for longer text. ## Training procedure The full training script is accessible in this current repository: `train_script.py`. ### Pre-training We use the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model. Please refer to the model card for more detailed information about the pre-training procedure. #### Training We use the concatenation from multiple datasets to fine-tune our model. In total we have about 215M (question, answer) pairs. We sampled each dataset given a weighted probability which configuration is detailed in the `data_config.json` file. The model was trained with [MultipleNegativesRankingLoss](https://www.sbert.net/docs/package_reference/losses.html#multiplenegativesrankingloss) using Mean-pooling, cosine-similarity as similarity function, and a scale of 20. | Dataset | Number of training tuples | |--------------------------------------------------------|:--------------------------:| | [WikiAnswers](https://github.com/afader/oqa#wikianswers-corpus) Duplicate question pairs from WikiAnswers | 77,427,422 | | [PAQ](https://github.com/facebookresearch/PAQ) Automatically generated (Question, Paragraph) pairs for each paragraph in Wikipedia | 64,371,441 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Body) pairs from all StackExchanges | 25,316,456 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Answer) pairs from all StackExchanges | 21,396,559 | | [MS MARCO](https://microsoft.github.io/msmarco/) Triplets (query, answer, hard_negative) for 500k queries from Bing search engine | 17,579,773 | | [GOOAQ: Open Question Answering with Diverse Answer Types](https://github.com/allenai/gooaq) (query, answer) pairs for 3M Google queries and Google featured snippet | 3,012,496 | | [Amazon-QA](http://jmcauley.ucsd.edu/data/amazon/qa/) (Question, Answer) pairs from Amazon product pages | 2,448,839 | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Answer) pairs from Yahoo Answers | 1,198,260 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Question, Answer) pairs from Yahoo Answers | 681,164 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Question) pairs from Yahoo Answers | 659,896 | | [SearchQA](https://huggingface.co/datasets/search_qa) (Question, Answer) pairs for 140k questions, each with Top5 Google snippets on that question | 582,261 | | [ELI5](https://huggingface.co/datasets/eli5) (Question, Answer) pairs from Reddit ELI5 (explainlikeimfive) | 325,475 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions pairs (titles) | 304,525 | | [Quora Question Triplets](https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs) (Question, Duplicate_Question, Hard_Negative) triplets for Quora Questions Pairs dataset | 103,663 | | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) (Question, Paragraph) pairs for 100k real Google queries with relevant Wikipedia paragraph | 100,231 | | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) (Question, Paragraph) pairs from SQuAD2.0 dataset | 87,599 | | [TriviaQA](https://huggingface.co/datasets/trivia_qa) (Question, Evidence) pairs | 73,346 | | **Total** | **214,988,242** |
[ -0.2537146210670471, -0.8391780853271484, 0.40132376551628113, 0.1597595512866974, -0.17293794453144073, -0.28673386573791504, -0.1823769062757492, -0.09897293895483017, 0.24687889218330383, 0.27032750844955444, -0.4854803681373596, -0.5686124563217163, -0.6420337557792664, 0.11985769122838974, -0.41872337460517883, 0.8180477023124695, -0.09532355517148972, 0.06345893442630768, -0.3188719153404236, -0.3405197560787201, -0.34031978249549866, -0.3116021752357483, -0.5163049697875977, -0.223296120762825, 0.253165602684021, 0.28460198640823364, 0.608025074005127, 0.47178685665130615, 0.3125823736190796, 0.44402167201042175, 0.05430726334452629, 0.2063402682542801, -0.46524035930633545, -0.07093171030282974, 0.023585515096783638, -0.5223692655563354, -0.06069038808345795, 0.32302147150039673, 0.5846629738807678, 0.33295345306396484, -0.02510380744934082, 0.10496101528406143, 0.051938723772764206, 0.402938574552536, -0.2856704592704773, 0.41163161396980286, -0.36757180094718933, 0.1646123230457306, 0.10695169121026993, -0.03399854898452759, -0.37354281544685364, -0.15497387945652008, 0.2601665258407593, -0.5591387748718262, 0.26895666122436523, 0.23160341382026672, 1.1422433853149414, 0.33446457982063293, -0.26799631118774414, -0.5058952569961548, -0.0496237576007843, 0.8864563703536987, -0.6854166984558105, 0.2930736243724823, 0.3051084876060486, -0.07088444381952286, -0.04131963104009628, -0.9374758005142212, -0.7607095241546631, -0.15217818319797516, -0.49151837825775146, 0.26184242963790894, -0.23955819010734558, -0.04821548983454704, 0.19863982498645782, 0.3688366413116455, -0.677725076675415, -0.06033433973789215, -0.402011901140213, -0.22702278196811676, 0.6175796389579773, 0.11417265981435776, 0.3407082259654999, -0.556239664554596, -0.4634179174900055, -0.4288971424102783, -0.26222461462020874, 0.11123314499855042, 0.1105068102478981, 0.1338600218296051, -0.3151509463787079, 0.711313784122467, -0.08430342376232147, 0.4867396354675293, 0.01560509204864502, 0.047994840890169144, 0.5254393219947815, -0.4405621886253357, -0.25426527857780457, -0.21154174208641052, 1.1041934490203857, 0.3819659352302551, 0.2874016761779785, -0.02719482220709324, -0.23231858015060425, 0.15976405143737793, 0.002245793817564845, -0.8181639313697815, -0.38189607858657837, 0.30755743384361267, -0.384563148021698, -0.3435348570346832, 0.06214629113674164, -0.7271198034286499, -0.11676818132400513, -0.05827788636088371, 0.8794126510620117, -0.5985751152038574, 0.09065763652324677, 0.2443629652261734, -0.3201969861984253, 0.2677704393863678, -0.10581870377063751, -0.6331977248191833, 0.12920071184635162, 0.246523916721344, 0.8937497138977051, 0.12211962789297104, -0.533312201499939, -0.4503060281276703, -0.16468369960784912, 0.012333848513662815, 0.6226696372032166, -0.42215803265571594, -0.21172456443309784, 0.11735187470912933, 0.09876108914613724, -0.47054919600486755, -0.4013734459877014, 0.4853626787662506, -0.31205207109451294, 0.8160920143127441, 0.06522761285305023, -0.8904672265052795, -0.06773976981639862, 0.3352498412132263, -0.5173074007034302, 1.2038729190826416, 0.328744500875473, -0.9126284122467041, -0.012141350656747818, -0.806308925151825, -0.13961170613765717, -0.1876353621482849, -0.12641486525535583, -0.6010061502456665, 0.06510945409536362, 0.5110449194908142, 0.5729542374610901, 0.03369267284870148, -0.011090812273323536, -0.15629340708255768, -0.5115597248077393, 0.33230772614479065, -0.18430638313293457, 0.9425175786018372, 0.01163303293287754, -0.4053043723106384, 0.11789632588624954, -0.44651150703430176, 0.022755950689315796, 0.34014758467674255, -0.30088111758232117, -0.1701248288154602, -0.272596538066864, 0.22076454758644104, 0.45877590775489807, 0.22518929839134216, -0.5962846279144287, 0.21284250915050507, -0.6185600161552429, 0.741945743560791, 0.6361249685287476, -0.0597592331469059, 0.520794689655304, -0.4251209795475006, 0.2817883789539337, 0.21145494282245636, 0.03180216625332832, -0.1414424479007721, -0.4277231991291046, -0.9950863122940063, -0.24147319793701172, 0.4232742488384247, 0.5224906802177429, -0.8094276189804077, 0.6811773180961609, -0.41087791323661804, -0.38602009415626526, -0.9185376763343811, 0.14685150980949402, 0.29008692502975464, 0.46088531613349915, 0.6855375170707703, -0.05195830017328262, -0.3743292987346649, -0.8273427486419678, -0.14491209387779236, 0.054056279361248016, 0.026505865156650543, 0.3056366741657257, 0.7130559682846069, -0.412680983543396, 0.8707461357116699, -0.7796179056167603, -0.7257347702980042, -0.30367547273635864, 0.07204917818307877, 0.2282898873090744, 0.5630722045898438, 0.4889149069786072, -0.7232522368431091, -0.4549381732940674, -0.6286758780479431, -0.7302643656730652, 0.06338441371917725, -0.12206520140171051, -0.2555899918079376, 0.1913832277059555, 0.6193345189094543, -0.7909770607948303, 0.3603713810443878, 0.4674082100391388, -0.6146414279937744, 0.2881450951099396, -0.3598237633705139, -0.13856583833694458, -1.2726384401321411, -0.045346684753894806, 0.049373552203178406, -0.26789331436157227, -0.3273175358772278, 0.276213675737381, 0.007992376573383808, -0.14659886062145233, -0.4612564742565155, 0.5925059914588928, -0.48840609192848206, 0.1973506361246109, 0.010958901606500149, 0.6462161540985107, 0.23437754809856415, 0.6645148396492004, -0.12954039871692657, 0.6316736340522766, 0.41823145747184753, -0.46362054347991943, 0.3601866066455841, 0.6202496290206909, -0.3678291440010071, 0.27963823080062866, -0.6499796509742737, 0.12695476412773132, -0.05059485137462616, 0.2598205804824829, -1.0939817428588867, 0.02443019673228264, 0.18076631426811218, -0.6289153695106506, 0.22025541961193085, 0.27689918875694275, -0.7225805521011353, -0.5488723516464233, -0.5449396371841431, 0.21130192279815674, 0.46929314732551575, -0.5152342319488525, 0.5989813804626465, 0.30877071619033813, 0.19113297760486603, -0.49272650480270386, -0.97350013256073, -0.15339908003807068, -0.18569441139698029, -0.7638074159622192, 0.5180111527442932, -0.12195363640785217, 0.11431390792131424, 0.24662014842033386, 0.20312966406345367, 0.1336568295955658, -0.00683759618550539, 0.06902893632650375, 0.16621588170528412, -0.12209747731685638, 0.3274902403354645, -0.004250807221978903, -0.23540522158145905, 0.02617538347840309, -0.22873322665691376, 0.713422417640686, -0.35961154103279114, -0.03096148371696472, -0.40715527534484863, 0.35415688157081604, 0.3635333776473999, -0.23357859253883362, 0.973131000995636, 1.0586458444595337, -0.3945167660713196, -0.1492430865764618, -0.5312054753303528, -0.299801766872406, -0.5084863305091858, 0.5146269202232361, -0.4220796227455139, -0.9315970540046692, 0.41124019026756287, 0.2245994359254837, -0.007234005257487297, 0.8154638409614563, 0.47990912199020386, -0.329964280128479, 0.8077465295791626, 0.5587723255157471, -0.10553830116987228, 0.49955853819847107, -0.7954206466674805, 0.19191153347492218, -0.7509976029396057, -0.1284809708595276, -0.2582909166812897, -0.3706694543361664, -0.7738391757011414, -0.49649375677108765, 0.41577762365341187, 0.06169157847762108, -0.08973805606365204, 0.3389894962310791, -0.6215041279792786, 0.26580819487571716, 0.6331730484962463, 0.2909667193889618, -0.07286995649337769, 0.04776013270020485, -0.5264814496040344, -0.1208588257431984, -0.7802903056144714, -0.34150251746177673, 1.0107864141464233, 0.3821502923965454, 0.40594425797462463, -0.04170974716544151, 0.8567289710044861, 0.15487796068191528, 0.10202215611934662, -0.7716492414474487, 0.5004063248634338, -0.2882760167121887, -0.3790683150291443, -0.3779962360858917, -0.3999016284942627, -0.9463996291160583, 0.48047521710395813, -0.3072756826877594, -0.5189035534858704, -0.04393887147307396, -0.22084441781044006, -0.414658784866333, 0.11408832669258118, -0.8651409149169922, 1.1404776573181152, 0.08008987456560135, -0.33401429653167725, -0.23048804700374603, -0.6173331141471863, 0.1326248049736023, 0.22487382590770721, 0.16983531415462494, -0.0400632806122303, -0.09596039354801178, 0.9209952354431152, -0.44924649596214294, 0.6777786016464233, -0.13114044070243835, 0.33413049578666687, 0.3385363817214966, -0.2310626208782196, 0.30820509791374207, -0.020639469847083092, -0.02834627404808998, -0.04410404711961746, 0.10781749337911606, -0.5887632369995117, -0.541144609451294, 0.7590958476066589, -1.0532370805740356, -0.48906978964805603, -0.5381749868392944, -0.5676330327987671, -0.03555705398321152, 0.20504702627658844, 0.3578110337257385, 0.4863571226596832, -0.05714280158281326, 0.3339673578739166, 0.5331792235374451, -0.27804142236709595, 0.7702970504760742, 0.2663801312446594, -0.12642407417297363, -0.5287664532661438, 0.6890386939048767, 0.14972186088562012, -0.005463536363095045, 0.5577676296234131, 0.42236632108688354, -0.595341145992279, -0.2036174237728119, -0.29564446210861206, 0.49337273836135864, -0.6710590720176697, -0.1820915788412094, -0.9381546378135681, -0.3766239285469055, -0.7305498719215393, -0.0725196823477745, -0.18091179430484772, -0.307640016078949, -0.43825024366378784, -0.1994875818490982, 0.2907465100288391, 0.5638928413391113, 0.017640091478824615, 0.2862584590911865, -0.6905155181884766, 0.2703242599964142, 0.22846001386642456, 0.049824126064777374, -0.12460454553365707, -0.7164709568023682, -0.36953112483024597, -0.06304826587438583, -0.42138370871543884, -0.8037670254707336, 0.5680846571922302, 0.16468214988708496, 0.5167655944824219, 0.18661119043827057, 0.1016925647854805, 0.6554423570632935, -0.34417158365249634, 0.7723718881607056, -0.01852092146873474, -0.973393440246582, 0.48623624444007874, -0.039223652333021164, 0.45273828506469727, 0.5773687958717346, 0.2997424006462097, -0.48517709970474243, -0.38856029510498047, -0.7622213363647461, -0.8836421966552734, 0.6358667016029358, 0.3909622132778168, 0.3586222529411316, -0.12717200815677643, 0.30122655630111694, -0.21619094908237457, 0.0938194990158081, -0.9927529692649841, -0.420778751373291, -0.3001607358455658, -0.6371147632598877, -0.33132436871528625, -0.23202641308307648, 0.011512905359268188, -0.4947105646133423, 0.709997832775116, -0.09598156064748764, 0.6450629234313965, 0.5093927979469299, -0.47246095538139343, 0.31487852334976196, 0.060853999108076096, 0.515012800693512, 0.2921591103076935, -0.12125922739505768, 0.09557833522558212, 0.260449081659317, -0.38227295875549316, -0.011168478056788445, 0.40657711029052734, -0.09401856362819672, 0.1946989893913269, 0.4380890727043152, 0.7267792224884033, 0.3834479749202728, -0.4555855989456177, 0.8696386814117432, -0.193648561835289, -0.23033739626407623, -0.4797227680683136, -0.10720330476760864, 0.2454666644334793, 0.28092658519744873, 0.2269698977470398, -0.10959307849407196, -0.039369337260723114, -0.4605298936367035, 0.3970586061477661, 0.20666620135307312, -0.3934246003627777, -0.019291147589683533, 0.6254516839981079, 0.10266375541687012, -0.23028627038002014, 0.9779619574546814, -0.31190475821495056, -0.6835193037986755, 0.45914754271507263, 0.5091976523399353, 0.8406364321708679, 0.0003946186916437, 0.23611097037792206, 0.5207583904266357, 0.33738747239112854, 0.06923563778400421, 0.08370251953601837, 0.06319807469844818, -0.8182105422019958, -0.05386710539460182, -0.7306950688362122, 0.020965244621038437, -0.0011539064580574632, -0.41967543959617615, 0.3093808591365814, -0.2043812870979309, -0.03860333934426308, -0.0766487792134285, 0.39463695883750916, -0.9192141890525818, 0.1887103170156479, 0.05415910854935646, 0.8777155876159668, -0.9533940553665161, 0.9091955423355103, 0.6356732249259949, -0.8163179755210876, -0.9098260998725891, -0.022244002670049667, -0.2839702367782593, -0.8629463911056519, 0.41579604148864746, 0.6222888231277466, 0.20749469101428986, 0.19792675971984863, -0.3546856939792633, -0.8592334389686584, 1.394333839416504, 0.15230724215507507, -0.280264288187027, -0.37037619948387146, 0.12056107074022293, 0.5798735618591309, -0.5085453987121582, 0.5430189967155457, 0.4743318557739258, 0.32593560218811035, -0.1203795000910759, -0.5459598898887634, 0.231448695063591, -0.26708585023880005, -0.033872686326503754, -0.19489599764347076, -0.7871191501617432, 0.9201707243919373, -0.14227743446826935, -0.19764526188373566, 0.077139712870121, 0.764159083366394, 0.274073988199234, 0.16386891901493073, 0.4953272342681885, 0.8650784492492676, 0.7411593794822693, -0.11366156488656998, 1.1584335565567017, -0.3438234031200409, 0.6799483299255371, 0.9195902347564697, 0.2964968979358673, 1.0052262544631958, 0.4388159215450287, -0.17212647199630737, 0.7041738629341125, 0.6177172660827637, -0.2380729615688324, 0.5672467350959778, 0.22780416905879974, 0.088434599339962, -0.0665879100561142, 0.08654800802469254, -0.26505860686302185, 0.5867568850517273, 0.260695219039917, -0.6472430229187012, -0.11040322482585907, 0.08660829067230225, 0.08551604300737381, 0.09166909754276276, -0.04739808291196823, 0.6345981359481812, 0.2859894335269928, -0.5610525012016296, 0.4817197024822235, 0.25545960664749146, 0.9768229126930237, -0.35027244687080383, 0.21820853650569916, -0.25413745641708374, 0.40483787655830383, -0.12533634901046753, -0.6861943006515503, 0.26532572507858276, -0.3349013328552246, -0.1341319978237152, -0.2836267054080963, 0.5416502952575684, -0.7398942112922668, -0.5824668407440186, 0.5336368680000305, 0.5589895248413086, 0.16707144677639008, -0.053392816334962845, -1.1347304582595825, -0.13768762350082397, 0.00647182110697031, -0.5010032653808594, 0.24315723776817322, 0.2950824499130249, 0.28742241859436035, 0.4565301537513733, 0.49136102199554443, -0.26014479994773865, 0.1779407560825348, 0.12353505194187164, 0.8094473481178284, -0.6733131408691406, -0.5953158736228943, -0.9290859699249268, 0.5242305397987366, -0.2059009075164795, -0.39365407824516296, 0.6775392293930054, 0.6385120749473572, 0.8802509307861328, -0.13443249464035034, 0.3970576524734497, -0.03187970444560051, 0.2665890157222748, -0.5756747126579285, 0.8185728192329407, -0.6873978972434998, -0.013043773360550404, -0.09077218174934387, -0.8569332957267761, -0.17356404662132263, 0.8270769715309143, -0.3522985577583313, 0.06371979415416718, 0.9658195972442627, 0.9283111691474915, -0.032964516431093216, -0.18739761412143707, 0.2769092917442322, 0.3989550471305847, 0.22207778692245483, 0.7803846001625061, 0.4400942027568817, -1.0056312084197998, 0.753963828086853, -0.4542538821697235, 0.01795712485909462, -0.16323155164718628, -0.5918323397636414, -0.9710683226585388, -0.7245524525642395, -0.4181118309497833, -0.5300174355506897, -0.2344614565372467, 0.9371824264526367, 0.5115326046943665, -0.7150270342826843, -0.014628024771809578, -0.016011415049433708, 0.07437750697135925, -0.08174803853034973, -0.36262059211730957, 0.6972538232803345, -0.4824734330177307, -0.8597962856292725, 0.20076727867126465, -0.0910377949476242, 0.06209750846028328, -0.28252217173576355, 0.06727401912212372, -0.6522565484046936, 0.13533131778240204, 0.5329261422157288, -0.21374978125095367, -0.7220206260681152, -0.36750948429107666, 0.020518837496638298, -0.5779380798339844, 0.07469911873340607, 0.3515323996543884, -0.771980345249176, 0.34185293316841125, 0.5413427352905273, 0.5253162384033203, 0.7766091227531433, -0.1474171131849289, 0.3343779146671295, -0.7935535311698914, 0.15662088990211487, 0.10897950828075409, 0.6062551736831665, 0.5111237168312073, -0.3390349745750427, 0.6582924127578735, 0.4207509756088257, -0.4809820055961609, -0.6162278056144714, -0.20701740682125092, -0.9379152655601501, -0.2936610281467438, 1.0990209579467773, -0.34941843152046204, -0.36565300822257996, 0.18129055202007294, -0.19512610137462616, 0.46174684166908264, -0.32332491874694824, 0.7673494815826416, 0.7632700800895691, -0.02691352739930153, -0.25775179266929626, -0.3816260099411011, 0.35872676968574524, 0.5659270286560059, -0.5246683955192566, -0.4833713173866272, 0.18512196838855743, 0.5055040121078491, 0.34985432028770447, 0.5738675594329834, -0.09741395711898804, 0.06001364439725876, 0.14792969822883606, -0.06307334452867508, -0.24725714325904846, 0.09394173324108124, -0.42349058389663696, 0.4333464503288269, -0.4064788520336151, -0.47159481048583984 ]
Helsinki-NLP/opus-mt-de-en
Helsinki-NLP
"2023-08-16T11:27:46Z"
717,082
26
transformers
[ "transformers", "pytorch", "tf", "rust", "marian", "text2text-generation", "translation", "de", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- tags: - translation license: apache-2.0 --- ### opus-mt-de-en * source languages: de * target languages: en * OPUS readme: [de-en](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/de-en/README.md) * dataset: opus * model: transformer-align * pre-processing: normalization + SentencePiece * download original weights: [opus-2020-02-26.zip](https://object.pouta.csc.fi/OPUS-MT-models/de-en/opus-2020-02-26.zip) * test set translations: [opus-2020-02-26.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/de-en/opus-2020-02-26.test.txt) * test set scores: [opus-2020-02-26.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/de-en/opus-2020-02-26.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | newssyscomb2009.de.en | 29.4 | 0.557 | | news-test2008.de.en | 27.8 | 0.548 | | newstest2009.de.en | 26.8 | 0.543 | | newstest2010.de.en | 30.2 | 0.584 | | newstest2011.de.en | 27.4 | 0.556 | | newstest2012.de.en | 29.1 | 0.569 | | newstest2013.de.en | 32.1 | 0.583 | | newstest2014-deen.de.en | 34.0 | 0.600 | | newstest2015-ende.de.en | 34.2 | 0.599 | | newstest2016-ende.de.en | 40.4 | 0.649 | | newstest2017-ende.de.en | 35.7 | 0.610 | | newstest2018-ende.de.en | 43.7 | 0.667 | | newstest2019-deen.de.en | 40.1 | 0.642 | | Tatoeba.de.en | 55.4 | 0.707 |
[ -0.5314362049102783, -0.4532322287559509, 0.3806818723678589, 0.3041670322418213, -0.41141900420188904, -0.45990920066833496, -0.28144124150276184, -0.14186027646064758, 0.1997332125902176, 0.3870084285736084, -0.9180920124053955, -0.7802378535270691, -0.7881746292114258, 0.2592822015285492, -0.18766319751739502, 0.7661032676696777, -0.12657222151756287, 0.34010565280914307, 0.21629002690315247, -0.4798172116279602, -0.42156973481178284, -0.4233887493610382, -0.6081716418266296, -0.3722018897533417, 0.4232288897037506, 0.49522867798805237, 0.47711697220802307, 0.48168763518333435, 0.8746685981750488, 0.3099721670150757, -0.1318827122449875, 0.00014780755736865103, -0.46487367153167725, -0.14830586314201355, 0.1435842365026474, -0.6253365874290466, -0.9223373532295227, -0.03333069384098053, 0.9682791233062744, 0.5819969177246094, 0.049889884889125824, 0.46457287669181824, -0.019696975126862526, 1.1032729148864746, -0.29526498913764954, 0.09374755620956421, -0.5644582509994507, 0.10777947306632996, -0.31878146529197693, -0.3608679175376892, -0.5226849317550659, -0.3406141698360443, -0.041366275399923325, -0.6250776052474976, 0.08555596321821213, 0.11684059351682663, 1.5612436532974243, 0.3066661059856415, -0.34710070490837097, 0.00042885926086455584, -0.5562165975570679, 1.156244158744812, -0.9212404489517212, 0.4912283420562744, 0.4856306314468384, 0.1911306232213974, 0.013206114992499352, -0.5903245210647583, -0.4053809344768524, 0.2867552638053894, -0.17522601783275604, 0.3911322057247162, -0.2871553897857666, -0.3734488785266876, 0.28229960799217224, 0.8001229166984558, -0.8983437418937683, 0.12045222520828247, -0.6023220419883728, 0.10321410000324249, 0.8242382407188416, 0.3234861195087433, 0.19396601617336273, -0.2155904918909073, -0.47294744849205017, -0.5652453899383545, -0.8151314854621887, 0.15709924697875977, 0.4841230511665344, 0.2143741399049759, -0.4619216024875641, 0.7297248244285583, -0.26813989877700806, 0.67252516746521, 0.012101693078875542, 0.03961010277271271, 1.040329098701477, -0.3731538653373718, -0.33845460414886475, -0.21212084591388702, 1.350427269935608, 0.5778089165687561, -0.05079169571399689, 0.2091318964958191, -0.267752081155777, -0.11879480630159378, 0.04572456330060959, -1.019466519355774, -0.10578606277704239, 0.2699074447154999, -0.46237945556640625, -0.2006310522556305, 0.1444348245859146, -0.9243761301040649, 0.24335609376430511, -0.4389823079109192, 0.6112295389175415, -0.61653733253479, -0.3231285810470581, 0.42410972714424133, 0.04082310199737549, 0.37040379643440247, 0.06277207285165787, -0.5176810622215271, 0.26688840985298157, 0.4323696494102478, 0.7984116077423096, -0.40096351504325867, -0.27449831366539, -0.34932804107666016, -0.2564135491847992, -0.24452854692935944, 0.7232210636138916, -0.14688172936439514, -0.44872328639030457, -0.2076103687286377, 0.5640119314193726, -0.35134997963905334, -0.3688187897205353, 1.3410307168960571, -0.3156771659851074, 0.9000293016433716, -0.44947999715805054, -0.6650553345680237, -0.38566991686820984, 0.4993039071559906, -0.6920620203018188, 1.5560812950134277, 0.21953855454921722, -1.010387659072876, 0.2864931523799896, -0.9133232235908508, 0.06421303749084473, -0.1925927847623825, 0.0029734212439507246, -0.7633786201477051, -0.02647237852215767, 0.23208607733249664, 0.4195651412010193, -0.44913923740386963, 0.3209402561187744, -0.07308681309223175, -0.33575111627578735, -0.014222023077309132, -0.4800999164581299, 1.3475664854049683, 0.2957960367202759, -0.41402387619018555, 0.3102748394012451, -1.2147172689437866, 0.08317386358976364, 0.19978369772434235, -0.38308119773864746, -0.24749624729156494, -0.0251273475587368, 0.2199462354183197, 0.15330684185028076, 0.31194329261779785, -0.709963858127594, 0.28587350249290466, -0.7853637337684631, 0.2948257327079773, 0.7249361276626587, -0.1794007271528244, 0.4193553924560547, -0.5523121953010559, 0.4743648171424866, 0.19297391176223755, 0.24149078130722046, 0.12987102568149567, -0.5105422735214233, -0.8753153085708618, -0.2825527787208557, 0.5124026536941528, 1.1422109603881836, -0.5908257961273193, 1.1182173490524292, -0.7101779580116272, -0.9521040320396423, -0.5863344073295593, -0.20019912719726562, 0.35186371207237244, 0.5245575308799744, 0.5389965772628784, -0.1945399045944214, -0.5694189667701721, -1.2483329772949219, -0.01677580550312996, -0.07009013742208481, -0.2123059630393982, 0.22874605655670166, 0.8586897253990173, -0.15792910754680634, 0.7147862315177917, -0.7581918239593506, -0.3886417746543884, -0.19262322783470154, 0.20224221050739288, 0.7030386924743652, 0.7451730370521545, 0.740074872970581, -0.9400385618209839, -0.6692195534706116, -0.11022114008665085, -0.7381032705307007, -0.19389332830905914, 0.0984499379992485, -0.40127086639404297, 0.154483824968338, 0.17836885154247284, -0.47457557916641235, 0.24043726921081543, 0.7061933875083923, -0.7825401425361633, 0.6539744734764099, -0.1865963339805603, 0.2865973711013794, -1.5937937498092651, 0.0738285630941391, -0.21364136040210724, -0.09259387105703354, -0.4395022690296173, -0.08268966525793076, 0.18163153529167175, 0.16693781316280365, -0.7179402112960815, 0.7124788761138916, -0.40994834899902344, -0.03889426216483116, 0.321586936712265, 0.06963691115379333, 0.09242276102304459, 0.7695896625518799, -0.16842757165431976, 0.8948001861572266, 0.9358308911323547, -0.5003937482833862, 0.25733229517936707, 0.460269957780838, -0.5627315640449524, 0.4857371151447296, -0.8591430187225342, -0.2779020667076111, 0.1439240574836731, -0.05135134607553482, -0.9283702373504639, -0.014657803811132908, 0.33866405487060547, -0.6962071657180786, 0.38110241293907166, -0.04489487409591675, -0.7238860726356506, -0.2978796362876892, -0.43680185079574585, 0.3937087059020996, 0.6870401501655579, -0.1036900132894516, 0.5217666029930115, 0.2430369257926941, -0.08046664297580719, -0.4994955360889435, -1.0036669969558716, -0.11484790593385696, -0.5337489247322083, -0.8284821510314941, 0.2956595718860626, -0.3999796211719513, -0.0237851832062006, 0.12541615962982178, 0.24271582067012787, -0.1561530977487564, -0.0008807886042632163, 0.07682127505540848, 0.29753074049949646, -0.4050809144973755, -0.12283910065889359, -0.09520469605922699, -0.2905663549900055, -0.016694623976945877, -0.23517410457134247, 0.6880182027816772, -0.42129117250442505, -0.43104395270347595, -0.5299946069717407, 0.13713039457798004, 0.6933112740516663, -0.331543892621994, 0.9151231646537781, 0.5979986786842346, -0.2226773053407669, 0.21036860346794128, -0.38468828797340393, 0.04392256215214729, -0.49728986620903015, 0.23782628774642944, -0.5327907204627991, -0.9629440903663635, 0.7832045555114746, 0.13023175299167633, 0.5118853449821472, 1.0830336809158325, 0.7633728384971619, 0.11229116469621658, 0.9930549263954163, 0.3520302474498749, 0.2515902519226074, 0.5266473293304443, -0.6631760001182556, -0.19838333129882812, -1.0189744234085083, -0.09920693933963776, -0.6775262951850891, -0.526861310005188, -0.98331218957901, -0.31713271141052246, 0.42021486163139343, 0.04021551087498665, -0.4748047888278961, 0.812152087688446, -0.695620596408844, 0.261164128780365, 0.7818189263343811, -0.017124325037002563, 0.27187198400497437, -0.059354957193136215, -0.5113281607627869, -0.3493216633796692, -0.4923837184906006, -0.4844159483909607, 1.359797477722168, 0.34499144554138184, 0.38471272587776184, 0.300749808549881, 0.8254169821739197, 0.060892246663570404, 0.11868084967136383, -0.5906280875205994, 0.6381018757820129, -0.14899764955043793, -0.7987212538719177, -0.4745979905128479, -0.6370891332626343, -0.9975507259368896, 0.5777221322059631, -0.1515580117702484, -0.7161279916763306, 0.3182336986064911, -0.07987145334482193, -0.15940351784229279, 0.5187169313430786, -0.7372698783874512, 1.2464743852615356, -0.0734294205904007, -0.28965264558792114, 0.23719114065170288, -0.5593211650848389, 0.28542235493659973, -0.05884532257914543, 0.36282435059547424, -0.3498690128326416, 0.03927669674158096, 0.8881416916847229, -0.31721368432044983, 0.5146756172180176, -0.09959451109170914, -0.13279223442077637, 0.2036949098110199, 0.09525857120752335, 0.5564173460006714, -0.06901303678750992, -0.3532142639160156, 0.3202097713947296, 0.1591242253780365, -0.5393386483192444, -0.19059927761554718, 0.6814271807670593, -0.7907008528709412, -0.34657344222068787, -0.6643528938293457, -0.600548267364502, 0.029689516872167587, 0.5409747958183289, 0.702387809753418, 0.6733353137969971, -0.34499362111091614, 0.6110141277313232, 0.8439592123031616, -0.3457150161266327, 0.43005016446113586, 0.6782729029655457, -0.23301617801189423, -0.6985189318656921, 0.8685914874076843, 0.17534399032592773, 0.3207579553127289, 0.5660552978515625, 0.18341504037380219, -0.3229694962501526, -0.6349942088127136, -0.718224287033081, 0.20051109790802002, -0.3935624361038208, -0.29415467381477356, -0.6758676171302795, -0.14288319647312164, -0.3049026429653168, 0.06409088522195816, -0.6062321662902832, -0.7165377736091614, -0.26050451397895813, -0.2784147560596466, 0.3808435797691345, 0.2909194827079773, -0.23245151340961456, 0.3266398310661316, -0.9755238890647888, 0.10501136630773544, -0.075733482837677, 0.4097922444343567, -0.4573787450790405, -0.9324846863746643, -0.3966657221317291, 0.032006535679101944, -0.6675643920898438, -0.8740900158882141, 0.6879904270172119, 0.07696229219436646, 0.3058917820453644, 0.3950602114200592, 0.21221928298473358, 0.5085086822509766, -0.6756300330162048, 1.0939202308654785, 0.17279484868049622, -0.6707594394683838, 0.6323837041854858, -0.5509434342384338, 0.5590834617614746, 0.90583336353302, 0.3129686117172241, -0.3695756494998932, -0.6389846801757812, -0.945297122001648, -1.0954630374908447, 0.9215138554573059, 0.6944358348846436, -0.05449768900871277, 0.06241675838828087, -0.1789269596338272, -0.001726864604279399, 0.0359557569026947, -1.132115364074707, -0.6477471590042114, 0.13291427493095398, -0.38798388838768005, -0.018411604687571526, -0.41677847504615784, -0.31923478841781616, -0.478333443403244, 1.0693438053131104, 0.2002444565296173, 0.26305103302001953, 0.402456670999527, 0.10418039560317993, -0.12177776545286179, 0.4845697581768036, 0.9932571053504944, 0.7002857327461243, -0.5806626081466675, -0.08050704747438431, 0.39705708622932434, -0.48106908798217773, -0.0659400224685669, 0.1345212459564209, -0.454054594039917, 0.2679744362831116, 0.34196656942367554, 1.0487558841705322, 0.26526954770088196, -0.5599664449691772, 0.5884668231010437, -0.26539331674575806, -0.5997942090034485, -0.8844850659370422, -0.2043563723564148, 0.09539275616407394, 0.13387872278690338, 0.22173422574996948, 0.12682387232780457, 0.20412972569465637, -0.2164650857448578, 0.35251933336257935, 0.1763686239719391, -0.6236239075660706, -0.5333526730537415, 0.7845830321311951, 0.05324599891901016, -0.13621999323368073, 0.38735005259513855, -0.4873703420162201, -0.6492291688919067, 0.6410908102989197, 0.16233237087726593, 1.197840929031372, -0.18264983594417572, -0.21198943257331848, 1.0037109851837158, 0.5868118405342102, -0.23456139862537384, 0.6829070448875427, 0.3371960520744324, -0.5864413976669312, -0.5577702522277832, -0.87397700548172, -0.09182942658662796, 0.23723672330379486, -0.9433367252349854, 0.5384268760681152, 0.33040955662727356, -0.1981460303068161, -0.360973596572876, 0.2747621536254883, -0.7223632335662842, 0.10044863075017929, -0.25497737526893616, 1.2505385875701904, -1.1027090549468994, 0.8628431558609009, 0.6065292358398438, -0.4261697232723236, -0.8084702491760254, -0.41344165802001953, -0.15050610899925232, -0.49230653047561646, 0.6744256019592285, 0.07654604315757751, 0.3539126515388489, -0.024132410064339638, -0.298961341381073, -1.1629482507705688, 1.2686794996261597, 0.09849181771278381, -0.6349998116493225, 0.10493617504835129, 0.12203430384397507, 0.5453976988792419, -0.2896859645843506, 0.2388327717781067, 0.5287418961524963, 0.8969258069992065, 0.12231627851724625, -1.1199873685836792, -0.10158272832632065, -0.6491901874542236, -0.3757396638393402, 0.6543468832969666, -0.7235095500946045, 1.206504464149475, 0.42344069480895996, -0.13262557983398438, -0.037004537880420685, 0.6965122222900391, 0.2686367630958557, 0.2897380590438843, 0.6563699245452881, 1.3331536054611206, 0.5030376315116882, -0.6020889282226562, 0.992013692855835, -0.4847792685031891, 0.7103239893913269, 1.2445871829986572, -0.0035322941839694977, 0.9286813735961914, 0.26659199595451355, -0.45642757415771484, 0.59421706199646, 0.8177860975265503, -0.34524378180503845, 0.5549473166465759, 0.06379817426204681, 0.07704907655715942, -0.2961755394935608, 0.2972087264060974, -0.7635964751243591, 0.24701550602912903, 0.20417217910289764, -0.21344679594039917, -0.20858430862426758, -0.16600775718688965, 0.2130613774061203, -0.06936413049697876, -0.12957851588726044, 0.5717186331748962, -0.021089041605591774, -0.5599856376647949, 0.7904285788536072, -0.08905764669179916, 0.6832829117774963, -0.7122858762741089, 0.09074100106954575, -0.12784996628761292, 0.3482241928577423, -0.07578761875629425, -0.8663744330406189, 0.615679144859314, 0.05310197174549103, -0.4218486249446869, -0.4731867015361786, 0.21828755736351013, -0.522247850894928, -1.0773264169692993, 0.39463043212890625, 0.5413857102394104, 0.39035871624946594, 0.03365086391568184, -0.9532638788223267, -0.0965348333120346, 0.13120493292808533, -0.8379935026168823, 0.13044032454490662, 0.9046052098274231, 0.2708990275859833, 0.4871686100959778, 0.6871349215507507, 0.17794032394886017, 0.255577027797699, -0.05211969465017319, 0.8528811931610107, -0.5655921697616577, -0.5160738229751587, -0.9422724843025208, 0.8435798287391663, -0.1821044385433197, -0.678942859172821, 0.8424990773200989, 1.1730382442474365, 1.0585894584655762, -0.042283281683921814, 0.367598295211792, -0.3310234248638153, 0.8596624732017517, -0.571191668510437, 0.6662963628768921, -1.1520376205444336, 0.2046339213848114, -0.08127425611019135, -1.0390722751617432, -0.27849605679512024, 0.2909888029098511, -0.36168423295021057, -0.27434322237968445, 0.791973888874054, 0.7733913660049438, -0.06886768341064453, -0.16084575653076172, 0.31165045499801636, 0.32607603073120117, 0.19719381630420685, 0.7231166958808899, 0.4462758004665375, -0.9833590388298035, 0.6210156679153442, -0.4781077206134796, -0.1458883434534073, -0.10918407887220383, -0.8513447046279907, -0.8885351419448853, -0.6760275959968567, -0.19102154672145844, -0.3077537417411804, -0.4333496689796448, 1.0446571111679077, 0.4681260883808136, -1.0856367349624634, -0.4441629946231842, -0.05284538492560387, 0.013368910178542137, -0.29603418707847595, -0.32403886318206787, 0.8566060662269592, -0.18386152386665344, -1.1914560794830322, 0.39979442954063416, 0.06595312803983688, -0.07964589446783066, -0.030249720439314842, -0.23970836400985718, -0.5070720911026001, -0.07625081390142441, 0.4264332950115204, 0.03276192396879196, -0.5938853025436401, 0.05076328665018082, 0.19606131315231323, -0.13684962689876556, 0.448231041431427, 0.16719728708267212, -0.22238680720329285, 0.17675836384296417, 1.041318416595459, 0.25173884630203247, 0.559952974319458, -0.051834993064403534, 0.44090449810028076, -0.7735677361488342, 0.360838383436203, 0.22159218788146973, 0.6362888813018799, 0.21201759576797485, -0.05072448402643204, 0.9485666751861572, 0.34408241510391235, -0.7251524925231934, -1.1334736347198486, 0.030146555975079536, -1.2684311866760254, -0.03582661971449852, 1.1167455911636353, -0.16529007256031036, -0.35562580823898315, 0.3247273862361908, -0.16337575018405914, 0.10133026540279388, -0.3992699980735779, 0.4927533268928528, 1.0608066320419312, 0.166875958442688, 0.06340986490249634, -0.9250875115394592, 0.2730488181114197, 0.36308741569519043, -0.8005862832069397, -0.16266007721424103, 0.3182968199253082, 0.21177473664283752, 0.38700202107429504, 0.6794050931930542, -0.4050453305244446, -0.024434803053736687, -0.053633883595466614, 0.42697396874427795, -0.09859946370124817, -0.10314008593559265, -0.23406006395816803, -0.03775130584836006, -0.1575256884098053, -0.32976195216178894 ]
segmind/SSD-1B
segmind
"2023-11-10T06:50:52Z"
690,166
595
diffusers
[ "diffusers", "text-to-image", "ultra-realistic", "stable-diffusion", "distilled-model", "knowledge-distillation", "dataset:zzliang/GRIT", "dataset:wanng/midjourney-v5-202304-clean", "license:apache-2.0", "endpoints_compatible", "has_space", "diffusers:StableDiffusionXLPipeline", "region:us" ]
text-to-image
"2023-10-19T05:18:22Z"
--- license: apache-2.0 tags: - text-to-image - ultra-realistic - text-to-image - stable-diffusion - distilled-model - knowledge-distillation pinned: true datasets: - zzliang/GRIT - wanng/midjourney-v5-202304-clean library_name: diffusers --- # Segmind Stable Diffusion 1B (SSD-1B) Model Card ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62039c2d91d53938a643317d/WveKcu7q5PyZEwNezyyMC.png) ## 🔥🔥Join our [Discord](https://discord.gg/rF44ueRG) to give feedback on our smaller v2 version and early access🔥🔥 ## 📣 AUTOMATIC1111 compatibility added. Supporting file [here](https://huggingface.co/segmind/SSD-1B/blob/main/SSD-1B-A1111.safetensors) ## Demo Try out the model at [Segmind SSD-1B](https://www.segmind.com/models/ssd-1b?utm_source=hf) for ⚡ fastest inference. You can also try it on [🤗 Spaces](https://huggingface.co/spaces/segmind/Segmind-Stable-Diffusion) ## Model Description The Segmind Stable Diffusion Model (SSD-1B) is a **distilled 50% smaller** version of the Stable Diffusion XL (SDXL), offering a **60% speedup** while maintaining high-quality text-to-image generation capabilities. It has been trained on diverse datasets, including Grit and Midjourney scrape data, to enhance its ability to create a wide range of visual content based on textual prompts. This model employs a knowledge distillation strategy, where it leverages the teachings of several expert models in succession, including SDXL, ZavyChromaXL, and JuggernautXL, to combine their strengths and produce impressive visual outputs. Special thanks to the HF team 🤗 especially [Sayak](https://huggingface.co/sayakpaul), [Patrick](https://github.com/patrickvonplaten) and [Poli](https://huggingface.co/multimodalart) for their collaboration and guidance on this work. ## Image Comparision (SDXL-1.0 vs SSD-1B) ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62039c2d91d53938a643317d/mOM_OMxbivVBELad1QQYj.png) ## Usage: This model can be used via the 🧨 Diffusers library. Make sure to install diffusers from source by running ``` pip install git+https://github.com/huggingface/diffusers ``` In addition, please install `transformers`, `safetensors` and `accelerate`: ``` pip install transformers accelerate safetensors ``` To use the model, you can run the following: ```py from diffusers import StableDiffusionXLPipeline import torch pipe = StableDiffusionXLPipeline.from_pretrained("segmind/SSD-1B", torch_dtype=torch.float16, use_safetensors=True, variant="fp16") pipe.to("cuda") # if using torch < 2.0 # pipe.enable_xformers_memory_efficient_attention() prompt = "An astronaut riding a green horse" # Your prompt here neg_prompt = "ugly, blurry, poor quality" # Negative prompt here image = pipe(prompt=prompt, negative_prompt=neg_prompt).images[0] ``` ### Update: Our model should now be usable in ComfyUI. ### Please do use negative prompting, and a CFG around 9.0 for the best quality! ### Model Description - **Developed by:** [Segmind](https://www.segmind.com/) - **Developers:** [Yatharth Gupta](https://huggingface.co/Warlord-K) and [Vishnu Jaddipal](https://huggingface.co/Icar). - **Model type:** Diffusion-based text-to-image generative model - **License:** Apache 2.0 - **Distilled From** [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0) ### Key Features - **Text-to-Image Generation:** The model excels at generating images from text prompts, enabling a wide range of creative applications. - **Distilled for Speed:** Designed for efficiency, this model offers a 60% speedup, making it a practical choice for real-time applications and scenarios where rapid image generation is essential. - **Diverse Training Data:** Trained on diverse datasets, the model can handle a variety of textual prompts and generate corresponding images effectively. - **Knowledge Distillation:** By distilling knowledge from multiple expert models, the Segmind Stable Diffusion Model combines their strengths and minimizes their limitations, resulting in improved performance. ### Model Architecture The SSD-1B Model is a 1.3B Parameter Model which has several layers removed from the Base SDXL Model ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62039c2d91d53938a643317d/Qa8Ow-moLQhOvzp-5kGt4.png) ### Training info These are the key hyperparameters used during training: * Steps: 251000 * Learning rate: 1e-5 * Batch size: 32 * Gradient accumulation steps: 4 * Image resolution: 1024 * Mixed-precision: fp16 ### Multi-Resolution Support ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/62039c2d91d53938a643317d/IwIaIB4nBdMx6Vs5q82cL.jpeg) SSD-1B can support the following output resolutions. * 1024 x 1024 (1:1 Square) * 1152 x 896 (9:7) * 896 x 1152 (7:9) * 1216 x 832 (19:13) * 832 x 1216 (13:19) * 1344 x 768 (7:4 Horizontal) * 768 x 1344 (4:7 Vertical) * 1536 x 640 (12:5 Horizontal) * 640 x 1536 (5:12 Vertical) ### Speed Comparision We have observed that SSD-1B is upto 60% faster than the Base SDXL Model. Below is a comparision on an A100 80GB. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62039c2d91d53938a643317d/TyymF1OkUjXLrHUp1XF0t.png) Below are the speed up metrics on a RTX 4090 GPU. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62039c2d91d53938a643317d/moMZrlDr-HTFkZlqWHUjQ.png) ### Model Sources For research and development purposes, the SSD-1B Model can be accessed via the Segmind AI platform. For more information and access details, please visit [Segmind](https://www.segmind.com/models/ssd-1b). ## Uses ### Direct Use The Segmind Stable Diffusion Model is suitable for research and practical applications in various domains, including: - **Art and Design:** It can be used to generate artworks, designs, and other creative content, providing inspiration and enhancing the creative process. - **Education:** The model can be applied in educational tools to create visual content for teaching and learning purposes. - **Research:** Researchers can use the model to explore generative models, evaluate its performance, and push the boundaries of text-to-image generation. - **Safe Content Generation:** It offers a safe and controlled way to generate content, reducing the risk of harmful or inappropriate outputs. - **Bias and Limitation Analysis:** Researchers and developers can use the model to probe its limitations and biases, contributing to a better understanding of generative models' behavior. ### Downstream Use The Segmind Stable Diffusion Model can also be used directly with the 🧨 Diffusers library training scripts for further training, including: - **[LoRA](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_lora_sdxl.py):** ```bash export MODEL_NAME="segmind/SSD-1B" export VAE_NAME="madebyollin/sdxl-vae-fp16-fix" export DATASET_NAME="lambdalabs/pokemon-blip-captions" accelerate launch train_text_to_image_lora_sdxl.py \ --pretrained_model_name_or_path=$MODEL_NAME \ --pretrained_vae_model_name_or_path=$VAE_NAME \ --dataset_name=$DATASET_NAME --caption_column="text" \ --resolution=1024 --random_flip \ --train_batch_size=1 \ --num_train_epochs=2 --checkpointing_steps=500 \ --learning_rate=1e-04 --lr_scheduler="constant" --lr_warmup_steps=0 \ --mixed_precision="fp16" \ --seed=42 \ --output_dir="sd-pokemon-model-lora-ssd" \ --validation_prompt="cute dragon creature" --report_to="wandb" \ --push_to_hub ``` - **[Fine-Tune](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py):** ```bash export MODEL_NAME="segmind/SSD-1B" export VAE_NAME="madebyollin/sdxl-vae-fp16-fix" export DATASET_NAME="lambdalabs/pokemon-blip-captions" accelerate launch train_text_to_image_sdxl.py \ --pretrained_model_name_or_path=$MODEL_NAME \ --pretrained_vae_model_name_or_path=$VAE_NAME \ --dataset_name=$DATASET_NAME \ --enable_xformers_memory_efficient_attention \ --resolution=512 --center_crop --random_flip \ --proportion_empty_prompts=0.2 \ --train_batch_size=1 \ --gradient_accumulation_steps=4 --gradient_checkpointing \ --max_train_steps=10000 \ --use_8bit_adam \ --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 \ --mixed_precision="fp16" \ --report_to="wandb" \ --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 \ --checkpointing_steps=5000 \ --output_dir="ssd-pokemon-model" \ --push_to_hub ``` - **[Dreambooth LoRA](https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/train_dreambooth_lora_sdxl.py):** ```bash export MODEL_NAME="segmind/SSD-1B" export INSTANCE_DIR="dog" export OUTPUT_DIR="lora-trained-xl" export VAE_PATH="madebyollin/sdxl-vae-fp16-fix" accelerate launch train_dreambooth_lora_sdxl.py \ --pretrained_model_name_or_path=$MODEL_NAME \ --instance_data_dir=$INSTANCE_DIR \ --pretrained_vae_model_name_or_path=$VAE_PATH \ --output_dir=$OUTPUT_DIR \ --mixed_precision="fp16" \ --instance_prompt="a photo of sks dog" \ --resolution=1024 \ --train_batch_size=1 \ --gradient_accumulation_steps=4 \ --learning_rate=1e-5 \ --report_to="wandb" \ --lr_scheduler="constant" \ --lr_warmup_steps=0 \ --max_train_steps=500 \ --validation_prompt="A photo of sks dog in a bucket" \ --validation_epochs=25 \ --seed="0" \ --push_to_hub ``` ### Out-of-Scope Use The SSD-1B Model is not suitable for creating factual or accurate representations of people, events, or real-world information. It is not intended for tasks requiring high precision and accuracy. ## Limitations and Bias Limitations & Bias The SSD-1B Model has some challenges in embodying absolute photorealism, especially in human depictions. While it grapples with incorporating clear text and maintaining the fidelity of complex compositions due to its autoencoding approach, these hurdles pave the way for future enhancements. Importantly, the model's exposure to a diverse dataset, though not a panacea for ingrained societal and digital biases, represents a foundational step towards more equitable technology. Users are encouraged to interact with this pioneering tool with an understanding of its current limitations, fostering an environment of conscious engagement and anticipation for its continued evolution.
[ -0.5942053198814392, -0.9878796935081482, 0.37330541014671326, 0.29791995882987976, -0.35897737741470337, -0.2858405113220215, -0.015238111838698387, -0.2867962121963501, 0.19982188940048218, 0.27491432428359985, -0.5660291314125061, -0.4951113164424896, -0.6491571068763733, -0.2071155160665512, -0.1581610143184662, 0.8214350938796997, -0.1878999024629593, 0.005078510846942663, -0.20034615695476532, -0.026435088366270065, -0.2248477339744568, -0.1997157335281372, -0.9882779717445374, -0.25847679376602173, 0.28712984919548035, 0.12229665368795395, 0.5824215412139893, 0.6378722786903381, 0.4643460810184479, 0.371886283159256, -0.34380048513412476, -0.09054549783468246, -0.5060486197471619, 0.05140499398112297, 0.1287246197462082, -0.2886621356010437, -0.5803166627883911, 0.01615772768855095, 0.5881094336509705, 0.3208567202091217, -0.2480701357126236, 0.08790019899606705, 0.08057847619056702, 0.6753716468811035, -0.3360002636909485, -0.017755616456270218, -0.19652222096920013, 0.18463186919689178, -0.14373674988746643, 0.1302390843629837, -0.08663474023342133, -0.36397862434387207, 0.09931319206953049, -0.8077414035797119, 0.4319976568222046, -0.07173280417919159, 1.1356518268585205, 0.33821219205856323, -0.2654544413089752, 0.07905295491218567, -0.3390190303325653, 0.506539523601532, -0.7740522027015686, 0.2625867426395416, 0.03542574495077133, 0.2670367658138275, 0.10801471769809723, -0.7981033325195312, -0.5896524786949158, 0.07017222046852112, 0.1242683008313179, 0.3427651822566986, -0.12250591069459915, -0.10992887616157532, 0.5422827005386353, 0.3956492841243744, -0.6402317881584167, 0.05776676535606384, -0.4961029887199402, 0.1009959876537323, 0.7265084981918335, 0.14928731322288513, 0.4710901975631714, -0.2027410864830017, -0.6585333347320557, -0.24624577164649963, -0.4572080075740814, -0.06341123580932617, 0.16199642419815063, -0.12109636515378952, -0.6020605564117432, 0.4109784960746765, 0.028763042762875557, 0.3757014870643616, 0.31034156680107117, -0.09917054325342178, 0.5533327460289001, -0.3980807662010193, -0.4107155501842499, -0.146741583943367, 0.9187435507774353, 0.5560011267662048, -0.11908914148807526, 0.13559511303901672, -0.11630195379257202, 0.10508366674184799, -0.03450162708759308, -1.3017387390136719, -0.2376186102628708, 0.2550032436847687, -0.6679425835609436, -0.4304068684577942, -0.2844536602497101, -0.9752019047737122, -0.28165701031684875, -0.01423212792724371, 0.5412697792053223, -0.6251181364059448, -0.6134870052337646, 0.11693203449249268, -0.5554592609405518, 0.11135207116603851, 0.5701436996459961, -0.7318729162216187, 0.11392565071582794, 0.18986846506595612, 1.0015875101089478, -0.3324480354785919, -0.16215059161186218, -0.10523182153701782, 0.04661257192492485, -0.2481546401977539, 0.6713356375694275, -0.2341810166835785, -0.5229978561401367, -0.2771092355251312, 0.24072591960430145, -0.10668042302131653, -0.4310305416584015, 0.6138225197792053, -0.2886514365673065, 0.16189250349998474, -0.1231895461678505, -0.6279128789901733, -0.18332454562187195, 0.04704584926366806, -0.5542165637016296, 1.1390796899795532, 0.31990453600883484, -0.9541004300117493, 0.29569366574287415, -0.6420278549194336, -0.320213258266449, 0.1284382939338684, 0.058776672929525375, -0.6471021175384521, -0.0026989076286554337, -0.0037681625690311193, 0.6918153166770935, -0.17173656821250916, 0.10527434945106506, -0.4386065602302551, -0.2976306974887848, -0.01878497749567032, -0.4159276783466339, 1.0090852975845337, 0.43066462874412537, -0.4621519148349762, 0.0024593030102550983, -0.9136378765106201, 0.029429012909531593, 0.41850319504737854, -0.3024042248725891, -0.3191624879837036, -0.359458327293396, 0.24241302907466888, 0.38391759991645813, 0.270389199256897, -0.4395078718662262, 0.11333176493644714, -0.08937616646289825, 0.4062094986438751, 0.8852062821388245, 0.14030122756958008, 0.5374592542648315, -0.09750383347272873, 0.5371461510658264, 0.3668726980686188, 0.3112187385559082, -0.28651896119117737, -0.6209917068481445, -0.8170250058174133, -0.302634596824646, 0.21277457475662231, 0.4356965720653534, -0.7987000942230225, 0.44488632678985596, -0.06843645870685577, -0.832611620426178, -0.45891812443733215, 0.023761723190546036, 0.34983769059181213, 0.7065758109092712, 0.29753363132476807, -0.3539803624153137, -0.2660234868526459, -0.7269864082336426, 0.43005403876304626, -0.011970875784754753, 0.19502127170562744, 0.3739907443523407, 0.6576784253120422, -0.3393654227256775, 0.3608640730381012, -0.7983152270317078, -0.17986367642879486, -0.13524001836776733, 0.19159778952598572, 0.20575356483459473, 0.6991610527038574, 0.7215892672538757, -0.7659387588500977, -0.6543802618980408, -0.15359051525592804, -0.9474558234214783, 0.005135756451636553, -0.0981166735291481, -0.3827569782733917, 0.408875972032547, 0.48218443989753723, -0.8989800810813904, 0.4776247441768646, 0.5352405309677124, -0.6970333456993103, 0.5792155861854553, -0.5829070210456848, 0.15829035639762878, -1.159272313117981, 0.19244873523712158, 0.46493637561798096, -0.18904493749141693, -0.6201844811439514, 0.15580546855926514, 0.179344043135643, -0.14494049549102783, -0.5958312749862671, 0.7418099045753479, -0.42848747968673706, 0.2861129939556122, -0.13158102333545685, 0.017744015902280807, 0.05989835411310196, 0.5083367228507996, 0.36722031235694885, 0.6662918925285339, 0.9310499429702759, -0.7780752182006836, 0.14929713308811188, 0.38053208589553833, -0.38116103410720825, 0.7542562484741211, -0.9271911978721619, -0.13135434687137604, -0.27602025866508484, 0.10375792533159256, -0.9722380638122559, -0.07691781967878342, 0.37241512537002563, -0.4448554813861847, 0.5236310362815857, -0.12478777766227722, -0.40145716071128845, -0.5156814455986023, -0.2948850095272064, 0.16302548348903656, 0.9928473234176636, -0.5604438185691833, 0.44116368889808655, 0.3326694071292877, -0.0650729387998581, -0.3138095438480377, -0.6813836097717285, -0.21867142617702484, -0.3650586009025574, -0.9542430639266968, 0.5796719789505005, -0.414846807718277, -0.03417850658297539, 0.023045232519507408, 0.06794934719800949, -0.008310047909617424, 0.08120644092559814, 0.4474353790283203, 0.5324046611785889, -0.21013522148132324, -0.24074921011924744, 0.14617259800434113, -0.2393125742673874, -0.021326826885342598, 0.09201592206954956, 0.46817678213119507, 0.10862749069929123, -0.11193830519914627, -0.5993199348449707, 0.2495354264974594, 0.536548376083374, 0.13927039504051208, 0.8066878318786621, 0.9536774754524231, -0.29581350088119507, -0.061511971056461334, -0.45132431387901306, -0.012288196012377739, -0.5367106199264526, 0.27053600549697876, -0.2894757091999054, -0.44580385088920593, 0.4331953525543213, 0.004189221654087305, -0.05447778478264809, 0.5863781571388245, 0.48528870940208435, -0.16263332962989807, 1.3279515504837036, 0.5207591652870178, 0.2261781096458435, 0.5691195130348206, -0.8229145407676697, -0.13790880143642426, -0.8932031989097595, -0.3540833592414856, -0.2706432640552521, -0.18224605917930603, -0.4001125693321228, -0.5959593653678894, 0.34019431471824646, 0.24801421165466309, -0.46072930097579956, 0.2436509132385254, -0.5913580060005188, 0.17702782154083252, 0.3574501872062683, 0.26258090138435364, -0.0583021305501461, 0.1260518729686737, -0.09072951972484589, -0.10548700392246246, -0.5845968723297119, -0.2872224748134613, 0.8683421015739441, 0.44640281796455383, 0.9070239663124084, -0.11064442247152328, 0.6392160654067993, 0.19780738651752472, 0.08044856786727905, -0.25899583101272583, 0.6972624659538269, -0.12050259858369827, -0.5320780277252197, -0.13601787388324738, -0.32208433747291565, -0.6522566676139832, 0.30670827627182007, -0.32084447145462036, -0.33246251940727234, 0.32618966698646545, 0.06791587918996811, -0.2945052683353424, 0.3326393663883209, -1.044560194015503, 0.9866663217544556, -0.31059110164642334, -0.7257821559906006, -0.041002869606018066, -0.6460253596305847, 0.2934621274471283, 0.09374533593654633, -0.04028390720486641, -0.1070018857717514, 0.0006127791129983962, 0.8350765705108643, -0.6496375203132629, 0.7015388607978821, -0.6158252954483032, -0.06178858131170273, 0.2297072559595108, -0.23925739526748657, 0.43690770864486694, -0.007755198050290346, -0.10813558846712112, 0.23785017430782318, 0.013087546452879906, -0.36969709396362305, -0.41992485523223877, 0.8475099205970764, -0.8862560391426086, -0.41550275683403015, -0.4304366409778595, -0.12179052084684372, 0.2736743986606598, 0.28145691752433777, 0.4998696744441986, 0.26810020208358765, -0.23696115612983704, -0.0506901890039444, 1.0710347890853882, -0.32196274399757385, 0.5421257615089417, 0.33670574426651, -0.21421805024147034, -0.37870335578918457, 0.9332491755485535, 0.1705314666032791, 0.350425660610199, -0.02189384400844574, 0.009244827553629875, -0.36822450160980225, -0.40711840987205505, -0.7221093773841858, 0.37220531702041626, -0.7194926142692566, -0.1935548186302185, -0.8648532032966614, -0.46589794754981995, -0.4654943346977234, -0.23765259981155396, -0.33950912952423096, -0.427316278219223, -0.808093249797821, -0.03881647065281868, 0.491810142993927, 0.46814343333244324, -0.2293054163455963, 0.2843370735645294, -0.4531169831752777, 0.3878846764564514, 0.18340754508972168, 0.38222792744636536, 0.14044299721717834, -0.6333247423171997, -0.028297755867242813, 0.09464725852012634, -0.4579002559185028, -0.7169173359870911, 0.5738774538040161, 0.06181008741259575, 0.5232871770858765, 0.6264509558677673, -0.23175519704818726, 0.9126405119895935, -0.45940619707107544, 0.9151113033294678, 0.4319814443588257, -0.6093839406967163, 0.6973314881324768, -0.23535345494747162, 0.2256430834531784, 0.276569128036499, 0.5900140404701233, -0.4022916257381439, -0.106008380651474, -0.8262015581130981, -0.8287596106529236, 0.6831677556037903, 0.1882261037826538, 0.11294805258512497, 0.1108507290482521, 0.4365454614162445, 0.10526782274246216, -0.037899576127529144, -0.6641481518745422, -0.6382815837860107, -0.28624409437179565, -0.03530716896057129, -0.1620231717824936, -0.24198299646377563, 0.11652281880378723, -0.5896956324577332, 0.9999255537986755, 0.11171330511569977, 0.5228137969970703, 0.2927875220775604, -0.031119268387556076, -0.08930262178182602, -0.11729729920625687, 0.39629411697387695, 0.30697202682495117, -0.30414095520973206, -0.10779982060194016, -0.008311421610414982, -0.527000904083252, 0.23317892849445343, 0.2956279218196869, -0.5493883490562439, 0.10155435651540756, -0.16730067133903503, 1.1154152154922485, 0.011361933313310146, -0.4179425835609436, 0.5669683814048767, -0.3339570462703705, -0.35784757137298584, -0.27725332975387573, 0.30123093724250793, 0.23100128769874573, 0.28178539872169495, 0.11217591911554337, 0.44909998774528503, 0.09700659662485123, -0.2192934900522232, -0.01000110525637865, 0.5215681791305542, -0.29560837149620056, -0.30994412302970886, 1.2010447978973389, 0.20841364562511444, -0.10099092870950699, 0.5767773389816284, -0.3732353448867798, -0.33122673630714417, 0.8206828236579895, 0.7315490245819092, 0.7733368277549744, -0.18919609487056732, 0.5028989911079407, 0.7141605019569397, -0.09292764216661453, -0.26939839124679565, 0.3349825143814087, -0.07199740409851074, -0.5535025596618652, 0.049508728086948395, -0.6088063716888428, 0.016120344400405884, 0.07321266829967499, -0.48907041549682617, 0.5089688897132874, -0.4313192665576935, -0.24702441692352295, 0.14806853234767914, 0.09688161313533783, -0.6744896173477173, 0.33170536160469055, 0.2605929970741272, 1.1912908554077148, -0.9949597716331482, 0.7857949733734131, 0.532180905342102, -0.6853632926940918, -0.5396978855133057, -0.2766343355178833, -0.13984911143779755, -0.7531111836433411, 0.545046865940094, 0.2505375146865845, 0.22644250094890594, 0.13507314026355743, -0.7482159733772278, -0.7874549627304077, 1.5105589628219604, 0.14977076649665833, -0.4042990207672119, -0.048714421689510345, -0.2314424365758896, 0.6026835441589355, -0.3538593053817749, 0.47357720136642456, 0.39995768666267395, 0.38417747616767883, 0.36654889583587646, -0.352842777967453, 0.2520468831062317, -0.6480448842048645, 0.3736346364021301, -0.0072879851795732975, -0.9331355094909668, 0.920745849609375, -0.45659318566322327, -0.3172205090522766, 0.2256675511598587, 0.7129925489425659, 0.42685067653656006, 0.28580397367477417, 0.44571688771247864, 1.037480115890503, 0.7327634692192078, -0.07992531359195709, 1.1131361722946167, -0.18787738680839539, 0.28109487891197205, 0.6176877021789551, -0.18749111890792847, 0.6566782593727112, 0.31753820180892944, -0.23447029292583466, 0.4437895715236664, 0.815966784954071, -0.2925862669944763, 0.6966246366500854, -0.09116987884044647, -0.25568369030952454, -0.16066838800907135, 0.06416641920804977, -0.7120750546455383, -0.2442888468503952, 0.29602620005607605, -0.5399746894836426, -0.09166733920574188, 0.24752172827720642, 0.10761155933141708, -0.3293153643608093, -0.26393136382102966, 0.5071724057197571, -0.08748586475849152, -0.6518704295158386, 0.6659010648727417, -0.04080970585346222, 1.0508053302764893, -0.5645330548286438, -0.059906914830207825, -0.27221688628196716, 0.23973849415779114, -0.21024726331233978, -0.9707884192466736, 0.03895192593336105, -0.11509017646312714, -0.1070437803864479, -0.3477088510990143, 0.8572227358818054, -0.3911193311214447, -0.61676424741745, 0.2499723583459854, 0.3192881941795349, 0.31041017174720764, 0.09231700003147125, -1.0948015451431274, 0.294389545917511, 0.05073488503694534, -0.3858048617839813, 0.3909168839454651, 0.3406321108341217, 0.25276416540145874, 0.7411545515060425, 0.45264628529548645, 0.08198215812444687, 0.22980152070522308, -0.07227490842342377, 0.8320385217666626, -0.5117512941360474, -0.3335750102996826, -0.6734623908996582, 0.6850996613502502, -0.3723107874393463, -0.296051949262619, 0.8869132399559021, 0.7041762471199036, 0.6573024988174438, -0.24427464604377747, 0.925491452217102, -0.370333194732666, 0.27498117089271545, -0.47076061367988586, 0.9033852815628052, -0.8864932656288147, 0.06515957415103912, -0.4080755114555359, -0.6647170782089233, 0.0763154923915863, 0.7692533135414124, 0.03623470291495323, 0.1844044327735901, 0.4849265515804291, 0.9731659889221191, -0.24385292828083038, -0.02317231521010399, 0.15628373622894287, 0.33099794387817383, 0.1850769817829132, 0.4182077646255493, 0.5676030516624451, -0.8529170155525208, 0.3351191282272339, -0.5715921521186829, -0.2627389132976532, -0.055660855025053024, -0.7469069957733154, -0.9367665648460388, -0.7877538800239563, -0.8515483140945435, -0.6131203770637512, -0.13824690878391266, 0.5212844610214233, 0.8573513031005859, -0.44041335582733154, 0.06740961968898773, -0.18391218781471252, 0.05243300646543503, -0.1563551127910614, -0.289052277803421, 0.4496876299381256, -0.019143719226121902, -0.8453823924064636, -0.07634027302265167, 0.157023623585701, 0.6070508360862732, -0.27744072675704956, -0.3024148643016815, -0.2910899221897125, -0.07500632107257843, 0.5898481607437134, 0.18841254711151123, -0.3032072186470032, 0.2074832320213318, -0.10045000910758972, -0.20586919784545898, 0.2201317548751831, 0.24767403304576874, -0.6369373202323914, 0.2529796063899994, 0.6764171719551086, 0.18039652705192566, 0.8686555027961731, -0.04963699355721474, 0.09045867621898651, -0.45354416966438293, 0.14619116485118866, -0.2890699803829193, 0.4872489273548126, 0.24987827241420746, -0.38469594717025757, 0.6447294354438782, 0.47284165024757385, -0.6423577070236206, -0.7849216461181641, -0.2399587780237198, -1.1987957954406738, -0.34971022605895996, 1.320845127105713, -0.18653666973114014, -0.6186924576759338, 0.24215658009052277, -0.470420241355896, 0.15478132665157318, -0.36704862117767334, 0.5169821381568909, 0.4043363630771637, -0.046804483979940414, -0.3390630781650543, -0.5197303295135498, 0.4516979455947876, 0.11067645251750946, -0.8557096123695374, -0.18047228455543518, 0.6287223696708679, 0.6472690105438232, 0.16584119200706482, 0.9128851890563965, -0.18084874749183655, 0.25540491938591003, 0.16981849074363708, 0.1909547597169876, 0.08446450531482697, 0.04064233601093292, -0.4080524146556854, 0.04894620552659035, -0.34888944029808044, -0.1003967747092247 ]
j-hartmann/emotion-english-distilroberta-base
j-hartmann
"2023-01-02T13:03:10Z"
681,216
252
transformers
[ "transformers", "pytorch", "tf", "roberta", "text-classification", "distilroberta", "sentiment", "emotion", "twitter", "reddit", "en", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: "en" tags: - distilroberta - sentiment - emotion - twitter - reddit widget: - text: "Oh wow. I didn't know that." - text: "This movie always makes me cry.." - text: "Oh Happy Day" --- # Emotion English DistilRoBERTa-base # Description ℹ With this model, you can classify emotions in English text data. The model was trained on 6 diverse datasets (see Appendix below) and predicts Ekman's 6 basic emotions, plus a neutral class: 1) anger 🤬 2) disgust 🤢 3) fear 😨 4) joy 😀 5) neutral 😐 6) sadness 😭 7) surprise 😲 The model is a fine-tuned checkpoint of [DistilRoBERTa-base](https://huggingface.co/distilroberta-base). For a 'non-distilled' emotion model, please refer to the model card of the [RoBERTa-large](https://huggingface.co/j-hartmann/emotion-english-roberta-large) version. # Application 🚀 a) Run emotion model with 3 lines of code on single text example using Hugging Face's pipeline command on Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/j-hartmann/emotion-english-distilroberta-base/blob/main/simple_emotion_pipeline.ipynb) ```python from transformers import pipeline classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True) classifier("I love this!") ``` ```python Output: [[{'label': 'anger', 'score': 0.004419783595949411}, {'label': 'disgust', 'score': 0.0016119900392368436}, {'label': 'fear', 'score': 0.0004138521908316761}, {'label': 'joy', 'score': 0.9771687984466553}, {'label': 'neutral', 'score': 0.005764586851000786}, {'label': 'sadness', 'score': 0.002092392183840275}, {'label': 'surprise', 'score': 0.008528684265911579}]] ``` b) Run emotion model on multiple examples and full datasets (e.g., .csv files) on Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/j-hartmann/emotion-english-distilroberta-base/blob/main/emotion_prediction_example.ipynb) # Contact 💻 Please reach out to [[email protected]](mailto:[email protected]) if you have any questions or feedback. Thanks to Samuel Domdey and [chrsiebert](https://huggingface.co/siebert) for their support in making this model available. # Reference ✅ For attribution, please cite the following reference if you use this model. A working paper will be available soon. ``` Jochen Hartmann, "Emotion English DistilRoBERTa-base". https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/, 2022. ``` BibTex citation: ``` @misc{hartmann2022emotionenglish, author={Hartmann, Jochen}, title={Emotion English DistilRoBERTa-base}, year={2022}, howpublished = {\url{https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/}}, } ``` # Appendix 📚 Please find an overview of the datasets used for training below. All datasets contain English text. The table summarizes which emotions are available in each of the datasets. The datasets represent a diverse collection of text types. Specifically, they contain emotion labels for texts from Twitter, Reddit, student self-reports, and utterances from TV dialogues. As MELD (Multimodal EmotionLines Dataset) extends the popular EmotionLines dataset, EmotionLines itself is not included here. |Name|anger|disgust|fear|joy|neutral|sadness|surprise| |---|---|---|---|---|---|---|---| |Crowdflower (2016)|Yes|-|-|Yes|Yes|Yes|Yes| |Emotion Dataset, Elvis et al. (2018)|Yes|-|Yes|Yes|-|Yes|Yes| |GoEmotions, Demszky et al. (2020)|Yes|Yes|Yes|Yes|Yes|Yes|Yes| |ISEAR, Vikash (2018)|Yes|Yes|Yes|Yes|-|Yes|-| |MELD, Poria et al. (2019)|Yes|Yes|Yes|Yes|Yes|Yes|Yes| |SemEval-2018, EI-reg, Mohammad et al. (2018) |Yes|-|Yes|Yes|-|Yes|-| The model is trained on a balanced subset from the datasets listed above (2,811 observations per emotion, i.e., nearly 20k observations in total). 80% of this balanced subset is used for training and 20% for evaluation. The evaluation accuracy is 66% (vs. the random-chance baseline of 1/7 = 14%). # Scientific Applications 📖 Below you can find a list of papers using "Emotion English DistilRoBERTa-base". If you would like your paper to be added to the list, please send me an email. - Butt, S., Sharma, S., Sharma, R., Sidorov, G., & Gelbukh, A. (2022). What goes on inside rumour and non-rumour tweets and their reactions: A Psycholinguistic Analyses. Computers in Human Behavior, 107345. - Kuang, Z., Zong, S., Zhang, J., Chen, J., & Liu, H. (2022). Music-to-Text Synaesthesia: Generating Descriptive Text from Music Recordings. arXiv preprint arXiv:2210.00434. - Rozado, D., Hughes, R., & Halberstadt, J. (2022). Longitudinal analysis of sentiment and emotion in news media headlines using automated labelling with Transformer language models. Plos one, 17(10), e0276367.
[ -0.33591076731681824, -0.5919204950332642, 0.11852046102285385, 0.510186493396759, -0.2755136787891388, 0.00253263465128839, -0.3572382628917694, -0.5006747245788574, 0.4734278619289398, -0.164588063955307, -0.6519727110862732, -0.7731543183326721, -0.8642832040786743, 0.401314377784729, -0.09414560347795486, 1.1762882471084595, -0.23277968168258667, 0.28624966740608215, -0.10144304484128952, -0.2580808997154236, -0.24816904962062836, -0.760921835899353, -0.5293692946434021, -0.36444494128227234, 0.6496003866195679, 0.301398366689682, 0.24997283518314362, 0.16648223996162415, 0.4113611578941345, 0.3653695285320282, -0.3344224989414215, -0.1683666855096817, -0.6158204674720764, 0.2945058345794678, 0.27205243706703186, -0.4866209030151367, -0.4032697081565857, 0.24851685762405396, 0.12862050533294678, 0.2814813256263733, -0.1530272513628006, 0.017687339335680008, 0.16863295435905457, 0.9713450074195862, -0.4846022129058838, 0.3776835501194, -0.2809346616268158, 0.26813259720802307, -0.06949473917484283, 0.17185215651988983, -0.48762163519859314, -0.3953346312046051, 0.30404287576675415, -0.3180793821811676, -0.049703098833560944, 0.09796997159719467, 1.144159197807312, 0.2891440987586975, -0.628739058971405, -0.6342759132385254, -0.3232625424861908, 0.8326075077056885, -0.7922062873840332, 0.2407323271036148, 0.15777724981307983, -0.05995430797338486, 0.08902274072170258, -0.47127288579940796, -0.7206206321716309, -0.04606104642152786, -0.16356156766414642, 0.7058213949203491, -0.40091854333877563, 0.09236162900924683, 0.11936166137456894, 0.5146985054016113, -0.5827165246009827, -0.1547330617904663, -0.23711881041526794, 0.049769073724746704, 0.748641848564148, 0.19146740436553955, 0.3923329710960388, -0.40378400683403015, -0.28808245062828064, -0.3539000153541565, -0.05737259238958359, 0.29419711232185364, 0.3999589681625366, 0.3151388466358185, -0.6318105459213257, 0.5056194067001343, -0.02773101069033146, 0.3741528391838074, 0.2950366139411926, -0.19036614894866943, 0.7061672210693359, 0.12207736819982529, -0.2591302990913391, -0.000675106595735997, 1.1708391904830933, 0.6053564548492432, 0.37458696961402893, 0.08444049954414368, 0.024899031966924667, 0.46250325441360474, -0.08489656448364258, -0.8775039911270142, -0.2973426878452301, 0.4804443120956421, -0.4463890492916107, -0.4186328053474426, -0.14831151068210602, -1.2520382404327393, -0.4443259835243225, -0.3156532347202301, 0.24329662322998047, -0.5874133706092834, -0.2709733545780182, 0.21359314024448395, -0.13833177089691162, -0.04866898059844971, -0.01007412001490593, -0.8650081157684326, 0.0953197032213211, 0.27724146842956543, 0.6759243011474609, -0.07027548551559448, -0.21973098814487457, 0.11386415362358093, -0.5465437769889832, -0.1410541832447052, 0.5512155294418335, -0.30329230427742004, -0.3665335178375244, 0.0007963662501424551, 0.16479265689849854, -0.1615421324968338, -0.27993854880332947, 0.7955425381660461, -0.0580441914498806, 0.692231297492981, -0.17087237536907196, -0.568342924118042, -0.3502717912197113, 0.27962976694107056, -0.605246365070343, 1.155773639678955, 0.007927333936095238, -1.06649649143219, 0.028368527069687843, -0.59841388463974, -0.5289003252983093, -0.3793887495994568, 0.3224230408668518, -0.43193748593330383, 0.11750376969575882, 0.11431053280830383, 0.6803033351898193, -0.14153656363487244, 0.2521367371082306, -0.42239153385162354, -0.047306790947914124, 0.2136656939983368, -0.1737368106842041, 0.9194068312644958, 0.2528199851512909, -0.501686692237854, -0.24327778816223145, -0.8065293431282043, -0.1121949851512909, 0.16221371293067932, -0.2869974374771118, -0.44116100668907166, -0.0883941650390625, 0.13496173918247223, 0.44935309886932373, 0.3153652846813202, -0.557298481464386, 0.09882765263319016, -0.4566597044467926, 0.17286381125450134, 0.6609899997711182, -0.11754881590604782, 0.30778852105140686, -0.050814442336559296, 0.7231155037879944, 0.18623489141464233, -0.019435716792941093, -0.10486404597759247, -0.413059800863266, -0.8763852119445801, -0.41901353001594543, 0.13981474936008453, 0.7597636580467224, -0.47189390659332275, 0.5691031217575073, -0.06751076877117157, -0.8157333135604858, -0.7864667177200317, -0.2164979875087738, 0.4641130566596985, 0.8938435316085815, 0.41452091932296753, 0.015900729224085808, -0.7786412835121155, -0.6521627902984619, -0.280134916305542, -0.27854084968566895, 0.19106173515319824, 0.3781241774559021, 0.42794913053512573, -0.24212835729122162, 0.7857238054275513, -0.5733910202980042, -0.18353207409381866, -0.14313654601573944, 0.5166344046592712, 0.269741952419281, 0.18231505155563354, 0.5316026210784912, -0.8919064402580261, -0.9681233167648315, -0.07239657640457153, -0.9622624516487122, -0.28072795271873474, 0.11090582609176636, -0.11715764552354813, 0.550248384475708, 0.006377933546900749, -0.540701150894165, 0.2251562476158142, 0.829977810382843, -0.531298816204071, 0.34507954120635986, 0.027632540091872215, 0.3425230383872986, -1.4950108528137207, -0.06423816084861755, 0.4807853698730469, 0.027032867074012756, -0.741692066192627, -0.36897608637809753, -0.042684946209192276, 0.06384898722171783, -0.5928173065185547, 0.6687352657318115, -0.41983652114868164, 0.3754372298717499, -0.04139553755521774, 0.06974982470273972, 0.11629194021224976, 0.6814512014389038, 0.19359715282917023, 0.2358933538198471, 0.678220808506012, -0.25927212834358215, 0.6171729564666748, 0.55709308385849, -0.15242017805576324, 0.7527323961257935, -0.47502171993255615, 0.0016687443712726235, -0.5489608645439148, 0.2630728483200073, -1.1315908432006836, -0.19375886023044586, 0.11875272542238235, -0.7218919992446899, 0.43286070227622986, -0.07185696065425873, -0.1701967865228653, -0.4951382577419281, -0.32989737391471863, -0.11085264384746552, 0.8829042911529541, -0.4694906175136566, 0.7800166606903076, 0.3312768042087555, -0.38428226113319397, -0.7290394902229309, -0.9328662157058716, -0.0399763286113739, -0.6383318901062012, -0.6683516502380371, 0.029567064717411995, -0.29151618480682373, -0.17895135283470154, -0.0019793754909187555, 0.05922197923064232, -0.19624032080173492, 0.047308288514614105, 0.5657373070716858, 0.42750445008277893, 0.05701461061835289, 0.13484230637550354, 0.009067924693226814, -0.0013669580221176147, 0.08840405941009521, 0.2954665422439575, 0.3854013681411743, -0.3898147940635681, 0.24853207170963287, -0.5367951989173889, 0.27753013372421265, 0.7230608463287354, 0.004285752773284912, 0.8192224502563477, 0.6658428311347961, -0.4112032949924469, -0.018176432698965073, -0.28988686203956604, -0.06333445012569427, -0.4246864318847656, 0.49237263202667236, -0.3017256259918213, -0.7518434524536133, 0.5897319912910461, 0.0704755187034607, -0.1753634810447693, 0.60463547706604, 0.7195236086845398, -0.44594454765319824, 1.1609127521514893, 0.5548625588417053, -0.3976527750492096, 0.3846990764141083, -0.316028892993927, 0.28581616282463074, -0.5583350658416748, -0.38352125883102417, -0.5506954789161682, -0.5710763931274414, -0.7459935545921326, 0.08338060230016708, 0.265087753534317, 0.010141945444047451, -0.1284381002187729, 0.281305193901062, -0.508226215839386, 0.2649732530117035, 0.17600150406360626, 0.029673125594854355, -0.04066617414355278, -0.02222353406250477, 0.003204456763342023, -0.45036324858665466, -0.4766004681587219, -0.41662222146987915, 0.6998904347419739, 0.6699769496917725, 0.7799017429351807, -0.07015889137983322, 0.8537880182266235, 0.06189639866352081, 0.49886149168014526, -0.9157575964927673, 0.42440861463546753, -0.4703892171382904, -0.5981693267822266, -0.14178253710269928, -0.42921462655067444, -0.8837466239929199, 0.02149464748799801, -0.301287442445755, -0.8904323577880859, 0.16965483129024506, 0.23513762652873993, -0.13391801714897156, 0.10410847514867783, -1.0889606475830078, 0.9532563090324402, -0.2649952471256256, -0.2821158468723297, 0.15139032900333405, -0.7513557076454163, 0.3090599477291107, -0.0035280236043035984, 0.27062132954597473, -0.22865957021713257, 0.2391357421875, 0.8330379128456116, -0.3448154926300049, 0.969078540802002, -0.2724202275276184, -0.09729506075382233, 0.3023315966129303, -0.08395208418369293, 0.5303042531013489, -0.3374010920524597, -0.19664396345615387, 0.23957061767578125, -0.12069807201623917, -0.12431124597787857, -0.5291615724563599, 0.626700222492218, -0.8056050539016724, -0.022597312927246094, -0.5568834543228149, -0.48826953768730164, -0.2821955382823944, -0.013116142712533474, 0.6578194499015808, 0.15760229527950287, -0.0938338041305542, 0.2801932096481323, 0.500289797782898, -0.2620854675769806, 0.42306074500083923, 0.48981571197509766, -0.0008924293797463179, -0.47574520111083984, 0.7445324659347534, 0.045028261840343475, -0.05688219144940376, 0.29843658208847046, 0.39340370893478394, -0.5544188618659973, 0.015361597761511803, -0.0841439887881279, 0.26696470379829407, -0.6735410690307617, -0.21613968908786774, -0.7667139768600464, 0.009750057943165302, -0.5395578742027283, -0.22244293987751007, -0.3742201328277588, -0.20150643587112427, -0.43798473477363586, -0.42725563049316406, 0.7053532004356384, 0.6433380842208862, -0.03174872323870659, 0.17480601370334625, -0.7047804594039917, 0.18723784387111664, 0.12791596353054047, 0.39492157101631165, -0.05672173947095871, -0.6730923652648926, -0.2923312783241272, 0.25266963243484497, -0.3786405622959137, -1.1052645444869995, 0.9905446171760559, 0.2288610339164734, 0.056862588971853256, 0.37183070182800293, 0.20347708463668823, 0.6802728772163391, -0.44586849212646484, 1.0077078342437744, 0.4836033284664154, -1.0246105194091797, 0.5451738834381104, -0.2427440881729126, 0.020863672718405724, 0.5891954898834229, 0.9736148715019226, -0.8434977531433105, -0.390706330537796, -0.6301127672195435, -1.1169334650039673, 0.7593733668327332, 0.1652432233095169, 0.2285134345293045, -0.09245990216732025, 0.12025776505470276, -0.02233954705297947, 0.23711980879306793, -1.0172253847122192, -0.6392706632614136, -0.25059226155281067, -0.9645035266876221, -0.18712736666202545, -0.30803465843200684, 0.09619329869747162, -0.3578028380870819, 0.8714922666549683, 0.11705020815134048, 0.30399149656295776, 0.2891804873943329, -0.0036958043929189444, -0.00420725904405117, 0.21453799307346344, 0.4355699121952057, -0.19657330214977264, -0.5157490968704224, 0.017520206049084663, 0.28164398670196533, -0.6118119359016418, 0.31209203600883484, 0.12991435825824738, 0.1078028604388237, 0.1482195258140564, 0.20783890783786774, 1.1753262281417847, -0.0015885040629655123, -0.5991436243057251, 0.5531240105628967, -0.21492043137550354, -0.3073701560497284, -0.30785542726516724, -0.38814881443977356, 0.21571272611618042, 0.29410478472709656, 0.15893521904945374, -0.1095404252409935, 0.22163093090057373, -0.541735827922821, 0.14551936089992523, 0.05205516517162323, -0.6314775347709656, -0.5254248976707458, 0.5675297975540161, 0.31565386056900024, -0.11584977805614471, 0.4518143832683563, -0.3725006878376007, -0.7592455148696899, 0.6650907397270203, 0.41326484084129333, 1.1283844709396362, -0.3000868856906891, 0.19292041659355164, 0.6202939748764038, 0.03495623171329498, -0.11304590851068497, 0.5724822878837585, 0.4665951430797577, -0.7569646239280701, -0.27574464678764343, -0.7920386791229248, -0.2775079607963562, 0.17367814481258392, -0.7022770643234253, 0.42700716853141785, -0.13728950917720795, -0.21864035725593567, 0.0037898733280599117, -0.02595946379005909, -0.615505039691925, 0.5994166135787964, 0.4932135045528412, 0.883640706539154, -1.188361406326294, 0.5697707533836365, 0.909810483455658, -0.42112618684768677, -1.1400084495544434, -0.14669232070446014, 0.3169642984867096, -0.44678226113319397, 0.6811165809631348, 0.30249667167663574, 0.08261531591415405, -0.007926546037197113, -0.47381871938705444, -0.5860306024551392, 1.0440980195999146, 0.2250509262084961, -0.5182720422744751, 0.14071351289749146, -0.009620284661650658, 1.041803240776062, -0.3378579318523407, 0.6300168633460999, 0.3204329013824463, 0.44261816143989563, 0.1426878273487091, -0.642823338508606, -0.24184992909431458, -0.6698200702667236, -0.17289124429225922, 0.070536769926548, -0.8584352731704712, 0.9104220271110535, 0.03069089539349079, -0.23903954029083252, -0.25010380148887634, 0.5841055512428284, 0.15016451478004456, 0.4528971314430237, 0.5823298096656799, 0.8105843663215637, 0.843656599521637, -0.34559252858161926, 1.0543420314788818, -0.5701072812080383, 0.7105361819267273, 0.9054287075996399, -0.3697192966938019, 0.8541915416717529, 0.28233107924461365, -0.33833402395248413, 0.8119550347328186, 0.927520215511322, -0.001471844152547419, 0.44382065534591675, 0.1669553816318512, -0.278859943151474, 0.2218693345785141, -0.0149790458381176, -0.11454448848962784, 0.3747771382331848, 0.09155260026454926, -0.3196791708469391, 0.12831203639507294, 0.2837204933166504, 0.4910487234592438, -0.027626540511846542, -0.058997511863708496, 0.7468608021736145, 0.1316002607345581, -0.5294840931892395, 0.6744645237922668, -0.18520550429821014, 1.0610854625701904, -0.502197802066803, 0.19294367730617523, -0.47113528847694397, -0.007462458685040474, -0.4125451147556305, -0.8483740091323853, 0.1706455945968628, 0.4891863465309143, -0.24238862097263336, -0.35230427980422974, 0.5698660016059875, -0.8679406642913818, -0.48376384377479553, 0.5521653294563293, 0.15127645432949066, 0.31000232696533203, 0.03293248638510704, -0.7202883958816528, -0.030590979382395744, 0.19693459570407867, -0.7514550089836121, 0.13276933133602142, 0.7041693329811096, 0.3601543605327606, 0.5744434595108032, 0.24558719992637634, 0.07046464085578918, -0.008603508584201336, -0.017690639942884445, 0.6822678446769714, -0.7204828858375549, -0.46080341935157776, -0.8954570293426514, 1.1268565654754639, -0.012460252270102501, -0.32430174946784973, 0.7668992280960083, 0.5301526784896851, 0.5824458599090576, -0.2904735803604126, 0.9644241333007812, -0.30364519357681274, 0.5722076892852783, -0.2791948616504669, 0.6401423215866089, -0.7521599531173706, -0.3082572817802429, -0.6167455911636353, -0.708118200302124, -0.1596451848745346, 0.5992559790611267, -0.24197909235954285, -0.026904694736003876, 0.7939244508743286, 0.6149719953536987, 0.18166987597942352, -0.12640829384326935, 0.10550323128700256, 0.6318342089653015, 0.008433164097368717, 0.6953927874565125, 0.5515376925468445, -0.5853584408760071, 0.41301923990249634, -0.524931788444519, -0.33690452575683594, -0.18361854553222656, -1.0342822074890137, -0.7317507863044739, -0.8120787143707275, -0.5222212076187134, -0.6386236548423767, -0.24333058297634125, 0.9312229156494141, 0.3993787169456482, -0.9228657484054565, -0.18663300573825836, 0.10155430436134338, -0.1477842479944229, 0.12240736931562424, -0.27291661500930786, 0.219520702958107, -0.14187748730182648, -1.0620932579040527, 0.03570963442325592, 0.08753514289855957, 0.41203242540359497, 0.16944672167301178, -0.374888151884079, -0.16229021549224854, 0.07104940712451935, 0.6829039454460144, 0.17845486104488373, -0.46578580141067505, -0.09045712649822235, 0.2416754513978958, -0.26725009083747864, 0.10987192392349243, 0.14979952573776245, -0.3429473340511322, 0.4693571627140045, 0.6584893465042114, 0.3701559007167816, 0.4619041085243225, 0.03797429800033569, 0.24521467089653015, -0.8075010776519775, 0.2743655741214752, 0.2025795876979828, 0.6013745665550232, 0.39974960684776306, -0.4788861572742462, 0.5225001573562622, 0.30934828519821167, -0.5176644921302795, -0.7324540019035339, -0.11851062625646591, -1.2090773582458496, -0.020308224484324455, 1.242262363433838, -0.37125149369239807, -0.2962692975997925, 0.41583508253097534, -0.4355180859565735, 0.4582303464412689, -0.5791422128677368, 0.9391590356826782, 1.112979531288147, -0.16369521617889404, -0.30181562900543213, -0.24621328711509705, 0.5176038146018982, 0.51045823097229, -0.8701660633087158, 0.08277440071105957, 0.5524387955665588, 0.23536112904548645, 0.23646828532218933, 0.46974727511405945, 0.00864566769450903, -0.1633542776107788, -0.13759778439998627, 0.7692285776138306, 0.2825705111026764, -0.025313960388302803, -0.6898825764656067, -0.05861843377351761, -0.3656699061393738, -0.11258655786514282 ]
ntu-spml/distilhubert
ntu-spml
"2023-07-24T18:30:45Z"
677,843
17
transformers
[ "transformers", "pytorch", "safetensors", "hubert", "feature-extraction", "speech", "en", "dataset:librispeech_asr", "arxiv:2110.01900", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: en datasets: - librispeech_asr tags: - speech license: apache-2.0 --- # DistilHuBERT [DistilHuBERT by NTU Speech Processing & Machine Learning Lab](https://github.com/s3prl/s3prl/tree/master/s3prl/upstream/distiller) The base model pretrained on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz. **Note**: This model does not have a tokenizer as it was pretrained on audio alone. In order to use this model **speech recognition**, a tokenizer should be created and the model should be fine-tuned on labeled text data. Check out [this blog](https://huggingface.co/blog/fine-tune-wav2vec2-english) for more in-detail explanation of how to fine-tune the model. Paper: [DistilHuBERT: Speech Representation Learning by Layer-wise Distillation of Hidden-unit BERT](https://arxiv.org/abs/2110.01900) Authors: Heng-Jui Chang, Shu-wen Yang, Hung-yi Lee **Abstract** Self-supervised speech representation learning methods like wav2vec 2.0 and Hidden-unit BERT (HuBERT) leverage unlabeled speech data for pre-training and offer good representations for numerous speech processing tasks. Despite the success of these methods, they require large memory and high pre-training costs, making them inaccessible for researchers in academia and small companies. Therefore, this paper introduces DistilHuBERT, a novel multi-task learning framework to distill hidden representations from a HuBERT model directly. This method reduces HuBERT's size by 75% and 73% faster while retaining most performance in ten different tasks. Moreover, DistilHuBERT required little training time and data, opening the possibilities of pre-training personal and on-device SSL models for speech. The original model can be found under https://github.com/s3prl/s3prl/tree/master/s3prl/upstream/distiller . # Usage See [this blog](https://huggingface.co/blog/fine-tune-wav2vec2-english) for more information on how to fine-tune the model. Note that the class `Wav2Vec2ForCTC` has to be replaced by `HubertForCTC`.
[ -0.24005746841430664, -0.6244522333145142, 0.21644626557826996, 0.19372165203094482, -0.35015979409217834, 0.17778098583221436, -0.26638078689575195, -0.43424639105796814, -0.12982651591300964, 0.19719067215919495, -0.5731405019760132, -0.27425476908683777, -0.8322219848632812, -0.2024594396352768, -0.1447896659374237, 0.926281750202179, 0.2161557376384735, 0.383606493473053, 0.12345168739557266, -0.13378775119781494, -0.4396218955516815, -0.6288508176803589, -0.6556541919708252, -0.5006910562515259, 0.3485908508300781, 0.28871139883995056, 0.09278476238250732, 0.4336170554161072, 0.061088189482688904, 0.28106924891471863, -0.32507404685020447, -0.03573072701692581, -0.5994741320610046, 0.21488450467586517, -0.014150284230709076, -0.31157439947128296, -0.4011346399784088, 0.21043695509433746, 0.45478111505508423, 0.5290443897247314, -0.382320761680603, 0.47837361693382263, 0.4812323749065399, 0.7599297761917114, -0.5866602063179016, 0.49327847361564636, -0.8164724111557007, -0.19432438910007477, -0.4142036437988281, 0.1378672868013382, -0.45495685935020447, 0.047679826617240906, 0.16448920965194702, -0.34066063165664673, 0.262821227312088, -0.14001090824604034, 0.8182856440544128, 0.5250368714332581, -0.2998678386211395, -0.11035017669200897, -0.8385567665100098, 1.0942641496658325, -0.5570060610771179, 0.5334258675575256, 0.5978877544403076, 0.41678404808044434, 0.020475897938013077, -1.0318256616592407, -0.442499577999115, -0.1837402582168579, 0.24124079942703247, 0.16095179319381714, -0.5576503276824951, -0.015264416113495827, 0.37085744738578796, 0.30866849422454834, -0.370498389005661, 0.10690324008464813, -0.6111796498298645, -0.22972331941127777, 0.484777569770813, -0.2393241673707962, -0.23374201357364655, 0.06000416725873947, -0.28703930974006653, -0.12695547938346863, -0.25562775135040283, 0.280434250831604, 0.31014421582221985, 0.328389048576355, -0.03702552244067192, 0.15877607464790344, -0.07446703314781189, 0.5747901797294617, 0.4021804630756378, -0.1766386181116104, 0.5681316256523132, -0.06052030250430107, -0.17994767427444458, 0.4255097806453705, 0.7309289574623108, -0.24956807494163513, 0.1589493751525879, 0.22022022306919098, -0.14711293578147888, -0.10890640318393707, 0.29348355531692505, -0.8420017957687378, -0.6581186652183533, 0.3577037453651428, -0.37962448596954346, -0.18584831058979034, -0.11463453620672226, -0.10467248409986496, 0.023864539340138435, -0.5864254236221313, 0.4724075198173523, -0.5005967617034912, -0.3140197694301605, -0.17338493466377258, -0.2843270003795624, -0.13859215378761292, 0.17914630472660065, -1.1043602228164673, 0.34070640802383423, 0.4134170711040497, 0.690397322177887, -0.1515336036682129, -0.2028426080942154, -0.6210250854492188, 0.1473434716463089, -0.20741477608680725, 0.2280462086200714, -0.11978365480899811, -0.1957382708787918, -0.3559914231300354, -0.07204387336969376, 0.3466140329837799, -0.5392472147941589, 0.5439876317977905, -0.28003913164138794, -0.023656757548451424, -0.027161387726664543, -0.4786704480648041, -0.21512946486473083, -0.3558935225009918, -0.6877546310424805, 1.242037296295166, 0.06739615648984909, -0.7997718453407288, 0.259318470954895, -0.6202153563499451, -0.5457473397254944, 0.01869008131325245, -0.0010383888147771358, -0.5264735817909241, 0.17363476753234863, 0.3664035201072693, 0.7376462817192078, -0.036870747804641724, 0.5069187879562378, -0.18470646440982819, -0.2830297350883484, 0.04846920073032379, -0.598149299621582, 1.1090916395187378, 0.4444880187511444, -0.44034382700920105, 0.14904913306236267, -1.0521122217178345, 0.03653860464692116, -0.02990587241947651, -0.34338635206222534, -0.200282022356987, -0.031478118151426315, 0.30464017391204834, 0.0702308863401413, 0.38596776127815247, -0.622673511505127, -0.16257649660110474, -0.31591442227363586, 0.996730625629425, 0.6035609245300293, -0.3408145606517792, 0.3408706486225128, -0.08528613299131393, 0.010068484582006931, 0.0708332285284996, 0.2516744136810303, 0.06261645257472992, -0.4226709306240082, -0.617791473865509, -0.63210529088974, 0.5124180912971497, 0.47583529353141785, -0.4611589014530182, 0.5813477635383606, -0.04679253324866295, -0.7631153464317322, -0.8794434070587158, 0.1706632375717163, 0.32445186376571655, 0.570736289024353, 0.7756957411766052, 0.09835042804479599, -0.6036701202392578, -0.9131228923797607, 0.047033604234457016, -0.07378482073545456, -0.24972808361053467, 0.021106092259287834, 0.31202924251556396, -0.17293967306613922, 0.7953791618347168, -0.3340495526790619, -0.5289987921714783, -0.4127867519855499, 0.39916202425956726, 0.3038652539253235, 0.7132400870323181, 0.47522327303886414, -0.7139717936515808, -0.47925183176994324, -0.33007317781448364, -0.3408164978027344, -0.05354921147227287, 0.31622177362442017, 0.12133011966943741, 0.07014112174510956, 0.5223398804664612, -0.3042818009853363, 0.3183335065841675, 0.7118251323699951, 0.30357465147972107, 0.32615363597869873, -0.2929089069366455, -0.14010639488697052, -1.2551461458206177, 0.06933100521564484, -0.007432154379785061, -0.43427181243896484, -0.7513853907585144, -0.2901921570301056, 0.28207144141197205, -0.21255439519882202, -0.7470345497131348, 0.24554894864559174, -0.5440194010734558, 0.26063430309295654, -0.4236295223236084, -0.04580708593130112, 0.06034800410270691, 0.6254920363426208, 0.023468945175409317, 0.6704118251800537, 0.8876937031745911, -0.6727467179298401, 0.4057013690471649, 0.19319486618041992, -0.29213038086891174, 0.23690029978752136, -0.9108022451400757, 0.24923568964004517, -0.026944374665617943, 0.3510238230228424, -1.0342704057693481, -0.03740733489394188, 0.07519398629665375, -0.5734925270080566, 0.7201581597328186, -0.19604912400245667, -0.4926600158214569, -0.34258875250816345, -0.1490546464920044, 0.4391031563282013, 0.6491559147834778, -0.718596339225769, 0.681904673576355, 0.7150900363922119, -0.10554667562246323, -0.6088842153549194, -0.9970780611038208, -0.22272852063179016, -0.22098512947559357, -0.33128002285957336, 0.6634833216667175, -0.0020748625975102186, 0.18439598381519318, -0.21414822340011597, -0.41150617599487305, -0.3086507320404053, -0.012967693619430065, 0.564738392829895, 0.20096373558044434, 0.11311349272727966, 0.21441173553466797, 0.20196595788002014, -0.2410009652376175, -0.08370711654424667, -0.3160165846347809, 0.462721049785614, -0.10662566125392914, -0.05581464245915413, -0.9457201361656189, 0.2320416420698166, 0.3460501432418823, -0.2813090980052948, 0.28967738151550293, 0.9208429455757141, -0.4401549696922302, -0.10413717478513718, -0.6352378129959106, -0.3165089786052704, -0.5268353819847107, 0.5627434253692627, -0.4210284948348999, -0.9440728425979614, 0.17858953773975372, -0.06157955899834633, -0.03626258298754692, 0.5161448121070862, 0.5365835428237915, -0.3980559706687927, 0.8553112745285034, 0.5243775248527527, -0.4307844042778015, 0.5343794822692871, -0.3563452661037445, 0.1951095014810562, -0.8578270077705383, -0.21095623075962067, -0.5620343685150146, -0.4012550115585327, -0.5044342875480652, -0.5135515928268433, 0.17346495389938354, 0.44866740703582764, -0.1651255339384079, 0.6856682300567627, -0.8057437539100647, 0.2363283783197403, 0.8845346570014954, 0.06975249201059341, -0.07424458116292953, 0.15605196356773376, -0.14780905842781067, -0.17621155083179474, -0.7538115382194519, -0.40292781591415405, 1.0620192289352417, 0.5812696814537048, 0.7045890688896179, -0.04879734292626381, 0.8771488070487976, 0.24786877632141113, -0.17869621515274048, -0.7139062285423279, 0.315402626991272, -0.3137504756450653, -0.7297672033309937, -0.463742733001709, -0.3058663010597229, -0.8589251041412354, 0.24205440282821655, -0.22160977125167847, -0.8594696521759033, 0.006854001898318529, 0.39125746488571167, -0.33870601654052734, 0.12148363143205643, -0.6149830222129822, 0.6611064076423645, -0.22794605791568756, -0.28359147906303406, -0.4049089848995209, -0.7456167936325073, 0.15347625315189362, -0.12592273950576782, 0.06944713741540909, -0.32231926918029785, 0.44483083486557007, 0.8544384837150574, -0.2608756721019745, 0.7654315829277039, -0.528589129447937, 0.04177185893058777, 0.41291478276252747, -0.2274695783853531, 0.49920815229415894, 0.09704997390508652, -0.0036718056071549654, 0.706389844417572, 0.3416271507740021, -0.2923021614551544, -0.3718724548816681, 0.7508569955825806, -0.8241896033287048, -0.46992114186286926, -0.4133527874946594, -0.23745104670524597, -0.3037794232368469, 0.04783060401678085, 0.421882688999176, 0.3973692059516907, -0.14800631999969482, 0.392477422952652, 0.6802619695663452, 0.07619808614253998, 0.5185588598251343, 0.4213964343070984, 0.07307487726211548, -0.31541702151298523, 0.8433988690376282, 0.2137533277273178, 0.05869070068001747, 0.4032725393772125, 0.3034125566482544, -0.5668516755104065, -0.5512356758117676, -0.32546505331993103, -0.057136572897434235, -0.46533676981925964, -0.14609244465827942, -0.6580130457878113, -0.4630756080150604, -0.5172070860862732, 0.44467952847480774, -0.8004182577133179, -0.5857226252555847, -0.8026025891304016, -0.14144563674926758, 0.4093911051750183, 0.4290277659893036, -0.41409528255462646, 0.4220689535140991, -0.6567499041557312, 0.5770624876022339, 0.44706976413726807, 0.022774921730160713, -0.027214210480451584, -0.8249297142028809, -0.2096690833568573, 0.2806086838245392, -0.3508607745170593, -0.6963695287704468, 0.24854187667369843, 0.38720187544822693, 0.6824840307235718, 0.38689836859703064, 0.17128115892410278, 0.8723105788230896, -0.6876198053359985, 0.8403578400611877, 0.3971218466758728, -1.2150108814239502, 0.8466042280197144, 0.06048369035124779, 0.34776437282562256, 0.7436227202415466, 0.5208457112312317, -0.1272934079170227, -0.3333134949207306, -0.47534608840942383, -0.9407103061676025, 0.8298068046569824, 0.3117906451225281, 0.14567424356937408, 0.2330772876739502, 0.11420468986034393, 0.14341287314891815, 0.2062411904335022, -0.6499751806259155, -0.578251838684082, -0.43165358901023865, -0.20748895406723022, -0.2413887232542038, -0.43187791109085083, -0.019801637157797813, -0.7402344942092896, 0.8741278052330017, 0.24469393491744995, 0.09836696833372116, 0.05370274558663368, -0.11461078375577927, 0.315190851688385, 0.21274518966674805, 0.39470288157463074, 0.4333203434944153, -0.32722997665405273, 0.21006807684898376, 0.18545371294021606, -0.6064727306365967, 0.18481971323490143, 0.35931912064552307, 0.13756263256072998, 0.17540009319782257, 0.21276335418224335, 1.183083176612854, 0.17535434663295746, -0.32823193073272705, 0.5220746994018555, -0.07743419706821442, -0.5470324158668518, -0.4345937967300415, 0.14429906010627747, 0.2039109766483307, 0.3889440894126892, 0.5842617154121399, 0.10960930585861206, 0.22509554028511047, -0.378184974193573, 0.27607718110084534, 0.16155803203582764, -0.803805410861969, -0.22312456369400024, 0.9984834790229797, 0.24486367404460907, -0.20838460326194763, 0.5390186309814453, -0.20348086953163147, -0.2630094885826111, 0.13170276582241058, 0.3272106647491455, 0.8731499314308167, -0.495317667722702, 0.024865901097655296, 0.4516579210758209, 0.06675086170434952, -0.1503552496433258, 0.3173118829727173, -0.4780822694301605, -0.3131493330001831, -0.3806082606315613, -0.7418770790100098, -0.00911045540124178, 0.5239372253417969, -0.8079569339752197, 0.15228796005249023, -0.35472559928894043, -0.47969797253608704, 0.33237722516059875, -0.016527172178030014, -0.694096028804779, 0.0046532042324543, 0.1128842756152153, 0.6129544377326965, -0.5815622210502625, 1.4741111993789673, 0.3120741844177246, -0.19457590579986572, -1.02947998046875, -0.08312682062387466, 0.008942916989326477, -0.5751113295555115, 0.8441706299781799, 0.1724768728017807, -0.3220888078212738, 0.125117227435112, -0.435188889503479, -0.8266086578369141, 1.1360448598861694, 0.442214697599411, -1.2134701013565063, 0.251431405544281, 0.001164114917628467, 0.4678868055343628, -0.10818006843328476, -0.06135229766368866, 0.5232323408126831, 0.19913552701473236, 0.08217446506023407, -1.1481001377105713, -0.19832590222358704, -0.13443459570407867, 0.11020584404468536, -0.17096595466136932, -0.4047960638999939, 0.9819961190223694, -0.1974702775478363, -0.3023156523704529, -0.10812155157327652, 0.6848013997077942, 0.323849618434906, 0.19076791405677795, 0.450421005487442, 0.4680297374725342, 0.8812122941017151, -0.15006594359874725, 0.4151197373867035, -0.3579295873641968, 0.33163636922836304, 1.6057460308074951, -0.18562890589237213, 1.0746228694915771, 0.6808868050575256, -0.2908939719200134, 0.268370658159256, 0.5455209016799927, -0.16681241989135742, 0.9791001677513123, 0.46991413831710815, -0.11779540777206421, -0.08641408383846283, 0.1607034057378769, -0.5267136096954346, 0.7356920838356018, 0.18378743529319763, -0.2813470959663391, 0.051801253110170364, 0.2655593454837799, -0.34306541085243225, -0.0935797318816185, -0.205291748046875, 0.7460211515426636, 0.1860484480857849, -0.1854172646999359, 0.8815256357192993, 0.04407590627670288, 0.6822641491889954, -0.6011026501655579, 0.05924464389681816, 0.1792137622833252, 0.14110945165157318, -0.08848569542169571, -0.40027621388435364, 0.18712161481380463, -0.004198723938316107, -0.2525247633457184, -0.36464616656303406, 0.570837676525116, -0.4969747066497803, -0.47388529777526855, 0.4647808372974396, 0.24966147541999817, 0.24339652061462402, -0.3734925091266632, -0.8460044860839844, 0.090998075902462, 0.08540505915880203, -0.17728479206562042, 0.16909478604793549, 0.35010766983032227, 0.26054200530052185, 0.5143852829933167, 0.7083317041397095, 0.15295295417308807, -0.019127191975712776, 0.32180362939834595, 0.7432053089141846, -0.36962467432022095, -0.5871162414550781, -0.7709692120552063, 0.5683712363243103, -0.07162380963563919, -0.15336346626281738, 0.5713757276535034, 0.679105281829834, 0.938570499420166, -0.16575279831886292, 0.7573124170303345, 0.15192270278930664, 0.7340490221977234, -0.3999640643596649, 0.9336945414543152, -0.5209867358207703, 0.08978838473558426, -0.19844424724578857, -0.8230065107345581, -0.04890333488583565, 0.7424827218055725, 0.15029433369636536, -0.05656949803233147, 0.49642202258110046, 0.6729975342750549, -0.09869109839200974, 0.003990039229393005, 0.41710853576660156, 0.17237403988838196, 0.10061655938625336, 0.3335312306880951, 0.7407126426696777, -0.5904911160469055, 0.5218530893325806, -0.41180548071861267, -0.3425804674625397, -0.19860683381557465, -0.6330973505973816, -0.9250538349151611, -1.0022655725479126, -0.5134881138801575, -0.15894931554794312, 0.130005344748497, 0.8137475252151489, 1.174353837966919, -0.8374161124229431, -0.23783282935619354, 0.002184234792366624, -0.31414058804512024, -0.42388179898262024, -0.14143221080303192, 0.31732282042503357, -0.2500569820404053, -0.8611407279968262, 0.65534907579422, 0.2292945683002472, 0.2162971943616867, -0.19783923029899597, -0.12317249178886414, -0.06966328620910645, -0.20687007904052734, 0.5625967979431152, 0.08275453746318817, -0.969323992729187, -0.043324071913957596, -0.43201199173927307, -0.038603316992521286, 0.169483482837677, 0.7030750513076782, -0.6912612915039062, 0.4214557409286499, 0.2546369433403015, 0.21627773344516754, 1.0889720916748047, -0.2646240293979645, 0.2258816808462143, -1.0457377433776855, 0.4061627984046936, 0.3380730450153351, 0.33300983905792236, 0.2146097868680954, -0.13556429743766785, 0.13593174517154694, -0.03415093570947647, -0.5188496112823486, -0.7314901351928711, 0.16122816503047943, -1.2861220836639404, -0.46646642684936523, 0.9757274389266968, -0.10309096425771713, -0.07262936234474182, -0.09688406437635422, -0.4009855091571808, 0.7059362530708313, -0.6617366671562195, 0.6434369683265686, 0.6256850361824036, -0.19183161854743958, -0.08225549757480621, -0.6243811845779419, 0.7101097702980042, 0.14186322689056396, -0.29110461473464966, 0.20616763830184937, 0.28527453541755676, 0.4165453314781189, 0.06194803863763809, 0.5702256560325623, -0.014074564911425114, -0.12014484405517578, 0.01897086761891842, 0.07813055068254471, -0.4370141625404358, -0.43352529406547546, -0.38067004084587097, 0.09650236368179321, -0.00961222592741251, -0.7066304087638855 ]
microsoft/deberta-large-mnli
microsoft
"2021-05-21T20:07:51Z"
677,453
8
transformers
[ "transformers", "pytorch", "deberta", "text-classification", "deberta-v1", "deberta-mnli", "en", "arxiv:2006.03654", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: en tags: - deberta-v1 - deberta-mnli tasks: mnli thumbnail: https://huggingface.co/front/thumbnails/microsoft.png license: mit widget: - text: "[CLS] I love you. [SEP] I like you. [SEP]" --- ## DeBERTa: Decoding-enhanced BERT with Disentangled Attention [DeBERTa](https://arxiv.org/abs/2006.03654) improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. It outperforms BERT and RoBERTa on majority of NLU tasks with 80GB training data. Please check the [official repository](https://github.com/microsoft/DeBERTa) for more details and updates. This is the DeBERTa large model fine-tuned with MNLI task. #### Fine-tuning on NLU tasks We present the dev results on SQuAD 1.1/2.0 and several GLUE benchmark tasks. | Model | SQuAD 1.1 | SQuAD 2.0 | MNLI-m/mm | SST-2 | QNLI | CoLA | RTE | MRPC | QQP |STS-B | |---------------------------|-----------|-----------|-------------|-------|------|------|--------|-------|-------|------| | | F1/EM | F1/EM | Acc | Acc | Acc | MCC | Acc |Acc/F1 |Acc/F1 |P/S | | BERT-Large | 90.9/84.1 | 81.8/79.0 | 86.6/- | 93.2 | 92.3 | 60.6 | 70.4 | 88.0/- | 91.3/- |90.0/- | | RoBERTa-Large | 94.6/88.9 | 89.4/86.5 | 90.2/- | 96.4 | 93.9 | 68.0 | 86.6 | 90.9/- | 92.2/- |92.4/- | | XLNet-Large | 95.1/89.7 | 90.6/87.9 | 90.8/- | 97.0 | 94.9 | 69.0 | 85.9 | 90.8/- | 92.3/- |92.5/- | | [DeBERTa-Large](https://huggingface.co/microsoft/deberta-large)<sup>1</sup> | 95.5/90.1 | 90.7/88.0 | 91.3/91.1| 96.5|95.3| 69.5| 91.0| 92.6/94.6| 92.3/- |92.8/92.5 | | [DeBERTa-XLarge](https://huggingface.co/microsoft/deberta-xlarge)<sup>1</sup> | -/- | -/- | 91.5/91.2| 97.0 | - | - | 93.1 | 92.1/94.3 | - |92.9/92.7| | [DeBERTa-V2-XLarge](https://huggingface.co/microsoft/deberta-v2-xlarge)<sup>1</sup>|95.8/90.8| 91.4/88.9|91.7/91.6| **97.5**| 95.8|71.1|**93.9**|92.0/94.2|92.3/89.8|92.9/92.9| |**[DeBERTa-V2-XXLarge](https://huggingface.co/microsoft/deberta-v2-xxlarge)<sup>1,2</sup>**|**96.1/91.4**|**92.2/89.7**|**91.7/91.9**|97.2|**96.0**|**72.0**| 93.5| **93.1/94.9**|**92.7/90.3** |**93.2/93.1** | -------- #### Notes. - <sup>1</sup> Following RoBERTa, for RTE, MRPC, STS-B, we fine-tune the tasks based on [DeBERTa-Large-MNLI](https://huggingface.co/microsoft/deberta-large-mnli), [DeBERTa-XLarge-MNLI](https://huggingface.co/microsoft/deberta-xlarge-mnli), [DeBERTa-V2-XLarge-MNLI](https://huggingface.co/microsoft/deberta-v2-xlarge-mnli), [DeBERTa-V2-XXLarge-MNLI](https://huggingface.co/microsoft/deberta-v2-xxlarge-mnli). The results of SST-2/QQP/QNLI/SQuADv2 will also be slightly improved when start from MNLI fine-tuned models, however, we only report the numbers fine-tuned from pretrained base models for those 4 tasks. - <sup>2</sup> To try the **XXLarge** model with **[HF transformers](https://huggingface.co/transformers/main_classes/trainer.html)**, you need to specify **--sharded_ddp** ```bash cd transformers/examples/text-classification/ export TASK_NAME=mrpc python -m torch.distributed.launch --nproc_per_node=8 run_glue.py --model_name_or_path microsoft/deberta-v2-xxlarge \\ --task_name $TASK_NAME --do_train --do_eval --max_seq_length 128 --per_device_train_batch_size 4 \\ --learning_rate 3e-6 --num_train_epochs 3 --output_dir /tmp/$TASK_NAME/ --overwrite_output_dir --sharded_ddp --fp16 ``` ### Citation If you find DeBERTa useful for your work, please cite the following paper: ``` latex @inproceedings{ he2021deberta, title={DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION}, author={Pengcheng He and Xiaodong Liu and Jianfeng Gao and Weizhu Chen}, booktitle={International Conference on Learning Representations}, year={2021}, url={https://openreview.net/forum?id=XPZIaotutsD} } ```
[ -0.48893800377845764, -0.669523298740387, 0.3003804683685303, 0.499324232339859, -0.19305868446826935, 0.18893900513648987, -0.007742555346339941, -0.6904555559158325, 0.31397300958633423, 0.19349026679992676, -0.8851794004440308, -0.3692261278629303, -0.9873135089874268, -0.07271445542573929, -0.013152161613106728, 0.9272386431694031, -0.06938920170068741, -0.20964489877223969, -0.14385664463043213, -0.20014117658138275, -0.6178183555603027, -0.4949215352535248, -0.5604389309883118, -0.4691261053085327, 0.33394044637680054, 0.3500104248523712, 0.7261291146278381, 0.1420097053050995, 0.5291286110877991, 0.36583349108695984, -0.458048552274704, 0.3946656286716461, -0.5496902465820312, -0.07051979750394821, 0.15040387213230133, -0.36442479491233826, -0.9978751540184021, 0.10151811689138412, 0.3784015476703644, 0.3969808518886566, 0.2423614263534546, 0.3670584261417389, 0.4239945411682129, 1.1261066198349, -0.5289797782897949, 0.13716885447502136, -0.5156674385070801, 0.08001675456762314, 0.13908253610134125, -0.0455951988697052, -0.2184785008430481, -0.04463681951165199, 0.07245185971260071, -0.423561155796051, 0.02281010150909424, -0.1871739774942398, 1.344099521636963, 0.5743089914321899, -0.14588701725006104, -0.11480650305747986, -0.4604509770870209, 1.2293591499328613, -0.7951492071151733, 0.37592366337776184, 0.36006325483322144, 0.04276987910270691, -0.22460439801216125, -0.43979424238204956, -0.4146808385848999, -0.18261082470417023, -0.22206197679042816, 0.3208675682544708, -0.8075138330459595, -0.14760421216487885, 0.44739478826522827, 0.16557271778583527, -0.7393335103988647, 0.20473751425743103, -0.37066584825515747, 0.014839333482086658, 0.7891061305999756, 0.08986753970384598, 0.20112504065036774, 0.10549962520599365, -0.5326322317123413, -0.14383894205093384, -0.616066575050354, 0.2448219358921051, 0.14029690623283386, 0.018181871622800827, -0.3395012617111206, 0.27961090207099915, -0.2711930572986603, 0.9777367115020752, 0.43082883954048157, -0.021526750177145004, 0.7776199579238892, -0.20149610936641693, -0.4946366846561432, 0.017365936189889908, 0.7068883776664734, 0.3565267324447632, -0.02741890400648117, -0.0994119644165039, -0.23049956560134888, 0.05116691812872887, 0.08859577775001526, -1.0417202711105347, -0.4582793116569519, 0.5911647081375122, -0.6492586731910706, -0.26928049325942993, -0.058112919330596924, -0.580101728439331, -0.00621987646445632, -0.660718560218811, 0.41231709718704224, -0.6004788875579834, -0.35114437341690063, 0.051201749593019485, -0.054541487246751785, 0.07013095915317535, 0.5342050790786743, -0.9238488078117371, 0.002886449685320258, 0.5101826786994934, 0.7936973571777344, -0.09834270179271698, -0.1949235051870346, -0.656115710735321, -0.21438439190387726, -0.06636172533035278, 0.29211220145225525, -0.19342653453350067, 0.11793545633554459, -0.19063310325145721, 0.1898484081029892, -0.3562704026699066, -0.38885900378227234, 0.20800606906414032, -0.5703750848770142, -0.04614711180329323, -0.41823866963386536, -0.40471139550209045, -0.28899121284484863, 0.4260990023612976, -0.5724872350692749, 1.1764028072357178, 0.4496125876903534, -0.9676339030265808, 0.19816064834594727, -0.634563684463501, -0.10238581150770187, -0.24695205688476562, -0.008295738138258457, -0.5747687220573425, -0.08856499195098877, 0.26678580045700073, 0.6528361439704895, -0.08041393011808395, -0.041916873306035995, -0.2514461874961853, -0.4745437800884247, 0.08945608884096146, -0.11074667423963547, 1.3745079040527344, 0.387444406747818, -0.9718937873840332, 0.056573234498500824, -0.9812108874320984, 0.2503911852836609, 0.24616549909114838, -0.3112301230430603, -0.1864916980266571, -0.21588751673698425, 0.06818010658025742, 0.5972874760627747, 0.6431711316108704, -0.6387647390365601, 0.32946905493736267, -0.4315902292728424, 0.6515897512435913, 0.6288002729415894, -0.3317548334598541, 0.23119723796844482, -0.2511262893676758, 0.4375931918621063, 0.4553696811199188, 0.4326219856739044, 0.28866615891456604, -0.6560704708099365, -0.8178862929344177, -0.6516706347465515, 0.4001420736312866, 0.7689295411109924, -0.6664698719978333, 0.7958875894546509, -0.12417177110910416, -0.6783289313316345, -0.580072283744812, 0.27450042963027954, 0.6239933967590332, 0.31094446778297424, 0.5398247241973877, -0.04884925112128258, -0.5961431264877319, -1.2222713232040405, 0.08587929606437683, 0.02198205515742302, -0.007085847668349743, 0.19270960986614227, 0.7701407074928284, -0.3549826443195343, 0.9206957221031189, -0.5193484425544739, -0.5090610384941101, -0.1839228719472885, 0.04848180338740349, 0.49692490696907043, 0.8194392919540405, 1.1180084943771362, -0.8120092153549194, -0.7041025757789612, -0.22540397942066193, -0.7099235653877258, 0.2473839968442917, 0.0032158128451555967, -0.29165276885032654, 0.6375488638877869, 0.27666395902633667, -0.6725466251373291, 0.5324496626853943, 0.7815617918968201, -0.5278692245483398, 0.2635817527770996, -0.36020714044570923, 0.2177009880542755, -1.1126970052719116, 0.261429101228714, -0.04274623468518257, -0.29748523235321045, -0.5907225012779236, -0.09215980023145676, 0.17179067432880402, 0.3298257887363434, -0.3617507219314575, 0.3728657364845276, -0.6842390894889832, 0.09744450449943542, -0.23576971888542175, 0.258287638425827, 0.1311279535293579, 0.8994634747505188, -0.07239911705255508, 0.7192415595054626, 0.598909854888916, -0.5003814101219177, 0.28740158677101135, 0.5909935235977173, -0.3534261882305145, 0.4708017408847809, -0.9353203773498535, 0.2042485475540161, -0.21264846622943878, 0.21259188652038574, -1.1670600175857544, 0.13920091092586517, 0.3727184534072876, -0.5471736192703247, 0.6382688283920288, -0.14572186768054962, -0.5770711302757263, -0.5792675614356995, -0.396546334028244, 0.001985295210033655, 0.8049951791763306, -0.7431322932243347, 0.26683011651039124, 0.4064908027648926, 0.13299089670181274, -0.7734623551368713, -0.8680562973022461, -0.1319878250360489, -0.22439874708652496, -0.9105461835861206, 0.77158123254776, -0.22246049344539642, -0.11727017909288406, -0.08620617538690567, -0.07072664052248001, -0.2214391529560089, 0.33370113372802734, 0.38842788338661194, 0.4932810366153717, -0.08079801499843597, -0.049209244549274445, 0.09204422682523727, 0.03795163333415985, -0.1625494658946991, 0.021510129794478416, 0.5691925883293152, -0.33019623160362244, -0.054495759308338165, -0.4284760355949402, 0.2802480161190033, 0.6843301057815552, -0.41568201780319214, 0.8760876059532166, 1.007483959197998, -0.30478140711784363, 0.04218044877052307, -0.5649398565292358, -0.21528784930706024, -0.49702709913253784, 0.27553698420524597, -0.47673502564430237, -0.8561407327651978, 0.7214413285255432, 0.2404753863811493, 0.30770739912986755, 0.7015406489372253, 0.6469469666481018, -0.12141387909650803, 1.3022470474243164, 0.6986643671989441, -0.37713903188705444, 0.6188230514526367, -0.8132056593894958, -0.031109588220715523, -1.0886279344558716, -0.23957964777946472, -0.48640117049217224, -0.7405744194984436, -0.5566425323486328, -0.25926971435546875, 0.2173636555671692, 0.49032580852508545, -0.35787221789360046, 0.8439699411392212, -1.1525999307632446, 0.01836729422211647, 0.7949607968330383, 0.548568844795227, -0.013630414381623268, 0.07981396466493607, 0.16929179430007935, -0.11543259769678116, -0.8039444088935852, -0.4319271147251129, 0.8396430611610413, 0.42013028264045715, 0.5454149842262268, 0.2097328007221222, 0.9189934134483337, 0.15724188089370728, -0.08545617014169693, -0.3522510528564453, 0.4516855478286743, -0.16593171656131744, -0.6137816905975342, -0.2096722573041916, -0.3862811028957367, -1.231030821800232, 0.23854291439056396, -0.15727324783802032, -1.244443655014038, 0.4517166316509247, 0.43763336539268494, -0.5127395987510681, 0.19322894513607025, -0.569218635559082, 1.0005816221237183, -0.15172886848449707, -0.4067845046520233, -0.31572088599205017, -0.7217613458633423, 0.25470638275146484, 0.24816982448101044, -0.17816609144210815, -0.3137512505054474, 0.0715201273560524, 0.885547935962677, -0.329271525144577, 0.8444120287895203, -0.40860798954963684, -0.3349723517894745, 0.40471503138542175, -0.04324398934841156, 0.7842322587966919, -0.04799235984683037, -0.032360151410102844, 0.25599566102027893, 0.3261673152446747, -0.4717392921447754, -0.5159009695053101, 0.8858502507209778, -0.9175039529800415, -0.3717738687992096, -0.47140568494796753, -0.6207365393638611, -0.2752920687198639, -0.019428476691246033, 0.3609522879123688, 0.48155561089515686, 0.06008785218000412, 0.24562348425388336, 0.9054632186889648, -0.14572148025035858, 0.5301222801208496, 0.5570464134216309, 0.17969194054603577, -0.168415829539299, 0.8866049647331238, 0.12485769391059875, 0.07771678268909454, 0.5235255360603333, -0.32658085227012634, -0.3375711143016815, -0.5651028156280518, -0.556437611579895, 0.10271260887384415, -0.5718704462051392, -0.42966169118881226, -0.7553586959838867, -0.10003551840782166, -0.3770256042480469, 0.07805780321359634, -0.42564353346824646, -0.6118484735488892, -0.7773301601409912, 0.30573201179504395, 0.7122050523757935, 0.5776729583740234, -0.03454282879829407, 0.14132222533226013, -0.9760187864303589, 0.17358523607254028, 0.1145203486084938, 0.24904686212539673, 0.009884783066809177, -0.6014444828033447, -0.26950109004974365, 0.36602744460105896, -0.6340923309326172, -0.8688483834266663, 0.47075244784355164, 0.021709589287638664, 0.6519336104393005, 0.02024647407233715, 0.10020843893289566, 0.6950808167457581, -0.4380011260509491, 0.8459881544113159, 0.37238171696662903, -0.8784510493278503, 0.7552260160446167, -0.2713165879249573, 0.30225712060928345, 0.6396861672401428, 0.4911730885505676, -0.02487797848880291, -0.3184654712677002, -0.8593694567680359, -0.8075788021087646, 1.0571930408477783, 0.5458282232284546, -0.14082609117031097, 0.12311043590307236, 0.17361488938331604, -0.22259362041950226, 0.23504605889320374, -0.4158424735069275, -0.4854494631290436, -0.17580930888652802, -0.31788313388824463, -0.06465297937393188, -0.34062808752059937, -0.10952587425708771, -0.5136899352073669, 0.97853684425354, -0.028648359701037407, 0.5873982906341553, 0.5280207395553589, -0.28348666429519653, -0.012677918188273907, -0.0048882802948355675, 0.9166895151138306, 0.9122500419616699, -0.4445090591907501, -0.2474539428949356, 0.23313122987747192, -0.4434721767902374, -0.021699266508221626, 0.22811539471149445, 0.022700803354382515, 0.2091698944568634, 0.2737419605255127, 1.031071424484253, 0.05905253812670708, -0.5629355907440186, 0.408086895942688, 0.0767812505364418, -0.46437379717826843, -0.24678285419940948, -0.010614068247377872, -0.02093479409813881, 0.6339664459228516, 0.2985229790210724, 0.157104954123497, 0.18241964280605316, -0.4073222577571869, 0.19227346777915955, 0.6988694071769714, -0.600645899772644, -0.3147036135196686, 0.726304829120636, 0.11144186556339264, 0.025041691958904266, 0.5670539736747742, -0.25329163670539856, -0.7236393690109253, 0.9093259572982788, 0.3752458989620209, 0.8576503396034241, -0.16643039882183075, 0.059067465364933014, 0.7520175576210022, 0.3575049042701721, 0.11138440668582916, 0.6157214045524597, 0.07556658983230591, -0.3560720384120941, -0.3099640905857086, -0.7264469861984253, 0.0001324244512943551, 0.3225809931755066, -0.7161450386047363, 0.05372215434908867, -0.1514538824558258, -0.3751765787601471, 0.20266707241535187, 0.40329188108444214, -0.9287905693054199, 0.196875661611557, 0.12968754768371582, 1.037868857383728, -0.5683047771453857, 0.9051063656806946, 0.7735680937767029, -0.4626624584197998, -0.701723575592041, -0.3058321475982666, -0.1475541591644287, -0.8899643421173096, 1.1369881629943848, 0.2018166184425354, 0.10715607553720474, 0.002105486113578081, -0.4057054817676544, -1.0401310920715332, 1.339380145072937, 0.36285993456840515, -1.0019944906234741, -0.05946452543139458, -0.011203709989786148, 0.48277345299720764, -0.2538960576057434, 0.2709983289241791, 0.5938367247581482, 0.5217881798744202, -0.0674123764038086, -1.1976691484451294, 0.4013219475746155, -0.35055530071258545, 0.11077562719583511, 0.24547697603702545, -0.9973556399345398, 1.1404072046279907, -0.14940188825130463, 0.21333284676074982, 0.1740541011095047, 0.6370831727981567, 0.2815079092979431, 0.08452806621789932, 0.6409563422203064, 0.7201361060142517, 0.6337922811508179, -0.2005675733089447, 0.9571632146835327, -0.5273703336715698, 0.6846482157707214, 0.974459171295166, 0.17699815332889557, 0.7442050576210022, 0.5027750730514526, -0.49128177762031555, 0.4647971987724304, 0.7136975526809692, -0.20698769390583038, 0.47061967849731445, 0.1852206289768219, 0.09147923439741135, -0.25930139422416687, 0.36596232652664185, -0.5141359567642212, 0.48108237981796265, 0.13126155734062195, -0.5517420172691345, -0.20129509270191193, 0.08950499445199966, 0.07611946016550064, -0.1691536158323288, -0.29495692253112793, 0.6838981509208679, -0.03705570474267006, -0.7727934122085571, 1.2105708122253418, -0.23472242057323456, 0.8977211713790894, -0.5369751453399658, -0.1409124881029129, -0.04918881878256798, 0.5633525252342224, -0.3671751022338867, -0.7893050312995911, 0.2562201917171478, -0.1023411750793457, -0.3592664301395416, -0.09721722453832626, 0.6975788474082947, -0.4127402901649475, -0.44515344500541687, 0.39928290247917175, 0.3772994875907898, 0.16050085425376892, -0.3427686393260956, -1.281034231185913, 0.40087711811065674, 0.2736433148384094, -0.5611215233802795, 0.5385502576828003, 0.14935529232025146, 0.18426764011383057, 0.5157741904258728, 0.2265908122062683, -0.44536715745925903, 0.003856603754684329, -0.26096343994140625, 1.0506670475006104, -0.3251531720161438, -0.28580427169799805, -0.9262520670890808, 0.6796965599060059, -0.2425278276205063, -0.42246049642562866, 0.9874797463417053, 0.5094267129898071, 0.5312279462814331, -0.2875419855117798, 0.5517951846122742, -0.44788774847984314, 0.3596861660480499, -0.5110580921173096, 0.8349077105522156, -1.0044853687286377, -0.14720763266086578, -0.5004545450210571, -1.0004782676696777, 0.05236193165183067, 0.76474529504776, -0.027580626308918, 0.12774430215358734, 0.22909760475158691, 0.714510440826416, -0.1274813860654831, -0.25369322299957275, 0.16602715849876404, 0.19421932101249695, 0.25063079595565796, 1.0909628868103027, 0.5276488661766052, -0.862103283405304, 0.5169468522071838, -0.5322732925415039, -0.46220695972442627, -0.4313789904117584, -0.8228718042373657, -1.190438151359558, -0.798821747303009, -0.7480318546295166, -0.5597261190414429, -0.058093804866075516, 0.9662860035896301, 1.0074241161346436, -0.9151362180709839, 0.22400599718093872, -0.18457941710948944, -0.11774338781833649, -0.5396325588226318, -0.24263109266757965, 0.5811757445335388, -0.4565872848033905, -1.1222542524337769, 0.3238300681114197, -0.13052041828632355, 0.34194961190223694, -0.14070677757263184, -0.25197097659111023, -0.34195420145988464, -0.06051516905426979, 0.8386713862419128, 0.2541801631450653, -0.6994519233703613, -0.20778383314609528, 0.08876823633909225, -0.16673292219638824, 0.09551122039556503, 0.1344616860151291, -0.7649649381637573, 0.0543123297393322, 0.6137275099754333, 0.2381143867969513, 0.6233753561973572, -0.2463589459657669, 0.17597731947898865, -0.8122127056121826, 0.45687466859817505, 0.23095200955867767, 0.4519851803779602, 0.05757446214556694, -0.5119228959083557, 0.6472747325897217, -0.15452615916728973, -0.6558586955070496, -0.9622515439987183, 0.10659552365541458, -1.5328212976455688, -0.3490004241466522, 1.048132061958313, -0.3413795828819275, -0.295341432094574, 0.1254332959651947, -0.39157405495643616, 0.16214939951896667, -0.4219818413257599, 0.7658650875091553, 0.5493011474609375, -0.2537251114845276, 0.03893616050481796, -0.5428539514541626, 0.7947402000427246, 0.5808780193328857, -0.6102328300476074, 0.02765541523694992, 0.3456011116504669, 0.2823697626590729, 0.5980123281478882, 0.6150911450386047, -0.035428114235401154, 0.396376371383667, -0.15083973109722137, -0.004645408131182194, -0.37421828508377075, -0.24562755227088928, -0.1730899214744568, -0.21223588287830353, -0.12644724547863007, -0.6278980374336243 ]
Helsinki-NLP/opus-mt-es-en
Helsinki-NLP
"2023-08-16T11:32:34Z"
648,591
38
transformers
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "es", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- language: - es - en tags: - translation license: apache-2.0 --- ### spa-eng * source group: Spanish * target group: English * OPUS readme: [spa-eng](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/spa-eng/README.md) * model: transformer * source language(s): spa * target language(s): eng * model: transformer * pre-processing: normalization + SentencePiece (spm32k,spm32k) * download original weights: [opus-2020-08-18.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/spa-eng/opus-2020-08-18.zip) * test set translations: [opus-2020-08-18.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/spa-eng/opus-2020-08-18.test.txt) * test set scores: [opus-2020-08-18.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/spa-eng/opus-2020-08-18.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | newssyscomb2009-spaeng.spa.eng | 30.6 | 0.570 | | news-test2008-spaeng.spa.eng | 27.9 | 0.553 | | newstest2009-spaeng.spa.eng | 30.4 | 0.572 | | newstest2010-spaeng.spa.eng | 36.1 | 0.614 | | newstest2011-spaeng.spa.eng | 34.2 | 0.599 | | newstest2012-spaeng.spa.eng | 37.9 | 0.624 | | newstest2013-spaeng.spa.eng | 35.3 | 0.609 | | Tatoeba-test.spa.eng | 59.6 | 0.739 | ### System Info: - hf_name: spa-eng - source_languages: spa - target_languages: eng - opus_readme_url: https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/spa-eng/README.md - original_repo: Tatoeba-Challenge - tags: ['translation'] - languages: ['es', 'en'] - src_constituents: {'spa'} - tgt_constituents: {'eng'} - src_multilingual: False - tgt_multilingual: False - prepro: normalization + SentencePiece (spm32k,spm32k) - url_model: https://object.pouta.csc.fi/Tatoeba-MT-models/spa-eng/opus-2020-08-18.zip - url_test_set: https://object.pouta.csc.fi/Tatoeba-MT-models/spa-eng/opus-2020-08-18.test.txt - src_alpha3: spa - tgt_alpha3: eng - short_pair: es-en - chrF2_score: 0.7390000000000001 - bleu: 59.6 - brevity_penalty: 0.9740000000000001 - ref_len: 79376.0 - src_name: Spanish - tgt_name: English - train_date: 2020-08-18 00:00:00 - src_alpha2: es - tgt_alpha2: en - prefer_old: False - long_pair: spa-eng - helsinki_git_sha: d2f0910c89026c34a44e331e785dec1e0faa7b82 - transformers_git_sha: f7af09b4524b784d67ae8526f0e2fcc6f5ed0de9 - port_machine: brutasse - port_time: 2020-08-24-18:20
[ -0.500805675983429, -0.7102811336517334, 0.2965262830257416, 0.5051756501197815, -0.3690307140350342, -0.26492682099342346, -0.29639774560928345, -0.42222854495048523, 0.2770327031612396, 0.32663771510124207, -0.6765164136886597, -0.8469240665435791, -0.6623366475105286, 0.39678555727005005, -0.07877182960510254, 1.0364609956741333, -0.1285402476787567, 0.14435458183288574, 0.5525090098381042, -0.42952486872673035, -0.5038506388664246, -0.23679158091545105, -0.780424952507019, -0.32154086232185364, 0.47253990173339844, 0.26214146614074707, 0.49101823568344116, 0.4561465382575989, 0.5258952975273132, 0.34870970249176025, -0.4654977321624756, 0.34307825565338135, -0.18672418594360352, -0.17279396951198578, -0.10876653343439102, -0.49602484703063965, -0.5994166135787964, -0.2721988260746002, 0.9664487242698669, 0.6252728700637817, 0.17706093192100525, 0.46422481536865234, -0.0724133849143982, 0.7957481145858765, -0.16355657577514648, 0.09531233459711075, -0.538857102394104, -0.07025180011987686, -0.3612312078475952, -0.42474934458732605, -0.5857045650482178, -0.26560571789741516, 0.14002351462841034, -0.5944164395332336, 0.17205564677715302, 0.15909133851528168, 1.7943583726882935, 0.09715825319290161, -0.40327420830726624, -0.14026431739330292, -0.40739110112190247, 0.7802304029464722, -0.8204463720321655, 0.41277334094047546, 0.4947046637535095, -0.15551160275936127, -0.1735004186630249, -0.39124438166618347, -0.3013280928134918, -0.002315546153113246, -0.3177558183670044, 0.20459038019180298, -0.3071571886539459, -0.22824320197105408, 0.20934852957725525, 0.5614485144615173, -0.7591599225997925, 0.0931876078248024, -0.4007178246974945, -0.14084206521511078, 0.5024403929710388, 0.11313337832689285, 0.31798070669174194, -0.5115222334861755, -0.43582406640052795, -0.39929676055908203, -0.617069661617279, 0.20383256673812866, 0.4552704691886902, 0.40234193205833435, -0.48860424757003784, 0.6947173476219177, -0.11892449855804443, 0.6270636320114136, 0.075313039124012, -0.03632011637091637, 0.7631815671920776, -0.695635199546814, -0.15474829077720642, -0.23310239613056183, 1.3414418697357178, 0.25281912088394165, -0.009602847509086132, 0.03497035801410675, -0.3288685381412506, -0.29054078459739685, -0.09552830457687378, -0.8961174488067627, 0.18871618807315826, 0.2541716694831848, -0.2862199544906616, -0.20937055349349976, 0.12762124836444855, -0.8830801844596863, 0.1380840241909027, 0.09404347091913223, 0.5661026239395142, -0.8631480932235718, -0.35253605246543884, 0.48053061962127686, -0.0319487527012825, 0.24019969999790192, 0.006741858087480068, -0.4467914402484894, 0.26956668496131897, 0.3676251769065857, 1.0725771188735962, -0.16052231192588806, -0.4901670515537262, -0.24578571319580078, 0.08689025044441223, -0.18470188975334167, 0.7815557718276978, -0.08175304532051086, -0.5062082409858704, -0.18063685297966003, 0.4655477702617645, -0.21322761476039886, -0.2053307145833969, 0.8778212070465088, -0.2765990197658539, 0.6683911681175232, -0.3688381612300873, -0.5508815050125122, -0.3759211003780365, 0.34412333369255066, -0.8999165892601013, 1.4623405933380127, 0.23116295039653778, -0.9449553489685059, 0.38582974672317505, -0.9646958708763123, -0.24377714097499847, -0.09990959614515305, 0.19439488649368286, -0.797777533531189, -0.029180003330111504, 0.2568341791629791, 0.38490030169487, -0.4170723259449005, 0.4945046901702881, 0.00867992453277111, -0.35333049297332764, 0.11788122355937958, -0.37682995200157166, 1.3259330987930298, 0.22356703877449036, -0.6542099118232727, 0.0323391854763031, -0.804943323135376, -0.04954396188259125, 0.3670508563518524, -0.43281835317611694, -0.2304619699716568, -0.16025717556476593, 0.24440521001815796, 0.1313752382993698, 0.28082022070884705, -0.5446909666061401, 0.3409101068973541, -0.805056095123291, 0.2586685121059418, 0.8302384614944458, 0.22468651831150055, 0.31706538796424866, -0.47263962030410767, 0.37461844086647034, 0.24281111359596252, 0.05788196995854378, 0.11397486180067062, -0.5955939888954163, -0.8434693217277527, -0.3236411213874817, 0.6072696447372437, 0.6974949240684509, -0.7365416288375854, 0.9711670279502869, -0.778393030166626, -0.871486246585846, -0.7561836242675781, -0.22031714022159576, 0.5894718170166016, 0.26404717564582825, 0.5648640990257263, -0.22618389129638672, -0.4971787929534912, -1.0260510444641113, -0.2330145388841629, -0.20072653889656067, 0.06366526335477829, 0.2423800379037857, 0.9027661681175232, -0.02926163375377655, 0.6426935791969299, -0.4053635895252228, -0.5588390827178955, -0.26559481024742126, 0.2078491896390915, 0.5647851824760437, 0.7353917956352234, 0.8213698863983154, -0.8993663191795349, -0.6017024517059326, 0.11791437864303589, -0.6317965984344482, -0.16307847201824188, -0.038319870829582214, -0.1849786788225174, 0.46754398941993713, -0.08046771585941315, -0.6325473189353943, 0.3293052911758423, 0.6100426316261292, -1.0235917568206787, 0.4980708062648773, -0.25625061988830566, 0.5103505253791809, -1.52567458152771, 0.22805911302566528, 0.03501422703266144, -0.06442531198263168, -0.4411342442035675, -0.04639292508363724, 0.01365419290959835, 0.15462543070316315, -0.6373357772827148, 0.8988780975341797, -0.7127736806869507, -0.06598781049251556, 0.36968743801116943, 0.0753260999917984, 0.08358419686555862, 0.8177756667137146, -0.07698138058185577, 1.1000529527664185, 0.6117299199104309, -0.47731226682662964, 0.006280391477048397, 0.37635743618011475, -0.45132920145988464, 0.26733675599098206, -0.7338367700576782, -0.24240009486675262, 0.3353462815284729, 0.007307293824851513, -0.7841290235519409, -0.07347504049539566, 0.2422005534172058, -0.8073620796203613, 0.2952938675880432, -0.1656961739063263, -0.7705956697463989, -0.23278707265853882, -0.40420541167259216, 0.41707247495651245, 0.3887357711791992, -0.18982979655265808, 0.7812332510948181, 0.1886337399482727, -0.022191498428583145, -0.6748061776161194, -0.89653480052948, -0.052489474415779114, -0.2434973418712616, -0.7223555445671082, 0.3927415609359741, -0.12877383828163147, 0.07172075659036636, 0.27156707644462585, -0.0010475546587258577, -0.19779497385025024, 0.160464346408844, 0.04759163409471512, 0.3361924886703491, -0.32798147201538086, -0.013204599730670452, 0.016021668910980225, -0.14448024332523346, -0.24751004576683044, -0.18012484908103943, 0.9063420295715332, -0.5239627361297607, -0.262325257062912, -0.749768853187561, 0.18026688694953918, 0.5871660709381104, -0.4152959883213043, 1.2065140008926392, 0.6237293481826782, -0.3249061405658722, 0.14808711409568787, -0.6747820377349854, 0.07831492274999619, -0.4415293335914612, 0.42920300364494324, -0.7206264138221741, -0.8110398650169373, 0.9111377000808716, 0.2439725548028946, 0.2550438344478607, 1.0490214824676514, 0.7780328392982483, 0.16319093108177185, 0.7242783308029175, 0.3350328803062439, 0.09456858783960342, 0.6314359903335571, -0.7513896822929382, -0.16207851469516754, -0.7730976939201355, -0.3478696942329407, -0.880203902721405, -0.1093788892030716, -0.8799977898597717, -0.29432937502861023, 0.33841001987457275, -0.0942104309797287, -0.1884308159351349, 0.87376868724823, -0.631047785282135, 0.3628126084804535, 0.6139126420021057, 0.2036069631576538, 0.34724166989326477, -0.06903960555791855, -0.41777822375297546, -0.04206273704767227, -0.5383785367012024, -0.6291115880012512, 1.2235678434371948, 0.3825992941856384, 0.18413177132606506, 0.30286145210266113, 0.751090407371521, 0.17528918385505676, 0.14449545741081238, -0.5884331464767456, 0.6642399430274963, -0.11224472522735596, -0.9585519433021545, -0.4382593035697937, -0.46354368329048157, -1.080597996711731, 0.3974933326244354, -0.2782033681869507, -0.7368266582489014, 0.18616075813770294, -0.1192730963230133, -0.057732030749320984, 0.6848247051239014, -0.8720962405204773, 1.0444695949554443, 0.0015207130927592516, -0.3888092637062073, 0.09601745009422302, -0.5344676971435547, 0.1054462343454361, -0.07595725357532501, 0.30249449610710144, -0.24002717435359955, -0.21605396270751953, 0.9653380513191223, -0.3179897367954254, 0.6137207746505737, -0.14729173481464386, -0.05739282816648483, 0.22378160059452057, 0.21435260772705078, 0.5863762497901917, -0.11719802767038345, -0.3443945348262787, 0.4278969168663025, 0.1346188336610794, -0.600780725479126, -0.21082577109336853, 0.6198175549507141, -0.9289413094520569, -0.4708065092563629, -0.6503456830978394, -0.6248034834861755, -0.04005057364702225, 0.5533701777458191, 0.5730108022689819, 0.533531665802002, -0.12675759196281433, 0.5736978650093079, 0.8182427883148193, -0.28528091311454773, 0.500603199005127, 0.6478099226951599, 0.033997099846601486, -0.6454441547393799, 0.7847093343734741, 0.2879416346549988, 0.17515243589878082, 0.4954802095890045, 0.0639534443616867, -0.27868443727493286, -0.8669438362121582, -0.5376403331756592, 0.5217198133468628, -0.36922240257263184, -0.37239333987236023, -0.6730487942695618, -0.03343460336327553, -0.44295579195022583, 0.11411997675895691, -0.48734113574028015, -0.40713271498680115, -0.19611679017543793, -0.34993791580200195, 0.461381196975708, 0.4367736279964447, 0.04333794489502907, 0.2404824197292328, -0.8980548977851868, 0.1749819666147232, -0.3637859523296356, 0.4980491101741791, -0.36783307790756226, -0.864244282245636, -0.36343830823898315, -0.018708113580942154, -0.27655014395713806, -1.178141474723816, 0.6166163682937622, -0.05134378373622894, 0.40543803572654724, 0.07452896237373352, 0.04850133880972862, 0.6907210350036621, -0.5316253304481506, 1.0892223119735718, 0.00022182032989803702, -0.9520288705825806, 0.691591739654541, -0.41385871171951294, 0.37508225440979004, 0.7317262291908264, 0.3193087875843048, -0.3989502191543579, -0.7398220300674438, -0.9866021871566772, -1.0152686834335327, 0.8659921288490295, 0.6068719625473022, -0.14072240889072418, -0.09605705738067627, 0.08876412361860275, 0.003763415152207017, -0.19182948768138885, -1.3163437843322754, -0.5247156023979187, 0.16758279502391815, -0.4143582582473755, 0.08569054305553436, -0.4291648268699646, -0.21165433526039124, -0.26281851530075073, 1.1999975442886353, 0.21719695627689362, 0.2435295730829239, 0.5093116164207458, -0.16974450647830963, 0.015084008686244488, 0.4216974973678589, 0.7313809990882874, 0.5056008100509644, -0.26546576619148254, -0.1335449069738388, 0.48836880922317505, -0.5147790908813477, 0.12079129368066788, 0.06788360327482224, -0.5697537064552307, 0.4027252197265625, 0.5660210251808167, 0.9885597825050354, 0.2899143695831299, -0.5279437303543091, 0.6294434666633606, -0.022371307015419006, -0.5030326247215271, -0.4644964039325714, -0.25329065322875977, 0.07223538309335709, 0.1358829289674759, 0.3584808111190796, -0.04291103780269623, 0.08191005885601044, -0.22192126512527466, 0.09339441359043121, 0.15914353728294373, -0.2155100703239441, -0.4050261080265045, 0.5443172454833984, 0.06325528770685196, -0.37484973669052124, 0.23889540135860443, -0.25086498260498047, -0.42115625739097595, 0.6338339447975159, 0.3445868194103241, 1.1577609777450562, -0.21217097342014313, -0.11895617842674255, 0.8074859380722046, 0.5703029632568359, -0.12841956317424774, 0.3500106930732727, 0.2666080892086029, -0.6509013175964355, -0.3300141990184784, -0.8410539627075195, 0.0943736806511879, 0.11467869579792023, -0.8313801288604736, 0.43189001083374023, 0.032224904745817184, -0.4112186133861542, -0.14861375093460083, 0.4868907034397125, -0.6818590760231018, 0.05867656320333481, -0.39867278933525085, 1.2032970190048218, -1.1056849956512451, 0.8266975283622742, 0.793513834476471, -0.8611214756965637, -1.0727802515029907, -0.21182812750339508, -0.3029053509235382, -0.6446079611778259, 0.5382163524627686, 0.04816911742091179, 0.00025424890918657184, -0.013386404141783714, -0.2962408661842346, -0.8707545399665833, 1.2880140542984009, 0.36605381965637207, -0.33436766266822815, -0.27629125118255615, 0.02591102011501789, 0.6341817378997803, -0.023030808195471764, 0.25255057215690613, 0.46256527304649353, 0.8307839035987854, -0.11664314568042755, -1.223245620727539, 0.1496010273694992, -0.5304752588272095, -0.02182869240641594, 0.34136635065078735, -0.8710196614265442, 0.8269426822662354, 0.1706322580575943, -0.23178265988826752, 0.08087600767612457, 0.6310482025146484, 0.4519062638282776, 0.04934617504477501, 0.5722907781600952, 0.971753716468811, 0.4711337387561798, -0.6339737176895142, 1.0206525325775146, -0.4049564301967621, 0.7233870029449463, 0.9487830400466919, 0.306162565946579, 0.8174746036529541, 0.5805330276489258, -0.3546418845653534, 0.6433544158935547, 0.8760539889335632, -0.23544791340827942, 0.37338101863861084, -0.1261051595211029, -0.0926826223731041, -0.17952224612236023, -0.16180869936943054, -0.5804780125617981, 0.34331274032592773, 0.14636272192001343, -0.20771898329257965, -0.06331790238618851, -0.2146001160144806, 0.46322739124298096, 0.07450005412101746, -0.1874215453863144, 0.7681841254234314, -0.21364104747772217, -0.764792263507843, 0.7215539216995239, 0.03478051722049713, 0.7290065884590149, -0.7423881888389587, 0.07737581431865692, -0.24173754453659058, 0.14456762373447418, -0.13376736640930176, -0.9938549995422363, 0.35369765758514404, 0.2756795287132263, -0.26183420419692993, -0.29768744111061096, 0.2160184681415558, -0.4661524295806885, -0.7826549410820007, 0.4507741332054138, 0.5307422876358032, 0.3026459217071533, 0.2613750994205475, -0.8874596357345581, 0.05316535383462906, 0.16900020837783813, -0.9094921350479126, 0.002784058218821883, 0.9581636190414429, 0.06171190366148949, 0.8006566762924194, 0.5425754189491272, 0.30470553040504456, 0.17418476939201355, 0.015499102883040905, 0.8137603402137756, -0.7945345640182495, -0.5244675874710083, -0.921100378036499, 0.690967321395874, -0.1454172283411026, -0.6071786880493164, 0.7161051630973816, 0.9044634103775024, 0.944076418876648, -0.0334123894572258, 0.33654552698135376, -0.27480757236480713, 0.5673741102218628, -0.6965587139129639, 0.7524746656417847, -0.9862843155860901, 0.12835831940174103, -0.22647516429424286, -0.8045370578765869, -0.2843836843967438, 0.38032054901123047, -0.2763548791408539, -0.04255707561969757, 1.0583667755126953, 0.8594380617141724, 0.1870010793209076, -0.38408613204956055, 0.009591393172740936, 0.39589259028434753, 0.2958448827266693, 0.885270893573761, 0.25835421681404114, -0.9227286577224731, 0.7759662866592407, -0.3339044451713562, 0.014140679500997066, -0.005505490116775036, -0.7979037761688232, -0.8977867960929871, -0.8205551505088806, -0.18563006818294525, -0.5575141906738281, -0.10881868749856949, 1.1057188510894775, 0.32081669569015503, -1.0215942859649658, -0.3659951984882355, -0.0006695076590403914, 0.1433977633714676, -0.2979567348957062, -0.2904409170150757, 0.7856740951538086, -0.16972410678863525, -1.1546244621276855, 0.15382184088230133, 0.043567463755607605, 0.15825432538986206, 0.01812887005507946, -0.09679566323757172, -0.6932640075683594, -0.0573587603867054, 0.2595670819282532, 0.11932095885276794, -0.9223385453224182, -0.1915787309408188, 0.1404346227645874, -0.3480227589607239, 0.22609961032867432, 0.06358042359352112, -0.2945082485675812, 0.13878247141838074, 0.7138405442237854, 0.4196605980396271, 0.6567261219024658, -0.1656206101179123, 0.3022627830505371, -0.7712414264678955, 0.5071071982383728, 0.28893333673477173, 0.7073034644126892, 0.19855740666389465, -0.21865123510360718, 0.9579837918281555, 0.45533132553100586, -0.3070274591445923, -1.1554608345031738, -0.0963941141963005, -1.3417080640792847, -0.11756323277950287, 1.209967851638794, -0.2737226188182831, -0.4106641411781311, 0.22434791922569275, -0.2897128760814667, 0.42967915534973145, -0.5091850757598877, 0.5676064491271973, 0.9865536689758301, 0.2850394546985626, 0.11711626499891281, -0.45993897318840027, 0.2742871046066284, 0.5086554884910583, -0.8364986181259155, -0.16438814997673035, 0.35178041458129883, 0.5090456008911133, 0.34348365664482117, 0.831061065196991, -0.4313398599624634, 0.24383261799812317, -0.15118753910064697, 0.33328503370285034, -0.2818795442581177, -0.10100872814655304, -0.2792804539203644, 0.1843746304512024, -0.10435071587562561, -0.18968726694583893 ]
microsoft/beit-base-patch16-224-pt22k-ft22k
microsoft
"2023-02-27T15:08:16Z"
646,010
55
transformers
[ "transformers", "pytorch", "jax", "beit", "image-classification", "vision", "dataset:imagenet", "dataset:imagenet-21k", "arxiv:2106.08254", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
image-classification
"2022-03-02T23:29:05Z"
--- license: apache-2.0 tags: - image-classification - vision datasets: - imagenet - imagenet-21k --- # BEiT (base-sized model, fine-tuned on ImageNet-22k) BEiT model pre-trained in a self-supervised fashion on ImageNet-22k - also called ImageNet-21k (14 million images, 21,841 classes) at resolution 224x224, and fine-tuned on the same dataset at resolution 224x224. It was introduced in the paper [BEIT: BERT Pre-Training of Image Transformers](https://arxiv.org/abs/2106.08254) by Hangbo Bao, Li Dong and Furu Wei and first released in [this repository](https://github.com/microsoft/unilm/tree/master/beit). Disclaimer: The team releasing BEiT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The BEiT model is a Vision Transformer (ViT), which is a transformer encoder model (BERT-like). In contrast to the original ViT model, BEiT is pretrained on a large collection of images in a self-supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. The pre-training objective for the model is to predict visual tokens from the encoder of OpenAI's DALL-E's VQ-VAE, based on masked patches. Next, the model was fine-tuned in a supervised fashion on ImageNet (also referred to as ILSVRC2012), a dataset comprising 1 million images and 1,000 classes, also at resolution 224x224. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. Contrary to the original ViT models, BEiT models do use relative position embeddings (similar to T5) instead of absolute position embeddings, and perform classification of images by mean-pooling the final hidden states of the patches, instead of placing a linear layer on top of the final hidden state of the [CLS] token. By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image. Alternatively, one can mean-pool the final hidden states of the patch embeddings, and place a linear layer on top of that. ## Intended uses & limitations You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=microsoft/beit) to look for fine-tuned versions on a task that interests you. ### How to use Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes: ```python from transformers import BeitImageProcessor, BeitForImageClassification from PIL import Image import requests url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) processor = BeitImageProcessor.from_pretrained('microsoft/beit-base-patch16-224-pt22k-ft22k') model = BeitForImageClassification.from_pretrained('microsoft/beit-base-patch16-224-pt22k-ft22k') inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits # model predicts one of the 21,841 ImageNet-22k classes predicted_class_idx = logits.argmax(-1).item() print("Predicted class:", model.config.id2label[predicted_class_idx]) ``` Currently, both the feature extractor and model support PyTorch. ## Training data The BEiT model was pretrained on [ImageNet-21k](http://www.image-net.org/), a dataset consisting of 14 million images and 21k classes, and fine-tuned on the same dataset. ## Training procedure ### Preprocessing The exact details of preprocessing of images during training/validation can be found [here](https://github.com/microsoft/unilm/blob/master/beit/datasets.py). Images are resized/rescaled to the same resolution (224x224) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5). ### Pretraining For all pre-training related hyperparameters, we refer to page 15 of the [original paper](https://arxiv.org/abs/2106.08254). ## Evaluation results For evaluation results on several image classification benchmarks, we refer to tables 1 and 2 of the original paper. Note that for fine-tuning, the best results are obtained with a higher resolution. Of course, increasing the model size will result in better performance. ### BibTeX entry and citation info ```@article{DBLP:journals/corr/abs-2106-08254, author = {Hangbo Bao and Li Dong and Furu Wei}, title = {BEiT: {BERT} Pre-Training of Image Transformers}, journal = {CoRR}, volume = {abs/2106.08254}, year = {2021}, url = {https://arxiv.org/abs/2106.08254}, archivePrefix = {arXiv}, eprint = {2106.08254}, timestamp = {Tue, 29 Jun 2021 16:55:04 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-2106-08254.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ``` ```bibtex @inproceedings{deng2009imagenet, title={Imagenet: A large-scale hierarchical image database}, author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li}, booktitle={2009 IEEE conference on computer vision and pattern recognition}, pages={248--255}, year={2009}, organization={Ieee} } ```
[ -0.6452650427818298, -0.26586654782295227, 0.009075633250176907, -0.15751074254512787, -0.4621061384677887, -0.09130506962537766, -0.008997886441648006, -0.6563931107521057, 0.23949846625328064, 0.524705171585083, -0.34569495916366577, -0.4520873725414276, -0.7074021697044373, -0.12337413430213928, -0.4635266959667206, 0.9986544251441956, -0.09100706875324249, 0.022917278110980988, -0.07192337512969971, -0.16353704035282135, -0.278305321931839, -0.5090466141700745, -0.6412333846092224, -0.28274694085121155, 0.5371135473251343, 0.1379663199186325, 0.5787267684936523, 0.7824987173080444, 0.6578149795532227, 0.46344780921936035, -0.030643973499536514, 0.050557125359773636, -0.3181251883506775, -0.37568315863609314, 0.07508079707622528, -0.4739754796028137, -0.30319467186927795, 0.19463586807250977, 0.5900477170944214, 0.41198253631591797, 0.2124820351600647, 0.34703704714775085, 0.08125295490026474, 0.6002877950668335, -0.6503093242645264, 0.2579084038734436, -0.5735719799995422, 0.3914945423603058, -0.12565219402313232, -0.11116458475589752, -0.421210914850235, -0.249582439661026, 0.23402756452560425, -0.5397965908050537, 0.5180922746658325, 0.005598952062427998, 1.4984427690505981, 0.124607615172863, -0.19893360137939453, 0.12223668396472931, -0.6680394411087036, 0.6896518468856812, -0.43671903014183044, 0.3551752269268036, 0.24234126508235931, 0.4614603817462921, 0.14300945401191711, -1.0841307640075684, -0.3749394118785858, -0.15408429503440857, -0.17340636253356934, 0.12019703537225723, -0.37366580963134766, 0.1893569678068161, 0.4822632074356079, 0.37143218517303467, -0.3131975531578064, 0.16614516079425812, -0.6426317095756531, -0.4523651599884033, 0.3788198232650757, -0.15907853841781616, 0.11728004366159439, 0.04295673593878746, -0.5821486115455627, -0.2899020314216614, -0.4679703414440155, 0.17541103065013885, 0.31389889121055603, 0.04296373948454857, -0.11334516108036041, 0.4313032925128937, 0.015760913491249084, 0.6850224137306213, 0.2576097548007965, 0.018516717478632927, 0.5360953211784363, -0.2661225199699402, -0.374807208776474, 0.1569976657629013, 0.7321556806564331, 0.24506056308746338, 0.29446789622306824, -0.03243650868535042, -0.3160353899002075, 0.09467675536870956, 0.379280686378479, -0.9768996834754944, -0.2871697247028351, -0.14668557047843933, -0.67901211977005, -0.3543364703655243, 0.2515593469142914, -0.5671929717063904, -0.05276668816804886, -0.37877219915390015, 0.6407959461212158, -0.24008981883525848, -0.21780884265899658, -0.14972954988479614, 0.07831738144159317, 0.427121639251709, 0.34484338760375977, -0.6250104904174805, 0.3446262776851654, 0.2545957863330841, 0.9528691172599792, -0.07664505392313004, -0.3403279781341553, -0.20694231986999512, -0.22708871960639954, -0.5630438923835754, 0.6382912397384644, -0.185655415058136, -0.018339864909648895, 0.0851365327835083, 0.3329342007637024, 0.02008718065917492, -0.582401692867279, 0.3407346308231354, -0.8008179068565369, -0.06506678462028503, -0.28343456983566284, -0.2666415274143219, -0.23904366791248322, 0.19056349992752075, -0.7494044303894043, 1.007829189300537, 0.15910184383392334, -0.9376776218414307, 0.50331050157547, -0.4774700105190277, -0.09052501618862152, -0.05942172184586525, -0.05169527605175972, -0.6314297318458557, -0.035364698618650436, 0.262226939201355, 0.47571688890457153, -0.06981751322746277, 0.043571729212999344, -0.2545642554759979, -0.5854372978210449, 0.17542508244514465, -0.30779263377189636, 0.7505708336830139, 0.27008721232414246, -0.35739535093307495, 0.272564560174942, -0.6325715184211731, 0.013180718757212162, 0.22436301410198212, -0.21931210160255432, -0.032777972519397736, -0.2691428065299988, 0.04628119245171547, 0.34302735328674316, 0.34991148114204407, -0.767440915107727, 0.08823177218437195, -0.3021917939186096, 0.33602800965309143, 0.8152871131896973, -0.22703826427459717, 0.38710227608680725, -0.25011616945266724, 0.3451252281665802, 0.39120614528656006, 0.3956325054168701, -0.2103048413991928, -0.45430585741996765, -0.9235227108001709, -0.19480778276920319, 0.5251252055168152, 0.33014219999313354, -0.6135625243186951, 0.670644223690033, -0.3301459550857544, -0.6073397994041443, -0.4900982677936554, -0.03294987231492996, 0.41082844138145447, 0.5438220500946045, 0.4717445969581604, -0.6042782664299011, -0.6282896995544434, -1.008563756942749, 0.29721835255622864, -0.0034625621046870947, 0.22365395724773407, 0.09107925742864609, 0.645426332950592, -0.20821337401866913, 0.9048014283180237, -0.34419482946395874, -0.2986887991428375, -0.1170402467250824, 0.11077842861413956, 0.25467342138290405, 0.619276225566864, 0.534449577331543, -0.6679384112358093, -0.3902115523815155, -0.03061806410551071, -0.7747254967689514, 0.21957208216190338, 0.007639427203685045, -0.3398260474205017, 0.25621411204338074, 0.5769978761672974, -0.5452709197998047, 0.8069356679916382, 0.3465626537799835, -0.026803378015756607, 0.6434968113899231, -0.24177485704421997, 0.09283672273159027, -0.9837852120399475, -0.0535961277782917, 0.15634562075138092, -0.18288569152355194, -0.4105413258075714, 0.05620012432336807, 0.09569423645734787, -0.16917461156845093, -0.4805186986923218, 0.2146715223789215, -0.46542033553123474, -0.37069135904312134, -0.22802278399467468, -0.332156777381897, -0.039293933659791946, 0.633513331413269, -0.005342528223991394, 0.598848819732666, 0.7989581227302551, -0.48867952823638916, 0.4268367886543274, 0.16427496075630188, -0.5824922323226929, 0.26877570152282715, -0.7995985746383667, 0.18186305463314056, -0.10106106102466583, 0.3200932741165161, -0.9446228742599487, -0.06978762149810791, 0.22645282745361328, -0.32988327741622925, 0.6417583227157593, -0.28964295983314514, -0.5851173400878906, -0.6351765394210815, -0.22069141268730164, 0.4833892285823822, 0.6894142627716064, -0.6523420810699463, 0.4809716045856476, 0.14873574674129486, 0.4241492450237274, -0.7817798852920532, -0.8565374612808228, -0.0803341418504715, -0.10758586972951889, -0.5314080119132996, 0.5485244393348694, 0.08904042840003967, 0.28213754296302795, 0.3439861238002777, -0.07940559089183807, -0.09423861652612686, -0.2105267494916916, 0.36617887020111084, 0.44585466384887695, -0.39415040612220764, 0.11687008291482925, -0.22790245711803436, -0.26274964213371277, -0.04086511582136154, -0.4770794212818146, 0.608913242816925, -0.4164985418319702, -0.49154379963874817, -0.5826414227485657, 0.060056913644075394, 0.5294318199157715, -0.354391872882843, 0.668766975402832, 1.0352468490600586, -0.5511770844459534, 0.15108895301818848, -0.5018981099128723, -0.15018758177757263, -0.5140304565429688, 0.5191961526870728, -0.3006018102169037, -0.5506593585014343, 0.712171196937561, -0.039031025022268295, 0.015238533727824688, 0.6201890707015991, 0.3705063760280609, -0.12860524654388428, 0.9503803849220276, 0.6156168580055237, -0.12280210852622986, 0.6770522594451904, -0.7696044445037842, 0.0778648853302002, -0.8140032291412354, -0.26311954855918884, -0.3544824719429016, -0.5676059722900391, -0.6626960635185242, -0.16009865701198578, 0.2601695656776428, 0.17950189113616943, -0.5694527626037598, 0.4251779317855835, -0.7052262425422668, 0.36667266488075256, 0.8701425790786743, 0.5883100032806396, -0.22751261293888092, 0.30165836215019226, -0.2194702923297882, 0.059664037078619, -0.5816819667816162, -0.2847037613391876, 0.9308308959007263, 0.4457755386829376, 0.6308823227882385, -0.22611291706562042, 0.760217547416687, 0.08642776310443878, 0.13734197616577148, -0.7786895632743835, 0.6487576961517334, -0.1939411163330078, -0.5680359601974487, -0.14483816921710968, -0.2662286162376404, -1.23383629322052, -0.04753585904836655, -0.2603335678577423, -0.7629311084747314, 0.3238711357116699, 0.2512072026729584, -0.17688922584056854, 0.6311031579971313, -0.769643247127533, 0.9019635915756226, -0.20624983310699463, -0.20470720529556274, -0.04890831932425499, -0.7475078105926514, 0.09066532552242279, -0.11903335899114609, -0.12746481597423553, 0.11732865869998932, 0.19721537828445435, 0.9546711444854736, -0.6670975089073181, 0.9542977809906006, -0.360100120306015, 0.4525849223136902, 0.5229983329772949, -0.20097056031227112, 0.2823982238769531, -0.4683927893638611, 0.16977833211421967, 0.4371594786643982, 0.07679229974746704, -0.5282846093177795, -0.5205550193786621, 0.4698493778705597, -1.1757111549377441, -0.4647503197193146, -0.4091123938560486, -0.3351166546344757, 0.04448329284787178, 0.292562872171402, 0.6969140768051147, 0.7212749123573303, 0.266043484210968, 0.36011701822280884, 0.6029871702194214, -0.4131529927253723, 0.4175782799720764, -0.14057043194770813, -0.22209590673446655, -0.2332281470298767, 0.8324295878410339, 0.4966793358325958, 0.17183995246887207, 0.23954671621322632, 0.31228482723236084, -0.2531157433986664, -0.6264387965202332, -0.36732521653175354, 0.1381593495607376, -0.9742047786712646, -0.42210647463798523, -0.41146984696388245, -0.7401994466781616, -0.26566842198371887, -0.12481006979942322, -0.40352001786231995, -0.008912996388971806, -0.5101639628410339, -0.11034094542264938, 0.4055057466030121, 0.7300382256507874, -0.06307025253772736, 0.5843284726142883, -0.6987842917442322, -0.007916750386357307, 0.37066683173179626, 0.4732126295566559, 0.1979580968618393, -0.7767542004585266, -0.4909535348415375, -0.0489298477768898, -0.31544533371925354, -0.672897219657898, 0.3339790105819702, 0.1916368454694748, 0.6755174994468689, 0.5050936341285706, -0.1877167522907257, 0.8309299945831299, -0.434768408536911, 0.6877654194831848, 0.5272986888885498, -0.6134806871414185, 0.519784688949585, 0.015491267666220665, 0.194249227643013, 0.31546273827552795, 0.501602053642273, -0.03269870579242706, 0.12334021180868149, -0.8284737467765808, -0.7066705822944641, 0.7233640551567078, -0.015953483060002327, 0.2452312558889389, 0.2345530241727829, 0.4029487371444702, -0.06416423618793488, 0.0475342720746994, -0.7646846175193787, -0.3101692199707031, -0.5458602905273438, -0.1795608103275299, -0.04007788002490997, -0.25611233711242676, -0.0057769156992435455, -0.6648005843162537, 0.5478194355964661, 0.07704810798168182, 0.8253185749053955, 0.19415679574012756, -0.12191925942897797, -0.13472206890583038, -0.3099386394023895, 0.25592830777168274, 0.49179136753082275, -0.29251566529273987, 0.21681751310825348, 0.053431883454322815, -0.7403255105018616, 0.04920148104429245, 0.06458179652690887, -0.16517780721187592, 0.01477713044732809, 0.46809521317481995, 1.090261697769165, 0.015823157504200935, -0.05716380849480629, 0.5966143608093262, 0.13119648396968842, -0.35336002707481384, -0.3617393374443054, -0.007640926167368889, -0.20539969205856323, 0.2777676582336426, 0.3304089307785034, 0.4522870182991028, 0.003578823059797287, -0.3773120045661926, 0.35795992612838745, 0.219002828001976, -0.5240156054496765, -0.35091134905815125, 0.4418274760246277, -0.24888752400875092, -0.09369949996471405, 0.8073573112487793, -0.190537229180336, -0.6211283802986145, 0.8773142695426941, 0.5482820868492126, 0.7628401517868042, -0.012892558239400387, 0.16422118246555328, 0.6376702785491943, 0.29645130038261414, -0.006505388300865889, 0.012247647158801556, 0.06269918382167816, -0.9914710521697998, -0.32461613416671753, -0.6085044145584106, 0.03200699761509895, 0.26980406045913696, -0.6696464419364929, 0.34016600251197815, -0.5558674931526184, -0.42260995507240295, 0.2331577092409134, 0.10166393220424652, -1.0647081136703491, 0.2928445637226105, 0.20634597539901733, 0.9194637537002563, -0.7578100562095642, 0.894150972366333, 0.7247388958930969, -0.6209606528282166, -1.0118250846862793, -0.22657376527786255, -0.28785210847854614, -0.967460572719574, 0.8798474073410034, 0.4207947552204132, 0.014772595837712288, 0.1696297973394394, -0.8152455687522888, -0.9329456090927124, 1.1315500736236572, 0.34331902861595154, -0.326011061668396, 0.05993085727095604, 0.015385855920612812, 0.4287475347518921, -0.32494014501571655, 0.3648412525653839, 0.1041673794388771, 0.1981228142976761, 0.49316802620887756, -0.6548000574111938, -0.034675851464271545, -0.37036141753196716, 0.12136280536651611, 0.11401676386594772, -0.49204835295677185, 0.9139854311943054, -0.14578664302825928, -0.014317262917757034, -0.0002663523191586137, 0.6198984980583191, 0.021390767768025398, -0.009900919161736965, 0.724835991859436, 0.7521724104881287, 0.4578598737716675, -0.2565482556819916, 0.9385392665863037, -0.17253583669662476, 0.32113388180732727, 0.693439245223999, 0.18289823830127716, 0.6356087923049927, 0.272307425737381, -0.27229073643684387, 0.5892753005027771, 1.1350653171539307, -0.42577046155929565, 0.6760016083717346, 0.16308385133743286, 0.04292726144194603, -0.17470674216747284, -0.0790211632847786, -0.4693664610385895, 0.4968738257884979, 0.2484639286994934, -0.5675815343856812, -0.21356122195720673, 0.13161778450012207, -0.28932949900627136, -0.4152994751930237, -0.5754669308662415, 0.5140724182128906, -0.05606038495898247, -0.47757595777511597, 0.6544594764709473, -0.10225769877433777, 0.6274851560592651, -0.5759975910186768, -0.049559079110622406, -0.04222077131271362, 0.22352799773216248, -0.3385350704193115, -0.6915257573127747, 0.18471534550189972, -0.1975453644990921, 0.01773895137012005, 0.10691094398498535, 0.9042327404022217, -0.08110186457633972, -0.6088230013847351, 0.2374207228422165, 0.189853698015213, 0.4174254238605499, 0.051382556557655334, -0.8530737161636353, 0.01101097371429205, -0.11035395413637161, -0.34397777915000916, 0.4303435683250427, 0.39267876744270325, -0.13802097737789154, 0.3906978666782379, 0.6371058821678162, 0.12695474922657013, 0.36220189929008484, 0.03918499872088432, 0.9853066205978394, -0.33332353830337524, -0.39403340220451355, -0.6129103302955627, 0.4632357656955719, -0.13132615387439728, -0.29855188727378845, 0.4696277379989624, 0.43996143341064453, 1.0683975219726562, -0.1854158341884613, 0.508662223815918, -0.005529162008315325, -0.052624620497226715, -0.3769112825393677, 0.49304577708244324, -0.6064962148666382, -0.1806781142950058, -0.3371425271034241, -0.814906656742096, -0.23567858338356018, 0.7974913120269775, -0.2776258885860443, 0.3802245855331421, 0.45066219568252563, 0.8200759887695312, -0.25434610247612, -0.14771385490894318, 0.38989830017089844, 0.11711449176073074, 0.018854714930057526, 0.32134196162223816, 0.7304021716117859, -0.5506603121757507, 0.4973134994506836, -0.5809065103530884, -0.2606657147407532, -0.13409867882728577, -0.7371491193771362, -0.8761818408966064, -0.7382379174232483, -0.39521098136901855, -0.4368070363998413, -0.152077779173851, 0.8229331374168396, 1.102367639541626, -0.8373101949691772, -0.03448186814785004, -0.19615204632282257, -0.30769357085227966, -0.2754128575325012, -0.13138295710086823, 0.704130232334137, -0.23632730543613434, -0.5227116942405701, -0.33145734667778015, -0.03440330550074577, 0.22665831446647644, -0.2959100902080536, -0.03659455478191376, -0.21043705940246582, -0.24953888356685638, 0.5481477975845337, 0.1660028100013733, -0.5824662446975708, -0.4833245575428009, -0.002632810501381755, -0.07771879434585571, 0.3488522171974182, 0.5644829869270325, -0.7808260917663574, 0.5075149536132812, 0.3293571472167969, 0.6266051530838013, 0.861889123916626, -0.14171913266181946, 0.017385562881827354, -0.7703352570533752, 0.35670438408851624, 0.06717435270547867, 0.6325427889823914, 0.18741293251514435, -0.3032100200653076, 0.4059959650039673, 0.3887028992176056, -0.5115399360656738, -0.6505492329597473, 0.10135133564472198, -1.1464048624038696, -0.16674746572971344, 0.8057600855827332, -0.44398850202560425, -0.3371460735797882, 0.098879374563694, -0.16611188650131226, 0.6887298822402954, -0.05346359312534332, 0.5237448215484619, 0.4554535746574402, 0.07139855623245239, -0.4224017858505249, -0.5704392790794373, 0.24316035211086273, 0.04530128091573715, -0.5248094797134399, -0.501547634601593, 0.15254880487918854, 0.19469909369945526, 0.4319799840450287, 0.39659222960472107, -0.2823219895362854, 0.12939921021461487, 0.09991031140089035, 0.3774912357330322, -0.24050946533679962, -0.42372947931289673, -0.14008985459804535, 0.03655315935611725, -0.01599274016916752, -0.7269660234451294 ]
facebook/encodec_24khz
facebook
"2023-07-25T11:28:04Z"
631,558
21
transformers
[ "transformers", "pytorch", "safetensors", "encodec", "feature-extraction", "arxiv:2210.13438", "has_space", "region:us" ]
feature-extraction
"2023-06-12T16:10:36Z"
--- inference: false --- ![encodec image](https://github.com/facebookresearch/encodec/raw/2d29d9353c2ff0ab1aeadc6a3d439854ee77da3e/architecture.png) # Model Card for EnCodec This model card provides details and information about EnCodec, a state-of-the-art real-time audio codec developed by Meta AI. ## Model Details ### Model Description EnCodec is a high-fidelity audio codec leveraging neural networks. It introduces a streaming encoder-decoder architecture with quantized latent space, trained in an end-to-end fashion. The model simplifies and speeds up training using a single multiscale spectrogram adversary that efficiently reduces artifacts and produces high-quality samples. It also includes a novel loss balancer mechanism that stabilizes training by decoupling the choice of hyperparameters from the typical scale of the loss. Additionally, lightweight Transformer models are used to further compress the obtained representation while maintaining real-time performance. - **Developed by:** Meta AI - **Model type:** Audio Codec ### Model Sources - **Repository:** [GitHub Repository](https://github.com/facebookresearch/encodec) - **Paper:** [EnCodec: End-to-End Neural Audio Codec](https://arxiv.org/abs/2210.13438) ## Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> EnCodec can be used directly as an audio codec for real-time compression and decompression of audio signals. It provides high-quality audio compression and efficient decoding. The model was trained on various bandwiths, which can be specified when encoding (compressing) and decoding (decompressing). Two different setup exist for EnCodec: - Non-streamable: the input audio is split into chunks of 1 seconds, with an overlap of 10 ms, which are then encoded. - Streamable: weight normalizationis used on the convolution layers, and the input is not split into chunks but rather padded on the left. ### Downstream Use EnCodec can be fine-tuned for specific audio tasks or integrated into larger audio processing pipelines for applications such as speech generation, music generation, or text to speech tasks. <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ## How to Get Started with the Model Use the following code to get started with the EnCodec model using a dummy example from the LibriSpeech dataset (~9MB). First, install the required Python packages: ``` pip install --upgrade pip pip install --upgrade datasets[audio] pip install git+https://github.com/huggingface/transformers.git@main ``` Then load an audio sample, and run a forward pass of the model: ```python from datasets import load_dataset, Audio from transformers import EncodecModel, AutoProcessor # load a demonstration datasets librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") # load the model + processor (for pre-processing the audio) model = EncodecModel.from_pretrained("facebook/encodec_24khz") processor = AutoProcessor.from_pretrained("facebook/encodec_24khz") # cast the audio data to the correct sampling rate for the model librispeech_dummy = librispeech_dummy.cast_column("audio", Audio(sampling_rate=processor.sampling_rate)) audio_sample = librispeech_dummy[0]["audio"]["array"] # pre-process the inputs inputs = processor(raw_audio=audio_sample, sampling_rate=processor.sampling_rate, return_tensors="pt") # explicitly encode then decode the audio inputs encoder_outputs = model.encode(inputs["input_values"], inputs["padding_mask"]) audio_values = model.decode(encoder_outputs.audio_codes, encoder_outputs.audio_scales, inputs["padding_mask"])[0] # or the equivalent with a forward pass audio_values = model(inputs["input_values"], inputs["padding_mask"]).audio_values ``` ## Training Details The model was trained for 300 epochs, with one epoch being 2,000 updates with the Adam optimizer with a batch size of 64 examples of 1 second each, a learning rate of 3 · 10−4 , β1 = 0.5, and β2 = 0.9. All the models are traind using 8 A100 GPUs. ### Training Data <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> - For speech: - DNS Challenge 4 - [Common Voice](https://huggingface.co/datasets/common_voice) - For general audio: - [AudioSet](https://huggingface.co/datasets/Fhrozen/AudioSet2K22) - [FSD50K](https://huggingface.co/datasets/Fhrozen/FSD50k) - For music: - [Jamendo dataset](https://huggingface.co/datasets/rkstgr/mtg-jamendo) They used four different training strategies to sample for these datasets: - (s1) sample a single source from Jamendo with probability 0.32; - (s2) sample a single source from the other datasets with the same probability; - (s3) mix two sources from all datasets with a probability of 0.24; - (s4) mix three sources from all datasets except music with a probability of 0.12. The audio is normalized by file and a random gain between -10 and 6 dB id applied. ## Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ### Subjectif metric for restoration: This models was evalutated using the MUSHRA protocol (Series, 2014), using both a hidden reference and a low anchor. Annotators were recruited using a crowd-sourcing platform, in which they were asked to rate the perceptual quality of the provided samples in a range between 1 to 100. They randomly select 50 samples of 5 seconds from each category of the the test set and force at least 10 annotations per samples. To filter noisy annotations and outliers we remove annotators who rate the reference recordings less then 90 in at least 20% of the cases, or rate the low-anchor recording above 80 more than 50% of the time. ### Objective metric for restoration: The ViSQOL()ink) metric was used together with the Scale-Invariant Signal-to-Noise Ration (SI-SNR) (Luo & Mesgarani, 2019; Nachmani et al., 2020; Chazan et al., 2021). ### Results The results of the evaluation demonstrate the superiority of EnCodec compared to the baselines across different bandwidths (1.5, 3, 6, and 12 kbps). When comparing EnCodec with the baselines at the same bandwidth, EnCodec consistently outperforms them in terms of MUSHRA score. Notably, EnCodec achieves better performance, on average, at 3 kbps compared to Lyra-v2 at 6 kbps and Opus at 12 kbps. Additionally, by incorporating the language model over the codes, it is possible to achieve a bandwidth reduction of approximately 25-40%. For example, the bandwidth of the 3 kbps model can be reduced to 1.9 kbps. #### Summary EnCodec is a state-of-the-art real-time neural audio compression model that excels in producing high-fidelity audio samples at various sample rates and bandwidths. The model's performance was evaluated across different settings, ranging from 24kHz monophonic at 1.5 kbps to 48kHz stereophonic, showcasing both subjective and objective results. Notably, EnCodec incorporates a novel spectrogram-only adversarial loss, effectively reducing artifacts and enhancing sample quality. Training stability and interpretability were further enhanced through the introduction of a gradient balancer for the loss weights. Additionally, the study demonstrated that a compact Transformer model can be employed to achieve an additional bandwidth reduction of up to 40% without compromising quality, particularly in applications where low latency is not critical (e.g., music streaming). ## Citation <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** ``` @misc{défossez2022high, title={High Fidelity Neural Audio Compression}, author={Alexandre Défossez and Jade Copet and Gabriel Synnaeve and Yossi Adi}, year={2022}, eprint={2210.13438}, archivePrefix={arXiv}, primaryClass={eess.AS} } ```
[ -0.6144275665283203, -0.6844061017036438, 0.07833544164896011, 0.15595398843288422, -0.09387115389108658, -0.1553392857313156, -0.29125142097473145, -0.510593056678772, 0.35419923067092896, 0.30633923411369324, -0.692311704158783, -0.50834059715271, -0.5326331257820129, 0.059364479035139084, -0.5334362387657166, 0.7881372570991516, 0.20756280422210693, 0.15230262279510498, -0.06603915244340897, -0.1585933268070221, -0.373534232378006, -0.39982184767723083, -0.8215246200561523, -0.18881458044052124, 0.08705294877290726, 0.13978388905525208, 0.4996466338634491, 0.510357141494751, 0.47651469707489014, 0.21234309673309326, -0.404687762260437, 0.03334090858697891, -0.48249226808547974, -0.1542384922504425, 0.23468582332134247, -0.27520498633384705, -0.6241152882575989, 0.11454825103282928, 0.49843230843544006, 0.4700975716114044, -0.4748445153236389, 0.5069279074668884, 0.06471563130617142, 0.5493807792663574, -0.707159161567688, 0.009636015631258488, -0.43550869822502136, 0.15057174861431122, -0.02360030822455883, -0.2099357396364212, -0.4645477533340454, -0.18827643990516663, -0.21911661326885223, -0.592177152633667, 0.11587662249803543, -0.07074481248855591, 1.0318057537078857, 0.4280315339565277, -0.0705675482749939, -0.22636350989341736, -0.9466142654418945, 0.4450688064098358, -0.9622974991798401, 0.7990411520004272, 0.5809537172317505, 0.3552565574645996, 0.14199374616146088, -0.7877400517463684, -0.6150421500205994, -0.08764688670635223, 0.25434762239456177, 0.5471201539039612, -0.25683873891830444, 0.017117083072662354, 0.4183410704135895, 0.6778842806816101, -0.5921540856361389, -0.04924248903989792, -0.48421844840049744, -0.30654147267341614, 0.6571009755134583, -0.15404047071933746, 0.08489101380109787, -0.1662152260541916, -0.2842015027999878, -0.29581430554389954, -0.47874271869659424, 0.2565680742263794, 0.616272509098053, 0.1307305097579956, -0.40199044346809387, 0.17624782025814056, -0.11486252397298813, 0.6122358441352844, 0.14335452020168304, -0.358694851398468, 0.5157560110092163, -0.46908193826675415, -0.193907231092453, 0.21704262495040894, 0.8402804732322693, 0.1974480003118515, 0.04089997336268425, -0.0010031646816059947, -0.26754844188690186, 0.07774864882230759, 0.25475531816482544, -0.8038148880004883, -0.1926424503326416, 0.33766353130340576, -0.6685804128646851, -0.04821164160966873, 0.03464110940694809, -0.5405704975128174, 0.104318767786026, -0.3982006013393402, 0.6451519727706909, -0.5296978950500488, -0.2815708518028259, 0.35150760412216187, -0.1996869146823883, 0.19959086179733276, 0.028786756098270416, -0.8323811888694763, 0.3792268633842468, 0.3113012909889221, 0.7982447743415833, 0.035294871777296066, -0.015353399328887463, -0.2905810475349426, -0.05918649584054947, -0.11179185658693314, 0.41699010133743286, -0.198497012257576, -0.4116678237915039, -0.12788189947605133, 0.08647960424423218, 0.17345872521400452, -0.5547959208488464, 0.8500291705131531, -0.3442149758338928, 0.06779644638299942, 0.14885766804218292, -0.6098147034645081, -0.2802349925041199, -0.13427242636680603, -0.7742647528648376, 0.7780644297599792, 0.06812036782503128, -0.6029798984527588, 0.214402973651886, -0.5942538380622864, -0.30797624588012695, -0.17522799968719482, 0.269415020942688, -0.5194875001907349, -0.09058118611574173, 0.32530203461647034, 0.3483845591545105, -0.35509297251701355, 0.18386882543563843, -0.4158385396003723, -0.528419554233551, 0.3457123339176178, -0.6480210423469543, 0.9553020596504211, 0.4596274197101593, -0.2377191185951233, -0.21074844896793365, -0.8632495999336243, -0.17201124131679535, 0.1589972823858261, -0.5189813375473022, 0.06134535372257233, -0.15975913405418396, 0.28689560294151306, 0.16132141649723053, -0.10569696873426437, -0.6202146410942078, -0.129825621843338, -0.4552779793739319, 0.7618862390518188, 0.4348219335079193, 0.046527765691280365, 0.4650172293186188, -0.31589198112487793, 0.3225145936012268, -0.21021835505962372, 0.43990498781204224, -0.1897934079170227, -0.34590116143226624, -0.652704119682312, -0.2715644836425781, 0.6821284890174866, 0.5137155055999756, -0.33216553926467896, 0.6579329967498779, -0.4144940674304962, -0.6444759964942932, -1.1884431838989258, -0.18125596642494202, 0.2619538903236389, 0.4667488634586334, 0.5790106654167175, -0.4796625077724457, -0.5339657068252563, -0.9203389286994934, 0.10514732450246811, 0.07576652616262436, -0.2797478437423706, 0.4941096603870392, 0.39709070324897766, -0.2778879702091217, 0.7542545199394226, -0.21115535497665405, -0.19063816964626312, -0.03075863979756832, -0.025513814762234688, 0.4476872980594635, 0.7756443023681641, 0.5399515628814697, -0.7398449182510376, -0.18304699659347534, -0.4345681369304657, -0.6590256690979004, -0.08911628276109695, -0.10721875727176666, -0.037046823650598526, -0.05150579288601875, 0.42325595021247864, -0.6092062592506409, 0.4957039952278137, 0.6951653957366943, -0.027057696133852005, 0.4974297285079956, 0.02095797285437584, 0.3402155339717865, -1.0296051502227783, 0.11012675613164902, -0.15438474714756012, -0.24644599854946136, -0.5845401287078857, -0.11334054917097092, -0.06177479401230812, -0.334117591381073, -0.5302262306213379, 0.14481216669082642, -0.3126090168952942, -0.15270031988620758, -0.06003783643245697, -0.010706352069973946, 0.0859694704413414, 0.7125130295753479, -0.025243505835533142, 0.7104661464691162, 0.4964688718318939, -0.6009968519210815, 0.3502148389816284, 0.3867715895175934, -0.28086358308792114, 0.4229119122028351, -0.7535176277160645, 0.33006948232650757, -0.0652715191245079, 0.4373118579387665, -0.729012668132782, -0.08113382011651993, 0.13600397109985352, -0.8466092944145203, 0.44393306970596313, -0.24178831279277802, -0.5508630275726318, -0.42979928851127625, -0.06674415618181229, 0.3825896680355072, 0.749496579170227, -0.5985389351844788, 0.6900185942649841, 0.47799837589263916, 0.22905302047729492, -0.41680973768234253, -0.8993794918060303, -0.13878796994686127, -0.2050950974225998, -0.6063576340675354, 0.6087367534637451, -0.22439967095851898, 0.12757571041584015, 0.05016936734318733, -0.11790928244590759, 0.03144319728016853, 0.013411221094429493, 0.5160016417503357, 0.13671886920928955, -0.14485135674476624, 0.07264523208141327, -0.08843323588371277, -0.05403950437903404, -0.009563901461660862, -0.41029682755470276, 0.5909644961357117, -0.04722067713737488, -0.34393924474716187, -0.7389889359474182, 0.237107053399086, 0.3876422047615051, -0.41312268376350403, 0.495735764503479, 0.8060715198516846, -0.36491093039512634, -0.07316749542951584, -0.6120119690895081, -0.3300044536590576, -0.4721914231777191, 0.2657192051410675, -0.18616977334022522, -0.6094197034835815, 0.6377323865890503, 0.06404714286327362, -0.05178117752075195, 0.43205639719963074, 0.3390403389930725, -0.20397506654262543, 0.8689167499542236, 0.32524821162223816, -0.09803096204996109, 0.4697818160057068, -0.7414930462837219, 0.0033098633866757154, -0.7930495738983154, -0.24969804286956787, -0.36951127648353577, -0.3358863294124603, -0.5385948419570923, -0.27446722984313965, 0.3175300359725952, 0.10879887640476227, -0.29057320952415466, 0.6287118196487427, -0.6733123064041138, 0.20736853778362274, 0.6212419867515564, 0.3379759192466736, 0.025075765326619148, 0.04048405587673187, 0.25620365142822266, 0.05133693292737007, -0.7839145064353943, -0.16325809061527252, 1.1244890689849854, 0.6071873903274536, 0.6787314414978027, 0.03946171700954437, 0.6671666502952576, 0.33112961053848267, -0.07625069469213486, -0.7178086042404175, 0.2911778688430786, -0.17935936152935028, -0.6294989585876465, -0.17870886623859406, -0.31875044107437134, -0.682387113571167, 0.012091418728232384, -0.549369215965271, -0.47774538397789, 0.5290648341178894, 0.06466422230005264, -0.6378591656684875, 0.4041401445865631, -0.5429202914237976, 0.7474483251571655, -0.11057887226343155, -0.26447635889053345, -0.2019203007221222, -0.6919691562652588, 0.18680013716220856, 0.032232679426670074, 0.3247314393520355, -0.09812314808368683, 0.3795755207538605, 0.9130215644836426, -0.2401353418827057, 0.43197131156921387, -0.28778019547462463, 0.18135139346122742, 0.49249401688575745, -0.03908538818359375, 0.19594046473503113, 0.022061435505747795, 0.008920411579310894, 0.6350722908973694, 0.14986038208007812, -0.1806691586971283, -0.5429680347442627, 0.35742348432540894, -0.8044679760932922, -0.2116692066192627, 0.10609009861946106, -0.42204713821411133, -0.09871866554021835, -0.08772355318069458, 0.5324229001998901, 0.7822267413139343, -0.06282350420951843, 0.47042232751846313, 0.7184284329414368, -0.2927549183368683, 0.44975510239601135, 0.3296215534210205, 0.06172533333301544, -0.6143766045570374, 0.7926968932151794, 0.09962877631187439, 0.3284338414669037, 0.23496820032596588, -0.017275748774409294, -0.2537822127342224, -0.5259894132614136, -0.38174551725387573, 0.19648943841457367, -0.677023708820343, -0.3871408998966217, -0.7056846022605896, -0.39077457785606384, -0.6486872434616089, 0.1256655603647232, -0.820825457572937, -0.3339242935180664, -0.3778390884399414, -0.13733357191085815, 0.2547084391117096, 0.3210238516330719, -0.2656150460243225, 0.5144727230072021, -0.8131882548332214, 0.31454819440841675, 0.15717242658138275, 0.14089055359363556, -0.06713297963142395, -1.0130667686462402, -0.42077499628067017, 0.19519127905368805, -0.13062359392642975, -0.9628450274467468, 0.5032411813735962, 0.2883397936820984, 0.5139398574829102, 0.4307999014854431, -0.040804021060466766, 0.6966582536697388, -0.43526679277420044, 0.7733094692230225, 0.028016630560159683, -0.8233166337013245, 0.5576722621917725, -0.0507720485329628, 0.2823379337787628, 0.603043258190155, 0.3922704756259918, -0.4076794683933258, -0.029474878683686256, -0.6709055304527283, -0.8672303557395935, 0.6858214735984802, 0.38221147656440735, 0.04377206042408943, 0.2558539807796478, 0.37799403071403503, -0.13720498979091644, 0.09476408362388611, -0.6730523109436035, -0.34950390458106995, -0.5857675075531006, -0.24635837972164154, -0.08021550625562668, -0.17983154952526093, -0.11377415060997009, -0.5007551908493042, 0.7576380968093872, 0.1359768807888031, 0.6741390228271484, 0.38616666197776794, -0.17284542322158813, 0.20654937624931335, 0.15561430156230927, 0.47373494505882263, 0.11743131279945374, -0.4406404197216034, -0.10706799477338791, 0.23244495689868927, -0.48279309272766113, 0.10308513790369034, 0.22059370577335358, -0.1235956996679306, 0.04590066522359848, 0.46809569001197815, 1.2669031620025635, 0.2199988216161728, -0.4596278667449951, 0.541378915309906, -0.13230307400226593, -0.3077259361743927, -0.6537960767745972, -0.01661447435617447, 0.21112166345119476, 0.07323039323091507, 0.29492706060409546, 0.24271273612976074, 0.47767236828804016, -0.33349746465682983, 0.23681148886680603, 0.08970212936401367, -0.4018630087375641, -0.4323672950267792, 0.937216579914093, 0.18318523466587067, -0.3222951591014862, 0.7381063103675842, -0.1668873280286789, -0.2075803130865097, 0.62225741147995, 0.5377742052078247, 0.9220063090324402, -0.3763325810432434, -0.12201811373233795, 0.7657729983329773, 0.3094666600227356, -0.021079804748296738, 0.09452970325946808, -0.3421561121940613, -0.675110399723053, -0.39381012320518494, -0.9292989373207092, -0.02900807373225689, 0.14551150798797607, -0.9038661122322083, 0.13694138824939728, -0.2759273648262024, -0.48989054560661316, -0.014045529998838902, -0.37573811411857605, -0.782771110534668, 0.14021587371826172, 0.325325608253479, 1.1225405931472778, -0.8611990213394165, 0.7014901638031006, 0.212110698223114, -0.6473526358604431, -1.0937762260437012, -0.20292560756206512, -0.04615039378404617, -0.4328711926937103, 0.4385097622871399, 0.21233324706554413, -0.07439430058002472, 0.09683220088481903, -0.7151008248329163, -0.9342403411865234, 1.223928451538086, 0.35844263434410095, -0.7611710429191589, -0.03976484388113022, -0.039558593183755875, 0.47676971554756165, -0.4151759743690491, 0.38680535554885864, 0.6701854467391968, 0.3772067725658417, 0.07399848848581314, -0.984281063079834, -0.19891566038131714, -0.32054901123046875, -0.13711021840572357, -0.13046447932720184, -0.49620944261550903, 0.7392443418502808, 0.009445566684007645, -0.2647501528263092, -0.20606555044651031, 0.5172361731529236, 0.05086180195212364, 0.20363950729370117, 0.664622962474823, 0.8096440434455872, 0.5344277620315552, -0.15860803425312042, 1.0788482427597046, -0.5294787287712097, 0.3325408101081848, 0.9006572961807251, 0.27077749371528625, 0.8374349474906921, 0.3186420798301697, -0.316539466381073, 0.30623722076416016, 0.7434109449386597, -0.11524464190006256, 0.6911482214927673, -0.07795161753892899, -0.10289883613586426, -0.2564123868942261, -0.1620645523071289, -0.40307021141052246, 0.7086466550827026, 0.26154229044914246, -0.3160551190376282, 0.3176186978816986, 0.36779820919036865, -0.10562285780906677, -0.1685338318347931, -0.31144964694976807, 0.7841594219207764, 0.06314931809902191, -0.35394400358200073, 0.8753756284713745, -0.14532539248466492, 0.9033287167549133, -0.5697925686836243, -0.019274501129984856, -0.17442284524440765, 0.05650129169225693, -0.3314151465892792, -0.54227614402771, 0.39369890093803406, -0.2764231860637665, -0.2501838803291321, -0.1534704566001892, 0.5344859957695007, -0.5850284099578857, -0.23103584349155426, 0.5402498841285706, 0.12051186710596085, 0.3166014850139618, -0.11409202963113785, -0.7625746130943298, 0.21546891331672668, 0.06393151730298996, -0.2017456293106079, -0.025967631489038467, 0.06239612400531769, 0.36601465940475464, 0.5157718062400818, 0.8485065698623657, 0.28277572989463806, -0.04144236072897911, 0.29607218503952026, 0.6530834436416626, -0.48108088970184326, -0.47350558638572693, -0.4735178053379059, 0.487594872713089, 0.01836564391851425, -0.03198465332388878, 0.5291215777397156, 0.5406264662742615, 1.0428606271743774, -0.2030651569366455, 0.46673384308815, 0.05575966462492943, 0.4962852895259857, -0.5565237998962402, 0.8382359147071838, -0.6891284584999084, 0.2092270702123642, -0.14469575881958008, -0.7290633320808411, -0.003609159030020237, 0.5284163951873779, 0.11915351450443268, 0.056575555354356766, 0.31651070713996887, 0.9483089447021484, -0.16564732789993286, 0.15619535744190216, 0.21782343089580536, 0.1729053407907486, 0.19274534285068512, 0.5698182582855225, 0.6173809766769409, -0.7981073260307312, 0.6507713794708252, -0.4625394940376282, -0.16144238412380219, -0.0924329161643982, -0.39316925406455994, -0.5516057014465332, -0.5508050918579102, -0.2875107526779175, -0.4508529007434845, 0.1797160804271698, 0.8757257461547852, 0.8967850208282471, -0.8419830203056335, -0.23360435664653778, 0.19121237099170685, -0.2665833532810211, -0.48308995366096497, -0.20772528648376465, 0.2980287969112396, 0.14788159728050232, -0.8345633745193481, 0.566867470741272, 0.08117788285017014, 0.1635553389787674, -0.19852368533611298, -0.32666781544685364, -0.21998479962348938, 0.0659044161438942, 0.39706486463546753, 0.2225312888622284, -0.5718662142753601, -0.22541725635528564, -0.018933037295937538, 0.022743387147784233, 0.27151888608932495, 0.5068901777267456, -0.6159080862998962, 0.5334058403968811, 0.5833681225776672, 0.47327157855033875, 0.9345352053642273, 0.05896933376789093, 0.1543121188879013, -0.5950978994369507, 0.29099202156066895, 0.35349464416503906, 0.4259010851383209, 0.4414992034435272, -0.23679731786251068, 0.5825385451316833, 0.3529703915119171, -0.6669501066207886, -0.8273628950119019, -0.10885978490114212, -1.0830532312393188, -0.225041002035141, 1.121041178703308, -0.09968286007642746, -0.37796255946159363, 0.19989319145679474, -0.05587129294872284, 0.6051671504974365, -0.4862503111362457, 0.3147417902946472, 0.4396441578865051, 0.013138921931385994, -0.11537358909845352, -0.860969066619873, 0.4987014830112457, 0.22006309032440186, -0.3665556311607361, -0.19876958429813385, 0.44965413212776184, 0.41149747371673584, 0.3501605987548828, 0.6745021343231201, -0.29097843170166016, 0.2744560241699219, 0.31972774863243103, 0.5099857449531555, -0.30672380328178406, -0.28145134449005127, -0.5625768899917603, 0.16906557977199554, -0.3692973852157593, -0.42671525478363037 ]
jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn
jonatasgrosman
"2022-12-14T01:58:32Z"
624,694
55
transformers
[ "transformers", "pytorch", "jax", "wav2vec2", "automatic-speech-recognition", "audio", "speech", "xlsr-fine-tuning-week", "zh", "dataset:common_voice", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-03-02T23:29:05Z"
--- language: zh datasets: - common_voice metrics: - wer - cer tags: - audio - automatic-speech-recognition - speech - xlsr-fine-tuning-week license: apache-2.0 model-index: - name: XLSR Wav2Vec2 Chinese (zh-CN) by Jonatas Grosman results: - task: name: Speech Recognition type: automatic-speech-recognition dataset: name: Common Voice zh-CN type: common_voice args: zh-CN metrics: - name: Test WER type: wer value: 82.37 - name: Test CER type: cer value: 19.03 --- # Fine-tuned XLSR-53 large model for speech recognition in Chinese Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Chinese using the train and validation splits of [Common Voice 6.1](https://huggingface.co/datasets/common_voice), [CSS10](https://github.com/Kyubyong/css10) and [ST-CMDS](http://www.openslr.org/38/). When using this model, make sure that your speech input is sampled at 16kHz. This model has been fine-tuned thanks to the GPU credits generously given by the [OVHcloud](https://www.ovhcloud.com/en/public-cloud/ai-training/) :) The script used for training can be found here: https://github.com/jonatasgrosman/wav2vec2-sprint ## Usage The model can be used directly (without a language model) as follows... Using the [HuggingSound](https://github.com/jonatasgrosman/huggingsound) library: ```python from huggingsound import SpeechRecognitionModel model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn") audio_paths = ["/path/to/file.mp3", "/path/to/another_file.wav"] transcriptions = model.transcribe(audio_paths) ``` Writing your own inference script: ```python import torch import librosa from datasets import load_dataset from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor LANG_ID = "zh-CN" MODEL_ID = "jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn" SAMPLES = 10 test_dataset = load_dataset("common_voice", LANG_ID, split=f"test[:{SAMPLES}]") processor = Wav2Vec2Processor.from_pretrained(MODEL_ID) model = Wav2Vec2ForCTC.from_pretrained(MODEL_ID) # Preprocessing the datasets. # We need to read the audio files as arrays def speech_file_to_array_fn(batch): speech_array, sampling_rate = librosa.load(batch["path"], sr=16_000) batch["speech"] = speech_array batch["sentence"] = batch["sentence"].upper() return batch test_dataset = test_dataset.map(speech_file_to_array_fn) inputs = processor(test_dataset["speech"], sampling_rate=16_000, return_tensors="pt", padding=True) with torch.no_grad(): logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits predicted_ids = torch.argmax(logits, dim=-1) predicted_sentences = processor.batch_decode(predicted_ids) for i, predicted_sentence in enumerate(predicted_sentences): print("-" * 100) print("Reference:", test_dataset[i]["sentence"]) print("Prediction:", predicted_sentence) ``` | Reference | Prediction | | ------------- | ------------- | | 宋朝末年年间定居粉岭围。 | 宋朝末年年间定居分定为 | | 渐渐行动不便 | 建境行动不片 | | 二十一年去世。 | 二十一年去世 | | 他们自称恰哈拉。 | 他们自称家哈<unk> | | 局部干涩的例子包括有口干、眼睛干燥、及阴道干燥。 | 菊物干寺的例子包括有口肝眼睛干照以及阴到干<unk> | | 嘉靖三十八年,登进士第三甲第二名。 | 嘉靖三十八年登进士第三甲第二名 | | 这一名称一直沿用至今。 | 这一名称一直沿用是心 | | 同时乔凡尼还得到包税合同和许多明矾矿的经营权。 | 同时桥凡妮还得到包税合同和许多民繁矿的经营权 | | 为了惩罚西扎城和塞尔柱的结盟,盟军在抵达后将外城烧毁。 | 为了曾罚西扎城和塞尔素的节盟盟军在抵达后将外曾烧毁 | | 河内盛产黄色无鱼鳞的鳍射鱼。 | 合类生场环色无鱼林的骑射鱼 | ## Evaluation The model can be evaluated as follows on the Chinese (zh-CN) test data of Common Voice. ```python import torch import re import librosa from datasets import load_dataset, load_metric from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor LANG_ID = "zh-CN" MODEL_ID = "jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn" DEVICE = "cuda" CHARS_TO_IGNORE = [",", "?", "¿", ".", "!", "¡", ";", ";", ":", '""', "%", '"', "�", "ʿ", "·", "჻", "~", "՞", "؟", "،", "।", "॥", "«", "»", "„", "“", "”", "「", "」", "‘", "’", "《", "》", "(", ")", "[", "]", "{", "}", "=", "`", "_", "+", "<", ">", "…", "–", "°", "´", "ʾ", "‹", "›", "©", "®", "—", "→", "。", "、", "﹂", "﹁", "‧", "~", "﹏", ",", "{", "}", "(", ")", "[", "]", "【", "】", "‥", "〽", "『", "』", "〝", "〟", "⟨", "⟩", "〜", ":", "!", "?", "♪", "؛", "/", "\\", "º", "−", "^", "'", "ʻ", "ˆ"] test_dataset = load_dataset("common_voice", LANG_ID, split="test") wer = load_metric("wer.py") # https://github.com/jonatasgrosman/wav2vec2-sprint/blob/main/wer.py cer = load_metric("cer.py") # https://github.com/jonatasgrosman/wav2vec2-sprint/blob/main/cer.py chars_to_ignore_regex = f"[{re.escape(''.join(CHARS_TO_IGNORE))}]" processor = Wav2Vec2Processor.from_pretrained(MODEL_ID) model = Wav2Vec2ForCTC.from_pretrained(MODEL_ID) model.to(DEVICE) # Preprocessing the datasets. # We need to read the audio files as arrays def speech_file_to_array_fn(batch): with warnings.catch_warnings(): warnings.simplefilter("ignore") speech_array, sampling_rate = librosa.load(batch["path"], sr=16_000) batch["speech"] = speech_array batch["sentence"] = re.sub(chars_to_ignore_regex, "", batch["sentence"]).upper() return batch test_dataset = test_dataset.map(speech_file_to_array_fn) # Preprocessing the datasets. # We need to read the audio files as arrays def evaluate(batch): inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True) with torch.no_grad(): logits = model(inputs.input_values.to(DEVICE), attention_mask=inputs.attention_mask.to(DEVICE)).logits pred_ids = torch.argmax(logits, dim=-1) batch["pred_strings"] = processor.batch_decode(pred_ids) return batch result = test_dataset.map(evaluate, batched=True, batch_size=8) predictions = [x.upper() for x in result["pred_strings"]] references = [x.upper() for x in result["sentence"]] print(f"WER: {wer.compute(predictions=predictions, references=references, chunk_size=1000) * 100}") print(f"CER: {cer.compute(predictions=predictions, references=references, chunk_size=1000) * 100}") ``` **Test Result**: In the table below I report the Word Error Rate (WER) and the Character Error Rate (CER) of the model. I ran the evaluation script described above on other models as well (on 2021-05-13). Note that the table below may show different results from those already reported, this may have been caused due to some specificity of the other evaluation scripts used. | Model | WER | CER | | ------------- | ------------- | ------------- | | jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn | **82.37%** | **19.03%** | | ydshieh/wav2vec2-large-xlsr-53-chinese-zh-cn-gpt | 84.01% | 20.95% | ## Citation If you want to cite this model you can use this: ```bibtex @misc{grosman2021xlsr53-large-chinese, title={Fine-tuned {XLSR}-53 large model for speech recognition in {C}hinese}, author={Grosman, Jonatas}, howpublished={\url{https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn}}, year={2021} } ```
[ -0.273027241230011, -0.603310763835907, 0.1430707424879074, 0.23011471331119537, -0.18048082292079926, -0.2635737657546997, -0.4187580943107605, -0.5135385394096375, 0.059535883367061615, 0.35378071665763855, -0.6050141453742981, -0.7258148193359375, -0.4344402253627777, -0.09741226583719254, -0.1865232288837433, 0.9884642362594604, 0.18268723785877228, 0.12691694498062134, 0.2587055265903473, -0.14756600558757782, -0.35715508460998535, -0.3688575029373169, -0.6585763096809387, -0.3581339120864868, 0.318746417760849, 0.20160047709941864, 0.44292527437210083, 0.4979948103427887, 0.36696749925613403, 0.3328961730003357, -0.16674555838108063, 0.1783882975578308, -0.22513797879219055, -0.24216897785663605, 0.20928770303726196, -0.41534554958343506, -0.4739997386932373, 0.026783423498272896, 0.6948277354240417, 0.48766815662384033, -0.23382225632667542, 0.38777559995651245, 0.06844493746757507, 0.4728514552116394, -0.22441765666007996, 0.2838141620159149, -0.5751243233680725, -0.1738765686750412, -0.1650751531124115, -0.0849689319729805, -0.2459268867969513, -0.35850727558135986, 0.19299855828285217, -0.6085651516914368, 0.17301876842975616, -0.059079285711050034, 1.249866247177124, 0.1454331874847412, -0.06251288205385208, -0.4034796953201294, -0.5582454204559326, 1.0220140218734741, -1.1306359767913818, 0.22468972206115723, 0.481578528881073, 0.13294507563114166, -0.15407754480838776, -0.8727840781211853, -0.720381498336792, -0.1301700621843338, -0.05553414300084114, 0.22847355902194977, -0.36690452694892883, -0.03936300426721573, 0.33816760778427124, 0.13174308836460114, -0.6925725936889648, 0.04258115217089653, -0.7010758519172668, -0.39959990978240967, 0.8648077845573425, -0.030629290267825127, 0.45019251108169556, -0.30932945013046265, -0.21493157744407654, -0.4697114825248718, -0.30864861607551575, 0.3963537812232971, 0.3964190185070038, 0.5310627818107605, -0.6155216693878174, 0.4714156985282898, -0.08349043130874634, 0.6938800811767578, 0.004897684790194035, -0.38444316387176514, 0.8575577735900879, -0.3400355279445648, -0.3680155575275421, 0.3062446713447571, 1.1911698579788208, 0.3240925371646881, 0.31717026233673096, 0.2104339301586151, -0.095120370388031, 0.17273128032684326, -0.3816082179546356, -0.7434445023536682, -0.32765892148017883, 0.48794445395469666, -0.49721071124076843, -0.08952921628952026, 0.013461030088365078, -0.67005854845047, -0.018448859453201294, -0.16691040992736816, 0.6958298683166504, -0.5863953232765198, -0.3327177166938782, 0.19407446682453156, -0.1737305223941803, 0.19984957575798035, -0.09771818667650223, -0.9375696778297424, 0.1250438243150711, 0.4182164967060089, 0.8016433119773865, 0.37045565247535706, -0.3822179436683655, -0.44574692845344543, -0.11502382159233093, -0.2167537957429886, 0.5419818162918091, -0.1444593071937561, -0.3765462040901184, -0.23407596349716187, 0.10036750882863998, -0.371113121509552, -0.4944291114807129, 0.7523434162139893, -0.111273393034935, 0.32387158274650574, -0.3113110065460205, -0.4076055884361267, -0.3243083655834198, -0.13362184166908264, -0.5392237901687622, 1.12645423412323, 0.011987629346549511, -0.9073312282562256, 0.08255858719348907, -0.5783302187919617, -0.5192176103591919, -0.2708621919155121, -0.17739509046077728, -0.5273829698562622, -0.263169527053833, 0.4014233946800232, 0.5118355751037598, -0.41059446334838867, 0.10153470933437347, -0.12855926156044006, -0.5744075179100037, 0.35605722665786743, -0.3681725859642029, 1.2162141799926758, 0.3338589668273926, -0.5053492784500122, 0.12041615694761276, -0.9531750679016113, 0.2741100490093231, 0.19964472949504852, -0.413895845413208, -0.10482849180698395, 0.017527511343359947, 0.3286689817905426, 0.2309088557958603, 0.2244284600019455, -0.5222259163856506, -0.0784931629896164, -0.6933862566947937, 0.6294267177581787, 0.5907225608825684, -0.11931360512971878, 0.09977774322032928, -0.4961627721786499, 0.2773693799972534, -0.022580435499548912, -0.15791669487953186, -0.195829838514328, -0.4335871636867523, -0.7816740274429321, -0.3360319137573242, 0.2473931759595871, 0.6895646452903748, -0.4147157073020935, 0.7288694977760315, -0.25706028938293457, -0.8815529942512512, -0.9608324766159058, -0.10147656500339508, 0.38321778178215027, 0.584606409072876, 0.5483890771865845, -0.007393982727080584, -0.9323248863220215, -0.8243206739425659, -0.08500009775161743, -0.3434653878211975, -0.06672391295433044, 0.35019972920417786, 0.49534735083580017, -0.30294209718704224, 0.7619414329528809, -0.4775930941104889, -0.42213502526283264, -0.31721076369285583, 0.10953933745622635, 0.6855989098548889, 0.6705273389816284, 0.456650972366333, -0.6935977339744568, -0.47270500659942627, 0.06327061355113983, -0.5894579887390137, -0.11510082334280014, -0.24288558959960938, -0.011954802088439465, 0.1755533367395401, 0.34471482038497925, -0.4757794737815857, 0.2553107738494873, 0.5698729753494263, -0.310358464717865, 0.6618578433990479, -0.09562048316001892, 0.15103468298912048, -1.2041895389556885, 0.17289498448371887, 0.045876532793045044, 0.04310322552919388, -0.5773732662200928, -0.3674137592315674, -0.09893491864204407, 0.22386540472507477, -0.4435829520225525, 0.450088232755661, -0.4292791485786438, -0.08466687798500061, -0.02742905728518963, 0.22238987684249878, -0.05282934382557869, 0.7111697196960449, 0.038424670696258545, 0.7008165717124939, 0.7392836809158325, -0.6134722232818604, 0.4569914937019348, 0.3660013973712921, -0.6701236367225647, 0.18390688300132751, -0.8904803991317749, 0.2950862944126129, 0.07170567661523819, 0.14724686741828918, -1.050735592842102, -0.1199554055929184, 0.3137185871601105, -0.8190670013427734, 0.2066526561975479, 0.05704968050122261, -0.4424420893192291, -0.5227958559989929, -0.1544657200574875, 0.19419239461421967, 0.6682621836662292, -0.44643187522888184, 0.5449504256248474, 0.3796234130859375, -0.08705759793519974, -0.7596762776374817, -0.9732145667076111, -0.27216586470603943, -0.2539230287075043, -0.8310928344726562, 0.3376414179801941, -0.08386804163455963, -0.09742403775453568, -0.0747225359082222, -0.07594496756792068, 0.03549158200621605, -0.08941828459501266, 0.2773810923099518, 0.3965831696987152, -0.29079872369766235, -0.13660581409931183, -0.1313800811767578, 0.06710749864578247, 0.05352552607655525, -0.14370998740196228, 0.8001808524131775, -0.1684541255235672, -0.1360778510570526, -0.806597113609314, 0.10048935562372208, 0.452700674533844, -0.38760364055633545, 0.5453855991363525, 0.9909160137176514, -0.3932478427886963, -0.017949463799595833, -0.47639766335487366, 0.02697623148560524, -0.49562716484069824, 0.8484539985656738, -0.2889900207519531, -0.6264262199401855, 0.7206637263298035, 0.3154670000076294, 0.15371839702129364, 0.6951104402542114, 0.5879229307174683, -0.19129370152950287, 0.993766188621521, 0.25132185220718384, -0.23099158704280853, 0.39348354935646057, -0.6879596710205078, -0.01855986751616001, -0.9741779565811157, -0.43215975165367126, -0.7399301528930664, -0.20798033475875854, -0.5848348140716553, -0.4616076648235321, 0.28191402554512024, 0.053640320897102356, -0.36905184388160706, 0.4416176378726959, -0.6558677554130554, 0.1750546246767044, 0.5002945065498352, 0.10610505938529968, -0.07862384617328644, 0.12041358649730682, -0.22852835059165955, -0.008811233565211296, -0.5335463881492615, -0.4550207555294037, 1.076884150505066, 0.4623050391674042, 0.5981560945510864, -0.025969957932829857, 0.6382609009742737, 0.05987048149108887, -0.06518366932868958, -0.7463942170143127, 0.49416741728782654, -0.323318749666214, -0.5730595588684082, -0.37491515278816223, -0.3582518398761749, -0.9676498174667358, 0.3418567180633545, -0.13752776384353638, -1.101766586303711, 0.1767791211605072, -0.06876832246780396, -0.5466108322143555, 0.24301178753376007, -0.5923014283180237, 0.8262032866477966, -0.122219018638134, -0.05718333274126053, -0.1483578234910965, -0.6448512077331543, 0.3209715783596039, 0.07458414137363434, 0.3645845055580139, -0.2119767665863037, 0.3906342387199402, 1.3545477390289307, -0.28852081298828125, 0.7639158964157104, -0.17041556537151337, -0.06896580010652542, 0.5506852865219116, -0.351216197013855, 0.4767218232154846, -0.188400998711586, -0.360134482383728, 0.3343675136566162, 0.32465046644210815, -0.17200952768325806, -0.3000408113002777, 0.6404367685317993, -1.0537678003311157, -0.3375042974948883, -0.46371525526046753, -0.571806013584137, 0.005228755064308643, 0.25682511925697327, 0.7207250595092773, 0.6111764907836914, -0.06661193072795868, 0.3221350610256195, 0.4007396101951599, -0.41291162371635437, 0.5431168675422668, 0.36767035722732544, -0.1014154851436615, -0.7281390428543091, 0.7784669995307922, 0.30634593963623047, 0.24041813611984253, 0.1687360554933548, 0.2086220681667328, -0.488118439912796, -0.4744860529899597, -0.24573777616024017, 0.37286683917045593, -0.6389642357826233, -0.03561052307486534, -0.6675541996955872, -0.3598034083843231, -0.7973307371139526, 0.11446341872215271, -0.31885290145874023, -0.2290966510772705, -0.5116283297538757, -0.00820207316428423, 0.3975830078125, 0.32916808128356934, -0.21645775437355042, 0.38767001032829285, -0.7642877101898193, 0.4125518202781677, -0.0064143231138587, -0.025673791766166687, 0.08460179716348648, -0.8838769197463989, -0.529944121837616, 0.24755363166332245, -0.19411256909370422, -0.8601135611534119, 0.5835589170455933, 0.19522209465503693, 0.5172785520553589, 0.27624115347862244, 0.009908285923302174, 0.89829421043396, -0.3762117922306061, 0.8887113928794861, 0.35079312324523926, -1.0965015888214111, 0.6420761942863464, -0.3580390512943268, 0.23798425495624542, 0.32319965958595276, 0.11336839199066162, -0.8157806396484375, -0.20752424001693726, -0.6085216999053955, -1.001238465309143, 1.1280332803726196, 0.2720073163509369, 0.11557649821043015, 0.15129470825195312, 0.07148592174053192, -0.17208682000637054, 0.02272857166826725, -0.7165762186050415, -0.6993308067321777, -0.2706735134124756, -0.38862091302871704, -0.23282110691070557, -0.09723293036222458, -0.06388696283102036, -0.45362770557403564, 0.997978150844574, 0.12182972580194473, 0.3854847252368927, 0.49963781237602234, 0.08258012682199478, -0.03607376292347908, 0.2731683850288391, 0.5599140524864197, 0.27483445405960083, -0.42141667008399963, -0.1563618928194046, 0.29744958877563477, -0.6880916953086853, 0.057759128510951996, 0.21706989407539368, -0.10127867013216019, 0.2072153091430664, 0.5725768804550171, 1.2143867015838623, 0.1123393326997757, -0.5327680706977844, 0.27235230803489685, -0.03834238275885582, -0.3026809096336365, -0.661297082901001, 0.13590390980243683, 0.35198262333869934, 0.2853439748287201, 0.5299468040466309, 0.10128913074731827, -0.07433481514453888, -0.5076946020126343, 0.22960709035396576, 0.2675354480743408, -0.23553326725959778, -0.2746439576148987, 0.7483313083648682, -0.004900180734694004, -0.2586407959461212, 0.6086111068725586, 0.04237504303455353, -0.5060353875160217, 0.9493136405944824, 0.597953200340271, 0.8673173189163208, -0.326560378074646, 0.010235598310828209, 0.7994571328163147, 0.37306034564971924, -0.2212885320186615, 0.5377885699272156, 0.062408696860075, -0.8329699039459229, -0.19927692413330078, -0.673112154006958, -0.032464466989040375, 0.3977097272872925, -0.8116555213928223, 0.44605177640914917, -0.39057204127311707, -0.30840983986854553, 0.23685391247272491, 0.2755635380744934, -0.6883420348167419, 0.4069613516330719, 0.30942943692207336, 0.8733688592910767, -0.8481754064559937, 1.1093876361846924, 0.3957006633281708, -0.5193949937820435, -1.484107255935669, -0.04989027604460716, -0.17657910287380219, -0.6951398253440857, 0.602271318435669, 0.3020530045032501, -0.09094929695129395, 0.1271941214799881, -0.4151700735092163, -1.012091875076294, 1.2297205924987793, 0.3461214005947113, -0.7666382193565369, -0.053240735083818436, -0.026733579114079475, 0.5125238299369812, -0.30104827880859375, 0.39444372057914734, 0.7775173187255859, 0.6272622346878052, 0.019615042954683304, -1.1180592775344849, 0.09643954783678055, -0.39231011271476746, -0.23494675755500793, -0.2048254758119583, -0.7281832098960876, 1.1449109315872192, -0.4318189024925232, -0.24295927584171295, 0.2113165408372879, 0.8876440525054932, 0.5840635895729065, 0.43234795331954956, 0.5427052974700928, 0.4284892678260803, 0.9612357020378113, -0.19777077436447144, 0.7815830707550049, -0.10882934927940369, 0.584880530834198, 1.1343176364898682, -0.16479231417179108, 1.0327465534210205, 0.24133282899856567, -0.4724242091178894, 0.6219142079353333, 0.6239505410194397, -0.4108160436153412, 0.588215708732605, 0.1444960981607437, -0.09766992181539536, -0.03565447777509689, -0.01596718281507492, -0.6578699350357056, 0.7232904434204102, 0.3218560814857483, -0.4024418294429779, 0.19265927374362946, -0.06393406540155411, 0.24406413733959198, -0.09822787344455719, -0.1705387383699417, 0.46931883692741394, 0.20207518339157104, -0.539573073387146, 1.0041167736053467, 0.08131817728281021, 0.9789935946464539, -0.7457157969474792, 0.14474943280220032, 0.22607949376106262, 0.24424847960472107, -0.4521242678165436, -0.6221110224723816, 0.11133112758398056, 0.05355297401547432, -0.16057217121124268, 0.2496209591627121, 0.33980196714401245, -0.6862128973007202, -0.6171498894691467, 0.5465274453163147, 0.025239909067749977, 0.3919479250907898, 0.1401396244764328, -0.9320303201675415, 0.28470325469970703, 0.4348304271697998, -0.44773563742637634, 0.020015127956867218, 0.2244018167257309, 0.22410760819911957, 0.46675369143486023, 0.8444792032241821, 0.3735577166080475, 0.0684918463230133, 0.17352017760276794, 0.625935435295105, -0.7479533553123474, -0.6276131272315979, -0.846758246421814, 0.6229785680770874, 0.033111292868852615, -0.32972440123558044, 0.7129272818565369, 0.6499378681182861, 0.8052663803100586, 0.013990693725645542, 0.9928651452064514, -0.20274755358695984, 0.6289060711860657, -0.6016591191291809, 1.0051383972167969, -0.5854207277297974, 0.2568848729133606, -0.4561077058315277, -0.6871590614318848, -0.09092161804437637, 0.8369448184967041, -0.276919424533844, 0.1839226931333542, 0.5601230263710022, 1.0421496629714966, 0.1712028831243515, -0.06456591933965683, 0.2422066032886505, 0.4247918426990509, 0.3230889141559601, 0.8476927280426025, 0.41686922311782837, -0.8981177806854248, 0.730488121509552, -0.5187575817108154, -0.04142490029335022, -0.04022844508290291, -0.5553422570228577, -0.8102298378944397, -0.8127643465995789, -0.41243380308151245, -0.5962629318237305, -0.16519050300121307, 1.1546430587768555, 0.6678053736686707, -0.8988828063011169, -0.4403967261314392, 0.24070486426353455, -0.04960497468709946, -0.42515885829925537, -0.23177921772003174, 0.9204391837120056, 0.06723946332931519, -0.9958202242851257, 0.4502289593219757, -0.2610936164855957, 0.09216778725385666, 0.015206302516162395, -0.31879863142967224, -0.2862835228443146, 0.12338773161172867, 0.16081498563289642, 0.3803154230117798, -0.9152231216430664, -0.13742917776107788, -0.0756482183933258, -0.2692265510559082, 0.0771298035979271, 0.22727569937705994, -0.5670202374458313, 0.3301626145839691, 0.5957921743392944, 0.13122506439685822, 0.429038941860199, -0.18351633846759796, 0.31507542729377747, -0.4547191262245178, 0.3393441140651703, 0.0804714560508728, 0.5659950971603394, 0.4260450601577759, -0.32904568314552307, 0.3474022448062897, 0.2128845602273941, -0.5088452100753784, -1.0450820922851562, -0.2754819691181183, -1.293904185295105, -0.17036278545856476, 1.2546616792678833, -0.2580866515636444, -0.2980899214744568, 0.10529894381761551, -0.4370402693748474, 0.847046971321106, -0.47395607829093933, 0.5469173789024353, 0.6101441383361816, -0.005510671064257622, 0.08752862364053726, -0.6136451959609985, 0.46532878279685974, 0.44511058926582336, -0.5064843893051147, 0.07748671621084213, 0.24403348565101624, 0.5608984231948853, 0.24217551946640015, 0.8219771981239319, -0.14983071386814117, 0.3617200255393982, 0.10268185287714005, 0.44019266963005066, -0.17846573889255524, 0.05345264449715614, -0.44085824489593506, -0.09378328919410706, -0.2516978681087494, -0.5717136263847351 ]
distilbert-base-cased
null
"2023-09-11T20:34:52Z"
618,988
24
transformers
[ "transformers", "pytorch", "tf", "onnx", "safetensors", "distilbert", "fill-mask", "en", "dataset:bookcorpus", "dataset:wikipedia", "arxiv:1910.01108", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:04Z"
--- language: en license: apache-2.0 datasets: - bookcorpus - wikipedia --- # Model Card for DistilBERT base model (cased) This model is a distilled version of the [BERT base model](https://huggingface.co/bert-base-cased). It was introduced in [this paper](https://arxiv.org/abs/1910.01108). The code for the distillation process can be found [here](https://github.com/huggingface/transformers/tree/main/examples/research_projects/distillation). This model is cased: it does make a difference between english and English. All the training details on the pre-training, the uses, limitations and potential biases (included below) are the same as for [DistilBERT-base-uncased](https://huggingface.co/distilbert-base-uncased). We highly encourage to check it if you want to know more. ## Model description DistilBERT is a transformers model, smaller and faster than BERT, which was pretrained on the same corpus in a self-supervised fashion, using the BERT base model as a teacher. This means it was pretrained on the raw texts 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 texts using the BERT base model. More precisely, it was pretrained with three objectives: - Distillation loss: the model was trained to return the same probabilities as the BERT base model. - Masked language modeling (MLM): this is part of the original training loss of the BERT base model. When taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence. - Cosine embedding loss: the model was also trained to generate hidden states as close as possible as the BERT base model. This way, the model learns the same inner representation of the English language than its teacher model, while being faster for inference or downstream tasks. ## Intended uses & limitations You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?filter=distilbert) to look for fine-tuned versions on a task that interests you. Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2. ### How to use You can use this model directly with a pipeline for masked language modeling: ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='distilbert-base-uncased') >>> unmasker("Hello I'm a [MASK] model.") [{'sequence': "[CLS] hello i'm a role model. [SEP]", 'score': 0.05292855575680733, 'token': 2535, 'token_str': 'role'}, {'sequence': "[CLS] hello i'm a fashion model. [SEP]", 'score': 0.03968575969338417, 'token': 4827, 'token_str': 'fashion'}, {'sequence': "[CLS] hello i'm a business model. [SEP]", 'score': 0.034743521362543106, 'token': 2449, 'token_str': 'business'}, {'sequence': "[CLS] hello i'm a model model. [SEP]", 'score': 0.03462274372577667, 'token': 2944, 'token_str': 'model'}, {'sequence': "[CLS] hello i'm a modeling model. [SEP]", 'score': 0.018145186826586723, 'token': 11643, 'token_str': 'modeling'}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import DistilBertTokenizer, DistilBertModel tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased') model = DistilBertModel.from_pretrained("distilbert-base-uncased") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` and in TensorFlow: ```python from transformers import DistilBertTokenizer, TFDistilBertModel tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased') model = TFDistilBertModel.from_pretrained("distilbert-base-uncased") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions. It also inherits some of [the bias of its teacher model](https://huggingface.co/bert-base-uncased#limitations-and-bias). ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='distilbert-base-uncased') >>> unmasker("The White man worked as a [MASK].") [{'sequence': '[CLS] the white man worked as a blacksmith. [SEP]', 'score': 0.1235365942120552, 'token': 20987, 'token_str': 'blacksmith'}, {'sequence': '[CLS] the white man worked as a carpenter. [SEP]', 'score': 0.10142576694488525, 'token': 10533, 'token_str': 'carpenter'}, {'sequence': '[CLS] the white man worked as a farmer. [SEP]', 'score': 0.04985016956925392, 'token': 7500, 'token_str': 'farmer'}, {'sequence': '[CLS] the white man worked as a miner. [SEP]', 'score': 0.03932540491223335, 'token': 18594, 'token_str': 'miner'}, {'sequence': '[CLS] the white man worked as a butcher. [SEP]', 'score': 0.03351764753460884, 'token': 14998, 'token_str': 'butcher'}] >>> unmasker("The Black woman worked as a [MASK].") [{'sequence': '[CLS] the black woman worked as a waitress. [SEP]', 'score': 0.13283951580524445, 'token': 13877, 'token_str': 'waitress'}, {'sequence': '[CLS] the black woman worked as a nurse. [SEP]', 'score': 0.12586183845996857, 'token': 6821, 'token_str': 'nurse'}, {'sequence': '[CLS] the black woman worked as a maid. [SEP]', 'score': 0.11708822101354599, 'token': 10850, 'token_str': 'maid'}, {'sequence': '[CLS] the black woman worked as a prostitute. [SEP]', 'score': 0.11499975621700287, 'token': 19215, 'token_str': 'prostitute'}, {'sequence': '[CLS] the black woman worked as a housekeeper. [SEP]', 'score': 0.04722772538661957, 'token': 22583, 'token_str': 'housekeeper'}] ``` This bias will also affect all fine-tuned versions of this model. ## Training data DistilBERT pretrained on the same data as BERT, which is [BookCorpus](https://yknzhu.wixsite.com/mbweb), a dataset consisting of 11,038 unpublished books and [English Wikipedia](https://en.wikipedia.org/wiki/English_Wikipedia) (excluding lists, tables and headers). ## Training procedure ### Preprocessing The texts are lowercased and tokenized using WordPiece and a vocabulary size of 30,000. The inputs of the model are then of the form: ``` [CLS] Sentence A [SEP] Sentence B [SEP] ``` With probability 0.5, sentence A and sentence B correspond to two consecutive sentences in the original corpus and in the other cases, it's another random sentence in the corpus. Note that what is considered a sentence here is a consecutive span of text usually longer than a single sentence. The only constrain is that the result with the two "sentences" has a combined length of less than 512 tokens. The details of the masking procedure for each sentence are the following: - 15% of the tokens are masked. - In 80% of the cases, the masked tokens are replaced by `[MASK]`. - In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace. - In the 10% remaining cases, the masked tokens are left as is. ### Pretraining The model was trained on 8 16 GB V100 for 90 hours. See the [training code](https://github.com/huggingface/transformers/tree/master/examples/distillation) for all hyperparameters details. ## Evaluation results When fine-tuned on downstream tasks, this model achieves the following results: Glue test results: | Task | MNLI | QQP | QNLI | SST-2 | CoLA | STS-B | MRPC | RTE | |:----:|:----:|:----:|:----:|:-----:|:----:|:-----:|:----:|:----:| | | 81.5 | 87.8 | 88.2 | 90.4 | 47.2 | 85.5 | 85.6 | 60.6 | ### BibTeX entry and citation info ```bibtex @article{Sanh2019DistilBERTAD, title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter}, author={Victor Sanh and Lysandre Debut and Julien Chaumond and Thomas Wolf}, journal={ArXiv}, year={2019}, volume={abs/1910.01108} } ``` <a href="https://huggingface.co/exbert/?model=distilbert-base-uncased"> <img width="300px" src="https://cdn-media.huggingface.co/exbert/button.png"> </a>
[ -0.06262830644845963, -0.6531773209571838, 0.25103819370269775, 0.2766072452068329, -0.5951876640319824, 0.0589112751185894, -0.009882329031825066, -0.08241069316864014, 0.35864555835723877, 0.40498843789100647, -0.5385099053382874, -0.4543393552303314, -0.924003005027771, 0.17596979439258575, -0.5421420931816101, 1.2322068214416504, 0.19993047416210175, 0.262376993894577, 0.08114068955183029, 0.12647612392902374, -0.37872588634490967, -0.8250371813774109, -0.6942254900932312, -0.2783273458480835, 0.4582267701625824, 0.26696690917015076, 0.6427998542785645, 0.6544402241706848, 0.43768230080604553, 0.4240359961986542, -0.14365635812282562, -0.1460631787776947, -0.4569641053676605, 0.08027204871177673, -0.10161793231964111, -0.5326862335205078, -0.339383065700531, 0.22658571600914001, 0.36718812584877014, 0.8524661064147949, -0.055838000029325485, 0.4601893424987793, -0.03775683045387268, 0.592684805393219, -0.34482789039611816, 0.3089909255504608, -0.5785876512527466, 0.08738555014133453, -0.2861935496330261, 0.14209681749343872, -0.4075639247894287, -0.18895386159420013, 0.11117397248744965, -0.5327448844909668, 0.319816529750824, 0.1671585887670517, 1.0633151531219482, 0.19965144991874695, -0.26637032628059387, -0.07595483213663101, -0.58281010389328, 0.7490413188934326, -0.7041948437690735, 0.04609370604157448, 0.4720058739185333, 0.26992034912109375, -0.2039487659931183, -1.1138440370559692, -0.496788889169693, -0.01701487973332405, -0.23102949559688568, 0.09587139636278152, -0.07871987670660019, -0.07249299436807632, 0.49427738785743713, 0.573080837726593, -0.30197250843048096, -0.08521337807178497, -0.8167337775230408, -0.3008613884449005, 0.6342217922210693, 0.1906464695930481, 0.11044421046972275, -0.3287551701068878, -0.31721076369285583, -0.30558791756629944, -0.1745898276567459, 0.02065184712409973, 0.6425759196281433, 0.4156128764152527, -0.2163991928100586, 0.7690848708152771, -0.24261672794818878, 0.6332213282585144, 0.08781903237104416, -0.05964987352490425, 0.4839034378528595, -0.0992220938205719, -0.4558485448360443, 0.0799037516117096, 0.9142047166824341, 0.33071818947792053, 0.39535394310951233, 0.05867729336023331, -0.2563805878162384, 0.18780206143856049, 0.317594438791275, -0.7181563973426819, -0.4168092608451843, 0.09740937501192093, -0.5732662677764893, -0.4827691316604614, 0.4479832649230957, -0.640316903591156, -0.103851318359375, -0.11685939133167267, 0.5687115788459778, -0.21959532797336578, -0.1840074360370636, 0.16057004034519196, -0.6380937695503235, 0.08961005508899689, 0.034847110509872437, -0.9892264604568481, 0.29954347014427185, 0.6519182324409485, 0.9056218862533569, 0.2660056948661804, -0.08659257739782333, -0.4014818072319031, -0.23473550379276276, -0.1525832861661911, 0.2897452116012573, -0.26135945320129395, -0.5668106079101562, -0.06352877616882324, 0.33356642723083496, -0.0033802983816713095, -0.32014307379722595, 0.6479649543762207, -0.46282723546028137, 0.4575558602809906, -0.033015426248311996, -0.4613019824028015, -0.2942587435245514, 0.07308163493871689, -0.7794954180717468, 1.2058724164962769, 0.4205721318721771, -0.8690106868743896, 0.34720537066459656, -0.8203275203704834, -0.5835908055305481, 0.16287776827812195, 0.23105867207050323, -0.4677314758300781, 0.2872679829597473, 0.01210258062928915, 0.3632899820804596, -0.0744296982884407, 0.2755453884601593, -0.29142946004867554, -0.4738253057003021, 0.32641366124153137, -0.36498862504959106, 1.1560626029968262, 0.2434736043214798, -0.33991435170173645, -0.00134851667098701, -0.8884681463241577, -0.11808013916015625, 0.28315433859825134, -0.2503260672092438, -0.32146963477134705, -0.164138525724411, 0.3040499687194824, 0.129355326294899, 0.35910263657569885, -0.6836824417114258, 0.2730776071548462, -0.4450482726097107, 0.6622318029403687, 0.805083692073822, -0.10341425985097885, 0.2528979480266571, -0.3347463011741638, 0.47101160883903503, 0.08898026496171951, 0.019429652020335197, -0.11945338547229767, -0.6013150811195374, -0.7932247519493103, -0.3693687319755554, 0.6014490127563477, 0.7021793723106384, -0.4170709550380707, 0.6815059781074524, 0.043605905026197433, -0.6282919645309448, -0.6504377126693726, -0.14847742021083832, 0.2176160216331482, 0.6023343801498413, 0.37790054082870483, -0.39702272415161133, -0.8628029227256775, -0.802253782749176, -0.17374324798583984, -0.20208995044231415, -0.13519562780857086, -0.05435314029455185, 0.7341697216033936, -0.3002902865409851, 0.8250555992126465, -0.8686258792877197, -0.36037617921829224, -0.11189058423042297, 0.2105674296617508, 0.7341374754905701, 0.6686908006668091, 0.38125547766685486, -0.6757985353469849, -0.49303823709487915, -0.3717110753059387, -0.5690528154373169, -0.0051939357072114944, 0.11931315064430237, -0.22170160710811615, 0.0068922811187803745, 0.5331826210021973, -0.7142185568809509, 0.6798441410064697, 0.34194207191467285, -0.5299909710884094, 0.6837075352668762, -0.33611956238746643, -0.04953182488679886, -1.3402414321899414, 0.17314352095127106, -0.10498109459877014, -0.3780331313610077, -0.738331139087677, -0.0742899626493454, -0.16263198852539062, -0.03443179279565811, -0.5818230509757996, 0.44967809319496155, -0.44476518034935, 0.05052415281534195, -0.026043368503451347, -0.2091856747865677, 0.1728452742099762, 0.45462921261787415, -0.035042617470026016, 0.5352870225906372, 0.5787067413330078, -0.5187172293663025, 0.6407526135444641, 0.4129493534564972, -0.49943864345550537, 0.2409953773021698, -0.8605222105979919, 0.1831618696451187, -0.02137107029557228, 0.05005338415503502, -1.0757702589035034, -0.15265269577503204, 0.2434096336364746, -0.47959771752357483, 0.2230215221643448, -0.24733804166316986, -0.6865608096122742, -0.6495212316513062, -0.22437012195587158, 0.5419360995292664, 0.6543636322021484, -0.24975159764289856, 0.4300670325756073, 0.27988800406455994, -0.109859399497509, -0.6996635794639587, -0.7412127256393433, 0.003619695082306862, -0.3079741895198822, -0.4484094977378845, 0.4474143385887146, 0.0066688875667750835, -0.2537723779678345, -0.13659831881523132, 0.024327026680111885, -0.11823104321956635, 0.16366629302501678, 0.3037111461162567, 0.49728718400001526, -0.12167448550462723, -0.15568433701992035, -0.12343703210353851, -0.17392072081565857, 0.2608703076839447, -0.21492214500904083, 0.785286545753479, 0.05741215497255325, -0.09921461343765259, -0.3403167426586151, 0.2724961042404175, 0.6476064920425415, -0.048292819410562515, 0.7538208961486816, 0.6953648328781128, -0.5385767221450806, 0.04106723144650459, -0.2892989218235016, -0.17972229421138763, -0.5201751589775085, 0.49955055117607117, -0.4313044846057892, -0.7712659239768982, 0.7637299299240112, 0.2429901659488678, -0.14724746346473694, 0.8280078172683716, 0.6372241973876953, -0.19365015625953674, 0.9788265228271484, 0.4934728145599365, -0.11776717752218246, 0.4006059765815735, -0.24482271075248718, 0.2830006778240204, -0.7218224406242371, -0.4612676501274109, -0.4552285671234131, -0.3883172273635864, -0.5163204073905945, -0.17617221176624298, 0.2008022516965866, 0.29945477843284607, -0.39699146151542664, 0.6061808466911316, -0.6843459606170654, 0.3663325309753418, 0.9022278785705566, 0.22524401545524597, -0.048470061272382736, -0.1651453673839569, -0.2657946050167084, 0.05097882077097893, -0.372505784034729, -0.41672655940055847, 1.0610955953598022, 0.5565937161445618, 0.768989622592926, -0.007814968004822731, 0.6977015137672424, 0.3965122401714325, 0.09110414981842041, -0.6443774104118347, 0.4673629701137543, -0.4015486538410187, -0.8856256008148193, -0.3623605966567993, -0.12808190286159515, -0.9872401356697083, 0.20816080272197723, -0.25159862637519836, -0.7992786169052124, -0.033106498420238495, -0.048623550683259964, -0.37151551246643066, 0.1936347484588623, -0.728678286075592, 1.157735824584961, -0.3016890585422516, -0.13751433789730072, 0.11655281484127045, -0.8583752512931824, 0.26218369603157043, 0.033642545342445374, 0.07500749826431274, -0.16428446769714355, 0.33579838275909424, 0.9466930031776428, -0.6947129964828491, 0.9366075396537781, -0.32417741417884827, 0.23292993009090424, 0.16861769556999207, -0.05533915013074875, 0.32276567816734314, 0.08955846726894379, 0.007060842122882605, 0.36289989948272705, 0.10530261695384979, -0.4460933208465576, -0.19272667169570923, 0.3443780243396759, -0.7264095544815063, -0.5796857476234436, -0.7231541872024536, -0.5135307908058167, 0.25875937938690186, 0.32813161611557007, 0.6249478459358215, 0.5024810433387756, -0.19501282274723053, 0.26190125942230225, 0.3962261974811554, -0.1531619131565094, 0.697032630443573, 0.25810134410858154, -0.20825320482254028, -0.45105260610580444, 0.46705299615859985, 0.017627619206905365, 0.06714028120040894, 0.4550537168979645, 0.22092927992343903, -0.6479477882385254, -0.22905106842517853, -0.46376004815101624, 0.060760341584682465, -0.6060851216316223, -0.3756982684135437, -0.6446847319602966, -0.511573076248169, -0.5831046104431152, 0.00037127823452465236, -0.08756572008132935, -0.5037012696266174, -0.7389448881149292, -0.3282585144042969, 0.560092568397522, 0.6503041386604309, -0.10948526859283447, 0.6089732646942139, -0.7523296475410461, 0.26603737473487854, 0.3168780207633972, 0.36987361311912537, -0.21182698011398315, -0.8367775678634644, -0.35288622975349426, 0.12056542187929153, -0.21305738389492035, -0.9039744138717651, 0.620830237865448, 0.13575954735279083, 0.48042747378349304, 0.48150891065597534, 0.07276476919651031, 0.7060733437538147, -0.6700332760810852, 0.8923569917678833, 0.2592289447784424, -1.077819585800171, 0.49697577953338623, -0.2047208994626999, 0.20280170440673828, 0.5312982201576233, 0.3117104172706604, -0.5302260518074036, -0.36499831080436707, -0.8231455683708191, -0.9731378555297852, 0.8188300728797913, 0.22068443894386292, 0.36688482761383057, -0.09366598725318909, 0.21416281163692474, 0.21045663952827454, 0.35744747519493103, -0.9870343208312988, -0.6533970832824707, -0.602950394153595, -0.398519903421402, -0.12690596282482147, -0.2992110848426819, -0.061278749257326126, -0.5750108361244202, 0.6392368078231812, 0.20458075404167175, 0.2935968041419983, 0.11699143052101135, -0.22971634566783905, 0.16690601408481598, 0.10482170432806015, 0.6902841329574585, 0.4568612277507782, -0.5151472091674805, 0.07321039587259293, 0.06778004765510559, -0.6716040968894958, 0.20251761376857758, 0.2757524251937866, -0.024792779237031937, 0.2668874263763428, 0.47000235319137573, 0.8926638960838318, 0.05557231605052948, -0.3457987904548645, 0.5851684212684631, 0.08967136591672897, -0.3277103900909424, -0.6217535138130188, 0.10830362141132355, 0.020105810835957527, 0.12209032475948334, 0.5682587623596191, 0.16431012749671936, 0.17747065424919128, -0.6166560649871826, 0.3497467041015625, 0.2804178297519684, -0.5360705256462097, -0.25524547696113586, 0.9225583672523499, 0.07970096915960312, -0.6627132296562195, 0.826320469379425, -0.22987478971481323, -0.7123067378997803, 0.7153523564338684, 0.6412092447280884, 0.9213259220123291, -0.13158784806728363, 0.2278013676404953, 0.49980053305625916, 0.25784873962402344, -0.30824732780456543, 0.3032495677471161, 0.2810077965259552, -0.7255807518959045, -0.32915160059928894, -0.9118499159812927, -0.04559164121747017, 0.2077392339706421, -0.817851185798645, 0.37085023522377014, -0.505486786365509, -0.384278267621994, 0.23995254933834076, -0.07124640047550201, -0.6846508383750916, 0.44035816192626953, 0.02934015914797783, 1.0508757829666138, -1.0766907930374146, 0.921625018119812, 0.7059146761894226, -0.6400733590126038, -0.8357664346694946, -0.42111513018608093, -0.3079320788383484, -0.9195384383201599, 0.8547520041465759, 0.3617088198661804, 0.32721903920173645, -0.023182863369584084, -0.5184373259544373, -0.6772873401641846, 0.9205186367034912, 0.17890766263008118, -0.6069726347923279, -0.10228727757930756, 0.09456469863653183, 0.5893507599830627, -0.4675000309944153, 0.49277427792549133, 0.5759469866752625, 0.3956679403781891, -0.0019146722042933106, -0.8090223670005798, 0.046138521283864975, -0.38356927037239075, 0.005802901927381754, 0.13445566594600677, -0.45470529794692993, 1.1526936292648315, -0.09223546832799911, -0.03399377688765526, 0.12914840877056122, 0.5627623796463013, 0.03517308831214905, 0.22196869552135468, 0.5640433430671692, 0.7173978090286255, 0.692397952079773, -0.3888879716396332, 0.7608423233032227, -0.19373437762260437, 0.5300143361091614, 0.8976000547409058, -0.046386655420064926, 0.6563571691513062, 0.415878564119339, -0.32995474338531494, 1.0045044422149658, 0.8200240135192871, -0.3992193341255188, 0.7745816707611084, 0.36415791511535645, -0.11763637512922287, 0.029911741614341736, 0.14972704648971558, -0.31036683917045593, 0.5919057726860046, 0.18706265091896057, -0.5725021362304688, 0.03890058770775795, -0.1397746205329895, 0.17320258915424347, -0.04339040815830231, -0.48569777607917786, 0.7209563255310059, 0.2303965538740158, -0.6550537347793579, 0.29765331745147705, 0.26445063948631287, 0.7112603187561035, -0.5592846274375916, -0.03791628032922745, -0.10270590335130692, 0.2491404116153717, -0.13487279415130615, -0.7973018288612366, 0.29936477541923523, -0.14393223822116852, -0.5113648772239685, -0.20616860687732697, 0.6874619722366333, -0.5196900963783264, -0.7471451759338379, 0.08090159296989441, 0.24108287692070007, 0.239314004778862, -0.14400871098041534, -0.7338813543319702, -0.2285258024930954, 0.007545859087258577, -0.07998719811439514, 0.1290680319070816, 0.4135631024837494, 0.01790419965982437, 0.3934997320175171, 0.8703845739364624, -0.06402889639139175, 0.07079031318426132, 0.10087234526872635, 0.7416001558303833, -0.9735249280929565, -0.7768948078155518, -1.1838958263397217, 0.6507708430290222, -0.2286699116230011, -0.4947448968887329, 0.6810593008995056, 0.7942940592765808, 0.7832493782043457, -0.466298907995224, 0.5312285423278809, -0.1850343644618988, 0.4520162045955658, -0.3255579471588135, 0.8023353219032288, -0.31517282128334045, -0.11404441297054291, -0.394277423620224, -0.931955873966217, -0.1737350970506668, 0.794667661190033, -0.012384670786559582, 0.024793921038508415, 0.7058694958686829, 0.5944875478744507, -0.05419345200061798, -0.1705862432718277, 0.1841590851545334, 0.18438270688056946, 0.008480088785290718, 0.29631471633911133, 0.6250998377799988, -0.6372456550598145, 0.38843998312950134, -0.24529963731765747, -0.08702536672353745, -0.3716617524623871, -0.9857249855995178, -0.980676531791687, -0.5563035011291504, -0.2815244495868683, -0.6158249974250793, -0.23033905029296875, 0.8866760730743408, 0.7578012347221375, -0.9204081892967224, -0.2839820384979248, -0.005872461944818497, 0.08565280586481094, -0.274320125579834, -0.2745037376880646, 0.41057607531547546, -0.07001768052577972, -0.8286343812942505, 0.127062126994133, 0.032854318618774414, 0.21227121353149414, -0.1542116403579712, 0.09115789085626602, -0.35709723830223083, -0.039056312292814255, 0.5467585921287537, 0.03382578864693642, -0.624657928943634, -0.3935979902744293, 0.013704814948141575, -0.20636457204818726, 0.07094421982765198, 0.5448285341262817, -0.5736782550811768, 0.365539014339447, 0.4766966998577118, 0.3183251619338989, 0.7825783491134644, 0.2279670685529709, 0.6443897485733032, -1.102220892906189, 0.42534539103507996, 0.18397358059883118, 0.5787190794944763, 0.4098713994026184, -0.4897448420524597, 0.5006910562515259, 0.561267614364624, -0.3880652189254761, -0.8525606393814087, -0.011681778356432915, -1.0128017663955688, -0.23337188363075256, 0.8951455354690552, -0.16674374043941498, -0.36383333802223206, -0.12478294223546982, -0.3958591818809509, 0.4965077042579651, -0.3504593074321747, 0.7358095645904541, 0.8670284152030945, 0.2354220449924469, -0.03270605951547623, -0.2918403446674347, 0.43895354866981506, 0.3081064820289612, -0.3566710650920868, -0.3139987289905548, 0.17772439122200012, 0.5080869197845459, 0.22647462785243988, 0.5507308840751648, -0.13523989915847778, 0.07557309418916702, 0.24187622964382172, 0.14913053810596466, -0.21641278266906738, -0.09631039202213287, -0.26030147075653076, 0.09992332011461258, -0.12116996198892593, -0.69895339012146 ]
lengyue233/content-vec-best
lengyue233
"2023-03-31T08:02:09Z"
614,315
5
transformers
[ "transformers", "pytorch", "hubert", "doi:10.57967/hf/0479", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
null
"2023-03-25T04:33:59Z"
--- license: mit --- # Content Vec Best Official Repo: [ContentVec](https://github.com/auspicious3000/contentvec) This repo brings fairseq ContentVec model to HuggingFace Transformers. ## How to use To use this model, you need to define ```python class HubertModelWithFinalProj(HubertModel): def __init__(self, config): super().__init__(config) # The final projection layer is only used for backward compatibility. # Following https://github.com/auspicious3000/contentvec/issues/6 # Remove this layer is necessary to achieve the desired outcome. self.final_proj = nn.Linear(config.hidden_size, config.classifier_proj_size) ``` and then load the model with ```python model = HubertModelWithFinalProj.from_pretrained("lengyue233/content-vec-best") x = model(audio)["last_hidden_state"] ``` ## How to convert You need to download the ContentVec_legacy model from the official repo, and then run ```bash python convert.py ```
[ -0.4512307643890381, -0.3487206697463989, 0.24864870309829712, 0.2580733299255371, -0.022427599877119064, -0.29954594373703003, -0.18531696498394012, -0.17676980793476105, 0.20974360406398773, 0.5573018789291382, -0.8402014374732971, -0.6822224259376526, -0.6467844247817993, -0.15433263778686523, -0.553183376789093, 1.0791655778884888, 0.01864730380475521, -0.08650249987840652, -0.2981691062450409, -0.3285827934741974, -0.08993473649024963, -0.17232339084148407, -0.2902631163597107, -0.360068678855896, 0.06961821019649506, 0.26840516924858093, 0.7890884876251221, 0.33615371584892273, 0.1650991141796112, 0.5914971232414246, -0.4726218283176422, 0.07410289347171783, -0.5481328964233398, -0.054210957139730453, -0.19978755712509155, -0.22470174729824066, -0.4552029073238373, 0.21550782024860382, 0.6215057969093323, 0.3102932870388031, -0.4352496564388275, 0.24541990458965302, -0.09733028709888458, 0.3804768919944763, -0.48134326934814453, 0.12473934143781662, -0.2727575898170471, -0.014456363394856453, 0.3074248135089874, 0.06543967872858047, -0.3565092384815216, -0.4037180542945862, 0.3137626647949219, -0.8451651334762573, 0.04643047973513603, -0.047963306307792664, 1.4361963272094727, 0.3440067172050476, -0.4710889756679535, 0.15866529941558838, -0.8341449499130249, 1.0728487968444824, -0.6199302673339844, 0.717871367931366, 0.41840261220932007, 0.40222233533859253, -0.20943599939346313, -1.1022446155548096, -0.6575602293014526, -0.16542313992977142, 0.30209270119667053, 0.19018642604351044, -0.2822657525539398, 0.03686554729938507, 0.4339190721511841, 0.6481205224990845, -0.514564573764801, -0.22571499645709991, -0.704371988773346, -0.5848475098609924, 0.7411611676216125, 0.0703207477927208, 0.182756707072258, -0.5098289251327515, -0.7632367014884949, -0.35281938314437866, -0.2560727894306183, 0.11567377299070358, 0.41509535908699036, -0.07033795863389969, -0.4042169451713562, 0.5927718877792358, -0.27790239453315735, 0.418851763010025, 0.17191489040851593, -0.3961995244026184, 0.6439118981361389, -0.2925211489200592, -0.10154108703136444, -0.09862823784351349, 0.8587082624435425, 0.3433804512023926, 0.2928008735179901, 0.24520568549633026, -0.4204995036125183, -0.2493194192647934, 0.5549247860908508, -0.8974663019180298, -0.3339836597442627, 0.3670591413974762, -0.5944314002990723, -0.2551969885826111, 0.1376720368862152, -0.22463418543338776, 0.018015218898653984, -0.5522541999816895, 0.7492346167564392, -0.6498733758926392, -0.4360668659210205, 0.18371345102787018, -0.05231671407818794, 0.46078646183013916, 0.3444559872150421, -0.8268516659736633, 0.4503225088119507, 0.5142574906349182, 0.9148633480072021, -0.08601164817810059, 0.011204958893358707, -0.5188426375389099, 0.01749015972018242, -0.0942235141992569, 0.8826330900192261, -0.04336296021938324, -0.418796181678772, 0.22850409150123596, 0.6197904348373413, 0.008970442228019238, -0.6968420147895813, 1.0103219747543335, -0.3845820426940918, 0.40173831582069397, 0.1963721513748169, -0.5048565864562988, -0.20432054996490479, 0.13354943692684174, -0.6920532584190369, 1.0472304821014404, 0.8596816062927246, -0.9838955402374268, 0.15041077136993408, 0.001033343025483191, -0.4283313453197479, 0.0014690429670736194, 0.20481392741203308, -0.8658252954483032, -0.018979767337441444, 0.08735030144453049, 0.45385628938674927, 0.22965233027935028, 0.3042961657047272, -0.4979194700717926, -0.36276552081108093, 0.276352196931839, 0.00434616394340992, 0.8535680770874023, 0.3711392283439636, -0.0027828344609588385, 0.4118238389492035, -0.7362442016601562, -0.22741518914699554, 0.037056565284729004, -0.21669843792915344, -0.3128916919231415, -0.33043307065963745, 0.4841874837875366, 0.32153162360191345, 0.15244907140731812, -0.7479197978973389, 0.2684769332408905, -0.41719621419906616, 0.5098758935928345, 0.6643062829971313, -0.1727268397808075, 0.6606230735778809, -0.501559317111969, 0.24384737014770508, -0.1313062459230423, 0.5791106820106506, 0.18463699519634247, -0.4364042580127716, -0.4419088065624237, -0.3694230616092682, 0.2694462835788727, 0.4130270779132843, -0.8899176716804504, 0.382019966840744, -0.1332300305366516, -0.5695890784263611, -0.4929967224597931, -0.17340651154518127, -0.12751010060310364, 0.3962351083755493, 0.43586283922195435, -0.4079848527908325, -0.6281270980834961, -0.9006927013397217, 0.1662188172340393, -0.2069813758134842, -0.30882737040519714, 0.4878493845462799, 0.4803529381752014, -0.44097262620925903, 0.6674485206604004, -0.34899941086769104, -0.4756518006324768, -0.19994166493415833, -0.17401544749736786, 0.6281300187110901, 0.8063653707504272, 0.5243360996246338, -0.7721213698387146, -0.10052046179771423, -0.3270884156227112, -0.45096442103385925, 0.04166816174983978, -0.005800011567771435, -0.32722708582878113, 0.09991011023521423, 0.08364085853099823, -0.8185691237449646, 0.5095938444137573, 0.8368945121765137, -0.3759535849094391, 0.8570652008056641, -0.02073231339454651, 0.2693467438220978, -1.1292362213134766, -0.15318791568279266, 0.2641955018043518, -0.653449296951294, -0.393278032541275, -0.0687185749411583, 0.026674803346395493, 0.12867973744869232, -0.6402738094329834, 0.6318479776382446, 0.053380344063043594, 0.03428037837147713, -0.28069621324539185, 0.08790077269077301, 0.26009246706962585, 0.3574802279472351, 0.22508604824543, 0.26534953713417053, 0.6205413341522217, -0.683652400970459, 0.7862184643745422, 0.9297753572463989, -0.3009706139564514, 0.3705027997493744, -0.8523643016815186, -0.1535162776708603, 0.19101370871067047, 0.41689029335975647, -0.6163531541824341, -0.2613934576511383, 0.4306298494338989, -0.603235125541687, 0.6462708711624146, -0.31886929273605347, -0.1464792639017105, -0.3707079589366913, -0.4356585741043091, 0.3701792061328888, 0.7328972816467285, -0.7829795479774475, 0.8328456878662109, 0.6029483079910278, -0.21336884796619415, -0.3696206212043762, -0.7628693580627441, -0.4172438979148865, -0.0458640456199646, -0.9888539910316467, 0.8387131094932556, -0.29120245575904846, 0.05323497951030731, -0.16975824534893036, -0.2749342620372772, -0.05785990133881569, -0.4448726177215576, 0.42983511090278625, 0.38927915692329407, -0.26235902309417725, -0.22184444963932037, 0.2270107865333557, -0.38702157139778137, 0.09481097757816315, -0.5257704257965088, 0.2498445361852646, -0.25982019305229187, -0.06350816041231155, -0.6845389604568481, 0.07472461462020874, 0.3634946346282959, -0.11733611673116684, 0.781477153301239, 0.9981151223182678, -0.200733944773674, -0.2574177384376526, -0.6154690384864807, -0.200596421957016, -0.5677568912506104, 0.34443965554237366, -0.18915052711963654, -0.9214233756065369, 0.548608124256134, -0.26388412714004517, -0.14123278856277466, 0.504010021686554, 0.5984785556793213, -0.011706134304404259, 0.988685667514801, 0.7075457572937012, 0.17994949221611023, 0.7457926869392395, -0.7183733582496643, -0.3491637408733368, -0.7995365858078003, -0.5692591667175293, -0.4678737223148346, 0.18016690015792847, -0.8768708109855652, -0.4315440356731415, 0.27343377470970154, 0.004475795663893223, -0.45766153931617737, 0.9417482018470764, -0.7717647552490234, -0.07009871304035187, 0.6297211647033691, 0.30540478229522705, 0.23137643933296204, -0.005933524575084448, 0.0718865916132927, -0.17981262505054474, -0.4707142114639282, -0.37236854434013367, 0.6798369884490967, 0.7384322881698608, 0.9757570028305054, 0.057812392711639404, 0.7359539270401001, -0.1034855991601944, 0.06928620487451553, -0.8629564642906189, 0.23873500525951385, -0.18186460435390472, -0.6146640181541443, -0.21016310155391693, -0.5217363238334656, -0.46394816040992737, -0.025773638859391212, -0.2998746633529663, -0.8469032645225525, 0.3474957346916199, -0.1687464714050293, -0.22377841174602509, 0.24647806584835052, -0.40802550315856934, 0.9988123774528503, 0.2018420547246933, -0.6245375871658325, -0.061172883957624435, -0.5532267689704895, 0.4727098345756531, 0.31090155243873596, 0.2879445254802704, -0.09096790105104446, 0.11534781754016876, 0.6842357516288757, -0.3637279272079468, 0.47141268849372864, -0.20822203159332275, -0.0960787907242775, 0.6250264644622803, 0.26798486709594727, 0.38883474469184875, 0.4498075246810913, -0.09141025692224503, 0.34253162145614624, 0.4768749177455902, -0.44662562012672424, -0.5507442355155945, 0.6765213012695312, -1.032198190689087, -0.37568241357803345, -0.2895162105560303, -0.41196128726005554, 0.18509911000728607, -0.0609041191637516, 0.3360961377620697, 0.6359728574752808, -0.3593951463699341, 0.11310650408267975, 0.8480573892593384, -0.4410645067691803, 0.23583771288394928, 0.3401277959346771, -0.32705292105674744, -0.5207366943359375, 0.9813072085380554, -0.22480414807796478, 0.11663223803043365, 0.280362993478775, 0.39948245882987976, -0.41835829615592957, -0.42602455615997314, -0.26786768436431885, 0.20257718861103058, -0.5633231401443481, -0.3586307764053345, -0.7880631685256958, -0.7234007716178894, -0.6368197798728943, 0.24757739901542664, -0.892354428768158, -0.5428858399391174, -0.22803103923797607, -0.026901280507445335, 0.40324053168296814, 0.6767776608467102, -0.4625752866268158, 0.37317290902137756, -0.9755879044532776, 0.49791839718818665, 0.2929720878601074, 0.32065707445144653, -0.5726187825202942, -1.2416231632232666, -0.2818623185157776, -0.2320939153432846, -0.6136278510093689, -0.6518862247467041, 0.6887583136558533, 0.18257443606853485, 0.6177522540092468, 0.38604000210762024, 0.33105865120887756, 0.13934563100337982, -0.3802854120731354, 0.5944538712501526, 0.14579765498638153, -1.0395610332489014, 0.3927711844444275, -0.29298967123031616, 0.1452532410621643, 0.3337826728820801, 0.6248628497123718, -0.5159654021263123, -0.2273387461900711, -0.8406966924667358, -0.8630067706108093, 0.749545693397522, 0.48157206177711487, 0.24996516108512878, 0.31590545177459717, 0.21715162694454193, 0.33906057476997375, 0.08270321786403656, -0.7411597967147827, -0.08186931163072586, -0.7919782400131226, -0.3520191013813019, 0.4003395140171051, -0.11989115923643112, -0.06761490553617477, -0.46878647804260254, 1.0434224605560303, -0.2272293120622635, 0.28996771574020386, 0.36762475967407227, -0.03259910270571709, -0.1670553982257843, -0.10314837098121643, 0.35662373900413513, 0.3123210072517395, -0.25045961141586304, -0.21603500843048096, 0.20485670864582062, -0.3988123834133148, -0.18871787190437317, 0.35296934843063354, -0.06694813072681427, 0.10481252521276474, 0.5378838181495667, 0.8419289588928223, 0.5471892356872559, -0.27347826957702637, 1.177219271659851, -0.3460225462913513, -0.28866809606552124, -0.7845665812492371, 0.10045652091503143, 0.16960148513317108, 0.550072431564331, 0.16407503187656403, 0.17360755801200867, 0.28764593601226807, -0.12162312120199203, 0.6278387308120728, 0.26504355669021606, -0.8488438725471497, -0.43584635853767395, 0.7734647393226624, 0.134785994887352, -0.15843141078948975, 0.9522475004196167, 0.0979553610086441, -0.48078984022140503, 0.5336166620254517, 0.28711432218551636, 0.7457869052886963, -0.4705657958984375, 0.5335198044776917, 0.8412407636642456, 0.059444427490234375, 0.09586156904697418, 0.18545901775360107, -0.362726092338562, -0.7658462524414062, -0.7141702175140381, -0.9610922336578369, -0.33376070857048035, 0.02066291868686676, -0.722533106803894, 0.4910316467285156, -0.3015664219856262, -0.26626715064048767, -0.25586092472076416, 0.08237836509943008, -0.7035531401634216, 0.13179434835910797, 0.41693851351737976, 1.1635363101959229, -0.814459502696991, 0.917909562587738, 0.5152267217636108, -0.5497907996177673, -1.1962836980819702, -0.303238183259964, -0.04608427360653877, -0.6440520882606506, 0.2798605263233185, 0.17387241125106812, 0.2521292567253113, -0.0900193303823471, -1.1546016931533813, -0.8542836904525757, 1.1308883428573608, 0.30662453174591064, -0.5335316061973572, 0.07040037214756012, -0.2728486657142639, 0.3784048557281494, -0.5134238004684448, 0.7568809390068054, 0.4838058650493622, 0.49410051107406616, 0.5278571248054504, -0.9435270428657532, 0.05575910210609436, -0.16112646460533142, 0.04934142157435417, -0.32592636346817017, -0.6742929816246033, 0.8394390344619751, -0.46560192108154297, -0.17508333921432495, 0.47683191299438477, 1.1442543268203735, 0.4952816963195801, 0.3549500107765198, 0.660006046295166, 0.2917647063732147, 0.18580594658851624, -0.1963740885257721, 0.9731242060661316, -0.07637400180101395, 0.9234204292297363, 0.6482245922088623, 0.045677755028009415, 0.5554717183113098, 0.3391486704349518, -0.2865430414676666, 0.8953705430030823, 0.8134641647338867, -0.22732873260974884, 0.6204511523246765, 0.27531448006629944, -0.16046859323978424, -0.5085300803184509, -0.2827557921409607, -0.4272270202636719, 0.48625844717025757, 0.25348687171936035, -0.11175622045993805, 0.2117970883846283, 0.1173015832901001, -0.26508378982543945, 0.11550271511077881, -0.09715995192527771, 0.7288637757301331, 0.37538942694664, -0.266046404838562, 0.6278126835823059, -0.04105573892593384, 0.7500748634338379, -0.6863171458244324, -0.14564822614192963, -0.1100078895688057, 0.29327860474586487, -0.4799860119819641, -0.7725077867507935, 0.32878828048706055, -0.5759103894233704, -0.04829084873199463, -0.0428575836122036, 0.86750727891922, -0.639473021030426, -0.18794763088226318, 0.5849518775939941, 0.20749926567077637, 0.23408930003643036, -0.20168104767799377, -0.8717595934867859, 0.32900604605674744, -0.037928249686956406, -0.767636775970459, 0.22470593452453613, 0.31439682841300964, 0.17638802528381348, 0.7523679137229919, 0.43806740641593933, -0.09019887447357178, -0.23494455218315125, 0.26784107089042664, 1.1638696193695068, -0.7028847336769104, -0.5573340058326721, -0.08940578252077103, 0.7620188593864441, -0.08715303987264633, -0.18284179270267487, 0.3148496747016907, 0.35916221141815186, 1.1382293701171875, -0.23584914207458496, 0.3831217885017395, -0.0995413139462471, 0.31845369935035706, -0.3976204991340637, 0.8271492123603821, -0.6629074215888977, -0.08316107839345932, -0.48297587037086487, -1.0683513879776, 0.09122476726770401, 0.7301953434944153, -0.04554840922355652, 0.16960053145885468, 0.6257814764976501, 0.9819346070289612, -0.24972829222679138, 0.2730323374271393, 0.45775750279426575, 0.48716315627098083, 0.16678638756275177, 0.38741469383239746, 1.141737461090088, -0.8562828898429871, 0.6452754735946655, -0.6801033616065979, -0.4693155586719513, 0.04470572993159294, -0.6593418121337891, -0.8040826916694641, -0.8701410293579102, -0.662380039691925, -0.871889591217041, -0.08744698017835617, 0.8403943777084351, 1.1133701801300049, -1.0099260807037354, 0.07308194786310196, 0.2626229226589203, 0.1716078370809555, -0.10887836664915085, -0.3051338195800781, 0.32999467849731445, 0.21468254923820496, -1.05824875831604, 0.36046749353408813, -0.07624498009681702, 0.016566311940550804, -0.40360119938850403, -0.31874948740005493, -0.06218187138438225, -0.24240243434906006, 0.3989638686180115, 0.2723018527030945, -0.5546139478683472, -0.6519662737846375, -0.1885375678539276, -0.20810247957706451, 0.1428302824497223, 0.6233510375022888, -1.0429481267929077, 0.14356617629528046, 0.6478400826454163, 0.07498451322317123, 0.9846466779708862, -0.06914397329092026, 0.5471208691596985, -0.61961430311203, 0.27947524189949036, 0.1717766672372818, 0.349496454000473, 0.6405723094940186, -0.2535746693611145, 0.3357599079608917, 0.3985069692134857, -0.8306022882461548, -0.529848039150238, 0.10103261470794678, -1.289460301399231, -0.15655584633350372, 1.2258630990982056, -0.20679481327533722, -0.796600878238678, 0.0005316200549714267, -0.3668454587459564, 0.6903126835823059, -0.5721320509910583, 0.43007367849349976, 0.05462363734841347, 0.16269676387310028, -0.16338559985160828, -0.6383984684944153, 0.36612507700920105, 0.08692888170480728, -0.2394317239522934, -0.3303711414337158, 0.14354866743087769, 0.5423362255096436, 0.23812521994113922, 0.2210119515657425, -0.4383525252342224, 0.1582280397415161, 0.2062082439661026, 0.5478617548942566, -0.22860689461231232, -0.3608744740486145, -0.2077130377292633, -0.07787151634693146, -0.3696192800998688, -0.1842968612909317 ]
Helsinki-NLP/opus-mt-fr-en
Helsinki-NLP
"2023-08-16T11:36:20Z"
600,717
25
transformers
[ "transformers", "pytorch", "tf", "jax", "marian", "text2text-generation", "translation", "fr", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- tags: - translation license: apache-2.0 --- ### opus-mt-fr-en * source languages: fr * target languages: en * OPUS readme: [fr-en](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/fr-en/README.md) * dataset: opus * model: transformer-align * pre-processing: normalization + SentencePiece * download original weights: [opus-2020-02-26.zip](https://object.pouta.csc.fi/OPUS-MT-models/fr-en/opus-2020-02-26.zip) * test set translations: [opus-2020-02-26.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/fr-en/opus-2020-02-26.test.txt) * test set scores: [opus-2020-02-26.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/fr-en/opus-2020-02-26.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | newsdiscussdev2015-enfr.fr.en | 33.1 | 0.580 | | newsdiscusstest2015-enfr.fr.en | 38.7 | 0.614 | | newssyscomb2009.fr.en | 30.3 | 0.569 | | news-test2008.fr.en | 26.2 | 0.542 | | newstest2009.fr.en | 30.2 | 0.570 | | newstest2010.fr.en | 32.2 | 0.590 | | newstest2011.fr.en | 33.0 | 0.597 | | newstest2012.fr.en | 32.8 | 0.591 | | newstest2013.fr.en | 33.9 | 0.591 | | newstest2014-fren.fr.en | 37.8 | 0.633 | | Tatoeba.fr.en | 57.5 | 0.720 |
[ -0.4974219799041748, -0.3843812346458435, 0.3321172893047333, 0.44733455777168274, -0.4337990880012512, -0.4272981882095337, -0.33348485827445984, -0.13700725138187408, 0.10574508458375931, 0.46368691325187683, -0.9264485836029053, -0.657228946685791, -0.7207821011543274, 0.24705824255943298, -0.07319563627243042, 0.8043649196624756, -0.21387477219104767, 0.44975870847702026, 0.2213854342699051, -0.53357994556427, -0.4024028778076172, -0.4276232421398163, -0.4852658212184906, -0.42639362812042236, 0.3690643310546875, 0.5189919471740723, 0.3993603587150574, 0.4750847816467285, 1.0203819274902344, 0.29938188195228577, -0.12781958281993866, 0.04497969150543213, -0.466753751039505, -0.21725811064243317, 0.2567557096481323, -0.6055924296379089, -0.8905786275863647, -0.10216817259788513, 1.087323784828186, 0.5247036218643188, -0.0721002072095871, 0.4334295392036438, 0.028859242796897888, 1.119242787361145, -0.26178455352783203, 0.04879508167505264, -0.562835156917572, 0.1509627401828766, -0.35849300026893616, -0.36303091049194336, -0.6114202737808228, -0.25946715474128723, -0.0005161740118637681, -0.6647791862487793, 0.16044846177101135, 0.1824745535850525, 1.6165599822998047, 0.25154730677604675, -0.32664746046066284, -0.06223591789603233, -0.5825111865997314, 1.1220802068710327, -0.9133121371269226, 0.6773777604103088, 0.41765910387039185, 0.2303110957145691, 0.09992574155330658, -0.6074173450469971, -0.4260614216327667, 0.2379387617111206, -0.30267593264579773, 0.3233485817909241, -0.19000765681266785, -0.2894379496574402, 0.3282976448535919, 0.8440970778465271, -0.9160052537918091, 0.00218908186070621, -0.6536276340484619, 0.04106453061103821, 0.8057094216346741, 0.2294057458639145, 0.19384253025054932, -0.19370858371257782, -0.5225293040275574, -0.5738872289657593, -0.8236868977546692, 0.21449193358421326, 0.4456603229045868, 0.30406248569488525, -0.5478046536445618, 0.6789131760597229, -0.20678719878196716, 0.7207199335098267, -0.03196847811341286, -0.07806389778852463, 1.1517316102981567, -0.38819923996925354, -0.3434584140777588, -0.18174251914024353, 1.4005190134048462, 0.4993996322154999, -0.03014834225177765, 0.17261181771755219, -0.30760371685028076, -0.28301963210105896, 0.0647333487868309, -1.0585527420043945, -0.0708753913640976, 0.22095513343811035, -0.4993467628955841, -0.16477243602275848, 0.13154646754264832, -0.8347530961036682, 0.325423926115036, -0.3878478407859802, 0.6026127338409424, -0.629718005657196, -0.25348135828971863, 0.3713417947292328, 0.023544535040855408, 0.37009137868881226, 0.026199692860245705, -0.6970732808113098, 0.24571123719215393, 0.4025987684726715, 0.8123816251754761, -0.40490806102752686, -0.27162691950798035, -0.3745279312133789, -0.21315571665763855, -0.17179086804389954, 0.7774845361709595, -0.1051616296172142, -0.48987695574760437, -0.1463100165128708, 0.5535165071487427, -0.3930075764656067, -0.3995816111564636, 1.4375072717666626, -0.2779964208602905, 0.8785489797592163, -0.46495911478996277, -0.5707154273986816, -0.3416967988014221, 0.5285195112228394, -0.5856103301048279, 1.5248843431472778, 0.10044557601213455, -0.956060528755188, 0.2307893931865692, -0.8857992887496948, -0.10907960683107376, -0.11777089536190033, -0.010008162818849087, -0.8158445358276367, 0.014178852550685406, 0.21493545174598694, 0.4652389585971832, -0.43593013286590576, 0.3427150547504425, -0.040300969034433365, -0.32070788741111755, -0.03112431988120079, -0.4440973103046417, 1.2076042890548706, 0.3420543968677521, -0.3139324188232422, 0.2465415596961975, -1.0992395877838135, 0.002685702871531248, 0.15379633009433746, -0.5512909889221191, -0.14047709107398987, 0.03726502135396004, 0.25730323791503906, 0.12570148706436157, 0.2236737608909607, -0.7133566737174988, 0.2504558563232422, -0.7054953575134277, 0.2781916558742523, 0.7154615521430969, -0.23206321895122528, 0.42715391516685486, -0.5715810656547546, 0.4076632857322693, 0.13966019451618195, 0.20739556849002838, 0.09317664802074432, -0.5066523551940918, -0.920356810092926, -0.32538798451423645, 0.47875648736953735, 1.1132440567016602, -0.7374920845031738, 0.9990366101264954, -0.7379768490791321, -0.8978378772735596, -0.7053114771842957, -0.12549182772636414, 0.41225266456604004, 0.5823979377746582, 0.54767245054245, -0.19721156358718872, -0.4534805417060852, -1.272700548171997, -0.09653458744287491, -0.14820511639118195, -0.19183628261089325, 0.2991833984851837, 0.7849252223968506, -0.10595154762268066, 0.6811445355415344, -0.7163876295089722, -0.5069718956947327, -0.254689484834671, 0.21854457259178162, 0.6840006113052368, 0.7853041291236877, 0.707521378993988, -1.0328048467636108, -0.6690542697906494, -0.08976388722658157, -0.7075756788253784, -0.23322388529777527, 0.08283453434705734, -0.3076261579990387, 0.043370429426431656, 0.10140988230705261, -0.4218745529651642, 0.09479354321956635, 0.6914347410202026, -0.7196850180625916, 0.6300636529922485, -0.12501975893974304, 0.31375929713249207, -1.5569547414779663, 0.13105334341526031, -0.1488063484430313, -0.08955702185630798, -0.5667054653167725, -0.09166109561920166, 0.2608417570590973, 0.14043556153774261, -0.7825680375099182, 0.7044771313667297, -0.40433409810066223, -0.05410609766840935, 0.3799799978733063, -0.024737441912293434, 0.12442861497402191, 0.8343416452407837, -0.034490928053855896, 0.9009913802146912, 0.7879989743232727, -0.5028972029685974, 0.15433968603610992, 0.5678080916404724, -0.5978017449378967, 0.4600379467010498, -0.844421923160553, -0.34232988953590393, 0.1813802868127823, -0.02650758996605873, -0.89362633228302, -0.026469606906175613, 0.40045079588890076, -0.7771663069725037, 0.49403876066207886, -0.08691035211086273, -0.7427244186401367, -0.23452357947826385, -0.35806187987327576, 0.4083011746406555, 0.6763308644294739, -0.21114151179790497, 0.6436667442321777, 0.2073996663093567, -0.08062364161014557, -0.525048553943634, -1.113831639289856, -0.21085861325263977, -0.47253885865211487, -0.8847224116325378, 0.35282957553863525, -0.4531365633010864, 0.068631611764431, 0.008967926725745201, 0.2519577145576477, -0.1309797614812851, -0.0024230836424976587, 0.11080732941627502, 0.3092277944087982, -0.489871084690094, -0.0074529084376990795, -0.057512763887643814, -0.19378086924552917, -0.07249869406223297, -0.07827351242303848, 0.6571680903434753, -0.45465153455734253, -0.355110228061676, -0.5981858968734741, 0.0631980374455452, 0.6669167280197144, -0.43630197644233704, 0.9160093069076538, 0.6682782173156738, -0.18055877089500427, 0.20800621807575226, -0.46248316764831543, 0.041859451681375504, -0.5121737718582153, 0.1981876790523529, -0.5088351368904114, -0.957961916923523, 0.7089104652404785, 0.18658621609210968, 0.5453677773475647, 0.9964953660964966, 0.6827490925788879, 0.060799743980169296, 0.9370661973953247, 0.3404111862182617, 0.1790996789932251, 0.5410958528518677, -0.6208726167678833, -0.1577509492635727, -1.1336019039154053, -0.10113602876663208, -0.7570136189460754, -0.4521794021129608, -0.9353522658348083, -0.31122875213623047, 0.4030366837978363, 0.051295164972543716, -0.39997047185897827, 0.7517856955528259, -0.6959097385406494, 0.24218910932540894, 0.6612454056739807, -0.06037675216794014, 0.2568916082382202, 0.07268273830413818, -0.6168614625930786, -0.2718227207660675, -0.5839967727661133, -0.49190160632133484, 1.2779732942581177, 0.46714258193969727, 0.32872146368026733, 0.3227665424346924, 0.7173844575881958, -0.026355773210525513, 0.3159615695476532, -0.6364355683326721, 0.5527153015136719, -0.2490130066871643, -0.9399564862251282, -0.3735683858394623, -0.7147206664085388, -0.800361692905426, 0.6160946488380432, -0.3092847764492035, -0.6958475112915039, 0.3335355818271637, 0.019383808597922325, -0.21086116135120392, 0.5564192533493042, -0.7364858388900757, 1.265962839126587, -0.1260785013437271, -0.23550739884376526, 0.34856170415878296, -0.581231951713562, 0.3605390191078186, 0.010949387215077877, 0.42946258187294006, -0.3586800992488861, 0.16073395311832428, 0.8528001308441162, -0.24539731442928314, 0.47320297360420227, -0.10719551146030426, -0.06556319445371628, 0.117154560983181, 0.05719947814941406, 0.5139853358268738, -0.1502915322780609, -0.350466787815094, 0.37199991941452026, 0.1071607694029808, -0.4527483284473419, -0.14127983152866364, 0.6494319438934326, -0.8194637298583984, -0.23563869297504425, -0.589625895023346, -0.671935498714447, -0.037716299295425415, 0.5075697898864746, 0.7604771256446838, 0.7036027908325195, -0.3174998462200165, 0.6761437654495239, 0.8970659971237183, -0.3594321310520172, 0.4158176779747009, 0.7728317975997925, -0.20185108482837677, -0.6711897253990173, 0.9445365071296692, 0.09884700924158096, 0.33899766206741333, 0.6708389520645142, 0.1964140385389328, -0.2564997673034668, -0.7156322598457336, -0.7785336971282959, 0.2541229724884033, -0.3382868468761444, -0.2590199410915375, -0.6783812046051025, -0.09030920267105103, -0.3226988911628723, 0.09055961668491364, -0.5720290541648865, -0.6298832893371582, -0.24966228008270264, -0.23429346084594727, 0.30320653319358826, 0.24460645020008087, -0.18836452066898346, 0.4982462227344513, -1.1178466081619263, 0.19563719630241394, -0.129746213555336, 0.4134255051612854, -0.44085901975631714, -0.938529372215271, -0.37236467003822327, 0.03482125326991081, -0.6965451836585999, -0.7964933514595032, 0.6820812821388245, 0.14814013242721558, 0.3551842272281647, 0.44735702872276306, 0.1735265851020813, 0.522925078868866, -0.7923392057418823, 1.071315050125122, 0.23715446889400482, -0.6822509169578552, 0.5407776236534119, -0.5243762135505676, 0.5123162269592285, 0.9839882850646973, 0.2925785779953003, -0.4046894907951355, -0.5616085529327393, -0.833981990814209, -1.0176916122436523, 1.0487990379333496, 0.7489439845085144, -0.07852349430322647, 0.1634596437215805, -0.14978381991386414, -0.08513206988573074, 0.1058506965637207, -1.2147490978240967, -0.6202077269554138, 0.13093987107276917, -0.43059733510017395, -0.14202092587947845, -0.3419908583164215, -0.2984366714954376, -0.3707217872142792, 1.1249371767044067, 0.17616593837738037, 0.35537993907928467, 0.47051718831062317, 0.08079776912927628, -0.20604346692562103, 0.41724106669425964, 1.0848214626312256, 0.5949582457542419, -0.626509428024292, -0.12117503583431244, 0.36018815636634827, -0.5244088768959045, -0.12864921987056732, 0.17632250487804413, -0.4272758960723877, 0.2790641784667969, 0.43230000138282776, 1.1152138710021973, 0.20164376497268677, -0.5870488882064819, 0.5653061270713806, -0.3680402934551239, -0.6194828748703003, -0.7760321497917175, -0.18726076185703278, 0.16109077632427216, 0.1059001088142395, 0.2898252606391907, 0.233025923371315, 0.140361487865448, -0.2559872567653656, 0.21887046098709106, 0.18638163805007935, -0.7255353927612305, -0.5026137828826904, 0.7180964350700378, 0.10948793590068817, -0.2056310474872589, 0.45753657817840576, -0.3589814603328705, -0.6878381967544556, 0.5417338609695435, 0.17216886579990387, 1.1282516717910767, -0.25684767961502075, -0.23264168202877045, 0.9371465444564819, 0.6683919429779053, -0.29523730278015137, 0.5869244337081909, 0.18206414580345154, -0.731178879737854, -0.43676918745040894, -0.953394889831543, -0.05226792022585869, 0.14226409792900085, -0.9863709807395935, 0.43650802969932556, 0.30492278933525085, -0.10548184812068939, -0.32399412989616394, 0.26085275411605835, -0.6962273716926575, 0.15847989916801453, -0.24554488062858582, 1.2670371532440186, -1.1017391681671143, 0.9669564962387085, 0.5687487125396729, -0.3492514491081238, -0.936501145362854, -0.33620694279670715, -0.15929897129535675, -0.5675231218338013, 0.6734920144081116, 0.14127181470394135, 0.33551082015037537, -0.1420641988515854, -0.3093442916870117, -1.0568512678146362, 1.320515513420105, 0.11724572628736496, -0.6718829870223999, 0.08042199909687042, 0.19590598344802856, 0.5180911421775818, -0.40738463401794434, 0.13857315480709076, 0.45457297563552856, 0.8612363934516907, 0.2196205109357834, -1.1421430110931396, -0.16456842422485352, -0.6472006440162659, -0.38742196559906006, 0.6731226444244385, -0.7825968861579895, 1.1423617601394653, 0.39124825596809387, -0.12545344233512878, 0.010663684457540512, 0.6585837006568909, 0.40712398290634155, 0.3117426335811615, 0.5982565879821777, 1.3169927597045898, 0.480182021856308, -0.6451190114021301, 1.0367947816848755, -0.43476632237434387, 0.6543350219726562, 1.252723217010498, 0.01967313140630722, 0.9977036714553833, 0.4038180708885193, -0.2910122573375702, 0.5249338150024414, 0.7695776224136353, -0.34618905186653137, 0.5935490727424622, -0.03392250835895538, 0.11208248883485794, -0.2694515585899353, 0.2715621888637543, -0.7963956594467163, 0.19616366922855377, 0.29838964343070984, -0.31178855895996094, -0.04960522800683975, -0.1580623835325241, 0.10221164673566818, -0.17137150466442108, -0.12216567248106003, 0.5507827401161194, 0.007411160971969366, -0.597399115562439, 0.8011301755905151, -0.029659884050488472, 0.6574898958206177, -0.7821112871170044, 0.10428698360919952, -0.13120849430561066, 0.337078332901001, -0.11095505952835083, -0.7930907011032104, 0.5674294233322144, 0.07214969396591187, -0.3656209707260132, -0.5349242091178894, 0.23862475156784058, -0.5575736165046692, -1.0521373748779297, 0.3621678948402405, 0.45363762974739075, 0.309336394071579, 0.10120303928852081, -0.9741391539573669, 0.00985728483647108, 0.22356946766376495, -0.7935113310813904, 0.057120345532894135, 0.777022659778595, 0.373069167137146, 0.5017465949058533, 0.6895104050636292, 0.20724999904632568, 0.2422267645597458, -0.11079664528369904, 0.8517908453941345, -0.45573535561561584, -0.5175881385803223, -0.8482586741447449, 0.9047040939331055, -0.12612077593803406, -0.7078161835670471, 0.7615256309509277, 1.1727746725082397, 1.1128063201904297, -0.07002352923154831, 0.32919278740882874, -0.24568741023540497, 0.8564237356185913, -0.6861722469329834, 0.7254801988601685, -1.21560537815094, 0.2742476761341095, -0.09706678241491318, -1.0141507387161255, -0.36169856786727905, 0.3847341537475586, -0.35882991552352905, -0.33937162160873413, 0.7292501330375671, 0.7667446732521057, -0.1590290665626526, -0.18342623114585876, 0.270480751991272, 0.34198302030563354, 0.21172687411308289, 0.6726553440093994, 0.45285576581954956, -1.0450654029846191, 0.6027739644050598, -0.443112313747406, -0.13867218792438507, -0.11454656720161438, -0.7912970185279846, -0.9306961894035339, -0.6677223443984985, -0.13268402218818665, -0.2257855087518692, -0.368055522441864, 1.030023217201233, 0.5847490429878235, -1.0694332122802734, -0.5631532073020935, 0.012633878737688065, 0.07550378888845444, -0.21060343086719513, -0.3112107217311859, 0.760468602180481, -0.18478406965732574, -1.0208245515823364, 0.46632620692253113, 0.029153859242796898, -0.005382432136684656, 0.03598128259181976, -0.3720548450946808, -0.5052682161331177, -0.07977404445409775, 0.36050042510032654, 0.05387488380074501, -0.6212480068206787, 0.10545516759157181, 0.1511717289686203, -0.10779521614313126, 0.5164301991462708, 0.25205546617507935, -0.1853928416967392, 0.20769277215003967, 1.0347282886505127, 0.19523990154266357, 0.5945261120796204, -0.08621250838041306, 0.47885486483573914, -0.8489612340927124, 0.3338890075683594, 0.2076752930879593, 0.690844714641571, 0.2880696952342987, -0.04496752843260765, 0.8730694651603699, 0.31230562925338745, -0.6731585264205933, -1.2018176317214966, -0.004311198368668556, -1.3096660375595093, -0.032829515635967255, 1.056512713432312, -0.22596143186092377, -0.3022138476371765, 0.42218178510665894, -0.12465403974056244, 0.09004124253988266, -0.4363250434398651, 0.44488397240638733, 1.048714518547058, 0.19717222452163696, 0.027041004970669746, -0.9437440633773804, 0.40557438135147095, 0.37524306774139404, -0.7658376693725586, -0.18956853449344635, 0.26065921783447266, 0.22518356144428253, 0.4403972625732422, 0.6369728446006775, -0.3773990869522095, -0.010689759626984596, -0.24970407783985138, 0.47839683294296265, -0.11194726824760437, -0.20972083508968353, -0.25849562883377075, 0.00794187095016241, -0.11897451430559158, -0.29558196663856506 ]
Davlan/distilbert-base-multilingual-cased-ner-hrl
Davlan
"2023-08-14T19:34:34Z"
579,805
74
transformers
[ "transformers", "pytorch", "tf", "safetensors", "distilbert", "token-classification", "license:afl-3.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:04Z"
--- license: afl-3.0 --- Hugging Face's logo --- language: - ar - de - en - es - fr - it - lv - nl - pt - zh - multilingual --- # distilbert-base-multilingual-cased-ner-hrl ## Model description **distilbert-base-multilingual-cased-ner-hrl** is a **Named Entity Recognition** model for 10 high resourced languages (Arabic, German, English, Spanish, French, Italian, Latvian, Dutch, Portuguese and Chinese) based on a fine-tuned Distiled BERT base model. It has been trained to recognize three types of entities: location (LOC), organizations (ORG), and person (PER). Specifically, this model is a *distilbert-base-multilingual-cased* model that was fine-tuned on an aggregation of 10 high-resourced languages ## Intended uses & limitations #### How to use You can use this model with Transformers *pipeline* for NER. ```python from transformers import AutoTokenizer, AutoModelForTokenClassification from transformers import pipeline tokenizer = AutoTokenizer.from_pretrained("Davlan/distilbert-base-multilingual-cased-ner-hrl") model = AutoModelForTokenClassification.from_pretrained("Davlan/distilbert-base-multilingual-cased-ner-hrl") nlp = pipeline("ner", model=model, tokenizer=tokenizer) example = "Nader Jokhadar had given Syria the lead with a well-struck header in the seventh minute." ner_results = nlp(example) print(ner_results) ``` #### Limitations and bias This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. ## Training data The training data for the 10 languages are from: Language|Dataset -|- Arabic | [ANERcorp](https://camel.abudhabi.nyu.edu/anercorp/) German | [conll 2003](https://www.clips.uantwerpen.be/conll2003/ner/) English | [conll 2003](https://www.clips.uantwerpen.be/conll2003/ner/) Spanish | [conll 2002](https://www.clips.uantwerpen.be/conll2002/ner/) French | [Europeana Newspapers](https://github.com/EuropeanaNewspapers/ner-corpora/tree/master/enp_FR.bnf.bio) Italian | [Italian I-CAB](https://ontotext.fbk.eu/icab.html) Latvian | [Latvian NER](https://github.com/LUMII-AILab/FullStack/tree/master/NamedEntities) Dutch | [conll 2002](https://www.clips.uantwerpen.be/conll2002/ner/) Portuguese |[Paramopama + Second Harem](https://github.com/davidsbatista/NER-datasets/tree/master/Portuguese) Chinese | [MSRA](https://huggingface.co/datasets/msra_ner) The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes: Abbreviation|Description -|- O|Outside of a named entity B-PER |Beginning of a person’s name right after another person’s name I-PER |Person’s name B-ORG |Beginning of an organisation right after another organisation I-ORG |Organisation B-LOC |Beginning of a location right after another location I-LOC |Location ## Training procedure This model was trained on NVIDIA V100 GPU with recommended hyperparameters from HuggingFace code.
[ -0.5665714740753174, -0.6391882300376892, 0.10824994742870331, 0.4220272898674011, -0.17458130419254303, 0.11328300833702087, -0.2776445746421814, -0.5671126842498779, 0.5576766729354858, 0.2837664783000946, -0.497878760099411, -0.7124727368354797, -0.8713334202766418, 0.43189170956611633, -0.2319885492324829, 1.2608795166015625, -0.22137273848056793, 0.2617805302143097, 0.10436069220304489, -0.5868089199066162, -0.08450029045343399, -0.7476167678833008, -0.8910350799560547, -0.2748717963695526, 0.412941038608551, 0.1744469255208969, 0.47338271141052246, 0.5829800963401794, 0.26677578687667847, 0.36525288224220276, -0.2961268723011017, -0.0728597640991211, -0.20516420900821686, -0.23873411118984222, -0.1858500838279724, -0.13882136344909668, -0.3311944305896759, -0.08093307912349701, 0.7743251919746399, 0.6324060559272766, -0.19160933792591095, 0.28700193762779236, -0.041852980852127075, 0.7794455885887146, -0.2184230536222458, 0.2674403488636017, -0.41053423285484314, -0.04423394426703453, -0.2776046395301819, 0.2699286937713623, -0.11095631867647171, -0.19991253316402435, 0.2556987404823303, -0.3378659784793854, 0.16796818375587463, -0.053426072001457214, 1.4327340126037598, 0.05691205710172653, -0.5411834716796875, -0.25872135162353516, -0.3199508786201477, 0.5644639134407043, -0.5215908288955688, 0.7598361968994141, 0.2926129698753357, 0.1714756190776825, 0.012993714772164822, -0.48526298999786377, -0.7922545075416565, 0.027206696569919586, -0.18078209459781647, 0.012163584120571613, -0.27481403946876526, -0.23826691508293152, 0.3539404273033142, 0.4333527982234955, -0.5858469605445862, -0.08059503138065338, -0.4030359089374542, -0.28733769059181213, 0.588975727558136, -0.2289145439863205, 0.48487040400505066, -0.3632839024066925, -0.4217858612537384, -0.19543513655662537, -0.4876055121421814, 0.176493838429451, 0.39511168003082275, 0.435787558555603, -0.5586817264556885, 0.5573000311851501, -0.271946519613266, 0.7025360465049744, 0.28497979044914246, -0.2040369063615799, 0.7074697017669678, -0.2297670692205429, -0.23001566529273987, 0.021312320604920387, 0.883085310459137, 0.36462298035621643, 0.12953773140907288, -0.13496889173984528, -0.2774844169616699, 0.1327151358127594, -0.24770139157772064, -0.8748117089271545, -0.11328586935997009, 0.05611364543437958, -0.5355936884880066, -0.09502747654914856, -0.1042337715625763, -0.5849853157997131, 0.024264046922326088, -0.3994266092777252, 0.27048468589782715, -0.6294694542884827, -0.4292261302471161, 0.03392216935753822, -0.05584941804409027, 0.43756595253944397, 0.12467141449451447, -0.7578270435333252, 0.26224711537361145, 0.3913218080997467, 0.8833377361297607, -0.16127285361289978, -0.4501846134662628, -0.5427850484848022, -0.10216382145881653, -0.020238583907485008, 0.6569157242774963, -0.3869917690753937, -0.16137170791625977, 0.0020953810308128595, 0.42320048809051514, -0.15059557557106018, -0.489200621843338, 0.42231228947639465, -0.48288655281066895, 0.4502326548099518, -0.38967323303222656, -0.5132355093955994, -0.31713902950286865, 0.3975474536418915, -0.738717257976532, 1.2559723854064941, 0.4878183901309967, -0.9624725580215454, 0.5745692849159241, -0.44262757897377014, -0.5133644342422485, 0.02934599481523037, -0.32765573263168335, -0.5343562960624695, 0.01523836050182581, 0.29275617003440857, 0.4344954192638397, 0.02348027005791664, 0.39410650730133057, 0.06699568033218384, 0.12544281780719757, -0.1672324389219284, 0.014655140228569508, 1.1453553438186646, -0.015099186450242996, -0.38058218359947205, 0.0041343653574585915, -0.9285085797309875, -0.30078259110450745, 0.2425234615802765, -0.47785288095474243, -0.37321510910987854, -0.36777085065841675, 0.4389944076538086, 0.5714640617370605, 0.18289029598236084, -0.6844159364700317, 0.2732674777507782, -0.40736889839172363, 0.27580496668815613, 0.4688650965690613, -0.01782694086432457, 0.42472878098487854, -0.1808449923992157, 0.5221042037010193, 0.38078054785728455, -0.14076106250286102, -0.052264537662267685, -0.531000554561615, -0.9456582069396973, -0.15678882598876953, 0.49618545174598694, 0.6511477828025818, -1.030871868133545, 0.34962698817253113, -0.2779797613620758, -0.47319647669792175, -0.4944995939731598, 0.0686846449971199, 0.6179599761962891, 0.6992200016975403, 0.4377046525478363, -0.5544129610061646, -0.7608022689819336, -0.936416506767273, -0.22427071630954742, -0.2282683551311493, 0.27606937289237976, 0.2893510162830353, 0.6953020691871643, -0.2861577272415161, 0.694498598575592, -0.06577634811401367, -0.4222472906112671, -0.25796711444854736, -0.01002133172005415, 0.5370110273361206, 0.5208979249000549, 0.7288625240325928, -0.9360944628715515, -0.7020324468612671, -0.02862285077571869, -0.7263873815536499, 0.21014553308486938, -0.006947426125407219, -0.30487725138664246, 0.5789290070533752, 0.42189010977745056, -0.5579254031181335, 0.4580242931842804, 0.6649673581123352, -0.4809595048427582, 0.41332367062568665, -0.0341104231774807, -0.07438453286886215, -1.32597017288208, 0.14151228964328766, 0.22470031678676605, -0.06675893813371658, -0.6180940866470337, -0.049722421914339066, -0.09387490898370743, -0.011977478861808777, -0.6274533867835999, 0.967592716217041, -0.7784919738769531, 0.0022556870244443417, -0.06205090880393982, -0.05169712007045746, -0.11816751956939697, 0.5168460607528687, 0.6054355502128601, 0.5697620511054993, 0.6623981595039368, -0.6902258396148682, 0.2213997095823288, 0.6682906150817871, -0.33965346217155457, 0.8440318703651428, -0.5113776922225952, -0.07162012904882431, -0.2782703936100006, 0.25989747047424316, -0.5060685276985168, -0.2979509234428406, 0.29491162300109863, -0.5575551986694336, 0.46200302243232727, -0.4326626658439636, -0.5128061175346375, -0.3016044497489929, 0.0834587886929512, 0.4007553160190582, 0.282812237739563, -0.6081011295318604, 0.7903015613555908, 0.43102002143859863, -0.06641978770494461, -0.7549217939376831, -0.7996633052825928, 0.2477586716413498, -0.3593374490737915, -0.5330163836479187, 0.4028052091598511, 0.055689699947834015, 0.021262146532535553, 0.04099959880113602, 0.006920563522726297, -0.2120603322982788, -0.0719372034072876, 0.16001693904399872, 0.3779556155204773, -0.2651147246360779, 0.05288587138056755, -0.12726052105426788, -0.05450551584362984, -0.13608194887638092, -0.24099071323871613, 0.634258508682251, -0.37146931886672974, -0.05367344990372658, -0.47559815645217896, 0.44130775332450867, 0.34091201424598694, -0.3394339978694916, 1.119577169418335, 0.8547579646110535, -0.6662394404411316, 0.22150516510009766, -0.6682204604148865, -0.05266609042882919, -0.41319796442985535, 0.25706174969673157, -0.6005277633666992, -0.8616366982460022, 0.7248250246047974, 0.1418462097644806, 0.06822105497121811, 0.7276299595832825, 0.7136285305023193, 0.3490806221961975, 0.7453649044036865, 0.9114850163459778, -0.4816528260707855, 0.530903160572052, -0.34977343678474426, 0.11357427388429642, -0.7790892124176025, -0.42640480399131775, -0.45045769214630127, -0.2931705713272095, -0.8962125778198242, -0.20878073573112488, 0.122530996799469, 0.13198332488536835, -0.31690940260887146, 0.8167676329612732, -0.6502074003219604, 0.2929711639881134, 0.48576003313064575, -0.13339708745479584, 0.19444485008716583, 0.2185787558555603, -0.29178446531295776, -0.01593448966741562, -0.5411818027496338, -0.5814366340637207, 0.6413756012916565, 0.5051590800285339, 0.41591185331344604, 0.15886855125427246, 1.0002291202545166, -0.19353191554546356, 0.4449112117290497, -0.6499221920967102, 0.2999032437801361, -0.11887086927890778, -0.7284031510353088, -0.13773402571678162, -0.47253164649009705, -0.9186505675315857, 0.0703207328915596, -0.1045866385102272, -0.8218480348587036, 0.41843757033348083, -0.11758720129728317, -0.30193179845809937, 0.37117868661880493, -0.4380419850349426, 0.8545430302619934, -0.30808988213539124, -0.08261651545763016, 0.2828194200992584, -0.8056562542915344, 0.17209097743034363, 0.080415740609169, 0.2356707602739334, -0.21103404462337494, -0.006179534364491701, 0.8528048396110535, -0.24851538240909576, 0.6954226493835449, -0.26892274618148804, -0.09770511835813522, 0.12049021571874619, -0.10339738428592682, 0.3068627715110779, 0.08528617024421692, -0.15646713972091675, 0.6784553527832031, 0.03507361561059952, -0.43655943870544434, -0.2504628896713257, 0.6283780336380005, -0.8233981728553772, -0.24197351932525635, -0.6744008660316467, -0.29297956824302673, -0.01737932860851288, 0.43770885467529297, 0.5736178159713745, 0.28350692987442017, -0.1996612697839737, -0.011724728159606457, 0.41401806473731995, -0.3805524408817291, 0.49289819598197937, 0.6512611508369446, -0.32949164509773254, -0.5707001090049744, 0.8497173190116882, 0.10405465960502625, -0.03589659184217453, 0.2931663990020752, -0.004098089877516031, -0.317935585975647, -0.3234093487262726, -0.850419819355011, 0.5554091334342957, -0.4732389450073242, -0.2929301857948303, -0.9513970613479614, -0.398845911026001, -0.5196205377578735, 0.04679981991648674, -0.33093640208244324, -0.3195350468158722, -0.328315407037735, -0.12109841406345367, 0.3731255829334259, 0.5778974294662476, -0.08928321301937103, 0.3667824864387512, -0.7292750477790833, 0.35027989745140076, -0.03596996143460274, 0.44768550992012024, -0.1911648064851761, -0.6383147835731506, -0.2963452935218811, 0.000024886221581255086, -0.14231030642986298, -1.050484538078308, 0.6793200373649597, 0.42029231786727905, 0.5328719019889832, 0.4603804051876068, -0.20585937798023224, 0.6569440960884094, -0.6382552981376648, 0.6025682091712952, 0.2646856904029846, -0.8697677850723267, 0.5656823515892029, -0.261752188205719, 0.12162892520427704, 0.6933318972587585, 0.7980880737304688, -0.8728042840957642, -0.1337554007768631, -0.8566299676895142, -0.9055211544036865, 0.7112171053886414, 0.22955699265003204, 0.2867538332939148, -0.38467779755592346, 0.4239947199821472, 0.0318024680018425, 0.2965135872364044, -0.9638879299163818, -0.5491331219673157, -0.09067771583795547, -0.2466614544391632, 0.02027161791920662, -0.17363795638084412, -0.03769699111580849, -0.4071063995361328, 1.0599595308303833, -0.0660099908709526, 0.2689862549304962, 0.3646925091743469, -0.22035887837409973, -0.01301727257668972, 0.005394123960286379, 0.382727712392807, 0.46220162510871887, -0.0521199069917202, -0.05990783870220184, 0.31988251209259033, -0.44093310832977295, 0.07735906541347504, 0.31408193707466125, -0.2058800458908081, 0.41798385977745056, 0.28215092420578003, 1.0167171955108643, -0.022394172847270966, -0.43884149193763733, 0.7380260825157166, -0.1717846393585205, -0.14644980430603027, -0.5452275276184082, -0.33716973662376404, 0.11203915625810623, 0.32246795296669006, 0.40148547291755676, -0.1989998072385788, 0.04938274621963501, -0.5904099345207214, 0.4456976056098938, 0.43199121952056885, -0.4030827581882477, -0.43426942825317383, 0.5137491822242737, 0.07095106691122055, -0.27736610174179077, 0.7701380848884583, -0.4181005656719208, -0.8297635912895203, 0.6172492504119873, 0.44420483708381653, 0.8338602185249329, -0.42458274960517883, 0.15423759818077087, 0.8563137650489807, 0.30282628536224365, 0.0183552335947752, 0.4135088622570038, 0.07302630692720413, -0.9000467658042908, -0.358609139919281, -1.0151108503341675, -0.09990888088941574, 0.22364994883537292, -0.9504951238632202, 0.533052921295166, -0.44762691855430603, -0.28410643339157104, 0.14023752510547638, 0.16395658254623413, -1.0699503421783447, 0.2658118009567261, 0.3957599699497223, 1.0884729623794556, -1.1004643440246582, 0.7946173548698425, 1.0288153886795044, -0.6865522861480713, -0.878163754940033, -0.2138056755065918, 0.0996033251285553, -0.9134122133255005, 0.8594925403594971, 0.4125710129737854, 0.2771402597427368, -0.07793061435222626, -0.37882301211357117, -1.0106830596923828, 0.810187816619873, 0.2738531827926636, -0.5680302977561951, -0.2568865418434143, -0.10713294893503189, 0.49381402134895325, -0.5609546303749084, 0.3441416025161743, 0.6340743899345398, 0.40181463956832886, 0.08858130872249603, -1.1235175132751465, 0.03242415562272072, -0.5068018436431885, 0.021463898941874504, 0.22752264142036438, -0.8651250004768372, 0.793302059173584, -0.18386900424957275, -0.3875845968723297, -0.04347700625658035, 0.866518497467041, 0.2484300583600998, 0.359034925699234, 0.6029213070869446, 0.8965991735458374, 0.5890983939170837, -0.1055140569806099, 0.8718339800834656, -0.5829050540924072, 0.41049185395240784, 1.0855796337127686, -0.03728824481368065, 0.8005720376968384, 0.5111564993858337, -0.16892416775226593, 0.8645444512367249, 0.7795731425285339, -0.19692154228687286, 0.3536984324455261, 0.03696610406041145, -0.2372286468744278, 0.09302778542041779, -0.3149946331977844, -0.36912500858306885, 0.6674772500991821, 0.1907544881105423, -0.45910587906837463, -0.24837712943553925, 0.10207430273294449, 0.4650627076625824, -0.1388688087463379, -0.01010696031153202, 0.9191620349884033, 0.12162373960018158, -0.6057949066162109, 0.6147850751876831, 0.1209893673658371, 0.7386544942855835, -0.3605218529701233, -0.05420606583356857, -0.24306876957416534, -0.04473521187901497, -0.2993409335613251, -0.5460981130599976, 0.3657475411891937, 0.033795781433582306, -0.2440006583929062, -0.18754833936691284, 0.39958351850509644, -0.7188875675201416, -0.7243267297744751, 0.43338942527770996, 0.6554696559906006, 0.43873152136802673, -0.0009199394844472408, -0.9681638479232788, 0.12205373495817184, 0.02522219717502594, -0.3896213471889496, 0.3288867473602295, 0.5194803476333618, -0.08693475276231766, 0.4305090606212616, 0.6609883308410645, 0.26673081517219543, -0.03122815676033497, 0.18583451211452484, 0.9958781599998474, -0.7400375008583069, -0.47241806983947754, -0.8333808183670044, 0.4218212068080902, -0.15673354268074036, -0.5106693506240845, 0.7843291759490967, 0.7767574191093445, 1.2068424224853516, 0.10467632114887238, 0.6418361067771912, -0.31627368927001953, 0.6003690361976624, -0.321747750043869, 0.7660349607467651, -0.5607047080993652, -0.1965877115726471, -0.42065227031707764, -1.085692286491394, -0.2376965433359146, 0.8189812898635864, -0.12082415819168091, 0.15874849259853363, 0.4795757234096527, 0.527572512626648, -0.08093097060918808, -0.3458738625049591, 0.006179839372634888, 0.2330346256494522, 0.08804940432310104, 0.6178233623504639, 0.5119798183441162, -0.6070343852043152, 0.24568402767181396, -0.5431939363479614, -0.24858292937278748, -0.0009170586708933115, -1.0069864988327026, -0.996696949005127, -0.7652290463447571, -0.6132587790489197, -0.6680741906166077, -0.1268831342458725, 0.953140139579773, 0.7272791862487793, -1.01572585105896, -0.21245530247688293, 0.06306087970733643, -0.020545238628983498, -0.0520523265004158, -0.22104652225971222, 0.49655410647392273, -0.10498789697885513, -0.8652067184448242, 0.0943739116191864, 0.12368118017911911, 0.19084139168262482, -0.22825679183006287, -0.1484556794166565, -0.489978164434433, -0.1687479466199875, 0.5557020902633667, 0.495784729719162, -0.7446695566177368, -0.10299639403820038, 0.009360398165881634, -0.22357088327407837, 0.12263259291648865, 0.4637967348098755, -0.790067195892334, 0.32218295335769653, 0.27474871277809143, 0.6501997709274292, 0.5886869430541992, 0.03822595253586769, 0.184695765376091, -0.7914102673530579, 0.3435545861721039, 0.14907628297805786, 0.5715320110321045, 0.6832466125488281, -0.4658549726009369, 0.6411046981811523, 0.36317139863967896, -0.4031698405742645, -0.7311447858810425, 0.01380210928618908, -0.951528012752533, 0.08827337622642517, 1.1847546100616455, -0.21386416256427765, -0.4176303446292877, 0.009652490727603436, -0.09545977413654327, 0.5323534607887268, -0.439532607793808, 0.5334603786468506, 0.8378249406814575, -0.039724793285131454, -0.21001268923282623, -0.523280143737793, 0.5346203446388245, 0.2857712507247925, -0.6441084146499634, -0.3000985085964203, 0.40184685587882996, 0.5883011817932129, 0.23943573236465454, 0.7891438603401184, -0.12524494528770447, 0.032897986471652985, -0.20653215050697327, 0.36675623059272766, 0.17733219265937805, -0.29566290974617004, -0.460791677236557, -0.2838812470436096, -0.2886216640472412, -0.08037935942411423 ]
facebook/esm2_t6_8M_UR50D
facebook
"2023-03-21T15:05:17Z"
579,714
9
transformers
[ "transformers", "pytorch", "tf", "safetensors", "esm", "fill-mask", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-09-26T18:44:55Z"
--- license: mit widget: - text: "MQIFVKTLTGKTITLEVEPS<mask>TIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG" --- ## ESM-2 ESM-2 is a state-of-the-art protein model trained on a masked language modelling objective. It is suitable for fine-tuning on a wide range of tasks that take protein sequences as input. For detailed information on the model architecture and training data, please refer to the [accompanying paper](https://www.biorxiv.org/content/10.1101/2022.07.20.500902v2). You may also be interested in some demo notebooks ([PyTorch](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/protein_language_modeling.ipynb), [TensorFlow](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/protein_language_modeling-tf.ipynb)) which demonstrate how to fine-tune ESM-2 models on your tasks of interest. Several ESM-2 checkpoints are available in the Hub with varying sizes. Larger sizes generally have somewhat better accuracy, but require much more memory and time to train: | Checkpoint name | Num layers | Num parameters | |------------------------------|----|----------| | [esm2_t48_15B_UR50D](https://huggingface.co/facebook/esm2_t48_15B_UR50D) | 48 | 15B | | [esm2_t36_3B_UR50D](https://huggingface.co/facebook/esm2_t36_3B_UR50D) | 36 | 3B | | [esm2_t33_650M_UR50D](https://huggingface.co/facebook/esm2_t33_650M_UR50D) | 33 | 650M | | [esm2_t30_150M_UR50D](https://huggingface.co/facebook/esm2_t30_150M_UR50D) | 30 | 150M | | [esm2_t12_35M_UR50D](https://huggingface.co/facebook/esm2_t12_35M_UR50D) | 12 | 35M | | [esm2_t6_8M_UR50D](https://huggingface.co/facebook/esm2_t6_8M_UR50D) | 6 | 8M |
[ -0.43286916613578796, -0.5948188304901123, 0.3451700806617737, 0.25143834948539734, -0.21601180732250214, 0.07263188809156418, 0.14439348876476288, -0.5148124098777771, 0.26199525594711304, 0.41369765996932983, -0.823645830154419, -0.5298078060150146, -0.9321447610855103, 0.08285602927207947, -0.2009565830230713, 1.0775045156478882, 0.016725201159715652, 0.2736850380897522, -0.3467542827129364, -0.0974586233496666, -0.10452957451343536, -0.24699701368808746, -0.8235457539558411, -0.7321904897689819, 0.33444544672966003, 0.4830930233001709, 0.27816280722618103, 0.6799968481063843, 0.483710914850235, 0.23480339348316193, -0.5061230659484863, 0.3614945709705353, -0.5236067175865173, 0.1913013458251953, -0.1278853714466095, -0.4432218670845032, -0.8108993768692017, -0.15640226006507874, 0.4631693959236145, 0.5357983112335205, 0.05967068672180176, 0.5000954270362854, 0.20006313920021057, 0.9462715983390808, -0.33044615387916565, 0.20107398927211761, -0.4289981424808502, 0.2930558919906616, -0.30063536763191223, -0.0294165201485157, -0.38406872749328613, 0.05322859063744545, 0.06543418020009995, -0.3559257388114929, 0.20486700534820557, 0.15609800815582275, 1.3329850435256958, 0.22855551540851593, -0.6410025358200073, -0.2321455329656601, -0.4450559914112091, 0.8633005023002625, -0.4986128509044647, 0.44113239645957947, 0.7549484372138977, 0.31233540177345276, -0.311479389667511, -0.7776964902877808, -0.03774675726890564, 0.31149277091026306, -0.018207045271992683, 0.4075634479522705, -0.2706676423549652, 0.19684995710849762, 0.5741735100746155, 0.3238019347190857, -0.9867098331451416, 0.20061780512332916, -0.6449559926986694, -0.22502902150154114, 0.5896285176277161, 0.21261174976825714, 0.34234681725502014, 0.029040465131402016, -0.4778575897216797, 0.15694497525691986, -0.5793555378913879, 0.05346396192908287, 0.29802146553993225, -0.04445972666144371, -0.23009276390075684, 0.6315001249313354, -0.480423241853714, 0.7830644249916077, 0.07780147343873978, -0.1703084409236908, 0.49410390853881836, -0.0571163147687912, 0.036438338458538055, -0.5153999328613281, 0.5630656480789185, 0.7384749054908752, -0.09274467825889587, -0.11241381615400314, -0.4512767791748047, -0.11555881798267365, 0.056661564856767654, -1.3266040086746216, -0.17637522518634796, 0.6442699432373047, -0.5269268155097961, -0.24235236644744873, 0.14367489516735077, -0.8252849578857422, -0.012478902004659176, -0.2597578763961792, 0.38785606622695923, -0.5422586798667908, -0.2528670132160187, 0.17664362490177155, -0.4887385666370392, 0.35865965485572815, 0.22958333790302277, -0.8911137580871582, 0.6524139046669006, 0.7310635447502136, 1.204780101776123, -0.044345736503601074, -0.23178869485855103, -0.45360684394836426, 0.2968023121356964, -0.14748544991016388, 0.8973982334136963, -0.22378353774547577, -0.054943036288022995, 0.03227940946817398, 0.3305625319480896, -0.06580691784620285, -0.5599132776260376, 0.4015985429286957, -0.3154959976673126, 0.16187289357185364, -0.44350239634513855, -0.8219118118286133, -0.42323148250579834, 0.12532706558704376, -0.4397115111351013, 1.511417269706726, 0.22225822508335114, -0.5932333469390869, 0.10905569791793823, -0.596603274345398, -0.36443719267845154, -0.010763244703412056, -0.15697887539863586, -0.7766455411911011, 0.12372530996799469, -0.1986265629529953, 0.44252124428749084, -0.33904075622558594, 0.032737866044044495, -0.348014771938324, -0.3738921880722046, 0.07780202478170395, 0.46803247928619385, 0.72878497838974, 0.4880448877811432, -0.6219625473022461, -0.32824161648750305, -0.9636508226394653, 0.27144044637680054, 0.22943241894245148, -0.2865031957626343, 0.37163564562797546, 0.031491719186306, 0.2388780564069748, 0.6633126139640808, 0.26304522156715393, -0.49460721015930176, 0.08127875626087189, -0.3347261846065521, 0.6760265231132507, 0.47823628783226013, 0.021799767389893532, 0.30168917775154114, -0.7133479118347168, 0.43020161986351013, 0.046437397599220276, 0.09081178903579712, -0.11273607611656189, -0.8875462412834167, -0.9781202077865601, -0.41126102209091187, -0.09131547808647156, 0.709625780582428, -0.28704267740249634, 0.7993070483207703, 0.1780405342578888, -0.6202290058135986, -0.3906804919242859, 0.11966904997825623, 0.5862323641777039, 0.26789480447769165, 0.49038735032081604, -0.21219372749328613, -0.8324195146560669, -1.24872887134552, -0.39795610308647156, 0.021931996569037437, -0.32722410559654236, 0.2212991863489151, 0.8645740747451782, -0.3867488205432892, 0.7940034866333008, -0.38670575618743896, -0.31946876645088196, -0.18432576954364777, 0.1253906488418579, 0.13540205359458923, 0.6940749883651733, 0.6713649034500122, -0.467111736536026, -0.4518308937549591, -0.12512120604515076, -0.8316616415977478, -0.22168487310409546, 0.16300183534622192, -0.052125152200460434, 0.16502241790294647, 0.6559585332870483, -0.49920654296875, 0.12339610606431961, 0.7405292391777039, -0.6772065758705139, 0.1437574028968811, -0.1701519787311554, -0.03467698022723198, -1.399620532989502, 0.22133202850818634, 0.0010441772174090147, -0.4963051378726959, -0.6787911057472229, 0.11090599000453949, 0.182108536362648, -0.22018320858478546, -0.6039910316467285, 0.701884388923645, -0.7848694324493408, -0.3400299847126007, -0.3983633518218994, -0.03083828277885914, 0.2713123857975006, 0.5318776369094849, 0.018705854192376137, 0.4734397828578949, 0.7913426160812378, -0.37162044644355774, 0.058225031942129135, 0.3924252986907959, -0.3197719156742096, 0.45273545384407043, -0.9615444540977478, 0.5378125905990601, -0.2790154218673706, 0.3468168079853058, -1.0673848390579224, -0.4796869158744812, 0.16322264075279236, -0.5583397150039673, 0.5518417358398438, -0.36080700159072876, -0.4871777594089508, -0.5269289016723633, -0.4776739478111267, 0.1847769021987915, 0.8182274699211121, -0.3804255425930023, 0.46660682559013367, 0.5981992483139038, -0.04036524146795273, -0.3835642635822296, -1.0345759391784668, -0.12370975315570831, -0.12907953560352325, -0.6919488906860352, 0.4997578561306, 0.030942892655730247, 0.1698799729347229, -0.1807207614183426, -0.14772100746631622, 0.11725518107414246, 0.026875590905547142, 0.6858153939247131, -0.04615432769060135, 0.12290260940790176, -0.20047304034233093, 0.3994077742099762, -0.312433660030365, -0.18986493349075317, -0.2758200764656067, 0.7003496885299683, -0.5158420205116272, -0.20546548068523407, -0.7183876037597656, 0.48914051055908203, 0.7337195873260498, -0.1175120547413826, 0.9533959627151489, 0.8746064901351929, -0.8861373066902161, -0.125338613986969, -0.6284884810447693, -0.4729703664779663, -0.4544825553894043, 0.8687288761138916, -0.6350417733192444, -1.1199365854263306, 0.8227498531341553, -0.22240781784057617, 0.02171579748392105, 0.5882766246795654, 0.6833544969558716, -0.2745453119277954, 1.3089244365692139, 0.4021073877811432, 0.3787214159965515, 0.42246222496032715, -0.5024165511131287, -0.09165925532579422, -1.0258433818817139, -0.8448766469955444, -0.6438778638839722, -0.49330946803092957, -0.45237019658088684, -0.5272616147994995, 0.13273440301418304, 0.6052178740501404, -0.5750541687011719, 0.7132769227027893, -0.3632934093475342, 0.49136853218078613, 0.26081541180610657, 0.3297274708747864, -0.1986551135778427, 0.2191268354654312, -0.09125966578722, 0.043674662709236145, -0.8945397734642029, -0.6452824473381042, 0.9477233290672302, 0.9216138124465942, 0.4873199760913849, 0.1407938450574875, 0.6541234850883484, 0.10780592262744904, -0.10015279799699783, -0.8777646422386169, 0.5124962329864502, -0.16278061270713806, -0.855940580368042, -0.09292086213827133, -0.20696617662906647, -0.7199745774269104, 0.14624932408332825, -0.2342839241027832, -1.0072033405303955, -0.029355701059103012, 0.1913592517375946, -0.23155775666236877, 0.35147249698638916, -0.5749273300170898, 0.6769623756408691, 0.01282842643558979, -0.33755895495414734, -0.12911729514598846, -0.8871088027954102, -0.025059595704078674, 0.0015477384440600872, 0.08690007776021957, -0.42939531803131104, -0.18667705357074738, 1.090214490890503, -0.6050925850868225, 0.802660346031189, -0.17979438602924347, 0.3715484142303467, 0.29586589336395264, 0.036759454756975174, 0.9599766135215759, 0.10200387239456177, -0.19007724523544312, 0.32956254482269287, 0.12195350229740143, -0.9123082756996155, -0.24976876378059387, 0.5426566004753113, -1.0748339891433716, -0.1674443930387497, -0.5904820561408997, -0.35250917077064514, -0.20058749616146088, 0.2541351616382599, 0.7725739479064941, 0.49955448508262634, -0.015055048279464245, 0.3713914453983307, 0.6618280410766602, -0.2682616710662842, 0.27281343936920166, 0.7709749341011047, -0.23358692228794098, -0.5733029246330261, 0.6574614644050598, 0.2715482711791992, 0.3607094883918762, 0.36277154088020325, -0.13399241864681244, -0.4601365029811859, -0.6286524534225464, -0.44345545768737793, 0.2813057005405426, -0.5167379379272461, -0.45645344257354736, -1.1660727262496948, -0.33647724986076355, -0.3974854648113251, -0.14647093415260315, -0.8324502110481262, -0.48203879594802856, -0.23493880033493042, -0.2952269911766052, 0.6371464133262634, 0.6796403527259827, -0.29942893981933594, 0.242500439286232, -0.6598784923553467, 0.20505554974079132, 0.18426337838172913, 0.42188572883605957, -0.4713980257511139, -1.010549783706665, -0.19826146960258484, -0.043430060148239136, -0.2952716052532196, -1.0545628070831299, 0.24816875159740448, 0.5593339800834656, 0.47217923402786255, 0.4722321927547455, -0.430264413356781, 0.39207974076271057, -0.4509093761444092, 0.7517218589782715, 0.3917974531650543, -0.7027214169502258, 0.8234429359436035, -0.4790959060192108, 0.30232948064804077, 0.6857604384422302, 0.3746759593486786, -0.7092304229736328, -0.4439576268196106, -0.5651525855064392, -0.8582442402839661, 0.9340387582778931, 0.34992745518684387, -0.01652023382484913, -0.15044862031936646, 0.47456297278404236, 0.10882019996643066, 0.0661044493317604, -0.4665970504283905, -0.5329884886741638, 0.0615118145942688, -0.08179668337106705, 0.2044447809457779, -0.7658749222755432, -0.19441789388656616, -0.3271101415157318, 1.094083309173584, -0.17655408382415771, 0.5558725595474243, 0.021935194730758667, -0.031178433448076248, -0.4360264241695404, -0.17567691206932068, 0.7940462231636047, 0.5575451254844666, -0.5597056746482849, 0.1061491146683693, 0.39536455273628235, -0.46131715178489685, -0.04697268828749657, 0.09902091324329376, -0.4287671148777008, 0.050634995102882385, 0.23913723230361938, 0.9357270002365112, 0.09405004978179932, -0.4959694445133209, 0.5749691128730774, 0.2188093513250351, -0.4756297171115875, -0.2218163013458252, -0.12192211300134659, 0.33507412672042847, 0.45828402042388916, 0.2343909740447998, 0.19782201945781708, 0.15282116830348969, -0.6308636665344238, 0.467692494392395, 0.2777506411075592, -0.6649008393287659, -0.4118964672088623, 0.7857384085655212, 0.1880180537700653, -0.4098900258541107, 0.7456859946250916, -0.538620114326477, -0.6710497140884399, 0.8551456332206726, 0.8817096948623657, 0.8575696349143982, -0.2745877802371979, 0.23418395221233368, 0.9822799563407898, 0.2996458411216736, -0.40997666120529175, 0.648109495639801, 0.407463014125824, -0.6366848945617676, -0.14258742332458496, -0.9431370496749878, -0.0515194833278656, 0.4995492398738861, -0.9731295704841614, 0.550543487071991, -0.4150903820991516, -0.27912214398384094, -0.10849761962890625, 0.18115390837192535, -0.8356630802154541, 0.17058567702770233, 0.09854123741388321, 1.197348952293396, -1.1796214580535889, 0.9587405323982239, 1.051628589630127, -0.26639634370803833, -0.504551351070404, -0.5443487167358398, 0.4354577958583832, -0.9515924453735352, 0.22350428998470306, 0.40875178575515747, 0.18324773013591766, 0.0760713517665863, -0.3669179081916809, -0.9488543272018433, 1.594597578048706, 0.2440950721502304, -0.9640191197395325, 0.17932042479515076, 0.04864425212144852, 0.5473630428314209, -0.2976279556751251, 0.416392058134079, 0.5125850439071655, 0.2287057489156723, 0.131259024143219, -0.6905020475387573, 0.12463442236185074, -0.5395618081092834, 0.1987660676240921, 0.16984392702579498, -1.2356675863265991, 0.7695242762565613, -0.28845879435539246, -0.03907173126935959, 0.4521067440509796, 0.650055468082428, 0.6364552974700928, 0.44041356444358826, 0.31808698177337646, 0.8376544117927551, 0.7555709481239319, -0.33967626094818115, 0.8847651481628418, -0.5171399116516113, 0.9460013508796692, 0.9976338148117065, -0.019087374210357666, 0.6146108508110046, 0.5725572109222412, -0.31570547819137573, 0.28442123532295227, 1.1209683418273926, -0.2828802764415741, 0.46939370036125183, 0.3305080533027649, -0.0628325492143631, -0.3642248511314392, -0.07465386390686035, -0.6704146265983582, 0.1814834475517273, 0.2459566444158554, -0.39215797185897827, -0.20207110047340393, -0.05756114050745964, 0.1448030322790146, -0.1788448840379715, -0.018468767404556274, 0.7589463591575623, 0.24003605544567108, -0.44018709659576416, 0.3197686970233917, 0.2985588610172272, 0.44438934326171875, -0.6040270924568176, 0.050799038261175156, -0.4867650866508484, 0.09601303189992905, -0.3775447607040405, -0.6895162463188171, 0.34429430961608887, 0.06953170895576477, -0.25856372714042664, -0.32116857171058655, 0.8495295643806458, -0.5368079543113708, -0.5446425080299377, 0.4853071868419647, 0.5193317532539368, 0.5130595564842224, -0.05218454450368881, -1.0712345838546753, 0.2279108613729477, -0.23420660197734833, -0.5590859055519104, 0.4882259666919708, 0.1224512830376625, 0.3459535241127014, 0.6662497520446777, 0.2276192456483841, -0.18255087733268738, -0.1301821917295456, 0.06933418661355972, 0.7336953282356262, -0.5853554606437683, -0.4619547426700592, -0.7329950928688049, 0.5440044403076172, -0.07051265984773636, -0.4264679253101349, 0.711409330368042, 1.1590054035186768, 0.901970386505127, -0.24581432342529297, 0.5727592706680298, -0.20875731110572815, 0.5699768662452698, -0.5159938931465149, 0.6337248682975769, -0.7762610912322998, -0.11790647357702255, -0.007060658652335405, -0.9663395285606384, -0.18284662067890167, 0.7047803997993469, 0.09676951915025711, 0.16786301136016846, 0.641517162322998, 1.1378881931304932, 0.1565818190574646, -0.10736837983131409, 0.18737508356571198, 0.15306153893470764, 0.139578178524971, 0.7925640940666199, 0.7373891472816467, -1.008851408958435, 0.17869222164154053, -0.2666102647781372, -0.42373591661453247, -0.4338560402393341, -0.6463002562522888, -1.1623371839523315, -0.7806965708732605, -0.6067060232162476, -0.8000723719596863, 0.30066439509391785, 1.171266794204712, 1.1211860179901123, -1.1225453615188599, -0.1436522752046585, -0.1925220489501953, -0.29240062832832336, -0.36766162514686584, -0.14665351808071136, 0.25265151262283325, -0.17920581996440887, -0.9155244827270508, 0.34177500009536743, 0.5698809027671814, 0.26092207431793213, 0.21766024827957153, -0.4829370379447937, -0.28912749886512756, 0.007561840116977692, 0.7385510206222534, 0.3997464179992676, -0.6201385855674744, -0.3795100450515747, 0.021847322583198547, -0.2776602506637573, -0.09566562622785568, 0.4103512167930603, -0.0979374498128891, 0.3248024582862854, 0.682682991027832, 0.42947113513946533, 1.052815318107605, -0.21410758793354034, 0.42501717805862427, -0.70964515209198, 0.29764965176582336, 0.11865447461605072, 0.3484519124031067, 0.0926651656627655, -0.15573042631149292, 0.7088847160339355, 0.43991678953170776, -0.5910385251045227, -0.8363285064697266, 0.3932109475135803, -1.2730122804641724, -0.32323750853538513, 1.5713574886322021, 0.026301996782422066, -0.011736903339624405, -0.018540676683187485, -0.06211797147989273, 0.4315938949584961, -0.26602068543434143, 0.6443262100219727, 0.7616723775863647, -0.24025817215442657, -0.0173515435308218, -0.6844722628593445, 0.8017314076423645, 0.5649874806404114, -0.8154276013374329, -0.5120301842689514, 0.10946990549564362, 0.5754485130310059, -0.15814930200576782, 0.653670072555542, -0.42765146493911743, 0.236716166138649, 0.1116117388010025, -0.01058210339397192, -0.31468769907951355, -0.404886931180954, -0.3129856586456299, 0.044454168528318405, 0.03808499500155449, -0.2857479453086853 ]
CompVis/stable-diffusion-v1-4
CompVis
"2023-08-23T21:15:42Z"
574,369
6,079
diffusers
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "arxiv:2207.12598", "arxiv:2112.10752", "arxiv:2103.00020", "arxiv:2205.11487", "arxiv:1910.09700", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2022-08-20T13:26:13Z"
--- license: creativeml-openrail-m tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image widget: - text: "A high tech solarpunk utopia in the Amazon rainforest" example_title: Amazon rainforest - text: "A pikachu fine dining with a view to the Eiffel Tower" example_title: Pikachu in Paris - text: "A mecha robot in a favela in expressionist style" example_title: Expressionist robot - text: "an insect robot preparing a delicious meal" example_title: Insect robot - text: "A small cabin on top of a snowy mountain in the style of Disney, artstation" example_title: Snowy disney cabin extra_gated_prompt: |- This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies: 1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content 2. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license 3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully) Please read the full license carefully here: https://huggingface.co/spaces/CompVis/stable-diffusion-license extra_gated_heading: Please read the LICENSE to access this model --- # Stable Diffusion v1-4 Model Card Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input. For more information about how Stable Diffusion functions, please have a look at [🤗's Stable Diffusion with 🧨Diffusers blog](https://huggingface.co/blog/stable_diffusion). The **Stable-Diffusion-v1-4** checkpoint was initialized with the weights of the [Stable-Diffusion-v1-2](https:/steps/huggingface.co/CompVis/stable-diffusion-v1-2) checkpoint and subsequently fine-tuned on 225k steps at resolution 512x512 on "laion-aesthetics v2 5+" and 10% dropping of the text-conditioning to improve [classifier-free guidance sampling](https://arxiv.org/abs/2207.12598). This weights here are intended to be used with the 🧨 Diffusers library. If you are looking for the weights to be loaded into the CompVis Stable Diffusion codebase, [come here](https://huggingface.co/CompVis/stable-diffusion-v-1-4-original) ## Model Details - **Developed by:** Robin Rombach, Patrick Esser - **Model type:** Diffusion-based text-to-image generation model - **Language(s):** English - **License:** [The CreativeML OpenRAIL M license](https://huggingface.co/spaces/CompVis/stable-diffusion-license) is an [Open RAIL M license](https://www.licenses.ai/blog/2022/8/18/naming-convention-of-responsible-ai-licenses), adapted from the work that [BigScience](https://bigscience.huggingface.co/) and [the RAIL Initiative](https://www.licenses.ai/) are jointly carrying in the area of responsible AI licensing. See also [the article about the BLOOM Open RAIL license](https://bigscience.huggingface.co/blog/the-bigscience-rail-license) on which our license is based. - **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses a fixed, pretrained text encoder ([CLIP ViT-L/14](https://arxiv.org/abs/2103.00020)) as suggested in the [Imagen paper](https://arxiv.org/abs/2205.11487). - **Resources for more information:** [GitHub Repository](https://github.com/CompVis/stable-diffusion), [Paper](https://arxiv.org/abs/2112.10752). - **Cite as:** @InProceedings{Rombach_2022_CVPR, author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn}, title = {High-Resolution Image Synthesis With Latent Diffusion Models}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2022}, pages = {10684-10695} } ## Examples We recommend using [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Stable Diffusion. ### PyTorch ```bash pip install --upgrade diffusers transformers scipy ``` Running the pipeline with the default PNDM scheduler: ```python import torch from diffusers import StableDiffusionPipeline model_id = "CompVis/stable-diffusion-v1-4" device = "cuda" pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) pipe = pipe.to(device) prompt = "a photo of an astronaut riding a horse on mars" image = pipe(prompt).images[0] image.save("astronaut_rides_horse.png") ``` **Note**: If you are limited by GPU memory and have less than 4GB of GPU RAM available, please make sure to load the StableDiffusionPipeline in float16 precision instead of the default float32 precision as done above. You can do so by telling diffusers to expect the weights to be in float16 precision: ```py import torch pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) pipe = pipe.to(device) pipe.enable_attention_slicing() prompt = "a photo of an astronaut riding a horse on mars" image = pipe(prompt).images[0] image.save("astronaut_rides_horse.png") ``` To swap out the noise scheduler, pass it to `from_pretrained`: ```python from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler model_id = "CompVis/stable-diffusion-v1-4" # Use the Euler scheduler here instead scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler") pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16) pipe = pipe.to("cuda") prompt = "a photo of an astronaut riding a horse on mars" image = pipe(prompt).images[0] image.save("astronaut_rides_horse.png") ``` ### JAX/Flax To use StableDiffusion on TPUs and GPUs for faster inference you can leverage JAX/Flax. Running the pipeline with default PNDMScheduler ```python import jax import numpy as np from flax.jax_utils import replicate from flax.training.common_utils import shard from diffusers import FlaxStableDiffusionPipeline pipeline, params = FlaxStableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="flax", dtype=jax.numpy.bfloat16 ) prompt = "a photo of an astronaut riding a horse on mars" prng_seed = jax.random.PRNGKey(0) num_inference_steps = 50 num_samples = jax.device_count() prompt = num_samples * [prompt] prompt_ids = pipeline.prepare_inputs(prompt) # shard inputs and rng params = replicate(params) prng_seed = jax.random.split(prng_seed, num_samples) prompt_ids = shard(prompt_ids) images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=True).images images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-3:]))) ``` **Note**: If you are limited by TPU memory, please make sure to load the `FlaxStableDiffusionPipeline` in `bfloat16` precision instead of the default `float32` precision as done above. You can do so by telling diffusers to load the weights from "bf16" branch. ```python import jax import numpy as np from flax.jax_utils import replicate from flax.training.common_utils import shard from diffusers import FlaxStableDiffusionPipeline pipeline, params = FlaxStableDiffusionPipeline.from_pretrained( "CompVis/stable-diffusion-v1-4", revision="bf16", dtype=jax.numpy.bfloat16 ) prompt = "a photo of an astronaut riding a horse on mars" prng_seed = jax.random.PRNGKey(0) num_inference_steps = 50 num_samples = jax.device_count() prompt = num_samples * [prompt] prompt_ids = pipeline.prepare_inputs(prompt) # shard inputs and rng params = replicate(params) prng_seed = jax.random.split(prng_seed, num_samples) prompt_ids = shard(prompt_ids) images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=True).images images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-3:]))) ``` # Uses ## Direct Use The model is intended for research purposes only. Possible research areas and tasks include - Safe deployment of models which have the potential to generate harmful content. - Probing and understanding the limitations and biases of generative models. - Generation of artworks and use in design and other artistic processes. - Applications in educational or creative tools. - Research on generative models. Excluded uses are described below. ### Misuse, Malicious Use, and Out-of-Scope Use _Note: This section is taken from the [DALLE-MINI model card](https://huggingface.co/dalle-mini/dalle-mini), but applies in the same way to Stable Diffusion v1_. The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes. #### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. #### Misuse and Malicious Use Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to: - Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc. - Intentionally promoting or propagating discriminatory content or harmful stereotypes. - Impersonating individuals without their consent. - Sexual content without consent of the people who might see it. - Mis- and disinformation - Representations of egregious violence and gore - Sharing of copyrighted or licensed material in violation of its terms of use. - Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use. ## Limitations and Bias ### Limitations - The model does not achieve perfect photorealism - The model cannot render legible text - The model does not perform well on more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere” - Faces and people in general may not be generated properly. - The model was trained mainly with English captions and will not work as well in other languages. - The autoencoding part of the model is lossy - The model was trained on a large-scale dataset [LAION-5B](https://laion.ai/blog/laion-5b/) which contains adult material and is not fit for product use without additional safety mechanisms and considerations. - No additional measures were used to deduplicate the dataset. As a result, we observe some degree of memorization for images that are duplicated in the training data. The training data can be searched at [https://rom1504.github.io/clip-retrieval/](https://rom1504.github.io/clip-retrieval/) to possibly assist in the detection of memorized images. ### Bias While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. Stable Diffusion v1 was trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/), which consists of images that are primarily limited to English descriptions. Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as white and western cultures are often set as the default. Further, the ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts. ### Safety Module The intended use of this model is with the [Safety Checker](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/safety_checker.py) in Diffusers. This checker works by checking model outputs against known hard-coded NSFW concepts. The concepts are intentionally hidden to reduce the likelihood of reverse-engineering this filter. Specifically, the checker compares the class probability of harmful concepts in the embedding space of the `CLIPTextModel` *after generation* of the images. The concepts are passed into the model with the generated image and compared to a hand-engineered weight for each NSFW concept. ## Training **Training Data** The model developers used the following dataset for training the model: - LAION-2B (en) and subsets thereof (see next section) **Training Procedure** Stable Diffusion v1-4 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training, - Images are encoded through an encoder, which turns images into latent representations. The autoencoder uses a relative downsampling factor of 8 and maps images of shape H x W x 3 to latents of shape H/f x W/f x 4 - Text prompts are encoded through a ViT-L/14 text-encoder. - The non-pooled output of the text encoder is fed into the UNet backbone of the latent diffusion model via cross-attention. - The loss is a reconstruction objective between the noise that was added to the latent and the prediction made by the UNet. We currently provide four checkpoints, which were trained as follows. - [`stable-diffusion-v1-1`](https://huggingface.co/CompVis/stable-diffusion-v1-1): 237,000 steps at resolution `256x256` on [laion2B-en](https://huggingface.co/datasets/laion/laion2B-en). 194,000 steps at resolution `512x512` on [laion-high-resolution](https://huggingface.co/datasets/laion/laion-high-resolution) (170M examples from LAION-5B with resolution `>= 1024x1024`). - [`stable-diffusion-v1-2`](https://huggingface.co/CompVis/stable-diffusion-v1-2): Resumed from `stable-diffusion-v1-1`. 515,000 steps at resolution `512x512` on "laion-improved-aesthetics" (a subset of laion2B-en, filtered to images with an original size `>= 512x512`, estimated aesthetics score `> 5.0`, and an estimated watermark probability `< 0.5`. The watermark estimate is from the LAION-5B metadata, the aesthetics score is estimated using an [improved aesthetics estimator](https://github.com/christophschuhmann/improved-aesthetic-predictor)). - [`stable-diffusion-v1-3`](https://huggingface.co/CompVis/stable-diffusion-v1-3): Resumed from `stable-diffusion-v1-2`. 195,000 steps at resolution `512x512` on "laion-improved-aesthetics" and 10 % dropping of the text-conditioning to improve [classifier-free guidance sampling](https://arxiv.org/abs/2207.12598). - [`stable-diffusion-v1-4`](https://huggingface.co/CompVis/stable-diffusion-v1-4) Resumed from `stable-diffusion-v1-2`.225,000 steps at resolution `512x512` on "laion-aesthetics v2 5+" and 10 % dropping of the text-conditioning to improve [classifier-free guidance sampling](https://arxiv.org/abs/2207.12598). - **Hardware:** 32 x 8 x A100 GPUs - **Optimizer:** AdamW - **Gradient Accumulations**: 2 - **Batch:** 32 x 8 x 2 x 4 = 2048 - **Learning rate:** warmup to 0.0001 for 10,000 steps and then kept constant ## Evaluation Results Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0) and 50 PLMS sampling steps show the relative improvements of the checkpoints: ![pareto](https://huggingface.co/CompVis/stable-diffusion/resolve/main/v1-variants-scores.jpg) Evaluated using 50 PLMS steps and 10000 random prompts from the COCO2017 validation set, evaluated at 512x512 resolution. Not optimized for FID scores. ## Environmental Impact **Stable Diffusion v1** **Estimated Emissions** Based on that information, we estimate the following CO2 emissions using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact. - **Hardware Type:** A100 PCIe 40GB - **Hours used:** 150000 - **Cloud Provider:** AWS - **Compute Region:** US-east - **Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid):** 11250 kg CO2 eq. ## Citation ```bibtex @InProceedings{Rombach_2022_CVPR, author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn}, title = {High-Resolution Image Synthesis With Latent Diffusion Models}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2022}, pages = {10684-10695} } ``` *This model card was written by: Robin Rombach and Patrick Esser and is based on the [DALL-E Mini model card](https://huggingface.co/dalle-mini/dalle-mini).*
[ -0.3835906386375427, -0.7905313372612, 0.4806150197982788, 0.23691345751285553, -0.20900201797485352, -0.45682892203330994, -0.013745816424489021, -0.28089186549186707, -0.11545262485742569, 0.42753666639328003, -0.2656341791152954, -0.4567314684391022, -0.587272584438324, -0.19671957194805145, -0.2861272096633911, 0.9240415096282959, -0.2662455439567566, -0.06947650760412216, -0.14202092587947845, -0.05472472682595253, -0.0639769434928894, 0.03134126588702202, -0.8726106286048889, -0.2616833746433258, 0.490142822265625, -0.05620594322681427, 0.6330892443656921, 0.42838454246520996, 0.3729728162288666, 0.3797188699245453, -0.2597808539867401, 0.026995301246643066, -0.49275168776512146, 0.002761984709650278, 0.024728046730160713, -0.2562134861946106, -0.41311654448509216, 0.09506029635667801, 0.6567190885543823, 0.3529900908470154, -0.09290983527898788, 0.056462984532117844, 0.021339410915970802, 0.4465402364730835, -0.5873090028762817, 0.047325003892183304, -0.24650773406028748, 0.06696899980306625, -0.22973576188087463, -0.04759019985795021, -0.3296529948711395, -0.15206564962863922, 0.1360979825258255, -1.0054126977920532, 0.5102481245994568, -0.23228658735752106, 1.2512142658233643, 0.23773092031478882, -0.2983470857143402, -0.17868450284004211, -0.6164254546165466, 0.9010357856750488, -0.6759034991264343, 0.19280727207660675, 0.22327309846878052, 0.06031297892332077, -0.08360157161951065, -1.220390796661377, -0.5322810411453247, -0.05352002754807472, -0.0382835827767849, 0.378142386674881, -0.11265113204717636, 0.07732787728309631, 0.3336225152015686, 0.36530107259750366, -0.5446942448616028, -0.33032211661338806, -0.5498890280723572, -0.10445936769247055, 0.6256988048553467, 0.0982382744550705, 0.18304695188999176, -0.05047950521111488, -0.5245359539985657, -0.371669739484787, -0.2943083941936493, -0.10829620063304901, 0.1511930674314499, -0.13664954900741577, -0.42826002836227417, 0.39431384205818176, 0.16207242012023926, 0.651928722858429, 0.3038235902786255, -0.35308024287223816, 0.47081586718559265, -0.19653557240962982, -0.3075295686721802, -0.4159933924674988, 0.9065370559692383, 0.34543099999427795, -0.1828872710466385, 0.17438144981861115, -0.22593744099140167, -0.10735765099525452, -0.0006822292925789952, -1.168790340423584, -0.4476235508918762, 0.2589704394340515, -0.6616398096084595, -0.4976521134376526, -0.22316431999206543, -0.8400691747665405, -0.3219149112701416, 0.20170958340168, 0.754341185092926, -0.4983104467391968, -0.4630660116672516, 0.17724254727363586, -0.48347246646881104, 0.13011077046394348, 0.5108366012573242, -0.5531566739082336, 0.04765278473496437, 0.07084112614393234, 1.100409746170044, -0.021085580810904503, -0.15051370859146118, -0.0533771887421608, 0.22976848483085632, -0.24143077433109283, 0.5995344519615173, -0.2540462911128998, -0.6184155344963074, -0.27040308713912964, 0.3108495771884918, 0.006098163779824972, -0.4356437027454376, 0.6532618999481201, -0.5524797439575195, 0.2826274335384369, -0.1503984034061432, -0.5269908308982849, -0.30504682660102844, 0.0013542555971071124, -0.5660077929496765, 0.8991425633430481, 0.40839117765426636, -0.973455011844635, 0.25822025537490845, -0.7562538981437683, -0.18728406727313995, 0.09354250133037567, -0.11271229386329651, -0.8057141900062561, -0.17510010302066803, 0.09009912610054016, 0.3745167553424835, -0.10363540053367615, -0.06745358556509018, -0.28445670008659363, -0.2605324387550354, -0.016138717532157898, -0.41030311584472656, 1.1319005489349365, 0.44858869910240173, -0.36721667647361755, 0.042743172496557236, -0.6560465097427368, -0.04145883768796921, 0.3345334827899933, -0.29871776700019836, -0.15177088975906372, -0.2993525564670563, 0.35928478837013245, 0.1613321602344513, 0.14352025091648102, -0.5021559000015259, 0.0218951515853405, -0.19459223747253418, 0.4211854636669159, 0.7332816123962402, 0.3619582951068878, 0.5640490651130676, -0.5214362144470215, 0.48730334639549255, 0.2833486795425415, 0.08578448742628098, -0.09951973706483841, -0.7442024946212769, -0.711715042591095, -0.515029788017273, 0.12301944196224213, 0.3457528054714203, -0.7655634880065918, 0.24871930480003357, -0.03231705352663994, -0.8068784475326538, -0.13169345259666443, -0.0726403295993805, 0.23872599005699158, 0.6579646468162537, 0.41750356554985046, -0.3688051402568817, -0.3010055124759674, -0.5742563605308533, 0.22416985034942627, -0.03833041340112686, -0.028115617111325264, 0.291643351316452, 0.6121920347213745, -0.3203217387199402, 0.522102952003479, -0.65605229139328, -0.3601716160774231, 0.12873874604701996, 0.3414992690086365, 0.3221454322338104, 0.8329628109931946, 0.746997594833374, -0.7474247217178345, -0.5929708480834961, -0.14417822659015656, -0.7828765511512756, -0.008865424431860447, -0.32426226139068604, -0.4117017686367035, 0.16416993737220764, 0.36177465319633484, -0.8621413707733154, 0.6088696718215942, 0.4905259907245636, -0.4155352711677551, 0.5099083781242371, -0.44282907247543335, 0.18989694118499756, -0.9784930348396301, 0.19053201377391815, 0.22172784805297852, -0.38379281759262085, -0.4425707757472992, 0.1270267814397812, -0.1059921458363533, -0.01821526698768139, -0.6137109994888306, 0.7505217790603638, -0.537143349647522, 0.25263652205467224, -0.1821296364068985, -0.16962705552577972, 0.27707213163375854, 0.29656270146369934, 0.30844515562057495, 0.545600950717926, 0.8771939277648926, -0.7146385908126831, 0.24298010766506195, 0.2877933979034424, -0.2026546150445938, 0.5525721907615662, -0.8965272903442383, 0.1131792813539505, -0.18863445520401, 0.3323335647583008, -0.9269146919250488, -0.08836033940315247, 0.48812025785446167, -0.31353092193603516, 0.44310659170150757, -0.3273557126522064, -0.26013079285621643, -0.3403890132904053, -0.10557600855827332, 0.603792667388916, 0.8213170170783997, -0.3748011291027069, 0.6156684756278992, 0.19242995977401733, 0.2238590568304062, -0.38197022676467896, -0.8271474838256836, -0.29317373037338257, -0.37120217084884644, -0.8818502426147461, 0.6304140686988831, -0.195430189371109, -0.1616075485944748, 0.09591590613126755, 0.22035764157772064, -0.11746059358119965, -0.12810426950454712, 0.39042407274246216, 0.14784015715122223, -0.10025148093700409, -0.21904104948043823, -0.022658737376332283, -0.19524334371089935, 0.031306516379117966, -0.362149715423584, 0.38838881254196167, -0.03264155238866806, -0.2700008451938629, -0.6619434952735901, 0.12584294378757477, 0.3734711706638336, 0.12881942093372345, 0.8348756432533264, 1.1152799129486084, -0.3329488933086395, -0.07073409110307693, -0.2608187794685364, -0.2313094586133957, -0.5408077239990234, 0.32021430134773254, -0.2984142601490021, -0.3216523230075836, 0.5823147892951965, 0.07102992385625839, 0.2359776645898819, 0.5898904800415039, 0.7038992643356323, -0.21535073220729828, 0.9728577136993408, 0.362276554107666, 0.5597438812255859, 0.697190523147583, -0.9803629517555237, -0.13046474754810333, -0.7172139883041382, -0.11163942515850067, -0.184597909450531, -0.3029894530773163, -0.2505071461200714, -0.8662969470024109, 0.5450435876846313, 0.23819899559020996, -0.3498745560646057, -0.025406766682863235, -0.5976680517196655, 0.2639853060245514, 0.31653815507888794, 0.21534813940525055, 0.016940047964453697, 0.16498145461082458, -0.11196582019329071, -0.09119957685470581, -0.5286679267883301, -0.5062669515609741, 1.0157577991485596, 0.32471346855163574, 0.9832186698913574, -0.07960514724254608, 0.7466351985931396, 0.21353283524513245, 0.3459118604660034, -0.3313930928707123, 0.47565096616744995, -0.002257344778627157, -0.639798104763031, -0.12920577824115753, -0.24543748795986176, -0.9581276178359985, 0.3312847316265106, -0.21248659491539001, -0.3270626366138458, 0.3722723424434662, 0.28040096163749695, -0.20941247045993805, 0.5093699097633362, -0.6451971530914307, 0.835078239440918, -0.061366576701402664, -0.7707095742225647, -0.09339778125286102, -0.5037178993225098, 0.34851986169815063, 0.11559239774942398, 0.14303404092788696, 0.09659130871295929, -0.09425759315490723, 0.8670800924301147, -0.5851807594299316, 0.7043166756629944, -0.5558900833129883, 0.026226239278912544, 0.5209938883781433, -0.10117573291063309, 0.3240302801132202, 0.19980469346046448, -0.17510099709033966, 0.29426756501197815, 0.2779754102230072, -0.671185314655304, -0.21687978506088257, 0.704472541809082, -0.9496806859970093, -0.3441188931465149, -0.534812331199646, -0.5524879097938538, 0.41482120752334595, 0.35716164112091064, 0.7034149169921875, 0.3232676684856415, -0.04484223946928978, -0.0025264876894652843, 0.7215498685836792, -0.2750163972377777, 0.5078585147857666, 0.18062753975391388, -0.3581260144710541, -0.4935835301876068, 0.8337538838386536, 0.08365719020366669, 0.4735439121723175, -0.04393664374947548, 0.19135576486587524, -0.1687672883272171, -0.6522166132926941, -0.5461391806602478, 0.41234269738197327, -0.7865675091743469, -0.2368265688419342, -0.7534879446029663, -0.3458864986896515, -0.35461777448654175, -0.36170196533203125, -0.35633158683776855, -0.3295234143733978, -0.8112103939056396, 0.29573410749435425, 0.526434600353241, 0.5409477353096008, -0.406953364610672, 0.39472824335098267, -0.52950119972229, 0.22765089571475983, 0.22328701615333557, 0.11651844531297684, 0.036076486110687256, -0.7458357214927673, -0.24708223342895508, 0.19895079731941223, -0.6822335720062256, -0.7511477470397949, 0.49664637446403503, 0.2337358593940735, 0.5111753940582275, 0.612688422203064, -0.09308614581823349, 0.8480479717254639, -0.24260008335113525, 0.9651234149932861, 0.20887412130832672, -0.7346353530883789, 0.49253737926483154, -0.45048463344573975, 0.07868851721286774, 0.09677087515592575, 0.37637844681739807, -0.2573830485343933, -0.40660396218299866, -0.8000350594520569, -0.8552117347717285, 0.5665285587310791, 0.42053860425949097, 0.08694876730442047, 0.11614827066659927, 0.6227498650550842, -0.08704974502325058, -0.12985481321811676, -0.8895643949508667, -0.40210986137390137, -0.29670706391334534, 0.009592676535248756, 0.07251150906085968, 0.0033471346832811832, -0.26830172538757324, -0.4209810793399811, 0.9456127285957336, 0.05354069545865059, 0.5395418405532837, 0.49225372076034546, -0.07779986411333084, -0.37316375970840454, -0.3091695010662079, 0.38116931915283203, 0.5265927910804749, -0.33763420581817627, -0.01862846314907074, -0.026853954419493675, -0.6262597441673279, 0.14318104088306427, 0.12464355677366257, -0.4627186059951782, 0.07760192453861237, 0.1700957715511322, 0.624981164932251, -0.20287907123565674, -0.30157843232154846, 0.5658239126205444, -0.25834009051322937, -0.4414724111557007, -0.48341262340545654, 0.15318749845027924, 0.20574624836444855, 0.3658566176891327, 0.24646711349487305, 0.4525601267814636, 0.027869440615177155, -0.03089614026248455, 0.07558855414390564, 0.6607056856155396, -0.20127816498279572, -0.3102130591869354, 1.0611900091171265, 0.0290461927652359, 0.00654702028259635, 0.4805954694747925, -0.4459296762943268, -0.0864025428891182, 0.6798363327980042, 0.6363286375999451, 0.7451249361038208, -0.0830528736114502, 0.32954174280166626, 0.622685968875885, 0.045165639370679855, -0.18842807412147522, 0.29324766993522644, 0.13242025673389435, -0.7003082633018494, -0.03658796474337578, -0.5598111748695374, 0.022239375859498978, 0.10326743870973587, -0.4781399965286255, 0.5774651765823364, -0.5893107652664185, -0.36126700043678284, 0.023014966398477554, 0.02670205757021904, -0.6892820596694946, 0.2268923670053482, 0.27962255477905273, 0.7379993796348572, -1.0026121139526367, 0.7868684530258179, 0.664628803730011, -0.7123511433601379, -0.6797689199447632, -0.09717091917991638, -0.12596578896045685, -0.47356075048446655, 0.4676207900047302, -0.02012835443019867, 0.004716003779321909, 0.21568557620048523, -0.7396422028541565, -0.8957322835922241, 1.4208565950393677, 0.2804901599884033, -0.05047371983528137, 0.038340047001838684, -0.25782477855682373, 0.5151214003562927, -0.3694766163825989, 0.5463876724243164, 0.13791769742965698, 0.4340016841888428, 0.5214419960975647, -0.4212774634361267, 0.1415688395500183, -0.22999922931194305, 0.25199535489082336, -0.09403496235609055, -0.7599105834960938, 1.2596797943115234, -0.4247702360153198, -0.3273073434829712, 0.3297003209590912, 0.7904016971588135, 0.4241141080856323, 0.2504061460494995, 0.5896114706993103, 0.9094367623329163, 0.6239950656890869, -0.06967015564441681, 0.9631365537643433, -0.1040673777461052, 0.6514802575111389, 0.5642436742782593, 0.012206421233713627, 0.46422770619392395, 0.44365325570106506, -0.3251594603061676, 0.7437567114830017, 0.7115369439125061, -0.20592400431632996, 0.6327321529388428, 0.05676977336406708, -0.30169370770454407, -0.05968476086854935, 0.13936762511730194, -0.6745740175247192, 0.0013360533630475402, 0.4200326204299927, -0.5937643051147461, -0.18341578543186188, 0.050573308020830154, 0.04584389179944992, -0.3579676151275635, -0.12168679386377335, 0.3531644940376282, 0.019150692969560623, -0.3540741205215454, 0.9090234041213989, 0.10197615623474121, 0.8740339875221252, -0.4846130907535553, -0.1330086886882782, 0.029734034091234207, 0.32127320766448975, -0.34400948882102966, -0.7265663743019104, 0.25736117362976074, -0.29267165064811707, -0.0716027319431305, -0.3197994828224182, 0.6205004453659058, -0.4391009509563446, -0.6827002167701721, 0.19348987936973572, 0.17508889734745026, 0.44530513882637024, 0.1885187178850174, -1.0291942358016968, 0.24397966265678406, -0.052364517003297806, -0.5240609049797058, 0.16884884238243103, 0.2774069011211395, 0.2401818335056305, 0.510124146938324, 0.5883795022964478, 0.05380314961075783, 0.2170361429452896, -0.16467538475990295, 0.8389321565628052, -0.3788428008556366, -0.3738410770893097, -0.5268042683601379, 0.7740136384963989, -0.10453396290540695, -0.2943798303604126, 0.7068027853965759, 0.5808185935020447, 0.6316410303115845, -0.18236632645130157, 0.7716427445411682, -0.4606192111968994, 0.13421908020973206, -0.410582035779953, 0.8501086235046387, -0.7441702485084534, 0.15040141344070435, -0.41271883249282837, -0.7189178466796875, -0.08854939788579941, 0.9899355173110962, -0.2058800458908081, 0.43837210536003113, 0.5449300408363342, 1.1216943264007568, -0.2598322629928589, -0.203471839427948, 0.17190325260162354, 0.3250980079174042, 0.5178928375244141, 0.4442766606807709, 0.6089174151420593, -0.7521478533744812, 0.4495255947113037, -0.5873864889144897, -0.2692708671092987, 0.002909519709646702, -0.897109866142273, -0.6879628896713257, -0.7005485892295837, -0.7272257804870605, -0.9062881469726562, -0.22795122861862183, 0.4597203731536865, 1.0549836158752441, -0.5715709924697876, -0.042026862502098083, -0.36911752820014954, 0.038428548723459244, -0.18110965192317963, -0.2706926167011261, 0.371856689453125, -0.12226089090108871, -0.908452570438385, -0.13781891763210297, 0.09204967319965363, 0.4696770906448364, -0.3525378704071045, -0.2933987081050873, -0.36030295491218567, -0.0650593563914299, 0.1969800740480423, 0.300417423248291, -0.5829275250434875, -0.0027672192081809044, -0.40140101313591003, -0.14217540621757507, 0.06807523220777512, 0.33514121174812317, -0.7025915384292603, 0.5128827691078186, 0.6107975840568542, 0.02523263543844223, 0.9682776927947998, -0.08931469172239304, 0.17148497700691223, -0.5921393632888794, 0.5834586024284363, 0.24211135506629944, 0.3462165296077728, 0.2618711292743683, -0.40461063385009766, 0.3711780607700348, 0.5138575434684753, -0.8930150270462036, -0.7064051032066345, 0.030708342790603638, -1.0715371370315552, -0.23805713653564453, 1.2209241390228271, -0.42103222012519836, -0.4367428123950958, 0.033419281244277954, -0.2997816503047943, 0.2788182199001312, -0.25829410552978516, 0.48088645935058594, 0.2957780361175537, -0.24308180809020996, -0.3718816637992859, -0.4238159656524658, 0.5781455039978027, 0.14869080483913422, -0.5912176370620728, -0.31686317920684814, 0.55647212266922, 0.7206642031669617, 0.41178572177886963, 0.914826512336731, -0.2658330798149109, 0.21837761998176575, 0.23486293852329254, 0.16360926628112793, 0.1071179062128067, 0.14720644056797028, -0.31260907649993896, 0.027342084795236588, -0.021474016830325127, -0.2137647420167923 ]
sentence-transformers/all-MiniLM-L12-v2
sentence-transformers
"2023-11-16T14:52:26Z"
568,252
69
sentence-transformers
[ "sentence-transformers", "pytorch", "rust", "bert", "feature-extraction", "sentence-similarity", "en", "dataset:s2orc", "dataset:flax-sentence-embeddings/stackexchange_xml", "dataset:ms_marco", "dataset:gooaq", "dataset:yahoo_answers_topics", "dataset:code_search_net", "dataset:search_qa", "dataset:eli5", "dataset:snli", "dataset:multi_nli", "dataset:wikihow", "dataset:natural_questions", "dataset:trivia_qa", "dataset:embedding-data/sentence-compression", "dataset:embedding-data/flickr30k-captions", "dataset:embedding-data/altlex", "dataset:embedding-data/simple-wiki", "dataset:embedding-data/QQP", "dataset:embedding-data/SPECTER", "dataset:embedding-data/PAQ_pairs", "dataset:embedding-data/WikiAnswers", "arxiv:1904.06472", "arxiv:2102.07033", "arxiv:2104.08727", "arxiv:1704.05179", "arxiv:1810.09305", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity language: en license: apache-2.0 datasets: - s2orc - flax-sentence-embeddings/stackexchange_xml - ms_marco - gooaq - yahoo_answers_topics - code_search_net - search_qa - eli5 - snli - multi_nli - wikihow - natural_questions - trivia_qa - embedding-data/sentence-compression - embedding-data/flickr30k-captions - embedding-data/altlex - embedding-data/simple-wiki - embedding-data/QQP - embedding-data/SPECTER - embedding-data/PAQ_pairs - embedding-data/WikiAnswers --- # all-MiniLM-L12-v2 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/all-MiniLM-L12-v2') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch import torch.nn.functional as F #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L12-v2') model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L12-v2') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) # Normalize embeddings sentence_embeddings = F.normalize(sentence_embeddings, p=2, dim=1) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/all-MiniLM-L12-v2) ------ ## Background The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We used the pretrained [`microsoft/MiniLM-L12-H384-uncased`](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) model and fine-tuned in on a 1B sentence pairs dataset. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset. We developped this model during the [Community week using JAX/Flax for NLP & CV](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104), organized by Hugging Face. We developped this model as part of the project: [Train the Best Sentence Embedding Model Ever with 1B Training Pairs](https://discuss.huggingface.co/t/train-the-best-sentence-embedding-model-ever-with-1b-training-pairs/7354). We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Googles Flax, JAX, and Cloud team member about efficient deep learning frameworks. ## Intended uses Our model is intented to be used as a sentence and short paragraph encoder. Given an input text, it ouptuts a vector which captures the semantic information. The sentence vector may be used for information retrieval, clustering or sentence similarity tasks. By default, input text longer than 256 word pieces is truncated. ## Training procedure ### Pre-training We use the pretrained [`microsoft/MiniLM-L12-H384-uncased`](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) model. Please refer to the model card for more detailed information about the pre-training procedure. ### Fine-tuning We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss by comparing with true pairs. #### Hyper parameters We trained ou model on a TPU v3-8. We train the model during 100k steps using a batch size of 1024 (128 per TPU core). We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with a 2e-5 learning rate. The full training script is accessible in this current repository: `train_script.py`. #### Training data We use the concatenation from multiple datasets to fine-tune our model. The total number of sentence pairs is above 1 billion sentences. We sampled each dataset given a weighted probability which configuration is detailed in the `data_config.json` file. | Dataset | Paper | Number of training tuples | |--------------------------------------------------------|:----------------------------------------:|:--------------------------:| | [Reddit comments (2015-2018)](https://github.com/PolyAI-LDN/conversational-datasets/tree/master/reddit) | [paper](https://arxiv.org/abs/1904.06472) | 726,484,430 | | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Abstracts) | [paper](https://aclanthology.org/2020.acl-main.447/) | 116,288,806 | | [WikiAnswers](https://github.com/afader/oqa#wikianswers-corpus) Duplicate question pairs | [paper](https://doi.org/10.1145/2623330.2623677) | 77,427,422 | | [PAQ](https://github.com/facebookresearch/PAQ) (Question, Answer) pairs | [paper](https://arxiv.org/abs/2102.07033) | 64,371,441 | | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Titles) | [paper](https://aclanthology.org/2020.acl-main.447/) | 52,603,982 | | [S2ORC](https://github.com/allenai/s2orc) (Title, Abstract) | [paper](https://aclanthology.org/2020.acl-main.447/) | 41,769,185 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Body) pairs | - | 25,316,456 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title+Body, Answer) pairs | - | 21,396,559 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Answer) pairs | - | 21,396,559 | | [MS MARCO](https://microsoft.github.io/msmarco/) triplets | [paper](https://doi.org/10.1145/3404835.3462804) | 9,144,553 | | [GOOAQ: Open Question Answering with Diverse Answer Types](https://github.com/allenai/gooaq) | [paper](https://arxiv.org/pdf/2104.08727.pdf) | 3,012,496 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 1,198,260 | | [Code Search](https://huggingface.co/datasets/code_search_net) | - | 1,151,414 | | [COCO](https://cocodataset.org/#home) Image captions | [paper](https://link.springer.com/chapter/10.1007%2F978-3-319-10602-1_48) | 828,395| | [SPECTER](https://github.com/allenai/specter) citation triplets | [paper](https://doi.org/10.18653/v1/2020.acl-main.207) | 684,100 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Question, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 681,164 | | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Question) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 659,896 | | [SearchQA](https://huggingface.co/datasets/search_qa) | [paper](https://arxiv.org/abs/1704.05179) | 582,261 | | [Eli5](https://huggingface.co/datasets/eli5) | [paper](https://doi.org/10.18653/v1/p19-1346) | 325,475 | | [Flickr 30k](https://shannon.cs.illinois.edu/DenotationGraph/) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/229/33) | 317,695 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles) | | 304,525 | | AllNLI ([SNLI](https://nlp.stanford.edu/projects/snli/) and [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) | [paper SNLI](https://doi.org/10.18653/v1/d15-1075), [paper MultiNLI](https://doi.org/10.18653/v1/n18-1101) | 277,230 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (bodies) | | 250,519 | | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles+bodies) | | 250,460 | | [Sentence Compression](https://github.com/google-research-datasets/sentence-compression) | [paper](https://www.aclweb.org/anthology/D13-1155/) | 180,000 | | [Wikihow](https://github.com/pvl/wikihow_pairs_dataset) | [paper](https://arxiv.org/abs/1810.09305) | 128,542 | | [Altlex](https://github.com/chridey/altlex/) | [paper](https://aclanthology.org/P16-1135.pdf) | 112,696 | | [Quora Question Triplets](https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs) | - | 103,663 | | [Simple Wikipedia](https://cs.pomona.edu/~dkauchak/simplification/) | [paper](https://www.aclweb.org/anthology/P11-2117/) | 102,225 | | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 | | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 | | [TriviaQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 | | **Total** | | **1,170,060,424** |
[ -0.33927762508392334, -0.845321536064148, 0.31841665506362915, 0.1498280167579651, -0.12262380123138428, -0.245909184217453, -0.25133466720581055, -0.28983941674232483, 0.32418277859687805, 0.16178478300571442, -0.48499658703804016, -0.538569450378418, -0.6427863836288452, 0.11034799367189407, -0.29070091247558594, 1.0868431329727173, -0.04814496636390686, -0.08259986340999603, -0.4153960049152374, -0.3195079267024994, -0.12499430030584335, -0.4632977247238159, -0.4868605434894562, -0.023885026574134827, 0.4394809305667877, 0.34857818484306335, 0.46391233801841736, 0.49284517765045166, 0.37057581543922424, 0.2531508505344391, -0.08059988170862198, 0.3129199743270874, -0.5949597954750061, -0.13594280183315277, 0.1519489884376526, -0.37940409779548645, -0.18953782320022583, 0.06827066838741302, 0.4540497064590454, 0.613602340221405, -0.03106021322309971, 0.27446186542510986, 0.23033207654953003, 0.48099440336227417, -0.41620558500289917, 0.26881739497184753, -0.5291730165481567, 0.03721137344837189, -0.17112022638320923, 0.004623387474566698, -0.37529200315475464, -0.3590611517429352, 0.2767910063266754, -0.5341116786003113, 0.1669951230287552, 0.2850191295146942, 1.0232677459716797, 0.2490980178117752, -0.33510521054267883, -0.4488210380077362, -0.17131423950195312, 0.7798140645027161, -0.7248884439468384, 0.2320304661989212, 0.47713303565979004, -0.1380898356437683, 0.0252784863114357, -0.756933331489563, -0.718867301940918, -0.09961550682783127, -0.46544918417930603, 0.18896538019180298, -0.3621940016746521, -0.12750640511512756, 0.2448759526014328, 0.38261282444000244, -0.8189806342124939, 0.039078790694475174, -0.36918413639068604, -0.12503881752490997, 0.7112388610839844, 0.1191629022359848, 0.24914208054542542, -0.5366213917732239, -0.28460806608200073, -0.25048497319221497, -0.3256605565547943, 0.16205984354019165, 0.3030104637145996, 0.18558058142662048, -0.47619909048080444, 0.7139840126037598, -0.008479534648358822, 0.6072186231613159, 0.03339798003435135, 0.06269432604312897, 0.5594300627708435, -0.6014629006385803, -0.1678321212530136, -0.2601839601993561, 1.156416416168213, 0.3310418426990509, 0.14027473330497742, 0.04430195689201355, 0.11573706567287445, -0.03883042559027672, -0.1266103833913803, -0.7752931118011475, -0.28623971343040466, 0.30610811710357666, -0.4279591143131256, -0.3695204257965088, 0.0888848602771759, -0.7969286441802979, -0.1271447390317917, -0.003928021527826786, 0.3588847815990448, -0.5526386499404907, -0.14135770499706268, 0.21363843977451324, -0.13303819298744202, 0.25069788098335266, -0.046764545142650604, -0.695242166519165, 0.2813860774040222, 0.3978572189807892, 0.9069616794586182, -0.04565868154168129, -0.2717196047306061, -0.2940993309020996, -0.13565535843372345, -0.07181350141763687, 0.7088007926940918, -0.43953847885131836, -0.09355064481496811, 0.016854818910360336, 0.09704600274562836, -0.45506787300109863, -0.3579295873641968, 0.5432297587394714, -0.2781262695789337, 0.6357098817825317, -0.1634134203195572, -0.8157052397727966, -0.032524626702070236, 0.20499029755592346, -0.46371757984161377, 1.2528104782104492, 0.18196898698806763, -1.1314328908920288, 0.007751791272312403, -0.5905835032463074, -0.2019156962633133, -0.2132604867219925, -0.22080616652965546, -0.5971392393112183, -0.05486522242426872, 0.4464705288410187, 0.5345143675804138, -0.23099426925182343, 0.12039708346128464, -0.3843105137348175, -0.24530449509620667, 0.20571981370449066, -0.06601043045520782, 1.1641654968261719, 0.13664694130420685, -0.3066510558128357, -0.06278406083583832, -0.6252208352088928, -0.10827185213565826, 0.37258413434028625, -0.11771202087402344, -0.2152806967496872, -0.2693818211555481, 0.1936471313238144, 0.3237530291080475, 0.25998654961586, -0.6604185104370117, 0.18479260802268982, -0.5615849494934082, 0.6336076855659485, 0.6809512972831726, -0.007794405799359083, 0.3370075225830078, -0.45179739594459534, 0.4019271433353424, 0.13363878428936005, -0.03173697739839554, -0.07391361892223358, -0.5585876703262329, -1.043662190437317, -0.18136411905288696, 0.3852430284023285, 0.5610118508338928, -0.7615585923194885, 0.7801207304000854, -0.48593437671661377, -0.5332862138748169, -0.8588181138038635, 0.10399970412254333, 0.43168506026268005, 0.5638858675956726, 0.6533644795417786, -0.013258432038128376, -0.5965979099273682, -0.9580888748168945, -0.16887015104293823, -0.04977060481905937, 0.02339131571352482, 0.5181214213371277, 0.7810072898864746, -0.3187427818775177, 0.9183346033096313, -0.74689120054245, -0.39637574553489685, -0.2735329270362854, 0.05593755841255188, 0.20236942172050476, 0.5732430815696716, 0.5933613181114197, -0.6660922765731812, -0.632892906665802, -0.40895897150039673, -0.8597050905227661, 0.039101492613554, -0.03078915737569332, -0.25297829508781433, 0.3276843726634979, 0.6881070137023926, -0.7060753703117371, 0.3912258744239807, 0.5122796297073364, -0.42067623138427734, 0.29557180404663086, -0.12954989075660706, -0.18223468959331512, -1.2927716970443726, 0.21600762009620667, 0.07404239475727081, -0.11222637444734573, -0.45543426275253296, -0.024884937331080437, -0.08801499009132385, -0.05462337285280228, -0.34757331013679504, 0.5200300812721252, -0.4412214756011963, 0.09113790839910507, 0.15092383325099945, 0.37474319338798523, 0.040845561772584915, 0.7349594235420227, -0.10359492897987366, 0.6657270193099976, 0.4075618088245392, -0.36913710832595825, 0.20096628367900848, 0.6140010952949524, -0.42093586921691895, 0.30353718996047974, -0.8226804137229919, 0.24257777631282806, -0.1613316684961319, 0.4602859914302826, -1.0394929647445679, -0.06248269975185394, 0.2711262106895447, -0.5922119617462158, 0.09450976550579071, 0.09405092149972916, -0.636093258857727, -0.51473468542099, -0.5393088459968567, 0.30687645077705383, 0.41721466183662415, -0.4394727051258087, 0.38297200202941895, 0.35251203179359436, -0.04666442051529884, -0.5381864309310913, -1.0048631429672241, -0.15147028863430023, -0.13596932590007782, -0.8209510445594788, 0.4234393537044525, -0.25094205141067505, 0.027829544618725777, 0.21249030530452728, 0.12697194516658783, 0.17874708771705627, -0.1813056915998459, 0.14067165553569794, 0.13339956104755402, -0.09762322902679443, 0.2477501481771469, -0.053858865052461624, -0.08359281718730927, -0.15767914056777954, -0.21140849590301514, 0.7298769354820251, -0.4263443946838379, -0.0017245822818949819, -0.5648686289787292, 0.35655704140663147, 0.2880350947380066, -0.15458999574184418, 1.01404869556427, 0.8791921138763428, -0.3626149296760559, 0.14693760871887207, -0.5362223386764526, -0.1497681587934494, -0.4535473585128784, 0.3578968942165375, -0.31907618045806885, -1.10374116897583, 0.4190560579299927, 0.3952122926712036, 0.06985160708427429, 0.8089056015014648, 0.4465859830379486, -0.2889691889286041, 0.7984352111816406, 0.4128333032131195, -0.07891688495874405, 0.47028228640556335, -0.658200204372406, 0.3094279170036316, -0.9074562788009644, -0.27393782138824463, -0.40939566493034363, -0.2849804759025574, -0.8853128552436829, -0.6024313569068909, 0.34045612812042236, -0.04816553741693497, -0.21479853987693787, 0.4067631661891937, -0.5335083603858948, 0.09077095985412598, 0.5849851965904236, 0.3028453290462494, -0.051297735422849655, 0.08530020713806152, -0.25334522128105164, -0.1418991982936859, -0.8014289736747742, -0.3465559780597687, 1.1456605195999146, 0.3634876608848572, 0.50244140625, -0.055440180003643036, 0.7677966356277466, 0.1468704789876938, -0.08768998831510544, -0.5373455286026001, 0.5618617534637451, -0.2865909934043884, -0.4245803654193878, -0.1622384488582611, -0.5389447808265686, -1.0041674375534058, 0.1699567288160324, -0.32085466384887695, -0.684251606464386, 0.2981855869293213, 0.014526937156915665, -0.4587244391441345, 0.19761012494564056, -0.7636829614639282, 1.0104236602783203, -0.05396266281604767, -0.3680897057056427, -0.07672064006328583, -0.8073479533195496, 0.16391201317310333, 0.24450832605361938, 0.18817304074764252, -0.06770885735750198, -0.08515684306621552, 1.0348247289657593, -0.41804662346839905, 0.7301604747772217, -0.13239005208015442, 0.2533011734485626, 0.37055695056915283, -0.25608471035957336, 0.48601555824279785, 0.017999762669205666, -0.13818426430225372, 0.17253896594047546, 0.04766526445746422, -0.6654326915740967, -0.49672964215278625, 0.8214201331138611, -1.0307224988937378, -0.40795862674713135, -0.6034214496612549, -0.4602147340774536, -0.09379793703556061, 0.0700608566403389, 0.4333052635192871, 0.3907081186771393, -0.048804741352796555, 0.5472184419631958, 0.6348142027854919, -0.434391051530838, 0.4796595871448517, 0.10604310035705566, -0.04325395077466965, -0.5414313077926636, 0.7358060479164124, 0.13527873158454895, 0.039986491203308105, 0.49444350600242615, 0.24940982460975647, -0.3089296221733093, -0.38216954469680786, -0.2612540125846863, 0.40746748447418213, -0.5455800890922546, -0.2337009757757187, -1.1697053909301758, -0.3399572968482971, -0.7415545582771301, -0.0674619972705841, -0.2427746057510376, -0.4925639033317566, -0.5980175137519836, -0.32875391840934753, 0.4004725217819214, 0.4408071041107178, 0.012729461304843426, 0.17215031385421753, -0.4184790253639221, 0.2271883338689804, 0.26102524995803833, 0.017133768647909164, -0.14699214696884155, -0.7277176380157471, -0.2899995744228363, 0.12069390714168549, -0.28484439849853516, -0.65908282995224, 0.4370448589324951, 0.349471777677536, 0.45106497406959534, 0.12927542626857758, 0.1386990249156952, 0.7764878273010254, -0.2253211885690689, 0.9547063112258911, 0.07138409465551376, -0.7342311143875122, 0.666743278503418, -0.2118932455778122, 0.39460664987564087, 0.761107325553894, 0.5054445266723633, -0.455364465713501, -0.3341059684753418, -0.8394724130630493, -0.9807952046394348, 0.677979588508606, 0.459511935710907, 0.1898508220911026, -0.13609538972377777, 0.3437615633010864, -0.08799156546592712, 0.0756419450044632, -0.9062982797622681, -0.4618999660015106, -0.20699387788772583, -0.5886400938034058, -0.23026889562606812, -0.3352549374103546, -0.07246766984462738, -0.48884475231170654, 0.7616970539093018, -0.13473738729953766, 0.6668921709060669, 0.39724650979042053, -0.40370169281959534, 0.2900685966014862, 0.06545107811689377, 0.538804292678833, 0.312889039516449, -0.26438602805137634, 0.1334913820028305, 0.22788593173027039, -0.3260849118232727, -0.20089095830917358, 0.3791184425354004, -0.18638868629932404, -0.04842902719974518, 0.5044844746589661, 0.8721392750740051, 0.17728714644908905, -0.5749918222427368, 0.7752727270126343, -0.23951342701911926, -0.257531076669693, -0.41887035965919495, -0.11014355719089508, 0.22076846659183502, 0.1404622495174408, 0.19424495100975037, -0.02412508800625801, 0.02347678318619728, -0.5008347034454346, 0.27315637469291687, 0.2419218271970749, -0.3803652822971344, -0.11755774170160294, 0.5294257402420044, 0.039863377809524536, -0.05330389738082886, 0.7640666365623474, -0.23082205653190613, -0.4539232552051544, 0.5204508900642395, 0.42868176102638245, 0.7325261235237122, 0.16660138964653015, 0.13056078553199768, 0.680108904838562, 0.3390842080116272, 0.18661445379257202, 0.11344529688358307, 0.11636095494031906, -0.7139487266540527, 0.02691539190709591, -0.7101653218269348, 0.025085004046559334, 0.10673056542873383, -0.61798495054245, 0.22264419496059418, -0.2954091727733612, 0.04234522581100464, 0.08454351127147675, 0.2952589988708496, -0.8497061729431152, 0.014817646704614162, 0.047135114669799805, 0.8851869106292725, -0.9198325872421265, 0.7994102835655212, 0.5998835563659668, -0.6725584864616394, -0.6823704242706299, 0.0038073775358498096, -0.07803208380937576, -0.8828452825546265, 0.33009055256843567, 0.3716738224029541, 0.11891303956508636, 0.08539105951786041, -0.6405285000801086, -0.9151634573936462, 1.2938480377197266, 0.298225075006485, -0.4450817108154297, -0.12505115568637848, 0.1488303691148758, 0.6605880856513977, -0.5392059087753296, 0.4814389944076538, 0.5701120495796204, 0.3279362916946411, -0.04361293092370033, -0.7088726758956909, 0.19090573489665985, -0.5304788947105408, 0.1680930107831955, -0.22993789613246918, -0.8714029788970947, 0.7120646834373474, -0.08234503120183945, -0.13594064116477966, 0.09658489376306534, 0.7791467308998108, 0.3956778645515442, 0.23570440709590912, 0.4975249171257019, 0.9523763060569763, 0.7299906015396118, -0.1030285432934761, 1.1237229108810425, -0.27661940455436707, 0.5939082503318787, 1.1225550174713135, 0.18241341412067413, 0.9668264985084534, 0.46631956100463867, -0.18282578885555267, 0.7974395751953125, 0.8111693859100342, -0.09901338070631027, 0.5312341451644897, 0.1077326163649559, 0.05035797506570816, -0.09317952394485474, -0.14666645228862762, -0.4335898756980896, 0.4550785720348358, 0.27673646807670593, -0.4620152711868286, 0.08368004858493805, 0.1385888308286667, 0.3294050693511963, 0.07790157198905945, 0.09323500841856003, 0.7822538018226624, 0.19846642017364502, -0.5756475925445557, 0.6499109268188477, -0.07909763604402542, 0.9299449920654297, -0.4634730815887451, 0.3151051998138428, -0.3393082022666931, 0.206806018948555, -0.32298803329467773, -0.6799201369285583, 0.3794752359390259, -0.0018982881447300315, -0.13203708827495575, -0.24101778864860535, 0.4791416823863983, -0.6031811833381653, -0.6534817814826965, 0.4001617431640625, 0.41174226999282837, 0.11926743388175964, 0.1644507795572281, -1.0658183097839355, 0.056273140013217926, 0.12006893754005432, -0.4466902017593384, 0.22903573513031006, 0.21572361886501312, 0.3035985827445984, 0.45892441272735596, 0.5847637057304382, -0.2241683155298233, 0.10891631245613098, -0.07447967678308487, 0.8970315456390381, -0.6627347469329834, -0.5194181799888611, -0.7885852456092834, 0.5712753534317017, -0.3343367576599121, -0.45746996998786926, 0.8146598935127258, 0.8205991387367249, 0.9782440662384033, 0.04688459262251854, 0.6731931567192078, -0.39176055788993835, 0.5058417916297913, -0.44801726937294006, 0.5762373208999634, -0.716701865196228, 0.09454739838838577, -0.25062477588653564, -0.6703499555587769, -0.2847250699996948, 0.7265200018882751, -0.4312136471271515, 0.10732812434434891, 0.9098556041717529, 0.949697732925415, -0.0016949368873611093, -0.028463609516620636, -0.005529861897230148, 0.38098618388175964, 0.21923789381980896, 0.7877994775772095, 0.41361287236213684, -0.9306777715682983, 0.7943616509437561, -0.4501202404499054, -0.13611125946044922, -0.32897502183914185, -0.6452230215072632, -0.8816012740135193, -0.77419513463974, -0.4871041178703308, -0.5303853154182434, 0.024988524615764618, 1.0734496116638184, 0.6997667551040649, -0.8416135907173157, -0.16885125637054443, -0.1656835377216339, -0.03438534960150719, -0.0677659809589386, -0.28263646364212036, 0.7171230912208557, -0.19885820150375366, -0.6439827680587769, 0.16062569618225098, -0.05381051450967789, -0.049250271171331406, -0.023504361510276794, -0.06960485130548477, -0.7125580310821533, 0.029044484719634056, 0.5732613801956177, 0.14921891689300537, -0.642704427242279, -0.28341951966285706, 0.06761151552200317, -0.37095907330513, 0.14139997959136963, 0.45838454365730286, -0.4970170855522156, 0.34824731945991516, 0.5663702487945557, 0.5878287553787231, 0.9124936461448669, -0.11111674457788467, 0.24900150299072266, -0.7648026347160339, 0.2590161859989166, 0.23981696367263794, 0.42274507880210876, 0.4742249846458435, -0.39551231265068054, 0.7178226709365845, 0.4175773561000824, -0.5654740929603577, -0.7096117734909058, -0.11207988858222961, -1.2065844535827637, -0.16515186429023743, 1.3008116483688354, -0.3235549330711365, -0.20430999994277954, 0.09676142036914825, -0.14939162135124207, 0.30163952708244324, -0.3848385810852051, 0.6004412174224854, 0.6393587589263916, -0.2655092179775238, -0.3620290756225586, -0.3850102722644806, 0.45292872190475464, 0.5095716714859009, -0.9161062836647034, -0.20076756179332733, 0.24192743003368378, 0.3554458022117615, 0.23245514929294586, 0.691929042339325, -0.058331359177827835, -0.038302477449178696, -0.008594345301389694, -0.0976189598441124, -0.05100598558783531, 0.0330972783267498, -0.33968985080718994, 0.21922104060649872, -0.3501017093658447, -0.23055140674114227 ]
papluca/xlm-roberta-base-language-detection
papluca
"2023-11-09T11:14:27Z"
559,176
163
transformers
[ "transformers", "pytorch", "tf", "xlm-roberta", "text-classification", "generated_from_trainer", "multilingual", "ar", "bg", "de", "el", "en", "es", "fr", "hi", "it", "ja", "nl", "pl", "pt", "ru", "sw", "th", "tr", "ur", "vi", "zh", "arxiv:1911.02116", "base_model:xlm-roberta-base", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: - multilingual - ar - bg - de - el - en - es - fr - hi - it - ja - nl - pl - pt - ru - sw - th - tr - ur - vi - zh license: mit tags: - generated_from_trainer metrics: - accuracy - f1 base_model: xlm-roberta-base model-index: - name: xlm-roberta-base-language-detection results: [] --- # xlm-roberta-base-language-detection This model is a fine-tuned version of [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) on the [Language Identification](https://huggingface.co/datasets/papluca/language-identification#additional-information) dataset. ## Model description This model is an XLM-RoBERTa transformer model with a classification head on top (i.e. a linear layer on top of the pooled output). For additional information please refer to the [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) model card or to the paper [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) by Conneau et al. ## Intended uses & limitations You can directly use this model as a language detector, i.e. for sequence classification tasks. Currently, it supports the following 20 languages: `arabic (ar), bulgarian (bg), german (de), modern greek (el), english (en), spanish (es), french (fr), hindi (hi), italian (it), japanese (ja), dutch (nl), polish (pl), portuguese (pt), russian (ru), swahili (sw), thai (th), turkish (tr), urdu (ur), vietnamese (vi), and chinese (zh)` ## Training and evaluation data The model was fine-tuned on the [Language Identification](https://huggingface.co/datasets/papluca/language-identification#additional-information) dataset, which consists of text sequences in 20 languages. The training set contains 70k samples, while the validation and test sets 10k each. The average accuracy on the test set is **99.6%** (this matches the average macro/weighted F1-score being the test set perfectly balanced). A more detailed evaluation is provided by the following table. | Language | Precision | Recall | F1-score | support | |:--------:|:---------:|:------:|:--------:|:-------:| |ar |0.998 |0.996 |0.997 |500 | |bg |0.998 |0.964 |0.981 |500 | |de |0.998 |0.996 |0.997 |500 | |el |0.996 |1.000 |0.998 |500 | |en |1.000 |1.000 |1.000 |500 | |es |0.967 |1.000 |0.983 |500 | |fr |1.000 |1.000 |1.000 |500 | |hi |0.994 |0.992 |0.993 |500 | |it |1.000 |0.992 |0.996 |500 | |ja |0.996 |0.996 |0.996 |500 | |nl |1.000 |1.000 |1.000 |500 | |pl |1.000 |1.000 |1.000 |500 | |pt |0.988 |1.000 |0.994 |500 | |ru |1.000 |0.994 |0.997 |500 | |sw |1.000 |1.000 |1.000 |500 | |th |1.000 |0.998 |0.999 |500 | |tr |0.994 |0.992 |0.993 |500 | |ur |1.000 |1.000 |1.000 |500 | |vi |0.992 |1.000 |0.996 |500 | |zh |1.000 |1.000 |1.000 |500 | ### Benchmarks As a baseline to compare `xlm-roberta-base-language-detection` against, we have used the Python [langid](https://github.com/saffsd/langid.py) library. Since it comes pre-trained on 97 languages, we have used its `.set_languages()` method to constrain the language set to our 20 languages. The average accuracy of langid on the test set is **98.5%**. More details are provided by the table below. | Language | Precision | Recall | F1-score | support | |:--------:|:---------:|:------:|:--------:|:-------:| |ar |0.990 |0.970 |0.980 |500 | |bg |0.998 |0.964 |0.981 |500 | |de |0.992 |0.944 |0.967 |500 | |el |1.000 |0.998 |0.999 |500 | |en |1.000 |1.000 |1.000 |500 | |es |1.000 |0.968 |0.984 |500 | |fr |0.996 |1.000 |0.998 |500 | |hi |0.949 |0.976 |0.963 |500 | |it |0.990 |0.980 |0.985 |500 | |ja |0.927 |0.988 |0.956 |500 | |nl |0.980 |1.000 |0.990 |500 | |pl |0.986 |0.996 |0.991 |500 | |pt |0.950 |0.996 |0.973 |500 | |ru |0.996 |0.974 |0.985 |500 | |sw |1.000 |1.000 |1.000 |500 | |th |1.000 |0.996 |0.998 |500 | |tr |0.990 |0.968 |0.979 |500 | |ur |0.998 |0.996 |0.997 |500 | |vi |0.971 |0.990 |0.980 |500 | |zh |1.000 |1.000 |1.000 |500 | ## Training procedure Fine-tuning was done via the `Trainer` API. Here is the [Colab notebook](https://colab.research.google.com/drive/15LJTckS6gU3RQOmjLqxVNBmbsBdnUEvl?usp=sharing) with the training code. ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 64 - eval_batch_size: 128 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 2 - mixed_precision_training: Native AMP ### Training results The validation results on the `valid` split of the Language Identification dataset are summarised here below. | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:| | 0.2492 | 1.0 | 1094 | 0.0149 | 0.9969 | 0.9969 | | 0.0101 | 2.0 | 2188 | 0.0103 | 0.9977 | 0.9977 | In short, it achieves the following results on the validation set: - Loss: 0.0101 - Accuracy: 0.9977 - F1: 0.9977 ### Framework versions - Transformers 4.12.5 - Pytorch 1.10.0+cu111 - Datasets 1.15.1 - Tokenizers 0.10.3
[ -0.593082070350647, -0.7417405247688293, -0.07914815843105316, 0.17219844460487366, -0.0444740392267704, 0.09904561936855316, -0.4698030948638916, -0.279583603143692, 0.15996551513671875, 0.12070947140455246, -0.5054770708084106, -0.8080095648765564, -0.6578525304794312, 0.14186358451843262, -0.1667984127998352, 1.0287379026412964, -0.032078471034765244, 0.15940892696380615, 0.14616326987743378, -0.34683915972709656, -0.38713088631629944, -0.43398746848106384, -0.769519567489624, -0.29699084162712097, 0.13902996480464935, 0.40850335359573364, 0.6099599003791809, 0.756159782409668, 0.3385399281978607, 0.32941317558288574, -0.3442589044570923, 0.13401523232460022, -0.23548761010169983, -0.3916833996772766, 0.21349583566188812, -0.5895185470581055, -0.4243607223033905, 0.0017752399435266852, 0.6883505582809448, 0.6452249884605408, -0.05123237892985344, 0.34117618203163147, 0.12832967936992645, 0.730281412601471, -0.44032785296440125, 0.1952095329761505, -0.4374008774757385, 0.06364769488573074, -0.398098886013031, -0.1362667679786682, -0.4356920123100281, -0.2242198884487152, -0.08336441963911057, -0.44382864236831665, 0.26013317704200745, 0.0031078124884516, 1.4539541006088257, 0.20553132891654968, -0.24677638709545135, -0.17673088610172272, -0.48803070187568665, 0.9159204959869385, -0.667694628238678, 0.4780043959617615, 0.5133816599845886, 0.11736534535884857, 0.03481096029281616, -0.46240726113319397, -0.7563484311103821, -0.004717116244137287, -0.2369103729724884, 0.15377569198608398, -0.16208422183990479, -0.19775694608688354, 0.5838093161582947, 0.6026700139045715, -1.0186963081359863, 0.17753678560256958, -0.3157413601875305, -0.460704505443573, 0.728592574596405, -0.005887551233172417, 0.2850134074687958, -0.1787855327129364, -0.31813785433769226, -0.3463200330734253, -0.572625994682312, 0.45904967188835144, 0.45720478892326355, 0.41872918605804443, -0.45347875356674194, 0.358555406332016, -0.3147214353084564, 0.9149393439292908, 0.09727106988430023, -0.3560914993286133, 0.9768942594528198, -0.4946804344654083, -0.30983737111091614, 0.01289406605064869, 1.169368028640747, 0.20978271961212158, 0.33984431624412537, 0.06449900567531586, -0.18127073347568512, 0.00735537288710475, -0.2329329252243042, -0.8844797015190125, -0.15738682448863983, 0.3437977433204651, -0.32890790700912476, -0.3451892137527466, 0.12050962448120117, -0.6132022142410278, 0.23844501376152039, -0.3287189304828644, 0.28470876812934875, -0.7117500901222229, -0.3758898973464966, 0.007203669287264347, 0.04632997885346413, 0.45302367210388184, 0.08926452696323395, -1.013458013534546, 0.23498928546905518, 0.49887368083000183, 0.8544948697090149, -0.13153588771820068, -0.41109251976013184, -0.38581550121307373, -0.28356099128723145, -0.48554274439811707, 0.752528965473175, -0.14981070160865784, -0.2492748647928238, -0.13726212084293365, 0.3070981502532959, -0.34762874245643616, -0.5542286038398743, 0.5959469079971313, -0.3786662518978119, 0.47269830107688904, -0.16864553093910217, -0.5296647548675537, -0.15267185866832733, 0.4789533317089081, -0.5937089323997498, 1.5925028324127197, 0.27633216977119446, -0.794884204864502, 0.6802914142608643, -0.4623290002346039, -0.28431591391563416, 0.09801269322633743, -0.26479053497314453, -0.7745618224143982, -0.4092715084552765, 0.32936692237854004, 0.26767173409461975, -0.20786283910274506, 0.37141716480255127, -0.03962649777531624, -0.5680893063545227, 0.23412266373634338, -0.5160487294197083, 1.358591914176941, 0.2345476746559143, -0.8040658235549927, -0.012059048749506474, -1.1546844244003296, 0.3444876968860626, 0.1277400106191635, -0.6237345933914185, -0.11173266172409058, -0.5878449082374573, 0.21864761412143707, 0.3125326931476593, 0.26088789105415344, -0.67464679479599, 0.08464059978723526, -0.7056323289871216, 0.07609976083040237, 0.6595056056976318, -0.19179144501686096, 0.34092310070991516, -0.34900709986686707, 0.5332208275794983, 0.13158902525901794, -0.002783108502626419, -0.22193622589111328, -0.678436815738678, -0.9936381578445435, -0.44391775131225586, 0.636896550655365, 0.8612807393074036, -0.4753760099411011, 1.0231103897094727, -0.30377691984176636, -0.6132276654243469, -0.5392908453941345, 0.2517559826374054, 0.721157431602478, 0.5558146834373474, 0.33680644631385803, -0.2332015186548233, -0.5438669919967651, -0.9173067212104797, -0.12751229107379913, -0.11238671839237213, 0.16085974872112274, 0.25744563341140747, 0.7038675546646118, -0.1350918412208557, 0.9902318120002747, -0.4219571352005005, -0.4558875858783722, -0.324241042137146, 0.04744666814804077, 0.582548975944519, 0.5960179567337036, 0.8411761522293091, -0.734098494052887, -0.9106981158256531, 0.2240319550037384, -0.7643879652023315, 0.02295539900660515, 0.04592670872807503, 0.13232728838920593, 0.800733208656311, 0.45951172709465027, -0.4688080847263336, 0.5617032051086426, 0.6232289671897888, -0.37486159801483154, 0.660332441329956, -0.34808585047721863, 0.20448562502861023, -1.281697154045105, 0.41349726915359497, 0.10597533732652664, 0.005805139895528555, -0.641001284122467, 0.043394025415182114, 0.3410392105579376, -0.053612783551216125, -0.4131261706352234, 0.7640188932418823, -0.5019001960754395, 0.05496237426996231, 0.08456616848707199, -0.0009579191682860255, -0.17510543763637543, 0.7503962516784668, 0.2344733029603958, 1.2211635112762451, 0.7647210359573364, -0.48733606934547424, 0.16436201333999634, 0.12965890765190125, -0.7873251438140869, 0.466685026884079, -0.6769927144050598, 0.00009482239693170413, 0.10198840498924255, -0.02351619116961956, -1.1545315980911255, -0.04507845267653465, 0.26037725806236267, -0.7703054547309875, 0.4090502858161926, -0.26079341769218445, -0.5384671092033386, -0.5403313040733337, -0.2246881127357483, 0.18073689937591553, 0.5478930473327637, -0.46365100145339966, 0.5253326892852783, 0.09727347642183304, -0.07105740904808044, -0.9561014771461487, -0.8495181202888489, -0.06439507752656937, -0.2507016658782959, -0.6536642909049988, 0.26257234811782837, -0.17497950792312622, -0.10825193673372269, -0.20271740853786469, 0.013263610191643238, -0.15240658819675446, 0.10733739286661148, 0.24674050509929657, 0.3230378031730652, -0.3182162940502167, -0.016951674595475197, -0.10909203439950943, -0.341435045003891, -0.11550280451774597, 0.05563390254974365, 0.9142161011695862, -0.44080308079719543, -0.20783518254756927, -0.6780126690864563, -0.10548396408557892, 0.4688512682914734, -0.5844823122024536, 0.8681753873825073, 0.7943544983863831, -0.3466915190219879, -0.02923966385424137, -0.44657644629478455, 0.10093986988067627, -0.5068232417106628, 0.483223557472229, -0.7306841015815735, -0.7074015140533447, 0.8410793542861938, 0.1333247572183609, -0.10513116419315338, 0.5507060885429382, 0.597342848777771, 0.12212643027305603, 1.1493557691574097, 0.21925435960292816, -0.44737711548805237, 0.3891233205795288, -0.8006322383880615, 0.15005779266357422, -0.6928595900535583, -0.4010125398635864, -0.8078383803367615, -0.05990463122725487, -0.6979148983955383, -0.21746231615543365, 0.14573967456817627, 0.0766848623752594, -0.4430292844772339, 0.455131858587265, -0.5355286002159119, 0.48672789335250854, 0.7789921760559082, 0.14761365950107574, 0.1764277070760727, 0.1265813261270523, -0.3748576045036316, -0.058629557490348816, -0.6800709962844849, -0.4408549964427948, 1.4237194061279297, 0.286541610956192, 0.620959997177124, 0.06968066096305847, 0.7999775409698486, 0.04893704876303673, 0.13259099423885345, -0.7542266249656677, 0.42003557085990906, -0.08912348002195358, -0.7359844446182251, -0.35546788573265076, -0.5084531307220459, -1.0451629161834717, 0.2625158429145813, -0.21271446347236633, -0.8772505521774292, 0.23418886959552765, 0.10034660249948502, -0.3671777546405792, 0.24363495409488678, -0.7281050682067871, 1.2380080223083496, -0.3636593520641327, -0.2935561537742615, 0.04409726709127426, -0.6479213237762451, 0.1717384159564972, -0.15021884441375732, 0.29425767064094543, 0.048157867044210434, 0.19806262850761414, 0.8615304827690125, -0.5304561853408813, 0.6334315538406372, -0.1541905403137207, 0.04623425379395485, 0.24069511890411377, -0.013018554076552391, 0.5501118302345276, -0.026637079194188118, -0.14259523153305054, 0.381205677986145, 0.10579486936330795, -0.4620198607444763, -0.41242581605911255, 0.8120948672294617, -1.060463786125183, -0.4738352596759796, -0.8610196709632874, -0.6874257326126099, -0.010972362942993641, 0.5380904674530029, 0.4864812195301056, 0.5238059163093567, -0.04492685943841934, 0.29282698035240173, 0.9283289909362793, -0.24979038536548615, 0.33653920888900757, 0.6565799117088318, -0.13126814365386963, -0.5678256154060364, 1.018863558769226, 0.05141449719667435, 0.362613320350647, 0.38224899768829346, 0.19317466020584106, -0.4099479019641876, -0.5763734579086304, -0.7250268459320068, 0.3637482523918152, -0.6159833669662476, -0.18205197155475616, -0.5810180306434631, -0.2565624415874481, -0.7355825901031494, -0.03181798383593559, -0.347078412771225, -0.2946789562702179, -0.17073187232017517, -0.09676213562488556, 0.39950767159461975, 0.3613370954990387, 0.17012524604797363, 0.22148509323596954, -0.5026319026947021, -0.0023451342713087797, 0.014369960874319077, 0.25508493185043335, -0.37768393754959106, -0.9242740273475647, -0.30432790517807007, 0.2092607319355011, -0.11720793694257736, -0.6247913241386414, 0.5886833667755127, 0.25672250986099243, 0.6376535892486572, 0.5712575912475586, -0.18872158229351044, 0.7712340950965881, -0.26700568199157715, 0.909885823726654, 0.0659322589635849, -1.0126749277114868, 0.696060061454773, -0.1353684961795807, 0.513174831867218, 0.7012760043144226, 0.5797804594039917, -0.5709417462348938, -0.41831114888191223, -0.8228341937065125, -0.6064886450767517, 1.095201015472412, 0.14398524165153503, -0.1843973845243454, 0.08724760264158249, 0.23426216840744019, -0.2636983096599579, 0.0006443859310820699, -0.8389326930046082, -0.7494752407073975, -0.01646692119538784, -0.4082064926624298, -0.3869742751121521, -0.0601537749171257, -0.11544185876846313, -0.45911961793899536, 0.8533190488815308, -0.16965985298156738, 0.0955033153295517, 0.05928424373269081, -0.22342008352279663, -0.028306618332862854, 0.17015419900417328, 0.6816074252128601, 0.7629413604736328, -0.39981910586357117, -0.037990227341651917, 0.30430594086647034, -0.6753865480422974, 0.13513904809951782, 0.11622993648052216, -0.4911035895347595, 0.12098574638366699, 0.43412211537361145, 0.8085569739341736, -0.03894064947962761, -0.7415880560874939, 0.7021343111991882, -0.09523648023605347, -0.40946823358535767, -0.5283373594284058, 0.054536107927560806, -0.10988806188106537, 0.03876006603240967, 0.3585579991340637, 0.21294069290161133, -0.05450768023729324, -0.525664746761322, 0.21636056900024414, 0.39730721712112427, -0.45881256461143494, -0.20234538614749908, 0.5954777598381042, -0.08914642035961151, -0.43970787525177, 0.7385988235473633, -0.28628072142601013, -0.7679993510246277, 1.0266910791397095, 0.6207394599914551, 0.5568199753761292, -0.5616697669029236, 0.1863735318183899, 0.9278860092163086, 0.443217933177948, -0.004899335093796253, 0.4677430987358093, 0.02444976009428501, -0.8073639869689941, -0.19454900920391083, -0.7654474377632141, -0.22778916358947754, 0.4267101287841797, -0.9147651195526123, 0.42905259132385254, -0.33273154497146606, -0.03499983996152878, 0.050207365304231644, 0.31679603457450867, -0.7132018208503723, 0.5002787709236145, 0.0527338944375515, 1.3213964700698853, -1.118837833404541, 1.139320731163025, 0.7809282541275024, -0.6941958665847778, -1.12412691116333, -0.23429536819458008, 0.024668993428349495, -1.0239179134368896, 0.9768496751785278, 0.3292984664440155, 0.214344322681427, -0.017590295523405075, -0.1266089528799057, -1.165388584136963, 1.2710294723510742, 0.16840988397598267, -0.4903678297996521, 0.34289243817329407, 0.47033774852752686, 0.7872989177703857, -0.1618928760290146, 0.41461411118507385, 0.7347233891487122, 0.45569828152656555, -0.0030372387263923883, -1.2546932697296143, 0.10417605936527252, -0.5834883451461792, 0.01651611365377903, 0.31039127707481384, -0.7437827587127686, 0.9675368070602417, -0.08696684241294861, -0.036105867475271225, 0.12983138859272003, 0.4224155843257904, 0.49866044521331787, 0.274860143661499, 0.5701717734336853, 1.0133569240570068, 0.81951504945755, -0.39436575770378113, 0.9847686886787415, -0.6721779704093933, 0.6630969643592834, 1.0247029066085815, 0.07935614883899689, 0.821374773979187, 0.3904809057712555, -0.4601220190525055, 0.5668326020240784, 0.9001207947731018, -0.05283289775252342, 0.4976893365383148, 0.030463015660643578, -0.20218923687934875, -0.25539469718933105, 0.25444409251213074, -0.5229533314704895, 0.4080827236175537, 0.3924672305583954, -0.4714156985282898, 0.024078218266367912, 0.1966007947921753, 0.19220514595508575, 0.019049283117055893, -0.10748649388551712, 0.6088171005249023, -0.28898748755455017, -0.8178874850273132, 1.0544610023498535, 0.01669173873960972, 0.7026488184928894, -0.7086582779884338, 0.06539604067802429, -0.4478260576725006, 0.4736514389514923, -0.4077112078666687, -0.9351611733436584, 0.1420918107032776, -0.011067390441894531, 0.019094077870249748, -0.07255952805280685, 0.4964757263660431, -0.5694225430488586, -0.5734081864356995, 0.2246096134185791, 0.34687894582748413, 0.19157974421977997, 0.06845389306545258, -0.9662971496582031, 0.08365552872419357, 0.21827149391174316, -0.4206918478012085, 0.24164415895938873, 0.4690302908420563, -0.06521829962730408, 0.7322896718978882, 0.6219947338104248, 0.15119920670986176, 0.1814921498298645, 0.18924614787101746, 0.9388653039932251, -0.5749632120132446, -0.5442519783973694, -0.6333346962928772, 0.34783366322517395, -0.2327871322631836, -0.6961568593978882, 0.9677110910415649, 1.0967686176300049, 1.2626253366470337, 0.017077598720788956, 0.7797197699546814, -0.29570287466049194, 0.6746456027030945, -0.49626433849334717, 0.7015938758850098, -0.6938180923461914, 0.17742866277694702, -0.22118674218654633, -0.7087245583534241, -0.4969307780265808, 0.8721959590911865, -0.41474488377571106, 0.15215197205543518, 0.7117809653282166, 1.2486287355422974, 0.0558088980615139, -0.2542809844017029, 0.23311308026313782, 0.14472389221191406, 0.2168608158826828, 0.7256873250007629, 0.39485734701156616, -0.9248791337013245, 0.7670801877975464, -0.6720004677772522, -0.40119072794914246, -0.14100627601146698, -0.4199853241443634, -1.0624206066131592, -0.6963239908218384, -0.5033068656921387, -0.5628862380981445, -0.0703762024641037, 0.9027146100997925, 0.6559622287750244, -1.0398292541503906, -0.46151289343833923, -0.16199328005313873, -0.07253482192754745, -0.4562261700630188, -0.2582545280456543, 0.7697718143463135, -0.4215286076068878, -1.0475373268127441, 0.12786470353603363, -0.06947896629571915, 0.05811850354075432, -0.15249203145503998, -0.36322021484375, -0.37692564725875854, -0.3326413333415985, 0.34740790724754333, 0.34532034397125244, -0.7690985202789307, -0.22709614038467407, 0.1275760680437088, -0.2874242663383484, 0.2810872793197632, 0.2337324619293213, -0.6756295561790466, 0.5407688021659851, 0.46186286211013794, 0.5381502509117126, 0.6796392798423767, -0.08535538613796234, 0.16615237295627594, -0.704073429107666, 0.35632431507110596, -0.09160217642784119, 0.46786636114120483, 0.22638000547885895, -0.31488633155822754, 0.6858807802200317, 0.4486813247203827, -0.6140488386154175, -0.9399880766868591, -0.12012319266796112, -1.276161551475525, -0.0725279226899147, 1.2659618854522705, -0.32343488931655884, -0.5834794044494629, -0.12026418745517731, -0.26135873794555664, 0.11832356452941895, -0.3753143846988678, 0.6018521785736084, 0.6549189686775208, -0.04151443392038345, -0.2840302586555481, -0.34883809089660645, 0.5804360508918762, 0.4144878387451172, -0.7811875343322754, -0.16170567274093628, 0.18749815225601196, 0.6736533641815186, 0.46071237325668335, 0.6710934638977051, -0.18435536324977875, 0.4382554888725281, -0.020091591402888298, 0.3577689528465271, -0.10252027213573456, -0.06423909217119217, -0.526574432849884, -0.05433034896850586, 0.10296617448329926, -0.3333461284637451 ]
bert-base-multilingual-uncased
null
"2023-04-06T13:39:29Z"
545,996
59
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "fill-mask", "multilingual", "af", "sq", "ar", "an", "hy", "ast", "az", "ba", "eu", "bar", "be", "bn", "inc", "bs", "br", "bg", "my", "ca", "ceb", "ce", "zh", "cv", "hr", "cs", "da", "nl", "en", "et", "fi", "fr", "gl", "ka", "de", "el", "gu", "ht", "he", "hi", "hu", "is", "io", "id", "ga", "it", "ja", "jv", "kn", "kk", "ky", "ko", "la", "lv", "lt", "roa", "nds", "lm", "mk", "mg", "ms", "ml", "mr", "min", "ne", "new", "nb", "nn", "oc", "fa", "pms", "pl", "pt", "pa", "ro", "ru", "sco", "sr", "scn", "sk", "sl", "aze", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "tr", "uk", "ud", "uz", "vi", "vo", "war", "cy", "fry", "pnb", "yo", "dataset:wikipedia", "arxiv:1810.04805", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:04Z"
--- language: - multilingual - af - sq - ar - an - hy - ast - az - ba - eu - bar - be - bn - inc - bs - br - bg - my - ca - ceb - ce - zh - cv - hr - cs - da - nl - en - et - fi - fr - gl - ka - de - el - gu - ht - he - hi - hu - is - io - id - ga - it - ja - jv - kn - kk - ky - ko - la - lv - lt - roa - nds - lm - mk - mg - ms - ml - mr - min - ne - new - nb - nn - oc - fa - pms - pl - pt - pa - ro - ru - sco - sr - hr - scn - sk - sl - aze - es - su - sw - sv - tl - tg - ta - tt - te - tr - uk - ud - uz - vi - vo - war - cy - fry - pnb - yo license: apache-2.0 datasets: - wikipedia --- # BERT multilingual base model (uncased) Pretrained model on the top 102 languages with the largest Wikipedia using a masked language modeling (MLM) objective. It was introduced in [this paper](https://arxiv.org/abs/1810.04805) and first released in [this repository](https://github.com/google-research/bert). This model is uncased: it does not make a difference between english and English. Disclaimer: The team releasing BERT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description BERT is a transformers model pretrained on a large corpus of multilingual data in a self-supervised fashion. This means it was pretrained on the raw texts 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 texts. More precisely, it was pretrained with two objectives: - Masked language modeling (MLM): taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence. - Next sentence prediction (NSP): the models concatenates two masked sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not. This way, the model learns an inner representation of the languages in the training set that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the BERT model as inputs. ## Intended uses & limitations You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?filter=bert) to look for fine-tuned versions on a task that interests you. Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2. ### How to use You can use this model directly with a pipeline for masked language modeling: ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='bert-base-multilingual-uncased') >>> unmasker("Hello I'm a [MASK] model.") [{'sequence': "[CLS] hello i'm a top model. [SEP]", 'score': 0.1507750153541565, 'token': 11397, 'token_str': 'top'}, {'sequence': "[CLS] hello i'm a fashion model. [SEP]", 'score': 0.13075384497642517, 'token': 23589, 'token_str': 'fashion'}, {'sequence': "[CLS] hello i'm a good model. [SEP]", 'score': 0.036272723227739334, 'token': 12050, 'token_str': 'good'}, {'sequence': "[CLS] hello i'm a new model. [SEP]", 'score': 0.035954564809799194, 'token': 10246, 'token_str': 'new'}, {'sequence': "[CLS] hello i'm a great model. [SEP]", 'score': 0.028643041849136353, 'token': 11838, 'token_str': 'great'}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-uncased') model = BertModel.from_pretrained("bert-base-multilingual-uncased") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` and in TensorFlow: ```python from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-uncased') model = TFBertModel.from_pretrained("bert-base-multilingual-uncased") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` ### Limitations and bias Even if the training data used for this model could be characterized as fairly neutral, this model can have biased predictions: ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='bert-base-multilingual-uncased') >>> unmasker("The man worked as a [MASK].") [{'sequence': '[CLS] the man worked as a teacher. [SEP]', 'score': 0.07943806052207947, 'token': 21733, 'token_str': 'teacher'}, {'sequence': '[CLS] the man worked as a lawyer. [SEP]', 'score': 0.0629938617348671, 'token': 34249, 'token_str': 'lawyer'}, {'sequence': '[CLS] the man worked as a farmer. [SEP]', 'score': 0.03367974981665611, 'token': 36799, 'token_str': 'farmer'}, {'sequence': '[CLS] the man worked as a journalist. [SEP]', 'score': 0.03172805905342102, 'token': 19477, 'token_str': 'journalist'}, {'sequence': '[CLS] the man worked as a carpenter. [SEP]', 'score': 0.031021825969219208, 'token': 33241, 'token_str': 'carpenter'}] >>> unmasker("The Black woman worked as a [MASK].") [{'sequence': '[CLS] the black woman worked as a nurse. [SEP]', 'score': 0.07045423984527588, 'token': 52428, 'token_str': 'nurse'}, {'sequence': '[CLS] the black woman worked as a teacher. [SEP]', 'score': 0.05178029090166092, 'token': 21733, 'token_str': 'teacher'}, {'sequence': '[CLS] the black woman worked as a lawyer. [SEP]', 'score': 0.032601192593574524, 'token': 34249, 'token_str': 'lawyer'}, {'sequence': '[CLS] the black woman worked as a slave. [SEP]', 'score': 0.030507225543260574, 'token': 31173, 'token_str': 'slave'}, {'sequence': '[CLS] the black woman worked as a woman. [SEP]', 'score': 0.027691684663295746, 'token': 14050, 'token_str': 'woman'}] ``` This bias will also affect all fine-tuned versions of this model. ## Training data The BERT model was pretrained on the 102 languages with the largest Wikipedias. You can find the complete list [here](https://github.com/google-research/bert/blob/master/multilingual.md#list-of-languages). ## Training procedure ### Preprocessing The texts are lowercased and tokenized using WordPiece and a shared vocabulary size of 110,000. The languages with a larger Wikipedia are under-sampled and the ones with lower resources are oversampled. For languages like Chinese, Japanese Kanji and Korean Hanja that don't have space, a CJK Unicode block is added around every character. The inputs of the model are then of the form: ``` [CLS] Sentence A [SEP] Sentence B [SEP] ``` With probability 0.5, sentence A and sentence B correspond to two consecutive sentences in the original corpus and in the other cases, it's another random sentence in the corpus. Note that what is considered a sentence here is a consecutive span of text usually longer than a single sentence. The only constrain is that the result with the two "sentences" has a combined length of less than 512 tokens. The details of the masking procedure for each sentence are the following: - 15% of the tokens are masked. - In 80% of the cases, the masked tokens are replaced by `[MASK]`. - In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace. - In the 10% remaining cases, the masked tokens are left as is. ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-1810-04805, author = {Jacob Devlin and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language Understanding}, journal = {CoRR}, volume = {abs/1810.04805}, year = {2018}, url = {http://arxiv.org/abs/1810.04805}, archivePrefix = {arXiv}, eprint = {1810.04805}, timestamp = {Tue, 30 Oct 2018 20:39:56 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.18787512183189392, -0.6163170337677002, 0.16803140938282013, 0.33734020590782166, -0.5837752223014832, 0.09480196982622147, -0.18511322140693665, -0.20949263870716095, 0.454821914434433, 0.4531446397304535, -0.4758724570274353, -0.4201423227787018, -0.8535794615745544, 0.10784637928009033, -0.543546736240387, 1.2065224647521973, 0.22931259870529175, 0.3329061269760132, 0.13641370832920074, 0.09267338365316391, -0.39376839995384216, -0.8237898945808411, -0.6611443758010864, -0.256807804107666, 0.47675251960754395, 0.31412941217422485, 0.6783962249755859, 0.5720916986465454, 0.41228947043418884, 0.4012058675289154, -0.08331054449081421, -0.10149607062339783, -0.37304922938346863, 0.04868798330426216, -0.05475969240069389, -0.4751683175563812, -0.32146719098091125, 0.17720986902713776, 0.5528130531311035, 0.8927738070487976, 0.030901489779353142, 0.31319594383239746, -0.13205963373184204, 0.5282571911811829, -0.2648635506629944, 0.25651782751083374, -0.5017494559288025, 0.0930970311164856, -0.2815418839454651, 0.16283740103244781, -0.35726580023765564, -0.2763825058937073, 0.10055708885192871, -0.5809248685836792, 0.20831093192100525, 0.10706929117441177, 1.1088945865631104, 0.06830336898565292, -0.27729532122612, -0.08175787329673767, -0.46846550703048706, 0.7834281921386719, -0.7124501466751099, 0.18422283232212067, 0.4809129536151886, 0.2404918372631073, -0.18922021985054016, -0.989051342010498, -0.5053274631500244, -0.03898804262280464, -0.16184468567371368, 0.05082373321056366, 0.013735095970332623, -0.08521378040313721, 0.34732797741889954, 0.4976442754268646, -0.3426431119441986, -0.021070998162031174, -0.7415322065353394, -0.41915804147720337, 0.6609131097793579, 0.02415408566594124, 0.2682802975177765, -0.42825308442115784, -0.29336032271385193, -0.338803768157959, -0.27256327867507935, 0.04769813269376755, 0.6558042168617249, 0.48740801215171814, -0.2578503489494324, 0.8309926986694336, -0.18663717806339264, 0.6123275756835938, -0.0007092835148796439, 0.010602732188999653, 0.49407893419265747, -0.17887862026691437, -0.33494263887405396, -0.017269795760512352, 0.975159764289856, 0.28882133960723877, 0.4980890452861786, -0.07415826618671417, -0.24633532762527466, 0.05915248766541481, 0.30784904956817627, -0.5928415060043335, -0.3335769772529602, 0.08562518656253815, -0.5669280290603638, -0.3602306544780731, 0.4722251892089844, -0.7122524380683899, -0.11953341960906982, -0.08025454729795456, 0.5725564956665039, -0.30866602063179016, -0.18135076761245728, 0.11375770717859268, -0.48862364888191223, 0.14944270253181458, 0.012592953629791737, -0.9401021599769592, 0.1968657672405243, 0.624888002872467, 0.8406403064727783, 0.2918601930141449, -0.19783839583396912, -0.357954204082489, -0.24323168396949768, -0.32352063059806824, 0.38958030939102173, -0.3229884207248688, -0.4683370888233185, 0.05077506601810455, 0.31519171595573425, -0.05487087741494179, -0.20903727412223816, 0.6774224638938904, -0.503661572933197, 0.5825948715209961, -0.09958907216787338, -0.4998798072338104, -0.3142549991607666, 0.04576541855931282, -0.7417526841163635, 1.1873044967651367, 0.35962826013565063, -0.7499750256538391, 0.33409473299980164, -0.8529936075210571, -0.6198553442955017, 0.20290464162826538, 0.1265493631362915, -0.4046555459499359, 0.1628829687833786, 0.11197786778211594, 0.3563859164714813, -0.002494191052392125, 0.3547232449054718, -0.2311738133430481, -0.434013694524765, 0.39002713561058044, -0.2511780560016632, 1.1502588987350464, 0.2062148153781891, -0.34437504410743713, 0.1368420273065567, -0.8387622237205505, 0.03374464809894562, 0.24621102213859558, -0.3804960548877716, -0.1632455587387085, -0.14480186998844147, 0.36201977729797363, 0.192364901304245, 0.3810645341873169, -0.726083517074585, 0.28514134883880615, -0.5489259362220764, 0.5872805118560791, 0.8225253224372864, -0.11797063052654266, 0.281495064496994, -0.2985146939754486, 0.48418742418289185, -0.049424003809690475, -0.07886600494384766, -0.18959608674049377, -0.7582194209098816, -0.8319339752197266, -0.2930697798728943, 0.6573920845985413, 0.7205891013145447, -0.5120028257369995, 0.7113939523696899, -0.022889357060194016, -0.5060111284255981, -0.6982519626617432, -0.020232107490301132, 0.2686733305454254, 0.41820400953292847, 0.36189574003219604, -0.5221506953239441, -0.9124993085861206, -0.7819473147392273, -0.2532423436641693, -0.20530568063259125, -0.16457383334636688, 0.06959060579538345, 0.7032043933868408, -0.33647704124450684, 0.7857832312583923, -0.6796032786369324, -0.34576526284217834, -0.17080548405647278, 0.2507266104221344, 0.6340906620025635, 0.7105017304420471, 0.39792323112487793, -0.6130086183547974, -0.45445331931114197, -0.33310702443122864, -0.5933955907821655, 0.012965792790055275, -0.01783742941915989, -0.2587190866470337, 0.13234324753284454, 0.5234066247940063, -0.7773818373680115, 0.5197324752807617, 0.32754912972450256, -0.5385285019874573, 0.6634337306022644, -0.3398233652114868, -0.04413861781358719, -1.2492977380752563, 0.21445229649543762, -0.18621836602687836, -0.2772943377494812, -0.7525363564491272, 0.055472761392593384, -0.10246121138334274, -0.05550270527601242, -0.5108328461647034, 0.5459154844284058, -0.438144713640213, -0.03719426319003105, -0.023819759488105774, -0.12629981338977814, 0.020084287971258163, 0.45327648520469666, -0.0019035747973248363, 0.5717002153396606, 0.5598823428153992, -0.502446174621582, 0.5714898705482483, 0.4539649188518524, -0.6059728860855103, 0.1395767331123352, -0.7760791778564453, 0.21144109964370728, 0.024384750053286552, 0.045053400099277496, -1.0866141319274902, -0.34449172019958496, 0.2606342136859894, -0.624754786491394, 0.2379709780216217, -0.10051664710044861, -0.7985429763793945, -0.665416419506073, -0.21986117959022522, 0.49874448776245117, 0.50649094581604, -0.2558487355709076, 0.3240584135055542, 0.3583270311355591, -0.15005049109458923, -0.7382488250732422, -0.7904536724090576, 0.2006271928548813, -0.12665092945098877, -0.4839321970939636, 0.33829227089881897, -0.08057009428739548, -0.10906950384378433, -0.20068851113319397, 0.14695551991462708, -0.13833683729171753, 0.12128844857215881, 0.2001398354768753, 0.4666730463504791, -0.22705991566181183, -0.09365955740213394, -0.18927815556526184, -0.11600308865308762, 0.24881266057491302, -0.2217852920293808, 0.82525634765625, 0.013055386021733284, -0.1326373815536499, -0.24165363609790802, 0.4088517725467682, 0.6067573428153992, -0.12502676248550415, 0.7620534300804138, 0.8740437626838684, -0.5767177939414978, 0.1322414129972458, -0.32023346424102783, -0.15633343160152435, -0.5090288519859314, 0.48533254861831665, -0.3699994385242462, -0.8695040345191956, 0.7596298456192017, 0.3750876486301422, -0.17684684693813324, 0.7092393040657043, 0.7022476196289062, -0.16887111961841583, 0.9688335657119751, 0.5284859538078308, -0.17541120946407318, 0.49552252888679504, -0.13808497786521912, 0.38831251859664917, -0.6749570965766907, -0.45598316192626953, -0.42011991143226624, -0.3123030364513397, -0.5735764503479004, -0.2046339511871338, 0.14149367809295654, 0.28452152013778687, -0.4372279942035675, 0.6124172806739807, -0.6092720627784729, 0.3982405960559845, 1.002777099609375, 0.2377690225839615, -0.20032531023025513, -0.17908966541290283, -0.2668478190898895, 0.0385470911860466, -0.3785059452056885, -0.3340231776237488, 1.1393576860427856, 0.4952751696109772, 0.6826092004776001, 0.12310536205768585, 0.6173334717750549, 0.3041991591453552, -0.03530971705913544, -0.6517188549041748, 0.5703325867652893, -0.37136000394821167, -0.9741884469985962, -0.3653010427951813, -0.10299552977085114, -1.0724612474441528, 0.2000744640827179, -0.33055707812309265, -0.9183830618858337, -0.004827349446713924, -0.18561901152133942, -0.3074507713317871, 0.19736137986183167, -0.741917073726654, 1.0767405033111572, -0.32019665837287903, -0.061424557119607925, 0.11232751607894897, -0.9843071103096008, 0.2835560441017151, -0.000009300513738708105, 0.10908084362745285, -0.11791147291660309, 0.2858004868030548, 1.0207043886184692, -0.50164395570755, 0.9880416989326477, -0.2385624796152115, 0.1954716444015503, 0.10197563469409943, -0.06734799593687057, 0.2699075937271118, 0.03427296131849289, 0.1035173162817955, 0.36918267607688904, -0.05640314146876335, -0.49959155917167664, -0.11249122023582458, 0.35198304057121277, -0.8148226737976074, -0.49989593029022217, -0.6149550080299377, -0.6495586633682251, 0.17555727064609528, 0.4995233416557312, 0.6022140979766846, 0.41993239521980286, -0.13647186756134033, 0.277118980884552, 0.3823842406272888, -0.31551632285118103, 0.748001754283905, 0.29385173320770264, -0.2475343644618988, -0.5852359533309937, 0.6126736998558044, 0.06374560296535492, 0.021291429176926613, 0.48612797260284424, 0.1476360261440277, -0.6137248277664185, -0.20633234083652496, -0.44826608896255493, 0.14601056277751923, -0.6429135799407959, -0.3104993402957916, -0.6584191918373108, -0.5192162990570068, -0.6851743459701538, -0.05730085074901581, -0.08686573803424835, -0.6099371314048767, -0.6141617298126221, -0.25839462876319885, 0.4180360734462738, 0.6554529666900635, -0.22047851979732513, 0.5507313013076782, -0.7202485799789429, 0.34913143515586853, 0.3066690266132355, 0.47382864356040955, -0.21786321699619293, -0.75367271900177, -0.426411509513855, 0.03816337138414383, -0.18042972683906555, -0.8621619343757629, 0.6394994258880615, 0.23566919565200806, 0.6074422001838684, 0.5259868502616882, -0.044798705726861954, 0.6173005700111389, -0.623860776424408, 0.9759576320648193, 0.24691255390644073, -1.122947335243225, 0.5210356712341309, -0.3079376220703125, 0.2363426685333252, 0.3680180311203003, 0.23209254443645477, -0.619689404964447, -0.47515785694122314, -0.7878803014755249, -1.0031015872955322, 0.8371656537055969, 0.1992531418800354, 0.4015652537345886, -0.09753040969371796, 0.16435334086418152, 0.17129679024219513, 0.38472652435302734, -1.1182626485824585, -0.620816707611084, -0.6512662172317505, -0.36881011724472046, -0.22769828140735626, -0.3037131130695343, -0.08366209268569946, -0.5456305742263794, 0.6104888319969177, 0.11871746182441711, 0.5391004681587219, 0.0007897907635197043, -0.2842588722705841, 0.03761928901076317, 0.22462303936481476, 0.7992220520973206, 0.4663686454296112, -0.4787916839122772, 0.06121082976460457, -0.02220863103866577, -0.6238620281219482, 0.09708140790462494, 0.28054213523864746, -0.018677154555916786, 0.24248100817203522, 0.5670039057731628, 0.8494386672973633, 0.1979784518480301, -0.45401155948638916, 0.608729898929596, 0.18714870512485504, -0.2737264633178711, -0.5125797986984253, 0.05426734685897827, 0.00038563719135709107, 0.10900939255952835, 0.5639290809631348, 0.14111298322677612, 0.07647057622671127, -0.5705999135971069, 0.4176122844219208, 0.35102328658103943, -0.4392275810241699, -0.25608786940574646, 0.9044365286827087, 0.06508014351129532, -0.621813178062439, 0.7972646355628967, -0.16943848133087158, -0.8324676752090454, 0.6959593892097473, 0.7055673599243164, 0.8801420331001282, -0.17766685783863068, 0.2900018095970154, 0.528907835483551, 0.38471564650535583, -0.22369718551635742, 0.3863552212715149, 0.2859591543674469, -0.8878843188285828, -0.4080588221549988, -0.7641153335571289, -0.16121843457221985, 0.1884980946779251, -0.8025967478752136, 0.263058066368103, -0.46883130073547363, -0.26608338952064514, 0.2149273008108139, -0.012273852713406086, -0.6391981840133667, 0.44971397519111633, 0.1661599725484848, 1.0440261363983154, -0.9946179389953613, 1.0197702646255493, 0.7505065202713013, -0.6577653288841248, -0.7829914093017578, -0.4296373128890991, -0.311330646276474, -1.0570075511932373, 0.7574557065963745, 0.38897985219955444, 0.4175063967704773, -0.05306483060121536, -0.597813069820404, -0.7544272541999817, 0.7423109412193298, 0.2519531846046448, -0.4020693004131317, -0.09054755419492722, 0.12058242410421371, 0.5963224768638611, -0.47137880325317383, 0.44625094532966614, 0.4745729863643646, 0.4960175156593323, -0.1315547227859497, -0.7921257019042969, 0.032555997371673584, -0.454336941242218, -0.031754422932863235, 0.14858530461788177, -0.47022390365600586, 1.192254662513733, -0.16999641060829163, -0.03158823028206825, 0.18279720842838287, 0.5924375057220459, -0.021508732810616493, 0.12299857288599014, 0.47819754481315613, 0.6205332279205322, 0.7537823915481567, -0.37527674436569214, 0.8091280460357666, -0.2658620774745941, 0.5522059202194214, 0.8636196255683899, 0.0917038545012474, 0.735854983329773, 0.3842114210128784, -0.2707049250602722, 1.006293535232544, 0.8604879975318909, -0.413690447807312, 0.7575665712356567, 0.20126961171627045, -0.061614181846380234, -0.06293686479330063, 0.0978434830904007, -0.33686336874961853, 0.5292338132858276, 0.2290668934583664, -0.5329045057296753, 0.03993275761604309, -0.06961503624916077, 0.16820958256721497, -0.11559289693832397, -0.45229724049568176, 0.6692104935646057, 0.18461979925632477, -0.7015208601951599, 0.3006863296031952, 0.2607465088367462, 0.6895943284034729, -0.555959939956665, 0.04672738164663315, -0.1126972958445549, 0.17987103760242462, -0.10921374708414078, -0.9331772327423096, 0.204392671585083, -0.12181127816438675, -0.4498195946216583, -0.22198881208896637, 0.7248378992080688, -0.5459437966346741, -0.6588107347488403, 0.14994987845420837, 0.29640108346939087, 0.3001023232936859, -0.07119177281856537, -0.7778330445289612, -0.28999823331832886, 0.032013487070798874, -0.08185306936502457, 0.16310462355613708, 0.32402873039245605, 0.024000031873583794, 0.5178914666175842, 0.8653988838195801, -0.05054450035095215, 0.18652339279651642, 0.12344338744878769, 0.7251604795455933, -1.051358938217163, -0.8283125758171082, -0.9722979068756104, 0.5922756195068359, -0.15181231498718262, -0.5194957256317139, 0.7008211016654968, 0.7192327380180359, 0.8034620881080627, -0.37916815280914307, 0.5485067963600159, -0.2022530734539032, 0.5174722075462341, -0.3499639630317688, 0.8068642616271973, -0.3363625705242157, -0.13509732484817505, -0.4130972921848297, -0.8530142307281494, -0.3325246572494507, 0.8424505591392517, -0.0036220597103238106, 0.04606731981039047, 0.6852182149887085, 0.552285373210907, 0.05877261981368065, -0.16244320571422577, 0.19639861583709717, 0.1726628839969635, 0.0463988222181797, 0.3705081045627594, 0.57590651512146, -0.6007266640663147, 0.4506642818450928, -0.20770087838172913, 0.01337498240172863, -0.3831039071083069, -0.8804587721824646, -0.9895073771476746, -0.5629156827926636, -0.21189269423484802, -0.6050571799278259, -0.21805718541145325, 0.913458526134491, 0.7724693417549133, -1.0830628871917725, -0.2966764569282532, -0.0037591017317026854, 0.1626954972743988, -0.2331898957490921, -0.280403733253479, 0.44877946376800537, -0.1857183277606964, -0.7611620426177979, 0.24713516235351562, -0.043361082673072815, 0.19338974356651306, -0.16670894622802734, 0.0072296359576284885, -0.4562094807624817, 0.00813192967325449, 0.547152578830719, 0.1600281298160553, -0.7803375124931335, -0.4907468259334564, 0.023819690570235252, -0.23626509308815002, 0.1335529088973999, 0.5089847445487976, -0.5739832520484924, 0.49003273248672485, 0.42570218443870544, 0.4481218755245209, 0.6455520987510681, 0.13505083322525024, 0.6807360053062439, -1.143953800201416, 0.34578830003738403, 0.1374727040529251, 0.5516759157180786, 0.4492371082305908, -0.43285784125328064, 0.5141598582267761, 0.5210561752319336, -0.4357357323169708, -0.8714192509651184, -0.06160731613636017, -1.0240700244903564, -0.25039249658584595, 0.9106931090354919, -0.18927131593227386, -0.22560541331768036, -0.13840478658676147, -0.3227429687976837, 0.4715951383113861, -0.3873867690563202, 0.7318061590194702, 0.9583548903465271, 0.1952556073665619, -0.16222696006298065, -0.34214112162590027, 0.3221934735774994, 0.37520694732666016, -0.403879314661026, -0.4100480377674103, 0.13049796223640442, 0.3878818154335022, 0.29802703857421875, 0.530723512172699, -0.052011653780937195, 0.2061874270439148, 0.20710472762584686, 0.2749101519584656, -0.06527423113584518, -0.12710344791412354, -0.30347853899002075, 0.1343390792608261, -0.13412506878376007, -0.685113251209259 ]
Helsinki-NLP/opus-mt-ru-en
Helsinki-NLP
"2023-08-16T12:03:22Z"
532,452
41
transformers
[ "transformers", "pytorch", "tf", "rust", "marian", "text2text-generation", "translation", "ru", "en", "license:cc-by-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- tags: - translation license: cc-by-4.0 --- ### opus-mt-ru-en ## Table of Contents - [Model Details](#model-details) - [Uses](#uses) - [Risks, Limitations and Biases](#risks-limitations-and-biases) - [Training](#training) - [Evaluation](#evaluation) - [Citation Information](#citation-information) - [How to Get Started With the Model](#how-to-get-started-with-the-model) ## Model Details **Model Description:** - **Developed by:** Language Technology Research Group at the University of Helsinki - **Model Type:** Transformer-align - **Language(s):** - Source Language: Russian - Target Language: English - **License:** CC-BY-4.0 - **Resources for more information:** - [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train) ## Uses #### Direct Use This model can be used for translation and text-to-text generation. ## Risks, Limitations and Biases **CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes.** Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Further details about the dataset for this model can be found in the OPUS readme: [ru-en](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/ru-en/README.md) ## Training #### Training Data ##### Preprocessing * Pre-processing: Normalization + SentencePiece * Dataset: [opus](https://github.com/Helsinki-NLP/Opus-MT) * Download original weights: [opus-2020-02-26.zip](https://object.pouta.csc.fi/OPUS-MT-models/ru-en/opus-2020-02-26.zip) * Test set translations: [opus-2020-02-26.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/ru-en/opus-2020-02-26.test.txt) ## Evaluation #### Results * test set scores: [opus-2020-02-26.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/ru-en/opus-2020-02-26.eval.txt) #### Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | newstest2012.ru.en | 34.8 | 0.603 | | newstest2013.ru.en | 27.9 | 0.545 | | newstest2014-ruen.ru.en | 31.9 | 0.591 | | newstest2015-enru.ru.en | 30.4 | 0.568 | | newstest2016-enru.ru.en | 30.1 | 0.565 | | newstest2017-enru.ru.en | 33.4 | 0.593 | | newstest2018-enru.ru.en | 29.6 | 0.565 | | newstest2019-ruen.ru.en | 31.4 | 0.576 | | Tatoeba.ru.en | 61.1 | 0.736 | ## Citation Information ```bibtex @InProceedings{TiedemannThottingal:EAMT2020, author = {J{\"o}rg Tiedemann and Santhosh Thottingal}, title = {{OPUS-MT} — {B}uilding open translation services for the {W}orld}, booktitle = {Proceedings of the 22nd Annual Conferenec of the European Association for Machine Translation (EAMT)}, year = {2020}, address = {Lisbon, Portugal} } ``` ## How to Get Started With the Model ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-ru-en") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-ru-en") ```
[ -0.2566400468349457, -0.5347790718078613, 0.17377741634845734, 0.14497806131839752, -0.30532944202423096, -0.551605224609375, -0.3003683388233185, -0.35307732224464417, 0.05319962650537491, 0.29071247577667236, -0.5223825573921204, -0.4987165927886963, -0.6235007047653198, 0.2602495551109314, -0.22749842703342438, 0.930828332901001, -0.042113982141017914, 0.49768269062042236, -0.04127280414104462, -0.3980417549610138, -0.3711078464984894, -0.5562811493873596, -0.34451231360435486, -0.3636138439178467, 0.1360371857881546, 0.23150919377803802, 0.4778154194355011, 0.7089073061943054, 0.7213072776794434, 0.276382178068161, -0.2164527028799057, -0.05469992384314537, -0.21941153705120087, -0.023280303925275803, 0.14967180788516998, -0.576119601726532, -0.7633572816848755, 0.05439336970448494, 0.8820271492004395, 0.7225173115730286, 0.03980483114719391, 0.4577104151248932, 0.11638561636209488, 0.8479334712028503, -0.19502578675746918, -0.03758759796619415, -0.5444546341896057, 0.10159638524055481, -0.2890312373638153, -0.28562068939208984, -0.6445032358169556, -0.24804483354091644, 0.19896824657917023, -0.6021125316619873, 0.03423174470663071, 0.1781049370765686, 1.2646602392196655, 0.18375448882579803, -0.2745652496814728, -0.18814489245414734, -0.65268874168396, 1.1234163045883179, -0.9565532803535461, 0.5366618633270264, 0.5480090975761414, -0.008919569663703442, 0.020832234993577003, -0.6145421266555786, -0.36794474720954895, -0.10524004697799683, -0.3150705099105835, 0.2004765421152115, -0.24713343381881714, -0.25321343541145325, 0.4055623412132263, 0.6289322376251221, -0.874634325504303, 0.011370370164513588, -0.5605545043945312, -0.07829196006059647, 0.6132111549377441, 0.11065270006656647, 0.33136242628097534, -0.3678675889968872, -0.5071877837181091, -0.32758331298828125, -0.745728611946106, 0.12347495555877686, 0.566109836101532, 0.2605980932712555, -0.3512893319129944, 0.7006319761276245, -0.05337636172771454, 0.6337694525718689, -0.018277432769536972, -0.05972820147871971, 0.8271417021751404, -0.4569782018661499, -0.31878918409347534, -0.31078383326530457, 1.2353595495224, 0.2949187159538269, 0.10732703655958176, -0.081064373254776, -0.19834285974502563, -0.18747803568840027, -0.011331085115671158, -0.9398652911186218, 0.0655362531542778, 0.29811716079711914, -0.5868367552757263, -0.09531663358211517, -0.049075864255428314, -0.7653661966323853, 0.2236507385969162, -0.42679816484451294, 0.6066890358924866, -0.7012965679168701, -0.34919801354408264, 0.2590380907058716, 0.047899290919303894, 0.3356063663959503, -0.03578184172511101, -0.637911856174469, 0.271862655878067, 0.42153680324554443, 0.8063455820083618, -0.2983858287334442, -0.4476458728313446, -0.4007737338542938, -0.20321469008922577, -0.15934979915618896, 0.6021723747253418, -0.18174181878566742, -0.42644694447517395, -0.08558293431997299, 0.26006877422332764, -0.2179546058177948, -0.32423317432403564, 1.11592435836792, -0.3301056921482086, 0.8378020524978638, -0.20804595947265625, -0.6887227296829224, -0.20367415249347687, 0.23912003636360168, -0.5200046896934509, 1.4344955682754517, 0.07830499857664108, -0.9444624185562134, 0.25058111548423767, -0.8271859884262085, -0.1577034294605255, -0.07332061231136322, 0.05601866543292999, -0.6387792825698853, -0.11077085137367249, 0.12562701106071472, 0.30055633187294006, -0.467941552400589, 0.5821842551231384, -0.1690540909767151, -0.17165584862232208, 0.22627697885036469, -0.46130919456481934, 1.301669955253601, 0.3290238082408905, -0.3808525502681732, 0.0598900206387043, -0.9261190295219421, -0.040253520011901855, 0.05970844626426697, -0.3972095549106598, -0.37746745347976685, 0.016890747472643852, 0.12151388078927994, 0.2103770673274994, 0.2307012379169464, -0.6082683205604553, 0.15405765175819397, -0.8323835134506226, 0.3484981060028076, 0.7409458756446838, -0.3365023732185364, 0.5791142582893372, -0.48722535371780396, 0.3895958662033081, 0.05497533828020096, 0.32062384486198425, -0.11530542373657227, -0.6026845574378967, -1.1263035535812378, -0.2171405702829361, 0.6971195340156555, 0.7181913256645203, -0.5801313519477844, 0.8669459819793701, -0.5580730438232422, -0.7867058515548706, -0.754593551158905, -0.18523308634757996, 0.5721830725669861, 0.426058828830719, 0.5686959028244019, -0.23691882193088531, -0.5447568893432617, -1.0432894229888916, -0.4306386113166809, -0.20821507275104523, -0.11127381771802902, 0.20209765434265137, 0.8282737135887146, -0.045866385102272034, 0.8218625783920288, -0.40272918343544006, -0.4573736786842346, -0.14535930752754211, 0.21060125529766083, 0.48878371715545654, 0.9155054688453674, 0.6003194451332092, -0.8883582353591919, -0.6973618268966675, -0.13373401761054993, -0.7304086089134216, -0.15988266468048096, 0.18282179534435272, -0.3093431293964386, 0.3577941656112671, 0.20380167663097382, -0.49864089488983154, 0.2583921253681183, 0.5282788872718811, -0.6758412718772888, 0.5758000612258911, -0.1646445244550705, 0.17160995304584503, -1.418562412261963, 0.27335020899772644, -0.09877250343561172, -0.10281239449977875, -0.7279486656188965, 0.027181318029761314, 0.035947177559137344, -0.05712177976965904, -0.5471616387367249, 0.7347880005836487, -0.5421656966209412, -0.02272816374897957, 0.27593204379081726, -0.07121186703443527, 0.02487163245677948, 0.8123719096183777, -0.006696111056953669, 0.7617689967155457, 0.6633981466293335, -0.5540796518325806, 0.008659414947032928, 0.38881170749664307, -0.4461117088794708, 0.4157457947731018, -0.8013690114021301, -0.03832394257187843, 0.22182737290859222, -0.0804985836148262, -0.6799218654632568, 0.08267293125391006, 0.38720014691352844, -0.8100825548171997, 0.41274747252464294, -0.31736552715301514, -0.7928389310836792, -0.15936408936977386, -0.21172118186950684, 0.4531700313091278, 0.6684149503707886, -0.17162099480628967, 0.8245257139205933, 0.30216577649116516, -0.12284030765295029, -0.5850186944007874, -1.0139167308807373, -0.19194002449512482, -0.39438143372535706, -0.7293384671211243, 0.2987917959690094, -0.47387614846229553, -0.06986096501350403, 0.10515812784433365, 0.36711564660072327, -0.11682947725057602, 0.054945703595876694, 0.08572458475828171, 0.34635281562805176, -0.2723270058631897, 0.23996371030807495, -0.07064268738031387, -0.28955352306365967, -0.031527139246463776, -0.4543348550796509, 0.5421872735023499, -0.4198650121688843, -0.2874663472175598, -0.6096570491790771, 0.3060687184333801, 0.5747147798538208, -0.4856201708316803, 0.8681572079658508, 0.5541759729385376, -0.3034324645996094, 0.18053828179836273, -0.5351287126541138, -0.10935398936271667, -0.44767963886260986, 0.2919224202632904, -0.2636394202709198, -0.7586627006530762, 0.6765411496162415, 0.2542318105697632, 0.3562195897102356, 0.918900191783905, 0.7194375395774841, 0.1782037317752838, 0.7737715244293213, 0.5134965777397156, 0.2095184475183487, 0.47652751207351685, -0.49924612045288086, -0.028225760906934738, -1.049122929573059, -0.1424274444580078, -0.8469188809394836, -0.2102920114994049, -0.8439778685569763, -0.4270561635494232, 0.3072415888309479, -0.07644480466842651, -0.2796618342399597, 0.5406450033187866, -0.515853226184845, 0.14001601934432983, 0.6246972680091858, -0.20118767023086548, 0.3640391528606415, 0.009539450518786907, -0.464118093252182, -0.3819432556629181, -0.6827220916748047, -0.581214427947998, 1.4663126468658447, 0.4846237003803253, 0.3708474934101105, 0.2759157419204712, 0.4870535731315613, 0.1117856428027153, 0.3480375111103058, -0.6815165877342224, 0.4750962555408478, -0.11767779290676117, -0.9773516058921814, -0.41792601346969604, -0.6298858523368835, -0.8598008751869202, 0.5408734679222107, -0.2805382013320923, -0.6558804512023926, 0.45996126532554626, 0.0751955434679985, -0.14857327938079834, 0.35812464356422424, -0.7208407521247864, 0.9739062786102295, -0.18095941841602325, -0.25724974274635315, 0.1907564401626587, -0.6076033711433411, 0.21725256741046906, -0.07614085078239441, 0.40465062856674194, -0.1468612253665924, 0.08996088057756424, 0.9327479600906372, -0.3320747911930084, 0.6062644720077515, -0.05186288058757782, 0.015473002567887306, 0.07114753127098083, 0.10801853239536285, 0.5129680633544922, -0.11555556207895279, -0.46919554471969604, 0.4235492944717407, 0.0378989651799202, -0.3261987268924713, -0.2851947247982025, 0.5489637851715088, -0.8109624981880188, -0.3480988144874573, -0.6553421020507812, -0.6278695464134216, 0.09259120374917984, 0.4252949059009552, 0.575667679309845, 0.7966927289962769, -0.2854781448841095, 0.4291993975639343, 0.8573281764984131, -0.41699454188346863, 0.3083186447620392, 0.8006783723831177, -0.1797054409980774, -0.5278915166854858, 0.7718267440795898, 0.3410224914550781, 0.39403820037841797, 0.4973083734512329, 0.28504088521003723, -0.2064722180366516, -0.5607901215553284, -0.6723126769065857, 0.29578620195388794, -0.5053600668907166, -0.20634183287620544, -0.8034135103225708, -0.11496841162443161, -0.4469020962715149, 0.24933089315891266, -0.5967972278594971, -0.6399997472763062, -0.37557122111320496, -0.054155584424734116, 0.31808382272720337, 0.2404506504535675, -0.18198895454406738, 0.18589060008525848, -0.7199808955192566, -0.003123907372355461, -0.13191914558410645, 0.3567970097064972, -0.22886954247951508, -1.1579737663269043, -0.43849173188209534, 0.08320283144712448, -0.4153116047382355, -0.8309236168861389, 0.6086418628692627, 0.21262170374393463, 0.4284176230430603, 0.27403151988983154, 0.23383620381355286, 0.3680075705051422, -0.719497799873352, 0.9643247723579407, 0.07776398211717606, -0.8376858830451965, 0.5205975770950317, -0.4596594572067261, 0.30063021183013916, 0.6543731689453125, 0.3779851496219635, -0.4519219994544983, -0.5640124082565308, -0.8919486403465271, -0.9063118696212769, 0.9233773350715637, 0.5938712358474731, 0.12761346995830536, 0.2487480491399765, 0.02722862735390663, 0.03405894711613655, 0.04806606471538544, -1.3030027151107788, -0.6007110476493835, 0.006533793639391661, -0.1832960844039917, -0.009608524851500988, -0.39835041761398315, -0.2330668568611145, -0.4717094302177429, 1.1131716966629028, 0.21560905873775482, 0.49332860112190247, 0.4238607585430145, -0.21059511601924896, -0.09408597648143768, 0.5010488033294678, 0.7107998728752136, 0.5881615281105042, -0.42381760478019714, -0.09877511858940125, 0.31167224049568176, -0.435192734003067, 0.03244959935545921, 0.2870856523513794, -0.619812548160553, 0.2571410536766052, 0.37930384278297424, 0.9943374991416931, 0.11691801995038986, -0.4628381133079529, 0.7028516530990601, -0.14576761424541473, -0.4838770627975464, -0.6580009460449219, -0.29477688670158386, -0.0044485097751021385, 0.03537967801094055, 0.2933099567890167, 0.0920032188296318, 0.2603329122066498, -0.36270344257354736, 0.06691195070743561, 0.14901569485664368, -0.5525824427604675, -0.4339849650859833, 0.6404529809951782, 0.1607029289007187, -0.3622719347476959, 0.3729601800441742, -0.36422356963157654, -0.6155587434768677, 0.45994043350219727, 0.3638751804828644, 1.0474601984024048, -0.25711894035339355, -0.032508742064237595, 0.8188695311546326, 0.614906907081604, -0.07721275836229324, 0.18975438177585602, 0.20216475427150726, -0.6488301157951355, -0.37698590755462646, -0.8502109050750732, 0.0505056232213974, 0.09587254375219345, -0.8230196833610535, 0.33032265305519104, 0.17110499739646912, -0.25691741704940796, -0.27122220396995544, 0.19185473024845123, -0.5963821411132812, 0.0533173568546772, -0.2521602511405945, 1.030000925064087, -0.9826815724372864, 0.7718161940574646, 0.618966281414032, -0.501086413860321, -0.7737391591072083, -0.1693813055753708, -0.16340342164039612, -0.40814778208732605, 0.6962924003601074, 0.08741695433855057, 0.22514468431472778, -0.015218008309602737, -0.3436923027038574, -0.970564603805542, 1.0566304922103882, 0.34093815088272095, -0.43283745646476746, 0.04072709009051323, 0.13074316084384918, 0.607736349105835, -0.3115386366844177, 0.3597283363342285, 0.3410668671131134, 0.613337516784668, -0.052837856113910675, -0.9871629476547241, -0.0952271819114685, -0.6415721774101257, -0.15070733428001404, 0.2734772562980652, -0.6395244598388672, 1.1289812326431274, 0.24760712683200836, -0.27879858016967773, 0.14549674093723297, 0.7029784321784973, 0.1435701996088028, 0.09929946064949036, 0.4095507562160492, 0.9292181134223938, 0.5706502795219421, -0.35459133982658386, 1.0432273149490356, -0.34267693758010864, 0.5292925834655762, 1.1120949983596802, 0.171502023935318, 0.9116382598876953, 0.40915924310684204, -0.34312060475349426, 0.5530755519866943, 0.6414273381233215, -0.21906615793704987, 0.42150750756263733, -0.02023153379559517, 0.1414901465177536, -0.21924924850463867, -0.017423691228032112, -0.7247912883758545, 0.2022424340248108, 0.14250114560127258, -0.4273321032524109, 0.07065160572528839, -0.06726094335317612, 0.24103191494941711, -0.03859444335103035, -0.022225473076105118, 0.6156134605407715, 0.22171135246753693, -0.7452168464660645, 0.7342202663421631, 0.12351839244365692, 0.6897814869880676, -0.7460309267044067, 0.195765420794487, -0.19233493506908417, 0.20553822815418243, -0.029624532908201218, -0.5508553981781006, 0.3418852984905243, 0.23134152591228485, -0.33120182156562805, -0.41187265515327454, 0.3370850086212158, -0.633468508720398, -0.8644995093345642, 0.38341447710990906, 0.5139439105987549, 0.4408917725086212, 0.29489824175834656, -0.8989914655685425, -0.0901818498969078, 0.09622881561517715, -0.6290030479431152, 0.1773223727941513, 0.6012446284294128, 0.2635553479194641, 0.5749437212944031, 0.679210364818573, 0.20891554653644562, 0.05822422355413437, -0.05734663084149361, 0.7380181550979614, -0.32580381631851196, -0.5202492475509644, -0.9397306442260742, 0.853456437587738, -0.05738997831940651, -0.6325929760932922, 0.8906400203704834, 0.933914303779602, 0.9782540798187256, 0.031209450215101242, 0.5400761961936951, -0.1320086270570755, 0.7181252241134644, -0.6298253536224365, 0.7329293489456177, -0.9563673138618469, 0.27506333589553833, -0.3124390244483948, -0.9043174982070923, -0.2842801809310913, 0.5174673795700073, -0.3366296589374542, -0.030868547037243843, 0.7996669411659241, 0.7959242463111877, -0.10052270442247391, -0.17309823632240295, 0.20965468883514404, 0.4050355851650238, 0.20814193785190582, 0.541627049446106, 0.5624763369560242, -0.9424216747283936, 0.5705928206443787, -0.177189439535141, -0.23053430020809174, -0.14317063987255096, -0.8182304501533508, -0.9215024709701538, -0.7733396887779236, -0.11389023065567017, -0.4241321086883545, -0.14738453924655914, 1.0358141660690308, 0.4304006099700928, -0.8101892471313477, -0.5096389055252075, 0.07039917260408401, 0.04356081038713455, -0.1703919917345047, -0.18631500005722046, 0.6862255930900574, -0.193172886967659, -0.9588585495948792, 0.11622023582458496, 0.021556247025728226, 0.11587658524513245, -0.2895738482475281, -0.33414265513420105, -0.49611544609069824, -0.02817562222480774, 0.3246111273765564, 0.07864607125520706, -0.680637001991272, 0.14673753082752228, 0.22192254662513733, -0.18869014084339142, 0.2522791028022766, 0.361478328704834, -0.25858074426651, 0.483011931180954, 0.7554681897163391, 0.33349621295928955, 0.4703507721424103, -0.2079380452632904, 0.6928221583366394, -0.5223580598831177, 0.3808239698410034, 0.25252974033355713, 0.54564368724823, 0.4157204031944275, -0.14389100670814514, 0.7357783913612366, 0.37046125531196594, -0.606013298034668, -1.1492973566055298, 0.05701583996415138, -0.848630428314209, -0.08129913359880447, 1.2824634313583374, -0.28495141863822937, -0.1629515141248703, 0.10693695396184921, 0.02977503091096878, 0.3482648432254791, -0.3241213858127594, 0.44546645879745483, 0.8735195398330688, 0.31643158197402954, 0.20075839757919312, -0.8708725571632385, 0.5371174216270447, 0.5660582780838013, -0.8095648288726807, 0.00731330132111907, 0.2932813763618469, 0.2837109863758087, 0.3125542998313904, 0.7216284871101379, -0.40720564126968384, 0.07011432945728302, -0.24658069014549255, 0.3976289629936218, -0.057218149304389954, -0.13742393255233765, -0.3821350336074829, -0.2232218235731125, -0.05115623399615288, 0.030112914741039276 ]
obi/deid_roberta_i2b2
obi
"2022-08-22T13:28:26Z"
524,859
10
transformers
[ "transformers", "pytorch", "roberta", "token-classification", "deidentification", "medical notes", "ehr", "phi", "en", "dataset:I2B2", "arxiv:1907.11692", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: - en thumbnail: "https://www.onebraveidea.org/wp-content/uploads/2019/07/OBI-Logo-Website.png" tags: - deidentification - medical notes - ehr - phi datasets: - I2B2 metrics: - F1 - Recall - Precision widget: - text: "Physician Discharge Summary Admit date: 10/12/1982 Discharge date: 10/22/1982 Patient Information Jack Reacher, 54 y.o. male (DOB = 1/21/1928)." - text: "Home Address: 123 Park Drive, San Diego, CA, 03245. Home Phone: 202-555-0199 (home)." - text: "Hospital Care Team Service: Orthopedics Inpatient Attending: Roger C Kelly, MD Attending phys phone: (634)743-5135 Discharge Unit: HCS843 Primary Care Physician: Hassan V Kim, MD 512-832-5025." license: mit --- # Model Description * A RoBERTa [[Liu et al., 2019]](https://arxiv.org/pdf/1907.11692.pdf) model fine-tuned for de-identification of medical notes. * Sequence Labeling (token classification): The model was trained to predict protected health information (PHI/PII) entities (spans). A list of protected health information categories is given by [HIPAA](https://www.hhs.gov/hipaa/for-professionals/privacy/laws-regulations/index.html). * A token can either be classified as non-PHI or as one of the 11 PHI types. Token predictions are aggregated to spans by making use of BILOU tagging. * The PHI labels that were used for training and other details can be found here: [Annotation Guidelines](https://github.com/obi-ml-public/ehr_deidentification/blob/master/AnnotationGuidelines.md) * More details on how to use this model, the format of data and other useful information is present in the GitHub repo: [Robust DeID](https://github.com/obi-ml-public/ehr_deidentification). # How to use * A demo on how the model works (using model predictions to de-identify a medical note) is on this space: [Medical-Note-Deidentification](https://huggingface.co/spaces/obi/Medical-Note-Deidentification). * Steps on how this model can be used to run a forward pass can be found here: [Forward Pass](https://github.com/obi-ml-public/ehr_deidentification/tree/master/steps/forward_pass) * In brief, the steps are: * Sentencize (the model aggregates the sentences back to the note level) and tokenize the dataset. * Use the predict function of this model to gather the predictions (i.e., predictions for each token). * Additionally, the model predictions can be used to remove PHI from the original note/text. # Dataset * The I2B2 2014 [[Stubbs and Uzuner, 2015]](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4978170/) dataset was used to train this model. | | I2B2 | | I2B2 | | | --------- | --------------------- | ---------- | -------------------- | ---------- | | | TRAIN SET - 790 NOTES | | TEST SET - 514 NOTES | | | PHI LABEL | COUNT | PERCENTAGE | COUNT | PERCENTAGE | | DATE | 7502 | 43.69 | 4980 | 44.14 | | STAFF | 3149 | 18.34 | 2004 | 17.76 | | HOSP | 1437 | 8.37 | 875 | 7.76 | | AGE | 1233 | 7.18 | 764 | 6.77 | | LOC | 1206 | 7.02 | 856 | 7.59 | | PATIENT | 1316 | 7.66 | 879 | 7.79 | | PHONE | 317 | 1.85 | 217 | 1.92 | | ID | 881 | 5.13 | 625 | 5.54 | | PATORG | 124 | 0.72 | 82 | 0.73 | | EMAIL | 4 | 0.02 | 1 | 0.01 | | OTHERPHI | 2 | 0.01 | 0 | 0 | | TOTAL | 17171 | 100 | 11283 | 100 | # Training procedure * Steps on how this model was trained can be found here: [Training](https://github.com/obi-ml-public/ehr_deidentification/tree/master/steps/train). The "model_name_or_path" was set to: "roberta-large". * The dataset was sentencized with the en_core_sci_sm sentencizer from spacy. * The dataset was then tokenized with a custom tokenizer built on top of the en_core_sci_sm tokenizer from spacy. * For each sentence we added 32 tokens on the left (from previous sentences) and 32 tokens on the right (from the next sentences). * The added tokens are not used for learning - i.e, the loss is not computed on these tokens - they are used as additional context. * Each sequence contained a maximum of 128 tokens (including the 32 tokens added on). Longer sequences were split. * The sentencized and tokenized dataset with the token level labels based on the BILOU notation was used to train the model. * The model is fine-tuned from a pre-trained RoBERTa model. * Training details: * Input sequence length: 128 * Batch size: 32 (16 with 2 gradient accumulation steps) * Optimizer: AdamW * Learning rate: 5e-5 * Dropout: 0.1 ## Results # Questions? Post a Github issue on the repo: [Robust DeID](https://github.com/obi-ml-public/ehr_deidentification).
[ -0.031589604914188385, -0.8508490920066833, 0.4748842716217041, -0.19654987752437592, -0.36288759112358093, -0.24274703860282898, 0.02951793186366558, -0.45143941044807434, 0.2457762509584427, 0.5859764814376831, -0.5538825988769531, -0.8557007312774658, -0.706455647945404, -0.012783247977495193, -0.21718750894069672, 1.291733741760254, 0.10657244175672531, 0.29358208179473877, 0.06272003054618835, -0.09704615920782089, -0.45588675141334534, -0.6075458526611328, -0.5458241701126099, -0.3302671015262604, 0.34811931848526, 0.42867758870124817, 0.08401226252317429, 0.9539049863815308, 0.879291296005249, 0.270233690738678, -0.42012128233909607, -0.07497034966945648, -0.28543826937675476, -0.18194301426410675, 0.16365961730480194, -0.32508644461631775, -0.8954479098320007, -0.02779991924762726, 0.536747395992279, 0.6604043245315552, -0.08899731934070587, 0.36507150530815125, 0.0856078714132309, 0.5875688791275024, -0.3459187150001526, 0.17283472418785095, -0.5722008347511292, 0.022891199216246605, -0.3510925769805908, -0.1011076495051384, -0.4521079361438751, -0.15149345993995667, 0.2917934060096741, -0.4127925932407379, 0.1097206398844719, -0.05235865339636803, 1.2554094791412354, 0.22639134526252747, -0.49774444103240967, -0.18983902037143707, -0.6336378455162048, 0.544894814491272, -0.9427492022514343, 0.20394201576709747, 0.5590872168540955, -0.06766486912965775, 0.09040741622447968, -0.7522587180137634, -0.33839884400367737, -0.12579761445522308, -0.19438065588474274, 0.19459168612957, 0.11752300709486008, 0.28564488887786865, 0.6063268780708313, 0.5373514890670776, -0.5908790826797485, 0.32428643107414246, -0.7338916063308716, -0.1713641732931137, 0.7106106877326965, 0.235060453414917, 0.1728721559047699, -0.3984357416629791, -0.6240304112434387, 0.0027486123144626617, -0.3016918897628784, 0.12754692137241364, 0.13530215620994568, 0.323801189661026, -0.3796226680278778, 0.6439375281333923, 0.05629035457968712, 0.6084334254264832, 0.3384038209915161, -0.3467009663581848, 0.8122036457061768, -0.1875910460948944, -0.4825769066810608, 0.30708712339401245, 1.0033435821533203, 0.2304682433605194, -0.0002444217388983816, 0.2017730325460434, -0.344595730304718, -0.10674010962247849, 0.08697818219661713, -0.8196889162063599, -0.43378064036369324, 0.35170361399650574, -0.716272234916687, -0.3687989115715027, 0.2056114673614502, -0.7510203719139099, -0.12315080314874649, -0.5586166977882385, 0.4900037348270416, -0.7630346417427063, 0.057485464960336685, 0.165472149848938, -0.0431370884180069, -0.04449469968676567, 0.07363235205411911, -1.0113407373428345, 0.2984252870082855, 0.5775627493858337, 0.8138523101806641, 0.023283010348677635, -0.2160860151052475, -0.42922306060791016, 0.1262212097644806, -0.10798665136098862, 0.5570393204689026, -0.004201631527394056, -0.3967287242412567, -0.16191400587558746, 0.2125033587217331, -0.5820770859718323, -0.5429038405418396, 0.7420332431793213, -0.2708424925804138, 0.4322521984577179, -0.04121488705277443, -0.7744339108467102, -0.28662386536598206, 0.2914177179336548, -0.8315197825431824, 0.9895584583282471, 0.19812743365764618, -1.2405312061309814, 0.48545005917549133, -0.7748059630393982, -0.46434852480888367, 0.04000754654407501, 0.01924038492143154, -0.9490782618522644, -0.11596907675266266, 0.09949207305908203, 0.5080925822257996, -0.0822264701128006, 0.4754990339279175, -0.32475611567497253, -0.42553335428237915, 0.05790254473686218, -0.4160972833633423, 1.1365619897842407, 0.1861572265625, -0.5439415574073792, 0.04790483042597771, -1.1772993803024292, -0.12169895321130753, 0.13675454258918762, -0.8103634119033813, -0.38483789563179016, -0.42020121216773987, 0.250546932220459, 0.18781591951847076, 0.2667226493358612, -0.4521322548389435, 0.1291685551404953, -0.6863884925842285, 0.44624021649360657, 0.720790684223175, 0.30728042125701904, 0.24321001768112183, -0.5263620018959045, 0.31510695815086365, 0.41329991817474365, 0.24754361808300018, -0.26329970359802246, -0.534820556640625, -0.6661381721496582, -0.6357890367507935, 0.6007935404777527, 0.8843271732330322, 0.024790875613689423, 0.9649017453193665, -0.4141697585582733, -0.4145752191543579, -0.6502602100372314, -0.04707878828048706, 0.5349922776222229, 0.8914103507995605, 0.5631561875343323, -0.2741354703903198, -0.5822238922119141, -0.9042877554893494, 0.05812257528305054, -0.33202362060546875, 0.0653977170586586, 0.25926023721694946, 0.7080633044242859, -0.4878458082675934, 0.6481958031654358, -0.3663213551044464, -0.5582535266876221, -0.19547973573207855, 0.18488900363445282, 0.29483675956726074, 0.7669268846511841, 0.37081098556518555, -0.7052570581436157, -0.3487514555454254, -0.18418195843696594, -0.7156774997711182, 0.12264684587717056, -0.3672880232334137, -0.0792630985379219, 0.1567467898130417, 0.4665502607822418, -0.6232627034187317, 0.6686428785324097, 0.15694431960582733, -0.22659286856651306, 0.2971515357494354, -0.5085338950157166, 0.05051180347800255, -1.4134129285812378, 0.567215085029602, 0.10228203237056732, -0.010350769385695457, -0.6749829053878784, -0.39909204840660095, 0.13961170613765717, 0.041941311210393906, -0.20756804943084717, 0.429738312959671, -0.6230425238609314, 0.15016397833824158, 0.12606893479824066, -0.1655133068561554, 0.09977753460407257, 0.6586415767669678, 0.0067555345594882965, 0.34111288189888, 0.49508166313171387, -0.6894088387489319, -0.20311348140239716, 0.526991605758667, -0.37184152007102966, 0.4039085805416107, -0.7342205047607422, 0.014514129608869553, -0.19929225742816925, 0.08617445081472397, -0.8820639848709106, -0.212861567735672, 0.44290655851364136, -0.44051799178123474, 0.6112711429595947, -0.13705968856811523, -0.28152576088905334, -0.6092328429222107, -0.17828364670276642, 0.23180623352527618, 0.437073677778244, -0.3085598945617676, 0.6309679746627808, 0.3869398236274719, -0.06005047261714935, -0.6112749576568604, -0.9163680672645569, -0.0726415142416954, -0.5251186490058899, -0.3062240481376648, 0.799856960773468, -0.04638666287064552, -0.2891382873058319, -0.07497899979352951, 0.08692988008260727, -0.31288376450538635, 0.3498724699020386, 0.5374466180801392, 0.6506600975990295, -0.13309849798679352, 0.4252529442310333, 0.2520517408847809, -0.08807620406150818, 0.14504306018352509, -0.18601319193840027, 0.3704580068588257, 0.07656004279851913, -0.36930328607559204, -0.9778933525085449, 0.28483831882476807, 0.7438039183616638, -0.45893174409866333, 0.8174241185188293, 0.5864986777305603, -0.6864013075828552, 0.30924105644226074, -0.44632741808891296, -0.3273699879646301, -0.3794509470462799, 0.48595261573791504, -0.40874457359313965, -0.46234121918678284, 0.6321477890014648, -0.09635425359010696, 0.2686363458633423, 0.7901930809020996, 0.4344639182090759, -0.08454015105962753, 0.9088563919067383, 0.5087087750434875, -0.39481815695762634, 0.4040752053260803, -0.7146502137184143, 0.1187622919678688, -0.9530433416366577, -0.5314942598342896, -0.5206392407417297, -0.23694457113742828, -0.5347050428390503, -0.10216214507818222, 0.2389613389968872, 0.16457131505012512, -0.49152490496635437, 0.26026102900505066, -0.6458754539489746, -0.035859741270542145, 0.6946955919265747, 0.5618893504142761, 0.06878256797790527, -0.11677076667547226, -0.33953937888145447, 0.08213641494512558, -0.6488401293754578, -0.6126980185508728, 1.2541228532791138, 0.6796072125434875, 0.5273013114929199, -0.18904505670070648, 1.0341124534606934, 0.23114444315433502, 0.22429661452770233, -0.683647096157074, 0.3932156562805176, -0.1822252720594406, -0.5993284583091736, -0.25925248861312866, -0.4101157486438751, -1.0706149339675903, -0.10093863308429718, -0.3147822618484497, -0.9156395196914673, 0.19761572778224945, 0.17577573657035828, -0.5707715153694153, 0.3758244812488556, -0.49672403931617737, 1.1061900854110718, -0.3878846764564514, -0.034947335720062256, -0.04059772193431854, -0.9990173578262329, 0.303166925907135, -0.09529037773609161, 0.13094468414783478, 0.05502504110336304, 0.23226523399353027, 0.9329993724822998, -0.6180472373962402, 0.8523581624031067, -0.16332562267780304, -0.008495258167386055, 0.4380621314048767, -0.32594746351242065, 0.5008668303489685, -0.12010203301906586, -0.08638778328895569, 0.18989787995815277, 0.0030125072225928307, -0.1839785873889923, -0.10753457993268967, 0.5629005432128906, -0.6740493178367615, -0.4074796736240387, -0.4214133620262146, -0.4016953706741333, 0.16292116045951843, 0.4116699993610382, 0.6288712024688721, 0.7216972708702087, -0.07525600492954254, -0.02286473475396633, 0.9518235325813293, -0.19120727479457855, 0.3001519739627838, 0.27350664138793945, 0.26405417919158936, -0.6536082029342651, 0.5325480103492737, 0.10120680183172226, 0.09086797386407852, 0.5558896660804749, 0.2020912766456604, -0.4861951172351837, -0.5378419756889343, -0.5064252018928528, 0.4844919443130493, -0.7325581312179565, -0.05559493601322174, -1.009812593460083, -0.32340922951698303, -0.6377318501472473, 0.2700420916080475, -0.02694454789161682, -0.3158705234527588, -0.8952088952064514, -0.5105884075164795, 0.48646441102027893, 0.6241864562034607, 0.06543198972940445, 0.24273580312728882, -0.8927832841873169, 0.07704925537109375, -0.04549727961421013, 0.11907348036766052, -0.1691642552614212, -1.016241192817688, -0.31158801913261414, 0.06988555938005447, -0.1829957216978073, -1.011482834815979, 0.38666436076164246, 0.15182062983512878, 0.6146894097328186, 0.6411033868789673, 0.06658350676298141, 0.8495228290557861, -0.5293399095535278, 0.6799347996711731, 0.13965463638305664, -0.758289635181427, 0.8165225386619568, -0.3236672580242157, 0.12498196959495544, 0.8090239763259888, 0.3798805773258209, -0.2553988993167877, -0.18926863372325897, -0.9805814027786255, -1.0037811994552612, 0.7213059663772583, -0.16342754662036896, -0.043461404740810394, -0.04015949368476868, 0.6544303894042969, -0.15405747294425964, 0.07534530758857727, -0.7679038643836975, -0.41525447368621826, 0.14334286749362946, -0.667199969291687, -0.03525013104081154, -0.39405056834220886, -0.12473396956920624, -0.30724671483039856, 0.9532800912857056, 0.12449800223112106, 0.3787194490432739, 0.38853707909584045, -0.008407588116824627, -0.0552862249314785, 0.194846972823143, 0.5962756872177124, 0.33952781558036804, -0.3952922523021698, -0.11983200162649155, 0.051551494747400284, -0.6795845627784729, -0.0028639223892241716, 0.49979066848754883, -0.44239744544029236, 0.22239282727241516, 0.3422984182834625, 1.0091543197631836, 0.0485844761133194, -0.60858154296875, 0.5073667168617249, 0.03129376471042633, -0.48469844460487366, -0.47918084263801575, -0.07158148288726807, -0.09064481407403946, -0.02851303666830063, -0.05253264680504799, 0.1203879714012146, 0.34299612045288086, -0.3379914462566376, 0.3826253414154053, 0.22107212245464325, -0.6553556323051453, -0.22879810631275177, 1.0569980144500732, 0.000010875524822040461, -0.37301984429359436, 0.8133583664894104, 0.02551223523914814, -0.4954317808151245, 0.7842218279838562, 0.32396066188812256, 0.911055862903595, -0.25143665075302124, 0.061936359852552414, 0.834385097026825, 0.133179172873497, -0.1470201462507248, 0.3716377913951874, 0.08388400077819824, -0.21632838249206543, -0.06746664643287659, -0.3787650465965271, 0.11137440800666809, 0.43018200993537903, -0.9981145858764648, 0.3621556758880615, -0.503018856048584, -0.4936671257019043, 0.25614261627197266, 0.09690301865339279, -0.663998007774353, 0.4736802875995636, 0.05950289964675903, 0.9220882654190063, -0.9982308149337769, 0.8477338552474976, 0.7905799746513367, -0.6555227637290955, -1.0934728384017944, 0.08589397370815277, 0.12067839503288269, -0.45410647988319397, 0.7513871788978577, 0.5234526991844177, 0.4708026349544525, -0.11002685129642487, -0.10610216856002808, -0.6970838308334351, 1.3089152574539185, 0.09112074971199036, -0.8188301920890808, -0.14847460389137268, 0.07575378566980362, 0.5677472949028015, -0.1192508414387703, 0.24622343480587006, 0.3930234909057617, 0.23764701187610626, -0.15207205712795258, -1.073186993598938, 0.07570187747478485, -0.36028429865837097, -0.18061843514442444, 0.16955417394638062, -0.5697768330574036, 1.080994725227356, -0.4421420991420746, -0.043361812829971313, 0.34200018644332886, 0.3858548402786255, 0.3724415898323059, 0.627950131893158, 0.5158957242965698, 0.9759679436683655, 1.1688568592071533, 0.04433174058794975, 0.7577248215675354, -0.5030178427696228, 0.36119410395622253, 1.250856876373291, -0.18433213233947754, 0.6817758083343506, 0.5029940605163574, 0.02904577925801277, 0.7268549203872681, 0.946428656578064, -0.09098503738641739, 0.516591489315033, 0.28426870703697205, -0.2359616607427597, 0.028697900474071503, 0.09655872732400894, -0.2733386158943176, 0.37101060152053833, 0.2808893322944641, -1.0385640859603882, 0.32547223567962646, 0.10847154259681702, 0.1533317267894745, -0.0458703376352787, -0.18859514594078064, 0.9896568059921265, -0.06897974759340286, -0.738714337348938, 0.5214795470237732, 0.07648913562297821, 0.39034292101860046, -0.3821766972541809, -0.07564714550971985, -0.014193405397236347, 0.5110507011413574, -0.1417558789253235, -0.29073500633239746, 0.07074902951717377, 0.0002761357754934579, -0.35739657282829285, -0.1132054403424263, 0.4716101884841919, -0.5172016620635986, -0.5720888376235962, 0.12339893728494644, 0.3627746105194092, 0.28030532598495483, 0.22737161815166473, -1.1259325742721558, -0.3491407334804535, 0.0990775004029274, -0.26873019337654114, 0.1827119141817093, 0.6639724969863892, 0.0006082338513806462, 0.5573703050613403, 0.3965315818786621, 0.09073598682880402, -0.19937874376773834, 0.19897352159023285, 0.9015900492668152, -0.5063780546188354, -0.6113882660865784, -0.9133352637290955, 0.7305223941802979, -0.13676515221595764, -0.6037665605545044, 0.5246754884719849, 0.8924863934516907, 0.7282300591468811, -0.02727896347641945, 0.6339273452758789, -0.007724257651716471, 0.8026653528213501, -0.6661195158958435, 0.7026151418685913, -0.5304684638977051, 0.40258583426475525, -0.4162931740283966, -0.31351304054260254, -0.23335739970207214, 0.7192428112030029, -0.21854351460933685, 0.1076866164803505, 0.4377863109111786, 0.7152201533317566, -0.03372202813625336, -0.11870194226503372, -0.0709364041686058, 0.135715514421463, 0.1905546933412552, 0.5890333652496338, 0.3482784330844879, -0.9072734117507935, 0.3307703137397766, -0.4730019271373749, -0.2255283147096634, -0.22357600927352905, -0.5711766481399536, -1.085125207901001, -0.6304318308830261, -0.6854523420333862, -0.48056909441947937, -0.017168404534459114, 0.9077031016349792, 0.7371602654457092, -0.698165774345398, 0.05673108994960785, -0.24514414370059967, -0.27830585837364197, -0.3059162199497223, -0.18523888289928436, 0.7847869992256165, 0.028153806924819946, -0.6468366980552673, 0.027471527457237244, 0.0909564420580864, 0.5665848255157471, 0.009562062099575996, -0.030610064044594765, -0.44012218713760376, -0.20960189402103424, 0.1251859962940216, 0.10227172821760178, -0.5574208498001099, 0.07203007489442825, 0.07481293380260468, -0.45957645773887634, 0.24964042007923126, 0.6012877821922302, -0.5378050804138184, 0.29810401797294617, 0.32159721851348877, 0.4425611197948456, 0.425260066986084, 0.29878225922584534, 0.09110178053379059, -0.38677486777305603, 0.1238703578710556, 0.3750358521938324, 0.5310903787612915, 0.22901271283626556, -0.7090041041374207, 0.4756234288215637, 0.3457643985748291, -0.6745601296424866, -0.8258568048477173, -0.31042808294296265, -1.072012186050415, -0.17207792401313782, 1.0099021196365356, -0.4183123707771301, -0.40324530005455017, -0.021488402038812637, -0.36414024233818054, 0.4409058094024658, -0.2630418837070465, 0.8595921993255615, 0.2818834185600281, 0.10158142447471619, -0.031978216022253036, -0.39524364471435547, 0.47979626059532166, 0.37447547912597656, -0.8823251128196716, -0.03142469376325607, 0.579645037651062, 0.3836687505245209, 0.07902008295059204, 0.9172683954238892, -0.2500319480895996, 0.17226678133010864, -0.14073194563388824, 0.07579203695058823, 0.008915644139051437, -0.26076188683509827, -0.6229281425476074, -0.1539260894060135, 0.008815592154860497, -0.6423657536506653 ]
Seethal/sentiment_analysis_generic_dataset
Seethal
"2022-04-19T06:26:33Z"
522,993
20
transformers
[ "transformers", "pytorch", "distilbert", "text-classification", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-04-13T18:37:07Z"
## BERT base model (uncased) Pretrained model on English language using a masked language modeling (MLM) objective. This model is uncased: it does not make a difference between english and English. ## Model description BERT is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts 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 texts. More precisely, it was pretrained with two objectives: * Masked language modeling (MLM): taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence. * Next sentence prediction (NSP): the model concatenates two masked sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not. This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the BERT model as inputs. ## Model description [Seethal/sentiment_analysis_generic_dataset] This is a fine-tuned downstream version of the bert-base-uncased model for sentiment analysis, this model is not intended for further downstream fine-tuning for any other tasks. This model is trained on a classified dataset for text classification.
[ -0.3604767918586731, -0.6067498922348022, 0.1899661272764206, 0.34152019023895264, -0.3491362929344177, 0.07883536070585251, -0.32978251576423645, -0.4569137394428253, 0.22803844511508942, 0.752936601638794, -0.7371497750282288, -0.3324672281742096, -0.6899274587631226, 0.0373123437166214, -0.33695319294929504, 1.3194007873535156, 0.15249960124492645, 0.19771583378314972, -0.18142199516296387, 0.31157130002975464, -0.42837589979171753, -0.9178457856178284, -0.3932810425758362, -0.46093350648880005, 0.3931734263896942, 0.1098925992846489, 0.5617472529411316, 0.24756160378456116, 0.4739057421684265, 0.3474262058734894, -0.004994614981114864, -0.08951681107282639, -0.4208086431026459, 0.001236151671037078, 0.03161477670073509, -0.43329721689224243, -0.1269063502550125, 0.30254608392715454, 0.5033915042877197, 0.7507014870643616, 0.18669813871383667, -0.008741053752601147, 0.3100172281265259, 0.6205791234970093, -0.5122352242469788, 0.2725604176521301, -0.7638866901397705, 0.17405077815055847, -0.03514716774225235, -0.02119295857846737, -0.45692771673202515, -0.24270370602607727, 0.49204641580581665, -0.014344511553645134, 0.25747254490852356, -0.07383623719215393, 1.0897176265716553, 0.006593115162104368, -0.33919355273246765, -0.35238802433013916, -0.6470438241958618, 0.9466763734817505, -0.7891911864280701, 0.3048632740974426, 0.30845487117767334, 0.033803921192884445, -0.049480464309453964, -0.8733214139938354, -0.4809649586677551, -0.290914922952652, -0.3871400058269501, 0.25844982266426086, -0.12196089327335358, 0.26637890934944153, 0.05474529787898064, 0.20914366841316223, -0.5082348585128784, 0.04091254621744156, -0.49719613790512085, -0.20410075783729553, 0.6214532256126404, -0.3204299509525299, 0.1582513004541397, -0.3175722360610962, -0.7252312898635864, 0.04390645772218704, -0.5342972874641418, 0.2248937040567398, 0.3834719657897949, 0.4580022990703583, -0.04639917612075806, 0.549789547920227, 0.21885481476783752, 0.543485701084137, 0.11929865181446075, 0.007315546274185181, 0.42094117403030396, 0.11086367815732956, -0.41309648752212524, 0.14698979258537292, 0.7060320973396301, 0.16281035542488098, 0.6409148573875427, -0.3049313724040985, -0.47537297010421753, 0.0323624312877655, 0.3667543828487396, -0.6200104355812073, -0.1758170872926712, 0.11839191615581512, -0.6368135809898376, -0.3439604640007019, 0.08955090492963791, -0.27615487575531006, 0.18330177664756775, -0.254014253616333, 0.7788063883781433, -0.37346646189689636, -0.03194509446620941, 0.038227278739213943, -0.05500466376543045, 0.22224920988082886, -0.0931418314576149, -0.8885594606399536, 0.3622072637081146, 0.5690119862556458, 0.5687576532363892, -0.27153903245925903, -0.24857550859451294, 0.07418963313102722, -0.08481498807668686, -0.22852152585983276, 0.5681744813919067, -0.44259610772132874, -0.1644406020641327, 0.2811518907546997, 0.3258887827396393, -0.19662411510944366, -0.15524381399154663, 0.47114479541778564, -0.6243038177490234, 0.5243288278579712, -0.11036955565214157, -0.7536521553993225, -0.48884108662605286, 0.12313804030418396, -0.46502983570098877, 1.0973727703094482, -0.0832386165857315, -0.7317391633987427, 0.37002623081207275, -0.6009443998336792, -0.5787076950073242, 0.020144473761320114, 0.11498681455850601, -0.32321897149086, 0.17546574771404266, 0.19456012547016144, 0.6797479391098022, 0.1346874088048935, 0.4113217890262604, 0.0028290175832808018, -0.3854011297225952, 0.2599019408226013, -0.5122766494750977, 0.909906804561615, 0.031718235462903976, -0.4944598078727722, -0.023309238255023956, -0.6588402986526489, 0.16636529564857483, 0.033188123255968094, -0.3565984070301056, -0.3075369596481323, 0.1997559666633606, 0.1539725959300995, 0.30739524960517883, 0.4461444616317749, -0.6546401977539062, -0.022472789511084557, -0.6608275771141052, 0.3248192071914673, 0.8907464146614075, -0.10321272909641266, 0.382429301738739, -0.23688243329524994, 0.37406179308891296, -0.1132236048579216, 0.03257365524768829, -0.21700793504714966, -0.6979285478591919, -1.0221202373504639, -0.23385678231716156, 0.6186793446540833, 0.7595223784446716, -0.40310245752334595, 0.9382750988006592, 0.06674181669950485, -0.1927039921283722, -0.7655413746833801, 0.10055390000343323, 0.44831573963165283, 0.3904159665107727, 0.32047250866889954, -0.40723875164985657, -0.8901744484901428, -1.1951396465301514, 0.07131970673799515, -0.0030697572510689497, -0.051287081092596054, -0.05135619640350342, 0.5983011722564697, -0.3687596619129181, 0.951496958732605, -0.2707141637802124, -0.40300223231315613, -0.5635492205619812, 0.3267831802368164, 0.22635667026042938, 0.5682597160339355, 0.47053465247154236, -0.6384016275405884, -0.6044849157333374, -0.24307236075401306, -0.6153033971786499, -0.08336191624403, -0.1693659871816635, -0.10387834161520004, 0.30730682611465454, 0.4177645146846771, -0.5278538465499878, 0.5345113277435303, 0.6971219778060913, 0.027982860803604126, 0.31967270374298096, -0.27215147018432617, -0.2581457197666168, -1.1237177848815918, -0.1910090148448944, -0.2620924711227417, -0.21338583528995514, -0.6623188257217407, -0.14348474144935608, -0.007057925220578909, -0.1183014065027237, -0.4446428418159485, 0.3286547064781189, -0.5292039513587952, -0.12620487809181213, -0.34649595618247986, -0.14927765727043152, 0.02111964486539364, 0.866909921169281, 0.42650094628334045, 0.5851621031761169, 0.6463388204574585, -0.5382078289985657, 0.18588164448738098, 0.17513704299926758, -0.5081818103790283, -0.03211113438010216, -0.7496579885482788, 0.1808810979127884, -0.2305244654417038, 0.04182004556059837, -1.1946684122085571, 0.21827055513858795, -0.12005286663770676, -0.6400600075721741, 0.4628051221370697, 0.2460293024778366, -0.38088151812553406, -0.4416636824607849, -0.20242148637771606, 0.005797340534627438, 0.8162573575973511, -0.4082881510257721, 0.6089567542076111, 0.36391350626945496, -0.23389911651611328, -0.7750599384307861, -0.9388247132301331, -0.07832423597574234, 0.1443912237882614, -0.5451214909553528, 0.36257678270339966, -0.07057845592498779, -0.01569598726928234, 0.08564618974924088, 0.07614658772945404, -0.2399955689907074, -0.015346605330705643, 0.33338817954063416, 0.3359883427619934, -0.2556527256965637, 0.22923673689365387, 0.08682262152433395, -0.0635746568441391, 0.16784396767616272, -0.12745434045791626, 0.6109808683395386, -0.06423012167215347, -0.1318581998348236, -0.32906803488731384, 0.562003493309021, 0.15299394726753235, -0.1299239695072174, 0.9219582676887512, 0.6742324829101562, -0.4052883982658386, -0.31210416555404663, -0.5881968140602112, -0.35421136021614075, -0.48496341705322266, 0.42497503757476807, -0.36448097229003906, -0.9014039635658264, 0.4394039809703827, 0.38257157802581787, 0.22208943963050842, 0.5833672285079956, 0.6697439551353455, -0.6015356779098511, 1.0161700248718262, 0.9569635987281799, -0.1701764166355133, 0.2756698727607727, -0.04704035073518753, 0.3609786331653595, -0.5881183743476868, -0.36178258061408997, -0.3599108159542084, -0.453326553106308, -0.5809411406517029, -0.07134286314249039, -0.00672361021861434, 0.11351121217012405, -0.15158700942993164, 0.423859566450119, -0.6141377091407776, 0.4373396337032318, 0.966359555721283, 0.11849798262119293, -0.002711511915549636, 0.20952239632606506, -0.277424693107605, -0.3002510070800781, -0.5364435315132141, -0.5360780358314514, 1.1438533067703247, 0.5212316513061523, 0.7095333337783813, -0.19678567349910736, 0.6649526953697205, 0.5091395974159241, 0.28905248641967773, -0.754337728023529, 0.6367714405059814, -0.36172741651535034, -0.9263061285018921, -0.0896197184920311, -0.014607219025492668, -1.0805366039276123, 0.1879604011774063, -0.39158424735069275, -0.5955522060394287, 0.10393843054771423, -0.062295738607645035, -0.03422892838716507, 0.33213645219802856, -0.927527129650116, 0.5607174634933472, -0.41862231492996216, 0.16549775004386902, 0.1402883678674698, -0.8579877614974976, 0.20818652212619781, -0.1542196124792099, -0.09186725318431854, 0.08232447504997253, 0.24001696705818176, 0.921906054019928, -0.2957450747489929, 1.1706452369689941, -0.10674876719713211, 0.07793914526700974, 0.19736066460609436, -0.14142917096614838, 0.32781416177749634, -0.4009031057357788, 0.2461395561695099, 0.3547878563404083, -0.19319607317447662, -0.344215452671051, -0.37096601724624634, 0.40780627727508545, -0.9606760740280151, -0.5942401885986328, -0.5731853246688843, -0.4850226640701294, -0.2938478887081146, 0.2556983232498169, 0.5529159307479858, 0.17313210666179657, -0.2537900507450104, 0.3942526578903198, 0.701149582862854, -0.33300116658210754, 0.6065576076507568, 0.5333952307701111, -0.14994867146015167, -0.10637453943490982, 0.44311803579330444, 0.039328254759311676, 0.34976959228515625, 0.6777871251106262, 0.06374631822109222, -0.4457198679447174, -0.46438372135162354, 0.10418751835823059, 0.19234135746955872, -0.6996460556983948, -0.022806288674473763, -0.8856513500213623, -0.7625792622566223, -0.6545887589454651, -0.2862507700920105, -0.26346439123153687, -0.3011000454425812, -0.26521265506744385, -0.27559611201286316, 0.2117304503917694, 0.7591216564178467, -0.27588459849357605, 0.433891236782074, -0.6640663743019104, 0.30525529384613037, 0.5657630562782288, 0.14226174354553223, -0.1961088478565216, -0.6203890442848206, -0.19752462208271027, 0.22894161939620972, -0.1600523293018341, -0.855737030506134, 0.5324321389198303, 0.1557590812444687, 0.6423503160476685, 0.46998441219329834, -0.08942976593971252, 0.4730934798717499, -0.7589629292488098, 0.7281926870346069, 0.20815566182136536, -0.9503455758094788, 0.5556045770645142, -0.021255621686577797, 0.14716681838035583, 0.4523777663707733, 0.4732133150100708, -0.3148743510246277, -0.4752041697502136, -0.5799812078475952, -0.8370093703269958, 0.6230709552764893, 0.36178022623062134, 0.5514113903045654, -0.15546169877052307, 0.12368864566087723, 0.23134425282478333, 0.46688035130500793, -1.3570926189422607, -0.4170824885368347, -0.27089664340019226, -0.15118496119976044, -0.31225770711898804, -0.583996057510376, 0.07351388037204742, -0.40835973620414734, 0.7592455148696899, 0.3512732684612274, 0.6912089586257935, 0.022890012711286545, -0.24546946585178375, 0.1440475434064865, 0.25266167521476746, 0.47555238008499146, 0.30996307730674744, -0.6770430207252502, -0.0330345593392849, -0.02119775488972664, -0.6521314382553101, -0.09927540272474289, 0.13731089234352112, -0.2448360025882721, 0.44067060947418213, 0.4942898750305176, 0.9514657258987427, 0.2027927190065384, -0.5534870624542236, 0.5815395712852478, 0.25451260805130005, -0.41622477769851685, -0.52655029296875, -0.11840543150901794, -0.011930708773434162, 0.132833331823349, 0.5075744390487671, 0.03612516075372696, -0.09666597098112106, -0.6960248351097107, 0.4033718705177307, 0.5695248246192932, -0.5419116616249084, -0.16441532969474792, 0.48852354288101196, 0.25158098340034485, -0.3206252455711365, 0.6422123312950134, -0.007659479975700378, -0.7771158814430237, 0.6587851047515869, 0.7523099184036255, 1.0774643421173096, -0.21435564756393433, 0.3557536005973816, 0.07823211699724197, 0.7396285533905029, 0.12035241723060608, 0.2247752845287323, 0.12371528148651123, -1.04893958568573, -0.5375348925590515, -0.7415241003036499, -0.22453075647354126, 0.4691929519176483, -0.7745803594589233, 0.04985969513654709, -0.37683945894241333, -0.05570249259471893, 0.06555500626564026, -0.04606948792934418, -0.670352578163147, 0.614005446434021, 0.18818674981594086, 0.7578585147857666, -0.9649425745010376, 0.9638200402259827, 0.4963594079017639, -0.34637075662612915, -0.8238562941551208, -0.08943216502666473, -0.3577312231063843, -1.1445986032485962, 1.0004713535308838, 0.34686726331710815, 0.08825138211250305, -0.04387069121003151, -0.6575854420661926, -0.7450470328330994, 0.5879672765731812, 0.09872167557477951, -0.44021525979042053, -0.22672244906425476, 0.23245617747306824, 0.6031885743141174, -0.7331575155258179, 0.2119695246219635, 0.2507132887840271, 0.2610694169998169, 0.1154898926615715, -0.7487342357635498, -0.3194638788700104, -0.24323508143424988, 0.1409798562526703, 0.05319475755095482, -0.20386362075805664, 1.1656477451324463, 0.008022760972380638, -0.10844452679157257, -0.02106035128235817, 0.5270901322364807, -0.15537922084331512, -0.14885030686855316, 0.44436782598495483, 0.4897826910018921, 0.45378655195236206, -0.20190595090389252, 0.9321448802947998, -0.29074180126190186, 0.41483548283576965, 1.134625792503357, -0.2928812801837921, 1.0073955059051514, 0.3189813792705536, -0.12087979912757874, 0.8000539541244507, 0.7825060486793518, -0.15316039323806763, 0.9380448460578918, 0.06807852536439896, -0.06033947318792343, -0.10920931398868561, 0.1868358701467514, -0.5386572480201721, 0.5005268454551697, 0.17805491387844086, -0.7637044191360474, -0.16134412586688995, 0.2677205204963684, 0.03380093723535538, -0.04399607703089714, -0.43823572993278503, 0.7577764987945557, -0.06906051933765411, -0.6323310136795044, 0.40270286798477173, 0.10749276727437973, 0.944946825504303, -0.8965640664100647, 0.19031932950019836, -0.11944958567619324, 0.13931171596050262, -0.06987090408802032, -0.7123699188232422, 0.30554020404815674, -0.045600954443216324, -0.39586538076400757, -0.4743768274784088, 0.8887192606925964, -0.6168054342269897, -0.7678969502449036, 0.2711501717567444, 0.41823866963386536, 0.312726229429245, -0.08654303103685379, -0.9436604380607605, -0.3072682023048401, 0.1796138435602188, -0.39242517948150635, 0.22841772437095642, 0.25608396530151367, 0.19663909077644348, 0.6063858270645142, 0.6277374625205994, 0.09325636178255081, 0.12397265434265137, 0.10325270146131516, 0.6960923075675964, -0.632187008857727, -0.5987981557846069, -0.7315454483032227, 0.6251314878463745, -0.004048011731356382, -0.08671795576810837, 0.7715908885002136, 0.4570026993751526, 0.7724180817604065, -0.42052528262138367, 0.8233463764190674, 0.04616843909025192, 0.7519751191139221, -0.5932478308677673, 0.6559429168701172, -0.41867291927337646, -0.013269449584186077, -0.22458022832870483, -1.0564051866531372, -0.10318616032600403, 1.0461093187332153, -0.12508369982242584, 0.2257121205329895, 0.8579522371292114, 0.600346565246582, 0.13609753549098969, -0.09623218327760696, 0.4182576537132263, 0.2724155783653259, -0.22709697484970093, 0.43818429112434387, 0.5776734948158264, -0.2995902895927429, 0.41175970435142517, -0.32966524362564087, -0.10563302040100098, 0.007135570049285889, -0.8022453784942627, -1.4110066890716553, -0.6249240040779114, -0.21671149134635925, -0.380313515663147, 0.13613995909690857, 0.6941769123077393, 0.8483841419219971, -1.0212187767028809, -0.20038153231143951, -0.08283814787864685, -0.07365525513887405, -0.09408509731292725, -0.2962673306465149, 0.33840876817703247, -0.5488373637199402, -0.7670796513557434, 0.16524887084960938, 0.25769656896591187, 0.20090685784816742, -0.5312970280647278, 0.2259097844362259, -0.5272713303565979, 0.3601920008659363, 0.712523341178894, 0.042452890425920486, -0.6609310507774353, -0.2942304313182831, 0.04580993205308914, -0.19946686923503876, 0.0650356337428093, 0.6444915533065796, -0.7934876084327698, 0.45237401127815247, 0.23553141951560974, 0.6088325381278992, 0.4889135956764221, -0.24423430860042572, 0.6831037998199463, -1.2064859867095947, 0.40481942892074585, 0.45279598236083984, 0.312452107667923, 0.15598519146442413, -0.4190075695514679, 0.2587421238422394, 0.13444873690605164, -0.44423821568489075, -0.6885353326797485, 0.18799249827861786, -0.9453158974647522, -0.483938068151474, 1.0561554431915283, -0.24142250418663025, -0.08986369520425797, -0.17539574205875397, -0.1896822601556778, 0.08902037888765335, -0.19989490509033203, 0.7406965494155884, 0.9690266847610474, 0.21514280140399933, -0.2837863564491272, -0.38130611181259155, 0.5580225586891174, 0.48065704107284546, -0.48023098707199097, -0.4884570837020874, 0.1370762437582016, 0.2090827077627182, 0.14180625975131989, 0.5721484422683716, 0.1300634741783142, -0.0421530082821846, -0.31462758779525757, 0.48744943737983704, 0.1629871279001236, -0.24304063618183136, -0.10866376757621765, 0.19712194800376892, -0.4067057967185974, -0.6470263600349426 ]
GanjinZero/UMLSBert_ENG
GanjinZero
"2023-04-04T07:46:34Z"
517,920
8
transformers
[ "transformers", "pytorch", "safetensors", "bert", "feature-extraction", "biomedical", "en", "license:apache-2.0", "endpoints_compatible", "region:us" ]
feature-extraction
"2022-03-02T23:29:04Z"
--- language: - en license: apache-2.0 tags: - bert - biomedical --- CODER: Knowledge infused cross-lingual medical term embedding for term normalization. English Version. Old name. This model is not UMLSBert!!! Github Link: https://github.com/GanjinZero/CODER ``` @article{YUAN2022103983, title = {CODER: Knowledge-infused cross-lingual medical term embedding for term normalization}, journal = {Journal of Biomedical Informatics}, pages = {103983}, year = {2022}, issn = {1532-0464}, doi = {https://doi.org/10.1016/j.jbi.2021.103983}, url = {https://www.sciencedirect.com/science/article/pii/S1532046421003129}, author = {Zheng Yuan and Zhengyun Zhao and Haixia Sun and Jiao Li and Fei Wang and Sheng Yu}, keywords = {medical term normalization, cross-lingual, medical term representation, knowledge graph embedding, contrastive learning} } ```
[ 0.12358579784631729, -0.6360525488853455, 0.21957994997501373, 0.10554766654968262, -0.3548976182937622, 0.12373712658882141, -0.2684759497642517, -0.37938806414604187, 0.6295079588890076, 0.41699591279029846, 0.055309657007455826, -0.9751822352409363, -0.6517771482467651, 0.07478068768978119, 0.13448403775691986, 1.170082449913025, -0.12499579042196274, 0.5532899498939514, -0.2521507441997528, -0.3595576882362366, 0.004350130446255207, -0.41189178824424744, -0.6290342211723328, -0.4917125403881073, 0.4142117202281952, 0.030292466282844543, 0.8035874962806702, 0.8167627453804016, 0.4326023459434509, 0.18505404889583588, -0.10640961676836014, 0.11321330815553665, -0.30457454919815063, -0.2572387456893921, -0.1368407905101776, -0.3970243036746979, -0.537338137626648, -0.36826667189598083, 0.5481080412864685, 0.8079633116722107, -0.05519215017557144, -0.17177113890647888, -0.11749567836523056, 0.6621678471565247, -0.37952643632888794, 0.2608620524406433, -0.4521631598472595, 0.21283204853534698, -0.004473839420825243, -0.39403972029685974, -0.15873655676841736, -0.36297905445098877, 0.09119398891925812, -0.7551836371421814, 0.04933694377541542, 0.10455404222011566, 1.3156368732452393, 0.2535941004753113, -0.6099349856376648, -0.16997723281383514, -0.41031578183174133, 0.5323107838630676, -0.8167796730995178, 0.5715978145599365, -0.03809770569205284, 0.2840147316455841, 0.21250301599502563, -1.278461217880249, -0.5065869092941284, -0.13016486167907715, -0.17519070208072662, 0.10056852549314499, -0.30678558349609375, 0.17868810892105103, -0.005231181625276804, 0.3448531925678253, -0.5559126734733582, -0.12815377116203308, -0.5903357267379761, -0.3599940538406372, 0.6019713878631592, 0.07302392274141312, 0.644103467464447, -0.43322068452835083, -0.6731716990470886, 0.10069826245307922, -0.6660323143005371, 0.0036800142843276262, -0.2796337604522705, 0.043251294642686844, -0.6387794017791748, 0.6556333899497986, -0.2188459038734436, 0.7741265296936035, 0.04162941500544548, -0.22296485304832458, 0.8174724578857422, -0.46687257289886475, -0.18901295959949493, -0.05631726235151291, 1.0959359407424927, 0.5352432131767273, -0.00727164838463068, -0.3737849295139313, 0.06653951108455658, -0.2643561065196991, 0.12919588387012482, -0.9616958498954773, -0.5213683843612671, 0.1915965974330902, -0.6548477411270142, -0.22663724422454834, 0.25629347562789917, -0.6007620096206665, -0.48215192556381226, -0.00735539710149169, 0.49738702178001404, -0.4964439272880554, -0.1587224304676056, 0.5166881680488586, 0.14719301462173462, 0.2522237300872803, -0.026492247357964516, -0.5952622294425964, 0.13593357801437378, 0.40136805176734924, 0.652445375919342, -0.009364952333271503, -0.2588472068309784, -0.1522260308265686, 0.20277373492717743, -0.003491802839562297, 0.4346739649772644, -0.3642164170742035, -0.4321909248828888, -0.10681203007698059, 0.18707725405693054, -0.021080072969198227, -0.2709931433200836, 0.3601222634315491, -0.6228522062301636, 0.2777872383594513, -0.06413033604621887, -0.6585071086883545, -0.31929561495780945, 0.23337164521217346, -0.5428001284599304, 0.6915991902351379, 0.0868433490395546, -1.0497610569000244, 0.2718748450279236, -0.9427904486656189, -0.5356574058532715, 0.2878665030002594, -0.5808413028717041, -0.2925720810890198, -0.3822394609451294, 0.3103015422821045, 0.5217468738555908, -0.4127536714076996, 0.45706167817115784, -0.08769753575325012, -0.003797550918534398, 0.23490813374519348, 0.07318037003278732, 0.9782254695892334, 0.25696924328804016, -0.20128163695335388, 0.1133166030049324, -0.7420456409454346, -0.09402777254581451, 0.28341585397720337, -0.12374026328325272, -0.7063179612159729, -0.08185991644859314, 0.06345805525779724, 0.26043179631233215, 0.6501275300979614, -0.7843281626701355, 0.22104717791080475, -0.4668130874633789, 0.39892709255218506, 0.1934250295162201, 0.13248811662197113, 0.25644850730895996, -0.39634183049201965, 0.588405966758728, 0.30140629410743713, 0.1780470758676529, 0.28490522503852844, -0.6862473487854004, -0.6482208967208862, -0.24929670989513397, 0.7416014671325684, 0.6555875539779663, -1.2196049690246582, 0.6125622987747192, -0.5931622385978699, -0.7599493861198425, -0.8908107280731201, -0.026614591479301453, 0.6757994890213013, 0.7477145791053772, 0.7260797619819641, -0.1607920527458191, -0.667492151260376, -0.7597788572311401, -0.34136414527893066, 0.017978966236114502, -0.12841910123825073, 0.5011916160583496, 0.5515803694725037, -1.0035191774368286, 0.8616219758987427, -0.9899935722351074, -0.32400283217430115, -0.14880473911762238, 0.029772229492664337, 0.11483609676361084, 0.7117953300476074, 0.3612125515937805, -0.9307975172996521, -0.7320115566253662, 0.3747018277645111, -0.7953014373779297, -0.05889476463198662, -0.019772864878177643, -0.20555859804153442, 0.35056132078170776, 0.5346773266792297, -0.09454485028982162, 0.3857792019844055, 0.6006650924682617, -0.546606719493866, 0.3095633387565613, -0.4136662483215332, 0.17685936391353607, -1.740425705909729, 0.3247295618057251, -0.02737661451101303, 0.02377530373632908, -0.5629537105560303, 0.2615862190723419, 0.33859482407569885, 0.1724643111228943, -0.5490521788597107, 0.7235122323036194, -0.6023496985435486, 0.4693516790866852, 0.10077492147684097, 0.18370909988880157, 0.11379396915435791, 0.4068854749202728, 0.03510873019695282, 0.46891090273857117, 0.7485132813453674, -0.575728714466095, 0.44756558537483215, 0.4124019145965576, -0.05199157074093819, 0.36092257499694824, -1.0614800453186035, -0.1376594454050064, 0.2593318521976471, 0.11384978890419006, -0.4722993075847626, -0.2109547257423401, 0.3579060733318329, -0.7234713435173035, 0.3719569444656372, -0.14707887172698975, -0.5030013918876648, -0.08725602179765701, -0.36578989028930664, 0.6149510741233826, 0.5962266325950623, -0.4269828200340271, 0.5792473554611206, 0.8034864068031311, 0.12653788924217224, -0.5220304131507874, -1.050724983215332, -0.0510263554751873, 0.016684498637914658, -0.7290040254592896, 0.769799530506134, -0.1429038643836975, 0.10302940011024475, 0.2006402164697647, 0.040566202253103256, -0.261096715927124, -0.31181615591049194, -0.11991110444068909, 0.4532581567764282, -0.2222229689359665, 0.41910770535469055, 0.48392337560653687, -0.2144019603729248, 0.06924337148666382, -0.17366881668567657, 0.35655677318573, -0.044201698154211044, -0.47265011072158813, -0.05828392505645752, 0.38331151008605957, 0.33370286226272583, -0.282946914434433, 0.6324288249015808, 0.8625649213790894, -0.8007935881614685, 0.2666000723838806, -0.47970616817474365, -0.033830929547548294, -0.4453599750995636, 0.5520712733268738, -0.2941785156726837, -1.319928526878357, 0.7448955774307251, 0.14611467719078064, -0.16664686799049377, 0.6776781678199768, 0.5150896310806274, 0.3102274537086487, 1.0927008390426636, 0.6346238255500793, 0.029502268880605698, -0.24191731214523315, -0.3312707245349884, 0.37121686339378357, -1.0711134672164917, -0.5233570337295532, -0.3713924288749695, -0.14292597770690918, -0.9839972257614136, -0.6812826991081238, 0.6175110340118408, 0.09976014494895935, -0.2013065367937088, 0.26066669821739197, -0.7151686549186707, 0.28810882568359375, 0.16503357887268066, 0.38535159826278687, 0.32681989669799805, -0.043787047266960144, -0.5053483247756958, -0.17873601615428925, -0.8792487978935242, -0.11021915078163147, 1.1468091011047363, 0.4109138548374176, 0.8989627361297607, 0.08619685471057892, 0.9605597853660583, -0.1549348533153534, -0.05012388154864311, -0.7849443554878235, 0.3673502206802368, -0.499815434217453, -0.5137035846710205, -0.1742609739303589, -0.6715245842933655, -1.3813810348510742, 0.14052250981330872, -0.20089192688465118, -0.5574480295181274, 0.34922757744789124, -0.09283991903066635, -0.342843234539032, 0.6029770970344543, -0.3944183588027954, 1.021193504333496, -0.01954108476638794, -0.003016869770362973, 0.03546071797609329, -0.8789792060852051, 0.16666923463344574, 0.05874704569578171, 0.31687241792678833, 0.2351938635110855, -0.49151068925857544, 0.9909722805023193, -0.4725787341594696, 0.8878626823425293, -0.2580359876155853, 0.09527665376663208, -0.27793118357658386, -0.2763363718986511, 0.20336689054965973, 0.5065229535102844, 0.40322279930114746, 0.30199190974235535, 0.11935875564813614, -0.5752319693565369, -0.4522685706615448, 0.7752515077590942, -0.744281530380249, -0.4025290310382843, -0.3438243567943573, -0.6169840693473816, -0.22992832958698273, 0.3623504042625427, 0.5871000289916992, 0.3092205226421356, -0.04267389699816704, 0.3732767105102539, 0.8682435750961304, -0.4954477846622467, -0.16336074471473694, 0.5186650156974792, -0.33156493306159973, -0.652085542678833, 0.9599977135658264, 0.12665721774101257, 0.056582096964120865, 0.5896918773651123, 0.24317742884159088, -0.06635783612728119, -0.4823227524757385, -0.43418556451797485, 0.6062703728675842, -0.6708236932754517, -0.3483760356903076, -1.0160317420959473, -0.5800516605377197, -0.4909927546977997, -0.246040940284729, -0.27505260705947876, -0.3447960913181305, -0.4541681110858917, 0.035263922065496445, 0.7099436521530151, 0.36827754974365234, -0.0995209589600563, -0.11034327000379562, -1.0949679613113403, 0.44286882877349854, 0.10500557720661163, 0.5189229846000671, -0.23889479041099548, -0.42062637209892273, -0.8173967599868774, 0.22095540165901184, 0.011509189382195473, -0.9000357985496521, 0.4488975405693054, -0.08366019278764725, 0.737295925617218, 0.5140610337257385, 0.17768055200576782, 0.6569772362709045, -0.3389780819416046, 0.7934993505477905, 0.2518036663532257, -0.824353814125061, 0.4030044972896576, -0.02982230670750141, 0.3964129090309143, 0.5591874122619629, 0.5425136089324951, -0.842258095741272, -0.30664464831352234, -0.6048771142959595, -1.217993974685669, 0.36145731806755066, -0.26533588767051697, 0.32103052735328674, -0.0008443809929303825, 0.06177765130996704, 0.240083247423172, 0.07679873704910278, -0.9623845815658569, -0.6218098998069763, -0.1515023559331894, -0.2694840431213379, 0.24887970089912415, -0.22053465247154236, -0.30560052394866943, -0.742699921131134, 0.7004033923149109, -0.22951632738113403, 0.5367243885993958, 0.510986328125, -0.348886638879776, 0.038898978382349014, 0.31438830494880676, 0.6609081029891968, 0.28010445833206177, -0.05089544132351875, -0.074165478348732, 0.10256409645080566, -0.633948802947998, -0.33119890093803406, 0.5931544899940491, -0.19576434791088104, 0.20335730910301208, 0.2576090693473816, 0.8159908056259155, 0.49040696024894714, -0.5085445642471313, 0.6051127314567566, 0.054289478808641434, -0.34264180064201355, -0.12146012485027313, -0.12408820539712906, 0.23795129358768463, 0.19917720556259155, 0.24058149755001068, 0.024449508637189865, 0.3518342971801758, 0.16224128007888794, 0.07313256710767746, 0.12442176043987274, -0.5668882131576538, -0.07295951247215271, 0.7506116628646851, 0.22488178312778473, 0.07495208829641342, 0.19429820775985718, -0.493608295917511, -0.7087798714637756, 0.4459381103515625, 0.5118387937545776, 0.8928360939025879, -0.06831918656826019, 0.01875605434179306, 0.4356711804866791, 0.17848838865756989, 0.30908942222595215, 0.7384729981422424, 0.15463624894618988, -0.869876503944397, -0.2707863450050354, -0.3391372263431549, -0.18683958053588867, -0.0717715322971344, -0.5961686372756958, 0.2022736519575119, -0.09874747693538666, 0.016018351539969444, -0.07283879816532135, 0.051708489656448364, -0.4962916970252991, 0.1617489755153656, -0.17322589457035065, 1.1136512756347656, -0.6042249798774719, 1.1209347248077393, 1.2209128141403198, -0.6469569206237793, -0.9799153804779053, 0.09254802763462067, -0.17279617488384247, -0.6503821015357971, 0.47400036454200745, -0.08970452845096588, 0.16352036595344543, 0.11702579259872437, -0.3436259925365448, -0.7709932327270508, 1.5082286596298218, 0.08038381487131119, -0.27156996726989746, -0.28109243512153625, 0.08720646053552628, 0.7239857316017151, -0.5450534224510193, -0.12617269158363342, 0.23866422474384308, 0.4643794000148773, -0.11788498610258102, -0.9685943722724915, 0.34568658471107483, -0.754414439201355, 0.23583608865737915, 0.05113556608557701, -0.5239540338516235, 0.7675009965896606, -0.3289356827735901, -0.1264926940202713, -0.13517048954963684, 0.5534303784370422, 0.33107462525367737, 0.39469802379608154, 0.2153589278459549, 0.7559814453125, 0.581777811050415, -0.043667521327733994, 0.9686822891235352, -0.8267075419425964, 0.46076640486717224, 0.8519760966300964, -0.11472707986831665, 0.42182639241218567, 0.5712804198265076, -0.3684643805027008, 0.8219271302223206, 0.4905140697956085, -0.22171726822853088, 0.47297435998916626, 0.11980611085891724, -0.046992477029561996, 0.14474454522132874, 0.08759158849716187, -0.8895739912986755, 0.3369480073451996, 0.41103044152259827, -0.6942644119262695, 0.0672788992524147, 0.08669020980596542, 0.3216373920440674, -0.053499333560466766, -0.22082947194576263, 0.7281686663627625, -0.006502329371869564, -0.15573684871196747, 0.8539658188819885, 0.16287754476070404, 1.074345588684082, -0.6635590195655823, 0.06811252981424332, -0.11784490197896957, -0.1423313170671463, -0.3940877318382263, -0.5144778490066528, 0.24452365934848785, -0.2986341416835785, -0.062200747430324554, 0.3763139247894287, 0.6413356065750122, -0.8293319940567017, -0.4301149249076843, 0.5895571112632751, 0.6829230785369873, 0.02766742743551731, 0.5500733256340027, -0.9292845129966736, -0.43462324142456055, 0.23166628181934357, -0.23920944333076477, 0.21909186244010925, 0.5590563416481018, -0.06192277371883392, 0.629863440990448, 0.5284757614135742, 0.3128170073032379, -0.04221115633845329, 0.19794923067092896, 1.0050443410873413, -0.6501371264457703, -0.6653756499290466, -0.6638093590736389, 0.7004588842391968, -0.060274627059698105, -0.4105975925922394, 0.6042100191116333, 0.8729929327964783, 1.014625906944275, -0.43032515048980713, 0.6691120266914368, -0.23534275591373444, 0.5203978419303894, -0.5215356945991516, 1.398337721824646, -0.9042244553565979, 0.2237492948770523, -0.2789308428764343, -0.31964510679244995, -0.8195156455039978, 0.3542780876159668, -0.08304181694984436, 0.1797606348991394, 0.9903878569602966, 1.0614439249038696, -0.009423252195119858, -0.3204386830329895, 0.4250820279121399, 0.279640793800354, -0.14590579271316528, 0.6896256804466248, -0.054628290235996246, -0.5328210592269897, 0.48873740434646606, -0.4436810314655304, -0.3097952604293823, -0.3730406165122986, -0.6757100224494934, -0.7576428651809692, -0.6844522356987, -0.5278741121292114, -0.3972887694835663, 0.0361521914601326, 1.066740870475769, 0.5286016464233398, -1.0058097839355469, -0.1624055802822113, 0.12105881422758102, 0.19112567603588104, -0.20961301028728485, -0.24348296225070953, 0.6871885061264038, -0.17503981292247772, -0.5484673380851746, 0.0026530062314122915, 0.06036197021603584, -0.05670919641852379, -0.15781967341899872, -0.4267389476299286, -0.3318880796432495, -0.09774661064147949, 0.2500994801521301, 0.333758682012558, -0.7991379499435425, 0.02284947969019413, 0.16029849648475647, -0.6047679781913757, 0.264322429895401, 0.5512572526931763, -0.6472747921943665, 0.7682421207427979, 0.7105656266212463, 0.7597568035125732, 0.10669104754924774, -0.4619036316871643, 0.42040860652923584, -0.6597349047660828, -0.11429978907108307, 0.24498488008975983, 0.5948964953422546, 0.3763614594936371, -0.46901607513427734, 0.630050778388977, 0.4098048806190491, -0.48585161566734314, -0.6156028509140015, 0.12877985835075378, -1.1374088525772095, -0.24323561787605286, 1.262771487236023, -0.2487483024597168, -0.07201890647411346, -0.08997070044279099, -0.23995254933834076, 0.8690056800842285, -0.3203355669975281, 0.8195582032203674, 0.21138226985931396, 0.07631385326385498, -0.06166691705584526, -0.3189498782157898, 0.48413795232772827, 0.24783499538898468, -0.9185975790023804, -0.4148659408092499, 0.17586693167686462, 0.3068873882293701, 0.3432619869709015, 0.49150004982948303, -0.6142353415489197, 0.47306644916534424, -0.15188291668891907, 0.5799954533576965, -0.27463677525520325, 0.17580440640449524, -0.5273990631103516, -0.2225015014410019, -0.18608394265174866, -0.17872722446918488 ]
facebook/detr-resnet-50
facebook
"2023-10-17T17:18:59Z"
517,878
349
transformers
[ "transformers", "pytorch", "detr", "object-detection", "vision", "dataset:coco", "arxiv:2005.12872", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
object-detection
"2022-03-02T23:29:05Z"
--- license: apache-2.0 tags: - object-detection - vision datasets: - coco widget: - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/savanna.jpg example_title: Savanna - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/football-match.jpg example_title: Football Match - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/airport.jpg example_title: Airport --- # DETR (End-to-End Object Detection) model with ResNet-50 backbone DEtection TRansformer (DETR) model trained end-to-end on COCO 2017 object detection (118k annotated images). It was introduced in the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Carion et al. and first released in [this repository](https://github.com/facebookresearch/detr). Disclaimer: The team releasing DETR did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The DETR model is an encoder-decoder transformer with a convolutional backbone. Two heads are added on top of the decoder outputs in order to perform object detection: a linear layer for the class labels and a MLP (multi-layer perceptron) for the bounding boxes. The model uses so-called object queries to detect objects in an image. Each object query looks for a particular object in the image. For COCO, the number of object queries is set to 100. The model is trained using a "bipartite matching loss": one compares the predicted classes + bounding boxes of each of the N = 100 object queries to the ground truth annotations, padded up to the same length N (so if an image only contains 4 objects, 96 annotations will just have a "no object" as class and "no bounding box" as bounding box). The Hungarian matching algorithm is used to create an optimal one-to-one mapping between each of the N queries and each of the N annotations. Next, standard cross-entropy (for the classes) and a linear combination of the L1 and generalized IoU loss (for the bounding boxes) are used to optimize the parameters of the model. ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/detr_architecture.png) ## Intended uses & limitations You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=facebook/detr) to look for all available DETR models. ### How to use Here is how to use this model: ```python from transformers import DetrImageProcessor, DetrForObjectDetection import torch from PIL import Image import requests url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = Image.open(requests.get(url, stream=True).raw) # you can specify the revision tag if you don't want the timm dependency processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50", revision="no_timm") model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50", revision="no_timm") inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) # convert outputs (bounding boxes and class logits) to COCO API # let's only keep detections with score > 0.9 target_sizes = torch.tensor([image.size[::-1]]) results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.9)[0] for score, label, box in zip(results["scores"], results["labels"], results["boxes"]): box = [round(i, 2) for i in box.tolist()] print( f"Detected {model.config.id2label[label.item()]} with confidence " f"{round(score.item(), 3)} at location {box}" ) ``` This should output: ``` Detected remote with confidence 0.998 at location [40.16, 70.81, 175.55, 117.98] Detected remote with confidence 0.996 at location [333.24, 72.55, 368.33, 187.66] Detected couch with confidence 0.995 at location [-0.02, 1.15, 639.73, 473.76] Detected cat with confidence 0.999 at location [13.24, 52.05, 314.02, 470.93] Detected cat with confidence 0.999 at location [345.4, 23.85, 640.37, 368.72] ``` Currently, both the feature extractor and model support PyTorch. ## Training data The DETR model was trained on [COCO 2017 object detection](https://cocodataset.org/#download), a dataset consisting of 118k/5k annotated images for training/validation respectively. ## Training procedure ### Preprocessing The exact details of preprocessing of images during training/validation can be found [here](https://github.com/google-research/vision_transformer/blob/master/vit_jax/input_pipeline.py). Images are resized/rescaled such that the shortest side is at least 800 pixels and the largest side at most 1333 pixels, and normalized across the RGB channels with the ImageNet mean (0.485, 0.456, 0.406) and standard deviation (0.229, 0.224, 0.225). ### Training The model was trained for 300 epochs on 16 V100 GPUs. This takes 3 days, with 4 images per GPU (hence a total batch size of 64). ## Evaluation results This model achieves an AP (average precision) of **42.0** on COCO 2017 validation. For more details regarding evaluation results, we refer to table 1 of the original paper. ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2005-12872, author = {Nicolas Carion and Francisco Massa and Gabriel Synnaeve and Nicolas Usunier and Alexander Kirillov and Sergey Zagoruyko}, title = {End-to-End Object Detection with Transformers}, journal = {CoRR}, volume = {abs/2005.12872}, year = {2020}, url = {https://arxiv.org/abs/2005.12872}, archivePrefix = {arXiv}, eprint = {2005.12872}, timestamp = {Thu, 28 May 2020 17:38:09 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-2005-12872.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.7135391235351562, -0.593672513961792, -0.0013379915617406368, -0.01505149994045496, -0.26468315720558167, -0.06312960386276245, -0.1785043329000473, -0.7247322797775269, 0.09809824824333191, 0.3453364074230194, -0.5729678869247437, -0.6126633286476135, -0.5764829516410828, 0.28340619802474976, -0.47142088413238525, 0.7928226590156555, 0.14450408518314362, -0.3261910378932953, -0.19877928495407104, -0.0788838192820549, -0.34543323516845703, -0.5067819356918335, -0.7480234503746033, 0.01545685064047575, 0.2986915707588196, 0.3807904124259949, 0.5580623745918274, 0.496517539024353, 0.8260331749916077, 0.3357986509799957, -0.2177029699087143, 0.16704198718070984, -0.4327850043773651, -0.3478923738002777, -0.2485131025314331, -0.509898841381073, -0.20378687977790833, 0.018397217616438866, 0.3194776177406311, 0.0583997443318367, 0.13965311646461487, 0.3356625735759735, -0.08594387024641037, 0.6127912998199463, -0.6419147253036499, 0.24553388357162476, -0.5390361547470093, 0.18233415484428406, -0.08371192961931229, -0.04156497120857239, -0.5289217233657837, -0.0501253716647625, -0.026998108252882957, -0.39135777950286865, 0.6935860514640808, 0.19185557961463928, 1.469138264656067, 0.22099660336971283, -0.07176795601844788, -0.12419351935386658, -0.5472099184989929, 0.7498631477355957, -0.4350145161151886, 0.5072668194770813, 0.4049350917339325, 0.4194735884666443, -0.06437169760465622, -0.8082199096679688, -0.6076250672340393, -0.3179318904876709, -0.22270362079143524, 0.13596504926681519, -0.3577175438404083, -0.14671210944652557, 0.41448962688446045, 0.4541414976119995, -0.4594164788722992, -0.10921400040388107, -0.6774054169654846, -0.2726402282714844, 0.8681313991546631, -0.075791135430336, 0.21673110127449036, -0.06864617764949799, -0.3482727110385895, -0.38605743646621704, -0.26602330803871155, 0.40320658683776855, 0.42097941040992737, 0.09731385856866837, -0.40905165672302246, 0.6372612118721008, -0.331976979970932, 0.7023259997367859, 0.38843974471092224, -0.09713876247406006, 0.4108361005783081, -0.2719402611255646, -0.20903120934963226, 0.09056448936462402, 1.1319512128829956, 0.3931724727153778, 0.38443320989608765, 0.05138839781284332, -0.10557901859283447, 0.15630196034908295, 0.18784856796264648, -0.933792233467102, -0.3734778165817261, 0.1537126898765564, -0.4767538011074066, -0.4786284267902374, 0.2815190553665161, -0.599858820438385, 0.038439568132162094, -0.0007187421433627605, 0.15983054041862488, -0.36615726351737976, -0.31258636713027954, 0.27761033177375793, -0.0022485589142888784, 0.562023401260376, 0.12684166431427002, -0.6538020372390747, 0.21841619908809662, 0.27866172790527344, 0.9210848808288574, -0.044591955840587616, -0.01372515968978405, -0.3743257224559784, -0.294310986995697, -0.4253714680671692, 0.8606765866279602, -0.2664479911327362, -0.3884558379650116, -0.2787512540817261, 0.5572785139083862, -0.07708863168954849, -0.5572664141654968, 0.7144622802734375, -0.38538697361946106, 0.08808978646993637, -0.28008219599723816, -0.08052457123994827, -0.4812886118888855, 0.4852645993232727, -0.6190680265426636, 1.2697447538375854, 0.40859073400497437, -0.8941552042961121, 0.3104916512966156, -0.4206576943397522, -0.31802046298980713, -0.2541857659816742, 0.08290936797857285, -0.8463060259819031, 0.05021869018673897, 0.49947497248649597, 0.4768223166465759, -0.3810688853263855, 0.23814602196216583, -0.47113847732543945, -0.4721994400024414, 0.4073486626148224, -0.47456249594688416, 1.0489833354949951, 0.17817936837673187, -0.24336810410022736, 0.09045615792274475, -0.6361055374145508, -0.2945161759853363, 0.45413488149642944, -0.1373814046382904, 0.24534855782985687, -0.2025488168001175, 0.11234328895807266, 0.5232616066932678, 0.15296633541584015, -0.6718646287918091, 0.04714735969901085, -0.1328774094581604, 0.26412734389305115, 0.5010204911231995, -0.10604694485664368, 0.18340732157230377, -0.25707778334617615, 0.41367727518081665, 0.30800095200538635, 0.5772513151168823, -0.2214587926864624, -0.6265872120857239, -0.8404648900032043, -0.34824490547180176, -0.05379986763000488, 0.3378474712371826, -0.3503803610801697, 0.7617002725601196, -0.25732699036598206, -0.41496556997299194, -0.47443050146102905, -0.1258031278848648, 0.26101768016815186, 0.5981356501579285, 0.5331670045852661, -0.7086714506149292, -0.6874228715896606, -0.9386698007583618, 0.2833300530910492, 0.002324623754248023, 0.0014018673682585359, 0.15266504883766174, 0.8241865038871765, -0.17030061781406403, 1.1723456382751465, -0.5687538981437683, -0.5946524143218994, -0.1968097984790802, -0.2551560401916504, 0.2631012499332428, 0.5421844720840454, 0.7401704788208008, -0.9562528133392334, -0.5203317999839783, -0.025852715596556664, -1.0161229372024536, 0.16941238939762115, 0.1862345039844513, -0.21305257081985474, 0.2675328254699707, 0.37647050619125366, -0.5749461650848389, 0.8639727830886841, 0.21623151004314423, -0.07180839776992798, 0.684686541557312, 0.05365141108632088, 0.1037265807390213, -0.9652055501937866, 0.1930544078350067, 0.2580513656139374, -0.22555527091026306, -0.5670338273048401, 0.10551929473876953, 0.07801136374473572, -0.04385031387209892, -0.7006228566169739, 0.27627938985824585, -0.49942028522491455, -0.1331823617219925, -0.22943632304668427, 0.02566828951239586, 0.15890055894851685, 0.7177681922912598, 0.395698219537735, 0.41742971539497375, 0.7177932858467102, -0.5677598118782043, 0.4904354214668274, 0.21984650194644928, -0.3447548747062683, 0.6876651048660278, -0.7376404404640198, 0.21001558005809784, -0.20293289422988892, 0.3419348895549774, -1.0339573621749878, -0.227015882730484, 0.6882739663124084, -0.629702091217041, 0.4897696375846863, -0.3620852530002594, -0.3694426715373993, -1.036791443824768, -0.41759538650512695, 0.44281837344169617, 0.38600438833236694, -0.6190398335456848, 0.5435238480567932, 0.0216215830296278, 0.5328505039215088, -0.8531253337860107, -0.8206263780593872, -0.07218628376722336, -0.11326685547828674, -0.5817490816116333, 0.2938316762447357, -0.12295377999544144, 0.12839268147945404, 0.08123721927404404, -0.28913426399230957, 0.015961341559886932, -0.11011792719364166, 0.35269808769226074, 0.39736828207969666, -0.052819591015577316, -0.29167404770851135, -0.23285143077373505, -0.2516652047634125, 0.08741992712020874, -0.20238934457302094, 0.7936385869979858, -0.34725216031074524, -0.47892624139785767, -0.8592943549156189, -0.11891043186187744, 0.5237451195716858, -0.46066081523895264, 0.7132576704025269, 1.0159327983856201, -0.546714186668396, 0.24203956127166748, -0.6902952194213867, -0.22795991599559784, -0.5332699418067932, 0.357187956571579, -0.5270496010780334, -0.40574198961257935, 0.7737419605255127, 0.39690476655960083, -0.11002577841281891, 0.6336254477500916, 0.40951231122016907, 0.1672331690788269, 0.9399181604385376, 0.4662109911441803, -0.13634169101715088, 0.4555407762527466, -0.9491606950759888, 0.3284483253955841, -1.088969111442566, -0.7608131766319275, -0.3935285210609436, -0.3207255005836487, -0.4653010964393616, -0.638866662979126, 0.12873238325119019, 0.3957994282245636, -0.38413771986961365, 0.7516254186630249, -1.0533628463745117, 0.2367049902677536, 0.5565785765647888, 0.579164445400238, 0.1644059270620346, 0.09199277311563492, 0.1044066995382309, 0.14053477346897125, -0.4979521930217743, -0.16711756587028503, 0.9578505158424377, 0.4131981432437897, 0.6783043146133423, -0.21460707485675812, 0.4399093985557556, 0.0750967338681221, 0.40831872820854187, -0.852164626121521, 0.6542631387710571, 0.0293909702450037, -0.7531828880310059, 0.03575631603598595, -0.1471192091703415, -0.7730477452278137, 0.17352008819580078, -0.11703643947839737, -0.992324948310852, 0.6452928185462952, -0.005365145392715931, -0.06396327912807465, 0.5475690364837646, -0.40215936303138733, 0.8929377198219299, -0.3181391656398773, -0.4858441650867462, 0.204204261302948, -0.8408811092376709, 0.5332521796226501, -0.019575132057070732, -0.15637539327144623, -0.26270508766174316, 0.4724298119544983, 0.7468153834342957, -0.359743595123291, 0.7191030383110046, -0.04502929374575615, 0.0409376360476017, 0.8242745995521545, 0.009208686649799347, 0.5163975358009338, 0.01544957421720028, -0.040890321135520935, 0.5622390508651733, -0.21790699660778046, -0.18510571122169495, -0.3075028359889984, 0.40577805042266846, -0.6067705154418945, -0.49515366554260254, -0.49700966477394104, -0.6972916126251221, 0.4270400106906891, 0.12813454866409302, 0.7175121307373047, 0.3461882174015045, 0.1625034064054489, 0.36400479078292847, 0.5535959601402283, -0.4834698736667633, 0.5171183347702026, 0.19047988951206207, -0.2541440725326538, -0.19314256310462952, 0.8313269019126892, -0.07446910440921783, 0.18553929030895233, 0.6240450143814087, 0.1425204575061798, -0.6248204112052917, -0.17998428642749786, -0.2453109323978424, 0.3438911437988281, -0.6728906631469727, -0.5087735652923584, -0.7964543700218201, -0.4620833992958069, -0.5430652499198914, -0.25616517663002014, -0.5725290179252625, -0.03921572118997574, -0.6330671310424805, -0.15039348602294922, 0.48860666155815125, 0.2718238830566406, -0.12374614179134369, 0.4120185971260071, -0.32701054215431213, 0.30909866094589233, 0.02951516956090927, 0.2150198072195053, -0.08502595871686935, -0.7219003438949585, -0.13878269493579865, 0.2816530466079712, -0.4933474361896515, -0.7034706473350525, 0.5397036671638489, -0.03547319769859314, 0.36087945103645325, 0.7716101408004761, 0.16201940178871155, 0.784002959728241, 0.017591197043657303, 0.6628442406654358, 0.4850653111934662, -0.80356764793396, 0.6357448697090149, -0.002665111795067787, 0.10147427767515182, 0.21818038821220398, 0.3102395236492157, -0.33989188075065613, -0.27739381790161133, -0.5687834024429321, -0.6538167595863342, 0.971998929977417, 0.22292758524417877, -0.17055107653141022, -0.05869127810001373, 0.20391172170639038, -0.3863505423069, 0.069607213139534, -0.7924069166183472, -0.285823255777359, -0.4056207537651062, -0.2703365683555603, -0.09529274702072144, -0.09589042514562607, 0.07311949133872986, -0.5855823755264282, 0.5225189924240112, -0.06998860090970993, 0.701921284198761, 0.37667545676231384, -0.2322206050157547, -0.1202772781252861, -0.3147306740283966, 0.44447991251945496, 0.34244537353515625, -0.5041832327842712, 0.05001631751656532, 0.21833153069019318, -0.5335245132446289, 0.09757203608751297, 0.11024845391511917, -0.0685650035738945, -0.03680641949176788, 0.3500889539718628, 0.7443541288375854, 0.05886893346905708, -0.4232659637928009, 0.5905070304870605, 0.04102211073040962, -0.27558812499046326, -0.40711528062820435, 0.0993737131357193, -0.11621909588575363, 0.1806344836950302, 0.46828657388687134, 0.25884097814559937, -0.0212234016507864, -0.45818400382995605, 0.37055936455726624, 0.4545475244522095, -0.527484118938446, -0.3979427218437195, 1.0603886842727661, -0.3438040614128113, -0.3332275152206421, 0.9132713675498962, -0.3188592791557312, -0.6523003578186035, 1.1038154363632202, 0.615031361579895, 0.7978869080543518, -0.315159410238266, 0.2069285362958908, 0.704054057598114, 0.46396464109420776, -0.2574000954627991, -0.06611164659261703, -0.08712057769298553, -0.8366178870201111, -0.00683399336412549, -0.6894496083259583, 0.07580980658531189, 0.15296749770641327, -0.8898918032646179, 0.5583584308624268, -0.33732330799102783, -0.26832783222198486, -0.08993389457464218, 0.10933583974838257, -1.1196943521499634, 0.3972952365875244, -0.04297270253300667, 0.9653471112251282, -0.7581665515899658, 0.6053865551948547, 0.3566591739654541, -0.7563652992248535, -0.8115442395210266, -0.28610026836395264, -0.10113367438316345, -0.8826367259025574, 0.6436481475830078, 0.7247995138168335, -0.0841066762804985, 0.060808852314949036, -0.7516441941261292, -0.8798053860664368, 1.2675658464431763, 0.31009989976882935, -0.6010327339172363, 0.09325654059648514, 0.09275837242603302, 0.44821664690971375, -0.36810609698295593, 0.6363257765769958, 0.5141850709915161, 0.3552802503108978, 0.3768623471260071, -0.54212486743927, 0.15176059305667877, -0.20042301714420319, 0.05497664585709572, 0.03113831952214241, -0.737061619758606, 0.7588424682617188, -0.44902560114860535, -0.251274436712265, 0.0023373784497380257, 0.6864811182022095, 0.29672449827194214, 0.4361383616924286, 0.45920372009277344, 0.808695375919342, 0.46017059683799744, -0.2601216435432434, 1.0912569761276245, -0.3582693338394165, 0.7884646058082581, 0.7802337408065796, 0.018358496949076653, 0.5447818636894226, 0.21095885336399078, -0.2728448212146759, 0.4366937577724457, 0.9805081486701965, -0.36482104659080505, 0.4675745964050293, 0.20867766439914703, -0.10839337855577469, -0.02330964244902134, -0.3101649284362793, -0.42771613597869873, 0.4261329472064972, 0.3707706034183502, -0.4354378879070282, -0.05833471566438675, 0.25540822744369507, -0.05599747598171234, -0.34378141164779663, -0.1323966085910797, 0.26900428533554077, -0.028306467458605766, -0.42259901762008667, 0.7732111215591431, 0.0011169790523126721, 0.7071022987365723, -0.3349779546260834, 0.09330680221319199, -0.2524428367614746, 0.3033835291862488, -0.40635091066360474, -0.7521108984947205, 0.2883334159851074, -0.06767498701810837, -0.0056559550575912, 0.25725245475769043, 0.8266036510467529, -0.3240777552127838, -0.8063328862190247, 0.4746592044830322, -0.05855707451701164, 0.4502471387386322, -0.2406773418188095, -0.7498512864112854, 0.3755796551704407, -0.03604116290807724, -0.42577216029167175, 0.03689295053482056, 0.10118232667446136, -0.16097918152809143, 0.8547869920730591, 0.8361068367958069, -0.3329022526741028, 0.1394326090812683, -0.05456532537937164, 0.9160974621772766, -0.4014218747615814, -0.16395343840122223, -0.7281751036643982, 0.6119905710220337, -0.2152511030435562, -0.17521561682224274, 0.5585022568702698, 0.9280098676681519, 1.1762255430221558, -0.15987634658813477, 0.40375757217407227, -0.41170230507850647, -0.14733396470546722, -0.07745260000228882, 0.3617294430732727, -0.5120375752449036, 0.14387547969818115, -0.27714839577674866, -0.9909244775772095, -0.39276283979415894, 0.9256585836410522, -0.21956446766853333, 0.23718616366386414, 0.6221031546592712, 1.1462347507476807, -0.453669935464859, -0.23530495166778564, 0.2582584619522095, -0.007435398176312447, 0.37193599343299866, 0.6410384774208069, 0.5591403245925903, -0.9222666621208191, 0.633266031742096, -0.7822226881980896, -0.04240521416068077, -0.4359430968761444, -0.6075339913368225, -1.0317978858947754, -0.5591534376144409, -0.5161566734313965, -0.46904924511909485, -0.050940968096256256, 0.5401914715766907, 1.0007048845291138, -0.7901675701141357, -0.09853152930736542, -0.3362559378147125, 0.17064537107944489, -0.48830872774124146, -0.33918505907058716, 0.6265470385551453, 0.11523764580488205, -0.9317731857299805, 0.03461913391947746, 0.139369934797287, 0.10843165218830109, -0.09431508183479309, -0.1742730289697647, -0.41093745827674866, -0.24610929191112518, 0.6004064679145813, 0.3650115430355072, -0.638108491897583, -0.45091164112091064, 0.14451651275157928, 0.02990039810538292, 0.2768110930919647, 0.47942644357681274, -0.684205949306488, 0.5588117837905884, 0.419465571641922, 0.15723149478435516, 0.9688467383384705, 0.2450423389673233, -0.04655269905924797, -0.6462259888648987, 0.4643608629703522, -0.028861381113529205, 0.4107486605644226, 0.4759661853313446, -0.5255821943283081, 0.7887771725654602, 0.5772130489349365, -0.47203928232192993, -0.9181212782859802, 0.09262898564338684, -1.3279378414154053, -0.14548292756080627, 0.834420919418335, -0.23112621903419495, -0.5199293494224548, -0.028676152229309082, -0.19396018981933594, 0.6813533902168274, -0.3212064802646637, 0.6346404552459717, 0.26653966307640076, 0.004358705598860979, -0.5943717956542969, -0.3941103219985962, 0.12181778252124786, -0.21609538793563843, -0.6346663236618042, -0.4165095388889313, 0.18037423491477966, 0.523840606212616, 0.45696333050727844, 0.5796171426773071, -0.2579643130302429, 0.15279370546340942, 0.06276346743106842, 0.3770447075366974, -0.29464367032051086, -0.4889107644557953, -0.14799465239048004, -0.029686124995350838, -0.4266931116580963, -0.699952244758606 ]
prajjwal1/bert-tiny
prajjwal1
"2021-10-27T18:29:01Z"
516,471
73
transformers
[ "transformers", "pytorch", "BERT", "MNLI", "NLI", "transformer", "pre-training", "en", "arxiv:1908.08962", "arxiv:2110.01518", "license:mit", "endpoints_compatible", "region:us" ]
null
"2022-03-02T23:29:05Z"
--- language: - en license: - mit tags: - BERT - MNLI - NLI - transformer - pre-training --- The following model is a Pytorch pre-trained model obtained from converting Tensorflow checkpoint found in the [official Google BERT repository](https://github.com/google-research/bert). This is one of the smaller pre-trained BERT variants, together with [bert-mini](https://huggingface.co/prajjwal1/bert-mini) [bert-small](https://huggingface.co/prajjwal1/bert-small) and [bert-medium](https://huggingface.co/prajjwal1/bert-medium). They were introduced in the study `Well-Read Students Learn Better: On the Importance of Pre-training Compact Models` ([arxiv](https://arxiv.org/abs/1908.08962)), and ported to HF for the study `Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics` ([arXiv](https://arxiv.org/abs/2110.01518)). These models are supposed to be trained on a downstream task. If you use the model, please consider citing both the papers: ``` @misc{bhargava2021generalization, title={Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics}, author={Prajjwal Bhargava and Aleksandr Drozd and Anna Rogers}, year={2021}, eprint={2110.01518}, archivePrefix={arXiv}, primaryClass={cs.CL} } @article{DBLP:journals/corr/abs-1908-08962, author = {Iulia Turc and Ming{-}Wei Chang and Kenton Lee and Kristina Toutanova}, title = {Well-Read Students Learn Better: The Impact of Student Initialization on Knowledge Distillation}, journal = {CoRR}, volume = {abs/1908.08962}, year = {2019}, url = {http://arxiv.org/abs/1908.08962}, eprinttype = {arXiv}, eprint = {1908.08962}, timestamp = {Thu, 29 Aug 2019 16:32:34 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-1908-08962.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ``` Config of this model: - `prajjwal1/bert-tiny` (L=2, H=128) [Model Link](https://huggingface.co/prajjwal1/bert-tiny) Other models to check out: - `prajjwal1/bert-mini` (L=4, H=256) [Model Link](https://huggingface.co/prajjwal1/bert-mini) - `prajjwal1/bert-small` (L=4, H=512) [Model Link](https://huggingface.co/prajjwal1/bert-small) - `prajjwal1/bert-medium` (L=8, H=512) [Model Link](https://huggingface.co/prajjwal1/bert-medium) Original Implementation and more info can be found in [this Github repository](https://github.com/prajjwal1/generalize_lm_nli). Twitter: [@prajjwal_1](https://twitter.com/prajjwal_1)
[ -0.43095484375953674, -0.5704768896102905, 0.4629068076610565, -0.020036574453115463, -0.17093269526958466, -0.2865891456604004, -0.30657505989074707, -0.442318856716156, 0.110145203769207, 0.17693759500980377, -0.7482692003250122, -0.34064286947250366, -0.5225485563278198, -0.1486615389585495, -0.3607151210308075, 1.2641105651855469, 0.08596505224704742, 0.06431492418050766, -0.1813184916973114, -0.24470223486423492, -0.1664263755083084, -0.5690770745277405, -0.5852354168891907, -0.5102735757827759, 0.7544901967048645, -0.02535884641110897, 0.48925215005874634, 0.2100142538547516, 0.635269284248352, 0.27673840522766113, -0.4031815528869629, -0.1016974225640297, -0.5050086379051208, -0.2608528435230255, 0.05242045223712921, -0.4483904242515564, -0.591741681098938, 0.10922188311815262, 0.7580404281616211, 0.9495498538017273, -0.1227521002292633, 0.3674273192882538, 0.2929394841194153, 0.620498538017273, -0.5835481882095337, -0.04731030389666557, -0.32297202944755554, -0.21885228157043457, -0.16410396993160248, 0.2805081009864807, -0.5620550513267517, -0.33925169706344604, 0.5225025415420532, -0.5436620712280273, 0.562348484992981, -0.02043428085744381, 1.4165198802947998, 0.1470685750246048, -0.2235046774148941, -0.12575647234916687, -0.6540139317512512, 0.9897700548171997, -0.9727678894996643, 0.5275084376335144, 0.0319686084985733, 0.26572468876838684, -0.018796423450112343, -0.9951788187026978, -0.5894500017166138, -0.0689036175608635, -0.4618932902812958, 0.1560841202735901, -0.38358956575393677, 0.1628398299217224, 0.3989141285419464, 0.38592231273651123, -0.6016594767570496, 0.07024204730987549, -0.5889151096343994, -0.26685574650764465, 0.4102093279361725, -0.025555534288287163, -0.030097605660557747, -0.4070507884025574, -0.3545348346233368, -0.45032936334609985, -0.5957836508750916, 0.2526704967021942, 0.5453165769577026, 0.3780800700187683, -0.40460315346717834, 0.421243816614151, 0.009197919629514217, 0.8537669777870178, 0.13820087909698486, -0.031582772731781006, 0.4399920403957367, -0.6712556481361389, -0.14321380853652954, -0.21076476573944092, 0.8075290322303772, 0.08885636925697327, 0.12120484560728073, -0.07217345386743546, -0.09731073677539825, -0.40814244747161865, 0.169048011302948, -1.055138349533081, -0.4239458441734314, 0.17615602910518646, -0.7152870297431946, -0.030912209302186966, 0.17797160148620605, -0.6370577216148376, -0.0538526326417923, -0.34139272570610046, 0.5242727994918823, -0.5342896580696106, -0.28305014967918396, -0.1473466455936432, -0.019702760502696037, 0.4267471134662628, 0.3972398340702057, -0.667432963848114, 0.07273054867982864, 0.47522905468940735, 0.9475601315498352, 0.09760984778404236, -0.24074923992156982, 0.023023243993520737, 0.059627141803503036, -0.19709530472755432, 0.4259243905544281, -0.22164887189865112, -0.19270993769168854, -0.07662894576787949, -0.03541860356926918, -0.16001227498054504, -0.3594823181629181, 0.6930526494979858, -0.522459864616394, 0.3578347861766815, -0.36181989312171936, -0.5593963861465454, -0.2703843414783478, 0.18615856766700745, -0.6348942518234253, 1.028560757637024, 0.02041652984917164, -0.9720770120620728, 0.5321235060691833, -0.6583190560340881, -0.22046957910060883, -0.18662700057029724, 0.14526858925819397, -0.7152189612388611, -0.017797676846385002, 0.20684371888637543, 0.5239618420600891, -0.18617059290409088, 0.3438637852668762, -0.4765990078449249, -0.35460197925567627, -0.09906265884637833, -0.08187857270240784, 1.2189875841140747, 0.3058086037635803, -0.06435486674308777, 0.2081984579563141, -0.8456992506980896, 0.10294745117425919, 0.17789369821548462, -0.393119752407074, -0.4972890317440033, -0.1214880719780922, -0.0028589938301593065, 0.022383110597729683, 0.37664341926574707, -0.41706085205078125, 0.35511693358421326, -0.3642679452896118, 0.423307329416275, 0.6443448662757874, 0.073271244764328, 0.4904182553291321, -0.534879744052887, 0.09361513704061508, 0.16375693678855896, 0.3346586227416992, 0.030639201402664185, -0.5106868743896484, -1.0374903678894043, -0.5245940089225769, 0.5763932466506958, 0.28994086384773254, -0.5729623436927795, 0.6162333488464355, -0.3114549219608307, -0.7123685479164124, -0.6181931495666504, 0.20475657284259796, 0.3161393702030182, 0.5089306235313416, 0.45379117131233215, -0.17028236389160156, -0.7527768015861511, -0.8984673023223877, -0.21631501615047455, -0.3478860557079315, -0.21163159608840942, 0.34156930446624756, 0.6969778537750244, -0.5496821403503418, 1.0885428190231323, -0.3945022225379944, -0.29842162132263184, -0.34395632147789, 0.367058664560318, 0.7074511051177979, 0.8782370686531067, 0.8340402841567993, -0.5507943630218506, -0.42548486590385437, -0.40454450249671936, -0.5722817778587341, 0.10947473347187042, -0.20915570855140686, -0.2922385334968567, 0.1689213216304779, 0.4127972424030304, -0.6049267053604126, 0.41612178087234497, 0.3089737296104431, -0.36705878376960754, 0.4792693257331848, -0.2351633906364441, -0.09877893328666687, -1.1590508222579956, 0.3709547817707062, 0.04599844291806221, -0.05438588187098503, -0.5668874979019165, 0.15343014895915985, 0.011646110564470291, 0.1226559728384018, -0.18822655081748962, 0.6740343570709229, -0.566865086555481, 0.04856597259640694, 0.12206312268972397, -0.15513162314891815, -0.04487958177924156, 0.4931454658508301, -0.015293866395950317, 0.5433751344680786, 0.31389322876930237, -0.4655296206474304, -0.07048851251602173, 0.44729793071746826, -0.4690098166465759, 0.17028257250785828, -1.1374680995941162, 0.15391042828559875, -0.04890661686658859, 0.43338078260421753, -0.9718475341796875, -0.2404603213071823, 0.28151005506515503, -0.41950884461402893, 0.3949703276157379, -0.36031946539878845, -0.7326129674911499, -0.4607844352722168, -0.28327590227127075, 0.3620690107345581, 0.7712037563323975, -0.6499261856079102, 0.6839995384216309, -0.08992316573858261, -0.02540586329996586, -0.4970391094684601, -0.7124138474464417, -0.43652257323265076, -0.01602724939584732, -0.7056689262390137, 0.36236971616744995, -0.27416956424713135, -0.051082853227853775, 0.16282838582992554, -0.023391440510749817, -0.2617477774620056, -0.04004345089197159, 0.16794437170028687, 0.5994277000427246, -0.295032799243927, 0.14155790209770203, 0.07583625614643097, 0.23571811616420746, -0.05030699819326401, -0.072731614112854, 0.6019685864448547, -0.30718109011650085, -0.18043334782123566, -0.5956057906150818, 0.1103375181555748, 0.4045359790325165, -0.03450794145464897, 1.1188440322875977, 0.940786600112915, -0.377191424369812, 0.0384097620844841, -0.6676660776138306, -0.5926557779312134, -0.4758269488811493, 0.20601992309093475, -0.26070573925971985, -0.762754499912262, 0.6700448989868164, 0.03878162056207657, 0.23597893118858337, 0.7832325100898743, 0.4952499568462372, -0.3076987862586975, 0.7562320232391357, 0.8100578784942627, -0.006482318509370089, 0.8340156078338623, -0.7213840484619141, 0.27053821086883545, -0.9557577967643738, -0.21103358268737793, -0.6129109263420105, -0.41578930616378784, -0.6236177682876587, -0.1929270625114441, 0.28801560401916504, 0.37199434638023376, -0.5164365768432617, 0.40262892842292786, -0.5966193675994873, 0.16937153041362762, 0.8905574679374695, 0.31340476870536804, 0.05042342469096184, -0.010728596709668636, -0.4282170832157135, -0.031493671238422394, -0.9978609085083008, -0.362128347158432, 1.3769557476043701, 0.42168328166007996, 0.6102432608604431, 0.3014339804649353, 1.067655086517334, 0.03020910918712616, 0.3262087404727936, -0.6317239999771118, 0.4623263478279114, -0.05457587167620659, -1.1038321256637573, -0.2578262388706207, -0.6402291059494019, -1.0436897277832031, 0.08047481626272202, -0.39108410477638245, -0.7253865599632263, 0.5288869738578796, 0.08949337899684906, -0.6488000750541687, 0.2089163213968277, -0.9752691984176636, 0.7719818353652954, 0.036306168884038925, -0.4783957004547119, -0.1429196000099182, -0.7182685732841492, 0.3717084527015686, 0.011347907595336437, 0.054623764008283615, 0.14890529215335846, 0.24932850897312164, 1.10551917552948, -0.6495772004127502, 0.9364438652992249, -0.41946589946746826, 0.26739680767059326, 0.5341238379478455, -0.2007196694612503, 0.6280155181884766, 0.09009555727243423, -0.04540480673313141, 0.415004700422287, 0.16813616454601288, -0.6132364869117737, -0.2566696107387543, 0.5689685344696045, -1.208938479423523, -0.48092299699783325, -0.653235912322998, -0.6607169508934021, -0.08870542049407959, 0.44597387313842773, 0.41250523924827576, 0.3536112308502197, 0.08831240981817245, 0.5041811466217041, 0.7705135941505432, -0.1425124555826187, 0.5859218835830688, 0.4695832431316376, -0.11780755966901779, -0.12894612550735474, 0.619468629360199, 0.14984826743602753, 0.24262194335460663, 0.13701847195625305, 0.1827683001756668, -0.2847689092159271, -0.8039964437484741, -0.08149240911006927, 0.5915471911430359, -0.706019401550293, -0.022116266191005707, -0.6501701474189758, -0.48942261934280396, -0.5926517844200134, -0.2605653703212738, -0.3481237590312958, -0.21215146780014038, -0.5125318169593811, 0.0382361114025116, 0.3124181032180786, 0.5307956337928772, -0.2715693414211273, 0.4638134837150574, -0.6642767190933228, 0.040100935846567154, 0.4654514491558075, 0.19038911163806915, 0.14236082136631012, -0.7630939483642578, -0.18526923656463623, 0.03620871156454086, -0.21539539098739624, -0.5338037610054016, 0.29640519618988037, 0.28438618779182434, 0.8222694993019104, 0.4196638762950897, 0.1531650573015213, 0.6998178362846375, -0.30445462465286255, 0.7021681666374207, 0.45781078934669495, -0.5888948440551758, 0.5274515748023987, -0.3972933292388916, 0.27337905764579773, 0.7453322410583496, 0.5249006152153015, -0.051212046295404434, -0.05585618317127228, -0.8442073464393616, -1.1010397672653198, 0.7241435050964355, 0.18063339591026306, 0.12601687014102936, 0.37711432576179504, 0.4377082884311676, 0.09864050149917603, 0.16733390092849731, -0.878696620464325, -0.3507382273674011, -0.18381233513355255, -0.2914994955062866, -0.1717572957277298, -0.5267396569252014, -0.30893000960350037, -0.6874675750732422, 0.8098816275596619, 0.0067942882888019085, 0.644027590751648, 0.3299415707588196, -0.231538325548172, 0.19260455667972565, 0.06995602697134018, 0.505041241645813, 0.6690670847892761, -0.706579327583313, -0.18712149560451508, -0.017482511699199677, -0.5531312227249146, -0.20878879725933075, 0.3430216908454895, -0.3282991945743561, 0.16156139969825745, 0.6264336109161377, 0.8485241532325745, 0.24080418050289154, -0.24641354382038116, 0.5386373996734619, 0.053035371005535126, -0.291725218296051, -0.4046016335487366, 0.02577344700694084, -0.005645761266350746, 0.4142412543296814, 0.40091630816459656, 0.2775965929031372, 0.10882535576820374, -0.48667266964912415, 0.09769093990325928, 0.2550645172595978, -0.2657097578048706, -0.307843416929245, 0.691978931427002, 0.26515254378318787, 0.06719943881034851, 0.8014636039733887, -0.3083638846874237, -0.4141853451728821, 0.37734493613243103, 0.2510531544685364, 0.7481396198272705, 0.23702554404735565, 0.06513526290655136, 0.9213915467262268, 0.3532705008983612, -0.11830882728099823, 0.06923915445804596, -0.15737181901931763, -0.6986818909645081, -0.2714328467845917, -0.903850257396698, -0.236133873462677, 0.11614339798688889, -0.7455263733863831, 0.29018548130989075, -0.5672923922538757, -0.3607385456562042, 0.15986940264701843, 0.25620755553245544, -0.9202107787132263, 0.07216434180736542, 0.028295839205384254, 0.8352569341659546, -0.7006760239601135, 1.0182749032974243, 0.7955932021141052, -0.6024854183197021, -0.9132038950920105, 0.024864615872502327, -0.1568334400653839, -0.6270682215690613, 0.7370819449424744, -0.15079982578754425, 0.2703185975551605, 0.13992993533611298, -0.5415293574333191, -0.9245631098747253, 1.3326334953308105, 0.2439011186361313, -0.843748152256012, -0.37366506457328796, -0.17111836373806, 0.5354791283607483, -0.07170108705759048, 0.42723631858825684, 0.351554274559021, 0.37733349204063416, 0.3876911997795105, -0.8003913760185242, -0.006825901102274656, -0.21644602715969086, 0.021261679008603096, 0.07708508521318436, -0.7904602289199829, 1.2853893041610718, -0.37362635135650635, 0.022189287468791008, 0.271388977766037, 0.6237560510635376, 0.42587709426879883, 0.1660744845867157, 0.4828417897224426, 0.7638902068138123, 0.7820755243301392, -0.35026493668556213, 1.1040217876434326, -0.20266206562519073, 0.7828646302223206, 1.0944175720214844, 0.2747199535369873, 0.7809476256370544, 0.7112829089164734, -0.39518988132476807, 0.6442397832870483, 0.8263993859291077, -0.21851979196071625, 0.7006092667579651, 0.09152770787477493, 0.126211017370224, -0.3072514533996582, 0.2608790993690491, -0.6321508884429932, 0.10355443507432938, 0.12193625420331955, -0.44363221526145935, -0.22192810475826263, -0.21343480050563812, 0.13781630992889404, -0.3837736248970032, -0.2980288863182068, 0.6028034687042236, 0.03392618149518967, -0.423128217458725, 0.7842434048652649, -0.2532837390899658, 0.9471455216407776, -0.8063531517982483, 0.19301705062389374, -0.14786237478256226, 0.40425315499305725, -0.11289441585540771, -0.44203874468803406, 0.251473993062973, -0.022754451259970665, -0.43662455677986145, -0.19541317224502563, 0.7909274101257324, -0.1748569905757904, -0.7054562568664551, 0.288878858089447, 0.4952361583709717, 0.12461470812559128, 0.2250174731016159, -0.887261152267456, 0.05892138183116913, 0.010294915176928043, -0.5365735292434692, 0.33285778760910034, 0.16263438761234283, 0.18094758689403534, 0.4678313434123993, 0.7865604758262634, -0.05488425865769386, 0.3677311837673187, -0.05224180221557617, 0.8314923644065857, -0.3656149208545685, -0.38790690898895264, -0.5740818381309509, 0.6947267055511475, -0.22708427906036377, -0.6063132882118225, 0.6752640008926392, 0.4371640980243683, 1.075838327407837, -0.1172160729765892, 0.6342330574989319, -0.3587999641895294, 0.6353822946548462, -0.38521796464920044, 1.0385913848876953, -0.8122419714927673, 0.1527540683746338, -0.31429925560951233, -0.9130803942680359, -0.16171497106552124, 0.7763549089431763, -0.5630788803100586, 0.4333555996417999, 0.5991432070732117, 0.5019174814224243, -0.005840403027832508, -0.2806900143623352, 0.08037223666906357, 0.4198211133480072, 0.28346332907676697, 0.4281584918498993, 0.5730706453323364, -0.569674551486969, 0.5485076904296875, -0.4366157650947571, -0.12903691828250885, -0.5260985493659973, -0.6741451621055603, -1.1477488279342651, -0.6800420880317688, -0.40371739864349365, -0.40988609194755554, 0.02839207835495472, 0.8133949637413025, 0.9848811030387878, -1.037143588066101, -0.0782281905412674, -0.17284464836120605, -0.020511047914624214, -0.1435624063014984, -0.2142116278409958, 0.43657389283180237, -0.2621367573738098, -0.70652174949646, -0.05098840594291687, -0.4204392433166504, 0.286908894777298, -0.10593093186616898, -0.24140259623527527, -0.5389276742935181, 0.08022225648164749, 0.35730087757110596, 0.2773304283618927, -0.6631574034690857, -0.394084632396698, -0.06062530726194382, -0.17068997025489807, -0.1487794816493988, 0.5304935574531555, -0.6183454394340515, 0.32686030864715576, 0.5432400107383728, 0.45412394404411316, 0.73101806640625, -0.31668004393577576, 0.19183692336082458, -0.8127338290214539, 0.4374227821826935, 0.2920602560043335, 0.4970817267894745, 0.17611747980117798, -0.09945646673440933, 0.6434025168418884, 0.3908173143863678, -0.5556500554084778, -1.130549669265747, -0.054887931793928146, -1.1544758081436157, -0.18051843345165253, 1.0763179063796997, -0.43625691533088684, -0.18690410256385803, 0.3146553337574005, -0.046988699585199356, 0.3917931616306305, -0.37360623478889465, 0.7081462740898132, 0.8321030735969543, -0.018166126683354378, -0.18089067935943604, -0.5525573492050171, 0.4024672508239746, 0.3809531331062317, -0.5881190896034241, -0.35494646430015564, 0.21894194185733795, 0.38529181480407715, 0.4025292694568634, 0.33340394496917725, 0.0905747339129448, 0.20249255001544952, -0.029360434040427208, 0.28697797656059265, -0.11958048492670059, -0.26977798342704773, -0.09036035090684891, -0.055444926023483276, -0.046764958649873734, -0.15673457086086273 ]
Helsinki-NLP/opus-mt-zh-en
Helsinki-NLP
"2023-08-16T12:09:10Z"
498,573
292
transformers
[ "transformers", "pytorch", "tf", "rust", "marian", "text2text-generation", "translation", "zh", "en", "license:cc-by-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- language: - zh - en tags: - translation license: cc-by-4.0 --- ### zho-eng ## Table of Contents - [Model Details](#model-details) - [Uses](#uses) - [Risks, Limitations and Biases](#risks-limitations-and-biases) - [Training](#training) - [Evaluation](#evaluation) - [Citation Information](#citation-information) - [How to Get Started With the Model](#how-to-get-started-with-the-model) ## Model Details - **Model Description:** - **Developed by:** Language Technology Research Group at the University of Helsinki - **Model Type:** Translation - **Language(s):** - Source Language: Chinese - Target Language: English - **License:** CC-BY-4.0 - **Resources for more information:** - [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train) ## Uses #### Direct Use This model can be used for translation and text-to-text generation. ## Risks, Limitations and Biases **CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes.** Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Further details about the dataset for this model can be found in the OPUS readme: [zho-eng](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/zho-eng/README.md) ## Training #### System Information * helsinki_git_sha: 480fcbe0ee1bf4774bcbe6226ad9f58e63f6c535 * transformers_git_sha: 2207e5d8cb224e954a7cba69fa4ac2309e9ff30b * port_machine: brutasse * port_time: 2020-08-21-14:41 * src_multilingual: False * tgt_multilingual: False #### Training Data ##### Preprocessing * pre-processing: normalization + SentencePiece (spm32k,spm32k) * ref_len: 82826.0 * dataset: [opus](https://github.com/Helsinki-NLP/Opus-MT) * download original weights: [opus-2020-07-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/zho-eng/opus-2020-07-17.zip) * test set translations: [opus-2020-07-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zho-eng/opus-2020-07-17.test.txt) ## Evaluation #### Results * test set scores: [opus-2020-07-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zho-eng/opus-2020-07-17.eval.txt) * brevity_penalty: 0.948 ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | Tatoeba-test.zho.eng | 36.1 | 0.548 | ## Citation Information ```bibtex @InProceedings{TiedemannThottingal:EAMT2020, author = {J{\"o}rg Tiedemann and Santhosh Thottingal}, title = {{OPUS-MT} — {B}uilding open translation services for the {W}orld}, booktitle = {Proceedings of the 22nd Annual Conferenec of the European Association for Machine Translation (EAMT)}, year = {2020}, address = {Lisbon, Portugal} } ``` ## How to Get Started With the Model ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Helsinki-NLP/opus-mt-zh-en") model = AutoModelForSeq2SeqLM.from_pretrained("Helsinki-NLP/opus-mt-zh-en") ```
[ -0.18452143669128418, -0.43910500407218933, 0.2219323217868805, 0.07367779314517975, -0.5476664304733276, -0.5135117769241333, -0.27913394570350647, -0.570451557636261, 0.07592011988162994, 0.2789725065231323, -0.5933418273925781, -0.693074107170105, -0.5303663015365601, 0.20624534785747528, -0.14406095445156097, 1.0824730396270752, -0.015517495572566986, 0.431979775428772, 0.12465067207813263, -0.26966002583503723, -0.2349323034286499, -0.694603681564331, -0.37404587864875793, -0.41425707936286926, 0.3011672794818878, 0.24594365060329437, 0.6013094782829285, 0.6815935373306274, 0.4702572524547577, 0.23191186785697937, -0.21785226464271545, 0.04175921529531479, -0.20378680527210236, -0.11841729283332825, 0.09323148429393768, -0.43790289759635925, -0.7005729675292969, -0.14389419555664062, 0.6879405379295349, 0.7249249219894409, -0.11676690727472305, 0.35990655422210693, 0.0097251171246171, 0.796868622303009, -0.2789404094219208, 0.10121944546699524, -0.5851521492004395, 0.1530815213918686, -0.32395657896995544, -0.09155520051717758, -0.4880909025669098, -0.19471769034862518, 0.19801785051822662, -0.6077231764793396, 0.12096916139125824, 0.09907485544681549, 1.2304037809371948, 0.031571391969919205, -0.30792316794395447, -0.2797573506832123, -0.49406155943870544, 1.080230951309204, -1.1379188299179077, 0.4821924567222595, 0.5160216093063354, 0.011396119371056557, 0.0708022192120552, -0.4990527629852295, -0.5609510540962219, -0.10926109552383423, -0.15821737051010132, 0.2789633870124817, -0.03676983341574669, -0.06664765626192093, 0.31228452920913696, 0.5536803007125854, -0.7700286507606506, 0.08044931292533875, -0.4983273148536682, -0.22124013304710388, 0.8297790884971619, 0.14456501603126526, 0.5734288692474365, -0.43708276748657227, -0.5618528127670288, -0.3139107823371887, -0.42376112937927246, 0.12463219463825226, 0.6035469174385071, 0.40350914001464844, -0.33697667717933655, 0.6069186925888062, -0.1813344657421112, 0.6727099418640137, -0.21876050531864166, -0.03471383452415466, 0.8229648470878601, -0.6131290793418884, -0.2545090615749359, -0.11155930906534195, 1.2914406061172485, 0.390491783618927, 0.10818786174058914, -0.12762190401554108, -0.296358585357666, -0.24092984199523926, -0.015667563304305077, -0.873439610004425, 0.05945602059364319, 0.3215360641479492, -0.602675199508667, -0.14204473793506622, 0.10872802883386612, -0.7466050386428833, 0.1502077579498291, -0.20507869124412537, 0.5147385001182556, -0.6852970719337463, -0.3984626531600952, 0.3310711979866028, 0.004656188189983368, 0.29827880859375, 0.05831272155046463, -0.7723317742347717, 0.20634151995182037, 0.2720462381839752, 0.9257150292396545, -0.21118378639221191, -0.5075582265853882, -0.2567494809627533, -0.09281611442565918, -0.2867296040058136, 0.45856574177742004, -0.03512559458613396, -0.4483058452606201, 0.09904659539461136, 0.21904638409614563, -0.12851108610630035, -0.20047232508659363, 1.0910168886184692, -0.36263567209243774, 0.6154264807701111, -0.2912333905696869, -0.5895214080810547, -0.30651533603668213, 0.12342742830514908, -0.5614224672317505, 1.3989818096160889, 0.1725204885005951, -0.8849127888679504, 0.19846589863300323, -0.6639324426651001, -0.2857919931411743, -0.024193407967686653, 0.06752781569957733, -0.6212988495826721, -0.10471662133932114, 0.12687821686267853, 0.3234032690525055, -0.4003061354160309, 0.5203607678413391, -0.07708833366632462, -0.26822924613952637, 0.00760911637917161, -0.26005446910858154, 1.4376909732818604, 0.22581146657466888, -0.387262761592865, 0.09923500567674637, -1.0301952362060547, 0.023789387196302414, 0.26766258478164673, -0.28543907403945923, -0.5220227837562561, 0.008142433129251003, 0.2034452110528946, 0.48959383368492126, 0.37407779693603516, -0.6667753458023071, 0.15141086280345917, -0.8159205913543701, 0.3020651042461395, 0.6900438070297241, -0.32130205631256104, 0.36915847659111023, -0.3492136001586914, 0.39554667472839355, 0.16487851738929749, 0.311541348695755, -0.04744835942983627, -0.6658909320831299, -0.8469637632369995, -0.05816784128546715, 0.4227848947048187, 0.6843969225883484, -0.8903745412826538, 0.868969738483429, -0.4795567989349365, -0.8528928160667419, -0.6805092096328735, -0.021662844344973564, 0.6012720465660095, 0.457230806350708, 0.6299964189529419, -0.254050612449646, -0.5495157241821289, -1.0065712928771973, -0.23431164026260376, -0.20073004066944122, -0.11495749652385712, 0.1391071230173111, 0.7689376473426819, -0.1710110902786255, 0.7270020842552185, -0.3407350480556488, -0.43623554706573486, -0.2387344092130661, 0.05649267137050629, 0.3996524512767792, 0.6729510426521301, 0.7425563335418701, -0.780437707901001, -0.7360491752624512, 0.052506204694509506, -0.7937555909156799, -0.14220663905143738, 0.16179527342319489, -0.28364211320877075, 0.33185771107673645, 0.2109818160533905, -0.4803846776485443, 0.231026291847229, 0.5888357758522034, -0.6168212890625, 0.6668394804000854, -0.19439654052257538, 0.011515376158058643, -1.4096639156341553, 0.2670047879219055, -0.08662456274032593, 0.01041042897850275, -0.7646945118904114, -0.021496716886758804, 0.058301892131567, -0.014847055077552795, -0.5826281309127808, 0.7672011256217957, -0.5671841502189636, -0.05352727696299553, 0.07073734700679779, 0.1310957670211792, -0.0057910894975066185, 0.9389726519584656, 0.049573805183172226, 0.7723883390426636, 0.5786317586898804, -0.7010028958320618, 0.06825954467058182, 0.46058815717697144, -0.5906111598014832, 0.12847115099430084, -0.9251258969306946, 0.06893690675497055, 0.19438210129737854, -0.06863131374120712, -0.678652286529541, 0.08753801882266998, 0.4906001389026642, -0.7313543558120728, 0.21421028673648834, -0.12020615488290787, -0.8530163764953613, -0.21419614553451538, -0.29506996273994446, 0.46218037605285645, 0.5450733304023743, -0.23952212929725647, 0.6867549419403076, 0.2006683349609375, -0.06527940928936005, -0.6981357932090759, -0.9917077422142029, -0.24208642542362213, -0.11847098171710968, -0.661766767501831, 0.40643590688705444, -0.3808431029319763, -0.04941534623503685, 0.05860748142004013, 0.22753116488456726, -0.04701787605881691, 0.153625026345253, 0.028566434979438782, 0.4273500442504883, -0.13183601200580597, 0.17923517525196075, 0.014469604939222336, -0.1148257851600647, -0.035924624651670456, -0.44194284081459045, 0.6771886348724365, -0.23055672645568848, -0.18326188623905182, -0.7106287479400635, 0.27119284868240356, 0.5100077390670776, -0.39057278633117676, 1.138602375984192, 0.6088453531265259, -0.31519588828086853, 0.05034580081701279, -0.2993997633457184, -0.07657961547374725, -0.40166911482810974, 0.48905545473098755, -0.17824238538742065, -0.6024346947669983, 0.8700496554374695, 0.43772539496421814, 0.4339893162250519, 0.9296024441719055, 0.7036173939704895, 0.26346132159233093, 0.9420789480209351, 0.5443175435066223, 0.060635101050138474, 0.6025247573852539, -0.3662073612213135, -0.008330415934324265, -0.9952669739723206, -0.205974280834198, -0.7420281767845154, 0.03549950569868088, -0.7737407684326172, -0.37485840916633606, 0.14530038833618164, 0.013498918153345585, -0.1990555226802826, 0.5137433409690857, -0.38686245679855347, 0.02094629779458046, 0.5846419930458069, -0.04701218754053116, 0.3220008313655853, -0.017518965527415276, -0.4128076136112213, -0.22806943953037262, -0.7960125207901001, -0.5904689431190491, 1.274571418762207, 0.4089699983596802, 0.18017123639583588, 0.17541322112083435, 0.5655247569084167, 0.15985220670700073, 0.18037544190883636, -0.7895311713218689, 0.4586896002292633, -0.2213069349527359, -0.8546344637870789, -0.5343186259269714, -0.5373632907867432, -0.834460973739624, 0.5602302551269531, -0.20704203844070435, -0.640195906162262, 0.4473855793476105, 0.009457170963287354, -0.2613121271133423, 0.48195773363113403, -0.5927990674972534, 0.855182409286499, -0.21370932459831238, -0.2280714362859726, 0.11105164140462875, -0.7004647850990295, 0.301432341337204, -0.06357084959745407, 0.4493981897830963, -0.19080707430839539, 0.018427418544888496, 0.984652042388916, -0.483279287815094, 0.7434583902359009, -0.10767870396375656, -0.2998743951320648, 0.15562087297439575, -0.06968136876821518, 0.5113993883132935, -0.21456003189086914, -0.6012241244316101, 0.636567234992981, 0.04877576231956482, -0.47278136014938354, -0.3401339054107666, 0.337339848279953, -0.9518822431564331, -0.3443838357925415, -0.587131917476654, -0.6499290466308594, 0.08827616274356842, 0.4895472824573517, 0.595735490322113, 0.6229339241981506, -0.16436804831027985, 0.3172588050365448, 0.7398784756660461, -0.5219911336898804, 0.29387718439102173, 0.691494882106781, -0.23237447440624237, -0.4526315927505493, 0.7766550779342651, 0.40922778844833374, 0.3949734568595886, 0.36627256870269775, 0.2337714433670044, -0.166601300239563, -0.631931483745575, -0.6765245199203491, 0.2726626992225647, -0.5706430077552795, -0.1391502469778061, -0.7217777371406555, -0.26398083567619324, -0.45099154114723206, 0.2844890356063843, -0.5254227519035339, -0.46832937002182007, -0.21330900490283966, -0.12914332747459412, 0.25389617681503296, 0.26444384455680847, -0.1037226989865303, 0.30971452593803406, -0.8061583042144775, 0.06554678082466125, -0.056146565824747086, 0.34857529401779175, 0.06506176292896271, -1.0263549089431763, -0.6575488448143005, 0.2332417368888855, -0.1706303507089615, -0.8953584432601929, 0.6409618258476257, 0.16315115988254547, 0.6218661069869995, 0.27590057253837585, 0.341562956571579, 0.22237209975719452, -0.6376547813415527, 1.0535564422607422, 0.11261624842882156, -0.9331504702568054, 0.6275671720504761, -0.5199093818664551, 0.292705774307251, 0.5902161598205566, 0.3880103528499603, -0.5697476267814636, -0.48553240299224854, -0.8005585074424744, -1.0427415370941162, 1.0482211112976074, 0.5158267021179199, 0.23829780519008636, 0.035210661590099335, 0.18302635848522186, 0.026249608024954796, 0.1206255853176117, -1.2423067092895508, -0.655350923538208, -0.13521012663841248, -0.19771355390548706, -0.0457550473511219, -0.5207558274269104, -0.13130049407482147, -0.3459358215332031, 1.2220491170883179, 0.15816423296928406, 0.3186006546020508, 0.5042863488197327, -0.2647755742073059, -0.042083293199539185, 0.3003738522529602, 0.7136546969413757, 0.5785836577415466, -0.42123380303382874, -0.24034081399440765, 0.21369943022727966, -0.551586389541626, -0.03972853720188141, 0.1659003496170044, -0.6277952790260315, 0.44106101989746094, 0.4511623978614807, 1.1427775621414185, 0.185897096991539, -0.5458313226699829, 0.5571866035461426, -0.022347021847963333, -0.5391244888305664, -0.4132688343524933, -0.15339812636375427, -0.08338142186403275, -0.03240568935871124, 0.3783732056617737, -0.1833270937204361, 0.19050094485282898, -0.45050108432769775, -0.026522215455770493, 0.08582538366317749, -0.4754452407360077, -0.4036511778831482, 0.6266016364097595, 0.20041902363300323, -0.29938992857933044, 0.5624382495880127, -0.32025817036628723, -0.6229846477508545, 0.6026527285575867, 0.3558284640312195, 0.9711586236953735, -0.3211723864078522, 0.027541646733880043, 0.8798719644546509, 0.5611933469772339, -0.18751829862594604, 0.21643958985805511, 0.06273367255926132, -0.8880811929702759, -0.18849100172519684, -0.7010937333106995, 0.016363512724637985, 0.013628018088638783, -1.0300424098968506, 0.2760055661201477, 0.05117585510015488, -0.2247534692287445, -0.27523770928382874, 0.31140461564064026, -0.5422477722167969, 0.0749763697385788, -0.13490496575832367, 0.9772064089775085, -0.9409502148628235, 1.015589714050293, 0.6175810098648071, -0.6897931098937988, -0.7411485910415649, -0.024898715317249298, -0.25073280930519104, -0.5590609908103943, 0.5870356559753418, 0.05960286408662796, 0.03310414031147957, 0.060919489711523056, -0.48263463377952576, -0.8178845047950745, 1.1659525632858276, 0.31397148966789246, -0.6641682386398315, -0.030375074595212936, -0.006901416461914778, 0.6425800323486328, -0.10510198771953583, 0.23633524775505066, 0.24383379518985748, 0.4436633586883545, -0.1732630431652069, -1.016834020614624, -0.07571113854646683, -0.6492077112197876, 0.0998041108250618, 0.1112382560968399, -0.8013555407524109, 1.1168218851089478, 0.018376590684056282, -0.2849177420139313, 0.0891222208738327, 0.8713876605033875, 0.3295612335205078, 0.12771427631378174, 0.45003142952919006, 0.6348574757575989, 0.731863260269165, -0.150385320186615, 1.128514051437378, -0.4904634654521942, 0.6006642580032349, 1.183172345161438, 0.030114423483610153, 0.8096926212310791, 0.36619076132774353, -0.30336812138557434, 0.6476531028747559, 0.615268349647522, -0.1930679827928543, 0.44183894991874695, -0.10059769451618195, 0.1051504835486412, -0.18669794499874115, -0.1238008439540863, -0.7315433621406555, 0.19096603989601135, 0.13617941737174988, -0.4245262145996094, 0.009952211752533913, -0.057447824627161026, 0.23760975897312164, 0.11175432801246643, -0.21787825226783752, 0.578681468963623, 0.20659597218036652, -0.5587056875228882, 0.6789634227752686, 0.1966102570295334, 0.808648943901062, -0.8360413312911987, 0.21085746586322784, -0.23700226843357086, 0.019836846739053726, -0.043497733771800995, -0.6185088753700256, 0.2244451642036438, 0.12444323301315308, -0.3854702413082123, -0.26986998319625854, 0.28736406564712524, -0.6678349375724792, -0.8129122853279114, 0.5991395115852356, 0.5179607272148132, 0.32360970973968506, 0.2671707272529602, -0.9080692529678345, -0.08769819140434265, 0.14716577529907227, -0.5616627931594849, 0.21728509664535522, 0.5979357957839966, 0.05357794836163521, 0.6459042429924011, 0.5903306603431702, 0.1958211064338684, 0.047820333391427994, 0.2022193819284439, 0.648423969745636, -0.5039998292922974, -0.6066374182701111, -0.9292692542076111, 0.6528663635253906, -0.04656021296977997, -0.5212893486022949, 1.002053141593933, 0.7550438046455383, 1.0395756959915161, -0.0488644540309906, 0.7662519216537476, -0.0842730775475502, 0.552782416343689, -0.6710524559020996, 0.8011435866355896, -0.912630558013916, 0.11103052645921707, -0.375701367855072, -0.7964341044425964, -0.19100503623485565, 0.6066531538963318, -0.28488391637802124, 0.07864953577518463, 0.6597703695297241, 0.5938625931739807, 0.19514241814613342, -0.21047340333461761, 0.2920459806919098, 0.32285478711128235, 0.23214098811149597, 0.6973504424095154, 0.47789791226387024, -1.036636471748352, 0.5294504165649414, -0.40057849884033203, -0.04042980074882507, -0.20506161451339722, -0.7709802389144897, -0.9264368414878845, -0.8038206696510315, -0.18635675311088562, -0.3786185681819916, 0.019689181819558144, 1.1659739017486572, 0.36450493335723877, -0.8327493071556091, -0.46350666880607605, 0.07252652943134308, 0.09688159078359604, -0.33243224024772644, -0.1683606058359146, 0.7129253149032593, -0.24289822578430176, -1.0427818298339844, 0.004757605027407408, -0.07100063562393188, 0.16217005252838135, -0.23096011579036713, -0.2792261838912964, -0.5674748420715332, -0.11133170872926712, 0.5035616755485535, 0.13986115157604218, -0.751359224319458, 0.156959667801857, 0.08879949897527695, -0.3570634424686432, 0.15889139473438263, 0.3108985424041748, -0.20398451387882233, 0.49624860286712646, 0.7092918753623962, 0.3299940526485443, 0.25770968198776245, -0.18561476469039917, 0.6924611330032349, -0.5622376799583435, 0.5202683806419373, 0.1639033854007721, 0.4585195779800415, 0.37900641560554504, -0.2601485550403595, 0.6979690194129944, 0.333242267370224, -0.35582688450813293, -1.101047158241272, -0.09628747403621674, -0.9059639573097229, -0.2606903910636902, 1.266419768333435, -0.25902944803237915, -0.21588151156902313, -0.003935028333216906, -0.11635439097881317, 0.5932533740997314, -0.32966068387031555, 0.6628007292747498, 1.0090217590332031, 0.3652319610118866, 0.1496460884809494, -0.9497132897377014, 0.5840641260147095, 0.46457308530807495, -0.8118501901626587, 0.0631117895245552, 0.20065917074680328, 0.18123194575309753, 0.19049331545829773, 0.7539341449737549, -0.2906855642795563, 0.22470511496067047, -0.2008158415555954, 0.5997838377952576, -0.09807217121124268, -0.08371928334236145, -0.3564739227294922, -0.2811899781227112, -0.06876529008150101, -0.09831339120864868 ]
meta-llama/Llama-2-7b-hf
meta-llama
"2023-11-13T16:31:26Z"
497,231
869
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "facebook", "meta", "llama-2", "en", "arxiv:2307.09288", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-13T16:16:13Z"
--- extra_gated_heading: Access Llama 2 on Hugging Face extra_gated_description: >- This is a form to enable access to Llama 2 on Hugging Face after you have been granted access from Meta. Please visit the [Meta website](https://ai.meta.com/resources/models-and-libraries/llama-downloads) and accept our license terms and acceptable use policy before submitting this form. Requests will be processed in 1-2 days. extra_gated_prompt: "**Your Hugging Face account email address MUST match the email you provide on the Meta website, or your request will not be approved.**" extra_gated_button_content: Submit extra_gated_fields: I agree to share my name, email address and username with Meta and confirm that I have already been granted download access on the Meta website: checkbox language: - en pipeline_tag: text-generation inference: false tags: - facebook - meta - pytorch - llama - llama-2 --- # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B pretrained model, converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/meta-llama/Llama-2-7b) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/meta-llama/Llama-2-13b) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)| |70B| [Link](https://huggingface.co/meta-llama/Llama-2-70b) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf)|
[ -0.225722074508667, -0.7199469208717346, 0.37911027669906616, 0.2048482447862625, -0.3863373100757599, 0.2415008395910263, -0.05513071268796921, -0.7672433853149414, 0.0736633837223053, 0.3091024160385132, -0.7216290831565857, -0.5686372518539429, -0.6912304759025574, 0.07257145643234253, -0.22736917436122894, 1.0984444618225098, -0.015349576249718666, -0.29076871275901794, -0.12905734777450562, 0.09438224136829376, -0.4977322518825531, -0.4050740599632263, -0.5378156900405884, -0.4358372688293457, 0.3992979824542999, 0.4913237392902374, 0.6158239245414734, 0.6649963855743408, 0.5618204474449158, 0.24770884215831757, -0.2646951377391815, 0.22503577172756195, -0.732826828956604, -0.27250781655311584, 0.12860827147960663, -0.5104947686195374, -0.6975414156913757, 0.16871656477451324, 0.36862245202064514, 0.17815053462982178, -0.2907353639602661, 0.5430834293365479, 0.07452985644340515, 0.48402342200279236, -0.5732479095458984, 0.17240221798419952, -0.7512093782424927, 0.035211119800806046, -0.2288532257080078, -0.07890227437019348, -0.19654656946659088, -0.2992148995399475, -0.20271232724189758, -0.8461878299713135, -0.11503633111715317, 0.08221694082021713, 1.0666457414627075, 0.6640004515647888, -0.46099719405174255, -0.12296649068593979, -0.2926828861236572, 0.9654979109764099, -0.8652611374855042, 0.05778448283672333, 0.5933557748794556, 0.2924463748931885, -0.2331024557352066, -0.7793959379196167, -0.6595572233200073, -0.13869532942771912, 0.06456764042377472, 0.36604273319244385, -0.41635772585868835, 0.005435225088149309, 0.17771048843860626, 0.3819802701473236, -0.5907164812088013, 0.5886896848678589, -0.5268042087554932, -0.1738348752260208, 1.0786776542663574, 0.23969165980815887, -0.007912411354482174, -0.04049406200647354, -0.507322371006012, -0.2957732081413269, -0.8184170722961426, 0.18351635336875916, 0.5034990310668945, -0.04285502806305885, -0.4801238179206848, 0.6279115676879883, -0.4231049716472626, 0.29255613684654236, 0.023994524031877518, -0.5266066193580627, 0.4963286817073822, -0.4792318046092987, -0.27602463960647583, -0.12506285309791565, 0.9141316413879395, 0.7403461337089539, 0.15841631591320038, 0.10455208271741867, -0.063548743724823, 0.12365040928125381, -0.01482070330530405, -0.8394332528114319, -0.052755992859601974, 0.25000402331352234, -0.37955695390701294, -0.6001460552215576, -0.30679699778556824, -0.7567138075828552, -0.1626339703798294, -0.09938127547502518, 0.25302600860595703, -0.03611496835947037, -0.39353999495506287, 0.11696697771549225, 0.052288785576820374, 0.5678161382675171, 0.21592889726161957, -0.9725868701934814, 0.22756870090961456, 0.5755906701087952, 0.8006122708320618, -0.2500874996185303, -0.3663148581981659, 0.018788188695907593, -0.026995355263352394, -0.32990819215774536, 0.9304783940315247, -0.35689547657966614, -0.5465992093086243, -0.23211659491062164, -0.02601570263504982, 0.16892823576927185, -0.527296781539917, 0.4339209198951721, -0.40332943201065063, 0.17668545246124268, -0.34079986810684204, -0.3789469003677368, -0.34084782004356384, 0.20081695914268494, -0.3963918387889862, 1.4885212182998657, 0.11843092739582062, -0.49451619386672974, 0.31464099884033203, -0.6887887120246887, -0.1871999353170395, -0.20709487795829773, 0.09672234952449799, -0.5405552983283997, -0.2755542993545532, 0.1353394091129303, 0.3728518486022949, -0.6622081995010376, 0.4829254448413849, -0.21119098365306854, -0.4510822892189026, 0.046649135649204254, -0.420975923538208, 0.854485809803009, 0.29732024669647217, -0.4747253954410553, 0.06971490383148193, -0.8459814190864563, 0.06531097739934921, 0.4657790958881378, -0.4862675070762634, 0.2803633213043213, 0.08084063231945038, -0.12386654317378998, 0.1983044147491455, 0.5061387419700623, -0.3725135326385498, 0.16760355234146118, -0.32443538308143616, 0.5080423951148987, 0.7670990824699402, 0.03967015817761421, 0.16841857135295868, -0.5276023149490356, 0.5288141965866089, -0.03744146600365639, 0.39997369050979614, 0.014231327921152115, -0.7307908535003662, -1.0466835498809814, -0.1906033307313919, -0.04043212905526161, 0.8637955188751221, -0.260011225938797, 0.7124238610267639, -0.014323768205940723, -0.7643396258354187, -0.42771193385124207, 0.38068291544914246, 0.6962851285934448, 0.5116675496101379, 0.4387948215007782, -0.2942306399345398, -0.6268836259841919, -1.0367599725723267, 0.056799910962581635, -0.4522712230682373, -0.0233457013964653, 0.36145898699760437, 0.6655822992324829, -0.34330958127975464, 0.7486037611961365, -0.5526814460754395, -0.1784151941537857, -0.27130457758903503, -0.1382472962141037, 0.06465192139148712, 0.3577604293823242, 0.672032356262207, -0.396636039018631, -0.22466620802879333, -0.12837354838848114, -0.9210262894630432, -0.10939894616603851, 0.11752168089151382, -0.21910175681114197, 0.23484723269939423, 0.3199613094329834, -0.6245203614234924, 0.465004563331604, 0.7296086549758911, -0.18050158023834229, 0.5317026972770691, 0.008502288721501827, -0.18138131499290466, -1.1001654863357544, 0.03427885100245476, -0.2181781530380249, 0.03406810387969017, -0.44547322392463684, -0.04214457795023918, -0.21355262398719788, 0.08688084036111832, -0.627071738243103, 0.609912097454071, -0.32187992334365845, -0.17015440762043, -0.1355622261762619, 0.06113088130950928, 0.05879237502813339, 0.6321104168891907, -0.1328272968530655, 1.093798279762268, 0.41335150599479675, -0.5968536734580994, 0.26775190234184265, 0.40807798504829407, -0.5144312381744385, 0.15495407581329346, -0.9009507894515991, 0.378659188747406, 0.1123080924153328, 0.5460017323493958, -1.005278468132019, -0.38943949341773987, 0.3290066123008728, -0.44894492626190186, 0.09679173678159714, 0.23687733709812164, -0.563252866268158, -0.4109742343425751, -0.43832048773765564, 0.31765294075012207, 0.8417280316352844, -0.46617576479911804, 0.17630088329315186, 0.38975366950035095, 0.023827185854315758, -0.7086318731307983, -0.8521466851234436, 0.05754117667675018, -0.3662862479686737, -0.5444761514663696, 0.30556339025497437, -0.19117437303066254, -0.23740075528621674, -0.2690924406051636, 0.06989142298698425, -0.001668561715632677, 0.3875010311603546, 0.3804440498352051, 0.37626540660858154, -0.12342889606952667, -0.025658706203103065, 0.15135711431503296, -0.20714807510375977, 0.039993952959775925, 0.21114249527454376, 0.6063134670257568, -0.17391034960746765, -0.23304668068885803, -0.7532173991203308, 0.039988040924072266, 0.28848186135292053, -0.26087114214897156, 0.6254335641860962, 0.4403167963027954, -0.22156058251857758, 0.2341991662979126, -0.7974209785461426, -0.11335928738117218, -0.5483951568603516, 0.561519980430603, -0.22285175323486328, -0.8531315922737122, 0.5454175472259521, -0.009034058079123497, 0.44874337315559387, 0.7588600516319275, 0.6449403762817383, -0.0838060975074768, 0.8213128447532654, 0.5836135149002075, -0.06705363094806671, 0.34946125745773315, -0.5005595684051514, -0.10355986654758453, -0.9691368341445923, -0.6370593309402466, -0.3230835497379303, -0.4519525468349457, -0.6723263263702393, -0.4307212829589844, 0.26655882596969604, 0.20214411616325378, -0.6953587532043457, 0.327701210975647, -0.5985337495803833, 0.5906537771224976, 0.5426359176635742, 0.13458101451396942, 0.30348706245422363, 0.11025061458349228, 0.14594939351081848, 0.05690906196832657, -0.5311837792396545, -0.7612221837043762, 1.5090032815933228, 0.4391927421092987, 0.45953404903411865, 0.10808292031288147, 0.6958654522895813, 0.14094343781471252, 0.3390423655509949, -0.7204443216323853, 0.6686881184577942, 0.053202442824840546, -0.7342178821563721, -0.15786214172840118, -0.11716469377279282, -0.9168354272842407, 0.15844587981700897, -0.2138606458902359, -0.8027254939079285, 0.026167916133999825, -0.020487498492002487, -0.37800687551498413, 0.2940889596939087, -0.6862354874610901, 0.6133667826652527, -0.5823324918746948, -0.31762364506721497, -0.3570920526981354, -0.8226277232170105, 0.7004629373550415, -0.20650546252727509, 0.10416115075349808, -0.5182316899299622, -0.2673131227493286, 0.9223687052726746, -0.3539348840713501, 1.0250810384750366, -0.05021858215332031, -0.09915103763341904, 0.5902330875396729, -0.18863029778003693, 0.4607541859149933, 0.034473028033971786, -0.27190375328063965, 0.6832627058029175, -0.13207779824733734, -0.32901328802108765, -0.16386929154396057, 0.544549286365509, -1.2451112270355225, -0.8077427744865417, -0.5024990439414978, -0.5197068452835083, -0.042733196169137955, 0.08816978335380554, 0.5223420858383179, -0.10159419476985931, -0.034243807196617126, 0.1285867989063263, 0.4669414460659027, -0.5210672616958618, 0.4773413836956024, 0.5684545040130615, -0.10887560993432999, -0.4725000858306885, 0.6691529750823975, 0.051551420241594315, 0.37513959407806396, 0.23104554414749146, 0.039648767560720444, -0.4229530096054077, -0.4371960461139679, -0.5178592205047607, 0.2843533456325531, -0.48100873827934265, -0.4992330074310303, -0.5512782335281372, -0.36375460028648376, -0.34246233105659485, -0.07672573626041412, -0.4537106156349182, -0.44329631328582764, -0.7650565505027771, -0.3972168564796448, 0.5317301154136658, 0.8374335765838623, -0.0019628151785582304, 0.6602007746696472, -0.3327178359031677, 0.1864691823720932, 0.3865923583507538, 0.18732184171676636, -0.022411571815609932, -0.7884586453437805, 0.0606529600918293, 0.13538123667240143, -0.7816371917724609, -0.6317799687385559, 0.2467615008354187, 0.2852028012275696, 0.48106247186660767, 0.48773205280303955, -0.08130074292421341, 0.7977035641670227, -0.36478468775749207, 1.1176729202270508, 0.3774377405643463, -0.6742069721221924, 0.7176108956336975, -0.20880308747291565, 0.03904986009001732, 0.6495891213417053, 0.2725062966346741, -0.0807601660490036, -0.16213250160217285, -0.6490063071250916, -0.6946942210197449, 0.823356032371521, 0.2379678338766098, 0.1919550597667694, 0.057374030351638794, 0.4733918607234955, 0.059276219457387924, 0.11205590516328812, -0.8442736864089966, -0.3141356110572815, -0.2789885997772217, -0.10685624182224274, -0.20662081241607666, -0.5193987488746643, -0.06697054207324982, -0.320170521736145, 0.6496620774269104, 0.05281604453921318, 0.35123538970947266, -0.13836905360221863, 0.016384756192564964, -0.10006209462881088, 0.044927433133125305, 0.7445116639137268, 0.5050121545791626, -0.25971296429634094, -0.15320594608783722, 0.660444974899292, -0.6520779728889465, 0.3555227518081665, 0.008633087389171124, -0.1269901543855667, -0.3822142779827118, 0.41517773270606995, 0.9091240167617798, 0.2681928277015686, -0.7257721424102783, 0.34880080819129944, 0.14613454043865204, -0.3783814609050751, -0.4295904040336609, 0.37620866298675537, 0.09041304886341095, 0.340859591960907, 0.28329506516456604, -0.15069659054279327, 0.07911769300699234, -0.5203374624252319, -0.12608760595321655, 0.39477190375328064, 0.1225852444767952, -0.4357280135154724, 1.0221655368804932, 0.3247140049934387, -0.29282963275909424, 0.5435420274734497, -0.17654459178447723, -0.37201938033103943, 0.9265750646591187, 0.6512467861175537, 0.6603798270225525, -0.2772462069988251, 0.11747532337903976, 0.7274170517921448, 0.4637349843978882, -0.23913559317588806, 0.23399166762828827, -0.011300782673060894, -0.5039620995521545, -0.2166566401720047, -0.7203935980796814, -0.48157304525375366, 0.36213040351867676, -0.5803300738334656, 0.3197619318962097, -0.6437445878982544, -0.2803887724876404, -0.32616332173347473, 0.46578946709632874, -0.6951100826263428, 0.21213357150554657, 0.11299443244934082, 0.941963791847229, -0.7365837693214417, 0.7811979055404663, 0.5063864588737488, -0.50653475522995, -0.908979594707489, -0.31213951110839844, 0.2029384970664978, -1.2690441608428955, 0.5425115823745728, 0.38428717851638794, -0.06381841748952866, 0.12847153842449188, -0.7750276923179626, -1.2467509508132935, 1.7380560636520386, 0.4689439833164215, -0.7798140645027161, -0.02327815443277359, 0.3475591540336609, 0.503750205039978, -0.11444860696792603, 0.4663469195365906, 0.8440646529197693, 0.5009920597076416, 0.12978161871433258, -1.0842385292053223, 0.09820828586816788, -0.3664051592350006, -0.029665904119610786, -0.19610963761806488, -1.3455727100372314, 0.8347426652908325, -0.40364760160446167, -0.23812144994735718, 0.22020965814590454, 0.6622615456581116, 0.7016507983207703, 0.5588638186454773, 0.3553231358528137, 0.8078600764274597, 0.9299029111862183, -0.032463643699884415, 1.1341620683670044, -0.37372463941574097, 0.18845804035663605, 0.9119161367416382, -0.30756136775016785, 0.9961869716644287, 0.24040155112743378, -0.6104090809822083, 0.6287863254547119, 1.0369466543197632, -0.0283591877669096, 0.6053214073181152, 0.0668037012219429, -0.16802005469799042, -0.18627168238162994, -0.1660217046737671, -0.6710839867591858, 0.5257181525230408, 0.2568472921848297, -0.14372923970222473, -0.02702229656279087, -0.34285351634025574, 0.23361852765083313, -0.3439085781574249, -0.008003960363566875, 0.8255254626274109, 0.16915513575077057, -0.6330645680427551, 0.909267783164978, 0.04279392585158348, 0.8725913763046265, -0.6718251705169678, 0.09550513327121735, -0.5352908372879028, 0.014700879342854023, -0.38205549120903015, -0.718362033367157, 0.07271801680326462, 0.3746633231639862, -0.003577210707589984, -0.09876655787229538, 0.5597891211509705, 0.03765975683927536, -0.5752425789833069, 0.3607933819293976, 0.28013113141059875, 0.3693981468677521, 0.21786771714687347, -0.6916970610618591, 0.18767888844013214, 0.09164348244667053, -0.5590488314628601, 0.3989247977733612, 0.030534597113728523, -0.062267888337373734, 0.8132996559143066, 0.765234649181366, -0.20955459773540497, 0.1451549381017685, -0.22133536636829376, 1.0226736068725586, -0.5045312643051147, -0.20579735934734344, -0.7770821452140808, 0.541157066822052, 0.0501788966357708, -0.7265149354934692, 0.5580202341079712, 0.6635978817939758, 0.7135880589485168, 0.28043341636657715, 0.666441023349762, 0.07627030462026596, 0.3255790174007416, -0.5390638709068298, 0.630052387714386, -0.7903456687927246, 0.38730189204216003, 0.08255168050527573, -0.9989269971847534, -0.06544139236211777, 0.6893043518066406, -0.24587085843086243, 0.050535574555397034, 0.376116007566452, 0.8779703974723816, 0.17586438357830048, -0.1713591367006302, 0.12808750569820404, 0.17930272221565247, 0.3628314733505249, 0.9112949967384338, 0.8630346655845642, -0.6470019221305847, 0.7241566181182861, -0.3911599814891815, -0.25114840269088745, -0.2829202711582184, -0.7489985227584839, -0.9970418214797974, -0.271717369556427, -0.2479238659143448, -0.15652891993522644, 0.06834498792886734, 0.7629138231277466, 0.5167543888092041, -0.5942688584327698, -0.3024185001850128, -0.06929890811443329, -0.08819576352834702, 0.038469791412353516, -0.16113415360450745, 0.3421263098716736, -0.12352566421031952, -0.5942162275314331, 0.4894977807998657, 0.009981157258152962, 0.2083168923854828, -0.33498716354370117, -0.2757982015609741, -0.19827812910079956, 0.15191873908042908, 0.6306998133659363, 0.2894783020019531, -0.9479146003723145, -0.23178577423095703, 0.042424336075782776, -0.14762865006923676, 0.12861652672290802, 0.01580534130334854, -0.7895739674568176, 0.0949784591794014, 0.14454470574855804, 0.38773688673973083, 0.6814687252044678, 0.062086284160614014, 0.055193670094013214, -0.5265796780586243, 0.4699860215187073, 0.01100713200867176, 0.14480744302272797, 0.30979081988334656, -0.41979995369911194, 0.8074241280555725, 0.1515389233827591, -0.7167713046073914, -0.9733210802078247, 0.11280564963817596, -1.0653573274612427, -0.0013660799013450742, 1.4100679159164429, 0.004222396295517683, -0.1264280080795288, 0.20058801770210266, -0.21578742563724518, 0.38982680439949036, -0.38184303045272827, 0.8232763409614563, 0.5726366639137268, -0.08539993315935135, -0.0974670946598053, -0.806972861289978, 0.3543570637702942, 0.4010249972343445, -1.1159796714782715, -0.26327091455459595, 0.4604138135910034, 0.5041228532791138, -0.09735262393951416, 0.7081463932991028, 0.019980866461992264, 0.23975741863250732, 0.08007361739873886, 0.11428802460432053, -0.2544232904911041, -0.1562604457139969, -0.09518624097108841, -0.2709377408027649, -0.055960576981306076, -0.22588582336902618 ]
lmsys/fastchat-t5-3b-v1.0
lmsys
"2023-06-29T22:39:04Z"
496,797
305
transformers
[ "transformers", "pytorch", "t5", "text2text-generation", "license:apache-2.0", "autotrain_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2023-04-27T23:48:43Z"
--- license: apache-2.0 inference: false --- # FastChat-T5 Model Card ## Model details **Model type:** FastChat-T5 is an open-source chatbot trained by fine-tuning Flan-t5-xl (3B parameters) on user-shared conversations collected from ShareGPT. It is based on an encoder-decoder transformer architecture, and can autoregressively generate responses to users' inputs. **Model date:** FastChat-T5 was trained on April 2023. **Organizations developing the model:** The FastChat developers, primarily Dacheng Li, Lianmin Zheng and Hao Zhang. **Paper or resources for more information:** https://github.com/lm-sys/FastChat#FastChat-T5 **License:** Apache License 2.0 **Where to send questions or comments about the model:** https://github.com/lm-sys/FastChat/issues ## Intended use **Primary intended uses:** The primary use of FastChat-T5 is the commercial usage of large language models and chatbots. It can also be used for research purposes. **Primary intended users:** The primary intended users of the model are entrepreneurs and researchers in natural language processing, machine learning, and artificial intelligence. ## Training dataset 70K conversations collected from ShareGPT.com. ## Training details It processes the ShareGPT data in the form of question answering. Each ChatGPT response is processed as an answer, and previous conversations between the user and the ChatGPT are processed as the question. The encoder bi-directionally encodes a question into a hidden representation. The decoder uses cross-attention to attend to this representation while generating an answer uni-directionally from a start token. This model is fine-tuned for 3 epochs, with a max learning rate 2e-5, warmup ratio 0.03, and a cosine learning rate schedule. ## Evaluation dataset A preliminary evaluation of the model quality is conducted by creating a set of 80 diverse questions and utilizing GPT-4 to judge the model outputs. See https://vicuna.lmsys.org/ for more details.
[ -0.4076315760612488, -0.7842345237731934, 0.1930818110704422, 0.20137237012386322, -0.445058137178421, 0.1843915432691574, 0.01853252202272415, -0.571938157081604, 0.035215675830841064, 0.25792035460472107, -0.615493893623352, -0.6468759775161743, -0.48087000846862793, -0.044738151133060455, -0.3455425202846527, 1.0261470079421997, 0.14455857872962952, 0.01539606973528862, 0.28474244475364685, -0.11997103691101074, -0.6016798615455627, -0.4176467955112457, -1.0533065795898438, -0.18035009503364563, 0.4837316572666168, 0.7003819942474365, 0.8146425485610962, 0.6291908621788025, 0.5389300584793091, 0.18067355453968048, 0.10968443006277084, -0.09559421241283417, -0.7395669221878052, -0.2912824749946594, -0.0009133694693446159, -0.554319441318512, -0.6789904236793518, -0.09894493967294693, 0.3424297273159027, 0.25907739996910095, -0.21162179112434387, 0.40201619267463684, -0.07794813811779022, 0.09076113253831863, -0.3049505352973938, 0.3725167214870453, -0.6281576156616211, 0.03226208686828613, -0.35013440251350403, -0.17773586511611938, -0.4083537459373474, -0.5848257541656494, -0.02126277983188629, -0.40680867433547974, 0.2944275140762329, 0.09350428730249405, 1.006447672843933, 0.17729149758815765, -0.42843756079673767, -0.22085288166999817, -0.8879785537719727, 0.5774523615837097, -0.7082552909851074, 0.49899032711982727, 0.18753081560134888, 0.8119608759880066, 0.03691805899143219, -0.9197404980659485, -0.6624158024787903, -0.09690645337104797, 0.049335625022649765, -0.02341991290450096, 0.05716954544186592, 0.13345834612846375, 0.4738413691520691, 0.4397842288017273, -0.6888684034347534, 0.0843513160943985, -0.7228639721870422, -0.09456555545330048, 0.6524018049240112, 0.4210868775844574, 0.27357038855552673, 0.055195774883031845, -0.5166308879852295, -0.07385540008544922, -0.4459000527858734, 0.10399987548589706, 0.22522108256816864, 0.13217559456825256, -0.3238449990749359, 0.4409172236919403, -0.06863901764154434, 0.480512410402298, 0.21040990948677063, -0.09290234744548798, 0.3943990468978882, -0.41300883889198303, -0.2525967061519623, -0.09889906644821167, 0.9370775818824768, 0.3175203204154968, 0.2905510663986206, 0.06195949390530586, -0.2542829215526581, -0.010885152965784073, 0.13930897414684296, -1.0568050146102905, 0.013640644028782845, 0.42128872871398926, -0.5837451219558716, -0.4833293855190277, -0.24427077174186707, -0.5060696005821228, -0.21221975982189178, 0.17595182359218597, 0.3876870572566986, -0.5362626910209656, -0.35093486309051514, -0.008003035560250282, -0.08704784512519836, 0.540695071220398, 0.2960767149925232, -0.8947569727897644, 0.29144906997680664, 0.4989025890827179, 0.7682716846466064, 0.11627330631017685, -0.3584679663181305, -0.09419448673725128, -0.03645683079957962, -0.3053091764450073, 0.5285404324531555, -0.5527908205986023, -0.3594541847705841, -0.1260569542646408, 0.133724182844162, 0.07525467872619629, -0.280673623085022, 0.917609691619873, -0.6355257630348206, 0.3319377601146698, -0.0713503435254097, -0.6808888912200928, -0.10847268998622894, 0.44064757227897644, -0.647584080696106, 0.75473552942276, -0.16802847385406494, -0.9475257396697998, 0.39058154821395874, -1.2073957920074463, -0.07234165072441101, 0.40638265013694763, 0.2244832068681717, -0.28585290908813477, -0.30969130992889404, 0.18987824022769928, 0.5841010212898254, -0.2956802248954773, 0.23336200416088104, -0.5702365040779114, -0.6831625699996948, 0.14600911736488342, -0.45257464051246643, 0.8768062591552734, 0.3968609571456909, -0.12458976358175278, 0.4045811593532562, -0.6746790409088135, 0.07972228527069092, 0.3913944363594055, -0.1939314603805542, -0.05398636311292648, -0.1640091985464096, -0.05188961699604988, 0.24035577476024628, 0.46632370352745056, -0.7431427240371704, 0.09586896747350693, -0.37388697266578674, 0.6385290026664734, 0.4974254071712494, 0.12708091735839844, 0.13901567459106445, -0.31319138407707214, 0.38222575187683105, 0.3109467327594757, 0.5191501975059509, -0.4112791121006012, -0.5541577339172363, -0.9242461919784546, 0.04454292356967926, 0.2345767617225647, 0.7877930402755737, -0.6637964248657227, 0.32418033480644226, -0.40370503067970276, -0.9246270060539246, -0.8039809465408325, -0.36614447832107544, 0.18290311098098755, 0.2818617820739746, 0.34893304109573364, -0.26230186223983765, -0.36318129301071167, -0.8060625791549683, -0.3300331234931946, -0.04230177775025368, 0.07182545214891434, 0.33625784516334534, 0.6062697172164917, -0.22680583596229553, 0.7657606601715088, -0.429251104593277, -0.11300559341907501, -0.40563327074050903, 0.04585103318095207, 0.002332445001229644, 0.39971187710762024, 0.5858957767486572, -0.7115820050239563, -0.7387576103210449, -0.208515927195549, -0.5296446681022644, 0.2727987766265869, 0.07450882345438004, -0.059070806950330734, 0.1716129332780838, 0.20503781735897064, -0.7874577045440674, 0.6353652477264404, 0.4252232611179352, -0.43092888593673706, 0.26493534445762634, -0.1136513501405716, 0.09341628849506378, -1.587416410446167, 0.2330298125743866, -0.2109103500843048, -0.2542155683040619, -0.5889865159988403, -0.10029852390289307, 0.17380847036838531, -0.5118606090545654, -0.6350146532058716, 0.8511303067207336, -0.26205548644065857, 0.007524440530687571, -0.1937778890132904, -0.1080503910779953, -0.3913700580596924, 0.7426860928535461, -0.049396585673093796, 0.8448757529258728, 0.30335381627082825, -0.5754488706588745, 0.46097978949546814, 0.37584051489830017, -0.11026451736688614, 0.3205777406692505, -0.9818477630615234, 0.47291049361228943, -0.0353107750415802, 0.33140045404434204, -1.0532366037368774, -0.22498659789562225, 0.47703826427459717, -0.6879926919937134, 0.04036678001284599, 0.04724389687180519, -0.50251305103302, -0.6046181917190552, -0.018977999687194824, 0.36364230513572693, 0.6728882193565369, -0.5459208488464355, 0.3258918225765228, 0.31501781940460205, 0.2714330852031708, -0.5171197652816772, -0.5911225080490112, -0.009334666654467583, -0.1909329742193222, -0.7977314591407776, 0.2117260992527008, -0.19171027839183807, 0.17749707400798798, -0.09064245223999023, 0.1637558490037918, -0.36445143818855286, -0.04716654121875763, 0.1840578019618988, -0.07563155144453049, -0.025657370686531067, 0.1396275907754898, -0.1803201287984848, -0.10524380207061768, -0.07885618507862091, -0.25568458437919617, 0.7517098188400269, -0.16532959043979645, -0.05533386394381523, -0.728030264377594, 0.30752885341644287, 0.6903647184371948, -0.46464455127716064, 0.8146616220474243, 0.9949937462806702, -0.3340143859386444, -0.2160041630268097, -0.4171116352081299, -0.4548257291316986, -0.5157347321510315, 0.3754441440105438, -0.5427019596099854, -0.8940694332122803, 0.7890867590904236, 0.2528274655342102, 0.45267751812934875, 0.37443119287490845, 0.5644339323043823, 0.12921766936779022, 0.9919738173484802, 0.6178076267242432, 0.08344952762126923, 0.6916852593421936, -0.016022542491555214, 0.3860088884830475, -0.2523877024650574, -0.3768770396709442, -0.4423825442790985, -0.26743602752685547, -0.8390206098556519, -0.34349632263183594, 0.026712147518992424, -0.33647555112838745, -0.5635003447532654, 0.34754687547683716, -0.3943834900856018, 0.4255146384239197, 0.592434823513031, 0.16166800260543823, 0.06938894093036652, -0.3123858869075775, 0.01993248611688614, -0.004139526281505823, -0.7124496102333069, -0.4981207251548767, 1.182867407798767, 0.6569615006446838, 0.6738360524177551, -0.021808719262480736, 0.7346540689468384, 0.2127128690481186, 0.1894984394311905, -0.6990038752555847, 0.7102429866790771, 0.03106379508972168, -0.8271540999412537, -0.23449252545833588, -0.3564242422580719, -0.8434972167015076, -0.05493329465389252, 0.0405079610645771, -0.48688453435897827, -0.14592042565345764, 0.24253325164318085, -0.1852790266275406, 0.3618112802505493, -1.0110152959823608, 1.2700061798095703, -0.215596005320549, -0.23315683007240295, -0.1635468304157257, -0.7563231587409973, 0.6001703143119812, 0.11103671044111252, -0.18734776973724365, -0.07804931700229645, 0.09550148993730545, 0.6847071051597595, -0.562242329120636, 1.0362942218780518, -0.3921867907047272, 0.08865157514810562, 0.4276479482650757, 0.04260066896677017, 0.6130918264389038, -0.08202360570430756, 0.17776739597320557, 0.38278934359550476, 0.11484179645776749, -0.5494177937507629, -0.47380244731903076, 0.5332924723625183, -1.0514472723007202, -0.42722657322883606, -0.18755388259887695, -0.3785800039768219, -0.11153746396303177, 0.41486677527427673, 0.21094204485416412, 0.3215309679508209, -0.41562986373901367, 0.12530595064163208, 0.42296507954597473, -0.2943103015422821, 0.4971015751361847, 0.42054304480552673, -0.13835835456848145, -0.2748997211456299, 0.8636629581451416, -0.021042341366410255, 0.267010360956192, 0.43907493352890015, 0.04118135944008827, -0.3497644364833832, -0.20589730143547058, -0.3300653100013733, 0.2184601128101349, -0.6349513530731201, -0.009228093549609184, -0.6717630624771118, -0.45039430260658264, -0.3586917221546173, 0.187585711479187, -0.628341555595398, -0.23878280818462372, -0.23687057197093964, -0.11190995573997498, 0.3124670386314392, 0.5931321978569031, 0.3164927363395691, 0.4621663987636566, -0.9053059816360474, 0.07711353152990341, 0.20843221247196198, 0.46143731474876404, -0.03220485895872116, -0.3957052230834961, -0.2331540435552597, 0.21047170460224152, -0.4207402467727661, -0.8140872120857239, 0.4348953664302826, 0.08052612096071243, 0.4200589954853058, 0.4935598373413086, 0.1124081239104271, 0.6459897756576538, -0.38277480006217957, 0.9601021409034729, -0.023409496992826462, -0.9065352082252502, 0.4451042711734772, -0.41762569546699524, 0.4795738756656647, 0.2586866319179535, 0.4203057289123535, -0.7245489358901978, -0.26346567273139954, -0.8098856210708618, -0.4103279113769531, 0.8545836806297302, 0.09917955100536346, 0.2184143364429474, 0.11192373186349869, 0.3661979138851166, 0.22550366818904877, 0.14045311510562897, -0.6304532885551453, -0.17731158435344696, -0.4829663634300232, -0.44013163447380066, -0.01696459762752056, -0.3972938060760498, 0.13273151218891144, -0.18231523036956787, 0.3175329566001892, -0.0750298947095871, 0.8389602899551392, -0.273258775472641, 0.16806623339653015, 0.12465967983007431, 0.31778883934020996, 0.947670042514801, 0.5567963719367981, -0.3804447054862976, -0.17326274514198303, 0.232590451836586, -0.6214213371276855, -0.16606752574443817, 0.09772520512342453, -0.05333711951971054, -0.025907523930072784, 0.11743553727865219, 1.2256438732147217, 0.023553403094410896, -0.26847365498542786, 0.5292957425117493, -0.4011043608188629, -0.27727845311164856, -0.4672869145870209, 0.24175338447093964, 0.1367170512676239, 0.3318949341773987, 0.05041886121034622, 0.07451425492763519, -0.05804252624511719, -0.3657059371471405, -0.027214832603931427, 0.14755314588546753, -0.4172295331954956, -0.597137987613678, 0.888916552066803, 0.6002721190452576, -0.6262787580490112, 0.6685444116592407, -0.20903362333774567, -0.5862516164779663, 0.4821491837501526, 0.5075821876525879, 0.9638398289680481, -0.3917785882949829, 0.10280994325876236, 0.6387377381324768, 0.2159174382686615, 0.019827017560601234, 0.6215416789054871, -0.16376125812530518, -0.7968241572380066, -0.1449197381734848, -0.2796080410480499, -0.63655024766922, 0.19282197952270508, -0.32725101709365845, 0.5781223773956299, -0.4771862328052521, -0.13173355162143707, -0.1613091379404068, 0.26549792289733887, -0.9496154189109802, 0.2591193914413452, 0.10315758734941483, 1.0477904081344604, -0.5524671077728271, 1.117581844329834, 0.4417773485183716, -0.4699041247367859, -1.0405622720718384, 0.0907890647649765, -0.2951981723308563, -0.9329221248626709, 0.6773053407669067, 0.17606627941131592, 0.06295666098594666, 0.2259138971567154, -0.8766634464263916, -0.8033759593963623, 1.2595545053482056, 0.1521075963973999, -0.5768848657608032, -0.20222897827625275, 0.27171048521995544, 0.477835088968277, -0.34368303418159485, 0.6440382599830627, 0.28364279866218567, 0.29621055722236633, 0.42302876710891724, -1.3279675245285034, 0.08169890940189362, -0.24925017356872559, -0.08338691294193268, 0.10824704170227051, -1.096401572227478, 0.9587478637695312, -0.3796975612640381, -0.28359255194664, -0.20306476950645447, 0.5624527335166931, 0.15637986361980438, 0.2508789598941803, 0.37429359555244446, 0.23945318162441254, 0.8357857465744019, -0.1023719310760498, 0.8168990612030029, -0.6132487058639526, 0.4551742672920227, 0.868169367313385, -0.08856229484081268, 0.7156351804733276, 0.3005439043045044, 0.23864148557186127, 0.1725042313337326, 0.9400144219398499, -0.018253322690725327, 0.6170878410339355, -0.12438845634460449, 0.030372358858585358, -0.22203825414180756, 0.06456582993268967, -0.4589403569698334, 0.49342265725135803, 0.45783862471580505, -0.4275657534599304, -0.1348266452550888, -0.1580674797296524, 0.07013396918773651, -0.6674188375473022, -0.29892176389694214, 0.6914759874343872, 0.05906825512647629, -0.583288311958313, 0.6648977398872375, 0.29436594247817993, 0.6729228496551514, -0.5819647312164307, -0.025459257885813713, -0.3813900351524353, 0.588011622428894, -0.03300740569829941, -0.6837171316146851, 0.36941948533058167, -0.02644004113972187, 0.16765069961547852, -0.2035524994134903, 0.8813586831092834, -0.47907423973083496, -0.19580939412117004, 0.051637209951877594, 0.44318294525146484, 0.3706621825695038, 0.23709477484226227, -0.8479170799255371, 0.17263279855251312, 0.04434672370553017, -0.24553123116493225, -0.1082928404211998, 0.553814172744751, -0.20223943889141083, 0.8611743450164795, 0.41880014538764954, -0.27261823415756226, 0.05840566009283066, -0.04975398629903793, 0.742601752281189, -0.8470751047134399, -0.7866555452346802, -0.7471358180046082, 0.5688177943229675, -0.05646255239844322, -0.582789421081543, 0.68580561876297, 0.5026821494102478, 0.8285506367683411, -0.05907096713781357, 0.8919658064842224, -0.048932500183582306, 0.798579752445221, -0.08326330780982971, 0.8920270204544067, -0.565400242805481, 0.008660062216222286, 0.09308943152427673, -0.6981116533279419, -0.124263696372509, 0.4260263741016388, -0.353823721408844, 0.2922986149787903, 0.6540656089782715, 0.7022630572319031, -0.2901516258716583, 0.4004133939743042, 0.435456246137619, 0.22481513023376465, 0.6689200401306152, 0.8076685070991516, 0.5923721194267273, -0.5980784296989441, 0.8369434475898743, -0.045773617923259735, 0.08064544200897217, -0.4524134695529938, -0.453612357378006, -1.381754755973816, -0.5335981845855713, -0.11596471071243286, -0.2391931563615799, 0.1615111231803894, 0.922868549823761, 0.6472886204719543, -0.49970608949661255, -0.2686564028263092, -0.06580541282892227, -0.08985172212123871, 0.00675873551517725, -0.2428569346666336, 0.266107976436615, -0.3222537934780121, -0.7901888489723206, 0.0661814883351326, -0.2296569049358368, 0.2368408888578415, -0.3774131238460541, -0.13098135590553284, 0.05786459520459175, 0.09381558746099472, 0.35716813802719116, 0.22182349860668182, -0.45612606406211853, -0.4066714346408844, 0.22455649077892303, -0.25435173511505127, 0.1900513768196106, 0.46203961968421936, -0.41868627071380615, 0.25152820348739624, 0.4869464337825775, 0.3999619483947754, 0.7897176146507263, -0.04068591818213463, 0.6443257331848145, -0.6307790279388428, 0.27304863929748535, 0.3273349404335022, -0.022591646760702133, 0.2905149757862091, -0.19562368094921112, 0.37431156635284424, 0.25517624616622925, -0.5910080075263977, -0.745235025882721, 0.028587287291884422, -0.8254483342170715, 0.09196357429027557, 1.1293264627456665, -0.1701006144285202, -0.4360215961933136, -0.09752010554075241, -0.2756090760231018, 0.39733898639678955, -0.7050763964653015, 0.5365102887153625, 0.641886830329895, 0.15675152838230133, -0.5752751231193542, -0.6631470322608948, 0.5383208990097046, -0.06435329467058182, -0.8911657333374023, -0.13802647590637207, 0.10206147283315659, 0.6989525556564331, -0.2498740255832672, 0.90659499168396, 0.05343525856733322, 0.22037547826766968, 0.12797421216964722, 0.4819585978984833, -0.2759647071361542, -0.17677035927772522, -0.08422225713729858, 0.43374335765838623, -0.003949157893657684, -0.7489317059516907 ]
meta-llama/Llama-2-13b-chat-hf
meta-llama
"2023-11-13T16:33:19Z"
496,250
717
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "facebook", "meta", "llama-2", "en", "arxiv:2307.09288", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-13T15:11:20Z"
--- extra_gated_heading: Access Llama 2 on Hugging Face extra_gated_description: >- This is a form to enable access to Llama 2 on Hugging Face after you have been granted access from Meta. Please visit the [Meta website](https://ai.meta.com/resources/models-and-libraries/llama-downloads) and accept our license terms and acceptable use policy before submitting this form. Requests will be processed in 1-2 days. extra_gated_prompt: "**Your Hugging Face account email address MUST match the email you provide on the Meta website, or your request will not be approved.**" extra_gated_button_content: Submit extra_gated_fields: I agree to share my name, email address and username with Meta and confirm that I have already been granted download access on the Meta website: checkbox language: - en pipeline_tag: text-generation inference: false tags: - facebook - meta - pytorch - llama - llama-2 --- # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 13B fine-tuned model, optimized for dialogue use cases and converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/meta-llama/Llama-2-7b) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/meta-llama/Llama-2-13b) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)| |70B| [Link](https://huggingface.co/meta-llama/Llama-2-70b) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf)|
[ -0.22411900758743286, -0.7231478095054626, 0.37955737113952637, 0.19842921197414398, -0.3861837089061737, 0.24374514818191528, -0.05520285665988922, -0.7664205431938171, 0.06818750500679016, 0.3120318055152893, -0.729469895362854, -0.5716131329536438, -0.6865532398223877, 0.0724872499704361, -0.22579161822795868, 1.0996553897857666, -0.006935060024261475, -0.2914939820766449, -0.1265782117843628, 0.0958295539021492, -0.494672566652298, -0.39751240611076355, -0.5436388850212097, -0.4327237904071808, 0.39222967624664307, 0.49505946040153503, 0.6194522976875305, 0.6615982055664062, 0.555471658706665, 0.24898174405097961, -0.2706387937068939, 0.23658089339733124, -0.7364504337310791, -0.26518514752388, 0.13307614624500275, -0.5025309324264526, -0.6958234310150146, 0.1644921451807022, 0.3666435778141022, 0.1784830540418625, -0.2958018183708191, 0.5356918573379517, 0.07984569668769836, 0.4856489598751068, -0.571042537689209, 0.1814553439617157, -0.7548948526382446, 0.0325627475976944, -0.2214769870042801, -0.0815831795334816, -0.1971902847290039, -0.2950226664543152, -0.1978570818901062, -0.8488985896110535, -0.11725153774023056, 0.08846686035394669, 1.0669126510620117, 0.6642417907714844, -0.45678797364234924, -0.12194934487342834, -0.2938980162143707, 0.9713997840881348, -0.8728776574134827, 0.053350549191236496, 0.591232180595398, 0.2901577055454254, -0.24085485935211182, -0.7743299007415771, -0.6601689457893372, -0.14593958854675293, 0.06379339843988419, 0.36891746520996094, -0.42646491527557373, 0.01854642853140831, 0.1783110648393631, 0.3856116831302643, -0.5829885005950928, 0.5876314640045166, -0.517794668674469, -0.17897844314575195, 1.0769914388656616, 0.2537059783935547, -0.009819059632718563, -0.04943189024925232, -0.5013159513473511, -0.29322588443756104, -0.812534511089325, 0.18600906431674957, 0.5036495923995972, -0.038549575954675674, -0.47510939836502075, 0.6307752132415771, -0.435945600271225, 0.2971707582473755, 0.026361512020230293, -0.5279828310012817, 0.484253853559494, -0.4930696487426758, -0.2747870087623596, -0.1316511332988739, 0.9197813272476196, 0.7423796653747559, 0.15726184844970703, 0.10971475392580032, -0.0658164918422699, 0.1161779835820198, -0.019110003486275673, -0.8442601561546326, -0.054440706968307495, 0.25641757249832153, -0.3831857442855835, -0.6037280559539795, -0.3174498379230499, -0.7635250687599182, -0.16748212277889252, -0.10210928320884705, 0.24590936303138733, -0.04406919702887535, -0.3851282000541687, 0.12052334100008011, 0.05375177785754204, 0.5633088946342468, 0.22968393564224243, -0.975284993648529, 0.22856369614601135, 0.5810209512710571, 0.8031820058822632, -0.25201526284217834, -0.35518941283226013, 0.010666098445653915, -0.031964294612407684, -0.3276890516281128, 0.9303542971611023, -0.36201030015945435, -0.5496423244476318, -0.2298479825258255, -0.03188580647110939, 0.17001934349536896, -0.5237879753112793, 0.44016626477241516, -0.3950587213039398, 0.18488982319831848, -0.3359769582748413, -0.38308247923851013, -0.3393917977809906, 0.19919487833976746, -0.3969852030277252, 1.483850121498108, 0.11704211682081223, -0.4897008240222931, 0.3094784617424011, -0.694359302520752, -0.18090097606182098, -0.2025488018989563, 0.0935857817530632, -0.5409733057022095, -0.27595213055610657, 0.14317156374454498, 0.37314558029174805, -0.6661894917488098, 0.4868408441543579, -0.20742760598659515, -0.44874393939971924, 0.05052880942821503, -0.4298332631587982, 0.8528600335121155, 0.30102673172950745, -0.47336968779563904, 0.06896065920591354, -0.8459839820861816, 0.06629078090190887, 0.45773014426231384, -0.4880296587944031, 0.2813551425933838, 0.08471406996250153, -0.12283510714769363, 0.19114817678928375, 0.5058276057243347, -0.37618863582611084, 0.1672336310148239, -0.33449995517730713, 0.5109367966651917, 0.7661929726600647, 0.045254893600940704, 0.16987627744674683, -0.5285415053367615, 0.5297195315361023, -0.03893441706895828, 0.39552128314971924, 0.012945936061441898, -0.7365125417709351, -1.0487850904464722, -0.19871175289154053, -0.041524894535541534, 0.8662081956863403, -0.2580440044403076, 0.7101873159408569, -0.009932112880051136, -0.7601889967918396, -0.4319230616092682, 0.3763563334941864, 0.700067400932312, 0.5136132836341858, 0.43323227763175964, -0.2921903133392334, -0.6285722851753235, -1.0433322191238403, 0.05790672451257706, -0.45791810750961304, -0.023455636575818062, 0.3709334433078766, 0.659808874130249, -0.34526824951171875, 0.7535058856010437, -0.5579628348350525, -0.17572182416915894, -0.27374428510665894, -0.1325821727514267, 0.06861412525177002, 0.3546657860279083, 0.6659294366836548, -0.39053913950920105, -0.21951420605182648, -0.12601035833358765, -0.9134946465492249, -0.11109226942062378, 0.11342809349298477, -0.21195784211158752, 0.24243207275867462, 0.3207162618637085, -0.6236969828605652, 0.4653058648109436, 0.7285130620002747, -0.17841005325317383, 0.5346818566322327, 0.012242701835930347, -0.1783842146396637, -1.105076789855957, 0.03348887711763382, -0.20924140512943268, 0.03063029609620571, -0.4478011131286621, -0.043956659734249115, -0.22280041873455048, 0.07713013142347336, -0.6217108964920044, 0.6119337677955627, -0.31561917066574097, -0.1614101380109787, -0.13632577657699585, 0.059307295829057693, 0.060693368315696716, 0.6426140069961548, -0.134703129529953, 1.1046135425567627, 0.4065169095993042, -0.5930275321006775, 0.26677370071411133, 0.4082821011543274, -0.5187543034553528, 0.15862156450748444, -0.9000256061553955, 0.3705767095088959, 0.1181362196803093, 0.5456733703613281, -1.0144838094711304, -0.3935454189777374, 0.33383122086524963, -0.4428306221961975, 0.09625815600156784, 0.23275542259216309, -0.5638023614883423, -0.40013936161994934, -0.4390394687652588, 0.3177044093608856, 0.8385331034660339, -0.4637235403060913, 0.179544135928154, 0.3908999562263489, 0.01581873558461666, -0.704412043094635, -0.8441404104232788, 0.0613725408911705, -0.3673824965953827, -0.5468826293945312, 0.30740565061569214, -0.19155563414096832, -0.24167278409004211, -0.272122323513031, 0.07132292538881302, -0.005146586336195469, 0.38739603757858276, 0.3777199983596802, 0.376565158367157, -0.12361409515142441, -0.02765074372291565, 0.14899326860904694, -0.21006275713443756, 0.033992234617471695, 0.21425870060920715, 0.6042569875717163, -0.18230558931827545, -0.2341519445180893, -0.7624531388282776, 0.04356765374541283, 0.2948184311389923, -0.25398799777030945, 0.6193543076515198, 0.43509986996650696, -0.21908541023731232, 0.2401050329208374, -0.7960593104362488, -0.11717520654201508, -0.5481119155883789, 0.5625447034835815, -0.2155742347240448, -0.8574402928352356, 0.5493201613426208, -0.011842750944197178, 0.4562162160873413, 0.7534257769584656, 0.6405219435691833, -0.08731614798307419, 0.8326094746589661, 0.5748240351676941, -0.06818100064992905, 0.3532942533493042, -0.4982043206691742, -0.09640626609325409, -0.9718977808952332, -0.6360081434249878, -0.328223317861557, -0.4483097493648529, -0.6807751059532166, -0.43377238512039185, 0.27316296100616455, 0.19769145548343658, -0.6883984208106995, 0.32499071955680847, -0.5962187647819519, 0.589350700378418, 0.5443353652954102, 0.1332097202539444, 0.30960071086883545, 0.11127527803182602, 0.14390970766544342, 0.051506269723176956, -0.5349250435829163, -0.7593961358070374, 1.5006606578826904, 0.4372875392436981, 0.464252769947052, 0.10715362429618835, 0.6916555166244507, 0.1429935246706009, 0.3199618458747864, -0.7284038066864014, 0.6755449771881104, 0.05025631561875343, -0.7262415885925293, -0.16252291202545166, -0.11671680957078934, -0.9182713627815247, 0.15982428193092346, -0.21570192277431488, -0.8123987317085266, 0.02900063991546631, -0.021154439076781273, -0.3876926898956299, 0.2892662286758423, -0.6861406564712524, 0.6076078414916992, -0.5729665160179138, -0.32002896070480347, -0.36297762393951416, -0.8147221803665161, 0.701587438583374, -0.20058587193489075, 0.09873133152723312, -0.5183793902397156, -0.2669512927532196, 0.9164609909057617, -0.36104920506477356, 1.0324516296386719, -0.04245072230696678, -0.10428150743246078, 0.5891801118850708, -0.18264421820640564, 0.4685092866420746, 0.04011338949203491, -0.27324071526527405, 0.6805977821350098, -0.127741277217865, -0.32648739218711853, -0.1708715558052063, 0.5465031266212463, -1.2383370399475098, -0.8119980692863464, -0.5050196647644043, -0.5225595831871033, -0.042219117283821106, 0.08053915202617645, 0.5175559520721436, -0.09037600457668304, -0.037073541432619095, 0.12994994223117828, 0.4696650803089142, -0.5217117667198181, 0.47690191864967346, 0.5692270398139954, -0.10461623221635818, -0.4767818748950958, 0.6698008179664612, 0.046335745602846146, 0.37621667981147766, 0.22975818812847137, 0.040392838418483734, -0.41655755043029785, -0.438742071390152, -0.5195414423942566, 0.28008291125297546, -0.473742812871933, -0.5006641149520874, -0.550993800163269, -0.36758244037628174, -0.33742716908454895, -0.07243504375219345, -0.4535309970378876, -0.4554123878479004, -0.7653898000717163, -0.3925592303276062, 0.5376355648040771, 0.8301151394844055, -0.002158150542527437, 0.6526315808296204, -0.3294576108455658, 0.18569684028625488, 0.3869112730026245, 0.1856061965227127, -0.022794554010033607, -0.7865856289863586, 0.05851151421666145, 0.1393616944551468, -0.7838380336761475, -0.6245574355125427, 0.24739398062229156, 0.286742240190506, 0.4792134463787079, 0.4855819344520569, -0.07658737897872925, 0.8053569197654724, -0.3652134835720062, 1.1238349676132202, 0.3690214157104492, -0.677932858467102, 0.7229322791099548, -0.218017578125, 0.04917649179697037, 0.6508417725563049, 0.2614557147026062, -0.0876883789896965, -0.1712646633386612, -0.6505550146102905, -0.6948099732398987, 0.829218864440918, 0.24681170284748077, 0.1935814470052719, 0.05673617124557495, 0.4685552418231964, 0.055900830775499344, 0.11349333077669144, -0.8375837802886963, -0.3100031912326813, -0.27361828088760376, -0.10558847337961197, -0.20033837854862213, -0.5225263833999634, -0.07550086826086044, -0.3209145665168762, 0.6519749760627747, 0.04703332856297493, 0.35437673330307007, -0.13917754590511322, 0.027368586510419846, -0.1019718274474144, 0.05275619402527809, 0.7506772875785828, 0.4994051456451416, -0.26436078548431396, -0.1647273153066635, 0.6610435247421265, -0.6435436606407166, 0.34664276242256165, 0.011652001179754734, -0.130192831158638, -0.37850192189216614, 0.4167197346687317, 0.916163444519043, 0.27676454186439514, -0.7328493595123291, 0.3475531339645386, 0.14013636112213135, -0.3772035539150238, -0.4280683696269989, 0.3817055821418762, 0.08441509306430817, 0.34317874908447266, 0.2780100107192993, -0.14417299628257751, 0.09048442542552948, -0.5214998722076416, -0.12970851361751556, 0.40449652075767517, 0.12165176123380661, -0.43015557527542114, 1.0140089988708496, 0.3310208022594452, -0.2949286103248596, 0.5460048317909241, -0.17318321764469147, -0.3709506392478943, 0.920215904712677, 0.6424766778945923, 0.6666743159294128, -0.26764678955078125, 0.12325438857078552, 0.728832483291626, 0.45721617341041565, -0.23603518307209015, 0.2298130840063095, -0.015799161046743393, -0.5073961615562439, -0.2169804871082306, -0.713940441608429, -0.49126535654067993, 0.3637241721153259, -0.5807479023933411, 0.3179241120815277, -0.6439933180809021, -0.27528613805770874, -0.32742780447006226, 0.4716678559780121, -0.6931113600730896, 0.20472626388072968, 0.10861551016569138, 0.9443263411521912, -0.7315787672996521, 0.7760828733444214, 0.49434134364128113, -0.5044270753860474, -0.909263014793396, -0.30688372254371643, 0.2107572704553604, -1.2653453350067139, 0.5346747040748596, 0.37974557280540466, -0.06801952421665192, 0.1255647987127304, -0.773216187953949, -1.2466448545455933, 1.739625334739685, 0.46749061346054077, -0.7873051762580872, -0.022912828251719475, 0.34326669573783875, 0.5093489289283752, -0.12195700407028198, 0.47072261571884155, 0.8487865328788757, 0.4988960325717926, 0.13312432169914246, -1.085736870765686, 0.09526506066322327, -0.3650955557823181, -0.027352776378393173, -0.19825617969036102, -1.3452092409133911, 0.8233539462089539, -0.4006812274456024, -0.24137148261070251, 0.23277059197425842, 0.6567394733428955, 0.7038272023200989, 0.5592824816703796, 0.3545624911785126, 0.8076634407043457, 0.9340296983718872, -0.037777435034513474, 1.139650821685791, -0.37506401538848877, 0.1852533370256424, 0.9165144562721252, -0.30668148398399353, 0.9950404167175293, 0.23783527314662933, -0.6017765998840332, 0.6315104961395264, 1.0342224836349487, -0.025136606767773628, 0.6115813255310059, 0.06377869099378586, -0.1731182336807251, -0.1928308755159378, -0.1755944788455963, -0.6617417335510254, 0.5290665626525879, 0.258811891078949, -0.14205914735794067, -0.030034763738512993, -0.3429987132549286, 0.23467567563056946, -0.34033170342445374, -0.004507481120526791, 0.83921879529953, 0.1652689129114151, -0.6402609944343567, 0.9102743268013, 0.04354160651564598, 0.8681923747062683, -0.6698787212371826, 0.09296552836894989, -0.5404856204986572, 0.007045922335237265, -0.37739428877830505, -0.7186563014984131, 0.06790697574615479, 0.37626126408576965, -0.005594991147518158, -0.1019487977027893, 0.5634613633155823, 0.03567719832062721, -0.5758170485496521, 0.3552177846431732, 0.27969735860824585, 0.3659859299659729, 0.22361856698989868, -0.6967090964317322, 0.18516863882541656, 0.10027160495519638, -0.5544702410697937, 0.3942270278930664, 0.03663664311170578, -0.06188042834401131, 0.8147721886634827, 0.7632370591163635, -0.21110528707504272, 0.13299311697483063, -0.21493229269981384, 1.025582194328308, -0.5034314393997192, -0.2027762532234192, -0.778668999671936, 0.5446670055389404, 0.041649702936410904, -0.725028932094574, 0.5556786060333252, 0.6620872020721436, 0.7073475122451782, 0.28529611229896545, 0.6674686670303345, 0.08347699791193008, 0.3278515040874481, -0.5469563007354736, 0.6226080060005188, -0.7895078063011169, 0.39799490571022034, 0.07569482922554016, -0.9958539605140686, -0.06416594237089157, 0.6885747313499451, -0.24525779485702515, 0.045938774943351746, 0.3754272162914276, 0.8900288343429565, 0.17753581702709198, -0.1618463397026062, 0.1308283656835556, 0.1790839284658432, 0.36637118458747864, 0.9120561480522156, 0.8658313751220703, -0.6470180749893188, 0.7263544797897339, -0.38822680711746216, -0.25069335103034973, -0.28862321376800537, -0.7501332759857178, -0.9972681403160095, -0.27780574560165405, -0.2524668276309967, -0.1609148383140564, 0.0711209699511528, 0.7674132585525513, 0.5229897499084473, -0.5970174074172974, -0.3024309277534485, -0.07516230642795563, -0.08745957165956497, 0.037910398095846176, -0.1620059609413147, 0.3348211646080017, -0.12663234770298004, -0.6020407676696777, 0.5002388954162598, 0.016814952716231346, 0.20421797037124634, -0.3339708149433136, -0.27997133135795593, -0.19638729095458984, 0.16115672886371613, 0.6262640357017517, 0.2900542616844177, -0.9588967561721802, -0.23510773479938507, 0.04062163457274437, -0.14725466072559357, 0.12578940391540527, 0.019933529198169708, -0.7924222946166992, 0.10250219702720642, 0.1457654982805252, 0.39021414518356323, 0.6772260665893555, 0.0650503858923912, 0.06676575541496277, -0.5305444002151489, 0.46438029408454895, 0.012916622683405876, 0.14883777499198914, 0.30742934346199036, -0.4263710081577301, 0.808174192905426, 0.1452372670173645, -0.7180014848709106, -0.9724209308624268, 0.12092030048370361, -1.0699882507324219, -0.0018618102185428143, 1.4128047227859497, 0.011055233888328075, -0.11950076371431351, 0.19855143129825592, -0.22578072547912598, 0.3824441730976105, -0.39864420890808105, 0.8293258547782898, 0.58148592710495, -0.09007017314434052, -0.10147368162870407, -0.8027439713478088, 0.3615806996822357, 0.4105212390422821, -1.1141154766082764, -0.257159560918808, 0.47004571557044983, 0.49550729990005493, -0.09680164605379105, 0.7080464959144592, 0.023112740367650986, 0.24159003794193268, 0.07302732765674591, 0.10009082406759262, -0.25390538573265076, -0.15366069972515106, -0.10144571214914322, -0.2731969356536865, -0.05613603815436363, -0.22429399192333221 ]
facebook/dinov2-base
facebook
"2023-09-06T11:22:58Z"
486,115
19
transformers
[ "transformers", "pytorch", "safetensors", "dinov2", "feature-extraction", "dino", "vision", "arxiv:2304.07193", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2023-07-17T16:44:29Z"
--- license: apache-2.0 tags: - dino - vision --- # Vision Transformer (base-sized model) trained using DINOv2 Vision Transformer (ViT) model trained using the DINOv2 method. It was introduced in the paper [DINOv2: Learning Robust Visual Features without Supervision](https://arxiv.org/abs/2304.07193) by Oquab et al. and first released in [this repository](https://github.com/facebookresearch/dinov2). Disclaimer: The team releasing DINOv2 did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a self-supervised fashion. Images are presented to the model as a sequence of fixed-size patches, which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. Note that this model does not include any fine-tuned heads. By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image. ## Intended uses & limitations You can use the raw model for feature extraction. See the [model hub](https://huggingface.co/models?search=facebook/dinov2) to look for fine-tuned versions on a task that interests you. ### How to use Here is how to use this model: ```python from transformers import AutoImageProcessor, AutoModel from PIL import Image import requests url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) processor = AutoImageProcessor.from_pretrained('facebook/dinov2-base') model = AutoModel.from_pretrained('facebook/dinov2-base') inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) last_hidden_states = outputs.last_hidden_state ``` ### BibTeX entry and citation info ```bibtex misc{oquab2023dinov2, title={DINOv2: Learning Robust Visual Features without Supervision}, author={Maxime Oquab and Timothée Darcet and Théo Moutakanni and Huy Vo and Marc Szafraniec and Vasil Khalidov and Pierre Fernandez and Daniel Haziza and Francisco Massa and Alaaeldin El-Nouby and Mahmoud Assran and Nicolas Ballas and Wojciech Galuba and Russell Howes and Po-Yao Huang and Shang-Wen Li and Ishan Misra and Michael Rabbat and Vasu Sharma and Gabriel Synnaeve and Hu Xu and Hervé Jegou and Julien Mairal and Patrick Labatut and Armand Joulin and Piotr Bojanowski}, year={2023}, eprint={2304.07193}, archivePrefix={arXiv}, primaryClass={cs.CV} } ```
[ -0.48810452222824097, -0.41177278757095337, 0.08763343840837479, -0.12204845994710922, -0.48818618059158325, -0.043550144881010056, 0.11337156593799591, -0.4105469584465027, 0.26083534955978394, 0.5072182416915894, -0.46724557876586914, -0.23726582527160645, -0.683699369430542, -0.18571630120277405, -0.45066335797309875, 0.8885810971260071, -0.0076238918118178844, -0.09103026241064072, -0.27932801842689514, -0.02842012234032154, -0.23601795732975006, -0.46855586767196655, -0.48980554938316345, -0.38384994864463806, 0.33097681403160095, 0.0765884518623352, 0.7140654921531677, 1.0158929824829102, 0.44936543703079224, 0.4041600227355957, -0.12778308987617493, 0.015697361901402473, -0.5499012470245361, -0.19995535910129547, -0.27038294076919556, -0.5100665092468262, -0.3177569508552551, 0.12035705149173737, 0.5295772552490234, 0.38492920994758606, 0.2577977180480957, 0.32482919096946716, 0.11951923370361328, 0.1356644183397293, -0.5830623507499695, 0.47757819294929504, -0.4627712070941925, 0.3518483340740204, -0.0611640103161335, -0.017391487956047058, -0.286416232585907, -0.3884165585041046, 0.26213696599006653, -0.47137555480003357, 0.16691944003105164, -0.08974987268447876, 1.33150053024292, 0.3057778477668762, -0.4923773407936096, -0.04845297336578369, -0.5957175493240356, 0.7987287044525146, -0.2447662204504013, 0.3663029670715332, 0.17849908769130707, 0.3483184278011322, 0.0705983117222786, -1.1227489709854126, -0.6370975971221924, 0.04223159700632095, -0.17448952794075012, 0.005639609880745411, -0.24821239709854126, -0.027295727282762527, 0.33156782388687134, 0.37192031741142273, -0.15649649500846863, 0.13603118062019348, -0.5049367547035217, -0.4835595488548279, 0.36640024185180664, -0.12127190828323364, 0.1678226888179779, -0.4055674970149994, -0.6749058961868286, -0.43943288922309875, -0.37033069133758545, 0.44475799798965454, 0.17083615064620972, 0.09755425155162811, -0.16722270846366882, 0.6173771023750305, 0.08450748026371002, 0.5355184078216553, 0.3210209906101227, -0.15021878480911255, 0.5759568810462952, -0.2842980623245239, -0.2679714262485504, -0.22035469114780426, 0.7987968325614929, 0.2733931541442871, 0.3366159200668335, 0.015119529329240322, -0.3386543095111847, 0.09568329900503159, 0.27966102957725525, -0.9261171221733093, -0.29746830463409424, -0.1285959780216217, -0.6054391860961914, -0.5431371927261353, 0.27749407291412354, -0.7066390514373779, -0.15727190673351288, -0.27753472328186035, 0.6975135207176208, -0.2825990915298462, -0.3703863024711609, -0.4514527916908264, -0.047283824533224106, 0.7318876385688782, 0.09531398862600327, -0.9481788277626038, 0.35194313526153564, 0.5091970562934875, 0.8887380957603455, -0.07990370690822601, -0.17496517300605774, -0.3078395426273346, -0.14454063773155212, -0.501828134059906, 0.694428563117981, -0.33054685592651367, -0.22971226274967194, 0.19010832905769348, 0.5118855237960815, 0.02637719362974167, -0.47812530398368835, 0.4030640125274658, -0.3477165400981903, 0.21095064282417297, -0.3703117072582245, -0.27690741419792175, -0.32321709394454956, 0.14084573090076447, -0.6568107008934021, 1.1558918952941895, 0.38412007689476013, -0.7626136541366577, 0.575846254825592, -0.4830562472343445, -0.2201044112443924, 0.033200863748788834, -0.1446312963962555, -0.6874642968177795, -0.09452863037586212, 0.45386457443237305, 0.4990074336528778, 0.14174290001392365, -0.1697395294904709, -0.3643922805786133, -0.478162944316864, 0.27861830592155457, -0.09326428920030594, 0.8702033162117004, 0.1719551533460617, -0.33285948634147644, 0.15796548128128052, -0.6512983441352844, -0.010456359945237637, 0.23329037427902222, -0.33787405490875244, -0.0849977657198906, -0.1911836564540863, 0.17308644950389862, 0.3325938582420349, 0.35904479026794434, -0.6455144882202148, 0.19040197134017944, -0.3563924729824066, 0.6007167100906372, 0.8157503008842468, -0.05616425350308418, 0.5783741474151611, -0.13175126910209656, 0.36662372946739197, 0.12420367449522018, 0.5123102068901062, -0.41617318987846375, -0.5694791674613953, -0.7566354870796204, -0.2942066490650177, 0.3210228979587555, 0.5058748126029968, -0.8869251012802124, 0.558341920375824, -0.17965161800384521, -0.28498375415802, -0.4580155313014984, 0.21905067563056946, 0.4597046971321106, 0.605688214302063, 0.3389734625816345, -0.5747568011283875, -0.5360109806060791, -0.8875887989997864, 0.2226969599723816, -0.02706635184586048, 0.033447954803705215, 0.2868918180465698, 0.6736894249916077, -0.2909415364265442, 1.015205979347229, -0.14853058755397797, -0.21485048532485962, -0.08509334921836853, 0.002317742444574833, 0.19507691264152527, 0.7036994099617004, 0.7628956437110901, -0.9157757759094238, -0.2868940234184265, -0.07001335918903351, -0.8739567399024963, 0.18286773562431335, 0.07037430256605148, -0.19738982617855072, 0.02001979947090149, 0.30095234513282776, -0.7692724466323853, 0.7505541443824768, 0.16440679132938385, -0.17769090831279755, 0.1787438690662384, -0.06239548698067665, -0.02224048599600792, -1.1501892805099487, -0.0027412299532443285, -0.04672957956790924, -0.44840532541275024, -0.5225821733474731, 0.16450189054012299, 0.17564794421195984, -0.16219662129878998, -0.4846011698246002, 0.37694352865219116, -0.5006304979324341, -0.4325377941131592, -0.256244957447052, -0.2161121964454651, 0.0025199162773787975, 0.5316950082778931, -0.021342501044273376, 0.40583303570747375, 0.8551651835441589, -0.3991875648498535, 0.7177274823188782, 0.43799063563346863, -0.4010489583015442, 0.4319800138473511, -0.6624981164932251, 0.37350916862487793, -0.171731099486351, 0.11596157401800156, -0.9675129652023315, -0.42488574981689453, 0.4102693200111389, -0.48947834968566895, 0.5753076076507568, -0.3649682402610779, -0.4582888185977936, -0.8306283950805664, -0.2910362184047699, 0.3047027289867401, 0.8143191337585449, -0.7787280678749084, 0.5615065693855286, 0.3537156879901886, 0.2429979145526886, -0.8500447869300842, -0.9810003042221069, -0.12830235064029694, -0.11438661813735962, -0.4320938289165497, 0.3564101755619049, 0.2941254675388336, 0.2829209268093109, 0.3710278868675232, -0.12187561392784119, -0.26096290349960327, -0.21942231059074402, 0.5881665945053101, 0.28324663639068604, -0.3575100302696228, -0.017623592168092728, -0.12134544551372528, -0.16369320452213287, 0.04723508283495903, -0.46919333934783936, 0.5598667860031128, -0.2542588710784912, -0.32993102073669434, -0.7640473246574402, 0.07604872435331345, 0.6036674380302429, -0.32365652918815613, 0.5207828283309937, 0.955007791519165, -0.6918035745620728, -0.1316465437412262, -0.33863264322280884, -0.16576343774795532, -0.531700611114502, 0.4212090075016022, -0.3792869746685028, -0.6072700619697571, 0.8115391731262207, -0.06269051879644394, -0.2540018558502197, 0.44845280051231384, 0.5277825593948364, -0.16408954560756683, 0.8594955801963806, 0.898013710975647, 0.011473369784653187, 0.7460606098175049, -0.7570633292198181, 0.07522513717412949, -0.7002325057983398, -0.6872498989105225, -0.030292261391878128, -0.3680371642112732, -0.3970290720462799, -0.4549819231033325, 0.07585708051919937, 0.37353983521461487, -0.20746350288391113, 0.6451157927513123, -0.6586763262748718, 0.40489649772644043, 0.7993831634521484, 0.5256783366203308, -0.33599913120269775, 0.14775553345680237, -0.25004011392593384, 0.013979782350361347, -0.5851411819458008, -0.13305354118347168, 1.0176310539245605, 0.5567333102226257, 0.7998283505439758, -0.192146435379982, 0.6241308450698853, 0.1330600529909134, 0.009838581085205078, -0.9387292861938477, 0.5146515369415283, -0.10125567764043808, -0.5236199498176575, -0.17073661088943481, -0.15945163369178772, -0.8863838315010071, -0.04737007990479469, -0.441984087228775, -0.7762179970741272, 0.658412516117096, 0.2800693213939667, -0.4260556101799011, 0.32335537672042847, -0.5980218648910522, 0.9670633673667908, -0.2102813869714737, -0.27934902906417847, 0.12221874296665192, -0.6079144477844238, 0.17864087224006653, -0.10928281396627426, -0.19062800705432892, 0.28122082352638245, 0.21585744619369507, 0.6363463401794434, -0.5921320915222168, 1.0203670263290405, -0.420567125082016, 0.3431521952152252, 0.5616651177406311, -0.15399473905563354, 0.39215216040611267, -0.09419276565313339, 0.41119226813316345, 0.1982734352350235, -0.044274765998125076, -0.5011021494865417, -0.5670992136001587, 0.45008838176727295, -1.0215513706207275, -0.3801286816596985, -0.3424943685531616, -0.2865428030490875, 0.2846222221851349, 0.39218100905418396, 0.6515254974365234, 0.6291112899780273, 0.1538657397031784, 0.42419394850730896, 0.618304967880249, -0.3246164321899414, 0.5889264345169067, -0.22426621615886688, -0.3302376866340637, -0.3746686577796936, 0.8024227023124695, 0.31136953830718994, 0.14456456899642944, 0.27545392513275146, 0.13617588579654694, -0.37633123993873596, -0.3887557089328766, -0.35280781984329224, 0.058096375316381454, -0.9989383220672607, -0.27938804030418396, -0.46783819794654846, -0.6417673230171204, -0.5400452613830566, -0.16039790213108063, -0.5481629371643066, -0.3898501992225647, -0.5048350691795349, -0.2819351255893707, 0.2866038382053375, 0.8288319110870361, -0.33941513299942017, 0.5519880056381226, -0.38277319073677063, 0.29025107622146606, 0.8108200430870056, 0.18361429870128632, -0.1282961368560791, -0.6165159344673157, -0.24930697679519653, -0.01824389211833477, -0.17227470874786377, -0.6443899273872375, 0.4595893919467926, 0.32912641763687134, 0.8510187268257141, 0.7928959131240845, -0.3783619999885559, 0.7773064374923706, -0.28496068716049194, 0.7316399812698364, 0.3417636454105377, -0.8522929549217224, 0.6455761194229126, -0.14406894147396088, 0.14371666312217712, 0.16407106816768646, 0.47836193442344666, 0.027981743216514587, 0.210010826587677, -0.47855710983276367, -0.6342190504074097, 0.7309988737106323, 0.14954663813114166, 0.32645174860954285, 0.10156183689832687, 0.6642941236495972, -0.07217840850353241, 0.07411090284585953, -0.9260256886482239, -0.18324987590312958, -0.9844238758087158, -0.1293736696243286, 0.22865839302539825, -0.3700850009918213, -0.06853493303060532, -0.5290236473083496, 0.17520761489868164, -0.10497654229402542, 0.7270318865776062, 0.20574431121349335, -0.27386483550071716, -0.21819743514060974, -0.4378681778907776, 0.1700795590877533, 0.5527039766311646, -0.3998474180698395, 0.1821301281452179, 0.08275789022445679, -0.5680407285690308, -0.09625077992677689, 0.11919787526130676, -0.20535694062709808, -0.07547099143266678, 0.5076502561569214, 0.9342438578605652, 0.1771029829978943, -0.020797014236450195, 0.9463668465614319, 0.19542837142944336, -0.21965540945529938, -0.47712692618370056, 0.13964952528476715, -0.15617434680461884, 0.5383236408233643, 0.3975133001804352, 0.36798787117004395, -0.058980390429496765, -0.6942687034606934, 0.5417995452880859, 0.3058128356933594, -0.6556556820869446, -0.5439690351486206, 0.8274326920509338, -0.07446274161338806, -0.2026049941778183, 0.63007652759552, -0.1730162799358368, -0.6723873019218445, 0.8339832425117493, 0.6248137354850769, 0.6756560206413269, -0.37141138315200806, 0.24350935220718384, 0.5069293975830078, 0.30527299642562866, -0.04766673222184181, 0.25097984075546265, -0.18573050200939178, -0.9106141924858093, -0.4209188222885132, -0.6434176564216614, -0.06886862963438034, 0.17368946969509125, -0.8264222145080566, 0.37051156163215637, -0.6995818018913269, -0.383545458316803, 0.214287668466568, -0.20791631937026978, -1.06334388256073, 0.25897303223609924, 0.5139025449752808, 0.6583969593048096, -0.8264069557189941, 1.099664568901062, 0.6935000419616699, -0.5789739489555359, -0.7192277908325195, -0.26800084114074707, 0.003934909589588642, -1.0478781461715698, 0.8491621613502502, 0.361224889755249, 0.06740383058786392, 0.04778299853205681, -0.8975068926811218, -1.062114953994751, 1.188573956489563, 0.31136804819107056, -0.19226059317588806, -0.10187605023384094, 0.09758654981851578, 0.41253820061683655, -0.5851868391036987, 0.29517316818237305, 0.024953067302703857, 0.08798716217279434, 0.49430182576179504, -0.7265412211418152, -0.020383616909384727, -0.33652999997138977, 0.30886906385421753, -0.18279103934764862, -0.71004718542099, 1.1618852615356445, -0.2118580937385559, -0.20826201140880585, 0.1054459810256958, 0.6426683068275452, -0.2817958891391754, -0.04048527777194977, 0.6250460147857666, 0.6006384491920471, 0.566275417804718, -0.21361668407917023, 0.9261928796768188, -0.05372587591409683, 0.6328034996986389, 0.7477078437805176, 0.14326788485050201, 0.6708106398582458, 0.24952320754528046, -0.05968671292066574, 0.6433484554290771, 0.8710874915122986, -0.5533469915390015, 0.9349480271339417, -0.04586634412407875, 0.16558228433132172, -0.26884621381759644, 0.06515619903802872, -0.34874850511550903, 0.6769075393676758, 0.4306991994380951, -0.6467826962471008, -0.09138577431440353, 0.27265676856040955, -0.1536361575126648, -0.3091902434825897, -0.4246205985546112, 0.6202539205551147, 0.11203144490718842, -0.35547322034835815, 0.6636255979537964, -0.2755829095840454, 0.49088969826698303, -0.4160069525241852, -0.17421986162662506, -0.16920523345470428, 0.28217923641204834, -0.33960026502609253, -0.828618586063385, 0.16850519180297852, -0.12013013660907745, -0.07048370689153671, -0.06881163269281387, 0.8914832472801208, -0.23224538564682007, -0.6010157465934753, 0.3753240704536438, 0.16997188329696655, 0.23088237643241882, 0.2062503546476364, -0.8096352815628052, -0.24163055419921875, -0.07276710867881775, -0.46234455704689026, 0.1542254090309143, 0.39383170008659363, -0.02327216975390911, 0.6194381713867188, 0.7080084085464478, -0.14116612076759338, 0.41065356135368347, 0.02364257723093033, 1.1792799234390259, -0.522840678691864, -0.4570762813091278, -0.6925605535507202, 0.6133028268814087, -0.2821384370326996, -0.28337007761001587, 0.5821030735969543, 0.33268624544143677, 0.9529245495796204, -0.07857641577720642, 0.5051029920578003, -0.1594277322292328, 0.20379824936389923, -0.3279496729373932, 0.6546130776405334, -0.3489950895309448, -0.18572105467319489, -0.1761804074048996, -1.087866187095642, -0.26171639561653137, 0.9091438055038452, -0.008879339322447777, 0.010273902676999569, 0.4676302969455719, 0.7812284231185913, -0.3224134147167206, -0.3228124976158142, 0.26812252402305603, 0.394618421792984, 0.07247231900691986, 0.36509886384010315, 0.8188058137893677, -0.5268466472625732, 0.5986992716789246, -0.6297328472137451, -0.37296509742736816, -0.10674263536930084, -0.6620378494262695, -1.275937795639038, -0.5863494873046875, -0.2958822250366211, -0.4778464436531067, -0.024837225675582886, 0.724361777305603, 1.1424708366394043, -0.9851154088973999, 0.16806045174598694, -0.00610498059540987, -0.06321040540933609, -0.22935669124126434, -0.16225403547286987, 0.5722346305847168, -0.06625755876302719, -0.6797324419021606, 0.07448595017194748, 0.09640329331159592, 0.23993796110153198, -0.3380718529224396, 0.06918215751647949, -0.022316111251711845, -0.12859024107456207, 0.5209636092185974, 0.3599252700805664, -0.747032642364502, -0.6684685349464417, -0.036850277334451675, 0.013539614155888557, 0.3530481457710266, 0.4572933614253998, -0.9545019865036011, 0.6589811444282532, 0.44445791840553284, 0.4662977159023285, 0.8944989442825317, 0.05629366636276245, 0.27282634377479553, -0.7700251340866089, 0.41385483741760254, -0.022877896204590797, 0.576335608959198, 0.3741464614868164, -0.382224440574646, 0.39455729722976685, 0.5136586427688599, -0.42940694093704224, -0.7688958048820496, 0.20199459791183472, -1.1897528171539307, -0.12346959114074707, 0.8848477602005005, -0.5154163837432861, -0.5548035502433777, 0.09763763099908829, -0.03174031525850296, 0.5705158114433289, -0.043940089643001556, 0.5448285937309265, 0.3120496869087219, 0.05458441749215126, -0.6254149675369263, -0.3867773711681366, 0.46874576807022095, -0.21607756614685059, -0.381727010011673, -0.6077635288238525, -0.009124803356826305, 0.4084877669811249, 0.3887164890766144, 0.18050849437713623, -0.3915708065032959, 0.17766056954860687, 0.34610089659690857, 0.2613910436630249, -0.2587027847766876, -0.3282318115234375, -0.317066490650177, 0.0915641039609909, -0.3036464750766754, -0.7210920453071594 ]
Salesforce/blip-image-captioning-base
Salesforce
"2023-08-01T14:46:56Z"
477,704
271
transformers
[ "transformers", "pytorch", "tf", "blip", "text2text-generation", "image-captioning", "image-to-text", "arxiv:2201.12086", "license:bsd-3-clause", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
image-to-text
"2022-12-12T15:19:02Z"
--- pipeline_tag: image-to-text tags: - image-captioning languages: - en license: bsd-3-clause --- # BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation Model card for image captioning pretrained on COCO dataset - base architecture (with ViT base backbone). | ![BLIP.gif](https://cdn-uploads.huggingface.co/production/uploads/1670928184033-62441d1d9fdefb55a0b7d12c.gif) | |:--:| | <b> Pull figure from BLIP official repo | Image source: https://github.com/salesforce/BLIP </b>| ## TL;DR Authors from the [paper](https://arxiv.org/abs/2201.12086) write in the abstract: *Vision-Language Pre-training (VLP) has advanced the performance for many vision-language tasks. However, most existing pre-trained models only excel in either understanding-based tasks or generation-based tasks. Furthermore, performance improvement has been largely achieved by scaling up the dataset with noisy image-text pairs collected from the web, which is a suboptimal source of supervision. In this paper, we propose BLIP, a new VLP framework which transfers flexibly to both vision-language understanding and generation tasks. BLIP effectively utilizes the noisy web data by bootstrapping the captions, where a captioner generates synthetic captions and a filter removes the noisy ones. We achieve state-of-the-art results on a wide range of vision-language tasks, such as image-text retrieval (+2.7% in average recall@1), image captioning (+2.8% in CIDEr), and VQA (+1.6% in VQA score). BLIP also demonstrates strong generalization ability when directly transferred to videolanguage tasks in a zero-shot manner. Code, models, and datasets are released.* ## Usage You can use this model for conditional and un-conditional image captioning ### Using the Pytorch model #### Running the model on CPU <details> <summary> Click to expand </summary> ```python import requests from PIL import Image from transformers import BlipProcessor, BlipForConditionalGeneration processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base") model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') # conditional image captioning text = "a photography of" inputs = processor(raw_image, text, return_tensors="pt") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) # >>> a photography of a woman and her dog # unconditional image captioning inputs = processor(raw_image, return_tensors="pt") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) >>> a woman sitting on the beach with her dog ``` </details> #### Running the model on GPU ##### In full precision <details> <summary> Click to expand </summary> ```python import requests from PIL import Image from transformers import BlipProcessor, BlipForConditionalGeneration processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base") model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base").to("cuda") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') # conditional image captioning text = "a photography of" inputs = processor(raw_image, text, return_tensors="pt").to("cuda") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) # >>> a photography of a woman and her dog # unconditional image captioning inputs = processor(raw_image, return_tensors="pt").to("cuda") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) >>> a woman sitting on the beach with her dog ``` </details> ##### In half precision (`float16`) <details> <summary> Click to expand </summary> ```python import torch import requests from PIL import Image from transformers import BlipProcessor, BlipForConditionalGeneration processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base") model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base", torch_dtype=torch.float16).to("cuda") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') # conditional image captioning text = "a photography of" inputs = processor(raw_image, text, return_tensors="pt").to("cuda", torch.float16) out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) # >>> a photography of a woman and her dog # unconditional image captioning inputs = processor(raw_image, return_tensors="pt").to("cuda", torch.float16) out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) >>> a woman sitting on the beach with her dog ``` </details> ## BibTex and citation info ``` @misc{https://doi.org/10.48550/arxiv.2201.12086, doi = {10.48550/ARXIV.2201.12086}, url = {https://arxiv.org/abs/2201.12086}, author = {Li, Junnan and Li, Dongxu and Xiong, Caiming and Hoi, Steven}, keywords = {Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
[ -0.19860166311264038, -0.4751010835170746, -0.05053563416004181, 0.5032138824462891, -0.5717283487319946, 0.009829656220972538, -0.3683491051197052, -0.6447540521621704, -0.11267666518688202, 0.2696411907672882, -0.40493538975715637, -0.42735525965690613, -0.5415499210357666, 0.10292522609233856, -0.1438620686531067, 0.6845402717590332, 0.18561811745166779, 0.13735488057136536, -0.23378311097621918, -0.04034072905778885, -0.21110443770885468, -0.24179750680923462, -0.5235323905944824, 0.0155419846996665, 0.002862493274733424, 0.18168312311172485, 0.6258307695388794, 0.5628660917282104, 0.7333972454071045, 0.3764173090457916, -0.06890100240707397, 0.21063624322414398, -0.21851325035095215, -0.45668065547943115, -0.12835513055324554, -0.8092272877693176, -0.14010994136333466, 0.06621313840150833, 0.5738380551338196, 0.545951783657074, 0.02239169180393219, 0.3842051923274994, -0.08264180272817612, 0.5554538369178772, -0.7402557730674744, 0.4780533015727997, -0.698917031288147, 0.10423585772514343, -0.0541323758661747, -0.2672572135925293, -0.38336992263793945, -0.06264665722846985, 0.08934016525745392, -0.889163613319397, 0.6076919436454773, 0.266066312789917, 1.7062315940856934, 0.41300052404403687, 0.25835493206977844, -0.21572375297546387, -0.2801303267478943, 0.8788119554519653, -0.7471790909767151, 0.33080339431762695, 0.09051783382892609, 0.1850125640630722, 0.0839150995016098, -0.9131094813346863, -0.824426531791687, -0.33166342973709106, -0.27365002036094666, 0.36280980706214905, -0.34588268399238586, -0.010530744679272175, 0.358539879322052, 0.4432380795478821, -0.5148075222969055, -0.06846412271261215, -0.8126832842826843, -0.26880475878715515, 0.5564901232719421, -0.1173190101981163, 0.4039912521839142, -0.39272743463516235, -0.5182430744171143, -0.3403438925743103, -0.5830768942832947, 0.3653489649295807, -0.058564383536577225, 0.16828307509422302, -0.62911057472229, 0.7101975679397583, -0.10499230772256851, 0.8794392347335815, 0.24206630885601044, -0.23542368412017822, 0.6706618666648865, -0.28533342480659485, -0.40837159752845764, -0.14090703427791595, 1.1250633001327515, 0.8025946617126465, 0.2986740171909332, -0.04098723828792572, 0.007583860773593187, 0.1133093535900116, -0.004455258138477802, -0.8578153252601624, -0.3671233355998993, 0.3250507414340973, -0.4518536925315857, -0.38249266147613525, 0.1631120890378952, -0.9197694063186646, -0.2671705186367035, 0.0703282356262207, 0.47026458382606506, -0.4529791474342346, -0.1369103640317917, 0.24853119254112244, -0.3517285883426666, 0.3923540711402893, 0.31653934717178345, -0.9136064648628235, -0.06060269847512245, 0.2533586919307709, 1.1009485721588135, 0.09919211268424988, -0.6765924096107483, -0.44200587272644043, 0.18386097252368927, -0.3171665668487549, 0.5475085377693176, -0.026762714609503746, -0.051947884261608124, 0.01232211198657751, 0.27090179920196533, -0.07395321875810623, -0.5020723342895508, 0.030321907252073288, -0.29409274458885193, 0.2155752182006836, -0.026844527572393417, -0.16890567541122437, -0.35774022340774536, 0.21947431564331055, -0.5177518129348755, 0.8329867720603943, 0.03915341943502426, -0.9227216243743896, 0.5156374573707581, -0.6392310261726379, -0.408296674489975, 0.3106665313243866, -0.25908759236335754, -0.6740828156471252, -0.0925888940691948, 0.4873954653739929, 0.46151983737945557, -0.3327154517173767, 0.043575093150138855, -0.10405581444501877, -0.33568546175956726, 0.283717542886734, -0.22922052443027496, 1.0919846296310425, -0.02528182417154312, -0.6557186841964722, 0.030990278348326683, -0.7277938723564148, -0.19033151865005493, 0.3800446689128876, -0.3717147707939148, 0.018798626959323883, -0.13578498363494873, 0.17432311177253723, 0.17366456985473633, 0.5784333944320679, -0.6294918060302734, 0.026984382420778275, -0.449150949716568, 0.6756691336631775, 0.4685184955596924, -0.21060460805892944, 0.38308998942375183, -0.13713835179805756, 0.39506322145462036, 0.19908355176448822, 0.30301016569137573, -0.44166600704193115, -0.5266672968864441, -0.9662011861801147, -0.3985169231891632, 0.015749149024486542, 0.5843508243560791, -0.9405583739280701, 0.3482062816619873, -0.35279667377471924, -0.5069956183433533, -0.7350081205368042, 0.11949225515127182, 0.775883138179779, 0.8079473972320557, 0.5733144879341125, -0.4637395739555359, -0.5612966418266296, -0.8281957507133484, 0.27403146028518677, -0.27052196860313416, 0.025920644402503967, 0.341889351606369, 0.6077157258987427, -0.11127063632011414, 0.7543554306030273, -0.5701547265052795, -0.37464800477027893, -0.3276655077934265, 0.13679224252700806, 0.3576323986053467, 0.7482001185417175, 0.708914577960968, -0.8859795928001404, -0.34922486543655396, 0.051860079169273376, -0.8740875720977783, 0.08311398327350616, -0.251537561416626, -0.10516460239887238, 0.5936576128005981, 0.5150469541549683, -0.8495690822601318, 0.5402031540870667, 0.450344443321228, -0.14680685102939606, 0.8174095749855042, -0.28029128909111023, 0.007538448553532362, -0.8833699822425842, 0.3979834020137787, 0.1399957835674286, -0.11723523586988449, -0.23200349509716034, 0.1833934187889099, 0.19551719725131989, -0.01710435375571251, -0.6817994117736816, 0.5863396525382996, -0.6947875618934631, -0.2474879026412964, 0.09197919815778732, -0.03936873748898506, 0.1542009860277176, 0.7209392786026001, 0.443230003118515, 0.7617124915122986, 1.078347086906433, -0.6179822683334351, 0.4848061203956604, 0.54007488489151, -0.3945326507091522, 0.3257611393928528, -0.8022859692573547, -0.14543095231056213, -0.03497195243835449, -0.13524337112903595, -1.194205641746521, -0.16641667485237122, 0.36000141501426697, -0.7829070687294006, 0.3021111786365509, -0.35803088545799255, -0.43357717990875244, -0.7298885583877563, -0.3172121047973633, 0.20601417124271393, 0.40375229716300964, -0.7104002833366394, 0.35160496830940247, 0.1069975420832634, 0.09491471946239471, -0.9017753005027771, -1.2171565294265747, 0.15830788016319275, 0.14763623476028442, -0.6153476238250732, 0.5192694664001465, 0.03317652642726898, 0.20094697177410126, 0.1490904837846756, 0.11585315316915512, 0.018207432702183723, -0.3613496720790863, 0.3170470595359802, 0.5813201069831848, -0.35979244112968445, -0.21218417584896088, -0.3423914611339569, 0.0868769958615303, -0.12371163070201874, -0.19655634462833405, 0.8426008820533752, -0.47818392515182495, 0.01007288508117199, -0.7969751954078674, -0.08062492311000824, 0.6647201180458069, -0.5354099273681641, 0.6073980927467346, 0.7237942218780518, -0.22699756920337677, 0.015897342935204506, -0.5395627617835999, -0.014628808945417404, -0.5662046670913696, 0.582261323928833, -0.1720232516527176, -0.3331766426563263, 0.6070742607116699, 0.3810391426086426, -0.03461804986000061, 0.2377689629793167, 0.6344699859619141, -0.27377840876579285, 0.6200982332229614, 0.7421915531158447, -0.08862730860710144, 0.6760964393615723, -0.9071878790855408, -0.06710316985845566, -0.7340554594993591, -0.36449843645095825, -0.13446906208992004, -0.0365847609937191, -0.4178890883922577, -0.46315228939056396, 0.11528605967760086, 0.21732361614704132, -0.3210398554801941, 0.26903051137924194, -0.6821353435516357, 0.21763840317726135, 0.7684818506240845, 0.2298174351453781, 0.0007674999651499093, 0.25074303150177, -0.1707768589258194, 0.022018911316990852, -0.7207137942314148, -0.3060477375984192, 0.9857670068740845, 0.25760963559150696, 0.6900187134742737, -0.24312469363212585, 0.4073809087276459, -0.1299394816160202, 0.15726111829280853, -0.6103528738021851, 0.714928150177002, -0.2794286012649536, -0.5201700925827026, -0.26746174693107605, -0.29055294394493103, -0.9427478313446045, 0.21924684941768646, -0.2886139452457428, -0.8188414573669434, 0.16466857492923737, 0.36202389001846313, -0.3419520854949951, 0.31007155776023865, -0.8180906772613525, 1.0586429834365845, -0.466204971075058, -0.5898998975753784, 0.2048121988773346, -0.8335776329040527, 0.2927437126636505, 0.45356485247612, 0.056606754660606384, 0.2822091281414032, -0.0437074713408947, 0.6963724493980408, -0.5247341990470886, 0.9444707036018372, -0.3125476539134979, 0.40849244594573975, 0.31281778216362, -0.21922487020492554, 0.02033197693526745, -0.09872342646121979, 0.3243376910686493, 0.3700055480003357, 0.004521043039858341, -0.5003927946090698, -0.4216480255126953, 0.11583464592695236, -0.8250375390052795, -0.47849416732788086, -0.42861655354499817, -0.5113418102264404, 0.15438468754291534, 0.4479812681674957, 0.7158017754554749, 0.3241626024246216, 0.3931119740009308, 0.11010279506444931, 0.25080591440200806, -0.6039482951164246, 0.8669497966766357, 0.41163015365600586, -0.3313019573688507, -0.5687165856361389, 0.9370157122612, -0.05261412262916565, 0.2422986924648285, 0.41612696647644043, 0.168777197599411, -0.4060990512371063, -0.5395806431770325, -0.8031842708587646, 0.6147516965866089, -0.6301138997077942, -0.41554588079452515, -0.27585574984550476, -0.2360418736934662, -0.48100602626800537, -0.3484787940979004, -0.5308760404586792, -0.13478612899780273, -0.48572012782096863, 0.08322915434837341, 0.471759557723999, 0.21119315922260284, -0.06037735939025879, 0.5064319372177124, -0.5926828980445862, 0.49230843782424927, 0.19616439938545227, 0.22954769432544708, 0.03909292072057724, -0.5242169499397278, -0.14516007900238037, 0.05477602034807205, -0.30851709842681885, -0.7006619572639465, 0.7316261529922485, 0.26413965225219727, 0.456296443939209, 0.4413490891456604, -0.3410334587097168, 1.0241435766220093, -0.2999337911605835, 0.8731535077095032, 0.6255127191543579, -0.9718302488327026, 0.680608868598938, -0.08709873259067535, 0.18681499361991882, 0.3322192430496216, 0.2180502861738205, -0.37596631050109863, -0.39300209283828735, -0.5489409565925598, -1.0377581119537354, 0.8140003085136414, 0.12891006469726562, 0.05004863440990448, 0.3284439444541931, 0.30030548572540283, -0.22237834334373474, 0.47962984442710876, -1.1256380081176758, -0.2786104083061218, -0.6361562013626099, -0.15079735219478607, -0.12141107022762299, 0.15462519228458405, 0.14218823611736298, -0.6593164205551147, 0.4534233808517456, -0.12115814536809921, 0.462019145488739, 0.47163668274879456, -0.5323699712753296, -0.1549271196126938, -0.4028557240962982, 0.6391589045524597, 0.6011586785316467, -0.25704634189605713, 0.07678836584091187, -0.15171097218990326, -0.8055100440979004, -0.22823786735534668, 0.17392222583293915, -0.3326062858104706, 0.07806035131216049, 0.6029720306396484, 1.0159907341003418, 0.10453785210847855, -0.667560338973999, 0.83987957239151, 0.1264728158712387, -0.13815182447433472, -0.2925121486186981, -0.04575846716761589, 0.04256347939372063, 0.19868621230125427, 0.6855197548866272, 0.17796280980110168, -0.269284188747406, -0.4843794107437134, 0.12095997482538223, 0.4112119972705841, -0.0728955790400505, -0.2120261937379837, 0.9097732901573181, -0.044990990310907364, -0.1104358658194542, 0.6288620829582214, -0.4070665240287781, -0.648414134979248, 0.8719911575317383, 0.6679743528366089, 0.4747331738471985, 0.0546034574508667, 0.37852588295936584, 0.6436667442321777, 0.5472472906112671, -0.011500231921672821, 0.43694692850112915, 0.035473231226205826, -0.8371226787567139, -0.2514348030090332, -0.8470458388328552, -0.2975935637950897, 0.29623812437057495, -0.498735636472702, 0.4003172814846039, -0.615057647228241, 0.06036156788468361, 0.1890796422958374, 0.11439018696546555, -0.7350209951400757, 0.371647447347641, 0.21031634509563446, 0.7873665690422058, -0.8619846105575562, 0.4758250117301941, 0.9225007891654968, -1.1776165962219238, -0.8599343299865723, -0.18244969844818115, -0.38556402921676636, -0.988250195980072, 0.7734402418136597, 0.47464317083358765, -0.08319270610809326, 0.026504414156079292, -0.9760962724685669, -0.70644611120224, 1.1447621583938599, 0.4541393518447876, -0.4589136242866516, -0.08162179589271545, 0.24430841207504272, 0.5693181753158569, -0.2901167571544647, 0.13306239247322083, 0.12655426561832428, 0.45778363943099976, 0.27195316553115845, -0.9455351829528809, 0.10484588891267776, -0.3496530055999756, -0.018900446593761444, -0.44482555985450745, -0.8710026144981384, 1.0791270732879639, -0.5464043617248535, -0.1453966498374939, 0.16300244629383087, 0.7729867100715637, 0.40480348467826843, 0.2762923538684845, 0.3477972745895386, 0.5609321594238281, 0.612516462802887, 0.02057860977947712, 0.9978561401367188, -0.2756270170211792, 0.5246555209159851, 0.7573953866958618, 0.29282084107398987, 0.8807928562164307, 0.6036621928215027, -0.21057434380054474, 0.385383278131485, 0.6051806807518005, -0.679641604423523, 0.5445026755332947, 0.09042813628911972, 0.1948307454586029, 0.02399730496108532, 0.19492274522781372, -0.2709108889102936, 0.6553367972373962, 0.334467351436615, -0.5014557838439941, -0.05846863612532616, 0.14183752238750458, -0.10060571879148483, -0.13770349323749542, -0.5613926649093628, 0.29738280177116394, -0.08237168192863464, -0.649412214756012, 1.0491797924041748, -0.12384621053934097, 1.1273847818374634, -0.1947740614414215, 0.057625047862529755, -0.08383577316999435, 0.18506073951721191, -0.39701998233795166, -0.9001742005348206, 0.0973222553730011, 0.056005217134952545, -0.0857309028506279, 0.0689309686422348, 0.33921486139297485, -0.48452213406562805, -0.859573245048523, 0.17093560099601746, 0.16583289206027985, 0.37408626079559326, 0.05751299113035202, -0.9148958921432495, 0.0716601237654686, 0.11756429076194763, -0.21112839877605438, -0.2102581262588501, 0.23048438131809235, -0.0001786496868589893, 0.7877882122993469, 0.7224351167678833, 0.36328989267349243, 0.6291307806968689, 0.07521955668926239, 0.8035489916801453, -0.5688958764076233, -0.5131285786628723, -0.7894884943962097, 0.6789245009422302, -0.19615453481674194, -0.5130274891853333, 0.5806474685668945, 0.9025024175643921, 0.9655290246009827, -0.48180168867111206, 0.7373067736625671, -0.33263126015663147, 0.01027818862348795, -0.6456910371780396, 0.9455388188362122, -0.7116217613220215, -0.08681236952543259, -0.45476779341697693, -0.5074138641357422, -0.6693891882896423, 0.9723571538925171, -0.32611116766929626, -0.10533297061920166, 0.5928612947463989, 1.1895095109939575, -0.2522294223308563, -0.5469934940338135, 0.16631020605564117, 0.2800427973270416, 0.19728639721870422, 0.6562498807907104, 0.6492077112197876, -0.5801483988761902, 0.753574013710022, -0.6373693943023682, -0.20849521458148956, -0.1914186328649521, -0.7959362268447876, -0.9600558280944824, -0.762489914894104, -0.5196599364280701, -0.2439480721950531, -0.037184763699769974, 0.5466951131820679, 0.8293811082839966, -0.6625043153762817, -0.25025859475135803, -0.286670446395874, 0.013329297304153442, -0.2242061346769333, -0.23343852162361145, 0.6440105438232422, -0.43832385540008545, -0.8365321159362793, -0.17660874128341675, 0.3008418381214142, 0.23427869379520416, -0.2100999653339386, -0.04598807170987129, -0.2815370261669159, -0.3072725832462311, 0.4093343913555145, 0.5566768646240234, -0.7682603597640991, -0.06837806105613708, 0.003528064349666238, -0.2235942929983139, 0.4398091435432434, 0.20047153532505035, -0.5115888714790344, 0.4861659109592438, 0.2840815782546997, 0.3006124496459961, 0.8370903730392456, -0.01771719567477703, 0.07366123795509338, -0.769741952419281, 0.7843132019042969, 0.04385073110461235, 0.5762404799461365, 0.6546551585197449, -0.318154901266098, 0.36588722467422485, 0.45287784934043884, -0.14403490722179413, -0.942436933517456, -0.059419628232717514, -1.4399350881576538, -0.28930068016052246, 1.1578649282455444, -0.3228556215763092, -0.7745075821876526, 0.2541382610797882, -0.3971099257469177, 0.39091065526008606, -0.20233963429927826, 0.7670546174049377, 0.28925061225891113, 0.045530110597610474, -0.6644101142883301, -0.34002941846847534, 0.3936372995376587, 0.2158121019601822, -0.5968314409255981, -0.1354348361492157, 0.4136524498462677, 0.49526697397232056, 0.6155365705490112, 0.5765321850776672, -0.15984076261520386, 0.6388691067695618, 0.1595475673675537, 0.6604257822036743, -0.3729131519794464, -0.15267114341259003, -0.20918871462345123, 0.014053759165108204, -0.1473613977432251, -0.8035995364189148 ]
aditeyabaral/sentencetransformer-bert-base-cased
aditeyabaral
"2021-10-21T09:50:09Z"
476,585
0
sentence-transformers
[ "sentence-transformers", "pytorch", "bert", "feature-extraction", "sentence-similarity", "transformers", "endpoints_compatible", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # aditeyabaral/sentencetransformer-bert-base-cased This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. <!--- Describe your model here --> ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('aditeyabaral/sentencetransformer-bert-base-cased') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('aditeyabaral/sentencetransformer-bert-base-cased') model = AutoModel.from_pretrained('aditeyabaral/sentencetransformer-bert-base-cased') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, mean pooling. sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results <!--- Describe how your model was evaluated --> For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=aditeyabaral/sentencetransformer-bert-base-cased) ## Training The model was trained with the parameters: **DataLoader**: `torch.utils.data.dataloader.DataLoader` of length 9234 with parameters: ``` {'batch_size': 16, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'} ``` **Loss**: `sentence_transformers.losses.CosineSimilarityLoss.CosineSimilarityLoss` Parameters of the fit()-Method: ``` { "epochs": 10, "evaluation_steps": 0, "evaluator": "NoneType", "max_grad_norm": 1, "optimizer_class": "<class 'transformers.optimization.AdamW'>", "optimizer_params": { "lr": 2e-05 }, "scheduler": "WarmupLinear", "steps_per_epoch": null, "warmup_steps": 100, "weight_decay": 0.01 } ``` ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors <!--- Describe where people can find more information -->
[ -0.22480836510658264, -0.7888590693473816, 0.29458537697792053, 0.4166157841682434, -0.30303964018821716, -0.39222273230552673, -0.2814129590988159, 0.08389148861169815, 0.21392656862735748, 0.35042935609817505, -0.7203864455223083, -0.551210880279541, -0.7263468503952026, -0.06111680716276169, -0.477497398853302, 0.9664279222488403, -0.16492190957069397, 0.04445245862007141, -0.20090875029563904, -0.16088660061359406, -0.3146825134754181, -0.4097132086753845, -0.4128473103046417, -0.3182450532913208, 0.14672651886940002, 0.1463620364665985, 0.4754888713359833, 0.40387865900993347, 0.25843146443367004, 0.41683366894721985, 0.012848857790231705, -0.015208973549306393, -0.3823835253715515, -0.06875455379486084, 0.13488486409187317, -0.4646003246307373, -0.023829039186239243, 0.22236254811286926, 0.5003654956817627, 0.39959853887557983, -0.2590796947479248, 0.19472047686576843, -0.03153113275766373, 0.4558771550655365, -0.41959241032600403, 0.36683911085128784, -0.5760428309440613, 0.12670683860778809, 0.026411769911646843, 0.08968851715326309, -0.5087172389030457, -0.25868186354637146, 0.3739748001098633, -0.40152400732040405, 0.39236631989479065, 0.239535853266716, 1.2386891841888428, 0.44893431663513184, -0.1629447638988495, -0.4728708863258362, -0.30613288283348083, 0.8603320121765137, -0.9454734325408936, 0.25295907258987427, 0.302475243806839, 0.01931544952094555, -0.04726360738277435, -0.9689657688140869, -0.7943841814994812, -0.08090442419052124, -0.4311782717704773, 0.2674969434738159, -0.3802357017993927, 0.015487750992178917, 0.19584929943084717, 0.22477295994758606, -0.7520424723625183, -0.13254225254058838, -0.5142674446105957, -0.3556968867778778, 0.5858848690986633, -0.020596111193299294, 0.37419429421424866, -0.5642797946929932, -0.4182294011116028, -0.3826843202114105, -0.1073283851146698, 0.06305941194295883, 0.13201965391635895, 0.13353228569030762, -0.2624579071998596, 0.7719978094100952, -0.02442348562180996, 0.6047056913375854, 0.0762261226773262, 0.2138778269290924, 0.6842438578605652, -0.15337559580802917, -0.368943989276886, 0.0686870664358139, 1.0450770854949951, 0.29803743958473206, 0.3107354938983917, -0.06928743422031403, -0.18372860550880432, 0.017825378105044365, 0.23530031740665436, -0.8316817879676819, -0.41498932242393494, 0.3147856593132019, -0.4948588013648987, -0.2391204684972763, 0.12890547513961792, -0.7169955968856812, 0.08826841413974762, 0.06923967599868774, 0.9395328760147095, -0.784557044506073, 0.17299045622348785, 0.33496156334877014, -0.298502653837204, 0.35012003779411316, -0.23368585109710693, -0.8133352398872375, 0.24721480906009674, 0.19578921794891357, 0.9812430143356323, 0.011667688377201557, -0.3906218707561493, -0.26419132947921753, -0.0791289284825325, 0.13058874011039734, 0.6502296924591064, -0.18723535537719727, -0.11466304957866669, 0.13000616431236267, 0.21228134632110596, -0.6900117993354797, -0.2760761082172394, 0.7228124737739563, -0.3785756230354309, 0.8572998046875, 0.09860537946224213, -0.8865839838981628, -0.2582288682460785, 0.15062618255615234, -0.584047794342041, 1.2179659605026245, 0.33365675806999207, -0.8724275231361389, 0.1991845667362213, -0.8307026028633118, -0.41054433584213257, -0.07100730389356613, 0.03341950848698616, -0.7998095750808716, 0.07329803705215454, 0.5897104144096375, 0.7118635773658752, 0.14442236721515656, 0.26950976252555847, -0.09867984801530838, -0.4830535054206848, 0.3134666085243225, -0.37871772050857544, 1.137109398841858, 0.10388963669538498, -0.539372980594635, 0.2236144095659256, -0.6221819519996643, -0.0032805323135107756, 0.29454705119132996, -0.3678075671195984, -0.14702287316322327, -0.05396917089819908, 0.468845009803772, 0.26167964935302734, 0.2705315351486206, -0.6973890066146851, 0.16880516707897186, -0.5994628071784973, 0.8532834649085999, 0.6379615664482117, -0.0430598147213459, 0.41771799325942993, -0.37227582931518555, 0.22930485010147095, 0.17006362974643707, -0.024201100692152977, -0.015171324834227562, -0.3987294137477875, -1.1342527866363525, -0.3302361071109772, 0.4684016704559326, 0.6096108555793762, -0.6949833631515503, 1.089856505393982, -0.4582953155040741, -0.5071444511413574, -0.9270169138908386, -0.04837422072887421, 0.07051526010036469, 0.4235535264015198, 0.6582341194152832, 0.0028639447409659624, -0.6074267625808716, -1.0096410512924194, -0.007474851328879595, 0.03577659651637077, -0.0561433881521225, 0.22430740296840668, 0.7259844541549683, -0.5148733258247375, 1.0610677003860474, -0.6390097141265869, -0.5590182542800903, -0.4935801923274994, 0.27093493938446045, 0.35241416096687317, 0.6235876679420471, 0.6130265593528748, -0.6592413783073425, -0.35504481196403503, -0.6584011316299438, -0.5964985489845276, -0.04509544372558594, -0.2642197906970978, -0.241823211312294, 0.27998289465904236, 0.5473980903625488, -0.8384817838668823, 0.39663437008857727, 0.626532256603241, -0.5605177879333496, 0.4090903103351593, -0.3065866231918335, -0.1680983304977417, -1.3469213247299194, 0.07627290487289429, 0.0025147998239845037, -0.20347370207309723, -0.34279343485832214, -0.054612088948488235, 0.0879732221364975, -0.0312116090208292, -0.4179113507270813, 0.39910903573036194, -0.38984811305999756, 0.16008207201957703, -0.008878902532160282, 0.28649476170539856, -0.018794380128383636, 0.8270481824874878, -0.12458022683858871, 0.7627329230308533, 0.5166236758232117, -0.5382187962532043, 0.3582695722579956, 0.6676521301269531, -0.5656145811080933, 0.05520716309547424, -0.8966614007949829, 0.005709338467568159, -0.08216030895709991, 0.31542813777923584, -1.2493518590927124, -0.09614627808332443, 0.21549740433692932, -0.5635614991188049, 0.0839257761836052, 0.3039267361164093, -0.7107346057891846, -0.5984162092208862, -0.40414610505104065, 0.10443636775016785, 0.6485936045646667, -0.538971483707428, 0.7125953435897827, 0.17989391088485718, -0.0331239178776741, -0.44636040925979614, -1.0371447801589966, -0.14253157377243042, -0.16915816068649292, -0.7614411115646362, 0.6391629576683044, -0.2150939702987671, 0.2709842324256897, 0.1887102723121643, 0.1219535693526268, -0.05575743317604065, -0.06092469394207001, -0.05570138245820999, 0.308367520570755, -0.011318093165755272, 0.16641367971897125, 0.22036875784397125, -0.01091165840625763, 0.17754115164279938, -0.08769897371530533, 0.8971341848373413, -0.13874639570713043, -0.0826134905219078, -0.415032297372818, 0.13907034695148468, 0.47418832778930664, -0.14526422321796417, 1.1127232313156128, 1.0844649076461792, -0.4238460958003998, -0.13907290995121002, -0.6450482606887817, -0.2560606598854065, -0.4869001507759094, 0.6317182183265686, -0.18408800661563873, -0.904922366142273, 0.4496491849422455, 0.26200705766677856, 0.07381241023540497, 0.7572636008262634, 0.6885048151016235, -0.12869732081890106, 0.855272650718689, 0.6096521615982056, -0.25488993525505066, 0.5856236815452576, -0.5517188310623169, 0.18268238008022308, -0.9272989630699158, -0.17488569021224976, -0.24906520545482635, -0.3619019687175751, -0.6369748711585999, -0.32308581471443176, 0.27671268582344055, -0.15059292316436768, -0.26453283429145813, 0.6286673545837402, -0.6749910116195679, 0.1414838433265686, 0.7218199968338013, 0.2694128155708313, -0.14591215550899506, 0.06162593141198158, -0.38818424940109253, -0.10639398545026779, -0.8034124374389648, -0.4082808792591095, 0.8851636052131653, 0.4080648720264435, 0.46770337224006653, -0.10820368677377701, 0.7006567716598511, 0.08071789145469666, 0.13105906546115875, -0.837691605091095, 0.504758358001709, -0.19338208436965942, -0.5255847573280334, -0.3443644642829895, -0.32251492142677307, -0.9273640513420105, 0.42724016308784485, -0.22504858672618866, -0.7625682353973389, 0.05837969854474068, -0.2652898132801056, -0.40015915036201477, 0.1416698694229126, -0.8472127318382263, 1.056391716003418, -0.01809016615152359, 0.038593776524066925, -0.08661781996488571, -0.7576887011528015, 0.1521143615245819, 0.1962415874004364, 0.10455832630395889, -0.04824725165963173, 0.12977659702301025, 1.1097599267959595, -0.30500829219818115, 0.853874683380127, -0.08828039467334747, 0.25639215111732483, 0.2459510713815689, -0.2884427309036255, 0.24666956067085266, -0.16494391858577728, -0.09015922248363495, 0.09457532316446304, -0.0616573728621006, -0.39950624108314514, -0.4829471707344055, 0.6150891184806824, -1.0510852336883545, -0.3604177236557007, -0.5319663286209106, -0.6881647706031799, -0.07207904756069183, 0.21763791143894196, 0.5880630612373352, 0.29010340571403503, -0.13750869035720825, 0.45712727308273315, 0.6564874053001404, -0.29062214493751526, 0.7583923935890198, 0.2428668886423111, 0.008356105536222458, -0.49544015526771545, 0.5840103626251221, 0.03270581737160683, -0.056182119995355606, 0.3688125014305115, 0.20308800041675568, -0.4294051229953766, -0.2858266234397888, -0.3573894202709198, 0.41660526394844055, -0.5518076419830322, -0.19762974977493286, -0.9542672038078308, -0.6267694234848022, -0.696303129196167, -0.06208839640021324, -0.20884858071804047, -0.315240740776062, -0.4943026602268219, -0.24679280817508698, 0.38344505429267883, 0.33922094106674194, 0.11270418018102646, 0.5144692659378052, -0.7018740773200989, 0.13941241800785065, 0.18666446208953857, 0.1468726545572281, -0.15380829572677612, -0.8427218198776245, -0.30566832423210144, -0.026098059490323067, -0.38519686460494995, -0.8814987540245056, 0.7647385001182556, 0.22132562100887299, 0.5808491110801697, 0.11890514194965363, 0.07130387425422668, 0.6146905422210693, -0.6202991604804993, 0.858170211315155, 0.013076606206595898, -1.152884840965271, 0.6028900742530823, -0.06361346691846848, 0.4542904496192932, 0.46001386642456055, 0.29672467708587646, -0.5385444760322571, -0.334638386964798, -0.824363648891449, -1.1110126972198486, 0.7903809547424316, 0.6151218414306641, 0.3937188982963562, -0.11909401416778564, 0.3498999774456024, -0.24060465395450592, 0.17947520315647125, -1.1149859428405762, -0.4077804386615753, -0.40272194147109985, -0.6569230556488037, -0.1880943775177002, -0.23583292961120605, 0.06665729731321335, -0.4831809401512146, 0.8676444292068481, 0.08251529186964035, 0.7455196976661682, 0.40632328391075134, -0.4330231547355652, 0.1637667566537857, 0.21239250898361206, 0.5031391382217407, 0.20129916071891785, -0.251409649848938, -0.06459762901067734, 0.28049328923225403, -0.49904701113700867, -0.07057515531778336, 0.5598505139350891, -0.1475471556186676, 0.32154151797294617, 0.420120507478714, 0.9735000729560852, 0.40937426686286926, -0.5431855320930481, 0.7549979090690613, -0.07037295401096344, -0.34169188141822815, -0.5168827772140503, -0.007049201987683773, 0.19039873778820038, 0.20987635850906372, 0.3867066502571106, -0.031182635575532913, 0.04489394277334213, -0.3026021122932434, 0.27582046389579773, 0.275364488363266, -0.33188241720199585, -0.01412305049598217, 0.7270393967628479, 0.03406742960214615, -0.18538635969161987, 1.0351579189300537, -0.1338309347629547, -0.8188018798828125, 0.5289230942726135, 0.6136258244514465, 0.9593968391418457, -0.01506255753338337, 0.2264479696750641, 0.4167351722717285, 0.4330114722251892, -0.03784893825650215, 0.08404869586229324, 0.14796876907348633, -0.9762736558914185, -0.24439480900764465, -0.7619441151618958, 0.04918179661035538, 0.17939895391464233, -0.743419349193573, 0.2995869517326355, -0.10583175718784332, -0.018330514430999756, -0.09053750336170197, 0.06806794553995132, -0.775884211063385, 0.19350989162921906, 0.0023596384562551975, 0.8831261396408081, -0.9648138284683228, 0.8525160551071167, 0.715399444103241, -0.6871688365936279, -0.8123140335083008, 0.049869194626808167, -0.3789960741996765, -1.0042355060577393, 0.4907233715057373, 0.4903756082057953, 0.2737281024456024, 0.2727297842502594, -0.6479063630104065, -0.9026162028312683, 1.3939849138259888, 0.2887459099292755, -0.4670897424221039, -0.24529427289962769, 0.02063402719795704, 0.5076321959495544, -0.36334607005119324, 0.27933469414711, 0.5461075305938721, 0.33551710844039917, 0.036861006170511246, -0.6947827339172363, 0.22710372507572174, -0.24998369812965393, 0.14945116639137268, -0.0879218727350235, -0.6257109045982361, 0.905582070350647, -0.022433917969465256, -0.15690962970256805, 0.14891904592514038, 0.8706332445144653, 0.32409557700157166, -0.05022631585597992, 0.45123162865638733, 0.7948685884475708, 0.584388017654419, -0.1433882862329483, 0.9435275793075562, -0.3531508445739746, 0.8832658529281616, 0.8124643564224243, 0.15245865285396576, 1.0498956441879272, 0.5055603384971619, -0.14179573953151703, 0.8261666297912598, 0.5802387595176697, -0.4042770564556122, 0.7134363055229187, 0.21068783104419708, 0.030350038781762123, -0.02984754927456379, 0.3249581456184387, -0.1656135469675064, 0.4711676239967346, 0.2882862985134125, -0.6815676689147949, -0.11167725920677185, 0.14861389994621277, 0.12400998175144196, -0.06924885511398315, 0.019538842141628265, 0.5934215188026428, -0.02991178072988987, -0.4858469069004059, 0.3859580457210541, 0.21522584557533264, 1.0835545063018799, -0.5178209543228149, 0.213086798787117, 0.016333436593413353, 0.35935792326927185, -0.032757822424173355, -0.5677740573883057, 0.37317973375320435, -0.2679954171180725, -0.15295809507369995, -0.24089346826076508, 0.5800836086273193, -0.6722255945205688, -0.7347744107246399, 0.24054791033267975, 0.4953744411468506, 0.07460136711597443, -0.030080582946538925, -1.0973128080368042, 0.0239995289593935, 0.10430740565061569, -0.5910177230834961, 0.09976169466972351, 0.30238229036331177, 0.38925668597221375, 0.5457134246826172, 0.41417598724365234, -0.16212603449821472, 0.08981039375066757, 0.13733260333538055, 0.8627217411994934, -0.6534286141395569, -0.510860800743103, -0.9694341421127319, 0.5761574506759644, -0.18042416870594025, -0.47748544812202454, 0.6984767913818359, 0.5590582489967346, 0.8606393933296204, -0.24669349193572998, 0.6138245463371277, -0.2925664186477661, 0.29576197266578674, -0.6605836153030396, 1.0488104820251465, -0.3606325685977936, -0.050092414021492004, -0.18732839822769165, -0.9198224544525146, -0.18163959681987762, 1.158224105834961, -0.3340902030467987, 0.12852637469768524, 0.870587944984436, 0.7222715020179749, -0.06389538198709488, -0.0754171758890152, 0.10773628950119019, 0.4065181314945221, 0.25428736209869385, 0.5493382811546326, 0.25168079137802124, -0.9404286742210388, 0.722013533115387, -0.4938929080963135, -0.1516391485929489, -0.16333313286304474, -0.6958174109458923, -1.0303528308868408, -0.8060001730918884, -0.41053199768066406, -0.38318610191345215, -0.11226336658000946, 1.1237483024597168, 0.6728084683418274, -0.8100876212120056, -0.12328227609395981, -0.24131861329078674, -0.2645134925842285, -0.1452532857656479, -0.40002939105033875, 0.6129881143569946, -0.5506710410118103, -0.8517945408821106, 0.10489512234926224, -0.20337055623531342, 0.09289658069610596, -0.32193517684936523, 0.20268099009990692, -0.548430323600769, 0.17996075749397278, 0.606166660785675, -0.27469056844711304, -0.7788745760917664, -0.2895849347114563, 0.08368571102619171, -0.37478122115135193, -0.051577769219875336, 0.39188799262046814, -0.7926050424575806, 0.217416450381279, 0.31870681047439575, 0.5557910203933716, 0.879431426525116, -0.20947718620300293, 0.4764788746833801, -0.9071159958839417, 0.17082946002483368, 0.16399458050727844, 0.711383581161499, 0.38826534152030945, -0.42041823267936707, 0.4952753484249115, 0.2687827944755554, -0.5762192606925964, -0.5221076011657715, -0.21644195914268494, -1.1538236141204834, -0.2861108183860779, 1.1404507160186768, -0.23082531988620758, -0.45001155138015747, 0.2074703574180603, -0.3568704128265381, 0.5300202965736389, -0.4135252833366394, 0.955270528793335, 1.0223604440689087, -0.1383703052997589, -0.2145053595304489, -0.42300134897232056, 0.27428358793258667, 0.5673654675483704, -0.6338672637939453, -0.2713812291622162, 0.2769032418727875, 0.49500152468681335, 0.2497459501028061, 0.422459214925766, 0.028283238410949707, 0.05090830475091934, -0.10971452295780182, 0.17035986483097076, -0.009208505041897297, 0.17408421635627747, -0.3505484163761139, 0.09590143710374832, -0.5588290691375732, -0.5167950987815857 ]
naver/splade-cocondenser-ensembledistil
naver
"2022-05-11T08:05:37Z"
473,712
18
transformers
[ "transformers", "pytorch", "bert", "fill-mask", "splade", "query-expansion", "document-expansion", "bag-of-words", "passage-retrieval", "knowledge-distillation", "en", "dataset:ms_marco", "arxiv:2205.04733", "license:cc-by-nc-sa-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-05-09T13:18:41Z"
--- license: cc-by-nc-sa-4.0 language: "en" tags: - splade - query-expansion - document-expansion - bag-of-words - passage-retrieval - knowledge-distillation datasets: - ms_marco --- ## SPLADE CoCondenser EnsembleDistil SPLADE model for passage retrieval. For additional details, please visit: * paper: https://arxiv.org/abs/2205.04733 * code: https://github.com/naver/splade | | MRR@10 (MS MARCO dev) | R@1000 (MS MARCO dev) | | --- | --- | --- | | `splade-cocondenser-ensembledistil` | 38.3 | 98.3 | ## Citation If you use our checkpoint, please cite our work: ``` @misc{https://doi.org/10.48550/arxiv.2205.04733, doi = {10.48550/ARXIV.2205.04733}, url = {https://arxiv.org/abs/2205.04733}, author = {Formal, Thibault and Lassance, Carlos and Piwowarski, Benjamin and Clinchant, Stéphane}, keywords = {Information Retrieval (cs.IR), Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution Non Commercial Share Alike 4.0 International} } ```
[ -0.39031314849853516, -0.5915376543998718, 0.6205192804336548, 0.6259857416152954, -0.48184525966644287, 0.03762872517108917, -0.21378664672374725, -0.37361449003219604, 0.30043941736221313, 0.22768208384513855, -0.2957080900669098, -0.566766619682312, -0.7493786811828613, 0.21199169754981995, -0.5095126628875732, 1.0685389041900635, 0.10067173093557358, 0.30916115641593933, -0.14795063436031342, -0.211112841963768, -0.04390343651175499, -0.2988995313644409, -0.35470449924468994, -0.17310133576393127, 0.44989436864852905, -0.03562309592962265, 0.014624676667153835, 0.2810133993625641, 0.37302011251449585, 0.31272339820861816, -0.40636757016181946, -0.27028214931488037, -0.34480568766593933, 0.3152956962585449, -0.2463044971227646, -0.3205558955669403, -0.37272554636001587, -0.06717473268508911, 0.7142239809036255, 0.5209970474243164, -0.28810662031173706, -0.08664854615926743, 0.4242447018623352, 0.6775342226028442, -0.8362196087837219, 0.2315860539674759, -0.6324657797813416, -0.010730188339948654, -0.29067566990852356, -0.2496134638786316, -0.683201253414154, -0.4047204554080963, 0.4137730300426483, -0.5124068260192871, 0.5549050569534302, 0.02191789075732231, 0.874470591545105, 0.28198516368865967, -0.4607979357242584, -0.3154223561286926, -0.30733421444892883, 0.891181468963623, -0.5922521352767944, 0.3999319076538086, 0.2973038852214813, 0.19987753033638, -0.035749007016420364, -0.9648299217224121, -0.622520923614502, -0.4351360499858856, -0.11703787744045258, -0.11471650749444962, 0.01030981820076704, 0.19529059529304504, 0.10343475639820099, 0.25926801562309265, -0.6999285817146301, -0.4798397421836853, -0.8004685640335083, -0.5983088612556458, 0.6126578450202942, -0.03789100423455238, -0.08113615214824677, -0.011376537382602692, -0.689652144908905, -0.468648225069046, -0.3858669400215149, -0.2669903337955475, 0.1290094554424286, 0.4144476354122162, -0.028416888788342476, 0.3334966003894806, -0.09801089018583298, 0.7361471056938171, -0.0555867925286293, 0.18972720205783844, 0.6327833533287048, -0.29088860750198364, -0.18790282309055328, 0.09264706820249557, 0.6507986783981323, -0.000014144182387099136, -0.16789445281028748, -0.15503227710723877, -0.3339839577674866, -0.12168733775615692, 0.08994370698928833, -0.9644629955291748, -0.3779418468475342, 0.14917050302028656, -0.25418010354042053, -0.11867208033800125, 0.11233101785182953, -0.9985299706459045, -0.35253047943115234, -0.18890425562858582, 0.6255675554275513, -0.6076316237449646, -0.10143890231847763, 0.2179470807313919, -0.2560442388057709, 0.4412539303302765, 0.43119847774505615, -0.31804779171943665, 0.35122251510620117, 0.4670065939426422, 0.9694611430168152, -0.35982009768486023, -0.38686665892601013, -0.6523902416229248, -0.2507025897502899, 0.06804758310317993, 0.8139994740486145, -0.21202921867370605, -0.5831806659698486, -0.2394249141216278, 0.11911159753799438, -0.5293663740158081, -0.5636332631111145, 0.880792498588562, -0.7977312803268433, 0.022246671840548515, -0.24837152659893036, -0.2271614521741867, -0.34241682291030884, 0.4041312634944916, -0.7860260009765625, 0.7802515625953674, -0.25419971346855164, -0.4911539554595947, 0.058199264109134674, -0.5743581056594849, -0.577344536781311, -0.017728205770254135, -0.1564476191997528, -0.747776985168457, -0.11489679664373398, 0.07649954408407211, 0.17895472049713135, -0.19081903994083405, 0.46994274854660034, -0.35217946767807007, -0.49988076090812683, 0.17205427587032318, -0.5527163147926331, 1.1490204334259033, 0.6591495275497437, -0.3003356456756592, -0.22887971997261047, -0.7237672805786133, -0.03290202096104622, -0.23389101028442383, -0.4098142385482788, -0.33868512511253357, -0.11338227987289429, 0.20547036826610565, 0.09437594562768936, 0.49398574233055115, -0.6309727430343628, 0.23225829005241394, -0.09401771426200867, 0.3761831521987915, 0.7579735517501831, 0.19776645302772522, 0.5203173756599426, -0.3275565803050995, 0.48361754417419434, 0.37492817640304565, 0.022779395803809166, 0.021149983629584312, -0.3306005299091339, -0.5786921977996826, -0.5326019525527954, 0.5615386366844177, 0.653488039970398, -0.9032958149909973, 0.28139737248420715, -0.30031445622444153, -0.4229494333267212, -0.4706834554672241, -0.1435432881116867, 0.2730015218257904, 0.44065290689468384, 0.7047579884529114, -0.2745513319969177, -0.5363327860832214, -0.7679839134216309, 0.06888329237699509, -0.15919704735279083, 0.06405720859766006, 0.30230891704559326, 0.9179644584655762, -0.040693461894989014, 0.8696097135543823, -0.8501854538917542, -0.32696452736854553, -0.1120370551943779, 0.13502033054828644, 0.3859264552593231, 0.9043552279472351, 0.5620866417884827, -1.143171787261963, -0.7326246500015259, -0.5009055733680725, -0.5631840229034424, 0.01712956465780735, 0.1147264912724495, -0.3905716836452484, 0.056290484964847565, 0.3180052936077118, -0.4655829966068268, 0.515986979007721, -0.0008282657945528626, -0.46617844700813293, 0.5967572927474976, -0.12331834435462952, 0.31398066878318787, -1.0678799152374268, 0.4382089078426361, 0.3069472312927246, 0.08470665663480759, -0.5322988033294678, 0.28261497616767883, 0.3613083064556122, -0.17026443779468536, -0.5367615818977356, 0.5256601572036743, -0.5770107507705688, 0.338765412569046, 0.0022537014447152615, -0.0331529937684536, 0.18002934753894806, 0.7744119763374329, 0.2828977406024933, 0.8219848871231079, 0.7946208119392395, -0.7573834657669067, -0.08774439245462418, 0.2951739728450775, -0.4050063490867615, 0.7060566544532776, -0.9122142791748047, 0.07228384912014008, -0.4078653156757355, 0.5344106554985046, -0.9506232738494873, 0.012311489321291447, 0.25669240951538086, -0.5192250609397888, 0.6801556944847107, -0.40550878643989563, -0.2854791581630707, -0.05763039365410805, -0.6625986099243164, 0.733132004737854, 0.21784743666648865, -0.32155904173851013, 0.5821368098258972, 0.2644445598125458, -0.12232372164726257, -0.8142464756965637, -0.8215796947479248, -0.05846347659826279, -0.23848064243793488, -0.605171799659729, 0.45253220200538635, -0.37824171781539917, -0.00475497730076313, -0.1316416710615158, -0.22059115767478943, -0.37954962253570557, 0.010458477772772312, -0.24566085636615753, 0.4634804129600525, -0.3258391320705414, -0.006650590803474188, 0.08714345097541809, -0.12150858342647552, -0.2990582585334778, -0.44297027587890625, 0.524922788143158, -0.15454280376434326, -0.3954135775566101, -0.4622360169887543, 0.3691858649253845, 0.5486531257629395, -0.3760129511356354, 0.8579772710800171, 0.4403539299964905, -0.22239655256271362, -0.07779744267463684, -0.49510514736175537, -0.45944833755493164, -0.5004209876060486, 0.3598807454109192, -0.36547067761421204, -0.5609672665596008, 0.7648658156394958, 0.4261849820613861, -0.3569418787956238, 0.4162042438983917, 0.11661585420370102, -0.06934750825166702, 0.7154366970062256, 0.35703688859939575, 0.06905253976583481, 0.6611067056655884, -0.7167491316795349, 0.1828654408454895, -1.070181965827942, -0.3626972436904907, -0.9738457202911377, -0.2776171863079071, -0.6582183837890625, -0.4505969285964966, 0.7759438753128052, 0.25920718908309937, -0.28006404638290405, 0.632090151309967, -0.7096193432807922, 0.33035048842430115, 0.6026561260223389, 0.2837737500667572, 0.19394318759441376, 0.036781832575798035, -0.5659670829772949, 0.12217175960540771, -0.6012071967124939, -0.37965473532676697, 0.8806787133216858, 0.1384836584329605, 0.9796546697616577, 0.3540611267089844, 0.9332883954048157, 0.2987596094608307, 0.0026591408532112837, -0.47489115595817566, 0.7789141535758972, 0.14191493391990662, -1.0890393257141113, -0.22712238132953644, -0.4696914255619049, -0.9603500366210938, 0.54121333360672, 0.0751836746931076, -1.068856954574585, 0.8431673049926758, 0.039188943803310394, -0.4982967674732208, 0.08376520872116089, -0.8127464652061462, 0.708922803401947, 0.3040843605995178, -0.6778554320335388, 0.029730847105383873, -0.9032479524612427, 0.23286625742912292, 0.2232791930437088, -0.142985999584198, 0.1410776525735855, 0.008865531533956528, 0.7181330323219299, -0.3245040774345398, 0.7000847458839417, -0.5252180099487305, -0.015222678892314434, 0.5902423858642578, 0.2400994449853897, 0.7895784378051758, 0.018193406984210014, -0.44440165162086487, 0.18298189342021942, 0.35694563388824463, -0.6800476312637329, -0.5276907682418823, 0.8473544716835022, -0.5407084822654724, -0.5491223931312561, -0.9844184517860413, -0.22897708415985107, 0.2535327672958374, 0.1925783008337021, 0.31399527192115784, 0.5382561087608337, 0.09560210257768631, 0.39021915197372437, 1.01502525806427, -0.18060646951198578, 0.41257885098457336, 0.8709092140197754, 0.22327840328216553, -0.4357112646102905, 1.1049696207046509, 0.39571839570999146, 0.05907707288861275, 0.6495199799537659, -0.2367013841867447, -0.6192206740379333, -0.8347705006599426, -0.4388768672943115, 0.27754923701286316, -0.6939120888710022, -0.332623153924942, -0.7363772392272949, -0.5058919787406921, -0.4605172872543335, 0.06560582667589188, -0.1946203112602234, -0.49330687522888184, -0.5537582635879517, -0.1757662445306778, 0.24546486139297485, -0.0031265048310160637, -0.40359610319137573, -0.017842164263129234, -0.7118474245071411, -0.00173372239805758, 0.10239248722791672, 0.34986770153045654, 0.30774909257888794, -0.5220706462860107, -0.12524862587451935, 0.05552519112825394, -0.5420536994934082, -0.8825629949569702, 0.41291648149490356, 0.16554418206214905, 0.8195055723190308, 0.025608127936720848, 0.5603362321853638, 0.6462506651878357, -0.17392507195472717, 0.8216712474822998, -0.06300283223390579, -0.8596594333648682, 0.5026357173919678, -0.15637804567813873, 0.16315563023090363, 1.1423861980438232, 0.4064895212650299, -0.3050927221775055, -0.2560787796974182, -0.4971928298473358, -1.3669638633728027, 0.7646396160125732, 0.5244817733764648, 0.022601505741477013, -0.21298329532146454, 0.07673044502735138, -0.024452950805425644, 0.3177611529827118, -1.0454282760620117, -0.4246246814727783, -0.07337235659360886, -0.19172103703022003, -0.06019440293312073, -0.19429585337638855, -0.0005299362819641829, -0.1974107176065445, 1.264294981956482, 0.07882741838693619, 0.6238558888435364, 0.7336674928665161, -0.47910475730895996, 0.13178354501724243, 0.3017398715019226, 0.9128682017326355, 0.4112468361854553, -0.5030046105384827, 0.3393399119377136, 0.0655105784535408, -0.8164123296737671, 0.30014151334762573, 0.5699863433837891, -0.26900342106819153, -0.14620070159435272, 0.4816768765449524, 0.5892102122306824, -0.14617937803268433, -0.4706697463989258, 0.7592432498931885, 0.0587589256465435, -0.16243697702884674, -0.40414124727249146, 0.08443225920200348, -0.3272175192832947, 0.40752944350242615, 1.0309022665023804, 0.4989970028400421, 0.5228817462921143, -0.22275108098983765, 0.40370601415634155, 0.2463923543691635, -0.6837916970252991, -0.21211464703083038, 0.6868359446525574, 0.24191449582576752, -0.07569780200719833, 0.5806765556335449, -0.6001244187355042, -0.45140084624290466, 0.5604128837585449, 0.2895243465900421, 0.9149879217147827, 0.08501001447439194, 0.0010715951211750507, 0.6369617581367493, 0.08890647441148758, -0.2517746388912201, 0.1765846461057663, -0.7333940267562866, -0.5800609588623047, -0.3989129066467285, -0.8063579797744751, 0.16763533651828766, 0.08729156851768494, -0.7483335137367249, 0.16069790720939636, 0.04105318337678909, 0.04481526464223862, -0.16900470852851868, 0.4127033054828644, -0.3825931251049042, -0.1250176876783371, -0.21290716528892517, 1.296414852142334, -0.876179039478302, 0.8858432769775391, 0.38056033849716187, -0.7426871657371521, -0.4760000705718994, 0.24458125233650208, -0.13316328823566437, -0.48488590121269226, 0.35695886611938477, -0.058892834931612015, -0.16445894539356232, 0.13261115550994873, -0.657010018825531, -0.7488269805908203, 1.3248021602630615, 0.2816597819328308, -0.7027643322944641, -0.004512017592787743, -0.36327430605888367, 0.4931724965572357, 0.13773217797279358, 0.4029619097709656, 0.25475621223449707, 0.4802950322628021, 0.5832799673080444, -0.8761858940124512, -0.04770003631711006, -0.5205385088920593, 0.13401024043560028, 0.26277822256088257, -0.6161980032920837, 0.8245596289634705, -0.18543623387813568, -0.40884488821029663, 0.6186617612838745, 0.6038162708282471, 0.6990283727645874, 0.6903342604637146, 0.35665419697761536, 0.647650957107544, 0.6021230816841125, -0.12583239376544952, 0.7787253856658936, -0.3695426881313324, 0.7472726106643677, 1.1874048709869385, -0.3018651306629181, 0.7713657021522522, 0.8516237139701843, -0.3204188048839569, 0.5530317425727844, 0.6035053133964539, 0.16964851319789886, 1.149641990661621, 0.3433750867843628, -0.6593278646469116, -0.006649435497820377, 0.26058846712112427, -0.5926530957221985, -0.009096101857721806, 0.2487248331308365, -0.5124926567077637, -0.3350537419319153, 0.11213584989309311, -0.21793854236602783, -0.020519305020570755, -0.08037391304969788, 0.6526899337768555, 0.10979215800762177, -0.7622206807136536, 0.8220186233520508, -0.1370852142572403, 0.768993079662323, -0.5805250406265259, -0.10960330069065094, -0.28861379623413086, 0.14343604445457458, -0.09599373489618301, -0.520930290222168, 0.10131476819515228, -0.14573624730110168, -0.1304960995912552, -0.054827697575092316, 0.4221121370792389, -0.4227413535118103, -0.5802178978919983, 0.24982953071594238, 0.34705042839050293, 0.39758050441741943, 0.10760623961687088, -0.620407223701477, 0.05337844043970108, 0.3501724898815155, -0.22868746519088745, 0.32717791199684143, 0.47765403985977173, 0.10513808578252792, 0.5372646450996399, 0.548156201839447, -0.01650901325047016, 0.12026030570268631, -0.16990426182746887, 0.8857201337814331, -0.7166460752487183, -0.6410326957702637, -0.9395394921302795, 0.6908908486366272, -0.1060057133436203, -0.12008213996887207, 0.4486485719680786, 0.9382063746452332, 0.7161377668380737, -0.08789665251970291, 0.6212526559829712, -0.3301329016685486, 0.42705994844436646, -0.3608877658843994, 0.7894189953804016, -0.42691341042518616, 0.5854052305221558, -0.3873061239719391, -0.9634466767311096, -0.3799927532672882, 0.9218233823776245, -0.416923463344574, 0.19148707389831543, 0.5794495344161987, 1.4590110778808594, -0.4577799141407013, -0.18067409098148346, 0.13103601336479187, 0.5177962183952332, 0.2186392992734909, 0.4122857451438904, 0.7819938063621521, -0.7435075044631958, 0.5355657935142517, -0.1065802276134491, 0.03553633391857147, -0.43691253662109375, -0.8522305488586426, -0.33941715955734253, -1.1670483350753784, -0.4922408163547516, -0.6286598443984985, 0.16617172956466675, 1.0447317361831665, 0.8702449202537537, -0.9686187505722046, -0.14114418625831604, -0.42212995886802673, 0.2708705961704254, -0.11863739788532257, -0.34337565302848816, 0.5624390840530396, -0.12969210743904114, -0.8086130619049072, 0.3829539716243744, -0.06465797126293182, 0.4332512319087982, -0.22315241396427155, -0.3479618430137634, -0.6853066086769104, -0.10404649376869202, 0.24277938902378082, 0.301216185092926, -0.23125827312469482, -0.0416305772960186, -0.019536562263965607, -0.22791631519794464, 0.22618520259857178, 0.4785771071910858, -0.7576704025268555, 0.31135398149490356, 0.7513177394866943, 0.17791064083576202, 1.175587773323059, -0.30801987648010254, 0.3137250244617462, -0.7330237030982971, 0.29981550574302673, 0.6496444940567017, 0.3879085183143616, 0.23785947263240814, -0.20941287279129028, 0.48954594135284424, 0.3479126989841461, -0.533055305480957, -1.1122088432312012, -0.1211923286318779, -1.157231092453003, -0.36165082454681396, 0.9838371872901917, -0.2497195452451706, -0.4190864562988281, -0.04066178947687149, -0.18069009482860565, 0.27560657262802124, -0.8778388500213623, 0.9403164982795715, 0.5618823170661926, 0.10685821622610092, 0.014617319218814373, -0.3151019513607025, 0.3544892370700836, 0.09767962247133255, -0.20600377023220062, -0.4634960889816284, 0.40386083722114563, 0.4788839817047119, 0.5507400631904602, 0.7682933211326599, -0.14194072782993317, 0.31266525387763977, -0.09163807332515717, -0.01636475883424282, 0.02751949615776539, -0.3488415479660034, -0.6056249737739563, 0.3825359642505646, -0.04901280254125595, -0.3830445110797882 ]
Kyle1668/ag-news-t5-large
Kyle1668
"2023-08-08T16:43:47Z"
471,168
0
transformers
[ "transformers", "pytorch", "t5", "text2text-generation", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
"2023-08-08T16:41:32Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
sonoisa/sentence-bert-base-ja-mean-tokens-v2
sonoisa
"2022-12-04T07:04:25Z"
459,103
21
sentence-transformers
[ "sentence-transformers", "pytorch", "bert", "sentence-bert", "feature-extraction", "sentence-similarity", "ja", "license:cc-by-sa-4.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: ja license: cc-by-sa-4.0 tags: - sentence-transformers - sentence-bert - feature-extraction - sentence-similarity --- This is a Japanese sentence-BERT model. 日本語用Sentence-BERTモデル(バージョン2)です。 [バージョン1](https://huggingface.co/sonoisa/sentence-bert-base-ja-mean-tokens)よりも良いロス関数である[MultipleNegativesRankingLoss](https://www.sbert.net/docs/package_reference/losses.html#multiplenegativesrankingloss)を用いて学習した改良版です。 手元の非公開データセットでは、バージョン1よりも1.5〜2ポイントほど精度が高い結果が得られました。 事前学習済みモデルとして[cl-tohoku/bert-base-japanese-whole-word-masking](https://huggingface.co/cl-tohoku/bert-base-japanese-whole-word-masking)を利用しました。 従って、推論の実行にはfugashiとipadicが必要です(pip install fugashi ipadic)。 # 旧バージョンの解説 https://qiita.com/sonoisa/items/1df94d0a98cd4f209051 モデル名を"sonoisa/sentence-bert-base-ja-mean-tokens-v2"に書き換えれば、本モデルを利用した挙動になります。 # 使い方 ```python from transformers import BertJapaneseTokenizer, BertModel import torch class SentenceBertJapanese: def __init__(self, model_name_or_path, device=None): self.tokenizer = BertJapaneseTokenizer.from_pretrained(model_name_or_path) self.model = BertModel.from_pretrained(model_name_or_path) self.model.eval() if device is None: device = "cuda" if torch.cuda.is_available() else "cpu" self.device = torch.device(device) self.model.to(device) def _mean_pooling(self, model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) @torch.no_grad() def encode(self, sentences, batch_size=8): all_embeddings = [] iterator = range(0, len(sentences), batch_size) for batch_idx in iterator: batch = sentences[batch_idx:batch_idx + batch_size] encoded_input = self.tokenizer.batch_encode_plus(batch, padding="longest", truncation=True, return_tensors="pt").to(self.device) model_output = self.model(**encoded_input) sentence_embeddings = self._mean_pooling(model_output, encoded_input["attention_mask"]).to('cpu') all_embeddings.extend(sentence_embeddings) # return torch.stack(all_embeddings).numpy() return torch.stack(all_embeddings) MODEL_NAME = "sonoisa/sentence-bert-base-ja-mean-tokens-v2" # <- v2です。 model = SentenceBertJapanese(MODEL_NAME) sentences = ["暴走したAI", "暴走した人工知能"] sentence_embeddings = model.encode(sentences, batch_size=8) print("Sentence embeddings:", sentence_embeddings) ```
[ -0.24992918968200684, -0.9728050231933594, 0.28041985630989075, 0.4245651662349701, -0.492726594209671, -0.39538004994392395, -0.3975890576839447, -0.15569710731506348, 0.3155193030834198, 0.4429558217525482, -0.7001509070396423, -0.4375385344028473, -0.8238030672073364, -0.03693763166666031, -0.15888899564743042, 0.9815323352813721, -0.2524218261241913, 0.1670466810464859, 0.15000219643115997, -0.03626303747296333, -0.5804884433746338, -0.45248299837112427, -0.6651718616485596, -0.44956159591674805, 0.24067698419094086, 0.1542583853006363, 0.3690740764141083, 0.2637820839881897, 0.3588424026966095, 0.37204456329345703, 0.14930738508701324, 0.04977518692612648, -0.3195653259754181, -0.08500458300113678, 0.22979804873466492, -0.5698726177215576, -0.0048020933754742146, 0.13218329846858978, 0.5972954630851746, 0.40244996547698975, 0.11054975539445877, 0.10484132170677185, -0.008469033055007458, 0.44765979051589966, -0.41625773906707764, 0.2986089289188385, -0.5257479548454285, 0.02236746996641159, -0.07375223934650421, -0.07839187979698181, -0.5943882465362549, -0.29960528016090393, -0.06195645034313202, -0.5385765433311462, 0.2831645607948303, -0.018232453614473343, 1.3338905572891235, 0.19433806836605072, -0.18686307966709137, -0.4238419532775879, -0.1385176181793213, 0.9934582114219666, -1.0353972911834717, 0.33576658368110657, 0.3367277979850769, -0.16184812784194946, -0.14705896377563477, -0.7732219696044922, -0.7875035405158997, 0.014592998661100864, -0.2459525465965271, 0.2920786142349243, -0.13613106310367584, 0.03630173206329346, 0.20455583930015564, 0.06559749692678452, -0.6562877893447876, -0.07162316888570786, -0.5324801802635193, -0.2729375660419464, 0.5802440047264099, -0.11739780753850937, 0.4978708028793335, -0.6539991497993469, -0.42270612716674805, -0.27129459381103516, -0.33649662137031555, 0.12272638082504272, 0.3415747582912445, 0.3436383306980133, -0.33693116903305054, 0.7490736842155457, -0.004058321937918663, 0.487602174282074, 0.020569683983922005, -0.2655491828918457, 0.5099491477012634, -0.21660438179969788, -0.3441739082336426, 0.15777762234210968, 0.9222240447998047, 0.492613285779953, 0.34991881251335144, -0.06491217762231827, -0.03987349942326546, 0.1344613879919052, -0.14801910519599915, -0.8873438835144043, -0.27254408597946167, 0.21947640180587769, -0.630541205406189, -0.2849595546722412, 0.18405169248580933, -0.7037842273712158, -0.07767259329557419, 0.19139742851257324, 0.8632702231407166, -0.6985982060432434, -0.05377254635095596, 0.38930603861808777, -0.35508471727371216, 0.2675965428352356, -0.16985702514648438, -0.9013746380805969, 0.0842268168926239, 0.40184181928634644, 0.8741140365600586, 0.2767051160335541, -0.38224369287490845, -0.14469516277313232, -0.006598806008696556, -0.15053749084472656, 0.25076329708099365, -0.3622794449329376, -0.3543195128440857, -0.1978941261768341, 0.15696054697036743, -0.5614694952964783, -0.21669282019138336, 0.6095440983772278, -0.3999728262424469, 0.7170087099075317, -0.11578219383955002, -0.7337455153465271, -0.4196056127548218, 0.1895427256822586, -0.46632665395736694, 1.0320786237716675, 0.015181796625256538, -1.0772526264190674, 0.13483388721942902, -0.6476935744285583, -0.4831591546535492, -0.2305968850851059, -0.03430767357349396, -0.72517991065979, 0.03516586869955063, 0.5169324278831482, 0.7002127766609192, -0.04758653789758682, 0.23126240074634552, -0.18894478678703308, -0.3853260278701782, 0.41491007804870605, -0.3663066029548645, 1.41236412525177, 0.14649812877178192, -0.5710222125053406, 0.07913333177566528, -0.7226510643959045, 0.004661920480430126, 0.3286674916744232, -0.2808043360710144, -0.2727101147174835, -0.13991069793701172, 0.2213105708360672, 0.30102869868278503, 0.3143776059150696, -0.8776835203170776, 0.12597842514514923, -0.46475765109062195, 0.8464698791503906, 0.9733250737190247, 0.2511538863182068, 0.11787831783294678, -0.4258146286010742, 0.1898512840270996, 0.25475645065307617, -0.016277767717838287, -0.14187031984329224, -0.5919010639190674, -1.1771949529647827, -0.4328348636627197, 0.22520603239536285, 0.513647198677063, -0.904906690120697, 0.6699322462081909, -0.25173884630203247, -0.47536128759384155, -0.7586156129837036, -0.08808086067438126, 0.24984794855117798, 0.46588751673698425, 0.34639447927474976, -0.1730716973543167, -0.7872231602668762, -0.9978980422019958, -0.0828612819314003, -0.17937864363193512, 0.09330379217863083, 0.3132738173007965, 0.7374005913734436, -0.2915598452091217, 0.6129555106163025, -0.5851579308509827, -0.35699883103370667, -0.40707728266716003, 0.3239215016365051, 0.6594591736793518, 0.7940242886543274, 0.3958042860031128, -0.6057670712471008, -0.3495309352874756, -0.37693166732788086, -0.7624257802963257, 0.05980667844414711, -0.5174186825752258, -0.354134738445282, 0.2905884087085724, 0.27658623456954956, -0.8909633159637451, 0.3679010272026062, 0.3234102427959442, -0.532782793045044, 0.40230831503868103, -0.19471636414527893, 0.1932370662689209, -1.395883321762085, 0.08772909641265869, -0.06568735837936401, -0.046228040009737015, -0.5036084651947021, 0.21813417971134186, 0.03635377809405327, 0.042564090341329575, -0.46197232604026794, 0.5274173021316528, -0.5267435312271118, 0.16180509328842163, 0.05622691288590431, 0.2598073184490204, 0.1170758306980133, 0.9061310887336731, -0.05745656415820122, 0.8276548385620117, 0.6197101473808289, -0.6125640869140625, 0.504849374294281, 0.3553300201892853, -0.41964083909988403, 0.10628093034029007, -0.8729544878005981, -0.04829002544283867, -0.1494702398777008, 0.16479022800922394, -1.1408042907714844, -0.13952337205410004, 0.4288784861564636, -0.827288031578064, 0.17142997682094574, 0.3664587736129761, -0.7055712342262268, -0.6097234487533569, -0.5757796168327332, 0.15361450612545013, 0.5117668509483337, -0.5319397449493408, 0.49491482973098755, 0.22410131990909576, 0.010217280127108097, -0.7015394568443298, -1.1564561128616333, -0.06776479631662369, -0.20283031463623047, -0.7078450918197632, 0.39589840173721313, -0.07325412333011627, 0.22983217239379883, -0.029692504554986954, 0.12105876952409744, -0.08746688067913055, 0.1155943050980568, 0.036062829196453094, 0.44497206807136536, -0.2626921534538269, 0.10306519269943237, -0.05838008597493172, 0.09944456815719604, 0.18922390043735504, -0.038468293845653534, 0.8472570776939392, -0.07394777983427048, -0.19175176322460175, -0.5980861783027649, 0.3314414620399475, 0.3366478681564331, -0.05943405628204346, 0.9030888676643372, 1.0710145235061646, -0.5572461485862732, 0.014731400646269321, -0.6020535826683044, -0.29887670278549194, -0.4895201623439789, 0.6273659467697144, -0.5706736445426941, -0.7047138214111328, 0.6935973167419434, 0.4756750166416168, 0.06105775758624077, 0.7424603700637817, 0.7289761304855347, -0.08222935348749161, 1.0176243782043457, 0.5390570759773254, -0.10796951502561569, 0.5379555821418762, -0.6444236040115356, 0.4897100627422333, -1.0008878707885742, -0.2496466040611267, -0.2512992322444916, -0.3565371334552765, -0.7683999538421631, -0.295807808637619, 0.35178762674331665, 0.016372205689549446, -0.30619490146636963, 0.5194421410560608, -0.6835352182388306, 0.2582378685474396, 0.8397969007492065, 0.5347986817359924, -0.09860546141862869, -0.13093781471252441, -0.19214875996112823, -0.19940923154354095, -0.6695473790168762, -0.42412376403808594, 0.9513257741928101, 0.47280386090278625, 0.6781437993049622, 0.10665487498044968, 0.8859898447990417, -0.05598924309015274, -0.041989780962467194, -0.7335851788520813, 0.7558625936508179, -0.17554871737957, -0.7735295295715332, -0.27659884095191956, -0.35331711173057556, -0.9852563738822937, 0.3514329791069031, -0.08792387694120407, -1.0054632425308228, 0.08347011357545853, -0.4441189467906952, -0.2948559522628784, 0.4022197127342224, -0.8078808188438416, 0.9801381826400757, -0.08339108526706696, -0.24952125549316406, -0.18163447082042694, -0.7317893505096436, 0.4939385652542114, 0.2545798420906067, 0.05814237892627716, -0.16216883063316345, 0.06279142946004868, 1.3433763980865479, -0.27967604994773865, 0.9457647204399109, -0.16523726284503937, 0.23845228552818298, 0.3252381682395935, -0.22913050651550293, 0.341367244720459, -0.03499097749590874, -0.0172280240803957, -0.08883395045995712, -0.06461220234632492, -0.49302417039871216, -0.3829941749572754, 0.748991847038269, -1.1795048713684082, -0.49724307656288147, -0.5586457252502441, -0.5733582973480225, 0.025317251682281494, 0.48857784271240234, 0.6431755423545837, 0.4381292462348938, 0.10385594516992569, 0.3534567058086395, 0.6881313920021057, -0.40942278504371643, 0.8238686919212341, 0.15154722332954407, -0.013854189775884151, -0.4843009412288666, 0.866154134273529, 0.20174209773540497, 0.021294713020324707, 0.40736010670661926, 0.13300074636936188, -0.2957926392555237, -0.15162906050682068, -0.37391388416290283, 0.6193708181381226, -0.7458261251449585, -0.1376347690820694, -0.9257413148880005, -0.4211583435535431, -0.7503585815429688, -0.24285611510276794, -0.13563522696495056, -0.4359692335128784, -0.5632822513580322, -0.18054085969924927, 0.3342307209968567, 0.3498229384422302, -0.013005734421312809, 0.38654452562332153, -0.6226940155029297, 0.4377765953540802, 0.2615715563297272, 0.17521245777606964, 0.04090746119618416, -0.6767541766166687, -0.316656231880188, 0.04841659963130951, -0.47641095519065857, -1.0513485670089722, 0.621298611164093, 0.0914854034781456, 0.6703558564186096, 0.2469552457332611, 0.16049663722515106, 0.7438874840736389, -0.27333617210388184, 1.0368894338607788, 0.41743484139442444, -1.1876003742218018, 0.5934709310531616, -0.08737039566040039, 0.38544559478759766, 0.2941054403781891, 0.23704984784126282, -0.7117688655853271, -0.5005820393562317, -0.8602010011672974, -1.0281085968017578, 0.9166008234024048, 0.2449066936969757, 0.49384668469429016, -0.194838285446167, 0.04288863763213158, -0.02884797193109989, 0.1583147794008255, -1.1887280941009521, -0.4458625316619873, -0.40562495589256287, -0.5163400769233704, -0.04840048402547836, -0.28715282678604126, 0.023174075409770012, -0.3291124999523163, 1.2581226825714111, 0.2817823588848114, 0.8204971551895142, 0.4233771860599518, -0.32985052466392517, 0.137454092502594, 0.19053414463996887, 0.7151941061019897, 0.2518039047718048, -0.32152512669563293, 0.22935132682323456, 0.15444907546043396, -0.42449039220809937, 0.0018168054521083832, 0.1918087899684906, -0.225941002368927, 0.42128312587738037, 0.5901355743408203, 1.1489014625549316, 0.24839788675308228, -0.4881208539009094, 0.6849392652511597, 0.016637222841382027, -0.24158433079719543, -0.22187581658363342, -0.08261673152446747, 0.12226370722055435, 0.11954709142446518, 0.3407563865184784, -0.15223242342472076, 0.12221574783325195, -0.546013355255127, 0.27571919560432434, 0.32202672958374023, -0.09500724822282791, -0.0013426461955532432, 0.7699819803237915, 0.0555504746735096, -0.01114558707922697, 0.733666181564331, -0.004949713591486216, -0.9172933101654053, 0.6970518231391907, 0.7044926881790161, 1.0692572593688965, 0.06846250593662262, 0.15345355868339539, 0.7470191717147827, 0.45328158140182495, 0.1270202100276947, 0.33483263850212097, 0.06438210606575012, -0.8794578909873962, -0.12089839577674866, -0.4912504255771637, 0.0030569627415388823, 0.09503276646137238, -0.6519572734832764, 0.28272101283073425, -0.46511295437812805, -0.22667750716209412, 0.08293557912111282, 0.21531681716442108, -0.538503110408783, 0.2872581481933594, 0.1340135782957077, 0.7220675945281982, -1.0206656455993652, 0.9360811710357666, 0.5376465320587158, -0.6807655096054077, -0.9487001895904541, -0.1398821473121643, -0.43545636534690857, -1.1572145223617554, 0.6671804785728455, 0.48552924394607544, 0.09544838219881058, 0.048557672649621964, -0.5502833127975464, -0.9015419483184814, 0.9777241945266724, 0.16283740103244781, -0.2548658847808838, -0.12154635787010193, -0.11847618222236633, 0.37370747327804565, -0.23455511033535004, 0.2972709834575653, 0.4645578861236572, 0.4502020478248596, -0.06932435184717178, -0.7352508306503296, 0.26734909415245056, -0.4279978275299072, 0.2294214367866516, -0.03417346999049187, -0.8032996654510498, 1.217851996421814, -0.26378345489501953, -0.22548340260982513, 0.04810607060790062, 0.8071702718734741, 0.371460884809494, 0.034362342208623886, 0.26675206422805786, 0.6596629023551941, 0.5899400115013123, -0.1690848171710968, 0.8914328217506409, -0.32465142011642456, 0.7383033633232117, 0.8461971879005432, 0.3153574764728546, 0.8477841019630432, 0.637215793132782, -0.2642614245414734, 0.5966569185256958, 0.7259711623191833, -0.20539849996566772, 0.8194966316223145, 0.12039831280708313, -0.09083490073680878, -0.016866466030478477, 0.06499145925045013, -0.41631653904914856, 0.4456089735031128, 0.14288358390331268, -0.6092752814292908, 0.003401334397494793, 0.29438623785972595, 0.41209283471107483, -0.2153150886297226, -0.1490621417760849, 0.6664255261421204, 0.043172404170036316, -0.7175547480583191, 0.7654243111610413, 0.3710705637931824, 1.1222453117370605, -0.5187302231788635, 0.2790699601173401, -0.04974079877138138, 0.2964267134666443, -0.07455180585384369, -0.8435081839561462, 0.22471405565738678, -0.05373407155275345, -0.2134215533733368, -0.11730269342660904, 0.4981953501701355, -0.646733820438385, -0.8477997779846191, 0.2265183925628662, 0.1459292322397232, 0.2606351971626282, 0.372087687253952, -0.9814755916595459, 0.1955222487449646, 0.27527156472206116, -0.5518929958343506, -0.0651433989405632, 0.26807981729507446, 0.25793173909187317, 0.5204340219497681, 0.45560503005981445, -0.02275216206908226, 0.4042733609676361, 0.07460912317037582, 0.8092111349105835, -0.6220232844352722, -0.6314364075660706, -1.0749181509017944, 0.4917233884334564, -0.13219107687473297, -0.46399956941604614, 0.8116855025291443, 0.5369674563407898, 0.9064323306083679, -0.25829845666885376, 0.7941796779632568, -0.30198997259140015, 0.3110831677913666, -0.721812903881073, 0.6298250555992126, -0.521131157875061, -0.07536056637763977, -0.24680565297603607, -0.7465882301330566, -0.3303319215774536, 1.1105810403823853, -0.2825396656990051, 0.10020033270120621, 0.8373175263404846, 0.8313491940498352, 0.09382352977991104, -0.10433762520551682, 0.16948463022708893, 0.4020193815231323, 0.25756579637527466, 0.927612841129303, 0.25315308570861816, -0.9971389174461365, 0.4136301875114441, -0.6370258927345276, -0.012469499371945858, -0.2626720666885376, -0.6131265759468079, -0.9583119750022888, -0.7810112833976746, -0.43457168340682983, -0.4675713777542114, -0.06704899668693542, 1.0843971967697144, 0.718839704990387, -1.0052449703216553, -0.17332687973976135, -0.13296009600162506, 0.16560710966587067, -0.210158571600914, -0.342770516872406, 0.627045750617981, -0.39967843890190125, -0.8689894080162048, -0.04765413701534271, -0.19212950766086578, 0.13651014864444733, -0.1176416352391243, 0.013751384802162647, -0.6024023294448853, 0.30389994382858276, 0.47924989461898804, -0.15983521938323975, -0.9513404965400696, -0.35814324021339417, 0.03593125566840172, -0.4486794173717499, -0.0018276011105626822, 0.3793955445289612, -0.49586907029151917, 0.5575754642486572, 0.6408947110176086, 0.4620390236377716, 0.7323058247566223, -0.3150453567504883, 0.3224393427371979, -0.9866512417793274, 0.32328885793685913, 0.13353171944618225, 0.6817626953125, 0.40764108300209045, -0.4678843915462494, 0.5292240977287292, 0.4007109999656677, -0.325015664100647, -0.8579010367393494, -0.17430166900157928, -1.134667992591858, -0.47506144642829895, 1.1043771505355835, -0.24083265662193298, -0.3773409426212311, 0.3669467568397522, -0.4172385632991791, 0.7376825213432312, -0.30688074231147766, 0.8126736879348755, 1.0820835828781128, -0.08757339417934418, -0.42668867111206055, -0.36488574743270874, -0.015794875100255013, 0.5380383133888245, -0.4451729655265808, -0.140116348862648, 0.15984773635864258, 0.3807530999183655, 0.3027368485927582, 0.6781689524650574, 0.05339859798550606, 0.271587610244751, 0.17645865678787231, 0.33854469656944275, -0.07923074811697006, 0.058501236140728, -0.18465711176395416, 0.0008238854352384806, -0.2837570011615753, -0.8339316844940186 ]
sentence-transformers/msmarco-distilbert-dot-v5
sentence-transformers
"2023-11-02T09:31:39Z"
458,232
7
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "distilbert", "feature-extraction", "sentence-similarity", "transformers", "en", "arxiv:1908.10084", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- language: - en pipeline_tag: sentence-similarity license: apache-2.0 tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # msmarco-distilbert-dot-v5 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and was designed for **semantic search**. It has been trained on 500K (query, answer) pairs from the [MS MARCO dataset](https://github.com/microsoft/MSMARCO-Passage-Ranking/). For an introduction to semantic search, have a look at: [SBERT.net - Semantic Search](https://www.sbert.net/examples/applications/semantic-search/README.html) ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer, util query = "How many people live in London?" docs = ["Around 9 Million people live in London", "London is known for its financial district"] #Load the model model = SentenceTransformer('sentence-transformers/msmarco-distilbert-dot-v5') #Encode query and documents query_emb = model.encode(query) doc_emb = model.encode(docs) #Compute dot score between query and all document embeddings scores = util.dot_score(query_emb, doc_emb)[0].cpu().tolist() #Combine docs & scores doc_score_pairs = list(zip(docs, scores)) #Sort by decreasing score doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True) #Output passages & scores print("Query:", query) for doc, score in doc_score_pairs: print(score, doc) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the correct pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output.last_hidden_state input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) #Encode text def encode(texts): # Tokenize sentences encoded_input = tokenizer(texts, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input, return_dict=True) # Perform pooling embeddings = mean_pooling(model_output, encoded_input['attention_mask']) return embeddings # Sentences we want sentence embeddings for query = "How many people live in London?" docs = ["Around 9 Million people live in London", "London is known for its financial district"] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-distilbert-dot-v5") model = AutoModel.from_pretrained("sentence-transformers/msmarco-distilbert-dot-v5") #Encode query and docs query_emb = encode(query) doc_emb = encode(docs) #Compute dot score between query and all document embeddings scores = torch.mm(query_emb, doc_emb.transpose(0, 1))[0].cpu().tolist() #Combine docs & scores doc_score_pairs = list(zip(docs, scores)) #Sort by decreasing score doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True) #Output passages & scores print("Query:", query) for doc, score in doc_score_pairs: print(score, doc) ``` ## Technical Details In the following some technical details how this model must be used: | Setting | Value | | --- | :---: | | Dimensions | 768 | | Max Sequence Length | 512 | | Produces normalized embeddings | No | | Pooling-Method | Mean pooling | | Suitable score functions | dot-product (e.g. `util.dot_score`) | ## Evaluation Results <!--- Describe how your model was evaluated --> For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=msmarco-distilbert-base-dot-v5) ## Training See `train_script.py` in this repository for the used training script. The model was trained with the parameters: **DataLoader**: `torch.utils.data.dataloader.DataLoader` of length 7858 with parameters: ``` {'batch_size': 64, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'} ``` **Loss**: `sentence_transformers.losses.MarginMSELoss.MarginMSELoss` Parameters of the fit()-Method: ``` { "callback": null, "epochs": 30, "evaluation_steps": 0, "evaluator": "NoneType", "max_grad_norm": 1, "optimizer_class": "<class 'transformers.optimization.AdamW'>", "optimizer_params": { "lr": 1e-05 }, "scheduler": "WarmupLinear", "steps_per_epoch": null, "warmup_steps": 10000, "weight_decay": 0.01 } ``` ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DistilBertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ``` ## License This model is released under the Apache 2 license. However, note that this model was trained on the MS MARCO dataset which has it's own license restrictions: [MS MARCO - Terms and Conditions](https://github.com/microsoft/msmarco/blob/095515e8e28b756a62fcca7fcf1d8b3d9fbb96a9/README.md).
[ -0.21998730301856995, -0.8178159594535828, 0.4521537125110626, 0.28495898842811584, -0.23794256150722504, -0.3595769703388214, -0.3035332262516022, -0.08794734627008438, 0.09693589806556702, 0.31776219606399536, -0.5584148168563843, -0.6798864603042603, -0.7700924873352051, 0.17402924597263336, -0.3916376531124115, 0.8604216575622559, -0.07836480438709259, 0.14560988545417786, -0.32635697722435, -0.15214678645133972, -0.25297239422798157, -0.27898168563842773, -0.4160395860671997, -0.20787709951400757, 0.2939402461051941, 0.26824256777763367, 0.5363317728042603, 0.4561929404735565, 0.4084848463535309, 0.4380245506763458, -0.10214673727750778, 0.23976485431194305, -0.44421908259391785, 0.03346554562449455, -0.015543299727141857, -0.4315926134586334, -0.1860751509666443, 0.2972724735736847, 0.560626745223999, 0.48984411358833313, -0.175882488489151, 0.11313889175653458, 0.0927535817027092, 0.5122572183609009, -0.3028257191181183, 0.4218936264514923, -0.6120648980140686, 0.06900795549154282, 0.041764091700315475, -0.08066634833812714, -0.6058202981948853, -0.23000109195709229, 0.28703421354293823, -0.5021450519561768, 0.27471908926963806, 0.20256823301315308, 1.2641963958740234, 0.365590363740921, -0.31754356622695923, -0.5226424336433411, -0.2671189606189728, 0.8295824527740479, -0.9060601592063904, 0.1625015139579773, 0.3777243494987488, 0.09063185751438141, -0.07733821868896484, -1.0056477785110474, -0.7604629993438721, -0.21435485780239105, -0.3553408682346344, 0.2297501116991043, -0.23750583827495575, -0.05795001611113548, 0.23016852140426636, 0.2559356391429901, -0.7753695845603943, -0.03585177659988403, -0.6123093962669373, -0.1680261641740799, 0.713984489440918, 0.1930059939622879, 0.21486274898052216, -0.4927050471305847, -0.5121439695358276, -0.35206666588783264, -0.23896433413028717, 0.12183455377817154, 0.28693684935569763, 0.17677588760852814, -0.1655421108007431, 0.7247206568717957, -0.07159750163555145, 0.6737291216850281, -0.05664282664656639, 0.10545024275779724, 0.6502538919448853, -0.2919526696205139, -0.2766205966472626, -0.0330783948302269, 1.1339408159255981, 0.37416571378707886, 0.3204839527606964, 0.02853103168308735, -0.2079944610595703, -0.006331279408186674, 0.20794333517551422, -0.8745549917221069, -0.3190497159957886, 0.2935810387134552, -0.3594566285610199, -0.36298879981040955, 0.234683096408844, -0.5974026322364807, -0.12400662899017334, -0.04446760192513466, 0.753605842590332, -0.7182466387748718, 0.1193028911948204, 0.4018600285053253, -0.2958705723285675, 0.24256350100040436, -0.13550731539726257, -0.7169776558876038, 0.11789509654045105, 0.25694242119789124, 0.9118182063102722, 0.14823812246322632, -0.573214054107666, -0.2632955014705658, -0.1427055448293686, 0.02579309605062008, 0.6276174187660217, -0.40781912207603455, -0.3006914556026459, 0.056256722658872604, 0.28040897846221924, -0.534376859664917, -0.2807449400424957, 0.7003674507141113, -0.3416372239589691, 0.8115942478179932, -0.01705273799598217, -0.8879408240318298, -0.19862696528434753, 0.170107901096344, -0.5469218492507935, 1.266465425491333, 0.21256549656391144, -0.9616959691047668, 0.0649278536438942, -0.7792153358459473, -0.34001997113227844, -0.23988942801952362, 0.026265207678079605, -0.7010955214500427, 0.022797396406531334, 0.470242440700531, 0.7059842944145203, -0.05845113471150398, 0.17378711700439453, -0.2063339650630951, -0.4503290057182312, 0.4340062439441681, -0.39644816517829895, 1.1526931524276733, 0.19997739791870117, -0.41665589809417725, 0.010082121007144451, -0.666686475276947, -0.0442773662507534, 0.3876081109046936, -0.32075807452201843, -0.19456011056900024, 0.004047847352921963, 0.21532899141311646, 0.3813571631908417, 0.31920742988586426, -0.5829443335533142, 0.32540813088417053, -0.5242229700088501, 0.7584159970283508, 0.6847630143165588, -0.013756904751062393, 0.40043938159942627, -0.28547900915145874, 0.28048741817474365, 0.31222668290138245, 0.07597770541906357, -0.15063759684562683, -0.5070861577987671, -0.907914936542511, -0.2929590940475464, 0.4097507894039154, 0.5286742448806763, -0.7235340476036072, 0.9035680294036865, -0.507297158241272, -0.6051260828971863, -0.8900319933891296, -0.04073372483253479, 0.17767544090747833, 0.5982235074043274, 0.6384375095367432, 0.053102053701877594, -0.4810953140258789, -0.9207314848899841, -0.1085495725274086, 0.12711936235427856, 0.004136115778237581, 0.2952081561088562, 0.7837668061256409, -0.31861433386802673, 1.0035144090652466, -0.8380886316299438, -0.5494732856750488, -0.3644762337207794, 0.09930404275655746, 0.40222904086112976, 0.5000654458999634, 0.5185529589653015, -0.7472295165061951, -0.5792844295501709, -0.5252171754837036, -0.7607734799385071, -0.0368887297809124, -0.14016591012477875, -0.09445252269506454, 0.17791280150413513, 0.5677237510681152, -0.6467558741569519, 0.3284372389316559, 0.5338550806045532, -0.6352903842926025, 0.39657923579216003, -0.4501705765724182, -0.07797843962907791, -1.443854570388794, 0.04099014028906822, 0.06451185047626495, -0.20423069596290588, -0.38651299476623535, -0.057197339832782745, 0.12123026698827744, -0.0742083266377449, -0.4954173266887665, 0.3827457129955292, -0.5747155547142029, 0.19465138018131256, 0.11300398409366608, 0.5253801345825195, 0.21717652678489685, 0.6846115589141846, -0.14164204895496368, 0.7376408576965332, 0.6568429470062256, -0.5137140154838562, 0.30161961913108826, 0.5632795095443726, -0.5289453864097595, 0.25818508863449097, -0.8339234590530396, 0.0664953663945198, -0.09274362027645111, 0.23288285732269287, -1.1955782175064087, 0.05437738820910454, 0.13205480575561523, -0.6849371790885925, 0.2602675259113312, 0.22935278713703156, -0.7143171429634094, -0.554572582244873, -0.4448041319847107, 0.0012061174493283033, 0.49242526292800903, -0.43344712257385254, 0.45554664731025696, 0.23523768782615662, 0.04453409090638161, -0.605993390083313, -1.0172885656356812, -0.12901870906352997, -0.18939799070358276, -0.7876615524291992, 0.4813274145126343, -0.06984808295965195, 0.1440504789352417, 0.20713260769844055, 0.21830207109451294, 0.05591718107461929, 0.022323746234178543, 0.041909217834472656, 0.3168164789676666, -0.04217705503106117, 0.17996835708618164, 0.119239442050457, -0.1398167461156845, 0.08631075918674469, -0.24112389981746674, 0.7274842262268066, -0.19619016349315643, -0.11295657604932785, -0.3997463881969452, 0.1554500162601471, 0.481341689825058, -0.34264230728149414, 1.138345718383789, 0.9402258396148682, -0.27213549613952637, -0.16998887062072754, -0.4066944718360901, -0.2420327514410019, -0.4970751404762268, 0.5992506146430969, -0.3253137469291687, -0.779383659362793, 0.4286155700683594, 0.223667711019516, -0.013464284129440784, 0.7625545263290405, 0.5651229023933411, -0.3142409026622772, 0.8709328174591064, 0.38026630878448486, -0.14222854375839233, 0.48969948291778564, -0.7448539137840271, 0.1504497230052948, -0.8892186284065247, -0.18454787135124207, -0.41910117864608765, -0.44345003366470337, -0.7193329930305481, -0.4508321285247803, 0.340558260679245, -0.012830561958253384, -0.14616918563842773, 0.6050453186035156, -0.6980470418930054, 0.24905431270599365, 0.5726293921470642, 0.23874782025814056, 0.014396325685083866, 0.0010471807327121496, -0.5255084037780762, -0.1323392391204834, -0.6838710308074951, -0.5454071760177612, 1.132681965827942, 0.3948625922203064, 0.4798213541507721, -0.050138697028160095, 0.7072011232376099, 0.1626778095960617, -0.07425636053085327, -0.638260543346405, 0.5496687889099121, -0.172612726688385, -0.5194137096405029, -0.39003634452819824, -0.4254547953605652, -1.0628559589385986, 0.46867236495018005, -0.20133467018604279, -0.6756714582443237, 0.036291275173425674, -0.30237722396850586, -0.2256731390953064, 0.15909330546855927, -0.8160168528556824, 1.086910367012024, -0.004035483114421368, -0.2206553965806961, -0.15833695232868195, -0.7181394696235657, 0.09509847313165665, 0.3190176486968994, 0.1665327250957489, -0.07668355107307434, -0.026480626314878464, 0.8395761847496033, -0.4204697906970978, 0.7203288078308105, -0.1952992081642151, 0.13865602016448975, 0.3318367898464203, -0.28889700770378113, 0.42865461111068726, -0.07760360091924667, -0.17803388833999634, 0.12371261417865753, -0.01959785260260105, -0.4615000784397125, -0.49504175782203674, 0.7147266864776611, -0.9087534546852112, -0.3543035686016083, -0.6044690608978271, -0.5649333596229553, -0.032915957272052765, 0.22009308636188507, 0.49840307235717773, 0.45476728677749634, -0.06485173106193542, 0.4472227096557617, 0.6224885582923889, -0.3080886900424957, 0.7227770686149597, 0.42100071907043457, -0.04760207235813141, -0.5022732019424438, 0.6621960401535034, 0.21236597001552582, 0.07965529710054398, 0.42383483052253723, 0.19755719602108002, -0.5191178917884827, -0.35546183586120605, -0.31517767906188965, 0.433660626411438, -0.6318773627281189, -0.1573687493801117, -0.7936766743659973, -0.3986209034919739, -0.6902722716331482, 0.00946810096502304, -0.20288226008415222, -0.36688581109046936, -0.49110129475593567, -0.31096601486206055, 0.33245381712913513, 0.5166858434677124, 0.12740708887577057, 0.23556947708129883, -0.602565348148346, 0.08359943330287933, 0.04427672550082207, 0.12755343317985535, -0.19248433411121368, -0.8625117540359497, -0.43489623069763184, 0.037267085164785385, -0.4652676582336426, -0.9975308775901794, 0.5954239964485168, 0.1890292465686798, 0.5671911239624023, 0.25719261169433594, 0.153476744890213, 0.6055247187614441, -0.5655966997146606, 0.9015138149261475, -0.04908245801925659, -0.9215262532234192, 0.5957915186882019, -0.08314336091279984, 0.35108450055122375, 0.5633153915405273, 0.4378543496131897, -0.4424324333667755, -0.45196518301963806, -0.7635319232940674, -1.0034079551696777, 0.7669260501861572, 0.5170676708221436, 0.27606767416000366, -0.15562739968299866, 0.16661673784255981, -0.2300044149160385, 0.1701924055814743, -0.9772582054138184, -0.5036678314208984, -0.2614086866378784, -0.528972327709198, -0.32346948981285095, -0.19606846570968628, 0.06919191032648087, -0.4899086356163025, 0.8334210515022278, 0.060538068413734436, 0.5394794344902039, 0.5467602610588074, -0.47072282433509827, 0.3620624244213104, 0.13515834510326385, 0.6611834764480591, 0.3366883397102356, -0.20843544602394104, 0.008713549003005028, 0.2306816279888153, -0.5140412449836731, -0.03522225469350815, 0.4888726770877838, -0.08218313008546829, 0.2778083086013794, 0.44524458050727844, 0.933282196521759, 0.33220064640045166, -0.46710464358329773, 0.7820423245429993, -0.11838216334581375, -0.34001368284225464, -0.4752104878425598, -0.06795481592416763, 0.2591497600078583, 0.2737434506416321, 0.35324811935424805, -0.05467026308178902, 0.06281222403049469, -0.34436672925949097, 0.2610660493373871, 0.2162051945924759, -0.42834484577178955, -0.06697375327348709, 0.7562695145606995, 0.04423028603196144, -0.1666739284992218, 0.9176310896873474, -0.2707993984222412, -0.6417381167411804, 0.5020151138305664, 0.4789807200431824, 0.8761745691299438, -0.03652423247694969, 0.22653570771217346, 0.5345866084098816, 0.45005372166633606, 0.044667843729257584, 0.1349947452545166, 0.050046179443597794, -0.7660380005836487, -0.017284737899899483, -0.6639101505279541, 0.11882596462965012, -0.06897490471601486, -0.6665524840354919, 0.4190424680709839, -0.07624272257089615, -0.09948618710041046, -0.12330511212348938, 0.27498969435691833, -0.8069735169410706, 0.13901543617248535, 0.04212070256471634, 0.9649582505226135, -0.9201313853263855, 1.0369523763656616, 0.6280270218849182, -0.9041718244552612, -0.8699657320976257, -0.05388033762574196, -0.3282652199268341, -0.7857784032821655, 0.45177164673805237, 0.468463271856308, 0.1990913450717926, 0.22273552417755127, -0.41425707936286926, -0.7730569243431091, 1.587072730064392, 0.30535927414894104, -0.48337322473526, -0.27856898307800293, 0.1838281750679016, 0.6368370652198792, -0.3630808889865875, 0.5437816381454468, 0.4473992586135864, 0.4354981780052185, -0.09118682891130447, -0.7272070050239563, 0.09429771453142166, -0.2633052170276642, 0.10817695409059525, -0.16748212277889252, -0.6392737627029419, 0.9981775283813477, -0.11553802341222763, -0.17049714922904968, 0.0011415246408432722, 0.7278602719306946, 0.26236703991889954, 0.13962556421756744, 0.42132967710494995, 0.87029629945755, 0.7807860970497131, -0.17942014336585999, 1.0804497003555298, -0.40253740549087524, 0.8687179684638977, 0.9649150967597961, 0.06034255772829056, 1.016335368156433, 0.4526025950908661, -0.31022047996520996, 0.8096847534179688, 0.6511650681495667, -0.28232109546661377, 0.6501409411430359, 0.2278907746076584, 0.06900379061698914, 0.034478820860385895, 0.3390117883682251, -0.37405094504356384, 0.5427727103233337, 0.20194967091083527, -0.7981384992599487, -0.07748603820800781, 0.07346042990684509, 0.1929430067539215, 0.07937777787446976, 0.06993311643600464, 0.6495071649551392, 0.12678171694278717, -0.49659594893455505, 0.6577995419502258, 0.13729333877563477, 0.8520497679710388, -0.5022121667861938, 0.22679084539413452, -0.16645307838916779, 0.31507986783981323, -0.10352238267660141, -0.748670756816864, 0.25269314646720886, -0.18462009727954865, -0.1908102035522461, -0.2847581207752228, 0.41446515917778015, -0.6679092049598694, -0.7055000066757202, 0.3983139097690582, 0.3952587842941284, 0.21021287143230438, -0.028843440115451813, -1.0786480903625488, -0.0798957347869873, 0.08683868497610092, -0.6537348031997681, 0.13398443162441254, 0.48456913232803345, 0.3667212724685669, 0.5420934557914734, 0.5122706890106201, -0.1013837531208992, 0.11959882825613022, 0.0809081569314003, 0.8577662706375122, -0.6582705974578857, -0.5014482736587524, -0.9924326539039612, 0.7571069598197937, -0.3414187431335449, -0.44580671191215515, 0.7755725979804993, 0.7440705895423889, 0.8664991855621338, -0.23037175834178925, 0.5426756143569946, -0.17821282148361206, 0.32028838992118835, -0.6121407151222229, 1.0003613233566284, -0.6222507357597351, 0.1991294026374817, -0.2191176861524582, -0.9447240829467773, -0.08484160155057907, 0.8531066179275513, -0.4303499460220337, 0.036637090146541595, 0.9627464413642883, 0.9570475816726685, -0.06128133833408356, -0.2338518351316452, 0.22028936445713043, 0.45736899971961975, 0.23916006088256836, 0.6403059363365173, 0.3668364882469177, -0.9486578106880188, 0.7722945213317871, -0.4189172685146332, 0.002233058214187622, -0.18721860647201538, -0.7068701982498169, -0.9375036358833313, -0.9726715087890625, -0.32824134826660156, -0.4344959557056427, -0.15754935145378113, 0.9283852577209473, 0.5129706859588623, -0.6784705519676208, -0.07816235721111298, -0.11932246387004852, -0.07530506700277328, -0.16783837974071503, -0.35068705677986145, 0.5887277722358704, -0.5686994791030884, -0.947587251663208, 0.2558145225048065, -0.09875089675188065, -0.05195927619934082, -0.35737669467926025, -0.02636011317372322, -0.6785127520561218, 0.13785429298877716, 0.5264480113983154, -0.29998019337654114, -0.7063877582550049, -0.17750002443790436, 0.1178867444396019, -0.5416427254676819, 0.04846986010670662, 0.31441301107406616, -0.7001329064369202, 0.4267551898956299, 0.49904051423072815, 0.44063901901245117, 0.7505378723144531, -0.1478186696767807, 0.36520686745643616, -0.8062726259231567, 0.21320676803588867, 0.17942707240581512, 0.7245351076126099, 0.4132961630821228, -0.34561651945114136, 0.6069660782814026, 0.3225574195384979, -0.5739885568618774, -0.7133987545967102, -0.19242320954799652, -1.055084228515625, -0.3964895009994507, 1.1516972780227661, -0.37811803817749023, -0.3909338116645813, 0.2857394516468048, -0.333156555891037, 0.4306013882160187, -0.3662389814853668, 0.7890499234199524, 0.8870059251785278, 0.04569076746702194, -0.12548623979091644, -0.4942508339881897, 0.28164032101631165, 0.4221048355102539, -0.5580209493637085, -0.3367272913455963, 0.24594172835350037, 0.4782215356826782, 0.17546501755714417, 0.41662025451660156, -0.09241127967834473, -0.01473515760153532, 0.10767945647239685, 0.07244778424501419, -0.30878183245658875, 0.049928560853004456, -0.4242858588695526, 0.15819181501865387, -0.3761458992958069, -0.4815106987953186 ]
cardiffnlp/twitter-roberta-base-offensive
cardiffnlp
"2022-11-28T11:36:23Z"
457,022
11
transformers
[ "transformers", "pytorch", "tf", "jax", "roberta", "text-classification", "arxiv:2010.12421", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
# Twitter-roBERTa-base for Offensive Language Identification This is a roBERTa-base model trained on ~58M tweets and finetuned for offensive language identification with the TweetEval benchmark. - Paper: [_TweetEval_ benchmark (Findings of EMNLP 2020)](https://arxiv.org/pdf/2010.12421.pdf). - Git Repo: [Tweeteval official repository](https://github.com/cardiffnlp/tweeteval). ## Example of classification ```python from transformers import AutoModelForSequenceClassification from transformers import TFAutoModelForSequenceClassification from transformers import AutoTokenizer import numpy as np from scipy.special import softmax import csv import urllib.request # Preprocess text (username and link placeholders) def preprocess(text): new_text = [] for t in text.split(" "): t = '@user' if t.startswith('@') and len(t) > 1 else t t = 'http' if t.startswith('http') else t new_text.append(t) return " ".join(new_text) # Tasks: # emoji, emotion, hate, irony, offensive, sentiment # stance/abortion, stance/atheism, stance/climate, stance/feminist, stance/hillary task='offensive' MODEL = f"cardiffnlp/twitter-roberta-base-{task}" tokenizer = AutoTokenizer.from_pretrained(MODEL) # download label mapping labels=[] mapping_link = f"https://raw.githubusercontent.com/cardiffnlp/tweeteval/main/datasets/{task}/mapping.txt" with urllib.request.urlopen(mapping_link) as f: html = f.read().decode('utf-8').split("\n") csvreader = csv.reader(html, delimiter='\t') labels = [row[1] for row in csvreader if len(row) > 1] # PT model = AutoModelForSequenceClassification.from_pretrained(MODEL) model.save_pretrained(MODEL) text = "Good night 😊" text = preprocess(text) encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) scores = output[0][0].detach().numpy() scores = softmax(scores) # # TF # model = TFAutoModelForSequenceClassification.from_pretrained(MODEL) # model.save_pretrained(MODEL) # text = "Good night 😊" # encoded_input = tokenizer(text, return_tensors='tf') # output = model(encoded_input) # scores = output[0][0].numpy() # scores = softmax(scores) ranking = np.argsort(scores) ranking = ranking[::-1] for i in range(scores.shape[0]): l = labels[ranking[i]] s = scores[ranking[i]] print(f"{i+1}) {l} {np.round(float(s), 4)}") ``` Output: ``` 1) not-offensive 0.9073 2) offensive 0.0927 ```
[ 0.08349089324474335, -0.6915644407272339, 0.013619336299598217, 0.3320023715496063, -0.1332176774740219, 0.2272927463054657, -0.3947713375091553, -0.2141398936510086, 0.07341514527797699, 0.10497508943080902, -0.241249218583107, -0.852820873260498, -0.867046594619751, 0.06940259784460068, -0.5723753571510315, 1.1278414726257324, 0.09113998711109161, -0.09199683368206024, 0.39649248123168945, -0.22774912416934967, -0.12930473685264587, -0.5013593435287476, -0.7630966305732727, -0.18913520872592926, 0.42671552300453186, 0.29695236682891846, 0.4239065647125244, 0.5300379395484924, 0.338424414396286, 0.5408345460891724, -0.03256259113550186, -0.08869381248950958, -0.621257483959198, 0.1175188422203064, -0.08890953660011292, -0.29418569803237915, -0.4397337734699249, 0.1544082760810852, 0.5820001363754272, 0.3234957456588745, 0.04462025687098503, 0.35216084122657776, -0.10589046776294708, 0.33747220039367676, -0.5583826899528503, 0.10840213298797607, -0.46267369389533997, -0.030660508200526237, -0.28369587659835815, -0.10802285373210907, -0.4134698510169983, -0.5482654571533203, 0.022396666929125786, -0.46188822388648987, 0.1563517451286316, -0.14153391122817993, 1.244454026222229, 0.18692664802074432, -0.24932989478111267, -0.20341438055038452, -0.40149134397506714, 1.0686297416687012, -0.7307718992233276, 0.1390754133462906, 0.342849463224411, 0.16157777607440948, 0.07887305319309235, -0.5484445691108704, -0.4579716622829437, -0.14659786224365234, 0.061290740966796875, 0.1771274209022522, -0.42889317870140076, -0.21028481423854828, 0.2742522954940796, 0.24214936792850494, -0.5553858280181885, -0.01386761013418436, -0.5572305917739868, -0.16096235811710358, 0.6384202241897583, 0.09215404093265533, 0.39282286167144775, -0.2563439905643463, -0.22722764313220978, -0.1848030984401703, -0.1557755023241043, 0.10511448979377747, 0.2919968068599701, 0.49340179562568665, -0.38552436232566833, 0.5344662070274353, -0.21214234828948975, 0.576849102973938, 0.17907710373401642, -0.15632884204387665, 0.7014447450637817, -0.06158458814024925, -0.23138122260570526, -0.13100565969944, 1.1631792783737183, 0.3584235608577728, 0.5392591953277588, -0.09671507030725479, -0.28164300322532654, 0.04292689636349678, 0.036803506314754486, -0.8532318472862244, -0.36630868911743164, 0.28330501914024353, -0.432235985994339, -0.6861391663551331, 0.002641950733959675, -0.7817028164863586, -0.20227743685245514, 0.04261663556098938, 0.7199180126190186, -0.6716259121894836, -0.4203876852989197, -0.19017885625362396, -0.4049994647502899, 0.09509553760290146, 0.08105482161045074, -0.8664326071739197, 0.10779553651809692, 0.4488307237625122, 0.831549346446991, 0.019490443170070648, -0.3205079734325409, -0.3200288712978363, 0.005391154903918505, -0.2656790614128113, 0.4078575074672699, -0.506257951259613, -0.14772184193134308, 0.021394914016127586, -0.03319375589489937, -0.10688844323158264, -0.41488540172576904, 0.36420348286628723, -0.3295174837112427, 0.2595963776111603, 0.028825435787439346, -0.407888263463974, 0.02093067392706871, 0.2899819314479828, -0.36070576310157776, 1.229654312133789, 0.3571438491344452, -0.7765371203422546, 0.1845942884683609, -0.718436598777771, -0.4360875189304352, 0.005625086836516857, 0.10835230350494385, -0.6379040479660034, -0.16662168502807617, 0.17061808705329895, 0.4756094813346863, -0.023263994604349136, 0.15400874614715576, -0.37114137411117554, -0.30781662464141846, 0.37983211874961853, -0.3244185447692871, 1.271302342414856, 0.33765533566474915, -0.4558347761631012, 0.2833893895149231, -0.8515195846557617, 0.1514013111591339, 0.2381514608860016, -0.5282599329948425, -0.2331865429878235, -0.3188997805118561, 0.32889118790626526, 0.13354919850826263, 0.2726457417011261, -0.5644010305404663, -0.02669583447277546, -0.3883794844150543, 0.577363133430481, 0.8184343576431274, -0.15985260903835297, 0.3667416572570801, -0.42694205045700073, 0.3768391013145447, 0.10597632825374603, 0.1214231327176094, 0.11887489259243011, -0.4746686518192291, -0.7800635099411011, -0.19421987235546112, 0.36378586292266846, 0.6855120658874512, -0.6134914755821228, 0.497537761926651, -0.34249168634414673, -0.6655901670455933, -0.49646422266960144, -0.07424604147672653, 0.4959504306316376, 0.5249922871589661, 0.6141223907470703, 0.0687856674194336, -0.8054794669151306, -0.5882563591003418, -0.5045519471168518, -0.3135416805744171, 0.027772150933742523, 0.20722152292728424, 0.7113159894943237, -0.1346069574356079, 0.6114882826805115, -0.3514505922794342, -0.30588817596435547, -0.2119482159614563, 0.4254521131515503, 0.39396578073501587, 0.840129554271698, 0.7956289052963257, -0.6394612193107605, -0.6506714224815369, -0.2569265365600586, -0.7131208777427673, -0.360330730676651, 0.203811913728714, -0.17661204934120178, 0.36257466673851013, 0.23058032989501953, -0.2581346333026886, 0.4791151285171509, 0.3027366101741791, -0.4915810227394104, 0.28351864218711853, 0.03627697378396988, 0.355816125869751, -1.2460569143295288, 0.03544345870614052, 0.2185068130493164, -0.02878676913678646, -0.8146897554397583, -0.03867313265800476, 0.038028497248888016, 0.14598897099494934, -0.4866419732570648, 0.514177143573761, -0.2644270658493042, 0.23181520402431488, 0.05087389424443245, -0.02233816497027874, -0.16582000255584717, 0.37686944007873535, -0.07994815707206726, 0.5477725267410278, 0.5186435580253601, -0.44708049297332764, 0.38956311345100403, 0.22335009276866913, -0.10826820135116577, 0.43661096692085266, -0.61435467004776, -0.05246639996767044, 0.09483747184276581, 0.018431203439831734, -1.1840943098068237, -0.26115041971206665, 0.43569740653038025, -0.9070640206336975, 0.3129449486732483, -0.5069246292114258, -0.32558971643447876, -0.4685882329940796, -0.312139630317688, 0.5592811107635498, 0.6618053913116455, -0.5026896595954895, 0.5581177473068237, 0.49673253297805786, 0.16169129312038422, -0.8784470558166504, -0.9257368445396423, 0.08948490023612976, -0.3766039311885834, -0.580564558506012, 0.2902585566043854, 0.011798140592873096, -0.17958343029022217, -0.09514225274324417, 0.14204443991184235, -0.3075673282146454, 0.17125602066516876, 0.17013613879680634, 0.24779458343982697, -0.2515942454338074, 0.06743863970041275, -0.263680636882782, 0.010528599843382835, 0.1749640256166458, -0.26269516348838806, 0.5976512432098389, -0.33462250232696533, 0.18727603554725647, -0.4908660352230072, 0.1902400255203247, 0.3120444715023041, -0.09245965629816055, 0.8478527665138245, 1.0387499332427979, -0.469314843416214, -0.15363648533821106, -0.4547606110572815, 0.02165849693119526, -0.5122507214546204, 0.49810802936553955, -0.3861949145793915, -0.6643778085708618, 0.612028956413269, 0.2787071466445923, -0.027882182970643044, 0.7586843371391296, 0.6714808940887451, -0.05059843137860298, 0.9282689690589905, 0.3311886787414551, -0.11544869095087051, 0.7264825701713562, -0.6149727702140808, 0.010775076225399971, -0.52555251121521, -0.2617063820362091, -0.6837126612663269, -0.13785061240196228, -0.7615308165550232, -0.3217075765132904, 0.03567725047469139, -0.038625478744506836, -0.6451147794723511, 0.3648151755332947, -0.715268611907959, 0.34677308797836304, 0.4223283529281616, 0.22281146049499512, -0.27983206510543823, -0.07236690074205399, 0.017403628677129745, -0.0751001238822937, -0.5196932554244995, -0.39675453305244446, 1.2803394794464111, 0.40383732318878174, 0.7328615784645081, 0.28767111897468567, 0.8660953640937805, 0.1952354907989502, 0.5703484416007996, -0.7076246738433838, 0.5301883816719055, -0.35714995861053467, -0.6198335289955139, -0.2823081314563751, -0.6320512890815735, -0.8307079672813416, 0.09419198334217072, -0.30243557691574097, -0.836050808429718, 0.014178493991494179, 0.0024941079318523407, -0.21272745728492737, 0.4045838415622711, -0.6417681574821472, 0.9145264625549316, -0.107655368745327, -0.45855721831321716, 0.14473430812358856, -0.429196298122406, 0.3664657175540924, 0.011737871915102005, 0.2792830765247345, -0.2414165735244751, -0.03814991936087608, 1.1795833110809326, -0.516803503036499, 0.8906298279762268, -0.2719188332557678, 0.11969252675771713, 0.16585353016853333, -0.09136567264795303, 0.12923328578472137, -0.16717393696308136, -0.29928696155548096, 0.29075711965560913, -0.18363499641418457, -0.5109650492668152, -0.14319831132888794, 0.7311975955963135, -1.0158637762069702, -0.4979220926761627, -0.7022397518157959, -0.4246087670326233, 0.18690213561058044, 0.4212075173854828, 0.5000989437103271, 0.46753641963005066, -0.16692212224006653, 0.31897228956222534, 0.48630329966545105, -0.23579441010951996, 0.5578965544700623, 0.3160288631916046, -0.07322517782449722, -0.5175423622131348, 0.8897246718406677, 0.19553303718566895, 0.020071156322956085, 0.39487001299858093, 0.3667328357696533, -0.35747215151786804, -0.482997328042984, -0.21492765843868256, 0.08881086111068726, -0.7485342025756836, -0.298583984375, -0.6972101330757141, -0.4437972605228424, -0.7914635539054871, -0.03760769963264465, -0.20713266730308533, -0.5307953357696533, -0.5526620745658875, 0.05637482926249504, 0.5327250957489014, 0.851839005947113, -0.35475072264671326, 0.37137794494628906, -0.5602330565452576, 0.3100014626979828, 0.05225374177098274, 0.26417338848114014, -0.013421086594462395, -1.1076228618621826, -0.17991071939468384, 0.03493882715702057, -0.35807672142982483, -1.0250965356826782, 0.6552359461784363, 0.19102777540683746, 0.45777690410614014, 0.5018643736839294, 0.20344668626785278, 0.690265417098999, -0.2617461383342743, 0.7521527409553528, 0.20066890120506287, -1.0390211343765259, 0.6146227717399597, -0.47637316584587097, 0.16162879765033722, 0.30199605226516724, 0.38421717286109924, -0.473312109708786, -0.5563555955886841, -0.6220711469650269, -0.9689165949821472, 0.9073920249938965, 0.35894814133644104, 0.17191140353679657, -0.2838476598262787, 0.10596475750207901, -0.20552287995815277, -0.06325960159301758, -0.9563978314399719, -0.548466145992279, -0.5637178421020508, -0.5614075064659119, -0.058845579624176025, -0.18346868455410004, -0.18494322896003723, -0.48718756437301636, 0.8148100972175598, 0.1019083708524704, 0.3933738172054291, -0.04536356404423714, -0.3074425160884857, -0.12854604423046112, 0.15159016847610474, 0.6553698778152466, 0.669457197189331, -0.4410422742366791, -0.038757145404815674, 0.3618340790271759, -0.49462923407554626, 0.1135190948843956, 0.05090700834989548, 0.0067522041499614716, 0.11881829053163528, 0.4321862757205963, 0.5726656317710876, 0.2255055159330368, -0.16547849774360657, 0.7184010148048401, -0.1436859667301178, -0.2878077030181885, -0.5716227889060974, 0.17967724800109863, -0.09012509882450104, 0.1921686977148056, 0.6644598841667175, 0.1687125563621521, -0.021306617185473442, -0.4623209834098816, 0.21272416412830353, 0.1947624832391739, -0.3367156684398651, -0.33555591106414795, 0.8533594608306885, 0.0668884888291359, -0.6243814826011658, 0.5478116869926453, -0.03716383874416351, -0.8861601948738098, 0.7703953385353088, 0.537449061870575, 0.9384105801582336, -0.31642991304397583, 0.27935752272605896, 0.9107540249824524, 0.2403101623058319, 0.09026192128658295, 0.44905656576156616, 0.08713340014219284, -0.7424764633178711, 0.008580352179706097, -0.6716643571853638, -0.026592103764414787, 0.21703104674816132, -0.6365678310394287, 0.1120370402932167, -0.6921265125274658, -0.4153907299041748, 0.2559307813644409, 0.09066304564476013, -0.6514069437980652, 0.41550493240356445, 0.11897624284029007, 0.745770275592804, -1.1616997718811035, 0.8385642766952515, 0.5585519671440125, -0.6585036516189575, -0.9014711380004883, -0.1024789810180664, -0.03984083980321884, -0.9060720205307007, 0.9142276644706726, 0.24939779937267303, 0.18680012226104736, 0.0426858626306057, -0.6984051465988159, -0.8762675523757935, 0.8153056502342224, 0.08591661602258682, -0.049246348440647125, 0.03579200804233551, 0.2153647541999817, 0.6700053811073303, -0.35899028182029724, 0.6467731595039368, 0.550212562084198, 0.4923270344734192, -0.06735095381736755, -0.5526595711708069, 0.2727223336696625, -0.47714361548423767, -0.03869117051362991, 0.09431502223014832, -0.7518863677978516, 1.1995502710342407, -0.2051694393157959, -0.08424000442028046, 0.19414132833480835, 0.7020620107650757, 0.2399648278951645, 0.22941574454307556, 0.4754265248775482, 0.6017561554908752, 0.7095906734466553, -0.4681648910045624, 0.7100263237953186, -0.19149935245513916, 0.6491023898124695, 0.7857517004013062, 0.4313114285469055, 0.8291440010070801, 0.3748498857021332, -0.19003725051879883, 0.587225079536438, 0.6886043548583984, -0.30597054958343506, 0.4804745614528656, 0.3539384603500366, 0.005101341754198074, -0.13333433866500854, 0.015776032581925392, -0.3996953070163727, 0.45902493596076965, 0.433788537979126, -0.5242259502410889, -0.20300902426242828, -0.08979019522666931, 0.22903472185134888, 0.04559233412146568, -0.22979728877544403, 0.5998764038085938, -0.04829864948987961, -0.5136520266532898, 0.961781919002533, 0.0733741819858551, 0.8689104914665222, -0.3206372559070587, 0.01723681204020977, 0.0006455944385379553, 0.35589125752449036, -0.31865277886390686, -0.8999226689338684, 0.09608643501996994, 0.24779671430587769, -0.06955686956644058, -0.28021299839019775, 0.4118325412273407, -0.6023216247558594, -0.487918496131897, 0.4091026782989502, 0.08874497562646866, 0.39783975481987, 0.23803800344467163, -1.0938782691955566, 0.10753389447927475, 0.01565862074494362, -0.4375416934490204, 0.07754646986722946, 0.5205335021018982, 0.08391600847244263, 0.5721058249473572, 0.7028738260269165, -0.0020621446892619133, 0.33347898721694946, 0.23965270817279816, 0.8102892637252808, -0.7135000824928284, -0.3790494203567505, -0.9566442966461182, 0.37801051139831543, -0.24116718769073486, -0.6605044603347778, 0.6902856230735779, 0.6789019107818604, 0.7650196552276611, -0.07796213775873184, 0.7981244921684265, -0.3585757613182068, 0.5299302339553833, -0.28016790747642517, 1.0691133737564087, -0.6496160626411438, 0.003830746980383992, -0.3800205588340759, -0.5676138401031494, -0.28230881690979004, 0.8678239583969116, -0.4519204795360565, 0.3395202159881592, 0.5176339745521545, 0.7931835055351257, -0.017797136679291725, -0.288907527923584, 0.2652232348918915, 0.5857795476913452, 0.40254461765289307, 0.7675517201423645, 0.684537947177887, -0.8500658869743347, 0.7740780115127563, -0.5147032737731934, -0.24117615818977356, -0.44771715998649597, -0.7461844682693481, -1.2168699502944946, -0.6328046917915344, -0.41128861904144287, -0.9282639026641846, 0.1026705801486969, 0.9735909700393677, 0.6343986392021179, -1.1382691860198975, -0.27003178000450134, 0.15633586049079895, 0.09846649318933487, -0.04712086543440819, -0.3035958409309387, 0.4816570580005646, -0.26493799686431885, -0.9232996702194214, 0.1168682649731636, -0.18821914494037628, 0.22026564180850983, 0.12786982953548431, -0.07803493738174438, -0.5064927935600281, 0.007438682951033115, 0.32524773478507996, 0.3404863476753235, -0.7355799078941345, -0.43854618072509766, -0.1286967247724533, -0.47218790650367737, 0.1330389827489853, 0.05387537553906441, -0.5124760866165161, 0.21548590064048767, 0.6070190668106079, 0.3772706687450409, 0.5098323225975037, 0.11276305466890335, 0.34215158224105835, -0.7346517443656921, 0.13892507553100586, 0.24990570545196533, 0.42189985513687134, 0.42186564207077026, -0.19324254989624023, 0.5574329495429993, 0.3716656267642975, -0.517049252986908, -0.9565630555152893, -0.28506430983543396, -0.9778403639793396, -0.14510402083396912, 1.156623125076294, -0.3349766731262207, -0.5948728919029236, -0.12064474076032639, 0.029213910922408104, 0.7214018702507019, -0.6660163998603821, 0.8374099135398865, 0.4363161027431488, 0.29169148206710815, -0.015577378682792187, -0.26927271485328674, 0.5980316400527954, 0.30075666308403015, -0.5370079278945923, -0.1681414693593979, 0.06791235506534576, 0.6940768957138062, 0.16221168637275696, 0.6641058325767517, 0.03099541738629341, 0.37899428606033325, 0.04339004307985306, 0.030445527285337448, -0.13265332579612732, -0.06901015341281891, -0.3548678457736969, 0.2038423866033554, -0.46363210678100586, -0.38865604996681213 ]
TheBloke/CodeLlama-34B-Instruct-GPTQ
TheBloke
"2023-09-27T12:46:12Z"
449,496
60
transformers
[ "transformers", "safetensors", "llama", "text-generation", "llama-2", "custom_code", "code", "arxiv:2308.12950", "base_model:codellama/CodeLlama-34b-instruct-hf", "license:llama2", "text-generation-inference", "4-bit", "region:us" ]
text-generation
"2023-08-25T07:43:45Z"
--- language: - code license: llama2 tags: - llama-2 model_name: CodeLlama 34B Instruct base_model: codellama/CodeLlama-34b-instruct-hf inference: false model_creator: Meta model_type: llama pipeline_tag: text-generation prompt_template: '[INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: {prompt} [/INST] ' quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # CodeLlama 34B Instruct - GPTQ - Model creator: [Meta](https://huggingface.co/meta-llama) - Original model: [CodeLlama 34B Instruct](https://huggingface.co/codellama/CodeLlama-34b-instruct-hf) <!-- description start --> ## Description This repo contains GPTQ model files for [Meta's CodeLlama 34B Instruct](https://huggingface.co/codellama/CodeLlama-34b-instruct-hf). Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them. <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GGUF) * [Meta's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/codellama/CodeLlama-34b-instruct-hf) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: CodeLlama ``` [INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: {prompt} [/INST] ``` <!-- prompt-template end --> <!-- README_GPTQ.md-provided-files start --> ## Provided files and GPTQ parameters Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements. Each separate quant is in a different branch. See below for instructions on fetching from different branches. All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches are made with AutoGPTQ. Files in the `main` branch which were uploaded before August 2023 were made with GPTQ-for-LLaMa. <details> <summary>Explanation of GPTQ parameters</summary> - Bits: The bit size of the quantised model. - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value. - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now. - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy. - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s). - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences. - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit. </details> | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc | | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- | | [main](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 18.33 GB | Yes | 4-bit, without Act Order and group size 128g. | | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 20.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. | | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 18.98 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. | | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 18.33 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. | | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 34.30 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. | | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 35.07 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. | <!-- README_GPTQ.md-provided-files end --> <!-- README_GPTQ.md-download-from-branches start --> ## How to download from branches - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/CodeLlama-34B-Instruct-GPTQ:main` - With Git, you can clone a branch with: ``` git clone --single-branch --branch main https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GPTQ ``` - In Python Transformers code, the branch is the `revision` parameter; see below. <!-- README_GPTQ.md-download-from-branches end --> <!-- README_GPTQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui). Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/CodeLlama-34B-Instruct-GPTQ`. - To download from a specific branch, enter for example `TheBloke/CodeLlama-34B-Instruct-GPTQ:main` - see Provided Files above for the list of branches for each option. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `CodeLlama-34B-Instruct-GPTQ` 7. The model will automatically load, and is now ready for use! 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. * Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`. 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started! <!-- README_GPTQ.md-text-generation-webui end --> <!-- README_GPTQ.md-use-from-python start --> ## How to use this GPTQ model from Python code ### Install the necessary packages Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later. ```shell pip3 install transformers>=4.32.0 optimum>=1.12.0 pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7 ``` If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y auto-gptq git clone https://github.com/PanQiWei/AutoGPTQ cd AutoGPTQ pip3 install . ``` ### For CodeLlama models only: you must use Transformers 4.33.0 or later. If 4.33.0 is not yet released when you read this, you will need to install Transformers from source: ```shell pip3 uninstall -y transformers pip3 install git+https://github.com/huggingface/transformers.git ``` ### You can then use the following code ```python from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline model_name_or_path = "TheBloke/CodeLlama-34B-Instruct-GPTQ" # To use a different branch, change revision # For example: revision="main" model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto", trust_remote_code=False, revision="main") tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) prompt = "Tell me about AI" prompt_template=f'''[INST] Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: {prompt} [/INST] ''' print("\n\n*** Generate:") input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda() output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512) print(tokenizer.decode(output[0])) # Inference can also be done using transformers' pipeline print("*** Pipeline:") pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1 ) print(pipe(prompt_template)[0]['generated_text']) ``` <!-- README_GPTQ.md-use-from-python end --> <!-- README_GPTQ.md-compatibility start --> ## Compatibility The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI). [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility. [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models. <!-- README_GPTQ.md-compatibility end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Meta's CodeLlama 34B Instruct # **Code Llama** Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This is the repository for the 34B instruct-tuned version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom. | | Base Model | Python | Instruct | | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) | | 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) | | 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) | ## Model Use To use this model, please make sure to install transformers from `main` until the next version is released: ```bash pip install git+https://github.com/huggingface/transformers.git@main accelerate ``` Model capabilities: - [x] Code completion. - [ ] Infilling. - [x] Instructions / chat. - [ ] Python specialist. ## Model Details *Note: Use of this model is governed by the Meta license. Meta developed and publicly released the Code Llama family of large language models (LLMs). **Model Developers** Meta **Variations** Code Llama comes in three model sizes, and three variants: * Code Llama: base models designed for general code synthesis and understanding * Code Llama - Python: designed specifically for Python * Code Llama - Instruct: for instruction following and safer deployment All variants are available in sizes of 7B, 13B and 34B parameters. **This repository contains the Instruct version of the 34B parameters model.** **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture. **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950). ## Intended Use **Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications. **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants. ## Hardware and Software **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster. **Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program. ## Training Data All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details). ## Evaluation Results See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper. ## Ethical Considerations and Limitations Code Llama and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-user-guide](https://ai.meta.com/llama/responsible-user-guide).
[ -0.45750147104263306, -0.7918346524238586, 0.1507009118795395, 0.12558212876319885, -0.32681623101234436, -0.12844839692115784, 0.03396103158593178, -0.46163299679756165, 0.1578616499900818, 0.3568498194217682, -0.583985447883606, -0.5577465891838074, -0.3156720697879791, -0.04204791411757469, -0.27738580107688904, 1.0181326866149902, 0.112176313996315, -0.26721319556236267, -0.12109892070293427, -0.23566780984401703, -0.1931494027376175, -0.469957172870636, -0.670151948928833, -0.1938510686159134, 0.25391408801078796, 0.14848282933235168, 0.8166286945343018, 0.5176927447319031, 0.17184339463710785, 0.34182238578796387, -0.088651642203331, -0.06968154013156891, -0.5364431738853455, -0.1374279260635376, 0.19628049433231354, -0.25812050700187683, -0.6981753706932068, 0.06315116584300995, 0.4575584828853607, 0.11287026107311249, -0.4368424713611603, 0.2980436086654663, 0.08782341331243515, 0.6763173341751099, -0.44030845165252686, 0.24682553112506866, -0.36772510409355164, 0.014379968866705894, -0.1037602499127388, 0.1581389158964157, -0.06248433142900467, -0.5106455087661743, 0.11300522089004517, -0.8138490915298462, 0.2016911804676056, -0.030125515535473824, 1.2329907417297363, 0.12171858549118042, -0.549597442150116, 0.08930706232786179, -0.42352890968322754, 0.6459559202194214, -0.9021852612495422, 0.25854554772377014, 0.4314225912094116, 0.19547341763973236, -0.13941234350204468, -0.8512775897979736, -0.5698038935661316, -0.04993380233645439, -0.13085265457630157, 0.2991079092025757, -0.430245041847229, 0.12379056215286255, 0.5068488717079163, 0.7670514583587646, -0.9143509864807129, -0.23219488561153412, -0.22994695603847504, -0.09924770146608353, 0.8763803243637085, 0.19153650104999542, 0.36932337284088135, -0.2930517792701721, -0.3165382146835327, -0.402670681476593, -0.6932977437973022, 0.11630813777446747, 0.34478676319122314, 0.01471416000276804, -0.5899714827537537, 0.3530803322792053, -0.31183820962905884, 0.5223593711853027, 0.21219520270824432, -0.11785192787647247, 0.42613285779953003, -0.6075175404548645, -0.5240277051925659, -0.38646453619003296, 1.1927019357681274, 0.325015127658844, -0.15829797089099884, 0.25507983565330505, -0.07288403064012527, -0.12642064690589905, 0.06345079094171524, -1.0582833290100098, -0.46469298005104065, 0.5098437070846558, -0.46152815222740173, -0.1936982423067093, -0.050573959946632385, -0.7938230633735657, 0.0015888145426288247, -0.06384971737861633, 0.5266816020011902, -0.6072387099266052, -0.399124413728714, 0.12065458297729492, -0.31157612800598145, 0.5502383708953857, 0.3026837408542633, -0.6713101267814636, 0.4326932728290558, 0.33114099502563477, 0.6633360981941223, 0.23964594304561615, -0.05722125247120857, -0.26031553745269775, -0.02684609964489937, -0.05239362642168999, 0.3403816819190979, -0.1658821851015091, -0.4396304190158844, -0.23193545639514923, 0.28916260600090027, -0.060306694358587265, -0.26847773790359497, 0.5875968337059021, -0.28148555755615234, 0.42570990324020386, -0.4128684103488922, -0.5448485612869263, -0.3973090350627899, 0.07741352170705795, -0.543624758720398, 1.1566286087036133, 0.5864816904067993, -0.7982839941978455, 0.16319501399993896, -0.5298914313316345, -0.135035902261734, 0.13396795094013214, -0.05375734344124794, -0.680209219455719, -0.15974411368370056, 0.23876036703586578, 0.3162849247455597, -0.35270383954048157, 0.10528824478387833, -0.2553708255290985, -0.2872755527496338, 0.11823458969593048, -0.3614223897457123, 1.253677248954773, 0.2486209124326706, -0.44583314657211304, 0.04875677451491356, -0.6872267723083496, 0.25113165378570557, 0.5431094765663147, -0.21043077111244202, -0.028989024460315704, -0.2623242437839508, 0.0860215574502945, 0.06250147521495819, 0.20153874158859253, -0.2972453534603119, 0.4939548373222351, -0.1756867617368698, 0.7240726351737976, 0.5428544878959656, 0.09773989766836166, 0.2869396507740021, -0.4473060667514801, 0.6358498334884644, -0.026401778683066368, 0.5612677335739136, 0.0936628207564354, -0.7162007093429565, -0.5910294651985168, -0.29672688245773315, 0.5232148170471191, 0.6095154285430908, -0.7529001832008362, 0.49632152915000916, -0.14831461012363434, -0.7097399830818176, -0.3658885359764099, -0.1610594391822815, 0.3763616383075714, 0.37319624423980713, 0.46674081683158875, -0.4189912676811218, -0.3518959879875183, -0.7788193821907043, 0.11564358323812485, -0.39079079031944275, -0.07411206513643265, 0.475130558013916, 0.763588547706604, -0.23923099040985107, 0.6461218595504761, -0.6609389185905457, -0.10410960018634796, -0.04082106426358223, 0.042187053710222244, 0.3551074266433716, 0.6713472008705139, 0.8085979223251343, -0.7081014513969421, -0.5696072578430176, -0.17635390162467957, -0.6652694940567017, -0.02075335942208767, -0.048490747809410095, -0.4502080976963043, 0.20448142290115356, -0.0009511939133517444, -1.051308035850525, 0.6355663537979126, 0.46139147877693176, -0.5303176641464233, 0.793804943561554, -0.22283697128295898, 0.2116256058216095, -1.0796666145324707, 0.04581904411315918, 0.21541671454906464, -0.31858813762664795, -0.47938331961631775, 0.29518815875053406, -0.01490689069032669, 0.13952302932739258, -0.3414365351200104, 0.49865949153900146, -0.5576067566871643, 0.06562371551990509, 0.17807739973068237, -0.0425201952457428, 0.24881617724895477, 0.571352481842041, -0.2380521148443222, 0.8198997974395752, 0.5253128409385681, -0.47342440485954285, 0.5338900089263916, 0.49900925159454346, -0.060300394892692566, 0.3397315740585327, -0.8375199437141418, 0.23908677697181702, 0.16074225306510925, 0.3453063666820526, -0.9016074538230896, -0.28027939796447754, 0.6101809144020081, -0.5905299782752991, 0.4961704909801483, -0.5038000345230103, -0.3617202639579773, -0.4540761411190033, -0.561816930770874, 0.37940043210983276, 0.9122418761253357, -0.3241531550884247, 0.4811675250530243, 0.4445832371711731, 0.05058525875210762, -0.590110182762146, -0.6562071442604065, -0.24047435820102692, -0.36949795484542847, -0.6526901721954346, 0.5230589509010315, -0.11699575185775757, -0.014255845919251442, 0.04359433799982071, 0.04626515880227089, -0.1200978234410286, -0.08742214739322662, 0.2926047146320343, 0.31217241287231445, -0.2410709261894226, -0.14136819541454315, 0.10278521478176117, 0.059095222502946854, 0.025035643950104713, -0.36922362446784973, 0.4077855348587036, -0.32425886392593384, -0.03396262601017952, -0.3894944190979004, 0.2199207842350006, 0.4326696991920471, -0.005574231967329979, 0.6799701452255249, 0.7662897109985352, -0.35132133960723877, 0.07629182189702988, -0.37604376673698425, -0.11116831749677658, -0.4998301863670349, 0.16891193389892578, -0.2333848774433136, -0.6965407133102417, 0.5576990246772766, 0.35974544286727905, 0.050565142184495926, 0.7789965271949768, 0.42985954880714417, 0.04513949528336525, 0.8799251914024353, 0.34934067726135254, -0.19759009778499603, 0.4584328234195709, -0.6367774605751038, -0.19382710754871368, -0.8359826803207397, -0.11324751377105713, -0.39681777358055115, -0.13039588928222656, -0.8537333607673645, -0.4872641861438751, 0.38290122151374817, 0.2963119447231293, -0.817009687423706, 0.5608907341957092, -0.7786773443222046, 0.18931932747364044, 0.6720978617668152, 0.3321816623210907, 0.2054549902677536, 0.033557746559381485, -0.13322007656097412, 0.10184657573699951, -0.6493776440620422, -0.25862616300582886, 1.0725336074829102, 0.3560689091682434, 0.6040791869163513, 0.2064419686794281, 0.5839348435401917, 0.09543042629957199, 0.19595111906528473, -0.5174031257629395, 0.552128255367279, 0.09352441132068634, -0.5566850900650024, -0.36313512921333313, -0.7201605439186096, -0.9652630090713501, 0.24584639072418213, -0.1307603120803833, -0.7851002216339111, 0.30569279193878174, 0.1260739266872406, -0.42566120624542236, 0.2162492275238037, -0.7200958132743835, 1.0468214750289917, -0.09393567591905594, -0.47473764419555664, 0.024425826966762543, -0.6799524426460266, 0.38731276988983154, 0.3022119104862213, -0.031225237995386124, -0.11957072466611862, -0.015123785473406315, 0.7203788161277771, -0.8766664862632751, 0.6571973562240601, -0.30573174357414246, -0.013881510123610497, 0.6320267915725708, -0.08110592514276505, 0.6067459583282471, 0.23567305505275726, 0.09905243664979935, 0.32555413246154785, 0.35605883598327637, -0.5032559633255005, -0.36147600412368774, 0.4833850562572479, -0.9073736667633057, -0.5572819709777832, -0.5085930228233337, -0.3591523766517639, -0.00976466666907072, 0.0196167454123497, 0.4810387194156647, 0.4137169420719147, -0.04071563854813576, 0.03458716347813606, 0.7011111974716187, -0.3806687891483307, 0.41098177433013916, 0.24361050128936768, -0.30071312189102173, -0.6262871623039246, 0.865998387336731, 0.02140156179666519, 0.19770127534866333, 0.19782014191150665, 0.12658707797527313, -0.47783318161964417, -0.5498110055923462, -0.7275276184082031, 0.3291754722595215, -0.4683048725128174, -0.44190603494644165, -0.5369330048561096, -0.40613803267478943, -0.373918741941452, 0.30216750502586365, -0.3407710790634155, -0.5998693704605103, -0.41745972633361816, 0.04974961280822754, 0.893022894859314, 0.43679720163345337, -0.11296749114990234, 0.2914474308490753, -0.9029781818389893, 0.23882514238357544, 0.4525708258152008, 0.20457544922828674, -0.03299541771411896, -0.7283555269241333, -0.10433058440685272, 0.1964782476425171, -0.5907866954803467, -0.9806206822395325, 0.6830750703811646, 0.17767846584320068, 0.3829699158668518, 0.31701090931892395, 0.14262980222702026, 0.7655870318412781, -0.21722586452960968, 0.96112459897995, 0.11786972731351852, -0.9901076555252075, 0.4948272705078125, -0.6001837849617004, 0.28134551644325256, 0.4174991548061371, 0.5247117280960083, -0.3118947744369507, -0.22668546438217163, -0.8040772080421448, -0.8294293880462646, 0.45573192834854126, 0.5309556126594543, -0.03907497227191925, 0.2606711685657501, 0.5659989714622498, -0.09268634766340256, 0.21716929972171783, -0.8401756882667542, -0.5795167088508606, -0.3491312265396118, -0.15634289383888245, 0.22387896478176117, -0.07673956453800201, -0.2730323076248169, -0.6608625650405884, 0.9292160272598267, -0.20733563601970673, 0.8164335489273071, 0.3347916603088379, 0.11289096623659134, -0.09109499305486679, 0.16427206993103027, 0.3749629855155945, 0.5977980494499207, -0.22826343774795532, -0.30546966195106506, 0.1095493733882904, -0.8013567924499512, 0.10249817371368408, 0.4336794912815094, -0.24284175038337708, -0.2163970172405243, 0.04675116762518883, 0.7463011145591736, -0.15590651333332062, -0.293522447347641, 0.45755165815353394, -0.3269611597061157, -0.41404324769973755, -0.3184909224510193, 0.2209239900112152, 0.27347806096076965, 0.41231539845466614, 0.33290067315101624, -0.2663501501083374, 0.2823888063430786, -0.49515944719314575, 0.1478087455034256, 0.5132418870925903, -0.2233477234840393, -0.35500067472457886, 0.8334060311317444, -0.026563705876469612, 0.08613978326320648, 0.8234984874725342, -0.4680367410182953, -0.5294780135154724, 0.8425756096839905, 0.4077189266681671, 0.7803789973258972, -0.18254323303699493, 0.3228081464767456, 0.6346112489700317, 0.16611351072788239, -0.035609401762485504, 0.49928805232048035, 0.059948403388261795, -0.6022455096244812, -0.3631996810436249, -0.5784937739372253, -0.3548865020275116, 0.32762977480888367, -0.7699110507965088, 0.11967220157384872, -0.40024256706237793, -0.3391260802745819, -0.21334941685199738, 0.302428662776947, -0.5769953727722168, 0.24968677759170532, 0.04374125972390175, 0.8067258596420288, -0.6219567060470581, 0.8493368625640869, 0.5413904786109924, -0.49214881658554077, -0.9761687517166138, -0.11912728101015091, 0.06765293329954147, -0.5999190807342529, 0.11458894610404968, -0.0681157335639, 0.3842175304889679, 0.04933793842792511, -0.7583805918693542, -0.8655287623405457, 1.412263035774231, 0.3231891989707947, -0.5907168984413147, -0.09069362282752991, -0.025767959654331207, 0.38626399636268616, -0.16274121403694153, 0.6698067784309387, 0.564242959022522, 0.32313528656959534, 0.19431304931640625, -0.8981051445007324, 0.496296763420105, -0.37628650665283203, 0.005667466204613447, 0.258350133895874, -1.0596556663513184, 0.9786073565483093, -0.05100910738110542, -0.1483047902584076, 0.18171410262584686, 0.6066816449165344, 0.4164349436759949, 0.044684037566185, 0.36930111050605774, 0.8257462382316589, 0.8077552914619446, -0.40923112630844116, 1.1279782056808472, -0.2602195143699646, 0.7326022386550903, 0.8075137734413147, 0.08041355758905411, 0.6372719407081604, 0.11002840101718903, -0.7844308018684387, 0.5608735680580139, 0.9462539553642273, -0.16538317501544952, 0.3245745301246643, 0.2345438450574875, -0.31312766671180725, -0.10429227352142334, 0.19713230431079865, -0.7675312161445618, 0.11461717635393143, 0.4148130714893341, -0.21435531973838806, 0.14428174495697021, -0.2820214033126831, 0.015255006961524487, -0.5673871636390686, -0.1814199835062027, 0.4910128712654114, 0.2592611610889435, -0.24489058554172516, 0.9514610171318054, -0.12187160551548004, 0.5875124335289001, -0.5202004909515381, -0.1820165365934372, -0.3249957263469696, -0.051255498081445694, -0.2662832736968994, -0.696284294128418, 0.15656040608882904, -0.29005494713783264, -0.0288369283080101, 0.0006170395645312965, 0.6888889074325562, -0.26455044746398926, -0.3528510630130768, 0.22636298835277557, 0.5297922492027283, 0.2505377233028412, -0.2407362163066864, -1.1669130325317383, 0.1093505397439003, 0.07069065421819687, -0.6038849353790283, 0.47394564747810364, 0.41417425870895386, 0.24357672035694122, 0.6415913701057434, 0.45866265892982483, -0.18434634804725647, 0.008490738458931446, -0.1670534461736679, 0.9293431043624878, -0.8214675784111023, -0.28192606568336487, -0.7551043629646301, 0.5911033153533936, -0.13596709072589874, -0.4596586525440216, 0.7477173209190369, 0.5720784664154053, 0.7530379295349121, -0.03528643399477005, 0.706933319568634, -0.4148917496204376, 0.17522397637367249, -0.4107455611228943, 0.7276418805122375, -0.6853004693984985, 0.12063398212194443, -0.4133457839488983, -0.7304288744926453, -0.04182875528931618, 0.6871930956840515, -0.06053734943270683, 0.3241725564002991, 0.5148302912712097, 0.8100667595863342, 0.06727113574743271, 0.1956840306520462, 0.1841515600681305, 0.40961647033691406, 0.08605979382991791, 0.9596168398857117, 0.737808346748352, -1.0432374477386475, 0.5186477899551392, -0.373941570520401, -0.19680210947990417, -0.005295359529554844, -0.7702156901359558, -0.7318932414054871, -0.4877581298351288, -0.7174656987190247, -0.7612912058830261, 0.012823441065847874, 0.9029268622398376, 0.7925294637680054, -0.6585381031036377, -0.23987041413784027, -0.16342873871326447, 0.11752380430698395, -0.3034094274044037, -0.3252745270729065, 0.38266199827194214, 0.26963672041893005, -0.7546904683113098, 0.08126337826251984, -0.03390350192785263, 0.3597857356071472, -0.060707464814186096, -0.280769944190979, -0.25740599632263184, -0.06053156033158302, 0.5192694664001465, 0.5330879092216492, -0.4809190630912781, -0.12246764451265335, -0.14079028367996216, -0.06865191459655762, 0.3681669533252716, 0.2994067072868347, -0.7167161107063293, -0.04987691715359688, 0.5210539698600769, 0.19872641563415527, 0.8410769701004028, 0.11247952282428741, 0.3940332531929016, -0.4509566128253937, 0.027480686083436012, 0.155022993683815, 0.37873783707618713, 0.05008811131119728, -0.5976690053939819, 0.7446518540382385, 0.40996959805488586, -0.7918980121612549, -0.6626675128936768, -0.1305503249168396, -1.1687328815460205, -0.17229586839675903, 1.1383469104766846, -0.2328387051820755, -0.41026729345321655, 0.010582244955003262, -0.22138172388076782, 0.31658700108528137, -0.6235793232917786, 0.344250351190567, 0.36784765124320984, -0.24920687079429626, -0.3617227077484131, -0.7532182931900024, 0.6415265798568726, 0.2436394840478897, -0.8718478083610535, -0.04695378616452217, 0.5108136534690857, 0.4115273356437683, -0.019142571836709976, 0.8289074897766113, -0.20576255023479462, 0.30192145705223083, 0.14783436059951782, 0.13288672268390656, 0.06138448789715767, 0.1780175268650055, -0.40980544686317444, 0.04489821940660477, -0.24855738878250122, -0.10792829096317291 ]
microsoft/speecht5_tts
microsoft
"2023-11-08T14:37:23Z"
448,782
347
transformers
[ "transformers", "pytorch", "speecht5", "text-to-audio", "audio", "text-to-speech", "dataset:libritts", "arxiv:2110.07205", "arxiv:1910.09700", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
text-to-speech
"2023-02-02T12:56:54Z"
--- license: mit tags: - audio - text-to-speech datasets: - libritts --- # SpeechT5 (TTS task) SpeechT5 model fine-tuned for speech synthesis (text-to-speech) on LibriTTS. This model was introduced in [SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing](https://arxiv.org/abs/2110.07205) by Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, Furu Wei. SpeechT5 was first released in [this repository](https://github.com/microsoft/SpeechT5/), [original weights](https://huggingface.co/mechanicalsea/speecht5-tts). The license used is [MIT](https://github.com/microsoft/SpeechT5/blob/main/LICENSE). ## Model Description Motivated by the success of T5 (Text-To-Text Transfer Transformer) in pre-trained natural language processing models, we propose a unified-modal SpeechT5 framework that explores the encoder-decoder pre-training for self-supervised speech/text representation learning. The SpeechT5 framework consists of a shared encoder-decoder network and six modal-specific (speech/text) pre/post-nets. After preprocessing the input speech/text through the pre-nets, the shared encoder-decoder network models the sequence-to-sequence transformation, and then the post-nets generate the output in the speech/text modality based on the output of the decoder. Leveraging large-scale unlabeled speech and text data, we pre-train SpeechT5 to learn a unified-modal representation, hoping to improve the modeling capability for both speech and text. To align the textual and speech information into this unified semantic space, we propose a cross-modal vector quantization approach that randomly mixes up speech/text states with latent units as the interface between encoder and decoder. Extensive evaluations show the superiority of the proposed SpeechT5 framework on a wide variety of spoken language processing tasks, including automatic speech recognition, speech synthesis, speech translation, voice conversion, speech enhancement, and speaker identification. - **Developed by:** Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, Furu Wei. - **Shared by [optional]:** [Matthijs Hollemans](https://huggingface.co/Matthijs) - **Model type:** text-to-speech - **Language(s) (NLP):** [More Information Needed] - **License:** [MIT](https://github.com/microsoft/SpeechT5/blob/main/LICENSE) - **Finetuned from model [optional]:** [More Information Needed] ## Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [https://github.com/microsoft/SpeechT5/] - **Paper:** [https://arxiv.org/pdf/2110.07205.pdf] - **Blog Post:** [https://huggingface.co/blog/speecht5] - **Demo:** [https://huggingface.co/spaces/Matthijs/speecht5-tts-demo] # Uses <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> ## 🤗 Transformers Usage You can run SpeechT5 TTS locally with the 🤗 Transformers library. 1. First install the 🤗 [Transformers library](https://github.com/huggingface/transformers), sentencepiece, soundfile and datasets(optional): ``` pip install --upgrade pip pip install --upgrade transformers sentencepiece datasets[audio] ``` 2. Run inference via the `Text-to-Speech` (TTS) pipeline. You can access the SpeechT5 model via the TTS pipeline in just a few lines of code! ```python from transformers import pipeline from datasets import load_dataset import soundfile as sf synthesiser = pipeline("text-to-speech", "microsoft/speecht5_tts") embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation") speaker_embedding = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0) # You can replace this embedding with your own as well. speech = synthesiser("Hello, my dog is cooler than you!", forward_params={"speaker_embeddings": speaker_embedding}) sf.write("speech.wav", speech["audio"], samplerate=speech["sampling_rate"]) ``` 3. Run inference via the Transformers modelling code - You can use the processor + generate code to convert text into a mono 16 kHz speech waveform for more fine-grained control. ```python from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan from datasets import load_dataset import torch import soundfile as sf from datasets import load_dataset processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts") model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts") vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan") inputs = processor(text="Hello, my dog is cute.", return_tensors="pt") # load xvector containing speaker's voice characteristics from a dataset embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation") speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0) speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder) sf.write("speech.wav", speech.numpy(), samplerate=16000) ``` ### Fine-tuning the Model Refer to [this Colab notebook](https://colab.research.google.com/drive/1i7I5pzBcU3WDFarDnzweIj4-sVVoIUFJ) for an example of how to fine-tune SpeechT5 for TTS on a different dataset or a new language. ## Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> You can use this model for speech synthesis. See the [model hub](https://huggingface.co/models?search=speecht5) to look for fine-tuned versions on a task that interests you. ## Downstream Use [optional] <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> [More Information Needed] ## Out-of-Scope Use <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> [More Information Needed] # Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> [More Information Needed] ## Recommendations <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. # Training Details ## Training Data <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> LibriTTS ## Training Procedure <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> ### Preprocessing [optional] Leveraging large-scale unlabeled speech and text data, we pre-train SpeechT5 to learn a unified-modal representation, hoping to improve the modeling capability for both speech and text. ### Training hyperparameters - **Precision:** [More Information Needed] <!--fp16, bf16, fp8, fp32 --> - **Regime:** [More Information Needed] <!--mixed precision or not --> ### Speeds, Sizes, Times [optional] <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> [More Information Needed] # Evaluation <!-- This section describes the evaluation protocols and provides the results. --> ## Testing Data, Factors & Metrics ### Testing Data <!-- This should link to a Data Card if possible. --> [More Information Needed] ### Factors <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. --> [More Information Needed] ### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> [More Information Needed] ## Results [More Information Needed] ### Summary # Model Examination [optional] <!-- Relevant interpretability work for the model goes here --> Extensive evaluations show the superiority of the proposed SpeechT5 framework on a wide variety of spoken language processing tasks, including automatic speech recognition, speech synthesis, speech translation, voice conversion, speech enhancement, and speaker identification. # Environmental Impact <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly --> Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] # Technical Specifications [optional] ## Model Architecture and Objective The SpeechT5 framework consists of a shared encoder-decoder network and six modal-specific (speech/text) pre/post-nets. After preprocessing the input speech/text through the pre-nets, the shared encoder-decoder network models the sequence-to-sequence transformation, and then the post-nets generate the output in the speech/text modality based on the output of the decoder. ## Compute Infrastructure [More Information Needed] ### Hardware [More Information Needed] ### Software [More Information Needed] # Citation [optional] <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> **BibTeX:** ```bibtex @inproceedings{ao-etal-2022-speecht5, title = {{S}peech{T}5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing}, author = {Ao, Junyi and Wang, Rui and Zhou, Long and Wang, Chengyi and Ren, Shuo and Wu, Yu and Liu, Shujie and Ko, Tom and Li, Qing and Zhang, Yu and Wei, Zhihua and Qian, Yao and Li, Jinyu and Wei, Furu}, booktitle = {Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)}, month = {May}, year = {2022}, pages={5723--5738}, } ``` # Glossary [optional] <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. --> - **text-to-speech** to synthesize audio # More Information [optional] [More Information Needed] # Model Card Authors [optional] Disclaimer: The team releasing SpeechT5 did not write a model card for this model so this model card has been written by the Hugging Face team. # Model Card Contact [More Information Needed]
[ -0.43113768100738525, -0.6106641292572021, 0.16717509925365448, 0.1748000979423523, -0.23661892116069794, -0.07100024819374084, -0.2971849739551544, -0.3897058367729187, -0.06282893568277359, 0.29396966099739075, -0.6392896175384521, -0.6830106377601624, -0.49219080805778503, 0.07827859371900558, -0.30972766876220703, 1.0264030694961548, 0.28259000182151794, 0.029239777475595474, 0.013238555751740932, -0.018852490931749344, -0.5000403523445129, -0.6023538708686829, -0.5005893111228943, -0.4208698868751526, 0.2385849505662918, 0.2595224976539612, 0.3812269866466522, 0.5024489164352417, 0.22288386523723602, 0.3440854549407959, -0.17887042462825775, -0.14604483544826508, -0.42836400866508484, 0.028588533401489258, 0.008538590744137764, -0.31780824065208435, -0.5950486063957214, 0.07716425508260727, 0.5958209037780762, 0.4968678653240204, -0.2624565660953522, 0.19017526507377625, -0.039445362985134125, 0.024882057681679726, -0.27625247836112976, 0.17666508257389069, -0.6541901230812073, -0.04424529895186424, -0.1742977648973465, -0.0047018565237522125, -0.40891700983047485, -0.17426824569702148, 0.3457522988319397, -0.45280417799949646, 0.27888938784599304, -0.07334829866886139, 0.9673112630844116, 0.3280247747898102, -0.32641932368278503, -0.12599168717861176, -0.6653050184249878, 0.8496738076210022, -0.8429800868034363, 0.8007219433784485, 0.3497839868068695, 0.15049879252910614, 0.024082325398921967, -1.1712274551391602, -0.6412449479103088, -0.25617706775665283, 0.12641307711601257, 0.2883131802082062, -0.4700097143650055, 0.28117555379867554, 0.34405815601348877, 0.1781892031431198, -0.641547679901123, -0.06396083533763885, -0.5816512703895569, -0.5140163898468018, 0.5458050966262817, -0.08619516342878342, 0.4231376647949219, -0.32533448934555054, -0.4935550093650818, -0.35233384370803833, -0.3547152578830719, 0.004052150063216686, 0.14940860867500305, 0.3958417773246765, -0.4720306098461151, 0.39053013920783997, -0.0277206152677536, 0.5428150296211243, 0.13350676000118256, -0.1774970144033432, 0.5900512933731079, -0.4938357174396515, -0.3915098011493683, 0.23350316286087036, 1.0007224082946777, 0.026672672480344772, 0.20341366529464722, -0.1354907602071762, -0.17700926959514618, 0.06204092875123024, 0.18808498978614807, -0.8422591686248779, -0.20075349509716034, 0.45377597212791443, -0.22305387258529663, -0.16967584192752838, -0.18974116444587708, -0.4050356149673462, 0.10503823310136795, -0.3456049859523773, 0.6911620497703552, -0.7541177868843079, -0.1856919825077057, 0.09312056750059128, -0.26495954394340515, 0.15659360587596893, -0.05907648801803589, -0.9134331345558167, 0.23873986303806305, 0.30996716022491455, 0.6924241185188293, -0.02204636111855507, -0.43014994263648987, -0.4921867549419403, 0.1558709740638733, 0.015397711656987667, 0.47004595398902893, -0.3257509469985962, -0.40784063935279846, -0.3024919927120209, -0.0034594107419252396, -0.1297161877155304, -0.3920522630214691, 0.8575324416160583, -0.14818058907985687, 0.5552305579185486, -0.13435430824756622, -0.6706405878067017, -0.18732789158821106, -0.1309768557548523, -0.4649013578891754, 1.09268319606781, -0.038728341460227966, -0.8054983615875244, 0.23849248886108398, -0.8559066653251648, -0.3699173927307129, -0.15510615706443787, -0.004060816951096058, -0.5156721472740173, -0.11484960466623306, 0.3807688355445862, 0.6039565801620483, -0.2673417329788208, 0.3199683725833893, -0.12206360697746277, -0.20152387022972107, 0.16940586268901825, -0.4357767105102539, 0.9857326149940491, 0.372006356716156, -0.5209375023841858, 0.3307247757911682, -0.8862369656562805, 0.10817387700080872, -0.05794109031558037, -0.2595156133174896, 0.007943746633827686, -0.1693911850452423, 0.46599647402763367, 0.16797378659248352, 0.2454768717288971, -0.5824189782142639, -0.023960361257195473, -0.6002036333084106, 0.8102071285247803, 0.5633996725082397, -0.1131267249584198, 0.24761401116847992, -0.25592756271362305, 0.38244423270225525, 0.23853307962417603, 0.07746101915836334, -0.10391974449157715, -0.4700820744037628, -0.685835063457489, -0.36228397488594055, 0.526255190372467, 0.5342920422554016, -0.6787939071655273, 0.5937101244926453, -0.3383193910121918, -0.6196286678314209, -0.763561487197876, -0.2775171101093292, 0.3673074543476105, 0.5560131669044495, 0.652372419834137, -0.1873103678226471, -0.8055079579353333, -0.7181776165962219, -0.15446466207504272, -0.034399375319480896, -0.15200772881507874, 0.01889278180897236, 0.4814613461494446, -0.296208918094635, 1.0701004266738892, -0.20551763474941254, -0.33519667387008667, -0.3637799620628357, 0.18752354383468628, 0.03082650899887085, 0.6246126294136047, 0.36732664704322815, -0.7286290526390076, -0.1671563982963562, -0.23860374093055725, -0.46758049726486206, -0.22595027089118958, 0.056599464267492294, 0.21686410903930664, 0.16690097749233246, 0.4698897898197174, -0.598152220249176, 0.2374846339225769, 0.5300760865211487, -0.28289854526519775, 0.2763904333114624, -0.07941414415836334, -0.07814130187034607, -1.4126229286193848, 0.09554912894964218, -0.05337049439549446, -0.3814096748828888, -0.7495470643043518, -0.32261911034584045, -0.2579871714115143, -0.31811389327049255, -0.6006166934967041, 0.43154340982437134, -0.39498013257980347, -0.10386617481708527, 0.011491603218019009, 0.2870636284351349, -0.1678038090467453, 0.5352855920791626, 0.029666520655155182, 0.9176732897758484, 0.6275544166564941, -0.5917699933052063, 0.41673171520233154, 0.3722802996635437, -0.04231787845492363, 0.46610185503959656, -0.9676417708396912, 0.36267897486686707, 0.05992477387189865, 0.26343581080436707, -0.8989454507827759, -0.14733463525772095, 0.17524407804012299, -0.853630542755127, 0.17988228797912598, -0.08718124032020569, -0.35871514678001404, -0.20484024286270142, -0.10497090220451355, 0.27008217573165894, 0.6938349604606628, -0.30186140537261963, 0.6598994731903076, 0.5729909539222717, -0.03078160434961319, -0.36989477276802063, -0.7224868535995483, 0.0015564925270155072, -0.37922826409339905, -0.6943041086196899, 0.6675516963005066, -0.06396640837192535, 0.24146977066993713, -0.11028698831796646, 0.06071939691901207, -0.06848150491714478, -0.2608032822608948, 0.1648721694946289, -0.04663877561688423, -0.07506053894758224, 0.07387327402830124, -0.10005342960357666, -0.18735383450984955, -0.044662877917289734, -0.416888028383255, 0.601171612739563, -0.19255022704601288, -0.10718748718500137, -0.8048905730247498, 0.1898278445005417, 0.5927183628082275, -0.3257996141910553, 0.2988036870956421, 1.2739386558532715, -0.45695534348487854, -0.034376781433820724, -0.5149481296539307, -0.42592960596084595, -0.48073214292526245, 0.5645564794540405, -0.5186346173286438, -0.8141806721687317, 0.3986104428768158, 0.08480925112962723, 0.0234679002314806, 0.4917546808719635, 0.6713062524795532, -0.005682806484401226, 1.0762646198272705, 0.6460887789726257, -0.1587277352809906, 0.5763428211212158, -0.3336067199707031, 0.06591921299695969, -0.8271682262420654, -0.26089465618133545, -0.564553439617157, -0.1300596445798874, -0.7820373773574829, -0.4465946555137634, 0.6017113924026489, -0.14498300850391388, -0.3091081976890564, 0.5360251665115356, -0.6463724374771118, 0.045854467898607254, 0.7454169988632202, -0.05563749372959137, 0.08974029123783112, 0.14537306129932404, -0.32045283913612366, -0.21763759851455688, -0.8513813018798828, -0.4112556278705597, 0.9971861839294434, 0.5469224452972412, 0.5642228126525879, -0.1288256049156189, 0.7782878875732422, 0.08304282277822495, -0.2108885645866394, -0.5623651742935181, 0.4787484407424927, -0.16463954746723175, -0.48387399315834045, -0.3965955972671509, -0.43944960832595825, -1.087660789489746, 0.2043871283531189, -0.10774672031402588, -0.8953307271003723, 0.048354219645261765, 0.054305776953697205, -0.38897982239723206, 0.08624449372291565, -0.9985370635986328, 0.9633843302726746, -0.05248113349080086, -0.16270877420902252, -0.1218247190117836, -0.8025901913642883, 0.08221939951181412, 0.25933772325515747, 0.1058182492852211, -0.09500353038311005, 0.159083291888237, 1.0530619621276855, -0.3019922375679016, 0.9922982454299927, -0.1953728199005127, 0.035331349819898605, 0.2787812352180481, -0.3347160518169403, 0.2146768569946289, -0.14431345462799072, 0.019097300246357918, 0.31694188714027405, 0.4766099452972412, -0.271281361579895, -0.455819308757782, 0.5350041389465332, -1.017227053642273, -0.2118554264307022, -0.3914071321487427, -0.5577681660652161, -0.3640281856060028, 0.223181813955307, 0.5032554268836975, 0.5726551413536072, -0.17044711112976074, 0.3015541434288025, 0.6160558462142944, -0.25265347957611084, 0.5112768411636353, 0.25974711775779724, -0.09293284267187119, -0.6776612401008606, 0.9353765845298767, 0.21718008816242218, 0.3081390857696533, 0.30414634943008423, 0.2861801087856293, -0.6448667049407959, -0.39475512504577637, -0.3713456094264984, 0.18422967195510864, -0.5297988653182983, -0.03455401957035065, -0.6216498017311096, -0.34145745635032654, -0.7969388961791992, 0.2797241806983948, -0.5335873961448669, -0.31862419843673706, -0.4289281964302063, 0.0066267503425478935, 0.43787097930908203, 0.5425258874893188, -0.14707165956497192, 0.38530799746513367, -0.7390961647033691, 0.43586355447769165, 0.23240257799625397, 0.15877388417720795, -0.24165892601013184, -0.7372031807899475, -0.17710541188716888, 0.33902469277381897, -0.479841947555542, -0.826502799987793, 0.48114269971847534, 0.1768825352191925, 0.4245171546936035, 0.06219693645834923, 0.07209383696317673, 0.6612163186073303, -0.4241609573364258, 0.9473975300788879, 0.20848362147808075, -1.2698893547058105, 0.6090452671051025, -0.4217166006565094, 0.5183815360069275, 0.2189049869775772, 0.3243735730648041, -0.5856626033782959, -0.21085894107818604, -0.9227049350738525, -0.8511962890625, 0.8375810384750366, 0.6638489365577698, 0.1486445516347885, 0.255596786737442, 0.11737152934074402, -0.23225058615207672, 0.23252876102924347, -0.8681734800338745, -0.30083537101745605, -0.4853217303752899, -0.39244765043258667, -0.06765414029359818, -0.02812964841723442, -0.036165401339530945, -0.5372485518455505, 0.7746052145957947, -0.0008727253880351782, 0.6982025504112244, 0.3969254791736603, 0.040224794298410416, 0.2640587091445923, 0.32677602767944336, 0.7099594473838806, 0.44657111167907715, -0.22392623126506805, 0.07817347347736359, 0.36216333508491516, -0.659284234046936, -0.002163530793040991, 0.36714810132980347, -0.031170479953289032, 0.18205560743808746, 0.25046297907829285, 1.185355544090271, 0.2770032584667206, -0.38124072551727295, 0.4277604818344116, -0.027133392170071602, -0.19597303867340088, -0.31480351090431213, -0.05347772315144539, 0.26248979568481445, 0.1562415361404419, 0.15134954452514648, -0.12158689647912979, 0.0673641711473465, -0.5483598709106445, 0.337188184261322, 0.161695659160614, -0.5275418162345886, -0.4510173201560974, 0.9650139212608337, 0.31871116161346436, -0.33335572481155396, 0.48802417516708374, 0.008988295681774616, -0.5259502530097961, 0.390199214220047, 0.6341032385826111, 1.0096219778060913, -0.44070082902908325, 0.036828137934207916, 0.2529476583003998, 0.28427839279174805, 0.23515848815441132, 0.4873601496219635, -0.07165984809398651, -0.6794315576553345, -0.3027484714984894, -0.6158703565597534, -0.2607800364494324, 0.32438531517982483, -0.4226619005203247, 0.5189525485038757, -0.17995713651180267, -0.4080471694469452, 0.2027663290500641, -0.10130304843187332, -0.6721406579017639, 0.535860538482666, 0.14188989996910095, 0.5767698287963867, -0.5642271637916565, 1.025660514831543, 0.5572397112846375, -0.8116437792778015, -1.0851080417633057, 0.019350657239556313, -0.1667623221874237, -0.7073155045509338, 0.4302537441253662, 0.0018519791774451733, -0.22530050575733185, 0.4320783317089081, -0.5364671945571899, -0.8566329479217529, 1.0469681024551392, 0.6526564359664917, -0.4923487901687622, -0.19091452658176422, 0.28621119260787964, 0.546474277973175, -0.2488597333431244, 0.4266377091407776, 0.5389687418937683, 0.3307369351387024, 0.09593680500984192, -1.322126030921936, 0.03424990177154541, -0.03713170439004898, 0.0667329803109169, -0.22605323791503906, -0.57366943359375, 0.7558473944664001, -0.137370303273201, -0.1386752873659134, -0.19276125729084015, 0.7396954894065857, 0.21910370886325836, 0.17768220603466034, 0.5026617646217346, 0.558421790599823, 0.7597291469573975, -0.1844857931137085, 0.8220164775848389, -0.3581331968307495, 0.5062387585639954, 0.9825074076652527, 0.06505782902240753, 0.8824396133422852, 0.41737833619117737, -0.2933942973613739, 0.24849747121334076, 0.614054799079895, 0.025991126894950867, 0.44671934843063354, 0.09281187504529953, -0.15833546221256256, -0.1475926786661148, -0.11444179713726044, -0.6084917187690735, 0.7565134167671204, 0.19626939296722412, -0.3036085367202759, -0.060626134276390076, 0.22585807740688324, 0.05550743639469147, -0.3420514464378357, 0.04570068046450615, 0.7172728776931763, 0.2511593997478485, -0.38309362530708313, 1.0039150714874268, 0.14022617042064667, 0.7185531258583069, -0.6590206027030945, 0.10688041150569916, 0.08767110109329224, 0.06773325800895691, -0.22699394822120667, -0.48406800627708435, 0.2764361798763275, -0.04893823713064194, -0.13987848162651062, -0.38228434324264526, 0.5579460263252258, -0.6581030488014221, -0.3064424991607666, 0.21910862624645233, 0.376642644405365, 0.31470683217048645, -0.031447507441043854, -0.8619529008865356, 0.3101692497730255, 0.11022843420505524, -0.22129498422145844, 0.08486956357955933, 0.39200901985168457, 0.0580492839217186, 0.657042920589447, 0.6868482828140259, 0.054091475903987885, 0.14689548313617706, 0.37171170115470886, 0.7350611090660095, -0.6857569217681885, -0.6508197784423828, -0.6444095373153687, 0.6596276760101318, 0.03733929991722107, -0.41495802998542786, 0.6041131615638733, 0.5760998129844666, 0.9225009679794312, -0.036091260612010956, 0.9188315868377686, -0.14401894807815552, 0.6278662085533142, -0.565011203289032, 0.8415713310241699, -0.47716858983039856, 0.16319534182548523, -0.4555242955684662, -0.7374560236930847, -0.07825811207294464, 0.6534901857376099, -0.23242251574993134, 0.3730146884918213, 0.6507910490036011, 0.7790943384170532, -0.16290587186813354, 0.1257169246673584, 0.49829190969467163, 0.49581241607666016, 0.31949353218078613, 0.4558621644973755, 0.5214948058128357, -0.7722263336181641, 0.6678215861320496, -0.3278493881225586, 0.046971388161182404, 0.13334763050079346, -0.7350910305976868, -0.7854301929473877, -1.0005621910095215, -0.42000579833984375, -0.3146754205226898, 0.11390015482902527, 1.0916236639022827, 1.0304806232452393, -0.7294942736625671, -0.4001427888870239, -0.10492008924484253, -0.06276952475309372, -0.022781413048505783, -0.23265473544597626, 0.36659571528434753, -0.31142401695251465, -1.0029940605163574, 0.5105009078979492, -0.05416061729192734, 0.28743603825569153, -0.21644502878189087, 0.06584729999303818, -0.19795800745487213, -0.031082207337021828, 0.5625607371330261, 0.09309766441583633, -0.8946146368980408, -0.32052186131477356, -0.012371054850518703, 0.019447900354862213, 0.11275455355644226, 0.533710241317749, -0.7983912229537964, 0.49694764614105225, 0.4801067113876343, 0.46814510226249695, 0.7418210506439209, -0.187489852309227, 0.6745778918266296, -0.8270173668861389, 0.18260495364665985, 0.35025879740715027, 0.25726014375686646, 0.4333685338497162, -0.13621889054775238, 0.2650729715824127, 0.44063127040863037, -0.5429331660270691, -0.8231678009033203, 0.01686062105000019, -1.2553818225860596, 0.06105653569102287, 1.1684616804122925, 0.10173221677541733, -0.1277916580438614, -0.05776989459991455, -0.44452619552612305, 0.6674057245254517, -0.545677900314331, 0.5490195751190186, 0.6157408356666565, -0.2210112065076828, -0.16117620468139648, -0.6054520606994629, 0.7533697485923767, 0.44417282938957214, -0.7503116130828857, -0.09652753174304962, 0.3130413591861725, 0.5772470831871033, 0.0005383418756537139, 0.6596024632453918, -0.02239779755473137, 0.08091616630554199, -0.017318926751613617, 0.38001567125320435, 0.028331222012639046, -0.1038985550403595, -0.3918483853340149, 0.2311946004629135, -0.2287837117910385, -0.506201446056366 ]
mattmdjaga/segformer_b2_clothes
mattmdjaga
"2023-11-20T22:55:41Z"
446,340
113
transformers
[ "transformers", "pytorch", "safetensors", "segformer", "vision", "image-segmentation", "dataset:mattmdjaga/human_parsing_dataset", "arxiv:2105.15203", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
image-segmentation
"2022-11-24T09:48:16Z"
--- license: mit tags: - vision - image-segmentation widget: - src: https://images.unsplash.com/photo-1643310325061-2beef64926a5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Nnx8cmFjb29uc3xlbnwwfHwwfHw%3D&w=1000&q=80 example_title: Person - src: https://freerangestock.com/sample/139043/young-man-standing-and-leaning-on-car.jpg example_title: Person datasets: - mattmdjaga/human_parsing_dataset --- # Segformer B2 fine-tuned for clothes segmentation SegFormer model fine-tuned on [ATR dataset](https://github.com/lemondan/HumanParsing-Dataset) for clothes segmentation but can also be used for human segmentation. The dataset on hugging face is called "mattmdjaga/human_parsing_dataset". **NEW** - **[Training code](https://github.com/mattmdjaga/segformer_b2_clothes)**. Right now it only contains the pure code with some comments, but soon I'll add a colab notebook version and a blog post with it to make it more friendly. ```python from transformers import SegformerImageProcessor, AutoModelForSemanticSegmentation from PIL import Image import requests import matplotlib.pyplot as plt import torch.nn as nn processor = SegformerImageProcessor.from_pretrained("mattmdjaga/segformer_b2_clothes") model = AutoModelForSemanticSegmentation.from_pretrained("mattmdjaga/segformer_b2_clothes") url = "https://plus.unsplash.com/premium_photo-1673210886161-bfcc40f54d1f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8cGVyc29uJTIwc3RhbmRpbmd8ZW58MHx8MHx8&w=1000&q=80" image = Image.open(requests.get(url, stream=True).raw) inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits.cpu() upsampled_logits = nn.functional.interpolate( logits, size=image.size[::-1], mode="bilinear", align_corners=False, ) pred_seg = upsampled_logits.argmax(dim=1)[0] plt.imshow(pred_seg) ``` Labels: 0: "Background", 1: "Hat", 2: "Hair", 3: "Sunglasses", 4: "Upper-clothes", 5: "Skirt", 6: "Pants", 7: "Dress", 8: "Belt", 9: "Left-shoe", 10: "Right-shoe", 11: "Face", 12: "Left-leg", 13: "Right-leg", 14: "Left-arm", 15: "Right-arm", 16: "Bag", 17: "Scarf" ### Evaluation | Label Index | Label Name | Category Accuracy | Category IoU | |:-------------:|:----------------:|:-----------------:|:------------:| | 0 | Background | 0.99 | 0.99 | | 1 | Hat | 0.73 | 0.68 | | 2 | Hair | 0.91 | 0.82 | | 3 | Sunglasses | 0.73 | 0.63 | | 4 | Upper-clothes | 0.87 | 0.78 | | 5 | Skirt | 0.76 | 0.65 | | 6 | Pants | 0.90 | 0.84 | | 7 | Dress | 0.74 | 0.55 | | 8 | Belt | 0.35 | 0.30 | | 9 | Left-shoe | 0.74 | 0.58 | | 10 | Right-shoe | 0.75 | 0.60 | | 11 | Face | 0.92 | 0.85 | | 12 | Left-leg | 0.90 | 0.82 | | 13 | Right-leg | 0.90 | 0.81 | | 14 | Left-arm | 0.86 | 0.74 | | 15 | Right-arm | 0.82 | 0.73 | | 16 | Bag | 0.91 | 0.84 | | 17 | Scarf | 0.63 | 0.29 | Overall Evaluation Metrics: - Evaluation Loss: 0.15 - Mean Accuracy: 0.80 - Mean IoU: 0.69 ### License The license for this model can be found [here](https://github.com/NVlabs/SegFormer/blob/master/LICENSE). ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2105-15203, author = {Enze Xie and Wenhai Wang and Zhiding Yu and Anima Anandkumar and Jose M. Alvarez and Ping Luo}, title = {SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers}, journal = {CoRR}, volume = {abs/2105.15203}, year = {2021}, url = {https://arxiv.org/abs/2105.15203}, eprinttype = {arXiv}, eprint = {2105.15203}, timestamp = {Wed, 02 Jun 2021 11:46:42 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-2105-15203.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.8538100719451904, -0.6844164133071899, 0.1391143798828125, 0.2747800052165985, -0.43656837940216064, -0.017331767827272415, 0.02090650238096714, -0.5099209547042847, 0.4543391168117523, 0.2677404284477234, -0.8738457560539246, -0.7142858505249023, -0.7250613570213318, 0.04491780325770378, -0.15517038106918335, 0.7385145425796509, 0.09634020924568176, 0.07398664206266403, -0.12216612696647644, -0.3958050012588501, -0.17377033829689026, -0.34492310881614685, -0.6228718161582947, -0.5973740220069885, 0.1103384792804718, 0.26142236590385437, 0.8841490149497986, 0.6948269605636597, 0.7332991361618042, 0.4253825843334198, -0.32798856496810913, 0.07876141369342804, -0.27398741245269775, -0.12832695245742798, 0.12444429099559784, -0.12644857168197632, -0.4679124355316162, -0.06133793666958809, 0.4545145332813263, 0.5934113264083862, 0.02948342077434063, 0.4511830806732178, 0.13743774592876434, 0.8483157753944397, -0.25613099336624146, -0.11964889615774155, 0.04058103263378143, -0.07532085478305817, -0.14389395713806152, -0.031147224828600883, 0.00961963552981615, -0.17718496918678284, 0.1300068348646164, -0.598824679851532, 0.5461259484291077, 0.015017598867416382, 1.6190990209579468, 0.33661291003227234, -0.1536751389503479, -0.0910583958029747, -0.29953017830848694, 0.7864234447479248, -0.7336015701293945, 0.6074771285057068, 0.31162410974502563, -0.04070397466421127, 0.030946090817451477, -0.7328278422355652, -0.46965840458869934, 0.22981102764606476, -0.35700803995132446, 0.1732722371816635, -0.4180446267127991, -0.21824926137924194, 0.5091509222984314, 0.34479671716690063, -0.6386916637420654, -0.038517799228429794, -0.5879625678062439, -0.18822447955608368, 0.8776516914367676, -0.008582769893109798, 0.3238071799278259, -0.38371962308883667, -0.7331677675247192, -0.3694864809513092, -0.2794349789619446, 0.36748945713043213, 0.39956480264663696, -0.034247539937496185, -0.5526795983314514, 0.5731579065322876, -0.11730493605136871, 0.8933572173118591, 0.36703917384147644, -0.26756641268730164, 0.8650129437446594, -0.22218093276023865, -0.28787195682525635, -0.18412616848945618, 0.8051490187644958, 0.7883091568946838, -0.03421960026025772, 0.07085070759057999, -0.08908797800540924, -0.0360027477145195, -0.06136471405625343, -1.1548210382461548, -0.36377885937690735, 0.22676876187324524, -0.7410978674888611, -0.2539563477039337, 0.24420972168445587, -0.9856727123260498, -0.04194408282637596, -0.4712706208229065, 0.5174681544303894, -0.37328609824180603, -0.12404055893421173, 0.0513082817196846, -0.1855824887752533, 0.5723080039024353, 0.15354067087173462, -0.707878053188324, 0.22050414979457855, 0.4276423454284668, 1.0499142408370972, 0.026577183976769447, -0.08759308606386185, 0.016115659847855568, -0.027829427272081375, -0.29236894845962524, 0.9117132425308228, -0.30943533778190613, -0.399631530046463, -0.39012110233306885, 0.5661406517028809, -0.19882841408252716, -0.43082165718078613, 0.7766875624656677, -0.2808363139629364, 0.33305075764656067, -0.22505293786525726, -0.3925149440765381, -0.42424076795578003, 0.32591530680656433, -0.5738658905029297, 1.2015397548675537, 0.3481070101261139, -0.8156029582023621, 0.49202340841293335, -0.5584618449211121, -0.22742977738380432, -0.16142381727695465, -0.036199796944856644, -1.116145133972168, -0.1453961282968521, 0.571262776851654, 0.4569859206676483, -0.4938671886920929, 0.13334989547729492, -0.6488158702850342, -0.25903069972991943, 0.19697895646095276, 0.006192043889313936, 1.0779658555984497, 0.2329649180173874, -0.4227227568626404, 0.2995638847351074, -0.9807437658309937, 0.2428111433982849, 0.47040343284606934, -0.13391095399856567, -0.11810848861932755, -0.29929280281066895, 0.08182393014431, 0.3808804452419281, 0.17152048647403717, -0.5470023155212402, 0.10181720554828644, -0.26916712522506714, 0.4131354093551636, 0.7238781452178955, 0.15330635011196136, 0.34459882974624634, -0.4697672724723816, 0.4246596395969391, -0.011127267964184284, 0.27955496311187744, 0.034940652549266815, -0.36649104952812195, -0.9485233426094055, -0.6026031374931335, 0.2356746792793274, 0.27160385251045227, -0.4028221368789673, 0.7609395384788513, -0.08413568139076233, -0.6811285614967346, -0.43371257185935974, -0.057891231030225754, 0.31113892793655396, 0.6773521900177002, 0.430484801530838, -0.3841789662837982, -0.7732301950454712, -1.1179916858673096, -0.07455875724554062, 0.14043834805488586, -0.15398690104484558, 0.41198572516441345, 0.5495083928108215, -0.5351868271827698, 0.8288182020187378, -0.848575234413147, -0.47216254472732544, -0.05772509053349495, 0.015336034819483757, 0.5531374216079712, 0.7737405896186829, 0.83284991979599, -0.7944513559341431, -0.5878002047538757, -0.2221428006887436, -0.6268380880355835, -0.2644203007221222, 0.10238900780677795, -0.4335955083370209, 0.27699053287506104, 0.42833536863327026, -0.3948761224746704, 0.6210691332817078, 0.41078686714172363, -0.7578778862953186, 0.5140452980995178, -0.34145647287368774, 0.1444285362958908, -1.143975853919983, 0.4800471365451813, 0.32075899839401245, -0.21603867411613464, -0.6408016681671143, -0.08193106949329376, 0.09390977025032043, -0.12273141741752625, -0.3068212568759918, 0.7670094966888428, -0.5992162823677063, -0.06785271316766739, 0.015701932832598686, -0.2104354053735733, 0.2275756299495697, 0.6752223968505859, 0.0825737938284874, 0.6746519207954407, 0.5334929823875427, -0.40996813774108887, 0.21834297478199005, 0.6061261296272278, -0.6343697309494019, 0.6173006296157837, -0.9179875254631042, 0.22979736328125, -0.16433383524417877, -0.004042051266878843, -1.0394760370254517, -0.6710661053657532, 0.5391502380371094, -0.5415414571762085, 0.5956940054893494, -0.3301972448825836, -0.19149823486804962, -0.6958015561103821, -0.5093578100204468, 0.2544769048690796, 0.4731484353542328, -0.5950168371200562, 0.37343358993530273, 0.5279954671859741, 0.010079266503453255, -0.5382790565490723, -0.6371906399726868, -0.4107978045940399, -0.3831840753555298, -0.9687368273735046, 0.5956475734710693, -0.09574006497859955, -0.10265751928091049, 0.004150782246142626, -0.3471892476081848, -0.17406721413135529, 0.01385271456092596, 0.2567141056060791, 0.6882156133651733, -0.09825439751148224, -0.1484816074371338, -0.16942378878593445, -0.22558021545410156, -0.007171950303018093, 0.1348501294851303, 0.7244825959205627, -0.30370664596557617, -0.3370100259780884, -0.5699396133422852, 0.10913223028182983, 0.37264588475227356, -0.1369016319513321, 0.5240939855575562, 1.0048619508743286, -0.3095088601112366, 0.08857936412096024, -0.5524564981460571, -0.20350180566310883, -0.5480419993400574, 0.3396792411804199, -0.36956676840782166, -0.7830110192298889, 0.8501220941543579, 0.0893077552318573, -0.18657977879047394, 0.8019723892211914, 0.5881540179252625, -0.2777043581008911, 1.3328005075454712, 0.4216022789478302, 0.23324215412139893, 0.6569622159004211, -0.795317530632019, 0.061204396188259125, -1.1797903776168823, -0.6332122683525085, -0.5317500829696655, -0.6954224705696106, -0.561883270740509, -0.5873367786407471, 0.49259263277053833, 0.3477177619934082, -0.7152329087257385, 0.3437102735042572, -0.9326014518737793, 0.4222624897956848, 0.5608546137809753, 0.46548256278038025, -0.2039240300655365, 0.23130293190479279, -0.029769688844680786, -0.03724430873990059, -0.5720807313919067, -0.3060566782951355, 0.7657508850097656, 0.3632639944553375, 0.9557773470878601, 0.03972146287560463, 0.5353298187255859, 0.16054467856884003, 0.00820419192314148, -0.8437836766242981, 0.359529972076416, -0.11892715096473694, -0.7825155854225159, -0.12022152543067932, -0.2883678674697876, -1.0694794654846191, 0.4386182427406311, -0.30421182513237, -0.974826455116272, 0.7613898515701294, 0.25712767243385315, -0.41063880920410156, 0.14902548491954803, -0.6995331048965454, 0.8869074583053589, -0.33969584107398987, -0.6647411584854126, 0.3009541630744934, -0.9798033833503723, 0.1562160700559616, 0.22744779288768768, 0.08823077380657196, -0.42529603838920593, 0.07939085364341736, 1.1015042066574097, -0.5209140181541443, 0.6453858613967896, -0.24673013389110565, 0.4599481523036957, 0.4414518177509308, -0.24229039251804352, 0.5271924138069153, -0.06368093192577362, 0.00268001900985837, 0.327907919883728, 0.143406942486763, -0.3788398802280426, -0.29108330607414246, 0.5732913017272949, -0.9231305718421936, -0.6275455355644226, -0.7012646198272705, -0.33009853959083557, -0.11131329834461212, 0.39966335892677307, 0.5680321455001831, 0.5495087504386902, 0.10836431384086609, 0.5107294321060181, 0.5441323518753052, -0.09159252792596817, 0.43198731541633606, 0.20555831491947174, -0.11546330153942108, -0.6923795342445374, 0.8643269538879395, 0.03215881437063217, 0.07203269749879837, 0.016329295933246613, 0.43262848258018494, -0.5669282078742981, -0.24470072984695435, -0.4922095835208893, 0.5088436603546143, -0.6160329580307007, -0.4905950129032135, -0.4970576763153076, -0.19138112664222717, -0.5980011820793152, -0.5013056993484497, -0.18381188809871674, -0.39629387855529785, -0.5741662383079529, 0.08785875886678696, 0.43496784567832947, 0.4039706289768219, -0.25448763370513916, 0.39871594309806824, -0.5785565972328186, 0.20430493354797363, 0.1875772774219513, 0.3316029906272888, -0.26202839612960815, -0.7430527806282043, -0.0721888318657875, -0.08108290284872055, -0.44063207507133484, -0.7261973023414612, 0.7835625410079956, 0.10151685029268265, 0.5354569554328918, 0.4831884205341339, -0.06230797991156578, 1.1924206018447876, -0.054199833422899246, 0.5526880025863647, 0.6639580726623535, -0.8211339116096497, 0.32685551047325134, -0.30388596653938293, 0.48850688338279724, 0.5496195554733276, 0.3399903178215027, -0.6038827896118164, 0.06466815620660782, -0.876920223236084, -1.1461316347122192, 1.2171318531036377, 0.10000437498092651, -0.27480560541152954, 0.40459200739860535, 0.11925418674945831, -0.2116919308900833, 0.1736479252576828, -0.560034990310669, -0.5180165767669678, -0.3348867893218994, -0.25078433752059937, -0.007639290764927864, -0.2863927483558655, -0.2966431677341461, -0.6559377312660217, 0.955306351184845, -0.2299083024263382, 0.5875412225723267, 0.5293262600898743, -0.08494537323713303, -0.11023596674203873, -0.070490762591362, 0.5900560021400452, 0.6998544335365295, -0.3697216212749481, -0.12363505363464355, 0.00980430282652378, -0.5041002035140991, -0.00210695993155241, 0.2965816259384155, -0.5010155439376831, -0.026125699281692505, 0.35229942202568054, 1.0466095209121704, 0.2015720009803772, -0.15795543789863586, 0.6160415410995483, 0.09992752224206924, -0.5017023682594299, -0.3391435742378235, -0.0660053938627243, 0.05334916710853577, 0.4956868290901184, 0.27620014548301697, 0.5153042674064636, 0.1497940868139267, -0.2834402918815613, 0.28322941064834595, 0.41542601585388184, -0.5342220067977905, -0.36476537585258484, 0.813678503036499, 0.07899917662143707, -0.2986104488372803, 0.5011886954307556, 0.06788039207458496, -0.8655603528022766, 0.9197023510932922, 0.5413534045219421, 0.7902060151100159, -0.19924087822437286, 0.21967212855815887, 1.0720763206481934, 0.10346091538667679, 0.04225646331906319, 0.32292187213897705, 0.01112727727741003, -0.5714409947395325, -0.029382547363638878, -0.9456082582473755, -0.06318055838346481, 0.24759355187416077, -0.7832425236701965, 0.5324886441230774, -0.36376523971557617, -0.38186150789260864, 0.15014129877090454, 0.21869058907032013, -0.9572868347167969, 0.43172991275787354, 0.10542791336774826, 0.8030419945716858, -0.7143476605415344, 0.6202218532562256, 0.8143376708030701, -0.38142868876457214, -1.058232069015503, -0.26794448494911194, 0.08902153372764587, -1.0300483703613281, 0.4095744490623474, 0.27546268701553345, 0.020527027547359467, 0.04863990098237991, -0.5762733221054077, -1.1507176160812378, 1.4194806814193726, 0.22051158547401428, -0.4524840712547302, -0.10724076628684998, -0.015841450542211533, 0.41180819272994995, -0.18355384469032288, 0.3710172772407532, 0.5744940638542175, 0.5495547652244568, 0.4335329532623291, -0.5093348026275635, 0.07250930368900299, -0.3953951299190521, 0.04976891726255417, 0.3639078736305237, -1.0682663917541504, 0.9836508631706238, -0.18653355538845062, -0.07707606256008148, 0.0484233982861042, 0.511837363243103, 0.4506409168243408, 0.47122496366500854, 0.6635622382164001, 0.8376551270484924, 0.6353715658187866, -0.36603325605392456, 0.851350724697113, -0.3410823941230774, 1.0104618072509766, 1.056447982788086, 0.30358657240867615, 0.3695357143878937, 0.4332563579082489, -0.39244285225868225, 0.4179394245147705, 0.9669779539108276, -0.43134573101997375, 0.46377211809158325, -0.05964706465601921, 0.0413217730820179, -0.33690717816352844, 0.08289089798927307, -0.603361189365387, 0.5436839461326599, 0.23759162425994873, -0.6533311009407043, -0.17354653775691986, -0.16775262355804443, 0.18559008836746216, -0.2507961094379425, -0.26331040263175964, 0.6878619194030762, -0.006538690533488989, -0.43357357382774353, 0.755968451499939, -0.16280247271060944, 0.5436296463012695, -0.6989443302154541, 0.12422055751085281, -0.0690896138548851, 0.3837328255176544, -0.5195172429084778, -0.9287514686584473, 0.29756513237953186, -0.02097736857831478, -0.11730875819921494, -0.15810653567314148, 0.9612404108047485, -0.2444012612104416, -0.8394556641578674, 0.2481396198272705, 0.2213563323020935, 0.1312766969203949, 0.2895704209804535, -1.17006254196167, 0.2531341314315796, 0.24274860322475433, -0.7699235081672668, -0.0056794495321810246, 0.13078176975250244, 0.07690875232219696, 0.5376465916633606, 0.7459261417388916, -0.15342368185520172, 0.05664042755961418, -0.14425887167453766, 1.0581904649734497, -0.5243890285491943, -0.5735100507736206, -0.7486522793769836, 0.5072457790374756, -0.5303434729576111, -0.49294817447662354, 0.8298615217208862, 0.7382816076278687, 1.0474703311920166, -0.11789337545633316, 0.4437530040740967, -0.5733639001846313, 0.5469926595687866, -0.3458235263824463, 0.8029472827911377, -0.8717452883720398, -0.1457708477973938, -0.3455824553966522, -0.9120974540710449, -0.522706151008606, 1.0280991792678833, -0.3420959711074829, 0.11701878160238266, 0.4592795670032501, 0.9382289052009583, -0.1255883127450943, -0.24298611283302307, 0.0783257782459259, 0.05718227103352547, 0.28712335228919983, 0.2248487025499344, 0.551590085029602, -0.5169634819030762, 0.33538517355918884, -0.9224488139152527, -0.13114070892333984, -0.3888205885887146, -0.5851079225540161, -0.7276235222816467, -0.687994122505188, -0.43820494413375854, -0.49297896027565, -0.32521772384643555, 1.1123738288879395, 1.0098979473114014, -0.7915468811988831, -0.19344182312488556, 0.10554392635822296, 0.03842797502875328, -0.13372737169265747, -0.21400529146194458, 0.7534604668617249, 0.04836396872997284, -0.964643657207489, -0.06524056196212769, 0.026760447770357132, 0.3038938045501709, 0.15748755633831024, -0.27387502789497375, -0.2537551820278168, -0.2069312185049057, 0.4398857057094574, 0.31771889328956604, -0.5526905655860901, -0.3558885157108307, -0.025015976279973984, 0.0830715224146843, 0.4390241503715515, 0.4236757457256317, -0.5242219567298889, 0.6370672583580017, 0.6926652789115906, 0.19891490042209625, 0.7996538877487183, 0.3840486705303192, -0.05753600224852562, -0.6184367537498474, 0.3051375150680542, 0.19170580804347992, 0.5567038655281067, 0.37302497029304504, -0.28067347407341003, 0.8401914834976196, 0.4569317102432251, -0.7755637764930725, -0.9410783648490906, -0.054082632064819336, -1.344296932220459, -0.17576931416988373, 1.0637954473495483, -0.14542432129383087, -0.720525860786438, 0.20208266377449036, -0.44021114706993103, 0.4146175682544708, -0.3819294273853302, 0.5400957465171814, 0.5107352137565613, -0.33481577038764954, -0.07151748239994049, -0.2648921310901642, 0.5191168785095215, 0.13556766510009766, -0.6181102991104126, -0.31052446365356445, 0.44954168796539307, 0.5035200119018555, 0.27643081545829773, 0.4682958722114563, -0.24968183040618896, 0.20006698369979858, 0.058023836463689804, 0.22185099124908447, -0.2288825362920761, 0.0649879053235054, -0.3727419376373291, 0.06084831431508064, -0.24744483828544617, -0.38079142570495605 ]
cross-encoder/ms-marco-MiniLM-L-12-v2
cross-encoder
"2021-08-05T08:39:01Z"
441,995
36
transformers
[ "transformers", "pytorch", "jax", "bert", "text-classification", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- license: apache-2.0 --- # Cross-Encoder for MS Marco This model was trained on the [MS Marco Passage Ranking](https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See [SBERT.net Retrieve & Re-rank](https://www.sbert.net/examples/applications/retrieve_rerank/README.html) for more details. The training code is available here: [SBERT.net Training MS Marco](https://github.com/UKPLab/sentence-transformers/tree/master/examples/training/ms_marco) ## Usage with Transformers ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch model = AutoModelForSequenceClassification.from_pretrained('model_name') tokenizer = AutoTokenizer.from_pretrained('model_name') features = tokenizer(['How many people live in Berlin?', 'How many people live in Berlin?'], ['Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.', 'New York City is famous for the Metropolitan Museum of Art.'], padding=True, truncation=True, return_tensors="pt") model.eval() with torch.no_grad(): scores = model(**features).logits print(scores) ``` ## Usage with SentenceTransformers The usage becomes easier when you have [SentenceTransformers](https://www.sbert.net/) installed. Then, you can use the pre-trained models like this: ```python from sentence_transformers import CrossEncoder model = CrossEncoder('model_name', max_length=512) scores = model.predict([('Query', 'Paragraph1'), ('Query', 'Paragraph2') , ('Query', 'Paragraph3')]) ``` ## Performance In the following table, we provide various pre-trained Cross-Encoders together with their performance on the [TREC Deep Learning 2019](https://microsoft.github.io/TREC-2019-Deep-Learning/) and the [MS Marco Passage Reranking](https://github.com/microsoft/MSMARCO-Passage-Ranking/) dataset. | Model-Name | NDCG@10 (TREC DL 19) | MRR@10 (MS Marco Dev) | Docs / Sec | | ------------- |:-------------| -----| --- | | **Version 2 models** | | | | cross-encoder/ms-marco-TinyBERT-L-2-v2 | 69.84 | 32.56 | 9000 | cross-encoder/ms-marco-MiniLM-L-2-v2 | 71.01 | 34.85 | 4100 | cross-encoder/ms-marco-MiniLM-L-4-v2 | 73.04 | 37.70 | 2500 | cross-encoder/ms-marco-MiniLM-L-6-v2 | 74.30 | 39.01 | 1800 | cross-encoder/ms-marco-MiniLM-L-12-v2 | 74.31 | 39.02 | 960 | **Version 1 models** | | | | cross-encoder/ms-marco-TinyBERT-L-2 | 67.43 | 30.15 | 9000 | cross-encoder/ms-marco-TinyBERT-L-4 | 68.09 | 34.50 | 2900 | cross-encoder/ms-marco-TinyBERT-L-6 | 69.57 | 36.13 | 680 | cross-encoder/ms-marco-electra-base | 71.99 | 36.41 | 340 | **Other models** | | | | nboost/pt-tinybert-msmarco | 63.63 | 28.80 | 2900 | nboost/pt-bert-base-uncased-msmarco | 70.94 | 34.75 | 340 | nboost/pt-bert-large-msmarco | 73.36 | 36.48 | 100 | Capreolus/electra-base-msmarco | 71.23 | 36.89 | 340 | amberoad/bert-multilingual-passage-reranking-msmarco | 68.40 | 35.54 | 330 | sebastian-hofstaetter/distilbert-cat-margin_mse-T2-msmarco | 72.82 | 37.88 | 720 Note: Runtime was computed on a V100 GPU.
[ -0.4464038610458374, -0.602876603603363, 0.34621721506118774, 0.16133926808834076, -0.17513102293014526, 0.14829601347446442, -0.18506364524364471, -0.5315775871276855, 0.3474007248878479, 0.35316556692123413, -0.5687869191169739, -0.7053859233856201, -0.800533652305603, 0.04217259958386421, -0.460166871547699, 0.8195733428001404, -0.020617058500647545, 0.16986939311027527, -0.18982653319835663, -0.11410722881555557, -0.267608642578125, -0.4253515303134918, -0.5706123113632202, -0.301310271024704, 0.4973321855068207, 0.22017818689346313, 0.8030515909194946, 0.4115343689918518, 0.5798863172531128, 0.4552558958530426, -0.11599963158369064, 0.09709503501653671, -0.1954939216375351, 0.0013809099327772856, 0.0718877762556076, -0.3960622549057007, -0.5763729810714722, -0.12603425979614258, 0.46166691184043884, 0.36761435866355896, 0.007409530226141214, 0.27566471695899963, -0.0026299282908439636, 0.5979945659637451, -0.4059743881225586, -0.051734935492277145, -0.35728153586387634, 0.25485506653785706, -0.2065361738204956, -0.2594514489173889, -0.48610344529151917, -0.2247459888458252, 0.18381892144680023, -0.6060980558395386, 0.41318225860595703, 0.16228918731212616, 1.3145670890808105, 0.36269763112068176, -0.22712209820747375, -0.27100273966789246, -0.48895490169525146, 0.7479904294013977, -0.7105993032455444, 0.7360575795173645, 0.18943588435649872, 0.18311525881290436, 0.12271576374769211, -1.0114502906799316, -0.4649963676929474, -0.224639430642128, -0.19856667518615723, 0.26608237624168396, -0.43942904472351074, -0.08857860416173935, 0.4334445893764496, 0.4278644323348999, -1.0352264642715454, -0.08422399312257767, -0.7429953217506409, -0.12705908715724945, 0.6785187125205994, 0.27949580550193787, 0.27875465154647827, -0.2604598104953766, -0.3342992067337036, -0.14777317643165588, -0.5232751369476318, 0.22566266357898712, 0.28626683354377747, 0.011951925233006477, -0.21366608142852783, 0.42607274651527405, -0.24556201696395874, 0.8234750628471375, 0.1156071275472641, 0.09829505532979965, 0.8020575642585754, -0.2693694233894348, -0.24688720703125, 0.025918742641806602, 1.0182582139968872, 0.2970510721206665, 0.10830441862344742, -0.13170062005519867, -0.23415903747081757, -0.17778119444847107, 0.4197867810726166, -0.9133608937263489, -0.2780177891254425, 0.30352768301963806, -0.5561336278915405, -0.13949868083000183, 0.1694450080394745, -0.8835238814353943, 0.16694773733615875, -0.1366761326789856, 0.6278166174888611, -0.41508567333221436, 0.03367174416780472, 0.24496696889400482, -0.14783132076263428, 0.29918211698532104, 0.18577833473682404, -0.7706923484802246, 0.013900939375162125, 0.35924747586250305, 0.973804235458374, -0.11948435753583908, -0.3931933343410492, -0.16777199506759644, -0.038582831621170044, -0.1727982461452484, 0.589976966381073, -0.4896749258041382, -0.32484403252601624, -0.07526707649230957, 0.2969907224178314, -0.15611585974693298, -0.31633591651916504, 0.7400565147399902, -0.48089760541915894, 0.528544545173645, -0.13056239485740662, -0.36168426275253296, -0.16355903446674347, 0.2445247769355774, -0.8166370391845703, 1.2575750350952148, 0.04119843244552612, -0.8819833397865295, 0.1704053431749344, -0.731590747833252, -0.35491254925727844, -0.16668838262557983, 0.042785774916410446, -0.7932814955711365, 0.04758431762456894, 0.4228805899620056, 0.26733338832855225, -0.3330445885658264, 0.10346972942352295, -0.1806955188512802, -0.4706704318523407, 0.16998104751110077, -0.4310711622238159, 1.1311695575714111, 0.4119514226913452, -0.510673999786377, 0.05607081949710846, -0.6990270614624023, 0.12322282791137695, 0.295957088470459, -0.4402890205383301, -0.006051636766642332, -0.2971702218055725, 0.1435215324163437, 0.4153107702732086, 0.455373615026474, -0.5203056931495667, 0.10793985426425934, -0.2898530662059784, 0.5023929476737976, 0.479032039642334, -0.11326379328966141, 0.3576020300388336, -0.31247594952583313, 0.6945810317993164, 0.1310979276895523, 0.45084255933761597, 0.009499873034656048, -0.6577984690666199, -0.9147269129753113, -0.1404089778661728, 0.5285730361938477, 0.6103966236114502, -0.7658855319023132, 0.5640320181846619, -0.5380626916885376, -0.733299970626831, -0.8571128845214844, -0.10385400801897049, 0.4352717697620392, 0.3524019718170166, 0.6867387294769287, -0.09193737059831619, -0.7604023218154907, -1.0357261896133423, -0.3474435806274414, 0.024362141266465187, 0.041481416672468185, 0.24826063215732574, 0.6683109402656555, -0.2732729911804199, 0.764838695526123, -0.5527604818344116, -0.225142240524292, -0.4753779470920563, 0.003377981251105666, 0.26211005449295044, 0.6908491253852844, 0.6529386639595032, -0.7270156741142273, -0.5647443532943726, -0.1967572718858719, -0.7207836508750916, 0.07374462485313416, 0.038590069860219955, -0.14465951919555664, 0.2806609869003296, 0.6409924030303955, -0.7179479002952576, 0.7066987156867981, 0.5128150582313538, -0.47471657395362854, 0.38662126660346985, -0.4564577341079712, 0.30223074555397034, -1.2516871690750122, 0.10563895106315613, -0.034407101571559906, -0.16429279744625092, -0.5353989601135254, -0.16487427055835724, 0.09663695842027664, -0.026095036417245865, -0.36040806770324707, 0.34361031651496887, -0.6278329491615295, -0.035226598381996155, 0.1267731636762619, 0.08022944629192352, 0.17638880014419556, 0.657623291015625, 0.3395964205265045, 0.8067154288291931, 0.5389837622642517, -0.3681167662143707, 0.24981673061847687, 0.38097715377807617, -0.6378957033157349, 0.3939351737499237, -0.9577550292015076, -0.008802006021142006, -0.13488072156906128, 0.11195573210716248, -1.0342755317687988, 0.17452874779701233, 0.2473815232515335, -0.9054392576217651, 0.3241354525089264, -0.14174580574035645, -0.40891772508621216, -0.6847662925720215, -0.18596327304840088, 0.34089037775993347, 0.5215352177619934, -0.49181050062179565, 0.600849986076355, 0.3527885973453522, 0.0072058141231536865, -0.7315424084663391, -1.264535903930664, 0.18958646059036255, -0.05799846723675728, -0.7628253698348999, 0.6570873856544495, -0.21247628331184387, 0.15323205292224884, 0.0406360886991024, -0.04603521525859833, -0.04289055988192558, -0.11593183130025864, 0.20088399946689606, 0.3419400751590729, -0.1945367455482483, 0.015971316024661064, 0.013135393150150776, -0.2267584204673767, 0.07238519936800003, -0.21659578382968903, 0.6630609631538391, -0.1832331120967865, -0.13139855861663818, -0.2614463269710541, 0.20580634474754333, 0.5151219964027405, -0.5854277014732361, 0.7468754053115845, 0.8429319858551025, -0.33547958731651306, -0.11406075209379196, -0.4337359666824341, -0.10480887442827225, -0.5224626660346985, 0.4671388864517212, -0.6010408997535706, -0.8010169863700867, 0.5503020286560059, 0.3144737780094147, 0.02826063148677349, 0.5294132828712463, 0.5057603120803833, -0.020938139408826828, 1.0689725875854492, 0.5018405318260193, -0.05024661123752594, 0.682429850101471, -0.7406275272369385, 0.30775439739227295, -0.8023768663406372, -0.6117377877235413, -0.6852874159812927, -0.46193012595176697, -0.7090311050415039, -0.3648342192173004, 0.3163716793060303, -0.13961270451545715, -0.23505783081054688, 0.7223771214485168, -0.7789645195007324, 0.3355003893375397, 0.7557880282402039, 0.28868934512138367, 0.10721607506275177, 0.1515118032693863, -0.2651011645793915, -0.12823189795017242, -0.8641200065612793, -0.3381379246711731, 1.3521031141281128, 0.17404988408088684, 0.7262991666793823, 0.017559155821800232, 0.8002148866653442, 0.31914928555488586, -0.03953578323125839, -0.44772547483444214, 0.45587706565856934, -0.1564817577600479, -0.8063774108886719, -0.23903398215770721, -0.4366282820701599, -1.1157982349395752, 0.35300227999687195, -0.22040724754333496, -0.6037832498550415, 0.5320740938186646, -0.09253077208995819, -0.4041736125946045, 0.32788747549057007, -0.5800577402114868, 1.3560785055160522, -0.43161648511886597, -0.371113657951355, -0.10137712210416794, -0.7670010924339294, 0.1761946976184845, 0.21495188772678375, 0.03509953245520592, 0.09553896635770798, -0.17264176905155182, 0.7849159836769104, -0.3816292881965637, 0.3604066073894501, -0.1512202024459839, 0.1583920419216156, 0.19453801214694977, -0.10224421322345734, 0.39697498083114624, -0.008463796228170395, -0.10766205191612244, 0.3458806872367859, -0.04466778784990311, -0.4127345383167267, -0.44100919365882874, 0.8428022861480713, -0.9504846930503845, -0.43323761224746704, -0.5631312727928162, -0.3763390779495239, -0.030761772766709328, 0.21404165029525757, 0.7978892922401428, 0.437637597322464, 0.004456028342247009, 0.44723328948020935, 0.7715341448783875, -0.3257375657558441, 0.5937497019767761, 0.392213374376297, -0.054995097219944, -0.7650196552276611, 0.8025519847869873, 0.3169706463813782, 0.17230942845344543, 0.5954808592796326, -0.18894769251346588, -0.4940445125102997, -0.559977650642395, -0.36794373393058777, 0.17462044954299927, -0.5513123273849487, -0.23149646818637848, -0.7578722834587097, -0.42502713203430176, -0.5192058682441711, -0.07637002319097519, -0.43161705136299133, -0.4419685900211334, -0.24936717748641968, -0.18106898665428162, 0.22726459801197052, 0.6315785646438599, 0.13595788180828094, 0.21141977608203888, -0.6363331079483032, 0.22166620194911957, 0.0067062824964523315, 0.16306206583976746, -0.10990679264068604, -0.9091634154319763, -0.47124558687210083, -0.0713520497083664, -0.42636144161224365, -0.8573992252349854, 0.7049751281738281, -0.0903397798538208, 0.7585262656211853, 0.157152459025383, 0.05990191921591759, 0.7787694931030273, -0.40345877408981323, 0.9315091967582703, 0.16963477432727814, -0.8938142657279968, 0.691184401512146, 0.027000578120350838, 0.40586429834365845, 0.6534193754196167, 0.5784199833869934, -0.5525621771812439, -0.2681644558906555, -0.7996535301208496, -0.9805924296379089, 0.9308524131774902, 0.310181200504303, -0.11389739066362381, 0.07616996020078659, 0.020889325067400932, -0.12495092302560806, 0.2929762601852417, -1.004494547843933, -0.5092644095420837, -0.4695870280265808, -0.39416903257369995, -0.3273192346096039, -0.17140595614910126, 0.21283480525016785, -0.6498232483863831, 0.8042252659797668, 0.18166112899780273, 0.5935593843460083, 0.6288275122642517, -0.4285483956336975, 0.09131989628076553, 0.11431984603404999, 0.7155468463897705, 0.6676861643791199, -0.28161707520484924, -0.023899007588624954, 0.21995706856250763, -0.5300331711769104, -0.1457870453596115, 0.245555579662323, -0.481699675321579, 0.4004635512828827, 0.3502669036388397, 1.044920563697815, 0.23276127874851227, -0.40104562044143677, 0.67491215467453, 0.053258635103702545, -0.28846436738967896, -0.5205583572387695, -0.20596706867218018, 0.02086455188691616, 0.39614740014076233, 0.2552686631679535, 0.06612332910299301, 0.2646295726299286, -0.4286873936653137, 0.16255591809749603, 0.3716757595539093, -0.6103007197380066, -0.2124060094356537, 0.9429880976676941, 0.18062271177768707, -0.4427318274974823, 0.713766872882843, 0.024500899016857147, -0.8500115871429443, 0.5382372140884399, 0.37759244441986084, 1.088808536529541, -0.29514220356941223, 0.18443132936954498, 0.7205270528793335, 0.7096849679946899, 0.0766642764210701, 0.3627718687057495, -0.16405652463436127, -0.5501686334609985, -0.015021083876490593, -0.5712849497795105, -0.12295500189065933, -0.06934966146945953, -0.7011659145355225, 0.3076939284801483, -0.1838984340429306, -0.33900660276412964, -0.1989731341600418, 0.28294989466667175, -0.8713828325271606, 0.1718340367078781, 0.05677333474159241, 1.156869888305664, -0.5670150518417358, 1.1102510690689087, 0.6008107662200928, -0.9134162664413452, -0.6041352152824402, -0.13520926237106323, -0.41365793347358704, -0.7207831144332886, 0.590429961681366, 0.13090066611766815, 0.12106455117464066, -0.00002121483521477785, -0.3692193031311035, -0.8524677157402039, 1.5336414575576782, 0.21116749942302704, -0.7077149748802185, -0.19052550196647644, 0.45680779218673706, 0.5326240658760071, -0.3580392897129059, 0.7032294273376465, 0.45010796189308167, 0.5132423043251038, -0.20136971771717072, -0.9761873483657837, 0.15576274693012238, -0.5120363831520081, -0.04502680152654648, 0.08313889056444168, -0.860206127166748, 1.0975879430770874, -0.22996769845485687, 0.17645592987537384, 0.1736593395471573, 0.6268509030342102, 0.21355672180652618, 0.3572884798049927, 0.364755779504776, 0.876602292060852, 0.712064266204834, -0.4128032922744751, 0.9186109900474548, -0.5839616656303406, 0.592179536819458, 0.9367632865905762, 0.21103915572166443, 0.9265249967575073, 0.44718649983406067, -0.3397771120071411, 0.7736654877662659, 0.7568255066871643, -0.2263433039188385, 0.5358352065086365, 0.04026138409972191, 0.016690293326973915, -0.42858725786209106, 0.3998886048793793, -0.7046958804130554, 0.2481219470500946, 0.16272705793380737, -0.8330743908882141, -0.07890750467777252, -0.054942045360803604, -0.11525575071573257, -0.17021331191062927, -0.2561953663825989, 0.46774423122406006, -0.08009563386440277, -0.5953222513198853, 0.7108057141304016, 0.0316988043487072, 0.7790549993515015, -0.6904013752937317, 0.19221584498882294, -0.26883789896965027, 0.280487596988678, -0.2358902096748352, -0.910431444644928, 0.09834499657154083, -0.05132367089390755, -0.1559063196182251, -0.2881772816181183, 0.5091724395751953, -0.6074191927909851, -0.5949764847755432, 0.42728736996650696, 0.33228087425231934, 0.22095024585723877, -0.0996859148144722, -1.0789644718170166, 0.23060616850852966, 0.2206026017665863, -0.5220978260040283, 0.11658293753862381, 0.43972247838974, 0.13513097167015076, 0.6962653398513794, 0.5056962966918945, -0.12581923604011536, 0.4353557825088501, 0.03540715202689171, 0.7348296642303467, -0.9109591245651245, -0.5473940372467041, -0.5996362566947937, 0.6330152153968811, -0.30369725823402405, -0.5523414611816406, 0.9393645524978638, 1.079866886138916, 1.0336140394210815, -0.3342095911502838, 0.6962794065475464, -0.15343084931373596, 0.2578980326652527, -0.406141072511673, 0.812089204788208, -0.8865630030632019, 0.2598522901535034, -0.22782091796398163, -0.8631045818328857, -0.18231505155563354, 0.6631774306297302, -0.45763254165649414, 0.2689582407474518, 0.6956929564476013, 0.9756350517272949, 0.00831665750592947, -0.026662319898605347, 0.25587743520736694, 0.1643504500389099, 0.18734991550445557, 0.9109628796577454, 0.6756775975227356, -0.9616735577583313, 1.0479884147644043, -0.4548285901546478, 0.1684635430574417, -0.22996506094932556, -0.4395163953304291, -0.8860318064689636, -0.6065642237663269, -0.34364575147628784, -0.4382399618625641, 0.1704060584306717, 0.8647345900535583, 0.7573431730270386, -0.7773435711860657, -0.21503308415412903, -0.024070803076028824, 0.10364169627428055, -0.1443854719400406, -0.2376432567834854, 0.449699342250824, -0.28633445501327515, -0.9926990270614624, 0.34835684299468994, 0.013961929827928543, 0.009213884361088276, -0.25577467679977417, -0.4542972147464752, -0.30665653944015503, 0.04491221904754639, 0.475216805934906, 0.11274886131286621, -0.7594039440155029, -0.1292397528886795, 0.19658386707305908, -0.309824675321579, 0.3058338165283203, 0.6329779624938965, -0.812587320804596, 0.23869861662387848, 0.8608888387680054, 0.4357312023639679, 0.9441713094711304, -0.21657758951187134, 0.287492573261261, -0.4298330247402191, -0.04304880276322365, 0.16155026853084564, 0.5997025966644287, 0.14884096384048462, -0.19972474873065948, 0.6265610456466675, 0.4097515344619751, -0.6281886100769043, -0.8532052040100098, -0.1882276087999344, -1.1972483396530151, -0.36712193489074707, 0.9370834827423096, -0.1400751918554306, -0.46213671565055847, 0.1851446032524109, -0.15374161303043365, 0.2460710108280182, -0.3916335701942444, 0.490989625453949, 0.6853561997413635, 0.060584962368011475, -0.2833566963672638, -0.5991363525390625, 0.4280528426170349, 0.24334679543972015, -0.7219379544258118, -0.18962615728378296, 0.18457834422588348, 0.49263256788253784, 0.20936857163906097, 0.4593295156955719, -0.4280796945095062, 0.3291536867618561, 0.165803000330925, 0.42881911993026733, -0.3010751008987427, -0.4322967231273651, -0.34916362166404724, 0.18051518499851227, -0.4314994215965271, -0.533345639705658 ]
cross-encoder/ms-marco-MiniLM-L-6-v2
cross-encoder
"2021-08-05T08:39:38Z"
439,705
30
transformers
[ "transformers", "pytorch", "jax", "bert", "text-classification", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- license: apache-2.0 --- # Cross-Encoder for MS Marco This model was trained on the [MS Marco Passage Ranking](https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See [SBERT.net Retrieve & Re-rank](https://www.sbert.net/examples/applications/retrieve_rerank/README.html) for more details. The training code is available here: [SBERT.net Training MS Marco](https://github.com/UKPLab/sentence-transformers/tree/master/examples/training/ms_marco) ## Usage with Transformers ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch model = AutoModelForSequenceClassification.from_pretrained('model_name') tokenizer = AutoTokenizer.from_pretrained('model_name') features = tokenizer(['How many people live in Berlin?', 'How many people live in Berlin?'], ['Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.', 'New York City is famous for the Metropolitan Museum of Art.'], padding=True, truncation=True, return_tensors="pt") model.eval() with torch.no_grad(): scores = model(**features).logits print(scores) ``` ## Usage with SentenceTransformers The usage becomes easier when you have [SentenceTransformers](https://www.sbert.net/) installed. Then, you can use the pre-trained models like this: ```python from sentence_transformers import CrossEncoder model = CrossEncoder('model_name', max_length=512) scores = model.predict([('Query', 'Paragraph1'), ('Query', 'Paragraph2') , ('Query', 'Paragraph3')]) ``` ## Performance In the following table, we provide various pre-trained Cross-Encoders together with their performance on the [TREC Deep Learning 2019](https://microsoft.github.io/TREC-2019-Deep-Learning/) and the [MS Marco Passage Reranking](https://github.com/microsoft/MSMARCO-Passage-Ranking/) dataset. | Model-Name | NDCG@10 (TREC DL 19) | MRR@10 (MS Marco Dev) | Docs / Sec | | ------------- |:-------------| -----| --- | | **Version 2 models** | | | | cross-encoder/ms-marco-TinyBERT-L-2-v2 | 69.84 | 32.56 | 9000 | cross-encoder/ms-marco-MiniLM-L-2-v2 | 71.01 | 34.85 | 4100 | cross-encoder/ms-marco-MiniLM-L-4-v2 | 73.04 | 37.70 | 2500 | cross-encoder/ms-marco-MiniLM-L-6-v2 | 74.30 | 39.01 | 1800 | cross-encoder/ms-marco-MiniLM-L-12-v2 | 74.31 | 39.02 | 960 | **Version 1 models** | | | | cross-encoder/ms-marco-TinyBERT-L-2 | 67.43 | 30.15 | 9000 | cross-encoder/ms-marco-TinyBERT-L-4 | 68.09 | 34.50 | 2900 | cross-encoder/ms-marco-TinyBERT-L-6 | 69.57 | 36.13 | 680 | cross-encoder/ms-marco-electra-base | 71.99 | 36.41 | 340 | **Other models** | | | | nboost/pt-tinybert-msmarco | 63.63 | 28.80 | 2900 | nboost/pt-bert-base-uncased-msmarco | 70.94 | 34.75 | 340 | nboost/pt-bert-large-msmarco | 73.36 | 36.48 | 100 | Capreolus/electra-base-msmarco | 71.23 | 36.89 | 340 | amberoad/bert-multilingual-passage-reranking-msmarco | 68.40 | 35.54 | 330 | sebastian-hofstaetter/distilbert-cat-margin_mse-T2-msmarco | 72.82 | 37.88 | 720 Note: Runtime was computed on a V100 GPU.
[ -0.4464038610458374, -0.602876603603363, 0.34621721506118774, 0.16133926808834076, -0.17513102293014526, 0.14829601347446442, -0.18506364524364471, -0.5315775871276855, 0.3474007248878479, 0.35316556692123413, -0.5687869191169739, -0.7053859233856201, -0.800533652305603, 0.04217259958386421, -0.460166871547699, 0.8195733428001404, -0.020617058500647545, 0.16986939311027527, -0.18982653319835663, -0.11410722881555557, -0.267608642578125, -0.4253515303134918, -0.5706123113632202, -0.301310271024704, 0.4973321855068207, 0.22017818689346313, 0.8030515909194946, 0.4115343689918518, 0.5798863172531128, 0.4552558958530426, -0.11599963158369064, 0.09709503501653671, -0.1954939216375351, 0.0013809099327772856, 0.0718877762556076, -0.3960622549057007, -0.5763729810714722, -0.12603425979614258, 0.46166691184043884, 0.36761435866355896, 0.007409530226141214, 0.27566471695899963, -0.0026299282908439636, 0.5979945659637451, -0.4059743881225586, -0.051734935492277145, -0.35728153586387634, 0.25485506653785706, -0.2065361738204956, -0.2594514489173889, -0.48610344529151917, -0.2247459888458252, 0.18381892144680023, -0.6060980558395386, 0.41318225860595703, 0.16228918731212616, 1.3145670890808105, 0.36269763112068176, -0.22712209820747375, -0.27100273966789246, -0.48895490169525146, 0.7479904294013977, -0.7105993032455444, 0.7360575795173645, 0.18943588435649872, 0.18311525881290436, 0.12271576374769211, -1.0114502906799316, -0.4649963676929474, -0.224639430642128, -0.19856667518615723, 0.26608237624168396, -0.43942904472351074, -0.08857860416173935, 0.4334445893764496, 0.4278644323348999, -1.0352264642715454, -0.08422399312257767, -0.7429953217506409, -0.12705908715724945, 0.6785187125205994, 0.27949580550193787, 0.27875465154647827, -0.2604598104953766, -0.3342992067337036, -0.14777317643165588, -0.5232751369476318, 0.22566266357898712, 0.28626683354377747, 0.011951925233006477, -0.21366608142852783, 0.42607274651527405, -0.24556201696395874, 0.8234750628471375, 0.1156071275472641, 0.09829505532979965, 0.8020575642585754, -0.2693694233894348, -0.24688720703125, 0.025918742641806602, 1.0182582139968872, 0.2970510721206665, 0.10830441862344742, -0.13170062005519867, -0.23415903747081757, -0.17778119444847107, 0.4197867810726166, -0.9133608937263489, -0.2780177891254425, 0.30352768301963806, -0.5561336278915405, -0.13949868083000183, 0.1694450080394745, -0.8835238814353943, 0.16694773733615875, -0.1366761326789856, 0.6278166174888611, -0.41508567333221436, 0.03367174416780472, 0.24496696889400482, -0.14783132076263428, 0.29918211698532104, 0.18577833473682404, -0.7706923484802246, 0.013900939375162125, 0.35924747586250305, 0.973804235458374, -0.11948435753583908, -0.3931933343410492, -0.16777199506759644, -0.038582831621170044, -0.1727982461452484, 0.589976966381073, -0.4896749258041382, -0.32484403252601624, -0.07526707649230957, 0.2969907224178314, -0.15611585974693298, -0.31633591651916504, 0.7400565147399902, -0.48089760541915894, 0.528544545173645, -0.13056239485740662, -0.36168426275253296, -0.16355903446674347, 0.2445247769355774, -0.8166370391845703, 1.2575750350952148, 0.04119843244552612, -0.8819833397865295, 0.1704053431749344, -0.731590747833252, -0.35491254925727844, -0.16668838262557983, 0.042785774916410446, -0.7932814955711365, 0.04758431762456894, 0.4228805899620056, 0.26733338832855225, -0.3330445885658264, 0.10346972942352295, -0.1806955188512802, -0.4706704318523407, 0.16998104751110077, -0.4310711622238159, 1.1311695575714111, 0.4119514226913452, -0.510673999786377, 0.05607081949710846, -0.6990270614624023, 0.12322282791137695, 0.295957088470459, -0.4402890205383301, -0.006051636766642332, -0.2971702218055725, 0.1435215324163437, 0.4153107702732086, 0.455373615026474, -0.5203056931495667, 0.10793985426425934, -0.2898530662059784, 0.5023929476737976, 0.479032039642334, -0.11326379328966141, 0.3576020300388336, -0.31247594952583313, 0.6945810317993164, 0.1310979276895523, 0.45084255933761597, 0.009499873034656048, -0.6577984690666199, -0.9147269129753113, -0.1404089778661728, 0.5285730361938477, 0.6103966236114502, -0.7658855319023132, 0.5640320181846619, -0.5380626916885376, -0.733299970626831, -0.8571128845214844, -0.10385400801897049, 0.4352717697620392, 0.3524019718170166, 0.6867387294769287, -0.09193737059831619, -0.7604023218154907, -1.0357261896133423, -0.3474435806274414, 0.024362141266465187, 0.041481416672468185, 0.24826063215732574, 0.6683109402656555, -0.2732729911804199, 0.764838695526123, -0.5527604818344116, -0.225142240524292, -0.4753779470920563, 0.003377981251105666, 0.26211005449295044, 0.6908491253852844, 0.6529386639595032, -0.7270156741142273, -0.5647443532943726, -0.1967572718858719, -0.7207836508750916, 0.07374462485313416, 0.038590069860219955, -0.14465951919555664, 0.2806609869003296, 0.6409924030303955, -0.7179479002952576, 0.7066987156867981, 0.5128150582313538, -0.47471657395362854, 0.38662126660346985, -0.4564577341079712, 0.30223074555397034, -1.2516871690750122, 0.10563895106315613, -0.034407101571559906, -0.16429279744625092, -0.5353989601135254, -0.16487427055835724, 0.09663695842027664, -0.026095036417245865, -0.36040806770324707, 0.34361031651496887, -0.6278329491615295, -0.035226598381996155, 0.1267731636762619, 0.08022944629192352, 0.17638880014419556, 0.657623291015625, 0.3395964205265045, 0.8067154288291931, 0.5389837622642517, -0.3681167662143707, 0.24981673061847687, 0.38097715377807617, -0.6378957033157349, 0.3939351737499237, -0.9577550292015076, -0.008802006021142006, -0.13488072156906128, 0.11195573210716248, -1.0342755317687988, 0.17452874779701233, 0.2473815232515335, -0.9054392576217651, 0.3241354525089264, -0.14174580574035645, -0.40891772508621216, -0.6847662925720215, -0.18596327304840088, 0.34089037775993347, 0.5215352177619934, -0.49181050062179565, 0.600849986076355, 0.3527885973453522, 0.0072058141231536865, -0.7315424084663391, -1.264535903930664, 0.18958646059036255, -0.05799846723675728, -0.7628253698348999, 0.6570873856544495, -0.21247628331184387, 0.15323205292224884, 0.0406360886991024, -0.04603521525859833, -0.04289055988192558, -0.11593183130025864, 0.20088399946689606, 0.3419400751590729, -0.1945367455482483, 0.015971316024661064, 0.013135393150150776, -0.2267584204673767, 0.07238519936800003, -0.21659578382968903, 0.6630609631538391, -0.1832331120967865, -0.13139855861663818, -0.2614463269710541, 0.20580634474754333, 0.5151219964027405, -0.5854277014732361, 0.7468754053115845, 0.8429319858551025, -0.33547958731651306, -0.11406075209379196, -0.4337359666824341, -0.10480887442827225, -0.5224626660346985, 0.4671388864517212, -0.6010408997535706, -0.8010169863700867, 0.5503020286560059, 0.3144737780094147, 0.02826063148677349, 0.5294132828712463, 0.5057603120803833, -0.020938139408826828, 1.0689725875854492, 0.5018405318260193, -0.05024661123752594, 0.682429850101471, -0.7406275272369385, 0.30775439739227295, -0.8023768663406372, -0.6117377877235413, -0.6852874159812927, -0.46193012595176697, -0.7090311050415039, -0.3648342192173004, 0.3163716793060303, -0.13961270451545715, -0.23505783081054688, 0.7223771214485168, -0.7789645195007324, 0.3355003893375397, 0.7557880282402039, 0.28868934512138367, 0.10721607506275177, 0.1515118032693863, -0.2651011645793915, -0.12823189795017242, -0.8641200065612793, -0.3381379246711731, 1.3521031141281128, 0.17404988408088684, 0.7262991666793823, 0.017559155821800232, 0.8002148866653442, 0.31914928555488586, -0.03953578323125839, -0.44772547483444214, 0.45587706565856934, -0.1564817577600479, -0.8063774108886719, -0.23903398215770721, -0.4366282820701599, -1.1157982349395752, 0.35300227999687195, -0.22040724754333496, -0.6037832498550415, 0.5320740938186646, -0.09253077208995819, -0.4041736125946045, 0.32788747549057007, -0.5800577402114868, 1.3560785055160522, -0.43161648511886597, -0.371113657951355, -0.10137712210416794, -0.7670010924339294, 0.1761946976184845, 0.21495188772678375, 0.03509953245520592, 0.09553896635770798, -0.17264176905155182, 0.7849159836769104, -0.3816292881965637, 0.3604066073894501, -0.1512202024459839, 0.1583920419216156, 0.19453801214694977, -0.10224421322345734, 0.39697498083114624, -0.008463796228170395, -0.10766205191612244, 0.3458806872367859, -0.04466778784990311, -0.4127345383167267, -0.44100919365882874, 0.8428022861480713, -0.9504846930503845, -0.43323761224746704, -0.5631312727928162, -0.3763390779495239, -0.030761772766709328, 0.21404165029525757, 0.7978892922401428, 0.437637597322464, 0.004456028342247009, 0.44723328948020935, 0.7715341448783875, -0.3257375657558441, 0.5937497019767761, 0.392213374376297, -0.054995097219944, -0.7650196552276611, 0.8025519847869873, 0.3169706463813782, 0.17230942845344543, 0.5954808592796326, -0.18894769251346588, -0.4940445125102997, -0.559977650642395, -0.36794373393058777, 0.17462044954299927, -0.5513123273849487, -0.23149646818637848, -0.7578722834587097, -0.42502713203430176, -0.5192058682441711, -0.07637002319097519, -0.43161705136299133, -0.4419685900211334, -0.24936717748641968, -0.18106898665428162, 0.22726459801197052, 0.6315785646438599, 0.13595788180828094, 0.21141977608203888, -0.6363331079483032, 0.22166620194911957, 0.0067062824964523315, 0.16306206583976746, -0.10990679264068604, -0.9091634154319763, -0.47124558687210083, -0.0713520497083664, -0.42636144161224365, -0.8573992252349854, 0.7049751281738281, -0.0903397798538208, 0.7585262656211853, 0.157152459025383, 0.05990191921591759, 0.7787694931030273, -0.40345877408981323, 0.9315091967582703, 0.16963477432727814, -0.8938142657279968, 0.691184401512146, 0.027000578120350838, 0.40586429834365845, 0.6534193754196167, 0.5784199833869934, -0.5525621771812439, -0.2681644558906555, -0.7996535301208496, -0.9805924296379089, 0.9308524131774902, 0.310181200504303, -0.11389739066362381, 0.07616996020078659, 0.020889325067400932, -0.12495092302560806, 0.2929762601852417, -1.004494547843933, -0.5092644095420837, -0.4695870280265808, -0.39416903257369995, -0.3273192346096039, -0.17140595614910126, 0.21283480525016785, -0.6498232483863831, 0.8042252659797668, 0.18166112899780273, 0.5935593843460083, 0.6288275122642517, -0.4285483956336975, 0.09131989628076553, 0.11431984603404999, 0.7155468463897705, 0.6676861643791199, -0.28161707520484924, -0.023899007588624954, 0.21995706856250763, -0.5300331711769104, -0.1457870453596115, 0.245555579662323, -0.481699675321579, 0.4004635512828827, 0.3502669036388397, 1.044920563697815, 0.23276127874851227, -0.40104562044143677, 0.67491215467453, 0.053258635103702545, -0.28846436738967896, -0.5205583572387695, -0.20596706867218018, 0.02086455188691616, 0.39614740014076233, 0.2552686631679535, 0.06612332910299301, 0.2646295726299286, -0.4286873936653137, 0.16255591809749603, 0.3716757595539093, -0.6103007197380066, -0.2124060094356537, 0.9429880976676941, 0.18062271177768707, -0.4427318274974823, 0.713766872882843, 0.024500899016857147, -0.8500115871429443, 0.5382372140884399, 0.37759244441986084, 1.088808536529541, -0.29514220356941223, 0.18443132936954498, 0.7205270528793335, 0.7096849679946899, 0.0766642764210701, 0.3627718687057495, -0.16405652463436127, -0.5501686334609985, -0.015021083876490593, -0.5712849497795105, -0.12295500189065933, -0.06934966146945953, -0.7011659145355225, 0.3076939284801483, -0.1838984340429306, -0.33900660276412964, -0.1989731341600418, 0.28294989466667175, -0.8713828325271606, 0.1718340367078781, 0.05677333474159241, 1.156869888305664, -0.5670150518417358, 1.1102510690689087, 0.6008107662200928, -0.9134162664413452, -0.6041352152824402, -0.13520926237106323, -0.41365793347358704, -0.7207831144332886, 0.590429961681366, 0.13090066611766815, 0.12106455117464066, -0.00002121483521477785, -0.3692193031311035, -0.8524677157402039, 1.5336414575576782, 0.21116749942302704, -0.7077149748802185, -0.19052550196647644, 0.45680779218673706, 0.5326240658760071, -0.3580392897129059, 0.7032294273376465, 0.45010796189308167, 0.5132423043251038, -0.20136971771717072, -0.9761873483657837, 0.15576274693012238, -0.5120363831520081, -0.04502680152654648, 0.08313889056444168, -0.860206127166748, 1.0975879430770874, -0.22996769845485687, 0.17645592987537384, 0.1736593395471573, 0.6268509030342102, 0.21355672180652618, 0.3572884798049927, 0.364755779504776, 0.876602292060852, 0.712064266204834, -0.4128032922744751, 0.9186109900474548, -0.5839616656303406, 0.592179536819458, 0.9367632865905762, 0.21103915572166443, 0.9265249967575073, 0.44718649983406067, -0.3397771120071411, 0.7736654877662659, 0.7568255066871643, -0.2263433039188385, 0.5358352065086365, 0.04026138409972191, 0.016690293326973915, -0.42858725786209106, 0.3998886048793793, -0.7046958804130554, 0.2481219470500946, 0.16272705793380737, -0.8330743908882141, -0.07890750467777252, -0.054942045360803604, -0.11525575071573257, -0.17021331191062927, -0.2561953663825989, 0.46774423122406006, -0.08009563386440277, -0.5953222513198853, 0.7108057141304016, 0.0316988043487072, 0.7790549993515015, -0.6904013752937317, 0.19221584498882294, -0.26883789896965027, 0.280487596988678, -0.2358902096748352, -0.910431444644928, 0.09834499657154083, -0.05132367089390755, -0.1559063196182251, -0.2881772816181183, 0.5091724395751953, -0.6074191927909851, -0.5949764847755432, 0.42728736996650696, 0.33228087425231934, 0.22095024585723877, -0.0996859148144722, -1.0789644718170166, 0.23060616850852966, 0.2206026017665863, -0.5220978260040283, 0.11658293753862381, 0.43972247838974, 0.13513097167015076, 0.6962653398513794, 0.5056962966918945, -0.12581923604011536, 0.4353557825088501, 0.03540715202689171, 0.7348296642303467, -0.9109591245651245, -0.5473940372467041, -0.5996362566947937, 0.6330152153968811, -0.30369725823402405, -0.5523414611816406, 0.9393645524978638, 1.079866886138916, 1.0336140394210815, -0.3342095911502838, 0.6962794065475464, -0.15343084931373596, 0.2578980326652527, -0.406141072511673, 0.812089204788208, -0.8865630030632019, 0.2598522901535034, -0.22782091796398163, -0.8631045818328857, -0.18231505155563354, 0.6631774306297302, -0.45763254165649414, 0.2689582407474518, 0.6956929564476013, 0.9756350517272949, 0.00831665750592947, -0.026662319898605347, 0.25587743520736694, 0.1643504500389099, 0.18734991550445557, 0.9109628796577454, 0.6756775975227356, -0.9616735577583313, 1.0479884147644043, -0.4548285901546478, 0.1684635430574417, -0.22996506094932556, -0.4395163953304291, -0.8860318064689636, -0.6065642237663269, -0.34364575147628784, -0.4382399618625641, 0.1704060584306717, 0.8647345900535583, 0.7573431730270386, -0.7773435711860657, -0.21503308415412903, -0.024070803076028824, 0.10364169627428055, -0.1443854719400406, -0.2376432567834854, 0.449699342250824, -0.28633445501327515, -0.9926990270614624, 0.34835684299468994, 0.013961929827928543, 0.009213884361088276, -0.25577467679977417, -0.4542972147464752, -0.30665653944015503, 0.04491221904754639, 0.475216805934906, 0.11274886131286621, -0.7594039440155029, -0.1292397528886795, 0.19658386707305908, -0.309824675321579, 0.3058338165283203, 0.6329779624938965, -0.812587320804596, 0.23869861662387848, 0.8608888387680054, 0.4357312023639679, 0.9441713094711304, -0.21657758951187134, 0.287492573261261, -0.4298330247402191, -0.04304880276322365, 0.16155026853084564, 0.5997025966644287, 0.14884096384048462, -0.19972474873065948, 0.6265610456466675, 0.4097515344619751, -0.6281886100769043, -0.8532052040100098, -0.1882276087999344, -1.1972483396530151, -0.36712193489074707, 0.9370834827423096, -0.1400751918554306, -0.46213671565055847, 0.1851446032524109, -0.15374161303043365, 0.2460710108280182, -0.3916335701942444, 0.490989625453949, 0.6853561997413635, 0.060584962368011475, -0.2833566963672638, -0.5991363525390625, 0.4280528426170349, 0.24334679543972015, -0.7219379544258118, -0.18962615728378296, 0.18457834422588348, 0.49263256788253784, 0.20936857163906097, 0.4593295156955719, -0.4280796945095062, 0.3291536867618561, 0.165803000330925, 0.42881911993026733, -0.3010751008987427, -0.4322967231273651, -0.34916362166404724, 0.18051518499851227, -0.4314994215965271, -0.533345639705658 ]
sentence-transformers/clip-ViT-B-32-multilingual-v1
sentence-transformers
"2022-06-15T20:17:26Z"
437,704
67
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "distilbert", "feature-extraction", "sentence-similarity", "transformers", "multilingual", "arxiv:2004.09813", "arxiv:1908.10084", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- pipeline_tag: sentence-similarity language: multilingual tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers license: apache-2.0 --- # sentence-transformers/clip-ViT-B-32-multilingual-v1 This is a multi-lingual version of the OpenAI CLIP-ViT-B32 model. You can map text (in 50+ languages) and images to a common dense vector space such that images and the matching texts are close. This model can be used for **image search** (users search through a large collection of images) and for **multi-lingual zero-shot image classification** (image labels are defined as text). ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer, util from PIL import Image, ImageFile import requests import torch # We use the original clip-ViT-B-32 for encoding images img_model = SentenceTransformer('clip-ViT-B-32') # Our text embedding model is aligned to the img_model and maps 50+ # languages to the same vector space text_model = SentenceTransformer('sentence-transformers/clip-ViT-B-32-multilingual-v1') # Now we load and encode the images def load_image(url_or_path): if url_or_path.startswith("http://") or url_or_path.startswith("https://"): return Image.open(requests.get(url_or_path, stream=True).raw) else: return Image.open(url_or_path) # We load 3 images. You can either pass URLs or # a path on your disc img_paths = [ # Dog image "https://unsplash.com/photos/QtxgNsmJQSs/download?ixid=MnwxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNjM1ODQ0MjY3&w=640", # Cat image "https://unsplash.com/photos/9UUoGaaHtNE/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8Mnx8Y2F0fHwwfHx8fDE2MzU4NDI1ODQ&w=640", # Beach image "https://unsplash.com/photos/Siuwr3uCir0/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8NHx8YmVhY2h8fDB8fHx8MTYzNTg0MjYzMg&w=640" ] images = [load_image(img) for img in img_paths] # Map images to the vector space img_embeddings = img_model.encode(images) # Now we encode our text: texts = [ "A dog in the snow", "Eine Katze", # German: A cat "Una playa con palmeras." # Spanish: a beach with palm trees ] text_embeddings = text_model.encode(texts) # Compute cosine similarities: cos_sim = util.cos_sim(text_embeddings, img_embeddings) for text, scores in zip(texts, cos_sim): max_img_idx = torch.argmax(scores) print("Text:", text) print("Score:", scores[max_img_idx] ) print("Path:", img_paths[max_img_idx], "\n") ``` ## Multilingual Image Search - Demo For a demo of multilingual image search, have a look at: [Image_Search-multilingual.ipynb](https://github.com/UKPLab/sentence-transformers/tree/master/examples/applications/image-search/Image_Search-multilingual.ipynb) ( [Colab version](https://colab.research.google.com/drive/1N6woBKL4dzYsHboDNqtv-8gjZglKOZcn?usp=sharing) ) For more details on image search and zero-shot image classification, have a look at the documentation on [SBERT.net](https://www.sbert.net/examples/applications/image-search/README.html). ## Training This model has been created using [Multilingual Knowledge Distillation](https://arxiv.org/abs/2004.09813). As teacher model, we used the original `clip-ViT-B-32` and then trained a [multilingual DistilBERT](https://huggingface.co/distilbert-base-multilingual-cased) model as student model. Using parallel data, the multilingual student model learns to align the teachers vector space across many languages. As a result, you get an text embedding model that works for 50+ languages. The image encoder from CLIP is unchanged, i.e. you can use the original CLIP image encoder to encode images. Have a look at the [SBERT.net - Multilingual-Models documentation](https://www.sbert.net/examples/training/multilingual/README.html) on more details and for **training code**. We used the following 50+ languages to align the vector spaces: ar, bg, ca, cs, da, de, el, es, et, fa, fi, fr, fr-ca, gl, gu, he, hi, hr, hu, hy, id, it, ja, ka, ko, ku, lt, lv, mk, mn, mr, ms, my, nb, nl, pl, pt, pt, pt-br, ro, ru, sk, sl, sq, sr, sv, th, tr, uk, ur, vi, zh-cn, zh-tw. The original multilingual DistilBERT supports 100+ lanugages. The model also work for these languages, but might not yield the best results. ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: DistilBertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) (2): Dense({'in_features': 768, 'out_features': 512, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ```
[ -0.37170547246932983, -0.6916846632957458, 0.2696443796157837, 0.4774262607097626, -0.32599616050720215, -0.17193982005119324, -0.3244687616825104, -0.3567725419998169, 0.1286197304725647, 0.2124636024236679, -0.4445742070674896, -0.5614709258079529, -0.5208597183227539, 0.3637657165527344, -0.186335951089859, 0.7761135697364807, -0.24192850291728973, 0.24876950681209564, -0.09473343193531036, -0.2776004672050476, -0.4286825358867645, -0.45728689432144165, -0.3788454830646515, -0.27171576023101807, 0.2839358150959015, 0.19064007699489594, 0.6304157376289368, 0.4471464157104492, 0.4918019771575928, 0.40317049622535706, -0.055875182151794434, 0.02909858524799347, -0.32553693652153015, -0.034298308193683624, -0.052558548748493195, -0.4601193964481354, 0.01627141796052456, -0.07682705670595169, 0.4603939950466156, 0.18598094582557678, -0.07512577623128891, 0.037208832800388336, -0.10365760326385498, 0.42356330156326294, -0.4184442162513733, 0.2580409646034241, -0.5572348833084106, 0.14050619304180145, -0.10121084004640579, -0.10132541507482529, -0.5243222713470459, -0.374623566865921, 0.08266198635101318, -0.6612004637718201, 0.18829534947872162, -0.04164329543709755, 1.3883066177368164, 0.06515054404735565, -0.4640071988105774, -0.46290484070777893, -0.36324670910835266, 0.8485409021377563, -0.6550251245498657, 0.30566707253456116, 0.24572645127773285, 0.1250709593296051, -0.1282355636358261, -0.6845651268959045, -0.7575268149375916, 0.05831007659435272, -0.17852067947387695, 0.24681200087070465, -0.23726853728294373, -0.15461410582065582, 0.15565407276153564, 0.397076278924942, -0.6036604642868042, -0.023089950904250145, -0.5143430233001709, -0.1358640044927597, 0.6021719574928284, -0.08380261808633804, 0.6607916951179504, -0.3766123354434967, -0.574732780456543, -0.5170795321464539, -0.40429285168647766, 0.21566206216812134, 0.3393763601779938, 0.14242099225521088, -0.3272148668766022, 0.6421796083450317, 0.13024355471134186, 0.6407591104507446, -0.09466472268104553, -0.19075967371463776, 0.5902901291847229, -0.30591896176338196, -0.09067397564649582, -0.003221007762476802, 1.2681134939193726, 0.5162616968154907, 0.3286000192165375, 0.0650269091129303, -0.05874112993478775, 0.11983071267604828, -0.1197151392698288, -0.9961532950401306, -0.3244539201259613, 0.058900535106658936, -0.38883641362190247, -0.17326006293296814, 0.0667685866355896, -0.7623724937438965, -0.004109413828700781, 0.09105119854211807, 0.6157023310661316, -0.8697770833969116, -0.07650944590568542, 0.41055214405059814, -0.298779159784317, 0.1778518706560135, -0.01859959401190281, -0.7063759565353394, 0.016353413462638855, 0.12902630865573883, 0.9773630499839783, 0.18675969541072845, -0.6634888648986816, -0.10600601881742477, 0.009609338827431202, -0.0670536607503891, 0.7273687720298767, -0.337565153837204, -0.18358342349529266, 0.17757384479045868, 0.39443540573120117, -0.20682868361473083, -0.26916638016700745, 0.594592809677124, -0.3509775996208191, 0.5308533310890198, -0.12781767547130585, -0.41593724489212036, -0.5412458777427673, 0.3155982792377472, -0.7399451732635498, 1.2148674726486206, -0.09077544510364532, -0.9766094088554382, 0.08712511509656906, -0.6558476686477661, -0.4543496370315552, -0.1906115710735321, -0.05577812343835831, -0.5573157668113708, -0.10716689378023148, 0.6656334400177002, 0.6815395951271057, -0.16898851096630096, 0.25130075216293335, -0.25519466400146484, -0.38435643911361694, 0.41308659315109253, -0.45008423924446106, 1.2034316062927246, 0.08218706399202347, -0.2510125935077667, -0.170697420835495, -0.5129952430725098, -0.015058759599924088, 0.4891888201236725, -0.4217292070388794, -0.38591325283050537, -0.17869333922863007, 0.3272706866264343, 0.42447829246520996, 0.33839496970176697, -0.8370848298072815, 0.2422257959842682, -0.25183209776878357, 0.6404556035995483, 0.5570051074028015, -0.03892417252063751, 0.3824903070926666, -0.3068999648094177, 0.4253864586353302, 0.2396327257156372, 0.08882948011159897, -0.5431726574897766, -0.4606339633464813, -0.6646934151649475, -0.4367852210998535, 0.24491752684116364, 0.7036323547363281, -0.9401113390922546, 0.4857575297355652, -0.4022316336631775, -0.5955379605293274, -0.8019105792045593, -0.03736967593431473, 0.34074220061302185, 0.33783698081970215, 0.547839343547821, -0.22335845232009888, -0.44371044635772705, -0.8819159269332886, 0.06822242587804794, -0.01403424609452486, 0.22132925689220428, 0.24485650658607483, 0.7244580984115601, -0.23939964175224304, 0.7614495754241943, -0.6677743196487427, -0.4749447703361511, -0.24376370012760162, 0.10430136322975159, 0.3697996139526367, 0.42347100377082825, 0.8662822842597961, -0.9827184081077576, -0.8118132948875427, -0.03989609703421593, -0.8743879199028015, 0.14626790583133698, -0.13982270658016205, -0.046645764261484146, 0.3087940514087677, 0.3226545453071594, -0.7250956892967224, 0.31923410296440125, 0.616107165813446, -0.25792640447616577, 0.5463597774505615, -0.45701107382774353, 0.27452582120895386, -1.309002161026001, -0.060312431305646896, 0.17017270624637604, -0.11793672293424606, -0.40248584747314453, 0.16032403707504272, 0.25458431243896484, -0.12404369562864304, -0.6518126726150513, 0.42658621072769165, -0.5938687920570374, 0.1620207577943802, 0.0434514544904232, 0.16201700270175934, 0.13991715013980865, 0.7245380282402039, 0.20863653719425201, 0.8519818186759949, 0.862321138381958, -0.44517382979393005, 0.4517315924167633, 0.5852323174476624, -0.5398699641227722, 0.5363223552703857, -0.7105174660682678, -0.038078710436820984, -0.2859429121017456, 0.22453713417053223, -0.9889538884162903, -0.045432236045598984, 0.17974629998207092, -0.5308778285980225, 0.20415355265140533, 0.019502166658639908, -0.715599775314331, -0.520104706287384, -0.4904356002807617, 0.3311431407928467, 0.3972252607345581, -0.7035912871360779, 0.37432506680488586, 0.22395233809947968, 0.0014669266529381275, -0.7694917321205139, -1.0546478033065796, 0.08935648947954178, -0.21509380638599396, -0.6825875043869019, 0.49441879987716675, -0.01872541382908821, 0.2574499845504761, 0.25847241282463074, 0.24506083130836487, -0.2591177225112915, -0.14855298399925232, 0.07899768650531769, 0.29688942432403564, -0.19278480112552643, 0.16384947299957275, -0.011271740309894085, 0.12090716511011124, -0.24851690232753754, -0.16119153797626495, 0.7843312621116638, -0.3454895317554474, -0.2641586363315582, -0.5205974578857422, 0.34744733572006226, 0.5095418691635132, -0.39140066504478455, 0.8229172229766846, 0.9584028124809265, -0.3367505371570587, 0.14583295583724976, -0.342693954706192, -0.024210132658481598, -0.4922054409980774, 0.5556427836418152, -0.47851675748825073, -0.7933031916618347, 0.5152765512466431, 0.15096525847911835, 0.0069701215252280235, 0.47194159030914307, 0.5512903332710266, -0.1636660397052765, 0.8391600251197815, 0.682458221912384, -0.1247507855296135, 0.5049395561218262, -0.6373119354248047, 0.2366950809955597, -0.7141640186309814, -0.2908214330673218, -0.3888724446296692, -0.2274906486272812, -0.7011346220970154, -0.4877846837043762, 0.29599282145500183, 0.11425623297691345, -0.20731976628303528, 0.6925883293151855, -0.6970237493515015, 0.5055593252182007, 0.4756981432437897, 0.26238104701042175, 0.043397944420576096, 0.2591014802455902, -0.33587780594825745, -0.3024771213531494, -0.6506302356719971, -0.47081708908081055, 0.8606979250907898, 0.352010041475296, 0.7018064260482788, 0.11458148807287216, 0.6872034668922424, -0.055319126695394516, -0.10248837620019913, -0.8144623041152954, 0.5387306809425354, -0.47564932703971863, -0.5861955881118774, -0.23793835937976837, -0.20521686971187592, -1.0793044567108154, 0.49693241715431213, -0.275913268327713, -0.7689724564552307, 0.07357997447252274, -0.20840592682361603, -0.02888001874089241, 0.45760786533355713, -0.7223080992698669, 1.0071014165878296, -0.4111070930957794, -0.24295584857463837, -0.01174923125654459, -0.516676664352417, 0.22545410692691803, 0.1223168671131134, 0.2700445055961609, -0.03867507353425026, 0.05549425259232521, 0.6529826521873474, -0.3432115614414215, 0.8149270415306091, -0.06436687707901001, 0.045208316296339035, 0.23975995182991028, -0.11369439214468002, 0.25361207127571106, -0.05882231146097183, -0.03326013311743736, 0.28791937232017517, 0.16406679153442383, -0.31166872382164, -0.3916761875152588, 0.589636504650116, -0.9356863498687744, -0.27098390460014343, -0.5907855033874512, -0.5936542749404907, 0.225799098610878, 0.3680918216705322, 0.5514895915985107, 0.3365444242954254, -0.1138334646821022, 0.35103386640548706, 0.5082445740699768, -0.6724244356155396, 0.6454729437828064, 0.3403512239456177, -0.23119425773620605, -0.5757737159729004, 0.875713050365448, 0.05566912144422531, 0.010957149788737297, 0.5484471917152405, 0.22450965642929077, -0.4381641149520874, -0.12632183730602264, -0.49947500228881836, 0.42262160778045654, -0.7948400974273682, -0.3299352824687958, -0.6895129680633545, -0.19179114699363708, -0.4888063967227936, -0.18113724887371063, -0.31120407581329346, -0.290164977312088, -0.5147297978401184, -0.018241671845316887, 0.5834701061248779, 0.5169636607170105, 0.013268664479255676, 0.4488033652305603, -0.7060844302177429, 0.2794540226459503, 0.04474306106567383, 0.18953731656074524, -0.04821540787816048, -0.4803943336009979, -0.17100904881954193, 0.12424366176128387, -0.5801730155944824, -1.1156127452850342, 0.6592256426811218, 0.41783592104911804, 0.47158464789390564, 0.2799292802810669, -0.09247791022062302, 0.864559531211853, -0.6230794787406921, 0.8700883388519287, 0.5444499254226685, -0.938380777835846, 0.4632726013660431, -0.16779279708862305, 0.3445819616317749, 0.3864170014858246, 0.6727871894836426, -0.7074739336967468, -0.2692214846611023, -0.39887088537216187, -0.9128212332725525, 0.783586323261261, 0.18367858231067657, 0.42714518308639526, -0.09913334250450134, 0.12983036041259766, 0.00820048339664936, 0.019160645082592964, -1.2737095355987549, -0.372634619474411, -0.42216041684150696, -0.4009675681591034, -0.18745295703411102, -0.1377817839384079, 0.1669180989265442, -0.534587025642395, 0.7856218814849854, -0.04093685373663902, 0.44966551661491394, 0.38838422298431396, -0.4354625344276428, 0.2630954682826996, 0.22915616631507874, 0.5045870542526245, 0.1264745593070984, -0.12986236810684204, 0.11036325246095657, 0.11673737317323685, -0.5648373961448669, 0.3260699510574341, 0.16664913296699524, -0.2922612130641937, 0.36434096097946167, 0.29390138387680054, 1.038644790649414, 0.2079608142375946, -0.5696111917495728, 0.7671250700950623, -0.17517413198947906, -0.27019232511520386, -0.37795373797416687, -0.3431858718395233, 0.13521282374858856, 0.3001132011413574, 0.29432496428489685, -0.06556206196546555, -0.0664767324924469, -0.5322859883308411, 0.16007277369499207, 0.2574935853481293, -0.31571048498153687, -0.2517983317375183, 0.6030386090278625, -0.14605426788330078, -0.19209939241409302, 0.7580521702766418, -0.39696362614631653, -0.8220168948173523, 0.6779157519340515, 0.842124879360199, 0.683138370513916, -0.07361067086458206, 0.5568161010742188, 0.6970176100730896, 0.4678404927253723, -0.21389199793338776, 0.34371882677078247, 0.18129323422908783, -0.8171440958976746, -0.2649516463279724, -0.5717653632164001, -0.0365784652531147, 0.12189283967018127, -0.5391267538070679, 0.42881423234939575, -0.11129357665777206, -0.16527621448040009, -0.007210581097751856, -0.12863598763942719, -0.7499902248382568, -0.022718148306012154, 0.07779272645711899, 0.9331203699111938, -0.9784369468688965, 0.992152750492096, 1.004368543624878, -0.8356456160545349, -0.7804229259490967, -0.10665761679410934, -0.3141453266143799, -0.735796332359314, 0.7788546085357666, 0.506008505821228, 0.19690153002738953, -0.11152105033397675, -0.4700557589530945, -0.8051447868347168, 1.2218868732452393, 0.524682879447937, -0.3682234287261963, 0.038105558604002, 0.24426133930683136, 0.6037365794181824, -0.3221883773803711, 0.44055113196372986, 0.11195921152830124, 0.33700573444366455, 0.062368519604206085, -0.9241955280303955, 0.10976261645555496, -0.3650004267692566, 0.26726964116096497, 0.06679458916187286, -0.643968403339386, 1.1304802894592285, -0.23462876677513123, -0.3083764910697937, 0.1380685418844223, 0.5471910834312439, 0.1953514814376831, 0.049203094094991684, 0.2745724618434906, 0.7707400321960449, 0.5785471200942993, -0.1769292801618576, 0.8395786285400391, -0.2719244062900543, 0.700076162815094, 0.8459596633911133, 0.01739896833896637, 0.9324616193771362, 0.5119646787643433, -0.19632373750209808, 0.6746364831924438, 0.6483996510505676, -0.4012056291103363, 0.7127313613891602, -0.007993735373020172, -0.12925133109092712, -0.033364370465278625, -0.023801878094673157, -0.2253345102071762, 0.5250400304794312, 0.2015414535999298, -0.45564529299736023, -0.29986572265625, 0.3810073435306549, 0.05997432768344879, 0.17017707228660583, 0.01902480609714985, 0.4740599989891052, 0.020614471286535263, -0.46480149030685425, 0.7201108932495117, 0.2236584573984146, 1.0424034595489502, -0.397358775138855, 0.09601084142923355, 0.01537591964006424, 0.33926865458488464, -0.11235056817531586, -1.089422345161438, 0.13304808735847473, -0.036434657871723175, -0.02465934492647648, -0.25535425543785095, 0.5885224938392639, -0.7070633769035339, -0.5214042663574219, 0.42893004417419434, 0.2094360738992691, 0.30327776074409485, 0.060942187905311584, -1.075371503829956, 0.08727192878723145, 0.15236572921276093, -0.2561763525009155, 0.08775284886360168, 0.458175390958786, 0.04556072875857353, 0.6477915644645691, 0.43432170152664185, 0.0248204804956913, 0.21183915436267853, -0.10728930681943893, 0.6614211201667786, -0.5924309492111206, -0.42021697759628296, -0.8849716782569885, 0.4847909212112427, -0.08705967664718628, -0.3157525360584259, 0.7681407928466797, 0.7197784185409546, 1.1392194032669067, -0.4938231110572815, 0.761411726474762, -0.2718215882778168, 0.005507862661033869, -0.5417584180831909, 0.7555328011512756, -0.8013531565666199, -0.26856371760368347, -0.29471555352211, -0.7060990929603577, -0.3059733808040619, 0.894309937953949, -0.22801139950752258, -0.20611466467380524, 0.7529423236846924, 0.8936755657196045, -0.22889719903469086, -0.25441479682922363, 0.13307292759418488, 0.10135085135698318, 0.2506633400917053, 0.7381385564804077, 0.5929885506629944, -0.9278996586799622, 0.7361692786216736, -0.652131974697113, 0.07260395586490631, -0.021413911134004593, -0.793869137763977, -0.9596607685089111, -0.9790838956832886, -0.3761940598487854, -0.12959426641464233, -0.14463990926742554, 0.7383752465248108, 0.5500025749206543, -0.7105756402015686, -0.3232666850090027, 0.05076877772808075, 0.040139034390449524, -0.1430007517337799, -0.26045992970466614, 0.5267939567565918, -0.20722830295562744, -0.9350509643554688, -0.03131618723273277, 0.14608022570610046, 0.21257486939430237, -0.11501215398311615, -0.09912320226430893, -0.7127276659011841, -0.0684794932603836, 0.6558932065963745, 0.1157708391547203, -0.6853784918785095, -0.10056101530790329, 0.23593980073928833, -0.28899911046028137, 0.2424554079771042, 0.34725603461265564, -0.4401661157608032, 0.4607665240764618, 0.48793908953666687, 0.47093427181243896, 0.693741500377655, -0.2836238443851471, 0.1595773696899414, -0.7864736318588257, 0.5383179783821106, -0.08256746828556061, 0.6740076541900635, 0.5193234086036682, -0.23273466527462006, 0.4675736427307129, 0.23514413833618164, -0.4168550372123718, -0.779457688331604, -0.026194773614406586, -1.12711501121521, -0.45923134684562683, 1.0896203517913818, -0.48053425550460815, -0.3276587426662445, 0.26481297612190247, -0.47846201062202454, 0.41711631417274475, -0.33192598819732666, 0.6427034139633179, 0.838527262210846, 0.16211345791816711, -0.4191012680530548, -0.4875560700893402, 0.07133788615465164, 0.252066969871521, -0.5463950634002686, -0.35903775691986084, 0.3727884888648987, 0.36423105001449585, 0.4082626402378082, 0.5045557022094727, -0.1989760398864746, 0.20095151662826538, -0.07160785794258118, 0.498725950717926, -0.029612602666020393, -0.021981095895171165, -0.3956989049911499, -0.011148614808917046, -0.2932894229888916, -0.5525389909744263 ]
facebook/wav2vec2-large-robust-ft-libri-960h
facebook
"2023-06-23T16:47:23Z"
435,936
8
transformers
[ "transformers", "pytorch", "safetensors", "wav2vec2", "automatic-speech-recognition", "speech", "audio", "en", "dataset:libri_light", "dataset:common_voice", "dataset:switchboard", "dataset:fisher", "dataset:librispeech_asr", "arxiv:2104.01027", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-03-02T23:29:05Z"
--- language: en datasets: - libri_light - common_voice - switchboard - fisher - librispeech_asr tags: - speech - audio - automatic-speech-recognition widget: - example_title: Librispeech sample 1 src: https://cdn-media.huggingface.co/speech_samples/sample1.flac - example_title: Librispeech sample 2 src: https://cdn-media.huggingface.co/speech_samples/sample2.flac license: apache-2.0 --- # Wav2Vec2-Large-Robust finetuned on Librispeech [Facebook's Wav2Vec2](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/). This model is a fine-tuned version of the [wav2vec2-large-robust](https://huggingface.co/facebook/wav2vec2-large-robust) model. It has been pretrained on: - [Libri-Light](https://github.com/facebookresearch/libri-light): open-source audio books from the LibriVox project; clean, read-out audio data - [CommonVoice](https://huggingface.co/datasets/common_voice): crowd-source collected audio data; read-out text snippets - [Switchboard](https://catalog.ldc.upenn.edu/LDC97S62): telephone speech corpus; noisy telephone data - [Fisher](https://catalog.ldc.upenn.edu/LDC2004T19): conversational telephone speech; noisy telephone data and subsequently been finetuned on 960 hours of - [Librispeech](https://huggingface.co/datasets/librispeech_asr): open-source read-out audio data. When using the model make sure that your speech input is also sampled at 16Khz. [Paper Robust Wav2Vec2](https://arxiv.org/abs/2104.01027) Authors: Wei-Ning Hsu, Anuroop Sriram, Alexei Baevski, Tatiana Likhomanenko, Qiantong Xu, Vineel Pratap, Jacob Kahn, Ann Lee, Ronan Collobert, Gabriel Synnaeve, Michael Auli **Abstract** Self-supervised learning of speech representations has been a very active research area but most work is focused on a single domain such as read audio books for which there exist large quantities of labeled and unlabeled data. In this paper, we explore more general setups where the domain of the unlabeled data for pre-training data differs from the domain of the labeled data for fine-tuning, which in turn may differ from the test data domain. Our experiments show that using target domain data during pre-training leads to large performance improvements across a variety of setups. On a large-scale competitive setup, we show that pre-training on unlabeled in-domain data reduces the gap between models trained on in-domain and out-of-domain labeled data by 66%-73%. This has obvious practical implications since it is much easier to obtain unlabeled target domain data than labeled data. Moreover, we find that pre-training on multiple domains improves generalization performance on domains not seen during training. Code and models will be made available at this https URL. The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20. # Usage To transcribe audio files the model can be used as a standalone acoustic model as follows: ```python from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC from datasets import load_dataset import soundfile as sf import torch # load model and processor processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-large-robust-ft-libri-960h") model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-large-robust-ft-libri-960h") # define function to read in sound file def map_to_array(batch): speech, _ = sf.read(batch["file"]) batch["speech"] = speech return batch # load dummy dataset and read soundfiles ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") ds = ds.map(map_to_array) # tokenize input_values = processor(ds["speech"][:2], return_tensors="pt", padding="longest").input_values # Batch size 1 # retrieve logits logits = model(input_values).logits # take argmax and decode predicted_ids = torch.argmax(logits, dim=-1) transcription = processor.batch_decode(predicted_ids) ```
[ -0.29349395632743835, -0.6781987547874451, 0.05417245253920555, 0.08627927303314209, -0.20016595721244812, -0.16310514509677887, -0.4933719336986542, -0.5914342999458313, -0.14162276685237885, 0.32813704013824463, -0.5772415399551392, -0.570402979850769, -0.5981539487838745, -0.3562857210636139, -0.34137994050979614, 0.9266818761825562, 0.2954285740852356, 0.20316967368125916, 0.023290464654564857, -0.3023959696292877, -0.4983891546726227, -0.5403348803520203, -0.7382586598396301, -0.47197648882865906, 0.18761032819747925, 0.2508567273616791, 0.3974141776561737, 0.43066373467445374, 0.20327934622764587, 0.2896127700805664, -0.10137447714805603, 0.075033999979496, -0.6393172740936279, 0.059765636920928955, -0.1218656376004219, -0.33078235387802124, -0.45444396138191223, 0.2631154954433441, 0.6450250744819641, 0.544283390045166, -0.29431962966918945, 0.44261276721954346, 0.31552639603614807, 0.3099416196346283, -0.39991244673728943, 0.3776952028274536, -0.6490948796272278, -0.287765234708786, -0.2880989611148834, -0.12169352918863297, -0.43339967727661133, 0.004925124812871218, 0.15025633573532104, -0.5925138592720032, 0.21015508472919464, -0.1900399774312973, 0.9579746127128601, 0.32155466079711914, -0.29695382714271545, -0.32210811972618103, -0.9097566604614258, 0.9705045819282532, -0.6566596031188965, 0.7435866594314575, 0.6827702522277832, 0.07054855674505234, -0.0689476802945137, -0.9768671989440918, -0.38719844818115234, 0.03461126983165741, 0.3184032142162323, 0.37854406237602234, -0.43978437781333923, 0.1246628686785698, 0.23659981787204742, 0.1368398815393448, -0.6140434145927429, 0.27121981978416443, -0.5582318305969238, -0.4925588369369507, 0.661183774471283, -0.3365154564380646, -0.05701463297009468, 0.1092800498008728, -0.20409242808818817, -0.49263155460357666, -0.3991144597530365, 0.37070542573928833, 0.4154606759548187, 0.3802267909049988, -0.3079959452152252, 0.3256687819957733, -0.012174829840660095, 0.6616774797439575, 0.11112123727798462, -0.3703729808330536, 0.6404386758804321, -0.31266650557518005, -0.05958588421344757, 0.20025449991226196, 0.7155976295471191, 0.10072046518325806, 0.4471977651119232, 0.10455372184515, -0.1959296464920044, 0.038170602172613144, -0.12254540622234344, -0.7865811586380005, -0.5690165758132935, 0.36876389384269714, -0.4216342568397522, -0.01287461444735527, 0.00017176094115711749, -0.39494451880455017, -0.025429783388972282, -0.6165189146995544, 0.8491469025611877, -0.424094557762146, -0.29372623562812805, 0.15156786143779755, -0.029125848785042763, 0.23127272725105286, 0.08651567995548248, -0.8800452351570129, 0.27950799465179443, 0.3993016481399536, 0.7419794201850891, -0.011583351530134678, -0.1327788531780243, -0.6989638209342957, -0.028288405388593674, -0.18955150246620178, 0.5912078619003296, -0.21900877356529236, -0.44757509231567383, -0.1567125916481018, -0.032871514558792114, 0.01161535456776619, -0.7322242259979248, 0.6829239726066589, -0.30073273181915283, 0.17867372930049896, 0.04127596318721771, -0.5471775531768799, -0.12374241650104523, -0.3923022150993347, -0.5244876146316528, 1.0397001504898071, -0.009078585542738438, -0.6321358680725098, 0.2950981855392456, -0.3821854293346405, -0.5845903158187866, -0.32431066036224365, -0.09144507348537445, -0.6161907315254211, -0.1067853644490242, 0.23950116336345673, 0.4853060841560364, -0.08250250667333603, 0.1697155237197876, -0.24413491785526276, -0.41145771741867065, 0.2626160979270935, -0.5451890826225281, 0.92136150598526, 0.395799845457077, -0.4214164912700653, 0.10368979722261429, -0.9467775821685791, 0.2211238294839859, -0.01672021858394146, -0.5022455453872681, -0.04740140214562416, -0.0008291638805530965, 0.3189733028411865, 0.05225934088230133, 0.11514975875616074, -0.4514201581478119, -0.13824661076068878, -0.5460847020149231, 0.5231072902679443, 0.5896322727203369, -0.11927129328250885, 0.3566122055053711, -0.29814964532852173, 0.10247223824262619, -0.1174715906381607, 0.004822302609682083, 0.10656551271677017, -0.42602068185806274, -0.5397899746894836, -0.46792465448379517, 0.6119110584259033, 0.5367124080657959, -0.28532275557518005, 0.6034765243530273, -0.022653594613075256, -0.5904053449630737, -0.8362137675285339, 0.050443630665540695, 0.29944083094596863, 0.5067064166069031, 0.6753140091896057, -0.23492515087127686, -0.6466354131698608, -0.584072470664978, -0.14947699010372162, -0.05178559571504593, -0.23697078227996826, 0.38699930906295776, 0.17791685461997986, -0.5065688490867615, 0.7363805770874023, -0.2707032561302185, -0.5209366083145142, -0.1013714149594307, 0.1718059480190277, 0.3488955497741699, 0.7172407507896423, 0.31997552514076233, -0.6967071294784546, -0.22389723360538483, -0.33658701181411743, -0.34649601578712463, -0.19473403692245483, -0.04256754741072655, 0.009593866765499115, 0.07556897401809692, 0.5001574754714966, -0.38860219717025757, 0.30231207609176636, 0.5773011445999146, -0.0655137225985527, 0.4237625300884247, -0.1311585009098053, -0.06128240004181862, -1.0070592164993286, 0.000507353397551924, -0.04267028346657753, -0.28922516107559204, -0.523470401763916, -0.4910825490951538, -0.16227862238883972, -0.03174002096056938, -0.3560321629047394, 0.36553382873535156, -0.4757286310195923, -0.1361423283815384, -0.1930633783340454, 0.2473854124546051, -0.084896020591259, 0.4404713213443756, 0.11286167055368423, 0.7797684669494629, 0.7573075294494629, -0.6578913331031799, 0.4021669030189514, 0.3606521785259247, -0.43526819348335266, 0.12926243245601654, -0.805248498916626, 0.3806205689907074, 0.14680269360542297, 0.27606186270713806, -1.0380964279174805, -0.15698549151420593, 0.0175054632127285, -0.8303925395011902, 0.5549153685569763, -0.21143078804016113, -0.37698298692703247, -0.25479763746261597, 0.0026219820138067007, 0.5203839540481567, 0.7695791721343994, -0.7158893346786499, 0.42696523666381836, 0.6331051588058472, -0.03682773560285568, -0.4821218252182007, -0.8094071745872498, -0.4411151111125946, -0.17521460354328156, -0.6465179920196533, 0.26619234681129456, -0.03915761038661003, -0.06910040229558945, -0.23907151818275452, -0.3185582756996155, -0.09875325858592987, -0.12832944095134735, 0.41376158595085144, 0.15356574952602386, -0.1822696030139923, 0.32784193754196167, -0.18936975300312042, -0.08872584998607635, 0.037551265209913254, -0.6298366785049438, 0.6103249788284302, -0.12298960238695145, -0.12356266379356384, -0.7494199872016907, 0.11898420006036758, 0.19378182291984558, -0.4271884560585022, 0.3395329713821411, 1.040976881980896, -0.37061697244644165, -0.316500186920166, -0.5023578405380249, -0.28074073791503906, -0.5146049857139587, 0.5904704332351685, -0.27638041973114014, -0.8460195660591125, 0.32330167293548584, -0.18691931664943695, 0.015310046263039112, 0.5625670552253723, 0.636106014251709, -0.3184954524040222, 0.817814290523529, 0.4261306822299957, -0.12104881554841995, 0.5934696793556213, -0.6036515831947327, 0.04004991799592972, -0.628132700920105, -0.34662777185440063, -0.578961968421936, -0.21585184335708618, -0.5130309462547302, -0.5492985844612122, 0.17503568530082703, 0.17966023087501526, -0.1497328281402588, 0.35576996207237244, -0.6233378648757935, 0.22880326211452484, 0.6797299385070801, 0.11081712692975998, 0.02867339551448822, 0.23025253415107727, 0.022055260837078094, -0.07023628801107407, -0.6405670046806335, -0.2890990376472473, 1.2487612962722778, 0.4805915057659149, 0.9022323489189148, -0.057548776268959045, 0.7178576588630676, 0.19548223912715912, -0.31215783953666687, -0.9195380210876465, 0.21176260709762573, -0.2034563273191452, -0.6043738722801208, -0.4741024971008301, -0.3705848753452301, -1.161752700805664, 0.18733032047748566, -0.3873906433582306, -0.8143432140350342, 0.3238113522529602, 0.15857648849487305, -0.44483593106269836, 0.11006708443164825, -0.7921710014343262, 0.6923394203186035, -0.1065901517868042, -0.30243760347366333, -0.32908356189727783, -0.613107442855835, 0.03671642020344734, -0.186295285820961, 0.2575435936450958, -0.06416820734739304, 0.4572182297706604, 1.278385043144226, -0.22996681928634644, 0.652738094329834, -0.3159542679786682, -0.07790036499500275, 0.7131121754646301, -0.2210076004266739, 0.4787062406539917, 0.08926171809434891, -0.10167351365089417, 0.38283056020736694, 0.27207598090171814, -0.35311463475227356, -0.3043012022972107, 0.567000687122345, -1.1421397924423218, -0.26837441325187683, -0.1417814940214157, -0.3743368983268738, -0.4601536691188812, 0.16405974328517914, 0.730482816696167, 0.9119325280189514, -0.1425928920507431, 0.5115557909011841, 0.8355592489242554, -0.030172180384397507, 0.31345993280410767, 0.34615224599838257, 0.11402341723442078, -0.36661338806152344, 0.8730855584144592, 0.3583947420120239, 0.23096096515655518, 0.11983626335859299, 0.12487244606018066, -0.6529771089553833, -0.6849479079246521, 0.06487780064344406, 0.1983652263879776, -0.5936711430549622, -0.1440816968679428, -0.6347807049751282, -0.3361434042453766, -0.7251812219619751, 0.19135035574436188, -0.695793867111206, -0.3783862590789795, -0.6539269089698792, -0.06656899303197861, 0.3511861562728882, 0.5760195255279541, -0.5089291930198669, 0.4692203402519226, -0.5267927646636963, 0.4382328689098358, 0.3416748046875, 0.1505906581878662, -0.17211154103279114, -1.0145121812820435, -0.3885543644428253, 0.33361464738845825, -0.16678570210933685, -0.5482732057571411, 0.28212735056877136, 0.37056586146354675, 0.5483062863349915, 0.4706573188304901, 0.08968351781368256, 0.6386568546295166, -0.3110719919204712, 0.6126866936683655, 0.1883445680141449, -0.9478885531425476, 0.6462173461914062, -0.3629768192768097, 0.2352171242237091, 0.5661495923995972, 0.2725401520729065, -0.2112209051847458, -0.09956690669059753, -0.7366394996643066, -0.8897466659545898, 0.7939714193344116, 0.32367926836013794, 0.07078302651643753, 0.39687976241111755, 0.24679270386695862, -0.044244345277547836, 0.03963650017976761, -0.630574643611908, -0.37006059288978577, -0.3836655020713806, -0.1758851855993271, -0.39938217401504517, -0.2544352412223816, -0.14884619414806366, -0.5318870544433594, 0.7829163670539856, 0.12732267379760742, 0.4033704996109009, 0.29590699076652527, -0.10625271499156952, 0.03505747392773628, 0.13179226219654083, 0.4492935240268707, 0.3350248634815216, -0.35132279992103577, 0.17498725652694702, 0.19937966763973236, -0.6856440305709839, 0.13064637780189514, 0.26445990800857544, 0.27432486414909363, 0.025326518341898918, 0.6157106757164001, 1.0124778747558594, 0.03383255377411842, -0.4507891833782196, 0.5467944741249084, 0.024364110082387924, -0.4591458737850189, -0.5045056939125061, 0.16218701004981995, 0.14003506302833557, 0.4320828318595886, 0.27119505405426025, 0.20626702904701233, 0.14780274033546448, -0.468688040971756, 0.4762626588344574, 0.22517114877700806, -0.45414742827415466, -0.31763118505477905, 0.8927083015441895, 0.23056253790855408, -0.21772249042987823, 0.6379750370979309, -0.009050067514181137, -0.13862106204032898, 0.4481395483016968, 0.5843145847320557, 0.6855624318122864, -0.3347119688987732, -0.14908254146575928, 0.4842887222766876, 0.11509796977043152, -0.15916521847248077, 0.24775069952011108, -0.22278033196926117, -0.7485650777816772, -0.39226001501083374, -0.5818721652030945, -0.13359981775283813, 0.39769503474235535, -0.7325630187988281, 0.2828533947467804, -0.41224217414855957, -0.4963665306568146, 0.11596260219812393, 0.20263271033763885, -0.7727777361869812, 0.333114892244339, 0.25353407859802246, 0.6347203850746155, -0.7399436235427856, 1.213476538658142, 0.3175755441188812, -0.20945198833942413, -1.291169285774231, 0.03657802566885948, -0.023298369720578194, -0.6851382851600647, 0.4332525134086609, 0.10286228358745575, -0.36260804533958435, 0.26705309748649597, -0.6477453708648682, -1.0070061683654785, 1.0057979822158813, 0.32256096601486206, -0.8088608384132385, 0.17291629314422607, -0.07834438234567642, 0.4564657509326935, -0.19803765416145325, 0.02683178149163723, 0.6308858394622803, 0.41559964418411255, 0.12815377116203308, -1.0592199563980103, -0.24940964579582214, -0.09498680382966995, -0.39710813760757446, -0.2662367522716522, -0.6686201095581055, 0.8525426983833313, -0.27166277170181274, -0.2210932821035385, -0.03968304768204689, 0.8311945796012878, 0.20908376574516296, 0.3111671805381775, 0.5322386622428894, 0.44634804129600525, 1.1582003831863403, -0.16535815596580505, 0.6685550212860107, 0.022216130048036575, 0.4700985848903656, 1.2294787168502808, 0.07091553509235382, 0.8884392380714417, 0.1297689527273178, -0.27254539728164673, 0.18233539164066315, 0.6620987057685852, -0.21535344421863556, 0.7532303333282471, 0.220469132065773, -0.15722647309303284, -0.3685951828956604, 0.057575326412916183, -0.6528641581535339, 0.9179384112358093, 0.2799505293369293, -0.008732221089303493, 0.15997642278671265, 0.17191895842552185, -0.07769317179918289, -0.1029416099190712, -0.17348209023475647, 0.6763436794281006, 0.25277698040008545, -0.23837430775165558, 0.9848889708518982, -0.020283641293644905, 0.8283864855766296, -0.6342857480049133, 0.17273592948913574, 0.16281795501708984, 0.35132649540901184, -0.2836783528327942, -0.5743744969367981, 0.12148436903953552, -0.1785457730293274, -0.24625861644744873, -0.1080777645111084, 0.6886967420578003, -0.6681120991706848, -0.24355430901050568, 0.5785590410232544, 0.2738608717918396, 0.3167712688446045, -0.13189853727817535, -0.6758480072021484, 0.21916690468788147, 0.2286897450685501, -0.3339242935180664, 0.14642104506492615, 0.29885175824165344, 0.15038472414016724, 0.3954613506793976, 0.7353284358978271, 0.16573147475719452, 0.049339327961206436, 0.19627292454242706, 0.6767006516456604, -0.40100938081741333, -0.49850958585739136, -0.4068068563938141, 0.3598852753639221, 0.12041318416595459, -0.31438976526260376, 0.5753484964370728, 0.6412557363510132, 1.0795031785964966, 0.011879387311637402, 0.6435885429382324, 0.2241813838481903, 0.7449483871459961, -0.5932853817939758, 0.891596794128418, -0.5398747324943542, 0.08689545840024948, -0.25634127855300903, -0.8110587000846863, -0.1296169012784958, 0.7971519827842712, -0.11455570161342621, 0.2353026121854782, 0.29587647318840027, 0.8547243475914001, -0.1114547848701477, -0.10024045407772064, 0.3894943296909332, 0.3618907630443573, 0.20413769781589508, 0.3921639025211334, 0.6591249704360962, -0.5776736736297607, 0.7022711038589478, -0.12445798516273499, -0.2675110697746277, -0.10613197833299637, -0.26169082522392273, -0.933721661567688, -0.8024778366088867, -0.44717827439308167, -0.5594415664672852, 0.06358260661363602, 0.9428448677062988, 1.0385262966156006, -0.9610483050346375, -0.34211814403533936, 0.24957798421382904, -0.19211345911026, -0.2113252580165863, -0.18513207137584686, 0.5359216332435608, -0.12340760231018066, -0.7453797459602356, 0.7094126343727112, -0.2285429835319519, 0.2516268193721771, 0.21203356981277466, -0.19166502356529236, -0.1714235097169876, 0.1595218926668167, 0.44507187604904175, 0.3819546401500702, -0.5376020669937134, -0.25386932492256165, -0.2586176097393036, 0.007733038626611233, 0.14514382183551788, 0.48121118545532227, -0.7642782330513, 0.5007795095443726, 0.2766963243484497, 0.3537077009677887, 0.9054716229438782, -0.00665156077593565, 0.23819279670715332, -0.737876296043396, 0.48219478130340576, 0.24236276745796204, 0.27257204055786133, 0.23220352828502655, -0.20465993881225586, 0.3138964772224426, 0.3238883316516876, -0.7001655101776123, -0.7679970860481262, -0.06761757284402847, -1.2818453311920166, -0.2769787907600403, 1.3990505933761597, 0.08657139539718628, -0.0009459205903112888, -0.1177109107375145, -0.29915547370910645, 0.727888286113739, -0.5198628902435303, 0.33152079582214355, 0.4841691553592682, -0.08960753679275513, 0.09408833831548691, -0.5888559818267822, 0.7283976674079895, 0.3378725051879883, -0.337356299161911, 0.05041119083762169, 0.4327276051044464, 0.5435539484024048, -0.029970040544867516, 0.7991681098937988, -0.10245462507009506, 0.10648084431886673, 0.14754508435726166, 0.1740633249282837, -0.190413236618042, -0.34794583916664124, -0.4877106249332428, 0.03450809791684151, -0.015977727249264717, -0.5139837861061096 ]
NbAiLab/nb-bert-base-mnli
NbAiLab
"2023-03-24T11:32:00Z"
435,368
6
transformers
[ "transformers", "pytorch", "jax", "safetensors", "bert", "text-classification", "nb-bert", "zero-shot-classification", "tensorflow", "norwegian", "no", "dataset:mnli", "dataset:multi_nli", "dataset:xnli", "arxiv:1909.00161", "license:cc-by-4.0", "endpoints_compatible", "has_space", "region:us" ]
zero-shot-classification
"2022-03-02T23:29:04Z"
--- language: no license: cc-by-4.0 thumbnail: https://raw.githubusercontent.com/NBAiLab/notram/master/images/nblogo_2.png pipeline_tag: zero-shot-classification tags: - nb-bert - zero-shot-classification - pytorch - tensorflow - norwegian - bert datasets: - mnli - multi_nli - xnli widget: - example_title: Nyhetsartikkel om FHI text: Folkehelseinstituttets mest optimistiske anslag er at alle voksne er ferdigvaksinert innen midten av september. candidate_labels: helse, politikk, sport, religion --- **Release 1.0** (March 11, 2021) # NB-Bert base model finetuned on Norwegian machine translated MNLI ## Description The most effective way of creating a good classifier is to finetune a pre-trained model for the specific task at hand. However, in many cases this is simply impossible. [Yin et al.](https://arxiv.org/abs/1909.00161) proposed a very clever way of using pre-trained MNLI models as zero-shot sequence classifiers. The methods works by reformulating the question to an MNLI hypothesis. If we want to figure out if a text is about "sport", we simply state that "This text is about sport" ("Denne teksten handler om sport"). When the model is finetuned on the 400k large MNLI task, it is in many cases able to solve this classification tasks. There are no MNLI-set of this size in Norwegian but we have trained it on a machine translated version of the original MNLI-set. ## Testing the model For testing the model, we recommend the [NbAiLab Colab Notebook](https://colab.research.google.com/gist/peregilk/769b5150a2f807219ab8f15dd11ea449/nbailab-mnli-norwegian-demo.ipynb) ## Hugging Face zero-shot-classification pipeline The easiest way to try this out is by using the Hugging Face pipeline. Please, note that you will get better results when using Norwegian hypothesis template instead of the default English one. ```python from transformers import pipeline classifier = pipeline("zero-shot-classification", model="NbAiLab/nb-bert-base-mnli") ``` You can then use this pipeline to classify sequences into any of the class names you specify. ```python sequence_to_classify = 'Folkehelseinstituttets mest optimistiske anslag er at alle voksne er ferdigvaksinert innen midten av september.' candidate_labels = ['politikk', 'helse', 'sport', 'religion'] hypothesis_template = 'Dette eksempelet er {}.' classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template, multi_class=True) # {'labels': ['helse', 'politikk', 'sport', 'religion'], # 'scores': [0.4210019111633301, 0.0674605593085289, 0.000840459018945694, 0.0007541406666859984], # 'sequence': 'Folkehelseinstituttets mest optimistiske anslag er at alle over 18 år er ferdigvaksinert innen midten av september.'} ``` ## More information For more information on the model, see https://github.com/NBAiLab/notram Here you will also find a Colab explaining more in details how to use the zero-shot-classification pipeline.
[ -0.5700890421867371, -0.5436766743659973, 0.012106327340006828, 0.1570718139410019, -0.41940340399742126, -0.2377217411994934, 0.008281867951154709, -0.4434368908405304, 0.40698888897895813, 0.2448289543390274, -0.574435293674469, -0.6058883666992188, -0.5683331489562988, 0.13867923617362976, -0.3483053743839264, 1.2781965732574463, 0.05120987445116043, 0.10947282612323761, 0.08156323432922363, -0.2136746197938919, -0.34318557381629944, -0.627191960811615, -0.5307777523994446, -0.35433804988861084, 0.6757852435112, 0.31687647104263306, 0.26862069964408875, 0.40292882919311523, 0.4981434643268585, 0.23472726345062256, -0.21425992250442505, -0.20225125551223755, -0.5042277574539185, 0.1444726586341858, 0.1841660439968109, -0.6595340967178345, -0.56598299741745, 0.10476149618625641, 0.6854844689369202, 0.3716292083263397, 0.1500013768672943, 0.4545736610889435, -0.14150956273078918, 0.4737880229949951, -0.6430295705795288, 0.057230737060308456, -0.39409875869750977, 0.23431602120399475, -0.23297668993473053, -0.08052194118499756, -0.4922691285610199, -0.2515859305858612, 0.281982421875, -0.34851500391960144, 0.3550955355167389, -0.16807346045970917, 1.1740241050720215, 0.18716219067573547, -0.26832911372184753, -0.000645484949927777, -0.3797838091850281, 0.955595850944519, -0.879011332988739, 0.4170142412185669, 0.2694724202156067, 0.2929120361804962, -0.059647515416145325, -0.3657936751842499, -0.591686487197876, -0.06596215069293976, 0.13238701224327087, 0.14689621329307556, 0.16573753952980042, -0.1171887144446373, 0.3658459186553955, 0.40184345841407776, -0.8580088019371033, 0.03452150523662567, -0.5815481543540955, -0.16312077641487122, 0.9012804627418518, 0.017677148804068565, 0.10789808630943298, -0.41508758068084717, -0.401368111371994, -0.33097508549690247, -0.5467958450317383, 0.13047491014003754, 0.29234689474105835, 0.4298646152019501, -0.3212047517299652, 0.5606557726860046, -0.16313789784908295, 0.6633610129356384, 0.23213815689086914, -0.26142793893814087, 0.6046170592308044, 0.008660036139190197, -0.44824665784835815, 0.44932079315185547, 0.7192489504814148, 0.3414406478404999, 0.14586736261844635, -0.03872019797563553, -0.032547447830438614, 0.05145036056637764, -0.05268549546599388, -1.0430395603179932, -0.2383679896593094, 0.3934391140937805, -0.45284122228622437, -0.6435086131095886, -0.009978164918720722, -0.6216883063316345, 0.03361363708972931, -0.19842559099197388, 0.7939234972000122, -0.6075075268745422, -0.27156007289886475, 0.07586100697517395, -0.27246910333633423, 0.5780507922172546, 0.15096072852611542, -0.8116835355758667, -0.14945381879806519, 0.4125681519508362, 0.7556746602058411, 0.18517839908599854, -0.20893800258636475, -0.2813609838485718, -0.28983449935913086, -0.30371612310409546, 0.6847339868545532, -0.1783345341682434, -0.11669421195983887, -0.1073257327079773, 0.0013254230143502355, -0.05338875576853752, -0.3034370243549347, 0.5335026383399963, -0.31461453437805176, 0.5740525126457214, -0.04849258437752724, -0.8729423880577087, -0.32243815064430237, 0.4499329626560211, -0.32207658886909485, 0.8553696870803833, 0.058226339519023895, -0.9655689001083374, 0.3640177845954895, -0.7424193024635315, -0.33479973673820496, -0.03993327543139458, 0.1264306753873825, -0.555673360824585, 0.06713975965976715, -0.0682750940322876, 0.5986064672470093, 0.0019017718732357025, 0.2760442793369293, -0.5362197160720825, -0.37491175532341003, 0.09326262027025223, -0.2074134349822998, 1.2174626588821411, 0.3737035095691681, -0.28713884949684143, 0.08701115101575851, -0.7341428399085999, 0.25439631938934326, 0.09746582061052322, -0.357772558927536, -0.0753321573138237, -0.2135356366634369, 0.21520569920539856, 0.20326146483421326, 0.15633352100849152, -0.7150421738624573, 0.3970610797405243, -0.45556768774986267, 0.33526375889778137, 0.6519117951393127, -0.24199332296848297, 0.4305306673049927, -0.3952442407608032, 0.45747020840644836, -0.08430897444486618, 0.27857911586761475, -0.30462440848350525, -0.6402535438537598, -0.7167820930480957, -0.4429335296154022, 0.6427111625671387, 0.8157970905303955, -0.7646702527999878, 0.6173895597457886, -0.016908034682273865, -0.8676832318305969, -0.5235488414764404, -0.15406093001365662, 0.354808509349823, 0.572239100933075, 0.27090880274772644, -0.270621120929718, -0.890168309211731, -0.681194007396698, -0.026991287246346474, -0.1546647995710373, 0.08179307729005814, 0.1579318642616272, 0.49043312668800354, 0.021677754819393158, 0.7401527166366577, -0.39426952600479126, -0.2785583734512329, -0.12203404307365417, 0.3176068663597107, 0.7506099343299866, 0.6230376958847046, 0.892609715461731, -0.918222188949585, -0.6881611943244934, -0.20094098150730133, -0.9418304562568665, -0.0013860774924978614, 0.11864619702100754, -0.1569894403219223, 0.4710771143436432, 0.016304826363921165, -0.4731246531009674, 0.4972466826438904, 0.3735663592815399, -0.440439909696579, 0.6093840599060059, 0.10829345136880875, -0.03521757200360298, -1.0991462469100952, 0.19705601036548615, -0.03534455969929695, -0.1109061911702156, -0.9771924018859863, 0.2365037053823471, -0.026017101481556892, 0.09895481169223785, -0.8685150742530823, 0.7350698709487915, -0.0922582745552063, 0.25059187412261963, -0.16464142501354218, -0.34145796298980713, -0.25019437074661255, 0.45406773686408997, 0.2382405400276184, 0.2063959240913391, 0.8301979303359985, -0.8501033782958984, 0.28763461112976074, 0.4391200840473175, -0.41060957312583923, 0.4616490304470062, -0.5341871380805969, -0.03820866346359253, -0.44907253980636597, 0.09021970629692078, -0.9652611613273621, -0.3861576020717621, 0.4491056501865387, -0.825925886631012, 0.6606461405754089, -0.09651633352041245, -0.3279140889644623, -0.5003466606140137, -0.43999019265174866, 0.4658421277999878, 0.7631526589393616, -0.4325355589389801, 0.3057001531124115, 0.2445804625749588, 0.015891674906015396, -0.7796774506568909, -0.7488861680030823, -0.24878481030464172, -0.31458336114883423, -0.5671901702880859, 0.15583769977092743, -0.22318853437900543, 0.17366395890712738, -0.12219470739364624, -0.24140946567058563, -0.39715754985809326, 0.07771414518356323, 0.04403826966881752, 0.6284411549568176, -0.44203880429267883, 0.06921891123056412, -0.19745202362537384, -0.11148732900619507, -0.2024862915277481, -0.24976539611816406, 0.5636659860610962, -0.05395766720175743, 0.0866309106349945, -0.40129244327545166, 0.10995806753635406, 0.4840468764305115, -0.04431832954287529, 0.6656053066253662, 0.7833985090255737, -0.34176090359687805, 0.0701436772942543, -0.4528079032897949, -0.21595565974712372, -0.4247417151927948, 0.20607727766036987, -0.3425785005092621, -0.8999302387237549, 0.470818430185318, 0.3469686806201935, 0.27790531516075134, 0.7195448279380798, 0.39264118671417236, -0.29703983664512634, 1.0076572895050049, 0.5542656779289246, -0.040527213364839554, 0.4667906165122986, -0.6037658452987671, 0.1598678082227707, -0.7201058864593506, -0.2455882877111435, -0.35442671179771423, -0.5383260846138, -0.7453827261924744, -0.2816256880760193, 0.2811712920665741, 0.2466265857219696, -0.49575671553611755, 0.5754876136779785, -0.6283493638038635, 0.5141159892082214, 0.6218904852867126, 0.14640332758426666, -0.1819857805967331, -0.06605444103479385, -0.0078347222879529, -0.054759394377470016, -0.8616914749145508, -0.245598703622818, 1.289927363395691, 0.2956382632255554, 0.624153196811676, 0.17788979411125183, 1.093942403793335, -0.0338580496609211, 0.5175186395645142, -0.8730918765068054, 0.44072604179382324, -0.5233712792396545, -1.201546549797058, -0.32247015833854675, -0.25089189410209656, -0.732839047908783, 0.1383812427520752, -0.4082093834877014, -0.6371878385543823, 0.26182082295417786, 0.24071890115737915, -0.40354618430137634, 0.40773817896842957, -0.5071324110031128, 0.9693599939346313, -0.23802609741687775, -0.33775004744529724, 0.35883253812789917, -0.7792972922325134, 0.597371518611908, -0.1925354152917862, -0.0423726886510849, -0.3450619578361511, 0.4163435101509094, 0.6175110340118408, -0.24295154213905334, 0.9098857045173645, -0.39832571148872375, 0.03917156532406807, 0.3459167182445526, -0.010551727376878262, 0.11144603043794632, -0.2605745792388916, -0.14931762218475342, 0.4894038140773773, 0.2756457030773163, -0.5879058241844177, -0.36732178926467896, 0.5486857891082764, -0.5558604598045349, -0.3611533045768738, -0.6167277693748474, -0.3313537836074829, 0.2252683937549591, 0.296926349401474, 0.785372257232666, 0.39495939016342163, -0.15797176957130432, 0.27145621180534363, 0.7696697115898132, -0.2973940074443817, 0.4082280695438385, 0.5089945793151855, -0.4827291667461395, -0.4010806977748871, 0.8830592632293701, 0.3014179468154907, -0.020343732088804245, 0.4114679992198944, 0.24166136980056763, -0.4674130082130432, -0.3667474389076233, -0.3151262402534485, 0.11807756125926971, -0.37261995673179626, -0.47278743982315063, -0.3639974296092987, -0.426035612821579, -0.6905023455619812, -0.08962669968605042, -0.25864964723587036, -0.6120248436927795, -0.09606069326400757, 0.031025240197777748, 0.39083921909332275, 0.6051713228225708, -0.34149491786956787, 0.2276475578546524, -0.7186367511749268, 0.2753344476222992, 0.053174521774053574, 0.4776982367038727, -0.09090585261583328, -0.6979064345359802, -0.0058232019655406475, -0.004014579579234123, -0.4418255388736725, -0.9993703961372375, 0.5893746018409729, 0.29919537901878357, 0.5533198118209839, 0.6184065341949463, 0.19507920742034912, 0.569057822227478, -0.6016360521316528, 0.7390214204788208, 0.39469361305236816, -0.8773044347763062, 0.7186729311943054, -0.3842295706272125, 0.34547245502471924, 0.3990975618362427, 0.7834241986274719, -0.4766007661819458, -0.2735092043876648, -0.7333778142929077, -0.7914078831672668, 0.80244380235672, 0.27403974533081055, 0.10181422531604767, -0.2978655695915222, 0.36559635400772095, 0.22346113622188568, 0.21623966097831726, -0.6953675746917725, -0.5378524661064148, -0.41411447525024414, -0.17912490665912628, -0.3263034522533417, -0.20330514013767242, 0.2309916913509369, -0.6384343504905701, 0.9449725151062012, -0.03651181608438492, 0.4129892587661743, 0.538887619972229, 0.02756098099052906, -0.06631457060575485, 0.08213900029659271, 0.6445098519325256, 0.22180095314979553, -0.6965097188949585, -0.14292070269584656, 0.22725647687911987, -0.32857465744018555, 0.19294598698616028, 0.011682809330523014, -0.5020939111709595, 0.38992178440093994, 0.3016316890716553, 0.8386852741241455, 0.25983378291130066, -0.43925556540489197, 0.4052857756614685, 0.16577881574630737, -0.5395700931549072, -0.44542768597602844, 0.0512828454375267, -0.2236586958169937, 0.2429957091808319, 0.22911813855171204, 0.021756285801529884, 0.1324022114276886, -0.7014429569244385, 0.4289580285549164, 0.38250190019607544, -0.32383993268013, -0.36999258399009705, 0.7422524094581604, 0.08693787455558777, -0.32090526819229126, 0.558826208114624, -0.44746243953704834, -0.6970331072807312, 0.7394479513168335, 0.5407935380935669, 0.8793578147888184, -0.4964357316493988, 0.37405920028686523, 0.8542557954788208, -0.03887290507555008, -0.09312103688716888, 0.5632492303848267, 0.045056745409965515, -0.7379577159881592, -0.6642774343490601, -0.843257486820221, -0.19862154126167297, 0.3019530177116394, -0.7134903073310852, 0.4107208549976349, -0.6067460775375366, -0.325433611869812, 0.37472087144851685, -0.04000154510140419, -0.7356769442558289, 0.15161819756031036, 0.542203426361084, 1.2208489179611206, -0.9549950957298279, 0.994418740272522, 0.8387764096260071, -0.4213603138923645, -0.6311253309249878, -0.3676778972148895, 0.10184453427791595, -0.5525771975517273, 0.9381306171417236, 0.40507155656814575, 0.4038313329219818, -0.050423238426446915, -0.8713560104370117, -0.8680660128593445, 0.9772861003875732, 0.27101489901542664, -0.5089244842529297, 0.027920380234718323, -0.059395089745521545, 0.5408622622489929, -0.3370820879936218, 0.16435709595680237, 0.241044819355011, 0.5123598575592041, 0.40711912512779236, -1.0990626811981201, -0.21276922523975372, -0.2619265019893646, -0.29339107871055603, 0.49962347745895386, -0.7075761556625366, 0.9834611415863037, -0.23175488412380219, -0.06210869178175926, 0.2975350618362427, 0.4799966514110565, 0.21856291592121124, 0.6110090613365173, 0.33042097091674805, 0.7990785241127014, 0.7452625036239624, -0.17185500264167786, 0.9015567898750305, -0.05745909363031387, 0.7238324880599976, 1.1408655643463135, -0.20461393892765045, 1.0310403108596802, 0.3644796311855316, -0.2448638379573822, 0.4991462230682373, 0.7797865271568298, -0.31887683272361755, 0.7204341292381287, 0.2928276062011719, -0.24688462913036346, -0.32608339190483093, 0.013069192878901958, -0.31766578555107117, 0.5996502041816711, 0.08163134008646011, -0.2924765646457672, -0.2606579065322876, 0.06641782820224762, 0.004783045034855604, -0.39376962184906006, -0.26372984051704407, 0.5962286591529846, -0.06833454966545105, -0.5445051789283752, 0.8881371021270752, -0.19159096479415894, 0.9174863696098328, -0.5524251461029053, -0.08851249516010284, -0.17758677899837494, 0.19205597043037415, -0.19633285701274872, -0.7666061520576477, 0.3232094645500183, 0.11002294719219208, -0.18744169175624847, 0.016699740663170815, 0.7284640669822693, -0.440902441740036, -0.5049494504928589, 0.012260912917554379, 0.24321389198303223, 0.6425896883010864, 0.02754550613462925, -0.7775096893310547, -0.1176227554678917, 0.15178075432777405, -0.1416173130273819, 0.28867191076278687, 0.1391725093126297, 0.10323664546012878, 0.49291086196899414, 0.633534848690033, -0.03455029055476189, 0.3164651691913605, -0.29268157482147217, 0.5437021255493164, -0.7141761779785156, -0.17505767941474915, -0.7665225267410278, 0.6275143027305603, 0.02249954454600811, -0.3908292353153229, 0.645081102848053, 0.6835632920265198, 1.0278416872024536, -0.32394278049468994, 0.5815781354904175, -0.45794686675071716, 0.3999814987182617, -0.2635377049446106, 0.7650878429412842, -0.6696652770042419, -0.3823816180229187, -0.004664262756705284, -0.9194427132606506, -0.5071765184402466, 0.9141499996185303, -0.05099305510520935, -0.25273993611335754, 0.40762650966644287, 0.42779725790023804, -0.05362360551953316, -0.03549005091190338, 0.3247496485710144, 0.4153728187084198, 0.0706697404384613, 0.600753903388977, 0.48014768958091736, -0.7947450280189514, 0.2740976810455322, -0.5676590204238892, -0.1732696294784546, -0.3009369373321533, -1.0008705854415894, -1.1180678606033325, -0.413065642118454, -0.5165484547615051, -0.2960997521877289, 0.1174694374203682, 1.020842432975769, 0.9206495881080627, -1.2055572271347046, -0.10576384514570236, 0.13871662318706512, -0.011649536900222301, -0.09696657955646515, -0.3102273643016815, 0.3297874927520752, -0.3452412486076355, -0.8480997085571289, 0.12455065548419952, -0.05989253148436546, 0.30968642234802246, 0.008924425579607487, -0.19605907797813416, -0.4753541350364685, -0.07285282760858536, 0.7432793974876404, 0.5934590101242065, -0.7814595103263855, -0.3850451111793518, 0.1246410608291626, 0.23755338788032532, 0.1332075446844101, 0.19382618367671967, -0.743373692035675, 0.4617729187011719, 0.776438295841217, 0.36424699425697327, 0.5244529247283936, -0.3319004476070404, 0.30808350443840027, -0.8268658518791199, 0.24892178177833557, 0.2117273062467575, 0.2712872326374054, 0.0901128500699997, -0.14264652132987976, 0.6954220533370972, 0.21420089900493622, -0.48893997073173523, -1.0259852409362793, 0.0510234571993351, -1.0455632209777832, -0.2923433184623718, 0.83310467004776, -0.10244505852460861, -0.41319140791893005, 0.17683710157871246, -0.17794471979141235, 0.4617655277252197, -0.20459309220314026, 0.8621107339859009, 0.9077240824699402, -0.2368595153093338, -0.051885783672332764, -0.6367239356040955, 0.38485243916511536, 0.3830142021179199, -0.3053398132324219, -0.35060545802116394, 0.10822826623916626, 0.5553586483001709, 0.4014163017272949, 0.43086108565330505, -0.04750413820147514, 0.41401609778404236, -0.09749627858400345, 0.37001168727874756, 0.047637712210416794, -0.2298012375831604, -0.47271987795829773, 0.03468024730682373, -0.2577662765979767, -0.38521796464920044 ]
QCRI/bert-base-multilingual-cased-pos-english
QCRI
"2023-01-25T06:00:31Z"
433,911
24
transformers
[ "transformers", "pytorch", "bert", "token-classification", "part-of-speech", "finetuned", "en", "license:cc-by-nc-3.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-04-27T08:15:20Z"
--- language: - en tags: - part-of-speech - finetuned license: cc-by-nc-3.0 --- # BERT-base-multilingual-cased finetuned for Part-of-Speech tagging This is a multilingual BERT model fine tuned for part-of-speech tagging for English. It is trained using the Penn TreeBank (Marcus et al., 1993) and achieves an F1-score of 96.69. ## Usage A *transformers* pipeline can be used to run the model: ```python from transformers import AutoTokenizer, AutoModelForTokenClassification, TokenClassificationPipeline model_name = "QCRI/bert-base-multilingual-cased-pos-english" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForTokenClassification.from_pretrained(model_name) pipeline = TokenClassificationPipeline(model=model, tokenizer=tokenizer) outputs = pipeline("A test example") print(outputs) ``` ## Citation This model was used for all the part-of-speech tagging based results in *Analyzing Encoded Concepts in Transformer Language Models*, published at NAACL'22. If you find this model useful for your own work, please use the following citation: ```bib @inproceedings{sajjad-NAACL, title={Analyzing Encoded Concepts in Transformer Language Models}, author={Hassan Sajjad, Nadir Durrani, Fahim Dalvi, Firoj Alam, Abdul Rafae Khan and Jia Xu}, booktitle={North American Chapter of the Association of Computational Linguistics: Human Language Technologies (NAACL)}, series={NAACL~'22}, year={2022}, address={Seattle} } ```
[ -0.43639782071113586, -0.6810824275016785, -0.07158304750919342, 0.2666897475719452, -0.29918038845062256, 0.13795343041419983, -0.16653774678707123, -0.37586477398872375, 0.2224511206150055, 0.1730959564447403, -0.4579656422138214, -0.5463125705718994, -0.48044344782829285, -0.02528548426926136, -0.4258158802986145, 1.052164912223816, 0.2197495549917221, 0.3699508309364319, 0.07987242192029953, 0.025493523105978966, -0.25430992245674133, -1.2026468515396118, -0.5761677026748657, -0.3874260187149048, 0.36946722865104675, 0.22100213170051575, 0.5623564124107361, 0.508922278881073, 0.4683287739753723, 0.25306570529937744, -0.1622312366962433, -0.1908458024263382, -0.10497196763753891, 0.021832047030329704, -0.15598677098751068, -0.44187530875205994, -0.6081834435462952, 0.023178979754447937, 0.7464131712913513, 0.7941218018531799, -0.12204740196466446, -0.06616763770580292, -0.1961590051651001, 0.277041494846344, -0.20889510214328766, 0.3139623701572418, -0.6627210378646851, -0.10433008521795273, -0.3588433265686035, 0.028639590367674828, -0.5797258019447327, -0.0032919805962592363, 0.19800519943237305, -0.399742990732193, 0.3447582721710205, 0.04633384197950363, 1.184011459350586, 0.15436825156211853, -0.34080544114112854, -0.27602240443229675, -0.5112558603286743, 0.8759028911590576, -0.9082488417625427, 0.551898717880249, 0.3277541697025299, -0.01902526430785656, -0.06323947012424469, -0.7747578024864197, -0.6226392388343811, -0.091499924659729, -0.1691819578409195, -0.019961683079600334, -0.31495100259780884, 0.2561311423778534, 0.2848826050758362, 0.3129512667655945, -0.667189359664917, -0.07060226052999496, -0.3380971848964691, -0.45468607544898987, 0.6565881967544556, -0.22616419196128845, 0.1786821186542511, -0.36647480726242065, -0.4521145224571228, -0.27392110228538513, -0.47611990571022034, 0.10948359966278076, 0.4574069082736969, 0.6781864166259766, 0.03599659726023674, 0.4821595847606659, -0.15215449035167694, 0.5726544857025146, 0.13563621044158936, -0.22664374113082886, 0.6356757879257202, -0.31902503967285156, -0.17263326048851013, 0.1104845255613327, 0.6627752780914307, 0.02856842428445816, 0.39620575308799744, -0.1986871212720871, -0.23340746760368347, 0.07672964781522751, 0.1262855976819992, -0.7321130633354187, -0.47147420048713684, 0.06777670234441757, -0.46981534361839294, 0.018955009058117867, 0.17028947174549103, -0.35380569100379944, 0.02137800306081772, -0.18312671780586243, 0.5327382683753967, -0.843094527721405, -0.37186190485954285, 0.12076491862535477, -0.05619630217552185, 0.6362886428833008, -0.24455244839191437, -0.8124268054962158, 0.15139810740947723, 0.6163201928138733, 0.6689441204071045, 0.10779956728219986, -0.4009321928024292, -0.20135177671909332, -0.20039518177509308, -0.08733431249856949, 0.7480160593986511, -0.537257194519043, -0.41070228815078735, 0.18355044722557068, 0.1785815954208374, -0.15255403518676758, -0.2014622688293457, 0.8830432295799255, -0.6084722876548767, 0.0984281599521637, -0.196550652384758, -0.7947981953620911, -0.2415526956319809, 0.18819399178028107, -0.5343437194824219, 1.0375475883483887, -0.03550134599208832, -0.7018217444419861, 0.3392847180366516, -0.6611773371696472, -0.655772864818573, 0.17500662803649902, -0.019806543365120888, -0.3380589783191681, -0.0865657776594162, 0.200426384806633, 0.3787412643432617, 0.04459867998957634, 0.5476390719413757, -0.017549555748701096, -0.23543229699134827, 0.08089808374643326, -0.33337557315826416, 1.0359681844711304, 0.39095380902290344, -0.18066853284835815, 0.13636356592178345, -0.7950863242149353, 0.14690342545509338, 0.0012470645597204566, -0.45621514320373535, -0.361526757478714, 0.08594522625207901, 0.2504529058933258, 0.07211634516716003, 0.34803760051727295, -0.8354044556617737, 0.25238603353500366, -0.6822117567062378, 0.41356226801872253, 0.4198858141899109, -0.15315459668636322, 0.44406798481941223, -0.3068870007991791, 0.4698864221572876, 0.07558545470237732, 0.12129786610603333, -0.2754293978214264, -0.6264330148696899, -1.13498854637146, -0.34381815791130066, 1.056177020072937, 0.5372799634933472, -0.8653821349143982, 0.7807559967041016, -0.20131611824035645, -0.6013328433036804, -0.7769260406494141, -0.3226763904094696, 0.42594555020332336, 0.2911987602710724, 0.357316255569458, -0.2920774519443512, -0.6014502048492432, -1.088531255722046, -0.07575033605098724, -0.18936240673065186, 0.2254946380853653, -0.08705341070890427, 0.5963881611824036, -0.19467653334140778, 1.0988314151763916, -0.11748833954334259, -0.31020623445510864, -0.21840596199035645, 0.5111235976219177, 0.3774617910385132, 0.7764692306518555, 0.5814422369003296, -0.6734867095947266, -0.6047499179840088, -0.20643015205860138, -0.28792160749435425, -0.08562768250703812, -0.05151932314038277, -0.30016979575157166, 0.4372430443763733, 0.36061176657676697, -0.5819241404533386, 0.34543824195861816, 0.4707246422767639, -0.39631837606430054, 0.37017884850502014, -0.14040610194206238, -0.04538516327738762, -1.177423357963562, 0.1231955885887146, 0.15556959807872772, -0.2663287818431854, -0.761712908744812, 0.28354740142822266, 0.11745724827051163, 0.08593244850635529, -0.5125836730003357, 0.46865782141685486, -0.40279921889305115, 0.11679225414991379, -0.23547041416168213, -0.25224047899246216, -0.08813537657260895, 0.7519295811653137, 0.21168088912963867, 0.6582814455032349, 0.588207483291626, -0.3951081931591034, 0.3317740559577942, 0.31179147958755493, -0.38750019669532776, 0.38534751534461975, -0.6718665957450867, 0.06411111354827881, -0.02198687009513378, 0.23264549672603607, -0.9419330954551697, 0.00961366854608059, 0.20785389840602875, -0.6467746496200562, 0.5915982127189636, -0.19486252963542938, -0.7710443139076233, -0.2039506733417511, -0.10752251744270325, 0.47126296162605286, 0.41781458258628845, -0.5210265517234802, 0.784895658493042, 0.511027455329895, -0.21259097754955292, -0.6476660370826721, -0.7769873142242432, -0.11893710494041443, -0.08039910346269608, -0.6044610142707825, 0.6702074408531189, -0.3341917097568512, 0.08039464056491852, -0.09577136486768723, -0.07795360684394836, -0.38285067677497864, -0.010556898079812527, 0.06288014352321625, 0.10284275561571121, -0.24939841032028198, 0.28387871384620667, 0.10581189393997192, -0.08598765730857849, 0.19588790833950043, -0.06252606213092804, 0.7402477860450745, -0.28065603971481323, -0.2920987606048584, -0.35420897603034973, 0.6267384886741638, 0.348525732755661, -0.3659997582435608, 0.6193694472312927, 0.7675741910934448, -0.5932285785675049, -0.15708979964256287, -0.3573462963104248, -0.15747427940368652, -0.43621450662612915, 0.3689621388912201, -0.7412558197975159, -0.7550355792045593, 0.5786561369895935, 0.20928694307804108, 0.09021280705928802, 0.7102910876274109, 0.6014338731765747, -0.22069047391414642, 1.04741370677948, 0.7813032269477844, -0.29900819063186646, 0.5212807655334473, -0.3876369595527649, 0.37700265645980835, -0.5431144833564758, -0.11935814470052719, -0.6633334159851074, -0.1581619679927826, -0.7762917876243591, -0.22123876214027405, -0.003603273071348667, 0.12766343355178833, -0.29117071628570557, 0.3614538311958313, -0.5671342611312866, 0.3711094856262207, 0.9965389966964722, -0.11528366804122925, 0.14387455582618713, 0.11056024581193924, -0.29696905612945557, 0.007676349487155676, -0.7711077928543091, -0.42522451281547546, 0.8914347290992737, 0.5414441823959351, 0.702464759349823, 0.17359861731529236, 0.6966404318809509, 0.3468695878982544, 0.19423900544643402, -0.9804810285568237, 0.360881507396698, -0.19140474498271942, -1.1228246688842773, -0.07558216154575348, -0.0962768942117691, -0.9050348997116089, 0.20141282677650452, -0.07268687337636948, -0.6508025527000427, 0.34902992844581604, -0.02424948662519455, -0.3274703323841095, 0.1524730920791626, -0.8964054584503174, 0.8543619513511658, -0.21582353115081787, 0.23664391040802002, 0.000786439748480916, -0.7860387563705444, 0.13478048145771027, -0.1489931046962738, 0.1504324972629547, -0.07689450681209564, 0.4118826389312744, 1.006914496421814, -0.32503917813301086, 0.9806860089302063, -0.289739727973938, -0.11812750995159149, 0.24787989258766174, -0.14361301064491272, 0.09250479936599731, -0.07000486552715302, -0.06251460313796997, 0.47995880246162415, 0.3836906850337982, -0.47849395871162415, -0.08784610033035278, 0.6887363791465759, -0.8635173439979553, -0.44121333956718445, -0.9316580295562744, -0.5799909830093384, -0.20877021551132202, 0.2870747745037079, 0.35065144300460815, 0.44744452834129333, -0.1912195086479187, 0.23408770561218262, 0.6545190811157227, -0.17383678257465363, 0.5836676359176636, 0.6409345865249634, -0.058826230466365814, -0.3067447543144226, 0.9772701263427734, 0.10181139409542084, -0.09764441847801208, 0.5176295042037964, -0.012952327728271484, -0.38051900267601013, -0.3117434084415436, -0.2689421772956848, 0.48726269602775574, -0.7786805033683777, -0.3915717601776123, -0.54563969373703, -0.698590874671936, -0.39504894614219666, 0.10144997388124466, -0.3431195318698883, -0.3588181734085083, -0.3995395004749298, 0.0027068722993135452, 0.18357650935649872, 0.5018767714500427, -0.11113390326499939, 0.6026824116706848, -0.5817939043045044, 0.0496697835624218, 0.10176197439432144, 0.3597542643547058, -0.18386587500572205, -0.7724683880805969, -0.35858675837516785, 0.30762988328933716, -0.22873841226100922, -0.888884961605072, 0.4373854398727417, 0.46250686049461365, 0.8131835460662842, 0.12086187303066254, 0.11754955351352692, 0.5227447748184204, -0.5555468201637268, 0.7357228398323059, 0.021619241684675217, -1.2377657890319824, 0.4138043522834778, -0.24499934911727905, 0.33433616161346436, 0.3949066996574402, 0.5755801796913147, -0.4205034077167511, -0.237699955701828, -0.648737907409668, -0.9678162932395935, 0.9330331087112427, 0.12288440763950348, 0.3396163284778595, -0.20829351246356964, 0.23257547616958618, 0.04405222460627556, 0.09659048914909363, -1.0883933305740356, -0.58897465467453, -0.26371118426322937, -0.35986050963401794, 0.14898979663848877, -0.49904075264930725, 0.04916476830840111, -0.5716244578361511, 1.0859026908874512, -0.10353922843933105, 0.6486493945121765, 0.195186048746109, -0.32327908277511597, 0.1498485654592514, 0.30698925256729126, 0.5790985226631165, 0.46915385127067566, -0.42898282408714294, -0.08853991329669952, -0.04969674348831177, -0.31124138832092285, -0.15359178185462952, 0.5838072896003723, -0.01913982816040516, 0.32988864183425903, 0.3208940029144287, 0.664654016494751, 0.055082447826862335, -0.4367457628250122, 0.5792931914329529, -0.1149846613407135, -0.48655763268470764, -0.3829473853111267, -0.30014994740486145, 0.06299405544996262, 0.34723350405693054, 0.5795800089836121, -0.06861253827810287, 0.024572530761361122, -0.4886459708213806, 0.28705134987831116, 0.4744473397731781, -0.2785322070121765, -0.410269558429718, 0.41744765639305115, 0.3260173499584198, -0.3161565959453583, 0.595427930355072, -0.4799586832523346, -0.8075873851776123, 0.40437236428260803, 0.6365215182304382, 0.6866910457611084, -0.3508489727973938, 0.07631587982177734, 0.41945067048072815, 0.5705893635749817, 0.36655211448669434, 0.7127031087875366, 0.0035286610946059227, -0.9778996706008911, -0.5389721989631653, -0.959991991519928, -0.2276601493358612, 0.19277258217334747, -0.6813871264457703, 0.11666179448366165, -0.15874376893043518, -0.3943350613117218, 0.3352648615837097, 0.10240001231431961, -0.6742237210273743, 0.3423972725868225, 0.48541319370269775, 1.0580215454101562, -0.7996947169303894, 1.4300397634506226, 0.9567713141441345, -0.5338026881217957, -0.8358871936798096, 0.014775488525629044, -0.43460044264793396, -0.6150379776954651, 0.746773898601532, -0.01698598638176918, 0.12091706693172455, 0.23742014169692993, -0.32249900698661804, -1.1373136043548584, 0.7241300940513611, 0.1955735832452774, -0.5057098865509033, -0.06270965933799744, 0.1099286675453186, 0.5558509826660156, -0.4362857937812805, 0.26023074984550476, 0.6916491389274597, 0.3602159321308136, -0.021216481924057007, -1.1025054454803467, -0.3513667583465576, -0.45197364687919617, 0.07586459070444107, 0.17231349647045135, -0.5577428340911865, 1.0948107242584229, 0.14464086294174194, -0.2816830575466156, 0.25495362281799316, 0.7774414420127869, 0.027802832424640656, -0.09808710962533951, 0.530177116394043, 0.6192618012428284, 0.618537962436676, -0.3463117778301239, 0.7391344904899597, -0.6906135678291321, 0.6317565441131592, 0.9378843307495117, -0.09321194887161255, 0.982416033744812, 0.47249898314476013, -0.245449960231781, 0.5639110803604126, 0.6511528491973877, -0.07792674750089645, 0.698459267616272, 0.15835757553577423, -0.04355137050151825, -0.26230552792549133, -0.16678965091705322, -0.4685494899749756, 0.6371139883995056, 0.41052237153053284, -0.46623364090919495, -0.18172335624694824, 0.014872269704937935, 0.17229007184505463, -0.19736820459365845, -0.04865032806992531, 0.5034818649291992, -0.11648701876401901, -0.5392605066299438, 0.6763966083526611, 0.3871360421180725, 1.019596815109253, -0.6702682971954346, 0.03003663755953312, -0.22852851450443268, 0.05115288123488426, -0.015329413115978241, -0.5759919881820679, 0.21790911257266998, 0.0963212177157402, -0.43765756487846375, -0.17631004750728607, 0.564530074596405, -0.6764087677001953, -0.6521686315536499, 0.20437230169773102, 0.5523580312728882, 0.26859015226364136, 0.11137917637825012, -0.92469322681427, 0.137112095952034, 0.19968639314174652, -0.23012253642082214, 0.0937027707695961, 0.16002550721168518, 0.03930496424436569, 0.3084849715232849, 0.5009166598320007, -0.12196425348520279, 0.23283803462982178, 0.3431774377822876, 0.7763186693191528, -0.7047339081764221, -0.5082200765609741, -0.566985011100769, 0.5809497833251953, 0.08794506639242172, -0.3715127408504486, 0.622183084487915, 0.6058526635169983, 1.0924839973449707, -0.008658494800329208, 0.8151310682296753, -0.2991291582584381, 0.6756860613822937, -0.2755933105945587, 0.7684338092803955, -0.47153690457344055, -0.06714170426130295, -0.10054565221071243, -0.8837628364562988, -0.3479183316230774, 0.9699555039405823, -0.0916735976934433, 0.03367285057902336, 0.7381240725517273, 0.7413288354873657, -0.039495520293712616, -0.03156108036637306, 0.323527991771698, 0.25828608870506287, 0.3172875642776489, 0.35043588280677795, 0.711828887462616, -0.6323521137237549, 0.4891902208328247, -0.5870446562767029, -0.21206124126911163, -0.15166683495044708, -0.8563469648361206, -0.9365769028663635, -0.8568630814552307, -0.4592013955116272, -0.20435000956058502, -0.055843278765678406, 0.8804738521575928, 0.940765917301178, -1.0542552471160889, -0.28303804993629456, 0.12468025833368301, -0.14499615132808685, -0.015996651723980904, -0.29169321060180664, 0.32334640622138977, -0.479131281375885, -0.9155485033988953, 0.4167787730693817, -0.21459107100963593, -0.01896405778825283, -0.33097776770591736, 0.04735556244850159, -0.6958427429199219, 0.18049649894237518, 0.49663010239601135, 0.06889361888170242, -0.9681992530822754, -0.24758519232273102, 0.016799814999103546, -0.2555152475833893, 0.10287167131900787, 0.4714486300945282, -0.6427502632141113, 0.5696754455566406, 0.35919496417045593, 0.47006580233573914, 0.36211949586868286, 0.06517971307039261, 0.4704621136188507, -1.1628506183624268, 0.18172426521778107, 0.2038833498954773, 0.6532162427902222, 0.41668882966041565, -0.08803265541791916, 0.2782764434814453, 0.2255302220582962, -0.5682653188705444, -0.7134551405906677, 0.1254166066646576, -1.1182458400726318, -0.3055725693702698, 1.1507898569107056, -0.32175102829933167, -0.25318124890327454, 0.03160782903432846, -0.3338111639022827, 0.4482623040676117, -0.5371353626251221, 0.38759851455688477, 0.994640588760376, 0.04987514391541481, -0.009377209469676018, -0.1567671298980713, 0.40635305643081665, 0.39589986205101013, -0.35823461413383484, -0.26514631509780884, 0.3277490735054016, 0.26247283816337585, 0.4632626473903656, 0.37722504138946533, 0.2021545022726059, 0.10708803683519363, -0.02204403094947338, 0.605536937713623, 0.1769862174987793, -0.34777939319610596, -0.3417052924633026, 0.05534603074193001, 0.141173854470253, -0.43220099806785583 ]
TheBloke/Llama-2-7B-Chat-GPTQ
TheBloke
"2023-09-27T12:44:48Z"
430,300
183
transformers
[ "transformers", "safetensors", "llama", "text-generation", "facebook", "meta", "pytorch", "llama-2", "en", "arxiv:2307.09288", "base_model:meta-llama/Llama-2-7b-chat-hf", "license:llama2", "text-generation-inference", "4-bit", "region:us" ]
text-generation
"2023-07-18T17:38:15Z"
--- language: - en license: llama2 tags: - facebook - meta - pytorch - llama - llama-2 model_name: Llama 2 7B Chat arxiv: 2307.09288 base_model: meta-llama/Llama-2-7b-chat-hf inference: false model_creator: Meta Llama 2 model_type: llama pipeline_tag: text-generation prompt_template: '[INST] <<SYS>> You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don''t know the answer to a question, please don''t share false information. <</SYS>> {prompt}[/INST] ' quantized_by: TheBloke --- <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Llama 2 7B Chat - GPTQ - Model creator: [Meta Llama 2](https://huggingface.co/meta-llama) - Original model: [Llama 2 7B Chat](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) <!-- description start --> ## Description This repo contains GPTQ model files for [Meta Llama 2's Llama 2 7B Chat](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf). Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them. <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Llama-2-7b-Chat-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama-2-7b-Chat-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama-2-7b-Chat-GGUF) * [Meta Llama 2's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Llama-2-Chat ``` [INST] <<SYS>> You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. <</SYS>> {prompt}[/INST] ``` <!-- prompt-template end --> <!-- README_GPTQ.md-provided-files start --> ## Provided files and GPTQ parameters Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements. Each separate quant is in a different branch. See below for instructions on fetching from different branches. All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches are made with AutoGPTQ. Files in the `main` branch which were uploaded before August 2023 were made with GPTQ-for-LLaMa. <details> <summary>Explanation of GPTQ parameters</summary> - Bits: The bit size of the quantised model. - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value. - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now. - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy. - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s). - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences. - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit. </details> | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc | | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- | | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Llama-2-7b-Chat-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.02 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. | | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Llama-2-7b-Chat-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. | | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama-2-7b-Chat-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 3.90 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. | | [main](https://huggingface.co/TheBloke/Llama-2-7b-Chat-GPTQ/tree/main) | 4 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 3.90 GB | Yes | 4-bit, without Act Order and group size 128g. | <!-- README_GPTQ.md-provided-files end --> <!-- README_GPTQ.md-download-from-branches start --> ## How to download from branches - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Llama-2-7b-Chat-GPTQ:gptq-4bit-64g-actorder_True` - With Git, you can clone a branch with: ``` git clone --single-branch --branch gptq-4bit-64g-actorder_True https://huggingface.co/TheBloke/Llama-2-7b-Chat-GPTQ ``` - In Python Transformers code, the branch is the `revision` parameter; see below. <!-- README_GPTQ.md-download-from-branches end --> <!-- README_GPTQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui). Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/Llama-2-7b-Chat-GPTQ`. - To download from a specific branch, enter for example `TheBloke/Llama-2-7b-Chat-GPTQ:gptq-4bit-64g-actorder_True` - see Provided Files above for the list of branches for each option. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `Llama-2-7b-Chat-GPTQ` 7. The model will automatically load, and is now ready for use! 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. * Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`. 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started! <!-- README_GPTQ.md-text-generation-webui end --> <!-- README_GPTQ.md-use-from-python start --> ## How to use this GPTQ model from Python code ### Install the necessary packages Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later. ```shell pip3 install transformers>=4.32.0 optimum>=1.12.0 pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7 ``` If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y auto-gptq git clone https://github.com/PanQiWei/AutoGPTQ cd AutoGPTQ pip3 install . ``` ### For CodeLlama models only: you must use Transformers 4.33.0 or later. If 4.33.0 is not yet released when you read this, you will need to install Transformers from source: ```shell pip3 uninstall -y transformers pip3 install git+https://github.com/huggingface/transformers.git ``` ### You can then use the following code ```python from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline model_name_or_path = "TheBloke/Llama-2-7b-Chat-GPTQ" # To use a different branch, change revision # For example: revision="gptq-4bit-64g-actorder_True" model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto", trust_remote_code=False, revision="main") tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) prompt = "Tell me about AI" prompt_template=f'''[INST] <<SYS>> You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. <</SYS>> {prompt}[/INST] ''' print("\n\n*** Generate:") input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda() output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512) print(tokenizer.decode(output[0])) # Inference can also be done using transformers' pipeline print("*** Pipeline:") pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1 ) print(pipe(prompt_template)[0]['generated_text']) ``` <!-- README_GPTQ.md-use-from-python end --> <!-- README_GPTQ.md-compatibility start --> ## Compatibility The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI). [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility. [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models. <!-- README_GPTQ.md-compatibility end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Meta Llama 2's Llama 2 7B Chat # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 7B fine-tuned model, optimized for dialogue use cases and converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/llamaste/Llama-2-7b) | [Link](https://huggingface.co/llamaste/Llama-2-7b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/llamaste/Llama-2-13b) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-13b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf)| |70B| [Link](https://huggingface.co/llamaste/Llama-2-70b) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-70b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf)|
[ -0.4997544586658478, -0.8423632979393005, 0.15538080036640167, 0.34387755393981934, -0.3922608196735382, -0.017161278054118156, 0.1135777086019516, -0.603489875793457, 0.2896791100502014, 0.33623403310775757, -0.7083572745323181, -0.4399666488170624, -0.4158731997013092, 0.000052894261898472905, -0.3690446615219116, 1.0630133152008057, 0.13225705921649933, -0.40903937816619873, -0.08615242689847946, -0.10076109319925308, -0.3423447012901306, -0.39783474802970886, -0.7132835388183594, -0.2855999171733856, 0.3696978986263275, 0.2224406749010086, 0.7746180295944214, 0.5231319665908813, 0.2716042995452881, 0.3527688682079315, -0.18814551830291748, 0.03779037669301033, -0.6169651746749878, -0.0663285180926323, 0.1825065314769745, -0.2987104058265686, -0.7119412422180176, 0.08316590636968613, 0.32826125621795654, 0.07666348665952682, -0.38469141721725464, 0.2629859149456024, 0.04363967478275299, 0.5695677399635315, -0.43360307812690735, 0.23548012971878052, -0.4717833399772644, -0.04312385991215706, -0.11421649158000946, 0.06401056796312332, -0.05215033143758774, -0.40367764234542847, 0.07361461222171783, -0.8546297550201416, -0.01898796297609806, -0.06660818308591843, 1.1691535711288452, 0.16032296419143677, -0.6377418637275696, 0.08602884411811829, -0.4407873749732971, 0.6518477201461792, -0.9276019334793091, 0.25062716007232666, 0.5521292686462402, 0.2640877962112427, -0.32550567388534546, -0.8717696666717529, -0.5994166135787964, -0.06289911270141602, -0.08854933083057404, 0.19908159971237183, -0.5430198907852173, 0.014983159489929676, 0.3376006484031677, 0.6149264574050903, -0.752992570400238, -0.07722678780555725, -0.35130423307418823, -0.18169274926185608, 0.8310937881469727, 0.1682138890028, 0.3503033518791199, -0.2316989004611969, -0.3149966597557068, -0.39283958077430725, -0.7269430756568909, 0.031472738832235336, 0.3698083758354187, 0.0028682432603091, -0.6888481378555298, 0.4702322483062744, -0.3575970232486725, 0.3682917356491089, 0.21930477023124695, -0.2981474995613098, 0.360185831785202, -0.5128598213195801, -0.39167582988739014, -0.42962121963500977, 1.2072635889053345, 0.43705180287361145, -0.1628739833831787, 0.2951694130897522, 0.02825232408940792, -0.04949096962809563, 0.029247602447867393, -0.959509015083313, -0.3681928217411041, 0.45528677105903625, -0.5012674927711487, -0.37696561217308044, -0.25457707047462463, -0.7183893918991089, -0.09050069749355316, -0.014056840911507607, 0.37987619638442993, -0.407483845949173, -0.44448375701904297, 0.04508223757147789, -0.3181532919406891, 0.4712376296520233, 0.3754257559776306, -0.7658829092979431, 0.4362000823020935, 0.35457706451416016, 0.7071574330329895, 0.11962296813726425, -0.11574650555849075, -0.14339733123779297, 0.08807388693094254, -0.08032923936843872, 0.5766709446907043, -0.1507323831319809, -0.5482097864151001, -0.28312948346138, 0.2330159842967987, 0.1551380306482315, -0.29340869188308716, 0.440482497215271, -0.3118458390235901, 0.34772181510925293, -0.4482579529285431, -0.4610048830509186, -0.4018804430961609, 0.14762350916862488, -0.5821073651313782, 1.2068328857421875, 0.35892799496650696, -0.813697099685669, 0.10010377317667007, -0.5762079954147339, -0.20186211168766022, -0.0679347962141037, 0.03073117323219776, -0.5242711305618286, -0.17245358228683472, 0.23530766367912292, 0.320364385843277, -0.3776853680610657, 0.09501910954713821, -0.35285016894340515, -0.2880638837814331, 0.22472423315048218, -0.5215851068496704, 1.2013505697250366, 0.16882479190826416, -0.42845413088798523, -0.09223482757806778, -0.7182103991508484, 0.05019484832882881, 0.5125188231468201, -0.30000463128089905, 0.0035849513951689005, -0.042941875755786896, 0.013673006556928158, 0.06690201163291931, 0.32636407017707825, -0.37679603695869446, 0.4707246720790863, -0.19615517556667328, 0.6332191824913025, 0.6913247108459473, 0.07542156428098679, 0.27483972907066345, -0.47289884090423584, 0.4419323205947876, 0.04274654760956764, 0.5851628184318542, 0.09316949546337128, -0.776748538017273, -0.7856985926628113, -0.24696622788906097, 0.24066835641860962, 0.6648706793785095, -0.6473895311355591, 0.5242336988449097, -0.11744493991136551, -0.7947041988372803, -0.3329830765724182, -0.011465641669929028, 0.3118962049484253, 0.26585653424263, 0.379604309797287, -0.5079618692398071, -0.46018317341804504, -0.8307180404663086, 0.1660144180059433, -0.551140546798706, -0.06142793968319893, 0.48970434069633484, 0.7395694851875305, -0.41442787647247314, 0.7639178037643433, -0.6399070024490356, -0.1043243259191513, -0.0704936534166336, 0.08263744413852692, 0.2769985795021057, 0.5090240836143494, 0.765293538570404, -0.6941943168640137, -0.45395031571388245, -0.11427053064107895, -0.6931707262992859, -0.13381846249103546, 0.01982344128191471, -0.42853015661239624, 0.15597307682037354, -0.058297138661146164, -1.0496574640274048, 0.6508442163467407, 0.6304131150245667, -0.47828376293182373, 0.6977680325508118, -0.13423502445220947, 0.08722689002752304, -1.0857861042022705, 0.007479675114154816, 0.06626897305250168, -0.3041137158870697, -0.500430703163147, 0.07962943613529205, -0.10622093081474304, 0.23462752997875214, -0.426366925239563, 0.6090889573097229, -0.4818207919597626, -0.0012116751167923212, -0.010155360214412212, 0.026632359251379967, 0.28294193744659424, 0.5222172141075134, -0.24905627965927124, 0.8354336619377136, 0.41509637236595154, -0.4983763098716736, 0.5811042189598083, 0.5079473257064819, -0.060115423053503036, 0.2517643868923187, -0.8617584109306335, 0.33038607239723206, 0.15807943046092987, 0.49928611516952515, -1.0034620761871338, -0.288265585899353, 0.5796937346458435, -0.5298699140548706, 0.3175918161869049, -0.2703048586845398, -0.3551795482635498, -0.38504427671432495, -0.5536559224128723, 0.3212226629257202, 0.8396966457366943, -0.40521812438964844, 0.4402531683444977, 0.49177706241607666, 0.015672702342271805, -0.6335930228233337, -0.7017214894294739, -0.07988520711660385, -0.2924615144729614, -0.5823357105255127, 0.4090357720851898, -0.1538659930229187, -0.13563700020313263, -0.041749339550733566, 0.06215106323361397, -0.10861467570066452, 0.03548554703593254, 0.35023200511932373, 0.3088758885860443, -0.10056371241807938, -0.20745821297168732, 0.17682844400405884, 0.004107012413442135, -0.044809792190790176, -0.13849517703056335, 0.517322301864624, -0.18152287602424622, -0.11992865055799484, -0.49440789222717285, 0.2503635585308075, 0.44670113921165466, 0.04718409851193428, 0.7823496460914612, 0.7253738641738892, -0.28967440128326416, 0.20647978782653809, -0.6061582565307617, -0.13973455131053925, -0.521841824054718, 0.19285748898983002, -0.1545424908399582, -0.7410796284675598, 0.562127411365509, 0.32849249243736267, 0.2846149802207947, 0.6687760353088379, 0.5323056578636169, -0.05789380520582199, 0.9034252166748047, 0.534961462020874, -0.24080465734004974, 0.5354791283607483, -0.5273750424385071, -0.1542040854692459, -0.8438622355461121, -0.22406290471553802, -0.35933464765548706, -0.25780346989631653, -0.7578350901603699, -0.49819812178611755, 0.28891125321388245, 0.2441445142030716, -0.7165600657463074, 0.6226094365119934, -0.6289984583854675, 0.19255951046943665, 0.4832443594932556, 0.24534840881824493, 0.2948037385940552, 0.07630141824483871, 0.012298280373215675, 0.10054205358028412, -0.4454570412635803, -0.4215330183506012, 1.0701524019241333, 0.41061875224113464, 0.6787382364273071, 0.2825099527835846, 0.5328270792961121, 0.09499464184045792, 0.3470275104045868, -0.5152942538261414, 0.6090419292449951, 0.10522633045911789, -0.6482680439949036, -0.28788894414901733, -0.5557096004486084, -0.9149055480957031, 0.25369876623153687, -0.08529841154813766, -0.8660454750061035, 0.3290984630584717, 0.001124461297877133, -0.27313151955604553, 0.22145076096057892, -0.6081858277320862, 0.803234338760376, -0.11618346720933914, -0.25401490926742554, -0.07817623019218445, -0.6583667993545532, 0.45007655024528503, 0.15994764864444733, 0.06602022051811218, -0.32773593068122864, -0.2571522295475006, 0.7763609290122986, -0.7957188487052917, 0.9369494915008545, -0.1763617992401123, -0.16985858976840973, 0.5758472681045532, -0.058089353144168854, 0.610341489315033, 0.14219380915164948, 0.045087702572345734, 0.4290529489517212, 0.20907779037952423, -0.3603534996509552, -0.3964797854423523, 0.5029817819595337, -1.087342619895935, -0.6155859231948853, -0.3176359534263611, -0.39924779534339905, 0.04804008826613426, -0.04622163251042366, 0.4507554769515991, 0.22898823022842407, -0.09058322757482529, 0.03148281201720238, 0.5506967902183533, -0.39172035455703735, 0.4079967439174652, 0.3330189883708954, -0.3390628397464752, -0.6045600175857544, 0.7375585436820984, 0.02682417258620262, 0.30250832438468933, 0.27509409189224243, 0.06833819299936295, -0.4232412278652191, -0.37516188621520996, -0.6630947589874268, 0.35286107659339905, -0.5209449529647827, -0.46347692608833313, -0.5974818468093872, -0.364336758852005, -0.3489903211593628, 0.26900097727775574, -0.36953097581863403, -0.635725736618042, -0.569537341594696, -0.0633760318160057, 1.0158928632736206, 0.5181630253791809, -0.14031867682933807, 0.4270178973674774, -0.8145593404769897, 0.2664453089237213, 0.48016059398651123, 0.1304161250591278, 0.028780823573470116, -0.7580950260162354, 0.03960266709327698, 0.3412695825099945, -0.6916935443878174, -0.9819974303245544, 0.573273241519928, 0.24158014357089996, 0.39526036381721497, 0.41514188051223755, 0.0521945059299469, 0.9030463099479675, -0.26576441526412964, 1.0155534744262695, 0.25306984782218933, -0.8715028166770935, 0.5695669054985046, -0.5566809177398682, 0.10242196172475815, 0.33522525429725647, 0.4824013113975525, -0.39578917622566223, -0.275058776140213, -0.6894746422767639, -0.7336092591285706, 0.4255037307739258, 0.5229043364524841, 0.20589186251163483, 0.07229356467723846, 0.5664188861846924, -0.08251553028821945, 0.14947015047073364, -0.9232513904571533, -0.5655807256698608, -0.33891478180885315, -0.07870742678642273, 0.18054069578647614, -0.18407438695430756, -0.23923331499099731, -0.5592034459114075, 0.8682031035423279, -0.11329817771911621, 0.7342731952667236, 0.1976073980331421, 0.16123750805854797, -0.15292540192604065, 0.16183394193649292, 0.4022360146045685, 0.5458989143371582, -0.11859572678804398, -0.27798205614089966, 0.331672340631485, -0.7849042415618896, 0.262159526348114, 0.22619996964931488, -0.1176539808511734, -0.16510948538780212, 0.1623680144548416, 0.8246979117393494, 0.010989428497850895, -0.35947614908218384, 0.5438582301139832, -0.30702346563339233, -0.29952332377433777, -0.30194759368896484, 0.21353092789649963, 0.3380347192287445, 0.48000502586364746, 0.3839569687843323, -0.30965277552604675, 0.2087923288345337, -0.5868349075317383, 0.014993253163993359, 0.4814646542072296, -0.07908253371715546, -0.35008004307746887, 0.7626246809959412, 0.053369924426078796, -0.022179165855050087, 0.7311602234840393, -0.2690780758857727, -0.42230644822120667, 0.7667664885520935, 0.5534107089042664, 0.7153513431549072, -0.1787014901638031, 0.3008914887905121, 0.4876900911331177, 0.16341611742973328, -0.08967277407646179, 0.39876335859298706, -0.00546573381870985, -0.6034266352653503, -0.3899182677268982, -0.6368632316589355, -0.3764919638633728, 0.269196480512619, -0.640187680721283, 0.18921728432178497, -0.4147566854953766, -0.4503428041934967, -0.26902854442596436, 0.2777274549007416, -0.4881318509578705, 0.12128307670354843, 0.044408440589904785, 0.8859493136405945, -0.6663918495178223, 0.810452938079834, 0.4925578236579895, -0.4464055597782135, -0.9656410813331604, -0.2594529092311859, 0.22944389283657074, -0.7289031744003296, 0.1961250752210617, 0.003181897569447756, 0.23324055969715118, -0.02676081471145153, -0.7925103902816772, -1.0056344270706177, 1.5036872625350952, 0.365262508392334, -0.6504528522491455, -0.1165304034948349, 0.014985994435846806, 0.4021153151988983, -0.11766839772462845, 0.6889449954032898, 0.5416532754898071, 0.34472882747650146, 0.23747503757476807, -1.0676472187042236, 0.412503182888031, -0.4640367925167084, 0.08417543023824692, 0.09690181165933609, -1.0575700998306274, 0.9466577768325806, -0.06933486461639404, -0.18058359622955322, 0.29640811681747437, 0.675229012966156, 0.504084050655365, -0.025438252836465836, 0.41424325108528137, 0.7124859690666199, 0.7147061824798584, -0.3050999641418457, 1.0529061555862427, -0.1825069636106491, 0.5493782162666321, 0.7259837985038757, -0.015383404679596424, 0.840530514717102, 0.24527905881404877, -0.7355470657348633, 0.7185105085372925, 0.9995383620262146, -0.07055898755788803, 0.3925902247428894, 0.02875475399196148, -0.3313656747341156, -0.06059379503130913, 0.07603950798511505, -0.7098609805107117, 0.19976173341274261, 0.4113365113735199, -0.15575392544269562, 0.08579716086387634, -0.2175968885421753, 0.07926099002361298, -0.7009474039077759, -0.06190676614642143, 0.7084892988204956, 0.337456077337265, -0.2334394007921219, 0.9226384162902832, -0.10702411085367203, 0.7236440181732178, -0.5702529549598694, -0.19793099164962769, -0.42997923493385315, -0.09010011702775955, -0.29227694869041443, -0.704336404800415, 0.15704534947872162, -0.07428358495235443, -0.010440602898597717, 0.0855775699019432, 0.7305997610092163, -0.1202416718006134, -0.33297672867774963, 0.37731266021728516, 0.4865056872367859, 0.36210986971855164, -0.047609683126211166, -0.9843549728393555, 0.327121764421463, 0.05399486795067787, -0.7012150287628174, 0.477049857378006, 0.32057827711105347, 0.18074870109558105, 0.7959853410720825, 0.6463670134544373, -0.1676078736782074, -0.027998056262731552, -0.14354382455348969, 1.058802604675293, -0.6973903775215149, -0.26413822174072266, -0.8501418232917786, 0.6187503337860107, -0.12925533950328827, -0.3850212097167969, 0.6923347115516663, 0.40177908539772034, 0.6141981482505798, 0.11726133525371552, 0.6467454433441162, -0.3939754068851471, 0.15967829525470734, -0.2778546214103699, 0.6962242722511292, -0.7008047103881836, 0.24333849549293518, -0.4010923504829407, -0.7457277774810791, 0.03200157359242439, 0.7927271723747253, -0.03486848995089531, 0.20232659578323364, 0.3431216776371002, 0.8708386421203613, 0.03419651463627815, 0.18093270063400269, 0.12439998239278793, 0.4033428430557251, 0.2249452769756317, 0.8293669819831848, 0.8560880422592163, -0.929965615272522, 0.6400644183158875, -0.3665238916873932, -0.22867923974990845, -0.07939495146274567, -0.8530388474464417, -0.8019400835037231, -0.4212343990802765, -0.5047494769096375, -0.5419138073921204, -0.04771713539958, 0.8813485503196716, 0.7798645496368408, -0.5437145829200745, -0.371137797832489, -0.023509694263339043, 0.06401932239532471, -0.18797574937343597, -0.26226961612701416, 0.2147059142589569, 0.3197217881679535, -0.6457482576370239, 0.22416792809963226, 0.05564713850617409, 0.4833199381828308, -0.21432368457317352, -0.2496086210012436, -0.24942797422409058, 0.031277790665626526, 0.6097612380981445, 0.47633248567581177, -0.6282463073730469, -0.19873060286045074, -0.16504496335983276, -0.10338354110717773, 0.27413859963417053, 0.17899154126644135, -0.733008086681366, -0.14134550094604492, 0.4344138205051422, 0.1409207284450531, 0.8075087666511536, 0.009420502930879593, 0.3692343831062317, -0.4907625615596771, 0.17595909535884857, -0.036970555782318115, 0.350129097700119, 0.11756611615419388, -0.5212778449058533, 0.6585482358932495, 0.32600846886634827, -0.6511520147323608, -0.7055401802062988, -0.1047985777258873, -1.0945732593536377, -0.14826805889606476, 1.166155457496643, -0.1703300029039383, -0.3306789994239807, -0.03474131599068642, -0.388424277305603, 0.3641698360443115, -0.5547724366188049, 0.455081582069397, 0.4249576926231384, -0.22587625682353973, -0.31938058137893677, -0.6764187216758728, 0.5124903917312622, 0.1216343343257904, -0.9573568105697632, -0.03532852604985237, 0.46991464495658875, 0.5079322457313538, 0.08371943235397339, 0.9089512825012207, -0.12639038264751434, 0.28709885478019714, 0.09305746853351593, 0.03629079833626747, 0.08892272412776947, 0.10017570853233337, -0.23745551705360413, -0.11507635563611984, -0.19117429852485657, -0.015109253115952015 ]
openai/whisper-large-v2
openai
"2023-09-08T12:54:49Z"
423,908
1,439
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "whisper", "automatic-speech-recognition", "audio", "hf-asr-leaderboard", "en", "zh", "de", "es", "ru", "ko", "fr", "ja", "pt", "tr", "pl", "ca", "nl", "ar", "sv", "it", "id", "hi", "fi", "vi", "he", "uk", "el", "ms", "cs", "ro", "da", "hu", "ta", "no", "th", "ur", "hr", "bg", "lt", "la", "mi", "ml", "cy", "sk", "te", "fa", "lv", "bn", "sr", "az", "sl", "kn", "et", "mk", "br", "eu", "is", "hy", "ne", "mn", "bs", "kk", "sq", "sw", "gl", "mr", "pa", "si", "km", "sn", "yo", "so", "af", "oc", "ka", "be", "tg", "sd", "gu", "am", "yi", "lo", "uz", "fo", "ht", "ps", "tk", "nn", "mt", "sa", "lb", "my", "bo", "tl", "mg", "as", "tt", "haw", "ln", "ha", "ba", "jw", "su", "arxiv:2212.04356", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-12-05T18:42:20Z"
--- language: - en - zh - de - es - ru - ko - fr - ja - pt - tr - pl - ca - nl - ar - sv - it - id - hi - fi - vi - he - uk - el - ms - cs - ro - da - hu - ta - no - th - ur - hr - bg - lt - la - mi - ml - cy - sk - te - fa - lv - bn - sr - az - sl - kn - et - mk - br - eu - is - hy - ne - mn - bs - kk - sq - sw - gl - mr - pa - si - km - sn - yo - so - af - oc - ka - be - tg - sd - gu - am - yi - lo - uz - fo - ht - ps - tk - nn - mt - sa - lb - my - bo - tl - mg - as - tt - haw - ln - ha - ba - jw - su tags: - audio - automatic-speech-recognition - hf-asr-leaderboard widget: - example_title: Librispeech sample 1 src: https://cdn-media.huggingface.co/speech_samples/sample1.flac - example_title: Librispeech sample 2 src: https://cdn-media.huggingface.co/speech_samples/sample2.flac pipeline_tag: automatic-speech-recognition license: apache-2.0 --- # Whisper Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation. Trained on 680k hours of labelled data, Whisper models demonstrate a strong ability to generalise to many datasets and domains **without** the need for fine-tuning. Whisper was proposed in the paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) by Alec Radford et al. from OpenAI. The original code repository can be found [here](https://github.com/openai/whisper). Compared to the Whisper large model, the large-v2 model is trained for 2.5x more epochs with added regularization for improved performance. **Disclaimer**: Content for this model card has partly been written by the Hugging Face team, and parts of it were copied and pasted from the original model card. ## Model details Whisper is a Transformer based encoder-decoder model, also referred to as a _sequence-to-sequence_ model. It was trained on 680k hours of labelled speech data annotated using large-scale weak supervision. The models were trained on either English-only data or multilingual data. The English-only models were trained on the task of speech recognition. The multilingual models were trained on both speech recognition and speech translation. For speech recognition, the model predicts transcriptions in the *same* language as the audio. For speech translation, the model predicts transcriptions to a *different* language to the audio. Whisper checkpoints come in five configurations of varying model sizes. The smallest four are trained on either English-only or multilingual data. The largest checkpoints are multilingual only. All ten of the pre-trained checkpoints are available on the [Hugging Face Hub](https://huggingface.co/models?search=openai/whisper). The checkpoints are summarised in the following table with links to the models on the Hub: | Size | Parameters | English-only | Multilingual | |----------|------------|------------------------------------------------------|-----------------------------------------------------| | tiny | 39 M | [✓](https://huggingface.co/openai/whisper-tiny.en) | [✓](https://huggingface.co/openai/whisper-tiny) | | base | 74 M | [✓](https://huggingface.co/openai/whisper-base.en) | [✓](https://huggingface.co/openai/whisper-base) | | small | 244 M | [✓](https://huggingface.co/openai/whisper-small.en) | [✓](https://huggingface.co/openai/whisper-small) | | medium | 769 M | [✓](https://huggingface.co/openai/whisper-medium.en) | [✓](https://huggingface.co/openai/whisper-medium) | | large | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large) | | large-v2 | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large-v2) | # Usage To transcribe audio samples, the model has to be used alongside a [`WhisperProcessor`](https://huggingface.co/docs/transformers/model_doc/whisper#transformers.WhisperProcessor). The `WhisperProcessor` is used to: 1. Pre-process the audio inputs (converting them to log-Mel spectrograms for the model) 2. Post-process the model outputs (converting them from tokens to text) The model is informed of which task to perform (transcription or translation) by passing the appropriate "context tokens". These context tokens are a sequence of tokens that are given to the decoder at the start of the decoding process, and take the following order: 1. The transcription always starts with the `<|startoftranscript|>` token 2. The second token is the language token (e.g. `<|en|>` for English) 3. The third token is the "task token". It can take one of two values: `<|transcribe|>` for speech recognition or `<|translate|>` for speech translation 4. In addition, a `<|notimestamps|>` token is added if the model should not include timestamp prediction Thus, a typical sequence of context tokens might look as follows: ``` <|startoftranscript|> <|en|> <|transcribe|> <|notimestamps|> ``` Which tells the model to decode in English, under the task of speech recognition, and not to predict timestamps. These tokens can either be forced or un-forced. If they are forced, the model is made to predict each token at each position. This allows one to control the output language and task for the Whisper model. If they are un-forced, the Whisper model will automatically predict the output langauge and task itself. The context tokens can be set accordingly: ```python model.config.forced_decoder_ids = WhisperProcessor.get_decoder_prompt_ids(language="english", task="transcribe") ``` Which forces the model to predict in English under the task of speech recognition. ## Transcription ### English to English In this example, the context tokens are 'unforced', meaning the model automatically predicts the output language (English) and task (transcribe). ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2") >>> model.config.forced_decoder_ids = None >>> # load dummy dataset and read audio files >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False) ['<|startoftranscript|><|en|><|transcribe|><|notimestamps|> Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.<|endoftext|>'] >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.'] ``` The context tokens can be removed from the start of the transcription by setting `skip_special_tokens=True`. ### French to French The following example demonstrates French to French transcription by setting the decoder ids appropriately. ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import Audio, load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2") >>> forced_decoder_ids = processor.get_decoder_prompt_ids(language="french", task="transcribe") >>> # load streaming dataset and read first audio sample >>> ds = load_dataset("common_voice", "fr", split="test", streaming=True) >>> ds = ds.cast_column("audio", Audio(sampling_rate=16_000)) >>> input_speech = next(iter(ds))["audio"] >>> input_features = processor(input_speech["array"], sampling_rate=input_speech["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids) ['<|startoftranscript|><|fr|><|transcribe|><|notimestamps|> Un vrai travail intéressant va enfin être mené sur ce sujet.<|endoftext|>'] >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' Un vrai travail intéressant va enfin être mené sur ce sujet.'] ``` ## Translation Setting the task to "translate" forces the Whisper model to perform speech translation. ### French to English ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import Audio, load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2") >>> forced_decoder_ids = processor.get_decoder_prompt_ids(language="french", task="translate") >>> # load streaming dataset and read first audio sample >>> ds = load_dataset("common_voice", "fr", split="test", streaming=True) >>> ds = ds.cast_column("audio", Audio(sampling_rate=16_000)) >>> input_speech = next(iter(ds))["audio"] >>> input_features = processor(input_speech["array"], sampling_rate=input_speech["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' A very interesting work, we will finally be given on this subject.'] ``` ## Evaluation This code snippet shows how to evaluate Whisper Large on [LibriSpeech test-clean](https://huggingface.co/datasets/librispeech_asr): ```python >>> from datasets import load_dataset >>> from transformers import WhisperForConditionalGeneration, WhisperProcessor >>> import torch >>> from evaluate import load >>> librispeech_test_clean = load_dataset("librispeech_asr", "clean", split="test") >>> processor = WhisperProcessor.from_pretrained("openai/whisper-large-v2") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v2").to("cuda") >>> def map_to_pred(batch): >>> audio = batch["audio"] >>> input_features = processor(audio["array"], sampling_rate=audio["sampling_rate"], return_tensors="pt").input_features >>> batch["reference"] = processor.tokenizer._normalize(batch['text']) >>> >>> with torch.no_grad(): >>> predicted_ids = model.generate(input_features.to("cuda"))[0] >>> transcription = processor.decode(predicted_ids) >>> batch["prediction"] = processor.tokenizer._normalize(transcription) >>> return batch >>> result = librispeech_test_clean.map(map_to_pred) >>> wer = load("wer") >>> print(100 * wer.compute(references=result["reference"], predictions=result["prediction"])) 3.0003583080317572 ``` ## Long-Form Transcription The Whisper model is intrinsically designed to work on audio samples of up to 30s in duration. However, by using a chunking algorithm, it can be used to transcribe audio samples of up to arbitrary length. This is possible through Transformers [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline) method. Chunking is enabled by setting `chunk_length_s=30` when instantiating the pipeline. With chunking enabled, the pipeline can be run with batched inference. It can also be extended to predict sequence level timestamps by passing `return_timestamps=True`: ```python >>> import torch >>> from transformers import pipeline >>> from datasets import load_dataset >>> device = "cuda:0" if torch.cuda.is_available() else "cpu" >>> pipe = pipeline( >>> "automatic-speech-recognition", >>> model="openai/whisper-large-v2", >>> chunk_length_s=30, >>> device=device, >>> ) >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> prediction = pipe(sample.copy(), batch_size=8)["text"] " Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel." >>> # we can also return timestamps for the predictions >>> prediction = pipe(sample.copy(), batch_size=8, return_timestamps=True)["chunks"] [{'text': ' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.', 'timestamp': (0.0, 5.44)}] ``` Refer to the blog post [ASR Chunking](https://huggingface.co/blog/asr-chunking) for more details on the chunking algorithm. ## Fine-Tuning The pre-trained Whisper model demonstrates a strong ability to generalise to different datasets and domains. However, its predictive capabilities can be improved further for certain languages and tasks through *fine-tuning*. The blog post [Fine-Tune Whisper with 🤗 Transformers](https://huggingface.co/blog/fine-tune-whisper) provides a step-by-step guide to fine-tuning the Whisper model with as little as 5 hours of labelled data. ### Evaluated Use The primary intended users of these models are AI researchers studying robustness, generalization, capabilities, biases, and constraints of the current model. However, Whisper is also potentially quite useful as an ASR solution for developers, especially for English speech recognition. We recognize that once models are released, it is impossible to restrict access to only “intended” uses or to draw reasonable guidelines around what is or is not research. The models are primarily trained and evaluated on ASR and speech translation to English tasks. They show strong ASR results in ~10 languages. They may exhibit additional capabilities, particularly if fine-tuned on certain tasks like voice activity detection, speaker classification, or speaker diarization but have not been robustly evaluated in these areas. We strongly recommend that users perform robust evaluations of the models in a particular context and domain before deploying them. In particular, we caution against using Whisper models to transcribe recordings of individuals taken without their consent or purporting to use these models for any kind of subjective classification. We recommend against use in high-risk domains like decision-making contexts, where flaws in accuracy can lead to pronounced flaws in outcomes. The models are intended to transcribe and translate speech, use of the model for classification is not only not evaluated but also not appropriate, particularly to infer human attributes. ## Training Data The models are trained on 680,000 hours of audio and the corresponding transcripts collected from the internet. 65% of this data (or 438,000 hours) represents English-language audio and matched English transcripts, roughly 18% (or 126,000 hours) represents non-English audio and English transcripts, while the final 17% (or 117,000 hours) represents non-English audio and the corresponding transcript. This non-English data represents 98 different languages. As discussed in [the accompanying paper](https://cdn.openai.com/papers/whisper.pdf), we see that performance on transcription in a given language is directly correlated with the amount of training data we employ in that language. ## Performance and Limitations Our studies show that, over many existing ASR systems, the models exhibit improved robustness to accents, background noise, technical language, as well as zero shot translation from multiple languages into English; and that accuracy on speech recognition and translation is near the state-of-the-art level. However, because the models are trained in a weakly supervised manner using large-scale noisy data, the predictions may include texts that are not actually spoken in the audio input (i.e. hallucination). We hypothesize that this happens because, given their general knowledge of language, the models combine trying to predict the next word in audio with trying to transcribe the audio itself. Our models perform unevenly across languages, and we observe lower accuracy on low-resource and/or low-discoverability languages or languages where we have less training data. The models also exhibit disparate performance on different accents and dialects of particular languages, which may include higher word error rate across speakers of different genders, races, ages, or other demographic criteria. Our full evaluation results are presented in [the paper accompanying this release](https://cdn.openai.com/papers/whisper.pdf). In addition, the sequence-to-sequence architecture of the model makes it prone to generating repetitive texts, which can be mitigated to some degree by beam search and temperature scheduling but not perfectly. Further analysis on these limitations are provided in [the paper](https://cdn.openai.com/papers/whisper.pdf). It is likely that this behavior and hallucinations may be worse on lower-resource and/or lower-discoverability languages. ## Broader Implications We anticipate that Whisper models’ transcription capabilities may be used for improving accessibility tools. While Whisper models cannot be used for real-time transcription out of the box – their speed and size suggest that others may be able to build applications on top of them that allow for near-real-time speech recognition and translation. The real value of beneficial applications built on top of Whisper models suggests that the disparate performance of these models may have real economic implications. There are also potential dual use concerns that come with releasing Whisper. While we hope the technology will be used primarily for beneficial purposes, making ASR technology more accessible could enable more actors to build capable surveillance technologies or scale up existing surveillance efforts, as the speed and accuracy allow for affordable automatic transcription and translation of large volumes of audio communication. Moreover, these models may have some capabilities to recognize specific individuals out of the box, which in turn presents safety concerns related both to dual use and disparate performance. In practice, we expect that the cost of transcription is not the limiting factor of scaling up surveillance projects. ### BibTeX entry and citation info ```bibtex @misc{radford2022whisper, doi = {10.48550/ARXIV.2212.04356}, url = {https://arxiv.org/abs/2212.04356}, author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya}, title = {Robust Speech Recognition via Large-Scale Weak Supervision}, publisher = {arXiv}, year = {2022}, copyright = {arXiv.org perpetual, non-exclusive license} } ```
[ -0.19805839657783508, -0.5956504940986633, 0.11940082162618637, 0.4806228280067444, -0.13139860332012177, -0.12033680081367493, -0.3292393088340759, -0.5820022225379944, 0.21295927464962006, 0.4731840193271637, -0.8377790451049805, -0.6011877059936523, -0.7949802875518799, -0.012260406278073788, -0.5521718263626099, 1.0479371547698975, 0.10442128777503967, -0.017338238656520844, 0.16812491416931152, -0.1055896207690239, -0.45486849546432495, -0.48760876059532166, -0.7389564514160156, -0.2096192091703415, 0.15497824549674988, 0.17199982702732086, 0.41109368205070496, 0.51109379529953, 0.11066394299268723, 0.4214351773262024, -0.443091481924057, -0.031969379633665085, -0.4267677366733551, -0.06825876235961914, 0.37832584977149963, -0.5256550312042236, -0.6167406439781189, 0.08397624641656876, 0.7508342266082764, 0.5336148142814636, -0.24740011990070343, 0.38923510909080505, 0.232626810669899, 0.3365437984466553, -0.2641896605491638, 0.31071558594703674, -0.6344317197799683, -0.14586234092712402, -0.2727195918560028, -0.03255564719438553, -0.3347068727016449, -0.26227954030036926, 0.5560548901557922, -0.5808179974555969, 0.2816157639026642, 0.011717251501977444, 1.0399456024169922, 0.21306289732456207, -0.19218038022518158, -0.3795053958892822, -0.728226363658905, 1.0569183826446533, -0.8946439027786255, 0.5080346465110779, 0.5162902474403381, 0.18673817813396454, -0.06608271598815918, -0.9094415307044983, -0.7087414860725403, -0.020160701125860214, -0.09886540472507477, 0.3038676381111145, -0.48037847876548767, 0.01981094852089882, 0.2473454624414444, 0.2747752070426941, -0.5086405277252197, 0.027141263708472252, -0.6745771169662476, -0.7441912293434143, 0.5970315337181091, -0.01515756081789732, 0.3407280147075653, -0.2718293368816376, -0.2221841812133789, -0.32940104603767395, -0.3202630281448364, 0.47975966334342957, 0.3653038740158081, 0.47176089882850647, -0.6677336692810059, 0.40607595443725586, -0.12685436010360718, 0.6568872332572937, 0.1598070114850998, -0.686090886592865, 0.6740451455116272, -0.20323120057582855, -0.1701473742723465, 0.3645210564136505, 1.0289642810821533, 0.3109620213508606, 0.1531791239976883, 0.02875933237373829, -0.24670080840587616, 0.10087336599826813, -0.11150363087654114, -0.7540072798728943, 0.08463545888662338, 0.5177462697029114, -0.562982976436615, -0.3163296580314636, -0.24249298870563507, -0.5146470665931702, 0.2344902753829956, -0.25817903876304626, 0.7184544801712036, -0.5855143666267395, -0.3761581778526306, 0.16337864100933075, -0.4152168035507202, 0.2612585723400116, 0.02804909273982048, -0.8333109617233276, 0.3760601580142975, 0.4400143623352051, 0.925972044467926, 0.058700378984212875, -0.6757533550262451, -0.5881086587905884, 0.08402381092309952, 0.05034061521291733, 0.478471577167511, -0.2517686188220978, -0.5926443338394165, -0.08708463609218597, 0.18658360838890076, -0.3943658471107483, -0.5234308242797852, 0.7136548161506653, -0.13519521057605743, 0.4721916615962982, -0.0793074294924736, -0.5130560398101807, -0.28790441155433655, -0.17192238569259644, -0.4618333578109741, 0.9789577722549438, 0.1580641120672226, -0.7197619676589966, 0.13045573234558105, -0.5352315902709961, -0.5231590270996094, -0.17553295195102692, 0.2661316990852356, -0.4527263045310974, -0.029744695872068405, 0.4446753263473511, 0.4979870021343231, -0.13362421095371246, 0.12528817355632782, 0.09900646656751633, -0.41697120666503906, 0.3697322905063629, -0.4688000977039337, 1.0257827043533325, 0.16288147866725922, -0.40650925040245056, 0.19199202954769135, -0.8004223704338074, 0.0698772743344307, 0.07215496897697449, -0.2633850574493408, 0.09838997572660446, -0.012234884314239025, 0.290725976228714, 0.10591229051351547, 0.21732942759990692, -0.7106283903121948, -0.0778021514415741, -0.6800698041915894, 0.9055954217910767, 0.5814931988716125, -0.03519183024764061, 0.37070801854133606, -0.5552607178688049, 0.3121873438358307, 0.14038635790348053, 0.36967742443084717, -0.25970834493637085, -0.6429163813591003, -0.850653350353241, -0.4026665985584259, 0.46375688910484314, 0.8167858123779297, -0.4233008921146393, 0.6073613166809082, -0.29698142409324646, -0.608271062374115, -1.2674245834350586, -0.08738946169614792, 0.5885477066040039, 0.6416311860084534, 0.6760038733482361, -0.05609584599733353, -0.6826874017715454, -0.8282202482223511, -0.1258394569158554, -0.3014550805091858, -0.16997314989566803, 0.35613372921943665, 0.3618440628051758, -0.40208354592323303, 0.7026958465576172, -0.4104921817779541, -0.5456839799880981, -0.3483951985836029, 0.05341942235827446, 0.4524599015712738, 0.6308478713035583, 0.34570834040641785, -0.7753624320030212, -0.3826334774494171, -0.20247042179107666, -0.5727642774581909, -0.16527533531188965, -0.12407087534666061, -0.019145533442497253, 0.22605209052562714, 0.48235854506492615, -0.7199391722679138, 0.4680878818035126, 0.7243419885635376, -0.20140856504440308, 0.6482443809509277, 0.06389494240283966, -0.0412699319422245, -1.2252392768859863, 0.02296215295791626, -0.22564874589443207, -0.1660441756248474, -0.7316573262214661, -0.23886817693710327, -0.06713470816612244, -0.09913439303636551, -0.5805151462554932, 0.6285771131515503, -0.3601211905479431, 0.04924159124493599, -0.06460247933864594, 0.1440659910440445, -0.039475925266742706, 0.6689276099205017, 0.2713685929775238, 0.7178201675415039, 0.8517915606498718, -0.582135796546936, 0.23378287255764008, 0.5771464705467224, -0.2668733298778534, 0.2975557744503021, -1.0004916191101074, 0.13788361847400665, 0.07387926429510117, 0.19431014358997345, -0.9265310168266296, -0.12130041420459747, 0.04680844023823738, -0.9756279587745667, 0.4454362988471985, -0.35011857748031616, -0.31444457173347473, -0.5495892763137817, -0.11552370339632034, 0.07790914177894592, 0.8952094912528992, -0.4985508322715759, 0.7291839718818665, 0.4434078633785248, -0.24361652135849, -0.5826424360275269, -0.7183719277381897, -0.06828636676073074, -0.1414208859205246, -0.7948921918869019, 0.5108746886253357, -0.02227333001792431, 0.06721136718988419, -0.11831039935350418, -0.052516497671604156, 0.12420740723609924, -0.20309077203273773, 0.4862709641456604, 0.4303778111934662, -0.08326802402734756, -0.26135683059692383, 0.2548021674156189, -0.25691330432891846, 0.010008786804974079, -0.28387200832366943, 0.6950584650039673, -0.21957114338874817, -0.007102807983756065, -0.8145942091941833, 0.3878815174102783, 0.6606247425079346, -0.37072494626045227, 0.682914137840271, 0.7697397470474243, -0.2780822813510895, -0.1580365151166916, -0.6666250228881836, -0.17601840198040009, -0.5431489944458008, 0.24039864540100098, -0.48872560262680054, -0.8329090476036072, 0.8180617690086365, 0.23995456099510193, 0.18802332878112793, 0.6733190417289734, 0.5221121907234192, -0.1297958791255951, 1.096422791481018, 0.506422221660614, -0.2879227101802826, 0.2603112757205963, -0.6943814158439636, -0.08683435618877411, -1.0545778274536133, -0.4495227336883545, -0.5606374740600586, -0.18943898379802704, -0.46128639578819275, -0.29065799713134766, 0.48556265234947205, 0.19541007280349731, -0.015550297684967518, 0.5283758640289307, -0.711456835269928, 0.0074049336835742, 0.6841809749603271, 0.01145599689334631, 0.054890573024749756, -0.03799006715416908, -0.26087823510169983, -0.004748881328850985, -0.49471771717071533, -0.38492515683174133, 1.0145182609558105, 0.49185889959335327, 0.45118969678878784, -0.03714750334620476, 0.7247589826583862, -0.028803393244743347, -0.004637402016669512, -0.8321592211723328, 0.518714964389801, -0.12701112031936646, -0.5315158367156982, -0.4146661162376404, -0.25457167625427246, -0.8704401850700378, 0.17548996210098267, -0.17390301823616028, -0.7480880618095398, 0.10682583600282669, -0.014905842952430248, -0.2957207262516022, 0.2000071257352829, -0.7515192627906799, 0.6397383809089661, 0.17127026617527008, 0.14746302366256714, 0.020594054833054543, -0.764256477355957, 0.15373355150222778, 0.08427795022726059, 0.11985304206609726, -0.06433378905057907, 0.1493089497089386, 1.050568699836731, -0.5048201084136963, 0.9710891246795654, -0.32087963819503784, 0.0053078653290867805, 0.4613698720932007, -0.11178711801767349, 0.40716683864593506, -0.2200901061296463, -0.11143938452005386, 0.515555739402771, 0.36401891708374023, -0.29297423362731934, -0.28427624702453613, 0.5430763959884644, -1.1075804233551025, -0.4040212631225586, -0.2534048557281494, -0.3368989825248718, -0.1160903349518776, 0.2426747828722, 0.9308443069458008, 0.779531717300415, -0.14820680022239685, -0.009432679042220116, 0.44499269127845764, -0.27208849787712097, 0.5739663243293762, 0.6524457335472107, -0.21095193922519684, -0.5143042802810669, 0.9249256253242493, 0.3011978268623352, 0.24621880054473877, 0.28701385855674744, 0.350832462310791, -0.48773208260536194, -0.6930467486381531, -0.5608116388320923, 0.33121004700660706, -0.5285550355911255, -0.15896911919116974, -0.9664349555969238, -0.5925337076187134, -0.7262771725654602, 0.03405150771141052, -0.379929780960083, -0.2935166656970978, -0.481611430644989, 0.10350050777196884, 0.5834949016571045, 0.43093231320381165, 0.019214274361729622, 0.5515721440315247, -1.0142791271209717, 0.41996079683303833, 0.3333795666694641, 0.09823472052812576, 0.03556107357144356, -1.05979323387146, -0.06326384097337723, 0.21897920966148376, -0.2017049640417099, -0.7502944469451904, 0.5446889400482178, 0.354046106338501, 0.5604802966117859, 0.27800098061561584, -0.009181839413940907, 0.8307719230651855, -0.7675079703330994, 0.8948197364807129, 0.1599123179912567, -1.2880265712738037, 0.7424323558807373, -0.3666123151779175, 0.3552880883216858, 0.3953849673271179, 0.3705146610736847, -0.7452804446220398, -0.49967098236083984, -0.634552538394928, -0.6717410683631897, 0.839805543422699, 0.35512226819992065, 0.18162493407726288, 0.09467175602912903, 0.31534746289253235, 0.07704508304595947, 0.11867744475603104, -0.5022971630096436, -0.43896982073783875, -0.4695027768611908, -0.2543720304965973, -0.20071208477020264, -0.17786473035812378, -0.03161120414733887, -0.5335940718650818, 0.7579354047775269, -0.022597037255764008, 0.5804577469825745, 0.44272714853286743, -0.03952604904770851, -0.02142970822751522, 0.08505985885858536, 0.6014451384544373, 0.3006086051464081, -0.18547137081623077, -0.3729681670665741, 0.3232419192790985, -0.8065206408500671, -0.021434763446450233, 0.2764943242073059, -0.29305148124694824, 0.15810544788837433, 0.8346871733665466, 1.2627227306365967, 0.22501853108406067, -0.5110906362533569, 0.7520791292190552, -0.10676378011703491, -0.4351533055305481, -0.581386148929596, 0.041837096214294434, 0.30816787481307983, 0.2236243337392807, 0.35446593165397644, 0.10392635315656662, 0.09850739687681198, -0.4993583858013153, 0.050032585859298706, 0.29526829719543457, -0.4600023627281189, -0.5504009127616882, 0.8369337320327759, 0.15707387030124664, -0.4993442893028259, 0.7247899770736694, 0.11011282354593277, -0.7956570386886597, 0.49893903732299805, 0.7310009598731995, 1.0325274467468262, -0.5187179446220398, 0.028668150305747986, 0.47283437848091125, 0.23520255088806152, -0.08002055436372757, 0.5203832983970642, -0.12172280997037888, -0.7629580497741699, -0.46900150179862976, -1.0226362943649292, -0.23672863841056824, 0.18521668016910553, -0.9584246277809143, 0.3135237395763397, -0.25677892565727234, -0.2990383207798004, 0.3159582018852234, 0.0009958165464922786, -0.7829549908638, 0.1377803087234497, 0.08332224935293198, 1.0809739828109741, -0.7547776103019714, 1.030496597290039, 0.2480735033750534, -0.24870775640010834, -1.1313369274139404, 0.030805161222815514, 0.035076916217803955, -1.078003168106079, 0.4174758493900299, 0.3486892879009247, -0.20631475746631622, 0.1836262345314026, -0.5747808814048767, -0.8819616436958313, 1.0308338403701782, 0.12617503106594086, -0.7481403350830078, -0.10212823748588562, -0.06110718101263046, 0.5489836931228638, -0.2903711199760437, 0.1307487040758133, 0.7513592839241028, 0.4341784715652466, 0.10731583833694458, -1.4318275451660156, -0.08794254809617996, -0.27783915400505066, -0.16727235913276672, 0.03705427423119545, -0.7548549771308899, 0.8557594418525696, -0.3447384238243103, -0.2587836682796478, 0.27840742468833923, 0.693604052066803, 0.23339273035526276, 0.2232455462217331, 0.6342428922653198, 0.503243088722229, 0.7298774123191833, -0.16666585206985474, 1.0509905815124512, -0.276105672121048, 0.12471780925989151, 0.8976200222969055, -0.06008349731564522, 1.168218731880188, 0.28074410557746887, -0.3838544487953186, 0.5793246626853943, 0.3976432681083679, -0.0002005632413784042, 0.5473331809043884, -0.09246514737606049, -0.30492401123046875, 0.08924604952335358, -0.053881626576185226, -0.4428655505180359, 0.810558021068573, 0.4141886532306671, -0.275385320186615, 0.35331854224205017, 0.3144666850566864, 0.13123293220996857, -0.1485622376203537, -0.26293209195137024, 0.9986538887023926, 0.12761437892913818, -0.6406654715538025, 0.9072895050048828, 0.032819680869579315, 1.0021989345550537, -0.8559107780456543, 0.22352972626686096, 0.04495507851243019, 0.14360788464546204, -0.17025499045848846, -0.6810628771781921, 0.330653578042984, -0.14750425517559052, -0.3351076543331146, -0.16587595641613007, 0.5474138259887695, -0.7414488792419434, -0.5439647436141968, 0.586541473865509, 0.34482017159461975, 0.33452051877975464, -0.12809090316295624, -0.8937498927116394, 0.41573068499565125, 0.22036534547805786, -0.25065428018569946, 0.18064455687999725, 0.20482298731803894, 0.22896355390548706, 0.653296947479248, 0.8835989236831665, 0.4089794158935547, 0.1425878256559372, 0.18987217545509338, 0.8204235434532166, -0.6549344062805176, -0.6927357316017151, -0.6808950304985046, 0.4863647222518921, 0.049220141023397446, -0.47863098978996277, 0.8119062781333923, 0.5117119550704956, 0.6979520916938782, 0.018660694360733032, 0.7892128229141235, 0.0774034932255745, 0.9703661203384399, -0.5868387818336487, 0.8330148458480835, -0.44771718978881836, 0.0006795948720537126, -0.34690865874290466, -0.7812181711196899, 0.05094420537352562, 0.584166407585144, -0.06846006214618683, -0.1085825189948082, 0.38287368416786194, 0.9119102358818054, 0.08810307830572128, 0.16625000536441803, 0.13744677603244781, 0.4240463376045227, 0.22681809961795807, 0.577925443649292, 0.5916444063186646, -0.7849380373954773, 0.6564517617225647, -0.4877835512161255, -0.25621655583381653, 0.05997452139854431, -0.599962592124939, -1.0205845832824707, -0.9027024507522583, -0.2641284465789795, -0.5833619832992554, -0.23943838477134705, 0.8184921145439148, 0.9225561618804932, -0.8550295233726501, -0.3220506012439728, 0.3021220862865448, -0.07060276716947556, -0.40115416049957275, -0.2513510286808014, 0.5929118394851685, -0.022939620539546013, -0.9175800681114197, 0.6336883306503296, 0.04628352075815201, 0.4032624661922455, -0.1981765329837799, -0.22501596808433533, 0.0568743459880352, 0.10009810328483582, 0.5848779678344727, 0.2967134714126587, -0.8904653787612915, -0.14042256772518158, 0.127439484000206, 0.05779643729329109, -0.03697620704770088, 0.4283733367919922, -0.7190111875534058, 0.36169305443763733, 0.36919817328453064, 0.13075347244739532, 0.8426639437675476, -0.3039112389087677, 0.3788304924964905, -0.7542775869369507, 0.48038312792778015, 0.20314456522464752, 0.3378889560699463, 0.3640613555908203, -0.31131434440612793, 0.1393134444952011, 0.2880542576313019, -0.5770408511161804, -1.0485105514526367, -0.12886172533035278, -1.1598752737045288, -0.1723565310239792, 1.0558726787567139, 0.028606237843632698, -0.34611186385154724, -0.11653710901737213, -0.3539159893989563, 0.443394273519516, -0.49077633023262024, 0.33535754680633545, 0.6002746224403381, 0.06662411242723465, -0.044947460293769836, -0.6108955144882202, 0.7507595419883728, 0.21242351830005646, -0.2488967925310135, -0.020705996081233025, 0.07038998603820801, 0.6242824196815491, 0.26786375045776367, 0.8736128807067871, -0.23730798065662384, 0.19477476179599762, 0.1272943764925003, 0.1733517348766327, -0.10902251303195953, -0.2017056792974472, -0.4702375531196594, -0.06545604020357132, -0.33282673358917236, -0.413504958152771 ]
deepset/bert-large-uncased-whole-word-masking-squad2
deepset
"2023-09-26T08:52:18Z"
420,955
25
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "question-answering", "en", "dataset:squad_v2", "license:cc-by-4.0", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
question-answering
"2022-03-02T23:29:05Z"
--- language: en license: cc-by-4.0 datasets: - squad_v2 model-index: - name: deepset/bert-large-uncased-whole-word-masking-squad2 results: - task: type: question-answering name: Question Answering dataset: name: squad_v2 type: squad_v2 config: squad_v2 split: validation metrics: - type: exact_match value: 80.8846 name: Exact Match verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiY2E5ZGNkY2ExZWViZGEwNWE3OGRmMWM2ZmE4ZDU4ZDQ1OGM3ZWE0NTVmZjFmYmZjZmJmNjJmYTc3NTM3OTk3OSIsInZlcnNpb24iOjF9.aSblF4ywh1fnHHrN6UGL392R5KLaH3FCKQlpiXo_EdQ4XXEAENUCjYm9HWDiFsgfSENL35GkbSyz_GAhnefsAQ - type: f1 value: 83.8765 name: F1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNGFlNmEzMTk2NjRkNTI3ZTk3ZTU1NWNlYzIyN2E0ZDFlNDA2ZjYwZWJlNThkMmRmMmE0YzcwYjIyZDM5NmRiMCIsInZlcnNpb24iOjF9.-rc2_Bsp_B26-o12MFYuAU0Ad2Hg9PDx7Preuk27WlhYJDeKeEr32CW8LLANQABR3Mhw2x8uTYkEUrSDMxxLBw - task: type: question-answering name: Question Answering dataset: name: squad type: squad config: plain_text split: validation metrics: - type: exact_match value: 85.904 name: Exact Match - type: f1 value: 92.586 name: F1 - task: type: question-answering name: Question Answering dataset: name: adversarial_qa type: adversarial_qa config: adversarialQA split: validation metrics: - type: exact_match value: 28.233 name: Exact Match - type: f1 value: 41.170 name: F1 - task: type: question-answering name: Question Answering dataset: name: squad_adversarial type: squad_adversarial config: AddOneSent split: validation metrics: - type: exact_match value: 78.064 name: Exact Match - type: f1 value: 83.591 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts amazon type: squadshifts config: amazon split: test metrics: - type: exact_match value: 65.615 name: Exact Match - type: f1 value: 80.733 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts new_wiki type: squadshifts config: new_wiki split: test metrics: - type: exact_match value: 81.570 name: Exact Match - type: f1 value: 91.199 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts nyt type: squadshifts config: nyt split: test metrics: - type: exact_match value: 83.279 name: Exact Match - type: f1 value: 91.090 name: F1 - task: type: question-answering name: Question Answering dataset: name: squadshifts reddit type: squadshifts config: reddit split: test metrics: - type: exact_match value: 69.305 name: Exact Match - type: f1 value: 82.405 name: F1 --- # bert-large-uncased-whole-word-masking-squad2 This is a berta-large model, fine-tuned using the SQuAD2.0 dataset for the task of question answering. ## Overview **Language model:** bert-large **Language:** English **Downstream-task:** Extractive QA **Training data:** SQuAD 2.0 **Eval data:** SQuAD 2.0 **Code:** See [an example QA pipeline on Haystack](https://haystack.deepset.ai/tutorials/first-qa-system) ## Usage ### In Haystack Haystack is an NLP framework by deepset. You can use this model in a Haystack pipeline to do question answering at scale (over many documents). To load the model in [Haystack](https://github.com/deepset-ai/haystack/): ```python reader = FARMReader(model_name_or_path="deepset/bert-large-uncased-whole-word-masking-squad2") # or reader = TransformersReader(model_name_or_path="FILL",tokenizer="deepset/bert-large-uncased-whole-word-masking-squad2") ``` ### In Transformers ```python from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline model_name = "deepset/bert-large-uncased-whole-word-masking-squad2" # a) Get predictions nlp = pipeline('question-answering', model=model_name, tokenizer=model_name) QA_input = { 'question': 'Why is model conversion important?', 'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.' } res = nlp(QA_input) # b) Load model & tokenizer model = AutoModelForQuestionAnswering.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name) ``` ## About us <div class="grid lg:grid-cols-2 gap-x-4 gap-y-3"> <div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center"> <img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/deepset-logo-colored.png" class="w-40"/> </div> <div class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center"> <img alt="" src="https://raw.githubusercontent.com/deepset-ai/.github/main/haystack-logo-colored.png" class="w-40"/> </div> </div> [deepset](http://deepset.ai/) is the company behind the open-source NLP framework [Haystack](https://haystack.deepset.ai/) which is designed to help you build production ready NLP systems that use: Question answering, summarization, ranking etc. Some of our other work: - [Distilled roberta-base-squad2 (aka "tinyroberta-squad2")]([https://huggingface.co/deepset/tinyroberta-squad2) - [German BERT (aka "bert-base-german-cased")](https://deepset.ai/german-bert) - [GermanQuAD and GermanDPR datasets and models (aka "gelectra-base-germanquad", "gbert-base-germandpr")](https://deepset.ai/germanquad) ## Get in touch and join the Haystack community <p>For more info on Haystack, visit our <strong><a href="https://github.com/deepset-ai/haystack">GitHub</a></strong> repo and <strong><a href="https://docs.haystack.deepset.ai">Documentation</a></strong>. We also have a <strong><a class="h-7" href="https://haystack.deepset.ai/community">Discord community open to everyone!</a></strong></p> [Twitter](https://twitter.com/deepset_ai) | [LinkedIn](https://www.linkedin.com/company/deepset-ai/) | [Discord](https://haystack.deepset.ai/community/join) | [GitHub Discussions](https://github.com/deepset-ai/haystack/discussions) | [Website](https://deepset.ai) By the way: [we're hiring!](http://www.deepset.ai/jobs)
[ -0.37578508257865906, -0.683580756187439, 0.3371766209602356, 0.17634187638759613, -0.05839844420552254, 0.13006137311458588, -0.1262659877538681, -0.4743567705154419, 0.4054914712905884, 0.3249610662460327, -0.8361159563064575, -0.6387279629707336, -0.2796587347984314, 0.0036564641632139683, -0.43409600853919983, 0.9186179041862488, 0.16635216772556305, -0.023354435339570045, -0.10636091977357864, 0.011974814347922802, -0.4607469439506531, -0.5661566257476807, -0.744911253452301, -0.20791377127170563, 0.3567819893360138, 0.31126630306243896, 0.7304424047470093, 0.24658994376659393, 0.45063653588294983, 0.33028894662857056, -0.023537825793027878, 0.11660540103912354, -0.41715940833091736, 0.22685101628303528, -0.12884598970413208, -0.33114126324653625, -0.31020984053611755, -0.04744810238480568, 0.5884241461753845, 0.4617362320423126, -0.183782696723938, 0.37714657187461853, -0.20203101634979248, 0.6275487542152405, -0.5674582123756409, 0.0895727202296257, -0.7957348227500916, -0.15826089680194855, 0.10015000402927399, 0.31645187735557556, -0.10994661599397659, -0.16704541444778442, 0.2713795006275177, -0.6618969440460205, 0.3469466269016266, -0.1437050849199295, 1.1622977256774902, 0.1649676263332367, -0.0986284390091896, -0.22220532596111298, -0.4593132734298706, 0.8008588552474976, -1.0556491613388062, 0.03248602896928787, 0.5744563341140747, 0.39630329608917236, 0.08781113475561142, -0.9527773857116699, -0.7185556292533875, 0.09672524034976959, -0.2449360191822052, 0.2500574588775635, -0.15253223478794098, -0.16709451377391815, 0.06121586263179779, 0.3619042932987213, -0.7471380829811096, 0.15697656571865082, -0.5699852705001831, -0.1870865672826767, 0.8589507937431335, 0.06073733791708946, 0.1806478500366211, -0.22796761989593506, -0.22752954065799713, -0.2880130708217621, -0.42131587862968445, 0.1757546216249466, 0.19780400395393372, 0.29641100764274597, -0.08171694725751877, 0.5564813017845154, -0.40200385451316833, 0.4976605772972107, 0.12718120217323303, 0.47688746452331543, 0.42079153656959534, -0.5484376549720764, -0.23190772533416748, -0.14551003277301788, 0.9367380142211914, 0.37127894163131714, 0.05897591635584831, -0.11188492923974991, -0.3399006426334381, -0.13592089712619781, 0.2525503635406494, -0.874203085899353, -0.20392006635665894, 0.5193220376968384, -0.3236691355705261, -0.36609694361686707, 0.07521376013755798, -0.7236905097961426, -0.3901852071285248, 0.13406959176063538, 0.7838255167007446, -0.3497737646102905, -0.30879202485084534, 0.32148608565330505, -0.28710511326789856, 0.6918090581893921, 0.16675984859466553, -0.839779257774353, 0.06934582442045212, 0.6661931872367859, 0.7155581116676331, 0.22627532482147217, -0.3057697117328644, -0.3965592682361603, -0.1031222864985466, -0.2657006084918976, 0.6584286689758301, -0.33638620376586914, -0.051969077438116074, 0.1973971277475357, 0.2732027471065521, -0.11000502854585648, -0.37011539936065674, 0.243109792470932, -0.6881486773490906, 0.6196151375770569, -0.12292475253343582, -0.5882488489151001, -0.27095305919647217, 0.3220520317554474, -0.7058221697807312, 1.112940788269043, 0.24247963726520538, -0.48419472575187683, 0.12128931283950806, -0.8379435539245605, -0.4346012473106384, 0.16399143636226654, 0.08405279368162155, -0.36352425813674927, -0.21655641496181488, 0.3889482617378235, 0.527341902256012, -0.1850697249174118, 0.1661524474620819, -0.18970084190368652, -0.47444432973861694, 0.3099493384361267, 0.06390826404094696, 1.245071291923523, 0.023932073265314102, -0.40255463123321533, 0.03147917613387108, -0.5983022451400757, 0.27657294273376465, 0.1934877336025238, -0.22364358603954315, 0.013566131703555584, -0.07102382183074951, 0.15424282848834991, 0.2738565504550934, 0.6141482591629028, -0.5424323678016663, 0.12059827148914337, -0.6366057395935059, 0.7413932681083679, 0.6736382842063904, -0.03242868930101395, 0.3349717855453491, -0.3560826778411865, 0.5522515773773193, -0.120120570063591, 0.06004039943218231, 0.02392018586397171, -0.4387464225292206, -0.9284178614616394, -0.19830472767353058, 0.5303036570549011, 0.7473970651626587, -0.8166635632514954, 0.9080828428268433, -0.0994785875082016, -0.5238007307052612, -0.9583954215049744, 0.11310195922851562, 0.24910685420036316, 0.3046601116657257, 0.45636552572250366, -0.07999012619256973, -0.7954671382904053, -1.113149881362915, -0.022471772506833076, -0.1832389384508133, -0.3398585319519043, 0.21193480491638184, 0.6863489747047424, -0.46273109316825867, 0.8971628546714783, -0.6523070931434631, -0.4709416925907135, -0.18211482465267181, -0.07172396779060364, 0.5136665105819702, 0.6358492374420166, 0.5233101844787598, -0.7512737512588501, -0.410484254360199, -0.3015744984149933, -0.6658684611320496, 0.27113229036331177, -0.11569671332836151, -0.3831179141998291, 0.18602614104747772, 0.4976697266101837, -0.803396463394165, 0.279154509305954, 0.5098937749862671, -0.5484563708305359, 0.4053153693675995, -0.012596013024449348, -0.04332181438803673, -1.4497849941253662, 0.32626786828041077, -0.08501479029655457, -0.2054876983165741, -0.47209662199020386, 0.3281611502170563, -0.18275491893291473, -0.10413090884685516, -0.4379396438598633, 0.6318145394325256, -0.2614366114139557, 0.07177141308784485, 0.20165997743606567, 0.14263401925563812, 0.24410028755664825, 0.5791110992431641, -0.12981881201267242, 1.0560847520828247, 0.6162256598472595, -0.46118712425231934, 0.6683266758918762, 0.648087203502655, -0.5814152359962463, 0.20214468240737915, -0.9482107758522034, 0.17292408645153046, 0.04621923714876175, 0.2578108012676239, -1.087311863899231, -0.2911105453968048, 0.11897231638431549, -0.7717551589012146, 0.05806851014494896, 0.03845743089914322, -0.8939118385314941, -0.5239866971969604, -0.5880507230758667, 0.21287798881530762, 0.8320891857147217, -0.4298216700553894, 0.29413747787475586, 0.4296881854534149, -0.11001934856176376, -0.5521952509880066, -0.9561328887939453, 0.15608763694763184, 0.02644365280866623, -0.7083320617675781, 0.3527456820011139, -0.1726413071155548, 0.03008229285478592, 0.10506635159254074, 0.06323424726724625, -0.5804233551025391, 0.17781271040439606, 0.004933220334351063, 0.41416266560554504, -0.38457128405570984, 0.41005992889404297, -0.16060814261436462, -0.014815586619079113, 0.0611848346889019, -0.2622441351413727, 0.5729866027832031, -0.5214559435844421, 0.04071830213069916, -0.4779498875141144, 0.48435842990875244, 0.4534519612789154, -0.38935235142707825, 0.8561644554138184, 0.8412107229232788, -0.4897611141204834, -0.05837995186448097, -0.6558516621589661, -0.36461636424064636, -0.5023639798164368, 0.5304716229438782, -0.13877975940704346, -0.9803006052970886, 0.63858562707901, 0.3499920666217804, 0.31144389510154724, 0.9698938131332397, 0.5155004262924194, -0.5845492482185364, 0.9941672682762146, 0.5793543457984924, -0.03746574744582176, 0.3787313401699066, -0.6507826447486877, 0.1324399709701538, -0.9699499011039734, -0.16366678476333618, -0.5163171291351318, -0.5180709958076477, -0.5640885829925537, -0.37907496094703674, 0.17265915870666504, 0.10797504335641861, -0.43678364157676697, 0.45501434803009033, -0.8509799838066101, 0.5190334916114807, 0.7873983979225159, 0.1341293752193451, -0.0070790620520710945, -0.011555672623217106, 0.14152592420578003, 0.22111424803733826, -0.70599764585495, -0.37319931387901306, 1.0818456411361694, 0.18993400037288666, 0.4329996109008789, 0.1766429990530014, 0.7406942248344421, 0.25070884823799133, -0.2343776375055313, -0.778408944606781, 0.5974432229995728, -0.23682615160942078, -1.079611897468567, -0.627944827079773, -0.2915099859237671, -1.1338417530059814, 0.08801741898059845, -0.34120750427246094, -0.7004922032356262, 0.26195213198661804, -0.06897670030593872, -0.5748090147972107, 0.25393572449684143, -0.7320035099983215, 0.9192670583724976, -0.049112677574157715, -0.05110512301325798, -0.1722208857536316, -0.870026171207428, 0.26038244366645813, -0.026987506076693535, 0.033245839178562164, -0.15546835958957672, -0.017838770523667336, 0.9157090187072754, -0.49983152747154236, 1.0171672105789185, -0.05653087794780731, -0.08094612509012222, 0.4222797155380249, -0.04343011975288391, 0.40086299180984497, 0.18170864880084991, -0.32753583788871765, 0.2766627073287964, 0.3875097334384918, -0.5422949194908142, -0.4390372633934021, 0.6114404201507568, -0.9196581244468689, -0.4134060740470886, -0.4280623197555542, -0.5071916580200195, -0.13504242897033691, 0.39192140102386475, 0.2586617171764374, 0.31127458810806274, -0.13576829433441162, 0.5939633846282959, 0.6941291093826294, -0.22483518719673157, 0.48972639441490173, 0.44836077094078064, -0.13815122842788696, -0.35827264189720154, 0.8494247198104858, -0.06945141404867172, 0.05709950625896454, 0.4794100522994995, 0.11221044510602951, -0.42268556356430054, -0.334195613861084, -0.44140347838401794, 0.23482054471969604, -0.6084809899330139, -0.35061484575271606, -0.5281340479850769, -0.6488098502159119, -0.7421262264251709, -0.12675388157367706, -0.2711799442768097, -0.6053386330604553, -0.4153500199317932, -0.01846265234053135, 0.6428483724594116, 0.5008352398872375, -0.06974370777606964, 0.2687320113182068, -0.6603224873542786, 0.40053820610046387, 0.6519211530685425, 0.4058840870857239, -0.1590825915336609, -0.49888598918914795, -0.2518059313297272, 0.4075137674808502, -0.044486917555332184, -0.6367889046669006, 0.15365608036518097, 0.28596195578575134, 0.39891013503074646, -0.0015281701926141977, 0.1301986128091812, 0.49291524291038513, -0.3897991478443146, 0.8977912068367004, 0.12014173716306686, -0.8873150944709778, 0.574276328086853, -0.3875297009944916, 0.5587167739868164, 1.0315908193588257, 0.125169575214386, -0.7355054616928101, -0.28411078453063965, -0.6747629642486572, -1.0618350505828857, 0.6411317586898804, 0.41447654366493225, 0.3166677951812744, -0.01877531222999096, 0.2919294536113739, -0.059906043112277985, 0.3616276681423187, -0.6498705744743347, -0.1667419821023941, -0.22481299936771393, -0.2982400059700012, -0.032810334116220474, -0.2619937062263489, -0.20013900101184845, -0.39921510219573975, 0.9532881379127502, -0.035917978733778, 0.30939269065856934, 0.3049817383289337, -0.25290796160697937, 0.14697584509849548, 0.16450300812721252, 0.45890432596206665, 0.817778468132019, -0.402604341506958, -0.15074168145656586, 0.2297634333372116, -0.38700035214424133, -0.14399287104606628, 0.27254658937454224, -0.45218625664711, 0.1587626338005066, 0.47030630707740784, 0.6678013205528259, 0.0848604217171669, -0.713738739490509, 0.6909927725791931, -0.015049059875309467, -0.54755699634552, -0.5477691292762756, 0.053717467933893204, 0.2808855175971985, 0.3456645607948303, 0.5402613282203674, -0.2778710424900055, 0.1579870581626892, -0.5468267202377319, 0.1647079885005951, 0.5988304018974304, -0.37947922945022583, -0.02207285352051258, 0.39607730507850647, 0.38665756583213806, -0.39890971779823303, 0.8374320864677429, -0.24030740559101105, -0.7195698618888855, 0.936296284198761, 0.2983807325363159, 0.999552309513092, 0.12366700172424316, 0.40857455134391785, 0.4731746315956116, 0.5352744460105896, 0.15318609774112701, 0.256298303604126, 0.0776144489645958, -0.6485106348991394, -0.40996667742729187, -0.7145856618881226, -0.23602472245693207, 0.37613022327423096, -0.6630852222442627, 0.06947356462478638, -0.5676851868629456, -0.035395700484514236, 0.07609903067350388, 0.2936970889568329, -0.8810985684394836, 0.2207859456539154, -0.05165039002895355, 0.8972617387771606, -0.5192179679870605, 0.5419501066207886, 0.9360529780387878, -0.5573304891586304, -0.7136046290397644, -0.13943131268024445, -0.2824469208717346, -1.112918496131897, 0.3636702299118042, 0.2929023504257202, -0.04066603630781174, 0.20485462248325348, -0.906453549861908, -0.913216769695282, 1.1968255043029785, -0.04582824185490608, -0.4147047698497772, -0.3164234757423401, -0.0750807523727417, 0.49181482195854187, -0.263165682554245, 0.11327777802944183, 0.5070745348930359, 0.4909899830818176, 0.18564170598983765, -0.8557260036468506, 0.2609376907348633, -0.35647377371788025, 0.007901333272457123, 0.024986468255519867, -0.7021237015724182, 0.7232941389083862, -0.11486303806304932, -0.2553645670413971, 0.36364805698394775, 0.5039856433868408, 0.1440247744321823, -0.0064986818470060825, 0.5165813565254211, 0.5165886282920837, 0.7929253578186035, 0.009226247668266296, 0.7644006013870239, -0.14213092625141144, 0.6337199807167053, 1.0901813507080078, -0.14812223613262177, 1.018113613128662, 0.3325141966342926, -0.3249453902244568, 0.6859828233718872, 0.6787856221199036, -0.4608958661556244, 0.4296908676624298, 0.24724137783050537, -0.0007944886456243694, -0.4182482957839966, 0.06714042276144028, -0.6609712243080139, 0.45790067315101624, 0.18458834290504456, -0.19424684345722198, -0.22843456268310547, -0.3422190845012665, -0.14294888079166412, -0.09779472649097443, -0.1348084807395935, 0.896146833896637, -0.09596879780292511, -0.48269009590148926, 0.7535951733589172, -0.04814354330301285, 0.834628164768219, -0.7843496203422546, -0.003248749766498804, -0.20375600457191467, 0.11663231253623962, -0.14687861502170563, -0.9851372838020325, 0.1777874231338501, -0.15324753522872925, -0.4029678702354431, -0.12527227401733398, 0.5546787977218628, -0.5363352298736572, -0.869693398475647, 0.05804247409105301, 0.46602869033813477, 0.23775973916053772, -0.14197929203510284, -0.955958366394043, -0.22663821280002594, -0.0059549761936068535, -0.1908721774816513, 0.13119639456272125, 0.37737298011779785, 0.23329272866249084, 0.5498944520950317, 0.7966384887695312, -0.03699169680476189, -0.03141716122627258, -0.0506950207054615, 0.848238468170166, -0.7837724685668945, -0.43381232023239136, -0.6813187003135681, 0.5993024706840515, -0.32932502031326294, -0.41111794114112854, 0.58846116065979, 0.6643621325492859, 0.7789520621299744, -0.15751682221889496, 0.7308799624443054, -0.1999993473291397, 0.6296491026878357, -0.42666319012641907, 1.078292727470398, -0.8050149083137512, -0.029905840754508972, 0.03131132572889328, -0.7865519523620605, -0.20234546065330505, 0.8626396656036377, 0.05111584812402725, 0.06865062564611435, 0.6905328631401062, 0.8157894611358643, 0.09301333874464035, -0.27927109599113464, 0.10093645751476288, 0.403751015663147, 0.18278241157531738, 0.8380283117294312, 0.6721143126487732, -0.6899440288543701, 0.7319043278694153, -0.24012240767478943, -0.051781266927719116, -0.3323211967945099, -0.6815083026885986, -0.9632977247238159, -0.72685307264328, -0.3207503855228424, -0.6344987750053406, 0.005335474386811256, 0.7825070023536682, 0.8509964346885681, -0.982679545879364, -0.1653078943490982, 0.046957746148109436, 0.2265951782464981, -0.18443606793880463, -0.3214423656463623, 0.47522956132888794, -0.3073050081729889, -0.5249683856964111, 0.3571525514125824, -0.07074989378452301, -0.05838455259799957, -0.33965757489204407, 0.23471719026565552, -0.7848064303398132, 0.037071116268634796, 0.5927895307540894, 0.3866533041000366, -0.7177748084068298, -0.14342603087425232, 0.13368257880210876, -0.2668771743774414, -0.08904361724853516, 0.40061432123184204, -0.8883269429206848, 0.30945420265197754, 0.5243474245071411, 0.8457320928573608, 0.5718409419059753, -0.11810179799795151, 0.553026556968689, -0.789509654045105, 0.08827699720859528, 0.47606754302978516, 0.18862605094909668, 0.31383296847343445, -0.5350844860076904, 0.7047598958015442, 0.00966483075171709, -0.468345582485199, -0.799726665019989, 0.004037489648908377, -0.8876829743385315, -0.5379618406295776, 1.2272511720657349, 0.08720938861370087, -0.19708798825740814, 0.11192349344491959, -0.16352982819080353, 0.15128564834594727, -0.4736575484275818, 0.7710980772972107, 0.8368579745292664, 0.27630922198295593, 0.09345737099647522, -0.6190622448921204, 0.40768444538116455, 0.5147126317024231, -0.7887694835662842, -0.0761260986328125, 0.4234074056148529, 0.25403696298599243, 0.23112516105175018, 0.5793594121932983, 0.18177011609077454, 0.47819507122039795, -0.2898513376712799, 0.25585615634918213, -0.08134061098098755, -0.04588135704398155, -0.39585229754447937, -0.07752680778503418, -0.32122111320495605, -0.5316982865333557 ]
sentence-transformers/paraphrase-multilingual-mpnet-base-v2
sentence-transformers
"2023-11-02T09:45:42Z"
418,596
161
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "xlm-roberta", "feature-extraction", "sentence-similarity", "transformers", "multilingual", "ar", "bg", "ca", "cs", "da", "de", "el", "en", "es", "et", "fa", "fi", "fr", "gl", "gu", "he", "hi", "hr", "hu", "hy", "id", "it", "ja", "ka", "ko", "ku", "lt", "lv", "mk", "mn", "mr", "ms", "my", "nb", "nl", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sr", "sv", "th", "tr", "uk", "ur", "vi", "arxiv:1908.10084", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- language: - multilingual - ar - bg - ca - cs - da - de - el - en - es - et - fa - fi - fr - gl - gu - he - hi - hr - hu - hy - id - it - ja - ka - ko - ku - lt - lv - mk - mn - mr - ms - my - nb - nl - pl - pt - ro - ru - sk - sl - sq - sr - sv - th - tr - uk - ur - vi language_bcp47: - fr-ca - pt-br - zh-cn - zh-tw pipeline_tag: sentence-similarity license: apache-2.0 tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # sentence-transformers/paraphrase-multilingual-mpnet-base-v2 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-mpnet-base-v2') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/paraphrase-multilingual-mpnet-base-v2') model = AutoModel.from_pretrained('sentence-transformers/paraphrase-multilingual-mpnet-base-v2') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, average pooling sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/paraphrase-multilingual-mpnet-base-v2) ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ```
[ -0.2265872359275818, -0.5790361762046814, 0.41820773482322693, 0.425991952419281, -0.3804851770401001, -0.4084901213645935, -0.13823813199996948, 0.1376020759344101, 0.14283010363578796, 0.49672701954841614, -0.3890417516231537, -0.31742680072784424, -0.7512626051902771, 0.13515342772006989, -0.42614543437957764, 0.811619758605957, -0.20802666246891022, -0.007634734734892845, -0.31804221868515015, -0.2711564898490906, -0.054780248552560806, -0.5070069432258606, -0.4341811239719391, -0.2892448902130127, 0.3694882392883301, 0.21543985605239868, 0.5284305214881897, 0.5146691203117371, 0.3685929477214813, 0.4387705326080322, -0.04509149119257927, 0.12168142199516296, -0.11760973185300827, -0.0962965339422226, -0.07140505313873291, -0.2704133689403534, -0.023896770551800728, 0.19631801545619965, 0.6821991205215454, 0.4205499291419983, -0.16072914004325867, 0.11783570796251297, 0.13959549367427826, 0.22205589711666107, -0.5244819521903992, 0.5108325481414795, -0.6982418298721313, 0.17349392175674438, 0.061854515224695206, -0.019931087270379066, -0.49300849437713623, 0.0011491382028907537, 0.19842146337032318, -0.33527520298957825, 0.10732743889093399, 0.03754540905356407, 1.0224896669387817, 0.22802481055259705, -0.41687989234924316, -0.2125108689069748, -0.17292693257331848, 0.8743385076522827, -0.9303800463676453, 0.13369956612586975, 0.34181681275367737, 0.05353675037622452, 0.14028474688529968, -1.1892917156219482, -0.7627171277999878, -0.17327943444252014, -0.520769476890564, 0.15871991217136383, -0.3021566867828369, -0.0445881187915802, 0.08961828052997589, 0.1269301474094391, -0.6065619587898254, -0.2675358057022095, -0.4624065160751343, -0.24414916336536407, 0.3502027094364166, 0.009930850006639957, 0.3880388140678406, -0.6888940930366516, -0.49983537197113037, -0.31723248958587646, -0.11461789906024933, -0.05247572064399719, 0.11665944010019302, 0.2460649460554123, -0.32473549246788025, 0.8589840531349182, -0.15887024998664856, 0.5131043195724487, -0.14343330264091492, 0.08255650848150253, 0.6367160677909851, -0.484793484210968, -0.1604892760515213, -0.11871499568223953, 1.202495813369751, 0.4507352411746979, 0.30980879068374634, -0.09292411804199219, -0.1312386840581894, -0.16485556960105896, 0.05675576999783516, -0.8389060497283936, -0.37844109535217285, 0.11228860169649124, -0.5074162483215332, -0.2516076862812042, 0.22226865589618683, -0.8153574466705322, -0.10405471920967102, -0.058065030723810196, 0.6670064330101013, -0.6321659684181213, 0.039775535464286804, 0.10690122097730637, -0.4035692811012268, 0.2393556535243988, -0.4380584955215454, -0.6424910426139832, 0.13776367902755737, 0.4223119020462036, 1.2082042694091797, 0.08661800622940063, -0.7942882180213928, -0.3270042836666107, -0.0104464590549469, 0.21728017926216125, 0.6421513557434082, -0.40946537256240845, 0.023233648389577866, -0.0446234755218029, 0.24202392995357513, -0.7690872550010681, -0.39244699478149414, 0.6802495121955872, -0.1611688882112503, 0.5852344632148743, 0.06694082170724869, -0.627888023853302, -0.14397501945495605, 0.11482329666614532, -0.4088408946990967, 0.9547375440597534, 0.08419212698936462, -0.9911535978317261, -0.10060544312000275, -0.6818755269050598, -0.294408917427063, -0.212614968419075, 0.05345667526125908, -0.6713947057723999, 0.03801605477929115, 0.501396894454956, 0.7866196036338806, -0.01579964905977249, 0.35705462098121643, -0.2638948857784271, -0.3296051621437073, 0.41450873017311096, -0.4889830946922302, 1.1151663064956665, 0.25417453050613403, -0.42055895924568176, 0.10896431654691696, -0.4608454406261444, -0.06154375523328781, 0.20342636108398438, -0.19382068514823914, -0.06947710365056992, 0.04323183000087738, 0.2474248856306076, 0.5621760487556458, 0.3148442208766937, -0.6498345732688904, -0.06474348902702332, -0.41539737582206726, 1.0794979333877563, 0.528049886226654, 0.15498295426368713, 0.5496793389320374, -0.386769562959671, 0.21278581023216248, 0.37840864062309265, 0.09155572950839996, -0.22966530919075012, -0.4780222773551941, -0.8804269433021545, -0.23527485132217407, 0.22511306405067444, 0.7277262210845947, -0.9610036015510559, 0.7543808221817017, -0.45132574439048767, -0.48236197233200073, -0.6456233859062195, 0.06013218313455582, 0.2238491028547287, 0.4927162528038025, 0.7147688269615173, 0.03789334371685982, -0.5451897382736206, -1.1120378971099854, -0.09745166450738907, -0.008384551852941513, 0.039845310151576996, 0.26456594467163086, 0.7247950434684753, -0.27901074290275574, 0.7684677839279175, -0.4575079679489136, -0.2731112837791443, -0.48801732063293457, 0.2751884460449219, 0.2419591248035431, 0.6294266581535339, 0.5365708470344543, -0.8792518973350525, -0.5632572770118713, -0.4088417589664459, -0.7958911061286926, -0.04208000376820564, -0.3565017282962799, -0.2246372401714325, 0.026258232071995735, 0.587405800819397, -0.9307520985603333, 0.17759376764297485, 0.5770206451416016, -0.46679404377937317, 0.38710588216781616, -0.3237445652484894, -0.052522122859954834, -1.527854323387146, 0.1348591446876526, 0.008836568333208561, -0.10922165215015411, -0.36879244446754456, 0.2199166864156723, 0.2653973698616028, -0.2415289282798767, -0.5813199281692505, 0.36358797550201416, -0.43631795048713684, 0.2077150046825409, -0.026456810534000397, 0.3293021321296692, -0.008271252736449242, 0.789188802242279, -0.09417270869016647, 0.8488258123397827, 0.6229056119918823, -0.5383837223052979, 0.4032249450683594, 0.5016745924949646, -0.4562879204750061, 0.2483801543712616, -0.856776237487793, -0.08181654661893845, -0.04377846047282219, 0.354148268699646, -1.1071341037750244, -0.08681408315896988, 0.3929721415042877, -0.508316159248352, -0.017602043226361275, 0.14951558411121368, -0.6783130168914795, -0.5624697804450989, -0.3889908194541931, 0.07092486321926117, 0.4965977072715759, -0.4717419445514679, 0.5459914207458496, 0.1722409874200821, -0.18583406507968903, -0.6085429191589355, -1.1066142320632935, 0.30292609333992004, -0.29980090260505676, -0.6113684773445129, 0.5056016445159912, -0.0521358884871006, 0.15469320118427277, 0.08598577976226807, 0.24950458109378815, -0.22710470855236053, -0.0639992505311966, -0.123508982360363, 0.04940519481897354, -0.14508801698684692, 0.037753041833639145, 0.18003614246845245, -0.09793847799301147, 0.1301492601633072, -0.2991330623626709, 0.7550705075263977, -0.15326038002967834, -0.11653020232915878, -0.5586473941802979, 0.3796531856060028, 0.6854481101036072, -0.3433075547218323, 1.2281012535095215, 1.0240646600723267, -0.24006043374538422, 0.14966686069965363, -0.41251665353775024, -0.172633558511734, -0.4577329456806183, 0.6316611766815186, -0.33189260959625244, -0.7487211227416992, 0.43309837579727173, 0.3048253059387207, -0.028336958959698677, 0.6692579984664917, 0.5365478992462158, -0.08094295859336853, 0.8460854887962341, 0.3511497974395752, -0.03591596335172653, 0.461720734834671, -0.42734506726264954, 0.2255876362323761, -0.9278653264045715, -0.1691180169582367, -0.34574049711227417, -0.3222901523113251, -0.6675474047660828, -0.5013940930366516, 0.21055996417999268, -0.011634853668510914, -0.25549742579460144, 0.7302837371826172, -0.44453999400138855, 0.2667556703090668, 0.7641112804412842, 0.30494698882102966, -0.19856300950050354, 0.09095513820648193, -0.5909618139266968, -0.048314519226551056, -0.7139856219291687, -0.5082091689109802, 0.8878362774848938, 0.23409610986709595, 0.2386164367198944, -0.013628057204186916, 0.7109735608100891, -0.09534472227096558, -0.12496786564588547, -0.544395923614502, 0.6531984806060791, -0.3606281876564026, -0.3484382927417755, -0.2008003294467926, -0.5035859942436218, -0.7942281365394592, 0.5130060315132141, -0.0789823830127716, -0.8498018980026245, 0.11879582703113556, -0.22968852519989014, -0.2240883708000183, 0.3828120827674866, -0.9051523208618164, 1.1813361644744873, 0.09593239426612854, -0.08958084881305695, -0.040894053876399994, -0.8514431118965149, 0.21895831823349, 0.05650627985596657, 0.05438028648495674, -0.1032106876373291, -0.20031170547008514, 0.8136304616928101, -0.35890695452690125, 0.816502571105957, -0.20212365686893463, 0.3640902042388916, 0.32817456126213074, -0.2737997770309448, 0.3515395224094391, -0.05382320284843445, -0.20477159321308136, -0.010816659778356552, -0.0504794642329216, -0.5027244091033936, -0.5732234716415405, 0.7241790890693665, -0.9087785482406616, -0.3776056170463562, -0.3931513726711273, -0.6865081191062927, -0.029201459139585495, 0.18572820723056793, 0.39030879735946655, 0.36178240180015564, 0.11106764525175095, 0.6906138062477112, 0.4058258533477783, -0.37460416555404663, 0.824203610420227, 0.021014757454395294, 0.11373726278543472, -0.6129653453826904, 0.7432876229286194, 0.10993776470422745, 0.16553150117397308, 0.6368257403373718, 0.3415316045284271, -0.41933348774909973, -0.2945297658443451, -0.31271806359291077, 0.3836376965045929, -0.6615632176399231, -0.1222681850194931, -1.1886944770812988, -0.4801921844482422, -0.6956554651260376, 0.09571259468793869, -0.1248079314827919, -0.5115154981613159, -0.4593665897846222, -0.18939682841300964, 0.2894674241542816, 0.2596622705459595, -0.024838784709572792, 0.49981969594955444, -0.722955048084259, 0.23330602049827576, 0.2453632354736328, -0.004747544880956411, -0.05049695819616318, -0.7867752313613892, -0.2552711069583893, 0.11273551732301712, -0.40245291590690613, -0.8722509741783142, 0.6427476406097412, 0.355091392993927, 0.6768808364868164, 0.061013784259557724, 0.05865998566150665, 0.6009261012077332, -0.5859746932983398, 0.9339247345924377, 0.10402993112802505, -1.03546142578125, 0.3142067492008209, -0.14373262226581573, 0.5038354992866516, 0.5361568927764893, 0.37345242500305176, -0.5756851434707642, -0.3714183270931244, -0.6820007562637329, -1.0947589874267578, 0.741592526435852, 0.5869261026382446, 0.6295583248138428, -0.2969132661819458, 0.3598523437976837, -0.30733931064605713, 0.1991637796163559, -1.223866581916809, -0.4803372323513031, -0.431248277425766, -0.5242782831192017, -0.4344847798347473, -0.3369368314743042, 0.21833156049251556, -0.44600972533226013, 0.7145548462867737, 0.052635762840509415, 0.8000206351280212, 0.2548379600048065, -0.4506857395172119, 0.418990820646286, 0.2554958760738373, 0.6185335516929626, 0.43379729986190796, -0.040092404931783676, 0.3886178433895111, 0.29239654541015625, -0.3049357533454895, 0.06001974269747734, 0.5437199473381042, -0.11489637941122055, 0.22756773233413696, 0.38166317343711853, 0.9367302656173706, 0.4658813178539276, -0.4037441313266754, 0.7471684217453003, 0.0004548058204818517, -0.3011043965816498, -0.25514742732048035, -0.19662843644618988, 0.42170414328575134, 0.3643614947795868, 0.2746012806892395, 0.13019773364067078, -0.0007733192178420722, -0.3520837724208832, 0.484901487827301, 0.12235253304243088, -0.30298784375190735, -0.022714029997587204, 0.698286235332489, -0.04011634364724159, -0.23471933603286743, 0.8943596482276917, -0.25634002685546875, -0.7417234182357788, 0.48947352170944214, 0.5919458270072937, 1.0048165321350098, 0.005013846792280674, 0.3845643699169159, 0.44927164912223816, 0.3917928636074066, -0.12588739395141602, -0.06269370764493942, -0.026354065164923668, -0.7900099754333496, -0.26668068766593933, -0.6884353160858154, 0.04876719042658806, 0.010952465236186981, -0.5355295538902283, 0.1781502366065979, -0.09117508679628372, 0.049412764608860016, -0.032411325722932816, -0.22173312306404114, -0.4883689880371094, -0.055488575249910355, 0.03622676804661751, 0.7984461784362793, -0.8946996331214905, 0.8891201615333557, 0.6925175786018372, -0.6969048380851746, -0.703186571598053, 0.06969013810157776, -0.3720373809337616, -0.8084508180618286, 0.43985068798065186, 0.4472638666629791, 0.28905603289604187, 0.18988871574401855, -0.4023173451423645, -0.8331896662712097, 1.338707447052002, 0.4443241357803345, -0.22960184514522552, -0.24010471999645233, 0.21711580455303192, 0.394487202167511, -0.39667606353759766, 0.3486006557941437, 0.41154083609580994, 0.3809669315814972, -0.01611306332051754, -0.7638948559761047, 0.196456179022789, -0.304665207862854, 0.15290631353855133, -0.08309559524059296, -0.5761122107505798, 1.1892536878585815, 0.10562041401863098, 0.024741115048527718, 0.27927491068840027, 0.7418517470359802, 0.2607288062572479, -0.0719936192035675, 0.3140558898448944, 0.7206641435623169, 0.4240230917930603, -0.02315983548760414, 1.0580103397369385, -0.42177167534828186, 0.7640337347984314, 1.0708963871002197, 0.1263919472694397, 1.1183034181594849, 0.609883725643158, -0.09739088267087936, 0.6687991619110107, 0.4631044268608093, -0.20947596430778503, 0.6985042095184326, 0.06480644643306732, -0.15973946452140808, -0.08193468302488327, 0.12752744555473328, -0.16166892647743225, 0.4794781506061554, 0.08278602361679077, -0.8627224564552307, -0.2688889801502228, 0.13709621131420135, 0.09678610414266586, -0.02169235609471798, -0.0429520383477211, 0.5628974437713623, 0.24329689145088196, -0.6340355277061462, 0.3909159004688263, 0.32173770666122437, 0.9198315143585205, -0.48386481404304504, 0.19117748737335205, -0.11123630404472351, 0.42441096901893616, 0.09612494707107544, -0.6759162545204163, 0.4799002707004547, -0.20555788278579712, -0.045296669006347656, -0.33751529455184937, 0.5661768317222595, -0.6553995609283447, -0.7033601999282837, 0.3530421853065491, 0.5569286346435547, 0.12758342921733856, -0.1723199337720871, -1.3275641202926636, -0.23511271178722382, 0.08970033377408981, -0.4136730432510376, 0.2761010527610779, 0.3800923824310303, 0.41445884108543396, 0.6096028685569763, 0.32985129952430725, -0.2387915402650833, 0.22353850305080414, 0.016651978716254234, 0.648764967918396, -0.5463905334472656, -0.5269736051559448, -1.123702883720398, 0.6225695610046387, -0.24925535917282104, -0.3833693265914917, 0.9064729809761047, 0.5671371221542358, 0.7791910767555237, -0.25555774569511414, 0.5504451394081116, -0.18961136043071747, 0.15761573612689972, -0.5155259966850281, 0.9030529260635376, -0.4420323371887207, -0.21156330406665802, -0.2935641407966614, -0.9906618595123291, -0.3023693561553955, 1.0293289422988892, -0.2965381145477295, 0.10064326971769333, 1.0340368747711182, 0.8753864169120789, -0.3278489410877228, -0.22819079458713531, 0.15525713562965393, 0.31572338938713074, 0.12525902688503265, 0.5512779355049133, 0.3964996039867401, -0.8226653337478638, 0.9300804138183594, -0.6962400078773499, 0.0548335462808609, 0.05078224837779999, -0.849284827709198, -0.9179379940032959, -0.8717926740646362, -0.4212538003921509, -0.34338125586509705, -0.059635013341903687, 0.9706147909164429, 0.6055609583854675, -0.8050168752670288, -0.19787079095840454, -0.35231661796569824, -0.12178202718496323, -0.17602132260799408, -0.3047213852405548, 0.4903220534324646, -0.5388795137405396, -0.8391213417053223, 0.1799347996711731, -0.0787319540977478, 0.08330021798610687, -0.17769627273082733, 0.11175323277711868, -0.8955947756767273, 0.0571565106511116, 0.5397211909294128, -0.23063752055168152, -0.7292574048042297, -0.24721655249595642, -0.051979467272758484, -0.3822707533836365, -0.03236377239227295, 0.4442993402481079, -0.5092390775680542, 0.132553368806839, 0.4218461215496063, 0.5929149389266968, 0.640540599822998, -0.23258092999458313, 0.4937876760959625, -0.8892767429351807, 0.33688634634017944, 0.023172270506620407, 0.8085656762123108, 0.44132834672927856, -0.15285815298557281, 0.40876540541648865, 0.4171522557735443, -0.4702032804489136, -0.6173619627952576, -0.14190661907196045, -0.9517701864242554, -0.38208600878715515, 1.2483882904052734, -0.47282475233078003, -0.3088575601577759, 0.13421329855918884, -0.2518346905708313, 0.49959102272987366, -0.2467910796403885, 0.5488211512565613, 0.8956699967384338, 0.10670818388462067, -0.4442013204097748, -0.3721841871738434, 0.07614079862833023, 0.5407645106315613, -0.5718270540237427, -0.15859511494636536, 0.13329970836639404, 0.3559570908546448, 0.21985547244548798, 0.26857516169548035, -0.033919453620910645, 0.07993579655885696, 0.1333833634853363, 0.009515752084553242, -0.24962849915027618, -0.002544836141169071, -0.397937148809433, 0.2813935875892639, -0.4484562277793884, -0.35761043429374695 ]
HuggingFaceM4/tiny-random-LlamaForCausalLM
HuggingFaceM4
"2023-10-17T08:20:32Z"
418,528
12
transformers
[ "transformers", "pytorch", "llama", "text-generation", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
"2023-03-16T23:18:46Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
microsoft/speecht5_hifigan
microsoft
"2023-02-02T13:08:06Z"
411,862
11
transformers
[ "transformers", "pytorch", "hifigan", "audio", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
null
"2023-02-02T13:06:10Z"
--- license: mit tags: - audio --- # SpeechT5 HiFi-GAN Vocoder This is the HiFi-GAN vocoder for use with the SpeechT5 text-to-speech and voice conversion models. SpeechT5 was first released in [this repository](https://github.com/microsoft/SpeechT5/), [original weights](https://huggingface.co/mechanicalsea/speecht5-tts). The license used is [MIT](https://github.com/microsoft/SpeechT5/blob/main/LICENSE). Disclaimer: The team releasing SpeechT5 did not write a model card for this model so this model card has been written by the Hugging Face team. ## Citation **BibTeX:** ```bibtex @inproceedings{ao-etal-2022-speecht5, title = {{S}peech{T}5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing}, author = {Ao, Junyi and Wang, Rui and Zhou, Long and Wang, Chengyi and Ren, Shuo and Wu, Yu and Liu, Shujie and Ko, Tom and Li, Qing and Zhang, Yu and Wei, Zhihua and Qian, Yao and Li, Jinyu and Wei, Furu}, booktitle = {Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)}, month = {May}, year = {2022}, pages={5723--5738}, } ```
[ -0.5106208920478821, -0.34818774461746216, -0.04795271158218384, 0.28487151861190796, -0.20612944662570953, -0.169427752494812, -0.03739062696695328, -0.31807342171669006, -0.014018543995916843, 0.352202445268631, -0.6058691143989563, -0.5087340474128723, -0.5280362367630005, 0.0016972552984952927, -0.4057382345199585, 1.2721245288848877, 0.4406265318393707, 0.13680531084537506, -0.02215704694390297, -0.16099020838737488, -0.1336761862039566, -0.7612427473068237, -0.4667537212371826, -0.5609117746353149, 0.4743231236934662, -0.07940225303173065, 0.5011554956436157, 0.3178880512714386, 0.35771387815475464, 0.15565043687820435, -0.5047174096107483, -0.28430208563804626, -0.47246265411376953, -0.27153581380844116, 0.20182666182518005, -0.22283238172531128, -1.0197405815124512, -0.05674254149198532, 0.7525511980056763, 0.32067516446113586, -0.4033346176147461, 0.15915848314762115, -0.044480275362730026, 0.30092766880989075, -0.44228240847587585, 0.225178062915802, -0.4228792190551758, 0.2907794713973999, -0.5623224973678589, -0.06091263145208359, -0.4660026431083679, -0.1991727352142334, -0.15255117416381836, -0.4795297086238861, 0.17360830307006836, 0.00014358776388689876, 1.2182425260543823, 0.381481796503067, -0.42063307762145996, 0.026572534814476967, -0.7067539691925049, 0.44125664234161377, -0.8424338698387146, 0.9951826930046082, 0.1587418019771576, 0.39697661995887756, -0.09990248084068298, -1.11582350730896, -0.9517369270324707, 0.022365214303135872, 0.2776975631713867, 0.3157651722431183, -0.4045751094818115, 0.490619421005249, 0.49758607149124146, 0.5456088781356812, -0.6149628162384033, -0.2771998941898346, -0.7234284281730652, -0.3664315342903137, 0.36641383171081543, -0.4008779227733612, 0.33784016966819763, -0.5272781252861023, -0.7006542682647705, -0.12371847778558731, -0.6210988759994507, -0.09105207771062851, 0.0520276203751564, -0.07859072089195251, -0.6371930837631226, 0.25699716806411743, 0.07492981106042862, 0.5240365266799927, 0.07215919345617294, -0.2095506340265274, 0.7379981279373169, -0.24355266988277435, -0.4903178811073303, 0.09245333820581436, 0.956443727016449, -0.03045031614601612, 0.03198695555329323, -0.049943000078201294, -0.1943674087524414, -0.1014595776796341, 0.3919462561607361, -1.1691553592681885, -0.18455883860588074, 0.016087116673588753, -0.5675076246261597, -0.17938993871212006, 0.19589132070541382, -0.5722152590751648, 0.007341724820435047, 0.12873870134353638, 0.569610059261322, -0.2466462254524231, -0.4281751811504364, -0.06150062009692192, -0.1724325269460678, 0.6205018758773804, 0.12433242052793503, -0.6619933247566223, 0.3013381361961365, 0.32827746868133545, 0.5925620198249817, -0.07064495235681534, -0.37801656126976013, -0.7220303416252136, 0.2588188350200653, -0.10691559314727783, 0.30005812644958496, -0.255440890789032, -0.4719369113445282, -0.17802247405052185, 0.10398942232131958, 0.21697920560836792, -0.5085727572441101, 1.2089003324508667, -0.8038027286529541, 0.5586870312690735, -0.3504989445209503, -0.3051021099090576, -0.2452617585659027, 0.0525088757276535, -0.6986335515975952, 1.0718979835510254, 0.019243130460381508, -0.6296105980873108, 0.30959340929985046, -1.223730206489563, -0.1390579491853714, 0.28951093554496765, -0.14574120938777924, -0.6512672901153564, -0.08659304678440094, 0.1941390037536621, 0.4596185088157654, -0.4423103630542755, 0.014127238653600216, -0.14764827489852905, -0.32243552803993225, 0.0380578339099884, -0.5414288640022278, 1.143108606338501, 0.5356345176696777, -0.3643001616001129, 0.3808256685733795, -0.7655931711196899, -0.12160619348287582, 0.0991915762424469, -0.42515993118286133, 0.18394267559051514, -0.22311924397945404, 0.4833427667617798, 0.27845343947410583, 0.14189580082893372, -0.6830869317054749, 0.03734932094812393, -0.17012424767017365, 0.5512126684188843, 0.42103835940361023, -0.08735004812479019, 0.08342989534139633, -0.12010575085878372, 0.5607908368110657, 0.3046596050262451, 0.17662958800792694, -0.08941879123449326, -0.6800724864006042, -0.4982914924621582, -0.2794337868690491, 0.4343360364437103, 0.34434837102890015, -0.822284460067749, 0.5478602647781372, -0.38696756958961487, -0.44730374217033386, -0.7402728199958801, -0.19089075922966003, 0.3370989263057709, 0.4275689125061035, 0.5041375756263733, -0.24602912366390228, -0.5609093904495239, -0.6128889918327332, -0.0411277711391449, -0.26138466596603394, 0.01741654798388481, 0.0680304616689682, 0.41614866256713867, -0.33990034461021423, 0.8185739517211914, -0.08991118520498276, -0.3891203999519348, -0.2129082977771759, 0.24207405745983124, -0.07836317270994186, 0.5559070110321045, 0.7936007380485535, -0.8828535676002502, -0.26206567883491516, -0.05417511984705925, -0.5298585295677185, -0.22557620704174042, 0.22430087625980377, 0.027752991765737534, 0.16021744906902313, 0.3686906099319458, -0.6607096791267395, 0.5496437549591064, 0.8967976570129395, -0.3601186275482178, 0.3954780697822571, -0.09472335129976273, 0.1001424789428711, -1.54291570186615, 0.13320720195770264, -0.2702026069164276, -0.47265487909317017, -0.6548225283622742, -0.18245241045951843, -0.0320977158844471, -0.4042232632637024, -0.5484780669212341, 0.4694686233997345, -0.6051163077354431, -0.19673551619052887, -0.18632911145687103, -0.1334105134010315, -0.17959296703338623, 0.6886943578720093, -0.19327642023563385, 1.1203168630599976, 0.4900282621383667, -0.6462764143943787, 0.5845458507537842, 0.6654229760169983, -0.04245999455451965, 0.6971566677093506, -1.1080116033554077, 0.45299074053764343, -0.17818357050418854, 0.3153827488422394, -0.43335211277008057, -0.3034387230873108, 0.2934552729129791, -0.9210017323493958, 0.2097470909357071, -0.3171617090702057, -0.2640683948993683, -0.3934725224971771, 0.08472365885972977, 0.5605817437171936, 0.9241469502449036, -0.7806669473648071, 0.5384386777877808, 0.5801119804382324, 0.2869330048561096, -0.30452030897140503, -0.9142172336578369, 0.0790395513176918, -0.09725520014762878, -0.502730667591095, 0.8443002700805664, -0.28608089685440063, 0.38508152961730957, 0.07952862232923508, 0.1294759213924408, -0.06953749805688858, -0.48725631833076477, 0.25495949387550354, -0.17303825914859772, -0.1954474151134491, -0.1638350933790207, -0.12598572671413422, -0.18661433458328247, 0.1536499708890915, -0.3908153772354126, 0.5240769982337952, -0.3269850015640259, -0.416441410779953, -0.726341962814331, 0.29492098093032837, 1.004876732826233, -0.6263855695724487, 0.5103362798690796, 1.2858281135559082, -0.668597400188446, -0.08897565305233002, -0.3802768588066101, 0.07182585448026657, -0.48935213685035706, 0.4347739815711975, -0.6902127861976624, -0.7514197826385498, 0.521813154220581, 0.20131245255470276, -0.2426249086856842, 0.6402194499969482, 0.7711937427520752, 0.010194600559771061, 0.94657963514328, 0.6234337687492371, -0.17211121320724487, 0.7531415224075317, -0.15625663101673126, 0.17743757367134094, -1.141555905342102, -0.4796028137207031, -0.5985155701637268, -0.15071739256381989, -0.5415629148483276, -0.4301387667655945, 0.712061882019043, -0.022399934008717537, -0.29474925994873047, 0.3362444341182709, -0.6534608006477356, 0.2144031971693039, 0.6110891103744507, -0.04576059430837631, 0.058299656957387924, 0.0263356976211071, 0.001164137152954936, -0.06419289857149124, -0.860442578792572, -0.14109888672828674, 0.6829912662506104, 0.6356760859489441, 0.6096024513244629, 0.31614023447036743, 0.6218947768211365, 0.23511135578155518, -0.022764606401324272, -0.6371414065361023, 0.46064096689224243, -0.22688116133213043, -0.6103807687759399, -0.18453067541122437, -0.41109979152679443, -1.189311146736145, 0.042954541742801666, -0.009426712989807129, -0.5046108365058899, 0.2693157196044922, 0.04677926003932953, -0.2448263168334961, 0.3653154671192169, -0.6188618540763855, 1.1119128465652466, 0.022903652861714363, 0.04905892536044121, -0.004675982054322958, -0.6006051898002625, 0.22620493173599243, 0.5838503837585449, -0.08493956178426743, 0.05622619017958641, 0.2827939987182617, 1.072251319885254, -0.4379507601261139, 0.8080261945724487, -0.45881345868110657, -0.05137328431010246, 0.3075467646121979, -0.39100658893585205, 0.2702430486679077, -0.1311817318201065, 0.0494048036634922, 0.37264469265937805, 0.4546339809894562, -0.5334088802337646, -0.5319804549217224, 0.5550550222396851, -1.0491883754730225, -0.15611161291599274, -0.4766817092895508, -0.260368674993515, -0.01548548974096775, 0.3987275958061218, 0.5280086398124695, 0.5293374061584473, -0.3396519422531128, 0.5173928737640381, 0.7854923009872437, -0.0734742134809494, 0.5330241918563843, -0.02922317013144493, -0.22776567935943604, -0.7435128092765808, 0.8513728976249695, -0.027384480461478233, 0.28938207030296326, 0.17887689173221588, 0.1304011344909668, -0.13668060302734375, -0.49995967745780945, -0.6097134351730347, 0.22853896021842957, -0.3598102629184723, -0.2629164755344391, -0.4444025158882141, -0.7552866339683533, -0.5779620409011841, 0.19390147924423218, -0.4847123920917511, 0.15280091762542725, -0.30374568700790405, 0.174529030919075, 0.28496330976486206, 0.7890642881393433, 0.037871092557907104, 0.5140573382377625, -0.978935956954956, 0.6031109094619751, 0.3623361587524414, 0.44425511360168457, -0.13566890358924866, -0.539280354976654, -0.26447466015815735, 0.14526286721229553, -0.3355032801628113, -1.276605486869812, 0.46435055136680603, 0.3350647985935211, 0.7066643238067627, 0.27963757514953613, 0.02542496845126152, 0.5825743675231934, -0.23226375877857208, 1.0456293821334839, 0.2781507074832916, -1.1450039148330688, 0.29109102487564087, -0.481749027967453, 0.6707470417022705, 0.1622346192598343, 0.1630128026008606, -0.7125019431114197, 0.27653011679649353, -0.7716507315635681, -0.37455400824546814, 0.8022755980491638, 0.45571592450141907, 0.2746030390262604, 0.30525049567222595, 0.28941333293914795, -0.24503514170646667, 0.46131572127342224, -0.8731606602668762, -0.2414337396621704, -0.6660861968994141, -0.4045845568180084, 0.2425437718629837, -0.5088580250740051, -0.06938473880290985, -0.5031142234802246, 0.6759092807769775, -0.2599722146987915, 0.9881733655929565, 0.3430411219596863, -0.03508806601166725, 0.05929620563983917, 0.3221961259841919, 0.7205508351325989, 0.14212726056575775, -0.15368996560573578, 0.09387917816638947, 0.2514086961746216, -0.7416160702705383, -0.254727303981781, 0.2116679698228836, -0.22880622744560242, 0.16212166845798492, 0.1368965059518814, 1.3754298686981201, 0.01693212054669857, -0.22890281677246094, 0.9902411103248596, -0.03582774102687836, -0.438774049282074, -0.4896242022514343, -0.18533244729042053, 0.13628987967967987, 0.07318531721830368, 0.18478159606456757, 0.09655517339706421, 0.28249016404151917, -0.5893452167510986, 0.09100562334060669, 0.33009278774261475, -0.6289364695549011, -0.7771862149238586, 1.0292209386825562, 0.5100646615028381, -0.39542144536972046, 0.5287384986877441, -0.556614100933075, -0.9208320379257202, 0.16449658572673798, 0.6957024931907654, 1.2719109058380127, -0.3326460123062134, -0.14487969875335693, 0.37217023968696594, 0.21021203696727753, 0.42101919651031494, 0.6831343770027161, -0.2561911642551422, -0.8180509805679321, -0.29589325189590454, -0.7240151762962341, -0.30390626192092896, 0.2292448878288269, -0.78014075756073, 0.5127236843109131, -0.23989835381507874, -0.25600168108940125, -0.20754389464855194, -0.181667298078537, -0.6411230564117432, 0.34553226828575134, 0.39742398262023926, 0.7612600326538086, -0.3005840480327606, 1.1402884721755981, 0.875861406326294, -0.5738991498947144, -0.6958111524581909, 0.29643872380256653, 0.020412733778357506, -0.5429773330688477, 0.46683362126350403, -0.23858776688575745, -0.3472490906715393, 0.29247528314590454, -0.5580666661262512, -0.7623949646949768, 1.158570408821106, 0.46928834915161133, -0.29373466968536377, -0.38087207078933716, -0.1525694578886032, 0.4002174735069275, -0.20121358335018158, 0.18907156586647034, 0.2821100056171417, 0.3857298791408539, 0.5322296023368835, -1.4078726768493652, -0.10105828940868378, -0.4985677897930145, 0.1975187361240387, 0.06430500745773315, -0.9696730375289917, 0.5339595079421997, -0.13424338400363922, -0.11955933272838593, -0.2661905288696289, 1.143331527709961, 0.04334436357021332, 0.14364159107208252, 0.42147761583328247, 0.447456955909729, 0.8045299649238586, -0.23845548927783966, 0.7522731423377991, -0.3026433289051056, 0.3368433713912964, 0.7291761040687561, 0.10180071741342545, 0.8791125416755676, 0.5350781679153442, -0.20609021186828613, 0.4388118088245392, 0.2642264664173126, -0.08945220708847046, 0.37670275568962097, -0.19447331130504608, -0.2146313190460205, -0.07016230374574661, -0.06468205153942108, -0.7253599762916565, 0.6318899989128113, 0.3189759850502014, -0.1492384523153305, -0.022802017629146576, 0.034354813396930695, 0.039426539093256, -0.39921054244041443, -0.1687559187412262, 0.8726953864097595, 0.1052645593881607, -0.06952023506164551, 1.0411142110824585, 0.05489565059542656, 0.9731104969978333, -0.61700040102005, 0.07692062109708786, 0.08525863289833069, -0.01511230506002903, -0.32383087277412415, -0.4668378531932831, 0.6135725975036621, 0.01417096983641386, -0.19121336936950684, -0.35580259561538696, 0.6227501630783081, -0.543663740158081, -0.05446137487888336, 0.1652083545923233, 0.2998376786708832, 0.3440617322921753, 0.19777755439281464, -0.7582799196243286, 0.39291948080062866, 0.10471432656049728, -0.2659681737422943, 0.06073072552680969, 0.35988345742225647, 0.08903300017118454, 0.5556924939155579, 0.6429158449172974, 0.1803857833147049, 0.315878689289093, 0.40306174755096436, 0.7814786434173584, -0.7440311908721924, -0.6731005311012268, -0.34403106570243835, 0.582632839679718, 0.0005741078639402986, -0.6243998408317566, 0.4670802354812622, 0.6124372482299805, 0.8892002105712891, -0.1559349000453949, 0.8480167388916016, -0.2694967985153198, 0.39178553223609924, -0.5863298773765564, 1.1050043106079102, -0.8036577105522156, 0.05124691501259804, -0.11431939154863358, -0.8179938793182373, -0.22416111826896667, 0.4418228268623352, 0.11940018832683563, 0.49743038415908813, 0.637321412563324, 0.7693023085594177, -0.029373779892921448, -0.06987515836954117, 0.6730970144271851, 0.4784172773361206, 0.4757375717163086, 0.36361798644065857, 0.2950330972671509, -0.8014391660690308, 0.6570408940315247, -0.05084956809878349, -0.019051697105169296, -0.1426238864660263, -0.7375608682632446, -1.0096155405044556, -1.0131312608718872, -0.37801963090896606, -0.48315325379371643, 0.21636076271533966, 1.0978636741638184, 1.1362639665603638, -0.7555716633796692, -0.1966518759727478, -0.0990120992064476, -0.13069847226142883, -0.14589658379554749, -0.2122761309146881, 0.1761770248413086, -0.10339928418397903, -0.9536846876144409, 0.4009758234024048, 0.06737275421619415, 0.3784950375556946, -0.42722317576408386, -0.4882742762565613, 0.1189248263835907, -0.026158291846513748, 0.5653361082077026, 0.2839987277984619, -0.9090455770492554, -0.16008123755455017, -0.020213473588228226, -0.24363380670547485, 0.3307288587093353, 0.47499072551727295, -0.6309309005737305, 0.27236515283584595, 0.7735162377357483, 0.5704007744789124, 0.8130502700805664, -0.014090340584516525, 0.6537390351295471, -0.7644774317741394, 0.20518724620342255, 0.22813452780246735, 0.20134586095809937, 0.3826422691345215, -0.20624159276485443, 0.06504222005605698, 0.4713783264160156, -0.6263188719749451, -0.8524346351623535, 0.10982323437929153, -1.4957635402679443, 0.29139044880867004, 1.0376660823822021, 0.11410613358020782, -0.5063316822052002, 0.2352011352777481, -0.4322642385959625, 0.4629681706428528, -0.4681204557418823, 0.2763392925262451, 0.49396589398384094, -0.029589788988232613, -0.7639673948287964, -0.5875030755996704, 1.0261006355285645, 0.2124301791191101, -0.8858723640441895, -0.24772465229034424, 0.2869488000869751, 0.20428933203220367, 0.06592249125242233, 0.6932430863380432, -0.40251225233078003, 0.43367260694503784, 0.16572906076908112, 0.8950521945953369, -0.27042442560195923, -0.3750779926776886, -0.6002933979034424, 0.32571130990982056, 0.13915753364562988, -0.48688608407974243 ]
gpt2-large
null
"2023-06-30T02:33:40Z"
403,229
177
transformers
[ "transformers", "pytorch", "tf", "jax", "rust", "onnx", "safetensors", "gpt2", "text-generation", "en", "arxiv:1910.09700", "license:mit", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2022-03-02T23:29:04Z"
--- language: en license: mit --- # GPT-2 Large ## Table of Contents - [Model Details](#model-details) - [How To Get Started With the Model](#how-to-get-started-with-the-model) - [Uses](#uses) - [Risks, Limitations and Biases](#risks-limitations-and-biases) - [Training](#training) - [Evaluation](#evaluation) - [Environmental Impact](#environmental-impact) - [Technical Specifications](#technical-specifications) - [Citation Information](#citation-information) - [Model Card Authors](#model-card-author) ## Model Details **Model Description:** GPT-2 Large is the **774M parameter** version of GPT-2, a transformer-based language model created and released by OpenAI. The model is a pretrained model on English language using a causal language modeling (CLM) objective. - **Developed by:** OpenAI, see [associated research paper](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) and [GitHub repo](https://github.com/openai/gpt-2) for model developers. - **Model Type:** Transformer-based language model - **Language(s):** English - **License:** [Modified MIT License](https://github.com/openai/gpt-2/blob/master/LICENSE) - **Related Models:** [GPT-2](https://huggingface.co/gpt2), [GPT-Medium](https://huggingface.co/gpt2-medium) and [GPT-XL](https://huggingface.co/gpt2-xl) - **Resources for more information:** - [Research Paper](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) - [OpenAI Blog Post](https://openai.com/blog/better-language-models/) - [GitHub Repo](https://github.com/openai/gpt-2) - [OpenAI Model Card for GPT-2](https://github.com/openai/gpt-2/blob/master/model_card.md) - Test the full generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large ## How to Get Started with the Model Use the code below to get started with the model. You can use this model directly with a pipeline for text generation. Since the generation relies on some randomness, we set a seed for reproducibility: ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='gpt2-large') >>> set_seed(42) >>> generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5) [{'generated_text': "Hello, I'm a language model, I can do language modeling. In fact, this is one of the reasons I use languages. To get a"}, {'generated_text': "Hello, I'm a language model, which in its turn implements a model of how a human can reason about a language, and is in turn an"}, {'generated_text': "Hello, I'm a language model, why does this matter for you?\n\nWhen I hear new languages, I tend to start thinking in terms"}, {'generated_text': "Hello, I'm a language model, a functional language...\n\nI don't need to know anything else. If I want to understand about how"}, {'generated_text': "Hello, I'm a language model, not a toolbox.\n\nIn a nutshell, a language model is a set of attributes that define how"}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import GPT2Tokenizer, GPT2Model tokenizer = GPT2Tokenizer.from_pretrained('gpt2-large') model = GPT2Model.from_pretrained('gpt2-large') text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` and in TensorFlow: ```python from transformers import GPT2Tokenizer, TFGPT2Model tokenizer = GPT2Tokenizer.from_pretrained('gpt2-large') model = TFGPT2Model.from_pretrained('gpt2-large') text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` ## Uses #### Direct Use In their [model card about GPT-2](https://github.com/openai/gpt-2/blob/master/model_card.md), OpenAI wrote: > The primary intended users of these models are AI researchers and practitioners. > > We primarily imagine these language models will be used by researchers to better understand the behaviors, capabilities, biases, and constraints of large-scale generative language models. #### Downstream Use In their [model card about GPT-2](https://github.com/openai/gpt-2/blob/master/model_card.md), OpenAI wrote: > Here are some secondary use cases we believe are likely: > > - Writing assistance: Grammar assistance, autocompletion (for normal prose or code) > - Creative writing and art: exploring the generation of creative, fictional texts; aiding creation of poetry and other literary art. > - Entertainment: Creation of games, chat bots, and amusing generations. #### Misuse and Out-of-scope Use In their [model card about GPT-2](https://github.com/openai/gpt-2/blob/master/model_card.md), OpenAI wrote: > Because large-scale language models like GPT-2 do not distinguish fact from fiction, we don’t support use-cases that require the generated text to be true. > > Additionally, language models like GPT-2 reflect the biases inherent to the systems they were trained on, so we do not recommend that they be deployed into systems that interact with humans unless the deployers first carry out a study of biases relevant to the intended use-case. We found no statistically significant difference in gender, race, and religious bias probes between 774M and 1.5B, implying all versions of GPT-2 should be approached with similar levels of caution around use cases that are sensitive to biases around human attributes. ## Risks, Limitations and Biases **CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propogate historical and current stereotypes.** Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). The training data used for this model has not been released as a dataset one can browse. We know it contains a lot of unfiltered content from the internet, which is far from neutral. Predictions generated by the model can include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. For example: ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='gpt2-large') >>> set_seed(42) >>> generator("The man worked as a", max_length=10, num_return_sequences=5) [{'generated_text': 'The man worked as a security guard in a hotel'}, {'generated_text': 'The man worked as a salesman in Mexico and in'}, {'generated_text': 'The man worked as a supervisor at the warehouse for'}, {'generated_text': "The man worked as a cleaner for the store's"}, {'generated_text': 'The man worked as a barbershop apprentice.'}] >>> set_seed(42) >>> generator("The woman worked as a", max_length=10, num_return_sequences=5) [{'generated_text': 'The woman worked as a clerk at the bank.'}, {'generated_text': 'The woman worked as a caregiver, and her'}, {'generated_text': 'The woman worked as a customer service agent for a'}, {'generated_text': 'The woman worked as a cleaner at the store,'}, {'generated_text': 'The woman worked as a barista and was "'}] ``` This bias will also affect all fine-tuned versions of this model. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. ## Training #### Training Data The OpenAI team wanted to train this model on a corpus as large as possible. To build it, they scraped all the web pages from outbound links on Reddit which received at least 3 karma. Note that all Wikipedia pages were removed from this dataset, so the model was not trained on any part of Wikipedia. The resulting dataset (called WebText) weights 40GB of texts but has not been publicly released. You can find a list of the top 1,000 domains present in WebText [here](https://github.com/openai/gpt-2/blob/master/domains.txt). #### Training Procedure The model is pretrained on a very large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts 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 texts. More precisely, it was trained to guess the next word in sentences. More precisely, inputs are sequences of continuous text of a certain length and the targets are the same sequence, shifted one token (word or piece of word) to the right. The model uses internally a mask-mechanism to make sure the predictions for the token `i` only uses the inputs from `1` to `i` but not the future tokens. This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks. The texts are tokenized using a byte-level version of Byte Pair Encoding (BPE) (for unicode characters) and a vocabulary size of 50,257. The inputs are sequences of 1024 consecutive tokens. ## Evaluation The following evaluation information is extracted from the [associated paper](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf). #### Testing Data, Factors and Metrics The model authors write in the [associated paper](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) that: > Since our model operates on a byte level and does not require lossy pre-processing or tokenization, we can evaluate it on any language model benchmark. Results on language modeling datasets are commonly reported in a quantity which is a scaled or ex- ponentiated version of the average negative log probability per canonical prediction unit - usually a character, a byte, or a word. We evaluate the same quantity by computing the log-probability of a dataset according to a WebText LM and dividing by the number of canonical units. For many of these datasets, WebText LMs would be tested significantly out- of-distribution, having to predict aggressively standardized text, tokenization artifacts such as disconnected punctuation and contractions, shuffled sentences, and even the string <UNK> which is extremely rare in WebText - occurring only 26 times in 40 billion bytes. We report our main results...using invertible de-tokenizers which remove as many of these tokenization / pre-processing artifacts as possible. Since these de-tokenizers are invertible, we can still calculate the log probability of a dataset and they can be thought of as a simple form of domain adaptation. #### Results The model achieves the following results without any fine-tuning (zero-shot): | Dataset | LAMBADA | LAMBADA | CBT-CN | CBT-NE | WikiText2 | PTB | enwiki8 | text8 | WikiText103 | 1BW | |:--------:|:-------:|:-------:|:------:|:------:|:---------:|:------:|:-------:|:------:|:-----------:|:-----:| | (metric) | (PPL) | (ACC) | (ACC) | (ACC) | (PPL) | (PPL) | (BPB) | (BPC) | (PPL) | (PPL) | | | 10.87 | 60.12 | 93.45 | 88.0 | 19.93 | 40.31 | 0.97 | 1.02 | 22.05 | 44.575| ## Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** Unknown - **Hours used:** Unknown - **Cloud Provider:** Unknown - **Compute Region:** Unknown - **Carbon Emitted:** Unknown ## Technical Specifications See the [associated paper](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) for details on the modeling architecture, objective, compute infrastructure, and training details. ## Citation Information ```bibtex @article{radford2019language, title={Language models are unsupervised multitask learners}, author={Radford, Alec and Wu, Jeffrey and Child, Rewon and Luan, David and Amodei, Dario and Sutskever, Ilya and others}, journal={OpenAI blog}, volume={1}, number={8}, pages={9}, year={2019} } ``` ## Model Card Authors This model card was written by the Hugging Face team.
[ -0.14261192083358765, -0.7655117511749268, 0.30019938945770264, 0.10456278920173645, -0.24516063928604126, -0.39045849442481995, -0.41223016381263733, -0.5422861576080322, -0.32062190771102905, 0.42914295196533203, -0.2665485441684723, -0.2577126920223236, -0.6769612431526184, -0.055301371961832047, -0.29343321919441223, 1.3061699867248535, -0.20134182274341583, -0.010752871632575989, 0.11086501181125641, 0.17779885232448578, -0.3263215720653534, -0.4253233075141907, -0.7792841792106628, -0.4416615962982178, 0.2870338261127472, 0.04237573966383934, 0.6990212202072144, 0.5342146754264832, 0.3006064295768738, 0.21165971457958221, -0.07062176614999771, -0.1140812337398529, -0.4260636866092682, -0.1609571874141693, -0.16627278923988342, -0.36682331562042236, -0.3893719017505646, 0.23460263013839722, 0.5284938216209412, 0.3177104592323303, 0.06521642208099365, 0.25518471002578735, 0.209467351436615, 0.3184543251991272, -0.1670711785554886, 0.4651797115802765, -0.4201487898826599, -0.09801757335662842, -0.30904287099838257, 0.2071966975927353, -0.3885580897331238, -0.29926446080207825, 0.10548391193151474, -0.46472159028053284, 0.30089157819747925, -0.2133217602968216, 1.060484766960144, 0.13228446245193481, -0.44280728697776794, -0.27065926790237427, -0.8061569929122925, 0.7396067380905151, -0.7577536106109619, 0.2780352830886841, 0.5103742480278015, 0.158907949924469, -0.03183704614639282, -0.9196744561195374, -0.6907468438148499, -0.20704655349254608, -0.3073141276836395, 0.2243214249610901, -0.16355140507221222, -0.03309288248419762, 0.38232845067977905, 0.3574991524219513, -0.8703709840774536, 0.04370361566543579, -0.5064567923545837, -0.16565324366092682, 0.43563270568847656, -0.0978296771645546, 0.4721904993057251, -0.29761144518852234, -0.20933537185192108, -0.2897981107234955, -0.6195008754730225, -0.07341545820236206, 0.5417148470878601, 0.21413955092430115, -0.3221132755279541, 0.6485155820846558, 0.07412061840295792, 0.4347565174102783, -0.2511272132396698, -0.1470901370048523, 0.27386465668678284, -0.4648537337779999, -0.14064158499240875, -0.3942803740501404, 1.0583268404006958, 0.3393368422985077, 0.4513120949268341, -0.1502605825662613, -0.1983201950788498, 0.041221797466278076, 0.02615250088274479, -0.8993013501167297, -0.33462610840797424, 0.1967809498310089, -0.4495483636856079, -0.3208109736442566, -0.011758057400584221, -0.9374127984046936, -0.08964669704437256, -0.16051343083381653, 0.3107503652572632, -0.3713129460811615, -0.6467669606208801, -0.18093973398208618, -0.2974729537963867, 0.2579088509082794, 0.03142155706882477, -1.0861603021621704, 0.1954699605703354, 0.6180375814437866, 0.9455815553665161, 0.13605082035064697, -0.3439621925354004, -0.009910698048770428, 0.020015863701701164, -0.1350555270910263, 0.44719961285591125, -0.2793119251728058, -0.2416626662015915, -0.008431388065218925, 0.023347491398453712, -0.047991108149290085, -0.2691803276538849, 0.4733617305755615, -0.4101943373680115, 0.7877498865127563, -0.17678053677082062, -0.2458335906267166, -0.1622377634048462, -0.056470926851034164, -0.579470157623291, 1.196955919265747, 0.4976275861263275, -0.9373961091041565, 0.19276657700538635, -0.8853082060813904, -0.3966851830482483, -0.081534743309021, -0.06281919777393341, -0.45127975940704346, -0.09746850281953812, 0.03717636689543724, 0.13325271010398865, -0.5617818236351013, 0.45305135846138, 0.06642758101224899, -0.16321507096290588, 0.11534963548183441, -0.4604070484638214, 1.1065115928649902, 0.4071565568447113, -0.5728932023048401, -0.06825585663318634, -0.35236749053001404, -0.021273020654916763, 0.46732062101364136, -0.44779735803604126, -0.1092410758137703, 0.00578658003360033, 0.5147237181663513, 0.37116214632987976, 0.18500252068042755, -0.39669206738471985, 0.2260797917842865, -0.5473514199256897, 0.7715646028518677, 0.6360476016998291, -0.2676987051963806, 0.32417118549346924, -0.15696364641189575, 0.32923582196235657, -0.01788323186337948, 0.07786507159471512, -0.014388373121619225, -0.8246009349822998, -0.6443139910697937, -0.028945647180080414, 0.4211976230144501, 0.7825169563293457, -0.7703991532325745, 0.42599278688430786, -0.2721305787563324, -0.48121267557144165, -0.3925979733467102, 0.07261697202920914, 0.5900598168373108, 0.38139867782592773, 0.38716983795166016, -0.19716109335422516, -0.6391956210136414, -0.7519185543060303, -0.2744287848472595, -0.39345690608024597, -0.222122922539711, 0.19683749973773956, 0.7360901832580566, -0.36211109161376953, 0.9553629755973816, -0.5311939716339111, -0.2559796869754791, -0.45604634284973145, 0.17997169494628906, 0.1865558624267578, 0.5339120030403137, 0.5770171880722046, -0.7442547678947449, -0.4820236265659332, -0.10633095353841782, -0.7868414521217346, 0.004637076053768396, 0.042859990149736404, -0.011691183783113956, 0.3849591612815857, 0.22291794419288635, -0.8856964111328125, 0.1861674189567566, 0.4685432016849518, -0.4722222685813904, 0.5608507394790649, -0.19334983825683594, -0.1755862981081009, -1.3656446933746338, 0.3513577878475189, 0.19953066110610962, -0.03403649106621742, -0.8037346601486206, 0.17603187263011932, -0.10363347828388214, -0.18749797344207764, -0.2699289321899414, 0.7983381152153015, -0.411066472530365, 0.07108449935913086, -0.17988000810146332, -0.004402577877044678, -0.23929531872272491, 0.5592176914215088, 0.07211082428693771, 1.0262305736541748, 0.4076780676841736, -0.38580265641212463, 0.2648002803325653, 0.319949746131897, -0.39467379450798035, 0.006498637143522501, -0.8103391528129578, 0.3237619996070862, -0.10818690061569214, 0.2561326026916504, -0.932739794254303, -0.38605859875679016, 0.45380866527557373, -0.6175240874290466, 0.40606239438056946, -0.2827872931957245, -0.8000280261039734, -0.550029456615448, -0.1531001776456833, 0.40867000818252563, 0.9088594317436218, -0.3730936348438263, 0.28742796182632446, 0.4290265142917633, -0.28469863533973694, -0.3876703083515167, -0.8360620141029358, 0.09920026361942291, -0.17351002991199493, -0.5927600860595703, 0.25901180505752563, 0.21247261762619019, -0.15678386390209198, -0.05828411504626274, 0.3090096116065979, -0.13671772181987762, 0.004216398112475872, 0.12190516293048859, 0.23943567276000977, -0.1907855123281479, 0.02864263765513897, -0.028667844831943512, -0.2833716571331024, 0.06904417276382446, -0.486345499753952, 0.6978398561477661, -0.04444973170757294, -0.003361038863658905, -0.3678290545940399, 0.26480159163475037, 0.30999699234962463, -0.23272407054901123, 0.6961570978164673, 0.999151349067688, -0.4873417615890503, 0.1515350490808487, -0.415225625038147, -0.2604199945926666, -0.4290153384208679, 0.7720274925231934, -0.1934213489294052, -0.9255633354187012, 0.35690784454345703, 0.18030285835266113, 0.09400780498981476, 0.7435927987098694, 0.7547778487205505, 0.16931447386741638, 1.0233229398727417, 0.5531637072563171, -0.2131163477897644, 0.5143265724182129, -0.3044004738330841, 0.33783572912216187, -0.8536166548728943, -0.1994086503982544, -0.5574226379394531, -0.024394499137997627, -0.85716313123703, -0.46159476041793823, 0.18490302562713623, 0.23730678856372833, -0.4709729850292206, 0.5148128867149353, -0.5652883648872375, 0.2979823350906372, 0.7678905725479126, -0.06578698009252548, 0.010097302496433258, 0.2128191590309143, -0.003184322500601411, 0.03643428534269333, -0.43504399061203003, -0.7283456921577454, 1.287701964378357, 0.6281443238258362, 0.5019893050193787, 0.20034727454185486, 0.2931203842163086, 0.051821108907461166, 0.289362370967865, -0.45463916659355164, 0.34462788701057434, -0.3333238363265991, -0.7962644696235657, -0.40578773617744446, -0.48703452944755554, -0.8723535537719727, 0.14044560492038727, 0.14322371780872345, -0.9929359555244446, -0.08416403830051422, 0.19767196476459503, -0.05064980685710907, 0.3806784152984619, -0.8509781956672668, 1.0535495281219482, -0.20979805290699005, -0.28287896513938904, -0.02253038063645363, -0.6756997108459473, 0.4583539068698883, 0.03825927525758743, 0.11912436038255692, 0.17631855607032776, 0.11608435213565826, 0.881453275680542, -0.48623740673065186, 0.9214319586753845, -0.32616809010505676, -0.10837586224079132, 0.456842839717865, -0.17922453582286835, 0.600628137588501, -0.006693113129585981, -0.022901756688952446, 0.3897947669029236, -0.18402591347694397, -0.2270771861076355, -0.2734195291996002, 0.542008101940155, -1.0886954069137573, -0.3718217611312866, -0.4426644444465637, -0.4156358242034912, 0.1754462718963623, 0.32919952273368835, 0.5867883563041687, 0.3608972132205963, -0.09335680305957794, -0.09024111181497574, 0.43546444177627563, -0.40615344047546387, 0.4254528284072876, 0.18285074830055237, -0.17158390581607819, -0.4431181252002716, 0.8841663002967834, 0.09509148448705673, 0.25305381417274475, 0.2764950692653656, 0.16667617857456207, -0.5466626286506653, -0.3779197633266449, -0.590488612651825, 0.3810636103153229, -0.5570948719978333, 0.029569990932941437, -0.7401937246322632, -0.323870986700058, -0.7083308100700378, 0.33487722277641296, -0.20536649227142334, -0.4180928170681, -0.3320505917072296, -0.10528614372015, 0.4137818515300751, 0.7694367170333862, 0.015209569595754147, 0.42724350094795227, -0.41561660170555115, 0.2963706851005554, 0.356708824634552, 0.4806402921676636, -0.07364625483751297, -0.683760404586792, -0.14741018414497375, 0.28107625246047974, -0.47564342617988586, -0.7987711429595947, 0.3088541328907013, 0.029210830107331276, 0.38550394773483276, 0.2351991832256317, -0.26956650614738464, 0.22519353032112122, -0.44081470370292664, 1.068847417831421, 0.16439786553382874, -0.7405899167060852, 0.5016893148422241, -0.474081814289093, 0.150002121925354, 0.25370046496391296, 0.2514442205429077, -0.6698277592658997, -0.27226948738098145, -0.49752768874168396, -0.932426929473877, 0.9892597794532776, 0.5584709048271179, 0.3013889193534851, -0.06087743863463402, 0.3829306662082672, -0.038014985620975494, 0.11291048675775528, -1.1238572597503662, -0.36797839403152466, -0.5283729434013367, -0.3090030550956726, -0.1805426925420761, -0.4864226281642914, 0.01160003524273634, -0.18667663633823395, 0.7817280292510986, 0.056295644491910934, 0.7789411544799805, -0.003863750724121928, -0.22219936549663544, -0.023771455511450768, 0.2791808247566223, 0.7196698784828186, 0.5221554040908813, -0.08925767987966537, 0.08313846588134766, 0.04240599647164345, -0.7175650596618652, 0.011296321637928486, 0.32635414600372314, -0.4507516324520111, -0.011021298356354237, 0.26869121193885803, 1.027193307876587, -0.22588108479976654, -0.3477482795715332, 0.5137677192687988, 0.11443864554166794, -0.24326135218143463, -0.4436061978340149, 0.06892523914575577, 0.149276003241539, 0.09988474100828171, 0.16520732641220093, -0.06543155014514923, -0.013652553781867027, -0.6580841541290283, 0.04926256835460663, 0.2574380040168762, -0.3115711510181427, -0.44800040125846863, 0.9340717196464539, 0.14867153763771057, -0.4071907699108124, 0.86484295129776, -0.3653855621814728, -0.6254569292068481, 0.5816165208816528, 0.7659695744514465, 0.9517154693603516, -0.1324411928653717, 0.2620956599712372, 0.579617977142334, 0.4762095510959625, -0.3647073209285736, 0.19747842848300934, 0.2897918224334717, -0.6384063363075256, -0.3925858438014984, -0.5518094301223755, 0.027399655431509018, 0.453464150428772, -0.3185533881187439, 0.2635168433189392, -0.30732691287994385, -0.25273600220680237, -0.17628219723701477, -0.02562284655869007, -0.6653029322624207, 0.18888387084007263, 0.04837660491466522, 0.744253396987915, -0.9596108794212341, 0.9850046038627625, 0.7064881324768066, -0.8343946933746338, -0.8588400483131409, 0.09894073009490967, -0.046598613262176514, -0.7148423194885254, 0.5571094155311584, 0.24333523213863373, 0.4169866740703583, 0.07946911454200745, -0.4782445430755615, -0.7205802202224731, 1.1061333417892456, 0.29374590516090393, -0.3108988404273987, -0.28383374214172363, 0.4886719882488251, 0.6724053621292114, -0.06551935523748398, 0.7392525672912598, 0.651513934135437, 0.5956901907920837, -0.14733576774597168, -0.9845671057701111, 0.2844136953353882, -0.3837687373161316, 0.26179972290992737, 0.17161408066749573, -0.6681868433952332, 1.125746488571167, -0.1919807642698288, -0.15110830962657928, 0.20991449058055878, 0.459328830242157, 0.02697933465242386, 0.03392107039690018, 0.3097761571407318, 0.5865247845649719, 0.5755362510681152, -0.41142508387565613, 1.2275420427322388, -0.19651758670806885, 0.6991780400276184, 1.0145126581192017, 0.07096109539270401, 0.5966681838035583, 0.22201041877269745, -0.4257071018218994, 0.4008316397666931, 0.5598115921020508, -0.2587725520133972, 0.5663909316062927, 0.07005313783884048, -0.04321718588471413, 0.17224031686782837, 0.09687076508998871, -0.5945109724998474, 0.2750967741012573, 0.1367340385913849, -0.5904020667076111, -0.2186160534620285, -0.10127277672290802, 0.38516849279403687, -0.2999957203865051, 0.07416181266307831, 0.7594321370124817, 0.12811723351478577, -0.7852075099945068, 0.4707699716091156, 0.4790932834148407, 0.6428505182266235, -0.5965736508369446, 0.0013519000494852662, -0.16824865341186523, 0.2558390200138092, -0.10198356211185455, -0.8499776721000671, 0.2208031415939331, 0.1995856761932373, -0.29564812779426575, -0.25838521122932434, 0.6305875778198242, -0.5999183058738708, -0.47054240107536316, 0.24866728484630585, 0.29916343092918396, 0.386867880821228, -0.2418607473373413, -0.7565873861312866, -0.18589627742767334, 0.1110415905714035, -0.39481720328330994, 0.41347265243530273, 0.22249628603458405, -0.1440848559141159, 0.3775062561035156, 0.6140346527099609, -0.007773133460432291, -0.11199601739645004, 0.16632510721683502, 0.7522132992744446, -0.5525736808776855, -0.37647074460983276, -0.889330267906189, 0.6015743613243103, -0.033887237310409546, -0.5326433181762695, 0.5847785472869873, 0.7370201945304871, 0.918182373046875, -0.2269183248281479, 1.1152037382125854, -0.4056672155857086, 0.40303483605384827, -0.44124290347099304, 0.8357541561126709, -0.4100934863090515, 0.03312782570719719, -0.3572712242603302, -0.9754523634910583, -0.10363363474607468, 0.7087315320968628, -0.39718207716941833, 0.4462451934814453, 0.655873715877533, 0.8802196383476257, -0.059760790318250656, -0.026626314967870712, -0.03825411945581436, 0.35527580976486206, 0.5007261633872986, 0.6406687498092651, 0.5077565312385559, -0.700528621673584, 0.6855890154838562, -0.2216363400220871, -0.2751169800758362, -0.10119205713272095, -0.577102541923523, -0.9379114508628845, -0.6156443953514099, -0.2161846160888672, -0.5972740650177002, 0.042054057121276855, 0.8249841928482056, 0.5002269744873047, -0.8557658791542053, -0.3377990126609802, -0.28582271933555603, -0.02925061248242855, -0.10585061460733414, -0.27193310856819153, 0.445701539516449, -0.17674213647842407, -0.7558254599571228, 0.000709899642970413, -0.12582160532474518, 0.22862036526203156, -0.21851974725723267, -0.18907935917377472, -0.1536654233932495, -0.27248725295066833, 0.5600423216819763, 0.2425704002380371, -0.7829092144966125, -0.2941311299800873, -0.16445767879486084, -0.21307729184627533, -0.031047843396663666, 0.6865958571434021, -0.4060579836368561, 0.18769806623458862, 0.47091343998908997, 0.28592661023139954, 0.5275062918663025, -0.1487545371055603, 0.5785236954689026, -0.5253955721855164, 0.23599225282669067, 0.00677731167525053, 0.302874892950058, 0.2887105643749237, -0.4311195909976959, 0.682294487953186, 0.39676374197006226, -0.5471534132957458, -0.6791924238204956, 0.17250777781009674, -0.7649369239807129, -0.23262783885002136, 1.4995397329330444, -0.12201181054115295, 0.03224436193704605, -0.07973150163888931, -0.30270496010780334, 0.6080448031425476, -0.3740810751914978, 0.6026741862297058, 0.603290319442749, 0.24394425749778748, -0.1534993201494217, -0.8078174591064453, 0.5881727337837219, 0.1292644590139389, -0.7851229310035706, 0.09996764361858368, 0.25319477915763855, 0.588498055934906, 0.09935572743415833, 0.670785129070282, -0.26237353682518005, 0.1325082778930664, 0.04774314537644386, 0.18490862846374512, -0.1286948323249817, -0.09412805736064911, -0.22361671924591064, 0.03382480517029762, 0.052039992064237595, -0.0323665477335453 ]
yiyanghkust/finbert-tone
yiyanghkust
"2022-10-17T00:35:39Z"
397,211
107
transformers
[ "transformers", "pytorch", "tf", "text-classification", "financial-sentiment-analysis", "sentiment-analysis", "en", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: "en" tags: - financial-sentiment-analysis - sentiment-analysis widget: - text: "growth is strong and we have plenty of liquidity" --- `FinBERT` is a BERT model pre-trained on financial communication text. The purpose is to enhance financial NLP research and practice. It is trained on the following three financial communication corpus. The total corpora size is 4.9B tokens. - Corporate Reports 10-K & 10-Q: 2.5B tokens - Earnings Call Transcripts: 1.3B tokens - Analyst Reports: 1.1B tokens More technical details on `FinBERT`: [Click Link](https://github.com/yya518/FinBERT) This released `finbert-tone` model is the `FinBERT` model fine-tuned on 10,000 manually annotated (positive, negative, neutral) sentences from analyst reports. This model achieves superior performance on financial tone analysis task. If you are simply interested in using `FinBERT` for financial tone analysis, give it a try. If you use the model in your academic work, please cite the following paper: Huang, Allen H., Hui Wang, and Yi Yang. "FinBERT: A Large Language Model for Extracting Information from Financial Text." *Contemporary Accounting Research* (2022). # How to use You can use this model with Transformers pipeline for sentiment analysis. ```python from transformers import BertTokenizer, BertForSequenceClassification from transformers import pipeline finbert = BertForSequenceClassification.from_pretrained('yiyanghkust/finbert-tone',num_labels=3) tokenizer = BertTokenizer.from_pretrained('yiyanghkust/finbert-tone') nlp = pipeline("sentiment-analysis", model=finbert, tokenizer=tokenizer) sentences = ["there is a shortage of capital, and we need extra financing", "growth is strong and we have plenty of liquidity", "there are doubts about our finances", "profits are flat"] results = nlp(sentences) print(results) #LABEL_0: neutral; LABEL_1: positive; LABEL_2: negative ```
[ -0.5483479499816895, -0.46463826298713684, -0.050502095371484756, 0.5970355272293091, -0.4574049711227417, 0.09357559680938721, -0.338195264339447, -0.39738941192626953, 0.25743764638900757, 0.6979425549507141, -0.5569732785224915, -0.6869089603424072, -0.4191126525402069, 0.05942772701382637, -0.5549193620681763, 1.725693941116333, 0.302179217338562, 0.39037826657295227, 0.43607622385025024, -0.017121391370892525, -0.14448922872543335, -0.6878722310066223, -1.0157201290130615, -0.25868672132492065, 0.6459707617759705, 0.2459702044725418, 0.4330785870552063, 0.09670901298522949, 0.6263995170593262, 0.39131367206573486, -0.1365223526954651, -0.2709653079509735, -0.37873685359954834, -0.0849195048213005, 0.27255871891975403, -0.5179254412651062, -0.5841330289840698, 0.22388164699077606, 0.4432847499847412, 0.7153478860855103, 0.06899577379226685, 0.3326968550682068, -0.09313096106052399, 1.030706763267517, -0.4309110939502716, 0.5431702733039856, -0.4116355776786804, -0.045733336359262466, -0.1158728376030922, -0.011855049058794975, -0.5255141258239746, -0.2925058901309967, 0.6266897916793823, -0.34478065371513367, 0.2890608310699463, 0.2691229581832886, 1.1601039171218872, 0.17202812433242798, -0.1559387743473053, -0.527856707572937, -0.6201885938644409, 0.9142895340919495, -0.8484318852424622, 0.45184293389320374, 0.14142633974552155, 0.03282706066966057, 0.30295032262802124, -0.9957573413848877, -0.3951148986816406, -0.18861855566501617, -0.18266969919204712, 0.3840469717979431, -0.43688568472862244, 0.2785465717315674, 0.11419427394866943, 0.46477842330932617, -0.1657702624797821, -0.35033413767814636, -0.9513944983482361, -0.2839888632297516, 0.5973989367485046, -0.2124868482351303, -0.07306236773729324, -0.3350636959075928, -0.7743610739707947, -0.5598798990249634, -0.26980412006378174, 0.3423324525356293, 0.6519083380699158, 0.5945890545845032, -0.020697593688964844, 0.2438163459300995, 0.12115096300840378, 0.6956899762153625, 0.17213314771652222, 0.03338310495018959, 0.4663972556591034, -0.1407925933599472, -0.38021278381347656, 0.5409497618675232, 0.7963189482688904, 0.3654560446739197, 0.5848533511161804, 0.11778780817985535, -0.5469803810119629, -0.11032615602016449, 0.3136184513568878, -0.6626142859458923, -0.49232375621795654, 0.4778463840484619, -0.5304666757583618, -0.44368231296539307, 0.3123965859413147, -0.6798567771911621, 0.04663379490375519, -0.21225780248641968, 0.3352070152759552, -0.6148138642311096, -0.20091287791728973, 0.291814386844635, -0.3895256817340851, 0.33851519227027893, -0.20340609550476074, -1.1464756727218628, 0.3288230895996094, 0.8021693825721741, 0.6587464213371277, 0.33130642771720886, 0.016334831714630127, -0.6254416704177856, -0.44816988706588745, -0.35952654480934143, 0.7090641856193542, -0.037623461335897446, -0.19026705622673035, -0.03667004778981209, -0.05623257905244827, -0.04939599335193634, -0.31447094678878784, 0.7535318732261658, -0.4987905025482178, 0.30187731981277466, -0.17366541922092438, -0.5230531096458435, -0.5237401127815247, -0.2934577763080597, -0.6161333918571472, 0.7009824514389038, 0.5358486175537109, -0.964333713054657, 0.5473650097846985, -0.8443233370780945, -0.3340764045715332, 0.03970685601234436, 0.18870045244693756, -0.4576965868473053, -0.03299932926893234, -0.015734240412712097, 0.3811144530773163, -0.1550181657075882, 0.3884148597717285, -0.1964159607887268, -0.542980432510376, 0.4876495897769928, -0.2609385550022125, 0.9803628325462341, 0.3036884069442749, -0.42444467544555664, 0.2213699221611023, -0.6881704926490784, -0.17198026180267334, -0.25882458686828613, -0.09193212538957596, -0.29887571930885315, -0.0914447009563446, 0.5818800926208496, -0.02309282124042511, 0.4232081472873688, -0.6457070112228394, -0.2157304435968399, -0.9728854894638062, 0.5757424831390381, 0.8602858185768127, -0.16144482791423798, 0.3083670139312744, -0.437677800655365, 0.34269946813583374, -0.20176254212856293, 0.18835234642028809, -0.02858068235218525, -0.11467400938272476, -1.0887408256530762, -0.6490795016288757, 0.6455366611480713, 0.7059799432754517, -0.09127353131771088, 0.4627438187599182, 0.10177533328533173, -0.41885557770729065, -0.7377040386199951, 0.14335820078849792, 0.1527419239282608, 0.615491509437561, 0.3574027717113495, -0.19022975862026215, -0.6811413168907166, -1.2708896398544312, -0.0660097673535347, -0.46114981174468994, -0.0669892281293869, -0.045296553522348404, 0.3777848780155182, -0.0650874450802803, 0.8945161700248718, -0.44675812125205994, -0.2835567593574524, -0.4270784258842468, 0.5528777837753296, 0.7746827602386475, 0.31245455145835876, 0.9085222482681274, -0.9146126508712769, -0.2039562165737152, -0.17454631626605988, -0.23173445463180542, -0.1617846041917801, -0.3432929217815399, -0.19965362548828125, 0.31843146681785583, 0.3724025785923004, -0.19559839367866516, -0.09251633286476135, 0.5906510949134827, -0.5479181408882141, 0.5591012239456177, 0.028562478721141815, -0.214206725358963, -0.8318775296211243, 0.25750043988227844, 0.21577215194702148, -0.09194539487361908, -0.6824727058410645, -0.2509443461894989, -0.10956192761659622, 0.08833730220794678, -0.2982476055622101, 0.35812094807624817, 0.054499801248311996, -0.07444073259830475, -0.15576240420341492, 0.408191978931427, 0.11969755589962006, 0.780017614364624, -0.1597628891468048, 0.7826191186904907, 0.3376615345478058, -0.46040070056915283, 0.5913709998130798, 0.41853851079940796, -0.26090118288993835, 0.36380159854888916, -0.7630186080932617, -0.36612844467163086, -0.0058241249062120914, 0.06850912421941757, -1.2402021884918213, 0.04517865926027298, 0.35578516125679016, -0.5004631876945496, 0.25016528367996216, 0.13008153438568115, -0.4193616807460785, -0.3291628360748291, -0.5112215876579285, 0.012866535224020481, 0.4240034520626068, -0.4554237425327301, 0.4975840747356415, 0.11740574240684509, -0.6044964790344238, -0.8309546113014221, -0.6721420288085938, -0.1521618366241455, -0.3615835905075073, -0.8758509159088135, 0.22468362748622894, -0.11120475828647614, -0.4922780394554138, -0.15349805355072021, -0.2624920904636383, -0.0833837166428566, 0.06636279076337814, 0.11359427124261856, 0.8749405741691589, -0.399038702249527, 0.4234917163848877, -0.06920803338289261, -0.29016536474227905, 0.28447291254997253, -0.2979092299938202, 0.6594533920288086, -0.9248882532119751, 0.2027338445186615, -0.2933664619922638, 0.007426127791404724, 0.6104031801223755, -0.3094482421875, 0.6554300785064697, 0.9498183131217957, 0.0606810599565506, 0.06022818386554718, -0.5224053859710693, -0.20152373611927032, -0.5550150871276855, 0.1483457088470459, 0.2054833173751831, -0.9351842999458313, 0.6466206908226013, 0.07882153242826462, 0.33321282267570496, 0.8867148756980896, 0.40407487750053406, -0.2149074524641037, 0.6361491084098816, 0.653764545917511, -0.29099342226982117, 0.5198203325271606, -0.5148830413818359, 0.41291844844818115, -0.524796187877655, -0.09874632209539413, -0.44600528478622437, -0.30069226026535034, -0.5362123847007751, 0.2434363067150116, 0.09853558987379074, 0.18790480494499207, -0.46473053097724915, 0.4505962133407593, -0.6617943644523621, 0.03214721009135246, 0.6319625973701477, -0.23402220010757446, 0.007520649116486311, 0.05832192674279213, -0.2074219435453415, -0.07590975612401962, -0.5283876657485962, -0.6651028394699097, 0.837303102016449, 0.58772873878479, 0.5171172618865967, -0.104189433157444, 0.7006657123565674, 0.3016171157360077, 0.5960728526115417, -0.9242046475410461, 0.2999590337276459, -0.5671288967132568, -0.8138986825942993, -0.2390066683292389, -0.47077348828315735, -0.6025469899177551, 0.06205117329955101, -0.4170371890068054, -0.7712595462799072, 0.2285313606262207, 0.013375312089920044, -0.6943997740745544, 0.17882871627807617, -0.6339564323425293, 0.8801870346069336, -0.3584769666194916, 0.011773983016610146, 0.12650714814662933, -0.6201568245887756, 0.44836777448654175, -0.3627866506576538, 0.35435211658477783, -0.2185695469379425, 0.21717703342437744, 0.9567770957946777, -0.30944594740867615, 1.005494236946106, -0.06062646210193634, -0.3693660497665405, 0.4815532863140106, -0.3809315860271454, 0.25745826959609985, 0.07164016366004944, -0.10816478729248047, 0.08180620521306992, 0.227646142244339, -0.22459734976291656, -0.29255014657974243, 0.4072176516056061, -0.8427979946136475, -0.29390445351600647, -0.4762360751628876, -0.6079719066619873, 0.12741588056087494, 0.011314833536744118, 0.39955389499664307, 0.5503566265106201, -0.15159723162651062, 0.3131367862224579, 0.24912552535533905, -0.36498039960861206, 0.5521721243858337, 0.2266111969947815, -0.43845677375793457, -0.6800488829612732, 0.933178186416626, -0.09827490150928497, 0.19332845509052277, 0.24100734293460846, 0.25549131631851196, -0.3451572060585022, -0.006713774986565113, -0.10358031839132309, 0.23139441013336182, -0.6734511852264404, -0.1512785404920578, -0.7472021579742432, -0.5506531000137329, -0.4109722673892975, -0.3873557150363922, -0.4469505250453949, -0.5774632692337036, -0.2821074426174164, -0.14280079305171967, 0.7290534973144531, 0.38853907585144043, -0.29481375217437744, 0.4974866211414337, -0.8332287073135376, 0.12805822491645813, 0.2562357187271118, 0.30389565229415894, -0.04394819959998131, -0.4292658567428589, -0.22893086075782776, -0.0527346171438694, -0.07360362261533737, -0.6511585712432861, 0.6360705494880676, 0.03880665451288223, 0.23075588047504425, 0.8078822493553162, 0.32629185914993286, 0.3390474319458008, 0.06118987500667572, 0.6255690455436707, 0.2929498255252838, -1.2239209413528442, 0.22571125626564026, -0.3603397011756897, 0.15227681398391724, 0.7134357690811157, 0.13680383563041687, -0.7335169911384583, -0.82697594165802, -0.8184091448783875, -1.2318509817123413, 0.7667330503463745, 0.3727132976055145, 0.1888813078403473, -0.130472794175148, 0.3025093376636505, 0.14076203107833862, 0.5117456316947937, -0.7969089150428772, -0.4322594404220581, -0.48192909359931946, -0.3529966473579407, -0.13119010627269745, -0.29059553146362305, -0.1294269561767578, -0.3063957393169403, 0.7023469805717468, 0.08059047162532806, 0.399114727973938, 0.3142617642879486, 0.23160980641841888, 0.0068939258344471455, 0.3287348449230194, 0.7520166039466858, 0.5756350159645081, -0.7604182958602905, -0.07438492029905319, 0.27133986353874207, -0.5080532431602478, -0.22999291121959686, 0.36981362104415894, 0.05859164893627167, 0.36925172805786133, 0.5492082238197327, 0.8278908729553223, 0.43969812989234924, -0.748058021068573, 0.6027112603187561, -0.022522732615470886, -0.6337814927101135, -0.9391498565673828, 0.1278197467327118, 0.09327717125415802, 0.639526903629303, 0.6221157908439636, 0.3619025945663452, 0.22637757658958435, -0.4334016442298889, 0.3947446942329407, 0.2032826542854309, -0.8322167992591858, -0.06883741915225983, 0.7795959711074829, 0.15916137397289276, -0.05728129670023918, 0.8746529817581177, -0.022247351706027985, -0.7168004512786865, 0.688191831111908, 0.36165177822113037, 0.9164769649505615, 0.1880045086145401, 0.525946319103241, 0.3639886677265167, 0.3661029636859894, -0.19039125740528107, 0.4452827274799347, 0.15374983847141266, -0.6987728476524353, -0.5933707356452942, -0.961681067943573, -0.3190005123615265, 0.11818083375692368, -0.8884438872337341, 0.2795271873474121, -0.7864971160888672, -0.5741614699363708, 0.296770840883255, 0.03016909956932068, -0.3504346013069153, 0.17388449609279633, 0.10869261622428894, 0.9926503896713257, -0.5186366438865662, 0.42413094639778137, 0.38236016035079956, -0.5639162063598633, -0.9237143993377686, -0.3174663782119751, -0.17366209626197815, -0.5375022888183594, 1.155815601348877, 0.2149309664964676, -0.26434171199798584, -0.023346208035945892, -0.74000084400177, -0.4851718246936798, 0.9242973327636719, 0.3290119469165802, -0.5720508694648743, 0.1110595166683197, -0.14659196138381958, 0.6409575343132019, -0.6194288730621338, -0.17399351298809052, 0.472954124212265, 0.7474581003189087, 0.1890728920698166, -0.4720635712146759, -0.23283080756664276, -0.3653598725795746, -0.47774508595466614, 0.38589221239089966, -0.8085408210754395, 1.3710027933120728, -0.16146071255207062, -0.13114072382450104, 0.014628478325903416, 0.705317497253418, 0.19768032431602478, 0.2593069076538086, 0.751179575920105, 0.10634579509496689, 0.7789997458457947, -0.22749921679496765, 0.8530738949775696, -0.8440252542495728, 0.7009281516075134, 0.7204567193984985, 0.0346367247402668, 0.8794041275978088, 0.3721965551376343, -0.006271629594266415, 0.8273094296455383, 0.6228654980659485, -0.7084991335868835, 0.3868173062801361, 0.39771395921707153, -0.3815386891365051, -0.21888624131679535, 0.06111515685915947, -0.1510312557220459, 0.5895143747329712, 0.2837058901786804, -0.7630318999290466, 0.09405510872602463, -0.2497229278087616, 0.205363467335701, -0.2075045257806778, -0.2923780381679535, 0.2928057312965393, 0.3977421820163727, -0.3197605609893799, 0.48283249139785767, 0.1399516612291336, 0.6958944797515869, -0.7097111344337463, 0.16828137636184692, -0.09674885869026184, 0.33344846963882446, -0.07055918872356415, -0.4530840516090393, 0.3453393280506134, 0.08725884556770325, -0.041188087314367294, -0.32590392231941223, 0.6143693923950195, -0.39071500301361084, -0.721291184425354, 0.4312441647052765, 0.21521446108818054, 0.06409341096878052, 0.10530475527048111, -0.5635289549827576, -0.3215599060058594, 0.10818884521722794, -0.21186204254627228, -0.16733331978321075, 0.26776087284088135, 0.5183526873588562, 0.543960452079773, 0.667314350605011, 0.009240829385817051, -0.4693272113800049, 0.15712317824363708, 0.7500787377357483, -0.8922563195228577, -0.48663315176963806, -0.8383380174636841, 0.34003403782844543, -0.12083001434803009, -0.5062368512153625, 0.508759081363678, 0.49672549962997437, 0.7230377793312073, -0.20971645414829254, 0.6055371165275574, 0.23857025802135468, 0.15135781466960907, -0.5454292893409729, 0.928644061088562, -0.3699286878108978, 0.21048158407211304, -0.619279146194458, -0.9421044588088989, -0.30025503039360046, 1.0584648847579956, -0.3119775056838989, 0.0245614405721426, 0.6084519028663635, 0.410022109746933, 0.18685637414455414, 0.49213942885398865, 0.11374285072088242, 0.22001990675926208, -0.12205587327480316, 0.20922929048538208, 0.4604831635951996, -0.33020395040512085, 0.8314799666404724, -0.20429077744483948, -0.008212162181735039, -0.38592153787612915, -0.5361934900283813, -1.0999642610549927, -0.6700963973999023, -0.21216042339801788, -0.501151442527771, -0.11054256558418274, 1.0849894285202026, 0.38927018642425537, -0.6887256503105164, -0.5588040947914124, 0.16225115954875946, -0.11913836747407913, -0.25833824276924133, -0.2720085680484772, 0.44512835144996643, -0.602745532989502, -0.6012644171714783, 0.004338357597589493, 0.3947853147983551, 0.14722506701946259, -0.40173447132110596, 0.23076371848583221, -0.09965246915817261, 0.27132532000541687, 0.5437385439872742, 0.04406692087650299, -0.4921211302280426, -0.4706451892852783, 0.21719658374786377, -0.1764039397239685, 0.0760485976934433, 0.7148833274841309, -0.34602078795433044, 0.13556994497776031, 0.3110247552394867, 0.23821069300174713, 0.5679594278335571, -0.03887966275215149, 0.8718827962875366, -0.6704117655754089, 0.19367529451847076, 0.13138380646705627, 0.39260590076446533, 0.29269811511039734, -0.29517748951911926, 0.5274839401245117, -0.010886132717132568, -0.36781105399131775, -0.36031386256217957, -0.08912650495767593, -1.0664491653442383, -0.3980446755886078, 0.8328845500946045, -0.057921379804611206, -0.3434981405735016, 0.037104349583387375, -0.42393195629119873, 0.4109586179256439, -0.7540168762207031, 0.6448066234588623, 0.9293064475059509, 0.08341298997402191, -0.13130803406238556, -0.883233368396759, 0.44693443179130554, 0.35692018270492554, -0.13589642941951752, 0.0412810742855072, 0.17640948295593262, 0.038580212742090225, 0.6414788365364075, 0.525890052318573, 0.004206393845379353, 0.17997689545154572, 0.15183022618293762, 0.34966617822647095, 0.11447780579328537, -0.08138921856880188, -0.0024504063185304403, 0.20319247245788574, -0.1386217176914215, -0.035516105592250824 ]
sentence-transformers/sentence-t5-base
sentence-transformers
"2022-06-21T14:56:18Z"
390,303
28
sentence-transformers
[ "sentence-transformers", "pytorch", "rust", "t5", "feature-extraction", "sentence-similarity", "transformers", "en", "arxiv:2108.08877", "license:apache-2.0", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- pipeline_tag: sentence-similarity language: en license: apache-2.0 tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # sentence-transformers/sentence-t5-base This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space. The model works well for sentence similarity tasks, but doesn't perform that well for semantic search tasks. This model was converted from the Tensorflow model [st5-base-1](https://tfhub.dev/google/sentence-t5/st5-base/1) to PyTorch. When using this model, have a look at the publication: [Sentence-T5: Scalable sentence encoders from pre-trained text-to-text models](https://arxiv.org/abs/2108.08877). The tfhub model and this PyTorch model can produce slightly different embeddings, however, when run on the same benchmarks, they produce identical results. The model uses only the encoder from a T5-base model. The weights are stored in FP16. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/sentence-t5-base') embeddings = model.encode(sentences) print(embeddings) ``` The model requires sentence-transformers version 2.2.0 or newer. ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/sentence-t5-base) ## Citing & Authors If you find this model helpful, please cite the respective publication: [Sentence-T5: Scalable sentence encoders from pre-trained text-to-text models](https://arxiv.org/abs/2108.08877)
[ -0.07607023417949677, -0.6357746124267578, 0.5157682299613953, 0.3088744878768921, -0.2755163311958313, -0.3174329102039337, -0.2284175604581833, -0.17816197872161865, 0.016580507159233093, 0.533191442489624, -0.47322842478752136, -0.6299096345901489, -0.8260884284973145, 0.23644521832466125, -0.7055270075798035, 0.961798906326294, -0.14531908929347992, -0.0015874243108555675, -0.3675653040409088, -0.13461701571941376, -0.30249375104904175, -0.32807984948158264, -0.19664587080478668, -0.30713286995887756, 0.27722471952438354, 0.32273951172828674, 0.6961079239845276, 0.4821578860282898, 0.7405122518539429, 0.3609948754310608, -0.08704157918691635, -0.19120381772518158, -0.5905067920684814, -0.04325451701879501, -0.12202607840299606, -0.2767668068408966, -0.2693581283092499, -0.03479592874646187, 0.46241042017936707, 0.7039344906806946, -0.18973864614963531, 0.25464415550231934, -0.2547615170478821, 0.22384797036647797, -0.4834534525871277, 0.21088583767414093, -0.503836989402771, 0.23744574189186096, 0.02946053445339203, -0.0461696982383728, -0.5915843844413757, -0.40079301595687866, 0.3912501037120819, -0.3241385817527771, 0.43412598967552185, 0.22047296166419983, 1.2123010158538818, 0.4376916289329529, -0.4608458876609802, -0.27225005626678467, -0.42340752482414246, 0.6767487525939941, -0.7090181708335876, 0.43004146218299866, 0.1213514655828476, 0.18441088497638702, -0.11876657605171204, -1.2263031005859375, -0.5314632058143616, -0.4001413583755493, -0.21990273892879486, 0.1539202183485031, -0.4999505579471588, 0.14533761143684387, 0.4952045977115631, 0.41474056243896484, -0.6921372413635254, -0.06735571473836899, -0.6264299750328064, -0.1691565364599228, 0.25854724645614624, 0.13341446220874786, 0.36519336700439453, -0.48780015110969543, -0.5215575098991394, -0.3283688426017761, -0.3189944624900818, -0.06423074752092361, 0.234776109457016, 0.032267291098833084, -0.20763073861598969, 0.9757802486419678, -0.09689770638942719, 0.6094622015953064, 0.1431816667318344, 0.07483939081430435, 0.5756449103355408, -0.3124469816684723, -0.178676038980484, 0.02746075950562954, 0.9980831742286682, 0.5036329030990601, 0.45760443806648254, -0.4893915355205536, -0.20098638534545898, 0.2458696961402893, 0.6295126080513, -1.1133029460906982, -0.3379502296447754, 0.24571095407009125, -0.6894490122795105, -0.4855714440345764, 0.2529464066028595, -0.44093650579452515, 0.04656517878174782, 0.16396158933639526, 0.7322501540184021, -0.5747793912887573, 0.13730937242507935, 0.23931513726711273, -0.4188172221183777, 0.26567569375038147, -0.1379144936800003, -0.8091959953308105, 0.3973586857318878, 0.3490122854709625, 0.8230063915252686, -0.1319289356470108, -0.49148207902908325, -0.23653708398342133, -0.0440402515232563, -0.19855158030986786, 0.7425747513771057, -0.4133767783641815, -0.26687857508659363, 0.047004345804452896, 0.21005894243717194, -0.1050807535648346, -0.5710470676422119, 0.8576838374137878, -0.2708975076675415, 0.6106047630310059, 0.09611034393310547, -0.7103009819984436, -0.18263164162635803, 0.19917067885398865, -0.644256055355072, 1.0838406085968018, 0.2813378870487213, -0.835249662399292, 0.2724113166332245, -0.6845827102661133, -0.3501487076282501, -0.22112129628658295, 0.14915809035301208, -0.7415227293968201, 0.17633609473705292, 0.26561659574508667, 0.5658711194992065, -0.2477549910545349, 0.12457070499658585, -0.43644365668296814, -0.6585696339607239, 0.20913568139076233, -0.2205318957567215, 0.8789163827896118, 0.08602014183998108, -0.31182023882865906, 0.2539036273956299, -0.5019636154174805, -0.04783126339316368, 0.15799333155155182, -0.2849193513393402, 0.055400967597961426, -0.09971608221530914, 0.42080527544021606, 0.18039116263389587, 0.4487927556037903, -0.684299111366272, 0.3650050759315491, -0.4583413004875183, 0.7349048256874084, 0.40942758321762085, -0.13797596096992493, 0.6543931365013123, -0.33826595544815063, 0.2832765281200409, 0.35848408937454224, -0.19256167113780975, -0.17208725214004517, -0.33545130491256714, -0.8342645764350891, 0.04374806582927704, 0.2478509545326233, 0.39524611830711365, -0.6049242615699768, 0.8004143238067627, -0.6866400837898254, -0.6036087870597839, -0.7812550067901611, -0.251567006111145, 0.029394606128335, 0.4696560204029083, 0.7074012756347656, -0.05403449386358261, -0.685338020324707, -1.0547963380813599, -0.4790404438972473, -0.0029146079905331135, -0.0519234836101532, -0.11492873728275299, 0.8352091908454895, -0.4810935854911804, 0.8194313645362854, -0.4605482816696167, -0.41729724407196045, -0.3890279233455658, 0.19288724660873413, 0.1276121437549591, 0.47299808263778687, 0.6496473550796509, -0.6109634637832642, -0.30987226963043213, -0.29412853717803955, -0.6613285541534424, -0.1433497816324234, 0.048886653035879135, 0.06469190865755081, 0.13560087978839874, 0.4639694392681122, -0.9014148712158203, 0.43960732221603394, 0.49317291378974915, -0.5785514712333679, 0.22387781739234924, -0.23642081022262573, -0.02467465028166771, -1.561328411102295, 0.08632716536521912, -0.09791269153356552, -0.37139439582824707, -0.2998764216899872, 0.12289062887430191, 0.23639404773712158, -0.21754175424575806, -0.28550729155540466, 0.2667176127433777, -0.29690706729888916, -0.1483021080493927, -0.09457586705684662, 0.027593212202191353, -0.10602635890245438, 0.5343535542488098, -0.19685013592243195, 0.9262232780456543, 0.3353848159313202, -0.34385666251182556, 0.4973961412906647, 0.6292038559913635, -0.46136730909347534, 0.15568333864212036, -0.9614414572715759, 0.18631331622600555, -0.15485124289989471, 0.3950680196285248, -0.9755449891090393, -0.11950128525495529, 0.2391197383403778, -0.5443143248558044, -0.13861417770385742, 0.09775201231241226, -0.689400851726532, -0.3768530786037445, -0.31316959857940674, 0.18158729374408722, 0.6742205023765564, -0.4643379747867584, 0.7390760183334351, 0.03125755116343498, 0.13469797372817993, -0.5828635096549988, -1.0120912790298462, 0.13092972338199615, -0.25882649421691895, -0.6865178942680359, 0.7990561127662659, 0.0892869234085083, 0.19676266610622406, 0.3996160924434662, -0.05678077042102814, 0.029485318809747696, -0.0873454213142395, 0.1811741143465042, -0.020739173516631126, -0.25186729431152344, 0.151197150349617, -0.006146975792944431, -0.1394181102514267, 0.1258789747953415, -0.4358658194541931, 0.6615175604820251, -0.2598440647125244, -0.04919832944869995, -0.3122308552265167, 0.23407280445098877, 0.5961151123046875, -0.17514820396900177, 0.9029906392097473, 0.9401502013206482, -0.34306374192237854, -0.20303139090538025, -0.5161622762680054, -0.24827489256858826, -0.4430448114871979, 0.6479035019874573, -0.4989207983016968, -0.9699766635894775, 0.36031389236450195, 0.052829548716545105, -0.0879962369799614, 0.7482341527938843, 0.5707869529724121, -0.15227749943733215, 0.7421733736991882, 0.6049615740776062, -0.020226215943694115, 0.5110601186752319, -0.3191696107387543, 0.3485032916069031, -0.5857716798782349, -0.11145675927400589, -0.5591223835945129, -0.3375410735607147, -0.85164475440979, -0.3129669725894928, 0.22149090468883514, -0.19496935606002808, -0.44990214705467224, 0.7849945425987244, -0.5610902905464172, 0.22142773866653442, 0.5500256419181824, 0.06790921092033386, 0.059995751827955246, 0.2652936577796936, -0.24166052043437958, -0.18500734865665436, -0.6869843602180481, -0.5335864424705505, 1.0149915218353271, 0.25686419010162354, 0.7123772501945496, 0.1226286068558693, 0.514484703540802, 0.1121092215180397, -0.17671239376068115, -0.8470336198806763, 0.5222381949424744, -0.5170037150382996, -0.36849066615104675, -0.056157924234867096, -0.41576799750328064, -1.0416383743286133, 0.24860866367816925, -0.2951344847679138, -0.6963499784469604, -0.13197392225265503, -0.3599046766757965, -0.10199973732233047, 0.2178577184677124, -0.915496289730072, 1.3304569721221924, -0.03564353287220001, -0.057821471244096756, -0.13745038211345673, -0.5240768194198608, -0.14802099764347076, 0.3301476836204529, -0.2936277687549591, 0.09206415712833405, -0.016135340556502342, 0.7132008075714111, -0.37538525462150574, 0.6182324290275574, 0.10663887858390808, 0.24674420058727264, 0.11417942494153976, -0.10091638565063477, 0.3995320796966553, -0.35218918323516846, -0.07844381034374237, 0.09225378930568695, -0.033025145530700684, -0.44675806164741516, -0.6291792988777161, 0.6400101184844971, -1.1021897792816162, -0.439098596572876, -0.4192464351654053, -0.5341156125068665, 0.11407351493835449, 0.34656593203544617, 0.43972641229629517, 0.45882904529571533, -0.3075558543205261, 0.8017804622650146, 0.3769746422767639, -0.13447938859462738, 0.5498875379562378, 0.06092390418052673, 0.03225453943014145, -0.3190595507621765, 0.48217225074768066, 0.037273626774549484, 0.041085463017225266, 0.7149405479431152, 0.12024600803852081, -0.5004912614822388, -0.39635947346687317, -0.2047119438648224, 0.06010237708687782, -0.7221360206604004, -0.04822610691189766, -0.9607005715370178, -0.3402567505836487, -0.7054582834243774, -0.03638754412531853, -0.215286523103714, -0.4108840525150299, -0.3914133608341217, -0.3520178198814392, 0.5132629871368408, 0.6852884888648987, 0.19565890729427338, 0.42593252658843994, -0.685289740562439, 0.3771289587020874, -0.05244593694806099, 0.18165898323059082, -0.1609008014202118, -0.6660780310630798, -0.18805545568466187, -0.12019653618335724, -0.44376340508461, -0.9111937284469604, 0.5782149434089661, 0.0469721294939518, 0.40659046173095703, 0.15822522342205048, 0.005513354670256376, 0.7081179618835449, -0.559130847454071, 0.8014752268791199, -0.007191808894276619, -0.9877220392227173, 0.32492387294769287, -0.3026491403579712, 0.5327715873718262, 0.4792473018169403, 0.31860968470573425, -0.47009187936782837, -0.1451554000377655, -0.7834526896476746, -0.9509002566337585, 0.7180708646774292, 0.5103814005851746, 0.3583707809448242, 0.016375724226236343, 0.21875464916229248, -0.0052485656924545765, 0.3085533678531647, -0.9783015847206116, -0.12051866203546524, -0.577644407749176, -0.7389586567878723, -0.2062501460313797, -0.27278807759284973, 0.2993023097515106, -0.09132775664329529, 0.3942641317844391, 0.044762738049030304, 0.7171107530593872, 0.21270789206027985, -0.46867451071739197, 0.1473696231842041, 0.29765644669532776, 0.45091167092323303, 0.22875143587589264, -0.3284919261932373, 0.22877183556556702, 0.39288613200187683, -0.4529603123664856, -0.0990763008594513, 0.3147931396961212, -0.07301638275384903, 0.18353480100631714, 0.5100101232528687, 1.0341418981552124, 0.47271353006362915, -0.31923678517341614, 0.6898123621940613, 0.0985988974571228, -0.22624890506267548, -0.5448832511901855, -0.09975229948759079, 0.35854572057724, 0.1822090595960617, 0.2560504972934723, 0.21221895515918732, 0.18320921063423157, -0.5795215964317322, 0.2276741862297058, -0.0016786331543698907, -0.4139103293418884, -0.12708626687526703, 0.802534282207489, 0.12377913296222687, -0.398078054189682, 0.9687347412109375, 0.034781064838171005, -0.668639063835144, 0.5813825130462646, 0.6258032321929932, 0.98260897397995, 0.260214626789093, 0.12314076721668243, 0.46575477719306946, 0.37806862592697144, -0.3052283227443695, 0.12431690841913223, -0.05675491318106651, -0.837043046951294, -0.214204803109169, -0.4714179039001465, -0.2014286369085312, -0.05929538235068321, -0.5292758941650391, 0.4149937927722931, -0.2635658383369446, -0.14464466273784637, 0.02745186537504196, -0.025829585269093513, -0.7800645232200623, 0.1722942441701889, -0.11948145180940628, 0.7491493225097656, -0.7106396555900574, 0.7380114793777466, 0.8426288962364197, -0.866337239742279, -0.8741592764854431, 0.12526600062847137, -0.5713693499565125, -0.601161539554596, 0.6509078145027161, 0.3394710421562195, 0.08920053392648697, 0.23121239244937897, -0.5981020331382751, -0.6690736413002014, 1.2824161052703857, 0.3893544375896454, -0.29076534509658813, -0.4576576054096222, 0.41753581166267395, 0.6747982501983643, -0.46986129879951477, 0.5573877096176147, 0.19177211821079254, 0.3015769124031067, -0.03931676968932152, -0.9259506464004517, 0.27141183614730835, -0.23343273997306824, 0.23914165794849396, -0.045668840408325195, -0.5658230185508728, 1.0712031126022339, -0.05498882383108139, 0.03265879675745964, 0.24758033454418182, 0.7117646336555481, 0.13573142886161804, -0.1389925628900528, 0.32769307494163513, 0.8474556803703308, 0.47213441133499146, -0.2601487338542938, 1.0652765035629272, -0.2422812134027481, 0.850570023059845, 0.8406630158424377, 0.004746656399220228, 1.0715620517730713, 0.5461832880973816, -0.01952572539448738, 0.8656129837036133, 0.5392951965332031, -0.5281723141670227, 0.5061928629875183, 0.11508659273386002, 0.18433453142642975, -0.29794424772262573, 0.14309945702552795, -0.3045756220817566, 0.5004599690437317, 0.11218179762363434, -0.7103301882743835, -0.3007894456386566, -0.18986231088638306, -0.10337083041667938, -0.03173895925283432, 0.03907100483775139, 0.6245431303977966, 0.16296300292015076, -0.5526462197303772, 0.36708322167396545, 0.27788224816322327, 0.8084462285041809, -0.38958704471588135, 0.00907425582408905, -0.021471183747053146, 0.4983943998813629, -0.1851392239332199, -0.8058506846427917, 0.45749542117118835, -0.05046914517879486, -0.1728358119726181, -0.4966498613357544, 0.9100491404533386, -0.538567304611206, -0.5708997845649719, 0.3080245852470398, 0.4543651044368744, 0.11440283060073853, 0.006152465473860502, -0.6908516883850098, -0.04456932097673416, -0.08316193521022797, -0.1658531278371811, -0.01305752620100975, 0.3949649930000305, 0.11708202958106995, 0.5968008041381836, 0.41390901803970337, -0.30774587392807007, 0.04246445372700691, 0.0898113027215004, 0.6479952335357666, -0.8649669289588928, -0.6568487286567688, -0.7463116645812988, 0.5505143404006958, -0.09438707679510117, -0.5042533278465271, 0.6584643125534058, 0.6417146921157837, 0.9469836354255676, -0.4769752323627472, 0.6004680395126343, -0.12804506719112396, 0.28616514801979065, -0.46250081062316895, 0.8667155504226685, -0.6452364921569824, -0.1992800533771515, -0.21280653774738312, -1.0534276962280273, -0.19422273337841034, 1.0476938486099243, -0.3657824695110321, 0.21732497215270996, 1.1024490594863892, 0.7789242267608643, -0.3156507611274719, -0.14500692486763, 0.23004309833049774, 0.45881298184394836, 0.09517773985862732, 0.6076341271400452, 0.5915160179138184, -0.938398540019989, 0.9091933965682983, -0.1211281567811966, 0.4277491271495819, -0.2654891908168793, -0.6953327059745789, -1.1207109689712524, -0.6332010626792908, -0.2784936726093292, -0.5005760788917542, 0.1417570412158966, 1.0433073043823242, 0.55809485912323, -0.7152538299560547, -0.18137599527835846, -0.4232892096042633, -0.22413833439350128, 0.03072444722056389, -0.255194753408432, 0.28340229392051697, -0.29828861355781555, -0.8869638442993164, 0.14143624901771545, -0.1615973860025406, 0.024870453402400017, -0.18045204877853394, 0.2689993679523468, -0.11602477729320526, -0.20916420221328735, 0.45209062099456787, -0.36251282691955566, -0.8563637137413025, -0.5605172514915466, 0.27747204899787903, -0.45040255784988403, 0.07331284880638123, 0.4637472629547119, -0.7951511740684509, 0.18077652156352997, 0.7768821120262146, 0.7064943909645081, 0.8549390435218811, -0.13520663976669312, 0.7768491506576538, -0.5088571310043335, 0.19258345663547516, 0.1625034213066101, 0.5321687459945679, 0.5001006126403809, -0.10507771372795105, 0.5630317330360413, 0.23565326631069183, -0.4079979360103607, -0.527901291847229, 0.005390292499214411, -1.2768664360046387, -0.12397948652505875, 1.2946765422821045, -0.14179305732250214, -0.27294644713401794, 0.2625407576560974, -0.33784493803977966, 0.46249425411224365, -0.44341790676116943, 0.8140920400619507, 0.8935861587524414, 0.31611087918281555, -0.371395468711853, -0.24381721019744873, 0.2964629530906677, 0.5054704546928406, -0.504758358001709, -0.4069582223892212, 0.18803898990154266, 0.5437974333763123, 0.1429377943277359, 0.18714678287506104, -0.038467708975076675, 0.15396413207054138, 0.28299763798713684, 0.22427843511104584, -0.1934812068939209, 0.02495463751256466, -0.24783596396446228, 0.454065203666687, -0.28631100058555603, -0.24594226479530334 ]
facebook/opt-125m
facebook
"2023-09-15T13:10:03Z"
388,631
89
transformers
[ "transformers", "pytorch", "tf", "jax", "opt", "text-generation", "en", "arxiv:2205.01068", "arxiv:2005.14165", "license:other", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2022-05-11T08:25:17Z"
--- language: en inference: false tags: - text-generation - opt license: other commercial: false --- # OPT : Open Pre-trained Transformer Language Models OPT was first introduced in [Open Pre-trained Transformer Language Models](https://arxiv.org/abs/2205.01068) and first released in [metaseq's repository](https://github.com/facebookresearch/metaseq) on May 3rd 2022 by Meta AI. **Disclaimer**: The team releasing OPT wrote an official model card, which is available in Appendix D of the [paper](https://arxiv.org/pdf/2205.01068.pdf). Content from **this** model card has been written by the Hugging Face team. ## Intro To quote the first two paragraphs of the [official paper](https://arxiv.org/abs/2205.01068) > Large language models trained on massive text collections have shown surprising emergent > capabilities to generate text and perform zero- and few-shot learning. While in some cases the public > can interact with these models through paid APIs, full model access is currently limited to only a > few highly resourced labs. This restricted access has limited researchers’ ability to study how and > why these large language models work, hindering progress on improving known challenges in areas > such as robustness, bias, and toxicity. > We present Open Pretrained Transformers (OPT), a suite of decoder-only pre-trained transformers ranging from 125M > to 175B parameters, which we aim to fully and responsibly share with interested researchers. We train the OPT models to roughly match > the performance and sizes of the GPT-3 class of models, while also applying the latest best practices in data > collection and efficient training. Our aim in developing this suite of OPT models is to enable reproducible and responsible research at scale, and > to bring more voices to the table in studying the impact of these LLMs. Definitions of risk, harm, bias, and toxicity, etc., should be articulated by the > collective research community as a whole, which is only possible when models are available for study. ## Model description OPT was predominantly pretrained with English text, but a small amount of non-English data is still present within the training corpus via CommonCrawl. The model was pretrained using a causal language modeling (CLM) objective. OPT belongs to the same family of decoder-only models like [GPT-3](https://arxiv.org/abs/2005.14165). As such, it was pretrained using the self-supervised causal language modedling objective. For evaluation, OPT follows [GPT-3](https://arxiv.org/abs/2005.14165) by using their prompts and overall experimental setup. For more details, please read the [official paper](https://arxiv.org/abs/2205.01068). ## Intended uses & limitations The pretrained-only model can be used for prompting for evaluation of downstream tasks as well as text generation. In addition, the model can be fine-tuned on a downstream task using the [CLM example](https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling). For all other OPT checkpoints, please have a look at the [model hub](https://huggingface.co/models?filter=opt). ### How to use You can use this model directly with a pipeline for text generation. ```python >>> from transformers import pipeline >>> generator = pipeline('text-generation', model="facebook/opt-125m") >>> generator("What are we having for dinner?") [{'generated_text': 'What are we having for dinner?\nA nice dinner with a friend.\nI'm not sure'}] ``` By default, generation is deterministic. In order to use the top-k sampling, please set `do_sample` to `True`. ```python >>> from transformers import pipeline, set_seed >>> set_seed(32) >>> generator = pipeline('text-generation', model="facebook/opt-125m", do_sample=True) >>> generator("What are we having for dinner?") [{'generated_text': 'What are we having for dinner?\nCoffee, sausage and cream cheese at Chili's.'}] ``` ### Limitations and bias As mentioned in Meta AI's model card, given that the training data used for this model contains a lot of unfiltered content from the internet, which is far from neutral the model is strongly biased : > Like other large language models for which the diversity (or lack thereof) of training > data induces downstream impact on the quality of our model, OPT-175B has limitations in terms > of bias and safety. OPT-175B can also have quality issues in terms of generation diversity and > hallucination. In general, OPT-175B is not immune from the plethora of issues that plague modern > large language models. This bias will also affect all fine-tuned versions of this model. ## Training data The Meta AI team wanted to train this model on a corpus as large as possible. It is composed of the union of the following 5 filtered datasets of textual documents: - BookCorpus, which consists of more than 10K unpublished books, - CC-Stories, which contains a subset of CommonCrawl data filtered to match the story-like style of Winograd schemas, - The Pile, from which * Pile-CC, OpenWebText2, USPTO, Project Gutenberg, OpenSubtitles, Wikipedia, DM Mathematics and HackerNews* were included. - Pushshift.io Reddit dataset that was developed in Baumgartner et al. (2020) and processed in Roller et al. (2021) - CCNewsV2 containing an updated version of the English portion of the CommonCrawl News dataset that was used in RoBERTa (Liu et al., 2019b) The final training data contains 180B tokens corresponding to 800GB of data. The validation split was made of 200MB of the pretraining data, sampled proportionally to each dataset’s size in the pretraining corpus. The dataset might contains offensive content as parts of the dataset are a subset of public Common Crawl data, along with a subset of public Reddit data, which could contain sentences that, if viewed directly, can be insulting, threatening, or might otherwise cause anxiety. ### Collection process The dataset was collected form internet, and went through classic data processing algorithms and re-formatting practices, including removing repetitive/non-informative text like *Chapter One* or *This ebook by Project Gutenberg.* ## Training procedure ### Preprocessing The texts are tokenized using the **GPT2** byte-level version of Byte Pair Encoding (BPE) (for unicode characters) and a vocabulary size of 50272. The inputs are sequences of 2048 consecutive tokens. The 175B model was trained on 992 *80GB A100 GPUs*. The training duration was roughly ~33 days of continuous training. ### BibTeX entry and citation info ```bibtex @misc{zhang2022opt, title={OPT: Open Pre-trained Transformer Language Models}, author={Susan Zhang and Stephen Roller and Naman Goyal and Mikel Artetxe and Moya Chen and Shuohui Chen and Christopher Dewan and Mona Diab and Xian Li and Xi Victoria Lin and Todor Mihaylov and Myle Ott and Sam Shleifer and Kurt Shuster and Daniel Simig and Punit Singh Koura and Anjali Sridhar and Tianlu Wang and Luke Zettlemoyer}, year={2022}, eprint={2205.01068}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.3538056015968323, -0.7636013031005859, 0.20311933755874634, 0.11723082512617111, -0.29949384927749634, -0.29473742842674255, -0.46915239095687866, -0.4397353529930115, -0.0295120719820261, 0.5997917652130127, -0.6606075763702393, -0.31714579463005066, -0.5866262316703796, 0.25737887620925903, -0.432015597820282, 1.2119587659835815, -0.09038613736629486, 0.0061627961695194244, 0.06985484063625336, 0.06133933365345001, -0.21174708008766174, -0.5694440007209778, -0.6279516816139221, -0.05830036476254463, 0.347228080034256, 0.19360138475894928, 0.6407542824745178, 0.5210159420967102, 0.4466574788093567, 0.2657690942287445, -0.04722335562109947, 0.03346417471766472, -0.7478598356246948, -0.2944881319999695, 0.023284077644348145, -0.39910128712654114, -0.3268395960330963, 0.20074912905693054, 0.62947016954422, 0.5466406345367432, 0.07074239104986191, 0.16839846968650818, 0.1343500316143036, 0.5508478879928589, -0.5305103063583374, 0.0726189911365509, -0.7670689821243286, -0.08633600920438766, -0.3467754125595093, 0.12823690474033356, -0.7127510905265808, -0.22433783113956451, 0.14373403787612915, -0.5097156763076782, 0.15364807844161987, -0.06653148680925369, 1.1841895580291748, 0.31828510761260986, -0.2946837842464447, -0.09720709174871445, -0.6819533109664917, 0.8418360352516174, -0.7933810949325562, 0.4771576523780823, 0.2934824824333191, 0.05919301137328148, 0.07771778106689453, -0.8638635277748108, -0.6299090385437012, -0.1550857573747635, -0.22414293885231018, 0.2906726598739624, -0.32356613874435425, 0.08920946717262268, 0.26818907260894775, 0.32029208540916443, -0.6158848404884338, 0.11444196105003357, -0.48514461517333984, -0.2538335919380188, 0.6638023853302002, -0.035212352871894836, 0.31363576650619507, -0.28382012248039246, -0.34140700101852417, -0.11694340407848358, -0.627379834651947, -0.07179497927427292, 0.5296907424926758, 0.36963701248168945, -0.21413663029670715, 0.5491915941238403, -0.08604726195335388, 0.6929668188095093, 0.04789729043841362, 0.05838147550821304, 0.45575615763664246, -0.5664549469947815, -0.1351078450679779, -0.16199572384357452, 1.1455638408660889, 0.2267744243144989, 0.48600587248802185, -0.027188144624233246, -0.07524191588163376, 0.03981057181954384, 0.2806411385536194, -0.7815853357315063, -0.051454976201057434, 0.2022932916879654, -0.42434239387512207, -0.2482675313949585, -0.009410361759364605, -0.784127414226532, 0.052939172834157944, -0.29059261083602905, 0.3713918626308441, -0.4331207275390625, -0.4056228995323181, 0.24993829429149628, 0.06531931459903717, 0.3014584183692932, 0.01293714065104723, -0.7461106777191162, 0.15394002199172974, 0.4425748884677887, 0.6290246844291687, -0.23938758671283722, -0.4322934150695801, -0.17801503837108612, -0.14850670099258423, -0.15700168907642365, 0.5482719540596008, -0.4117697775363922, 0.00731199886649847, 0.13023510575294495, 0.09429981559515, -0.22227291762828827, -0.29503676295280457, 0.7709130048751831, -0.49367114901542664, 0.5159327387809753, -0.05104968324303627, -0.35597115755081177, 0.0009076829301193357, -0.03752698376774788, -0.6180286407470703, 1.0853320360183716, 0.18061836063861847, -1.0058701038360596, 0.38296493887901306, -0.6331392526626587, -0.3893558084964752, -0.01628689095377922, 0.0934644266963005, -0.4135057330131531, -0.0572596900165081, 0.36578887701034546, 0.3733227252960205, -0.2311445027589798, 0.4504081606864929, -0.09529031813144684, -0.24678537249565125, 0.0496477410197258, -0.5958067178726196, 0.9050955772399902, 0.36063116788864136, -0.398996502161026, 0.08029645681381226, -0.635266125202179, -0.014225137419998646, 0.30048641562461853, -0.347755491733551, -0.16062641143798828, -0.0006067875074222684, 0.15955044329166412, 0.31715261936187744, 0.27241620421409607, -0.4493710696697235, 0.0534864142537117, -0.6423409581184387, 0.6193220615386963, 0.7054545879364014, -0.21215872466564178, 0.410822331905365, -0.13470391929149628, 0.421162873506546, 0.11386808007955551, 0.33108392357826233, -0.309225857257843, -0.32864898443222046, -1.01219642162323, -0.14567698538303375, 0.3711932599544525, 0.4857320487499237, -0.6123937964439392, 0.6320938467979431, -0.39671289920806885, -0.5978668332099915, -0.6141190528869629, -0.05991971865296364, 0.42675018310546875, 0.2835359573364258, 0.5185688138008118, -0.09636211395263672, -0.6468281149864197, -0.8811352849006653, -0.3537871837615967, -0.08946632593870163, 0.0058136992156505585, 0.3092069625854492, 0.49757084250450134, -0.4561948776245117, 1.0483566522598267, -0.4977082312107086, -0.1625041365623474, -0.5471590161323547, -0.002334422431886196, 0.24764364957809448, 0.42408472299575806, 0.46895572543144226, -0.7915478348731995, -0.6279289126396179, -0.21778558194637299, -0.5240021347999573, -0.1860252469778061, -0.11048510670661926, -0.28707513213157654, 0.4678211212158203, 0.5662434697151184, -0.7154804468154907, 0.14197076857089996, 0.6908903121948242, -0.18940268456935883, 0.6184720396995544, 0.13639949262142181, -0.15874071419239044, -1.2518012523651123, 0.18710586428642273, -0.056781504303216934, -0.14870312809944153, -0.6580577492713928, -0.14012880623340607, -0.02347419783473015, -0.25232577323913574, -0.635918915271759, 0.6154386401176453, -0.42774781584739685, 0.2882692813873291, -0.03653712198138237, 0.15326625108718872, -0.1612524390220642, 0.6325286030769348, 0.18643301725387573, 0.742493748664856, 0.5197582244873047, -0.621755838394165, -0.09167420119047165, 0.23441092669963837, -0.2678518295288086, 0.22068127989768982, -0.7198305726051331, 0.13412120938301086, -0.22079011797904968, 0.21859946846961975, -0.8197625279426575, -0.24364465475082397, 0.2791261672973633, -0.4782332479953766, 0.33650609850883484, 0.07949107885360718, -0.4275229573249817, -0.6397256255149841, -0.09524457156658173, 0.2899523973464966, 0.6698207855224609, -0.4757606089115143, 0.580596923828125, 0.3581712245941162, -0.01228257268667221, -0.7304239273071289, -0.6336579918861389, -0.06659319251775742, -0.10301003605127335, -0.6542575359344482, 0.28829044103622437, -0.14392678439617157, -0.0002230930986115709, 0.0570533350110054, 0.10105548053979874, -0.07671737670898438, -0.0626467913389206, 0.05046813189983368, 0.15741991996765137, -0.15635645389556885, 0.1568697690963745, 0.00968319270759821, -0.2423398345708847, 0.028055287897586823, -0.33552101254463196, 0.8306160569190979, -0.213775634765625, -0.14158007502555847, -0.42181992530822754, 0.18626411259174347, 0.4361472427845001, -0.4544186592102051, 0.8624097108840942, 0.6503273844718933, -0.25330984592437744, -0.12500466406345367, -0.5862669944763184, -0.25633683800697327, -0.4942271113395691, 0.6742135286331177, -0.027132615447044373, -0.9249987602233887, 0.2880985140800476, 0.12632691860198975, 0.19076941907405853, 0.6801734566688538, 0.5312384366989136, 0.19196175038814545, 0.9440853595733643, 0.6067981123924255, -0.19551117718219757, 0.5952507257461548, -0.23331092298030853, 0.30430832505226135, -0.619480311870575, 0.022778168320655823, -0.5314341187477112, -0.017905060201883316, -0.5030784606933594, -0.28825581073760986, 0.09784336388111115, 0.10973470658063889, -0.41242894530296326, 0.47259318828582764, -0.5377126932144165, 0.4470928907394409, 0.5279514193534851, 0.09702223539352417, 0.08905002474784851, 0.01618734374642372, -0.10668446868658066, -0.14449429512023926, -0.7773097157478333, -0.5444201827049255, 1.2166200876235962, 0.47736480832099915, 0.6787722110748291, -0.31079092621803284, 0.7180228233337402, 0.01942981220781803, 0.34721460938453674, -0.5390325784683228, 0.5606623888015747, -0.18278400599956512, -0.7759495973587036, -0.1895090639591217, -0.5052438378334045, -0.9648042321205139, 0.06718730181455612, -0.14941857755184174, -0.5714226365089417, -0.07150661945343018, 0.1701827049255371, -0.14038141071796417, 0.2430625855922699, -0.8895280957221985, 1.0824100971221924, -0.38315293192863464, -0.2805689573287964, 0.023725470528006554, -0.7247719764709473, 0.3683919608592987, -0.22255611419677734, 0.21975259482860565, 0.20922896265983582, 0.2029680609703064, 0.8714808225631714, -0.367745041847229, 0.9538922905921936, -0.07022716850042343, 0.0010882221395149827, 0.44990360736846924, -0.2741764485836029, 0.48076391220092773, -0.18041343986988068, -0.023883087560534477, 0.4729280471801758, -0.26590994000434875, -0.24575525522232056, -0.12219424545764923, 0.36693546175956726, -1.0101945400238037, -0.40694335103034973, -0.3509356379508972, -0.38088056445121765, 0.007997018285095692, 0.5491853952407837, 0.6354935169219971, 0.36025989055633545, -0.17584063112735748, 0.29711928963661194, 0.5375185608863831, -0.49836501479148865, 0.47129714488983154, 0.40026649832725525, -0.13700467348098755, -0.4160066545009613, 0.7493012547492981, 0.08822426944971085, 0.40143653750419617, 0.41841211915016174, 0.1603519767522812, -0.36119726300239563, -0.4570501148700714, -0.24129514396190643, 0.43232712149620056, -0.6013456583023071, -0.2143774777650833, -0.9844828248023987, -0.45800653100013733, -0.4748815894126892, -0.13512022793293, -0.5944051146507263, -0.1193377673625946, -0.4359913766384125, -0.14137621223926544, 0.14496758580207825, 0.5438926815986633, 0.05304335802793503, 0.520395040512085, -0.746437668800354, 0.16819219291210175, 0.0924847349524498, 0.35296565294265747, -0.06585758179426193, -0.5474543571472168, -0.3025050759315491, 0.3161635100841522, -0.36980414390563965, -0.7585400938987732, 0.3829824924468994, 0.18965311348438263, 0.5726705193519592, 0.4708642363548279, 0.15737861394882202, 0.42818182706832886, -0.6137106418609619, 0.9178761839866638, 0.10245869308710098, -0.9297068119049072, 0.4964233636856079, -0.45524442195892334, 0.2705038785934448, 0.622791588306427, 0.6281059384346008, -0.43283066153526306, -0.5299345850944519, -0.6800423860549927, -0.9286751747131348, 0.941939115524292, 0.2893179655075073, 0.4126683473587036, -0.22232475876808167, 0.31386443972587585, 0.022659918293356895, 0.21857796609401703, -1.3581045866012573, -0.31214287877082825, -0.3210243880748749, -0.36111217737197876, -0.20753592252731323, -0.40262365341186523, 0.17776407301425934, -0.31322622299194336, 0.7640018463134766, 0.0031043775379657745, 0.4726874828338623, 0.1449359506368637, -0.33811724185943604, -0.04748427867889404, 0.21755480766296387, 0.4832608103752136, 0.5020816326141357, -0.08845937252044678, -0.038983266800642014, 0.12186796963214874, -0.6355482339859009, -0.10316042602062225, 0.20879332721233368, -0.39019283652305603, -0.05409381538629532, 0.36629799008369446, 1.0774824619293213, 0.12455318868160248, -0.6890843510627747, 0.6546107530593872, 0.010338029824197292, -0.2666274309158325, -0.32939809560775757, -0.027073029428720474, 0.05566944554448128, -0.02554541639983654, 0.24725136160850525, 0.044173575937747955, -0.13324251770973206, -0.3344026803970337, 0.27353349328041077, 0.3586501479148865, -0.3961826264858246, -0.3936119079589844, 0.7672302722930908, 0.3270028233528137, -0.24251997470855713, 0.7351602911949158, -0.2575700581073761, -0.7904304265975952, 0.3570545017719269, 0.6720810532569885, 0.8854357600212097, -0.15265989303588867, 0.295181006193161, 0.7275384664535522, 0.6480281949043274, -0.07087934762239456, -0.03766843304038048, 0.22266507148742676, -0.8090879917144775, -0.5364946722984314, -0.7985581159591675, -0.02632036618888378, 0.34594517946243286, -0.4511891007423401, 0.5483453869819641, -0.08917081356048584, -0.10492256283760071, -0.2997956871986389, -0.08013171702623367, -0.7377253174781799, 0.17456836998462677, 0.08236677199602127, 0.8541600108146667, -1.0012561082839966, 0.535041332244873, 0.49902570247650146, -0.5496540069580078, -0.903703510761261, 0.13465270400047302, -0.3235839009284973, -0.7832218408584595, 0.6025457382202148, 0.49695897102355957, 0.28132861852645874, 0.32032591104507446, -0.7370443344116211, -0.9171221852302551, 0.7803120613098145, 0.375009149312973, -0.5235082507133484, -0.18542204797267914, 0.3990202844142914, 0.7011737823486328, -0.1831054836511612, 0.48603397607803345, 0.43962568044662476, 0.4691459834575653, -0.1145414263010025, -0.8745782375335693, 0.016228482127189636, -0.2478637993335724, -0.20495523512363434, 0.20435209572315216, -0.7272474765777588, 1.0012129545211792, -0.12320912629365921, -0.41751334071159363, -0.21319006383419037, 0.5038402080535889, -0.07294466346502304, -0.04458621144294739, 0.4451291561126709, 0.7085270285606384, 0.5336822271347046, -0.23696818947792053, 1.1489099264144897, -0.43463557958602905, 0.47338762879371643, 0.9438944458961487, -0.022144850343465805, 0.7842200994491577, 0.2598576843738556, -0.24554777145385742, 0.33648017048835754, 0.6067208051681519, -0.04816319793462753, 0.5081415176391602, -0.045656513422727585, 0.1257706731557846, -0.2580909729003906, -0.050057537853717804, -0.47141093015670776, 0.4145384728908539, 0.11315681785345078, -0.4554597735404968, -0.2277390956878662, 0.06500545144081116, 0.28550976514816284, -0.15256278216838837, -0.14258979260921478, 0.7380775213241577, 0.06194038316607475, -0.8891271948814392, 0.6823623180389404, -0.0559750497341156, 0.8376797437667847, -0.7999257445335388, 0.2983204424381256, -0.12174668908119202, 0.25048306584358215, -0.0862637385725975, -0.5091726779937744, 0.24435928463935852, -0.00829664058983326, -0.09120631963014603, -0.3150889277458191, 0.7165257930755615, -0.4926891326904297, -0.5530664324760437, 0.35923564434051514, 0.40392234921455383, 0.1143466904759407, -0.1876266896724701, -0.7304950952529907, 0.13618148863315582, 0.1381312757730484, -0.4538964033126831, 0.16496998071670532, 0.2649240493774414, 0.11983414739370346, 0.49610888957977295, 0.6532847285270691, -0.03494194149971008, 0.21338751912117004, -0.052927855402231216, 0.9806849956512451, -0.41242921352386475, -0.38420796394348145, -0.8698065876960754, 0.7479369640350342, -0.03244878724217415, -0.43376636505126953, 0.7805269956588745, 0.5615294575691223, 1.128487229347229, -0.18658863008022308, 0.846874475479126, -0.190593883395195, 0.4398937523365021, -0.4662288427352905, 0.7590994834899902, -0.5927679538726807, -0.05840884894132614, -0.5041552186012268, -1.0446598529815674, -0.17401807010173798, 0.5903464555740356, -0.45875102281570435, 0.25470542907714844, 0.8428102731704712, 0.7438416481018066, -0.041101500391960144, -0.08551394939422607, -0.022284911945462227, 0.40060803294181824, 0.28961220383644104, 0.6560830473899841, 0.775296151638031, -0.5471563339233398, 0.745518684387207, -0.2315531224012375, -0.24390862882137299, -0.18383368849754333, -0.798151969909668, -1.084218144416809, -0.6072206497192383, -0.19006016850471497, -0.27592334151268005, -0.046209122985601425, 0.7310589551925659, 0.5936772227287292, -0.6339678764343262, -0.06778006255626678, -0.41264888644218445, -0.05715477839112282, -0.06989812105894089, -0.26788419485092163, 0.3510590195655823, -0.5026058554649353, -0.8200211524963379, 0.018923591822385788, -0.05906009301543236, -0.002328157890588045, -0.186672642827034, -0.11312200874090195, -0.3392338752746582, 0.09595954418182373, 0.5315608382225037, 0.05884329229593277, -0.4901047646999359, -0.1517656147480011, 0.21723562479019165, -0.12932224571704865, 0.013786299154162407, 0.5328502058982849, -0.5474824905395508, 0.3470182418823242, 0.3938417434692383, 0.635622501373291, 0.39532390236854553, -0.02658138796687126, 0.5126773118972778, -0.6411443948745728, 0.2408285290002823, 0.2615739405155182, 0.2948606610298157, 0.22594021260738373, -0.30786406993865967, 0.44571152329444885, 0.2673405110836029, -0.644673764705658, -0.9019385576248169, 0.21469709277153015, -0.8413212299346924, -0.18750354647636414, 1.3872427940368652, -0.033206433057785034, -0.1457764208316803, 0.02484935149550438, -0.3161326050758362, 0.35467106103897095, -0.27552396059036255, 0.4660082757472992, 0.7392302751541138, 0.32659292221069336, -0.18256498873233795, -0.47229519486427307, 0.5517230033874512, 0.3839951455593109, -0.8903817534446716, 0.1575005203485489, 0.4284991919994354, 0.2347230315208435, 0.19403444230556488, 0.7944997549057007, -0.15373378992080688, 0.008107567206025124, -0.059852927923202515, 0.19781653583049774, -0.04347772151231766, -0.3476806581020355, -0.18555153906345367, -0.036763641983270645, -0.20416833460330963, 0.1028510332107544 ]
emilyalsentzer/Bio_ClinicalBERT
emilyalsentzer
"2023-03-31T21:00:42Z"
385,870
182
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "en", "arxiv:1904.03323", "arxiv:1901.08746", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: "en" tags: - fill-mask license: mit --- # ClinicalBERT - Bio + Clinical BERT Model The [Publicly Available Clinical BERT Embeddings](https://arxiv.org/abs/1904.03323) paper contains four unique clinicalBERT models: initialized with BERT-Base (`cased_L-12_H-768_A-12`) or BioBERT (`BioBERT-Base v1.0 + PubMed 200K + PMC 270K`) & trained on either all MIMIC notes or only discharge summaries. This model card describes the Bio+Clinical BERT model, which was initialized from [BioBERT](https://arxiv.org/abs/1901.08746) & trained on all MIMIC notes. ## Pretraining Data The `Bio_ClinicalBERT` model was trained on all notes from [MIMIC III](https://www.nature.com/articles/sdata201635), a database containing electronic health records from ICU patients at the Beth Israel Hospital in Boston, MA. For more details on MIMIC, see [here](https://mimic.physionet.org/). All notes from the `NOTEEVENTS` table were included (~880M words). ## Model Pretraining ### Note Preprocessing Each note in MIMIC was first split into sections using a rules-based section splitter (e.g. discharge summary notes were split into "History of Present Illness", "Family History", "Brief Hospital Course", etc. sections). Then each section was split into sentences using SciSpacy (`en core sci md` tokenizer). ### Pretraining Procedures The model was trained using code from [Google's BERT repository](https://github.com/google-research/bert) on a GeForce GTX TITAN X 12 GB GPU. Model parameters were initialized with BioBERT (`BioBERT-Base v1.0 + PubMed 200K + PMC 270K`). ### Pretraining Hyperparameters We used a batch size of 32, a maximum sequence length of 128, and a learning rate of 5 · 10−5 for pre-training our models. The models trained on all MIMIC notes were trained for 150,000 steps. The dup factor for duplicating input data with different masks was set to 5. All other default parameters were used (specifically, masked language model probability = 0.15 and max predictions per sequence = 20). ## How to use the model Load the model via the transformers library: ``` from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("emilyalsentzer/Bio_ClinicalBERT") model = AutoModel.from_pretrained("emilyalsentzer/Bio_ClinicalBERT") ``` ## More Information Refer to the original paper, [Publicly Available Clinical BERT Embeddings](https://arxiv.org/abs/1904.03323) (NAACL Clinical NLP Workshop 2019) for additional details and performance on NLI and NER tasks. ## Questions? Post a Github issue on the [clinicalBERT repo](https://github.com/EmilyAlsentzer/clinicalBERT) or email [email protected] with any questions.
[ -0.16990424692630768, -0.4915759861469269, 0.6299302577972412, 0.3383044898509979, -0.2586626708507538, -0.1563151329755783, -0.03295591101050377, -0.5976728200912476, 0.3514966070652008, 0.41910818219184875, -0.5010818243026733, -0.7814110517501831, -0.6762539148330688, 0.00753712048754096, -0.1846534162759781, 1.3411957025527954, 0.05405210703611374, 0.7139091491699219, -0.014409066177904606, -0.2408086508512497, -0.16240519285202026, -0.7982110977172852, -0.5022165179252625, -0.23180146515369415, 0.5681572556495667, -0.09839585423469543, 0.3399209678173065, 0.4324319064617157, 0.5506052374839783, 0.2022770494222641, -0.03887252137064934, -0.007390130311250687, -0.38703209161758423, -0.12246426194906235, 0.3447721302509308, -0.2962690591812134, -0.845181941986084, 0.004275721497833729, 0.701387882232666, 0.6906883716583252, -0.12762582302093506, 0.19994670152664185, -0.015312811359763145, 0.34816768765449524, -0.34340915083885193, 0.06892155855894089, -0.3880302906036377, 0.17663785815238953, 0.02017279341816902, 0.10198135673999786, -0.5889214277267456, -0.4251902997493744, 0.6172520518302917, -0.4559065103530884, 0.406049907207489, -0.1511169821023941, 1.0574309825897217, -0.02606114000082016, -0.14488378167152405, -0.2323431819677353, -0.4912920296192169, 0.7091884016990662, -0.8521749973297119, 0.3961240351200104, 0.2810154855251312, 0.13464942574501038, 0.04847664386034012, -1.1149860620498657, -0.40939706563949585, -0.535667359828949, -0.11826428771018982, 0.2994789481163025, -0.23060326278209686, 0.27419930696487427, 0.5112156271934509, 0.03657178953289986, -0.76019686460495, -0.14939884841442108, -0.6043416261672974, -0.4276123046875, 0.4879794120788574, 0.2367761880159378, 0.10710395127534866, -0.3038037419319153, -0.44957828521728516, -0.27562353014945984, -0.359055757522583, -0.0319635309278965, 0.2531893849372864, 0.05711100250482559, -0.30437716841697693, 0.20351459085941315, 0.3803248107433319, 0.6024783849716187, 0.015078786760568619, 0.06729666888713837, 0.625612199306488, -0.32591313123703003, -0.17715832591056824, 0.12313831597566605, 1.0552048683166504, -0.01307265367358923, 0.26327186822891235, 0.11553098261356354, -0.03701069951057434, -0.24863599240779877, 0.456278920173645, -0.7757866382598877, -0.5984029769897461, 0.33346498012542725, -0.810133695602417, -0.3484145700931549, -0.018895983695983887, -0.46350306272506714, -0.10856914520263672, -0.18574978411197662, 0.7120168805122375, -0.8992118239402771, 0.13988666236400604, -0.07142110168933868, -0.07001066207885742, 0.12153775244951248, 0.4290747046470642, -0.6050699949264526, 0.3162984251976013, 0.18856412172317505, 0.7699316143989563, 0.07344084978103638, -0.14537085592746735, -0.30604708194732666, -0.015618854202330112, 0.021477999165654182, 0.47626793384552, -0.1556060016155243, -0.3741312325000763, 0.05160851404070854, 0.18988187611103058, -0.27950379252433777, -0.40417546033859253, 0.33891692757606506, -0.2505062222480774, 0.24893099069595337, -0.2727980613708496, -0.6826083064079285, -0.15745921432971954, -0.10070294886827469, -0.574570894241333, 0.7716674208641052, 0.1753484457731247, -0.5909193754196167, 0.25049111247062683, -0.6249372363090515, -0.4447058141231537, -0.0672808438539505, -0.13093015551567078, -0.6116869449615479, 0.0558343343436718, 0.18241511285305023, 0.5129945874214172, 0.08894456177949905, 0.29805466532707214, -0.4014866054058075, -0.3527919352054596, 0.14588181674480438, -0.14148274064064026, 1.0626388788223267, 0.24326322972774506, -0.196840301156044, 0.09985816478729248, -0.9305889010429382, 0.03693430498242378, 0.15103305876255035, -0.24495740234851837, -0.1142752394080162, -0.2266661673784256, 0.3298436999320984, 0.171298086643219, 0.33346953988075256, -0.7351680397987366, 0.3156977593898773, -0.25034451484680176, 0.45057064294815063, 0.5787858963012695, -0.07810372859239578, -0.028891345486044884, -0.6750291585922241, 0.3923353850841522, 0.14702261984348297, 0.3799436688423157, -0.24199318885803223, -0.48888710141181946, -0.6395457983016968, -0.58998703956604, 0.5243776440620422, 0.5154646039009094, -0.11903936415910721, 0.47156548500061035, -0.05329787731170654, -0.46536096930503845, -0.9273983240127563, -0.10984870791435242, 0.5326969623565674, 0.571111261844635, 0.8251261115074158, -0.3847391903400421, -0.6735743880271912, -1.1286729574203491, 0.137962207198143, -0.09162793308496475, -0.09205088019371033, 0.3989270031452179, 0.6263349652290344, -0.5564879775047302, 0.5809633731842041, -0.41059714555740356, -0.43940165638923645, -0.38999292254447937, 0.46321311593055725, 0.3891262114048004, 0.6991532444953918, 0.6337517499923706, -0.16530707478523254, -0.5522007942199707, -0.378065824508667, -0.7079676985740662, 0.023117221891880035, -0.307765394449234, -0.06847038120031357, 0.25208884477615356, 0.4585830271244049, -0.32897910475730896, 0.46259328722953796, 0.346545934677124, 0.16691236197948456, 0.5205744504928589, -0.6682010889053345, -0.26008251309394836, -1.171474814414978, 0.3361372947692871, -0.11266069859266281, -0.2849813997745514, -0.7214925289154053, -0.22180570662021637, 0.2000293880701065, -0.005518757272511721, -0.36909177899360657, 0.42290905117988586, -0.34668228030204773, 0.25464484095573425, 0.1202394962310791, -0.11292394995689392, -0.09179981052875519, 0.6202866435050964, 0.23276007175445557, 0.29452627897262573, 0.4504655599594116, -0.4454750418663025, -0.09921768307685852, 0.5095988512039185, -0.14794477820396423, -0.013309119269251823, -1.125167965888977, 0.1667064130306244, -0.09314335137605667, 0.4631398320198059, -0.9788622856140137, -0.12288256734609604, 0.028211751952767372, -0.5587867498397827, 0.4984903931617737, 0.04347627982497215, -0.6668165922164917, -0.37935593724250793, -0.365530401468277, 0.34728166460990906, 0.9459073543548584, -0.36064234375953674, 0.56845623254776, 0.04310007765889168, 0.06520047783851624, -0.5928999185562134, -0.6822839379310608, -0.3737366497516632, 0.23987725377082825, -0.5668768882751465, 0.6575042605400085, -0.15354010462760925, 0.16491276025772095, 0.018606698140501976, 0.11782928556203842, -0.10382021963596344, -0.14056317508220673, 0.26757651567459106, 0.3961465060710907, -0.17474670708179474, 0.36569657921791077, 0.19520936906337738, 0.0803682878613472, 0.21051034331321716, -0.08793217688798904, 0.6415480971336365, -0.20426960289478302, -0.22316984832286835, -0.793800950050354, 0.2840777337551117, 0.5902822613716125, -0.0010580717353150249, 1.0006966590881348, 0.8889148235321045, -0.497176855802536, 0.12168805301189423, -0.7633406519889832, -0.3256818354129791, -0.3578590154647827, 0.4204550087451935, 0.06553106009960175, -0.5063621401786804, 0.7487980127334595, 0.18295209109783173, 0.10814889520406723, 0.5536085367202759, 0.4961475133895874, -0.5029869675636292, 1.1503971815109253, 0.5625180006027222, 0.013375436887145042, 0.3540208041667938, -0.6053377985954285, 0.002405068837106228, -0.9992230534553528, -0.21003520488739014, -0.28376397490501404, -0.2540745437145233, -0.5265818238258362, -0.24574866890907288, 0.6003084778785706, -0.0539599247276783, -0.3414541780948639, 0.36167752742767334, -0.5355071425437927, -0.20559446513652802, 0.6311488747596741, 0.5558887124061584, 0.038002774119377136, -0.016438225284218788, -0.6384142637252808, -0.17878654599189758, -0.8598599433898926, -0.4054895043373108, 1.5038182735443115, 0.5839464068412781, 0.5955166816711426, -0.12275613844394684, 1.0334222316741943, 0.11155302077531815, 0.5888210535049438, -0.39914053678512573, 0.4224153757095337, -0.3066219687461853, -0.8084425330162048, -0.057068973779678345, -0.18334344029426575, -0.9774818420410156, 0.03613301366567612, -0.4123694598674774, -0.7109125256538391, 0.17215347290039062, 0.27631843090057373, -0.7741226553916931, 0.1742929071187973, -0.5229802131652832, 0.874261736869812, -0.30342963337898254, -0.23907828330993652, -0.21318018436431885, -1.0087130069732666, 0.35464510321617126, -0.3234419524669647, -0.06809061020612717, 0.16779863834381104, 0.2122223973274231, 0.83707195520401, -0.7079383730888367, 0.9280915856361389, -0.11437259614467621, 0.24753186106681824, 0.1809731125831604, -0.23176699876785278, 0.2963002026081085, 0.011731921695172787, 0.094963937997818, 0.4343275725841522, 0.41094470024108887, -0.4485400319099426, -0.23030009865760803, 0.42913785576820374, -1.028214931488037, -0.2969542145729065, -0.756149172782898, -0.4655449390411377, -0.0032565617002546787, 0.026833267882466316, 0.6638163328170776, 0.7508249878883362, -0.23395350575447083, 0.1950158327817917, 0.7233901619911194, -0.7461660504341125, 0.20024718344211578, 0.5764602422714233, -0.12067718058824539, -0.5288882851600647, 0.6048656702041626, 0.0898786261677742, 0.37659239768981934, 0.29743582010269165, 0.018522299826145172, -0.29559627175331116, -0.45227351784706116, -0.025377437472343445, 0.7126126885414124, -0.4587765336036682, 0.10223276168107986, -1.121598482131958, -0.5720893740653992, -0.6649793386459351, -0.06871994584798813, -0.2701929807662964, -0.18200325965881348, -0.38831332325935364, 0.2617015540599823, 0.3097243905067444, 0.658990740776062, -0.30661454796791077, 0.3425452411174774, -1.0888792276382446, 0.10242084413766861, -0.017046842724084854, 0.08559489995241165, 0.11457693576812744, -0.7921299934387207, -0.24611565470695496, 0.07286816090345383, -0.448471337556839, -0.9840368628501892, 0.57241290807724, 0.14241860806941986, 0.6970944404602051, 0.3489045202732086, -0.06537491083145142, 0.7625105977058411, -0.5807258486747742, 0.6820770502090454, 0.20287083089351654, -0.8206914663314819, 0.7582939267158508, -0.32164543867111206, 0.3565569818019867, 0.5843384265899658, 0.9041462540626526, -0.29680025577545166, -0.3123706579208374, -1.1108189821243286, -0.8796956539154053, 0.7003726959228516, 0.18193018436431885, 0.07953941822052002, -0.2342948168516159, 0.4202101528644562, 0.027059875428676605, 0.1581084132194519, -0.8765159845352173, -0.40427088737487793, -0.103018619120121, -0.34311309456825256, -0.18995577096939087, -0.3557335138320923, -0.19216807186603546, -0.7065006494522095, 0.6309570670127869, 0.09382686764001846, 0.9207147359848022, 0.6753966212272644, -0.252721905708313, -0.029661180451512337, -0.13594308495521545, 0.8638647794723511, 0.5497702360153198, -0.7661310434341431, -0.35766488313674927, 0.32548460364341736, -0.755075991153717, -0.2988954484462738, 0.49424904584884644, 0.1186261773109436, 0.3460993468761444, 0.8213791847229004, 0.6894596815109253, 0.19502563774585724, -0.6550935506820679, 0.6010450720787048, -0.22457166016101837, -0.5346894264221191, -0.716524064540863, -0.0779421404004097, -0.06279925256967545, 0.10730258375406265, 0.07460036873817444, 0.01435498334467411, 0.029037831351161003, -0.46833670139312744, 0.3499307930469513, 0.3986707329750061, -0.6166139245033264, -0.4502067267894745, 0.933198869228363, 0.047236330807209015, -0.09105325490236282, 0.981608510017395, 0.12072699517011642, -0.5207880139350891, 0.6669676303863525, 0.47924771904945374, 0.8507203459739685, -0.11773964762687683, 0.15239903330802917, 0.7672567367553711, 0.1562587469816208, 0.030206963419914246, 0.4446414113044739, 0.019207043573260307, -0.5805597305297852, -0.1862136870622635, -0.6715846657752991, -0.3158254027366638, 0.46758338809013367, -0.9402192831039429, 0.25784382224082947, -0.7726967334747314, -0.38908496499061584, 0.06117808446288109, -0.079810231924057, -0.8143149018287659, -0.007347299717366695, 0.07803845405578613, 0.919296383857727, -0.7293305397033691, 1.0210975408554077, 0.768508791923523, -0.6910106539726257, -0.8771024942398071, -0.043081529438495636, -0.2060399055480957, -0.8827287554740906, 0.964505672454834, 0.09995125979185104, 0.40481796860694885, -0.04603350907564163, -0.5648018717765808, -0.6912601590156555, 1.0956647396087646, 0.034515224397182465, -0.6892547607421875, -0.12356933951377869, -0.006958852056413889, 0.9321519732475281, -0.26860564947128296, 0.5270997881889343, 0.2443569302558899, 0.14913316071033478, -0.06880349665880203, -0.8587726354598999, 0.013663121499121189, -0.19639195501804352, -0.23404082655906677, 0.06036565452814102, -0.5649397969245911, 1.0377416610717773, -0.4580065608024597, 0.21939845383167267, 0.4138469099998474, 0.4246772527694702, 0.36288735270500183, 0.2581404149532318, 0.2262643575668335, 0.7284230589866638, 0.7216773629188538, -0.04293916001915932, 1.1806267499923706, -0.6061967015266418, 0.3758500814437866, 0.9938029050827026, -0.18702729046344757, 0.7196640968322754, 0.24766583740711212, -0.2223394811153412, 0.7776287198066711, 0.5693100690841675, -0.24559226632118225, 0.5702605247497559, 0.3167484700679779, -0.20183803141117096, -0.25597748160362244, 0.11402998119592667, -0.7132842540740967, 0.16127976775169373, 0.33334580063819885, -0.9634994864463806, -0.01900390349328518, 0.03500647097826004, 0.08197624981403351, -0.33265742659568787, 0.13486230373382568, 0.5634212493896484, 0.12357314676046371, -0.5185479521751404, 0.703977644443512, -0.3097708523273468, 0.311076283454895, -0.9410921931266785, -0.1769770383834839, -0.1266341656446457, 0.3976229727268219, 0.13688644766807556, -0.2634562849998474, 0.02237514778971672, -0.17526023089885712, -0.1062367707490921, -0.2275102138519287, 0.24570918083190918, -0.35808852314949036, -0.5153964161872864, 0.4105827808380127, 0.41823825240135193, 0.2934401333332062, 0.3736121356487274, -0.9028058648109436, -0.045948535203933716, -0.022495301440358162, -0.06033593788743019, 0.3965754806995392, 0.21412864327430725, 0.1349802315235138, 0.5075598955154419, 0.6456940770149231, 0.16786804795265198, -0.04383715242147446, 0.14068859815597534, 0.8218990564346313, -0.46567675471305847, -0.2475862205028534, -0.6306236386299133, 0.48195040225982666, 0.006006290204823017, -0.570181667804718, 0.46756526827812195, 0.4406414330005646, 0.6961290836334229, -0.33207306265830994, 0.6231080889701843, 0.05593392252922058, 0.5805101990699768, -0.3485873341560364, 0.7809550762176514, -0.728456437587738, 0.17442381381988525, -0.4915235936641693, -0.7346052527427673, -0.2888399362564087, 0.8754482865333557, -0.17669086158275604, 0.29993629455566406, 0.9497860670089722, 0.608008086681366, 0.07823219150304794, -0.09004639089107513, 0.10194651782512665, 0.463763564825058, 0.284324586391449, 0.712464451789856, 0.4730726182460785, -0.598275899887085, 0.30549997091293335, -0.4098924696445465, -0.21996630728244781, -0.3162742257118225, -0.7695090770721436, -1.1432294845581055, -0.4798116087913513, -0.3543015122413635, -0.5947157144546509, 0.3383086621761322, 1.2059826850891113, 0.7752817869186401, -0.9218671917915344, -0.14855703711509705, -0.006512001622468233, -0.4472363293170929, -0.21727143228054047, -0.12750791013240814, 0.6708596348762512, -0.3482584059238434, -0.4410554766654968, 0.05948181822896004, -0.1385418176651001, 0.3325965106487274, -0.04569833353161812, 0.016539283096790314, -0.5099906325340271, -0.07477079331874847, 0.34378939867019653, 0.2736259698867798, -0.697243869304657, -0.14662709832191467, 0.13199351727962494, -0.37476447224617004, -0.0376090370118618, 0.5293250679969788, -0.8237909078598022, 0.47667399048805237, 0.42229899764060974, 0.43229934573173523, 0.6681649088859558, -0.1219174936413765, 0.5543547868728638, -0.5381745100021362, 0.0031406148336827755, 0.39077630639076233, 0.5478406548500061, -0.07186087965965271, -0.23854774236679077, 0.4343743920326233, 0.3636293411254883, -0.6210908889770508, -0.806941032409668, -0.18495529890060425, -1.1737004518508911, -0.15020941197872162, 0.8750321269035339, -0.1969565600156784, 0.041770074516534805, 0.06407371908426285, -0.18296128511428833, 0.47087550163269043, -0.26393911242485046, 0.7005853652954102, 0.5804892182350159, -0.34172675013542175, 0.07962634414434433, -0.770656168460846, 0.5838140845298767, 0.7196219563484192, -0.44652605056762695, -0.5218850374221802, 0.24097391963005066, 0.4224807322025299, 0.2652197480201721, 0.6665321588516235, -0.30555805563926697, 0.4507084786891937, -0.2788505256175995, 0.4214799702167511, -0.036514997482299805, -0.21794737875461578, -0.4028586745262146, -0.16535817086696625, -0.22406379878520966, -0.2545654773712158 ]
PlanTL-GOB-ES/roberta-base-bne
PlanTL-GOB-ES
"2023-01-31T13:59:59Z"
375,955
21
transformers
[ "transformers", "pytorch", "roberta", "fill-mask", "national library of spain", "spanish", "bne", "roberta-base-bne", "es", "dataset:bne", "arxiv:1907.11692", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:04Z"
--- language: - es license: apache-2.0 tags: - "national library of spain" - "spanish" - "bne" - "roberta-base-bne" datasets: - "bne" metrics: - "ppl" widget: - text: "Por la ventanilla del coche vi la Giralda y pensé que bonita que es la ciudad de <mask>." - text: "Más vale <mask> que lamentar." - text: "Caminante no hay camino, se hace camino al <mask>." - text: "Tengo una pelota roja y otra amarilla. Si le doy la roja a Jose, sólo me queda la <mask>." - text: "Tengo una pelota roja y otra amarilla. Si le doy la amarilla a Jose, sólo me queda la <mask>." - text: "El <mask> es el pico más alto de España." --- # RoBERTa base trained with data from the National Library of Spain (BNE) ## Table of Contents <details> <summary>Click to expand</summary> - [Overview](#overview) - [Model description](#model-description) - [Intended uses and limitations](#intended-uses-and-limitations) - [How to use](#how-to-use) - [Limitations and bias](#limitations-and-bias) - [Training](#training) - [Training data](#training-data) - [Training procedure](#training-procedure) - [Evaluation](#evaluation) - [Additional information](#additional-information) - [Author](#author) - [Contact information](#contact-information) - [Copyright](#copyright) - [Licensing information](#licensing-information) - [Funding](#funding) - [Citation Information](#citation-information) - [Disclaimer](#disclaimer) </details> ## Overview - **Architecture:** roberta-base - **Language:** Spanish - **Task:** fill-mask - **Data:** BNE ## Model description The **roberta-base-bne** is a transformer-based masked language model for the Spanish language. It is based on the [RoBERTa](https://arxiv.org/abs/1907.11692) base model and has been pre-trained using the largest Spanish corpus known to date, with a total of 570GB of clean and deduplicated text processed for this work, compiled from the web crawlings performed by the [National Library of Spain (Biblioteca Nacional de España)](http://www.bne.es/en/Inicio/index.html) from 2009 to 2019. ## Intended uses and limitations The **roberta-base-bne** model is ready-to-use only for masked language modeling to perform the Fill Mask task (try the inference API or read the next section). However, it is intended to be fine-tuned on non-generative downstream tasks such as Question Answering, Text Classification, or Named Entity Recognition. You can use the raw model for fill mask or fine-tune it to a downstream task. ## How to use Here is how to use this model: ```python >>> from transformers import pipeline >>> from pprint import pprint >>> unmasker = pipeline('fill-mask', model='PlanTL-GOB-ES/roberta-base-bne') >>> pprint(unmasker("Gracias a los datos de la BNE se ha podido <mask> este modelo del lenguaje.")) [{'score': 0.08422081917524338, 'token': 3832, 'token_str': ' desarrollar', 'sequence': 'Gracias a los datos de la BNE se ha podido desarrollar este modelo del lenguaje.'}, {'score': 0.06348305940628052, 'token': 3078, 'token_str': ' crear', 'sequence': 'Gracias a los datos de la BNE se ha podido crear este modelo del lenguaje.'}, {'score': 0.06148449331521988, 'token': 2171, 'token_str': ' realizar', 'sequence': 'Gracias a los datos de la BNE se ha podido realizar este modelo del lenguaje.'}, {'score': 0.056218471378088, 'token': 10880, 'token_str': ' elaborar', 'sequence': 'Gracias a los datos de la BNE se ha podido elaborar este modelo del lenguaje.'}, {'score': 0.05133328214287758, 'token': 31915, 'token_str': ' validar', 'sequence': 'Gracias a los datos de la BNE se ha podido validar este modelo del lenguaje.'}] ``` Here is how to use this model to get the features of a given text in PyTorch: ```python >>> from transformers import RobertaTokenizer, RobertaModel >>> tokenizer = RobertaTokenizer.from_pretrained('PlanTL-GOB-ES/roberta-base-bne') >>> model = RobertaModel.from_pretrained('PlanTL-GOB-ES/roberta-base-bne') >>> text = "Gracias a los datos de la BNE se ha podido desarrollar este modelo del lenguaje." >>> encoded_input = tokenizer(text, return_tensors='pt') >>> output = model(**encoded_input) >>> print(output.last_hidden_state.shape) torch.Size([1, 19, 768]) ``` ## Limitations and bias At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated. Nevertheless, here's an example of how the model can have biased predictions: ```python >>> from transformers import pipeline, set_seed >>> from pprint import pprint >>> unmasker = pipeline('fill-mask', model='PlanTL-GOB-ES/roberta-base-bne') >>> set_seed(42) >>> pprint(unmasker("Antonio está pensando en <mask>.")) [{'score': 0.07950365543365479, 'sequence': 'Antonio está pensando en ti.', 'token': 486, 'token_str': ' ti'}, {'score': 0.03375273942947388, 'sequence': 'Antonio está pensando en irse.', 'token': 13134, 'token_str': ' irse'}, {'score': 0.031026942655444145, 'sequence': 'Antonio está pensando en casarse.', 'token': 24852, 'token_str': ' casarse'}, {'score': 0.030703715980052948, 'sequence': 'Antonio está pensando en todo.', 'token': 665, 'token_str': ' todo'}, {'score': 0.02838558703660965, 'sequence': 'Antonio está pensando en ello.', 'token': 1577, 'token_str': ' ello'}] >>> set_seed(42) >>> pprint(unmasker("Mohammed está pensando en <mask>.")) [{'score': 0.05433618649840355, 'sequence': 'Mohammed está pensando en morir.', 'token': 9459, 'token_str': ' morir'}, {'score': 0.0400255024433136, 'sequence': 'Mohammed está pensando en irse.', 'token': 13134, 'token_str': ' irse'}, {'score': 0.03705748915672302, 'sequence': 'Mohammed está pensando en todo.', 'token': 665, 'token_str': ' todo'}, {'score': 0.03658654913306236, 'sequence': 'Mohammed está pensando en quedarse.', 'token': 9331, 'token_str': ' quedarse'}, {'score': 0.03329474478960037, 'sequence': 'Mohammed está pensando en ello.', 'token': 1577, 'token_str': ' ello'}] ``` ## Training ### Training data The [National Library of Spain (Biblioteca Nacional de España)](http://www.bne.es/en/Inicio/index.html) crawls all .es domains once a year. The training corpus consists of 59TB of WARC files from these crawls, carried out from 2009 to 2019. To obtain a high-quality training corpus, the corpus has been preprocessed with a pipeline of operations, including among others, sentence splitting, language detection, filtering of bad-formed sentences, and deduplication of repetitive contents. During the process, document boundaries are kept. This resulted in 2TB of Spanish clean corpus. Further global deduplication among the corpus is applied, resulting in 570GB of text. Some of the statistics of the corpus: | Corpora | Number of documents | Number of tokens | Size (GB) | |---------|---------------------|------------------|-----------| | BNE | 201,080,084 | 135,733,450,668 | 570GB | ### Training procedure The training corpus has been tokenized using a byte version of Byte-Pair Encoding (BPE) used in the original [RoBERTA](https://arxiv.org/abs/1907.11692) model with a vocabulary size of 50,262 tokens. The **roberta-base-bne** pre-training consists of a masked language model training, that follows the approach employed for the RoBERTa base. The training lasted a total of 48 hours with 16 computing nodes, each one with 4 NVIDIA V100 GPUs of 16GB VRAM. ## Evaluation When fine-tuned on downstream tasks, this model achieves the following results: | Dataset | Metric | [**RoBERTa-base**](https://huggingface.co/PlanTL-GOB-ES/roberta-base-bne) | |--------------|----------|------------| | MLDoc | F1 | 0.9664 | | CoNLL-NERC | F1 | 0.8851 | | CAPITEL-NERC | F1 | 0.8960 | | PAWS-X | F1 | 0.9020 | | UD-POS | F1 | 0.9907 | | CAPITEL-POS | F1 | 0.9846 | | SQAC | F1 | 0.7923 | | STS | Combined | 0.8533 | | XNLI | Accuracy | 0.8016 | For more evaluation details visit our [GitHub repository](https://github.com/PlanTL-GOB-ES/lm-spanish) or [paper](http://journal.sepln.org/sepln/ojs/ojs/index.php/pln/article/view/6405). ## Additional information ### Author Text Mining Unit (TeMU) from Barcelona Supercomputing Center (<[email protected]>). ### Contact information For further information, send an email to <[email protected]>. ### Copyright Copyright by the [Spanish State Secretariat for Digitalization and Artificial Intelligence (SEDIA)](https://portal.mineco.gob.es/en-us/digitalizacionIA/Pages/sedia.aspx). ### Licensing information This work is licensed under a [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) ### Funding This work was funded by the [Spanish State Secretariat for Digitalization and Artificial Intelligence (SEDIA)](https://portal.mineco.gob.es/en-us/digitalizacionIA/Pages/sedia.aspx) within the framework of the Plan-TL. ### Citation information If you use this model, please cite our [paper](http://journal.sepln.org/sepln/ojs/ojs/index.php/pln/article/view/6405): ``` @article{, title = {MarIA: Spanish Language Models}, author = {Asier Gutiérrez Fandiño and Jordi Armengol Estapé and Marc Pàmies and Joan Llop Palao and Joaquin Silveira Ocampo and Casimiro Pio Carrino and Carme Armentano Oller and Carlos Rodriguez Penagos and Aitor Gonzalez Agirre and Marta Villegas}, doi = {10.26342/2022-68-3}, issn = {1135-5948}, journal = {Procesamiento del Lenguaje Natural}, publisher = {Sociedad Española para el Procesamiento del Lenguaje Natural}, url = {https://upcommons.upc.edu/handle/2117/367156#.YyMTB4X9A-0.mendeley}, volume = {68}, year = {2022}, } ``` ### Disclaimer <details> <summary>Click to expand</summary> The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions. When third parties deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence. In no event shall the owner of the models (SEDIA) nor the creator (BSC) be liable for any results arising from the use made by third parties of these models. Los modelos publicados en este repositorio tienen una finalidad generalista y están a disposición de terceros. Estos modelos pueden tener sesgos y/u otro tipo de distorsiones indeseables. Cuando terceros desplieguen o proporcionen sistemas y/o servicios a otras partes usando alguno de estos modelos (o utilizando sistemas basados en estos modelos) o se conviertan en usuarios de los modelos, deben tener en cuenta que es su responsabilidad mitigar los riesgos derivados de su uso y, en todo caso, cumplir con la normativa aplicable, incluyendo la normativa en materia de uso de Inteligencia Artificial. En ningún caso el propietario de los modelos (SEDIA) ni el creador (BSC) serán responsables de los resultados derivados del uso que hagan terceros de estos models. </details>
[ -0.43949514627456665, -0.5930730104446411, 0.1578761488199234, 0.24592313170433044, -0.27425476908683777, 0.04016626998782158, -0.3904876708984375, -0.2864821255207062, 0.3189837634563446, 0.5487043857574463, -0.522768497467041, -0.90019291639328, -0.8475493788719177, 0.22341620922088623, -0.3083703815937042, 1.2056148052215576, 0.18331880867481232, 0.1601312905550003, 0.2907339334487915, -0.02114754542708397, -0.27661287784576416, -0.488753080368042, -0.4799140393733978, -0.154074564576149, 0.22590026259422302, 0.18201474845409393, 0.5012571215629578, 0.6636186242103577, 0.47815200686454773, 0.35384175181388855, -0.3024834096431732, 0.13306023180484772, -0.34695079922676086, 0.017039157450199127, -0.1883762925863266, -0.49788105487823486, -0.44700711965560913, -0.05528063327074051, 0.5224162936210632, 0.5980531573295593, 0.07224920392036438, 0.37591445446014404, -0.08725912868976593, 0.5763705372810364, -0.311921626329422, 0.28582459688186646, -0.6207509636878967, 0.013560270890593529, -0.31727224588394165, -0.06197713688015938, -0.4482921063899994, -0.2766436040401459, 0.1353965401649475, -0.22484657168388367, 0.5883845090866089, 0.025561906397342682, 1.3322923183441162, 0.27792856097221375, -0.08555826544761658, -0.33479639887809753, -0.5283735990524292, 0.9172465801239014, -0.8652725219726562, 0.2823287844657898, 0.5446235537528992, 0.06175411865115166, -0.19320516288280487, -0.5911833047866821, -0.5435149073600769, -0.21030116081237793, -0.11050822585821152, 0.24505403637886047, -0.3021853566169739, -0.2139216810464859, 0.3891487121582031, 0.3974505662918091, -0.6930245757102966, 0.01636343076825142, -0.5705944299697876, -0.3831612169742584, 0.5115686655044556, -0.058495860546827316, 0.23963506519794464, -0.4656292200088501, -0.3463815748691559, -0.45532745122909546, -0.46078500151634216, 0.07755403965711594, 0.639151394367218, 0.24055565893650055, -0.3477192521095276, 0.5758036971092224, -0.16143827140331268, 0.6218346953392029, 0.09661625325679779, -0.21674953401088715, 0.6651796102523804, -0.10900042206048965, -0.3104798197746277, -0.2280271202325821, 1.152622938156128, 0.0796240046620369, 0.2286306768655777, -0.05082281678915024, 0.01439573336392641, 0.07487930357456207, 0.01083606667816639, -0.6814250349998474, -0.21161161363124847, 0.40169236063957214, -0.45064008235931396, -0.41825076937675476, 0.3425450921058655, -1.089597463607788, 0.004259551875293255, -0.11925926804542542, 0.34912970662117004, -0.5714583992958069, -0.11579662561416626, 0.3032616376876831, -0.19588997960090637, 0.08804209530353546, -0.03990788757801056, -0.7928762435913086, 0.19531653821468353, 0.37844333052635193, 0.9116332530975342, -0.09041877090930939, -0.24595344066619873, -0.25266972184181213, -0.11977697163820267, 0.08370404690504074, 0.6207424402236938, -0.11523517221212387, -0.3464088439941406, -0.14273913204669952, 0.3676029145717621, -0.17194998264312744, -0.3725574314594269, 0.6900717616081238, -0.362403005361557, 0.593191921710968, 0.06090129539370537, -0.3321012556552887, -0.30520710349082947, 0.24601751565933228, -0.8183621168136597, 1.3299744129180908, 0.1101900041103363, -0.9818089604377747, 0.07389526814222336, -0.6304689645767212, -0.26948970556259155, -0.1996074914932251, 0.11987560242414474, -0.71173095703125, -0.23058146238327026, 0.4615591764450073, 0.49991169571876526, -0.3850044906139374, 0.4416739344596863, 0.0024866722524166107, -0.13197335600852966, 0.3571878969669342, -0.5156135559082031, 1.3156436681747437, 0.2077675759792328, -0.6827582120895386, 0.10270150750875473, -1.0075644254684448, -0.0322929285466671, 0.12944716215133667, -0.40763747692108154, 0.06979869306087494, -0.26673755049705505, 0.1406463384628296, 0.32035407423973083, 0.24929897487163544, -0.5752069354057312, 0.16752876341342926, -0.7552586793899536, 0.5044952034950256, 0.6506388783454895, -0.06941341608762741, 0.3342130184173584, -0.36874011158943176, 0.687171459197998, -0.11081263422966003, 0.18732349574565887, -0.1501466929912567, -0.7423382997512817, -0.8092156648635864, -0.5391831994056702, 0.5707569122314453, 0.8094475865364075, -0.5002598762512207, 0.8377185463905334, -0.46035659313201904, -0.6423652172088623, -0.596796989440918, -0.07811570167541504, 0.6033942103385925, 0.6381555795669556, 0.5500160455703735, -0.433464378118515, -0.8751590251922607, -0.6930807828903198, 0.160912424325943, -0.042501434683799744, -0.15960761904716492, 0.3104613721370697, 0.8916221857070923, -0.20594894886016846, 0.7812249064445496, -0.5146271586418152, -0.35383278131484985, -0.2278507500886917, 0.04850715026259422, 0.6575204730033875, 0.6087939143180847, 0.4639732241630554, -0.582442045211792, -0.5712323784828186, -0.03196975961327553, -0.7260255217552185, -0.10384716093540192, 0.11850358545780182, -0.1537240445613861, 0.3683058023452759, 0.40426838397979736, -0.4972727596759796, 0.35709524154663086, 0.7070030570030212, -0.3017854392528534, 0.5387223362922668, -0.34403708577156067, 0.06540185958147049, -1.2515854835510254, 0.34705471992492676, -0.10252071171998978, -0.1777876913547516, -0.5923139452934265, -0.09555521607398987, -0.05297316610813141, 0.005133494269102812, -0.6392260789871216, 0.6569586396217346, -0.5450452566146851, 0.08975164592266083, 0.00491257943212986, -0.009599660523235798, 0.044353291392326355, 0.7284049391746521, 0.18801867961883545, 0.6386089324951172, 0.6852390170097351, -0.338144451379776, 0.11512112617492676, 0.293170690536499, -0.3811849355697632, 0.13734865188598633, -0.7381564378738403, 0.17950023710727692, -0.15964384377002716, 0.1848853975534439, -0.8413892984390259, -0.1230132207274437, 0.4502016603946686, -0.6160246729850769, 0.36653804779052734, -0.4158332645893097, -0.36445093154907227, -0.5919575095176697, -0.36309534311294556, 0.1862020343542099, 0.6171332001686096, -0.3984271287918091, 0.5181456208229065, 0.32458794116973877, -0.02424873411655426, -0.927676796913147, -0.7624929547309875, 0.0054491497576236725, -0.2640410363674164, -0.7331770062446594, 0.6209192872047424, 0.0004097715427633375, 0.04720216989517212, -0.04747943580150604, 0.12737871706485748, 0.05149701610207558, -0.05730495974421501, 0.3701704442501068, 0.4656490087509155, -0.0012826141901314259, -0.20706309378147125, -0.20060209929943085, -0.19460159540176392, -0.10142327845096588, -0.5415189862251282, 1.118950366973877, -0.13786552846431732, -0.20895834267139435, -0.4018470048904419, 0.15231168270111084, 0.49248629808425903, -0.36114808917045593, 0.926032304763794, 0.7185752987861633, -0.3731103837490082, -0.09833693504333496, -0.5535523891448975, 0.004552331753075123, -0.42221498489379883, 0.3331833481788635, -0.35364827513694763, -0.7574328780174255, 0.8291206359863281, 0.2574816644191742, -0.22797401249408722, 0.7411962151527405, 0.8048887252807617, -0.0019814225379377604, 0.7831947803497314, 0.4199031889438629, -0.1118367463350296, 0.5185272693634033, -0.8953040838241577, 0.048421572893857956, -0.8610957264900208, -0.5046057105064392, -0.722874641418457, -0.0845365896821022, -0.6407414674758911, -0.6939098238945007, 0.14759473502635956, 0.13270235061645508, -0.27519845962524414, 0.5935860276222229, -0.6316415667533875, 0.3417585790157318, 0.7964523434638977, 0.29082807898521423, 0.06868987530469894, 0.0247080959379673, -0.26589468121528625, 0.04278299957513809, -0.6290693879127502, -0.6275637745857239, 1.4121510982513428, 0.49832072854042053, 0.4530118703842163, 0.08138114959001541, 0.6527690887451172, 0.25897350907325745, 0.09329801052808762, -0.5457301139831543, 0.4361993372440338, -0.24883735179901123, -0.6717572212219238, -0.2780076265335083, -0.2456386536359787, -1.107509970664978, 0.28395935893058777, -0.2277558147907257, -0.8353567123413086, 0.339851051568985, -0.031503040343523026, -0.15068268775939941, 0.3070167899131775, -0.5903401970863342, 0.9365906715393066, -0.1470826268196106, -0.3143143951892853, 0.14394651353359222, -0.7603270411491394, 0.2468930035829544, 0.056913312524557114, 0.21143779158592224, -0.04490085691213608, 0.15376438200473785, 0.9362065196037292, -0.6560335755348206, 0.8865818977355957, -0.049446914345026016, 0.09539032727479935, 0.39517736434936523, -0.1323426216840744, 0.586949348449707, -0.07120835781097412, -0.1792343556880951, 0.6038775444030762, -0.1251525580883026, -0.5260921716690063, -0.21345214545726776, 0.5380983352661133, -0.8509951829910278, -0.3806120455265045, -0.7187002897262573, -0.486077219247818, 0.14996349811553955, 0.2942837178707123, 0.6492559909820557, 0.3891027271747589, -0.08670281618833542, 0.12634189426898956, 0.7101063132286072, -0.3266684114933014, 0.4980902075767517, 0.40075135231018066, -0.06935519725084305, -0.650321364402771, 0.7885936498641968, 0.03630917891860008, 0.17431169748306274, 0.41733208298683167, 0.1828322857618332, -0.4624907374382019, -0.8562325239181519, -0.453762024641037, 0.37184399366378784, -0.5893664360046387, -0.3862723410129547, -0.8980624079704285, -0.1991501748561859, -0.6541427373886108, 0.0945655107498169, -0.2413831204175949, -0.44947850704193115, -0.31218966841697693, -0.16892759501934052, 0.5237671136856079, 0.3783320188522339, -0.04306015372276306, 0.3059249222278595, -0.6164706349372864, 0.2194853127002716, -0.06084667146205902, 0.18004834651947021, -0.15983396768569946, -0.9278972148895264, -0.2621723711490631, 0.05524494871497154, -0.2709227204322815, -1.1217697858810425, 0.900297224521637, 0.015092155896127224, 0.4085800051689148, 0.2374683916568756, -0.2654447853565216, 0.5482969284057617, -0.39727967977523804, 0.7803739309310913, 0.03296438977122307, -0.9321809411048889, 0.7480008006095886, -0.4701872169971466, 0.13594427704811096, 0.485033243894577, 0.44758737087249756, -0.3414085805416107, -0.5042511820793152, -1.0239975452423096, -1.0255709886550903, 0.8781995177268982, 0.37163132429122925, -0.05636453628540039, -0.09942831099033356, 0.07474877685308456, -0.023353569209575653, 0.1883804053068161, -0.9763355255126953, -0.48889029026031494, -0.3879750370979309, -0.42051899433135986, 0.07913817465305328, -0.06733264774084091, 0.00514718983322382, -0.2701057493686676, 1.017934799194336, 0.02429914101958275, 0.31418994069099426, 0.32224634289741516, -0.3029526174068451, 0.15499182045459747, 0.16466349363327026, 0.5718165040016174, 0.3852798044681549, -0.4558427929878235, 0.03177732974290848, 0.22585231065750122, -0.7694604992866516, -0.051735471934080124, 0.2076272964477539, -0.4357580244541168, 0.22200414538383484, 0.39100128412246704, 0.9309407472610474, 0.13314348459243774, -0.7310687899589539, 0.5462973713874817, 0.23962470889091492, -0.27953895926475525, -0.4184553623199463, -0.17369785904884338, -0.04362935572862625, 0.059022121131420135, 0.3153237998485565, 0.20517146587371826, -0.0772961899638176, -0.5336220860481262, 0.11848670244216919, 0.3962385952472687, -0.18681207299232483, -0.23562978208065033, 0.7677789330482483, -0.15936149656772614, -0.39176875352859497, 0.3623541593551636, -0.38232213258743286, -0.7797595262527466, 0.8812223672866821, 0.5269814133644104, 0.8013754487037659, -0.10451976209878922, 0.354412317276001, 0.8071540594100952, 0.30582210421562195, -0.3771805167198181, 0.2822689414024353, 0.29399335384368896, -0.6959604620933533, -0.3799058794975281, -0.8673695921897888, -0.09614789485931396, 0.36129575967788696, -0.5267360806465149, 0.38853293657302856, -0.4900752007961273, -0.26637136936187744, 0.002079049590975046, 0.1645241528749466, -0.8415759205818176, 0.25190696120262146, -0.041340120136737823, 0.8021286129951477, -1.0744435787200928, 0.9677347540855408, 0.46743106842041016, -0.8952813744544983, -0.7883385419845581, -0.285176545381546, -0.18815873563289642, -0.8698940277099609, 0.7428953647613525, 0.09045714139938354, 0.16433696448802948, -0.0007235229131765664, -0.3435969948768616, -1.111498475074768, 1.1260806322097778, 0.26489484310150146, -0.5448009371757507, -0.05045459792017937, 0.09250486642122269, 0.7880144119262695, -0.27815210819244385, 0.5846540927886963, 0.4350510537624359, 0.4516165554523468, -0.03940480574965477, -0.8803253173828125, 0.15388239920139313, -0.4478927254676819, -0.03137662634253502, 0.08256618678569794, -0.672086775302887, 1.009634017944336, 0.0640406385064125, -0.1348126232624054, 0.07229612022638321, 0.6266466379165649, 0.15526483952999115, 0.04459339752793312, 0.23700466752052307, 0.7974083423614502, 0.9320228099822998, -0.32867270708084106, 0.9060022234916687, -0.37966611981391907, 0.601060152053833, 1.030630111694336, 0.12639428675174713, 0.797887921333313, 0.34413623809814453, -0.40796852111816406, 0.809623122215271, 0.4878659248352051, -0.520132839679718, 0.48470890522003174, 0.14006109535694122, -0.10753083974123001, 0.1783468872308731, 0.014724945649504662, -0.3368668258190155, 0.4672017991542816, 0.2128749042749405, -0.585378885269165, 0.03343517705798149, 0.10969630628824234, 0.2924559414386749, 0.16139894723892212, -0.10052324086427689, 0.49403849244117737, -0.2391560673713684, -0.7723351716995239, 0.7152933478355408, 0.246427521109581, 0.9764792919158936, -0.45210251212120056, 0.1728552132844925, -0.15342684090137482, 0.09031732380390167, -0.27943265438079834, -0.6189718842506409, 0.25747036933898926, 0.30989184975624084, -0.4444713294506073, -0.299806147813797, 0.5069074630737305, -0.3859327733516693, -0.7365950345993042, 0.20090988278388977, 0.42179426550865173, 0.4295080006122589, 0.0327165424823761, -0.8125573992729187, 0.016381362453103065, 0.25425368547439575, -0.2363341897726059, 0.18636946380138397, 0.3133990168571472, -0.1675690859556198, 0.5554920434951782, 0.9105405211448669, 0.3127337396144867, 0.3728398382663727, 0.17197354137897491, 0.6793960928916931, -0.7145383954048157, -0.2819923162460327, -0.88355952501297, 0.7382468581199646, -0.17283831536769867, -0.43884745240211487, 0.7753162980079651, 0.8073731660842896, 0.9939432740211487, -0.26543018221855164, 0.7433316707611084, -0.29187530279159546, 0.49158936738967896, -0.5734979510307312, 0.5747435688972473, -0.11912273615598679, 0.2473497986793518, -0.26159772276878357, -0.8307079672813416, -0.3565201461315155, 0.7819547057151794, -0.27298110723495483, -0.015029901638627052, 0.708121120929718, 1.055280327796936, 0.08004456758499146, -0.2847535312175751, -0.07828103750944138, 0.3674573004245758, 0.30245116353034973, 0.7040282487869263, 0.38133111596107483, -0.8362246155738831, 0.6533598303794861, -0.5725809931755066, -0.1898789256811142, -0.20605619251728058, -0.9188657999038696, -1.0433731079101562, -0.6127716898918152, -0.36369338631629944, -0.6286919713020325, 0.036682792007923126, 0.92241370677948, 0.5824253559112549, -1.1197243928909302, -0.1920485645532608, -0.32883530855178833, 0.07197073101997375, -0.18635466694831848, -0.25248467922210693, 0.7543500065803528, -0.1439458429813385, -1.119897723197937, 0.24650850892066956, 0.030924350023269653, 0.15827274322509766, -0.219808429479599, -0.07907773554325104, -0.4780733287334442, -0.12925279140472412, 0.3392007052898407, 0.4530225098133087, -0.7562293410301208, -0.1242387518286705, 0.21640866994857788, -0.19856131076812744, 0.198878213763237, 0.3300890624523163, -0.8340721726417542, 0.29687750339508057, 0.6654120087623596, 0.30365896224975586, 0.8224948644638062, -0.06999262422323227, 0.2606879472732544, -0.7628061771392822, 0.4236452281475067, 0.25780078768730164, 0.48337146639823914, 0.36004874110221863, -0.28064846992492676, 0.6637754440307617, 0.4429396092891693, -0.4091353416442871, -0.8502024412155151, -0.05914555862545967, -1.2554340362548828, -0.2004508078098297, 1.127387285232544, -0.14377345144748688, -0.399623304605484, -0.09473522007465363, -0.3615541160106659, 0.5091382265090942, -0.29522013664245605, 0.7792876958847046, 0.6713261008262634, 0.10420443117618561, 0.06062506511807442, -0.5430341362953186, 0.4836525619029999, 0.4364284574985504, -0.6668168902397156, -0.25749915838241577, 0.20124785602092743, 0.4605874717235565, 0.3251970112323761, 0.6373443007469177, -0.28416112065315247, 0.012114172801375389, -0.0136240404099226, 0.27104616165161133, -0.0811576098203659, -0.17258502542972565, -0.4117530286312103, 0.2150513380765915, -0.2035612165927887, -0.1939759999513626 ]
DeepFloyd/IF-I-XL-v1.0
DeepFloyd
"2023-06-02T19:05:00Z"
371,138
531
diffusers
[ "diffusers", "pytorch", "if", "text-to-image", "arxiv:2205.11487", "arxiv:2110.02861", "license:deepfloyd-if-license", "has_space", "diffusers:IFPipeline", "region:us" ]
text-to-image
"2023-04-06T21:22:41Z"
--- license: deepfloyd-if-license extra_gated_prompt: "DeepFloyd LICENSE AGREEMENT\nThis License Agreement (as may be amended in accordance with this License Agreement, “License”), between you, or your employer or other entity (if you are entering into this agreement on behalf of your employer or other entity) (“Licensee” or “you”) and Stability AI Ltd.. (“Stability AI” or “we”) applies to your use of any computer program, algorithm, source code, object code, or software that is made available by Stability AI under this License (“Software”) and any specifications, manuals, documentation, and other written information provided by Stability AI related to the Software (“Documentation”).\nBy clicking “I Accept” below or by using the Software, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to use the Software or Documentation (collectively, the “Software Products”), and you must immediately cease using the Software Products. If you are agreeing to be bound by the terms of this License on behalf of your employer or other entity, you represent and warrant to Stability AI that you have full legal authority to bind your employer or such entity to this License. If you do not have the requisite authority, you may not accept the License or access the Software Products on behalf of your employer or other entity.\n1. LICENSE GRANT\n a. Subject to your compliance with the Documentation and Sections 2, 3, and 5, Stability AI grants you a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, royalty free and limited license under Stability AI’s copyright interests to reproduce, distribute, and create derivative works of the Software solely for your non-commercial research purposes. The foregoing license is personal to you, and you may not assign or sublicense this License or any other rights or obligations under this License without Stability AI’s prior written consent; any such assignment or sublicense will be void and will automatically and immediately terminate this License.\n b. You may make a reasonable number of copies of the Documentation solely for use in connection with the license to the Software granted above.\n c. The grant of rights expressly set forth in this Section 1 (License Grant) are the complete grant of rights to you in the Software Products, and no other licenses are granted, whether by waiver, estoppel, implication, equity or otherwise. Stability AI and its licensors reserve all rights not expressly granted by this License.\L\n2. RESTRICTIONS\n You will not, and will not permit, assist or cause any third party to:\n a. use, modify, copy, reproduce, create derivative works of, or distribute the Software Products (or any derivative works thereof, works incorporating the Software Products, or any data produced by the Software), in whole or in part, for (i) any commercial or production purposes, (ii) military purposes or in the service of nuclear technology, (iii) purposes of surveillance, including any research or development relating to surveillance, (iv) biometric processing, (v) in any manner that infringes, misappropriates, or otherwise violates any third-party rights, or (vi) in any manner that violates any applicable law and violating any privacy or security laws, rules, regulations, directives, or governmental requirements (including the General Data Privacy Regulation (Regulation (EU) 2016/679), the California Consumer Privacy Act, and any and all laws governing the processing of biometric information), as well as all amendments and successor laws to any of the foregoing;\n b. alter or remove copyright and other proprietary notices which appear on or in the Software Products;\n c. utilize any equipment, device, software, or other means to circumvent or remove any security or protection used by Stability AI in connection with the Software, or to circumvent or remove any usage restrictions, or to enable functionality disabled by Stability AI; or\n d. offer or impose any terms on the Software Products that alter, restrict, or are inconsistent with the terms of this License.\n e. 1) violate any applicable U.S. and non-U.S. export control and trade sanctions laws (“Export Laws”); 2) directly or indirectly export, re-export, provide, or otherwise transfer Software Products: (a) to any individual, entity, or country prohibited by Export Laws; (b) to anyone on U.S. or non-U.S. government restricted parties lists; or (c) for any purpose prohibited by Export Laws, including nuclear, chemical or biological weapons, or missile technology applications; 3) use or download Software Products if you or they are: (a) located in a comprehensively sanctioned jurisdiction, (b) currently listed on any U.S. or non-U.S. restricted parties list, or (c) for any purpose prohibited by Export Laws; and (4) will not disguise your location through IP proxying or other methods.\L\n3. ATTRIBUTION\n Together with any copies of the Software Products (as well as derivative works thereof or works incorporating the Software Products) that you distribute, you must provide (i) a copy of this License, and (ii) the following attribution notice: “DeepFloyd is licensed under the DeepFloyd License, Copyright (c) Stability AI Ltd. All Rights Reserved.”\L\n4. DISCLAIMERS\n THE SOFTWARE PRODUCTS ARE PROVIDED “AS IS” and “WITH ALL FAULTS” WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. STABILITY AIEXPRESSLY DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, WHETHER BY STATUTE, CUSTOM, USAGE OR OTHERWISE AS TO ANY MATTERS RELATED TO THE SOFTWARE PRODUCTS, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, SATISFACTORY QUALITY, OR NON-INFRINGEMENT. STABILITY AI MAKES NO WARRANTIES OR REPRESENTATIONS THAT THE SOFTWARE PRODUCTS WILL BE ERROR FREE OR FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR PRODUCE ANY PARTICULAR RESULTS.\L\n5. LIMITATION OF LIABILITY\n TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL STABILITY AI BE LIABLE TO YOU (A) UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, WARRANTY, OR OTHERWISE UNDER THIS LICENSE, OR (B) FOR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, PUNITIVE OR SPECIAL DAMAGES OR LOST PROFITS, EVEN IF STABILITY AI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE SOFTWARE PRODUCTS, THEIR CONSTITUENT COMPONENTS, AND ANY OUTPUT (COLLECTIVELY, “SOFTWARE MATERIALS”) ARE NOT DESIGNED OR INTENDED FOR USE IN ANY APPLICATION OR SITUATION WHERE FAILURE OR FAULT OF THE SOFTWARE MATERIALS COULD REASONABLY BE ANTICIPATED TO LEAD TO SERIOUS INJURY OF ANY PERSON, INCLUDING POTENTIAL DISCRIMINATION OR VIOLATION OF AN INDIVIDUAL’S PRIVACY RIGHTS, OR TO SEVERE PHYSICAL, PROPERTY, OR ENVIRONMENTAL DAMAGE (EACH, A “HIGH-RISK USE”). IF YOU ELECT TO USE ANY OF THE SOFTWARE MATERIALS FOR A HIGH-RISK USE, YOU DO SO AT YOUR OWN RISK. YOU AGREE TO DESIGN AND IMPLEMENT APPROPRIATE DECISION-MAKING AND RISK-MITIGATION PROCEDURES AND POLICIES IN CONNECTION WITH A HIGH-RISK USE SUCH THAT EVEN IF THERE IS A FAILURE OR FAULT IN ANY OF THE SOFTWARE MATERIALS, THE SAFETY OF PERSONS OR PROPERTY AFFECTED BY THE ACTIVITY STAYS AT A LEVEL THAT IS REASONABLE, APPROPRIATE, AND LAWFUL FOR THE FIELD OF THE HIGH-RISK USE.\L\n6. INDEMNIFICATION\n You will indemnify, defend and hold harmless Stability AI and our subsidiaries and affiliates, and each of our respective shareholders, directors, officers, employees, agents, successors, and assigns (collectively, the “Stability AI Parties”) from and against any losses, liabilities, damages, fines, penalties, and expenses (including reasonable attorneys’ fees) incurred by any Stability AI Party in connection with any claim, demand, allegation, lawsuit, proceeding, or investigation (collectively, “Claims”) arising out of or related to: (a) your access to or use of the Software Products (as well as any results or data generated from such access or use), including any High-Risk Use (defined below); (b) your violation of this License; or (c) your violation, misappropriation or infringement of any rights of another (including intellectual property or other proprietary rights and privacy rights). You will promptly notify the Stability AI Parties of any such Claims, and cooperate with Stability AI Parties in defending such Claims. You will also grant the Stability AI Parties sole control of the defense or settlement, at Stability AI’s sole option, of any Claims. This indemnity is in addition to, and not in lieu of, any other indemnities or remedies set forth in a written agreement between you and Stability AI or the other Stability AI Parties.\L\n7. TERMINATION; SURVIVAL\n a. This License will automatically terminate upon any breach by you of the terms of this License.\L\Lb. We may terminate this License, in whole or in part, at any time upon notice (including electronic) to you.\L\Lc. The following sections survive termination of this License: 2 (Restrictions), 3 (Attribution), 4 (Disclaimers), 5 (Limitation on Liability), 6 (Indemnification) 7 (Termination; Survival), 8 (Third Party Materials), 9 (Trademarks), 10 (Applicable Law; Dispute Resolution), and 11 (Miscellaneous).\L\n8. THIRD PARTY MATERIALS\n The Software Products may contain third-party software or other components (including free and open source software) (all of the foregoing, “Third Party Materials”), which are subject to the license terms of the respective third-party licensors. Your dealings or correspondence with third parties and your use of or interaction with any Third Party Materials are solely between you and the third party. Stability AI does not control or endorse, and makes no representations or warranties regarding, any Third Party Materials, and your access to and use of such Third Party Materials are at your own risk.\L\n9. TRADEMARKS\n Licensee has not been granted any trademark license as part of this License and may not use any name or mark associated with Stability AI without the prior written permission of Stability AI, except to the extent necessary to make the reference required by the “ATTRIBUTION” section of this Agreement.\L\n10. APPLICABLE LAW; DISPUTE RESOLUTION\n This License will be governed and construed under the laws of the State of California without regard to conflicts of law provisions. Any suit or proceeding arising out of or relating to this License will be brought in the federal or state courts, as applicable, in San Mateo County, California, and each party irrevocably submits to the jurisdiction and venue of such courts.\L\n11. MISCELLANEOUS\n If any provision or part of a provision of this License is unlawful, void or unenforceable, that provision or part of the provision is deemed severed from this License, and will not affect the validity and enforceability of any remaining provisions. The failure of Stability AI to exercise or enforce any right or provision of this License will not operate as a waiver of such right or provision. This License does not confer any third-party beneficiary rights upon any other person or entity. This License, together with the Documentation, contains the entire understanding between you and Stability AI regarding the subject matter of this License, and supersedes all other written or oral agreements and understandings between you and Stability AI regarding such subject matter. No change or addition to any provision of this License will be binding unless it is in writing and signed by an authorized representative of both you and Stability AI." extra_gated_fields: "Organization /\_Affiliation": text Previously related publications: text I accept the above license agreement, and will use the Software non-commercially and for research purposes only: checkbox tags: - if - text-to-image inference: false --- # IF-I-XL-v1.0 DeepFloyd-IF is a pixel-based text-to-image triple-cascaded diffusion model, that can generate pictures with new state-of-the-art for photorealism and language understanding. The result is a highly efficient model that outperforms current state-of-the-art models, achieving a zero-shot FID-30K score of `6.66` on the COCO dataset. *Inspired by* [*Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding*](https://arxiv.org/pdf/2205.11487.pdf) ![](./pics/deepfloyd_if_scheme.jpg) ## Model Details - **Developed by:** DeepFloyd, StabilityAI - **Model type:** pixel-based text-to-image cascaded diffusion model - **Cascade Stage:** I - **Num Parameters:** 4.3B - **Language(s):** primarily English and, to a lesser extent, other Romance languages - **License:** <span style="color:blue"><a href="https://huggingface.co/spaces/DeepFloyd/deepfloyd-if-license">DeepFloyd IF License Agreement</a></span> - **Model Description:** DeepFloyd-IF is modular composed of frozen text mode and three pixel cascaded diffusion modules, each designed to generate images of increasing resolution: 64x64, 256x256, and 1024x1024. All stages of the model utilize a frozen text encoder based on the T5 transformer to extract text embeddings, which are then fed into a UNet architecture enhanced with cross-attention and attention-pooling - **Resources for more information:** [GitHub](https://github.com/deep-floyd/IF), [deepfloyd.ai](https://deepfloyd.ai), [All Links](https://linktr.ee/deepfloyd) - **Cite as (Soon):** - ## Using with `diffusers` IF is integrated with the 🤗 Hugging Face [🧨 diffusers library](https://github.com/huggingface/diffusers/), which is optimized to run on GPUs with as little as 14 GB of VRAM. Before you can use IF, you need to accept its usage conditions. To do so: 1. Make sure to have a [Hugging Face account](https://huggingface.co/join) and be loggin in 2. Accept the license on the model card of [DeepFloyd/IF-I-XL-v1.0](https://huggingface.co/DeepFloyd/IF-I-XL-v1.0) 3. Make sure to login locally. Install `huggingface_hub` ```sh pip install huggingface_hub --upgrade ``` run the login function in a Python shell ```py from huggingface_hub import login login() ``` and enter your [Hugging Face Hub access token](https://huggingface.co/docs/hub/security-tokens#what-are-user-access-tokens). Next we install `diffusers` and dependencies: ```sh pip install diffusers accelerate transformers safetensors sentencepiece ``` And we can now run the model locally. By default `diffusers` makes use of [model cpu offloading](https://huggingface.co/docs/diffusers/optimization/fp16#model-offloading-for-fast-inference-and-memory-savings) to run the whole IF pipeline with as little as 14 GB of VRAM. If you are using `torch>=2.0.0`, make sure to **remove all** `enable_xformers_memory_efficient_attention()` functions. * **Load all stages and offload to CPU** ```py from diffusers import DiffusionPipeline from diffusers.utils import pt_to_pil import torch # stage 1 stage_1 = DiffusionPipeline.from_pretrained("DeepFloyd/IF-I-XL-v1.0", variant="fp16", torch_dtype=torch.float16) stage_1.enable_xformers_memory_efficient_attention() # remove line if torch.__version__ >= 2.0.0 stage_1.enable_model_cpu_offload() # stage 2 stage_2 = DiffusionPipeline.from_pretrained( "DeepFloyd/IF-II-L-v1.0", text_encoder=None, variant="fp16", torch_dtype=torch.float16 ) stage_2.enable_xformers_memory_efficient_attention() # remove line if torch.__version__ >= 2.0.0 stage_2.enable_model_cpu_offload() # stage 3 safety_modules = {"feature_extractor": stage_1.feature_extractor, "safety_checker": stage_1.safety_checker, "watermarker": stage_1.watermarker} stage_3 = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-x4-upscaler", **safety_modules, torch_dtype=torch.float16) stage_3.enable_xformers_memory_efficient_attention() # remove line if torch.__version__ >= 2.0.0 stage_3.enable_model_cpu_offload() ``` * **Retrieve Text Embeddings** ```py prompt = 'a photo of a kangaroo wearing an orange hoodie and blue sunglasses standing in front of the eiffel tower holding a sign that says "very deep learning"' # text embeds prompt_embeds, negative_embeds = stage_1.encode_prompt(prompt) ``` * **Run stage 1** ```py generator = torch.manual_seed(0) image = stage_1(prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_embeds, generator=generator, output_type="pt").images pt_to_pil(image)[0].save("./if_stage_I.png") ``` * **Run stage 2** ```py image = stage_2( image=image, prompt_embeds=prompt_embeds, negative_prompt_embeds=negative_embeds, generator=generator, output_type="pt" ).images pt_to_pil(image)[0].save("./if_stage_II.png") ``` * **Run stage 3** ```py image = stage_3(prompt=prompt, image=image, generator=generator, noise_level=100).images image[0].save("./if_stage_III.png") ``` There are multiple ways to speed up the inference time and lower the memory consumption even more with `diffusers`. To do so, please have a look at the Diffusers docs: - 🚀 [Optimizing for inference time](https://huggingface.co/docs/diffusers/api/pipelines/if#optimizing-for-speed) - ⚙️ [Optimizing for low memory during inference](https://huggingface.co/docs/diffusers/api/pipelines/if#optimizing-for-memory) For more in-detail information about how to use IF, please have a look at [the IF blog post](https://huggingface.co/blog/if) and the [documentation](https://huggingface.co/docs/diffusers/main/en/api/pipelines/if) 📖. Diffusers dreambooth scripts also supports fine-tuning 🎨 [IF](https://huggingface.co/docs/diffusers/main/en/training/dreambooth#if). With parameter efficient finetuning, you can add new concepts to IF with a single GPU and ~28 GB VRAM. ## Training **Training Data:** 1.2B text-image pairs (based on LAION-A and few additional internal datasets) Test/Valid parts of datasets are not used at any cascade and stage of training. Valid part of COCO helps to demonstrate "online" loss behaviour during training (to catch incident and other problems), but dataset is never used for train. **Training Procedure:** IF-I-XL-v1.0 is a pixel-based diffusion cascade which uses T5-Encoder embeddings (hidden states) to generate 64px image. During training, - Images are cropped to square via shifted-center-crop augmentation (randomly shift from center up to 0.1 of size) and resized to 64px using `Pillow==9.2.0` BICUBIC resampling with reducing_gap=None (it helps to avoid aliasing) and processed to tensor BxCxHxW - Text prompts are encoded through open-sourced frozen T5-v1_1-xxl text-encoder (that completely was trained by Google team), random 10% of texts are dropped to empty string to add ability for classifier free guidance (CFG) - The non-pooled output of the text encoder is fed into the projection (linear layer without activation) and is used in UNet backbone of the diffusion model via controlled hybrid self- and cross- attention - Also, the output of the text encode is pooled via attention-pooling (64 heads) and is used in time embed as additional features - Diffusion process is limited by 1000 discrete steps, with cosine beta schedule of noising image - The loss is a reconstruction objective between the noise that was added to the image and the prediction made by the UNet - The training process for checkpoint IF-I-XL-v1.0 has 2_420_000 steps at resolution 64x64 on all datasets, OneCycleLR policy, few-bit backward GELU activations, optimizer AdamW8bit + DeepSpeed-Zero1, fully frozen T5-Encoder ![](./pics/loss.jpg) **Hardware:** 64 x 8 x A100 GPUs **Optimizer:** [AdamW8bit](https://arxiv.org/abs/2110.02861) + [DeepSpeed ZeRO-1](https://www.deepspeed.ai/tutorials/zero/) **Batch:** 3072 **Learning rate**: [one-cycle](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.OneCycleLR.html) cosine strategy, warmup 10000 steps, start_lr=2e-6, max_lr=5e-5, final_lr=5e-9 ![](./pics/lr.jpg) ## Evaluation Results `FID-30K: 6.66` ![](./pics/fid30k_if.jpg) # Uses ## Direct Use The model is released for research purposes. Any attempt to deploy the model in production requires not only that the LICENSE is followed but full liability over the person deploying the model. Possible research areas and tasks include: - Generation of artistic imagery and use in design and other artistic processes. - Safe deployment of models which have the potential to generate harmful content. - Probing and understanding the limitations and biases of generative models. - Applications in educational or creative tools. - Research on generative models. Excluded uses are described below. ### Misuse, Malicious Use, and Out-of-Scope Use _Note: This section is originally taken from the [DALLE-MINI model card](https://huggingface.co/dalle-mini/dalle-mini), was used for Stable Diffusion but applies in the same way for IF_. The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes. #### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. #### Misuse and Malicious Use Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to: - Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc. - Intentionally promoting or propagating discriminatory content or harmful stereotypes. - Impersonating individuals without their consent. - Sexual content without consent of the people who might see it. - Mis- and disinformation - Representations of egregious violence and gore - Sharing of copyrighted or licensed material in violation of its terms of use. - Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use. ## Limitations and Bias ### Limitations - The model does not achieve perfect photorealism - The model was trained mainly with English captions and will not work as well in other languages. - The model was trained on a subset of the large-scale dataset [LAION-5B](https://laion.ai/blog/laion-5b/), which contains adult, violent and sexual content. To partially mitigate this, we have... (see Training section). ### Bias While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. IF was primarily trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/), which consists of images that are limited to English descriptions. Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as white and western cultures are often set as the default. Further, the ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts. IF mirrors and exacerbates biases to such a degree that viewer discretion must be advised irrespective of the input or its intent. ## Citation (Soon) *This model card was written by: DeepFloyd-Team and is based on the [StableDiffusion model card](https://huggingface.co/CompVis/stable-diffusion-v1-4).*
[ -0.573823869228363, -0.8590337038040161, 0.25994449853897095, 0.383036732673645, -0.227296844124794, -0.04393784701824188, -0.25847679376602173, -0.4608113467693329, 0.07610537856817245, 0.28929510712623596, -0.5470350980758667, -0.564221203327179, -0.6301172375679016, -0.19694998860359192, -0.2325938194990158, 1.023160696029663, -0.1643306463956833, -0.19251665472984314, -0.09595822542905807, 0.02305116131901741, -0.188077911734581, -0.10568685829639435, -0.9747687578201294, -0.33903148770332336, 0.2761882245540619, 0.2792595326900482, 0.5306857824325562, 0.3401702046394348, 0.3544827103614807, 0.3592104911804199, -0.23860761523246765, -0.04078967124223709, -0.5052992105484009, -0.38470563292503357, 0.13638225197792053, -0.23921017348766327, -0.43822574615478516, 0.016977204009890556, 0.6200937032699585, 0.15115772187709808, -0.0255449078977108, 0.06596368551254272, 0.10723471641540527, 0.6754189133644104, -0.6270133852958679, 0.26490160822868347, -0.28184619545936584, 0.2035658061504364, 0.008634721860289574, 0.1914440542459488, -0.15244872868061066, -0.18309922516345978, 0.2811572849750519, -0.6353239417076111, 0.5015708804130554, -0.08704955130815506, 1.1304287910461426, 0.2965589761734009, -0.1251903474330902, -0.10962190479040146, -0.34638306498527527, 0.658656656742096, -0.7107089757919312, 0.2975364625453949, 0.12722355127334595, 0.04678361117839813, 0.06998436897993088, -0.897354006767273, -0.6706324219703674, -0.13364216685295105, 0.0001300919393543154, 0.34172323346138, -0.17502395808696747, 0.13352540135383606, 0.31743526458740234, 0.6427173018455505, -0.45651641488075256, -0.08070410043001175, -0.5040701627731323, -0.18823100626468658, 0.8273773789405823, -0.016317304223775864, 0.25148922204971313, -0.0857410728931427, -0.4991167485713959, -0.2096417397260666, -0.23309803009033203, 0.16972176730632782, 0.05908973142504692, 0.02067669667303562, -0.6566060185432434, 0.3288993835449219, -0.0882490947842598, 0.35554128885269165, 0.37405911087989807, -0.20338380336761475, 0.4195554852485657, -0.15920375287532806, -0.43355441093444824, 0.14165714383125305, 1.1001503467559814, 0.3068130314350128, 0.13600897789001465, 0.07286446541547775, -0.1274178922176361, 0.028900757431983948, -0.0027286254335194826, -1.2754135131835938, -0.5194417834281921, 0.38013955950737, -0.3259159326553345, -0.4757937490940094, -0.15458743274211884, -0.8449302911758423, -0.14282339811325073, 0.1913192868232727, 0.5460600256919861, -0.7933846712112427, -0.417615681886673, 0.24931222200393677, -0.2209496647119522, 0.22429503500461578, 0.3726382255554199, -0.7282957434654236, 0.33389994502067566, 0.3349289894104004, 1.0303648710250854, -0.08380626142024994, -0.170089453458786, -0.1471521407365799, -0.21499817073345184, -0.2790766954421997, 0.5759432315826416, -0.23771999776363373, -0.38096439838409424, -0.14075379073619843, 0.10752440243959427, -0.14597554504871368, -0.38038936257362366, 0.6563714146614075, -0.36181002855300903, 0.47723883390426636, -0.09914510697126389, -0.6625049114227295, -0.3621046245098114, 0.07766376435756683, -0.5765497088432312, 1.2232664823532104, 0.26292771100997925, -0.9678390026092529, 0.20895744860172272, -0.71792072057724, -0.41808658838272095, -0.014824130572378635, 0.03063446842133999, -0.7377427220344543, 0.01676938682794571, 0.31170883774757385, 0.6493080258369446, -0.18928436934947968, 0.018956830725073814, -0.27110379934310913, -0.4024161994457245, 0.054064322263002396, -0.34901174902915955, 1.1107302904129028, 0.27347129583358765, -0.7232536673545837, -0.003927198704332113, -0.6524690389633179, -0.06088465452194214, 0.37054452300071716, -0.32423707842826843, 0.1304928958415985, -0.407686710357666, 0.2974110543727875, 0.2822681963443756, 0.21495094895362854, -0.6040818095207214, 0.19339607656002045, -0.377016544342041, 0.48066091537475586, 0.638858437538147, -0.016171449795365334, 0.5033947825431824, -0.1267974078655243, 0.468279629945755, 0.2785550653934479, 0.21535241603851318, -0.2640402019023895, -0.7839147448539734, -0.9976081848144531, -0.4002969264984131, 0.14903326332569122, 0.5056961178779602, -0.7707098126411438, 0.4073143005371094, -0.005493939388543367, -0.541381299495697, -0.6338706612586975, 0.028499286621809006, 0.5476474761962891, 0.6412491798400879, 0.42965343594551086, -0.22798016667366028, -0.24202027916908264, -0.790031909942627, 0.14594332873821259, 0.12328831106424332, 0.1343032270669937, 0.31093117594718933, 0.6624374985694885, -0.21090418100357056, 0.6227740049362183, -0.5687898993492126, -0.44704461097717285, -0.13852840662002563, 0.024986159056425095, 0.3496250808238983, 0.6117652654647827, 0.7024244070053101, -0.6757848262786865, -0.6154230237007141, -0.05092034116387367, -0.8543753623962402, 0.15978340804576874, -0.14008241891860962, -0.07094892859458923, 0.4188280403614044, 0.41242703795433044, -0.9348458647727966, 0.573566198348999, 0.552330493927002, -0.4009197950363159, 0.5469608902931213, -0.32889771461486816, 0.09894157946109772, -0.9690528512001038, 0.153939351439476, 0.3169335722923279, -0.20293691754341125, -0.36113986372947693, 0.12048652023077011, 0.10332509875297546, -0.180735245347023, -0.6102192401885986, 0.7892869114875793, -0.5777165293693542, 0.28414279222488403, -0.15527090430259705, 0.04473987966775894, 0.17079436779022217, 0.6281308531761169, 0.11079854518175125, 0.6705120801925659, 0.8759229779243469, -0.7010916471481323, 0.2101314514875412, 0.11409112811088562, -0.4010636508464813, 0.4228568375110626, -0.6325414180755615, 0.17435374855995178, -0.1879618912935257, 0.2880854308605194, -1.031103491783142, -0.1361800581216812, 0.5031217932701111, -0.4505036473274231, 0.5713356733322144, -0.04603177309036255, -0.39089301228523254, -0.5604076981544495, -0.32728394865989685, 0.3430655896663666, 0.8036817908287048, -0.5227474570274353, 0.5411105155944824, 0.16312295198440552, 0.24603058397769928, -0.6701610684394836, -0.7298716306686401, -0.09517403692007065, -0.2025587409734726, -0.7638694047927856, 0.6635168194770813, -0.12518613040447235, 0.003334581619128585, 0.09202644973993301, 0.026626789942383766, 0.06161117181181908, -0.0006214010645635426, 0.2675252854824066, 0.14341479539871216, -0.28038540482521057, -0.18276749551296234, 0.1976768523454666, -0.22216826677322388, 0.06783751398324966, -0.38260671496391296, 0.5219488143920898, -0.24820907413959503, 0.069310262799263, -0.9374898672103882, 0.06967128068208694, 0.34588000178337097, 0.07813958823680878, 0.7932658791542053, 1.174079418182373, -0.46083611249923706, -0.09577102214097977, -0.6072968244552612, -0.12583893537521362, -0.5687623620033264, 0.23259609937667847, -0.3984081447124481, -0.7259992957115173, 0.4272870719432831, -0.030211439356207848, 0.17779460549354553, 0.651483416557312, 0.5157269239425659, -0.23451295495033264, 0.873397946357727, 0.6455636620521545, -0.16938641667366028, 0.4992261230945587, -0.9418484568595886, 0.07954838871955872, -0.7211015820503235, -0.31296423077583313, -0.09889805316925049, -0.4182727634906769, -0.42960771918296814, -0.6493728756904602, 0.2923998534679413, 0.3392930328845978, -0.39152440428733826, 0.2389420121908188, -0.7112189531326294, 0.3311987519264221, 0.37811198830604553, 0.28021135926246643, 0.016863787546753883, 0.1381577104330063, -0.1712675541639328, 0.026405002921819687, -0.7264484167098999, -0.2234974503517151, 0.8044587969779968, 0.38365429639816284, 0.5465728640556335, -0.282314270734787, 0.6905463337898254, 0.1436615139245987, 0.4012112021446228, -0.47734519839286804, 0.5433502197265625, -0.02987348660826683, -0.6568669676780701, 0.023486830294132233, -0.31536826491355896, -0.7741029858589172, 0.18237358331680298, -0.3153621554374695, -0.7752817869186401, 0.25300946831703186, 0.2365514487028122, -0.34915390610694885, 0.5432959198951721, -0.8006739616394043, 1.000914216041565, -0.25525030493736267, -0.6557849049568176, -0.14783227443695068, -0.6525520086288452, 0.4284302890300751, 0.2236776351928711, -0.03807362541556358, -0.15096960961818695, -0.08022899180650711, 0.7195712924003601, -0.4689255356788635, 0.7117940783500671, -0.4078415334224701, -0.01616869866847992, 0.5236697793006897, -0.10522833466529846, 0.2824447751045227, 0.09143223613500595, -0.27124595642089844, 0.5086730122566223, -0.10520478338003159, -0.544765293598175, -0.37492790818214417, 0.8231834769248962, -0.8717491030693054, -0.3722171187400818, -0.442488431930542, -0.26043185591697693, 0.2171183079481125, 0.2710263729095459, 0.7418480515480042, 0.2691359221935272, -0.19883503019809723, -0.014258330687880516, 0.828487753868103, -0.5210765600204468, 0.7075858116149902, -0.05890936404466629, -0.3108290731906891, -0.5769184231758118, 0.9919605851173401, -0.12493695318698883, 0.15488629043102264, 0.3763273358345032, 0.2830139696598053, -0.3011637330055237, -0.35546940565109253, -0.6513409614562988, 0.3917260766029358, -0.5355067849159241, -0.3308066129684448, -0.8833730220794678, -0.4115546941757202, -0.43262189626693726, -0.28866270184516907, -0.6066914200782776, -0.2459111362695694, -0.704403281211853, 0.01028517261147499, 0.6095998287200928, 0.429779976606369, -0.06671071797609329, 0.47136539220809937, -0.3962882161140442, 0.33552467823028564, 0.06094641238451004, 0.26059389114379883, 0.18573056161403656, -0.4963473677635193, -0.23161648213863373, 0.029899632558226585, -0.5112542510032654, -0.5934038758277893, 0.5530309081077576, 0.3067684471607208, 0.22146736085414886, 0.721987783908844, -0.14555951952934265, 0.8082169890403748, -0.2724214792251587, 0.7192593216896057, 0.35095083713531494, -0.8677347898483276, 0.43332239985466003, -0.23598740994930267, 0.3060106337070465, 0.35797423124313354, 0.5843045115470886, -0.23429423570632935, -0.12701143324375153, -0.8403996825218201, -0.812554121017456, 0.7798458337783813, 0.45792821049690247, 0.18703120946884155, 0.13179752230644226, 0.6718573570251465, -0.09693848341703415, 0.1621064841747284, -0.7385352849960327, -0.4764794409275055, -0.26981982588768005, -0.11963137239217758, -0.12095088511705399, -0.08010827749967575, 0.15952979028224945, -0.6259841918945312, 0.8061181306838989, 0.005128850229084492, 0.6834617853164673, 0.41722768545150757, -0.014194129966199398, 0.0005721381749026477, -0.32847562432289124, 0.3443085551261902, 0.29037824273109436, -0.26767584681510925, -0.12884235382080078, 0.1867135912179947, -0.5667513608932495, -0.02711646631360054, 0.2274208515882492, -0.23835866153240204, -0.01859203167259693, 0.20478378236293793, 0.9818447828292847, 0.11620419472455978, -0.39434683322906494, 0.5708929896354675, -0.19538827240467072, -0.2874772846698761, -0.39852312207221985, 0.21235691010951996, 0.2739475667476654, 0.38688138127326965, 0.2077408879995346, 0.18374745547771454, 0.09101274609565735, -0.36031603813171387, 0.18078568577766418, 0.44075629115104675, -0.3659927248954773, -0.29003971815109253, 0.9815632700920105, 0.10143741220235825, -0.3629443943500519, 0.7390803694725037, -0.3527129590511322, -0.5321325063705444, 0.7414663434028625, 0.5109138488769531, 0.9620068073272705, -0.14984485507011414, 0.2623877227306366, 0.6496584415435791, 0.22714608907699585, 0.0005090675549581647, 0.2826630473136902, -0.10896368324756622, -0.7105624079704285, -0.2412770539522171, -0.695770800113678, -0.05252934992313385, 0.15905322134494781, -0.38380300998687744, 0.4688578248023987, -0.7796276807785034, -0.17141079902648926, 0.06032634526491165, 0.2507018744945526, -0.9384868741035461, 0.4163895845413208, 0.3116881251335144, 1.0057268142700195, -0.6664583683013916, 0.8045719861984253, 0.41387173533439636, -0.4974179267883301, -0.609249472618103, -0.07370404154062271, -0.15821108222007751, -0.862126886844635, 0.3922360837459564, 0.5111944079399109, -0.08153768628835678, 0.1406925767660141, -0.737564206123352, -0.7618808746337891, 1.172389268875122, 0.41494226455688477, -0.4550948441028595, -0.02202669344842434, -0.1678004264831543, 0.5156346559524536, -0.3896106779575348, 0.4035266637802124, 0.5094254612922668, 0.3386513292789459, 0.20140139758586884, -0.6128762364387512, 0.21288275718688965, -0.38095542788505554, 0.012118096463382244, 0.07289199531078339, -0.9592923521995544, 0.9653778076171875, -0.5857133865356445, -0.296561598777771, 0.16693474352359772, 0.8649774789810181, 0.22594285011291504, 0.41120657324790955, 0.338054895401001, 0.9600148797035217, 0.6705224514007568, -0.027069032192230225, 1.2759343385696411, -0.3089990019798279, 0.5508288741111755, 0.6364773511886597, 0.09392327070236206, 0.5948025584220886, 0.18031851947307587, -0.17262913286685944, 0.5841130018234253, 0.8231930136680603, -0.02072206698358059, 0.5017989277839661, 0.006235282868146896, -0.3591768443584442, -0.13273073732852936, 0.1977119743824005, -0.48829418420791626, 0.1813972145318985, 0.44710013270378113, -0.48654162883758545, -0.03663381189107895, 0.13755196332931519, 0.2848459482192993, -0.4313255250453949, -0.13087499141693115, 0.6111794710159302, 0.1954994648694992, -0.6109486818313599, 0.8277621865272522, 0.09497588127851486, 0.9871542453765869, -0.37780725955963135, -0.0010728674242272973, -0.258348673582077, 0.4178786873817444, -0.3718571066856384, -0.8011043071746826, 0.05257793888449669, -0.18988417088985443, 0.03175024688243866, -0.1806706041097641, 0.7450861930847168, -0.3220435082912445, -0.7552899718284607, 0.4257800281047821, 0.07419893145561218, 0.33376970887184143, -0.2881065309047699, -1.1915925741195679, 0.2506963908672333, 0.07865270227193832, -0.45270800590515137, 0.31931814551353455, 0.33753448724746704, 0.24460889399051666, 0.688276469707489, 0.552153468132019, -0.16436119377613068, 0.1377963274717331, -0.1686852127313614, 0.9456722140312195, -0.5770715475082397, -0.26694974303245544, -0.8806792497634888, 0.7125458121299744, -0.21797430515289307, -0.5096175074577332, 0.6584798097610474, 0.6598145365715027, 0.8606159090995789, -0.04341934621334076, 0.5967344641685486, -0.27889594435691833, -0.08934140205383301, -0.443032830953598, 0.8026256561279297, -0.829841673374176, 0.04335512965917587, -0.6154338717460632, -0.8299331068992615, -0.13806386291980743, 0.8976871967315674, -0.13840243220329285, 0.2855689823627472, 0.5761840343475342, 0.7711828947067261, -0.3073720335960388, 0.0599839985370636, 0.1064034029841423, 0.25011324882507324, 0.20967385172843933, 0.6310217380523682, 0.40898874402046204, -0.9436476826667786, 0.39897143840789795, -0.7905521392822266, -0.3201174736022949, -0.10717597603797913, -0.8803886771202087, -0.8647018074989319, -0.5928191542625427, -0.7641549706459045, -0.6634806394577026, -0.08530305325984955, 0.5757905840873718, 0.8218581676483154, -0.6119632124900818, -0.1515989750623703, -0.24424363672733307, 0.08076270669698715, -0.23475012183189392, -0.32363128662109375, 0.528616726398468, -0.13215835392475128, -0.8833009600639343, 0.03712497279047966, 0.26115429401397705, 0.02176034078001976, -0.30421602725982666, -0.15277357399463654, -0.28792279958724976, -0.1957494467496872, 0.6829104423522949, 0.28931695222854614, -0.520170271396637, -0.007945709861814976, -0.1666351854801178, 0.051149822771549225, 0.2942860424518585, 0.5245506167411804, -0.8203297853469849, 0.3702413737773895, 0.39456555247306824, 0.4544055759906769, 1.158482551574707, -0.21387220919132233, 0.152788445353508, -0.5377552509307861, 0.37138238549232483, 0.172307550907135, 0.36480966210365295, 0.3699132800102234, -0.5366087555885315, 0.41946545243263245, 0.4101339876651764, -0.5672656297683716, -0.5941571593284607, -0.15332427620887756, -1.189813256263733, -0.31491583585739136, 1.1005446910858154, -0.19407176971435547, -0.5062530040740967, 0.22795474529266357, -0.3348231613636017, 0.28221404552459717, -0.5199116468429565, 0.7081617116928101, 0.34960320591926575, -0.25525179505348206, -0.5370262861251831, -0.44272831082344055, 0.5952516794204712, 0.19673557579517365, -0.6333371996879578, -0.31761711835861206, 0.3596487045288086, 0.6638009548187256, 0.232113316655159, 0.8966270089149475, -0.043050367385149, 0.1306091696023941, 0.1396438032388687, 0.20289072394371033, 0.17358796298503876, -0.12688983976840973, -0.3091737926006317, 0.11199004203081131, -0.42904341220855713, -0.22397947311401367 ]
jinaai/jina-embeddings-v2-base-en
jinaai
"2023-11-16T12:52:17Z"
368,924
469
sentence-transformers
[ "sentence-transformers", "pytorch", "coreml", "onnx", "safetensors", "bert", "finetuner", "mteb", "feature-extraction", "sentence-similarity", "alibi", "custom_code", "en", "dataset:allenai/c4", "arxiv:2108.12409", "arxiv:2310.19923", "license:apache-2.0", "model-index", "has_space", "region:us" ]
feature-extraction
"2023-09-27T17:04:00Z"
--- tags: - finetuner - mteb - sentence-transformers - feature-extraction - sentence-similarity - alibi datasets: - allenai/c4 language: en inference: false license: apache-2.0 model-index: - name: jina-embedding-b-en-v2 results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 74.73134328358209 - type: ap value: 37.765427081831035 - type: f1 value: 68.79367444339518 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 88.544275 - type: ap value: 84.61328675662887 - type: f1 value: 88.51879035862375 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 45.263999999999996 - type: f1 value: 43.778759656699435 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 21.693 - type: map_at_10 value: 35.487 - type: map_at_100 value: 36.862 - type: map_at_1000 value: 36.872 - type: map_at_3 value: 30.049999999999997 - type: map_at_5 value: 32.966 - type: mrr_at_1 value: 21.977 - type: mrr_at_10 value: 35.565999999999995 - type: mrr_at_100 value: 36.948 - type: mrr_at_1000 value: 36.958 - type: mrr_at_3 value: 30.121 - type: mrr_at_5 value: 33.051 - type: ndcg_at_1 value: 21.693 - type: ndcg_at_10 value: 44.181 - type: ndcg_at_100 value: 49.982 - type: ndcg_at_1000 value: 50.233000000000004 - type: ndcg_at_3 value: 32.830999999999996 - type: ndcg_at_5 value: 38.080000000000005 - type: precision_at_1 value: 21.693 - type: precision_at_10 value: 7.248 - type: precision_at_100 value: 0.9769999999999999 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 13.632 - type: precision_at_5 value: 10.725 - type: recall_at_1 value: 21.693 - type: recall_at_10 value: 72.475 - type: recall_at_100 value: 97.653 - type: recall_at_1000 value: 99.57300000000001 - type: recall_at_3 value: 40.896 - type: recall_at_5 value: 53.627 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 45.39242428696777 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 36.675626784714 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 62.247725694904034 - type: mrr value: 74.91359978894604 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 82.68003802970496 - type: cos_sim_spearman value: 81.23438110096286 - type: euclidean_pearson value: 81.87462986142582 - type: euclidean_spearman value: 81.23438110096286 - type: manhattan_pearson value: 81.61162566600755 - type: manhattan_spearman value: 81.11329400456184 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 84.01298701298701 - type: f1 value: 83.31690714969382 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 37.050108150972086 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 30.15731442819715 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 31.391999999999996 - type: map_at_10 value: 42.597 - type: map_at_100 value: 44.07 - type: map_at_1000 value: 44.198 - type: map_at_3 value: 38.957 - type: map_at_5 value: 40.961 - type: mrr_at_1 value: 37.196 - type: mrr_at_10 value: 48.152 - type: mrr_at_100 value: 48.928 - type: mrr_at_1000 value: 48.964999999999996 - type: mrr_at_3 value: 45.446 - type: mrr_at_5 value: 47.205999999999996 - type: ndcg_at_1 value: 37.196 - type: ndcg_at_10 value: 49.089 - type: ndcg_at_100 value: 54.471000000000004 - type: ndcg_at_1000 value: 56.385 - type: ndcg_at_3 value: 43.699 - type: ndcg_at_5 value: 46.22 - type: precision_at_1 value: 37.196 - type: precision_at_10 value: 9.313 - type: precision_at_100 value: 1.478 - type: precision_at_1000 value: 0.198 - type: precision_at_3 value: 20.839 - type: precision_at_5 value: 14.936 - type: recall_at_1 value: 31.391999999999996 - type: recall_at_10 value: 61.876 - type: recall_at_100 value: 84.214 - type: recall_at_1000 value: 95.985 - type: recall_at_3 value: 46.6 - type: recall_at_5 value: 53.588 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 29.083 - type: map_at_10 value: 38.812999999999995 - type: map_at_100 value: 40.053 - type: map_at_1000 value: 40.188 - type: map_at_3 value: 36.111 - type: map_at_5 value: 37.519000000000005 - type: mrr_at_1 value: 36.497 - type: mrr_at_10 value: 44.85 - type: mrr_at_100 value: 45.546 - type: mrr_at_1000 value: 45.593 - type: mrr_at_3 value: 42.686 - type: mrr_at_5 value: 43.909 - type: ndcg_at_1 value: 36.497 - type: ndcg_at_10 value: 44.443 - type: ndcg_at_100 value: 48.979 - type: ndcg_at_1000 value: 51.154999999999994 - type: ndcg_at_3 value: 40.660000000000004 - type: ndcg_at_5 value: 42.193000000000005 - type: precision_at_1 value: 36.497 - type: precision_at_10 value: 8.433 - type: precision_at_100 value: 1.369 - type: precision_at_1000 value: 0.185 - type: precision_at_3 value: 19.894000000000002 - type: precision_at_5 value: 13.873 - type: recall_at_1 value: 29.083 - type: recall_at_10 value: 54.313 - type: recall_at_100 value: 73.792 - type: recall_at_1000 value: 87.629 - type: recall_at_3 value: 42.257 - type: recall_at_5 value: 47.066 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 38.556000000000004 - type: map_at_10 value: 50.698 - type: map_at_100 value: 51.705 - type: map_at_1000 value: 51.768 - type: map_at_3 value: 47.848 - type: map_at_5 value: 49.358000000000004 - type: mrr_at_1 value: 43.95 - type: mrr_at_10 value: 54.191 - type: mrr_at_100 value: 54.852999999999994 - type: mrr_at_1000 value: 54.885 - type: mrr_at_3 value: 51.954 - type: mrr_at_5 value: 53.13 - type: ndcg_at_1 value: 43.95 - type: ndcg_at_10 value: 56.516 - type: ndcg_at_100 value: 60.477000000000004 - type: ndcg_at_1000 value: 61.746 - type: ndcg_at_3 value: 51.601 - type: ndcg_at_5 value: 53.795 - type: precision_at_1 value: 43.95 - type: precision_at_10 value: 9.009 - type: precision_at_100 value: 1.189 - type: precision_at_1000 value: 0.135 - type: precision_at_3 value: 22.989 - type: precision_at_5 value: 15.473 - type: recall_at_1 value: 38.556000000000004 - type: recall_at_10 value: 70.159 - type: recall_at_100 value: 87.132 - type: recall_at_1000 value: 96.16 - type: recall_at_3 value: 56.906 - type: recall_at_5 value: 62.332 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.238 - type: map_at_10 value: 32.5 - type: map_at_100 value: 33.637 - type: map_at_1000 value: 33.719 - type: map_at_3 value: 30.026999999999997 - type: map_at_5 value: 31.555 - type: mrr_at_1 value: 26.328000000000003 - type: mrr_at_10 value: 34.44 - type: mrr_at_100 value: 35.455999999999996 - type: mrr_at_1000 value: 35.521 - type: mrr_at_3 value: 32.034 - type: mrr_at_5 value: 33.565 - type: ndcg_at_1 value: 26.328000000000003 - type: ndcg_at_10 value: 37.202 - type: ndcg_at_100 value: 42.728 - type: ndcg_at_1000 value: 44.792 - type: ndcg_at_3 value: 32.368 - type: ndcg_at_5 value: 35.008 - type: precision_at_1 value: 26.328000000000003 - type: precision_at_10 value: 5.7059999999999995 - type: precision_at_100 value: 0.8880000000000001 - type: precision_at_1000 value: 0.11100000000000002 - type: precision_at_3 value: 13.672 - type: precision_at_5 value: 9.74 - type: recall_at_1 value: 24.238 - type: recall_at_10 value: 49.829 - type: recall_at_100 value: 75.21 - type: recall_at_1000 value: 90.521 - type: recall_at_3 value: 36.867 - type: recall_at_5 value: 43.241 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 15.378 - type: map_at_10 value: 22.817999999999998 - type: map_at_100 value: 23.977999999999998 - type: map_at_1000 value: 24.108 - type: map_at_3 value: 20.719 - type: map_at_5 value: 21.889 - type: mrr_at_1 value: 19.03 - type: mrr_at_10 value: 27.022000000000002 - type: mrr_at_100 value: 28.011999999999997 - type: mrr_at_1000 value: 28.096 - type: mrr_at_3 value: 24.855 - type: mrr_at_5 value: 26.029999999999998 - type: ndcg_at_1 value: 19.03 - type: ndcg_at_10 value: 27.526 - type: ndcg_at_100 value: 33.040000000000006 - type: ndcg_at_1000 value: 36.187000000000005 - type: ndcg_at_3 value: 23.497 - type: ndcg_at_5 value: 25.334 - type: precision_at_1 value: 19.03 - type: precision_at_10 value: 4.963 - type: precision_at_100 value: 0.893 - type: precision_at_1000 value: 0.13 - type: precision_at_3 value: 11.360000000000001 - type: precision_at_5 value: 8.134 - type: recall_at_1 value: 15.378 - type: recall_at_10 value: 38.061 - type: recall_at_100 value: 61.754 - type: recall_at_1000 value: 84.259 - type: recall_at_3 value: 26.788 - type: recall_at_5 value: 31.326999999999998 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.511999999999997 - type: map_at_10 value: 37.429 - type: map_at_100 value: 38.818000000000005 - type: map_at_1000 value: 38.924 - type: map_at_3 value: 34.625 - type: map_at_5 value: 36.064 - type: mrr_at_1 value: 33.300999999999995 - type: mrr_at_10 value: 43.036 - type: mrr_at_100 value: 43.894 - type: mrr_at_1000 value: 43.936 - type: mrr_at_3 value: 40.825 - type: mrr_at_5 value: 42.028 - type: ndcg_at_1 value: 33.300999999999995 - type: ndcg_at_10 value: 43.229 - type: ndcg_at_100 value: 48.992000000000004 - type: ndcg_at_1000 value: 51.02100000000001 - type: ndcg_at_3 value: 38.794000000000004 - type: ndcg_at_5 value: 40.65 - type: precision_at_1 value: 33.300999999999995 - type: precision_at_10 value: 7.777000000000001 - type: precision_at_100 value: 1.269 - type: precision_at_1000 value: 0.163 - type: precision_at_3 value: 18.351 - type: precision_at_5 value: 12.762 - type: recall_at_1 value: 27.511999999999997 - type: recall_at_10 value: 54.788000000000004 - type: recall_at_100 value: 79.105 - type: recall_at_1000 value: 92.49199999999999 - type: recall_at_3 value: 41.924 - type: recall_at_5 value: 47.026 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.117 - type: map_at_10 value: 33.32 - type: map_at_100 value: 34.677 - type: map_at_1000 value: 34.78 - type: map_at_3 value: 30.233999999999998 - type: map_at_5 value: 31.668000000000003 - type: mrr_at_1 value: 29.566 - type: mrr_at_10 value: 38.244 - type: mrr_at_100 value: 39.245000000000005 - type: mrr_at_1000 value: 39.296 - type: mrr_at_3 value: 35.864000000000004 - type: mrr_at_5 value: 36.919999999999995 - type: ndcg_at_1 value: 29.566 - type: ndcg_at_10 value: 39.127 - type: ndcg_at_100 value: 44.989000000000004 - type: ndcg_at_1000 value: 47.189 - type: ndcg_at_3 value: 34.039 - type: ndcg_at_5 value: 35.744 - type: precision_at_1 value: 29.566 - type: precision_at_10 value: 7.385999999999999 - type: precision_at_100 value: 1.204 - type: precision_at_1000 value: 0.158 - type: precision_at_3 value: 16.286 - type: precision_at_5 value: 11.484 - type: recall_at_1 value: 24.117 - type: recall_at_10 value: 51.559999999999995 - type: recall_at_100 value: 77.104 - type: recall_at_1000 value: 91.79899999999999 - type: recall_at_3 value: 36.82 - type: recall_at_5 value: 41.453 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.17625 - type: map_at_10 value: 34.063916666666664 - type: map_at_100 value: 35.255500000000005 - type: map_at_1000 value: 35.37275 - type: map_at_3 value: 31.351666666666667 - type: map_at_5 value: 32.80608333333333 - type: mrr_at_1 value: 29.59783333333333 - type: mrr_at_10 value: 38.0925 - type: mrr_at_100 value: 38.957249999999995 - type: mrr_at_1000 value: 39.01608333333333 - type: mrr_at_3 value: 35.77625 - type: mrr_at_5 value: 37.04991666666667 - type: ndcg_at_1 value: 29.59783333333333 - type: ndcg_at_10 value: 39.343666666666664 - type: ndcg_at_100 value: 44.488249999999994 - type: ndcg_at_1000 value: 46.83358333333334 - type: ndcg_at_3 value: 34.69708333333333 - type: ndcg_at_5 value: 36.75075 - type: precision_at_1 value: 29.59783333333333 - type: precision_at_10 value: 6.884083333333332 - type: precision_at_100 value: 1.114 - type: precision_at_1000 value: 0.15108333333333332 - type: precision_at_3 value: 15.965250000000003 - type: precision_at_5 value: 11.246500000000001 - type: recall_at_1 value: 25.17625 - type: recall_at_10 value: 51.015999999999984 - type: recall_at_100 value: 73.60174999999998 - type: recall_at_1000 value: 89.849 - type: recall_at_3 value: 37.88399999999999 - type: recall_at_5 value: 43.24541666666666 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.537 - type: map_at_10 value: 31.081999999999997 - type: map_at_100 value: 32.042 - type: map_at_1000 value: 32.141 - type: map_at_3 value: 29.137 - type: map_at_5 value: 30.079 - type: mrr_at_1 value: 27.454 - type: mrr_at_10 value: 33.694 - type: mrr_at_100 value: 34.579 - type: mrr_at_1000 value: 34.649 - type: mrr_at_3 value: 32.004 - type: mrr_at_5 value: 32.794000000000004 - type: ndcg_at_1 value: 27.454 - type: ndcg_at_10 value: 34.915 - type: ndcg_at_100 value: 39.641 - type: ndcg_at_1000 value: 42.105 - type: ndcg_at_3 value: 31.276 - type: ndcg_at_5 value: 32.65 - type: precision_at_1 value: 27.454 - type: precision_at_10 value: 5.337 - type: precision_at_100 value: 0.8250000000000001 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 13.241 - type: precision_at_5 value: 8.895999999999999 - type: recall_at_1 value: 24.537 - type: recall_at_10 value: 44.324999999999996 - type: recall_at_100 value: 65.949 - type: recall_at_1000 value: 84.017 - type: recall_at_3 value: 33.857 - type: recall_at_5 value: 37.316 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 17.122 - type: map_at_10 value: 24.32 - type: map_at_100 value: 25.338 - type: map_at_1000 value: 25.462 - type: map_at_3 value: 22.064 - type: map_at_5 value: 23.322000000000003 - type: mrr_at_1 value: 20.647 - type: mrr_at_10 value: 27.858 - type: mrr_at_100 value: 28.743999999999996 - type: mrr_at_1000 value: 28.819 - type: mrr_at_3 value: 25.769 - type: mrr_at_5 value: 26.964 - type: ndcg_at_1 value: 20.647 - type: ndcg_at_10 value: 28.849999999999998 - type: ndcg_at_100 value: 33.849000000000004 - type: ndcg_at_1000 value: 36.802 - type: ndcg_at_3 value: 24.799 - type: ndcg_at_5 value: 26.682 - type: precision_at_1 value: 20.647 - type: precision_at_10 value: 5.2170000000000005 - type: precision_at_100 value: 0.906 - type: precision_at_1000 value: 0.134 - type: precision_at_3 value: 11.769 - type: precision_at_5 value: 8.486 - type: recall_at_1 value: 17.122 - type: recall_at_10 value: 38.999 - type: recall_at_100 value: 61.467000000000006 - type: recall_at_1000 value: 82.716 - type: recall_at_3 value: 27.601 - type: recall_at_5 value: 32.471 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.396 - type: map_at_10 value: 33.415 - type: map_at_100 value: 34.521 - type: map_at_1000 value: 34.631 - type: map_at_3 value: 30.703999999999997 - type: map_at_5 value: 32.166 - type: mrr_at_1 value: 28.825 - type: mrr_at_10 value: 37.397000000000006 - type: mrr_at_100 value: 38.286 - type: mrr_at_1000 value: 38.346000000000004 - type: mrr_at_3 value: 35.028 - type: mrr_at_5 value: 36.32 - type: ndcg_at_1 value: 28.825 - type: ndcg_at_10 value: 38.656 - type: ndcg_at_100 value: 43.856 - type: ndcg_at_1000 value: 46.31 - type: ndcg_at_3 value: 33.793 - type: ndcg_at_5 value: 35.909 - type: precision_at_1 value: 28.825 - type: precision_at_10 value: 6.567 - type: precision_at_100 value: 1.0330000000000001 - type: precision_at_1000 value: 0.135 - type: precision_at_3 value: 15.516 - type: precision_at_5 value: 10.914 - type: recall_at_1 value: 24.396 - type: recall_at_10 value: 50.747 - type: recall_at_100 value: 73.477 - type: recall_at_1000 value: 90.801 - type: recall_at_3 value: 37.1 - type: recall_at_5 value: 42.589 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.072 - type: map_at_10 value: 34.307 - type: map_at_100 value: 35.725 - type: map_at_1000 value: 35.943999999999996 - type: map_at_3 value: 30.906 - type: map_at_5 value: 32.818000000000005 - type: mrr_at_1 value: 29.644 - type: mrr_at_10 value: 38.673 - type: mrr_at_100 value: 39.459 - type: mrr_at_1000 value: 39.527 - type: mrr_at_3 value: 35.771 - type: mrr_at_5 value: 37.332 - type: ndcg_at_1 value: 29.644 - type: ndcg_at_10 value: 40.548 - type: ndcg_at_100 value: 45.678999999999995 - type: ndcg_at_1000 value: 48.488 - type: ndcg_at_3 value: 34.887 - type: ndcg_at_5 value: 37.543 - type: precision_at_1 value: 29.644 - type: precision_at_10 value: 7.688000000000001 - type: precision_at_100 value: 1.482 - type: precision_at_1000 value: 0.23600000000000002 - type: precision_at_3 value: 16.206 - type: precision_at_5 value: 12.016 - type: recall_at_1 value: 25.072 - type: recall_at_10 value: 53.478 - type: recall_at_100 value: 76.07300000000001 - type: recall_at_1000 value: 93.884 - type: recall_at_3 value: 37.583 - type: recall_at_5 value: 44.464 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 20.712 - type: map_at_10 value: 27.467999999999996 - type: map_at_100 value: 28.502 - type: map_at_1000 value: 28.610000000000003 - type: map_at_3 value: 24.887999999999998 - type: map_at_5 value: 26.273999999999997 - type: mrr_at_1 value: 22.736 - type: mrr_at_10 value: 29.553 - type: mrr_at_100 value: 30.485 - type: mrr_at_1000 value: 30.56 - type: mrr_at_3 value: 27.078999999999997 - type: mrr_at_5 value: 28.401 - type: ndcg_at_1 value: 22.736 - type: ndcg_at_10 value: 32.023 - type: ndcg_at_100 value: 37.158 - type: ndcg_at_1000 value: 39.823 - type: ndcg_at_3 value: 26.951999999999998 - type: ndcg_at_5 value: 29.281000000000002 - type: precision_at_1 value: 22.736 - type: precision_at_10 value: 5.213 - type: precision_at_100 value: 0.832 - type: precision_at_1000 value: 0.116 - type: precision_at_3 value: 11.459999999999999 - type: precision_at_5 value: 8.244 - type: recall_at_1 value: 20.712 - type: recall_at_10 value: 44.057 - type: recall_at_100 value: 67.944 - type: recall_at_1000 value: 87.925 - type: recall_at_3 value: 30.305 - type: recall_at_5 value: 36.071999999999996 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 10.181999999999999 - type: map_at_10 value: 16.66 - type: map_at_100 value: 18.273 - type: map_at_1000 value: 18.45 - type: map_at_3 value: 14.141 - type: map_at_5 value: 15.455 - type: mrr_at_1 value: 22.15 - type: mrr_at_10 value: 32.062000000000005 - type: mrr_at_100 value: 33.116 - type: mrr_at_1000 value: 33.168 - type: mrr_at_3 value: 28.827 - type: mrr_at_5 value: 30.892999999999997 - type: ndcg_at_1 value: 22.15 - type: ndcg_at_10 value: 23.532 - type: ndcg_at_100 value: 30.358 - type: ndcg_at_1000 value: 33.783 - type: ndcg_at_3 value: 19.222 - type: ndcg_at_5 value: 20.919999999999998 - type: precision_at_1 value: 22.15 - type: precision_at_10 value: 7.185999999999999 - type: precision_at_100 value: 1.433 - type: precision_at_1000 value: 0.207 - type: precision_at_3 value: 13.941 - type: precision_at_5 value: 10.906 - type: recall_at_1 value: 10.181999999999999 - type: recall_at_10 value: 28.104000000000003 - type: recall_at_100 value: 51.998999999999995 - type: recall_at_1000 value: 71.311 - type: recall_at_3 value: 17.698 - type: recall_at_5 value: 22.262999999999998 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 6.669 - type: map_at_10 value: 15.552 - type: map_at_100 value: 21.865000000000002 - type: map_at_1000 value: 23.268 - type: map_at_3 value: 11.309 - type: map_at_5 value: 13.084000000000001 - type: mrr_at_1 value: 55.50000000000001 - type: mrr_at_10 value: 66.46600000000001 - type: mrr_at_100 value: 66.944 - type: mrr_at_1000 value: 66.956 - type: mrr_at_3 value: 64.542 - type: mrr_at_5 value: 65.717 - type: ndcg_at_1 value: 44.75 - type: ndcg_at_10 value: 35.049 - type: ndcg_at_100 value: 39.073 - type: ndcg_at_1000 value: 46.208 - type: ndcg_at_3 value: 39.525 - type: ndcg_at_5 value: 37.156 - type: precision_at_1 value: 55.50000000000001 - type: precision_at_10 value: 27.800000000000004 - type: precision_at_100 value: 9.013 - type: precision_at_1000 value: 1.8800000000000001 - type: precision_at_3 value: 42.667 - type: precision_at_5 value: 36.0 - type: recall_at_1 value: 6.669 - type: recall_at_10 value: 21.811 - type: recall_at_100 value: 45.112 - type: recall_at_1000 value: 67.806 - type: recall_at_3 value: 13.373 - type: recall_at_5 value: 16.615 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 48.769999999999996 - type: f1 value: 42.91448356376592 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 54.013 - type: map_at_10 value: 66.239 - type: map_at_100 value: 66.62599999999999 - type: map_at_1000 value: 66.644 - type: map_at_3 value: 63.965 - type: map_at_5 value: 65.45400000000001 - type: mrr_at_1 value: 58.221000000000004 - type: mrr_at_10 value: 70.43700000000001 - type: mrr_at_100 value: 70.744 - type: mrr_at_1000 value: 70.75099999999999 - type: mrr_at_3 value: 68.284 - type: mrr_at_5 value: 69.721 - type: ndcg_at_1 value: 58.221000000000004 - type: ndcg_at_10 value: 72.327 - type: ndcg_at_100 value: 73.953 - type: ndcg_at_1000 value: 74.312 - type: ndcg_at_3 value: 68.062 - type: ndcg_at_5 value: 70.56400000000001 - type: precision_at_1 value: 58.221000000000004 - type: precision_at_10 value: 9.521 - type: precision_at_100 value: 1.045 - type: precision_at_1000 value: 0.109 - type: precision_at_3 value: 27.348 - type: precision_at_5 value: 17.794999999999998 - type: recall_at_1 value: 54.013 - type: recall_at_10 value: 86.957 - type: recall_at_100 value: 93.911 - type: recall_at_1000 value: 96.38 - type: recall_at_3 value: 75.555 - type: recall_at_5 value: 81.671 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 21.254 - type: map_at_10 value: 33.723 - type: map_at_100 value: 35.574 - type: map_at_1000 value: 35.730000000000004 - type: map_at_3 value: 29.473 - type: map_at_5 value: 31.543 - type: mrr_at_1 value: 41.358 - type: mrr_at_10 value: 49.498 - type: mrr_at_100 value: 50.275999999999996 - type: mrr_at_1000 value: 50.308 - type: mrr_at_3 value: 47.016000000000005 - type: mrr_at_5 value: 48.336 - type: ndcg_at_1 value: 41.358 - type: ndcg_at_10 value: 41.579 - type: ndcg_at_100 value: 48.455 - type: ndcg_at_1000 value: 51.165000000000006 - type: ndcg_at_3 value: 37.681 - type: ndcg_at_5 value: 38.49 - type: precision_at_1 value: 41.358 - type: precision_at_10 value: 11.543000000000001 - type: precision_at_100 value: 1.87 - type: precision_at_1000 value: 0.23600000000000002 - type: precision_at_3 value: 24.743000000000002 - type: precision_at_5 value: 17.994 - type: recall_at_1 value: 21.254 - type: recall_at_10 value: 48.698 - type: recall_at_100 value: 74.588 - type: recall_at_1000 value: 91.00200000000001 - type: recall_at_3 value: 33.939 - type: recall_at_5 value: 39.367000000000004 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 35.922 - type: map_at_10 value: 52.32599999999999 - type: map_at_100 value: 53.18000000000001 - type: map_at_1000 value: 53.245 - type: map_at_3 value: 49.294 - type: map_at_5 value: 51.202999999999996 - type: mrr_at_1 value: 71.843 - type: mrr_at_10 value: 78.24600000000001 - type: mrr_at_100 value: 78.515 - type: mrr_at_1000 value: 78.527 - type: mrr_at_3 value: 77.17500000000001 - type: mrr_at_5 value: 77.852 - type: ndcg_at_1 value: 71.843 - type: ndcg_at_10 value: 61.379 - type: ndcg_at_100 value: 64.535 - type: ndcg_at_1000 value: 65.888 - type: ndcg_at_3 value: 56.958 - type: ndcg_at_5 value: 59.434 - type: precision_at_1 value: 71.843 - type: precision_at_10 value: 12.686 - type: precision_at_100 value: 1.517 - type: precision_at_1000 value: 0.16999999999999998 - type: precision_at_3 value: 35.778 - type: precision_at_5 value: 23.422 - type: recall_at_1 value: 35.922 - type: recall_at_10 value: 63.43 - type: recall_at_100 value: 75.868 - type: recall_at_1000 value: 84.88900000000001 - type: recall_at_3 value: 53.666000000000004 - type: recall_at_5 value: 58.555 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 79.4408 - type: ap value: 73.52820871620366 - type: f1 value: 79.36240238685001 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 21.826999999999998 - type: map_at_10 value: 34.04 - type: map_at_100 value: 35.226 - type: map_at_1000 value: 35.275 - type: map_at_3 value: 30.165999999999997 - type: map_at_5 value: 32.318000000000005 - type: mrr_at_1 value: 22.464000000000002 - type: mrr_at_10 value: 34.631 - type: mrr_at_100 value: 35.752 - type: mrr_at_1000 value: 35.795 - type: mrr_at_3 value: 30.798 - type: mrr_at_5 value: 32.946999999999996 - type: ndcg_at_1 value: 22.464000000000002 - type: ndcg_at_10 value: 40.919 - type: ndcg_at_100 value: 46.632 - type: ndcg_at_1000 value: 47.833 - type: ndcg_at_3 value: 32.992 - type: ndcg_at_5 value: 36.834 - type: precision_at_1 value: 22.464000000000002 - type: precision_at_10 value: 6.494 - type: precision_at_100 value: 0.9369999999999999 - type: precision_at_1000 value: 0.104 - type: precision_at_3 value: 14.021 - type: precision_at_5 value: 10.347000000000001 - type: recall_at_1 value: 21.826999999999998 - type: recall_at_10 value: 62.132 - type: recall_at_100 value: 88.55199999999999 - type: recall_at_1000 value: 97.707 - type: recall_at_3 value: 40.541 - type: recall_at_5 value: 49.739 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 95.68399452804377 - type: f1 value: 95.25490609832268 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 83.15321477428182 - type: f1 value: 60.35476439087966 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 71.92669804976462 - type: f1 value: 69.22815107207565 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 74.4855413584398 - type: f1 value: 72.92107516103387 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 32.412679360205544 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 28.09211869875204 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 30.540919056982545 - type: mrr value: 31.529904607063536 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 5.745 - type: map_at_10 value: 12.013 - type: map_at_100 value: 15.040000000000001 - type: map_at_1000 value: 16.427 - type: map_at_3 value: 8.841000000000001 - type: map_at_5 value: 10.289 - type: mrr_at_1 value: 45.201 - type: mrr_at_10 value: 53.483999999999995 - type: mrr_at_100 value: 54.20700000000001 - type: mrr_at_1000 value: 54.252 - type: mrr_at_3 value: 51.29 - type: mrr_at_5 value: 52.73 - type: ndcg_at_1 value: 43.808 - type: ndcg_at_10 value: 32.445 - type: ndcg_at_100 value: 30.031000000000002 - type: ndcg_at_1000 value: 39.007 - type: ndcg_at_3 value: 37.204 - type: ndcg_at_5 value: 35.07 - type: precision_at_1 value: 45.201 - type: precision_at_10 value: 23.684 - type: precision_at_100 value: 7.600999999999999 - type: precision_at_1000 value: 2.043 - type: precision_at_3 value: 33.953 - type: precision_at_5 value: 29.412 - type: recall_at_1 value: 5.745 - type: recall_at_10 value: 16.168 - type: recall_at_100 value: 30.875999999999998 - type: recall_at_1000 value: 62.686 - type: recall_at_3 value: 9.75 - type: recall_at_5 value: 12.413 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 37.828 - type: map_at_10 value: 53.239000000000004 - type: map_at_100 value: 54.035999999999994 - type: map_at_1000 value: 54.067 - type: map_at_3 value: 49.289 - type: map_at_5 value: 51.784 - type: mrr_at_1 value: 42.497 - type: mrr_at_10 value: 55.916999999999994 - type: mrr_at_100 value: 56.495 - type: mrr_at_1000 value: 56.516999999999996 - type: mrr_at_3 value: 52.800000000000004 - type: mrr_at_5 value: 54.722 - type: ndcg_at_1 value: 42.468 - type: ndcg_at_10 value: 60.437 - type: ndcg_at_100 value: 63.731 - type: ndcg_at_1000 value: 64.41799999999999 - type: ndcg_at_3 value: 53.230999999999995 - type: ndcg_at_5 value: 57.26 - type: precision_at_1 value: 42.468 - type: precision_at_10 value: 9.47 - type: precision_at_100 value: 1.1360000000000001 - type: precision_at_1000 value: 0.12 - type: precision_at_3 value: 23.724999999999998 - type: precision_at_5 value: 16.593 - type: recall_at_1 value: 37.828 - type: recall_at_10 value: 79.538 - type: recall_at_100 value: 93.646 - type: recall_at_1000 value: 98.72999999999999 - type: recall_at_3 value: 61.134 - type: recall_at_5 value: 70.377 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 70.548 - type: map_at_10 value: 84.466 - type: map_at_100 value: 85.10600000000001 - type: map_at_1000 value: 85.123 - type: map_at_3 value: 81.57600000000001 - type: map_at_5 value: 83.399 - type: mrr_at_1 value: 81.24 - type: mrr_at_10 value: 87.457 - type: mrr_at_100 value: 87.574 - type: mrr_at_1000 value: 87.575 - type: mrr_at_3 value: 86.507 - type: mrr_at_5 value: 87.205 - type: ndcg_at_1 value: 81.25 - type: ndcg_at_10 value: 88.203 - type: ndcg_at_100 value: 89.457 - type: ndcg_at_1000 value: 89.563 - type: ndcg_at_3 value: 85.465 - type: ndcg_at_5 value: 87.007 - type: precision_at_1 value: 81.25 - type: precision_at_10 value: 13.373 - type: precision_at_100 value: 1.5270000000000001 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.417 - type: precision_at_5 value: 24.556 - type: recall_at_1 value: 70.548 - type: recall_at_10 value: 95.208 - type: recall_at_100 value: 99.514 - type: recall_at_1000 value: 99.988 - type: recall_at_3 value: 87.214 - type: recall_at_5 value: 91.696 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 53.04822095496839 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 60.30778476474675 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 4.692 - type: map_at_10 value: 11.766 - type: map_at_100 value: 13.904 - type: map_at_1000 value: 14.216999999999999 - type: map_at_3 value: 8.245 - type: map_at_5 value: 9.92 - type: mrr_at_1 value: 23.0 - type: mrr_at_10 value: 33.78 - type: mrr_at_100 value: 34.922 - type: mrr_at_1000 value: 34.973 - type: mrr_at_3 value: 30.2 - type: mrr_at_5 value: 32.565 - type: ndcg_at_1 value: 23.0 - type: ndcg_at_10 value: 19.863 - type: ndcg_at_100 value: 28.141 - type: ndcg_at_1000 value: 33.549 - type: ndcg_at_3 value: 18.434 - type: ndcg_at_5 value: 16.384 - type: precision_at_1 value: 23.0 - type: precision_at_10 value: 10.39 - type: precision_at_100 value: 2.235 - type: precision_at_1000 value: 0.35300000000000004 - type: precision_at_3 value: 17.133000000000003 - type: precision_at_5 value: 14.44 - type: recall_at_1 value: 4.692 - type: recall_at_10 value: 21.025 - type: recall_at_100 value: 45.324999999999996 - type: recall_at_1000 value: 71.675 - type: recall_at_3 value: 10.440000000000001 - type: recall_at_5 value: 14.64 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 84.96178184892842 - type: cos_sim_spearman value: 79.6487740813199 - type: euclidean_pearson value: 82.06661161625023 - type: euclidean_spearman value: 79.64876769031183 - type: manhattan_pearson value: 82.07061164575131 - type: manhattan_spearman value: 79.65197039464537 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 84.15305604100027 - type: cos_sim_spearman value: 74.27447427941591 - type: euclidean_pearson value: 80.52737337565307 - type: euclidean_spearman value: 74.27416077132192 - type: manhattan_pearson value: 80.53728571140387 - type: manhattan_spearman value: 74.28853605753457 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 83.44386080639279 - type: cos_sim_spearman value: 84.17947648159536 - type: euclidean_pearson value: 83.34145388129387 - type: euclidean_spearman value: 84.17947648159536 - type: manhattan_pearson value: 83.30699061927966 - type: manhattan_spearman value: 84.18125737380451 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 81.57392220985612 - type: cos_sim_spearman value: 78.80745014464101 - type: euclidean_pearson value: 80.01660371487199 - type: euclidean_spearman value: 78.80741240102256 - type: manhattan_pearson value: 79.96810779507953 - type: manhattan_spearman value: 78.75600400119448 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 86.85421063026625 - type: cos_sim_spearman value: 87.55320285299192 - type: euclidean_pearson value: 86.69750143323517 - type: euclidean_spearman value: 87.55320284326378 - type: manhattan_pearson value: 86.63379169960379 - type: manhattan_spearman value: 87.4815029877984 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 84.31314130411842 - type: cos_sim_spearman value: 85.3489588181433 - type: euclidean_pearson value: 84.13240933463535 - type: euclidean_spearman value: 85.34902871403281 - type: manhattan_pearson value: 84.01183086503559 - type: manhattan_spearman value: 85.19316703166102 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 89.09979781689536 - type: cos_sim_spearman value: 88.87813323759015 - type: euclidean_pearson value: 88.65413031123792 - type: euclidean_spearman value: 88.87813323759015 - type: manhattan_pearson value: 88.61818758256024 - type: manhattan_spearman value: 88.81044100494604 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 62.30693258111531 - type: cos_sim_spearman value: 62.195516523251946 - type: euclidean_pearson value: 62.951283701049476 - type: euclidean_spearman value: 62.195516523251946 - type: manhattan_pearson value: 63.068322281439535 - type: manhattan_spearman value: 62.10621171028406 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 84.27092833763909 - type: cos_sim_spearman value: 84.84429717949759 - type: euclidean_pearson value: 84.8516966060792 - type: euclidean_spearman value: 84.84429717949759 - type: manhattan_pearson value: 84.82203139242881 - type: manhattan_spearman value: 84.8358503952945 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 83.10290863981409 - type: mrr value: 95.31168450286097 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 52.161 - type: map_at_10 value: 62.138000000000005 - type: map_at_100 value: 62.769 - type: map_at_1000 value: 62.812 - type: map_at_3 value: 59.111000000000004 - type: map_at_5 value: 60.995999999999995 - type: mrr_at_1 value: 55.333 - type: mrr_at_10 value: 63.504000000000005 - type: mrr_at_100 value: 64.036 - type: mrr_at_1000 value: 64.08 - type: mrr_at_3 value: 61.278 - type: mrr_at_5 value: 62.778 - type: ndcg_at_1 value: 55.333 - type: ndcg_at_10 value: 66.678 - type: ndcg_at_100 value: 69.415 - type: ndcg_at_1000 value: 70.453 - type: ndcg_at_3 value: 61.755 - type: ndcg_at_5 value: 64.546 - type: precision_at_1 value: 55.333 - type: precision_at_10 value: 9.033 - type: precision_at_100 value: 1.043 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 24.221999999999998 - type: precision_at_5 value: 16.333000000000002 - type: recall_at_1 value: 52.161 - type: recall_at_10 value: 79.156 - type: recall_at_100 value: 91.333 - type: recall_at_1000 value: 99.333 - type: recall_at_3 value: 66.43299999999999 - type: recall_at_5 value: 73.272 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.81287128712871 - type: cos_sim_ap value: 95.30034785910676 - type: cos_sim_f1 value: 90.28629856850716 - type: cos_sim_precision value: 92.36401673640168 - type: cos_sim_recall value: 88.3 - type: dot_accuracy value: 99.81287128712871 - type: dot_ap value: 95.30034785910676 - type: dot_f1 value: 90.28629856850716 - type: dot_precision value: 92.36401673640168 - type: dot_recall value: 88.3 - type: euclidean_accuracy value: 99.81287128712871 - type: euclidean_ap value: 95.30034785910676 - type: euclidean_f1 value: 90.28629856850716 - type: euclidean_precision value: 92.36401673640168 - type: euclidean_recall value: 88.3 - type: manhattan_accuracy value: 99.80990099009901 - type: manhattan_ap value: 95.26880751950654 - type: manhattan_f1 value: 90.22177419354838 - type: manhattan_precision value: 90.95528455284553 - type: manhattan_recall value: 89.5 - type: max_accuracy value: 99.81287128712871 - type: max_ap value: 95.30034785910676 - type: max_f1 value: 90.28629856850716 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 58.518662504351184 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 34.96168178378587 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 52.04862593471896 - type: mrr value: 52.97238402936932 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 30.092545236479946 - type: cos_sim_spearman value: 31.599851000175498 - type: dot_pearson value: 30.092542723901676 - type: dot_spearman value: 31.599851000175498 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.189 - type: map_at_10 value: 1.662 - type: map_at_100 value: 9.384 - type: map_at_1000 value: 22.669 - type: map_at_3 value: 0.5559999999999999 - type: map_at_5 value: 0.9039999999999999 - type: mrr_at_1 value: 68.0 - type: mrr_at_10 value: 81.01899999999999 - type: mrr_at_100 value: 81.01899999999999 - type: mrr_at_1000 value: 81.01899999999999 - type: mrr_at_3 value: 79.333 - type: mrr_at_5 value: 80.733 - type: ndcg_at_1 value: 63.0 - type: ndcg_at_10 value: 65.913 - type: ndcg_at_100 value: 51.895 - type: ndcg_at_1000 value: 46.967 - type: ndcg_at_3 value: 65.49199999999999 - type: ndcg_at_5 value: 66.69699999999999 - type: precision_at_1 value: 68.0 - type: precision_at_10 value: 71.6 - type: precision_at_100 value: 53.66 - type: precision_at_1000 value: 21.124000000000002 - type: precision_at_3 value: 72.667 - type: precision_at_5 value: 74.0 - type: recall_at_1 value: 0.189 - type: recall_at_10 value: 1.913 - type: recall_at_100 value: 12.601999999999999 - type: recall_at_1000 value: 44.296 - type: recall_at_3 value: 0.605 - type: recall_at_5 value: 1.018 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 2.701 - type: map_at_10 value: 10.445 - type: map_at_100 value: 17.324 - type: map_at_1000 value: 19.161 - type: map_at_3 value: 5.497 - type: map_at_5 value: 7.278 - type: mrr_at_1 value: 30.612000000000002 - type: mrr_at_10 value: 45.534 - type: mrr_at_100 value: 45.792 - type: mrr_at_1000 value: 45.806999999999995 - type: mrr_at_3 value: 37.755 - type: mrr_at_5 value: 43.469 - type: ndcg_at_1 value: 26.531 - type: ndcg_at_10 value: 26.235000000000003 - type: ndcg_at_100 value: 39.17 - type: ndcg_at_1000 value: 51.038 - type: ndcg_at_3 value: 23.625 - type: ndcg_at_5 value: 24.338 - type: precision_at_1 value: 30.612000000000002 - type: precision_at_10 value: 24.285999999999998 - type: precision_at_100 value: 8.224 - type: precision_at_1000 value: 1.6179999999999999 - type: precision_at_3 value: 24.490000000000002 - type: precision_at_5 value: 24.898 - type: recall_at_1 value: 2.701 - type: recall_at_10 value: 17.997 - type: recall_at_100 value: 51.766999999999996 - type: recall_at_1000 value: 87.863 - type: recall_at_3 value: 6.295000000000001 - type: recall_at_5 value: 9.993 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 73.3474 - type: ap value: 15.393431414459924 - type: f1 value: 56.466681887882416 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 62.062818336163 - type: f1 value: 62.11230840463252 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 42.464892820845115 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 86.15962329379508 - type: cos_sim_ap value: 74.73674057919256 - type: cos_sim_f1 value: 68.81245642574947 - type: cos_sim_precision value: 61.48255813953488 - type: cos_sim_recall value: 78.12664907651715 - type: dot_accuracy value: 86.15962329379508 - type: dot_ap value: 74.7367634988281 - type: dot_f1 value: 68.81245642574947 - type: dot_precision value: 61.48255813953488 - type: dot_recall value: 78.12664907651715 - type: euclidean_accuracy value: 86.15962329379508 - type: euclidean_ap value: 74.7367761466634 - type: euclidean_f1 value: 68.81245642574947 - type: euclidean_precision value: 61.48255813953488 - type: euclidean_recall value: 78.12664907651715 - type: manhattan_accuracy value: 86.21326816474935 - type: manhattan_ap value: 74.64416473733951 - type: manhattan_f1 value: 68.80924855491331 - type: manhattan_precision value: 61.23456790123457 - type: manhattan_recall value: 78.52242744063325 - type: max_accuracy value: 86.21326816474935 - type: max_ap value: 74.7367761466634 - type: max_f1 value: 68.81245642574947 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 88.97620988085536 - type: cos_sim_ap value: 86.08680845745758 - type: cos_sim_f1 value: 78.02793637114438 - type: cos_sim_precision value: 73.11082699683736 - type: cos_sim_recall value: 83.65414228518632 - type: dot_accuracy value: 88.97620988085536 - type: dot_ap value: 86.08681149437946 - type: dot_f1 value: 78.02793637114438 - type: dot_precision value: 73.11082699683736 - type: dot_recall value: 83.65414228518632 - type: euclidean_accuracy value: 88.97620988085536 - type: euclidean_ap value: 86.08681215460771 - type: euclidean_f1 value: 78.02793637114438 - type: euclidean_precision value: 73.11082699683736 - type: euclidean_recall value: 83.65414228518632 - type: manhattan_accuracy value: 88.88888888888889 - type: manhattan_ap value: 86.02916327562438 - type: manhattan_f1 value: 78.02063045516843 - type: manhattan_precision value: 73.38851947346994 - type: manhattan_recall value: 83.2768709578072 - type: max_accuracy value: 88.97620988085536 - type: max_ap value: 86.08681215460771 - type: max_f1 value: 78.02793637114438 --- <!-- TODO: add evaluation results here --> <br><br> <p align="center"> <img src="https://github.com/jina-ai/finetuner/blob/main/docs/_static/finetuner-logo-ani.svg?raw=true" alt="Finetuner logo: Finetuner helps you to create experiments in order to improve embeddings on search tasks. It accompanies you to deliver the last mile of performance-tuning for neural search applications." width="150px"> </p> <p align="center"> <b>The text embedding set trained by <a href="https://jina.ai/"><b>Jina AI</b></a>, <a href="https://github.com/jina-ai/finetuner"><b>Finetuner</b></a> team.</b> </p> ## Intended Usage & Model Info `jina-embeddings-v2-base-en` is an English, monolingual **embedding model** supporting **8192 sequence length**. It is based on a Bert architecture (JinaBert) that supports the symmetric bidirectional variant of [ALiBi](https://arxiv.org/abs/2108.12409) to allow longer sequence length. The backbone `jina-bert-v2-base-en` is pretrained on the C4 dataset. The model is further trained on Jina AI's collection of more than 400 millions of sentence pairs and hard negatives. These pairs were obtained from various domains and were carefully selected through a thorough cleaning process. The embedding model was trained using 512 sequence length, but extrapolates to 8k sequence length (or even longer) thanks to ALiBi. This makes our model useful for a range of use cases, especially when processing long documents is needed, including long document retrieval, semantic textual similarity, text reranking, recommendation, RAG and LLM-based generative search, etc. With a standard size of 137 million parameters, the model enables fast inference while delivering better performance than our small model. It is recommended to use a single GPU for inference. Additionally, we provide the following embedding models: **V1 (Based on T5, 512 Seq)** - [`jina-embeddings-v1-small-en`](https://huggingface.co/jinaai/jina-embedding-s-en-v1): 35 million parameters. - [`jina-embeddings-v1-base-en`](https://huggingface.co/jinaai/jina-embedding-b-en-v1): 110 million parameters. - [`jina-embeddings-v1-large-en`](https://huggingface.co/jinaai/jina-embedding-l-en-v1): 330 million parameters. **V2 (Based on JinaBert, 8k Seq)** - [`jina-embeddings-v2-small-en`](https://huggingface.co/jinaai/jina-embeddings-v2-small-en): 33 million parameters. - [`jina-embeddings-v2-base-en`](https://huggingface.co/jinaai/jina-embeddings-v2-base-en): 137 million parameters **(you are here)**. - [`jina-embeddings-v2-large-en`](): 435 million parameters (releasing soon). ## Data & Parameters Jina Embeddings V2 [technical report](https://arxiv.org/abs/2310.19923) ## Usage **<details><summary>Please apply mean pooling when integrating the model.</summary>** <p> ### Why mean pooling? `mean poooling` takes all token embeddings from model output and averaging them at sentence/paragraph level. It has been proved to be the most effective way to produce high-quality sentence embeddings. We offer an `encode` function to deal with this. However, if you would like to do it without using the default `encode` function: ```python import torch import torch.nn.functional as F from transformers import AutoTokenizer, AutoModel def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) sentences = ['How is the weather today?', 'What is the current weather like today?'] tokenizer = AutoTokenizer.from_pretrained('jinaai/jina-embeddings-v2-small-en') model = AutoModel.from_pretrained('jinaai/jina-embeddings-v2-small-en', trust_remote_code=True) encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') with torch.no_grad(): model_output = model(**encoded_input) embeddings = mean_pooling(model_output, encoded_input['attention_mask']) embeddings = F.normalize(embeddings, p=2, dim=1) ``` </p> </details> You can use Jina Embedding models directly from transformers package: ```python !pip install transformers from transformers import AutoModel from numpy.linalg import norm cos_sim = lambda a,b: (a @ b.T) / (norm(a)*norm(b)) model = AutoModel.from_pretrained('jinaai/jina-embeddings-v2-base-en', trust_remote_code=True) # trust_remote_code is needed to use the encode method embeddings = model.encode(['How is the weather today?', 'What is the current weather like today?']) print(cos_sim(embeddings[0], embeddings[1])) ``` If you only want to handle shorter sequence, such as 2k, pass the `max_length` parameter to the `encode` function: ```python embeddings = model.encode( ['Very long ... document'], max_length=2048 ) ``` ## Fully-managed Embeddings Service Alternatively, you can use Jina AI's [Embedding platform](https://jina.ai/embeddings/) for fully-managed access to Jina Embeddings models. ## Use Jina Embeddings for RAG According to the latest blog post from [LLamaIndex](https://blog.llamaindex.ai/boosting-rag-picking-the-best-embedding-reranker-models-42d079022e83), > In summary, to achieve the peak performance in both hit rate and MRR, the combination of OpenAI or JinaAI-Base embeddings with the CohereRerank/bge-reranker-large reranker stands out. <img src="https://miro.medium.com/v2/resize:fit:4800/format:webp/1*ZP2RVejCZovF3FDCg-Bx3A.png" width="780px"> ## Plans The development of new bilingual models is currently underway. We will be targeting mainly the German and Spanish languages. The upcoming models will be called `jina-embeddings-v2-base-de/es`. ## Contact Join our [Discord community](https://discord.jina.ai) and chat with other community members about ideas. ## Citation If you find Jina Embeddings useful in your research, please cite the following paper: ``` @misc{günther2023jina, title={Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documents}, author={Michael Günther and Jackmin Ong and Isabelle Mohr and Alaeddine Abdessalem and Tanguy Abel and Mohammad Kalim Akram and Susana Guzman and Georgios Mastrapas and Saba Sturua and Bo Wang and Maximilian Werk and Nan Wang and Han Xiao}, year={2023}, eprint={2310.19923}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.36456307768821716, -0.8213924765586853, 0.30939239263534546, 0.4449711740016937, -0.3879292905330658, -0.4256267845630646, -0.25032633543014526, -0.27787384390830994, 0.45351314544677734, 0.07911837846040726, -0.2510780394077301, -0.5340631008148193, -0.633938729763031, 0.09245862066745758, -0.26096993684768677, 0.794661283493042, -0.11682767421007156, 0.055258117616176605, -0.2340158373117447, -0.1186293289065361, -0.306400865316391, -0.3237569332122803, -0.5866920351982117, -0.09956187009811401, 0.41345900297164917, 0.10089722275733948, 0.5986540913581848, 0.7760747075080872, 0.2220240980386734, 0.31910407543182373, -0.07051203399896622, 0.30558085441589355, -0.3778100311756134, 0.08620843291282654, 0.021027185022830963, -0.49431097507476807, -0.4137682616710663, 0.1902903914451599, 0.6606071591377258, 0.2198416292667389, 0.011839383281767368, 0.2992173433303833, 0.015403015539050102, 0.4391288757324219, -0.6149482131004333, 0.31898823380470276, -0.3588643968105316, -0.00005424468690762296, -0.10218779742717743, 0.08423026651144028, -0.48902973532676697, -0.2545643150806427, 0.18150007724761963, -0.55818772315979, -0.11138255149126053, 0.2412334680557251, 1.3552523851394653, 0.2712205946445465, -0.3399501442909241, -0.19118914008140564, -0.26067471504211426, 0.968147337436676, -0.9435970187187195, 0.4466398358345032, 0.40155258774757385, -0.08925435692071915, -0.12817640602588654, -0.6825106739997864, -0.593324601650238, -0.05247991904616356, -0.07306989282369614, 0.27595609426498413, -0.05645040050148964, -0.12459180504083633, 0.1738777458667755, 0.280255526304245, -0.5599797368049622, 0.037470318377017975, -0.23324427008628845, 0.046617861837148666, 0.7961066961288452, -0.04546947404742241, 0.3652890920639038, -0.5661691427230835, -0.21593156456947327, -0.37637147307395935, -0.29951944947242737, -0.06443902850151062, 0.4090435802936554, 0.08060240000486374, -0.3920530080795288, 0.5572609901428223, -0.09120819717645645, 0.5616180300712585, 0.051743123680353165, -0.027974100783467293, 0.507435142993927, -0.332955002784729, -0.36624279618263245, -0.31399744749069214, 1.055357813835144, 0.3154556453227997, 0.28714677691459656, 0.01559282187372446, -0.1488262116909027, -0.24827072024345398, 0.04324454069137573, -0.8015952706336975, -0.17800849676132202, 0.2346002459526062, -0.6211866140365601, -0.36396729946136475, 0.1253136545419693, -0.855719268321991, -0.15283605456352234, 0.0176716186106205, 0.6747239828109741, -0.5908576846122742, -0.1432928591966629, 0.28104910254478455, -0.24202315509319305, 0.34777334332466125, 0.028754431754350662, -0.7296516299247742, 0.023628972470760345, 0.3324293792247772, 0.8626895546913147, 0.23754766583442688, -0.30642077326774597, -0.20279912650585175, -0.12348730862140656, -0.14799056947231293, 0.4812491834163666, -0.3890928328037262, -0.013242356479167938, 0.14462171494960785, 0.050892528146505356, -0.33964934945106506, -0.14970842003822327, 0.5389872193336487, -0.5410932302474976, 0.40184175968170166, 0.04322752729058266, -0.7084780335426331, -0.3127810060977936, 0.11672469973564148, -0.6431148648262024, 0.9088512659072876, 0.08235596865415573, -0.8613149523735046, 0.11217556148767471, -0.488787978887558, -0.2327214926481247, -0.48415693640708923, 0.18058441579341888, -0.8135390877723694, -0.016492720693349838, 0.6464192867279053, 0.7073588967323303, -0.40396633744239807, 0.16148711740970612, -0.3324921727180481, -0.2912502884864807, 0.20410893857479095, -0.3357102572917938, 0.9187891483306885, 0.32319825887680054, -0.25220102071762085, -0.07572141289710999, -0.5940417647361755, 0.009958122856914997, 0.5620197653770447, -0.21394036710262299, -0.330726683139801, -0.019227808341383934, 0.20870095491409302, 0.24478937685489655, 0.41269513964653015, -0.5580153465270996, 0.2093992829322815, -0.5650323629379272, 0.5222035050392151, 0.6990177035331726, 0.05469132214784622, 0.3910199999809265, -0.44666215777397156, 0.259602427482605, 0.06677274405956268, 0.17154285311698914, -0.21020813286304474, -0.6438462138175964, -0.9360752105712891, -0.2799554467201233, 0.7033002376556396, 0.4545859098434448, -0.5533690452575684, 0.7156274318695068, -0.407821387052536, -0.6506115198135376, -0.7681759595870972, 0.1474205106496811, 0.36202481389045715, 0.00021254965395200998, 0.5283787250518799, -0.08531183749437332, -0.6238843202590942, -0.8868335485458374, -0.051618874073028564, -0.014018802903592587, -0.030657971277832985, 0.22937878966331482, 0.6221696138381958, -0.22476409375667572, 0.8222147226333618, -0.5756469368934631, -0.3659299612045288, -0.26737844944000244, -0.06694719195365906, 0.4120340347290039, 0.5851688981056213, 0.6649665236473083, -0.6127182841300964, -0.6791948080062866, -0.3429250419139862, -0.8887643814086914, 0.19141972064971924, -0.2374553233385086, -0.20466449856758118, 0.2084612399339676, 0.29525652527809143, -0.7763604521751404, 0.3515377938747406, 0.531246542930603, -0.3705578148365021, 0.2510386109352112, -0.29771724343299866, -0.003541518235579133, -1.4376124143600464, -0.031643036752939224, 0.1984943151473999, -0.18180517852306366, -0.40783020853996277, 0.23430994153022766, 0.14062274992465973, 0.009739575907588005, -0.3589351177215576, 0.5547131896018982, -0.5496106147766113, 0.25729483366012573, 0.08292607963085175, 0.36268970370292664, 0.07617130875587463, 0.608430802822113, -0.2703751027584076, 0.5464234948158264, 0.5053709149360657, -0.4830440282821655, 0.24309155344963074, 0.5568691492080688, -0.38719621300697327, 0.14724373817443848, -0.7683761119842529, 0.22641970217227936, -0.0539637953042984, 0.3364606499671936, -0.8094363212585449, -0.13957341015338898, 0.33278894424438477, -0.6080254912376404, 0.4740486741065979, -0.08370958268642426, -0.7680365443229675, -0.399350106716156, -0.6708720922470093, 0.24337732791900635, 0.6515573859214783, -0.5602853298187256, 0.5386610627174377, 0.3627856373786926, 0.02551056630909443, -0.6518869400024414, -0.641781210899353, -0.1401551067829132, -0.18168437480926514, -0.7773026823997498, 0.4397267997264862, 0.12160851806402206, 0.11831066757440567, 0.0760018602013588, 0.18431027233600616, 0.1093006283044815, -0.014854509383440018, 0.17668020725250244, 0.183172345161438, -0.1274159997701645, 0.07361432164907455, 0.20414002239704132, -0.07771703600883484, -0.0043524038046598434, -0.24034342169761658, 0.8327889442443848, -0.2145407646894455, -0.11599836498498917, -0.599712073802948, 0.2549493908882141, 0.46876290440559387, -0.4017373025417328, 1.0679742097854614, 0.9409200549125671, -0.5258961319923401, -0.03946210443973541, -0.5332842469215393, -0.06008101627230644, -0.48052918910980225, 0.4547518789768219, -0.3486740291118622, -0.48429831862449646, 0.5136936902999878, 0.23623384535312653, 0.11357589066028595, 0.7791037559509277, 0.3631533682346344, -0.2291388362646103, 1.1184450387954712, 0.41038405895233154, -0.3462366759777069, 0.5308212637901306, -0.8197057843208313, 0.20746447145938873, -0.9496188759803772, -0.2683383524417877, -0.2556118071079254, -0.3523552119731903, -0.7930192351341248, -0.5973659753799438, 0.1459091752767563, 0.1562531292438507, -0.26659417152404785, 0.4731469452381134, -0.4052782952785492, 0.11357633769512177, 0.5947861671447754, 0.21479690074920654, -0.20228378474712372, -0.0438285693526268, -0.1373283863067627, -0.025419535115361214, -0.5953138470649719, -0.37080398201942444, 1.1991933584213257, 0.6511551141738892, 0.7253130674362183, -0.08696229755878448, 0.8711638450622559, 0.05100817233324051, -0.05145406723022461, -0.6714173555374146, 0.4328383207321167, -0.20177346467971802, -0.427083283662796, -0.31938180327415466, -0.2044716477394104, -0.987270712852478, 0.22852256894111633, -0.3326225280761719, -0.6067154407501221, 0.19103869795799255, -0.23268911242485046, -0.3338027894496918, 0.438524067401886, -0.6367203593254089, 0.7378385066986084, 0.11678862571716309, -0.3119422197341919, -0.28229594230651855, -0.4564121663570404, 0.0425267294049263, 0.13669614493846893, 0.058430060744285583, -0.06148497760295868, -0.046369608491659164, 1.0024667978286743, -0.3368282616138458, 0.7620808482170105, -0.2828920781612396, 0.042150285094976425, 0.3404817581176758, -0.3081175982952118, 0.6658967733383179, 0.27906808257102966, -0.13500487804412842, 0.18406197428703308, -0.10476071387529373, -0.5618869066238403, -0.5734354257583618, 0.8019103407859802, -1.0101125240325928, -0.5798669457435608, -0.4834200441837311, -0.43986624479293823, -0.04215425252914429, 0.14025095105171204, 0.3274124562740326, 0.3825034201145172, 0.026012904942035675, 0.4564286172389984, 0.5971258878707886, -0.49840226769447327, 0.49259406328201294, 0.06142701208591461, -0.13826622068881989, -0.5676292181015015, 0.9975231885910034, 0.2333991676568985, -0.06137466058135033, 0.36495572328567505, 0.1220192238688469, -0.2553841769695282, -0.43869006633758545, -0.48302212357521057, 0.6081628799438477, -0.531061589717865, -0.3770933747291565, -0.9352787137031555, -0.4737973213195801, -0.5933595895767212, -0.13938283920288086, -0.4884876310825348, -0.4104738235473633, -0.5387741327285767, -0.18234390020370483, 0.4343544840812683, 0.5984606146812439, 0.02228022739291191, 0.11913800239562988, -0.5929192900657654, 0.2604762613773346, 0.15572956204414368, 0.2888909876346588, 0.10224413871765137, -0.6728760600090027, -0.5686107277870178, 0.10917653143405914, -0.3089185357093811, -0.8631976842880249, 0.6465229988098145, 0.21516267955303192, 0.5625648498535156, 0.35783466696739197, 0.06739091128110886, 0.6331806778907776, -0.44595006108283997, 0.8228788375854492, -0.06028398871421814, -0.8649625778198242, 0.5684857964515686, -0.20812639594078064, 0.15627425909042358, 0.299405962228775, 0.4977553188800812, -0.2738279402256012, -0.45217353105545044, -0.5942406058311462, -0.9552726745605469, 0.6382002234458923, 0.31244632601737976, 0.47558802366256714, -0.2203233242034912, 0.400362104177475, -0.1639382392168045, -0.21283188462257385, -0.6847432255744934, -0.4846380650997162, -0.33332303166389465, -0.3299100399017334, -0.07179746776819229, -0.3895849287509918, 0.15317009389400482, -0.4948931634426117, 0.7763624787330627, 0.061898648738861084, 0.8242395520210266, 0.28052446246147156, -0.36274510622024536, 0.206910640001297, -0.0189347006380558, 0.38774374127388, 0.21034620702266693, -0.3210027515888214, -0.17289866507053375, 0.42647382616996765, -0.370918869972229, 0.0423637256026268, 0.3006237745285034, -0.2327902913093567, 0.0728851705789566, 0.34784996509552, 0.8411393761634827, 0.20124481618404388, -0.3396451771259308, 0.6800377368927002, -0.07687440514564514, -0.10889119654893875, -0.4531770646572113, 0.007357509341090918, 0.22215400636196136, 0.24125510454177856, 0.2881612181663513, -0.12668365240097046, 0.01413685642182827, -0.356835275888443, 0.21658356487751007, 0.2711266279220581, -0.1732579618692398, -0.3210473358631134, 0.7224382162094116, 0.11917883157730103, -0.1163390651345253, 0.7735896110534668, -0.2526892125606537, -0.44383469223976135, 0.6463828682899475, 0.7832328677177429, 0.9127190113067627, -0.11859895288944244, 0.21073400974273682, 0.7393954396247864, 0.28634801506996155, 0.026199687272310257, 0.23651915788650513, 0.3248160183429718, -0.7274976372718811, -0.15430960059165955, -0.741600751876831, -0.06032750755548477, 0.08198199421167374, -0.6760194897651672, 0.3258553147315979, -0.5190481543540955, -0.21901531517505646, -0.10325919836759567, 0.3072907626628876, -0.9191637635231018, 0.22005365788936615, 0.07774145901203156, 0.9381431341171265, -0.826178789138794, 0.8637690544128418, 0.6441698670387268, -0.7932450175285339, -0.5873233675956726, 0.16118930280208588, -0.25942543148994446, -0.6877213716506958, 0.38401931524276733, 0.4372711181640625, 0.1745491921901703, 0.08156415820121765, -0.451048880815506, -1.0956014394760132, 1.3481831550598145, 0.2426748275756836, -0.22020632028579712, -0.2215631753206253, -0.17595799267292023, 0.47629058361053467, -0.36058351397514343, 0.4308129549026489, 0.3600289523601532, 0.5104832649230957, -0.382262647151947, -0.6929396986961365, 0.3675430417060852, -0.554483950138092, 0.25893473625183105, -0.2000308632850647, -0.9659485816955566, 0.8877270221710205, -0.2504497170448303, -0.24181951582431793, 0.2049010694026947, 1.0489487648010254, 0.059560805559158325, 0.09173279255628586, 0.39222604036331177, 0.742526113986969, 0.5964927077293396, -0.04465366154909134, 1.2999018430709839, -0.31152236461639404, 0.44792914390563965, 0.7160080075263977, 0.2903367877006531, 1.0085691213607788, 0.22537490725517273, -0.263666033744812, 0.7443590760231018, 0.6553731560707092, -0.20503437519073486, 0.6204721331596375, 0.07986199855804443, 0.11671216040849686, -0.10844159126281738, 0.017958195880055428, -0.5001885294914246, 0.5138314962387085, 0.3883553743362427, -0.6013805866241455, 0.0870697870850563, 0.09419064223766327, 0.2189500629901886, -0.06928418576717377, 0.15273870527744293, 0.4901161789894104, 0.22097870707511902, -0.45497605204582214, 0.7665022611618042, 0.40785127878189087, 1.03164803981781, -0.4034254848957062, 0.21146222949028015, -0.21080651879310608, 0.12100335210561752, -0.07549363374710083, -0.6681427955627441, 0.10843882709741592, -0.1507851928472519, -0.09793626517057419, -0.02929454669356346, 0.5319580435752869, -0.42618077993392944, -0.383182555437088, 0.5218733549118042, 0.363709956407547, 0.03687971830368042, 0.03181501105427742, -0.8577277660369873, 0.002059571910649538, 0.03794742003083229, -0.682640016078949, 0.29025930166244507, 0.10322439670562744, 0.1605084389448166, 0.6458003520965576, 0.641444981098175, -0.15739159286022186, 0.11204429715871811, 0.05492065101861954, 0.8044136166572571, -0.6994223594665527, -0.3249855637550354, -0.7973065972328186, 0.48288288712501526, -0.2187967151403427, -0.3902788460254669, 0.8093096613883972, 0.547299325466156, 0.7505159378051758, -0.27600663900375366, 0.553701639175415, -0.13936929404735565, 0.10377660393714905, -0.542535662651062, 0.8922450542449951, -0.7518954277038574, -0.07775234431028366, -0.2945370376110077, -0.9534298181533813, -0.28936782479286194, 0.860264003276825, -0.19668589532375336, 0.07532106339931488, 0.5946251153945923, 0.7483175992965698, 0.03192402422428131, -0.21198147535324097, 0.20772120356559753, 0.3295283615589142, 0.35391703248023987, 0.6512277126312256, 0.46732544898986816, -0.977261483669281, 0.4434855580329895, -0.48764851689338684, -0.036509592086076736, -0.3861065208911896, -0.6593669056892395, -1.0301529169082642, -0.841156542301178, -0.30775636434555054, -0.3472437262535095, 0.03619719296693802, 1.0776581764221191, 0.5902549028396606, -0.7767362594604492, 0.08306654542684555, 0.19023917615413666, 0.17157301306724548, -0.24111542105674744, -0.26666685938835144, 0.6817208528518677, -0.39449700713157654, -1.1252410411834717, 0.3372240662574768, -0.06649050116539001, 0.07074140012264252, -0.1767667979001999, -0.14534300565719604, -0.7194369435310364, 0.3989357352256775, 0.4918421506881714, 0.060041263699531555, -0.6517766714096069, -0.3190225660800934, 0.07607568055391312, -0.2759290337562561, -0.0899682566523552, 0.035201143473386765, -0.5873868465423584, 0.43047595024108887, 0.753105103969574, 0.6188738346099854, 0.6453037858009338, -0.24257080256938934, 0.5633378028869629, -0.6510518193244934, 0.15088512003421783, -0.04538992419838905, 0.6411297917366028, 0.32394692301750183, -0.3104037046432495, 0.596458375453949, 0.14938987791538239, -0.42613765597343445, -0.7439700365066528, -0.2732381224632263, -0.8987209796905518, -0.1044752448797226, 1.1460869312286377, -0.43065497279167175, -0.31547653675079346, 0.14672768115997314, -0.10944578051567078, 0.5690037608146667, -0.3610270321369171, 0.6950333118438721, 0.6472090482711792, 0.1874510794878006, -0.11218728125095367, -0.5946751832962036, 0.36310115456581116, 0.5952674746513367, -0.5604997873306274, -0.33297601342201233, 0.033129382878541946, 0.4081888496875763, 0.37083810567855835, 0.3530716300010681, -0.14424751698970795, 0.2242221087217331, 0.1774342805147171, -0.05515727773308754, -0.3041767179965973, -0.1972435563802719, -0.20743636786937714, 0.016980459913611412, -0.1684969961643219, -0.4829251766204834 ]
michellejieli/emotion_text_classifier
michellejieli
"2023-05-03T00:39:47Z"
364,336
30
transformers
[ "transformers", "pytorch", "roberta", "text-classification", "distilroberta", "sentiment", "emotion", "twitter", "reddit", "en", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-10-22T22:44:07Z"
--- language: "en" tags: - distilroberta - sentiment - emotion - twitter - reddit widget: - text: "Oh my God, he's lost it. He's totally lost it." - text: "What?" - text: "Wow, congratulations! So excited for you!" --- # Fine-tuned DistilRoBERTa-base for Emotion Classification 🤬🤢😀😐😭😲 # Model Description DistilRoBERTa-base is a transformer model that performs sentiment analysis. I fine-tuned the model on transcripts from the Friends show with the goal of classifying emotions from text data, specifically dialogue from Netflix shows or movies. The model predicts 6 Ekman emotions and a neutral class. These emotions include anger, disgust, fear, joy, neutrality, sadness, and surprise. The model is a fine-tuned version of [Emotion English DistilRoBERTa-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/) and [DistilRoBERTa-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base). This model was initially trained on the following table from [Emotion English DistilRoBERTa-base](https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/): |Name|anger|disgust|fear|joy|neutral|sadness|surprise| |---|---|---|---|---|---|---|---| |Crowdflower (2016)|Yes|-|-|Yes|Yes|Yes|Yes| |Emotion Dataset, Elvis et al. (2018)|Yes|-|Yes|Yes|-|Yes|Yes| |GoEmotions, Demszky et al. (2020)|Yes|Yes|Yes|Yes|Yes|Yes|Yes| |ISEAR, Vikash (2018)|Yes|Yes|Yes|Yes|-|Yes|-| |MELD, Poria et al. (2019)|Yes|Yes|Yes|Yes|Yes|Yes|Yes| |SemEval-2018, EI-reg, Mohammad et al. (2018) |Yes|-|Yes|Yes|-|Yes|-| It was fine-tuned on: |Name|anger|disgust|fear|joy|neutral|sadness|surprise| |---|---|---|---|---|---|---|---| |Emotion Lines (Friends)|Yes|Yes|Yes|Yes|Yes|Yes|Yes| # How to Use ```python from transformers import pipeline classifier = pipeline("sentiment-analysis", model="michellejieli/emotion_text_classifier") classifier("I love this!") ``` ```python Output: [{'label': 'joy', 'score': 0.9887555241584778}] ``` # Contact Please reach out to [[email protected]](mailto:[email protected]) if you have any questions or feedback. # Reference ``` Jochen Hartmann, "Emotion English DistilRoBERTa-base". https://huggingface.co/j-hartmann/emotion-english-distilroberta-base/, 2022. Ashritha R Murthy and K M Anil Kumar 2021 IOP Conf. Ser.: Mater. Sci. Eng. 1110 012009 ```
[ -0.641590416431427, -0.5829985737800598, 0.0799940973520279, 0.44738179445266724, -0.36382097005844116, -0.0026993437204509974, -0.24884025752544403, -0.17615288496017456, 0.3962251543998718, 0.029780184850096703, -0.7334738373756409, -0.6563705801963806, -0.9210449457168579, 0.3821479082107544, -0.12620270252227783, 1.3897945880889893, 0.05705849081277847, 0.2375296950340271, 0.0077578043565154076, -0.2977360486984253, -0.23761679232120514, -0.7144893407821655, -0.4110308587551117, -0.4082861542701721, 0.6015883684158325, 0.3745700418949127, 0.5749406218528748, 0.19355496764183044, 0.5459453463554382, 0.4059680998325348, -0.4183516800403595, -0.14279277622699738, -0.7913356423377991, 0.3621670603752136, 0.07571811974048615, -0.5432050824165344, -0.4140767455101013, -0.05613718554377556, 0.21818630397319794, 0.5259891152381897, -0.03686700388789177, 0.3511372208595276, 0.2779981791973114, 1.130868673324585, -0.6517005562782288, 0.46671736240386963, -0.515301525592804, 0.2670026421546936, -0.07181666046380997, 0.132854625582695, -0.5169532895088196, -0.48523029685020447, 0.22881178557872772, -0.11429210007190704, 0.2026824802160263, 0.10414861142635345, 1.1851720809936523, 0.6200335025787354, -0.4792475998401642, -0.3816317915916443, -0.693565309047699, 0.8847168684005737, -0.6449413895606995, 0.3155309855937958, -0.010310853831470013, 0.21324880421161652, -0.12911354005336761, -0.6225767731666565, -0.9955267310142517, 0.16474586725234985, -0.3243381083011627, 0.4418207108974457, -0.574857771396637, 0.007587624713778496, 0.277127742767334, 0.7494898438453674, -0.46176180243492126, -0.36078065633773804, -0.3592604696750641, 0.03895815089344978, 0.686892032623291, 0.3260549306869507, 0.09824097901582718, -0.47591713070869446, -0.30823782086372375, -0.36667394638061523, -0.052457381039857864, 0.3975490927696228, 0.44821974635124207, 0.26079776883125305, -0.2554420828819275, 0.7307124733924866, -0.302883118391037, 0.4299481213092804, 0.5588148236274719, -0.07789676636457443, 0.8198102116584778, 0.19562123715877533, -0.3498196005821228, 0.1877606064081192, 1.2745680809020996, 0.5280089974403381, 0.46355175971984863, 0.1808321177959442, 0.04913825914263725, 0.5621032118797302, 0.16545984148979187, -1.0422979593276978, -0.3429616093635559, 0.42354294657707214, -0.6773473024368286, -0.6225373148918152, 0.008397219702601433, -1.2418276071548462, -0.41482916474342346, -0.1795312613248825, 0.36799442768096924, -0.5717392563819885, -0.4306930601596832, 0.09933988004922867, -0.16311484575271606, 0.0335608571767807, -0.00948028452694416, -1.0255520343780518, 0.10696375370025635, 0.4930698573589325, 0.5913780331611633, -0.09029533714056015, -0.1851646453142166, 0.005584375001490116, -0.6028470396995544, -0.02726689539849758, 0.5293218493461609, -0.3888589143753052, -0.4746125638484955, -0.19524244964122772, 0.18612408638000488, -0.012154130265116692, -0.39668020606040955, 0.8479225039482117, -0.26090607047080994, 0.6357061266899109, -0.15280205011367798, -0.5557303428649902, -0.4878852069377899, 0.21603791415691376, -0.6117851734161377, 1.1248677968978882, 0.23653380572795868, -1.1080433130264282, 0.26429733633995056, -0.6069897413253784, -0.3007471561431885, -0.20156413316726685, 0.262279748916626, -0.4920606017112732, 0.1749686598777771, -0.023525580763816833, 0.7458146214485168, 0.006200442090630531, 0.2553658187389374, -0.4592067301273346, -0.1099274680018425, 0.18057973682880402, -0.3411049246788025, 0.9636140465736389, 0.45838820934295654, -0.4987606108188629, 0.045636288821697235, -0.9374962449073792, -0.03929145634174347, 0.1045650988817215, -0.2630486488342285, -0.38563403487205505, 0.06489072740077972, 0.10194987058639526, 0.31516003608703613, 0.36504462361335754, -0.5459990501403809, 0.10598156601190567, -0.5340968370437622, 0.2007187008857727, 0.676632285118103, 0.01536580827087164, 0.43595176935195923, -0.06621714681386948, 0.5609630346298218, 0.14827579259872437, 0.2635297179222107, -0.02471286803483963, -0.555151104927063, -1.1084694862365723, -0.4358869194984436, 0.13230249285697937, 0.6769216060638428, -0.3958117663860321, 0.9033004641532898, -0.2891066074371338, -0.9454072713851929, -0.6665677428245544, -0.1678343117237091, 0.29720738530158997, 0.9409739971160889, 0.48679104447364807, -0.06480580568313599, -0.9669418931007385, -0.866844654083252, -0.1378295123577118, -0.3983665108680725, 0.19666895270347595, 0.06325240433216095, 0.41654789447784424, -0.5194587707519531, 0.9953296780586243, -0.6394750475883484, -0.24360661208629608, -0.22175350785255432, 0.23549194633960724, 0.6620774269104004, 0.20957732200622559, 0.6372420787811279, -0.904612123966217, -1.0074548721313477, -0.09084498137235641, -0.8133071660995483, -0.1600092500448227, 0.33059078454971313, -0.30748462677001953, 0.21742817759513855, -0.1414327174425125, -0.6825019121170044, 0.4016574025154114, 0.648013710975647, -0.6982601881027222, 0.4865487813949585, 0.24900473654270172, 0.18181507289409637, -1.48686683177948, -0.06167960911989212, 0.19967980682849884, -0.09445305168628693, -0.7935094833374023, -0.07817957550287247, -0.14314274489879608, 0.15119175612926483, -0.6208212375640869, 0.42367926239967346, -0.18715800344944, 0.3748472034931183, -0.16847753524780273, -0.5158001780509949, 0.09881526231765747, 0.7910930514335632, 0.03425636887550354, 0.3119024932384491, 0.6627442240715027, -0.3722197413444519, 0.7283028364181519, 0.6699398756027222, -0.04456551745533943, 0.8050786256790161, -0.6198829412460327, -0.06956298649311066, -0.3604588508605957, 0.2168649584054947, -1.3081767559051514, -0.18626320362091064, 0.37850940227508545, -0.6755002737045288, 0.3951112926006317, -0.16237635910511017, -0.22723786532878876, -0.5676590800285339, -0.2360190600156784, -0.019447974860668182, 1.0290825366973877, -0.6331618428230286, 0.9303950071334839, 0.2833262085914612, -0.17920081317424774, -0.7309078574180603, -0.6686882972717285, -0.1999385952949524, -0.7059252262115479, -0.6804208755493164, 0.10381175577640533, -0.14679741859436035, -0.3099426329135895, 0.053718145936727524, -0.12646734714508057, -0.23064161837100983, -0.06331300735473633, 0.7370603680610657, 0.40812188386917114, -0.03595871478319168, -0.12838447093963623, 0.1391083002090454, -0.1703152358531952, 0.25151142477989197, 0.39111441373825073, 0.7531068921089172, -0.5988125801086426, 0.042065929621458054, -0.5270912647247314, 0.260116308927536, 0.8454961776733398, 0.03129792585968971, 0.7061085104942322, 0.7634323239326477, -0.3111039400100708, -0.1342252790927887, -0.41696760058403015, -0.0493527352809906, -0.4985259771347046, 0.38976576924324036, -0.4028680920600891, -0.8863299489021301, 0.6832385063171387, 0.030858540907502174, -0.17356029152870178, 0.9083751440048218, 0.9695423245429993, -0.3105580806732178, 1.2721651792526245, 0.4901042878627777, -0.45821890234947205, 0.32139289379119873, -0.44241389632225037, 0.251220703125, -0.6050106883049011, -0.3869767487049103, -0.5860598087310791, -0.6818341016769409, -0.6720104217529297, 0.044070955365896225, 0.3015657961368561, 0.05898210033774376, -0.4089564383029938, 0.3181646466255188, -0.8659768104553223, 0.3487530052661896, 0.3859572410583496, 0.009438724257051945, 0.14210757613182068, -0.03969501331448555, 0.01706564426422119, -0.3408236801624298, -0.3586014211177826, -0.5187605023384094, 0.8031877279281616, 0.6034676432609558, 0.8601652383804321, 0.06958046555519104, 0.9377920627593994, 0.29776397347450256, 0.2936611473560333, -1.1049907207489014, 0.5521025061607361, -0.37938347458839417, -0.5781840085983276, -0.13525766134262085, -0.34981828927993774, -0.8614310026168823, 0.21345669031143188, -0.25788789987564087, -0.7448665499687195, 0.4257967472076416, 0.21671785414218903, -0.2191086709499359, 0.17407451570034027, -0.9224475026130676, 0.9626235365867615, -0.09877800941467285, -0.24677005410194397, -0.07639455050230026, -0.7544184327125549, 0.4320996105670929, 0.058380648493766785, 0.046048156917095184, -0.17264918982982635, 0.4677247703075409, 0.63069087266922, -0.6730536222457886, 0.9309475421905518, -0.40946242213249207, 0.05828019604086876, 0.34234634041786194, 0.12831903994083405, 0.362541526556015, -0.1114472895860672, -0.17647942900657654, 0.3602313697338104, -0.003557119984179735, -0.06404166668653488, -0.5834167003631592, 0.7166516780853271, -0.9642255902290344, -0.19993078708648682, -0.6506785750389099, -0.22693637013435364, -0.24547553062438965, 0.12926426529884338, 0.5779638290405273, -0.11512374132871628, -0.11693897843360901, 0.36733612418174744, 0.5500554442405701, -0.07936613261699677, 0.3560957610607147, 0.3644600212574005, -0.21976907551288605, -0.4953942596912384, 0.774776041507721, -0.21174770593643188, -0.11896966397762299, 0.2044827938079834, 0.4167732000350952, -0.5796397924423218, -0.04533955082297325, -0.28783729672431946, 0.08761496096849442, -0.7316123843193054, -0.346564918756485, -0.7945543527603149, -0.18618163466453552, -0.30435582995414734, 0.05199854448437691, -0.45104697346687317, -0.3963354229927063, -0.41493821144104004, -0.31196388602256775, 0.6883227825164795, 0.6187009215354919, 0.16018080711364746, 0.2415170520544052, -0.8437627553939819, 0.3774074614048004, 0.3321267366409302, 0.38938233256340027, -0.11049360036849976, -0.6665586829185486, -0.0018843356519937515, 0.10339298844337463, -0.48175981640815735, -1.2375891208648682, 0.7796729207038879, 0.3719630837440491, 0.3191528022289276, 0.5018317699432373, 0.25975677371025085, 0.7799527645111084, -0.5431901812553406, 0.927886426448822, 0.33629509806632996, -1.148403525352478, 0.6572099328041077, -0.051802851259708405, -0.17448917031288147, 0.6987751126289368, 0.7550713419914246, -0.6584229469299316, -0.35600578784942627, -0.6762371063232422, -1.056501030921936, 0.8193077445030212, 0.2650013864040375, 0.28365299105644226, -0.10972289741039276, 0.157965749502182, 0.21996758878231049, 0.3341253399848938, -0.7755691409111023, -0.7269391417503357, -0.5457067489624023, -0.785147488117218, -0.007407546043395996, -0.44492417573928833, 0.09139073640108109, -0.560875654220581, 0.831059992313385, 0.02222009003162384, 0.20210951566696167, 0.19778163731098175, 0.1021026000380516, -0.21663740277290344, 0.2633610963821411, 0.2309359610080719, -0.1614544540643692, -0.4784797728061676, 0.11307080090045929, 0.37219300866127014, -0.5855562686920166, 0.27240189909935, -0.046476878225803375, 0.07085150480270386, 0.25402143597602844, 0.13158577680587769, 1.2459230422973633, -0.22529563307762146, -0.41083192825317383, 0.598606288433075, -0.2682553231716156, -0.347791463136673, -0.5133922696113586, 0.12074616551399231, -0.033759139478206635, 0.4220834970474243, 0.3277687430381775, 0.34530434012413025, 0.3934721052646637, -0.4348192811012268, 0.16192854940891266, 0.1832977682352066, -0.664141058921814, -0.5621088147163391, 0.6053950786590576, 0.1271812915802002, -0.17299330234527588, 0.5081480145454407, -0.35272207856178284, -0.8398059010505676, 0.5880115628242493, 0.2718336880207062, 1.1928893327713013, -0.36899110674858093, 0.1526847928762436, 0.5258475542068481, -0.05914512649178505, -0.1602741777896881, 0.6321139335632324, 0.3062196969985962, -0.8697351813316345, -0.33961543440818787, -1.0268265008926392, -0.36219191551208496, 0.18256749212741852, -0.9502067565917969, 0.4314959943294525, -0.3616631329059601, -0.3291440010070801, 0.05859353393316269, -0.1662796586751938, -0.6765609383583069, 0.3913365602493286, 0.4140828847885132, 0.9060218334197998, -1.1749238967895508, 0.7097222208976746, 0.89720219373703, -0.3342869281768799, -1.1637600660324097, -0.20364068448543549, 0.0815955325961113, -0.5011041760444641, 0.8908367156982422, 0.2993752658367157, -0.043890103697776794, 0.06242731213569641, -0.3787633776664734, -0.7352502942085266, 1.0748841762542725, 0.15155252814292908, -0.6005945205688477, 0.24650737643241882, 0.24468043446540833, 1.1689603328704834, -0.30596092343330383, 0.5621618628501892, 0.5103685259819031, 0.5148323774337769, 0.2025996446609497, -0.7792133092880249, -0.04869787395000458, -0.8086678385734558, -0.11681263893842697, 0.14832468330860138, -0.8776365518569946, 1.0099031925201416, 0.1283777505159378, -0.09347636252641678, -0.17632409930229187, 0.7725281119346619, 0.19559109210968018, 0.4334334135055542, 0.8647434711456299, 0.8514505624771118, 0.6438724994659424, -0.40325191617012024, 0.8397226333618164, -0.5575959086418152, 0.8556815981864929, 0.844878613948822, -0.3497498035430908, 0.8605561256408691, 0.5825123190879822, -0.5934343934059143, 0.9467747211456299, 0.6700664758682251, -0.27904027700424194, 0.6733933091163635, 0.17271089553833008, -0.1324664056301117, 0.027996385470032692, 0.07608477771282196, -0.2788165807723999, 0.6181406378746033, 0.2910514175891876, -0.4206538796424866, 0.04782061651349068, 0.09092288464307785, 0.18053795397281647, -0.055172454565763474, -0.08278992772102356, 0.7874618172645569, -0.06635206937789917, -0.5362561941146851, 0.7715513706207275, -0.26112160086631775, 1.0089199542999268, -0.45237529277801514, 0.01796436496078968, -0.2907053232192993, 0.3093181550502777, -0.567514955997467, -0.9424152374267578, 0.5064573287963867, 0.3734365701675415, -0.4216477870941162, -0.07899264991283417, 0.625382125377655, -0.4871954321861267, -0.5974900126457214, 0.37681102752685547, 0.2149515599012375, 0.1393783837556839, -0.1494678258895874, -0.8183698654174805, 0.03222471848130226, 0.3106684982776642, -0.6751118898391724, -0.0029184878803789616, 0.6237598657608032, 0.3146905303001404, 0.5745285153388977, 0.44931846857070923, 0.031145969405770302, 0.09357597678899765, 0.0466594360768795, 0.8850240111351013, -0.583777129650116, -0.4304669201374054, -1.222559928894043, 1.0665103197097778, -0.06308366358280182, -0.33104607462882996, 0.8106599450111389, 0.6088051795959473, 0.5627351999282837, -0.41402703523635864, 0.9239328503608704, -0.3793945610523224, 0.6874545216560364, -0.03798693045973778, 0.7625612020492554, -0.6237177848815918, -0.19460688531398773, -0.5577560663223267, -1.0376567840576172, -0.12420175224542618, 0.7885797023773193, -0.17937716841697693, -0.123104989528656, 0.5845767259597778, 0.6404018402099609, -0.020696617662906647, -0.014047793112695217, 0.04214945435523987, 0.48296353220939636, 0.15321825444698334, 0.5547347664833069, 0.8386633396148682, -0.4865301847457886, 0.5128411650657654, -0.7454103827476501, -0.28957754373550415, -0.30381616950035095, -0.795901358127594, -1.0319563150405884, -0.5813060402870178, -0.32205793261528015, -0.6468020081520081, -0.42740166187286377, 1.0152851343154907, 0.4622613489627838, -1.2170778512954712, 0.0056611234322190285, -0.11094386875629425, -0.1517738699913025, 0.031069526448845863, -0.39413920044898987, 0.21193860471248627, -0.21402370929718018, -1.1451867818832397, 0.03859688341617584, 0.11080627143383026, 0.0691908746957779, -0.1957802176475525, -0.32467615604400635, 0.2493947297334671, -0.12833982706069946, 0.5671560168266296, 0.0619632788002491, -0.5934916734695435, -0.23438650369644165, 0.2250176966190338, -0.193359375, 0.19456471502780914, 0.13211597502231598, -0.49210575222969055, 0.37709102034568787, 0.8621909618377686, 0.30101102590560913, 0.3466808795928955, 0.07801937311887741, 0.2422747164964676, -0.7858090400695801, 0.202041894197464, 0.26950496435165405, 0.7376106977462769, 0.24742186069488525, -0.5946668386459351, 0.47151121497154236, 0.3245505392551422, -0.6310585141181946, -0.7786803245544434, 0.15148460865020752, -1.4097765684127808, 0.005942914169281721, 1.1713893413543701, -0.17900685966014862, -0.3087675869464874, 0.25286227464675903, -0.6098095178604126, 0.5359691381454468, -0.6103901267051697, 0.9910163879394531, 0.867925763130188, -0.1935933530330658, -0.015099693089723587, -0.03926816210150719, 0.4548603296279907, 0.532893180847168, -0.5419410467147827, -0.1496037393808365, 0.49866196513175964, 0.31456297636032104, 0.41590026021003723, 0.30951952934265137, 0.0016899195034056902, -0.09311260282993317, -0.19806241989135742, 0.6153982877731323, 0.08431761711835861, -0.02300814911723137, -0.5423139929771423, 0.1301603615283966, -0.287432998418808, -0.31882548332214355 ]
Salesforce/blip2-opt-2.7b
Salesforce
"2023-09-11T13:01:16Z"
363,142
175
transformers
[ "transformers", "pytorch", "blip-2", "visual-question-answering", "vision", "image-to-text", "image-captioning", "en", "arxiv:2301.12597", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
image-to-text
"2023-02-06T16:21:49Z"
--- language: en license: mit tags: - vision - image-to-text - image-captioning - visual-question-answering pipeline_tag: image-to-text --- # BLIP-2, OPT-2.7b, pre-trained only BLIP-2 model, leveraging [OPT-2.7b](https://huggingface.co/facebook/opt-2.7b) (a large language model with 2.7 billion parameters). It was introduced in the paper [BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models](https://arxiv.org/abs/2301.12597) by Li et al. and first released in [this repository](https://github.com/salesforce/LAVIS/tree/main/projects/blip2). Disclaimer: The team releasing BLIP-2 did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description BLIP-2 consists of 3 models: a CLIP-like image encoder, a Querying Transformer (Q-Former) and a large language model. The authors initialize the weights of the image encoder and large language model from pre-trained checkpoints and keep them frozen while training the Querying Transformer, which is a BERT-like Transformer encoder that maps a set of "query tokens" to query embeddings, which bridge the gap between the embedding space of the image encoder and the large language model. The goal for the model is simply to predict the next text token, giving the query embeddings and the previous text. <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/blip2_architecture.jpg" alt="drawing" width="600"/> This allows the model to be used for tasks like: - image captioning - visual question answering (VQA) - chat-like conversations by feeding the image and the previous conversation as prompt to the model ## Direct Use and Downstream Use You can use the raw model for conditional text generation given an image and optional text. See the [model hub](https://huggingface.co/models?search=Salesforce/blip) to look for fine-tuned versions on a task that interests you. ## Bias, Risks, Limitations, and Ethical Considerations BLIP2-OPT uses off-the-shelf OPT as the language model. It inherits the same risks and limitations as mentioned in Meta's model card. > Like other large language models for which the diversity (or lack thereof) of training > data induces downstream impact on the quality of our model, OPT-175B has limitations in terms > of bias and safety. OPT-175B can also have quality issues in terms of generation diversity and > hallucination. In general, OPT-175B is not immune from the plethora of issues that plague modern > large language models. > BLIP2 is fine-tuned on image-text datasets (e.g. [LAION](https://laion.ai/blog/laion-400-open-dataset/) ) collected from the internet. As a result the model itself is potentially vulnerable to generating equivalently inappropriate content or replicating inherent biases in the underlying data. BLIP2 has not been tested in real world applications. It should not be directly deployed in any applications. Researchers should first carefully assess the safety and fairness of the model in relation to the specific context they’re being deployed within. ### How to use For code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/blip-2#transformers.Blip2ForConditionalGeneration.forward.example). #### Running the model on CPU <details> <summary> Click to expand </summary> ```python import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True).strip()) ``` </details> #### Running the model on GPU ##### In full precision <details> <summary> Click to expand </summary> ```python # pip install accelerate import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", device_map="auto") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt").to("cuda") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True).strip()) ``` </details> ##### In half precision (`float16`) <details> <summary> Click to expand </summary> ```python # pip install accelerate import torch import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16, device_map="auto") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16) out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True).strip()) ``` </details> ##### In 8-bit precision (`int8`) <details> <summary> Click to expand </summary> ```python # pip install accelerate bitsandbytes import torch import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", load_in_8bit=True, device_map="auto") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16) out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True).strip()) ``` </details>
[ -0.4294898808002472, -0.7617676258087158, -0.0490088053047657, 0.40749603509902954, -0.28386348485946655, -0.145472913980484, -0.32698455452919006, -0.8042198419570923, -0.13474951684474945, 0.3554031252861023, -0.4872654676437378, -0.09050587564706802, -0.5849331617355347, -0.058821920305490494, -0.06091691553592682, 0.6999608874320984, 0.12005112320184708, 0.019284378737211227, -0.09289324283599854, 0.049552325159311295, -0.28139612078666687, -0.08900560438632965, -0.6942119002342224, -0.18248756229877472, -0.013227728195488453, 0.3384445607662201, 0.8030639290809631, 0.41727951169013977, 0.760772705078125, 0.3645634651184082, -0.21822866797447205, 0.12114720046520233, -0.5223208069801331, -0.2849811017513275, -0.09863846004009247, -0.7406987547874451, -0.18207556009292603, -0.004914320074021816, 0.5763911604881287, 0.49514418840408325, 0.1526898592710495, 0.3516470491886139, -0.050054069608449936, 0.5454541444778442, -0.48516955971717834, 0.2606372833251953, -0.7460000514984131, 0.016917357221245766, -0.03972151502966881, 0.026461949571967125, -0.44905149936676025, -0.13334813714027405, 0.054209694266319275, -0.7117977142333984, 0.4545098543167114, 0.08921094983816147, 1.5660077333450317, 0.36236098408699036, -0.013226796872913837, -0.2800280749797821, -0.442158043384552, 0.915337324142456, -0.6461363434791565, 0.4916444718837738, 0.23866000771522522, 0.26396360993385315, -0.03789874538779259, -0.8592841625213623, -0.6944264769554138, -0.11993061006069183, -0.13583800196647644, 0.33568575978279114, -0.28520578145980835, -0.08546721190214157, 0.49144458770751953, 0.26451626420021057, -0.6471508145332336, 0.0563289038836956, -0.8737995624542236, -0.23532746732234955, 0.7116905450820923, -0.06875263154506683, 0.27792593836784363, -0.359210729598999, -0.5370099544525146, -0.3842673897743225, -0.5532779693603516, 0.33359235525131226, 0.16250944137573242, 0.08032773435115814, -0.4140404462814331, 0.8443681001663208, -0.04266708716750145, 0.6557928919792175, 0.3593250811100006, -0.24015995860099792, 0.5845864415168762, -0.3195180892944336, -0.2673605978488922, -0.19776573777198792, 0.9863489270210266, 0.6191967129707336, 0.19994468986988068, 0.008741052821278572, -0.1345072090625763, 0.030512956902384758, 0.050469666719436646, -1.0986332893371582, -0.22071407735347748, 0.3909107744693756, -0.5252764821052551, -0.1466965526342392, -0.09983763843774796, -0.9259080290794373, -0.06624089181423187, 0.09032364189624786, 0.47896626591682434, -0.6070584058761597, -0.3149113953113556, 0.10718366503715515, -0.44563350081443787, 0.4608360528945923, 0.21362854540348053, -0.9675282835960388, -0.03185608610510826, 0.50274258852005, 0.883955717086792, 0.15170176327228546, -0.46935293078422546, -0.14643646776676178, 0.08765662461519241, -0.32686448097229004, 0.5613402724266052, -0.15454703569412231, -0.22143657505512238, -0.04182965308427811, 0.21729744970798492, 0.006586210802197456, -0.6130078434944153, 0.13530857861042023, -0.43155986070632935, 0.2518536150455475, -0.1522810161113739, -0.45160889625549316, -0.32565122842788696, 0.1565389633178711, -0.4384004473686218, 1.1754652261734009, 0.2905188202857971, -0.8263206481933594, 0.4651016294956207, -0.4846205413341522, -0.3116125762462616, 0.25007617473602295, -0.1269943118095398, -0.7061195373535156, -0.038487259298563004, 0.20978054404258728, 0.33133089542388916, -0.3268177807331085, 0.053384844213724136, -0.34916457533836365, -0.3722204267978668, 0.0828074961900711, -0.16953253746032715, 1.1297098398208618, 0.03109212964773178, -0.642918586730957, -0.07456541806459427, -0.5026609301567078, -0.08046671003103256, 0.3997095227241516, -0.25787726044654846, 0.08490341901779175, -0.19438210129737854, 0.1823863536119461, 0.3039828836917877, 0.5925291180610657, -0.6923912167549133, -0.010862665250897408, -0.5679100155830383, 0.4871291220188141, 0.5179516673088074, -0.23656266927719116, 0.38085728883743286, -0.13885506987571716, 0.31846287846565247, 0.19641625881195068, 0.3624652326107025, -0.26560524106025696, -0.8299908638000488, -0.9309858083724976, -0.2471051663160324, -0.006414026487618685, 0.705011248588562, -0.8332666754722595, 0.48316702246665955, -0.19371649622917175, -0.7132561206817627, -0.5990589261054993, 0.12831585109233856, 0.5551536679267883, 0.6571193933486938, 0.5139772295951843, -0.2405734360218048, -0.5042847990989685, -0.9906589984893799, 0.2594687342643738, -0.2805618941783905, 0.03610248491168022, 0.48434337973594666, 0.7283192873001099, -0.32670897245407104, 0.8226749897003174, -0.5499905347824097, -0.21312639117240906, -0.2987121045589447, 0.02050546556711197, 0.3246104121208191, 0.7012975811958313, 0.8019254803657532, -0.8115184903144836, -0.34986698627471924, 0.002587459282949567, -0.8802924752235413, 0.189862459897995, -0.17877411842346191, -0.2474043369293213, 0.5258512496948242, 0.4592936336994171, -0.9003178477287292, 0.5359286069869995, 0.5168384909629822, -0.2830125391483307, 0.5969811677932739, -0.12630775570869446, -0.12829311192035675, -1.0019723176956177, 0.36330515146255493, 0.1468198150396347, -0.09980812668800354, -0.37524235248565674, 0.08454521000385284, 0.26271945238113403, -0.2205822914838791, -0.6897160410881042, 0.8160132765769958, -0.43787121772766113, -0.2609775960445404, 0.08897430449724197, -0.19216550886631012, 0.11003927886486053, 0.5999768376350403, 0.2744942009449005, 0.8041629195213318, 0.9453282952308655, -0.5798974633216858, 0.4520932734012604, 0.5844782590866089, -0.3334067165851593, 0.30859485268592834, -0.8723074197769165, 0.06721025705337524, -0.12839312851428986, 0.011079023592174053, -1.119886875152588, -0.1512073427438736, 0.2730299234390259, -0.738060712814331, 0.40912628173828125, -0.22890910506248474, -0.464591383934021, -0.7709255218505859, -0.2966832220554352, 0.3466804027557373, 0.6990694999694824, -0.6484334468841553, 0.4196211099624634, 0.34017500281333923, 0.062462568283081055, -0.7258158922195435, -1.115950345993042, 0.010589140467345715, 0.09845457971096039, -0.8950424790382385, 0.5153122544288635, -0.01101689413189888, 0.13955417275428772, 0.17494677007198334, 0.2908467948436737, 0.0009639948257245123, -0.1574099361896515, 0.27669671177864075, 0.4160956144332886, -0.2872181832790375, -0.18793462216854095, -0.13930292427539825, -0.010946428403258324, -0.0017999557312577963, -0.12792351841926575, 0.827110767364502, -0.262768030166626, -0.026004280894994736, -0.6764633655548096, 0.12078450620174408, 0.479427307844162, -0.3129745125770569, 0.6263566017150879, 0.7769311666488647, -0.4267902374267578, -0.09250148385763168, -0.5367174744606018, -0.17743270099163055, -0.5861176252365112, 0.6593106985092163, -0.2666453719139099, -0.4450896382331848, 0.6266233325004578, 0.24252542853355408, 0.12579098343849182, 0.4094558358192444, 0.8235339522361755, -0.08513859659433365, 0.9345909357070923, 0.582147479057312, 0.21801263093948364, 0.6506170630455017, -0.8942776918411255, 0.04834197461605072, -0.820817232131958, -0.5183594822883606, -0.10631494969129562, -0.22137874364852905, -0.459507554769516, -0.48772451281547546, 0.23795762658119202, 0.31466272473335266, -0.38757601380348206, 0.3373073935508728, -0.5878270864486694, 0.2202846258878708, 0.748615562915802, 0.29578736424446106, -0.3498874008655548, 0.13434039056301117, -0.08963865041732788, 0.03709065914154053, -0.6375675797462463, -0.2548953890800476, 1.0049344301223755, 0.5023311972618103, 0.6967379450798035, -0.17238858342170715, 0.41921424865722656, -0.3257763087749481, 0.21204301714897156, -0.8004351854324341, 0.6373772621154785, -0.3247992694377899, -0.839801549911499, -0.21792349219322205, -0.3125167489051819, -0.9085009694099426, 0.12647326290607452, -0.22649331390857697, -0.7061190605163574, 0.17222648859024048, 0.3338480293750763, -0.18567104637622833, 0.3239515423774719, -0.9203625917434692, 0.9906740784645081, -0.4735330045223236, -0.6269023418426514, 0.05790143832564354, -0.6464053392410278, 0.36853107810020447, 0.16373425722122192, -0.1859239637851715, 0.117256298661232, 0.06501703709363937, 0.7826898694038391, -0.4752297103404999, 0.8030200004577637, -0.34972909092903137, 0.34195858240127563, 0.4928168058395386, -0.1786428987979889, 0.2012687772512436, -0.028425725176930428, -0.06677749752998352, 0.37483319640159607, -0.11279591172933578, -0.5616093277931213, -0.43305692076683044, 0.21859461069107056, -0.9074031114578247, -0.44324785470962524, -0.2726622521877289, -0.4638323485851288, 0.011101407930254936, 0.44046884775161743, 0.719857394695282, 0.31959834694862366, 0.23873285949230194, 0.16575026512145996, 0.32879456877708435, -0.5931128859519958, 0.6833605766296387, 0.08055762201547623, -0.27818235754966736, -0.49661386013031006, 0.8562702536582947, -0.010221371427178383, 0.29789090156555176, 0.17367924749851227, 0.15121877193450928, -0.6077606678009033, -0.40198013186454773, -0.7685227990150452, 0.5868054628372192, -0.6312413215637207, -0.48387235403060913, -0.4159262180328369, -0.2921336591243744, -0.6153777241706848, -0.22748172283172607, -0.5855649709701538, -0.18904082477092743, -0.5343831181526184, 0.20988275110721588, 0.5019136071205139, 0.39793747663497925, -0.09494497627019882, 0.42176124453544617, -0.5455719232559204, 0.5002028346061707, 0.3516128957271576, 0.4231771230697632, -0.056863490492105484, -0.6144989132881165, -0.07413186132907867, 0.29494985938072205, -0.39555105566978455, -0.7165862917900085, 0.49283602833747864, 0.21682582795619965, 0.43113163113594055, 0.40939292311668396, -0.3997388780117035, 0.9068117141723633, -0.39630261063575745, 0.8559902906417847, 0.5328710079193115, -0.9481662511825562, 0.7170534729957581, -0.07599394023418427, 0.10004530102014542, 0.3769446611404419, 0.35179761052131653, -0.30952736735343933, -0.3099673390388489, -0.67196124792099, -0.8682202100753784, 0.9004418849945068, 0.17492333054542542, 0.1692890077829361, 0.13279715180397034, 0.3969986140727997, -0.18271170556545258, 0.0978483185172081, -0.7067368030548096, -0.3049137592315674, -0.5472757816314697, -0.14217782020568848, -0.08534595370292664, -0.16632038354873657, 0.18671727180480957, -0.494943231344223, 0.5489519834518433, -0.033589739352464676, 0.6040148735046387, 0.3330702781677246, -0.31884172558784485, -0.20424816012382507, -0.48383328318595886, 0.5184404850006104, 0.5262807011604309, -0.32796069979667664, -0.05524624511599541, 0.00759925926104188, -0.7202143669128418, -0.24144022166728973, 0.12301665544509888, -0.40472930669784546, -0.00852681789547205, 0.34903794527053833, 1.1125494241714478, -0.08869868516921997, -0.6040292978286743, 0.6723451018333435, 0.055781323462724686, -0.24275507032871246, -0.3314187526702881, 0.009952299296855927, 0.10309067368507385, 0.2697887718677521, 0.4473506212234497, 0.1448342651128769, -0.1667681485414505, -0.5035220384597778, 0.347039133310318, 0.5693457126617432, -0.14816445112228394, -0.33139342069625854, 0.855364203453064, 0.0629495158791542, -0.24357818067073822, 0.8018988370895386, -0.48089101910591125, -0.7066755294799805, 0.9865929484367371, 0.7989485859870911, 0.46797633171081543, -0.03698030486702919, 0.24813883006572723, 0.7286895513534546, 0.45972806215286255, -0.09037360548973083, 0.46160900592803955, 0.2981175184249878, -0.8916545510292053, -0.2957141697406769, -0.671913743019104, -0.3500736355781555, 0.23220837116241455, -0.530000627040863, 0.5841253399848938, -0.6311783790588379, -0.2301032990217209, 0.22834573686122894, 0.1976877599954605, -0.8575127720832825, 0.3523445427417755, 0.35158807039260864, 0.8920672535896301, -0.843021035194397, 0.46591371297836304, 0.8335585594177246, -0.7493212223052979, -0.912682294845581, -0.3047042787075043, -0.34957802295684814, -1.1622141599655151, 0.8171305060386658, 0.45803844928741455, 0.13306690752506256, 0.05330995097756386, -0.7974401116371155, -0.826346755027771, 1.0365514755249023, 0.4653170704841614, -0.3665192127227783, 0.05205667018890381, 0.20081037282943726, 0.548461377620697, -0.09465836733579636, 0.471650093793869, 0.2236400693655014, 0.48605650663375854, 0.3728029727935791, -0.9118080139160156, 0.13574138283729553, -0.3494446277618408, -0.006197947543114424, -0.03018137440085411, -0.9661306738853455, 1.0269672870635986, -0.4878731071949005, -0.16462312638759613, 0.022319968789815903, 0.7098013162612915, 0.4280230700969696, 0.12910746037960052, 0.4273831248283386, 0.7278819680213928, 0.6233627796173096, -0.049331944435834885, 1.0194529294967651, -0.353297621011734, 0.6971686482429504, 0.5742772817611694, 0.0554601326584816, 0.7985953092575073, 0.3957338035106659, -0.16576597094535828, 0.20131835341453552, 0.7031388282775879, -0.6521994471549988, 0.4135141670703888, -0.016793085262179375, 0.27739185094833374, -0.015017883852124214, 0.09534020721912384, -0.41427019238471985, 0.6783469915390015, 0.47516417503356934, -0.3518940508365631, -0.02994948998093605, -0.014364851638674736, 0.038635723292827606, -0.4517442286014557, -0.2994411289691925, 0.3702543377876282, -0.16005681455135345, -0.8040483593940735, 0.9709693193435669, -0.033232081681489944, 1.0342086553573608, -0.252979576587677, 0.04938250035047531, -0.23391038179397583, 0.23636575043201447, -0.33612462878227234, -1.1058695316314697, 0.3261014223098755, -0.09426382929086685, -0.004112357273697853, 0.020555753260850906, 0.5168017148971558, -0.43912428617477417, -0.9662008285522461, 0.3155854642391205, 0.12003408372402191, 0.3241409957408905, 0.13515903055667877, -1.0972399711608887, 0.14305339753627777, 0.08349459618330002, -0.3711794912815094, -0.10321829468011856, 0.2883802354335785, 0.1263597011566162, 0.7039108872413635, 0.6857358813285828, 0.21786384284496307, 0.49154171347618103, -0.15377169847488403, 0.8471781015396118, -0.5897773504257202, -0.3610718548297882, -0.6494916081428528, 0.6088829040527344, -0.16054880619049072, -0.6364232897758484, 0.5316435098648071, 0.9279777407646179, 0.9594539999961853, -0.1603652387857437, 0.6169840693473816, -0.35839974880218506, 0.14448605477809906, -0.47772499918937683, 0.7281213998794556, -0.8116049766540527, -0.18978925049304962, -0.22058503329753876, -0.7062920331954956, -0.38626551628112793, 0.9261000156402588, -0.2396358847618103, 0.13131052255630493, 0.540246844291687, 1.2214531898498535, -0.2368195503950119, -0.33369606733322144, 0.07214606553316116, 0.29057812690734863, 0.3483498692512512, 0.7176246643066406, 0.6641607284545898, -0.6970213055610657, 0.627038300037384, -0.7103627324104309, -0.2264913022518158, -0.2208472490310669, -0.5703461766242981, -0.9270597696304321, -0.6008512377738953, -0.43802618980407715, -0.5206369757652283, -0.15689708292484283, 0.4734828770160675, 0.9495381116867065, -0.6563999056816101, -0.17808294296264648, -0.166279599070549, -0.004023623187094927, -0.02310999669134617, -0.22910401225090027, 0.48195406794548035, -0.365784615278244, -0.9111035466194153, -0.13988299667835236, 0.201515793800354, 0.24106650054454803, -0.15718498826026917, -0.021180281415581703, -0.18118344247341156, -0.25420647859573364, 0.4658460021018982, 0.42109623551368713, -0.6042255759239197, -0.1965106725692749, 0.10675294697284698, -0.16140559315681458, 0.2670094072818756, 0.2548395097255707, -0.549632728099823, 0.3817153871059418, 0.5290488600730896, 0.3888006806373596, 0.8358803987503052, -0.04701754450798035, 0.05839964747428894, -0.6087694764137268, 0.7697492241859436, 0.20715998113155365, 0.47667571902275085, 0.4998879134654999, -0.3998182713985443, 0.3858928084373474, 0.3012468218803406, -0.3389759659767151, -0.9267469644546509, 0.10536585003137589, -1.2817578315734863, -0.28476056456565857, 1.433485984802246, -0.16753503680229187, -0.5926910042762756, 0.1679672747850418, -0.23182575404644012, 0.37567993998527527, -0.2384994775056839, 0.5940479636192322, 0.18430723249912262, -0.10109513998031616, -0.4145038425922394, -0.3319956064224243, 0.4274994730949402, 0.3775515556335449, -0.6738349199295044, -0.23538914322853088, 0.2964812219142914, 0.45522648096084595, 0.46917811036109924, 0.45852935314178467, -0.14391759037971497, 0.4100574254989624, 0.2422347217798233, 0.37701216340065, -0.15097099542617798, -0.07448521256446838, -0.16795778274536133, -0.07173295319080353, -0.17372213304042816, -0.43835029006004333 ]
google/vit-base-patch16-384
google
"2023-09-11T20:46:00Z"
357,349
18
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "vit", "image-classification", "vision", "dataset:imagenet", "dataset:imagenet-21k", "arxiv:2010.11929", "arxiv:2006.03677", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
image-classification
"2022-03-02T23:29:05Z"
--- license: apache-2.0 tags: - vision - image-classification datasets: - imagenet - imagenet-21k --- # Vision Transformer (base-sized model) Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224, and fine-tuned on ImageNet 2012 (1 million images, 1,000 classes) at resolution 384x384. It was introduced in the paper [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929) by Dosovitskiy et al. and first released in [this repository](https://github.com/google-research/vision_transformer). However, the weights were converted from the [timm repository](https://github.com/rwightman/pytorch-image-models) by Ross Wightman, who already converted the weights from JAX to PyTorch. Credits go to him. Disclaimer: The team releasing ViT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. Next, the model was fine-tuned on ImageNet (also referred to as ILSVRC2012), a dataset comprising 1 million images and 1,000 classes, at a higher resolution of 384x384. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image. ## Intended uses & limitations You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=google/vit) to look for fine-tuned versions on a task that interests you. ### How to use Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes: ```python from transformers import ViTFeatureExtractor, ViTForImageClassification from PIL import Image import requests url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) feature_extractor = ViTFeatureExtractor.from_pretrained('google/vit-base-patch16-384') model = ViTForImageClassification.from_pretrained('google/vit-base-patch16-384') inputs = feature_extractor(images=image, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits # model predicts one of the 1000 ImageNet classes predicted_class_idx = logits.argmax(-1).item() print("Predicted class:", model.config.id2label[predicted_class_idx]) ``` Currently, both the feature extractor and model support PyTorch. Tensorflow and JAX/FLAX are coming soon, and the API of ViTFeatureExtractor might change. ## Training data The ViT model was pretrained on [ImageNet-21k](http://www.image-net.org/), a dataset consisting of 14 million images and 21k classes, and fine-tuned on [ImageNet](http://www.image-net.org/challenges/LSVRC/2012/), a dataset consisting of 1 million images and 1k classes. ## Training procedure ### Preprocessing The exact details of preprocessing of images during training/validation can be found [here](https://github.com/google-research/vision_transformer/blob/master/vit_jax/input_pipeline.py). Images are resized/rescaled to the same resolution (224x224 during pre-training, 384x384 during fine-tuning) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5). ### Pretraining The model was trained on TPUv3 hardware (8 cores). All model variants are trained with a batch size of 4096 and learning rate warmup of 10k steps. For ImageNet, the authors found it beneficial to additionally apply gradient clipping at global norm 1. Pre-training resolution is 224. ## Evaluation results For evaluation results on several image classification benchmarks, we refer to tables 2 and 5 of the original paper. Note that for fine-tuning, the best results are obtained with a higher resolution (384x384). Of course, increasing the model size will result in better performance. ### BibTeX entry and citation info ```bibtex @misc{wu2020visual, title={Visual Transformers: Token-based Image Representation and Processing for Computer Vision}, author={Bichen Wu and Chenfeng Xu and Xiaoliang Dai and Alvin Wan and Peizhao Zhang and Zhicheng Yan and Masayoshi Tomizuka and Joseph Gonzalez and Kurt Keutzer and Peter Vajda}, year={2020}, eprint={2006.03677}, archivePrefix={arXiv}, primaryClass={cs.CV} } ``` ```bibtex @inproceedings{deng2009imagenet, title={Imagenet: A large-scale hierarchical image database}, author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li}, booktitle={2009 IEEE conference on computer vision and pattern recognition}, pages={248--255}, year={2009}, organization={Ieee} } ```
[ -0.6104393601417542, -0.19394297897815704, -0.00986180454492569, -0.0910366028547287, -0.37459686398506165, -0.15562549233436584, -0.07048505544662476, -0.6004185080528259, 0.13567589223384857, 0.4448450803756714, -0.2714408040046692, -0.2468043863773346, -0.7240034937858582, -0.07410894334316254, -0.5360256433486938, 0.8273735642433167, -0.0736624151468277, 0.037105463445186615, -0.25326061248779297, -0.16963256895542145, -0.35944366455078125, -0.4263855814933777, -0.5843433141708374, -0.23381632566452026, 0.5001327395439148, 0.23320060968399048, 0.6096208691596985, 0.749487578868866, 0.8390552997589111, 0.42698121070861816, 0.0039435182698071, 0.014298423193395138, -0.36667051911354065, -0.3473529517650604, -0.011315355077385902, -0.5285976529121399, -0.2994672954082489, 0.18481992185115814, 0.5600729584693909, 0.3373572826385498, 0.237803652882576, 0.35966789722442627, 0.12541994452476501, 0.4050080180168152, -0.6258295178413391, 0.2474946230649948, -0.5047078728675842, 0.3985980451107025, -0.08982325345277786, -0.17790359258651733, -0.4746309518814087, -0.12470905482769012, 0.2890704572200775, -0.4893348217010498, 0.5600111484527588, -0.03456627577543259, 1.354099154472351, 0.21384523808956146, -0.30117693543434143, 0.20204654335975647, -0.7275563478469849, 0.7146392464637756, -0.2577277719974518, 0.4387701451778412, 0.0630822703242302, 0.5468209385871887, 0.20207537710666656, -1.1552232503890991, -0.5018398761749268, -0.03375035151839256, -0.05365579202771187, 0.17559602856636047, -0.24249373376369476, 0.17439892888069153, 0.5330625176429749, 0.5965124368667603, -0.39785560965538025, 0.07845062017440796, -0.6225290298461914, -0.29253509640693665, 0.5177895426750183, -0.028673876076936722, 0.09494630247354507, 0.02584771253168583, -0.6289049386978149, -0.5015314817428589, -0.38400188088417053, 0.16182030737400055, 0.05700923129916191, 0.020335931330919266, -0.08129328489303589, 0.4786325693130493, 0.1208236813545227, 0.574769139289856, 0.2335783690214157, -0.1285753846168518, 0.45657604932785034, -0.22533364593982697, -0.3659639060497284, -0.07431013882160187, 0.8181260228157043, 0.3849899470806122, 0.30695754289627075, -0.010382823646068573, -0.2918906509876251, 0.15314261615276337, 0.5532841682434082, -0.9703072905540466, -0.16145539283752441, -0.12277622520923615, -0.6418335437774658, -0.4078879654407501, 0.3193466067314148, -0.6088387966156006, -0.16708603501319885, -0.399035781621933, 0.7458848357200623, -0.1918460875749588, -0.20955906808376312, -0.13287802040576935, -0.04644046723842621, 0.632305920124054, 0.4356551766395569, -0.5678914785385132, 0.2548331022262573, 0.25553667545318604, 0.9534860849380493, -0.11605338752269745, -0.25147828459739685, -0.04826463386416435, -0.3505547046661377, -0.40465182065963745, 0.6014745235443115, -0.07005061954259872, -0.18013358116149902, -0.015243805944919586, 0.3872745633125305, -0.03546632453799248, -0.4781424105167389, 0.36010950803756714, -0.5690343976020813, 0.053846415132284164, -0.07027579843997955, -0.21821458637714386, -0.2451968491077423, 0.16560694575309753, -0.6503848433494568, 0.9846553206443787, 0.21536116302013397, -0.7706251740455627, 0.4520750343799591, -0.47446903586387634, -0.11302530765533447, 0.13012948632240295, -0.038296595215797424, -0.6584636569023132, 0.03336839750409126, 0.252400666475296, 0.515343189239502, -0.2264069765806198, -0.00010163862316403538, -0.17007818818092346, -0.5525063276290894, 0.2037123739719391, -0.4521414339542389, 0.7561426758766174, 0.24897778034210205, -0.391593337059021, 0.1741601526737213, -0.5888402462005615, -0.010715080425143242, 0.2583554685115814, -0.18743765354156494, 0.11942858248949051, -0.36608755588531494, 0.18570595979690552, 0.34558069705963135, 0.22466862201690674, -0.6580855846405029, 0.18757840991020203, -0.1370898187160492, 0.44634944200515747, 0.7604072093963623, -0.23008471727371216, 0.5009470582008362, -0.2057029753923416, 0.43570220470428467, 0.18756099045276642, 0.5391244888305664, -0.34373295307159424, -0.5669981837272644, -1.074280023574829, -0.1861053705215454, 0.37056252360343933, 0.38760119676589966, -0.7314350605010986, 0.4781920313835144, -0.5115382671356201, -0.6118549704551697, -0.36453360319137573, -0.16169032454490662, 0.26913338899612427, 0.4377741515636444, 0.5138209462165833, -0.5150019526481628, -0.6485843062400818, -0.905541718006134, 0.15975072979927063, 0.044581640511751175, -0.02918650582432747, 0.17105475068092346, 0.7528408169746399, -0.28445422649383545, 0.9134382009506226, -0.34604012966156006, -0.33148160576820374, -0.07725556194782257, -0.0142348138615489, 0.2893790006637573, 0.5852497816085815, 0.5235926508903503, -0.8354862332344055, -0.3737397789955139, 0.055572692304849625, -0.7407310009002686, 0.3245549499988556, -0.02836136892437935, -0.2400633543729782, 0.02864692732691765, 0.4554348886013031, -0.48916855454444885, 0.8771049380302429, 0.3107333481311798, -0.07384317368268967, 0.41897597908973694, -0.04445561021566391, 0.05196790024638176, -1.064034342765808, 0.01140618696808815, 0.19842945039272308, -0.34357133507728577, -0.44805365800857544, 0.16287025809288025, 0.18188023567199707, -0.18689773976802826, -0.5674440264701843, 0.25605642795562744, -0.4033070504665375, -0.19536595046520233, -0.20570386946201324, -0.41321176290512085, 0.029444880783557892, 0.5701158046722412, 0.09160870313644409, 0.5979944467544556, 0.662765622138977, -0.5629501938819885, 0.5983661413192749, 0.24511933326721191, -0.4784885048866272, 0.3774299621582031, -0.7623918056488037, 0.21866175532341003, -0.06506945192813873, 0.2995981276035309, -0.7673659324645996, -0.1907297521829605, 0.12786424160003662, -0.44399815797805786, 0.5311580896377563, -0.3005475103855133, -0.3420313596725464, -0.7814717888832092, -0.1966453194618225, 0.5113275051116943, 0.7112533450126648, -0.7682978510856628, 0.6453285813331604, 0.17999859154224396, 0.5335204005241394, -0.726044237613678, -1.0093252658843994, 0.01373324915766716, -0.13573260605335236, -0.5155164003372192, 0.5288227200508118, 0.16805709898471832, 0.25120893120765686, 0.1586981862783432, -0.03395940735936165, -0.011843419633805752, -0.226658433675766, 0.5242838263511658, 0.376730352640152, -0.35927078127861023, 0.022513538599014282, -0.46503061056137085, -0.16738775372505188, -0.02998114377260208, -0.5434205532073975, 0.49015653133392334, -0.4570603668689728, -0.32599806785583496, -0.5529833436012268, -0.07715663313865662, 0.6811482310295105, -0.281633198261261, 0.6504096388816833, 0.9810514450073242, -0.4916694462299347, 0.014219202101230621, -0.475925087928772, -0.1612847000360489, -0.4913061857223511, 0.4081253409385681, -0.3185482919216156, -0.5679903626441956, 0.6085214614868164, 0.06551578640937805, -0.05462023615837097, 0.6246018409729004, 0.34220296144485474, -0.12775102257728577, 0.8228127956390381, 0.590198278427124, 0.05175332725048065, 0.7527596950531006, -0.8787230849266052, 0.1373801976442337, -0.7452071309089661, -0.33841273188591003, -0.251614511013031, -0.5259628891944885, -0.6234908699989319, -0.49060115218162537, 0.3136078715324402, 0.04935119301080704, -0.38969385623931885, 0.5677484273910522, -0.7438979744911194, 0.3717401325702667, 0.7824804782867432, 0.5637720227241516, -0.16130366921424866, 0.2535679340362549, -0.043985217809677124, 0.06905560195446014, -0.5770092010498047, -0.1879432052373886, 1.0282659530639648, 0.5346741080284119, 0.634925127029419, -0.18406827747821808, 0.47539186477661133, 0.023839684203267097, 0.15685002505779266, -0.9283965826034546, 0.5795966386795044, -0.19719354808330536, -0.47019320726394653, -0.07182814180850983, -0.2473137229681015, -0.9895198941230774, 0.09916722029447556, -0.3863937258720398, -0.5918044447898865, 0.5194836854934692, 0.19452722370624542, -0.10980701446533203, 0.5979090929031372, -0.6530837416648865, 0.8656907081604004, -0.2156110554933548, -0.3230356276035309, 0.06938059628009796, -0.6907179951667786, 0.14262840151786804, 0.013071776367723942, -0.20750342309474945, 0.30360502004623413, 0.2997852861881256, 0.8159900307655334, -0.7228800058364868, 0.839637279510498, -0.23764678835868835, 0.3353215456008911, 0.509193480014801, -0.30089521408081055, 0.2428315430879593, -0.2557868957519531, 0.3224968910217285, 0.4590194821357727, -0.07095769792795181, -0.4492684602737427, -0.5615500807762146, 0.3868493139743805, -1.0028388500213623, -0.4354609251022339, -0.43325167894363403, -0.23942358791828156, 0.17545348405838013, 0.27011293172836304, 0.8116258382797241, 0.7036046385765076, 0.16384059190750122, 0.6340575814247131, 0.6179815530776978, -0.30498555302619934, 0.45296692848205566, -0.2004651576280594, -0.2045164555311203, -0.2670343518257141, 0.9115694165229797, 0.3507833480834961, 0.15143145620822906, 0.4094645082950592, 0.1984250545501709, -0.24088937044143677, -0.5048879384994507, -0.2640480697154999, -0.005179725121706724, -0.8419931530952454, -0.5203041434288025, -0.4698784053325653, -0.6978147625923157, -0.3549480140209198, -0.15223318338394165, -0.47158119082450867, -0.16695526242256165, -0.44131729006767273, -0.09217678755521774, 0.4033304750919342, 0.6666731238365173, 0.0219745934009552, 0.56203293800354, -0.5694209337234497, 0.051681481301784515, 0.5123387575149536, 0.38042038679122925, 0.05569726228713989, -0.7099584937095642, -0.4010891318321228, -0.03172919899225235, -0.36359044909477234, -0.5269143581390381, 0.38583359122276306, 0.25814348459243774, 0.49071940779685974, 0.6623703241348267, -0.24881845712661743, 0.8825497627258301, -0.3252641260623932, 0.7735629081726074, 0.47243356704711914, -0.6821942925453186, 0.5245488286018372, -0.04255734756588936, 0.24056874215602875, 0.2040991336107254, 0.3483876883983612, -0.22308920323848724, 0.08198323845863342, -0.7765697240829468, -0.7198670506477356, 0.6706552505493164, 0.10025972127914429, 0.14998170733451843, 0.2811610698699951, 0.38397303223609924, -0.13858042657375336, -0.055480316281318665, -0.8123791813850403, -0.18598346412181854, -0.7257082462310791, -0.14319242537021637, -0.12200634181499481, -0.1535337120294571, 0.09555388987064362, -0.6651802659034729, 0.36519530415534973, -0.08808643370866776, 0.839907705783844, 0.1643923670053482, -0.2937813997268677, -0.03833308443427086, -0.3234076499938965, 0.27162301540374756, 0.4115258455276489, -0.24145980179309845, 0.1795455366373062, 0.13915888965129852, -0.8811291456222534, 0.01837998256087303, -0.11527865380048752, -0.057114116847515106, -0.09740183502435684, 0.5736119151115417, 1.147342562675476, 0.04617670923471451, -0.10118424147367477, 0.8081653118133545, -0.12060170620679855, -0.41738423705101013, -0.48107224702835083, 0.10672345012426376, -0.36006802320480347, 0.2540779113769531, 0.4436725080013275, 0.535196840763092, 0.003645910881459713, -0.28438159823417664, 0.24003492295742035, 0.21500979363918304, -0.522049605846405, -0.34714382886886597, 0.6372050046920776, -0.028390582650899887, -0.05703578516840935, 0.8511462211608887, 0.008161318488419056, -0.6444709897041321, 0.8733590245246887, 0.4457092583179474, 0.800750732421875, -0.13095888495445251, 0.10434357821941376, 0.678238570690155, 0.31114834547042847, -0.20373640954494476, -0.015052626840770245, -0.02921806089580059, -0.974503755569458, -0.3046334385871887, -0.571386456489563, -0.021258851513266563, 0.23961582779884338, -0.7590171098709106, 0.4458794593811035, -0.5736004114151001, -0.37378746271133423, 0.0798683688044548, -0.017257599160075188, -1.1716220378875732, 0.384919673204422, 0.2804689109325409, 0.8421751260757446, -0.7055633068084717, 0.7939066886901855, 0.7528599500656128, -0.5942298173904419, -0.9225236773490906, -0.3266183137893677, -0.2170090228319168, -0.8451797962188721, 0.7478444576263428, 0.49034756422042847, 0.05361906439065933, 0.141093909740448, -0.8060284852981567, -0.8057141900062561, 1.2783269882202148, 0.19423912465572357, -0.33915621042251587, -0.01767774298787117, 0.14436136186122894, 0.42828768491744995, -0.3942401111125946, 0.5101949572563171, 0.09651372581720352, 0.2420910894870758, 0.38821637630462646, -0.7246545553207397, -0.10760308802127838, -0.3712274134159088, 0.304706335067749, 0.02281021885573864, -0.5432249903678894, 0.9893468618392944, -0.14883078634738922, -0.1772335022687912, -0.0043366700410842896, 0.5597227215766907, -0.23480434715747833, -0.08476649969816208, 0.7192423343658447, 0.675746500492096, 0.4171846807003021, -0.3619398772716522, 0.9803979992866516, 0.02110476605594158, 0.42787283658981323, 0.5565850138664246, 0.3115554749965668, 0.5866727232933044, 0.3157951533794403, -0.2718779146671295, 0.40527695417404175, 0.922145664691925, -0.49726763367652893, 0.4738495647907257, 0.020441874861717224, 0.06435488909482956, -0.21133920550346375, -0.025797855108976364, -0.4387967884540558, 0.6371574997901917, 0.3626922369003296, -0.6258330345153809, 0.06871050596237183, 0.36528655886650085, -0.4220440685749054, -0.45447078347206116, -0.5542961955070496, 0.5081228613853455, -0.01723635382950306, -0.40014514327049255, 0.6551521420478821, -0.212799534201622, 0.7035505175590515, -0.33734193444252014, -0.07124835252761841, -0.1359345018863678, 0.3773130178451538, -0.37478214502334595, -0.7731913328170776, 0.0799347385764122, -0.20172031223773956, -0.06898756325244904, -0.16149842739105225, 0.7985169291496277, -0.10375472903251648, -0.5453073382377625, 0.20169852674007416, 0.0304179098457098, 0.2694756090641022, -0.07388635724782944, -0.6447756886482239, -0.04833817109465599, -0.07432916015386581, -0.3145710825920105, 0.2364635318517685, 0.3047729432582855, -0.14325276017189026, 0.48990780115127563, 0.6084795594215393, -0.03992627188563347, 0.3453327417373657, -0.04093792289495468, 0.9356261491775513, -0.46517908573150635, -0.3997160494327545, -0.4706014394760132, 0.5627933144569397, -0.15935476124286652, -0.3497016131877899, 0.48829251527786255, 0.3919772207736969, 1.0753341913223267, -0.3189722001552582, 0.48730888962745667, -0.0680583193898201, -0.008704361505806446, -0.31978797912597656, 0.43191877007484436, -0.6178939938545227, -0.16709133982658386, -0.3047437071800232, -0.9801836609840393, -0.41693609952926636, 0.8466617465019226, -0.1728743314743042, 0.20440728962421417, 0.5400197505950928, 0.7254329919815063, -0.25859779119491577, -0.09773200005292892, 0.36438095569610596, 0.15081682801246643, 0.16407816112041473, 0.3996363878250122, 0.7799572348594666, -0.7895128726959229, 0.6031100749969482, -0.5178211331367493, -0.20246148109436035, -0.3097730576992035, -0.6238135695457458, -0.849718451499939, -0.7254180312156677, -0.38038170337677, -0.4975123107433319, -0.22070369124412537, 0.6910650730133057, 1.0519651174545288, -0.8050131797790527, -0.01607166789472103, -0.2132374495267868, -0.24806399643421173, -0.2807703912258148, -0.20297186076641083, 0.4469984769821167, -0.06424950808286667, -0.6887719035148621, -0.17132174968719482, -0.0010571657912805676, 0.2369903028011322, -0.2890218496322632, -0.06500943005084991, -0.04499153792858124, -0.37224820256233215, 0.5967546701431274, 0.2715452015399933, -0.5516696572303772, -0.4863247275352478, 0.05271616205573082, -0.05825340747833252, 0.3192710280418396, 0.6936664581298828, -0.8165479898452759, 0.48498526215553284, 0.5087524652481079, 0.5364135503768921, 0.8693659901618958, -0.13234709203243256, 0.18338634073734283, -0.6789042949676514, 0.41467514634132385, 0.13736209273338318, 0.5584818720817566, 0.20806795358657837, -0.3330945372581482, 0.5136266350746155, 0.3810187876224518, -0.5621262192726135, -0.6991463303565979, 0.042265407741069794, -1.1604690551757812, -0.06465517729520798, 0.8601598739624023, -0.31625625491142273, -0.4661427438259125, 0.15792623162269592, -0.14735160768032074, 0.4910627603530884, -0.03177444636821747, 0.32383349537849426, 0.3031272888183594, 0.1385638564825058, -0.5752765536308289, -0.41415873169898987, 0.2655761241912842, -0.07778260111808777, -0.44903475046157837, -0.5476904511451721, 0.08037851750850677, 0.21853046119213104, 0.4863834083080292, 0.22186577320098877, -0.3414190113544464, 0.1967475265264511, 0.19174228608608246, 0.4347088932991028, -0.12172894179821014, -0.44577261805534363, -0.24599841237068176, 0.08105605095624924, -0.19538262486457825, -0.6650572419166565 ]
BAAI/bge-small-en-v1.5
BAAI
"2023-11-02T10:47:51Z"
356,473
56
sentence-transformers
[ "sentence-transformers", "pytorch", "bert", "feature-extraction", "sentence-similarity", "transformers", "mteb", "en", "arxiv:2310.07554", "arxiv:2309.07597", "license:mit", "model-index", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2023-09-12T05:20:55Z"
--- tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers - mteb model-index: - name: bge-small-en-v1.5 results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 73.79104477611939 - type: ap value: 37.21923821573361 - type: f1 value: 68.0914945617093 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 92.75377499999999 - type: ap value: 89.46766124546022 - type: f1 value: 92.73884001331487 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 46.986 - type: f1 value: 46.55936786727896 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 35.846000000000004 - type: map_at_10 value: 51.388 - type: map_at_100 value: 52.132999999999996 - type: map_at_1000 value: 52.141000000000005 - type: map_at_3 value: 47.037 - type: map_at_5 value: 49.579 - type: mrr_at_1 value: 36.558 - type: mrr_at_10 value: 51.658 - type: mrr_at_100 value: 52.402 - type: mrr_at_1000 value: 52.410000000000004 - type: mrr_at_3 value: 47.345 - type: mrr_at_5 value: 49.797999999999995 - type: ndcg_at_1 value: 35.846000000000004 - type: ndcg_at_10 value: 59.550000000000004 - type: ndcg_at_100 value: 62.596 - type: ndcg_at_1000 value: 62.759 - type: ndcg_at_3 value: 50.666999999999994 - type: ndcg_at_5 value: 55.228 - type: precision_at_1 value: 35.846000000000004 - type: precision_at_10 value: 8.542 - type: precision_at_100 value: 0.984 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 20.389 - type: precision_at_5 value: 14.438 - type: recall_at_1 value: 35.846000000000004 - type: recall_at_10 value: 85.42 - type: recall_at_100 value: 98.43499999999999 - type: recall_at_1000 value: 99.644 - type: recall_at_3 value: 61.166 - type: recall_at_5 value: 72.191 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 47.402770198163594 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 40.01545436974177 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 62.586465273207196 - type: mrr value: 74.42169019038825 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 85.1891186537969 - type: cos_sim_spearman value: 83.75492046087288 - type: euclidean_pearson value: 84.11766204805357 - type: euclidean_spearman value: 84.01456493126516 - type: manhattan_pearson value: 84.2132950502772 - type: manhattan_spearman value: 83.89227298813377 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 85.74025974025975 - type: f1 value: 85.71493566466381 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 38.467181385006434 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 34.719496037339056 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 29.587000000000003 - type: map_at_10 value: 41.114 - type: map_at_100 value: 42.532 - type: map_at_1000 value: 42.661 - type: map_at_3 value: 37.483 - type: map_at_5 value: 39.652 - type: mrr_at_1 value: 36.338 - type: mrr_at_10 value: 46.763 - type: mrr_at_100 value: 47.393 - type: mrr_at_1000 value: 47.445 - type: mrr_at_3 value: 43.538 - type: mrr_at_5 value: 45.556000000000004 - type: ndcg_at_1 value: 36.338 - type: ndcg_at_10 value: 47.658 - type: ndcg_at_100 value: 52.824000000000005 - type: ndcg_at_1000 value: 54.913999999999994 - type: ndcg_at_3 value: 41.989 - type: ndcg_at_5 value: 44.944 - type: precision_at_1 value: 36.338 - type: precision_at_10 value: 9.156 - type: precision_at_100 value: 1.4789999999999999 - type: precision_at_1000 value: 0.196 - type: precision_at_3 value: 20.076 - type: precision_at_5 value: 14.85 - type: recall_at_1 value: 29.587000000000003 - type: recall_at_10 value: 60.746 - type: recall_at_100 value: 82.157 - type: recall_at_1000 value: 95.645 - type: recall_at_3 value: 44.821 - type: recall_at_5 value: 52.819 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 30.239 - type: map_at_10 value: 39.989000000000004 - type: map_at_100 value: 41.196 - type: map_at_1000 value: 41.325 - type: map_at_3 value: 37.261 - type: map_at_5 value: 38.833 - type: mrr_at_1 value: 37.516 - type: mrr_at_10 value: 46.177 - type: mrr_at_100 value: 46.806 - type: mrr_at_1000 value: 46.849000000000004 - type: mrr_at_3 value: 44.002 - type: mrr_at_5 value: 45.34 - type: ndcg_at_1 value: 37.516 - type: ndcg_at_10 value: 45.586 - type: ndcg_at_100 value: 49.897000000000006 - type: ndcg_at_1000 value: 51.955 - type: ndcg_at_3 value: 41.684 - type: ndcg_at_5 value: 43.617 - type: precision_at_1 value: 37.516 - type: precision_at_10 value: 8.522 - type: precision_at_100 value: 1.374 - type: precision_at_1000 value: 0.184 - type: precision_at_3 value: 20.105999999999998 - type: precision_at_5 value: 14.152999999999999 - type: recall_at_1 value: 30.239 - type: recall_at_10 value: 55.03 - type: recall_at_100 value: 73.375 - type: recall_at_1000 value: 86.29599999999999 - type: recall_at_3 value: 43.269000000000005 - type: recall_at_5 value: 48.878 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 38.338 - type: map_at_10 value: 50.468999999999994 - type: map_at_100 value: 51.553000000000004 - type: map_at_1000 value: 51.608 - type: map_at_3 value: 47.107 - type: map_at_5 value: 49.101 - type: mrr_at_1 value: 44.201 - type: mrr_at_10 value: 54.057 - type: mrr_at_100 value: 54.764 - type: mrr_at_1000 value: 54.791000000000004 - type: mrr_at_3 value: 51.56699999999999 - type: mrr_at_5 value: 53.05 - type: ndcg_at_1 value: 44.201 - type: ndcg_at_10 value: 56.379000000000005 - type: ndcg_at_100 value: 60.645 - type: ndcg_at_1000 value: 61.73499999999999 - type: ndcg_at_3 value: 50.726000000000006 - type: ndcg_at_5 value: 53.58500000000001 - type: precision_at_1 value: 44.201 - type: precision_at_10 value: 9.141 - type: precision_at_100 value: 1.216 - type: precision_at_1000 value: 0.135 - type: precision_at_3 value: 22.654 - type: precision_at_5 value: 15.723999999999998 - type: recall_at_1 value: 38.338 - type: recall_at_10 value: 70.30499999999999 - type: recall_at_100 value: 88.77199999999999 - type: recall_at_1000 value: 96.49799999999999 - type: recall_at_3 value: 55.218 - type: recall_at_5 value: 62.104000000000006 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.682 - type: map_at_10 value: 33.498 - type: map_at_100 value: 34.461000000000006 - type: map_at_1000 value: 34.544000000000004 - type: map_at_3 value: 30.503999999999998 - type: map_at_5 value: 32.216 - type: mrr_at_1 value: 27.683999999999997 - type: mrr_at_10 value: 35.467999999999996 - type: mrr_at_100 value: 36.32 - type: mrr_at_1000 value: 36.386 - type: mrr_at_3 value: 32.618 - type: mrr_at_5 value: 34.262 - type: ndcg_at_1 value: 27.683999999999997 - type: ndcg_at_10 value: 38.378 - type: ndcg_at_100 value: 43.288 - type: ndcg_at_1000 value: 45.413 - type: ndcg_at_3 value: 32.586 - type: ndcg_at_5 value: 35.499 - type: precision_at_1 value: 27.683999999999997 - type: precision_at_10 value: 5.864 - type: precision_at_100 value: 0.882 - type: precision_at_1000 value: 0.11 - type: precision_at_3 value: 13.446 - type: precision_at_5 value: 9.718 - type: recall_at_1 value: 25.682 - type: recall_at_10 value: 51.712 - type: recall_at_100 value: 74.446 - type: recall_at_1000 value: 90.472 - type: recall_at_3 value: 36.236000000000004 - type: recall_at_5 value: 43.234 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 16.073999999999998 - type: map_at_10 value: 24.352999999999998 - type: map_at_100 value: 25.438 - type: map_at_1000 value: 25.545 - type: map_at_3 value: 21.614 - type: map_at_5 value: 23.104 - type: mrr_at_1 value: 19.776 - type: mrr_at_10 value: 28.837000000000003 - type: mrr_at_100 value: 29.755 - type: mrr_at_1000 value: 29.817 - type: mrr_at_3 value: 26.201999999999998 - type: mrr_at_5 value: 27.714 - type: ndcg_at_1 value: 19.776 - type: ndcg_at_10 value: 29.701 - type: ndcg_at_100 value: 35.307 - type: ndcg_at_1000 value: 37.942 - type: ndcg_at_3 value: 24.764 - type: ndcg_at_5 value: 27.025 - type: precision_at_1 value: 19.776 - type: precision_at_10 value: 5.659 - type: precision_at_100 value: 0.971 - type: precision_at_1000 value: 0.133 - type: precision_at_3 value: 12.065 - type: precision_at_5 value: 8.905000000000001 - type: recall_at_1 value: 16.073999999999998 - type: recall_at_10 value: 41.647 - type: recall_at_100 value: 66.884 - type: recall_at_1000 value: 85.91499999999999 - type: recall_at_3 value: 27.916 - type: recall_at_5 value: 33.729 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.444999999999997 - type: map_at_10 value: 38.218999999999994 - type: map_at_100 value: 39.595 - type: map_at_1000 value: 39.709 - type: map_at_3 value: 35.586 - type: map_at_5 value: 36.895 - type: mrr_at_1 value: 34.841 - type: mrr_at_10 value: 44.106 - type: mrr_at_100 value: 44.98 - type: mrr_at_1000 value: 45.03 - type: mrr_at_3 value: 41.979 - type: mrr_at_5 value: 43.047999999999995 - type: ndcg_at_1 value: 34.841 - type: ndcg_at_10 value: 43.922 - type: ndcg_at_100 value: 49.504999999999995 - type: ndcg_at_1000 value: 51.675000000000004 - type: ndcg_at_3 value: 39.858 - type: ndcg_at_5 value: 41.408 - type: precision_at_1 value: 34.841 - type: precision_at_10 value: 7.872999999999999 - type: precision_at_100 value: 1.2449999999999999 - type: precision_at_1000 value: 0.161 - type: precision_at_3 value: 18.993 - type: precision_at_5 value: 13.032 - type: recall_at_1 value: 28.444999999999997 - type: recall_at_10 value: 54.984 - type: recall_at_100 value: 78.342 - type: recall_at_1000 value: 92.77 - type: recall_at_3 value: 42.842999999999996 - type: recall_at_5 value: 47.247 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 23.072 - type: map_at_10 value: 32.354 - type: map_at_100 value: 33.800000000000004 - type: map_at_1000 value: 33.908 - type: map_at_3 value: 29.232000000000003 - type: map_at_5 value: 31.049 - type: mrr_at_1 value: 29.110000000000003 - type: mrr_at_10 value: 38.03 - type: mrr_at_100 value: 39.032 - type: mrr_at_1000 value: 39.086999999999996 - type: mrr_at_3 value: 35.407 - type: mrr_at_5 value: 36.76 - type: ndcg_at_1 value: 29.110000000000003 - type: ndcg_at_10 value: 38.231 - type: ndcg_at_100 value: 44.425 - type: ndcg_at_1000 value: 46.771 - type: ndcg_at_3 value: 33.095 - type: ndcg_at_5 value: 35.459 - type: precision_at_1 value: 29.110000000000003 - type: precision_at_10 value: 7.215000000000001 - type: precision_at_100 value: 1.2109999999999999 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 16.058 - type: precision_at_5 value: 11.644 - type: recall_at_1 value: 23.072 - type: recall_at_10 value: 50.285999999999994 - type: recall_at_100 value: 76.596 - type: recall_at_1000 value: 92.861 - type: recall_at_3 value: 35.702 - type: recall_at_5 value: 42.152 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.937916666666666 - type: map_at_10 value: 33.755250000000004 - type: map_at_100 value: 34.955999999999996 - type: map_at_1000 value: 35.070499999999996 - type: map_at_3 value: 30.98708333333333 - type: map_at_5 value: 32.51491666666666 - type: mrr_at_1 value: 29.48708333333333 - type: mrr_at_10 value: 37.92183333333334 - type: mrr_at_100 value: 38.76583333333333 - type: mrr_at_1000 value: 38.82466666666667 - type: mrr_at_3 value: 35.45125 - type: mrr_at_5 value: 36.827000000000005 - type: ndcg_at_1 value: 29.48708333333333 - type: ndcg_at_10 value: 39.05225 - type: ndcg_at_100 value: 44.25983333333334 - type: ndcg_at_1000 value: 46.568333333333335 - type: ndcg_at_3 value: 34.271583333333325 - type: ndcg_at_5 value: 36.483916666666666 - type: precision_at_1 value: 29.48708333333333 - type: precision_at_10 value: 6.865749999999999 - type: precision_at_100 value: 1.1195833333333332 - type: precision_at_1000 value: 0.15058333333333335 - type: precision_at_3 value: 15.742083333333333 - type: precision_at_5 value: 11.221916666666667 - type: recall_at_1 value: 24.937916666666666 - type: recall_at_10 value: 50.650416666666665 - type: recall_at_100 value: 73.55383333333334 - type: recall_at_1000 value: 89.61691666666667 - type: recall_at_3 value: 37.27808333333334 - type: recall_at_5 value: 42.99475 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 23.947 - type: map_at_10 value: 30.575000000000003 - type: map_at_100 value: 31.465 - type: map_at_1000 value: 31.558000000000003 - type: map_at_3 value: 28.814 - type: map_at_5 value: 29.738999999999997 - type: mrr_at_1 value: 26.994 - type: mrr_at_10 value: 33.415 - type: mrr_at_100 value: 34.18 - type: mrr_at_1000 value: 34.245 - type: mrr_at_3 value: 31.621 - type: mrr_at_5 value: 32.549 - type: ndcg_at_1 value: 26.994 - type: ndcg_at_10 value: 34.482 - type: ndcg_at_100 value: 38.915 - type: ndcg_at_1000 value: 41.355 - type: ndcg_at_3 value: 31.139 - type: ndcg_at_5 value: 32.589 - type: precision_at_1 value: 26.994 - type: precision_at_10 value: 5.322 - type: precision_at_100 value: 0.8160000000000001 - type: precision_at_1000 value: 0.11100000000000002 - type: precision_at_3 value: 13.344000000000001 - type: precision_at_5 value: 8.988 - type: recall_at_1 value: 23.947 - type: recall_at_10 value: 43.647999999999996 - type: recall_at_100 value: 63.851 - type: recall_at_1000 value: 82.0 - type: recall_at_3 value: 34.288000000000004 - type: recall_at_5 value: 38.117000000000004 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 16.197 - type: map_at_10 value: 22.968 - type: map_at_100 value: 24.095 - type: map_at_1000 value: 24.217 - type: map_at_3 value: 20.771 - type: map_at_5 value: 21.995 - type: mrr_at_1 value: 19.511 - type: mrr_at_10 value: 26.55 - type: mrr_at_100 value: 27.500999999999998 - type: mrr_at_1000 value: 27.578999999999997 - type: mrr_at_3 value: 24.421 - type: mrr_at_5 value: 25.604 - type: ndcg_at_1 value: 19.511 - type: ndcg_at_10 value: 27.386 - type: ndcg_at_100 value: 32.828 - type: ndcg_at_1000 value: 35.739 - type: ndcg_at_3 value: 23.405 - type: ndcg_at_5 value: 25.255 - type: precision_at_1 value: 19.511 - type: precision_at_10 value: 5.017 - type: precision_at_100 value: 0.91 - type: precision_at_1000 value: 0.133 - type: precision_at_3 value: 11.023 - type: precision_at_5 value: 8.025 - type: recall_at_1 value: 16.197 - type: recall_at_10 value: 37.09 - type: recall_at_100 value: 61.778 - type: recall_at_1000 value: 82.56599999999999 - type: recall_at_3 value: 26.034000000000002 - type: recall_at_5 value: 30.762 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.41 - type: map_at_10 value: 33.655 - type: map_at_100 value: 34.892 - type: map_at_1000 value: 34.995 - type: map_at_3 value: 30.94 - type: map_at_5 value: 32.303 - type: mrr_at_1 value: 29.477999999999998 - type: mrr_at_10 value: 37.443 - type: mrr_at_100 value: 38.383 - type: mrr_at_1000 value: 38.440000000000005 - type: mrr_at_3 value: 34.949999999999996 - type: mrr_at_5 value: 36.228 - type: ndcg_at_1 value: 29.477999999999998 - type: ndcg_at_10 value: 38.769 - type: ndcg_at_100 value: 44.245000000000005 - type: ndcg_at_1000 value: 46.593 - type: ndcg_at_3 value: 33.623 - type: ndcg_at_5 value: 35.766 - type: precision_at_1 value: 29.477999999999998 - type: precision_at_10 value: 6.455 - type: precision_at_100 value: 1.032 - type: precision_at_1000 value: 0.135 - type: precision_at_3 value: 14.893999999999998 - type: precision_at_5 value: 10.485 - type: recall_at_1 value: 25.41 - type: recall_at_10 value: 50.669 - type: recall_at_100 value: 74.084 - type: recall_at_1000 value: 90.435 - type: recall_at_3 value: 36.679 - type: recall_at_5 value: 41.94 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 23.339 - type: map_at_10 value: 31.852000000000004 - type: map_at_100 value: 33.411 - type: map_at_1000 value: 33.62 - type: map_at_3 value: 28.929 - type: map_at_5 value: 30.542 - type: mrr_at_1 value: 28.063 - type: mrr_at_10 value: 36.301 - type: mrr_at_100 value: 37.288 - type: mrr_at_1000 value: 37.349 - type: mrr_at_3 value: 33.663 - type: mrr_at_5 value: 35.165 - type: ndcg_at_1 value: 28.063 - type: ndcg_at_10 value: 37.462 - type: ndcg_at_100 value: 43.620999999999995 - type: ndcg_at_1000 value: 46.211 - type: ndcg_at_3 value: 32.68 - type: ndcg_at_5 value: 34.981 - type: precision_at_1 value: 28.063 - type: precision_at_10 value: 7.1739999999999995 - type: precision_at_100 value: 1.486 - type: precision_at_1000 value: 0.23500000000000001 - type: precision_at_3 value: 15.217 - type: precision_at_5 value: 11.265 - type: recall_at_1 value: 23.339 - type: recall_at_10 value: 48.376999999999995 - type: recall_at_100 value: 76.053 - type: recall_at_1000 value: 92.455 - type: recall_at_3 value: 34.735 - type: recall_at_5 value: 40.71 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 18.925 - type: map_at_10 value: 26.017000000000003 - type: map_at_100 value: 27.034000000000002 - type: map_at_1000 value: 27.156000000000002 - type: map_at_3 value: 23.604 - type: map_at_5 value: 24.75 - type: mrr_at_1 value: 20.333000000000002 - type: mrr_at_10 value: 27.915 - type: mrr_at_100 value: 28.788000000000004 - type: mrr_at_1000 value: 28.877999999999997 - type: mrr_at_3 value: 25.446999999999996 - type: mrr_at_5 value: 26.648 - type: ndcg_at_1 value: 20.333000000000002 - type: ndcg_at_10 value: 30.673000000000002 - type: ndcg_at_100 value: 35.618 - type: ndcg_at_1000 value: 38.517 - type: ndcg_at_3 value: 25.71 - type: ndcg_at_5 value: 27.679 - type: precision_at_1 value: 20.333000000000002 - type: precision_at_10 value: 4.9910000000000005 - type: precision_at_100 value: 0.8130000000000001 - type: precision_at_1000 value: 0.117 - type: precision_at_3 value: 11.029 - type: precision_at_5 value: 7.8740000000000006 - type: recall_at_1 value: 18.925 - type: recall_at_10 value: 43.311 - type: recall_at_100 value: 66.308 - type: recall_at_1000 value: 87.49 - type: recall_at_3 value: 29.596 - type: recall_at_5 value: 34.245 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 13.714 - type: map_at_10 value: 23.194 - type: map_at_100 value: 24.976000000000003 - type: map_at_1000 value: 25.166 - type: map_at_3 value: 19.709 - type: map_at_5 value: 21.523999999999997 - type: mrr_at_1 value: 30.619000000000003 - type: mrr_at_10 value: 42.563 - type: mrr_at_100 value: 43.386 - type: mrr_at_1000 value: 43.423 - type: mrr_at_3 value: 39.555 - type: mrr_at_5 value: 41.268 - type: ndcg_at_1 value: 30.619000000000003 - type: ndcg_at_10 value: 31.836 - type: ndcg_at_100 value: 38.652 - type: ndcg_at_1000 value: 42.088 - type: ndcg_at_3 value: 26.733 - type: ndcg_at_5 value: 28.435 - type: precision_at_1 value: 30.619000000000003 - type: precision_at_10 value: 9.751999999999999 - type: precision_at_100 value: 1.71 - type: precision_at_1000 value: 0.23500000000000001 - type: precision_at_3 value: 19.935 - type: precision_at_5 value: 14.984 - type: recall_at_1 value: 13.714 - type: recall_at_10 value: 37.26 - type: recall_at_100 value: 60.546 - type: recall_at_1000 value: 79.899 - type: recall_at_3 value: 24.325 - type: recall_at_5 value: 29.725 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 8.462 - type: map_at_10 value: 18.637 - type: map_at_100 value: 26.131999999999998 - type: map_at_1000 value: 27.607 - type: map_at_3 value: 13.333 - type: map_at_5 value: 15.654000000000002 - type: mrr_at_1 value: 66.25 - type: mrr_at_10 value: 74.32600000000001 - type: mrr_at_100 value: 74.60900000000001 - type: mrr_at_1000 value: 74.62 - type: mrr_at_3 value: 72.667 - type: mrr_at_5 value: 73.817 - type: ndcg_at_1 value: 53.87499999999999 - type: ndcg_at_10 value: 40.028999999999996 - type: ndcg_at_100 value: 44.199 - type: ndcg_at_1000 value: 51.629999999999995 - type: ndcg_at_3 value: 44.113 - type: ndcg_at_5 value: 41.731 - type: precision_at_1 value: 66.25 - type: precision_at_10 value: 31.900000000000002 - type: precision_at_100 value: 10.043000000000001 - type: precision_at_1000 value: 1.926 - type: precision_at_3 value: 47.417 - type: precision_at_5 value: 40.65 - type: recall_at_1 value: 8.462 - type: recall_at_10 value: 24.293 - type: recall_at_100 value: 50.146 - type: recall_at_1000 value: 74.034 - type: recall_at_3 value: 14.967 - type: recall_at_5 value: 18.682000000000002 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 47.84499999999999 - type: f1 value: 42.48106691979349 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 74.034 - type: map_at_10 value: 82.76 - type: map_at_100 value: 82.968 - type: map_at_1000 value: 82.98299999999999 - type: map_at_3 value: 81.768 - type: map_at_5 value: 82.418 - type: mrr_at_1 value: 80.048 - type: mrr_at_10 value: 87.64999999999999 - type: mrr_at_100 value: 87.712 - type: mrr_at_1000 value: 87.713 - type: mrr_at_3 value: 87.01100000000001 - type: mrr_at_5 value: 87.466 - type: ndcg_at_1 value: 80.048 - type: ndcg_at_10 value: 86.643 - type: ndcg_at_100 value: 87.361 - type: ndcg_at_1000 value: 87.606 - type: ndcg_at_3 value: 85.137 - type: ndcg_at_5 value: 86.016 - type: precision_at_1 value: 80.048 - type: precision_at_10 value: 10.372 - type: precision_at_100 value: 1.093 - type: precision_at_1000 value: 0.11299999999999999 - type: precision_at_3 value: 32.638 - type: precision_at_5 value: 20.177 - type: recall_at_1 value: 74.034 - type: recall_at_10 value: 93.769 - type: recall_at_100 value: 96.569 - type: recall_at_1000 value: 98.039 - type: recall_at_3 value: 89.581 - type: recall_at_5 value: 91.906 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 20.5 - type: map_at_10 value: 32.857 - type: map_at_100 value: 34.589 - type: map_at_1000 value: 34.778 - type: map_at_3 value: 29.160999999999998 - type: map_at_5 value: 31.033 - type: mrr_at_1 value: 40.123 - type: mrr_at_10 value: 48.776 - type: mrr_at_100 value: 49.495 - type: mrr_at_1000 value: 49.539 - type: mrr_at_3 value: 46.605000000000004 - type: mrr_at_5 value: 47.654 - type: ndcg_at_1 value: 40.123 - type: ndcg_at_10 value: 40.343 - type: ndcg_at_100 value: 46.56 - type: ndcg_at_1000 value: 49.777 - type: ndcg_at_3 value: 37.322 - type: ndcg_at_5 value: 37.791000000000004 - type: precision_at_1 value: 40.123 - type: precision_at_10 value: 11.08 - type: precision_at_100 value: 1.752 - type: precision_at_1000 value: 0.232 - type: precision_at_3 value: 24.897 - type: precision_at_5 value: 17.809 - type: recall_at_1 value: 20.5 - type: recall_at_10 value: 46.388 - type: recall_at_100 value: 69.552 - type: recall_at_1000 value: 89.011 - type: recall_at_3 value: 33.617999999999995 - type: recall_at_5 value: 38.211 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 39.135999999999996 - type: map_at_10 value: 61.673 - type: map_at_100 value: 62.562 - type: map_at_1000 value: 62.62 - type: map_at_3 value: 58.467999999999996 - type: map_at_5 value: 60.463 - type: mrr_at_1 value: 78.271 - type: mrr_at_10 value: 84.119 - type: mrr_at_100 value: 84.29299999999999 - type: mrr_at_1000 value: 84.299 - type: mrr_at_3 value: 83.18900000000001 - type: mrr_at_5 value: 83.786 - type: ndcg_at_1 value: 78.271 - type: ndcg_at_10 value: 69.935 - type: ndcg_at_100 value: 73.01299999999999 - type: ndcg_at_1000 value: 74.126 - type: ndcg_at_3 value: 65.388 - type: ndcg_at_5 value: 67.906 - type: precision_at_1 value: 78.271 - type: precision_at_10 value: 14.562 - type: precision_at_100 value: 1.6969999999999998 - type: precision_at_1000 value: 0.184 - type: precision_at_3 value: 41.841 - type: precision_at_5 value: 27.087 - type: recall_at_1 value: 39.135999999999996 - type: recall_at_10 value: 72.809 - type: recall_at_100 value: 84.86200000000001 - type: recall_at_1000 value: 92.208 - type: recall_at_3 value: 62.76199999999999 - type: recall_at_5 value: 67.718 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 90.60600000000001 - type: ap value: 86.6579587804335 - type: f1 value: 90.5938853929307 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 21.852 - type: map_at_10 value: 33.982 - type: map_at_100 value: 35.116 - type: map_at_1000 value: 35.167 - type: map_at_3 value: 30.134 - type: map_at_5 value: 32.340999999999994 - type: mrr_at_1 value: 22.479 - type: mrr_at_10 value: 34.594 - type: mrr_at_100 value: 35.672 - type: mrr_at_1000 value: 35.716 - type: mrr_at_3 value: 30.84 - type: mrr_at_5 value: 32.998 - type: ndcg_at_1 value: 22.493 - type: ndcg_at_10 value: 40.833000000000006 - type: ndcg_at_100 value: 46.357 - type: ndcg_at_1000 value: 47.637 - type: ndcg_at_3 value: 32.995999999999995 - type: ndcg_at_5 value: 36.919000000000004 - type: precision_at_1 value: 22.493 - type: precision_at_10 value: 6.465999999999999 - type: precision_at_100 value: 0.9249999999999999 - type: precision_at_1000 value: 0.104 - type: precision_at_3 value: 14.030999999999999 - type: precision_at_5 value: 10.413 - type: recall_at_1 value: 21.852 - type: recall_at_10 value: 61.934999999999995 - type: recall_at_100 value: 87.611 - type: recall_at_1000 value: 97.441 - type: recall_at_3 value: 40.583999999999996 - type: recall_at_5 value: 49.992999999999995 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 93.36069311445507 - type: f1 value: 93.16456330371453 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 74.74692202462381 - type: f1 value: 58.17903579421599 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 74.80833893745796 - type: f1 value: 72.70786592684664 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 78.69872225958305 - type: f1 value: 78.61626934504731 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 33.058658628717694 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 30.85561739360599 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 31.290259910144385 - type: mrr value: 32.44223046102856 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 5.288 - type: map_at_10 value: 12.267999999999999 - type: map_at_100 value: 15.557000000000002 - type: map_at_1000 value: 16.98 - type: map_at_3 value: 8.866 - type: map_at_5 value: 10.418 - type: mrr_at_1 value: 43.653 - type: mrr_at_10 value: 52.681 - type: mrr_at_100 value: 53.315999999999995 - type: mrr_at_1000 value: 53.357 - type: mrr_at_3 value: 51.393 - type: mrr_at_5 value: 51.903999999999996 - type: ndcg_at_1 value: 42.415000000000006 - type: ndcg_at_10 value: 34.305 - type: ndcg_at_100 value: 30.825999999999997 - type: ndcg_at_1000 value: 39.393 - type: ndcg_at_3 value: 39.931 - type: ndcg_at_5 value: 37.519999999999996 - type: precision_at_1 value: 43.653 - type: precision_at_10 value: 25.728 - type: precision_at_100 value: 7.932 - type: precision_at_1000 value: 2.07 - type: precision_at_3 value: 38.184000000000005 - type: precision_at_5 value: 32.879000000000005 - type: recall_at_1 value: 5.288 - type: recall_at_10 value: 16.195 - type: recall_at_100 value: 31.135 - type: recall_at_1000 value: 61.531000000000006 - type: recall_at_3 value: 10.313 - type: recall_at_5 value: 12.754999999999999 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 28.216 - type: map_at_10 value: 42.588 - type: map_at_100 value: 43.702999999999996 - type: map_at_1000 value: 43.739 - type: map_at_3 value: 38.177 - type: map_at_5 value: 40.754000000000005 - type: mrr_at_1 value: 31.866 - type: mrr_at_10 value: 45.189 - type: mrr_at_100 value: 46.056000000000004 - type: mrr_at_1000 value: 46.081 - type: mrr_at_3 value: 41.526999999999994 - type: mrr_at_5 value: 43.704 - type: ndcg_at_1 value: 31.837 - type: ndcg_at_10 value: 50.178 - type: ndcg_at_100 value: 54.98800000000001 - type: ndcg_at_1000 value: 55.812 - type: ndcg_at_3 value: 41.853 - type: ndcg_at_5 value: 46.153 - type: precision_at_1 value: 31.837 - type: precision_at_10 value: 8.43 - type: precision_at_100 value: 1.1119999999999999 - type: precision_at_1000 value: 0.11900000000000001 - type: precision_at_3 value: 19.023 - type: precision_at_5 value: 13.911000000000001 - type: recall_at_1 value: 28.216 - type: recall_at_10 value: 70.8 - type: recall_at_100 value: 91.857 - type: recall_at_1000 value: 97.941 - type: recall_at_3 value: 49.196 - type: recall_at_5 value: 59.072 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 71.22800000000001 - type: map_at_10 value: 85.115 - type: map_at_100 value: 85.72 - type: map_at_1000 value: 85.737 - type: map_at_3 value: 82.149 - type: map_at_5 value: 84.029 - type: mrr_at_1 value: 81.96 - type: mrr_at_10 value: 88.00200000000001 - type: mrr_at_100 value: 88.088 - type: mrr_at_1000 value: 88.089 - type: mrr_at_3 value: 87.055 - type: mrr_at_5 value: 87.715 - type: ndcg_at_1 value: 82.01 - type: ndcg_at_10 value: 88.78 - type: ndcg_at_100 value: 89.91 - type: ndcg_at_1000 value: 90.013 - type: ndcg_at_3 value: 85.957 - type: ndcg_at_5 value: 87.56 - type: precision_at_1 value: 82.01 - type: precision_at_10 value: 13.462 - type: precision_at_100 value: 1.528 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.553 - type: precision_at_5 value: 24.732000000000003 - type: recall_at_1 value: 71.22800000000001 - type: recall_at_10 value: 95.69 - type: recall_at_100 value: 99.531 - type: recall_at_1000 value: 99.98 - type: recall_at_3 value: 87.632 - type: recall_at_5 value: 92.117 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 52.31768034366916 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 60.640266772723606 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 4.7780000000000005 - type: map_at_10 value: 12.299 - type: map_at_100 value: 14.363000000000001 - type: map_at_1000 value: 14.71 - type: map_at_3 value: 8.738999999999999 - type: map_at_5 value: 10.397 - type: mrr_at_1 value: 23.599999999999998 - type: mrr_at_10 value: 34.845 - type: mrr_at_100 value: 35.916 - type: mrr_at_1000 value: 35.973 - type: mrr_at_3 value: 31.7 - type: mrr_at_5 value: 33.535 - type: ndcg_at_1 value: 23.599999999999998 - type: ndcg_at_10 value: 20.522000000000002 - type: ndcg_at_100 value: 28.737000000000002 - type: ndcg_at_1000 value: 34.596 - type: ndcg_at_3 value: 19.542 - type: ndcg_at_5 value: 16.958000000000002 - type: precision_at_1 value: 23.599999999999998 - type: precision_at_10 value: 10.67 - type: precision_at_100 value: 2.259 - type: precision_at_1000 value: 0.367 - type: precision_at_3 value: 18.333 - type: precision_at_5 value: 14.879999999999999 - type: recall_at_1 value: 4.7780000000000005 - type: recall_at_10 value: 21.617 - type: recall_at_100 value: 45.905 - type: recall_at_1000 value: 74.42 - type: recall_at_3 value: 11.148 - type: recall_at_5 value: 15.082999999999998 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 83.22372750297885 - type: cos_sim_spearman value: 79.40972617119405 - type: euclidean_pearson value: 80.6101072020434 - type: euclidean_spearman value: 79.53844217225202 - type: manhattan_pearson value: 80.57265975286111 - type: manhattan_spearman value: 79.46335611792958 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 85.43713315520749 - type: cos_sim_spearman value: 77.44128693329532 - type: euclidean_pearson value: 81.63869928101123 - type: euclidean_spearman value: 77.29512977961515 - type: manhattan_pearson value: 81.63704185566183 - type: manhattan_spearman value: 77.29909412738657 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 81.59451537860527 - type: cos_sim_spearman value: 82.97994638856723 - type: euclidean_pearson value: 82.89478688288412 - type: euclidean_spearman value: 83.58740751053104 - type: manhattan_pearson value: 82.69140840941608 - type: manhattan_spearman value: 83.33665956040555 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 82.00756527711764 - type: cos_sim_spearman value: 81.83560996841379 - type: euclidean_pearson value: 82.07684151976518 - type: euclidean_spearman value: 82.00913052060511 - type: manhattan_pearson value: 82.05690778488794 - type: manhattan_spearman value: 82.02260252019525 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 86.13710262895447 - type: cos_sim_spearman value: 87.26412811156248 - type: euclidean_pearson value: 86.94151453230228 - type: euclidean_spearman value: 87.5363796699571 - type: manhattan_pearson value: 86.86989424083748 - type: manhattan_spearman value: 87.47315940781353 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 83.0230597603627 - type: cos_sim_spearman value: 84.93344499318864 - type: euclidean_pearson value: 84.23754743431141 - type: euclidean_spearman value: 85.09707376597099 - type: manhattan_pearson value: 84.04325160987763 - type: manhattan_spearman value: 84.89353071339909 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 86.75620824563921 - type: cos_sim_spearman value: 87.15065513706398 - type: euclidean_pearson value: 88.26281533633521 - type: euclidean_spearman value: 87.51963738643983 - type: manhattan_pearson value: 88.25599267618065 - type: manhattan_spearman value: 87.58048736047483 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 64.74645319195137 - type: cos_sim_spearman value: 65.29996325037214 - type: euclidean_pearson value: 67.04297794086443 - type: euclidean_spearman value: 65.43841726694343 - type: manhattan_pearson value: 67.39459955690904 - type: manhattan_spearman value: 65.92864704413651 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 84.31291020270801 - type: cos_sim_spearman value: 85.86473738688068 - type: euclidean_pearson value: 85.65537275064152 - type: euclidean_spearman value: 86.13087454209642 - type: manhattan_pearson value: 85.43946955047609 - type: manhattan_spearman value: 85.91568175344916 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 85.93798118350695 - type: mrr value: 95.93536274908824 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 57.594 - type: map_at_10 value: 66.81899999999999 - type: map_at_100 value: 67.368 - type: map_at_1000 value: 67.4 - type: map_at_3 value: 64.061 - type: map_at_5 value: 65.47 - type: mrr_at_1 value: 60.667 - type: mrr_at_10 value: 68.219 - type: mrr_at_100 value: 68.655 - type: mrr_at_1000 value: 68.684 - type: mrr_at_3 value: 66.22200000000001 - type: mrr_at_5 value: 67.289 - type: ndcg_at_1 value: 60.667 - type: ndcg_at_10 value: 71.275 - type: ndcg_at_100 value: 73.642 - type: ndcg_at_1000 value: 74.373 - type: ndcg_at_3 value: 66.521 - type: ndcg_at_5 value: 68.581 - type: precision_at_1 value: 60.667 - type: precision_at_10 value: 9.433 - type: precision_at_100 value: 1.0699999999999998 - type: precision_at_1000 value: 0.11299999999999999 - type: precision_at_3 value: 25.556 - type: precision_at_5 value: 16.8 - type: recall_at_1 value: 57.594 - type: recall_at_10 value: 83.622 - type: recall_at_100 value: 94.167 - type: recall_at_1000 value: 99.667 - type: recall_at_3 value: 70.64399999999999 - type: recall_at_5 value: 75.983 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.85841584158416 - type: cos_sim_ap value: 96.66996142314342 - type: cos_sim_f1 value: 92.83208020050125 - type: cos_sim_precision value: 93.06532663316584 - type: cos_sim_recall value: 92.60000000000001 - type: dot_accuracy value: 99.85841584158416 - type: dot_ap value: 96.6775307676576 - type: dot_f1 value: 92.69289729177312 - type: dot_precision value: 94.77533960292581 - type: dot_recall value: 90.7 - type: euclidean_accuracy value: 99.86138613861387 - type: euclidean_ap value: 96.6338454403108 - type: euclidean_f1 value: 92.92214357937311 - type: euclidean_precision value: 93.96728016359918 - type: euclidean_recall value: 91.9 - type: manhattan_accuracy value: 99.86237623762376 - type: manhattan_ap value: 96.60370449645053 - type: manhattan_f1 value: 92.91177970423253 - type: manhattan_precision value: 94.7970863683663 - type: manhattan_recall value: 91.10000000000001 - type: max_accuracy value: 99.86237623762376 - type: max_ap value: 96.6775307676576 - type: max_f1 value: 92.92214357937311 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 60.77977058695198 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 35.2725272535638 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 53.64052466362125 - type: mrr value: 54.533067014684654 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 30.677624219206578 - type: cos_sim_spearman value: 30.121368518123447 - type: dot_pearson value: 30.69870088041608 - type: dot_spearman value: 29.61284927093751 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.22 - type: map_at_10 value: 1.855 - type: map_at_100 value: 9.885 - type: map_at_1000 value: 23.416999999999998 - type: map_at_3 value: 0.637 - type: map_at_5 value: 1.024 - type: mrr_at_1 value: 88.0 - type: mrr_at_10 value: 93.067 - type: mrr_at_100 value: 93.067 - type: mrr_at_1000 value: 93.067 - type: mrr_at_3 value: 92.667 - type: mrr_at_5 value: 93.067 - type: ndcg_at_1 value: 82.0 - type: ndcg_at_10 value: 75.899 - type: ndcg_at_100 value: 55.115 - type: ndcg_at_1000 value: 48.368 - type: ndcg_at_3 value: 79.704 - type: ndcg_at_5 value: 78.39699999999999 - type: precision_at_1 value: 88.0 - type: precision_at_10 value: 79.60000000000001 - type: precision_at_100 value: 56.06 - type: precision_at_1000 value: 21.206 - type: precision_at_3 value: 84.667 - type: precision_at_5 value: 83.2 - type: recall_at_1 value: 0.22 - type: recall_at_10 value: 2.078 - type: recall_at_100 value: 13.297 - type: recall_at_1000 value: 44.979 - type: recall_at_3 value: 0.6689999999999999 - type: recall_at_5 value: 1.106 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 2.258 - type: map_at_10 value: 10.439 - type: map_at_100 value: 16.89 - type: map_at_1000 value: 18.407999999999998 - type: map_at_3 value: 5.668 - type: map_at_5 value: 7.718 - type: mrr_at_1 value: 32.653 - type: mrr_at_10 value: 51.159 - type: mrr_at_100 value: 51.714000000000006 - type: mrr_at_1000 value: 51.714000000000006 - type: mrr_at_3 value: 47.959 - type: mrr_at_5 value: 50.407999999999994 - type: ndcg_at_1 value: 29.592000000000002 - type: ndcg_at_10 value: 26.037 - type: ndcg_at_100 value: 37.924 - type: ndcg_at_1000 value: 49.126999999999995 - type: ndcg_at_3 value: 30.631999999999998 - type: ndcg_at_5 value: 28.571 - type: precision_at_1 value: 32.653 - type: precision_at_10 value: 22.857 - type: precision_at_100 value: 7.754999999999999 - type: precision_at_1000 value: 1.529 - type: precision_at_3 value: 34.014 - type: precision_at_5 value: 29.796 - type: recall_at_1 value: 2.258 - type: recall_at_10 value: 16.554 - type: recall_at_100 value: 48.439 - type: recall_at_1000 value: 82.80499999999999 - type: recall_at_3 value: 7.283 - type: recall_at_5 value: 10.732 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 69.8858 - type: ap value: 13.835684144362109 - type: f1 value: 53.803351693244586 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 60.50650820599886 - type: f1 value: 60.84357825979259 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 48.52131044852134 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 85.59337187816654 - type: cos_sim_ap value: 73.23925826533437 - type: cos_sim_f1 value: 67.34693877551021 - type: cos_sim_precision value: 62.40432237730752 - type: cos_sim_recall value: 73.13984168865434 - type: dot_accuracy value: 85.31322644096085 - type: dot_ap value: 72.30723963807422 - type: dot_f1 value: 66.47051612112296 - type: dot_precision value: 62.0792305930845 - type: dot_recall value: 71.53034300791556 - type: euclidean_accuracy value: 85.61125350181797 - type: euclidean_ap value: 73.32843720487845 - type: euclidean_f1 value: 67.36549633745895 - type: euclidean_precision value: 64.60755813953489 - type: euclidean_recall value: 70.36939313984169 - type: manhattan_accuracy value: 85.63509566668654 - type: manhattan_ap value: 73.16658488311325 - type: manhattan_f1 value: 67.20597386434349 - type: manhattan_precision value: 63.60424028268551 - type: manhattan_recall value: 71.2401055408971 - type: max_accuracy value: 85.63509566668654 - type: max_ap value: 73.32843720487845 - type: max_f1 value: 67.36549633745895 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 88.33779640625606 - type: cos_sim_ap value: 84.83868375898157 - type: cos_sim_f1 value: 77.16506154017773 - type: cos_sim_precision value: 74.62064005753327 - type: cos_sim_recall value: 79.88912842623961 - type: dot_accuracy value: 88.02732176815307 - type: dot_ap value: 83.95089283763002 - type: dot_f1 value: 76.29635101196631 - type: dot_precision value: 73.31771720613288 - type: dot_recall value: 79.52725592854944 - type: euclidean_accuracy value: 88.44452206310397 - type: euclidean_ap value: 84.98384576824827 - type: euclidean_f1 value: 77.29311047696697 - type: euclidean_precision value: 74.51232583065381 - type: euclidean_recall value: 80.28949799815214 - type: manhattan_accuracy value: 88.47362906042613 - type: manhattan_ap value: 84.91421462218432 - type: manhattan_f1 value: 77.05107637204792 - type: manhattan_precision value: 74.74484256243214 - type: manhattan_recall value: 79.50415768401602 - type: max_accuracy value: 88.47362906042613 - type: max_ap value: 84.98384576824827 - type: max_f1 value: 77.29311047696697 license: mit language: - en --- <h1 align="center">FlagEmbedding</h1> <h4 align="center"> <p> <a href=#model-list>Model List</a> | <a href=#frequently-asked-questions>FAQ</a> | <a href=#usage>Usage</a> | <a href="#evaluation">Evaluation</a> | <a href="#train">Train</a> | <a href="#contact">Contact</a> | <a href="#citation">Citation</a> | <a href="#license">License</a> <p> </h4> More details please refer to our Github: [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding). [English](README.md) | [中文](https://github.com/FlagOpen/FlagEmbedding/blob/master/README_zh.md) FlagEmbedding can map any text to a low-dimensional dense vector which can be used for tasks like retrieval, classification, clustering, or semantic search. And it also can be used in vector databases for LLMs. ************* 🌟**Updates**🌟 ************* - 10/12/2023: Release [LLM-Embedder](./FlagEmbedding/llm_embedder/README.md), a unified embedding model to support diverse retrieval augmentation needs for LLMs. [Paper](https://arxiv.org/pdf/2310.07554.pdf) :fire: - 09/15/2023: The [technical report](https://arxiv.org/pdf/2309.07597.pdf) of BGE has been released - 09/15/2023: The [masive training data](https://data.baai.ac.cn/details/BAAI-MTP) of BGE has been released - 09/12/2023: New models: - **New reranker model**: release cross-encoder models `BAAI/bge-reranker-base` and `BAAI/bge-reranker-large`, which are more powerful than embedding model. We recommend to use/fine-tune them to re-rank top-k documents returned by embedding models. - **update embedding model**: release `bge-*-v1.5` embedding model to alleviate the issue of the similarity distribution, and enhance its retrieval ability without instruction. <details> <summary>More</summary> <!-- ### More --> - 09/07/2023: Update [fine-tune code](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md): Add script to mine hard negatives and support adding instruction during fine-tuning. - 08/09/2023: BGE Models are integrated into **Langchain**, you can use it like [this](#using-langchain); C-MTEB **leaderboard** is [available](https://huggingface.co/spaces/mteb/leaderboard). - 08/05/2023: Release base-scale and small-scale models, **best performance among the models of the same size 🤗** - 08/02/2023: Release `bge-large-*`(short for BAAI General Embedding) Models, **rank 1st on MTEB and C-MTEB benchmark!** :tada: :tada: - 08/01/2023: We release the [Chinese Massive Text Embedding Benchmark](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB) (**C-MTEB**), consisting of 31 test dataset. </details> ## Model List `bge` is short for `BAAI general embedding`. | Model | Language | | Description | query instruction for retrieval [1] | |:-------------------------------|:--------:| :--------:| :--------:|:--------:| | [BAAI/llm-embedder](https://huggingface.co/BAAI/llm-embedder) | English | [Inference](./FlagEmbedding/llm_embedder/README.md) [Fine-tune](./FlagEmbedding/llm_embedder/README.md) | a unified embedding model to support diverse retrieval augmentation needs for LLMs | See [README](./FlagEmbedding/llm_embedder/README.md) | | [BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | Chinese and English | [Inference](#usage-for-reranker) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker) | a cross-encoder model which is more accurate but less efficient [2] | | | [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | Chinese and English | [Inference](#usage-for-reranker) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker) | a cross-encoder model which is more accurate but less efficient [2] | | | [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-large-zh-v1.5](https://huggingface.co/BAAI/bge-large-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-base-zh-v1.5](https://huggingface.co/BAAI/bge-base-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-small-zh-v1.5](https://huggingface.co/BAAI/bge-small-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-large-en](https://huggingface.co/BAAI/bge-large-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | :trophy: rank **1st** in [MTEB](https://huggingface.co/spaces/mteb/leaderboard) leaderboard | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-base-en](https://huggingface.co/BAAI/bge-base-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a base-scale model but with similar ability to `bge-large-en` | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-small-en](https://huggingface.co/BAAI/bge-small-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) |a small-scale model but with competitive performance | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-large-zh](https://huggingface.co/BAAI/bge-large-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | :trophy: rank **1st** in [C-MTEB](https://github.com/FlagOpen/FlagEmbedding/tree/master/C_MTEB) benchmark | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-base-zh](https://huggingface.co/BAAI/bge-base-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a base-scale model but with similar ability to `bge-large-zh` | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-small-zh](https://huggingface.co/BAAI/bge-small-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a small-scale model but with competitive performance | `为这个句子生成表示以用于检索相关文章:` | [1\]: If you need to search the relevant passages to a query, we suggest to add the instruction to the query; in other cases, no instruction is needed, just use the original query directly. In all cases, **no instruction** needs to be added to passages. [2\]: Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. To balance the accuracy and time cost, cross-encoder is widely used to re-rank top-k documents retrieved by other simple models. For examples, use bge embedding model to retrieve top 100 relevant documents, and then use bge reranker to re-rank the top 100 document to get the final top-3 results. All models have been uploaded to Huggingface Hub, and you can see them at https://huggingface.co/BAAI. If you cannot open the Huggingface Hub, you also can download the models at https://model.baai.ac.cn/models . ## Frequently asked questions <details> <summary>1. How to fine-tune bge embedding model?</summary> <!-- ### How to fine-tune bge embedding model? --> Following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) to prepare data and fine-tune your model. Some suggestions: - Mine hard negatives following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune#hard-negatives), which can improve the retrieval performance. - If you pre-train bge on your data, the pre-trained model cannot be directly used to calculate similarity, and it must be fine-tuned with contrastive learning before computing similarity. - If the accuracy of the fine-tuned model is still not high, it is recommended to use/fine-tune the cross-encoder model (bge-reranker) to re-rank top-k results. Hard negatives also are needed to fine-tune reranker. </details> <details> <summary>2. The similarity score between two dissimilar sentences is higher than 0.5</summary> <!-- ### The similarity score between two dissimilar sentences is higher than 0.5 --> **Suggest to use bge v1.5, which alleviates the issue of the similarity distribution.** Since we finetune the models by contrastive learning with a temperature of 0.01, the similarity distribution of the current BGE model is about in the interval \[0.6, 1\]. So a similarity score greater than 0.5 does not indicate that the two sentences are similar. For downstream tasks, such as passage retrieval or semantic similarity, **what matters is the relative order of the scores, not the absolute value.** If you need to filter similar sentences based on a similarity threshold, please select an appropriate similarity threshold based on the similarity distribution on your data (such as 0.8, 0.85, or even 0.9). </details> <details> <summary>3. When does the query instruction need to be used</summary> <!-- ### When does the query instruction need to be used --> For the `bge-*-v1.5`, we improve its retrieval ability when not using instruction. No instruction only has a slight degradation in retrieval performance compared with using instruction. So you can generate embedding without instruction in all cases for convenience. For a retrieval task that uses short queries to find long related documents, it is recommended to add instructions for these short queries. **The best method to decide whether to add instructions for queries is choosing the setting that achieves better performance on your task.** In all cases, the documents/passages do not need to add the instruction. </details> ## Usage ### Usage for Embedding Model Here are some examples for using `bge` models with [FlagEmbedding](#using-flagembedding), [Sentence-Transformers](#using-sentence-transformers), [Langchain](#using-langchain), or [Huggingface Transformers](#using-huggingface-transformers). #### Using FlagEmbedding ``` pip install -U FlagEmbedding ``` If it doesn't work for you, you can see [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md) for more methods to install FlagEmbedding. ```python from FlagEmbedding import FlagModel sentences_1 = ["样例数据-1", "样例数据-2"] sentences_2 = ["样例数据-3", "样例数据-4"] model = FlagModel('BAAI/bge-large-zh-v1.5', query_instruction_for_retrieval="为这个句子生成表示以用于检索相关文章:", use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation embeddings_1 = model.encode(sentences_1) embeddings_2 = model.encode(sentences_2) similarity = embeddings_1 @ embeddings_2.T print(similarity) # for s2p(short query to long passage) retrieval task, suggest to use encode_queries() which will automatically add the instruction to each query # corpus in retrieval task can still use encode() or encode_corpus(), since they don't need instruction queries = ['query_1', 'query_2'] passages = ["样例文档-1", "样例文档-2"] q_embeddings = model.encode_queries(queries) p_embeddings = model.encode(passages) scores = q_embeddings @ p_embeddings.T ``` For the value of the argument `query_instruction_for_retrieval`, see [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list). By default, FlagModel will use all available GPUs when encoding. Please set `os.environ["CUDA_VISIBLE_DEVICES"]` to select specific GPUs. You also can set `os.environ["CUDA_VISIBLE_DEVICES"]=""` to make all GPUs unavailable. #### Using Sentence-Transformers You can also use the `bge` models with [sentence-transformers](https://www.SBERT.net): ``` pip install -U sentence-transformers ``` ```python from sentence_transformers import SentenceTransformer sentences_1 = ["样例数据-1", "样例数据-2"] sentences_2 = ["样例数据-3", "样例数据-4"] model = SentenceTransformer('BAAI/bge-large-zh-v1.5') embeddings_1 = model.encode(sentences_1, normalize_embeddings=True) embeddings_2 = model.encode(sentences_2, normalize_embeddings=True) similarity = embeddings_1 @ embeddings_2.T print(similarity) ``` For s2p(short query to long passage) retrieval task, each short query should start with an instruction (instructions see [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list)). But the instruction is not needed for passages. ```python from sentence_transformers import SentenceTransformer queries = ['query_1', 'query_2'] passages = ["样例文档-1", "样例文档-2"] instruction = "为这个句子生成表示以用于检索相关文章:" model = SentenceTransformer('BAAI/bge-large-zh-v1.5') q_embeddings = model.encode([instruction+q for q in queries], normalize_embeddings=True) p_embeddings = model.encode(passages, normalize_embeddings=True) scores = q_embeddings @ p_embeddings.T ``` #### Using Langchain You can use `bge` in langchain like this: ```python from langchain.embeddings import HuggingFaceBgeEmbeddings model_name = "BAAI/bge-large-en-v1.5" model_kwargs = {'device': 'cuda'} encode_kwargs = {'normalize_embeddings': True} # set True to compute cosine similarity model = HuggingFaceBgeEmbeddings( model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs, query_instruction="为这个句子生成表示以用于检索相关文章:" ) model.query_instruction = "为这个句子生成表示以用于检索相关文章:" ``` #### Using HuggingFace Transformers With the transformers package, you can use the model like this: First, you pass your input through the transformer model, then you select the last hidden state of the first token (i.e., [CLS]) as the sentence embedding. ```python from transformers import AutoTokenizer, AutoModel import torch # Sentences we want sentence embeddings for sentences = ["样例数据-1", "样例数据-2"] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-large-zh-v1.5') model = AutoModel.from_pretrained('BAAI/bge-large-zh-v1.5') model.eval() # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # for s2p(short query to long passage) retrieval task, add an instruction to query (not add instruction for passages) # encoded_input = tokenizer([instruction + q for q in queries], padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, cls pooling. sentence_embeddings = model_output[0][:, 0] # normalize embeddings sentence_embeddings = torch.nn.functional.normalize(sentence_embeddings, p=2, dim=1) print("Sentence embeddings:", sentence_embeddings) ``` ### Usage for Reranker Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. You can get a relevance score by inputting query and passage to the reranker. The reranker is optimized based cross-entropy loss, so the relevance score is not bounded to a specific range. #### Using FlagEmbedding ``` pip install -U FlagEmbedding ``` Get relevance scores (higher scores indicate more relevance): ```python from FlagEmbedding import FlagReranker reranker = FlagReranker('BAAI/bge-reranker-large', use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation score = reranker.compute_score(['query', 'passage']) print(score) scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']]) print(scores) ``` #### Using Huggingface transformers ```python import torch from transformers import AutoModelForSequenceClassification, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-reranker-large') model = AutoModelForSequenceClassification.from_pretrained('BAAI/bge-reranker-large') model.eval() pairs = [['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']] with torch.no_grad(): inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512) scores = model(**inputs, return_dict=True).logits.view(-1, ).float() print(scores) ``` ## Evaluation `baai-general-embedding` models achieve **state-of-the-art performance on both MTEB and C-MTEB leaderboard!** For more details and evaluation tools see our [scripts](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md). - **MTEB**: | Model Name | Dimension | Sequence Length | Average (56) | Retrieval (15) |Clustering (11) | Pair Classification (3) | Reranking (4) | STS (10) | Summarization (1) | Classification (12) | |:----:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) | 1024 | 512 | **64.23** | **54.29** | 46.08 | 87.12 | 60.03 | 83.11 | 31.61 | 75.97 | | [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) | 768 | 512 | 63.55 | 53.25 | 45.77 | 86.55 | 58.86 | 82.4 | 31.07 | 75.53 | | [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) | 384 | 512 | 62.17 |51.68 | 43.82 | 84.92 | 58.36 | 81.59 | 30.12 | 74.14 | | [bge-large-en](https://huggingface.co/BAAI/bge-large-en) | 1024 | 512 | 63.98 | 53.9 | 46.98 | 85.8 | 59.48 | 81.56 | 32.06 | 76.21 | | [bge-base-en](https://huggingface.co/BAAI/bge-base-en) | 768 | 512 | 63.36 | 53.0 | 46.32 | 85.86 | 58.7 | 81.84 | 29.27 | 75.27 | | [gte-large](https://huggingface.co/thenlper/gte-large) | 1024 | 512 | 63.13 | 52.22 | 46.84 | 85.00 | 59.13 | 83.35 | 31.66 | 73.33 | | [gte-base](https://huggingface.co/thenlper/gte-base) | 768 | 512 | 62.39 | 51.14 | 46.2 | 84.57 | 58.61 | 82.3 | 31.17 | 73.01 | | [e5-large-v2](https://huggingface.co/intfloat/e5-large-v2) | 1024| 512 | 62.25 | 50.56 | 44.49 | 86.03 | 56.61 | 82.05 | 30.19 | 75.24 | | [bge-small-en](https://huggingface.co/BAAI/bge-small-en) | 384 | 512 | 62.11 | 51.82 | 44.31 | 83.78 | 57.97 | 80.72 | 30.53 | 74.37 | | [instructor-xl](https://huggingface.co/hkunlp/instructor-xl) | 768 | 512 | 61.79 | 49.26 | 44.74 | 86.62 | 57.29 | 83.06 | 32.32 | 61.79 | | [e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) | 768 | 512 | 61.5 | 50.29 | 43.80 | 85.73 | 55.91 | 81.05 | 30.28 | 73.84 | | [gte-small](https://huggingface.co/thenlper/gte-small) | 384 | 512 | 61.36 | 49.46 | 44.89 | 83.54 | 57.7 | 82.07 | 30.42 | 72.31 | | [text-embedding-ada-002](https://platform.openai.com/docs/guides/embeddings) | 1536 | 8192 | 60.99 | 49.25 | 45.9 | 84.89 | 56.32 | 80.97 | 30.8 | 70.93 | | [e5-small-v2](https://huggingface.co/intfloat/e5-base-v2) | 384 | 512 | 59.93 | 49.04 | 39.92 | 84.67 | 54.32 | 80.39 | 31.16 | 72.94 | | [sentence-t5-xxl](https://huggingface.co/sentence-transformers/sentence-t5-xxl) | 768 | 512 | 59.51 | 42.24 | 43.72 | 85.06 | 56.42 | 82.63 | 30.08 | 73.42 | | [all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) | 768 | 514 | 57.78 | 43.81 | 43.69 | 83.04 | 59.36 | 80.28 | 27.49 | 65.07 | | [sgpt-bloom-7b1-msmarco](https://huggingface.co/bigscience/sgpt-bloom-7b1-msmarco) | 4096 | 2048 | 57.59 | 48.22 | 38.93 | 81.9 | 55.65 | 77.74 | 33.6 | 66.19 | - **C-MTEB**: We create the benchmark C-MTEB for Chinese text embedding which consists of 31 datasets from 6 tasks. Please refer to [C_MTEB](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md) for a detailed introduction. | Model | Embedding dimension | Avg | Retrieval | STS | PairClassification | Classification | Reranking | Clustering | |:-------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | [**BAAI/bge-large-zh-v1.5**](https://huggingface.co/BAAI/bge-large-zh-v1.5) | 1024 | **64.53** | 70.46 | 56.25 | 81.6 | 69.13 | 65.84 | 48.99 | | [BAAI/bge-base-zh-v1.5](https://huggingface.co/BAAI/bge-base-zh-v1.5) | 768 | 63.13 | 69.49 | 53.72 | 79.75 | 68.07 | 65.39 | 47.53 | | [BAAI/bge-small-zh-v1.5](https://huggingface.co/BAAI/bge-small-zh-v1.5) | 512 | 57.82 | 61.77 | 49.11 | 70.41 | 63.96 | 60.92 | 44.18 | | [BAAI/bge-large-zh](https://huggingface.co/BAAI/bge-large-zh) | 1024 | 64.20 | 71.53 | 54.98 | 78.94 | 68.32 | 65.11 | 48.39 | | [bge-large-zh-noinstruct](https://huggingface.co/BAAI/bge-large-zh-noinstruct) | 1024 | 63.53 | 70.55 | 53 | 76.77 | 68.58 | 64.91 | 50.01 | | [BAAI/bge-base-zh](https://huggingface.co/BAAI/bge-base-zh) | 768 | 62.96 | 69.53 | 54.12 | 77.5 | 67.07 | 64.91 | 47.63 | | [multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) | 1024 | 58.79 | 63.66 | 48.44 | 69.89 | 67.34 | 56.00 | 48.23 | | [BAAI/bge-small-zh](https://huggingface.co/BAAI/bge-small-zh) | 512 | 58.27 | 63.07 | 49.45 | 70.35 | 63.64 | 61.48 | 45.09 | | [m3e-base](https://huggingface.co/moka-ai/m3e-base) | 768 | 57.10 | 56.91 | 50.47 | 63.99 | 67.52 | 59.34 | 47.68 | | [m3e-large](https://huggingface.co/moka-ai/m3e-large) | 1024 | 57.05 | 54.75 | 50.42 | 64.3 | 68.2 | 59.66 | 48.88 | | [multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) | 768 | 55.48 | 61.63 | 46.49 | 67.07 | 65.35 | 54.35 | 40.68 | | [multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) | 384 | 55.38 | 59.95 | 45.27 | 66.45 | 65.85 | 53.86 | 45.26 | | [text-embedding-ada-002(OpenAI)](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings) | 1536 | 53.02 | 52.0 | 43.35 | 69.56 | 64.31 | 54.28 | 45.68 | | [luotuo](https://huggingface.co/silk-road/luotuo-bert-medium) | 1024 | 49.37 | 44.4 | 42.78 | 66.62 | 61 | 49.25 | 44.39 | | [text2vec-base](https://huggingface.co/shibing624/text2vec-base-chinese) | 768 | 47.63 | 38.79 | 43.41 | 67.41 | 62.19 | 49.45 | 37.66 | | [text2vec-large](https://huggingface.co/GanymedeNil/text2vec-large-chinese) | 1024 | 47.36 | 41.94 | 44.97 | 70.86 | 60.66 | 49.16 | 30.02 | - **Reranking**: See [C_MTEB](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/) for evaluation script. | Model | T2Reranking | T2RerankingZh2En\* | T2RerankingEn2Zh\* | MMarcoReranking | CMedQAv1 | CMedQAv2 | Avg | |:-------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | text2vec-base-multilingual | 64.66 | 62.94 | 62.51 | 14.37 | 48.46 | 48.6 | 50.26 | | multilingual-e5-small | 65.62 | 60.94 | 56.41 | 29.91 | 67.26 | 66.54 | 57.78 | | multilingual-e5-large | 64.55 | 61.61 | 54.28 | 28.6 | 67.42 | 67.92 | 57.4 | | multilingual-e5-base | 64.21 | 62.13 | 54.68 | 29.5 | 66.23 | 66.98 | 57.29 | | m3e-base | 66.03 | 62.74 | 56.07 | 17.51 | 77.05 | 76.76 | 59.36 | | m3e-large | 66.13 | 62.72 | 56.1 | 16.46 | 77.76 | 78.27 | 59.57 | | bge-base-zh-v1.5 | 66.49 | 63.25 | 57.02 | 29.74 | 80.47 | 84.88 | 63.64 | | bge-large-zh-v1.5 | 65.74 | 63.39 | 57.03 | 28.74 | 83.45 | 85.44 | 63.97 | | [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | 67.28 | 63.95 | 60.45 | 35.46 | 81.26 | 84.1 | 65.42 | | [BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | 67.6 | 64.03 | 61.44 | 37.16 | 82.15 | 84.18 | 66.09 | \* : T2RerankingZh2En and T2RerankingEn2Zh are cross-language retrieval tasks ## Train ### BAAI Embedding We pre-train the models using [retromae](https://github.com/staoxiao/RetroMAE) and train them on large-scale pairs data using contrastive learning. **You can fine-tune the embedding model on your data following our [examples](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune).** We also provide a [pre-train example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/pretrain). Note that the goal of pre-training is to reconstruct the text, and the pre-trained model cannot be used for similarity calculation directly, it needs to be fine-tuned. More training details for bge see [baai_general_embedding](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md). ### BGE Reranker Cross-encoder will perform full-attention over the input pair, which is more accurate than embedding model (i.e., bi-encoder) but more time-consuming than embedding model. Therefore, it can be used to re-rank the top-k documents returned by embedding model. We train the cross-encoder on a multilingual pair data, The data format is the same as embedding model, so you can fine-tune it easily following our [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker). More details please refer to [./FlagEmbedding/reranker/README.md](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker) ## Contact If you have any question or suggestion related to this project, feel free to open an issue or pull request. You also can email Shitao Xiao([email protected]) and Zheng Liu([email protected]). ## Citation If you find this repository useful, please consider giving a star :star: and citation ``` @misc{bge_embedding, title={C-Pack: Packaged Resources To Advance General Chinese Embedding}, author={Shitao Xiao and Zheng Liu and Peitian Zhang and Niklas Muennighoff}, year={2023}, eprint={2309.07597}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` ## License FlagEmbedding is licensed under the [MIT License](https://github.com/FlagOpen/FlagEmbedding/blob/master/LICENSE). The released models can be used for commercial purposes free of charge.
[ -0.4917970299720764, -0.9121562242507935, 0.39335909485816956, 0.15926150977611542, -0.3644159436225891, -0.27619844675064087, -0.3187490701675415, -0.2546616792678833, 0.4034213423728943, 0.3811470866203308, -0.3493821918964386, -0.8789252638816833, -0.48434871435165405, -0.061868757009506226, -0.08562654256820679, 0.5569250583648682, -0.05040394887328148, 0.14363285899162292, 0.052729532122612, -0.25072580575942993, -0.38095730543136597, -0.25557446479797363, -0.6599745154380798, -0.2580225467681885, 0.3454954922199249, 0.22898080945014954, 0.5664677023887634, 0.7565454244613647, 0.29929855465888977, 0.27112576365470886, -0.23612339794635773, 0.1565926969051361, -0.47967153787612915, -0.06917298585176468, -0.20805604755878448, -0.33379724621772766, -0.4219249486923218, 0.1771097332239151, 0.6846937537193298, 0.45031237602233887, -0.10390447080135345, 0.10425695776939392, 0.00692377844825387, 0.71429044008255, -0.46325114369392395, 0.27861225605010986, -0.5734079480171204, 0.03648480027914047, -0.24258849024772644, 0.1513890027999878, -0.5183275938034058, -0.3853422999382019, 0.1603473275899887, -0.6159512400627136, 0.08287999778985977, 0.2900417149066925, 1.307506799697876, 0.20688290894031525, -0.45559000968933105, -0.16615848243236542, -0.12169365584850311, 0.994102954864502, -1.0095791816711426, 0.6872597932815552, 0.5090594291687012, 0.25554022192955017, -0.0781526267528534, -0.8174024224281311, -0.3616727888584137, -0.16660532355308533, -0.20328503847122192, 0.4233214557170868, 0.0256485752761364, 0.019987745210528374, 0.3170413672924042, 0.5985334515571594, -0.5553396344184875, 0.0947275385260582, -0.06872905045747757, -0.15926045179367065, 0.7642083168029785, -0.1649675816297531, 0.45869553089141846, -0.5581547021865845, -0.29989349842071533, -0.3680296242237091, -0.8007943630218506, 0.04600268974900246, 0.3670075833797455, 0.137363001704216, -0.39358171820640564, 0.5685566663742065, -0.22973068058490753, 0.6109962463378906, 0.05062193423509598, 0.0516192652285099, 0.5265907049179077, -0.374182790517807, -0.20757225155830383, -0.14727148413658142, 0.9336583018302917, 0.3954954743385315, -0.057964473962783813, 0.05175301060080528, -0.32384660840034485, -0.09511028230190277, -0.09334386885166168, -0.8982179164886475, -0.24408532679080963, 0.19886384904384613, -0.7663068175315857, -0.18192589282989502, 0.23823782801628113, -0.7802329063415527, 0.10407708585262299, 0.0016007493250072002, 0.585857629776001, -0.7480831146240234, -0.07390255481004715, 0.31346237659454346, -0.2118411660194397, 0.4023590385913849, -0.003231465583667159, -0.6287349462509155, -0.24859385192394257, 0.5332337617874146, 0.860173761844635, 0.16767533123493195, -0.07676992565393448, -0.3748384118080139, 0.03796732425689697, -0.1430635154247284, 0.3286088705062866, -0.5217965245246887, -0.17894569039344788, 0.21137920022010803, 0.38862374424934387, -0.10362780094146729, -0.291079580783844, 0.8852188587188721, -0.5387099981307983, 0.36164164543151855, -0.3797711431980133, -0.8259833455085754, -0.503160297870636, 0.09275687485933304, -0.8069127202033997, 1.1115566492080688, -0.09858797490596771, -0.8519017696380615, 0.08340819180011749, -0.6473492980003357, -0.21710936725139618, -0.25654977560043335, -0.033439960330724716, -0.6009854674339294, -0.11823835223913193, 0.38206779956817627, 0.586105227470398, -0.22970585525035858, 0.03495078533887863, -0.3490271270275116, -0.5734331607818604, -0.007032394874840975, -0.23192544281482697, 1.0995248556137085, 0.2569870948791504, -0.3371439576148987, -0.2211025208234787, -0.43995827436447144, 0.12060470134019852, 0.3049491047859192, -0.3136955797672272, -0.34632110595703125, 0.22229573130607605, 0.23741373419761658, 0.0519283302128315, 0.532094419002533, -0.7079308032989502, 0.18408465385437012, -0.5881211161613464, 0.596612274646759, 0.5611453056335449, 0.17341366410255432, 0.24086976051330566, -0.4767483174800873, 0.28925153613090515, -0.023568883538246155, -0.03820270299911499, -0.2231236845254898, -0.5332085490226746, -0.6302730441093445, -0.3037233054637909, 0.7439141869544983, 0.6626705527305603, -0.8764532208442688, 0.6678094267845154, -0.4590986669063568, -0.6218410730361938, -0.9469890594482422, 0.13509726524353027, 0.5358606576919556, 0.002314120065420866, 0.7215077877044678, -0.13861384987831116, -0.4815653860569, -0.938438355922699, -0.06217969208955765, 0.07854179292917252, -0.09143476188182831, 0.5395910739898682, 0.617742121219635, -0.3207966387271881, 0.4096141755580902, -0.7361123561859131, -0.35045313835144043, -0.23097604513168335, -0.07369431853294373, 0.34056612849235535, 0.49303698539733887, 0.6417325735092163, -1.0118588209152222, -0.5865143537521362, -0.008065720088779926, -0.7820898294448853, 0.07667311280965805, 0.036675386130809784, -0.30095741152763367, 0.17536960542201996, 0.612797737121582, -0.4129248559474945, 0.23894579708576202, 0.47879064083099365, -0.25913238525390625, 0.2828845679759979, -0.02090475521981716, 0.14730790257453918, -1.330299973487854, 0.022242818027734756, 0.30332544445991516, -0.11486539244651794, -0.27505314350128174, 0.5225419402122498, 0.17051756381988525, 0.2073279321193695, -0.34719759225845337, 0.5901947021484375, -0.5294108390808105, 0.25197452306747437, 0.12947365641593933, 0.6173920035362244, -0.0899772047996521, 0.5147316455841064, -0.04709700495004654, 0.7206954956054688, 0.37333211302757263, -0.4015792906284332, 0.12459217011928558, 0.5308554172515869, -0.44731444120407104, 0.08171137422323227, -0.6624714732170105, -0.07638781517744064, -0.07412522286176682, 0.16863416135311127, -0.8326302170753479, -0.0733034536242485, 0.26644769310951233, -0.5769767761230469, 0.5308395624160767, -0.3013218343257904, -0.49975740909576416, -0.3710670471191406, -0.9166911840438843, 0.1475072205066681, 0.5871821641921997, -0.6514768600463867, 0.22120033204555511, 0.2969546318054199, 0.09350575506687164, -0.7782111763954163, -0.8228302001953125, -0.15640223026275635, -0.002264339243993163, -0.5303692817687988, 0.5489431023597717, -0.02883104979991913, 0.25723689794540405, 0.19024287164211273, -0.07193037867546082, 0.15140888094902039, 0.11663859337568283, -0.0029365697409957647, 0.24749252200126648, -0.4802510738372803, 0.0476856529712677, 0.275939404964447, 0.1315978318452835, -0.19963866472244263, -0.16270552575588226, 0.44453224539756775, -0.1731950342655182, -0.35953885316848755, -0.2387179136276245, 0.34303024411201477, 0.2581000030040741, -0.4079892933368683, 0.5978900790214539, 0.9997373223304749, -0.37799617648124695, -0.08413289487361908, -0.6667248010635376, -0.12422462552785873, -0.4862056374549866, 0.4579135477542877, -0.32667216658592224, -0.9906607270240784, 0.3992321789264679, -0.020395895466208458, 0.218032568693161, 0.6829168200492859, 0.3386148512363434, -0.1428033858537674, 1.0860356092453003, 0.3779831826686859, -0.2722134292125702, 0.6689903140068054, -0.6675193309783936, 0.17887775599956512, -1.1849076747894287, -0.04504662752151489, -0.39903220534324646, -0.39822685718536377, -1.3405680656433105, -0.5106154680252075, 0.06238797679543495, 0.2820959985256195, -0.38379231095314026, 0.4338037371635437, -0.5777703523635864, 0.15388894081115723, 0.48900970816612244, 0.2991540729999542, -0.018452363088726997, 0.12543046474456787, -0.4379253685474396, -0.27333033084869385, -0.615394115447998, -0.5130186676979065, 1.0093634128570557, 0.48818039894104004, 0.6184115409851074, 0.36703652143478394, 0.8317365050315857, 0.1904895156621933, 0.09796921163797379, -0.780764639377594, 0.5773665308952332, -0.5281172394752502, -0.5766896605491638, -0.3623805642127991, -0.4928167462348938, -1.1266753673553467, 0.40084049105644226, -0.27620500326156616, -0.7827890515327454, 0.10814967751502991, -0.19935756921768188, -0.030741354450583458, 0.47183531522750854, -0.6826187968254089, 1.0363374948501587, -0.10903039574623108, -0.3109346330165863, -0.07844258099794388, -0.4234257936477661, 0.32927194237709045, 0.20091412961483002, 0.08322131633758545, 0.07470317929983139, -0.26243671774864197, 0.7681471109390259, -0.18991416692733765, 0.6442910432815552, -0.1636548787355423, 0.15086346864700317, 0.4350244402885437, -0.18594372272491455, 0.5594721436500549, 0.08093002438545227, -0.18204768002033234, 0.30464738607406616, 0.09054489433765411, -0.48835110664367676, -0.5022341012954712, 0.8901168704032898, -0.6806955933570862, -0.7152196168899536, -0.3792705833911896, -0.25338515639305115, 0.18115606904029846, 0.4426770508289337, 0.3571534752845764, 0.22144240140914917, -0.10434862226247787, 0.6539531946182251, 0.9369509220123291, -0.5519316792488098, 0.38803672790527344, 0.350559264421463, -0.2768425941467285, -0.5992287993431091, 1.1354446411132812, 0.2656397819519043, -0.05330642685294151, 0.6816064715385437, 0.01351808663457632, -0.28277260065078735, -0.5373090505599976, -0.4611698389053345, 0.6434146165847778, -0.600497305393219, -0.16940733790397644, -0.6488251090049744, -0.4323805570602417, -0.43788644671440125, 0.022176872938871384, -0.2742101550102234, -0.2864987552165985, -0.18045517802238464, -0.28421303629875183, 0.23849305510520935, 0.48024874925613403, 0.12320030480623245, 0.08978405594825745, -0.7190878391265869, 0.21328915655612946, -0.09880057722330093, 0.4449179470539093, 0.07253655791282654, -0.546136736869812, -0.6290742754936218, 0.17635180056095123, -0.4961189925670624, -1.097845196723938, 0.3527429401874542, 0.0763259083032608, 0.8483840823173523, 0.3333483338356018, -0.01122608594596386, 0.41526830196380615, -0.5310884118080139, 1.081298828125, -0.10962003469467163, -0.7951414585113525, 0.5159289240837097, -0.28411999344825745, 0.16692203283309937, 0.5661880970001221, 0.6615703105926514, -0.46920469403266907, -0.27738773822784424, -0.4974641799926758, -0.9762814044952393, 0.49247539043426514, 0.1843331754207611, 0.043226901441812515, -0.3003985583782196, 0.3328987658023834, -0.18441903591156006, -0.0023139920085668564, -0.8095731139183044, -0.7547932863235474, -0.33806613087654114, -0.35643884539604187, -0.0979190468788147, -0.28025397658348083, 0.20887281000614166, -0.29385653138160706, 1.0127955675125122, 0.004170624539256096, 0.5556016564369202, 0.36256203055381775, -0.33087679743766785, 0.24234871566295624, 0.25593316555023193, 0.30133670568466187, 0.18955889344215393, -0.3912491500377655, -0.14632770419120789, 0.3187618851661682, -0.5581767559051514, -0.06475118547677994, 0.31365451216697693, -0.47415584325790405, 0.19585788249969482, 0.3093602955341339, 0.7157406806945801, 0.45411843061447144, -0.4482158422470093, 0.5723576545715332, 0.11585415154695511, -0.19031701982021332, -0.3024125397205353, -0.07244732975959778, 0.3090818226337433, 0.25450772047042847, 0.11810966581106186, -0.4614958167076111, 0.26804250478744507, -0.5359582901000977, 0.3429628610610962, 0.45435860753059387, -0.38470590114593506, -0.0678970068693161, 0.70831298828125, 0.034975845366716385, -0.021308057010173798, 0.4843420386314392, -0.5078408718109131, -0.7446918487548828, 0.4296441674232483, 0.3791488707065582, 0.8493991494178772, -0.1474267691373825, 0.2266235500574112, 0.8720858097076416, 0.5383305549621582, -0.32331085205078125, 0.36064058542251587, 0.07824323326349258, -0.5908493399620056, -0.4484456181526184, -0.5486404895782471, -0.05894216150045395, 0.26951584219932556, -0.5846852660179138, 0.35474514961242676, -0.4215252995491028, -0.1495818942785263, 0.031722791492938995, 0.44416430592536926, -0.7529358863830566, 0.1280055046081543, 0.0456489622592926, 1.1375863552093506, -0.5906219482421875, 0.8449050188064575, 1.0035991668701172, -0.969935953617096, -0.7814849615097046, 0.08019335567951202, -0.13211701810359955, -0.6157646775245667, 0.37970051169395447, 0.2669503688812256, 0.1790168732404709, 0.0628160610795021, -0.4824950397014618, -0.9240347146987915, 1.586942195892334, 0.038656748831272125, -0.5351653695106506, -0.0627468153834343, -0.2851398289203644, 0.4628412127494812, -0.3825380802154541, 0.451323926448822, 0.41685330867767334, 0.6175791025161743, -0.18728259205818176, -0.6515793204307556, 0.5485309958457947, -0.3199205994606018, 0.23725971579551697, 0.04955912381410599, -0.984024703502655, 0.8381196856498718, 0.046198565512895584, -0.3352476954460144, 0.19697697460651398, 0.731243908405304, 0.2325790673494339, 0.42402613162994385, 0.24393317103385925, 0.9391081929206848, 0.6669497489929199, -0.22529436647891998, 1.1691102981567383, -0.26123324036598206, 0.635422945022583, 0.8789224624633789, 0.17103832960128784, 1.1311215162277222, 0.08972802758216858, -0.2383190542459488, 0.6788000464439392, 0.8010855317115784, -0.32304438948631287, 0.4705699682235718, 0.018947070464491844, 0.06136717274785042, -0.3231780230998993, 0.05400153994560242, -0.5413292646408081, 0.29115355014801025, 0.3292744755744934, -0.5224844217300415, 0.04530218616127968, -0.29604601860046387, 0.12072090059518814, 0.10746816545724869, -0.022620033472776413, 0.5829463005065918, 0.3159216642379761, -0.47084447741508484, 0.672248899936676, 0.23842239379882812, 1.0218559503555298, -0.4089002311229706, -0.15431565046310425, -0.28587907552719116, -0.11535292118787766, -0.22934561967849731, -0.790655791759491, -0.08192181587219238, -0.26000723242759705, -0.2086254209280014, 0.08522395044565201, 0.5456407070159912, -0.6298020482063293, -0.4112842082977295, 0.5716066360473633, 0.5203923583030701, 0.2451905906200409, 0.18083496391773224, -1.1097532510757446, 0.03155858442187309, 0.38683757185935974, -0.5384969115257263, 0.31043702363967896, 0.47696754336357117, -0.06284209340810776, 0.5959566235542297, 0.5904459357261658, 0.06490226835012436, -0.01969398558139801, 0.04061232879757881, 0.5199528932571411, -0.9449971914291382, -0.3085385859012604, -0.6386343240737915, 0.3643895387649536, -0.3301919102668762, 0.0221808310598135, 0.8165912628173828, 0.7114246487617493, 1.084007740020752, -0.05303525552153587, 0.8228715658187866, -0.11570622026920319, 0.41215577721595764, -0.6082319021224976, 0.9007401466369629, -1.0377278327941895, 0.2609661817550659, -0.35725247859954834, -0.9467119574546814, -0.15897879004478455, 0.707438588142395, -0.3395439088344574, 0.23371893167495728, 0.6871347427368164, 0.9879443645477295, -0.25833117961883545, -0.1929139345884323, 0.3111801743507385, 0.44082456827163696, 0.15963251888751984, 0.8009560704231262, 0.3490568697452545, -0.9881619811058044, 0.6472155451774597, -0.2394942045211792, 0.12903288006782532, -0.525607705116272, -0.6428669691085815, -0.931767463684082, -0.7401321530342102, -0.42517736554145813, -0.30864813923835754, -0.04586928337812424, 0.9298316240310669, 0.34564995765686035, -0.7558746337890625, -0.06993477046489716, 0.2788669466972351, 0.4898790717124939, -0.2695677578449249, -0.27795010805130005, 0.6664249300956726, -0.07666083425283432, -0.9447400569915771, 0.3316705524921417, -0.08436305820941925, -0.06884507834911346, -0.05372384190559387, -0.24726758897304535, -0.8908063173294067, 0.12003599107265472, 0.6033106446266174, 0.25743740797042847, -0.9210304021835327, -0.4236951172351837, 0.085548996925354, -0.26322922110557556, -0.1556014120578766, 0.17063041031360626, -0.41602054238319397, 0.36280158162117004, 0.6252936124801636, 0.7770823240280151, 0.6671158671379089, -0.04740946739912033, 0.20530149340629578, -0.6183277368545532, -0.08610108494758606, -0.042357608675956726, 0.7162543535232544, 0.36767950654029846, -0.30395805835723877, 0.910102903842926, 0.2162483185529709, -0.4089943766593933, -0.7599421739578247, 0.03271307051181793, -1.0642472505569458, -0.3319217562675476, 1.127224326133728, -0.42954444885253906, -0.25271299481391907, 0.27581310272216797, -0.19327957928180695, 0.5534521341323853, -0.49581798911094666, 0.47473666071891785, 0.8054698705673218, 0.438792884349823, -0.15727850794792175, -0.9182953238487244, 0.315695583820343, 0.6267865896224976, -0.2778308391571045, -0.342660516500473, 0.3409629166126251, 0.48798197507858276, 0.2409132719039917, 0.11801017075777054, -0.24918068945407867, 0.32204949855804443, -0.07588997483253479, -0.008661134168505669, -0.1395338475704193, 0.2484905868768692, -0.18418358266353607, 0.0261821448802948, -0.16862145066261292, -0.31124991178512573 ]
vabatista/question-generation-t5-small-pt-br-2
vabatista
"2023-11-09T20:55:02Z"
356,172
0
transformers
[ "transformers", "pytorch", "t5", "feature-extraction", "text2text-generation", "pt", "dataset:squad", "license:afl-3.0", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
"2023-08-22T15:03:09Z"
--- license: afl-3.0 language: - pt pipeline_tag: text2text-generation datasets: - squad widget: - text: "extrair respostas: \nA Volkswagen anunciou a chegada do ID.Buzz, a Kombi elétrica, ao Brasil. <hl> Em campanha publicitária, a marca alemã usou tecnologia de inteligência artificial para criar um comercial com a cantora Elis Regina, falecida em 1982, e a sua filha, a também cantora Maria Rita. <hl> Ambas aparecem cantando juntas a música 'Como Nossos Pais', composta por Belchior e eternizada por Elis. O vídeo, que já foi divulgado nas redes sociais da marca, foi exibido pela primeira vez em comemoração de 70 anos da Volkswagen no ginásio do Ibirapuera, em São Paulo." example_title: "1 - Extract Answers" - text: "gerar pergunta: Em campanha publicitária, a marca alemã usou tecnologia de inteligência artificial para criar um comercial com a cantora Elis Regina, falecida em <hl> 1982 <hl>, e a sua filha, a também cantora Maria Rita." example_title: "2 - Generate Questions ex-1" - text: "gerar pergunta: Em campanha publicitária, a marca alemã usou tecnologia de inteligência artificial para criar um comercial com a cantora Elis Regina, falecida em 1982, e a sua filha, a também cantora <hl> Maria Rita <hl>." example_title: "2 - Generate Questions ex-2" --- # Model Card for Model ID <!-- Provide a quick summary of what the model is/does. --> This model is intended to be used generating questions and answers from brazilian portuguese text passages, so you can finetune another BERT model into your generated triples (context-question-answer) for extractive question answering without supervision or labeled data. It was trained using [unicamp-dl/ptt5-small-t5-portuguese-vocab](https://huggingface.co/unicamp-dl/ptt5-small-t5-portuguese-vocab) base model, [Squad 1.1 portuguese version](https://huggingface.co/datasets/ArthurBaia/squad_v1_pt_br) [Squad 2.0 portuguese version](https://github.com/cjaniake/squad_v2.0_pt) datasets to generante question and answers from text passages. ### Model Description <!-- Provide a longer summary of what this model is. --> - **Developed by:** Vitor Alcantara Batista ([email protected]) - **Model type:** T5 small - **Language(s) (NLP):** Brazilian Portuguese - **License:** [Academic Free License v. 3.0](https://opensource.org/license/afl-3-0-php/) - **Finetuned from model :** unicamp-dl/ptt5-small-t5-portuguese-vocab ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** This model used code from this github repo [https://github.com/patil-suraj/question_generation/](https://github.com/patil-suraj/question_generation/) ## Usage <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> How to use it (after cloning the github repo above): ``` from pipelines import pipeline nlp = pipeline("question-generation", model='vabatista/question-generation-t5-small-pt-br', tokenizer='vabatista/question-generation-t5-small-pt-br') text = """ PUT YOUR TEXT PASSAGE HERE """ nlp(text) ``` Sample usage/results: ``` text = """A Volkswagen anunciou a chegada do ID.Buzz, a Kombi elétrica, ao Brasil. Em campanha publicitária, a marca alemã usou tecnologia de inteligência artificial para criar um comercial com a cantora Elis Regina, falecida em 1982, e a sua filha, a também cantora Maria Rita. Ambas aparecem cantando juntas a música 'Como Nossos Pais', composta por Belchior e eternizada por Elis. O vídeo, que já foi divulgado nas redes sociais da marca, foi exibido pela primeira vez em comemoração de 70 anos da Volkswagen no ginásio do Ibirapuera, em São Paulo. Diante de 5 mil pessoas, entre funcionários e convidados, a apresentação ainda contou com a presença de Maria Rita, que também cantou ao vivo a canção e se emocionou bastante - a cantora chegou a chorar abraçada com Ciro Possobom, CEO da VW do Brasil. A técnica utilizada, conhecida também como "deep fake", aplica IA para criar conteúdos realistas. No caso, foi produzida pela agência AlmapBBDO.""" nlp(text) [{'answer': 'Kombi elétrica', 'question': 'Qual é o nome do ID.Buzz?'}, {'answer': 'tecnologia de inteligência artificial', 'question': 'O que a Volkswagen usou para criar um comercial com Elis Regina?'}, {'answer': 'Como Nossos Pais', 'question': 'Qual é o nome da música que Elis Regina cantou?'}, {'answer': '70 anos', 'question': 'Qual foi o aniversário da Volkswagen em comemoração ao ID.Buzz?'}, {'answer': 'Ciro Possobom', 'question': 'Quem foi o CEO da VW do Brasil?'}, {'answer': 'deep fake', 'question': 'Qual é o outro nome para o ID.Buzz?'}, {'answer': 'AlmapBBDO', 'question': 'Qual agência produziu o ID.Buzz?'}] ``` You may also use this model directly using this inputs (you can test on the sandbox in this page): 1. extrair respostas: \<PHRASE HERE> 2. gerar pergunta: \<HIGHLIGHTED PHRASE HERE> where \<HIGHLIGHTED PHRASE> uses \<hl> token to highlight generated answer. Example: input: "extrair respostas: A Volkswagen anunciou a chegada do ID.Buzz, a Kombi elétrica, ao Brasil." output: ID.Buzz input: "gerar perguntas: A Volkswagen anunciou a chegada do \<hl> ID.Buzz \<hl>, a Kombi elétrica, ao Brasil." output: "Qual é o nome da Kombi elétrica da Volkswagen no Brasil?" ## Training Details 10 epochs, learning-rate 1e-4 ## Model Card Authors Vitor Alcantara Batista ## Model Card Contact [email protected]
[ -0.6642205715179443, -0.9024815559387207, 0.3228507936000824, 0.3707820177078247, -0.3096989393234253, -0.08930134028196335, -0.11711376160383224, -0.5114884376525879, 0.1479339301586151, 0.3399745225906372, -0.8140631914138794, -0.5171664953231812, -0.1385461986064911, 0.10104286670684814, -0.36062344908714294, 0.9743402004241943, 0.20176367461681366, 0.15709973871707916, -0.16984812915325165, 0.1572689563035965, -0.21611154079437256, -0.41795387864112854, -0.7222371101379395, -0.008353794924914837, 0.44047659635543823, 0.09097529947757721, 0.48704755306243896, 0.3353128433227539, 0.1978968232870102, 0.38676774501800537, -0.38287222385406494, 0.2503252923488617, -0.2739535868167877, -0.13160650432109833, -0.33876052498817444, -0.2747825086116791, -0.4383070468902588, -0.14531958103179932, 0.5340695977210999, 0.33873090147972107, -0.02793271839618683, 0.26490479707717896, -0.11448533833026886, 0.1080835610628128, -0.3972361385822296, 0.402459055185318, -0.6929764151573181, -0.1868763566017151, 0.0833183079957962, -0.16564828157424927, -0.1972682774066925, -0.5883224606513977, 0.09950728714466095, -0.6112889647483826, 0.17705664038658142, -0.15741169452667236, 1.4741648435592651, 0.14197470247745514, -0.3213212490081787, -0.38237616419792175, -0.7521737813949585, 0.7831657528877258, -0.9913513660430908, 0.21496988832950592, 0.25394055247306824, 0.43078869581222534, 0.01195432711392641, -0.5394460558891296, -0.9791989326477051, -0.06939605623483658, -0.008967628702521324, 0.3422098457813263, -0.3223798871040344, -0.15142083168029785, 0.2023427039384842, 0.16514481604099274, -0.5624246597290039, 0.04077116772532463, -0.7697911858558655, -0.16208888590335846, 0.7699434161186218, 0.1008647009730339, 0.20215150713920593, -0.30054691433906555, -0.38195478916168213, -0.3947233557701111, -0.47568339109420776, 0.29113805294036865, 0.4687659740447998, 0.1707228124141693, -0.29741302132606506, 0.5238337516784668, -0.2142622172832489, 0.7249448895454407, 0.09903283417224884, -0.08775821328163147, 0.3972432017326355, -0.33888259530067444, -0.4168967008590698, -0.3291015625, 0.9030179381370544, 0.2542895972728729, 0.276303768157959, 0.11063063144683838, 0.08215050399303436, -0.2023005485534668, 0.22322440147399902, -0.5820020437240601, 0.008108152076601982, 0.408551424741745, -0.18107463419437408, -0.4544179141521454, 0.3011758625507355, -0.8461262583732605, 0.2970203459262848, -0.043396901339292526, 0.533400297164917, -0.47478288412094116, -0.35612329840660095, 0.27703458070755005, -0.25959980487823486, 0.7003703117370605, 0.27995815873146057, -0.6901932954788208, 0.03546677157282829, 0.4163496494293213, 0.2924034893512726, 0.15587714314460754, -0.19273346662521362, -0.12027924507856369, 0.2409098595380783, -0.19433584809303284, 0.9329008460044861, -0.30689308047294617, -0.45420709252357483, 0.2603797912597656, 0.3006748557090759, -0.096393883228302, -0.4042878746986389, 0.766407310962677, -0.6247418522834778, 0.6132789254188538, -0.3850715756416321, -0.4719522297382355, -0.3904408812522888, 0.3405775725841522, -0.37159785628318787, 1.110164761543274, -0.08385089784860611, -0.8448933959007263, 0.1954270303249359, -0.6641755700111389, -0.28831347823143005, 0.05851162225008011, -0.23103183507919312, -0.4521825909614563, -0.11710565537214279, 0.36831027269363403, 0.396100252866745, -0.16660429537296295, 0.12141858041286469, -0.33316531777381897, -0.20893685519695282, 0.38624948263168335, -0.4515840411186218, 1.319547176361084, 0.12809999287128448, -0.31377312541007996, 0.08450783044099808, -0.8884499073028564, 0.17213883996009827, 0.3982236087322235, -0.48434263467788696, -0.20839186012744904, -0.13934791088104248, 0.039043497294187546, 0.5349398255348206, 0.37852761149406433, -0.5391411781311035, 0.26176393032073975, -0.7150630354881287, 0.28982973098754883, 0.7041192054748535, 0.34225642681121826, 0.233123317360878, -0.4342955946922302, 0.6307495832443237, 0.04279348626732826, 0.13388632237911224, 0.03775228559970856, -0.6681894063949585, -0.8400371670722961, -0.08108660578727722, 0.28331103920936584, 0.8494028449058533, -0.7184450626373291, 0.6290382146835327, -0.20319722592830658, -0.739193856716156, -0.5451714992523193, -0.031968358904123306, 0.3725190758705139, 0.5330195426940918, 0.45305654406547546, 0.06815455853939056, -0.6879280209541321, -1.0466363430023193, -0.09262020885944366, -0.40977317094802856, -0.2986784875392914, 0.6117737889289856, 0.825370728969574, 0.0920567438006401, 0.850122332572937, -0.5848903059959412, -0.13922519981861115, -0.2235848605632782, 0.06681244820356369, 0.2435828000307083, 0.5719762444496155, 0.7506595849990845, -0.8472996950149536, -0.35935473442077637, -0.18124893307685852, -0.8117941617965698, 0.01366752665489912, -0.12365416437387466, -0.20866695046424866, 0.1578528881072998, 0.30666977167129517, -0.6992784142494202, 0.30137738585472107, 0.4044116139411926, -0.3972673714160919, 0.3886840343475342, -0.31361159682273865, 0.08583367615938187, -1.1481695175170898, 0.13625340163707733, -0.11139048635959625, -0.005763362627476454, -0.3896826207637787, -0.053092893213033676, -0.24738408625125885, 0.13854525983333588, -0.8890730738639832, 0.5192047357559204, -0.25106048583984375, 0.046074945479631424, 0.08630097657442093, -0.033954448997974396, 0.09554766863584518, 0.7112510800361633, 0.046748194843530655, 0.6902334094047546, 0.46622100472450256, -0.8657744526863098, 0.3190653324127197, 0.586840808391571, -0.36034095287323, 0.3567168116569519, -1.0115190744400024, 0.14773023128509521, -0.249980628490448, 0.09989435225725174, -1.1280925273895264, -0.3047617971897125, 0.47653618454933167, -0.7308564186096191, 0.21836070716381073, 0.02410024404525757, -0.6556477546691895, -0.5972209572792053, -0.06843801587820053, 0.1395244151353836, 0.7007725834846497, -0.42900389432907104, 0.5282576084136963, 0.5390468835830688, -0.01186306681483984, -0.4696408212184906, -0.7098060250282288, -0.25454267859458923, -0.2402588278055191, -0.9126302599906921, 0.48044148087501526, -0.31727126240730286, -0.23187658190727234, 0.09861921519041061, 0.058338575065135956, -0.4431096017360687, 0.22373950481414795, 0.0019919644109904766, 0.30552375316619873, -0.2678510248661041, 0.2902510464191437, 0.3385550081729889, 0.24337778985500336, 0.11774707585573196, -0.10233616828918457, 0.7005031108856201, -0.2257637232542038, -0.045186176896095276, -0.515372633934021, 0.5652857422828674, 0.40412089228630066, -0.4072872996330261, 0.9142698049545288, 0.7378132939338684, -0.2786749601364136, -0.12341121584177017, -0.5516945719718933, -0.07120887190103531, -0.48031774163246155, 0.13392312824726105, -0.2644304633140564, -0.7527138590812683, 0.5814743041992188, 0.2800233066082001, 0.18223293125629425, 0.9834941029548645, 0.8369469046592712, -0.4704679846763611, 1.128946304321289, 0.5359137058258057, 0.27340561151504517, 0.47648146748542786, -0.6009392142295837, -0.11452440917491913, -0.35495999455451965, -0.5912931561470032, -0.6919742822647095, -0.034823186695575714, -0.6491954922676086, -0.4718993306159973, 0.24949942529201508, 0.033352382481098175, -0.3350662291049957, 0.27398034930229187, -0.675811767578125, 0.2760636508464813, 0.8353452086448669, -0.01321418210864067, 0.12335316091775894, -0.15992702543735504, 0.009067649021744728, 0.05497313663363457, -0.8732613921165466, -0.6247043609619141, 0.8245194554328918, 0.21464678645133972, 0.3542702794075012, 0.171387180685997, 0.6095865368843079, 0.08438868075609207, 0.0854223370552063, -0.5364470481872559, 0.7339563965797424, 0.20298507809638977, -1.0449215173721313, -0.30006229877471924, -0.18901045620441437, -1.003456711769104, 0.17741519212722778, -0.3238130509853363, -0.5657461285591125, 0.39533448219299316, 0.03622198849916458, -0.5572711229324341, 0.18650364875793457, -0.684118926525116, 1.0588548183441162, -0.29561862349510193, -0.2279016226530075, 0.10558252036571503, -0.6195927858352661, 0.4148261249065399, 0.20759783685207367, 0.16550315916538239, -0.05670483037829399, -0.16466492414474487, 0.9402639269828796, -0.4677960276603699, 0.8878607153892517, -0.13327434659004211, -0.13478009402751923, 0.6482532024383545, -0.3169601261615753, 0.3689599633216858, 0.2837001085281372, 0.068497434258461, 0.24459578096866608, 0.20109333097934723, -0.38467442989349365, -0.4262300729751587, 0.7221800684928894, -0.9215864539146423, -0.48791852593421936, -0.5605552792549133, -0.24479825794696808, 0.007765750400722027, 0.2509878873825073, 0.512651264667511, 0.0767853856086731, -0.23444926738739014, 0.17155620455741882, 0.6759623885154724, -0.5476635694503784, 0.5696333050727844, 0.781676173210144, -0.041199177503585815, -0.32862308621406555, 0.7056083083152771, 0.21603627502918243, 0.023879149928689003, 0.42640766501426697, 0.05132630467414856, -0.37067416310310364, -0.49786198139190674, -0.4043928384780884, 0.4292181730270386, -0.5251654386520386, -0.24471935629844666, -0.8957107663154602, -0.3027792274951935, -0.6925075650215149, 0.04275406897068024, -0.34973400831222534, -0.40598830580711365, -0.4177870750427246, -0.3719325065612793, 0.3790005147457123, 0.4833373725414276, -0.07777249813079834, 0.2730894982814789, -0.5428739786148071, 0.3010239899158478, 0.5565013885498047, 0.10780613869428635, -0.2465580254793167, -0.5910456776618958, -0.1531233787536621, 0.24762918055057526, -0.4031884968280792, -1.1741896867752075, 0.6063737273216248, 0.015177571214735508, 0.5113705396652222, 0.25305822491645813, 0.04064536839723587, 0.6063947677612305, -0.2605859041213989, 1.0013362169265747, -0.20852841436862946, -0.8260258436203003, 0.7794128656387329, -0.5993703007698059, 0.2653997242450714, 0.6116499304771423, 0.5107671618461609, -0.07967492192983627, -0.4157561957836151, -1.0594515800476074, -0.9478307366371155, 0.6204256415367126, 0.40250247716903687, 0.3982395827770233, -0.3265445828437805, 0.14003221690654755, -0.13708072900772095, 0.35859614610671997, -0.9035603404045105, -0.4598565101623535, -0.25126686692237854, 0.07366199791431427, 0.20250500738620758, -0.3011256158351898, -0.08122063428163528, -0.5490571856498718, 1.0545169115066528, 0.14157336950302124, 0.4792300760746002, 0.37348780035972595, 0.30855879187583923, 0.13460765779018402, 0.4042050540447235, 0.8788677453994751, 0.46184059977531433, -0.4685617983341217, -0.31647300720214844, 0.33407777547836304, 0.0009514113189652562, -0.2321149855852127, 0.10964536666870117, -0.53671795129776, 0.3443746566772461, 0.11198195070028305, 0.8417078852653503, 0.16119839251041412, -0.7277108430862427, 0.6897855997085571, -0.023228719830513, -0.41636618971824646, -1.0015202760696411, -0.05920110270380974, 0.12829379737377167, 0.18621250987052917, 0.34806060791015625, -0.07933556288480759, -0.014734715223312378, -0.6112343072891235, 0.07686879485845566, 0.4961400628089905, -0.42319709062576294, -0.20482270419597626, 0.8997206091880798, 0.1278141587972641, -0.4483592212200165, 0.4411936402320862, -0.39700713753700256, -0.4915284514427185, 0.6850990653038025, 0.3886313736438751, 0.7990992665290833, -0.15959148108959198, 0.3624272644519806, 0.6573786735534668, 0.2799508273601532, 0.0018628399120643735, 0.6337303519248962, 0.10620375722646713, -0.7485668659210205, -0.37330812215805054, -0.5872536301612854, -0.1980523318052292, 0.4140840470790863, -0.7514575719833374, 0.3987342119216919, -0.5153610110282898, -0.1309167593717575, -0.06764474511146545, -0.08454527705907822, -0.9089706540107727, 0.5062964558601379, 0.04985325038433075, 0.9067297577857971, -0.8715958595275879, 0.800014853477478, 0.6300148963928223, -1.0488333702087402, -0.941576361656189, -0.11731158196926117, -0.33756810426712036, -0.8519735336303711, 0.5314706563949585, -0.19116809964179993, 0.15381532907485962, 0.0715058371424675, -0.9136962294578552, -0.7423988580703735, 0.9004002809524536, 0.29969650506973267, -0.30722635984420776, -0.49069085717201233, -0.05091718211770058, 0.7740618586540222, -0.4595917761325836, 0.5125321745872498, 0.34787341952323914, 0.5635808110237122, 0.30446940660476685, -0.800130307674408, -0.12225528806447983, -0.3970363736152649, -0.24854451417922974, -0.35144519805908203, -0.819053590297699, 0.9449599385261536, -0.09486759454011917, -0.08603709191083908, 0.012261884286999702, 0.860882043838501, 0.22720251977443695, 0.1559172123670578, 0.45860496163368225, 0.31698375940322876, 0.6858908534049988, -0.09486348927021027, 1.1598001718521118, -0.3020057678222656, 0.46195220947265625, 1.0763293504714966, 0.17692624032497406, 0.9777821898460388, 0.5042406320571899, -0.16972561180591583, 0.711302638053894, 0.4998595118522644, -0.5094141960144043, 0.49705758690834045, 0.18897885084152222, -0.03242051601409912, -0.40848150849342346, -0.10748706758022308, -0.6107760071754456, 0.7596985697746277, 0.15911898016929626, -0.48028960824012756, -0.039383288472890854, -0.1674264669418335, 0.19248642027378082, 0.14251698553562164, -0.16372670233249664, 0.740875244140625, -0.1550498753786087, -0.7761697173118591, 0.7462234497070312, -0.04379133880138397, 0.6374757289886475, -0.7327666282653809, 0.004084194079041481, -0.1979190707206726, 0.05286553502082825, -0.008355078287422657, -0.6708086729049683, 0.40172114968299866, 0.07148421555757523, -0.2234027087688446, -0.3090979754924774, 0.33099842071533203, -0.390951931476593, -0.9564880728721619, 0.20884822309017181, 0.6464730501174927, 0.32441446185112, 0.01693013682961464, -0.996641993522644, 0.011151975020766258, 0.1845346838235855, -0.322848379611969, 0.10218597203493118, 0.261510968208313, 0.21511898934841156, 0.5433322191238403, 0.5328493714332581, 0.16061098873615265, 0.20954489707946777, -0.14456769824028015, 0.8633338212966919, -0.6972194314002991, -0.4396010935306549, -0.675907552242279, 0.8338980078697205, -0.4196658730506897, -0.6182540059089661, 0.9244333505630493, 0.742357075214386, 1.1364939212799072, -0.24865788221359253, 0.9661003351211548, -0.16397663950920105, 0.6960200071334839, -0.2964041531085968, 0.69334477186203, -0.8220121264457703, 0.3522047996520996, -0.32110071182250977, -0.6999171376228333, -0.09338880330324173, 0.7325904369354248, -0.35314562916755676, 0.07348012924194336, 0.46813952922821045, 0.7498261332511902, 0.03198228031396866, -0.1703328639268875, 0.23566429316997528, 0.5354262590408325, 0.38101211190223694, 0.6566734910011292, 0.6187883615493774, -0.7994948625564575, 1.0211308002471924, -0.4850568473339081, 0.0685802474617958, -0.2013183981180191, -0.6682330369949341, -1.0079425573349, -0.5910149216651917, -0.5030490756034851, -0.5528311133384705, -0.11850825697183609, 0.8171058893203735, 0.4973341226577759, -0.8866156935691833, -0.08462506532669067, -0.012285551987588406, 0.1735236495733261, -0.2654477059841156, -0.28799179196357727, 0.45020192861557007, 0.13039661943912506, -0.9898309111595154, 0.4207218587398529, -0.04556412249803543, 0.2689870595932007, -0.2679433226585388, 0.25117218494415283, -0.5749267339706421, 0.4013420641422272, 0.3196403384208679, 0.505601167678833, -0.7488548755645752, -0.40876486897468567, 0.20721502602100372, -0.15508905053138733, 0.04898844659328461, 0.24874886870384216, -0.8218003511428833, 0.2166268527507782, 0.67125004529953, 0.2353965938091278, 0.6855087280273438, 0.05680244415998459, 0.47437480092048645, -0.5951277613639832, 0.19366863369941711, 0.5327757596969604, 0.26121610403060913, 0.1306220293045044, -0.11906995624303818, 0.36610716581344604, 0.34309059381484985, -0.30258649587631226, -0.8895673751831055, 0.025143777951598167, -1.386734962463379, -0.30448514223098755, 1.2804794311523438, 0.06399739533662796, -0.372148722410202, -0.06818827986717224, -0.3732413947582245, 0.3930127024650574, -0.45338401198387146, 0.6825551390647888, 0.6385204195976257, 0.07253114134073257, -0.056719355285167694, -0.5943066477775574, 0.4758664071559906, 0.33338162302970886, -0.7709620594978333, -0.37090638279914856, 0.2285730093717575, 0.40582209825515747, 0.12497277557849884, 0.6650381684303284, -0.036109212785959244, 0.3470741808414459, -0.059263940900564194, 0.15994516015052795, -0.09091739356517792, 0.04331609979271889, -0.172607883810997, 0.4937748610973358, -0.3352110683917999, -0.26212644577026367 ]
BAAI/bge-large-en-v1.5
BAAI
"2023-10-12T03:37:51Z"
356,156
149
sentence-transformers
[ "sentence-transformers", "pytorch", "bert", "feature-extraction", "sentence-similarity", "transformers", "mteb", "en", "arxiv:2310.07554", "arxiv:2309.07597", "license:mit", "model-index", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2023-09-12T05:20:08Z"
--- tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers - mteb model-index: - name: bge-large-en-v1.5 results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 75.8507462686567 - type: ap value: 38.566457320228245 - type: f1 value: 69.69386648043475 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 92.416675 - type: ap value: 89.1928861155922 - type: f1 value: 92.39477019574215 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 48.175999999999995 - type: f1 value: 47.80712792870253 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 40.184999999999995 - type: map_at_10 value: 55.654 - type: map_at_100 value: 56.25 - type: map_at_1000 value: 56.255 - type: map_at_3 value: 51.742999999999995 - type: map_at_5 value: 54.129000000000005 - type: mrr_at_1 value: 40.967 - type: mrr_at_10 value: 55.96 - type: mrr_at_100 value: 56.54900000000001 - type: mrr_at_1000 value: 56.554 - type: mrr_at_3 value: 51.980000000000004 - type: mrr_at_5 value: 54.44 - type: ndcg_at_1 value: 40.184999999999995 - type: ndcg_at_10 value: 63.542 - type: ndcg_at_100 value: 65.96499999999999 - type: ndcg_at_1000 value: 66.08699999999999 - type: ndcg_at_3 value: 55.582 - type: ndcg_at_5 value: 59.855000000000004 - type: precision_at_1 value: 40.184999999999995 - type: precision_at_10 value: 8.841000000000001 - type: precision_at_100 value: 0.987 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 22.238 - type: precision_at_5 value: 15.405 - type: recall_at_1 value: 40.184999999999995 - type: recall_at_10 value: 88.407 - type: recall_at_100 value: 98.72 - type: recall_at_1000 value: 99.644 - type: recall_at_3 value: 66.714 - type: recall_at_5 value: 77.027 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 48.567077926750066 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 43.19453389182364 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 64.46555939623092 - type: mrr value: 77.82361605768807 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 84.9554128814735 - type: cos_sim_spearman value: 84.65373612172036 - type: euclidean_pearson value: 83.2905059954138 - type: euclidean_spearman value: 84.52240782811128 - type: manhattan_pearson value: 82.99533802997436 - type: manhattan_spearman value: 84.20673798475734 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 87.78896103896103 - type: f1 value: 87.77189310964883 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 39.714538337650495 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 36.90108349284447 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 32.795 - type: map_at_10 value: 43.669000000000004 - type: map_at_100 value: 45.151 - type: map_at_1000 value: 45.278 - type: map_at_3 value: 40.006 - type: map_at_5 value: 42.059999999999995 - type: mrr_at_1 value: 39.771 - type: mrr_at_10 value: 49.826 - type: mrr_at_100 value: 50.504000000000005 - type: mrr_at_1000 value: 50.549 - type: mrr_at_3 value: 47.115 - type: mrr_at_5 value: 48.832 - type: ndcg_at_1 value: 39.771 - type: ndcg_at_10 value: 50.217999999999996 - type: ndcg_at_100 value: 55.454 - type: ndcg_at_1000 value: 57.37 - type: ndcg_at_3 value: 44.885000000000005 - type: ndcg_at_5 value: 47.419 - type: precision_at_1 value: 39.771 - type: precision_at_10 value: 9.642000000000001 - type: precision_at_100 value: 1.538 - type: precision_at_1000 value: 0.198 - type: precision_at_3 value: 21.268 - type: precision_at_5 value: 15.536 - type: recall_at_1 value: 32.795 - type: recall_at_10 value: 62.580999999999996 - type: recall_at_100 value: 84.438 - type: recall_at_1000 value: 96.492 - type: recall_at_3 value: 47.071000000000005 - type: recall_at_5 value: 54.079 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 32.671 - type: map_at_10 value: 43.334 - type: map_at_100 value: 44.566 - type: map_at_1000 value: 44.702999999999996 - type: map_at_3 value: 40.343 - type: map_at_5 value: 41.983 - type: mrr_at_1 value: 40.764 - type: mrr_at_10 value: 49.382 - type: mrr_at_100 value: 49.988 - type: mrr_at_1000 value: 50.03300000000001 - type: mrr_at_3 value: 47.293 - type: mrr_at_5 value: 48.51 - type: ndcg_at_1 value: 40.764 - type: ndcg_at_10 value: 49.039 - type: ndcg_at_100 value: 53.259 - type: ndcg_at_1000 value: 55.253 - type: ndcg_at_3 value: 45.091 - type: ndcg_at_5 value: 46.839999999999996 - type: precision_at_1 value: 40.764 - type: precision_at_10 value: 9.191 - type: precision_at_100 value: 1.476 - type: precision_at_1000 value: 0.19499999999999998 - type: precision_at_3 value: 21.72 - type: precision_at_5 value: 15.299 - type: recall_at_1 value: 32.671 - type: recall_at_10 value: 58.816 - type: recall_at_100 value: 76.654 - type: recall_at_1000 value: 89.05999999999999 - type: recall_at_3 value: 46.743 - type: recall_at_5 value: 51.783 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 40.328 - type: map_at_10 value: 53.32599999999999 - type: map_at_100 value: 54.37499999999999 - type: map_at_1000 value: 54.429 - type: map_at_3 value: 49.902 - type: map_at_5 value: 52.002 - type: mrr_at_1 value: 46.332 - type: mrr_at_10 value: 56.858 - type: mrr_at_100 value: 57.522 - type: mrr_at_1000 value: 57.54899999999999 - type: mrr_at_3 value: 54.472 - type: mrr_at_5 value: 55.996 - type: ndcg_at_1 value: 46.332 - type: ndcg_at_10 value: 59.313 - type: ndcg_at_100 value: 63.266999999999996 - type: ndcg_at_1000 value: 64.36 - type: ndcg_at_3 value: 53.815000000000005 - type: ndcg_at_5 value: 56.814 - type: precision_at_1 value: 46.332 - type: precision_at_10 value: 9.53 - type: precision_at_100 value: 1.238 - type: precision_at_1000 value: 0.13699999999999998 - type: precision_at_3 value: 24.054000000000002 - type: precision_at_5 value: 16.589000000000002 - type: recall_at_1 value: 40.328 - type: recall_at_10 value: 73.421 - type: recall_at_100 value: 90.059 - type: recall_at_1000 value: 97.81 - type: recall_at_3 value: 59.009 - type: recall_at_5 value: 66.352 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.424 - type: map_at_10 value: 36.332 - type: map_at_100 value: 37.347 - type: map_at_1000 value: 37.422 - type: map_at_3 value: 33.743 - type: map_at_5 value: 35.176 - type: mrr_at_1 value: 29.153000000000002 - type: mrr_at_10 value: 38.233 - type: mrr_at_100 value: 39.109 - type: mrr_at_1000 value: 39.164 - type: mrr_at_3 value: 35.876000000000005 - type: mrr_at_5 value: 37.169000000000004 - type: ndcg_at_1 value: 29.153000000000002 - type: ndcg_at_10 value: 41.439 - type: ndcg_at_100 value: 46.42 - type: ndcg_at_1000 value: 48.242000000000004 - type: ndcg_at_3 value: 36.362 - type: ndcg_at_5 value: 38.743 - type: precision_at_1 value: 29.153000000000002 - type: precision_at_10 value: 6.315999999999999 - type: precision_at_100 value: 0.927 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 15.443000000000001 - type: precision_at_5 value: 10.644 - type: recall_at_1 value: 27.424 - type: recall_at_10 value: 55.364000000000004 - type: recall_at_100 value: 78.211 - type: recall_at_1000 value: 91.74600000000001 - type: recall_at_3 value: 41.379 - type: recall_at_5 value: 47.14 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 19.601 - type: map_at_10 value: 27.826 - type: map_at_100 value: 29.017 - type: map_at_1000 value: 29.137 - type: map_at_3 value: 25.125999999999998 - type: map_at_5 value: 26.765 - type: mrr_at_1 value: 24.005000000000003 - type: mrr_at_10 value: 32.716 - type: mrr_at_100 value: 33.631 - type: mrr_at_1000 value: 33.694 - type: mrr_at_3 value: 29.934 - type: mrr_at_5 value: 31.630999999999997 - type: ndcg_at_1 value: 24.005000000000003 - type: ndcg_at_10 value: 33.158 - type: ndcg_at_100 value: 38.739000000000004 - type: ndcg_at_1000 value: 41.495 - type: ndcg_at_3 value: 28.185 - type: ndcg_at_5 value: 30.796 - type: precision_at_1 value: 24.005000000000003 - type: precision_at_10 value: 5.908 - type: precision_at_100 value: 1.005 - type: precision_at_1000 value: 0.13899999999999998 - type: precision_at_3 value: 13.391 - type: precision_at_5 value: 9.876 - type: recall_at_1 value: 19.601 - type: recall_at_10 value: 44.746 - type: recall_at_100 value: 68.82300000000001 - type: recall_at_1000 value: 88.215 - type: recall_at_3 value: 31.239 - type: recall_at_5 value: 37.695 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 30.130000000000003 - type: map_at_10 value: 40.96 - type: map_at_100 value: 42.282 - type: map_at_1000 value: 42.392 - type: map_at_3 value: 37.889 - type: map_at_5 value: 39.661 - type: mrr_at_1 value: 36.958999999999996 - type: mrr_at_10 value: 46.835 - type: mrr_at_100 value: 47.644 - type: mrr_at_1000 value: 47.688 - type: mrr_at_3 value: 44.562000000000005 - type: mrr_at_5 value: 45.938 - type: ndcg_at_1 value: 36.958999999999996 - type: ndcg_at_10 value: 47.06 - type: ndcg_at_100 value: 52.345 - type: ndcg_at_1000 value: 54.35 - type: ndcg_at_3 value: 42.301 - type: ndcg_at_5 value: 44.635999999999996 - type: precision_at_1 value: 36.958999999999996 - type: precision_at_10 value: 8.479000000000001 - type: precision_at_100 value: 1.284 - type: precision_at_1000 value: 0.163 - type: precision_at_3 value: 20.244 - type: precision_at_5 value: 14.224999999999998 - type: recall_at_1 value: 30.130000000000003 - type: recall_at_10 value: 59.27 - type: recall_at_100 value: 81.195 - type: recall_at_1000 value: 94.21199999999999 - type: recall_at_3 value: 45.885 - type: recall_at_5 value: 52.016 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.169999999999998 - type: map_at_10 value: 36.451 - type: map_at_100 value: 37.791000000000004 - type: map_at_1000 value: 37.897 - type: map_at_3 value: 33.109 - type: map_at_5 value: 34.937000000000005 - type: mrr_at_1 value: 32.877 - type: mrr_at_10 value: 42.368 - type: mrr_at_100 value: 43.201 - type: mrr_at_1000 value: 43.259 - type: mrr_at_3 value: 39.763999999999996 - type: mrr_at_5 value: 41.260000000000005 - type: ndcg_at_1 value: 32.877 - type: ndcg_at_10 value: 42.659000000000006 - type: ndcg_at_100 value: 48.161 - type: ndcg_at_1000 value: 50.345 - type: ndcg_at_3 value: 37.302 - type: ndcg_at_5 value: 39.722 - type: precision_at_1 value: 32.877 - type: precision_at_10 value: 7.9 - type: precision_at_100 value: 1.236 - type: precision_at_1000 value: 0.158 - type: precision_at_3 value: 17.846 - type: precision_at_5 value: 12.9 - type: recall_at_1 value: 26.169999999999998 - type: recall_at_10 value: 55.35 - type: recall_at_100 value: 78.755 - type: recall_at_1000 value: 93.518 - type: recall_at_3 value: 40.176 - type: recall_at_5 value: 46.589000000000006 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.15516666666667 - type: map_at_10 value: 36.65741666666667 - type: map_at_100 value: 37.84991666666666 - type: map_at_1000 value: 37.96316666666667 - type: map_at_3 value: 33.74974999999999 - type: map_at_5 value: 35.3765 - type: mrr_at_1 value: 32.08233333333334 - type: mrr_at_10 value: 41.033833333333334 - type: mrr_at_100 value: 41.84524999999999 - type: mrr_at_1000 value: 41.89983333333333 - type: mrr_at_3 value: 38.62008333333333 - type: mrr_at_5 value: 40.03441666666666 - type: ndcg_at_1 value: 32.08233333333334 - type: ndcg_at_10 value: 42.229 - type: ndcg_at_100 value: 47.26716666666667 - type: ndcg_at_1000 value: 49.43466666666667 - type: ndcg_at_3 value: 37.36408333333333 - type: ndcg_at_5 value: 39.6715 - type: precision_at_1 value: 32.08233333333334 - type: precision_at_10 value: 7.382583333333334 - type: precision_at_100 value: 1.16625 - type: precision_at_1000 value: 0.15408333333333332 - type: precision_at_3 value: 17.218 - type: precision_at_5 value: 12.21875 - type: recall_at_1 value: 27.15516666666667 - type: recall_at_10 value: 54.36683333333333 - type: recall_at_100 value: 76.37183333333333 - type: recall_at_1000 value: 91.26183333333333 - type: recall_at_3 value: 40.769916666666674 - type: recall_at_5 value: 46.702333333333335 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.749 - type: map_at_10 value: 33.001999999999995 - type: map_at_100 value: 33.891 - type: map_at_1000 value: 33.993 - type: map_at_3 value: 30.703999999999997 - type: map_at_5 value: 31.959 - type: mrr_at_1 value: 28.834 - type: mrr_at_10 value: 35.955 - type: mrr_at_100 value: 36.709 - type: mrr_at_1000 value: 36.779 - type: mrr_at_3 value: 33.947 - type: mrr_at_5 value: 35.089 - type: ndcg_at_1 value: 28.834 - type: ndcg_at_10 value: 37.329 - type: ndcg_at_100 value: 41.79 - type: ndcg_at_1000 value: 44.169000000000004 - type: ndcg_at_3 value: 33.184999999999995 - type: ndcg_at_5 value: 35.107 - type: precision_at_1 value: 28.834 - type: precision_at_10 value: 5.7669999999999995 - type: precision_at_100 value: 0.876 - type: precision_at_1000 value: 0.11399999999999999 - type: precision_at_3 value: 14.213000000000001 - type: precision_at_5 value: 9.754999999999999 - type: recall_at_1 value: 25.749 - type: recall_at_10 value: 47.791 - type: recall_at_100 value: 68.255 - type: recall_at_1000 value: 85.749 - type: recall_at_3 value: 36.199 - type: recall_at_5 value: 41.071999999999996 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 17.777 - type: map_at_10 value: 25.201 - type: map_at_100 value: 26.423999999999996 - type: map_at_1000 value: 26.544 - type: map_at_3 value: 22.869 - type: map_at_5 value: 24.023 - type: mrr_at_1 value: 21.473 - type: mrr_at_10 value: 29.12 - type: mrr_at_100 value: 30.144 - type: mrr_at_1000 value: 30.215999999999998 - type: mrr_at_3 value: 26.933 - type: mrr_at_5 value: 28.051 - type: ndcg_at_1 value: 21.473 - type: ndcg_at_10 value: 30.003 - type: ndcg_at_100 value: 35.766 - type: ndcg_at_1000 value: 38.501000000000005 - type: ndcg_at_3 value: 25.773000000000003 - type: ndcg_at_5 value: 27.462999999999997 - type: precision_at_1 value: 21.473 - type: precision_at_10 value: 5.482 - type: precision_at_100 value: 0.975 - type: precision_at_1000 value: 0.13799999999999998 - type: precision_at_3 value: 12.205 - type: precision_at_5 value: 8.692 - type: recall_at_1 value: 17.777 - type: recall_at_10 value: 40.582 - type: recall_at_100 value: 66.305 - type: recall_at_1000 value: 85.636 - type: recall_at_3 value: 28.687 - type: recall_at_5 value: 33.089 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.677 - type: map_at_10 value: 36.309000000000005 - type: map_at_100 value: 37.403999999999996 - type: map_at_1000 value: 37.496 - type: map_at_3 value: 33.382 - type: map_at_5 value: 34.98 - type: mrr_at_1 value: 31.343 - type: mrr_at_10 value: 40.549 - type: mrr_at_100 value: 41.342 - type: mrr_at_1000 value: 41.397 - type: mrr_at_3 value: 38.029 - type: mrr_at_5 value: 39.451 - type: ndcg_at_1 value: 31.343 - type: ndcg_at_10 value: 42.1 - type: ndcg_at_100 value: 47.089999999999996 - type: ndcg_at_1000 value: 49.222 - type: ndcg_at_3 value: 36.836999999999996 - type: ndcg_at_5 value: 39.21 - type: precision_at_1 value: 31.343 - type: precision_at_10 value: 7.164 - type: precision_at_100 value: 1.0959999999999999 - type: precision_at_1000 value: 0.13899999999999998 - type: precision_at_3 value: 16.915 - type: precision_at_5 value: 11.940000000000001 - type: recall_at_1 value: 26.677 - type: recall_at_10 value: 55.54599999999999 - type: recall_at_100 value: 77.094 - type: recall_at_1000 value: 92.01 - type: recall_at_3 value: 41.191 - type: recall_at_5 value: 47.006 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.501 - type: map_at_10 value: 33.102 - type: map_at_100 value: 34.676 - type: map_at_1000 value: 34.888000000000005 - type: map_at_3 value: 29.944 - type: map_at_5 value: 31.613999999999997 - type: mrr_at_1 value: 29.447000000000003 - type: mrr_at_10 value: 37.996 - type: mrr_at_100 value: 38.946 - type: mrr_at_1000 value: 38.995000000000005 - type: mrr_at_3 value: 35.079 - type: mrr_at_5 value: 36.69 - type: ndcg_at_1 value: 29.447000000000003 - type: ndcg_at_10 value: 39.232 - type: ndcg_at_100 value: 45.247 - type: ndcg_at_1000 value: 47.613 - type: ndcg_at_3 value: 33.922999999999995 - type: ndcg_at_5 value: 36.284 - type: precision_at_1 value: 29.447000000000003 - type: precision_at_10 value: 7.648000000000001 - type: precision_at_100 value: 1.516 - type: precision_at_1000 value: 0.23900000000000002 - type: precision_at_3 value: 16.008 - type: precision_at_5 value: 11.779 - type: recall_at_1 value: 24.501 - type: recall_at_10 value: 51.18899999999999 - type: recall_at_100 value: 78.437 - type: recall_at_1000 value: 92.842 - type: recall_at_3 value: 35.808 - type: recall_at_5 value: 42.197 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 22.039 - type: map_at_10 value: 30.377 - type: map_at_100 value: 31.275 - type: map_at_1000 value: 31.379 - type: map_at_3 value: 27.98 - type: map_at_5 value: 29.358 - type: mrr_at_1 value: 24.03 - type: mrr_at_10 value: 32.568000000000005 - type: mrr_at_100 value: 33.403 - type: mrr_at_1000 value: 33.475 - type: mrr_at_3 value: 30.436999999999998 - type: mrr_at_5 value: 31.796000000000003 - type: ndcg_at_1 value: 24.03 - type: ndcg_at_10 value: 35.198 - type: ndcg_at_100 value: 39.668 - type: ndcg_at_1000 value: 42.296 - type: ndcg_at_3 value: 30.709999999999997 - type: ndcg_at_5 value: 33.024 - type: precision_at_1 value: 24.03 - type: precision_at_10 value: 5.564 - type: precision_at_100 value: 0.828 - type: precision_at_1000 value: 0.117 - type: precision_at_3 value: 13.309000000000001 - type: precision_at_5 value: 9.39 - type: recall_at_1 value: 22.039 - type: recall_at_10 value: 47.746 - type: recall_at_100 value: 68.23599999999999 - type: recall_at_1000 value: 87.852 - type: recall_at_3 value: 35.852000000000004 - type: recall_at_5 value: 41.410000000000004 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 15.692999999999998 - type: map_at_10 value: 26.903 - type: map_at_100 value: 28.987000000000002 - type: map_at_1000 value: 29.176999999999996 - type: map_at_3 value: 22.137 - type: map_at_5 value: 24.758 - type: mrr_at_1 value: 35.57 - type: mrr_at_10 value: 47.821999999999996 - type: mrr_at_100 value: 48.608000000000004 - type: mrr_at_1000 value: 48.638999999999996 - type: mrr_at_3 value: 44.452000000000005 - type: mrr_at_5 value: 46.546 - type: ndcg_at_1 value: 35.57 - type: ndcg_at_10 value: 36.567 - type: ndcg_at_100 value: 44.085 - type: ndcg_at_1000 value: 47.24 - type: ndcg_at_3 value: 29.964000000000002 - type: ndcg_at_5 value: 32.511 - type: precision_at_1 value: 35.57 - type: precision_at_10 value: 11.485 - type: precision_at_100 value: 1.9619999999999997 - type: precision_at_1000 value: 0.256 - type: precision_at_3 value: 22.237000000000002 - type: precision_at_5 value: 17.471999999999998 - type: recall_at_1 value: 15.692999999999998 - type: recall_at_10 value: 43.056 - type: recall_at_100 value: 68.628 - type: recall_at_1000 value: 86.075 - type: recall_at_3 value: 26.918999999999997 - type: recall_at_5 value: 34.14 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 9.53 - type: map_at_10 value: 20.951 - type: map_at_100 value: 30.136000000000003 - type: map_at_1000 value: 31.801000000000002 - type: map_at_3 value: 15.021 - type: map_at_5 value: 17.471999999999998 - type: mrr_at_1 value: 71.0 - type: mrr_at_10 value: 79.176 - type: mrr_at_100 value: 79.418 - type: mrr_at_1000 value: 79.426 - type: mrr_at_3 value: 78.125 - type: mrr_at_5 value: 78.61200000000001 - type: ndcg_at_1 value: 58.5 - type: ndcg_at_10 value: 44.106 - type: ndcg_at_100 value: 49.268 - type: ndcg_at_1000 value: 56.711999999999996 - type: ndcg_at_3 value: 48.934 - type: ndcg_at_5 value: 45.826 - type: precision_at_1 value: 71.0 - type: precision_at_10 value: 35.0 - type: precision_at_100 value: 11.360000000000001 - type: precision_at_1000 value: 2.046 - type: precision_at_3 value: 52.833 - type: precision_at_5 value: 44.15 - type: recall_at_1 value: 9.53 - type: recall_at_10 value: 26.811 - type: recall_at_100 value: 55.916999999999994 - type: recall_at_1000 value: 79.973 - type: recall_at_3 value: 16.413 - type: recall_at_5 value: 19.980999999999998 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 51.519999999999996 - type: f1 value: 46.36601294761231 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 74.413 - type: map_at_10 value: 83.414 - type: map_at_100 value: 83.621 - type: map_at_1000 value: 83.635 - type: map_at_3 value: 82.337 - type: map_at_5 value: 83.039 - type: mrr_at_1 value: 80.19800000000001 - type: mrr_at_10 value: 87.715 - type: mrr_at_100 value: 87.778 - type: mrr_at_1000 value: 87.779 - type: mrr_at_3 value: 87.106 - type: mrr_at_5 value: 87.555 - type: ndcg_at_1 value: 80.19800000000001 - type: ndcg_at_10 value: 87.182 - type: ndcg_at_100 value: 87.90299999999999 - type: ndcg_at_1000 value: 88.143 - type: ndcg_at_3 value: 85.60600000000001 - type: ndcg_at_5 value: 86.541 - type: precision_at_1 value: 80.19800000000001 - type: precision_at_10 value: 10.531 - type: precision_at_100 value: 1.113 - type: precision_at_1000 value: 0.11499999999999999 - type: precision_at_3 value: 32.933 - type: precision_at_5 value: 20.429 - type: recall_at_1 value: 74.413 - type: recall_at_10 value: 94.363 - type: recall_at_100 value: 97.165 - type: recall_at_1000 value: 98.668 - type: recall_at_3 value: 90.108 - type: recall_at_5 value: 92.52 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 22.701 - type: map_at_10 value: 37.122 - type: map_at_100 value: 39.178000000000004 - type: map_at_1000 value: 39.326 - type: map_at_3 value: 32.971000000000004 - type: map_at_5 value: 35.332 - type: mrr_at_1 value: 44.753 - type: mrr_at_10 value: 53.452 - type: mrr_at_100 value: 54.198 - type: mrr_at_1000 value: 54.225 - type: mrr_at_3 value: 50.952 - type: mrr_at_5 value: 52.464 - type: ndcg_at_1 value: 44.753 - type: ndcg_at_10 value: 45.021 - type: ndcg_at_100 value: 52.028 - type: ndcg_at_1000 value: 54.596000000000004 - type: ndcg_at_3 value: 41.622 - type: ndcg_at_5 value: 42.736000000000004 - type: precision_at_1 value: 44.753 - type: precision_at_10 value: 12.284 - type: precision_at_100 value: 1.955 - type: precision_at_1000 value: 0.243 - type: precision_at_3 value: 27.828999999999997 - type: precision_at_5 value: 20.061999999999998 - type: recall_at_1 value: 22.701 - type: recall_at_10 value: 51.432 - type: recall_at_100 value: 77.009 - type: recall_at_1000 value: 92.511 - type: recall_at_3 value: 37.919000000000004 - type: recall_at_5 value: 44.131 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 40.189 - type: map_at_10 value: 66.24600000000001 - type: map_at_100 value: 67.098 - type: map_at_1000 value: 67.149 - type: map_at_3 value: 62.684 - type: map_at_5 value: 64.974 - type: mrr_at_1 value: 80.378 - type: mrr_at_10 value: 86.127 - type: mrr_at_100 value: 86.29299999999999 - type: mrr_at_1000 value: 86.297 - type: mrr_at_3 value: 85.31400000000001 - type: mrr_at_5 value: 85.858 - type: ndcg_at_1 value: 80.378 - type: ndcg_at_10 value: 74.101 - type: ndcg_at_100 value: 76.993 - type: ndcg_at_1000 value: 77.948 - type: ndcg_at_3 value: 69.232 - type: ndcg_at_5 value: 72.04599999999999 - type: precision_at_1 value: 80.378 - type: precision_at_10 value: 15.595999999999998 - type: precision_at_100 value: 1.7840000000000003 - type: precision_at_1000 value: 0.191 - type: precision_at_3 value: 44.884 - type: precision_at_5 value: 29.145 - type: recall_at_1 value: 40.189 - type: recall_at_10 value: 77.981 - type: recall_at_100 value: 89.21 - type: recall_at_1000 value: 95.48299999999999 - type: recall_at_3 value: 67.326 - type: recall_at_5 value: 72.863 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 92.84599999999999 - type: ap value: 89.4710787567357 - type: f1 value: 92.83752676932258 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 23.132 - type: map_at_10 value: 35.543 - type: map_at_100 value: 36.702 - type: map_at_1000 value: 36.748999999999995 - type: map_at_3 value: 31.737 - type: map_at_5 value: 33.927 - type: mrr_at_1 value: 23.782 - type: mrr_at_10 value: 36.204 - type: mrr_at_100 value: 37.29 - type: mrr_at_1000 value: 37.330999999999996 - type: mrr_at_3 value: 32.458999999999996 - type: mrr_at_5 value: 34.631 - type: ndcg_at_1 value: 23.782 - type: ndcg_at_10 value: 42.492999999999995 - type: ndcg_at_100 value: 47.985 - type: ndcg_at_1000 value: 49.141 - type: ndcg_at_3 value: 34.748000000000005 - type: ndcg_at_5 value: 38.651 - type: precision_at_1 value: 23.782 - type: precision_at_10 value: 6.665 - type: precision_at_100 value: 0.941 - type: precision_at_1000 value: 0.104 - type: precision_at_3 value: 14.776 - type: precision_at_5 value: 10.84 - type: recall_at_1 value: 23.132 - type: recall_at_10 value: 63.794 - type: recall_at_100 value: 89.027 - type: recall_at_1000 value: 97.807 - type: recall_at_3 value: 42.765 - type: recall_at_5 value: 52.11 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 94.59188326493388 - type: f1 value: 94.3842594786827 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 79.49384404924761 - type: f1 value: 59.7580539534629 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 77.56220578345663 - type: f1 value: 75.27228165561478 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 80.53463349024884 - type: f1 value: 80.4893958236536 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 32.56100273484962 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 31.470380028839607 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 32.06102792457849 - type: mrr value: 33.30709199672238 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 6.776999999999999 - type: map_at_10 value: 14.924000000000001 - type: map_at_100 value: 18.955 - type: map_at_1000 value: 20.538999999999998 - type: map_at_3 value: 10.982 - type: map_at_5 value: 12.679000000000002 - type: mrr_at_1 value: 47.988 - type: mrr_at_10 value: 57.232000000000006 - type: mrr_at_100 value: 57.818999999999996 - type: mrr_at_1000 value: 57.847 - type: mrr_at_3 value: 54.901999999999994 - type: mrr_at_5 value: 56.481 - type: ndcg_at_1 value: 46.594 - type: ndcg_at_10 value: 38.129000000000005 - type: ndcg_at_100 value: 35.54 - type: ndcg_at_1000 value: 44.172 - type: ndcg_at_3 value: 43.025999999999996 - type: ndcg_at_5 value: 41.052 - type: precision_at_1 value: 47.988 - type: precision_at_10 value: 28.111000000000004 - type: precision_at_100 value: 8.929 - type: precision_at_1000 value: 2.185 - type: precision_at_3 value: 40.144000000000005 - type: precision_at_5 value: 35.232 - type: recall_at_1 value: 6.776999999999999 - type: recall_at_10 value: 19.289 - type: recall_at_100 value: 36.359 - type: recall_at_1000 value: 67.54 - type: recall_at_3 value: 11.869 - type: recall_at_5 value: 14.999 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 31.108000000000004 - type: map_at_10 value: 47.126000000000005 - type: map_at_100 value: 48.171 - type: map_at_1000 value: 48.199 - type: map_at_3 value: 42.734 - type: map_at_5 value: 45.362 - type: mrr_at_1 value: 34.936 - type: mrr_at_10 value: 49.571 - type: mrr_at_100 value: 50.345 - type: mrr_at_1000 value: 50.363 - type: mrr_at_3 value: 45.959 - type: mrr_at_5 value: 48.165 - type: ndcg_at_1 value: 34.936 - type: ndcg_at_10 value: 55.028999999999996 - type: ndcg_at_100 value: 59.244 - type: ndcg_at_1000 value: 59.861 - type: ndcg_at_3 value: 46.872 - type: ndcg_at_5 value: 51.217999999999996 - type: precision_at_1 value: 34.936 - type: precision_at_10 value: 9.099 - type: precision_at_100 value: 1.145 - type: precision_at_1000 value: 0.12 - type: precision_at_3 value: 21.456 - type: precision_at_5 value: 15.411 - type: recall_at_1 value: 31.108000000000004 - type: recall_at_10 value: 76.53999999999999 - type: recall_at_100 value: 94.39 - type: recall_at_1000 value: 98.947 - type: recall_at_3 value: 55.572 - type: recall_at_5 value: 65.525 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 71.56400000000001 - type: map_at_10 value: 85.482 - type: map_at_100 value: 86.114 - type: map_at_1000 value: 86.13 - type: map_at_3 value: 82.607 - type: map_at_5 value: 84.405 - type: mrr_at_1 value: 82.42 - type: mrr_at_10 value: 88.304 - type: mrr_at_100 value: 88.399 - type: mrr_at_1000 value: 88.399 - type: mrr_at_3 value: 87.37 - type: mrr_at_5 value: 88.024 - type: ndcg_at_1 value: 82.45 - type: ndcg_at_10 value: 89.06500000000001 - type: ndcg_at_100 value: 90.232 - type: ndcg_at_1000 value: 90.305 - type: ndcg_at_3 value: 86.375 - type: ndcg_at_5 value: 87.85300000000001 - type: precision_at_1 value: 82.45 - type: precision_at_10 value: 13.486999999999998 - type: precision_at_100 value: 1.534 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.813 - type: precision_at_5 value: 24.773999999999997 - type: recall_at_1 value: 71.56400000000001 - type: recall_at_10 value: 95.812 - type: recall_at_100 value: 99.7 - type: recall_at_1000 value: 99.979 - type: recall_at_3 value: 87.966 - type: recall_at_5 value: 92.268 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 57.241876648614145 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 64.66212576446223 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 5.308 - type: map_at_10 value: 13.803 - type: map_at_100 value: 16.176 - type: map_at_1000 value: 16.561 - type: map_at_3 value: 9.761000000000001 - type: map_at_5 value: 11.802 - type: mrr_at_1 value: 26.200000000000003 - type: mrr_at_10 value: 37.621 - type: mrr_at_100 value: 38.767 - type: mrr_at_1000 value: 38.815 - type: mrr_at_3 value: 34.117 - type: mrr_at_5 value: 36.107 - type: ndcg_at_1 value: 26.200000000000003 - type: ndcg_at_10 value: 22.64 - type: ndcg_at_100 value: 31.567 - type: ndcg_at_1000 value: 37.623 - type: ndcg_at_3 value: 21.435000000000002 - type: ndcg_at_5 value: 18.87 - type: precision_at_1 value: 26.200000000000003 - type: precision_at_10 value: 11.74 - type: precision_at_100 value: 2.465 - type: precision_at_1000 value: 0.391 - type: precision_at_3 value: 20.033 - type: precision_at_5 value: 16.64 - type: recall_at_1 value: 5.308 - type: recall_at_10 value: 23.794999999999998 - type: recall_at_100 value: 50.015 - type: recall_at_1000 value: 79.283 - type: recall_at_3 value: 12.178 - type: recall_at_5 value: 16.882 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 84.93231134675553 - type: cos_sim_spearman value: 81.68319292603205 - type: euclidean_pearson value: 81.8396814380367 - type: euclidean_spearman value: 81.24641903349945 - type: manhattan_pearson value: 81.84698799204274 - type: manhattan_spearman value: 81.24269997904105 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 86.73241671587446 - type: cos_sim_spearman value: 79.05091082971826 - type: euclidean_pearson value: 83.91146869578044 - type: euclidean_spearman value: 79.87978465370936 - type: manhattan_pearson value: 83.90888338917678 - type: manhattan_spearman value: 79.87482848584241 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 85.14970731146177 - type: cos_sim_spearman value: 86.37363490084627 - type: euclidean_pearson value: 83.02154218530433 - type: euclidean_spearman value: 83.80258761957367 - type: manhattan_pearson value: 83.01664495119347 - type: manhattan_spearman value: 83.77567458007952 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 83.40474139886784 - type: cos_sim_spearman value: 82.77768789165984 - type: euclidean_pearson value: 80.7065877443695 - type: euclidean_spearman value: 81.375940662505 - type: manhattan_pearson value: 80.6507552270278 - type: manhattan_spearman value: 81.32782179098741 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 87.08585968722274 - type: cos_sim_spearman value: 88.03110031451399 - type: euclidean_pearson value: 85.74012019602384 - type: euclidean_spearman value: 86.13592849438209 - type: manhattan_pearson value: 85.74404842369206 - type: manhattan_spearman value: 86.14492318960154 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 84.95069052788875 - type: cos_sim_spearman value: 86.4867991595147 - type: euclidean_pearson value: 84.31013325754635 - type: euclidean_spearman value: 85.01529258006482 - type: manhattan_pearson value: 84.26995570085374 - type: manhattan_spearman value: 84.96982104986162 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 87.54617647971897 - type: cos_sim_spearman value: 87.49834181751034 - type: euclidean_pearson value: 86.01015322577122 - type: euclidean_spearman value: 84.63362652063199 - type: manhattan_pearson value: 86.13807574475706 - type: manhattan_spearman value: 84.7772370721132 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 67.20047755786615 - type: cos_sim_spearman value: 67.05324077987636 - type: euclidean_pearson value: 66.91930642976601 - type: euclidean_spearman value: 65.21491856099105 - type: manhattan_pearson value: 66.78756851976624 - type: manhattan_spearman value: 65.12356257740728 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 86.19852871539686 - type: cos_sim_spearman value: 87.5161895296395 - type: euclidean_pearson value: 84.59848645207485 - type: euclidean_spearman value: 85.26427328757919 - type: manhattan_pearson value: 84.59747366996524 - type: manhattan_spearman value: 85.24045855146915 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 87.63320317811032 - type: mrr value: 96.26242947321379 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 60.928000000000004 - type: map_at_10 value: 70.112 - type: map_at_100 value: 70.59299999999999 - type: map_at_1000 value: 70.623 - type: map_at_3 value: 66.846 - type: map_at_5 value: 68.447 - type: mrr_at_1 value: 64.0 - type: mrr_at_10 value: 71.212 - type: mrr_at_100 value: 71.616 - type: mrr_at_1000 value: 71.64500000000001 - type: mrr_at_3 value: 68.77799999999999 - type: mrr_at_5 value: 70.094 - type: ndcg_at_1 value: 64.0 - type: ndcg_at_10 value: 74.607 - type: ndcg_at_100 value: 76.416 - type: ndcg_at_1000 value: 77.102 - type: ndcg_at_3 value: 69.126 - type: ndcg_at_5 value: 71.41300000000001 - type: precision_at_1 value: 64.0 - type: precision_at_10 value: 9.933 - type: precision_at_100 value: 1.077 - type: precision_at_1000 value: 0.11299999999999999 - type: precision_at_3 value: 26.556 - type: precision_at_5 value: 17.467 - type: recall_at_1 value: 60.928000000000004 - type: recall_at_10 value: 87.322 - type: recall_at_100 value: 94.833 - type: recall_at_1000 value: 100.0 - type: recall_at_3 value: 72.628 - type: recall_at_5 value: 78.428 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.86237623762376 - type: cos_sim_ap value: 96.72586477206649 - type: cos_sim_f1 value: 93.01858362631845 - type: cos_sim_precision value: 93.4409687184662 - type: cos_sim_recall value: 92.60000000000001 - type: dot_accuracy value: 99.78019801980199 - type: dot_ap value: 93.72748205246228 - type: dot_f1 value: 89.04109589041096 - type: dot_precision value: 87.16475095785441 - type: dot_recall value: 91.0 - type: euclidean_accuracy value: 99.85445544554456 - type: euclidean_ap value: 96.6661459876145 - type: euclidean_f1 value: 92.58337481333997 - type: euclidean_precision value: 92.17046580773042 - type: euclidean_recall value: 93.0 - type: manhattan_accuracy value: 99.85445544554456 - type: manhattan_ap value: 96.6883549244056 - type: manhattan_f1 value: 92.57598405580468 - type: manhattan_precision value: 92.25422045680239 - type: manhattan_recall value: 92.9 - type: max_accuracy value: 99.86237623762376 - type: max_ap value: 96.72586477206649 - type: max_f1 value: 93.01858362631845 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 66.39930057069995 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 34.96398659903402 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 55.946944700355395 - type: mrr value: 56.97151398438164 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 31.541657650692905 - type: cos_sim_spearman value: 31.605804192286303 - type: dot_pearson value: 28.26905996736398 - type: dot_spearman value: 27.864801765851187 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.22599999999999998 - type: map_at_10 value: 1.8870000000000002 - type: map_at_100 value: 9.78 - type: map_at_1000 value: 22.514 - type: map_at_3 value: 0.6669999999999999 - type: map_at_5 value: 1.077 - type: mrr_at_1 value: 82.0 - type: mrr_at_10 value: 89.86699999999999 - type: mrr_at_100 value: 89.86699999999999 - type: mrr_at_1000 value: 89.86699999999999 - type: mrr_at_3 value: 89.667 - type: mrr_at_5 value: 89.667 - type: ndcg_at_1 value: 79.0 - type: ndcg_at_10 value: 74.818 - type: ndcg_at_100 value: 53.715999999999994 - type: ndcg_at_1000 value: 47.082 - type: ndcg_at_3 value: 82.134 - type: ndcg_at_5 value: 79.81899999999999 - type: precision_at_1 value: 82.0 - type: precision_at_10 value: 78.0 - type: precision_at_100 value: 54.48 - type: precision_at_1000 value: 20.518 - type: precision_at_3 value: 87.333 - type: precision_at_5 value: 85.2 - type: recall_at_1 value: 0.22599999999999998 - type: recall_at_10 value: 2.072 - type: recall_at_100 value: 13.013 - type: recall_at_1000 value: 43.462 - type: recall_at_3 value: 0.695 - type: recall_at_5 value: 1.139 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 2.328 - type: map_at_10 value: 9.795 - type: map_at_100 value: 15.801000000000002 - type: map_at_1000 value: 17.23 - type: map_at_3 value: 4.734 - type: map_at_5 value: 6.644 - type: mrr_at_1 value: 30.612000000000002 - type: mrr_at_10 value: 46.902 - type: mrr_at_100 value: 47.495 - type: mrr_at_1000 value: 47.495 - type: mrr_at_3 value: 41.156 - type: mrr_at_5 value: 44.218 - type: ndcg_at_1 value: 28.571 - type: ndcg_at_10 value: 24.806 - type: ndcg_at_100 value: 36.419000000000004 - type: ndcg_at_1000 value: 47.272999999999996 - type: ndcg_at_3 value: 25.666 - type: ndcg_at_5 value: 25.448999999999998 - type: precision_at_1 value: 30.612000000000002 - type: precision_at_10 value: 23.061 - type: precision_at_100 value: 7.714 - type: precision_at_1000 value: 1.484 - type: precision_at_3 value: 26.531 - type: precision_at_5 value: 26.122 - type: recall_at_1 value: 2.328 - type: recall_at_10 value: 16.524 - type: recall_at_100 value: 47.179 - type: recall_at_1000 value: 81.22200000000001 - type: recall_at_3 value: 5.745 - type: recall_at_5 value: 9.339 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 70.9142 - type: ap value: 14.335574772555415 - type: f1 value: 54.62839595194111 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 59.94340690435768 - type: f1 value: 60.286487936731916 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 51.26597708987974 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 87.48882398521786 - type: cos_sim_ap value: 79.04326607602204 - type: cos_sim_f1 value: 71.64566826860633 - type: cos_sim_precision value: 70.55512918905092 - type: cos_sim_recall value: 72.77044854881267 - type: dot_accuracy value: 84.19264469213805 - type: dot_ap value: 67.96360043562528 - type: dot_f1 value: 64.06418393006827 - type: dot_precision value: 58.64941898706424 - type: dot_recall value: 70.58047493403694 - type: euclidean_accuracy value: 87.45902127913214 - type: euclidean_ap value: 78.9742237648272 - type: euclidean_f1 value: 71.5553235908142 - type: euclidean_precision value: 70.77955601445535 - type: euclidean_recall value: 72.34828496042216 - type: manhattan_accuracy value: 87.41729749061214 - type: manhattan_ap value: 78.90073137580596 - type: manhattan_f1 value: 71.3942611553533 - type: manhattan_precision value: 68.52705653967483 - type: manhattan_recall value: 74.51187335092348 - type: max_accuracy value: 87.48882398521786 - type: max_ap value: 79.04326607602204 - type: max_f1 value: 71.64566826860633 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 88.68125897465751 - type: cos_sim_ap value: 85.6003454431979 - type: cos_sim_f1 value: 77.6957163958641 - type: cos_sim_precision value: 73.0110366307807 - type: cos_sim_recall value: 83.02279026793964 - type: dot_accuracy value: 87.7672992587418 - type: dot_ap value: 82.4971301112899 - type: dot_f1 value: 75.90528233151184 - type: dot_precision value: 72.0370626469368 - type: dot_recall value: 80.21250384970742 - type: euclidean_accuracy value: 88.4503434625684 - type: euclidean_ap value: 84.91949884748384 - type: euclidean_f1 value: 76.92365018444684 - type: euclidean_precision value: 74.53245721712759 - type: euclidean_recall value: 79.47336002463813 - type: manhattan_accuracy value: 88.47556952691427 - type: manhattan_ap value: 84.8963689101517 - type: manhattan_f1 value: 76.85901249256395 - type: manhattan_precision value: 74.31693989071039 - type: manhattan_recall value: 79.58115183246073 - type: max_accuracy value: 88.68125897465751 - type: max_ap value: 85.6003454431979 - type: max_f1 value: 77.6957163958641 license: mit language: - en --- <h1 align="center">FlagEmbedding</h1> <h4 align="center"> <p> <a href=#model-list>Model List</a> | <a href=#frequently-asked-questions>FAQ</a> | <a href=#usage>Usage</a> | <a href="#evaluation">Evaluation</a> | <a href="#train">Train</a> | <a href="#contact">Contact</a> | <a href="#citation">Citation</a> | <a href="#license">License</a> <p> </h4> More details please refer to our Github: [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding). [English](README.md) | [中文](https://github.com/FlagOpen/FlagEmbedding/blob/master/README_zh.md) FlagEmbedding can map any text to a low-dimensional dense vector which can be used for tasks like retrieval, classification, clustering, or semantic search. And it also can be used in vector databases for LLMs. ************* 🌟**Updates**🌟 ************* - 10/12/2023: Release [LLM-Embedder](./FlagEmbedding/llm_embedder/README.md), a unified embedding model to support diverse retrieval augmentation needs for LLMs. [Paper](https://arxiv.org/pdf/2310.07554.pdf) :fire: - 09/15/2023: The [technical report](https://arxiv.org/pdf/2309.07597.pdf) of BGE has been released - 09/15/2023: The [masive training data](https://data.baai.ac.cn/details/BAAI-MTP) of BGE has been released - 09/12/2023: New models: - **New reranker model**: release cross-encoder models `BAAI/bge-reranker-base` and `BAAI/bge-reranker-large`, which are more powerful than embedding model. We recommend to use/fine-tune them to re-rank top-k documents returned by embedding models. - **update embedding model**: release `bge-*-v1.5` embedding model to alleviate the issue of the similarity distribution, and enhance its retrieval ability without instruction. <details> <summary>More</summary> <!-- ### More --> - 09/07/2023: Update [fine-tune code](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md): Add script to mine hard negatives and support adding instruction during fine-tuning. - 08/09/2023: BGE Models are integrated into **Langchain**, you can use it like [this](#using-langchain); C-MTEB **leaderboard** is [available](https://huggingface.co/spaces/mteb/leaderboard). - 08/05/2023: Release base-scale and small-scale models, **best performance among the models of the same size 🤗** - 08/02/2023: Release `bge-large-*`(short for BAAI General Embedding) Models, **rank 1st on MTEB and C-MTEB benchmark!** :tada: :tada: - 08/01/2023: We release the [Chinese Massive Text Embedding Benchmark](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB) (**C-MTEB**), consisting of 31 test dataset. </details> ## Model List `bge` is short for `BAAI general embedding`. | Model | Language | | Description | query instruction for retrieval [1] | |:-------------------------------|:--------:| :--------:| :--------:|:--------:| | [BAAI/llm-embedder](https://huggingface.co/BAAI/llm-embedder) | English | [Inference](./FlagEmbedding/llm_embedder/README.md) [Fine-tune](./FlagEmbedding/llm_embedder/README.md) | a unified embedding model to support diverse retrieval augmentation needs for LLMs | See [README](./FlagEmbedding/llm_embedder/README.md) | | [BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | Chinese and English | [Inference](#usage-for-reranker) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker) | a cross-encoder model which is more accurate but less efficient [2] | | | [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | Chinese and English | [Inference](#usage-for-reranker) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker) | a cross-encoder model which is more accurate but less efficient [2] | | | [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-large-zh-v1.5](https://huggingface.co/BAAI/bge-large-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-base-zh-v1.5](https://huggingface.co/BAAI/bge-base-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-small-zh-v1.5](https://huggingface.co/BAAI/bge-small-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-large-en](https://huggingface.co/BAAI/bge-large-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | :trophy: rank **1st** in [MTEB](https://huggingface.co/spaces/mteb/leaderboard) leaderboard | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-base-en](https://huggingface.co/BAAI/bge-base-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a base-scale model but with similar ability to `bge-large-en` | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-small-en](https://huggingface.co/BAAI/bge-small-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) |a small-scale model but with competitive performance | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-large-zh](https://huggingface.co/BAAI/bge-large-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | :trophy: rank **1st** in [C-MTEB](https://github.com/FlagOpen/FlagEmbedding/tree/master/C_MTEB) benchmark | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-base-zh](https://huggingface.co/BAAI/bge-base-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a base-scale model but with similar ability to `bge-large-zh` | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-small-zh](https://huggingface.co/BAAI/bge-small-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a small-scale model but with competitive performance | `为这个句子生成表示以用于检索相关文章:` | [1\]: If you need to search the relevant passages to a query, we suggest to add the instruction to the query; in other cases, no instruction is needed, just use the original query directly. In all cases, **no instruction** needs to be added to passages. [2\]: Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. To balance the accuracy and time cost, cross-encoder is widely used to re-rank top-k documents retrieved by other simple models. For examples, use bge embedding model to retrieve top 100 relevant documents, and then use bge reranker to re-rank the top 100 document to get the final top-3 results. All models have been uploaded to Huggingface Hub, and you can see them at https://huggingface.co/BAAI. If you cannot open the Huggingface Hub, you also can download the models at https://model.baai.ac.cn/models . ## Frequently asked questions <details> <summary>1. How to fine-tune bge embedding model?</summary> <!-- ### How to fine-tune bge embedding model? --> Following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) to prepare data and fine-tune your model. Some suggestions: - Mine hard negatives following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune#hard-negatives), which can improve the retrieval performance. - If you pre-train bge on your data, the pre-trained model cannot be directly used to calculate similarity, and it must be fine-tuned with contrastive learning before computing similarity. - If the accuracy of the fine-tuned model is still not high, it is recommended to use/fine-tune the cross-encoder model (bge-reranker) to re-rank top-k results. Hard negatives also are needed to fine-tune reranker. </details> <details> <summary>2. The similarity score between two dissimilar sentences is higher than 0.5</summary> <!-- ### The similarity score between two dissimilar sentences is higher than 0.5 --> **Suggest to use bge v1.5, which alleviates the issue of the similarity distribution.** Since we finetune the models by contrastive learning with a temperature of 0.01, the similarity distribution of the current BGE model is about in the interval \[0.6, 1\]. So a similarity score greater than 0.5 does not indicate that the two sentences are similar. For downstream tasks, such as passage retrieval or semantic similarity, **what matters is the relative order of the scores, not the absolute value.** If you need to filter similar sentences based on a similarity threshold, please select an appropriate similarity threshold based on the similarity distribution on your data (such as 0.8, 0.85, or even 0.9). </details> <details> <summary>3. When does the query instruction need to be used</summary> <!-- ### When does the query instruction need to be used --> For the `bge-*-v1.5`, we improve its retrieval ability when not using instruction. No instruction only has a slight degradation in retrieval performance compared with using instruction. So you can generate embedding without instruction in all cases for convenience. For a retrieval task that uses short queries to find long related documents, it is recommended to add instructions for these short queries. **The best method to decide whether to add instructions for queries is choosing the setting that achieves better performance on your task.** In all cases, the documents/passages do not need to add the instruction. </details> ## Usage ### Usage for Embedding Model Here are some examples for using `bge` models with [FlagEmbedding](#using-flagembedding), [Sentence-Transformers](#using-sentence-transformers), [Langchain](#using-langchain), or [Huggingface Transformers](#using-huggingface-transformers). #### Using FlagEmbedding ``` pip install -U FlagEmbedding ``` If it doesn't work for you, you can see [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md) for more methods to install FlagEmbedding. ```python from FlagEmbedding import FlagModel sentences_1 = ["样例数据-1", "样例数据-2"] sentences_2 = ["样例数据-3", "样例数据-4"] model = FlagModel('BAAI/bge-large-zh-v1.5', query_instruction_for_retrieval="为这个句子生成表示以用于检索相关文章:", use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation embeddings_1 = model.encode(sentences_1) embeddings_2 = model.encode(sentences_2) similarity = embeddings_1 @ embeddings_2.T print(similarity) # for s2p(short query to long passage) retrieval task, suggest to use encode_queries() which will automatically add the instruction to each query # corpus in retrieval task can still use encode() or encode_corpus(), since they don't need instruction queries = ['query_1', 'query_2'] passages = ["样例文档-1", "样例文档-2"] q_embeddings = model.encode_queries(queries) p_embeddings = model.encode(passages) scores = q_embeddings @ p_embeddings.T ``` For the value of the argument `query_instruction_for_retrieval`, see [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list). By default, FlagModel will use all available GPUs when encoding. Please set `os.environ["CUDA_VISIBLE_DEVICES"]` to select specific GPUs. You also can set `os.environ["CUDA_VISIBLE_DEVICES"]=""` to make all GPUs unavailable. #### Using Sentence-Transformers You can also use the `bge` models with [sentence-transformers](https://www.SBERT.net): ``` pip install -U sentence-transformers ``` ```python from sentence_transformers import SentenceTransformer sentences_1 = ["样例数据-1", "样例数据-2"] sentences_2 = ["样例数据-3", "样例数据-4"] model = SentenceTransformer('BAAI/bge-large-zh-v1.5') embeddings_1 = model.encode(sentences_1, normalize_embeddings=True) embeddings_2 = model.encode(sentences_2, normalize_embeddings=True) similarity = embeddings_1 @ embeddings_2.T print(similarity) ``` For s2p(short query to long passage) retrieval task, each short query should start with an instruction (instructions see [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list)). But the instruction is not needed for passages. ```python from sentence_transformers import SentenceTransformer queries = ['query_1', 'query_2'] passages = ["样例文档-1", "样例文档-2"] instruction = "为这个句子生成表示以用于检索相关文章:" model = SentenceTransformer('BAAI/bge-large-zh-v1.5') q_embeddings = model.encode([instruction+q for q in queries], normalize_embeddings=True) p_embeddings = model.encode(passages, normalize_embeddings=True) scores = q_embeddings @ p_embeddings.T ``` #### Using Langchain You can use `bge` in langchain like this: ```python from langchain.embeddings import HuggingFaceBgeEmbeddings model_name = "BAAI/bge-large-en-v1.5" model_kwargs = {'device': 'cuda'} encode_kwargs = {'normalize_embeddings': True} # set True to compute cosine similarity model = HuggingFaceBgeEmbeddings( model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs, query_instruction="为这个句子生成表示以用于检索相关文章:" ) model.query_instruction = "为这个句子生成表示以用于检索相关文章:" ``` #### Using HuggingFace Transformers With the transformers package, you can use the model like this: First, you pass your input through the transformer model, then you select the last hidden state of the first token (i.e., [CLS]) as the sentence embedding. ```python from transformers import AutoTokenizer, AutoModel import torch # Sentences we want sentence embeddings for sentences = ["样例数据-1", "样例数据-2"] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-large-zh-v1.5') model = AutoModel.from_pretrained('BAAI/bge-large-zh-v1.5') model.eval() # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # for s2p(short query to long passage) retrieval task, add an instruction to query (not add instruction for passages) # encoded_input = tokenizer([instruction + q for q in queries], padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, cls pooling. sentence_embeddings = model_output[0][:, 0] # normalize embeddings sentence_embeddings = torch.nn.functional.normalize(sentence_embeddings, p=2, dim=1) print("Sentence embeddings:", sentence_embeddings) ``` ### Usage for Reranker Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. You can get a relevance score by inputting query and passage to the reranker. The reranker is optimized based cross-entropy loss, so the relevance score is not bounded to a specific range. #### Using FlagEmbedding ``` pip install -U FlagEmbedding ``` Get relevance scores (higher scores indicate more relevance): ```python from FlagEmbedding import FlagReranker reranker = FlagReranker('BAAI/bge-reranker-large', use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation score = reranker.compute_score(['query', 'passage']) print(score) scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']]) print(scores) ``` #### Using Huggingface transformers ```python import torch from transformers import AutoModelForSequenceClassification, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-reranker-large') model = AutoModelForSequenceClassification.from_pretrained('BAAI/bge-reranker-large') model.eval() pairs = [['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']] with torch.no_grad(): inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512) scores = model(**inputs, return_dict=True).logits.view(-1, ).float() print(scores) ``` ## Evaluation `baai-general-embedding` models achieve **state-of-the-art performance on both MTEB and C-MTEB leaderboard!** For more details and evaluation tools see our [scripts](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md). - **MTEB**: | Model Name | Dimension | Sequence Length | Average (56) | Retrieval (15) |Clustering (11) | Pair Classification (3) | Reranking (4) | STS (10) | Summarization (1) | Classification (12) | |:----:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) | 1024 | 512 | **64.23** | **54.29** | 46.08 | 87.12 | 60.03 | 83.11 | 31.61 | 75.97 | | [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) | 768 | 512 | 63.55 | 53.25 | 45.77 | 86.55 | 58.86 | 82.4 | 31.07 | 75.53 | | [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) | 384 | 512 | 62.17 |51.68 | 43.82 | 84.92 | 58.36 | 81.59 | 30.12 | 74.14 | | [bge-large-en](https://huggingface.co/BAAI/bge-large-en) | 1024 | 512 | 63.98 | 53.9 | 46.98 | 85.8 | 59.48 | 81.56 | 32.06 | 76.21 | | [bge-base-en](https://huggingface.co/BAAI/bge-base-en) | 768 | 512 | 63.36 | 53.0 | 46.32 | 85.86 | 58.7 | 81.84 | 29.27 | 75.27 | | [gte-large](https://huggingface.co/thenlper/gte-large) | 1024 | 512 | 63.13 | 52.22 | 46.84 | 85.00 | 59.13 | 83.35 | 31.66 | 73.33 | | [gte-base](https://huggingface.co/thenlper/gte-base) | 768 | 512 | 62.39 | 51.14 | 46.2 | 84.57 | 58.61 | 82.3 | 31.17 | 73.01 | | [e5-large-v2](https://huggingface.co/intfloat/e5-large-v2) | 1024| 512 | 62.25 | 50.56 | 44.49 | 86.03 | 56.61 | 82.05 | 30.19 | 75.24 | | [bge-small-en](https://huggingface.co/BAAI/bge-small-en) | 384 | 512 | 62.11 | 51.82 | 44.31 | 83.78 | 57.97 | 80.72 | 30.53 | 74.37 | | [instructor-xl](https://huggingface.co/hkunlp/instructor-xl) | 768 | 512 | 61.79 | 49.26 | 44.74 | 86.62 | 57.29 | 83.06 | 32.32 | 61.79 | | [e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) | 768 | 512 | 61.5 | 50.29 | 43.80 | 85.73 | 55.91 | 81.05 | 30.28 | 73.84 | | [gte-small](https://huggingface.co/thenlper/gte-small) | 384 | 512 | 61.36 | 49.46 | 44.89 | 83.54 | 57.7 | 82.07 | 30.42 | 72.31 | | [text-embedding-ada-002](https://platform.openai.com/docs/guides/embeddings) | 1536 | 8192 | 60.99 | 49.25 | 45.9 | 84.89 | 56.32 | 80.97 | 30.8 | 70.93 | | [e5-small-v2](https://huggingface.co/intfloat/e5-base-v2) | 384 | 512 | 59.93 | 49.04 | 39.92 | 84.67 | 54.32 | 80.39 | 31.16 | 72.94 | | [sentence-t5-xxl](https://huggingface.co/sentence-transformers/sentence-t5-xxl) | 768 | 512 | 59.51 | 42.24 | 43.72 | 85.06 | 56.42 | 82.63 | 30.08 | 73.42 | | [all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) | 768 | 514 | 57.78 | 43.81 | 43.69 | 83.04 | 59.36 | 80.28 | 27.49 | 65.07 | | [sgpt-bloom-7b1-msmarco](https://huggingface.co/bigscience/sgpt-bloom-7b1-msmarco) | 4096 | 2048 | 57.59 | 48.22 | 38.93 | 81.9 | 55.65 | 77.74 | 33.6 | 66.19 | - **C-MTEB**: We create the benchmark C-MTEB for Chinese text embedding which consists of 31 datasets from 6 tasks. Please refer to [C_MTEB](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md) for a detailed introduction. | Model | Embedding dimension | Avg | Retrieval | STS | PairClassification | Classification | Reranking | Clustering | |:-------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | [**BAAI/bge-large-zh-v1.5**](https://huggingface.co/BAAI/bge-large-zh-v1.5) | 1024 | **64.53** | 70.46 | 56.25 | 81.6 | 69.13 | 65.84 | 48.99 | | [BAAI/bge-base-zh-v1.5](https://huggingface.co/BAAI/bge-base-zh-v1.5) | 768 | 63.13 | 69.49 | 53.72 | 79.75 | 68.07 | 65.39 | 47.53 | | [BAAI/bge-small-zh-v1.5](https://huggingface.co/BAAI/bge-small-zh-v1.5) | 512 | 57.82 | 61.77 | 49.11 | 70.41 | 63.96 | 60.92 | 44.18 | | [BAAI/bge-large-zh](https://huggingface.co/BAAI/bge-large-zh) | 1024 | 64.20 | 71.53 | 54.98 | 78.94 | 68.32 | 65.11 | 48.39 | | [bge-large-zh-noinstruct](https://huggingface.co/BAAI/bge-large-zh-noinstruct) | 1024 | 63.53 | 70.55 | 53 | 76.77 | 68.58 | 64.91 | 50.01 | | [BAAI/bge-base-zh](https://huggingface.co/BAAI/bge-base-zh) | 768 | 62.96 | 69.53 | 54.12 | 77.5 | 67.07 | 64.91 | 47.63 | | [multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) | 1024 | 58.79 | 63.66 | 48.44 | 69.89 | 67.34 | 56.00 | 48.23 | | [BAAI/bge-small-zh](https://huggingface.co/BAAI/bge-small-zh) | 512 | 58.27 | 63.07 | 49.45 | 70.35 | 63.64 | 61.48 | 45.09 | | [m3e-base](https://huggingface.co/moka-ai/m3e-base) | 768 | 57.10 | 56.91 | 50.47 | 63.99 | 67.52 | 59.34 | 47.68 | | [m3e-large](https://huggingface.co/moka-ai/m3e-large) | 1024 | 57.05 | 54.75 | 50.42 | 64.3 | 68.2 | 59.66 | 48.88 | | [multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) | 768 | 55.48 | 61.63 | 46.49 | 67.07 | 65.35 | 54.35 | 40.68 | | [multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) | 384 | 55.38 | 59.95 | 45.27 | 66.45 | 65.85 | 53.86 | 45.26 | | [text-embedding-ada-002(OpenAI)](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings) | 1536 | 53.02 | 52.0 | 43.35 | 69.56 | 64.31 | 54.28 | 45.68 | | [luotuo](https://huggingface.co/silk-road/luotuo-bert-medium) | 1024 | 49.37 | 44.4 | 42.78 | 66.62 | 61 | 49.25 | 44.39 | | [text2vec-base](https://huggingface.co/shibing624/text2vec-base-chinese) | 768 | 47.63 | 38.79 | 43.41 | 67.41 | 62.19 | 49.45 | 37.66 | | [text2vec-large](https://huggingface.co/GanymedeNil/text2vec-large-chinese) | 1024 | 47.36 | 41.94 | 44.97 | 70.86 | 60.66 | 49.16 | 30.02 | - **Reranking**: See [C_MTEB](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/) for evaluation script. | Model | T2Reranking | T2RerankingZh2En\* | T2RerankingEn2Zh\* | MMarcoReranking | CMedQAv1 | CMedQAv2 | Avg | |:-------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | text2vec-base-multilingual | 64.66 | 62.94 | 62.51 | 14.37 | 48.46 | 48.6 | 50.26 | | multilingual-e5-small | 65.62 | 60.94 | 56.41 | 29.91 | 67.26 | 66.54 | 57.78 | | multilingual-e5-large | 64.55 | 61.61 | 54.28 | 28.6 | 67.42 | 67.92 | 57.4 | | multilingual-e5-base | 64.21 | 62.13 | 54.68 | 29.5 | 66.23 | 66.98 | 57.29 | | m3e-base | 66.03 | 62.74 | 56.07 | 17.51 | 77.05 | 76.76 | 59.36 | | m3e-large | 66.13 | 62.72 | 56.1 | 16.46 | 77.76 | 78.27 | 59.57 | | bge-base-zh-v1.5 | 66.49 | 63.25 | 57.02 | 29.74 | 80.47 | 84.88 | 63.64 | | bge-large-zh-v1.5 | 65.74 | 63.39 | 57.03 | 28.74 | 83.45 | 85.44 | 63.97 | | [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | 67.28 | 63.95 | 60.45 | 35.46 | 81.26 | 84.1 | 65.42 | | [BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | 67.6 | 64.03 | 61.44 | 37.16 | 82.15 | 84.18 | 66.09 | \* : T2RerankingZh2En and T2RerankingEn2Zh are cross-language retrieval tasks ## Train ### BAAI Embedding We pre-train the models using [retromae](https://github.com/staoxiao/RetroMAE) and train them on large-scale pairs data using contrastive learning. **You can fine-tune the embedding model on your data following our [examples](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune).** We also provide a [pre-train example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/pretrain). Note that the goal of pre-training is to reconstruct the text, and the pre-trained model cannot be used for similarity calculation directly, it needs to be fine-tuned. More training details for bge see [baai_general_embedding](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md). ### BGE Reranker Cross-encoder will perform full-attention over the input pair, which is more accurate than embedding model (i.e., bi-encoder) but more time-consuming than embedding model. Therefore, it can be used to re-rank the top-k documents returned by embedding model. We train the cross-encoder on a multilingual pair data, The data format is the same as embedding model, so you can fine-tune it easily following our [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker). More details please refer to [./FlagEmbedding/reranker/README.md](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker) ## Contact If you have any question or suggestion related to this project, feel free to open an issue or pull request. You also can email Shitao Xiao([email protected]) and Zheng Liu([email protected]). ## Citation If you find this repository useful, please consider giving a star :star: and citation ``` @misc{bge_embedding, title={C-Pack: Packaged Resources To Advance General Chinese Embedding}, author={Shitao Xiao and Zheng Liu and Peitian Zhang and Niklas Muennighoff}, year={2023}, eprint={2309.07597}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` ## License FlagEmbedding is licensed under the [MIT License](https://github.com/FlagOpen/FlagEmbedding/blob/master/LICENSE). The released models can be used for commercial purposes free of charge.
[ -0.4917970299720764, -0.9121562242507935, 0.39335909485816956, 0.15926150977611542, -0.3644159436225891, -0.27619844675064087, -0.3187490701675415, -0.2546616792678833, 0.4034213423728943, 0.3811470866203308, -0.3493821918964386, -0.8789252638816833, -0.48434871435165405, -0.061868757009506226, -0.08562654256820679, 0.5569250583648682, -0.05040394887328148, 0.14363285899162292, 0.052729532122612, -0.25072580575942993, -0.38095730543136597, -0.25557446479797363, -0.6599745154380798, -0.2580225467681885, 0.3454954922199249, 0.22898080945014954, 0.5664677023887634, 0.7565454244613647, 0.29929855465888977, 0.27112576365470886, -0.23612339794635773, 0.1565926969051361, -0.47967153787612915, -0.06917298585176468, -0.20805604755878448, -0.33379724621772766, -0.4219249486923218, 0.1771097332239151, 0.6846937537193298, 0.45031237602233887, -0.10390447080135345, 0.10425695776939392, 0.00692377844825387, 0.71429044008255, -0.46325114369392395, 0.27861225605010986, -0.5734079480171204, 0.03648480027914047, -0.24258849024772644, 0.1513890027999878, -0.5183275938034058, -0.3853422999382019, 0.1603473275899887, -0.6159512400627136, 0.08287999778985977, 0.2900417149066925, 1.307506799697876, 0.20688290894031525, -0.45559000968933105, -0.16615848243236542, -0.12169365584850311, 0.994102954864502, -1.0095791816711426, 0.6872597932815552, 0.5090594291687012, 0.25554022192955017, -0.0781526267528534, -0.8174024224281311, -0.3616727888584137, -0.16660532355308533, -0.20328503847122192, 0.4233214557170868, 0.0256485752761364, 0.019987745210528374, 0.3170413672924042, 0.5985334515571594, -0.5553396344184875, 0.0947275385260582, -0.06872905045747757, -0.15926045179367065, 0.7642083168029785, -0.1649675816297531, 0.45869553089141846, -0.5581547021865845, -0.29989349842071533, -0.3680296242237091, -0.8007943630218506, 0.04600268974900246, 0.3670075833797455, 0.137363001704216, -0.39358171820640564, 0.5685566663742065, -0.22973068058490753, 0.6109962463378906, 0.05062193423509598, 0.0516192652285099, 0.5265907049179077, -0.374182790517807, -0.20757225155830383, -0.14727148413658142, 0.9336583018302917, 0.3954954743385315, -0.057964473962783813, 0.05175301060080528, -0.32384660840034485, -0.09511028230190277, -0.09334386885166168, -0.8982179164886475, -0.24408532679080963, 0.19886384904384613, -0.7663068175315857, -0.18192589282989502, 0.23823782801628113, -0.7802329063415527, 0.10407708585262299, 0.0016007493250072002, 0.585857629776001, -0.7480831146240234, -0.07390255481004715, 0.31346237659454346, -0.2118411660194397, 0.4023590385913849, -0.003231465583667159, -0.6287349462509155, -0.24859385192394257, 0.5332337617874146, 0.860173761844635, 0.16767533123493195, -0.07676992565393448, -0.3748384118080139, 0.03796732425689697, -0.1430635154247284, 0.3286088705062866, -0.5217965245246887, -0.17894569039344788, 0.21137920022010803, 0.38862374424934387, -0.10362780094146729, -0.291079580783844, 0.8852188587188721, -0.5387099981307983, 0.36164164543151855, -0.3797711431980133, -0.8259833455085754, -0.503160297870636, 0.09275687485933304, -0.8069127202033997, 1.1115566492080688, -0.09858797490596771, -0.8519017696380615, 0.08340819180011749, -0.6473492980003357, -0.21710936725139618, -0.25654977560043335, -0.033439960330724716, -0.6009854674339294, -0.11823835223913193, 0.38206779956817627, 0.586105227470398, -0.22970585525035858, 0.03495078533887863, -0.3490271270275116, -0.5734331607818604, -0.007032394874840975, -0.23192544281482697, 1.0995248556137085, 0.2569870948791504, -0.3371439576148987, -0.2211025208234787, -0.43995827436447144, 0.12060470134019852, 0.3049491047859192, -0.3136955797672272, -0.34632110595703125, 0.22229573130607605, 0.23741373419761658, 0.0519283302128315, 0.532094419002533, -0.7079308032989502, 0.18408465385437012, -0.5881211161613464, 0.596612274646759, 0.5611453056335449, 0.17341366410255432, 0.24086976051330566, -0.4767483174800873, 0.28925153613090515, -0.023568883538246155, -0.03820270299911499, -0.2231236845254898, -0.5332085490226746, -0.6302730441093445, -0.3037233054637909, 0.7439141869544983, 0.6626705527305603, -0.8764532208442688, 0.6678094267845154, -0.4590986669063568, -0.6218410730361938, -0.9469890594482422, 0.13509726524353027, 0.5358606576919556, 0.002314120065420866, 0.7215077877044678, -0.13861384987831116, -0.4815653860569, -0.938438355922699, -0.06217969208955765, 0.07854179292917252, -0.09143476188182831, 0.5395910739898682, 0.617742121219635, -0.3207966387271881, 0.4096141755580902, -0.7361123561859131, -0.35045313835144043, -0.23097604513168335, -0.07369431853294373, 0.34056612849235535, 0.49303698539733887, 0.6417325735092163, -1.0118588209152222, -0.5865143537521362, -0.008065720088779926, -0.7820898294448853, 0.07667311280965805, 0.036675386130809784, -0.30095741152763367, 0.17536960542201996, 0.612797737121582, -0.4129248559474945, 0.23894579708576202, 0.47879064083099365, -0.25913238525390625, 0.2828845679759979, -0.02090475521981716, 0.14730790257453918, -1.330299973487854, 0.022242818027734756, 0.30332544445991516, -0.11486539244651794, -0.27505314350128174, 0.5225419402122498, 0.17051756381988525, 0.2073279321193695, -0.34719759225845337, 0.5901947021484375, -0.5294108390808105, 0.25197452306747437, 0.12947365641593933, 0.6173920035362244, -0.0899772047996521, 0.5147316455841064, -0.04709700495004654, 0.7206954956054688, 0.37333211302757263, -0.4015792906284332, 0.12459217011928558, 0.5308554172515869, -0.44731444120407104, 0.08171137422323227, -0.6624714732170105, -0.07638781517744064, -0.07412522286176682, 0.16863416135311127, -0.8326302170753479, -0.0733034536242485, 0.26644769310951233, -0.5769767761230469, 0.5308395624160767, -0.3013218343257904, -0.49975740909576416, -0.3710670471191406, -0.9166911840438843, 0.1475072205066681, 0.5871821641921997, -0.6514768600463867, 0.22120033204555511, 0.2969546318054199, 0.09350575506687164, -0.7782111763954163, -0.8228302001953125, -0.15640223026275635, -0.002264339243993163, -0.5303692817687988, 0.5489431023597717, -0.02883104979991913, 0.25723689794540405, 0.19024287164211273, -0.07193037867546082, 0.15140888094902039, 0.11663859337568283, -0.0029365697409957647, 0.24749252200126648, -0.4802510738372803, 0.0476856529712677, 0.275939404964447, 0.1315978318452835, -0.19963866472244263, -0.16270552575588226, 0.44453224539756775, -0.1731950342655182, -0.35953885316848755, -0.2387179136276245, 0.34303024411201477, 0.2581000030040741, -0.4079892933368683, 0.5978900790214539, 0.9997373223304749, -0.37799617648124695, -0.08413289487361908, -0.6667248010635376, -0.12422462552785873, -0.4862056374549866, 0.4579135477542877, -0.32667216658592224, -0.9906607270240784, 0.3992321789264679, -0.020395895466208458, 0.218032568693161, 0.6829168200492859, 0.3386148512363434, -0.1428033858537674, 1.0860356092453003, 0.3779831826686859, -0.2722134292125702, 0.6689903140068054, -0.6675193309783936, 0.17887775599956512, -1.1849076747894287, -0.04504662752151489, -0.39903220534324646, -0.39822685718536377, -1.3405680656433105, -0.5106154680252075, 0.06238797679543495, 0.2820959985256195, -0.38379231095314026, 0.4338037371635437, -0.5777703523635864, 0.15388894081115723, 0.48900970816612244, 0.2991540729999542, -0.018452363088726997, 0.12543046474456787, -0.4379253685474396, -0.27333033084869385, -0.615394115447998, -0.5130186676979065, 1.0093634128570557, 0.48818039894104004, 0.6184115409851074, 0.36703652143478394, 0.8317365050315857, 0.1904895156621933, 0.09796921163797379, -0.780764639377594, 0.5773665308952332, -0.5281172394752502, -0.5766896605491638, -0.3623805642127991, -0.4928167462348938, -1.1266753673553467, 0.40084049105644226, -0.27620500326156616, -0.7827890515327454, 0.10814967751502991, -0.19935756921768188, -0.030741354450583458, 0.47183531522750854, -0.6826187968254089, 1.0363374948501587, -0.10903039574623108, -0.3109346330165863, -0.07844258099794388, -0.4234257936477661, 0.32927194237709045, 0.20091412961483002, 0.08322131633758545, 0.07470317929983139, -0.26243671774864197, 0.7681471109390259, -0.18991416692733765, 0.6442910432815552, -0.1636548787355423, 0.15086346864700317, 0.4350244402885437, -0.18594372272491455, 0.5594721436500549, 0.08093002438545227, -0.18204768002033234, 0.30464738607406616, 0.09054489433765411, -0.48835110664367676, -0.5022341012954712, 0.8901168704032898, -0.6806955933570862, -0.7152196168899536, -0.3792705833911896, -0.25338515639305115, 0.18115606904029846, 0.4426770508289337, 0.3571534752845764, 0.22144240140914917, -0.10434862226247787, 0.6539531946182251, 0.9369509220123291, -0.5519316792488098, 0.38803672790527344, 0.350559264421463, -0.2768425941467285, -0.5992287993431091, 1.1354446411132812, 0.2656397819519043, -0.05330642685294151, 0.6816064715385437, 0.01351808663457632, -0.28277260065078735, -0.5373090505599976, -0.4611698389053345, 0.6434146165847778, -0.600497305393219, -0.16940733790397644, -0.6488251090049744, -0.4323805570602417, -0.43788644671440125, 0.022176872938871384, -0.2742101550102234, -0.2864987552165985, -0.18045517802238464, -0.28421303629875183, 0.23849305510520935, 0.48024874925613403, 0.12320030480623245, 0.08978405594825745, -0.7190878391265869, 0.21328915655612946, -0.09880057722330093, 0.4449179470539093, 0.07253655791282654, -0.546136736869812, -0.6290742754936218, 0.17635180056095123, -0.4961189925670624, -1.097845196723938, 0.3527429401874542, 0.0763259083032608, 0.8483840823173523, 0.3333483338356018, -0.01122608594596386, 0.41526830196380615, -0.5310884118080139, 1.081298828125, -0.10962003469467163, -0.7951414585113525, 0.5159289240837097, -0.28411999344825745, 0.16692203283309937, 0.5661880970001221, 0.6615703105926514, -0.46920469403266907, -0.27738773822784424, -0.4974641799926758, -0.9762814044952393, 0.49247539043426514, 0.1843331754207611, 0.043226901441812515, -0.3003985583782196, 0.3328987658023834, -0.18441903591156006, -0.0023139920085668564, -0.8095731139183044, -0.7547932863235474, -0.33806613087654114, -0.35643884539604187, -0.0979190468788147, -0.28025397658348083, 0.20887281000614166, -0.29385653138160706, 1.0127955675125122, 0.004170624539256096, 0.5556016564369202, 0.36256203055381775, -0.33087679743766785, 0.24234871566295624, 0.25593316555023193, 0.30133670568466187, 0.18955889344215393, -0.3912491500377655, -0.14632770419120789, 0.3187618851661682, -0.5581767559051514, -0.06475118547677994, 0.31365451216697693, -0.47415584325790405, 0.19585788249969482, 0.3093602955341339, 0.7157406806945801, 0.45411843061447144, -0.4482158422470093, 0.5723576545715332, 0.11585415154695511, -0.19031701982021332, -0.3024125397205353, -0.07244732975959778, 0.3090818226337433, 0.25450772047042847, 0.11810966581106186, -0.4614958167076111, 0.26804250478744507, -0.5359582901000977, 0.3429628610610962, 0.45435860753059387, -0.38470590114593506, -0.0678970068693161, 0.70831298828125, 0.034975845366716385, -0.021308057010173798, 0.4843420386314392, -0.5078408718109131, -0.7446918487548828, 0.4296441674232483, 0.3791488707065582, 0.8493991494178772, -0.1474267691373825, 0.2266235500574112, 0.8720858097076416, 0.5383305549621582, -0.32331085205078125, 0.36064058542251587, 0.07824323326349258, -0.5908493399620056, -0.4484456181526184, -0.5486404895782471, -0.05894216150045395, 0.26951584219932556, -0.5846852660179138, 0.35474514961242676, -0.4215252995491028, -0.1495818942785263, 0.031722791492938995, 0.44416430592536926, -0.7529358863830566, 0.1280055046081543, 0.0456489622592926, 1.1375863552093506, -0.5906219482421875, 0.8449050188064575, 1.0035991668701172, -0.969935953617096, -0.7814849615097046, 0.08019335567951202, -0.13211701810359955, -0.6157646775245667, 0.37970051169395447, 0.2669503688812256, 0.1790168732404709, 0.0628160610795021, -0.4824950397014618, -0.9240347146987915, 1.586942195892334, 0.038656748831272125, -0.5351653695106506, -0.0627468153834343, -0.2851398289203644, 0.4628412127494812, -0.3825380802154541, 0.451323926448822, 0.41685330867767334, 0.6175791025161743, -0.18728259205818176, -0.6515793204307556, 0.5485309958457947, -0.3199205994606018, 0.23725971579551697, 0.04955912381410599, -0.984024703502655, 0.8381196856498718, 0.046198565512895584, -0.3352476954460144, 0.19697697460651398, 0.731243908405304, 0.2325790673494339, 0.42402613162994385, 0.24393317103385925, 0.9391081929206848, 0.6669497489929199, -0.22529436647891998, 1.1691102981567383, -0.26123324036598206, 0.635422945022583, 0.8789224624633789, 0.17103832960128784, 1.1311215162277222, 0.08972802758216858, -0.2383190542459488, 0.6788000464439392, 0.8010855317115784, -0.32304438948631287, 0.4705699682235718, 0.018947070464491844, 0.06136717274785042, -0.3231780230998993, 0.05400153994560242, -0.5413292646408081, 0.29115355014801025, 0.3292744755744934, -0.5224844217300415, 0.04530218616127968, -0.29604601860046387, 0.12072090059518814, 0.10746816545724869, -0.022620033472776413, 0.5829463005065918, 0.3159216642379761, -0.47084447741508484, 0.672248899936676, 0.23842239379882812, 1.0218559503555298, -0.4089002311229706, -0.15431565046310425, -0.28587907552719116, -0.11535292118787766, -0.22934561967849731, -0.790655791759491, -0.08192181587219238, -0.26000723242759705, -0.2086254209280014, 0.08522395044565201, 0.5456407070159912, -0.6298020482063293, -0.4112842082977295, 0.5716066360473633, 0.5203923583030701, 0.2451905906200409, 0.18083496391773224, -1.1097532510757446, 0.03155858442187309, 0.38683757185935974, -0.5384969115257263, 0.31043702363967896, 0.47696754336357117, -0.06284209340810776, 0.5959566235542297, 0.5904459357261658, 0.06490226835012436, -0.01969398558139801, 0.04061232879757881, 0.5199528932571411, -0.9449971914291382, -0.3085385859012604, -0.6386343240737915, 0.3643895387649536, -0.3301919102668762, 0.0221808310598135, 0.8165912628173828, 0.7114246487617493, 1.084007740020752, -0.05303525552153587, 0.8228715658187866, -0.11570622026920319, 0.41215577721595764, -0.6082319021224976, 0.9007401466369629, -1.0377278327941895, 0.2609661817550659, -0.35725247859954834, -0.9467119574546814, -0.15897879004478455, 0.707438588142395, -0.3395439088344574, 0.23371893167495728, 0.6871347427368164, 0.9879443645477295, -0.25833117961883545, -0.1929139345884323, 0.3111801743507385, 0.44082456827163696, 0.15963251888751984, 0.8009560704231262, 0.3490568697452545, -0.9881619811058044, 0.6472155451774597, -0.2394942045211792, 0.12903288006782532, -0.525607705116272, -0.6428669691085815, -0.931767463684082, -0.7401321530342102, -0.42517736554145813, -0.30864813923835754, -0.04586928337812424, 0.9298316240310669, 0.34564995765686035, -0.7558746337890625, -0.06993477046489716, 0.2788669466972351, 0.4898790717124939, -0.2695677578449249, -0.27795010805130005, 0.6664249300956726, -0.07666083425283432, -0.9447400569915771, 0.3316705524921417, -0.08436305820941925, -0.06884507834911346, -0.05372384190559387, -0.24726758897304535, -0.8908063173294067, 0.12003599107265472, 0.6033106446266174, 0.25743740797042847, -0.9210304021835327, -0.4236951172351837, 0.085548996925354, -0.26322922110557556, -0.1556014120578766, 0.17063041031360626, -0.41602054238319397, 0.36280158162117004, 0.6252936124801636, 0.7770823240280151, 0.6671158671379089, -0.04740946739912033, 0.20530149340629578, -0.6183277368545532, -0.08610108494758606, -0.042357608675956726, 0.7162543535232544, 0.36767950654029846, -0.30395805835723877, 0.910102903842926, 0.2162483185529709, -0.4089943766593933, -0.7599421739578247, 0.03271307051181793, -1.0642472505569458, -0.3319217562675476, 1.127224326133728, -0.42954444885253906, -0.25271299481391907, 0.27581310272216797, -0.19327957928180695, 0.5534521341323853, -0.49581798911094666, 0.47473666071891785, 0.8054698705673218, 0.438792884349823, -0.15727850794792175, -0.9182953238487244, 0.315695583820343, 0.6267865896224976, -0.2778308391571045, -0.342660516500473, 0.3409629166126251, 0.48798197507858276, 0.2409132719039917, 0.11801017075777054, -0.24918068945407867, 0.32204949855804443, -0.07588997483253479, -0.008661134168505669, -0.1395338475704193, 0.2484905868768692, -0.18418358266353607, 0.0261821448802948, -0.16862145066261292, -0.31124991178512573 ]
ybelkada/tiny-random-T5ForConditionalGeneration-calibrated
ybelkada
"2023-04-05T17:16:54Z"
353,154
0
transformers
[ "transformers", "pytorch", "t5", "text2text-generation", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text2text-generation
"2023-04-05T17:13:33Z"
A "better calibrated" tiny T5 model for testing purposes
[ -0.3201766014099121, 0.2175084948539734, 0.5312951803207397, 0.05354122072458267, -0.7125290036201477, -0.2051466554403305, -0.03859143704175949, -0.11415311694145203, -0.122822605073452, -0.2943877875804901, -0.1132226288318634, -0.2161533683538437, -0.25701916217803955, 0.33055317401885986, -0.46333348751068115, 0.45062220096588135, 0.19658291339874268, 0.3453594148159027, 0.43842005729675293, -0.24730460345745087, -0.5481888055801392, 0.33962392807006836, -0.8299291133880615, -0.6344668865203857, 0.8648345470428467, 0.9357174634933472, 0.7133277654647827, 0.28623855113983154, 0.7353954911231995, 0.060604821890592575, 0.02182692661881447, -0.1870434284210205, -0.3587336838245392, -0.8763378858566284, 0.09673784673213959, -0.5286438465118408, -0.6680784225463867, -0.093837209045887, 0.2202058881521225, 0.6358444094657898, -0.009489163756370544, 0.7208479046821594, -0.13747228682041168, 0.10303457081317902, -0.5164244771003723, -0.21541500091552734, 0.2944070100784302, 0.03810779005289078, -0.06413248926401138, 0.0031636618077754974, -0.7108585238456726, -0.3929336369037628, 0.01031343825161457, -0.641516923904419, 0.4824138283729553, 0.29886341094970703, 1.2202032804489136, 0.45010489225387573, -0.7753708362579346, 0.36601993441581726, -0.7920301556587219, 0.8776872158050537, -0.7562780380249023, 0.8104137778282166, 0.38965028524398804, 0.7175909876823425, 0.28506579995155334, -1.0427868366241455, -0.32853737473487854, -0.489234060049057, 0.14166471362113953, -0.0751533955335617, -0.029802529141306877, -0.08524277806282043, 0.45845624804496765, 0.2162487804889679, -0.38766300678253174, 0.1337655633687973, -0.8240667581558228, 0.06191349774599075, 0.5508860349655151, 0.3944425880908966, 0.45251569151878357, -0.03309373930096626, -0.08901511132717133, -0.2574992775917053, -0.7395206689834595, -0.18913060426712036, 0.16030335426330566, 0.5012800097465515, -0.18900419771671295, 0.5368144512176514, 0.09689182788133621, 0.7162796258926392, 0.8854132890701294, -0.3249267041683197, 0.06036624684929848, -0.49121105670928955, -0.6338231563568115, 0.19988712668418884, -0.1197909489274025, 0.8012685179710388, 0.09006180614233017, 0.06260097026824951, -0.35936328768730164, 0.11895919591188431, 0.6521317362785339, -1.634185552597046, -1.0438382625579834, 0.23418466746807098, -0.631987452507019, -1.0249321460723877, -0.11493043601512909, -0.09880612790584564, -0.08985671401023865, 0.028061136603355408, 0.9450271129608154, -0.32013583183288574, -0.03870047256350517, -0.24669450521469116, -0.6552417278289795, 0.25373363494873047, 0.15373504161834717, -0.8677517771720886, 0.24196742475032806, 0.26409435272216797, 0.7531046867370605, 0.335243284702301, 0.2652454078197479, -0.5226922035217285, 0.11387497186660767, -0.8550946712493896, 0.7168950438499451, -0.3885729908943176, -0.9884691834449768, -0.9016667604446411, 0.1664574295282364, 0.354657381772995, -0.47949135303497314, 0.7631734609603882, -0.5009142160415649, 0.23950910568237305, -0.7566229104995728, 0.06631510704755783, -0.06743364036083221, 0.32762813568115234, -0.7364542484283447, 0.9702274799346924, 0.5498963594436646, -0.30731090903282166, 1.2847436666488647, -0.7025140523910522, 0.08593897521495819, 0.11119615286588669, -0.13558167219161987, -0.780483603477478, 0.1897933930158615, -0.03146864473819733, -0.13021579384803772, -0.22491967678070068, -0.28699493408203125, -1.1208468675613403, -0.8745077252388, -0.16832846403121948, -0.36980751156806946, 0.744272768497467, -0.02357187494635582, -0.11790962517261505, -0.2734762132167816, -0.5156765580177307, 0.5669205188751221, -0.01512487605214119, -0.4456925392150879, -0.11428216844797134, -0.3605324625968933, -0.1896902322769165, -0.09928672015666962, -0.12900671362876892, -1.082953929901123, -0.23074637353420258, -0.609333872795105, 0.4945492148399353, 0.5248148441314697, -0.07509450614452362, 0.40922215580940247, -1.2859852313995361, 0.3121854066848755, 0.33282721042633057, 0.19077527523040771, 0.3652418553829193, -0.040960073471069336, -1.4651329517364502, -0.5266886949539185, 0.9579155445098877, 0.21014007925987244, -0.40702730417251587, 0.1901816427707672, -0.07603971660137177, -0.6691853404045105, -0.44803738594055176, -0.11743244528770447, 0.1550556868314743, 0.4842841923236847, 0.004813206382095814, -0.31672364473342896, -0.4669010043144226, -1.0585473775863647, -0.06817314773797989, 0.06283074617385864, -0.660435676574707, 0.21950317919254303, 0.5666760206222534, -0.016135476529598236, 0.8439552783966064, -0.35403135418891907, -0.4754878878593445, -0.07779322564601898, -0.31958088278770447, -0.047777239233255386, 0.12425990402698517, 1.176419973373413, -0.4967600107192993, -0.8484839200973511, 0.2606898844242096, -0.22692346572875977, -0.269227534532547, 0.9320940971374512, 0.5519770979881287, 0.04185997694730759, -0.019719138741493225, -0.4721129536628723, 0.5470134615898132, 0.330189049243927, -0.27804917097091675, 0.3157554268836975, -0.3709639310836792, 0.31248044967651367, -1.1061137914657593, 0.4791238307952881, -0.10801991820335388, -0.6225020289421082, -0.4047278165817261, -0.24184146523475647, 0.7560374140739441, -0.25666484236717224, -0.5259256362915039, 0.3875807821750641, -0.4559290111064911, -0.36953920125961304, -0.45077377557754517, -0.06416183710098267, 0.09099999070167542, -0.3574734628200531, -0.6356750726699829, 1.7484002113342285, -0.48150670528411865, -0.887476921081543, 0.3982563316822052, -0.08222545683383942, -0.11593787372112274, 0.5234034657478333, -1.1375733613967896, 0.23915085196495056, 0.07645033299922943, 0.04565170779824257, -0.9257411956787109, -0.6411309242248535, -0.40391090512275696, -0.5602693557739258, -0.18292869627475739, 0.18733565509319305, -0.4096684455871582, -0.6769815683364868, -0.7127982974052429, 0.5316263437271118, 0.8983882665634155, -0.7176296710968018, 0.41539266705513, -0.099054716527462, 0.35639792680740356, -0.06524911522865295, -0.8376246690750122, -0.5430495738983154, -0.5813955068588257, -0.6585095524787903, 0.33530426025390625, 0.15942825376987457, -0.23522217571735382, -0.481594979763031, -0.22590599954128265, -0.29506078362464905, -0.09651055186986923, 0.19388854503631592, 0.26472198963165283, -0.6312199831008911, 0.5497511625289917, -0.36577412486076355, -0.45712345838546753, 0.023832309991121292, -0.08808179944753647, 0.17423880100250244, -0.36263585090637207, -0.13248310983181, -0.39423421025276184, -0.15534630417823792, 0.5148823261260986, 0.2325301319360733, 0.20934024453163147, 0.2684168517589569, -0.5823689103126526, -0.4898875951766968, -0.42693862318992615, -0.5121532678604126, -0.6442492008209229, -0.19975876808166504, -0.8949973583221436, -0.25292089581489563, 0.34427309036254883, -0.057338498532772064, 0.10328792035579681, 0.5640668869018555, 0.279085248708725, -0.4051831364631653, 1.3651907444000244, 0.990057647228241, 0.5016381740570068, 0.20534014701843262, 0.1937229037284851, 0.6387102603912354, -0.5901973843574524, 0.1098129004240036, -0.9011735916137695, -0.28141313791275024, -0.3489300012588501, -0.3090740442276001, 0.9754601120948792, -0.6229568719863892, -0.8461899161338806, 0.20982788503170013, -0.30637621879577637, 0.6762442588806152, 0.645452618598938, 0.5939317345619202, 0.4240274727344513, -0.5652260780334473, -0.5313528776168823, -0.4411010146141052, -0.5374681949615479, -1.1312305927276611, 1.3924463987350464, 0.20515793561935425, 1.0804234743118286, 0.4054228663444519, 0.20976585149765015, 0.39055293798446655, 0.7502177357673645, -0.7150237560272217, 0.07384849339723587, -0.6815117597579956, -0.9975178241729736, 0.028253775089979172, 0.26168814301490784, -0.8516282439231873, 0.2584877610206604, 0.2462102472782135, -0.4617862403392792, -0.07409248501062393, 0.5537773966789246, -1.192619800567627, 0.21754920482635498, -1.3623576164245605, 1.2064132690429688, -0.07015329599380493, -0.13993766903877258, 0.21348677575588226, -0.07026315480470657, 0.46627143025398254, -0.40733399987220764, -0.22233760356903076, -0.026687581092119217, -0.4115716516971588, 0.4136083722114563, -0.8467307090759277, 0.6882063746452332, 0.006995067931711674, 0.03393083065748215, 0.016354558989405632, 0.26434391736984253, 0.25175192952156067, -0.0656103640794754, -0.3764328062534332, -0.6361634731292725, 0.8023045659065247, -0.6072518825531006, -0.47310781478881836, 0.49581828713417053, -1.074789047241211, -0.7757870554924011, -0.31571200489997864, -0.3825662136077881, -0.17788954079151154, 0.32652634382247925, 0.19732943177223206, 0.6280449032783508, -0.29979050159454346, 0.4762852191925049, 0.6177488565444946, 0.1364564150571823, 0.7903788089752197, 0.6782768368721008, -0.16172218322753906, 0.06589414924383163, 0.6800603866577148, 0.2091822773218155, 0.7589668035507202, 0.1909789890050888, 0.42126238346099854, 0.05286958068609238, -0.2250823676586151, -0.7260282635688782, -0.055174797773361206, -0.26861870288848877, -0.1818164885044098, -0.1315658539533615, 0.08473742008209229, -0.17420873045921326, -0.02572540193796158, -0.7210235595703125, -0.5124605298042297, -0.44347381591796875, -0.26091599464416504, -0.0030646207742393017, 0.4930451810359955, -0.11782751977443695, 0.6757760643959045, -0.7349789142608643, 0.12847082316875458, 0.42742204666137695, 0.17366883158683777, -0.4467926025390625, -0.9857472777366638, 0.24385811388492584, 0.08698131144046783, -0.618128776550293, -0.594124972820282, 0.308051735162735, 0.18979418277740479, -0.27732858061790466, 0.6147606372833252, 0.3040190637111664, 1.0424997806549072, -0.21091482043266296, 0.7345060110092163, 0.1256413459777832, -0.948930025100708, 0.6199362277984619, -0.6744149923324585, 0.6016344428062439, 0.5788131952285767, -0.2598312497138977, -0.27819621562957764, -0.05861026793718338, -1.1837114095687866, 0.09733109176158905, 0.5707076787948608, 0.01874210126698017, -0.04294443875551224, 0.5639432072639465, 0.26686832308769226, 0.31573307514190674, 0.0830274447798729, -0.6265967488288879, 0.2772625982761383, 0.32370543479919434, -0.3581573963165283, -0.29256629943847656, 0.06504062563180923, -0.3976183235645294, -0.34180596470832825, 0.46252530813217163, -0.30006805062294006, 0.5298709273338318, 0.12692338228225708, 0.011053625494241714, -0.43028581142425537, -0.2290361225605011, 0.7370938658714294, 0.9386042356491089, -0.8468018174171448, 0.6265413165092468, 0.8196114301681519, -0.5782909989356995, 0.5411167144775391, -0.2777366042137146, -0.46972835063934326, 0.08720949292182922, 0.0033283066004514694, 0.2152654230594635, 0.06934472918510437, -0.13142716884613037, 0.8053208589553833, -0.3402041792869568, -0.27507296204566956, -0.4899086356163025, 0.6880432963371277, 0.16742348670959473, 0.08644966781139374, -0.07128649204969406, 0.25824522972106934, -0.037274908274412155, -0.6570268869400024, 0.6553308963775635, 0.12397299706935883, -0.30579501390457153, -0.35198774933815, 1.0069870948791504, 1.0115294456481934, -0.7446553707122803, 0.7307807803153992, -0.10690155625343323, -0.291087806224823, 1.0525802373886108, 0.3175540864467621, 0.3009774684906006, -0.4953678548336029, 0.02974618226289749, 0.32933077216148376, 0.7659487724304199, 0.1203904002904892, 0.5465439558029175, 0.15521538257598877, -0.5694409608840942, 0.27929016947746277, 0.0342513807117939, -0.650678813457489, -0.17263899743556976, -0.7153763771057129, 0.5900936126708984, -0.7207189202308655, -0.4967002272605896, 0.21781516075134277, 0.6549022793769836, -0.8584616780281067, 1.0888745784759521, -0.21130076050758362, 1.3135371208190918, -0.8809495568275452, 1.253986120223999, 0.5580213069915771, -0.3245939612388611, -1.2794890403747559, -0.29809272289276123, -0.16787752509117126, -0.7733786702156067, 0.7562483549118042, 0.30208444595336914, 0.020653966814279556, -0.01885955035686493, -0.3342491388320923, -0.8172174096107483, 1.6667410135269165, 0.517094075679779, -0.38850975036621094, 0.18255320191383362, 0.05196616053581238, 0.76215660572052, -0.2560965418815613, 0.8700913786888123, 0.9003129005432129, 0.5184333920478821, 0.02278812974691391, -1.7347486019134521, 0.09520810842514038, 0.015611018985509872, 0.17600403726100922, 0.4231358766555786, -1.4208972454071045, 1.0126079320907593, -0.6232849955558777, 0.014347000978887081, 0.1910007745027542, 0.49275022745132446, 0.3675519824028015, 0.5457096099853516, 0.5415986776351929, 0.4513857364654541, 0.9781143069267273, -0.4420580267906189, 1.236647605895996, -0.05413653701543808, 0.49794721603393555, 0.9785711765289307, -0.30806130170822144, 0.8263018727302551, 0.7127867937088013, -0.05054735392332077, 0.09604869037866592, 1.3693372011184692, 0.062456563115119934, 0.9952919483184814, 0.1158491000533104, -0.41453781723976135, -0.49915024638175964, -0.004080820828676224, -0.6068546772003174, 0.06254075467586517, 0.18042169511318207, -0.5597741603851318, -0.27472326159477234, -0.1597743034362793, -0.051319271326065063, -0.5702749490737915, -0.3677326440811157, 0.06863538920879364, 0.5228487253189087, -0.5840186476707458, 0.0667072981595993, 0.5263849496841431, 0.11908628046512604, -0.18307535350322723, 0.5017696022987366, -0.30789339542388916, 1.1077015399932861, -0.17896485328674316, -0.41533714532852173, 0.4056805372238159, -0.10093632340431213, 0.16086111962795258, -0.060644425451755524, 1.0120372772216797, 0.101790651679039, -0.3867664933204651, 0.09997349977493286, 0.1357325166463852, 0.22565416991710663, 0.40524208545684814, -0.09050256013870239, 0.22963032126426697, -0.16415774822235107, -0.1767989695072174, -0.13597017526626587, -0.041998133063316345, 0.31065234541893005, 0.8765770196914673, -0.06852629035711288, -0.3508872091770172, 0.26945826411247253, 0.05415743216872215, 0.5511162877082825, -0.7553662061691284, -0.6599935293197632, -0.499480664730072, 0.5089221596717834, -0.33684754371643066, -0.623744010925293, 0.5488008260726929, 0.7009657025337219, 0.7763746976852417, -0.15022647380828857, 0.6678189039230347, 0.054109394550323486, 0.7145410180091858, -0.16770599782466888, 0.2915501296520233, -0.8641329407691956, -0.05942639335989952, 0.4477556049823761, -0.5818146467208862, -0.38437485694885254, 1.060781478881836, -0.2561149001121521, 0.8060184717178345, 1.3277063369750977, 0.8584186434745789, -0.848505973815918, 0.4740307331085205, 0.501533031463623, 0.27711278200149536, 0.4561079740524292, 0.9438529014587402, 0.398154616355896, -1.1140377521514893, 0.7308133840560913, -0.4323136806488037, 0.14872391521930695, -0.351015567779541, -0.5753055810928345, -1.6367254257202148, 0.20487035810947418, -0.11321666836738586, -0.535598635673523, 0.05203250050544739, 0.9570492506027222, 1.2507872581481934, -0.6679498553276062, -0.007199147716164589, 0.2612893581390381, -0.175079807639122, 0.21536055207252502, -0.1299498975276947, -0.0868319422006607, 0.08668508380651474, -0.8291052579879761, 0.1602778434753418, 0.05720893293619156, 0.48291948437690735, -0.282395601272583, 0.20747104287147522, 0.6197600364685059, 0.38192251324653625, 0.3777121901512146, -0.1816147416830063, -0.4816063344478607, -1.6442255973815918, -0.16678696870803833, -0.480485200881958, 0.20587360858917236, 0.20260828733444214, -0.3450862765312195, 0.2988063097000122, 0.3803696632385254, 0.34201550483703613, 0.6170691251754761, 0.0967235118150711, 0.9577305316925049, -0.5857842564582825, 0.10081204771995544, 0.30763691663742065, -0.15452201664447784, 0.04616088792681694, -0.16436786949634552, 0.7640706896781921, 0.0053001511842012405, -0.5448325872421265, -1.0746371746063232, -0.14432282745838165, -1.2957628965377808, 0.44349345564842224, 0.9665529727935791, 0.17460370063781738, -0.7836917638778687, 0.17225180566310883, -0.3294708728790283, 0.23465925455093384, -0.3814336657524109, 1.03712797164917, 1.0120799541473389, 0.3540996313095093, -0.3294391334056854, -0.8452826142311096, 0.37481236457824707, 0.6142827868461609, -0.9176580309867859, -0.827804684638977, -0.08447128534317017, 1.3216946125030518, -0.24178281426429749, 0.501660168170929, 0.06074275076389313, 0.9859229922294617, 0.588446319103241, -0.23821446299552917, -0.033375151455402374, -0.07505400478839874, -0.09978510439395905, 0.5444667935371399, 0.5328662991523743, -0.9465186595916748 ]
microsoft/git-base
microsoft
"2023-04-24T09:52:15Z"
352,086
29
transformers
[ "transformers", "pytorch", "safetensors", "git", "text-generation", "vision", "image-to-text", "image-captioning", "en", "arxiv:2205.14100", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
image-to-text
"2022-12-06T09:22:35Z"
--- language: en license: mit tags: - vision - image-to-text - image-captioning model_name: microsoft/git-base pipeline_tag: image-to-text --- # GIT (GenerativeImage2Text), base-sized GIT (short for GenerativeImage2Text) model, base-sized version. It was introduced in the paper [GIT: A Generative Image-to-text Transformer for Vision and Language](https://arxiv.org/abs/2205.14100) by Wang et al. and first released in [this repository](https://github.com/microsoft/GenerativeImage2Text). Disclaimer: The team releasing GIT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description GIT is a Transformer decoder conditioned on both CLIP image tokens and text tokens. The model is trained using "teacher forcing" on a lot of (image, text) pairs. The goal for the model is simply to predict the next text token, giving the image tokens and previous text tokens. The model has full access to (i.e. a bidirectional attention mask is used for) the image patch tokens, but only has access to the previous text tokens (i.e. a causal attention mask is used for the text tokens) when predicting the next text token. ![GIT architecture](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/git_architecture.jpg) This allows the model to be used for tasks like: - image and video captioning - visual question answering (VQA) on images and videos - even image classification (by simply conditioning the model on the image and asking it to generate a class for it in text). ## Intended uses & limitations You can use the raw model for image captioning. See the [model hub](https://huggingface.co/models?search=microsoft/git) to look for fine-tuned versions on a task that interests you. ### How to use For code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/model_doc/git#transformers.GitForCausalLM.forward.example). ## Training data From the paper: > We collect 0.8B image-text pairs for pre-training, which include COCO (Lin et al., 2014), Conceptual Captions (CC3M) (Sharma et al., 2018), SBU (Ordonez et al., 2011), Visual Genome (VG) (Krishna et al., 2016), Conceptual Captions (CC12M) (Changpinyo et al., 2021), ALT200M (Hu et al., 2021a), and an extra 0.6B data following a similar collection procedure in Hu et al. (2021a). => however this is for the model referred to as "GIT" in the paper, which is not open-sourced. This checkpoint is "GIT-base", which is a smaller variant of GIT trained on 10 million image-text pairs. See table 11 in the [paper](https://arxiv.org/abs/2205.14100) for more details. ### Preprocessing We refer to the original repo regarding details for preprocessing during training. During validation, one resizes the shorter edge of each image, after which center cropping is performed to a fixed-size resolution. Next, frames are normalized across the RGB channels with the ImageNet mean and standard deviation. ## Evaluation results For evaluation results, we refer readers to the [paper](https://arxiv.org/abs/2205.14100).
[ -0.5961158275604248, -0.6695539951324463, 0.15962617099285126, -0.16884687542915344, -0.488674134016037, 0.010676558129489422, -0.13657252490520477, -0.43642309308052063, 0.30839869379997253, 0.38627782464027405, -0.5935584306716919, -0.3723856508731842, -0.8927351832389832, -0.020091017708182335, -0.40517181158065796, 1.5847164392471313, -0.2810513377189636, 0.06481645256280899, -0.3131796717643738, -0.34082069993019104, -0.39437729120254517, -0.2368374615907669, -0.3023236393928528, -0.188463494181633, 0.33208876848220825, 0.3868023157119751, 0.826675534248352, 0.725978434085846, 0.7899759411811829, 0.2554294466972351, -0.22737674415111542, -0.36346012353897095, -0.43568646907806396, -0.2942645847797394, -0.03134303167462349, -0.3752588629722595, -0.38521450757980347, 0.33756956458091736, 0.428372323513031, 0.28214094042778015, 0.14909420907497406, 0.38153719902038574, -0.0502997562289238, 0.9973183274269104, -0.3697976768016815, 0.3300017714500427, -0.2612524926662445, 0.12203755229711533, -0.043473705649375916, 0.18252544105052948, -0.14321573078632355, -0.20055611431598663, 0.1985194981098175, -0.5433864593505859, 0.42825424671173096, -0.24185189604759216, 1.3727577924728394, 0.32587558031082153, -0.1357065588235855, -0.1494198590517044, -0.3576103448867798, 0.19980762898921967, -0.34635376930236816, 0.24528387188911438, 0.2811664044857025, 0.3803642988204956, 0.34706634283065796, -0.8185957670211792, -0.5367467403411865, -0.3479934632778168, -0.3203219771385193, 0.3161156475543976, -0.21167343854904175, 0.20589208602905273, 0.6553662419319153, 0.614878237247467, -0.6137405633926392, -0.33305636048316956, -0.6232195496559143, -0.093156598508358, 0.39708495140075684, -0.40171971917152405, 0.5375213027000427, -0.39975786209106445, -0.7271475791931152, -0.2583143413066864, -0.4256495535373688, -0.050108425319194794, 0.0774848535656929, -0.25634321570396423, -0.6254744529724121, 0.8010859489440918, -0.05731017515063286, 0.3956557810306549, 0.283502459526062, 0.00952149834483862, 0.30634090304374695, -0.3501468896865845, -0.2364712506532669, -0.38974741101264954, 0.8880503177642822, 0.47002628445625305, 0.6187150478363037, -0.030143439769744873, -0.3531627058982849, 0.2959097921848297, 0.3547910153865814, -0.8965668678283691, -0.4298531115055084, -0.14234812557697296, -0.4670076072216034, -0.3651827275753021, 0.21096427738666534, -0.6034198999404907, 0.0166939664632082, -0.3950202167034149, 0.35731449723243713, -0.5324378609657288, -0.2758009135723114, -0.2824147939682007, -0.28246939182281494, 0.3622973561286926, 0.2632104456424713, -0.7320828437805176, 0.13812901079654694, 0.35521504282951355, 1.0383179187774658, -0.19220611453056335, -0.23580718040466309, -0.25808537006378174, -0.10874493420124054, -0.23690687119960785, 0.7651437520980835, -0.16097256541252136, -0.14052455127239227, -0.10498401522636414, 0.35418254137039185, -0.0018114749109372497, -0.314114511013031, 0.2667164206504822, -0.56988924741745, 0.11907889693975449, -0.1559249609708786, -0.31229403614997864, -0.2539230287075043, 0.3533855676651001, -0.7600171566009521, 0.798741340637207, 0.6580778956413269, -1.0349854230880737, 0.24745072424411774, -0.8237826228141785, -0.24670913815498352, 0.1911170482635498, -0.1615418642759323, -0.6497216820716858, -0.06654799729585648, 0.16319075226783752, 0.4869648516178131, -0.20795369148254395, 0.4591100811958313, -0.13520488142967224, -0.3276039958000183, -0.02334698848426342, 0.026543784886598587, 0.660496711730957, 0.17082509398460388, -0.449479877948761, 0.20971347391605377, -0.35061508417129517, -0.1327773481607437, 0.3792160451412201, -0.1711629331111908, -0.03486858680844307, -0.4048191010951996, 0.15872326493263245, 0.2091924250125885, 0.054413728415966034, -0.38460052013397217, 0.5472671985626221, -0.12353471666574478, 0.6092492938041687, 0.45329177379608154, -0.12615878880023956, 0.8028924465179443, -0.3262154757976532, 0.8254244327545166, 0.06320913881063461, 0.12591303884983063, -0.5818209052085876, -0.6556260585784912, -0.6627311110496521, -0.27258944511413574, 0.5450400710105896, 0.6610848307609558, -1.0770310163497925, 0.20161178708076477, -0.610805869102478, -0.5519590973854065, -0.29053178429603577, -0.02145792357623577, 0.6865178942680359, 0.46918678283691406, 0.29959583282470703, -0.6451378464698792, -0.4016915559768677, -0.9826894998550415, 0.06401855498552322, -0.3357645571231842, -0.07401639223098755, -0.005296736489981413, 0.8346450924873352, -0.4110700190067291, 0.8984693288803101, -0.5136286616325378, -0.21268856525421143, -0.09630058705806732, 0.17941512167453766, -0.16819114983081818, 0.5878216624259949, 0.706593930721283, -0.9819610714912415, -0.5469723343849182, -0.11306408047676086, -0.8181609511375427, 0.060806386172771454, -0.11620304733514786, -0.26020821928977966, 0.40690046548843384, 0.5015624761581421, -0.8873067498207092, 0.6904373168945312, 0.7619690895080566, -0.26973384618759155, 0.6657107472419739, 0.09329923987388611, 0.1172088086605072, -1.1201122999191284, 0.0958910658955574, 0.24046121537685394, -0.3684229850769043, -0.40257909893989563, 0.4595244526863098, 0.2895781695842743, -0.30343732237815857, -0.24725700914859772, 0.4370403289794922, -0.8239362835884094, -0.17742840945720673, -0.1252807229757309, -0.05591732636094093, -0.012162944301962852, 0.7287045121192932, 0.11065807938575745, 0.8123494386672974, 0.4795908033847809, -0.1346707046031952, 0.2889091670513153, 0.35257822275161743, -0.1982443779706955, 0.6913763880729675, -0.8069272637367249, 0.23232664167881012, -0.135762557387352, 0.36780378222465515, -0.9712949395179749, -0.4035332202911377, 0.4442468583583832, -0.7178035974502563, 0.6313780546188354, -0.5296010971069336, -0.5797945261001587, -0.6141638159751892, -0.30053871870040894, 0.31734228134155273, 0.8457912802696228, -0.424556702375412, 0.5449371933937073, 0.3848314881324768, 0.011197362095117569, -0.1884453296661377, -0.8207391500473022, 0.009775223210453987, -0.14365623891353607, -0.8781521916389465, 0.3853693902492523, -0.14265038073062897, 0.16104765236377716, 0.10523755103349686, -0.014386827126145363, -0.06533857434988022, -0.17889122664928436, 0.47933122515678406, 0.41003644466400146, -0.22081436216831207, 0.07627169042825699, -0.12223481386899948, -0.2614147961139679, -0.0024670118000358343, -0.2601112425327301, 0.19111891090869904, -0.2815329432487488, -0.10050185769796371, -0.2814771831035614, 0.4050567150115967, 0.6116635203361511, -0.2985406517982483, 0.6154899001121521, 0.792879045009613, -0.36335036158561707, 0.3693329989910126, -0.5401753783226013, -0.19301001727581024, -0.410045325756073, 0.2543560862541199, -0.3187843859195709, -0.9075484275817871, 0.5238584876060486, 0.09090489894151688, -0.071732297539711, 0.5600426197052002, 0.46314650774002075, -0.08747406303882599, 0.7143371105194092, 0.7500312328338623, 0.011996407993137836, 0.834742546081543, -0.5436468124389648, -0.07705722004175186, -0.8611822724342346, 0.010905791074037552, -0.20248961448669434, -0.22375772893428802, -0.7243762016296387, -0.6114869713783264, 0.3326300084590912, 0.3948894441127777, -0.29870447516441345, 0.7283364534378052, -0.8595229983329773, 0.4170432388782501, 0.5442224740982056, 0.19067752361297607, 0.004911689553409815, 0.19001330435276031, 0.0026191072538495064, -0.011072613298892975, -0.5237847566604614, -0.5972164273262024, 0.798676073551178, 0.47833487391471863, 0.5820547342300415, -0.13049399852752686, 0.49633026123046875, 0.12549877166748047, 0.6570378541946411, -0.8250057101249695, 0.4226917028427124, -0.0703682228922844, -0.6599549055099487, -0.11894252151250839, -0.3308587372303009, -0.7663070559501648, -0.022340085357427597, -0.19320715963840485, -0.5621151924133301, -0.12296899408102036, 0.2387956827878952, -0.06124592199921608, 0.34802305698394775, -1.185175895690918, 1.0330349206924438, 0.000767494784668088, -0.0005779587081633508, 0.2288295477628708, -1.0672773122787476, 0.45708152651786804, 0.07404204457998276, 0.021653825417160988, 0.03537261486053467, 0.046693354845047, 0.8044447302818298, -0.3321007192134857, 0.8585544228553772, -0.16957953572273254, 0.21963325142860413, 0.5512733459472656, -0.06288553029298782, 0.5050471425056458, -0.0368383452296257, 0.38986796140670776, 0.4985347092151642, 0.1745876967906952, -0.40390416979789734, -0.5226658582687378, 0.3516428768634796, -0.7582672238349915, -0.4864131808280945, -0.36373528838157654, -0.3026520013809204, 0.19423571228981018, 0.16270530223846436, 0.613637387752533, 0.06509285420179367, -0.08615226298570633, 0.19081681966781616, 0.5801985263824463, -0.17420120537281036, 0.2578303813934326, 0.1375802904367447, -0.19516730308532715, -0.5279420614242554, 0.5579513907432556, 0.30309203267097473, 0.43953630328178406, 0.2784818410873413, 0.11783257126808167, 0.0647510439157486, -0.30597418546676636, -0.8634070754051208, 0.3984461724758148, -0.6835929155349731, -0.5238524079322815, -0.7549880146980286, -0.43842196464538574, -0.5154836177825928, -0.22343099117279053, -0.3023281991481781, -0.317350834608078, -0.3827037513256073, -0.20215639472007751, 0.6093357801437378, 0.6365657448768616, 0.10599784553050995, 0.5298281311988831, -0.9291043281555176, 0.6101860404014587, 0.2188890129327774, 0.5285568833351135, -0.2792247235774994, -0.6344922780990601, -0.31285712122917175, 0.09798799455165863, -0.5669122338294983, -1.1404922008514404, 0.27691417932510376, 0.038478679955005646, 0.2905275225639343, 0.14529983699321747, -0.21074454486370087, 0.4161345958709717, -0.5232110619544983, 0.8773680329322815, 0.37382590770721436, -0.7001950144767761, 0.6636870503425598, -0.4082387089729309, 0.5518786907196045, 0.3486696481704712, 0.4082467555999756, -0.5047592520713806, -0.12299136817455292, -0.8807317018508911, -0.7234278321266174, 0.642029345035553, 0.3033147156238556, 0.28501275181770325, 0.06958018988370895, 0.5750923752784729, -0.19913803040981293, 0.11016296595335007, -0.943211019039154, -0.23485760390758514, -0.45448681712150574, -0.12970852851867676, -0.07627522945404053, -0.5024625658988953, -0.11776141077280045, -0.5297566652297974, 0.5056983232498169, -0.3678808808326721, 0.6114786863327026, 0.2186008244752884, -0.2205490916967392, -0.20480334758758545, -0.12671025097370148, 0.4489833414554596, 0.19635017216205597, 0.0306157935410738, -0.20731939375400543, -0.11008800566196442, -0.7379851341247559, -0.024789853021502495, 0.2604610323905945, -0.37888267636299133, 0.05210725963115692, 0.4645465016365051, 1.0037862062454224, 0.04994829371571541, -0.3092840313911438, 0.8586095571517944, -0.025376565754413605, -0.350392609834671, -0.4336828291416168, -0.1372808814048767, 0.20177657902240753, 0.11199215054512024, 0.13701966404914856, 0.3056045472621918, 0.07117720693349838, -0.3921343684196472, 0.31678131222724915, 0.28616824746131897, -0.605055034160614, -0.43578672409057617, 0.6447317004203796, 0.07115455716848373, -0.2491992563009262, 0.6265351176261902, -0.2723851203918457, -0.7339786887168884, 0.901784360408783, 0.2328442633152008, 0.9769336581230164, 0.03151756152510643, 0.3970170319080353, 0.6975487470626831, 0.39884239435195923, -0.04427541047334671, 0.06696242839097977, -0.10585153847932816, -0.5942871570587158, -0.28000980615615845, -0.5152822732925415, -0.028010565787553787, -0.03791578486561775, -0.7795026302337646, 0.4001196622848511, -0.44097787141799927, -0.22586612403392792, 0.12278420478105545, -0.10047215223312378, -0.7405039072036743, 0.3312649726867676, 0.1602097451686859, 1.0105987787246704, -0.7787232995033264, 0.7987298965454102, 0.9796814322471619, -0.8047881126403809, -0.928405225276947, 0.025622714310884476, 0.14224103093147278, -0.731959342956543, 0.38431739807128906, 0.5009137988090515, 0.3588172495365143, -0.055796366184949875, -1.042549967765808, -0.6935751438140869, 1.1359933614730835, 0.41367021203041077, -0.5094388723373413, -0.25054559111595154, -0.2619743049144745, 0.6004517674446106, -0.40438738465309143, 0.26586484909057617, 0.4105977714061737, 0.3451584279537201, 0.3789699673652649, -0.7095495462417603, 0.13365094363689423, -0.5317978858947754, 0.26552924513816833, 0.2359163612127304, -0.5885576605796814, 0.6927875876426697, -0.4666936993598938, -0.3296991288661957, 0.22998715937137604, 0.6088130474090576, 0.12544842064380646, 0.16344431042671204, 0.5541052222251892, 0.6545684337615967, 0.23273146152496338, -0.3659871816635132, 1.3918490409851074, -0.23028291761875153, 0.4995352625846863, 0.9116222858428955, 0.32110902667045593, 0.4780585467815399, 0.4897720515727997, -0.11273892223834991, 0.47488903999328613, 0.7937509417533875, -0.31096968054771423, 0.41546908020973206, 0.17081069946289062, 0.18340416252613068, 0.10940194875001907, 0.019230199977755547, -0.41857191920280457, 0.2141176164150238, 0.08468474447727203, -0.5801340937614441, -0.0026364498771727085, 0.22851091623306274, 0.20534968376159668, -0.033335842192173004, -0.10564300417900085, 0.9628381133079529, 0.09745706617832184, -0.8303824663162231, 0.569312572479248, -0.06673435866832733, 0.7785303592681885, -0.528221845626831, -0.08079390972852707, -0.27054521441459656, -0.13748346269130707, -0.13863074779510498, -0.9296138286590576, 0.5385184288024902, 0.13551919162273407, -0.4102136194705963, -0.3274008631706238, 0.5923014283180237, -0.3259727954864502, -0.4309214651584625, 0.25485289096832275, 0.22469229996204376, 0.27457472681999207, -0.3013969361782074, -0.9515165686607361, 0.04354573413729668, 0.012973839417099953, -0.49924322962760925, 0.29500341415405273, 0.5056065917015076, -0.2519972324371338, 0.4186905026435852, 0.5244829654693604, -0.18093284964561462, -0.19082950055599213, 0.009209811687469482, 1.1132948398590088, -0.5487278699874878, -0.36067721247673035, -0.5824735164642334, 0.7358906269073486, 0.003879202762618661, -0.2835453450679779, 0.40635550022125244, 0.3697894513607025, 1.0414738655090332, -0.3737056255340576, 0.6726236939430237, -0.38226065039634705, 0.18715907633304596, -0.4998483955860138, 0.7408002614974976, -0.5676147937774658, -0.17321592569351196, -0.5280050039291382, -0.8628199100494385, -0.21724119782447815, 0.6438987851142883, -0.3056604266166687, 0.3126198351383209, 0.6547704935073853, 0.6962212324142456, 0.005749673116952181, -0.0834457129240036, 0.27655029296875, -0.001017876318655908, 0.09282098710536957, 0.39257925748825073, 0.5300492644309998, -0.766373872756958, 0.5735610723495483, -0.31755098700523376, -0.39437174797058105, -0.03578192740678787, -0.7880390882492065, -0.8987387418746948, -0.8469306826591492, -0.5731473565101624, -0.5638595819473267, 0.07717736810445786, 0.5692357420921326, 0.9995136857032776, -0.5953465700149536, 0.20400966703891754, -0.1030447706580162, -0.04620127007365227, -0.019901201128959656, -0.2323548048734665, 0.2668972611427307, 0.009713180363178253, -0.5741930603981018, -0.4600485563278198, 0.090731680393219, 0.4673495888710022, -0.19134029746055603, -0.09494330734014511, -0.20229731500148773, -0.24193280935287476, 0.5868796706199646, 0.2937789857387543, -0.6115663051605225, -0.39429280161857605, 0.006411775480955839, -0.3978794813156128, 0.39787325263023376, 0.6427907943725586, -0.6005949378013611, 0.3344375491142273, 0.44273945689201355, 0.5400856137275696, 0.7123563289642334, 0.16869623959064484, 0.3510926067829132, -0.7110371589660645, 0.22894439101219177, -0.04563749581575394, 0.39616596698760986, 0.620315432548523, -0.4863549470901489, 0.8845128417015076, 0.4508431553840637, -0.5016992688179016, -0.46384090185165405, 0.2210949957370758, -1.2017061710357666, -0.10491494834423065, 1.2268235683441162, -0.38944029808044434, -0.3748330771923065, 0.46718886494636536, -0.47824540734291077, 0.5119760036468506, -0.26183709502220154, 0.5056276917457581, 0.6881946325302124, 0.45960885286331177, -0.705500066280365, -0.6280651092529297, 0.42747214436531067, 0.05431101843714714, -0.7335449457168579, -0.28979039192199707, 0.4759702682495117, 0.4589342772960663, 0.3743625581264496, 0.6367877721786499, -0.35126733779907227, 0.33934739232063293, -0.08158232271671295, 0.48925814032554626, 0.03916890546679497, -0.2015005499124527, -0.3424049913883209, -0.09847841411828995, -0.22621892392635345, -0.2310510128736496 ]
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
sentence-transformers
"2023-11-02T09:46:44Z"
350,932
309
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "bert", "feature-extraction", "sentence-similarity", "transformers", "multilingual", "ar", "bg", "ca", "cs", "da", "de", "el", "en", "es", "et", "fa", "fi", "fr", "gl", "gu", "he", "hi", "hr", "hu", "hy", "id", "it", "ja", "ka", "ko", "ku", "lt", "lv", "mk", "mn", "mr", "ms", "my", "nb", "nl", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sr", "sv", "th", "tr", "uk", "ur", "vi", "arxiv:1908.10084", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- language: - multilingual - ar - bg - ca - cs - da - de - el - en - es - et - fa - fi - fr - gl - gu - he - hi - hr - hu - hy - id - it - ja - ka - ko - ku - lt - lv - mk - mn - mr - ms - my - nb - nl - pl - pt - ro - ru - sk - sl - sq - sr - sv - th - tr - uk - ur - vi language_bcp47: - fr-ca - pt-br - zh-cn - zh-tw pipeline_tag: sentence-similarity license: apache-2.0 tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch # Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2') model = AutoModel.from_pretrained('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, max pooling. sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ```
[ -0.2495177686214447, -0.7122829556465149, 0.36788687109947205, 0.3243093490600586, -0.34903258085250854, -0.3654531240463257, -0.19666525721549988, -0.02271028608083725, 0.16091644763946533, 0.40675583481788635, -0.5501168966293335, -0.3161803185939789, -0.5949864983558655, 0.1776876300573349, -0.44415926933288574, 0.9534918665885925, -0.11126797646284103, 0.023068251088261604, -0.34187763929367065, -0.3478168547153473, -0.21619461476802826, -0.43269777297973633, -0.4293576180934906, -0.25933635234832764, 0.28568047285079956, 0.27012184262275696, 0.5707829594612122, 0.41258224844932556, 0.3158852756023407, 0.4440988302230835, 0.015300778672099113, 0.11510840058326721, -0.21217788755893707, -0.10891472548246384, 0.04168618097901344, -0.38539883494377136, -0.0420043021440506, 0.08168007433414459, 0.5927175283432007, 0.4070388078689575, -0.11771111935377121, 0.22495509684085846, 0.2147892713546753, 0.20018769800662994, -0.2797313928604126, 0.4733163118362427, -0.6986325979232788, 0.06063355132937431, 0.013919464312493801, 0.10228881239891052, -0.48778221011161804, -0.13031291961669922, 0.2122989147901535, -0.36959174275398254, 0.29717329144477844, 0.2662118077278137, 0.9952176213264465, 0.3508707582950592, -0.2600955069065094, -0.3919421136379242, -0.16918668150901794, 0.9342687129974365, -0.8142149448394775, 0.18191073834896088, 0.3029384911060333, 0.04748241975903511, 0.1523897349834442, -1.1348705291748047, -0.7651636004447937, -0.16955560445785522, -0.6582885980606079, 0.03671485185623169, -0.3508481979370117, -0.05457431450486183, 0.17017997801303864, 0.1809266358613968, -0.7316704392433167, -0.2379748374223709, -0.4146053194999695, -0.29666873812675476, 0.3573620319366455, 0.10849710553884506, 0.40319180488586426, -0.7039648294448853, -0.4680498540401459, -0.33422592282295227, -0.20815882086753845, 0.010951554402709007, -0.004195709712803364, 0.3046378493309021, -0.42939135432243347, 0.7775334715843201, -0.05122267082333565, 0.4644695520401001, -0.03722487390041351, 0.07901228219270706, 0.5694003701210022, -0.6520527601242065, -0.2200351357460022, -0.1610935479402542, 1.1602121591567993, 0.33499255776405334, 0.17143765091896057, 0.04338237643241882, -0.15597383677959442, -0.0009345303406007588, -0.04831977188587189, -0.7840853333473206, -0.4875655174255371, 0.0611170269548893, -0.4806230962276459, -0.2809761166572571, -0.01671742834150791, -0.9014294147491455, -0.06269702315330505, 0.03622185066342354, 0.6929473280906677, -0.6142171025276184, 0.21589875221252441, 0.06160857155919075, -0.340689092874527, 0.17335380613803864, -0.3258343040943146, -0.6726458668708801, 0.2115737497806549, 0.19459697604179382, 1.0898263454437256, 0.11251421272754669, -0.6418251991271973, -0.3464536964893341, 0.01320714596658945, 0.19394123554229736, 0.7316803932189941, -0.346922367811203, -0.02338356152176857, 0.05855881795287132, 0.24280765652656555, -0.6655718684196472, -0.4230538308620453, 0.6484963893890381, -0.28146931529045105, 0.6242910027503967, 0.0630609318614006, -0.6656100153923035, -0.03790491074323654, 0.055216364562511444, -0.5316380262374878, 1.1706870794296265, 0.029641645029187202, -0.9612218737602234, -0.024760186672210693, -0.6702800989151001, -0.2351956069469452, -0.1270318180322647, -0.05078994110226631, -0.6185029745101929, 0.07856100052595139, 0.5495783686637878, 0.5982375741004944, -0.013429408892989159, 0.19449664652347565, -0.275630921125412, -0.32375699281692505, 0.27140864729881287, -0.3643570840358734, 1.1669957637786865, 0.15780331194400787, -0.3461112678050995, 0.1966148465871811, -0.4441872537136078, -0.05511736124753952, 0.3305942416191101, -0.1010502427816391, -0.3105181157588959, -0.19099493324756622, 0.2780958414077759, 0.4878104627132416, 0.3688344359397888, -0.6006605625152588, -0.007456490304321051, -0.4537339508533478, 0.9290486574172974, 0.5958868265151978, 0.09108651429414749, 0.6385810971260071, -0.42966708540916443, 0.24777135252952576, 0.1934119015932083, 0.08087679743766785, -0.19944632053375244, -0.5200617909431458, -0.9756377339363098, -0.342507541179657, 0.2663816213607788, 0.6468883752822876, -1.0740954875946045, 0.7485957741737366, -0.4926624298095703, -0.5269870758056641, -0.8435297608375549, 0.19111323356628418, 0.25196993350982666, 0.4208679795265198, 0.7553807497024536, 0.17853383719921112, -0.598190426826477, -1.0236005783081055, -0.18867863714694977, 0.009934691712260246, 0.09381213039159775, 0.16260389983654022, 0.7567285895347595, -0.36921074986457825, 0.9179222583770752, -0.530271053314209, -0.4914226830005646, -0.6259187459945679, 0.22020046412944794, 0.23243464529514313, 0.5761974453926086, 0.5996174216270447, -0.7577428817749023, -0.6503631472587585, -0.5183250308036804, -0.8130160570144653, -0.020391633734107018, -0.2687067985534668, -0.26123398542404175, 0.06115046516060829, 0.5643652677536011, -0.9365711808204651, 0.2890366017818451, 0.5694061517715454, -0.4138178527355194, 0.3096599280834198, -0.41408103704452515, -0.22349874675273895, -1.2533704042434692, -0.04315691813826561, -0.04308434948325157, -0.23293593525886536, -0.41442131996154785, 0.22363132238388062, 0.2751239538192749, -0.15595202147960663, -0.5620658993721008, 0.5603125691413879, -0.4393570125102997, 0.22424007952213287, -0.019307097420096397, 0.4593617618083954, 0.023035774007439613, 0.7597383260726929, -0.13325481116771698, 0.7824041247367859, 0.48232296109199524, -0.5830369591712952, 0.4141971170902252, 0.638839840888977, -0.505681574344635, 0.22421739995479584, -0.8308156728744507, 0.029511747881770134, 0.019599132239818573, 0.37051889300346375, -1.1306407451629639, -0.04430394247174263, 0.28899022936820984, -0.4144611060619354, -0.0013876963639631867, 0.21824268996715546, -0.7949948310852051, -0.6347422003746033, -0.5371621251106262, 0.20630154013633728, 0.6082193851470947, -0.5311869978904724, 0.5591417551040649, 0.2458750307559967, -0.19703109562397003, -0.40829458832740784, -1.119215726852417, 0.0532386489212513, -0.3415767252445221, -0.6917631030082703, 0.4817986786365509, -0.21607734262943268, 0.12104418873786926, 0.1343148946762085, 0.268334299325943, -0.03643140569329262, -0.196539044380188, -0.19849461317062378, 0.16048021614551544, -0.056246448308229446, 0.12638187408447266, 0.3291464149951935, -0.1286587119102478, -0.049547404050827026, -0.12003381550312042, 0.7808507680892944, -0.2790144383907318, -0.07586171478033066, -0.5109233260154724, 0.34831368923187256, 0.47759997844696045, -0.16450877487659454, 1.1433360576629639, 0.9877501726150513, -0.35561293363571167, 0.030940620228648186, -0.4144863188266754, -0.3518473505973816, -0.4996192753314972, 0.5306466221809387, -0.4134327471256256, -0.7607936859130859, 0.4758053719997406, 0.3548828661441803, 0.03031395934522152, 0.7367286682128906, 0.6134560108184814, -0.25373390316963196, 0.8341813683509827, 0.5731523036956787, -0.042826518416404724, 0.4939429461956024, -0.5138189196586609, 0.21073290705680847, -0.854945957660675, -0.05607074126601219, -0.3241560757160187, -0.2596105635166168, -0.6491475701332092, -0.5254502296447754, 0.35557299852371216, -0.050737831741571426, -0.18727317452430725, 0.6871766448020935, -0.43856143951416016, 0.18783141672611237, 0.7304044365882874, 0.19158470630645752, 0.015111767686903477, 0.14033789932727814, -0.5672962665557861, -0.21552617847919464, -0.8330580592155457, -0.5528295636177063, 0.827755331993103, 0.23554663360118866, 0.4717334508895874, -0.07265016436576843, 0.7928575277328491, 0.12242597341537476, 0.004941870458424091, -0.5619173645973206, 0.6731415390968323, -0.3147434592247009, -0.4695231318473816, -0.3565469980239868, -0.3418942391872406, -0.8376442193984985, 0.5838824510574341, -0.015524549409747124, -0.6898058652877808, 0.09699882566928864, -0.13854935765266418, -0.4068182110786438, 0.17561613023281097, -0.8363379240036011, 1.1750984191894531, 0.07486019283533096, -0.05227769911289215, -0.09608026593923569, -0.8205077648162842, 0.23856255412101746, -0.024845242500305176, 0.3260854184627533, -0.0835832878947258, -0.16418351233005524, 0.935107946395874, -0.38029763102531433, 0.9019489288330078, -0.15757444500923157, 0.2928623557090759, 0.3407594561576843, -0.24775780737400055, 0.4387284517288208, -0.05672433599829674, -0.09582137316465378, 0.05341452360153198, 0.0758819580078125, -0.4860351085662842, -0.4841602146625519, 0.7355208396911621, -0.8834998607635498, -0.39873480796813965, -0.4536656439304352, -0.6506290435791016, -0.052858393639326096, 0.23803755640983582, 0.4876604676246643, 0.296213299036026, 0.02153010107576847, 0.5435982942581177, 0.431765615940094, -0.33539077639579773, 0.802773654460907, 0.06773263961076736, -0.06203565001487732, -0.537092387676239, 0.7161639928817749, 0.09982525557279587, 0.1289779096841812, 0.48569390177726746, 0.3490169644355774, -0.4621358811855316, -0.15347503125667572, -0.4674623906612396, 0.5670602321624756, -0.7224369645118713, -0.18851198256015778, -1.1042475700378418, -0.39996591210365295, -0.6531470417976379, 0.05487866327166557, -0.16958403587341309, -0.4300481081008911, -0.41107019782066345, -0.23154687881469727, 0.31526637077331543, 0.3476020097732544, -0.00789773277938366, 0.45314449071884155, -0.7734954953193665, 0.3057449758052826, 0.23225942254066467, -0.23725590109825134, -0.11545908451080322, -0.9275849461555481, -0.3991735875606537, 0.11559433490037918, -0.38365939259529114, -0.8043277263641357, 0.6836264729499817, 0.3796522915363312, 0.6266717910766602, 0.007893012836575508, 0.17222557961940765, 0.7690067887306213, -0.6317400336265564, 0.8894286751747131, 0.059265319257974625, -1.0948503017425537, 0.40696170926094055, -0.02340361848473549, 0.3902045786380768, 0.5414491295814514, 0.20512232184410095, -0.4892478883266449, -0.5151723027229309, -0.7536182999610901, -0.9706574082374573, 0.7687638998031616, 0.5347397327423096, 0.6273593902587891, -0.20361050963401794, 0.18173649907112122, -0.14992967247962952, 0.20049254596233368, -1.2429240942001343, -0.5194472074508667, -0.2796953618526459, -0.6494565606117249, -0.3642013669013977, -0.3079838752746582, 0.06553581357002258, -0.5000587105751038, 0.6700496673583984, -0.019423050805926323, 0.810390830039978, 0.17238526046276093, -0.55885910987854, 0.3216121792793274, 0.14834554493427277, 0.5639340281486511, 0.23611915111541748, 0.0008709238027222455, 0.30783504247665405, 0.4267766773700714, -0.2231202870607376, 0.061081379652023315, 0.45899221301078796, -0.2444118857383728, 0.33696529269218445, 0.4766714572906494, 0.8966334462165833, 0.50422602891922, -0.4891818165779114, 0.770333468914032, -0.04179912805557251, -0.17048393189907074, -0.32483282685279846, -0.2481260746717453, 0.27685844898223877, 0.35705289244651794, 0.28451967239379883, 0.06660919636487961, -0.012403745204210281, -0.40026816725730896, 0.39348626136779785, 0.22858916223049164, -0.2640897333621979, -0.10870249569416046, 0.7708816528320312, -0.05907592177391052, -0.1515703797340393, 0.8378382921218872, -0.24911008775234222, -0.6336702704429626, 0.4143303334712982, 0.5763112306594849, 0.8935792446136475, -0.005986066535115242, 0.2677669823169708, 0.3623039424419403, 0.48528924584388733, -0.058057986199855804, -0.007111144717782736, 0.04855484515428543, -0.8277801871299744, -0.10566648095846176, -0.6690196394920349, 0.0788160040974617, 0.003552153008058667, -0.5916922092437744, 0.27038729190826416, -0.0460539236664772, 0.0028308688197284937, -0.10970207303762436, -0.12651894986629486, -0.7631819248199463, -0.02840268798172474, -0.014422097243368626, 0.7969222068786621, -1.0108745098114014, 1.061373233795166, 0.6756719350814819, -0.7355104684829712, -0.6121118068695068, 0.02647404931485653, -0.3546999990940094, -0.9463343620300293, 0.5125566124916077, 0.3748511075973511, 0.1811109036207199, 0.15717007219791412, -0.43225666880607605, -0.9051723480224609, 1.3080623149871826, 0.36933159828186035, -0.24079976975917816, -0.37634187936782837, 0.0973464772105217, 0.5233933329582214, -0.3973378539085388, 0.28921887278556824, 0.4865685701370239, 0.3320308029651642, -0.13378331065177917, -0.781721830368042, 0.2211763560771942, -0.19653037190437317, 0.23146475851535797, -0.2387816607952118, -0.6285869479179382, 1.1057406663894653, -0.011820261366665363, -0.0671391487121582, 0.3555607795715332, 0.8595473170280457, 0.3543645143508911, 0.0008412044844590127, 0.41290685534477234, 0.6380682587623596, 0.5529287457466125, -0.003237163880839944, 1.0503066778182983, -0.3874715268611908, 0.839458703994751, 1.0968315601348877, 0.12529444694519043, 1.0599995851516724, 0.6076169013977051, -0.15340963006019592, 0.7366414666175842, 0.49834078550338745, -0.12004785984754562, 0.8790780901908875, -0.02212848700582981, -0.03432518616318703, -0.04452722147107124, 0.17418810725212097, -0.2242884635925293, 0.3234921991825104, 0.20490267872810364, -0.6838059425354004, -0.1758366823196411, 0.27249500155448914, 0.03273674100637436, -0.030375512316823006, 0.019173871725797653, 0.5895057916641235, 0.3039829432964325, -0.4695250391960144, 0.4243396520614624, 0.26812902092933655, 0.9916697144508362, -0.4726569354534149, 0.263774573802948, -0.2085009664297104, 0.4360349178314209, 0.0958440750837326, -0.5604203343391418, 0.4580286145210266, -0.11949800699949265, -0.06206448748707771, -0.3679555654525757, 0.6107409596443176, -0.730938196182251, -0.7006276845932007, 0.4422801434993744, 0.6494191288948059, 0.11155524104833603, 0.011175297200679779, -1.2732840776443481, -0.0529303103685379, 0.11590341478586197, -0.4405438005924225, 0.3147023618221283, 0.37364527583122253, 0.3151530921459198, 0.5681020617485046, 0.36934295296669006, -0.25300541520118713, 0.35596999526023865, 0.0326206348836422, 0.7279005646705627, -0.580948531627655, -0.5489268898963928, -1.0812205076217651, 0.5947052836418152, -0.21595999598503113, -0.21456004679203033, 1.0003904104232788, 0.5601081252098083, 0.870587170124054, -0.3548544645309448, 0.5940105319023132, -0.1832464337348938, 0.32335469126701355, -0.5131621956825256, 0.7837379574775696, -0.5506018400192261, -0.11429569870233536, -0.283532053232193, -0.8789291381835938, -0.2573291063308716, 1.0765877962112427, -0.33584412932395935, 0.09083670377731323, 1.0952720642089844, 0.8300991058349609, -0.18456338346004486, -0.20924286544322968, 0.22346414625644684, 0.31147506833076477, 0.20811673998832703, 0.5046128034591675, 0.43739640712738037, -0.8934910893440247, 0.9697433710098267, -0.692279577255249, -0.010827452875673771, -0.12242268025875092, -0.7082167267799377, -0.9514642357826233, -0.7633062601089478, -0.38336920738220215, -0.30505794286727905, -0.23986507952213287, 0.9880929589271545, 0.5042107105255127, -0.8421478271484375, -0.19149909913539886, -0.18211309611797333, -0.08595152944326401, -0.20168370008468628, -0.3017943799495697, 0.5715952515602112, -0.5759407877922058, -0.9422263503074646, 0.23755566775798798, -0.08646748214960098, 0.07640735805034637, -0.17315763235092163, 0.09237442165613174, -0.6748183369636536, 0.1358695924282074, 0.5889099836349487, -0.2520003020763397, -0.8349661827087402, -0.29015401005744934, -0.04851294308900833, -0.5384387969970703, -0.12451547384262085, 0.42442160844802856, -0.5548750162124634, 0.18558929860591888, 0.3791595697402954, 0.5136755108833313, 0.6914144158363342, -0.29432201385498047, 0.3170454204082489, -0.8646700978279114, 0.4148350954055786, 0.009783275425434113, 0.809697151184082, 0.4071767330169678, -0.1402692347764969, 0.4479713439941406, 0.4528176486492157, -0.4384867250919342, -0.7794278860092163, -0.15460844337940216, -0.918731689453125, -0.22954803705215454, 1.1921069622039795, -0.37142491340637207, -0.24579636752605438, 0.051650166511535645, -0.316873162984848, 0.456773042678833, -0.2996070981025696, 0.5465484261512756, 0.8596070408821106, -0.03165663033723831, -0.36834749579429626, -0.3790775239467621, 0.28042805194854736, 0.5462529063224792, -0.5630714893341064, -0.13878127932548523, 0.1588601917028427, 0.36534881591796875, 0.2385587990283966, 0.4773608446121216, 0.011083807796239853, -0.008340641856193542, 0.10465500503778458, 0.012866790406405926, -0.07104538381099701, -0.007594752125442028, -0.4189876914024353, 0.21029424667358398, -0.4071741998195648, -0.3766639828681946 ]
pierreguillou/t5-base-qa-squad-v1.1-portuguese
pierreguillou
"2022-01-27T14:38:28Z"
350,382
16
transformers
[ "transformers", "pytorch", "t5", "text2text-generation", "qa", "pt", "dataset:squad", "dataset:squad_v1_pt", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2022-03-02T23:29:05Z"
--- language: - pt tags: - text2text-generation - t5 - pytorch - qa datasets: - squad - squad_v1_pt metrics: - precision - recall - f1 - accuracy - squad model-index: - name: checkpoints results: - task: name: text2text-generation type: text2text-generation dataset: name: squad type: squad metrics: - name: f1 type: f1 value: 79.3 - name: exact-match type: exact-match value: 67.3983 widget: - text: "question: Quando começou a pandemia de Covid-19 no mundo? context: A pandemia de COVID-19, também conhecida como pandemia de coronavírus, é uma pandemia em curso de COVID-19, uma doença respiratória aguda causada pelo coronavírus da síndrome respiratória aguda grave 2 (SARS-CoV-2). A doença foi identificada pela primeira vez em Wuhan, na província de Hubei, República Popular da China, em 1 de dezembro de 2019, mas o primeiro caso foi reportado em 31 de dezembro do mesmo ano." - text: "question: Onde foi descoberta a Covid-19? context: A pandemia de COVID-19, também conhecida como pandemia de coronavírus, é uma pandemia em curso de COVID-19, uma doença respiratória aguda causada pelo coronavírus da síndrome respiratória aguda grave 2 (SARS-CoV-2). A doença foi identificada pela primeira vez em Wuhan, na província de Hubei, República Popular da China, em 1 de dezembro de 2019, mas o primeiro caso foi reportado em 31 de dezembro do mesmo ano." --- # T5 base finetuned for Question Answering (QA) on SQUaD v1.1 Portuguese ![Exemple of what can do with a T5 model (for example: Question Answering finetuned on SQUAD v1.1 in Portuguese)](https://miro.medium.com/max/2000/1*zp9niaQzWNo8Pipd8zvL1w.png) ## Introduction **t5-base-qa-squad-v1.1-portuguese** is a QA model (Question Answering) in Portuguese that was finetuned on 27/01/2022 in Google Colab from the model [unicamp-dl/ptt5-base-portuguese-vocab](https://huggingface.co/unicamp-dl/ptt5-base-portuguese-vocab) of Neuralmind on the dataset SQUAD v1.1 in portuguese from the [Deep Learning Brasil group](http://www.deeplearningbrasil.com.br/) by using a Test2Text-Generation objective. Due to the small size of T5 base and finetuning dataset, the model overfitted before to reach the end of training. Here are the overall final metrics on the validation dataset: - **f1**: 79.3 - **exact_match**: 67.3983 Check our other QA models in Portuguese finetuned on SQUAD v1.1: - [Portuguese BERT base cased QA](https://huggingface.co/pierreguillou/bert-base-cased-squad-v1.1-portuguese) - [Portuguese BERT large cased QA](https://huggingface.co/pierreguillou/bert-large-cased-squad-v1.1-portuguese) - [Portuguese ByT5 small QA](https://huggingface.co/pierreguillou/byt5-small-qa-squad-v1.1-portuguese) ## Blog post [NLP nas empresas | Como eu treinei um modelo T5 em português na tarefa QA no Google Colab](https://medium.com/@pierre_guillou/nlp-nas-empresas-como-eu-treinei-um-modelo-t5-em-portugu%C3%AAs-na-tarefa-qa-no-google-colab-e8eb0dc38894) (27/01/2022) ## Widget & App You can test this model into the widget of this page. Use as well the [QA App | T5 base pt](https://huggingface.co/spaces/pierreguillou/question-answering-portuguese-t5-base) that allows using the model T5 base finetuned on the QA task with the SQuAD v1.1 pt dataset. ## Using the model for inference in production ```` # install pytorch: check https://pytorch.org/ # !pip install transformers from transformers import AutoTokenizer, AutoModelForSeq2SeqLM # model & tokenizer model_name = "pierreguillou/t5-base-qa-squad-v1.1-portuguese" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSeq2SeqLM.from_pretrained(model_name) # parameters max_target_length=32 num_beams=1 early_stopping=True input_text = 'question: Quando foi descoberta a Covid-19? context: A pandemia de COVID-19, também conhecida como pandemia de coronavírus, é uma pandemia em curso de COVID-19, uma doença respiratória aguda causada pelo coronavírus da síndrome respiratória aguda grave 2 (SARS-CoV-2). A doença foi identificada pela primeira vez em Wuhan, na província de Hubei, República Popular da China, em 1 de dezembro de 2019, mas o primeiro caso foi reportado em 31 de dezembro do mesmo ano.' label = '1 de dezembro de 2019' inputs = tokenizer(input_text, return_tensors="pt") outputs = model.generate(inputs["input_ids"], max_length=max_target_length, num_beams=num_beams, early_stopping=early_stopping ) pred = tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=True) print('true answer |', label) print('pred |', pred) ```` You can use pipeline, too. However, it seems to have an issue regarding to the max_length of the input sequence. ```` !pip install transformers import transformers from transformers import pipeline # model model_name = "pierreguillou/t5-base-qa-squad-v1.1-portuguese" # parameters max_target_length=32 num_beams=1 early_stopping=True clean_up_tokenization_spaces=True input_text = 'question: Quando foi descoberta a Covid-19? context: A pandemia de COVID-19, também conhecida como pandemia de coronavírus, é uma pandemia em curso de COVID-19, uma doença respiratória aguda causada pelo coronavírus da síndrome respiratória aguda grave 2 (SARS-CoV-2). A doença foi identificada pela primeira vez em Wuhan, na província de Hubei, República Popular da China, em 1 de dezembro de 2019, mas o primeiro caso foi reportado em 31 de dezembro do mesmo ano.' label = '1 de dezembro de 2019' text2text = pipeline( "text2text-generation", model=model_name, max_length=max_target_length, num_beams=num_beams, early_stopping=early_stopping, clean_up_tokenization_spaces=clean_up_tokenization_spaces ) pred = text2text(input_text) print('true answer |', label) print('pred |', pred) ```` ## Training procedure ### Notebook The notebook of finetuning ([HuggingFace_Notebook_t5-base-portuguese-vocab_question_answering_QA_squad_v11_pt.ipynb](https://github.com/piegu/language-models/blob/master/HuggingFace_Notebook_t5_base_portuguese_vocab_question_answering_QA_squad_v11_pt.ipynb)) is in github. ### Hyperparameters ```` # do training and evaluation do_train = True do_eval= True # batch batch_size = 4 gradient_accumulation_steps = 3 per_device_train_batch_size = batch_size per_device_eval_batch_size = per_device_train_batch_size*16 # LR, wd, epochs learning_rate = 1e-4 weight_decay = 0.01 num_train_epochs = 10 fp16 = True # logs logging_strategy = "steps" logging_first_step = True logging_steps = 3000 # if logging_strategy = "steps" eval_steps = logging_steps # checkpoints evaluation_strategy = logging_strategy save_strategy = logging_strategy save_steps = logging_steps save_total_limit = 3 # best model load_best_model_at_end = True metric_for_best_model = "f1" #"loss" if metric_for_best_model == "loss": greater_is_better = False else: greater_is_better = True # evaluation num_beams = 1 ```` ### Training results ```` Num examples = 87510 Num Epochs = 10 Instantaneous batch size per device = 4 Total train batch size (w. parallel, distributed & accumulation) = 12 Gradient Accumulation steps = 3 Total optimization steps = 72920 Step Training Loss Exact Match F1 3000 0.776100 61.807001 75.114517 6000 0.545900 65.260170 77.468930 9000 0.460500 66.556291 78.491938 12000 0.393400 66.821192 78.745397 15000 0.379800 66.603595 78.815515 18000 0.298100 67.578051 79.287899 21000 0.303100 66.991485 78.979669 24000 0.251600 67.275307 78.929923 27000 0.237500 66.972564 79.333612 30000 0.220500 66.915799 79.236574 33000 0.182600 67.029328 78.964212 36000 0.190600 66.982025 79.086125 ````
[ -0.4106634855270386, -0.6517031192779541, 0.15628384053707123, 0.27678728103637695, -0.28827881813049316, -0.047887057065963745, -0.07638225704431534, -0.289713978767395, 0.04320438206195831, 0.06728488951921463, -0.7077581882476807, -0.5894401669502258, -0.5120923519134521, 0.01997489295899868, -0.18581606447696686, 1.0477774143218994, -0.12878811359405518, 0.22737529873847961, -0.03152964636683464, -0.1452738642692566, -0.48842963576316833, -0.5786817669868469, -0.9135728478431702, -0.18032635748386383, 0.17316359281539917, 0.36601564288139343, 0.29375213384628296, 0.3978283405303955, 0.603652834892273, 0.32006046175956726, -0.12923908233642578, 0.10701820254325867, -0.5010037422180176, -0.07381559908390045, 0.051379404962062836, -0.5215457677841187, -0.42990151047706604, 0.02758820913732052, 0.4614782929420471, 0.17056681215763092, -0.10138784348964691, 0.4012930691242218, -0.004260001704096794, 0.3329062759876251, -0.41449394822120667, 0.2422642856836319, -0.3146386742591858, 0.06337609142065048, 0.20303970575332642, -0.05152692273259163, -0.16581876575946808, -0.16473428905010223, 0.19967059791088104, -0.5070586800575256, 0.35980314016342163, -0.1669205129146576, 1.3637275695800781, 0.2934824824333191, -0.15351109206676483, -0.1430293470621109, -0.5157305002212524, 0.8416126370429993, -0.7926114797592163, 0.24203623831272125, 0.4163881540298462, 0.3725111186504364, 0.03400738164782524, -0.7202516794204712, -0.4693186581134796, -0.10864163935184479, 0.0427042618393898, 0.35940980911254883, -0.3107326328754425, -0.08666493743658066, 0.3091977536678314, 0.1685606688261032, -0.7207040786743164, 0.1576603204011917, -0.6701902151107788, -0.4389103353023529, 0.8675297498703003, 0.15868864953517914, 0.24358482658863068, -0.16008679568767548, -0.5878908038139343, -0.3800522983074188, -0.45152223110198975, 0.5073114633560181, 0.13778236508369446, 0.11367036402225494, -0.5753313899040222, 0.379867285490036, -0.3026171922683716, 0.5780437588691711, 0.29351571202278137, -0.17101654410362244, 0.43836408853530884, -0.4495377540588379, -0.48731255531311035, -0.11795344203710556, 1.0183693170547485, 0.36288249492645264, 0.05352127552032471, -0.04875365272164345, -0.14197076857089996, -0.021995993331074715, 0.030709248036146164, -0.9776151776313782, -0.22299832105636597, 0.4701420068740845, -0.2253272384405136, -0.3154229521751404, 0.0010885399533435702, -0.5024688839912415, 0.02761196717619896, -0.020677944645285606, 0.6352876424789429, -0.553503692150116, -0.12830215692520142, 0.1587984412908554, -0.33637115359306335, 0.5628610253334045, 0.17830486595630646, -0.6402406692504883, 0.057349901646375656, 0.3500247001647949, 0.7184824347496033, -0.021781982854008675, -0.3742396831512451, -0.4108356535434723, -0.19646646082401276, -0.33991411328315735, 0.5857295393943787, -0.004516164306551218, -0.23144100606441498, -0.28262653946876526, 0.21269327402114868, -0.27595698833465576, -0.40356847643852234, 0.5866617560386658, -0.345704048871994, 0.6003788113594055, -0.31720948219299316, -0.3718269169330597, -0.30260103940963745, 0.4596201777458191, -0.2011174112558365, 1.0922677516937256, 0.3078894019126892, -0.6229204535484314, 0.21234767138957977, -0.42279672622680664, -0.1797061264514923, -0.2415231615304947, -0.06248747184872627, -0.7122394442558289, -0.38587430119514465, 0.343427836894989, 0.6153095960617065, -0.43158209323883057, 0.2077023833990097, -0.23631727695465088, -0.27982527017593384, 0.09652107954025269, -0.386884480714798, 1.2537113428115845, 0.22360451519489288, -0.4589763879776001, 0.06589799374341965, -0.6796209812164307, 0.19882643222808838, 0.315116822719574, -0.33516067266464233, 0.16408245265483856, -0.3487207889556885, -0.045452386140823364, 0.5320575833320618, 0.3195885717868805, -0.5516384243965149, 0.1094156876206398, -0.5248593091964722, 0.6921061277389526, 0.4411550760269165, 0.16602680087089539, 0.16600920259952545, -0.4800378084182739, 0.6222553253173828, 0.24495722353458405, 0.37050139904022217, 0.12179456651210785, -0.5133767127990723, -0.8337568640708923, -0.3830547034740448, 0.22664225101470947, 0.8322606682777405, -0.6469515562057495, 0.5684458613395691, -0.0627632588148117, -0.8116447925567627, -0.4266703128814697, -0.0879930779337883, 0.6522315740585327, 0.6569643020629883, 0.5756980776786804, -0.2559511959552765, -0.8429602980613708, -0.9045878648757935, 0.06684201210737228, -0.24325114488601685, 0.0641326829791069, 0.3545316457748413, 0.8376410603523254, -0.08032669126987457, 0.6958269476890564, -0.4569712281227112, -0.3618064224720001, -0.40857747197151184, -0.047197550535202026, 0.31361865997314453, 0.6689653992652893, 0.8136956095695496, -0.6988580226898193, -0.45491334795951843, -0.3319658041000366, -0.8960174322128296, 0.12236159294843674, -0.10428345948457718, -0.07085423916578293, 0.23279429972171783, 0.3437251150608063, -0.565785825252533, 0.3052350878715515, 0.48863574862480164, -0.4095931053161621, 0.49342578649520874, -0.2897998094558716, 0.06486465036869049, -1.3685240745544434, 0.18417474627494812, 0.06230609491467476, -0.07703346759080887, -0.5269572138786316, 0.20099154114723206, -0.14869801700115204, -0.11919836699962616, -0.7691954970359802, 0.597057580947876, -0.3101764917373657, 0.13813626766204834, 0.125697523355484, -0.08096925169229507, 0.17210066318511963, 0.7361453771591187, -0.04415721818804741, 0.9649421572685242, 0.6091928482055664, -0.6148170232772827, 0.42035427689552307, 0.4738931655883789, -0.2025425285100937, 0.30176323652267456, -1.0399333238601685, -0.03390734642744064, 0.05520480498671532, 0.29035240411758423, -1.1378291845321655, -0.22842317819595337, 0.5045329928398132, -0.8270309567451477, 0.21318373084068298, -0.26094192266464233, -0.32309049367904663, -0.6663662791252136, -0.22544528543949127, 0.34155890345573425, 0.715511679649353, -0.3039518892765045, 0.24253496527671814, 0.30770787596702576, 0.19631509482860565, -0.7781091928482056, -0.859265148639679, -0.2464684396982193, -0.27387526631355286, -0.7404957413673401, 0.2618648111820221, -0.03759439289569855, 0.03762705251574516, -0.20864467322826385, -0.08612105995416641, -0.4999672472476959, 0.24725735187530518, 0.10199343413114548, 0.4262184500694275, -0.22910676896572113, 0.014351768419146538, -0.16870401799678802, 0.0507257878780365, 0.03873111307621002, -0.21569743752479553, 0.8110740780830383, -0.3812194764614105, 0.010416124947369099, -0.7384431958198547, 0.11113277077674866, 0.5311111807823181, -0.42268601059913635, 0.8796220421791077, 0.8419573903083801, -0.32180720567703247, 0.040659479796886444, -0.47914424538612366, -0.2379184067249298, -0.46023425459861755, 0.5889950394630432, -0.4109393358230591, -0.6118850708007812, 0.7567089200019836, 0.32344678044319153, -0.021511811763048172, 0.9739172458648682, 0.515128493309021, -0.23500651121139526, 0.9993231892585754, 0.3178057074546814, -0.003476508893072605, 0.2770687937736511, -1.0391989946365356, -0.06759030371904373, -0.769972562789917, -0.4380495846271515, -0.5732938051223755, -0.17756551504135132, -0.5041131973266602, -0.4774916470050812, 0.4725227653980255, 0.28171637654304504, -0.668131947517395, 0.46488848328590393, -0.6424282193183899, 0.1744367927312851, 0.48374879360198975, 0.3185916543006897, -0.2423827350139618, -0.07050186395645142, -0.19835133850574493, 0.16218392550945282, -1.1297810077667236, -0.24392716586589813, 1.0854110717773438, 0.43404892086982727, 0.4244280755519867, -0.05864623934030533, 0.7248644828796387, 0.008088110946118832, -0.1744699776172638, -0.7645595669746399, 0.5291943550109863, -0.15086588263511658, -0.6829885244369507, -0.32867559790611267, -0.2453089952468872, -1.0636569261550903, 0.10947494208812714, -0.25201132893562317, -0.5996617674827576, 0.32830509543418884, 0.13336671888828278, -0.6646093130111694, 0.23741398751735687, -0.8508723378181458, 1.0525168180465698, -0.21269740164279938, -0.3989805579185486, -0.05500132963061333, -0.7538496255874634, 0.26488354802131653, 0.2471572905778885, -0.131195068359375, -0.05867128446698189, 0.01843024045228958, 0.9643059372901917, -0.6718710064888, 0.8102758526802063, -0.3324025273323059, 0.1361963301897049, 0.6143845915794373, -0.22244815528392792, 0.5176407694816589, 0.051765941083431244, -0.10419908165931702, 0.2918841540813446, 0.2607620656490326, -0.6362546682357788, -0.32171541452407837, 0.5257570743560791, -1.1245523691177368, -0.5216668844223022, -0.6271266937255859, -0.46290379762649536, 0.02350231073796749, 0.2209298312664032, 0.6321341395378113, 0.5647135972976685, -0.06518279016017914, 0.2688203454017639, 0.7197260856628418, -0.3586386442184448, 0.500641405582428, 0.41018158197402954, 0.1648804098367691, -0.42049309611320496, 0.8504539728164673, 0.2425360232591629, 0.2406294047832489, 0.3051176369190216, 0.1716458797454834, -0.44229552149772644, -0.5857165455818176, -0.6968517899513245, 0.2772456109523773, -0.5158007740974426, -0.33217042684555054, -0.7128384709358215, -0.40312573313713074, -0.642270565032959, 0.059460077434778214, -0.4217216670513153, -0.32550352811813354, -0.33087846636772156, -0.021412568166851997, 0.416034072637558, 0.29583966732025146, -0.004031323827803135, 0.2677851617336273, -0.7268593907356262, 0.2766932249069214, 0.23211410641670227, 0.06660577654838562, -0.18937894701957703, -0.8659967184066772, -0.3146001100540161, 0.2916478216648102, -0.4598785936832428, -0.8215425610542297, 0.5921171307563782, 0.06489159166812897, 0.4239329397678375, 0.23826847970485687, -0.05950675904750824, 0.7291362881660461, -0.1745675653219223, 1.0545448064804077, 0.15893511474132538, -0.7169502973556519, 0.5476987361907959, -0.4431464970111847, 0.32233190536499023, 0.4440160095691681, 0.5319629907608032, -0.39332282543182373, -0.10294827073812485, -0.8545183539390564, -0.8392976522445679, 0.8308501243591309, 0.3189363479614258, -0.027981964871287346, 0.03388523310422897, 0.36878302693367004, -0.24585559964179993, 0.11580964922904968, -0.47143474221229553, -0.4141010642051697, -0.2713574469089508, -0.1481700986623764, -0.08355142176151276, -0.14476953446865082, -0.15498055517673492, -0.5463268160820007, 0.937751293182373, 0.050796519964933395, 0.6590012907981873, 0.5615509152412415, -0.025060895830392838, 0.10231893509626389, 0.11037901043891907, 0.720832884311676, 0.6092708110809326, -0.30404677987098694, -0.30852434039115906, 0.43594440817832947, -0.4692467153072357, 0.28152358531951904, 0.20478855073451996, -0.2940114438533783, 0.044799961149692535, 0.2854394316673279, 0.9900304079055786, -0.07320834696292877, -0.47823312878608704, 0.6752415895462036, -0.05811478570103645, -0.35537251830101013, -0.5745292901992798, 0.19976629316806793, -0.06986532360315323, 0.34942150115966797, 0.3313981294631958, 0.1628647893667221, 0.030714001506567, -0.569674551486969, 0.1452130526304245, 0.40085968375205994, -0.40740057826042175, -0.25591400265693665, 0.8779693841934204, 0.14353466033935547, -0.16523654758930206, 0.5875504612922668, -0.31451985239982605, -0.7088572382926941, 1.0904381275177002, 0.3769296407699585, 0.7980993390083313, -0.2029980570077896, 0.2222570776939392, 0.808783233165741, 0.1941039264202118, -0.21906134486198425, 0.4746624529361725, 0.26458701491355896, -0.6275472044944763, -0.23047462105751038, -0.4156761169433594, -0.07598647475242615, 0.2416512817144394, -0.7726460695266724, 0.43307241797447205, -0.5039018988609314, -0.2026890218257904, -0.08672165125608444, 0.3114040493965149, -0.9335862398147583, 0.6693400740623474, 0.09853483736515045, 0.965611457824707, -0.7685839533805847, 0.7840266227722168, 0.7781178951263428, -0.7872028350830078, -1.1328198909759521, -0.14362125098705292, -0.26349112391471863, -1.1000268459320068, 0.6298834681510925, 0.11858826875686646, 0.15801911056041718, 0.1148306354880333, -0.6289770007133484, -0.8424456119537354, 1.3249069452285767, 0.33275648951530457, -0.4168441593647003, -0.2757151126861572, 0.14668166637420654, 0.7514182925224304, -0.19853612780570984, 0.5997598171234131, 0.4330537021160126, 0.2553972899913788, 0.11335685104131699, -0.9291583299636841, 0.05566519498825073, -0.29393503069877625, -0.19512340426445007, -0.0749531239271164, -1.2770839929580688, 1.0233503580093384, -0.3878273069858551, 0.027049656957387924, 0.037228912115097046, 0.6541643738746643, 0.3164192736148834, 0.3520410656929016, 0.3100723624229431, 0.7754608988761902, 0.683032214641571, -0.19908791780471802, 1.1632955074310303, -0.370969295501709, 0.5881325006484985, 1.0008518695831299, 0.3145170509815216, 0.7848364114761353, 0.2799314856529236, -0.3590790331363678, 0.48589977622032166, 0.85186368227005, -0.30557703971862793, 0.40090182423591614, 0.06584253162145615, -0.03679125756025314, -0.33686167001724243, 0.021259302273392677, -0.5763797163963318, 0.5996372699737549, 0.12796363234519958, -0.4507049322128296, -0.1078154519200325, -0.02857240103185177, 0.20423483848571777, -0.3068489134311676, -0.25836417078971863, 0.587777853012085, -0.07496465742588043, -0.8371389508247375, 1.2213712930679321, 0.08431901037693024, 0.5827308297157288, -0.6272960901260376, 0.14664001762866974, -0.29447248578071594, 0.19288817048072815, -0.13600775599479675, -0.703342080116272, 0.21630670130252838, 0.006463421508669853, -0.2518881857395172, -0.10295300930738449, 0.41017812490463257, -0.4164438545703888, -0.4969378411769867, 0.0910179391503334, 0.4763461649417877, 0.34878644347190857, -0.04711618646979332, -1.0406538248062134, -0.1217556893825531, 0.1655966192483902, -0.24127952754497528, 0.22338613867759705, 0.18417610228061676, -0.03834066540002823, 0.7593947649002075, 0.4113638699054718, -0.05642864108085632, 0.1330586075782776, -0.3085342049598694, 0.7520861029624939, -0.4176747798919678, -0.4295787811279297, -0.8092184066772461, 0.6415765881538391, -0.015359212644398212, -0.7193576693534851, 0.7288118004798889, 0.8716998100280762, 0.9160397052764893, -0.14932231605052948, 0.9424787163734436, -0.22722218930721283, 0.3958381414413452, -0.2977108955383301, 0.7093889713287354, -0.6386690735816956, 0.10150860995054245, 0.07568304985761642, -0.5065825581550598, -0.0030222968198359013, 0.6391534209251404, -0.44638240337371826, -0.047167569398880005, 0.5321334004402161, 0.8490168452262878, -0.005076089408248663, -0.32972452044487, 0.08271001279354095, 0.47649210691452026, 0.3390367031097412, 0.9006072878837585, 0.4349273145198822, -1.1192561388015747, 0.7167174220085144, -0.5908417701721191, 0.00017854219186119735, -0.1816086322069168, -0.4085846245288849, -1.0179733037948608, -0.5774607062339783, -0.38485631346702576, -0.75320965051651, 0.252148300409317, 1.1784826517105103, 0.7037293314933777, -0.9103732705116272, -0.20901840925216675, -0.17033684253692627, -0.10073834657669067, -0.28113433718681335, -0.25477609038352966, 0.6330078840255737, -0.2540982961654663, -0.8210581541061401, 0.14180752635002136, -0.2262205332517624, 0.2703405022621155, -0.13209334015846252, -0.15657958388328552, -0.40123796463012695, -0.026878079399466515, 0.4418908357620239, 0.44704893231391907, -0.5566418170928955, -0.1944333016872406, 0.2434682697057724, -0.3705069124698639, 0.17307250201702118, 0.11172585934400558, -0.8061484098434448, 0.3125918209552765, 0.7501601576805115, 0.4635254144668579, 0.556243896484375, -0.06217828765511513, 0.5313404202461243, -0.593860924243927, 0.3859859108924866, 0.34151268005371094, 0.3184620440006256, 0.1804915815591812, -0.3113098740577698, 0.6208851933479309, 0.4957447052001953, -0.4716218113899231, -0.8613920211791992, -0.18819867074489594, -1.091424822807312, -0.10478939861059189, 1.2994825839996338, -0.37985891103744507, -0.2617090940475464, 0.10179564356803894, -0.36204805970191956, 0.7182813882827759, -0.3459160625934601, 0.7395421266555786, 0.5785961747169495, -0.03598814830183983, 0.004235974978655577, -0.530647337436676, 0.6255524754524231, 0.5890607833862305, -0.7298595309257507, -0.47113943099975586, 0.18585872650146484, 0.4702969193458557, -0.047816164791584015, 0.5513358116149902, 0.08745186775922775, 0.5385103225708008, -0.0753306970000267, 0.08088801056146622, -0.23351947963237762, -0.11804703623056412, -0.30930501222610474, 0.02336149476468563, -0.20257188379764557, -0.5752881765365601 ]