vector listlengths 1.02k 1.02k | text stringlengths 2 11.8k |
|---|---|
[
-0.0009422703,
0.0026324294,
-0.00014916374,
0.047083877,
0.0035563947,
-0.033890348,
-0.012768154,
-0.013591006,
-0.0065618968,
0.05492189,
0.01609443,
0.031826247,
0.016889388,
-0.034922402,
-0.029650569,
0.022063592,
-0.02407191,
-0.045242917,
-0.081002116,
0.013869939,
0.... |
XLNetConfig
[[autodoc]] XLNetConfig
XLNetTokenizer
[[autodoc]] XLNetTokenizer
- build_inputs_with_special_tokens
- get_special_tokens_mask
- create_token_type_ids_from_sequences
- save_vocabulary
XLNetTokenizerFast
[[autodoc]] XLNetTokenizerFast
XLNet specific outputs
[[autodoc]] models.xlnet.modeling... |
[
-0.0052524414,
-0.032386594,
0.0061105476,
0.036677126,
0.03651104,
-0.020068616,
0.00061676395,
-0.0024930064,
0.018504648,
0.071250506,
0.024372987,
0.028649678,
0.06593578,
-0.026213765,
-0.020400787,
0.06344451,
-0.0103318775,
-0.056967188,
-0.039334487,
-0.014131074,
0.0... | TFXLNetModel
[[autodoc]] TFXLNetModel
- call
TFXLNetLMHeadModel
[[autodoc]] TFXLNetLMHeadModel
- call
TFXLNetForSequenceClassification
[[autodoc]] TFXLNetForSequenceClassification
- call
TFLNetForMultipleChoice
[[autodoc]] TFXLNetForMultipleChoice
- call
TFXLNetForTokenClassification
[[autodoc]] TFXLNet... |
[
0.00749444,
-0.006746407,
-0.04386576,
0.009625627,
-0.016823677,
-0.016005075,
-0.0079813665,
-0.010677107,
-0.012229627,
0.04242615,
0.0117427,
0.0085600335,
0.016273238,
-0.055326186,
-0.02045093,
0.024670962,
-0.03621607,
-0.031332687,
-0.055947192,
-0.023979384,
-0.01352... | Resources
Text classification task guide
Token classification task guide
Masked language modeling task guide
EsmConfig
[[autodoc]] EsmConfig
- all
EsmTokenizer
[[autodoc]] EsmTokenizer
- build_inputs_with_special_tokens
- get_special_tokens_mask
- create_token_type_ids_from_sequences
- save_vocabu... |
[
0.03364876,
-0.0053383685,
-0.040861238,
-0.018016994,
0.0017312429,
0.02331277,
0.0039398866,
-0.037254997,
-0.011642187,
0.0045184465,
0.008177927,
0.0055051926,
0.010939396,
-0.041741498,
0.0031767553,
0.060198624,
0.0045432923,
-0.0192664,
-0.041627917,
-0.005530039,
0.01... | ESM models are trained with a masked language modeling (MLM) objective.
The HuggingFace port of ESMFold uses portions of the openfold library. The openfold library is licensed under the Apache License 2.0.
Resources
Text classification task guide
Token classification task guide
Masked language modeling task guide |
[
0.01440766,
-0.021135055,
-0.006197228,
-0.0043058195,
-0.009851085,
0.024344718,
-0.032956358,
-0.030463137,
-0.024473676,
0.03928971,
0.024129784,
-0.034618504,
-0.007210994,
-0.004717774,
0.0048073293,
0.029746694,
-0.0019021549,
-0.018383915,
-0.04863212,
-0.031466156,
0.... |
ESM
Overview
This page provides code and pre-trained weights for Transformer protein language models from Meta AI's Fundamental
AI Research Team, providing the state-of-the-art ESMFold and ESM-2, and the previously released ESM-1b and ESM-1v.
Transformer protein language models were introduced in the paper Biological... |
[
0.00058928126,
-0.025059443,
-0.01626827,
0.019684868,
-0.015190726,
0.015795201,
0.00019300502,
-0.00976359,
0.0016491662,
0.058345005,
0.013331308,
-0.00027390287,
0.028147522,
-0.030907083,
-0.019040972,
0.0462555,
0.00703031,
-0.06586152,
-0.058029626,
-0.012247195,
0.028... | EsmModel
[[autodoc]] EsmModel
- forward
EsmForMaskedLM
[[autodoc]] EsmForMaskedLM
- forward
EsmForSequenceClassification
[[autodoc]] EsmForSequenceClassification
- forward
EsmForTokenClassification
[[autodoc]] EsmForTokenClassification
- forward
EsmForProteinFolding
[[autodoc]] EsmForProteinFolding
... |
[
-0.013736649,
-0.029410344,
0.0060225725,
0.01127442,
-0.0119496565,
-0.0052211545,
0.02867372,
0.024281267,
-0.011745039,
0.048371557,
0.014227731,
0.019315884,
0.048835356,
-0.029655883,
-0.03314802,
0.030119684,
-0.0023548054,
-0.064004324,
-0.03805884,
-0.029655883,
0.011... | TFEsmModel
[[autodoc]] TFEsmModel
- call
TFEsmForMaskedLM
[[autodoc]] TFEsmForMaskedLM
- call
TFEsmForSequenceClassification
[[autodoc]] TFEsmForSequenceClassification
- call
TFEsmForTokenClassification
[[autodoc]] TFEsmForTokenClassification
- call |
[
0.0358323,
0.02869219,
-0.016058668,
0.0042616725,
0.013858669,
-0.05696282,
-0.03559518,
-0.021868244,
0.0174419,
0.022118542,
0.0474778,
-0.039889783,
0.047662232,
0.0007245502,
0.0061158626,
-0.009234722,
0.019207168,
-0.041496966,
-0.04349936,
0.0222898,
0.00758143,
-0.... | PVTv1 on ImageNet-1K |
[
0.05638345,
-0.019454442,
0.027574806,
0.00015703167,
-0.018966645,
-0.0017288055,
0.034776967,
0.0030684504,
-0.013256567,
0.045623247,
0.05618259,
0.005606064,
0.0014589038,
-0.028650826,
-0.03064505,
0.05394447,
0.0374168,
-0.030702438,
-0.05824855,
0.001829234,
-0.0346621... |
| Model variant |Size |Acc@1|Params (M)|
|--------------------|:-------:|:-------:|:------------:|
| PVT-Tiny | 224 | 75.1 | 13.2 |
| PVT-Small | 224 | 79.8 | 24.5 |
| PVT-Medium | 224 | 81.2 | 44.2 |
| PVT-Large | 224 | 81.7 | ... |
[
0.027079301,
0.0036259212,
-0.014424548,
0.002672678,
0.009273438,
0.0071583167,
-0.017525285,
-0.011956907,
-0.007259037,
0.04670532,
0.0377844,
-0.030964216,
0.013359793,
-0.026230374,
-0.0019334649,
0.013122382,
0.004719453,
-0.021956967,
-0.041007444,
0.008568397,
-0.0136... |
Pyramid Vision Transformer (PVT)
Overview
The PVT model was proposed in
Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
by Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao. The PVT is a type of
vision transformer that utili... |
[
0.040206313,
-0.002075947,
-0.023341918,
-0.05587222,
0.018562246,
-0.0054324176,
-0.016250884,
-0.034499243,
-0.020531187,
0.07173788,
0.029205933,
0.0007570786,
0.02628106,
-0.056642674,
0.018804798,
0.0007428109,
0.012113257,
-0.029505555,
-0.06369091,
-0.016536238,
0.0327... |
Overview
The Reformer model was proposed in the paper Reformer: The Efficient Transformer by Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya.
The abstract from the paper is the following:
Large Transformer models routinely achieve state-of-the-art results on a number of tasks but training these models can
be prohibitiv... |
[
-0.0026044126,
-0.07000213,
-0.0047429386,
-0.0401013,
-0.002532603,
-0.0010105892,
-0.016029311,
0.00019911847,
-0.0040038247,
0.007426167,
0.025024781,
-0.0072790445,
0.028681818,
-0.017374428,
0.014516055,
-0.021760069,
-0.0006449731,
-0.033291645,
-0.062491894,
0.01036861,
... | Reformer |
[
0.045522694,
-0.01462889,
0.03834326,
0.0068299924,
0.009847896,
-0.00302386,
0.025747482,
-0.005785639,
-0.028543014,
0.042377718,
0.024873879,
0.018028002,
-0.029718408,
-0.01788505,
0.0045546517,
0.008720153,
0.033228707,
-0.016566701,
-0.047460504,
-0.0018286112,
0.026891... |
Axial Positional Encodings
Axial Positional Encodings were first implemented in Google's trax library
and developed by the authors of this model's paper. In models that are treating very long input sequences, the
conventional position id encodings store an embeddings vector of size \(d\) being the config.hidden_size ... |
[
0.03028036,
-0.029300656,
-0.02215636,
-0.032134257,
0.026376618,
0.035510466,
-0.024025332,
-0.0158109,
0.0075324085,
0.04823153,
0.0053883665,
-0.012917007,
0.016142491,
-0.020588836,
-0.0082370415,
-0.011236439,
0.023422437,
-0.03171223,
-0.04084608,
0.0066431398,
0.036022... |
Reformer does not work with torch.nn.DataParallel due to a bug in PyTorch, see issue #36035.
Use Axial position encoding (see below for more details). It’s a mechanism to avoid having a huge positional encoding matrix (when the sequence length is very big) by factorizing it into smaller matrices.
Replace traditional ... |
[
0.02316452,
-0.0048756204,
-0.035890408,
-0.028031016,
-0.008990851,
0.015743114,
-0.03630406,
-0.034771115,
-0.037326023,
0.028420337,
-0.004072649,
0.009799906,
0.018237194,
-0.038883302,
-0.015499789,
-0.00588846,
-0.045672063,
-0.0247218,
-0.047569998,
-0.04051358,
0.0065... | Text classification task guide
Question answering task guide
Causal language modeling task guide
Masked language modeling task guide |
[
0.0030382785,
-0.040979575,
-0.03772907,
0.02397247,
-0.0005895167,
-0.010397261,
0.012501382,
-0.013226941,
-0.00049882184,
0.03221482,
0.001998915,
-0.006747699,
0.013263219,
-0.040718373,
-0.03476879,
-0.0037293734,
-0.020359186,
-0.040137924,
-0.048264187,
-0.04266287,
0.... |
CamemBERT
Overview
The CamemBERT model was proposed in CamemBERT: a Tasty French Language Model by
Louis Martin, Benjamin Muller, Pedro Javier Ortiz Suárez, Yoann Dupont, Laurent Romary, Éric Villemonte de la
Clergerie, Djamé Seddah, and Benoît Sagot. It is based on Facebook's RoBERTa model released in 2019. It is a m... |
[
0.004163486,
-0.056485508,
-0.020459423,
-0.012364492,
0.007697145,
0.02239531,
0.009374472,
-0.0012803713,
0.006122578,
0.072556034,
0.025829524,
0.021135656,
0.044392835,
-0.0443398,
-0.0057115336,
0.027685855,
0.00053245213,
-0.030974213,
-0.074624516,
0.0028507945,
0.0195... |
ReformerConfig
[[autodoc]] ReformerConfig
ReformerTokenizer
[[autodoc]] ReformerTokenizer
- save_vocabulary
ReformerTokenizerFast
[[autodoc]] ReformerTokenizerFast
ReformerModel
[[autodoc]] ReformerModel
- forward
ReformerModelWithLMHead
[[autodoc]] ReformerModelWithLMHead
- forward
ReformerForMaskedLM
[[... |
[
0.00248553,
-0.015063404,
-0.0365728,
-0.014339596,
0.014134744,
-0.021932753,
-0.037037127,
-0.011007347,
-0.017890353,
0.055746887,
0.0177811,
0.013684072,
-0.01293295,
-0.06795603,
-0.007504388,
-0.01887364,
-0.02821486,
-0.01584184,
-0.041134156,
-0.027272545,
-0.00540807... | This implementation is the same as RoBERTa. Refer to the documentation of RoBERTa for usage examples as well
as the information relative to the inputs and outputs.
Resources
Text classification task guide
Token classification task guide
Question answering task guide
Causal language modeling task guide
Masked languag... |
[
0.0007170588,
-0.020587593,
-0.03334133,
0.006248111,
-0.024843356,
-0.012442008,
-0.020275865,
-0.0077728666,
-0.013614376,
0.04356058,
0.004516666,
-0.0038085014,
0.017280567,
-0.060231246,
-0.026971238,
0.0047775684,
-0.05009331,
-0.038193442,
-0.061803438,
-0.019083166,
-... | Text classification task guide
Token classification task guide
Question answering task guide
Causal language modeling task guide
Masked language modeling task guide
Multiple choice task guide
CamembertConfig
[[autodoc]] CamembertConfig
CamembertTokenizer
[[autodoc]] CamembertTokenizer
- build_inputs_with_special_t... |
[
-0.012978692,
-0.053777065,
0.014133062,
0.01391622,
-0.053726044,
-0.030358022,
-0.00737904,
0.021301636,
-0.01557443,
0.041251194,
0.01648007,
0.022564428,
0.028113058,
-0.026033917,
-0.05658327,
0.019783735,
-0.025778808,
-0.04492477,
-0.030128423,
-0.00040299317,
0.038725... | CamembertModel
[[autodoc]] CamembertModel
CamembertForCausalLM
[[autodoc]] CamembertForCausalLM
CamembertForMaskedLM
[[autodoc]] CamembertForMaskedLM
CamembertForSequenceClassification
[[autodoc]] CamembertForSequenceClassification
CamembertForMultipleChoice
[[autodoc]] CamembertForMultipleChoice
CamembertForTokenClass... |
[
0.009971693,
-0.045390137,
0.033903755,
0.023136852,
-0.032540537,
-0.028046964,
-0.0091133695,
0.010634368,
-0.0077943294,
0.026633255,
0.017620865,
0.01074797,
0.031480256,
-0.025408883,
-0.05452875,
0.0038876978,
-0.0021505407,
-0.029915078,
-0.021445451,
-0.0069991187,
0.... | TFCamembertModel
[[autodoc]] TFCamembertModel
TFCamembertForCasualLM
[[autodoc]] TFCamembertForCausalLM
TFCamembertForMaskedLM
[[autodoc]] TFCamembertForMaskedLM
TFCamembertForSequenceClassification
[[autodoc]] TFCamembertForSequenceClassification
TFCamembertForMultipleChoice
[[autodoc]] TFCamembertForMultipleChoice
TF... |
[
0.022784444,
0.039684616,
-0.019992836,
-0.0015044232,
-0.006332433,
-0.030707682,
0.005247948,
-0.00581927,
0.013068554,
0.04885313,
-0.003992409,
-0.0035339834,
0.0034296403,
-0.059882715,
-0.026465533,
-0.0046732053,
-0.012117492,
-0.0502763,
-0.024276037,
-0.0060758516,
0... |
from transformers import GPTNeoXJapaneseForCausalLM, GPTNeoXJapaneseTokenizer
model = GPTNeoXJapaneseForCausalLM.from_pretrained("abeja/gpt-neox-japanese-2.7b")
tokenizer = GPTNeoXJapaneseTokenizer.from_pretrained("abeja/gpt-neox-japanese-2.7b")
prompt = "人とAIが協調するためには、"
input_ids = tokenizer(prompt, return_tensors="... |
[
0.044094387,
0.026622469,
-0.0046011857,
-0.019219112,
0.023113277,
-0.013999746,
0.0016602026,
-0.0038201318,
0.035417654,
0.063372724,
0.0006177175,
0.026637275,
-0.017708827,
-0.054162953,
-0.030709121,
0.016761199,
0.0024283007,
-0.03165675,
-0.0010355444,
0.007425566,
0.... |
GPT-NeoX-Japanese
Overview
We introduce GPT-NeoX-Japanese, which is an autoregressive language model for Japanese, trained on top of https://github.com/EleutherAI/gpt-neox.
Japanese is a unique language with its large vocabulary and a combination of hiragana, katakana, and kanji writing scripts.
To address this distin... |
[
-0.00033991522,
-0.009960936,
-0.044684313,
0.0034135794,
-0.0068796217,
-0.00975808,
-0.002892449,
-0.009751085,
-0.00877178,
0.0740355,
-0.007722524,
0.00013673116,
0.0058303657,
-0.048377696,
-0.0113809295,
0.029547047,
-0.029658968,
-0.017669471,
-0.04630716,
-0.0008839981,... | Resources
Causal language modeling task guide
GPTNeoXJapaneseConfig
[[autodoc]] GPTNeoXJapaneseConfig
GPTNeoXJapaneseTokenizer
[[autodoc]] GPTNeoXJapaneseTokenizer
GPTNeoXJapaneseModel
[[autodoc]] GPTNeoXJapaneseModel
- forward
GPTNeoXJapaneseForCausalLM
[[autodoc]] GPTNeoXJapaneseForCausalLM
- forward |
[
-0.027699957,
0.012071468,
0.010299959,
0.0074151303,
-0.009382695,
-0.058984943,
-0.025053198,
0.018317262,
0.025137221,
0.020025752,
0.022658508,
-0.02307863,
-0.008675492,
-0.011777383,
-0.031256977,
0.011294245,
-0.02607549,
-0.047361605,
-0.018583339,
-0.0030458749,
-0.0... | Pop2Piano |
[
0.0021350377,
0.013786949,
-0.01201686,
-0.025006916,
-0.00091413467,
-0.029449768,
-0.019322885,
-0.011544366,
0.024640204,
0.011967495,
-0.007863144,
-0.049534287,
0.026572492,
-0.033314347,
-0.008328587,
0.058561035,
0.0046685217,
-0.038504727,
-0.033934936,
0.0019340515,
... | To use Pop2Piano, you will need to install the 🤗 Transformers library, as well as the following third party modules: |
[
0.026310906,
-0.014656128,
-0.0060482826,
-0.02483828,
0.026310906,
0.0018372755,
-0.0009203908,
-0.029256156,
-0.012566403,
0.05494996,
0.04311286,
-0.02130398,
0.009593102,
-0.035343006,
0.0043232073,
0.019761229,
-0.015147003,
-0.055651214,
-0.014600028,
-0.018989854,
0.00... |
MRA
Overview
The MRA model was proposed in Multi Resolution Analysis (MRA) for Approximate Self-Attention by Zhanpeng Zeng, Sourav Pal, Jeffery Kline, Glenn M Fung, and Vikas Singh.
The abstract from the paper is the following:
Transformers have emerged as a preferred model for many tasks in natural language processin... |
[
0.0018460269,
0.02330096,
0.0030142854,
0.015381774,
-0.038211863,
-0.03313217,
-0.020304512,
-0.010387692,
-0.00493344,
0.022187995,
-0.021231985,
-0.04411915,
0.016123751,
-0.050939642,
-0.025641046,
-0.018321147,
0.00042739537,
-0.068718575,
-0.05573396,
-0.0031748095,
0.0... |
pip install pretty-midi==0.2.9 essentia==2.1b6.dev1034 librosa scipy
Please note that you may need to restart your runtime after installation.
Pop2Piano is an Encoder-Decoder based model like T5.
Pop2Piano can be used to generate midi-audio files for a given audio sequence.
Choosing different composers in Pop2PianoFo... |
[
0.0036834138,
0.041065063,
-0.0027521013,
-0.016589005,
-0.004347338,
-0.03655402,
-0.01555583,
-0.020721704,
0.011357647,
0.03896961,
-0.008701952,
-0.02846324,
0.034633186,
-0.048864804,
-0.020445222,
0.016356178,
-0.013132962,
-0.06903354,
-0.07171107,
-0.021463845,
0.0032... |
from datasets import load_dataset
from transformers import Pop2PianoForConditionalGeneration, Pop2PianoProcessor
model = Pop2PianoForConditionalGeneration.from_pretrained("sweetcocoa/pop2piano")
processor = Pop2PianoProcessor.from_pretrained("sweetcocoa/pop2piano")
ds = load_dataset("sweetcocoa/pop2piano_ci", split="... |
[
0.029495059,
0.023240164,
0.017901937,
-0.004539516,
-0.031597998,
-0.005988656,
0.03604652,
0.008236509,
0.01729532,
0.0067132264,
-0.013170325,
0.001567936,
-0.007131118,
-0.032191135,
-0.029252412,
-0.011134789,
-0.01617645,
-0.044646997,
-0.046696015,
-0.011734665,
-0.009... | Examples
Example using HuggingFace Dataset:
thon |
[
0.007276097,
0.015493893,
0.011337174,
-0.008622432,
-0.016744588,
-0.047055528,
-0.021982787,
-0.00788673,
0.026720712,
0.040787343,
0.010858968,
-0.026397003,
0.008342865,
-0.051234316,
-0.024881456,
-0.014243199,
-0.018775126,
-0.03649084,
-0.04561355,
-0.015876457,
0.0264... |
Overview
The Pop2Piano model was proposed in Pop2Piano : Pop Audio-based Piano Cover Generation by Jongho Choi and Kyogu Lee.
Piano covers of pop music are widely enjoyed, but generating them from music is not a trivial task. It requires great
expertise with playing piano as well as knowing different characteristics... |
[
-0.0063906424,
0.038671955,
0.005358953,
-0.02261697,
-0.0006420718,
-0.01647787,
-0.020969182,
-0.024191845,
0.004039265,
0.04103427,
-0.003614559,
-0.0169445,
0.022587804,
-0.04491313,
-0.0036674195,
0.008814931,
-0.009522167,
-0.075185746,
-0.062761724,
-0.007823342,
-0.00... |
import librosa
from transformers import Pop2PianoForConditionalGeneration, Pop2PianoProcessor
audio, sr = librosa.load("", sr=44100) # feel free to change the sr to a suitable value.
model = Pop2PianoForConditionalGeneration.from_pretrained("sweetcocoa/pop2piano")
processor = Pop2PianoProcessor.from_pretrained("swee... |
[
0.009318964,
0.027164083,
0.0034076807,
-0.014993795,
-0.026607728,
-0.015647514,
-0.027636986,
0.0036789041,
0.043312315,
0.018151116,
0.019389007,
0.009145102,
0.0066275913,
-0.044870112,
-0.03658041,
0.013067412,
-0.04564901,
-0.041949246,
-0.052047107,
-0.02631564,
-0.008... | Example using your own audio file:
thon |
[
-0.005571549,
0.036482196,
-0.008899214,
-0.021645086,
-0.0047968747,
-0.01679097,
-0.029307872,
-0.035566326,
-0.00094019884,
0.04035938,
-0.006136336,
-0.0021637452,
0.020469718,
-0.036146376,
-0.0135930525,
0.007437636,
-0.0016485678,
-0.06801869,
-0.049670737,
-0.003665392,... |
import librosa
from transformers import Pop2PianoForConditionalGeneration, Pop2PianoProcessor
feel free to change the sr to a suitable value.
audio1, sr1 = librosa.load("", sr=44100)
audio2, sr2 = librosa.load("", sr=44100)
model = Pop2PianoForConditionalGeneration.from_pretrained("sweetcocoa/pop2piano")
processor = ... |
[
0.016589317,
0.043999486,
0.005029176,
0.0007749307,
-0.033019505,
-0.043203834,
-0.048083827,
-0.009832917,
0.042063404,
0.051955994,
0.0029405926,
0.019798443,
0.017053448,
-0.039437756,
-0.03964993,
0.024983434,
-0.012007696,
-0.061848585,
-0.03421298,
-0.04503383,
-0.0240... | Example of processing multiple audio files in batch:
thon |
[
-0.005273434,
0.031660244,
0.003340496,
0.0033814134,
-0.032838665,
-0.03632155,
-0.054835856,
0.0041211997,
0.04574892,
0.040249623,
-0.0017839983,
-0.01314594,
0.012884069,
-0.039883003,
-0.036452487,
0.0262526,
-0.018710706,
-0.0675628,
-0.023110144,
-0.043156393,
-0.01456... | Example of processing multiple audio files in batch (Using Pop2PianoFeatureExtractor and Pop2PianoTokenizer):
thon |
[
-0.0066489996,
0.041401707,
-0.010651968,
-0.025344599,
-0.0076365494,
-0.012235064,
-0.038808446,
-0.025480293,
0.0092950305,
0.041100167,
0.0015529409,
0.0019336377,
0.0213944,
-0.04179371,
-0.0060308385,
0.01610234,
0.00019847584,
-0.06350473,
-0.047342084,
-0.0074066236,
... |
import librosa
from transformers import Pop2PianoForConditionalGeneration, Pop2PianoFeatureExtractor, Pop2PianoTokenizer
feel free to change the sr to a suitable value.
audio1, sr1 = librosa.load("", sr=44100)
audio2, sr2 = librosa.load("", sr=44100)
model = Pop2PianoForConditionalGeneration.from_pretrained("sweetcoc... |
[
-0.03404855,
-0.0013886475,
-0.008400136,
-0.017150277,
-0.028924469,
-0.0184663,
-0.02898047,
0.024290394,
0.03225652,
0.04004065,
0.015904257,
-0.019950323,
0.0371286,
-0.022456363,
-0.01920831,
0.041608673,
-0.017724287,
-0.05138083,
-0.04743277,
0.004588574,
-0.014770239,... | Pop2PianoConfig
[[autodoc]] Pop2PianoConfig
Pop2PianoFeatureExtractor
[[autodoc]] Pop2PianoFeatureExtractor
- call
Pop2PianoForConditionalGeneration
[[autodoc]] Pop2PianoForConditionalGeneration
- forward
- generate
Pop2PianoTokenizer
[[autodoc]] Pop2PianoTokenizer
- call
Pop2PianoProcessor
[[autodoc]] ... |
[
0.020461101,
-0.014717892,
-0.011207337,
-0.0018085234,
0.03196221,
-0.022267789,
0.028760113,
-0.000006956963,
-0.024500443,
0.060105402,
-0.01088419,
-0.024456378,
0.05105728,
-0.05323118,
-0.027775982,
-0.0072340937,
0.014615072,
-0.056051373,
-0.062396813,
0.023883525,
0.... | ConvNeXt V2 architecture. Taken from the original paper.
This model was contributed by adirik. The original code can be found here.
Resources
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ConvNeXt V2.
[ConvNextV2ForImageClassification] is supported by this examp... |
[
0.015672175,
-0.01024464,
-0.019308226,
0.012998219,
0.0034635377,
-0.023753764,
-0.012255084,
0.047029797,
-0.0046047796,
0.056053575,
0.030123487,
0.00018412484,
0.067041345,
-0.04044775,
-0.030176569,
0.01644185,
0.020117713,
-0.04503926,
-0.04400418,
-0.027894083,
0.01480... |
If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
ConvNextV2Config
[[autodoc]] ConvNextV2Config
ConvNextV2Model
[[autodoc]] ConvNextV2Model
... |
[
0.014411545,
-0.020225737,
-0.014786883,
-0.009517994,
0.017676273,
-0.009008101,
0.0008927545,
-0.0071101678,
-0.014687737,
0.05509672,
0.017633783,
-0.014496528,
0.0575612,
-0.033964507,
-0.028100744,
0.0012747312,
0.0015721685,
-0.020211574,
-0.040649764,
-0.012754395,
0.0... |
ConvNeXt V2
Overview
The ConvNeXt V2 model was proposed in ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders by Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon, Saining Xie.
ConvNeXt V2 is a pure convolutional model (ConvNet), inspired by the design of Vision Tra... |
[
0.04332291,
-0.014233863,
-0.036968503,
-0.04289928,
-0.02855245,
-0.006417947,
0.016535569,
0.021477882,
0.005422424,
0.08048911,
0.019797496,
-0.02855245,
0.07116932,
-0.015434139,
-0.006650942,
-0.0092774285,
0.0011296717,
-0.07376756,
-0.07794734,
0.04634478,
0.022296894,... | Donut high-level overview. Taken from the original paper.
This model was contributed by nielsr. The original code can be found
here.
Usage tips
The quickest way to get started with Donut is by checking the tutorial
notebooks, which show how to use the model
at inference time as well as fine-tuning on custom data.... |
[
0.016396109,
-0.028043699,
-0.013480605,
-0.011402224,
0.00610885,
-0.015111555,
0.026196249,
-0.00502636,
-0.0013422872,
0.0942199,
0.017262101,
-0.0017951287,
0.04327072,
-0.01120016,
-0.004384083,
-0.00589596,
-0.0071552563,
-0.028303497,
-0.07245464,
0.0120878015,
-0.0082... |
Donut
Overview
The Donut model was proposed in OCR-free Document Understanding Transformer by
Geewook Kim, Teakgyu Hong, Moonbin Yim, Jeongyeon Nam, Jinyoung Park, Jinyeong Yim, Wonseok Hwang, Sangdoo Yun, Dongyoon Han, Seunghyun Park.
Donut consists of an image Transformer encoder and an autoregressive text Transform... |
[
0.014303787,
-0.021689402,
-0.005023225,
-0.014613019,
-0.003507628,
-0.03339708,
-0.028276768,
0.0068786186,
0.009600581,
0.07807034,
0.012189502,
-0.022264719,
0.045622535,
-0.0037359565,
-0.015044506,
-0.0005986879,
-0.012117587,
-0.04743478,
-0.041566562,
0.0010184885,
0.... |
Inference examples
Donut's [VisionEncoderDecoder] model accepts images as input and makes use of
[~generation.GenerationMixin.generate] to autoregressively generate text given the input image.
The [DonutImageProcessor] class is responsible for preprocessing the input image and
[XLMRobertaTokenizer/XLMRobertaTokenizer... |
[
0.024992226,
-0.0005387055,
0.035985835,
-0.035614848,
0.009515842,
0.005864702,
0.005128909,
-0.023162017,
0.002075987,
0.036307357,
0.004859943,
0.015532031,
0.022395309,
-0.007506324,
-0.018363906,
0.00058739766,
-0.013899684,
-0.013961515,
-0.046051975,
-0.04031403,
-0.00... | Step-by-step Document Image Classification |
[
0.037925776,
0.00872498,
0.015860103,
-0.010019944,
-0.0017212763,
0.024758171,
0.00926989,
-0.026565993,
0.021898994,
0.04815727,
0.010417408,
0.017424317,
-0.008103141,
-0.050157417,
-0.029643135,
-0.008628819,
-0.018334638,
-0.033899847,
-0.03956692,
-0.041413203,
-0.01245... | Step-by-step Document Parsing |
[
0.020549763,
-0.017124804,
-0.014933409,
-0.004502517,
-0.00564538,
0.0009002313,
-0.0003678023,
-0.006875318,
-0.021507591,
0.05491547,
0.0241779,
0.0018566988,
0.06484205,
-0.036020137,
-0.014918896,
0.0032979758,
-0.020390125,
-0.0646679,
-0.08608842,
-0.005561933,
0.00637... |
import re
from transformers import DonutProcessor, VisionEncoderDecoderModel
from datasets import load_dataset
import torch
processor = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-rvlcdip")
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-rvlcdip")
device ... |
[
0.035343416,
0.008433115,
-0.00073377864,
-0.0053912136,
-0.0000127882095,
0.008994509,
-0.006816056,
-0.0073896544,
0.010434607,
0.04820666,
-0.009507086,
0.026483154,
0.011276698,
-0.016292632,
-0.027679168,
0.009049428,
-0.011063124,
-0.027435083,
-0.031755377,
-0.034879655,... | Step-by-step Document Visual Question Answering (DocVQA) |
[
0.019792564,
-0.01353419,
-0.017508807,
-0.00221239,
-0.010840528,
-0.009720609,
0.00043277934,
-0.011001562,
-0.0117262155,
0.05475162,
0.026321769,
0.0051018554,
0.057884466,
-0.029952357,
-0.031855486,
0.013746463,
-0.017069623,
-0.064179435,
-0.08280084,
-0.0038501807,
0.... |
import re
from transformers import DonutProcessor, VisionEncoderDecoderModel
from datasets import load_dataset
import torch
processor = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-cord-v2")
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-cord-v2")
device ... |
[
0.021170745,
-0.017947517,
-0.0073987725,
0.003422848,
-0.0008341933,
-0.011706177,
-0.006699186,
-0.006933602,
-0.019764246,
0.057666473,
0.013654765,
0.005919018,
0.060713887,
-0.02858417,
-0.015471493,
0.012453379,
-0.012936864,
-0.05977622,
-0.077533275,
0.00033262427,
-0... |
import re
from transformers import DonutProcessor, VisionEncoderDecoderModel
from datasets import load_dataset
import torch
processor = DonutProcessor.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
model = VisionEncoderDecoderModel.from_pretrained("naver-clova-ix/donut-base-finetuned-docvqa")
device = ... |
[
0.019390607,
0.0010835599,
-0.020759705,
0.005398268,
-0.010119427,
0.008534546,
0.016548239,
-0.04041818,
-0.014613642,
0.04032889,
0.009449759,
-0.005610329,
0.006317201,
-0.028051646,
-0.060151063,
-0.0059600445,
0.00007248923,
-0.031965483,
-0.02849809,
-0.025268804,
0.02... |
mLUKE
Overview
The mLUKE model was proposed in mLUKE: The Power of Entity Representations in Multilingual Pretrained Language Models by Ryokan Ri, Ikuya Yamada, and Yoshimasa Tsuruoka. It's a multilingual extension
of the LUKE model trained on the basis of XLM-RoBERTa.
It is based on XLM-RoBERTa and adds entity embedd... |
[
0.020151457,
-0.023013547,
-0.02232723,
-0.014617108,
-0.027554927,
0.0086592855,
0.0069799973,
-0.004052195,
-0.00623527,
0.023816686,
-0.010104934,
0.021494888,
0.0096084485,
-0.011791523,
-0.03235915,
0.06565286,
-0.020414302,
-0.03487078,
-0.045968685,
-0.010010017,
-0.00... | Note that mLUKE has its own tokenizer, [MLukeTokenizer]. You can initialize it as follows:
thon
from transformers import MLukeTokenizer
tokenizer = MLukeTokenizer.from_pretrained("studio-ousia/mluke-base")
As mLUKE's architecture is equivalent to that of LUKE, one can refer to LUKE's documentation page for all
tips, c... |
[
0.019100644,
-0.022147287,
-0.022759398,
0.00776268,
-0.020700479,
-0.023482803,
-0.000017443857,
0.03338787,
0.00045038847,
0.07011453,
-0.023232393,
0.026710296,
0.06210144,
-0.015135835,
-0.019990988,
0.03597543,
-0.003943942,
-0.022286404,
-0.06861208,
0.038173467,
0.0173... | See the model hub to look for Donut checkpoints.
Training
We refer to the tutorial notebooks.
DonutSwinConfig
[[autodoc]] DonutSwinConfig
DonutImageProcessor
[[autodoc]] DonutImageProcessor
- preprocess
DonutFeatureExtractor
[[autodoc]] DonutFeatureExtractor
- call
DonutProcessor
[[autodoc]] DonutProcessor
... |
[
0.03679775,
-0.030392986,
-0.01995559,
0.00953302,
0.032172088,
0.018087532,
-0.005544867,
-0.00072276004,
-0.016308432,
0.07205362,
0.0012277655,
-0.02766503,
0.039644316,
-0.06078597,
0.011482619,
0.028495278,
-0.019792506,
-0.026419658,
-0.03199418,
-0.015070474,
0.0206227... |
QDQBERT model adds fake quantization operations (pair of QuantizeLinear/DequantizeLinear ops) to (i) linear layer
inputs and weights, (ii) matmul inputs, (iii) residual add inputs, in BERT model.
QDQBERT requires the dependency of Pytorch Quantization Toolkit. To install pip install pytorch-quantization --extra-ind... |
[
0.026403332,
-0.024657657,
-0.018402323,
-0.010859553,
-0.000044721553,
0.010292208,
0.026490616,
-0.0068117687,
-0.017791336,
0.08827296,
0.016671196,
-0.028498141,
0.0063680764,
-0.023988482,
0.0012901628,
0.013630811,
0.0025166813,
-0.060982242,
-0.043961912,
-0.011165045,
... |
QDQBERT
Overview
The QDQBERT model can be referenced in Integer Quantization for Deep Learning Inference: Principles and Empirical
Evaluation by Hao Wu, Patrick Judd, Xiaojie Zhang, Mikhail Isaev and Paulius
Micikevicius.
The abstract from the paper is the following:
Quantization techniques can reduce the size of Deep... |
[
-0.0065657767,
-0.027130615,
-0.009339704,
0.021967543,
0.040744897,
0.011375549,
-0.026766822,
0.008668085,
-0.02960721,
0.06760966,
0.013334438,
-0.044270895,
0.037582688,
-0.015223367,
-0.0010196718,
0.005292499,
-0.03828229,
-0.055968262,
-0.05073523,
0.009759466,
0.02083... | Set default quantizers
QDQBERT model adds fake quantization operations (pair of QuantizeLinear/DequantizeLinear ops) to BERT by
TensorQuantizer in Pytorch Quantization Toolkit. TensorQuantizer is the module
for quantizing tensors, with QuantDescriptor defining how the tensor should be quantized. Refer to Pytorch
Quanti... |
[
0.014475065,
-0.014836247,
-0.0042334707,
0.019351022,
-0.000073799216,
0.00054307544,
-0.0060115973,
-0.008862852,
-0.033284314,
0.05856706,
0.018600876,
-0.03781298,
0.015364129,
-0.042452782,
-0.025185503,
0.047037017,
-0.046592485,
-0.03822973,
-0.062067747,
-0.0034069193,
... | import pytorch_quantization.nn as quant_nn
from pytorch_quantization.tensor_quant import QuantDescriptor
The default tensor quantizer is set to use Max calibration method
input_desc = QuantDescriptor(num_bits=8, calib_method="max")
The default tensor quantizer is set to be per-channel quantization for weights
weight_de... |
[
0.012637056,
0.016799772,
0.013483137,
0.036848493,
-0.011702984,
-0.009685928,
0.025869753,
-0.017517248,
-0.03341002,
0.04862593,
0.01759847,
-0.020075794,
0.021808567,
-0.027196407,
-0.019033425,
0.034547154,
-0.046514113,
-0.037796102,
-0.056585856,
0.003864895,
-0.015879... | Calibration
Calibration is the terminology of passing data samples to the quantizer and deciding the best scaling factors for
tensors. After setting up the tensor quantizers, one can use the following example to calibrate the model:
thon
Find the TensorQuantizer and enable calibration
for name, module in model.named_m... |
[
0.032731783,
-0.027252454,
-0.041210327,
0.024974206,
0.037547827,
-0.0027775154,
-0.038816724,
0.003280388,
0.033481587,
0.05834044,
0.017980853,
0.0024314525,
0.04296948,
-0.028881835,
-0.026675683,
0.026041234,
0.002341332,
-0.0057208524,
-0.055946838,
0.019523716,
0.01016... | Export to ONNX
The goal of exporting to ONNX is to deploy inference by TensorRT. Fake
quantization will be broken into a pair of QuantizeLinear/DequantizeLinear ONNX ops. After setting static member of
TensorQuantizer to use Pytorch’s own fake quantization functions, fake quantized model can be exported to ONNX, follow... |
[
0.032023806,
-0.022163989,
-0.024484754,
0.029167479,
0.021958003,
-0.008651371,
-0.0049093096,
-0.017961895,
0.029222408,
0.031419583,
0.028618187,
-0.026997771,
0.038889974,
-0.051633578,
-0.013752934,
0.019692168,
-0.031007612,
-0.027093897,
-0.058609605,
-0.0105738975,
-0... | from pytorch_quantization.nn import TensorQuantizer
TensorQuantizer.use_fb_fake_quant = True
Load the calibrated model
ONNX export
torch.onnx.export()
Resources
Text classification task guide
Token classification task guide
Question answering task guide
Causal language modeling task guide
Masked language modeling ta... |
[
0.013771936,
-0.004888345,
-0.0052164216,
0.03411999,
-0.0005937279,
-0.0029016573,
0.020938592,
-0.015908081,
-0.014515578,
0.016272612,
-0.006098584,
-0.0029545142,
0.00904763,
-0.050567575,
-0.021492679,
0.038027752,
-0.008238374,
-0.058412258,
-0.0899368,
0.0018609248,
0.... | Finalize calibration
for name, module in model.named_modules():
if name.endswith("_input_quantizer"):
module.load_calib_amax()
module.enable_quant()
If running on GPU, it needs to call .cuda() again because new tensors will be created by calibration process
model.cuda()
Keep running the quantized... |
[
-0.0023000243,
-0.043213397,
-0.01726371,
0.0043396046,
-0.0020209772,
0.022310235,
-0.004468135,
0.02333848,
0.011953361,
0.07619845,
0.03766628,
0.022851417,
0.036205087,
-0.0003813643,
-0.030225024,
0.04432282,
-0.042969864,
-0.04459341,
-0.056174707,
-0.02822265,
0.004779... |
QDQBertConfig
[[autodoc]] QDQBertConfig
QDQBertModel
[[autodoc]] QDQBertModel
- forward
QDQBertLMHeadModel
[[autodoc]] QDQBertLMHeadModel
- forward
QDQBertForMaskedLM
[[autodoc]] QDQBertForMaskedLM
- forward
QDQBertForSequenceClassification
[[autodoc]] QDQBertForSequenceClassification
- forward
QDQBer... |
[
0.016675938,
-0.003849386,
-0.015440157,
0.013281092,
0.020127602,
-0.024758227,
-0.023806535,
-0.03579503,
-0.014069435,
0.05286869,
-0.004978634,
-0.026121847,
0.058294762,
-0.03985748,
0.00345699,
-0.036107525,
-0.014467157,
-0.036931377,
-0.057243638,
0.007180312,
0.03267... |
BertGeneration
Overview
The BertGeneration model is a BERT model that can be leveraged for sequence-to-sequence tasks using
[EncoderDecoderModel] as proposed in Leveraging Pre-trained Checkpoints for Sequence Generation
Tasks by Sascha Rothe, Shashi Narayan, Aliaksei Severyn.
The abstract from the paper is the followi... |
[
0.0066215186,
0.014551079,
-0.021494305,
0.0066498006,
-0.03572014,
-0.0058967927,
-0.008413889,
-0.027546648,
0.01370262,
0.022484174,
0.031760663,
0.009580521,
0.009955257,
-0.04856016,
-0.014650065,
-0.0021264513,
-0.017548969,
-0.005030657,
-0.09299115,
0.0021070074,
0.02... | Pretrained [EncoderDecoderModel] are also directly available in the model hub, e.g.:
thon |
[
0.024653127,
0.0200815,
-0.00555677,
-0.0023278834,
0.0003229763,
-0.022717899,
-0.000016337803,
0.012081154,
0.022717899,
0.043584708,
0.009150265,
-0.013911207,
0.034273174,
-0.025648788,
-0.0017020894,
-0.03581575,
0.0009947845,
-0.072416805,
-0.04582845,
0.014268803,
0.01... | Tips:
[BertGenerationEncoder] and [BertGenerationDecoder] should be used in
combination with [EncoderDecoder].
For summarization, sentence splitting, sentence fusion and translation, no special tokens are required for the input.
Therefore, no EOS token should be added to the end of the input. |
[
0.010323675,
-0.031893812,
-0.024352917,
0.029846381,
-0.032066837,
-0.028938012,
-0.011455531,
-0.003375741,
0.012666688,
0.031403583,
0.0018545849,
0.007065085,
0.008586242,
-0.049657457,
0.0003764591,
0.0067983423,
-0.014404123,
-0.041150518,
-0.05528069,
0.00016806612,
0.... | instantiate sentence fusion model
sentence_fuser = EncoderDecoderModel.from_pretrained("google/roberta2roberta_L-24_discofuse")
tokenizer = AutoTokenizer.from_pretrained("google/roberta2roberta_L-24_discofuse")
input_ids = tokenizer(
"This is the first sentence. This is the second sentence.", add_special_tokens=Fa... |
[
0.03473306,
-0.018225813,
0.011645526,
-0.0002086961,
0.004767505,
-0.030029627,
-0.006859177,
0.0022386543,
0.017758485,
0.058792945,
-0.005084082,
-0.013529914,
0.031356238,
-0.02387898,
0.01419322,
-0.01292691,
-0.010710868,
-0.044230383,
-0.065727495,
-0.010989758,
-0.002... |
leverage checkpoints for Bert2Bert model
use BERT's cls token as BOS token and sep token as EOS token
encoder = BertGenerationEncoder.from_pretrained("google-bert/bert-large-uncased", bos_token_id=101, eos_token_id=102)
add cross attention layers and use BERT's cls token as BOS token and sep token as EOS token
decode... |
[
-0.009477869,
-0.014425029,
0.0056795413,
0.015394357,
-0.002358697,
-0.04052507,
-0.0018255668,
-0.022445317,
0.023737753,
0.033746958,
0.03636055,
0.030759992,
0.013620847,
-0.0080633685,
0.0060062404,
0.05074968,
-0.021267764,
-0.01652883,
-0.033660796,
0.046269234,
-0.012... | Transformer XL |
[
0.014779824,
-0.01090012,
-0.0346798,
0.003549797,
0.0009311619,
0.0028503947,
0.00065362785,
0.014304758,
0.002845446,
0.02169467,
0.015479227,
-0.01004896,
0.03581468,
-0.016574517,
0.011131055,
-0.0051102564,
-0.009019651,
-0.037451018,
-0.06038614,
0.002014081,
-0.0084720... | BertGenerationConfig
[[autodoc]] BertGenerationConfig
BertGenerationTokenizer
[[autodoc]] BertGenerationTokenizer
- save_vocabulary
BertGenerationEncoder
[[autodoc]] BertGenerationEncoder
- forward
BertGenerationDecoder
[[autodoc]] BertGenerationDecoder
- forward |
[
0.046535645,
-0.031704422,
-0.038958825,
-0.0017565056,
0.023146914,
0.005672539,
0.012990752,
-0.013998308,
0.019103257,
0.012842977,
-0.00041540686,
0.0038656557,
0.048980646,
-0.032806017,
-0.006784209,
0.049679216,
0.007952973,
-0.03406882,
-0.04352641,
0.0019479411,
0.02... | If you run into any issues running this model, please reinstall the last version that supported this model: v4.35.0.
You can do so by running the following command: pip install -U transformers==4.35.0. |
[
0.022975154,
-0.004781498,
-0.021207834,
0.044482533,
-0.036814164,
-0.007675858,
0.019710107,
-0.02767802,
0.022181358,
0.05023381,
0.013120101,
-0.0014134812,
0.04373367,
-0.034567572,
-0.031062888,
0.029699955,
0.02315488,
-0.0038903495,
-0.03939026,
0.008072756,
0.0015538... |
This model is in maintenance mode only, so we won't accept any new PRs changing its code. This model was deprecated due to security issues linked to pickle.load.
We recommend switching to more recent models for improved security.
In case you would still like to use TransfoXL in your experiments, we recommend using th... |
[
0.029110165,
-0.00040417505,
0.0080156205,
0.017683316,
0.010065417,
-0.013438403,
0.011801625,
-0.033592183,
-0.018264601,
0.044850763,
0.013308378,
0.024046862,
0.0135301845,
-0.007931488,
-0.0074266866,
0.015319931,
-0.019060045,
-0.02680032,
-0.028345315,
0.013759639,
-0.... |
Transformer-XL uses relative sinusoidal positional embeddings. Padding can be done on the left or on the right. The
original implementation trains on SQuAD with padding on the left, therefore the padding defaults are set to left.
Transformer-XL is one of the few models that has no sequence length limit.
Same as a r... |
[
0.015178686,
-0.016886633,
-0.013353663,
0.023828609,
0.034021195,
0.0028339517,
-0.0011914305,
-0.040109195,
0.029530946,
0.04666551,
0.028236212,
-0.031459272,
0.032864198,
-0.047574576,
0.004758835,
0.0042009978,
-0.0052168127,
-0.044461705,
-0.030908324,
-0.0026514493,
0.... | TransformerXL does not work with torch.nn.DataParallel due to a bug in PyTorch, see issue #36035
Resources
Text classification task guide
Causal language modeling task guide |
[
-0.0007474589,
-0.020351011,
-0.0019747145,
0.058582038,
-0.03248388,
-0.034677234,
0.033899844,
-0.014589981,
0.025723346,
0.03581556,
0.012354979,
0.03129003,
0.014992559,
-0.007489339,
-0.025862165,
0.025223594,
-0.0024762016,
-0.022530485,
-0.049170043,
0.012438271,
0.018... | TransfoXLConfig
[[autodoc]] TransfoXLConfig
TransfoXLTokenizer
[[autodoc]] TransfoXLTokenizer
- save_vocabulary
TransfoXL specific outputs
[[autodoc]] models.deprecated.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput
[[autodoc]] models.deprecated.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput
[[autod... |
[
-0.017900476,
-0.02811141,
-0.025896488,
0.024461662,
0.02015719,
-0.0075711356,
0.0057985005,
-0.0065855645,
0.017398985,
0.07327355,
0.012258692,
0.034742247,
0.044716366,
-0.013721377,
-0.045412883,
0.054188993,
-0.0077452646,
-0.04825467,
-0.010796008,
0.0038238761,
-0.00... | TransfoXLModel
[[autodoc]] TransfoXLModel
- forward
TransfoXLLMHeadModel
[[autodoc]] TransfoXLLMHeadModel
- forward
TransfoXLForSequenceClassification
[[autodoc]] TransfoXLForSequenceClassification
- forward
TFTransfoXLModel
[[autodoc]] TFTransfoXLModel
- call
TFTransfoXLLMHeadModel
[[autodoc]] TFTrans... |
[
0.02154039,
0.008024607,
-0.02167767,
-0.0240863,
-0.020666795,
0.0027877083,
-0.025134616,
0.0063117337,
-0.004027903,
0.032972023,
0.016111612,
0.0126234675,
0.005581657,
-0.032223225,
-0.01432698,
0.004536461,
-0.027081488,
-0.011013554,
-0.02165271,
-0.054811932,
-0.00450... | Internal Layers
[[autodoc]] AdaptiveEmbedding
[[autodoc]] TFAdaptiveEmbedding |
[
0.028546937,
0.0030658569,
-0.020463234,
0.023177152,
0.012321479,
-0.016922079,
-0.0011646628,
-0.04440957,
-0.015906174,
0.053262457,
0.019635996,
-0.0043683923,
0.0069625787,
-0.03738531,
0.007648315,
0.0034232377,
-0.0021152599,
-0.020506773,
-0.052304607,
-0.0015810025,
... |
Overview
The Transformer-XL model was proposed in Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context by Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan
Salakhutdinov. It's a causal (uni-directional) transformer with relative positioning (sinusoïdal) embeddings which can
... |
[
0.030898249,
-0.007149852,
-0.025907341,
-0.011297598,
-0.04195386,
-0.04083469,
-0.036297504,
-0.01665148,
-0.0076943142,
0.06618244,
0.017558917,
-0.008454293,
0.029506844,
-0.010987557,
-0.00082283793,
0.012205035,
0.024273954,
0.031881306,
-0.029007753,
-0.026648415,
0.02... |
DETA
Overview
The DETA model was proposed in NMS Strikes Back by Jeffrey Ouyang-Zhang, Jang Hyun Cho, Xingyi Zhou, Philipp Krähenbühl.
DETA (short for Detection Transformers with Assignment) improves Deformable DETR by replacing the one-to-one bipartite Hungarian matching loss
with one-to-many label assignments used i... |
[
0.02569258,
-0.027587391,
-0.012117516,
-0.014363464,
-0.060898967,
-0.030979501,
-0.03998979,
0.02691162,
0.0009200766,
0.0741494,
0.008115888,
0.0031834154,
0.039512776,
-0.0056380574,
-0.008109262,
0.028594425,
0.03739271,
-0.009056668,
-0.049768608,
-0.033205573,
0.001583... | If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
DetaConfig
[[autodoc]] DetaConfig
DetaImageProcessor
[[autodoc]] DetaImageProcessor
- pre... |
[
0.034923468,
0.011097249,
0.014523089,
-0.012118041,
-0.025303274,
-0.051070545,
-0.025829136,
0.023339022,
-0.018250527,
0.050513748,
-0.02446808,
0.008777266,
-0.012945501,
-0.036222655,
-0.0098212585,
0.01129058,
-0.001932352,
-0.0396253,
-0.07417757,
-0.03575866,
0.045842... |
Starcoder2
Overview
StarCoder2 is a family of open LLMs for code and comes in 3 different sizes with 3B, 7B and 15B parameters. The flagship StarCoder2-15B model is trained on over 4 trillion tokens and 600+ programming languages from The Stack v2. All models use Grouped Query Attention, a context window of 16,384 tok... |
[
0.03548722,
-0.0037330803,
-0.013131118,
-0.053824164,
-0.024468098,
-0.03958407,
0.013018102,
0.017729482,
-0.012629608,
0.05283527,
-0.016811222,
-0.005315313,
0.02189697,
-0.04195742,
0.013441915,
0.009549905,
0.034583084,
-0.032548785,
-0.049699057,
-0.0020166403,
0.00843... | DETA overview. Taken from the original paper.
This model was contributed by nielsr.
The original code can be found here.
Resources
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DETA.
Demo notebooks for DETA can be found here.
See also: Object detection task gui... |
[
0.045396414,
0.014007956,
-0.0017457468,
-0.013308258,
-0.026042763,
-0.045648303,
0.0115939975,
-0.015015521,
-0.005328201,
0.025329072,
-0.007297851,
0.00087943306,
-0.0004443083,
-0.048195206,
-0.00031289624,
0.0043941042,
-0.0010460487,
-0.024839282,
-0.088385865,
-0.007367... |
The BigCode project, an open-scientific collaboration focused on the responsible development of Large Language Models for Code (Code LLMs), introduces StarCoder2. In partnership with Software Heritage (SWH), we build The Stack v2 on top of the digital commons of their source code archive. Alongside the SWH repositori... |
[
0.045761667,
-0.007605153,
-0.016111013,
-0.041403413,
0.005110053,
-0.045151513,
-0.006119715,
-0.005135476,
0.0069114645,
0.03126321,
-0.033064622,
0.00015889468,
0.027151924,
-0.07780936,
0.030623998,
0.05738368,
0.0070930584,
-0.04195546,
-0.07583362,
0.011912561,
0.04791... | License
The models are licensed under the BigCode OpenRAIL-M v1 license agreement.
Usage tips
The StarCoder2 models can be found in the HuggingFace hub. You can find some examples for inference and fine-tuning in StarCoder2's GitHub repo.
These ready-to-use checkpoints can be downloaded and used via the HuggingFace Hub... |
[
0.006796133,
0.021235246,
0.0056361645,
-0.0026437312,
-0.023725975,
-0.03279223,
-0.004067005,
0.0027878378,
-0.021519901,
0.039766274,
0.002597475,
-0.014090411,
-0.004814224,
-0.06888646,
-0.012176109,
0.030998906,
-0.009037789,
-0.050241567,
-0.057557195,
-0.014069063,
0.... |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder2-7b", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder2-7b")
prompt = "def print_hello_world():"
model_inputs = tokenizer([prompt], return_tensors="pt").to("cuda"... |
[
-0.0030306256,
-0.002749524,
-0.037358392,
0.00022081842,
-0.041518692,
-0.02988109,
0.04657852,
0.019100849,
0.013612341,
-0.0006482904,
0.016908256,
-0.009353653,
-0.0026019458,
-0.017512623,
-0.021982139,
0.0038440633,
-0.0019044627,
-0.023992013,
-0.028433418,
-0.007821649,... | ELECTRA |
[
-0.0043819924,
-0.0033603194,
0.012572346,
-0.023189597,
-0.020134762,
-0.020949384,
-0.0013135794,
0.013821435,
-0.014201592,
0.072718665,
0.015097677,
-0.00037485381,
0.007331606,
-0.0444241,
0.0014832924,
0.036223564,
-0.006791918,
-0.04705805,
-0.06212857,
-0.017174965,
0... | Starcoder2Config
[[autodoc]] Starcoder2Config
Starcoder2Model
[[autodoc]] Starcoder2Model
- forward
Starcoder2ForCausalLM
[[autodoc]] Starcoder2ForCausalLM
- forward
Starcoder2ForSequenceClassification
[[autodoc]] Starcoder2ForSequenceClassification
- forward |
[
0.034599945,
0.0020468237,
-0.018570416,
-0.017064705,
-0.023479655,
-0.025001049,
0.01539431,
-0.007889289,
-0.03328245,
-0.0035446908,
0.026914556,
-0.009489106,
0.025502952,
-0.04764943,
-0.010516439,
0.023197334,
-0.009904744,
-0.0041210954,
-0.04008951,
0.014280712,
0.00... |
ELECTRA is the pretraining approach, therefore there is nearly no changes done to the underlying model: BERT. The
only change is the separation of the embedding size and the hidden size: the embedding size is generally smaller,
while the hidden size is larger. An additional projection layer (linear) is used to pr... |
[
0.042752225,
-0.007046583,
-0.048247673,
0.008582945,
-0.016944299,
-0.03619314,
0.00096853584,
-0.022336338,
-0.016752254,
0.030756783,
0.033268142,
0.0030025535,
0.011559646,
-0.044111315,
-0.018731797,
-0.0042767,
-0.010481238,
-0.034479506,
-0.04647495,
-0.018318161,
0.02... |
Overview
The ELECTRA model was proposed in the paper ELECTRA: Pre-training Text Encoders as Discriminators Rather Than
Generators. ELECTRA is a new pretraining approach which trains two
transformer models: the generator and the discriminator. The generator's role is to replace tokens in a sequence, and
is therefore t... |
[
-0.00070179725,
-0.010901959,
-0.0502745,
0.00828758,
-0.025607837,
-0.022745093,
-0.006947711,
0.0029019602,
-0.010424835,
0.02265359,
-0.004633986,
-0.008196076,
0.026052281,
-0.065725476,
-0.020065356,
0.015908493,
-0.045359466,
-0.033333328,
-0.067712404,
-0.028836595,
-0... | Text classification task guide
Token classification task guide
Question answering task guide
Causal language modeling task guide
Masked language modeling task guide
Multiple choice task guide
ElectraConfig
[[autodoc]] ElectraConfig
ElectraTokenizer
[[autodoc]] ElectraTokenizer
ElectraTokenizerFast
[[autodoc]] ElectraT... |
[
0.021749653,
-0.007290311,
-0.03557564,
0.0066973837,
-0.0022874866,
-0.011474491,
-0.006016865,
-0.022733374,
-0.009459886,
0.047272477,
-0.0014907406,
-0.0059966515,
0.024727765,
-0.050910898,
0.011036534,
-0.004521071,
-0.027948437,
-0.019243186,
-0.050695285,
-0.03754308,
... | Resources
Text classification task guide
Token classification task guide
Question answering task guide
Causal language modeling task guide
Masked language modeling task guide
Multiple choice task guide |
[
0.013631937,
-0.009422373,
-0.0090224305,
0.013401462,
-0.05344316,
-0.012811717,
-0.0071108416,
0.0061414894,
-0.01583501,
0.04482067,
0.021542665,
0.021068156,
0.023142435,
-0.028226448,
-0.04498336,
0.030802349,
-0.014818207,
-0.036225297,
-0.056778274,
-0.00510774,
0.0351... |
ElectraModel
[[autodoc]] ElectraModel
- forward
ElectraForPreTraining
[[autodoc]] ElectraForPreTraining
- forward
ElectraForCausalLM
[[autodoc]] ElectraForCausalLM
- forward
ElectraForMaskedLM
[[autodoc]] ElectraForMaskedLM
- forward
ElectraForSequenceClassification
[[autodoc]] ElectraForSequenceClass... |
[
0.016732175,
-0.033784583,
-0.006438018,
0.010721134,
-0.037120342,
-0.031809814,
-0.0055373623,
0.015184382,
-0.013796706,
0.028313935,
0.01842674,
0.040669594,
0.042644363,
-0.019107236,
-0.059243105,
0.023470411,
-0.008052526,
-0.050890364,
-0.042164013,
-0.011374944,
0.01... |
TFElectraModel
[[autodoc]] TFElectraModel
- call
TFElectraForPreTraining
[[autodoc]] TFElectraForPreTraining
- call
TFElectraForMaskedLM
[[autodoc]] TFElectraForMaskedLM
- call
TFElectraForSequenceClassification
[[autodoc]] TFElectraForSequenceClassification
- call
TFElectraForMultipleChoice
[[autodoc... |
[
0.013893981,
-0.026064998,
0.0045727463,
0.020138003,
-0.028339311,
-0.030186327,
-0.014266142,
0.040303573,
0.0014231682,
0.040965192,
0.036196027,
0.034321442,
0.028366879,
-0.007870499,
-0.046340838,
0.03294307,
-0.00012685322,
-0.04341869,
-0.037932772,
0.022798259,
0.049... |
FlaxElectraModel
[[autodoc]] FlaxElectraModel
- call
FlaxElectraForPreTraining
[[autodoc]] FlaxElectraForPreTraining
- call
FlaxElectraForCausalLM
[[autodoc]] FlaxElectraForCausalLM
- call
FlaxElectraForMaskedLM
[[autodoc]] FlaxElectraForMaskedLM
- call
FlaxElectraForSequenceClassification
[[autodoc]]... |
[
0.026954206,
0.0036578607,
-0.0011901833,
0.0067238463,
0.035174284,
-0.00689663,
-0.023807343,
-0.035880122,
-0.027130665,
0.03302736,
0.014660853,
-0.0139256045,
0.02199863,
-0.08017148,
-0.028586457,
-0.017234223,
-0.03140981,
-0.013035954,
-0.046232417,
-0.0016368467,
0.0... |
RoBERTa-PreLayerNorm
Overview
The RoBERTa-PreLayerNorm model was proposed in fairseq: A Fast, Extensible Toolkit for Sequence Modeling by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
It is identical to using the --encoder-normalize-before flag in fairseq.
The... |
[
0.012730542,
0.021847252,
-0.025146242,
-0.010731984,
0.011738108,
-0.024872467,
-0.027637595,
-0.0122925015,
-0.05001871,
0.030635433,
0.02307924,
0.007453527,
0.0013611756,
-0.07178383,
-0.024776647,
-0.026638316,
-0.048293926,
-0.021847252,
-0.032579236,
-0.006584291,
0.00... | The implementation is the same as Roberta except instead of using Add and Norm it does Norm and Add. Add and Norm refers to the Addition and LayerNormalization as described in Attention Is All You Need.
This is identical to using the --encoder-normalize-before flag in fairseq.
Resources
Text classification task guide... |
[
-0.0014751442,
-0.012368517,
-0.009172372,
-0.013377163,
-0.012381125,
-0.00927954,
-0.014499281,
-0.014184079,
-0.03038545,
0.030864555,
0.019302955,
0.015318805,
0.023451012,
-0.052298278,
-0.0091156345,
-0.013604108,
-0.06581413,
-0.019945968,
-0.05572767,
-0.03429395,
-0.... | Text classification task guide
Token classification task guide
Question answering task guide
Causal language modeling task guide
Masked language modeling task guide
Multiple choice task guide
RobertaPreLayerNormConfig
[[autodoc]] RobertaPreLayerNormConfig |
[
-0.008075049,
-0.0032596528,
-0.004306917,
0.009294051,
0.00025718592,
0.010479379,
-0.01833218,
-0.0025238737,
-0.029983416,
0.039843194,
0.03855011,
0.022238374,
0.018857496,
-0.034805547,
-0.02801685,
0.000085079715,
-0.021053046,
-0.035883117,
-0.01975996,
-0.03736478,
0.... |
RobertaPreLayerNormModel
[[autodoc]] RobertaPreLayerNormModel
- forward
RobertaPreLayerNormForCausalLM
[[autodoc]] RobertaPreLayerNormForCausalLM
- forward
RobertaPreLayerNormForMaskedLM
[[autodoc]] RobertaPreLayerNormForMaskedLM
- forward
RobertaPreLayerNormForSequenceClassification
[[autodoc]] RobertaPr... |
[
0.0020423767,
-0.021482518,
0.010266043,
0.019399958,
0.012509339,
-0.0018519412,
-0.015835844,
0.010867051,
-0.019218257,
0.048807386,
0.04416705,
0.03292961,
0.03863219,
-0.006244187,
-0.036004532,
0.0379613,
-0.009811794,
-0.020028919,
-0.02233511,
-0.011684701,
0.01730342... |
TFRobertaPreLayerNormModel
[[autodoc]] TFRobertaPreLayerNormModel
- call
TFRobertaPreLayerNormForCausalLM
[[autodoc]] TFRobertaPreLayerNormForCausalLM
- call
TFRobertaPreLayerNormForMaskedLM
[[autodoc]] TFRobertaPreLayerNormForMaskedLM
- call
TFRobertaPreLayerNormForSequenceClassification
[[autodoc]] TFRo... |
[
0.013551684,
0.0061582047,
-0.036011875,
-0.022976099,
0.0052135834,
0.013849603,
-0.012003958,
-0.0032353282,
0.033425063,
0.055049628,
0.02133391,
0.0017811563,
0.0521431,
-0.049149375,
-0.00095642917,
0.011248261,
0.005137287,
-0.031535823,
-0.036767572,
-0.006648681,
0.02... |
MobileViTV2
Overview
The MobileViTV2 model was proposed in Separable Self-attention for Mobile Vision Transformers by Sachin Mehta and Mohammad Rastegari.
MobileViTV2 is the second version of MobileViT, constructed by replacing the multi-headed self-attention in MobileViT with separable self-attention.
The abstract fr... |
[
0.005749286,
-0.019321188,
-0.009062878,
-0.01640732,
0.013769896,
0.0027905894,
-0.023296004,
-0.008943334,
0.017318837,
0.059861314,
-0.0010245235,
-0.0017707354,
0.06778106,
-0.043962054,
-0.0020023505,
0.015929146,
-0.013119879,
-0.027106447,
-0.045575887,
-0.002863436,
0... |
MobileViTV2 is more like a CNN than a Transformer model. It does not work on sequence data but on batches of images. Unlike ViT, there are no embeddings. The backbone model outputs a feature map.
One can use [MobileViTImageProcessor] to prepare images for the model. Note that if you do your own preprocessing, the pre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.