modelId
stringlengths
4
112
sha
stringlengths
40
40
lastModified
stringlengths
24
24
tags
sequence
pipeline_tag
stringclasses
29 values
private
bool
1 class
author
stringlengths
2
38
config
null
id
stringlengths
4
112
downloads
float64
0
36.8M
likes
float64
0
712
library_name
stringclasses
17 values
__index_level_0__
int64
0
38.5k
readme
stringlengths
0
186k
indonesian-nlp/wav2vec2-indonesian-javanese-sundanese
9cc3f697a6a33259a3ebe8a8d975c3b3b19ad9bc
2022-05-07T17:19:01.000Z
[ "pytorch", "wav2vec2", "automatic-speech-recognition", "id", "dataset:mozilla-foundation/common_voice_7_0", "dataset:openslr", "dataset:magic_data", "dataset:titml", "transformers", "audio", "hf-asr-leaderboard", "jv", "robust-speech-event", "speech", "su", "license:apache-2.0", "model-index" ]
automatic-speech-recognition
false
indonesian-nlp
null
indonesian-nlp/wav2vec2-indonesian-javanese-sundanese
249
2
transformers
3,300
--- language: id datasets: - mozilla-foundation/common_voice_7_0 - openslr - magic_data - titml metrics: - wer tags: - audio - automatic-speech-recognition - hf-asr-leaderboard - id - jv - robust-speech-event - speech - su license: apache-2.0 model-index: - name: Wav2Vec2 Indonesian Javanese and Sundanese by Indonesian NLP results: - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Common Voice 6.1 type: common_voice args: id metrics: - name: Test WER type: wer value: 4.056 - name: Test CER type: cer value: 1.472 - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Common Voice 7 type: mozilla-foundation/common_voice_7_0 args: id metrics: - name: Test WER type: wer value: 4.492 - name: Test CER type: cer value: 1.577 - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Robust Speech Event - Dev Data type: speech-recognition-community-v2/dev_data args: id metrics: - name: Test WER type: wer value: 48.94 - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Robust Speech Event - Test Data type: speech-recognition-community-v2/eval_data args: id metrics: - name: Test WER type: wer value: 68.95 --- # Multilingual Speech Recognition for Indonesian Languages This is the model built for the project [Multilingual Speech Recognition for Indonesian Languages](https://github.com/indonesian-nlp/multilingual-asr). It is a fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) model on the [Indonesian Common Voice dataset](https://huggingface.co/datasets/common_voice), [High-quality TTS data for Javanese - SLR41](https://huggingface.co/datasets/openslr), and [High-quality TTS data for Sundanese - SLR44](https://huggingface.co/datasets/openslr) datasets. We also provide a [live demo](https://huggingface.co/spaces/indonesian-nlp/multilingual-asr) to test the model. When using this model, make sure that your speech input is sampled at 16kHz. ## Usage The model can be used directly (without a language model) as follows: ```python import torch import torchaudio from datasets import load_dataset from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor test_dataset = load_dataset("common_voice", "id", split="test[:2%]") processor = Wav2Vec2Processor.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese") model = Wav2Vec2ForCTC.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese") resampler = torchaudio.transforms.Resample(48_000, 16_000) # Preprocessing the datasets. # We need to read the aduio files as arrays def speech_file_to_array_fn(batch): speech_array, sampling_rate = torchaudio.load(batch["path"]) batch["speech"] = resampler(speech_array).squeeze().numpy() return batch test_dataset = test_dataset.map(speech_file_to_array_fn) inputs = processor(test_dataset[:2]["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) print("Prediction:", processor.batch_decode(predicted_ids)) print("Reference:", test_dataset[:2]["sentence"]) ``` ## Evaluation The model can be evaluated as follows on the Indonesian test data of Common Voice. ```python import torch import torchaudio from datasets import load_dataset, load_metric from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor import re test_dataset = load_dataset("common_voice", "id", split="test") wer = load_metric("wer") processor = Wav2Vec2Processor.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese") model = Wav2Vec2ForCTC.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese") model.to("cuda") chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\‘\'\”\�]' resampler = torchaudio.transforms.Resample(48_000, 16_000) # Preprocessing the datasets. # We need to read the audio files as arrays def speech_file_to_array_fn(batch): batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower() speech_array, sampling_rate = torchaudio.load(batch["path"]) batch["speech"] = resampler(speech_array).squeeze().numpy() 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("cuda"), attention_mask=inputs.attention_mask.to("cuda")).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) print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"]))) ``` **Test Result**: 11.57 % ## Training The Common Voice `train`, `validation`, and ... datasets were used for training as well as ... and ... # TODO The script used for training can be found [here](https://github.com/cahya-wirawan/indonesian-speech-recognition) (will be available soon)
nbroad/mt5-base-qgen
9b215a0483e7933191b85076edb65deb6c2e628c
2022-07-07T16:47:04.000Z
[ "pytorch", "tf", "jax", "tensorboard", "mt5", "text2text-generation", "en", "hi", "de", "ar", "bn", "fi", "ja", "zh", "id", "sw", "ta", "gr", "ru", "es", "th", "tr", "vi", "dataset:squad_v2", "dataset:tydiqa", "dataset:mlqa", "dataset:xquad", "dataset:germanquad", "transformers", "autotrain_compatible" ]
text2text-generation
false
nbroad
null
nbroad/mt5-base-qgen
249
1
transformers
3,301
--- datasets: - squad_v2 - tydiqa - mlqa - xquad - germanquad language: - en - hi - de - ar - bn - fi - ja - zh - id - sw - ta - gr - ru - es - th - tr - vi widget: - text: "Hugging Face has seen rapid growth in its popularity since the get-go. It is definitely doing the right things to attract more and more people to its platform, some of which are on the following lines: Community driven approach through large open source repositories along with paid services. Helps to build a network of like-minded people passionate about open source. Attractive price point. The subscription-based features, e.g.: Inference based API, starts at a price of $9/month." example_title: "English" - text: "A un año y tres días de que el balón ruede en el Al Bayt Stadium inaugurando el Mundial 2022, ya se han dibujado los primeros bocetos de la próxima Copa del Mundo.13 selecciones están colocadas en el mapa con la etiqueta de clasificadas y tienen asegurado pisar los verdes de Qatar en la primera fase final otoñal. Serbia, Dinamarca, España, Países Bajos, Suiza, Croacia, Francia, Inglaterra, Bélgica, Alemania, Brasil, Argentina y Qatar, como anfitriona, entrarán en el sorteo del 1 de abril de 2022 en Doha en el que 32 países serán repartidos en sus respectivos grupos. " example_title: "Spanish" --- # Multi-lingual Question Generating Model (mt5-base) Give the model a passage and it will generate a question about the passage. ## Trained on the following datasets: - [SQuAD (English)](https://rajpurkar.github.io/SQuAD-explorer/) - [TyDiQA-GoldP (Arabic, Bengali, Finnish, Japanese, Indonesian, Kiswahili, Korean, Russian, Telugu, Thai)](https://github.com/google-research-datasets/tydiqa) - [MLQA (Arabic, Chinese, English, German, Hindi, Spanish, Vietnames)](https://github.com/facebookresearch/MLQA) - [XQuAD (Arabic, Chinese, German, Greek, Hindi, Russian, Spanish, Thai, Turkish Vietnamese)](https://github.com/deepmind/xquad) - [GermanQuAD (German)](https://huggingface.co/datasets/deepset/germanquad) - [Persian QA (Persian)](https://www.kaggle.com/sajjadayobi360/persianqa) - [Bengali QA (Bengali)](https://www.kaggle.com/mayeesha/bengali-question-answering-dataset) - [chaii (Hindi, Tamil)](https://www.kaggle.com/c/chaii-hindi-and-tamil-question-answering/data) ## Training details I used [flax summarization script](https://github.com/huggingface/transformers/tree/master/examples/flax/summarization) and a TPU v3-8. Summarization expects a text column and a summary column. For question generation training, use the context column instead of text column and question instead of summary column. There is no guarantee that it will produce a question in the language of the passage, but it usually does. Lower resource languages will likely have lower quality questions. ## Using the model #### PyTorch version ```python from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("nbroad/mt5-base-qgen") model = AutoModelForSeq2SeqLM.from_pretrained("nbroad/mt5-base-qgen") text = "Hugging Face has seen rapid growth in its \ popularity since the get-go. It is definitely doing\ the right things to attract more and more people to \ its platform, some of which are on the following lines:\ Community driven approach through large open source repositories \ along with paid services. Helps to build a network of like-minded\ people passionate about open source. \ Attractive price point. The subscription-based features, e.g.: \ Inference based API, starts at a price of $9/month.\ " inputs = tokenizer(text, return_tensors="pt") output = model.generate(**inputs, max_length=40) tokenizer.decode(output[0], skip_special_tokens=True) # What is Hugging Face's price point? ``` Model trained on Cloud TPUs from Google's TPU Research Cloud (TRC)
HooshvareLab/bert-fa-base-uncased-clf-digimag
64b4c8039a9cf7efc6f1e10ac3770b6646064963
2021-05-18T20:48:44.000Z
[ "pytorch", "tf", "jax", "bert", "text-classification", "fa", "transformers", "license:apache-2.0" ]
text-classification
false
HooshvareLab
null
HooshvareLab/bert-fa-base-uncased-clf-digimag
248
null
transformers
3,302
--- language: fa license: apache-2.0 --- # ParsBERT (v2.0) A Transformer-based Model for Persian Language Understanding We reconstructed the vocabulary and fine-tuned the ParsBERT v1.1 on the new Persian corpora in order to provide some functionalities for using ParsBERT in other scopes! Please follow the [ParsBERT](https://github.com/hooshvare/parsbert) repo for the latest information about previous and current models. ## Persian Text Classification [DigiMag, Persian News] The task target is labeling texts in a supervised manner in both existing datasets `DigiMag` and `Persian News`. ### DigiMag A total of 8,515 articles scraped from [Digikala Online Magazine](https://www.digikala.com/mag/). This dataset includes seven different classes. 1. Video Games 2. Shopping Guide 3. Health Beauty 4. Science Technology 5. General 6. Art Cinema 7. Books Literature | Label | # | |:------------------:|:----:| | Video Games | 1967 | | Shopping Guide | 125 | | Health Beauty | 1610 | | Science Technology | 2772 | | General | 120 | | Art Cinema | 1667 | | Books Literature | 254 | **Download** You can download the dataset from [here](https://drive.google.com/uc?id=1YgrCYY-Z0h2z0-PfWVfOGt1Tv0JDI-qz) ## Results The following table summarizes the F1 score obtained by ParsBERT as compared to other models and architectures. | Dataset | ParsBERT v2 | ParsBERT v1 | mBERT | |:-----------------:|:-----------:|:-----------:|:-----:| | Digikala Magazine | 93.65* | 93.59 | 90.72 | ## How to use :hugs: | Task | Notebook | |---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Text Classification | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hooshvare/parsbert/blob/master/notebooks/Taaghche_Sentiment_Analysis.ipynb) | ### BibTeX entry and citation info Please cite in publications as the following: ```bibtex @article{ParsBERT, title={ParsBERT: Transformer-based Model for Persian Language Understanding}, author={Mehrdad Farahani, Mohammad Gharachorloo, Marzieh Farahani, Mohammad Manthouri}, journal={ArXiv}, year={2020}, volume={abs/2005.12515} } ``` ## Questions? Post a Github issue on the [ParsBERT Issues](https://github.com/hooshvare/parsbert/issues) repo.
Kayvane/distilvert-complaints-subproduct
316cf6cee7e5116790448d9354c12dfdddf9f99a
2022-02-02T12:13:48.000Z
[ "pytorch", "distilbert", "text-classification", "transformers" ]
text-classification
false
Kayvane
null
Kayvane/distilvert-complaints-subproduct
248
null
transformers
3,303
Entry not found
dominiqueblok/roberta-base-finetuned-ner
eeaf0b74f6fb7f04a819a1c342172eb05af2ba42
2021-09-20T16:02:48.000Z
[ "pytorch", "roberta", "token-classification", "dataset:conll2003", "transformers", "generated_from_trainer", "license:mit", "model-index", "autotrain_compatible" ]
token-classification
false
dominiqueblok
null
dominiqueblok/roberta-base-finetuned-ner
248
null
transformers
3,304
--- license: mit tags: - generated_from_trainer datasets: - conll2003 metrics: - precision - recall - f1 - accuracy model-index: - name: roberta-base-finetuned-ner results: - task: name: Token Classification type: token-classification dataset: name: conll2003 type: conll2003 args: conll2003 metrics: - name: Precision type: precision value: 0.9529566113766282 - name: Recall type: recall value: 0.9604268983755194 - name: F1 type: f1 value: 0.9566771720212616 - name: Accuracy type: accuracy value: 0.988938664048357 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # roberta-base-finetuned-ner This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the conll2003 dataset. It achieves the following results on the evaluation set: - Loss: 0.0492 - Precision: 0.9530 - Recall: 0.9604 - F1: 0.9567 - Accuracy: 0.9889 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:| | 0.2031 | 1.0 | 878 | 0.0560 | 0.9381 | 0.9445 | 0.9413 | 0.9858 | | 0.0446 | 2.0 | 1756 | 0.0480 | 0.9510 | 0.9578 | 0.9544 | 0.9887 | | 0.0263 | 3.0 | 2634 | 0.0492 | 0.9530 | 0.9604 | 0.9567 | 0.9889 | ### Framework versions - Transformers 4.10.2 - Pytorch 1.9.0+cu102 - Datasets 1.12.0 - Tokenizers 0.10.3
m3hrdadfi/bert-fa-base-uncased-wikitriplet-mean-tokens
bab457271c0d16f46da87abf1ac1fba3dcf2e954
2021-05-28T06:02:17.000Z
[ "pytorch", "jax", "bert", "feature-extraction", "fa", "transformers", "license:apache-2.0" ]
feature-extraction
false
m3hrdadfi
null
m3hrdadfi/bert-fa-base-uncased-wikitriplet-mean-tokens
248
1
transformers
3,305
--- language: fa license: apache-2.0 --- # ParsBERT + Sentence Transformers Please follow the [Sentence-Transformer](https://github.com/m3hrdadfi/sentence-transformers) repo for the latest information about previous and current models. ```bibtex @misc{SentenceTransformerWiki, author = {Mehrdad Farahani}, title = {Sentence Embeddings with ParsBERT}, year = {2020}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {https://github.com/m3hrdadfi/sentence-transformers}, } ```
miguelvictor/python-gpt2-large
02c35a19e4580cb98667e28b83f5562639a9a0ec
2021-05-23T09:30:59.000Z
[ "pytorch", "jax", "tensorboard", "gpt2", "text-generation", "transformers" ]
text-generation
false
miguelvictor
null
miguelvictor/python-gpt2-large
248
null
transformers
3,306
Entry not found
theChanChanMan/DialoGPT-small-chandler
e6c82a45f6fd64a0254f4b9da310e97f3ddb8549
2021-09-29T17:39:39.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
theChanChanMan
null
theChanChanMan/DialoGPT-small-chandler
248
null
transformers
3,307
--- tags: - conversational --- # Chandler Bing DialoGPT Model
luohy/rgx-qg
fcd842ea9e7e3bb7054f734c557888fb6b60c2e7
2022-06-29T13:30:02.000Z
[ "pytorch", "bart", "text2text-generation", "transformers", "license:afl-3.0", "autotrain_compatible" ]
text2text-generation
false
luohy
null
luohy/rgx-qg
248
null
transformers
3,308
--- license: afl-3.0 ---
EmileAjar/DialoGPT-small-peppapig
f731e4e1c8b812f0d66d6c9c6aa9a457b805f26e
2021-08-28T13:49:05.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
EmileAjar
null
EmileAjar/DialoGPT-small-peppapig
247
null
transformers
3,309
--- tags: - conversational --- # Peppa pig DialoGPT Model
asahi417/tner-xlm-roberta-large-all-english
0c7cdfb6289482e221ef5a5ed1b6ae1dc16799f9
2021-02-12T23:48:50.000Z
[ "pytorch", "xlm-roberta", "token-classification", "transformers", "autotrain_compatible" ]
token-classification
false
asahi417
null
asahi417/tner-xlm-roberta-large-all-english
247
1
transformers
3,310
# XLM-RoBERTa for NER XLM-RoBERTa finetuned on NER. Check more detail at [TNER repository](https://github.com/asahi417/tner). ## Usage ``` from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("asahi417/tner-xlm-roberta-large-all-english") model = AutoModelForTokenClassification.from_pretrained("asahi417/tner-xlm-roberta-large-all-english") ```
seyonec/BPE_SELFIES_PubChem_shard00_50k
e0e89545fecf14a0a21ee640057b27ce65783ec3
2021-05-20T20:48:07.000Z
[ "pytorch", "jax", "roberta", "fill-mask", "transformers", "autotrain_compatible" ]
fill-mask
false
seyonec
null
seyonec/BPE_SELFIES_PubChem_shard00_50k
247
null
transformers
3,311
Entry not found
CarlCochet/trajectory-transformer-halfcheetah-medium-v2
68647ada7a729fe6da99df361609453f2332e1d2
2022-05-10T12:38:16.000Z
[ "pytorch", "trajectory_transformer", "feature-extraction", "transformers", "license:mit" ]
feature-extraction
false
CarlCochet
null
CarlCochet/trajectory-transformer-halfcheetah-medium-v2
247
null
transformers
3,312
--- license: mit ---
Wikidepia/IndoT5-small
c9c1f3ba70abb337484d2f4f498973fa64ef2034
2021-07-04T06:17:07.000Z
[ "pytorch", "t5", "text2text-generation", "id", "dataset:allenai/c4", "transformers", "autotrain_compatible" ]
text2text-generation
false
Wikidepia
null
Wikidepia/IndoT5-small
246
null
transformers
3,313
--- language: - id datasets: - allenai/c4 --- # Indonesian T5 Small T5 (Text-to-Text Transfer Transformer) model pretrained on Indonesian mC4 with [extra filtering](https://github.com/Wikidepia/indonesian_datasets/tree/master/dump/mc4). This model is pre-trained only and needs to be fine-tuned to be used for specific tasks. ## Pretraining Details Trained for 1M steps following [`google/t5-v1_1-small`](https://huggingface.co/google/t5-v1_1-small). ## Model Performance TBD ## Limitations and bias This model also has the problem of biased (unethical, harmful, biased) output results due to the bias of the content of the training data, which is associated with the language model using a large-scale corpus. There is potential. Assuming that this problem may occur, please be careful to use it only for applications that do not cause damage. ## Acknowledgement Thanks to Tensorflow Research Cloud for providing TPU v3-8s.
henryu-lin/t5-large-samsum-deepspeed
77653b11133142f145ec70f32def0f8397dbcb3c
2021-07-08T09:13:46.000Z
[ "pytorch", "t5", "text2text-generation", "en", "dataset:samsum", "transformers", "azureml", "summarization", "deepspeed", "license:apache-2.0", "model-index", "autotrain_compatible" ]
summarization
false
henryu-lin
null
henryu-lin/t5-large-samsum-deepspeed
246
1
transformers
3,314
--- language: en tags: - azureml - t5 - summarization - deepspeed license: apache-2.0 datasets: - samsum model-index: - name: t5-large-samsum-deepspeed results: - task: name: Abstractive Text Summarization type: abstractive-text-summarization dataset: name: "SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarization" type: samsum widget: - text: | Kevin: Hey man, are you excited to watch Finding Nemo tonight? Henry: Yea, I can't wait to watch that same movie for the 89th time. Is Nate coming over to watch it with us tonight? Kevin: Yep, he said he'll be arriving a bit later at around 7 since he gets off of work at 6. Have you taken out the garbage yet? It's starting to make the kitchen really smell. Henry: Oh I forgot. I'll do that once I'm finished with my assignment for my math class. I didn't get to start on it until an hour ago, and it's due in 30 minutes. Kevin: Okay dude, you should take it out as soon as possible. By the way, Nate is bringing his girlfriend and their cat too. Henry: Nice, I'm really looking forward to seeing them again. --- ## `t5-large-samsum-deepspeed` This model was trained using Microsoft's `AzureML` and `DeepSpeed`'s ZeRO 2 optimization. It was fine-tuned on the `SAMSum` corpus from `t5-large` checkpoint. More information on the fine-tuning process (includes samples and benchmarks): *(currently still WIP, major updates coming soon: 7/6/21~7/9/21)* ## Resource Usage These results are retrieved from AzureML Studio's resource monitoring module. All experiments were ran on AzureML's low priority clusters. | key | value | | --- | ----- | | AzureML SKU | ND40rs_v2 (8 X V100 32GB) | | Region | US West 2 | | Run Duration | 12m 47.13s | | Compute Cost (LowPriority/Dedicated) | $0.94/$4.69 (USD) | | Average CPU Utilization | 51.2% | | Average GPU Utilization | 42.0% | | GPU Memory Usage (Avg/Peak) | 24.85/28.79 (GB) | | Total GPU Energy Usage | 670.38 (kJ) | *Compute cost is calculated from run duration and SKU's price per hour. Updated SKU pricing could be found here: https://azure.microsoft.com/en-us/pricing/details/machine-learning/ *Peak memory usage is calculated from average peak across all utilized GPUs. ### Carbon Emissions These results are obtained using `codecarbon`. The carbon emission is estimated from training runtime only (excluding setup and evaluation runtime). CodeCarbon: https://github.com/mlco2/codecarbon | key | value | | --- | ----- | | timestamp | 2021-07-08T06:29:27 | | duration | 515.5018835067749 | | emissions | 0.043562840982919106 | | energy_consumed | 0.14638051405550773 | | country_name | USA | | region | Washington | | cloud_provider | azure | | cloud_region | westus2 | ## Hyperparameters ```yaml fp16: True per device batch size: 8 effective batch size: 64 epoch: 3.0 learning rate: 1e-4 weight decay: 0.1 seed: 1 ``` *Same `per device batch size` for evaluations ### DeepSpeed Optimizer = `AdamW`, Scheduler = `WarmupDecayLR`, Offload = `none` ```json "zero_optimization": { "stage": 2, "allgather_partitions": true, "allgather_bucket_size": 1300000000, "overlap_comm": true, "reduce_scatter": true, "reduce_bucket_size": 1300000000, "contiguous_gradients": true } ``` ## Usage ```python from transformers import pipeline summarizer = pipeline("summarization", model="henryu-lin/t5-large-samsum-deepspeed") conversation = '''Kevin: Hey man, are you excited to watch Finding Nemo tonight? Henry: Yea, I can't wait to watch that same movie for the 89th time. Is Nate coming over to watch it with us tonight? Kevin: Yep, he said he'll be arriving a bit later at around 7 since he gets off of work at 6. Have you taken out the garbage yet? It's starting to make the kitchen really smell. Henry: Oh I forgot. I'll do that once I'm finished with my assignment for my math class. I didn't get to start on it until an hour ago, and it's due in 30 minutes. Kevin: Okay dude, you should take it out as soon as possible. By the way, Nate is bringing his girlfriend and their cat too. Henry: Nice, I'm really looking forward to seeing them again. ''' summarizer(conversation) ``` ## Results | ROUGE | Score | | ----- | ----- | | eval_rouge1 | 53.0823 | | eval_rouge2 | 28.7097 | | eval_rougeL | 43.939 | | eval_rougeLsum | 49.067 | | predict_rouge1 | 51.6716 | | predict_rouge2 | 26.5372 | | predict_rougeL | 42.9681 | | predict_rougeLsum | 47.4084 | | Metric | Value | | ------ | ----- | | eval_gen_len | 26.4071 | | predict_gen_len | 25.9451 | | train_loss | 1.3212629926497115 | | eval_loss | 1.23828125 | | predict_loss | 1.2333984375 | | train_runtime | 515.2198 | | train_samples | 14732 | | train_samples_per_second | 85.781 | | train_steps_per_second | 1.345 | | eval_runtime | 61.275 | | eval_samples | 818 | | eval_samples_per_second | 13.35 | | eval_steps_per_second | 0.212 | | predict_runtime | 63.3732 | | predict_samples | 819 | | predict_samples_per_second | 12.923 | | predict_steps_per_second | 0.205 | | total_steps | 693 | | total_flos | 7.20140924616704e+16 |
liaad/srl-pt_bertimbau-base
5001a47734731b760ee029d0afa398c3047e8f01
2021-09-22T08:56:26.000Z
[ "pytorch", "tf", "jax", "bert", "feature-extraction", "multilingual", "pt", "dataset:PropBank.Br", "arxiv:2101.01213", "transformers", "bert-base-portuguese-cased", "semantic role labeling", "finetuned", "license:apache-2.0" ]
feature-extraction
false
liaad
null
liaad/srl-pt_bertimbau-base
246
null
transformers
3,315
--- language: - multilingual - pt tags: - bert-base-portuguese-cased - semantic role labeling - finetuned license: apache-2.0 datasets: - PropBank.Br metrics: - F1 Measure --- # BERTimbau base fine-tuned on Portuguese semantic role labeling ## Model description This model is the [`neuralmind/bert-base-portuguese-cased`](https://huggingface.co/neuralmind/bert-base-portuguese-cased) fine-tuned on Portuguese semantic role labeling data. This is part of a project from which resulted the following models: * [liaad/srl-pt_bertimbau-base](https://huggingface.co/liaad/srl-pt_bertimbau-base) * [liaad/srl-pt_bertimbau-large](https://huggingface.co/liaad/srl-pt_bertimbau-large) * [liaad/srl-pt_xlmr-base](https://huggingface.co/liaad/srl-pt_xlmr-base) * [liaad/srl-pt_xlmr-large](https://huggingface.co/liaad/srl-pt_xlmr-large) * [liaad/srl-pt_mbert-base](https://huggingface.co/liaad/srl-pt_mbert-base) * [liaad/srl-en_xlmr-base](https://huggingface.co/liaad/srl-en_xlmr-base) * [liaad/srl-en_xlmr-large](https://huggingface.co/liaad/srl-en_xlmr-large) * [liaad/srl-en_mbert-base](https://huggingface.co/liaad/srl-en_mbert-base) * [liaad/srl-enpt_xlmr-base](https://huggingface.co/liaad/srl-enpt_xlmr-base) * [liaad/srl-enpt_xlmr-large](https://huggingface.co/liaad/srl-enpt_xlmr-large) * [liaad/srl-enpt_mbert-base](https://huggingface.co/liaad/srl-enpt_mbert-base) * [liaad/ud_srl-pt_bertimbau-large](https://huggingface.co/liaad/ud_srl-pt_bertimbau-large) * [liaad/ud_srl-pt_xlmr-large](https://huggingface.co/liaad/ud_srl-pt_xlmr-large) * [liaad/ud_srl-enpt_xlmr-large](https://huggingface.co/liaad/ud_srl-enpt_xlmr-large) For more information, please see the accompanying article (See BibTeX entry and citation info below) and the [project's github](https://github.com/asofiaoliveira/srl_bert_pt). ## Intended uses & limitations #### How to use To use the transformers portion of this model: ```python from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("liaad/srl-pt_bertimbau-base") model = AutoModel.from_pretrained("liaad/srl-pt_bertimbau-base") ``` To use the full SRL model (transformers portion + a decoding layer), refer to the [project's github](https://github.com/asofiaoliveira/srl_bert_pt). ## Training procedure The model was trained on the PropBank.Br datasets, using 10-fold Cross-Validation. The 10 resulting models were tested on the folds as well as on a smaller opinion dataset "Buscapé". For more information, please see the accompanying article (See BibTeX entry and citation info below) and the [project's github](https://github.com/asofiaoliveira/srl_bert_pt). ## Eval results | Model Name | F<sub>1</sub> CV PropBank.Br (in domain) | F<sub>1</sub> Buscapé (out of domain) | | --------------- | ------ | ----- | | `srl-pt_bertimbau-base` | 76.30 | 73.33 | | `srl-pt_bertimbau-large` | 77.42 | 74.85 | | `srl-pt_xlmr-base` | 75.22 | 72.82 | | `srl-pt_xlmr-large` | 77.59 | 73.84 | | `srl-pt_mbert-base` | 72.76 | 66.89 | | `srl-en_xlmr-base` | 66.59 | 65.24 | | `srl-en_xlmr-large` | 67.60 | 64.94 | | `srl-en_mbert-base` | 63.07 | 58.56 | | `srl-enpt_xlmr-base` | 76.50 | 73.74 | | `srl-enpt_xlmr-large` | **78.22** | 74.55 | | `srl-enpt_mbert-base` | 74.88 | 69.19 | | `ud_srl-pt_bertimbau-large` | 77.53 | 74.49 | | `ud_srl-pt_xlmr-large` | 77.69 | 74.91 | | `ud_srl-enpt_xlmr-large` | 77.97 | **75.05** | ### BibTeX entry and citation info ```bibtex @misc{oliveira2021transformers, title={Transformers and Transfer Learning for Improving Portuguese Semantic Role Labeling}, author={Sofia Oliveira and Daniel Loureiro and Alípio Jorge}, year={2021}, eprint={2101.01213}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
nanometeres/DialoGPT-medium-halbot
1722d57de0815cab05b3c531382de64c771874ff
2021-09-01T11:55:43.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
nanometeres
null
nanometeres/DialoGPT-medium-halbot
246
null
transformers
3,316
--- tags: conversational --- #LilHalMediumModel
valurank/pegasus-multi_news-headline
b26a7990e5e76d16e507ee60183a9f61ee79be72
2022-06-08T20:14:44.000Z
[ "pytorch", "pegasus", "text2text-generation", "transformers", "generated_from_trainer", "license:other", "model-index", "autotrain_compatible" ]
text2text-generation
false
valurank
null
valurank/pegasus-multi_news-headline
246
1
transformers
3,317
--- tags: - generated_from_trainer license: other metrics: - rouge model-index: - name: pegasus-multi_news-headline results: [] --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # pegasus-multi_news-headline This model is a fine-tuned version of [google/pegasus-multi_news](https://huggingface.co/google/pegasus-multi_news) on an unknown dataset. It achieves the following results on the evaluation set: - Loss: 1.4421 - Rouge1: 41.616 - Rouge2: 22.922 - Rougel: 35.2189 - Rougelsum: 35.3561 - Gen Len: 33.9532 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 1 - eval_batch_size: 1 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | Gen Len | |:-------------:|:-----:|:-----:|:---------------:|:-------:|:-------:|:-------:|:---------:|:-------:| | 1.6637 | 1.0 | 31200 | 1.4877 | 41.0996 | 22.579 | 34.9311 | 35.0611 | 34.3431 | | 1.4395 | 2.0 | 62400 | 1.4388 | 41.6075 | 22.8274 | 35.2051 | 35.3526 | 33.7965 | | 1.3137 | 3.0 | 93600 | 1.4421 | 41.616 | 22.922 | 35.2189 | 35.3561 | 33.9532 | ### Framework versions - Transformers 4.12.2 - Pytorch 1.9.0+cu111 - Datasets 1.14.0 - Tokenizers 0.10.3
Danastos/qacombination_bert_el_4
8a8376042920436e9de2fa753ae56df0b948eb7e
2022-06-18T11:56:46.000Z
[ "pytorch", "bert", "question-answering", "transformers", "autotrain_compatible" ]
question-answering
false
Danastos
null
Danastos/qacombination_bert_el_4
246
null
transformers
3,318
Entry not found
Recognai/selectra_medium
953bd230344c2088d9b15d8ca92970b41c31ab68
2021-10-19T15:28:03.000Z
[ "pytorch", "electra", "pretraining", "es", "dataset:oscar", "transformers", "license:apache-2.0" ]
null
false
Recognai
null
Recognai/selectra_medium
245
3
transformers
3,319
--- language: - es thumbnail: "url to a thumbnail used in social sharing" license: apache-2.0 datasets: - oscar --- # SELECTRA: A Spanish ELECTRA SELECTRA is a Spanish pre-trained language model based on [ELECTRA](https://github.com/google-research/electra). We release a `small` and `medium` version with the following configuration: | Model | Layers | Embedding/Hidden Size | Params | Vocab Size | Max Sequence Length | Cased | | --- | --- | --- | --- | --- | --- | --- | | [SELECTRA small](https://huggingface.co/Recognai/selectra_small) | 12 | 256 | 22M | 50k | 512 | True | | **SELECTRA medium** | **12** | **384** | **41M** | **50k** | **512** | **True** | **SELECTRA small (medium) is about 5 (3) times smaller than BETO but achieves comparable results** (see Metrics section below). ## Usage From the original [ELECTRA model card](https://huggingface.co/google/electra-small-discriminator): "ELECTRA models are trained to distinguish "real" input tokens vs "fake" input tokens generated by another neural network, similar to the discriminator of a GAN." The discriminator should therefore activate the logit corresponding to the fake input token, as the following example demonstrates: ```python from transformers import ElectraForPreTraining, ElectraTokenizerFast discriminator = ElectraForPreTraining.from_pretrained("Recognai/selectra_small") tokenizer = ElectraTokenizerFast.from_pretrained("Recognai/selectra_small") sentence_with_fake_token = "Estamos desayunando pan rosa con tomate y aceite de oliva." inputs = tokenizer.encode(sentence_with_fake_token, return_tensors="pt") logits = discriminator(inputs).logits.tolist()[0] print("\t".join(tokenizer.tokenize(sentence_with_fake_token))) print("\t".join(map(lambda x: str(x)[:4], logits[1:-1]))) """Output: Estamos desayun ##ando pan rosa con tomate y aceite de oliva . -3.1 -3.6 -6.9 -3.0 0.19 -4.5 -3.3 -5.1 -5.7 -7.7 -4.4 -4.2 """ ``` However, you probably want to use this model to fine-tune it on a downstream task. We provide models fine-tuned on the [XNLI dataset](https://huggingface.co/datasets/xnli), which can be used together with the zero-shot classification pipeline: - [Zero-shot SELECTRA small](https://huggingface.co/Recognai/zeroshot_selectra_small) - [Zero-shot SELECTRA medium](https://huggingface.co/Recognai/zeroshot_selectra_medium) ## Metrics We fine-tune our models on 3 different down-stream tasks: - [XNLI](https://huggingface.co/datasets/xnli) - [PAWS-X](https://huggingface.co/datasets/paws-x) - [CoNLL2002 - NER](https://huggingface.co/datasets/conll2002) For each task, we conduct 5 trials and state the mean and standard deviation of the metrics in the table below. To compare our results to other Spanish language models, we provide the same metrics taken from the [evaluation table](https://github.com/PlanTL-SANIDAD/lm-spanish#evaluation-) of the [Spanish Language Model](https://github.com/PlanTL-SANIDAD/lm-spanish) repo. | Model | CoNLL2002 - NER (f1) | PAWS-X (acc) | XNLI (acc) | Params | | --- | --- | --- | --- | --- | | SELECTRA small | 0.865 +- 0.004 | 0.896 +- 0.002 | 0.784 +- 0.002 | 22M | | SELECTRA medium | 0.873 +- 0.003 | 0.896 +- 0.002 | 0.804 +- 0.002 | 41M | | | | | | | | [mBERT](https://huggingface.co/bert-base-multilingual-cased) | 0.8691 | 0.8955 | 0.7876 | 178M | | [BETO](https://huggingface.co/dccuchile/bert-base-spanish-wwm-cased) | 0.8759 | 0.9000 | 0.8130 | 110M | | [RoBERTa-b](https://huggingface.co/BSC-TeMU/roberta-base-bne) | 0.8851 | 0.9000 | 0.8016 | 125M | | [RoBERTa-l](https://huggingface.co/BSC-TeMU/roberta-large-bne) | 0.8772 | 0.9060 | 0.7958 | 355M | | [Bertin](https://huggingface.co/bertin-project/bertin-roberta-base-spanish/tree/v1-512) | 0.8835 | 0.8990 | 0.7890 | 125M | | [ELECTRICIDAD](https://huggingface.co/mrm8488/electricidad-base-discriminator) | 0.7954 | 0.9025 | 0.7878 | 109M | Some details of our fine-tuning runs: - epochs: 5 - batch-size: 32 - learning rate: 1e-4 - warmup proportion: 0.1 - linear learning rate decay - layerwise learning rate decay For all the details, check out our [selectra repo](https://github.com/recognai/selectra). ## Training We pre-trained our SELECTRA models on the Spanish portion of the [Oscar](https://huggingface.co/datasets/oscar) dataset, which is about 150GB in size. Each model version is trained for 300k steps, with a warm restart of the learning rate after the first 150k steps. Some details of the training: - steps: 300k - batch-size: 128 - learning rate: 5e-4 - warmup steps: 10k - linear learning rate decay - TPU cores: 8 (v2-8) For all details, check out our [selectra repo](https://github.com/recognai/selectra). **Note:** Due to a misconfiguration in the pre-training scripts the embeddings of the vocabulary containing an accent were not optimized. If you fine-tune this model on a down-stream task, you might consider using a tokenizer that does not strip the accents: ```python tokenizer = ElectraTokenizerFast.from_pretrained("Recognai/selectra_small", strip_accents=False) ``` ## Motivation Despite the abundance of excellent Spanish language models (BETO, BSC-BNE, Bertin, ELECTRICIDAD, etc.), we felt there was still a lack of distilled or compact Spanish language models and a lack of comparing those to their bigger siblings. ## Acknowledgment This research was supported by the Google TPU Research Cloud (TRC) program. ## Authors - David Fidalgo ([GitHub](https://github.com/dcfidalgo)) - Javier Lopez ([GitHub](https://github.com/javispp)) - Daniel Vila ([GitHub](https://github.com/dvsrepo)) - Francisco Aranda ([GitHub](https://github.com/frascuchon))
deepset/gelectra-large-generator
9dfd9c7ee492ba7695a6ec259069e371b1689144
2021-10-21T12:18:52.000Z
[ "pytorch", "tf", "electra", "fill-mask", "de", "dataset:wikipedia", "dataset:OPUS", "dataset:OpenLegalData", "dataset:oscar", "arxiv:2010.10906", "transformers", "license:mit", "autotrain_compatible" ]
fill-mask
false
deepset
null
deepset/gelectra-large-generator
245
2
transformers
3,320
--- language: de license: mit datasets: - wikipedia - OPUS - OpenLegalData - oscar --- # German ELECTRA large generator Released, Oct 2020, this is the generator component of the German ELECTRA language model trained collaboratively by the makers of the original German BERT (aka "bert-base-german-cased") and the dbmdz BERT (aka bert-base-german-dbmdz-cased). In our [paper](https://arxiv.org/pdf/2010.10906.pdf), we outline the steps taken to train our model. The generator is useful for performing masking experiments. If you are looking for a regular language model for embedding extraction, or downstream tasks like NER, classification or QA, please use deepset/gelectra-large. ## Overview **Paper:** [here](https://arxiv.org/pdf/2010.10906.pdf) **Architecture:** ELECTRA large (generator) **Language:** German ## Performance ``` GermEval18 Coarse: 80.70 GermEval18 Fine: 55.16 GermEval14: 88.95 ``` See also: deepset/gbert-base deepset/gbert-large deepset/gelectra-base deepset/gelectra-large deepset/gelectra-base-generator deepset/gelectra-large-generator ## Authors Branden Chan: `branden.chan [at] deepset.ai` Stefan Schweter: `stefan [at] schweter.eu` Timo Möller: `timo.moeller [at] deepset.ai` ## About us ![deepset logo](https://workablehr.s3.amazonaws.com/uploads/account/logo/476306/logo) We bring NLP to the industry via open source! Our focus: Industry specific language models & large scale QA systems. Some of our work: - [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) - [FARM](https://github.com/deepset-ai/FARM) - [Haystack](https://github.com/deepset-ai/haystack/) Get in touch: [Twitter](https://twitter.com/deepset_ai) | [LinkedIn](https://www.linkedin.com/company/deepset-ai/) | [Slack](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)
google/multiberts-seed_16
63aaff15780ac66d658b41e57943e8a616aa20d1
2021-11-05T22:36:56.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_16", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_16
245
null
transformers
3,321
--- language: en tags: - multiberts - multiberts-seed_16 license: apache-2.0 --- # MultiBERTs - Seed 16 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #16. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_16') model = TFBertModel.from_pretrained("google/multiberts-seed_16") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_16') model = BertModel.from_pretrained("google/multiberts-seed_16") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
google/multiberts-seed_18
f35562c2b663933185a61a3c39d8f46d9a99a71c
2021-11-05T22:40:12.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_18", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_18
245
null
transformers
3,322
--- language: en tags: - multiberts - multiberts-seed_18 license: apache-2.0 --- # MultiBERTs - Seed 18 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #18. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_18') model = TFBertModel.from_pretrained("google/multiberts-seed_18") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_18') model = BertModel.from_pretrained("google/multiberts-seed_18") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
google/multiberts-seed_23
464c5f8311c3698967c6a576b454d862bf341149
2021-11-05T22:49:16.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_23", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_23
245
null
transformers
3,323
--- language: en tags: - multiberts - multiberts-seed_23 license: apache-2.0 --- # MultiBERTs - Seed 23 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #23. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_23') model = TFBertModel.from_pretrained("google/multiberts-seed_23") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_23') model = BertModel.from_pretrained("google/multiberts-seed_23") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
Aniemore/rubert-tiny2-russian-emotion-detection
16b199f717a58b1fc29e82b52c45fa16dc98e2f8
2022-05-27T11:10:42.000Z
[ "pytorch", "bert", "text-classification", "ru", "dataset:Aniemore/cedr-m7", "transformers", "russian", "classification", "emotion", "emotion-detection", "emotion-recognition", "multiclass", "license:gpl-3.0", "model-index" ]
text-classification
false
Aniemore
null
Aniemore/rubert-tiny2-russian-emotion-detection
245
4
transformers
3,324
--- license: gpl-3.0 language: ["ru"] tags: - russian - classification - emotion - emotion-detection - emotion-recognition - multiclass widget: - text: "Как дела?" - text: "Дурак твой дед" - text: "Только попробуй!!!" - text: "Не хочу в школу(" - text: "Сейчас ровно час дня" - text: "А ты уверен, что эти полоски снизу не врут? Точно уверен? Вот прям 100 процентов?" datasets: - Aniemore/cedr-m7 model-index: - name: RuBERT tiny2 For Russian Text Emotion Detection by Ilya Lubenets results: - task: name: Multilabel Text Classification type: multilabel-text-classification dataset: name: CEDR M7 type: Aniemore/cedr-m7 args: ru metrics: - name: multilabel accuracy type: accuracy value: 85% - task: name: Text Classification type: text-classification dataset: name: CEDR M7 type: Aniemore/cedr-m7 args: ru metrics: - name: accuracy type: accuracy value: 76% --- # First - you should prepare few functions to talk to model ```python import torch from transformers import BertForSequenceClassification, AutoTokenizer LABELS = ['neutral', 'happiness', 'sadness', 'enthusiasm', 'fear', 'anger', 'disgust'] tokenizer = AutoTokenizer.from_pretrained('Aniemore/rubert-tiny2-russian-emotion-detection') model = BertForSequenceClassification.from_pretrained('Aniemore/rubert-tiny2-russian-emotion-detection') @torch.no_grad() def predict_emotion(text: str) -> str: """ We take the input text, tokenize it, pass it through the model, and then return the predicted label :param text: The text to be classified :type text: str :return: The predicted emotion """ inputs = tokenizer(text, max_length=512, padding=True, truncation=True, return_tensors='pt') outputs = model(**inputs) predicted = torch.nn.functional.softmax(outputs.logits, dim=1) predicted = torch.argmax(predicted, dim=1).numpy() return LABELS[predicted[0]] @torch.no_grad() def predict_emotions(text: str) -> list: """ It takes a string of text, tokenizes it, feeds it to the model, and returns a dictionary of emotions and their probabilities :param text: The text you want to classify :type text: str :return: A dictionary of emotions and their probabilities. """ inputs = tokenizer(text, max_length=512, padding=True, truncation=True, return_tensors='pt') outputs = model(**inputs) predicted = torch.nn.functional.softmax(outputs.logits, dim=1) emotions_list = {} for i in range(len(predicted.numpy()[0].tolist())): emotions_list[LABELS[i]] = predicted.numpy()[0].tolist()[i] return emotions_list ``` # And then - just gently ask a model to predict your emotion ```python simple_prediction = predict_emotion("Какой же сегодня прекрасный день, братья") not_simple_prediction = predict_emotions("Какой же сегодня прекрасный день, братья") print(simple_prediction) print(not_simple_prediction) # happiness # {'neutral': 0.0004941817605867982, 'happiness': 0.9979524612426758, 'sadness': 0.0002536600804887712, 'enthusiasm': 0.0005498139653354883, 'fear': 0.00025326196919195354, 'anger': 0.0003583927755244076, 'disgust': 0.00013807788491249084} ``` # Or, just simply use [our package (GitHub)](https://github.com/aniemore/Aniemore), that can do whatever you want (or maybe not) 🤗 # Citations ``` @misc{Aniemore, author = {Артем Аментес, Илья Лубенец, Никита Давидчук}, title = {Открытая библиотека искусственного интеллекта для анализа и выявления эмоциональных оттенков речи человека}, year = {2022}, publisher = {Hugging Face}, journal = {Hugging Face Hub}, howpublished = {\url{https://huggingface.com/aniemore/Aniemore}}, email = {[email protected]} } ```
google/multiberts-seed_17
7ca808c200b4bf0e62e1df75ff1773f66c216362
2021-11-05T22:38:31.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_17", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_17
244
null
transformers
3,325
--- language: en tags: - multiberts - multiberts-seed_17 license: apache-2.0 --- # MultiBERTs - Seed 17 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #17. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_17') model = TFBertModel.from_pretrained("google/multiberts-seed_17") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_17') model = BertModel.from_pretrained("google/multiberts-seed_17") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
google/multiberts-seed_21
831764632904bcd34dec982839db6ddce0f52581
2021-11-05T22:45:53.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_21", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_21
244
null
transformers
3,326
--- language: en tags: - multiberts - multiberts-seed_21 license: apache-2.0 --- # MultiBERTs - Seed 21 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #21. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_21') model = TFBertModel.from_pretrained("google/multiberts-seed_21") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_21') model = BertModel.from_pretrained("google/multiberts-seed_21") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
google/multiberts-seed_22
beed912e0085b541a91e1dafdcb3e4dbacd89128
2021-11-05T22:47:36.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_22", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_22
244
null
transformers
3,327
--- language: en tags: - multiberts - multiberts-seed_22 license: apache-2.0 --- # MultiBERTs - Seed 22 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #22. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_22') model = TFBertModel.from_pretrained("google/multiberts-seed_22") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_22') model = BertModel.from_pretrained("google/multiberts-seed_22") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
mdc1616/DialoGPT-large-sherlock
0df2bdc0a8973e2f03da887d5073b6c7e5b8ba2a
2021-08-27T00:52:33.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
mdc1616
null
mdc1616/DialoGPT-large-sherlock
244
null
transformers
3,328
--- tags: - conversational --- #Sherlock DialoGPT Model
michelleshx/DialoGPT-small-michelle-discord-bot
06edf8f1adf0b042cc9af5b60ce597cb05a7221e
2021-12-20T09:10:07.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
michelleshx
null
michelleshx/DialoGPT-small-michelle-discord-bot
244
null
transformers
3,329
--- tags: - conversational --- # Discord DialoGPT Model
KoboldAI/fairseq-dense-6.7B-Janeway
179f84c09eacb61564273d2341bcd2ddef548d84
2022-04-07T11:47:40.000Z
[ "pytorch", "xglm", "text-generation", "en", "transformers", "license:mit" ]
text-generation
false
KoboldAI
null
KoboldAI/fairseq-dense-6.7B-Janeway
244
null
transformers
3,330
--- language: en license: mit --- # Fairseq-dense 6.7B - Janeway ## Model Description Fairseq-dense 6.7B-Janeway is a finetune created using Fairseq's MoE dense model. ## Training data The training data contains around 2210 ebooks, mostly in the sci-fi and fantasy genres. The dataset is identical as dataset used by GPT-Neo-2.7B-Janeway. Some parts of the dataset have been prepended using the following text: `[Genre: <genre1>,<genre2>]` ### How to use You can use this model directly with a pipeline for text generation. This example generates a different sequence each time it's run: ```py >>> from transformers import pipeline >>> generator = pipeline('text-generation', model='KoboldAI/fairseq-dense-13B-Janeway') >>> generator("Welcome Captain Janeway, I apologize for the delay.", do_sample=True, min_length=50) [{'generated_text': 'Welcome Captain Janeway, I apologize for the delay."\nIt's all right," Janeway said. "I'm certain that you're doing your best to keep me informed of what\'s going on."'}] ``` ### Limitations and Biases Based on known problems with NLP technology, potential relevant factors include bias (gender, profession, race and religion). ### BibTeX entry and citation info ``` Artetxe et al. (2021): Efficient Large Scale Language Modeling with Mixtures of Experts ```
allenai/multicite-multilabel-roberta-large
4ed0c81f083f288375da6b8c86a737fb2aaf941a
2022-05-10T17:46:12.000Z
[ "pytorch", "roberta", "text-classification", "en", "transformers", "Roberta", "license:mit" ]
text-classification
false
allenai
null
allenai/multicite-multilabel-roberta-large
244
null
transformers
3,331
--- language: en tags: - Roberta license: mit --- # MultiCite: Multi-label Citation Intent Classification with Roberta-large (NAACL 2022) This model has been trained on the data available here: https://github.com/allenai/multicite.
Yale-LILY/brio-cnndm-cased
b43d9597957496357911e66331fb0c3a983836c1
2022-05-16T01:09:53.000Z
[ "pytorch", "bart", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
Yale-LILY
null
Yale-LILY/brio-cnndm-cased
244
1
transformers
3,332
Entry not found
SerdarHelli/ThyroidTumorClassificationModel
0f1fd610dd4f9c7ddf2c787ba95f1ac850bc0527
2022-06-28T09:52:22.000Z
[ "pytorch", "convnext", "image-classification", "transformers", "medicalimaging", "thyroidtumor" ]
image-classification
false
SerdarHelli
null
SerdarHelli/ThyroidTumorClassificationModel
244
null
transformers
3,333
--- tags: - medicalimaging - thyroidtumor metrics: - accuracy --- Thyroid nodule is one of the most common endocrine carcinomas. Due to its higher reveal ability and ability to distinguish between benign and malignant nodules in pathological features, ultrasonography has become the most widely used modality for finding and diagnosing thyroid cancer when compared to CT and MRI. In this study, the purpose is the classification of thyroid tumors on ultrasound images with 2 different categories: - Malign(1) - Benign(0) This study was made using HF Transformers : - [ On Google Colab](https://colab.research.google.com/drive/1ueSq8Y_NmFr7NGdtS8FStI3d2HR-43LD?usp=sharing) - [On Github](https://github.com/SerdarHelli/The-Classification-of-Thyroid-Tumors-on-UltraSound-Images-using-Deep-Learning-Methods) - [ Using Keras and GradCam With MultiClasses Medium Article](https://serdarhelli.medium.com/the-basic-classification-of-thyroid-tumors-on-ultrasound-images-using-deep-learning-methods-46f812d859ea) The Dataset: [Colombia National University presented an open access database of thyroid ultrasound images.](http://cimalab.unal.edu.co/?lang=es&mod=program&id=5) Ref : Pedraza, Lina & Vargas, Carlos & Narváez, Fabián & Durán, Oscar & Muñoz, Emma & Romero, Eduardo. (2015). An open access thyroid ultrasound-image Database. Progress in Biomedical Optics and Imaging — Proceedings of SPIE. 9287. 10.1117/12.2073532.
fabriceyhc/bert-base-uncased-imdb
7e84f0cce24fe5aa3d0ab5bece0da571055c3d6f
2021-09-21T00:54:38.000Z
[ "pytorch", "bert", "text-classification", "dataset:imdb", "transformers", "generated_from_trainer", "sibyl", "license:apache-2.0", "model-index" ]
text-classification
false
fabriceyhc
null
fabriceyhc/bert-base-uncased-imdb
243
null
transformers
3,334
--- license: apache-2.0 tags: - generated_from_trainer - sibyl datasets: - imdb metrics: - accuracy model-index: - name: bert-base-uncased-imdb results: - task: name: Text Classification type: text-classification dataset: name: imdb type: imdb args: plain_text metrics: - name: Accuracy type: accuracy value: 0.91264 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # bert-base-uncased-imdb This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the imdb dataset. It achieves the following results on the evaluation set: - Loss: 0.4942 - Accuracy: 0.9126 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 8 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 1546 - training_steps: 15468 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:-----:|:---------------:|:--------:| | 0.3952 | 0.65 | 2000 | 0.4012 | 0.86 | | 0.2954 | 1.29 | 4000 | 0.4535 | 0.892 | | 0.2595 | 1.94 | 6000 | 0.4320 | 0.892 | | 0.1516 | 2.59 | 8000 | 0.5309 | 0.896 | | 0.1167 | 3.23 | 10000 | 0.4070 | 0.928 | | 0.0624 | 3.88 | 12000 | 0.5055 | 0.908 | | 0.0329 | 4.52 | 14000 | 0.4342 | 0.92 | ### Framework versions - Transformers 4.10.2 - Pytorch 1.7.1 - Datasets 1.6.1 - Tokenizers 0.10.3
google/multiberts-seed_19
7a6882fed9f3f3dd56b65e2683cec3509f9e72a1
2021-11-05T22:42:17.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_19", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_19
243
null
transformers
3,335
--- language: en tags: - multiberts - multiberts-seed_19 license: apache-2.0 --- # MultiBERTs - Seed 19 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #19. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_19') model = TFBertModel.from_pretrained("google/multiberts-seed_19") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_19') model = BertModel.from_pretrained("google/multiberts-seed_19") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
google/multiberts-seed_20
53714946d69651632e8d1d0a47b6090c62e72fde
2021-11-05T22:43:59.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_20", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_20
243
null
transformers
3,336
--- language: en tags: - multiberts - multiberts-seed_20 license: apache-2.0 --- # MultiBERTs - Seed 20 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #20. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_20') model = TFBertModel.from_pretrained("google/multiberts-seed_20") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_20') model = BertModel.from_pretrained("google/multiberts-seed_20") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
google/multiberts-seed_24
84c61c0ec7351dad811ee688f80a9b85e3a0f2b8
2021-11-05T22:50:53.000Z
[ "pytorch", "tf", "bert", "pretraining", "en", "arxiv:2106.16163", "arxiv:1908.08962", "transformers", "multiberts", "multiberts-seed_24", "license:apache-2.0" ]
null
false
google
null
google/multiberts-seed_24
243
null
transformers
3,337
--- language: en tags: - multiberts - multiberts-seed_24 license: apache-2.0 --- # MultiBERTs - Seed 24 MultiBERTs is a collection of checkpoints and a statistical library to support robust research on BERT. We provide 25 BERT-base models trained with similar hyper-parameters as [the original BERT model](https://github.com/google-research/bert) but with different random seeds, which causes variations in the initial weights and order of training instances. The aim is to distinguish findings that apply to a specific artifact (i.e., a particular instance of the model) from those that apply to the more general procedure. We also provide 140 intermediate checkpoints captured during the course of pre-training (we saved 28 checkpoints for the first 5 runs). The models were originally released through [http://goo.gle/multiberts](http://goo.gle/multiberts). We describe them in our paper [The MultiBERTs: BERT Reproductions for Robustness Analysis](https://arxiv.org/abs/2106.16163). This is model #24. ## Model Description This model is a reproduction of [BERT-base uncased](https://github.com/google-research/bert), for English: it is a Transformers model pretrained on a large corpus of English data, using the Masked Language Modelling (MLM) and the Next Sentence Prediction (NSP) objectives. The intended uses, limitations, training data and training procedure are similar to [BERT-base uncased](https://github.com/google-research/bert). Two major differences with the original model: * We pre-trained the MultiBERTs models for 2 million steps using sequence length 512 (instead of 1 million steps using sequence length 128 then 512). * We used an alternative version of Wikipedia and Books Corpus, initially collected for [Turc et al., 2019](https://arxiv.org/abs/1908.08962). This is a best-effort reproduction, and so it is probable that differences with the original model have gone unnoticed. The performance of MultiBERTs on GLUE is oftentimes comparable to that of original BERT, but we found significant differences on the dev set of SQuAD (MultiBERTs outperforms original BERT). See our [technical report](https://arxiv.org/abs/2106.16163) for more details. ### How to use Using code from [BERT-base uncased](https://huggingface.co/bert-base-uncased), here is an example based on Tensorflow: ``` from transformers import BertTokenizer, TFBertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_24') model = TFBertModel.from_pretrained("google/multiberts-seed_24") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` PyTorch version: ``` from transformers import BertTokenizer, BertModel tokenizer = BertTokenizer.from_pretrained('google/multiberts-seed_24') model = BertModel.from_pretrained("google/multiberts-seed_24") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` ## Citation info ```bibtex @article{sellam2021multiberts, title={The MultiBERTs: BERT Reproductions for Robustness Analysis}, author={Thibault Sellam and Steve Yadlowsky and Jason Wei and Naomi Saphra and Alexander D'Amour and Tal Linzen and Jasmijn Bastings and Iulia Turc and Jacob Eisenstein and Dipanjan Das and Ian Tenney and Ellie Pavlick}, journal={arXiv preprint arXiv:2106.16163}, year={2021} } ```
microsoft/ssr-base
295984f807b4d3603d246f1b8f234dfa1463974d
2021-11-17T05:38:17.000Z
[ "pytorch", "t5", "text2text-generation", "en", "dataset:c4", "arxiv:2101.00416", "transformers", "summarization", "autotrain_compatible" ]
summarization
false
microsoft
null
microsoft/ssr-base
243
null
transformers
3,338
--- language: - en datasets: - c4 tags: - summarization - text2text-generation --- # SSR-base SSR-base model as in EMNLP 2021 paper [Improving Sequence-to-Sequence Pre-training via Sequence Span Rewriting](https://arxiv.org/abs/2101.00416).
rovai/Chat_pytorch1
c3e32465718afc150b2df9e9adb5da625c2c4d7e
2021-12-01T01:11:02.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
rovai
null
rovai/Chat_pytorch1
243
null
transformers
3,339
--- tags: - conversational --- #chat_pytorch1
microsoft/dit-large-finetuned-rvlcdip
a482c23ec1ba3f64142cdb7ffb097fcc6473fda7
2022-07-21T12:20:31.000Z
[ "pytorch", "beit", "image-classification", "dataset:rvl_cdip", "arxiv:2203.02378", "transformers", "dit" ]
image-classification
false
microsoft
null
microsoft/dit-large-finetuned-rvlcdip
243
2
transformers
3,340
--- tags: - dit datasets: - rvl_cdip inference: false --- # Document Image Transformer (large-sized model) Document Image Transformer (DiT) model pre-trained on IIT-CDIP (Lewis et al., 2006), a dataset that includes 42 million document images and fine-tuned on [RVL-CDIP](https://www.cs.cmu.edu/~aharley/rvl-cdip/), a dataset consisting of 400,000 grayscale images in 16 classes, with 25,000 images per class. It was introduced in the paper [DiT: Self-supervised Pre-training for Document Image Transformer](https://arxiv.org/abs/2203.02378) by Li et al. and first released in [this repository](https://github.com/microsoft/unilm/tree/master/dit). Note that DiT is identical to the architecture of [BEiT](https://huggingface.co/docs/transformers/model_doc/beit). Disclaimer: The team releasing DiT did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The Document Image Transformer (DiT) is a transformer encoder model (BERT-like) pre-trained on a large collection of images in a self-supervised fashion. The pre-training objective for the model is to predict visual tokens from the encoder of a discrete VAE (dVAE), based on masked patches. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. 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 document images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. ## Intended uses & limitations You can use the raw model for encoding document images into a vector space, but it's mostly meant to be fine-tuned on tasks like document image classification, table detection or document layout analysis. See the [model hub](https://huggingface.co/models?search=microsoft/dit) 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 AutoFeatureExtractor, AutoModelForImageClassification import torch from PIL import Image image = Image.open('path_to_your_document_image').convert('RGB') feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/dit-large-finetuned-rvlcdip") model = AutoModelForImageClassification.from_pretrained("microsoft/dit-large-finetuned-rvlcdip") inputs = feature_extractor(images=image, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits # model predicts one of the 16 RVL-CDIP classes predicted_class_idx = logits.argmax(-1).item() print("Predicted class:", model.config.id2label[predicted_class_idx]) ``` ### BibTeX entry and citation info ```bibtex @article{Lewis2006BuildingAT, title={Building a test collection for complex document information processing}, author={David D. Lewis and Gady Agam and Shlomo Engelson Argamon and Ophir Frieder and David A. Grossman and Jefferson Heard}, journal={Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval}, year={2006} } ```
cambridgeltl/sst_mobilebert-uncased
7db84f6f29a24560feb7f0a2296ea5c14b8edf66
2022-03-14T14:37:07.000Z
[ "pytorch", "mobilebert", "text-classification", "transformers" ]
text-classification
false
cambridgeltl
null
cambridgeltl/sst_mobilebert-uncased
243
null
transformers
3,341
Entry not found
valurank/MiniLM-L6-Keyword-Extraction
268a06523de516f25e7a089cff7921ad764f072d
2022-06-08T20:17:38.000Z
[ "pytorch", "bert", "feature-extraction", "en", "arxiv:1904.06472", "arxiv:2102.07033", "arxiv:2104.08727", "arxiv:1704.05179", "arxiv:1810.09305", "sentence-transformers", "sentence-similarity", "license:other" ]
sentence-similarity
false
valurank
null
valurank/MiniLM-L6-Keyword-Extraction
243
null
sentence-transformers
3,342
--- pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity language: en license: other --- # all-MiniLM-L6-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-L6-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-L6-v2') model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-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-L6-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 [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-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 [`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. ### 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** |
M-CLIP/LABSE-Vit-L-14
f03054697ff64d4cedef16917a8d075aec9849ae
2022-06-02T23:26:39.000Z
[ "pytorch", "tf", "multilingual" ]
null
false
M-CLIP
null
M-CLIP/LABSE-Vit-L-14
243
null
null
3,343
--- language: multilingual --- ## Multilingual-clip: LABSE-Vit-L-14 Multilingual-CLIP extends OpenAI's English text encoders to multiple other languages. This model *only* contains the multilingual text encoder. The corresponding image model `ViT-L-14` can be retrieved via instructions found on OpenAI's [CLIP repository on Github](https://github.com/openai/CLIP). We provide a usage example below. ## Requirements To use both the multilingual text encoder and corresponding image encoder, we need to install the packages [`multilingual-clip`](https://github.com/FreddeFrallan/Multilingual-CLIP) and [`clip`](https://github.com/openai/CLIP). ``` pip install multilingual-clip pip install git+https://github.com/openai/CLIP.git ``` ## Usage Extracting embeddings from the text encoder can be done in the following way: ```python from multilingual_clip import pt_multilingual_clip import transformers texts = [ 'Three blind horses listening to Mozart.', 'Älgen är skogens konung!', 'Wie leben Eisbären in der Antarktis?', 'Вы знали, что все белые медведи левши?' ] model_name = 'M-CLIP/LABSE-Vit-L-14' # Load Model & Tokenizer model = pt_multilingual_clip.MultilingualCLIP.from_pretrained(model_name) tokenizer = transformers.AutoTokenizer.from_pretrained(model_name) embeddings = model.forward(texts, tokenizer) print("Text features shape:", embeddings.shape) ``` Extracting embeddings from the corresponding image encoder: ```python import torch import clip import requests from PIL import Image device = "cuda" if torch.cuda.is_available() else "cpu" model, preprocess = clip.load("ViT-L/14", device=device) url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = Image.open(requests.get(url, stream=True).raw) image = preprocess(image).unsqueeze(0).to(device) with torch.no_grad(): image_features = model.encode_image(image) print("Image features shape:", image_features.shape) ``` ## Evaluation results None of the M-CLIP models have been extensivly evaluated, but testing them on Txt2Img retrieval on the humanly translated MS-COCO dataset, we see the following **R@10** results: | Name | En | De | Es | Fr | Zh | It | Pl | Ko | Ru | Tr | Jp | | ----------------------------------|:-----: |:-----: |:-----: |:-----: | :-----: |:-----: |:-----: |:-----: |:-----: |:-----: |:-----: | | [OpenAI CLIP Vit-B/32](https://github.com/openai/CLIP)| 90.3 | - | - | - | - | - | - | - | - | - | - | | [OpenAI CLIP Vit-L/14](https://github.com/openai/CLIP)| 91.8 | - | - | - | - | - | - | - | - | - | - | | [OpenCLIP ViT-B-16+-](https://github.com/openai/CLIP)| 94.3 | - | - | - | - | - | - | - | - | - | - | | [LABSE Vit-L/14](https://huggingface.co/M-CLIP/LABSE-Vit-L-14)| 91.6 | 89.6 | 89.5 | 89.9 | 88.9 | 90.1 | 89.8 | 80.8 | 85.5 | 89.8 | 73.9 | | [XLM-R Large Vit-B/32](https://huggingface.co/M-CLIP/XLM-Roberta-Large-Vit-B-32)| 91.8 | 88.7 | 89.1 | 89.4 | 89.3 | 89.8| 91.4 | 82.1 | 86.1 | 88.8 | 81.0 | | [XLM-R Vit-L/14](https://huggingface.co/M-CLIP/XLM-Roberta-Large-Vit-L-14)| 92.4 | 90.6 | 91.0 | 90.0 | 89.7 | 91.1 | 91.3 | 85.2 | 85.8 | 90.3 | 81.9 | | [XLM-R Large Vit-B/16+](https://huggingface.co/M-CLIP/XLM-Roberta-Large-Vit-B-16Plus)| **95.0** | **93.0** | **93.6** | **93.1** | **94.0** | **93.1** | **94.4** | **89.0** | **90.0** | **93.0** | **84.2** | ## Training/Model details Further details about the model training and data can be found in the [model card](https://github.com/FreddeFrallan/Multilingual-CLIP/blob/main/larger_mclip.md).
RUCAIBox/mvp-data-to-text
98ed82114e6e0c8c04b4d09057a4adb9f5283c70
2022-06-27T02:27:50.000Z
[ "pytorch", "mvp", "en", "arxiv:2206.12131", "transformers", "text-generation", "text2text-generation", "license:apache-2.0" ]
text2text-generation
false
RUCAIBox
null
RUCAIBox/mvp-data-to-text
243
1
transformers
3,344
--- license: apache-2.0 language: - en tags: - text-generation - text2text-generation pipeline_tag: text2text-generation widget: - text: "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man" example_title: "Example1" - text: "Describe the following data: First Clearing | LOCATION | On NYS 52 1 Mi. Youngsville [SEP] On NYS 52 1 Mi. Youngsville | CITY_OR_TOWN | Callicoon, New York" example_title: "Example2" --- # MVP-data-to-text The MVP-data-to-text model was proposed in [**MVP: Multi-task Supervised Pre-training for Natural Language Generation**](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen. The detailed information and instructions can be found [https://github.com/RUCAIBox/MVP](https://github.com/RUCAIBox/MVP). ## Model Description MVP-data-to-text is a prompt-based model that MVP is further equipped with prompts pre-trained using labeled data-to-text datasets. It is a variant (MVP+S) of our main [MVP](https://huggingface.co/RUCAIBox/mvp) model. It follows a Transformer encoder-decoder architecture with layer-wise prompts. MVP-data-to-text is specially designed for data-to-text generation tasks, such as KG-to-text generation (WebNLG, DART), table-to-text generation (WikiBio, ToTTo) and MR-to-text generation (E2E). ## Example ```python >>> from transformers import MvpTokenizer, MvpForConditionalGeneration >>> tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp") >>> model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp-data-to-text") >>> inputs = tokenizer( ... "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man", ... return_tensors="pt", ... ) >>> generated_ids = model.generate(**inputs) >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True) ['Iron Man is a fictional superhero appearing in American comic books published by Marvel Comics.'] ``` ## Related Models **MVP**: [https://huggingface.co/RUCAIBox/mvp](https://huggingface.co/RUCAIBox/mvp). **Prompt-based models**: - MVP-multi-task: [https://huggingface.co/RUCAIBox/mvp-multi-task](https://huggingface.co/RUCAIBox/mvp-multi-task). - MVP-summarization: [https://huggingface.co/RUCAIBox/mvp-summarization](https://huggingface.co/RUCAIBox/mvp-summarization). - MVP-open-dialog: [https://huggingface.co/RUCAIBox/mvp-open-dialog](https://huggingface.co/RUCAIBox/mvp-open-dialog). - MVP-data-to-text: [https://huggingface.co/RUCAIBox/mvp-data-to-text](https://huggingface.co/RUCAIBox/mvp-data-to-text). - MVP-story: [https://huggingface.co/RUCAIBox/mvp-story](https://huggingface.co/RUCAIBox/mvp-story). - MVP-question-answering: [https://huggingface.co/RUCAIBox/mvp-question-answering](https://huggingface.co/RUCAIBox/mvp-question-answering). - MVP-question-generation: [https://huggingface.co/RUCAIBox/mvp-question-generation](https://huggingface.co/RUCAIBox/mvp-question-generation). - MVP-task-dialog: [https://huggingface.co/RUCAIBox/mvp-task-dialog](https://huggingface.co/RUCAIBox/mvp-task-dialog). **Multi-task models**: - MTL-summarization: [https://huggingface.co/RUCAIBox/mtl-summarization](https://huggingface.co/RUCAIBox/mtl-summarization). - MTL-open-dialog: [https://huggingface.co/RUCAIBox/mtl-open-dialog](https://huggingface.co/RUCAIBox/mtl-open-dialog). - MTL-data-to-text: [https://huggingface.co/RUCAIBox/mtl-data-to-text](https://huggingface.co/RUCAIBox/mtl-data-to-text). - MTL-story: [https://huggingface.co/RUCAIBox/mtl-story](https://huggingface.co/RUCAIBox/mtl-story). - MTL-question-answering: [https://huggingface.co/RUCAIBox/mtl-question-answering](https://huggingface.co/RUCAIBox/mtl-question-answering). - MTL-question-generation: [https://huggingface.co/RUCAIBox/mtl-question-generation](https://huggingface.co/RUCAIBox/mtl-question-generation). - MTL-task-dialog: [https://huggingface.co/RUCAIBox/mtl-task-dialog](https://huggingface.co/RUCAIBox/mtl-task-dialog). ## Citation ```bibtex @article{tang2022mvp, title={MVP: Multi-task Supervised Pre-training for Natural Language Generation}, author={Tang, Tianyi and Li, Junyi and Zhao, Wayne Xin and Wen, Ji-Rong}, journal={arXiv preprint arXiv:2206.12131}, year={2022}, url={https://arxiv.org/abs/2206.12131}, } ```
datien228/distilbart-cnn-12-6-ftn-multi_news
0003822f8c64725fabd80ea41e2af35735e9871a
2022-07-11T11:26:02.000Z
[ "pytorch", "bart", "text2text-generation", "dataset:multi_news", "transformers", "summarization", "license:apache-2.0", "model-index", "autotrain_compatible" ]
summarization
false
datien228
null
datien228/distilbart-cnn-12-6-ftn-multi_news
243
null
transformers
3,345
--- license: apache-2.0 tags: - summarization datasets: - multi_news metrics: - rouge model-index: - name: distilbart-cnn-12-6-ftn-multi_news results: - task: name: Sequence-to-sequence Language Modeling type: summarization dataset: name: multi_news type: multi_news args: default metrics: - name: Rouge1 type: rouge value: 41.6136 --- <!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. --> # distilbart-cnn-12-6-ftn-multi_news This model is a fine-tuned version of [sshleifer/distilbart-cnn-12-6](https://huggingface.co/sshleifer/distilbart-cnn-12-6) on the multi_news dataset. It achieves the following results on the evaluation set: - Loss: 3.8143 - Rouge1: 41.6136 - Rouge2: 14.7454 - Rougel: 23.3597 - Rougelsum: 36.1973 - Gen Len: 130.874 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 4 - eval_batch_size: 4 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - num_epochs: 1 - mixed_precision_training: Native AMP - label_smoothing_factor: 0.1 ### Training results | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | Gen Len | |:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:---------:|:-------:| | 3.8821 | 0.89 | 2000 | 3.8143 | 41.6136 | 14.7454 | 23.3597 | 36.1973 | 130.874 | ### Framework versions - Transformers 4.20.1 - Pytorch 1.11.0+cu113 - Datasets 2.3.2 - Tokenizers 0.12.1
DongHai/DialoGPT-small-rick
6f955ce1472c2beeb54d9c9fdcf579c64dc9810e
2021-09-02T03:49:46.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
DongHai
null
DongHai/DialoGPT-small-rick
242
null
transformers
3,346
--- tags: - conversational --- # Rick DialoGPT Model
Huffon/klue-roberta-base-nli
3778d23ecb30a63babb17f5efb37b1493b08d975
2021-06-20T17:32:53.000Z
[ "pytorch", "roberta", "text-classification", "ko", "dataset:klue", "transformers", "nli" ]
text-classification
false
Huffon
null
Huffon/klue-roberta-base-nli
242
3
transformers
3,347
--- language: ko tags: - roberta - nli datasets: - klue ---
howey/electra-small-mnli
9e8a6bd9250be4dc610518aea8fcf8188f2ea637
2021-04-16T12:57:26.000Z
[ "pytorch", "electra", "text-classification", "transformers" ]
text-classification
false
howey
null
howey/electra-small-mnli
242
null
transformers
3,348
Entry not found
josephmagnayon/DialoGPT-medium-Alfred
f2cdc17ef60ce66ef878654103ca422c4567583c
2022-01-22T12:47:43.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
josephmagnayon
null
josephmagnayon/DialoGPT-medium-Alfred
242
null
transformers
3,349
--- tags: - conversational --- # Alfred DialoGPT
ken11/albert-base-japanese-v1
0b768a8c8052c9dddfbd58110c524c2c7d355239
2021-12-21T18:04:30.000Z
[ "pytorch", "tf", "albert", "fill-mask", "ja", "transformers", "japanese", "license:mit", "autotrain_compatible" ]
fill-mask
false
ken11
null
ken11/albert-base-japanese-v1
242
null
transformers
3,350
--- tags: - fill-mask - japanese - albert language: - ja license: mit widget: - text: "2022年の[MASK]概要" --- ## albert-base-japanese-v1 日本語事前学習済みALBERTモデルです ## How to use ### ファインチューニング このモデルはPreTrainedモデルです 基本的には各種タスク用にファインチューニングして使用されることを想定しています ### Fill-Mask このモデルではTokenizerにSentencepieceを利用しています そのままでは`[MASK]`トークンのあとに[余計なトークンが混入する問題](https://ken11.jp/blog/sentencepiece-tokenizer-bug)があるので、利用する際には以下のようにする必要があります #### for PyTorch ```py from transformers import ( AlbertForMaskedLM, AlbertTokenizerFast ) import torch tokenizer = AlbertTokenizerFast.from_pretrained("ken11/albert-base-japanese-v1") model = AlbertForMaskedLM.from_pretrained("ken11/albert-base-japanese-v1") text = "大学で[MASK]の研究をしています" tokenized_text = tokenizer.tokenize(text) del tokenized_text[tokenized_text.index(tokenizer.mask_token) + 1] input_ids = [tokenizer.cls_token_id] input_ids.extend(tokenizer.convert_tokens_to_ids(tokenized_text)) input_ids.append(tokenizer.sep_token_id) inputs = {"input_ids": [input_ids], "token_type_ids": [[0]*len(input_ids)], "attention_mask": [[1]*len(input_ids)]} batch = {k: torch.tensor(v, dtype=torch.int64) for k, v in inputs.items()} output = model(**batch)[0] _, result = output[0, input_ids.index(tokenizer.mask_token_id)].topk(5) print(tokenizer.convert_ids_to_tokens(result.tolist())) # ['英語', '心理学', '数学', '医学', '日本語'] ``` #### for TensorFlow ```py from transformers import ( TFAlbertForMaskedLM, AlbertTokenizerFast ) import tensorflow as tf tokenizer = AlbertTokenizerFast.from_pretrained("ken11/albert-base-japanese-v1") model = TFAlbertForMaskedLM.from_pretrained("ken11/albert-base-japanese-v1") text = "大学で[MASK]の研究をしています" tokenized_text = tokenizer.tokenize(text) del tokenized_text[tokenized_text.index(tokenizer.mask_token) + 1] input_ids = [tokenizer.cls_token_id] input_ids.extend(tokenizer.convert_tokens_to_ids(tokenized_text)) input_ids.append(tokenizer.sep_token_id) inputs = {"input_ids": [input_ids], "token_type_ids": [[0]*len(input_ids)], "attention_mask": [[1]*len(input_ids)]} batch = {k: tf.convert_to_tensor(v, dtype=tf.int32) for k, v in inputs.items()} output = model(**batch)[0] result = tf.math.top_k(output[0, input_ids.index(tokenizer.mask_token_id)], k=5) print(tokenizer.convert_ids_to_tokens(result.indices.numpy())) # ['英語', '心理学', '数学', '医学', '日本語'] ``` ## Training Data 学習には - [日本語Wikipediaの全文](https://ja.wikipedia.org/wiki/Wikipedia:%E3%83%87%E3%83%BC%E3%82%BF%E3%83%99%E3%83%BC%E3%82%B9%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89) - [livedoorニュースコーパス](https://www.rondhuit.com/download.html#ldcc) を利用しています ## Tokenizer トークナイザーは[Sentencepiece](https://github.com/google/sentencepiece)を利用しています こちらも学習データは同様です ## Licenese [The MIT license](https://opensource.org/licenses/MIT)
Merry/AID-Neo-125M
76b6c0e0e186878c6edf5d91b4cf38c94d191206
2022-04-28T22:53:53.000Z
[ "pytorch", "gpt_neo", "text-generation", "transformers" ]
text-generation
false
Merry
null
Merry/AID-Neo-125M
242
0
transformers
3,351
# AID-Neo-125M ## Model description This model was inspired by -- and finetuned on the same dataset of -- [KoboldAI's GPT-Neo-125M-AID (Mia) model](https://huggingface.co/KoboldAI/GPT-Neo-125M-AID): the AI Dungeon dataset (`text_adventures.txt`). This was to fix a possible oversight in the original model, which was trained with [an unfortunate bug](https://github.com/EricFillion/happy-transformer/issues/283). You could technically consider it a "retraining" of the same model using different software. ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 1 - eval_batch_size: 1 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 3.0
birgermoell/swedish-gpt
1c21a3855f89f8c544db2fa9fcc5499bd8885038
2021-07-17T07:45:52.000Z
[ "pytorch", "jax", "tensorboard", "gpt2", "text-generation", "sv", "transformers" ]
text-generation
false
birgermoell
null
birgermoell/swedish-gpt
241
1
transformers
3,352
--- language: sv widget: - text: "Jag är en svensk språkmodell." --- ## Model series This model is part of a series of models training on TPU with Flax Jax during Huggingface Flax/Jax challenge. ## Gpt models ## Swedish Gpt https://huggingface.co/birgermoell/swedish-gpt/ ## Swedish gpt wiki https://huggingface.co/flax-community/swe-gpt-wiki # Nordic gpt wiki https://huggingface.co/flax-community/nordic-gpt-wiki ## Dansk gpt wiki https://huggingface.co/flax-community/dansk-gpt-wiki ## Norsk gpt wiki https://huggingface.co/flax-community/norsk-gpt-wiki ## Roberta models ## Nordic Roberta Wiki https://huggingface.co/flax-community/nordic-roberta-wiki ## Swe Roberta Wiki Oscar https://huggingface.co/flax-community/swe-roberta-wiki-oscar ## Roberta Swedish Scandi https://huggingface.co/birgermoell/roberta-swedish-scandi ## Roberta Swedish https://huggingface.co/birgermoell/roberta-swedish ## Swedish T5 model https://huggingface.co/birgermoell/t5-base-swedish # GPT-svenska-wikipedia A swedish GPT2 style model trained using Flax CLM pipeline on the Swedish part of the wiki40b dataset and the Oscar dataset. https://huggingface.co/datasets/wiki40b The model was trained for around 22600 steps (42 hours) as part of the Huggingface Jax/Flax challenge with the following loss and learning rate Loss: 3.1715331077575684, Learning Rate: 0.0024816440418362617) The model could likely be trained for longer. ## Data cleaning and preprocessing The data was cleaned and preprocessed using the following script. Make sure to install depencies for beam_runner to make the dataset work. ```python from datasets import load_dataset def load_and_clean_wiki(): dataset = load_dataset('wiki40b', 'sv', beam_runner='DirectRunner', split="train") #dataset = load_dataset('wiki40b', 'sv', beam_runner='DirectRunner') dataset = dataset.remove_columns(['wikidata_id', 'version_id']) filtered_dataset = dataset.map(filter_wikipedia) # filtered_dataset[:3] # print(filtered_dataset[:3]) return filtered_dataset def filter_wikipedia(batch): batch["text"] = " ".join(batch["text"].split("\ _START_SECTION_\ ")) batch["text"] = " ".join(batch["text"].split("\ _START_ARTICLE_\ ")) batch["text"] = " ".join(batch["text"].split("\ _START_ARTICLE_\ ")) batch["text"] = " ".join(batch["text"].split("\ _START_PARAGRAPH_\ ")) batch["text"] = " ".join(batch["text"].split("_NEWLINE_")) batch["text"] = " ".join(batch["text"].split("\xa0")) return batch ``` ## Training script The following training script was used to train the model. ```bash ./run_clm_flax.py --output_dir="${MODEL_DIR}" --model_type="gpt2" --config_name="${MODEL_DIR}" --tokenizer_name="${MODEL_DIR}" --dataset_name="wiki40b" --dataset_config_name="sv" --do_train --do_eval --block_size="512" --per_device_train_batch_size="64" --per_device_eval_batch_size="64" --learning_rate="5e-3" --warmup_steps="1000" --adam_beta1="0.9" --adam_beta2="0.98" --weight_decay="0.01" --overwrite_output_dir --num_train_epochs="20" --logging_steps="500" --save_steps="1000" --eval_steps="2500" --push_to_hub ```
patrickvonplaten/wav2vec2-xlsr-53-es-kenlm
cc167e77d9e2afcf0e1234469769229bbdab1b32
2021-12-08T14:00:21.000Z
[ "pytorch", "wav2vec2", "automatic-speech-recognition", "es", "dataset:common_voice", "transformers", "audio", "speech", "xlsr-fine-tuning-week", "license:apache-2.0" ]
automatic-speech-recognition
false
patrickvonplaten
null
patrickvonplaten/wav2vec2-xlsr-53-es-kenlm
241
null
transformers
3,353
--- language: es datasets: - common_voice metrics: - wer - cer tags: - audio - automatic-speech-recognition - speech - xlsr-fine-tuning-week license: apache-2.0 --- # Wav2Vec2-Large-XLSR-53-Spanish-With-LM This is a model copy of [Wav2Vec2-Large-XLSR-53-Spanish](https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-spanish) that has language model support. This model card can be seen as a demo for the [pyctcdecode](https://github.com/kensho-technologies/pyctcdecode) integration with Transformers led by [this PR](https://github.com/huggingface/transformers/pull/14339). The PR explains in-detail how the integration works. In a nutshell: This PR adds a new Wav2Vec2WithLMProcessor class as drop-in replacement for Wav2Vec2Processor. The only change from the existing ASR pipeline will be: ```diff import torch from datasets import load_dataset from transformers import AutoModelForCTC, AutoProcessor import torchaudio.functional as F model_id = "patrickvonplaten/wav2vec2-xlsr-53-es-kenlm" sample = next(iter(load_dataset("common_voice", "es", split="test", streaming=True))) resampled_audio = F.resample(torch.tensor(sample["audio"]["array"]), 48_000, 16_000).numpy() model = AutoModelForCTC.from_pretrained(model_id) processor = AutoProcessor.from_pretrained(model_id) input_values = processor(resampled_audio, return_tensors="pt").input_values with torch.no_grad(): logits = model(input_values).logits -prediction_ids = torch.argmax(logits, dim=-1) -transcription = processor.batch_decode(prediction_ids) +transcription = processor.batch_decode(logits.numpy()).text # => 'bien y qué regalo vas a abrir primero' ``` **Improvement** This model has been compared on 512 speech samples from the Spanish Common Voice Test set and gives a nice *20 %* performance boost: The results can be reproduced by running *from this model repository*: | Model | WER | CER | | ------------- | ------------- | ------------- | | patrickvonplaten/wav2vec2-xlsr-53-es-kenlm | **8.44%** | **2.93%** | | jonatasgrosman/wav2vec2-large-xlsr-53-spanish | **10.20%** | **3.24%** | ``` bash run_ngram_wav2vec2.py 1 512 ``` ``` bash run_ngram_wav2vec2.py 0 512 ``` with `run_ngram_wav2vec2.py` being https://huggingface.co/patrickvonplaten/wav2vec2-large-xlsr-53-spanish-with-lm/blob/main/run_ngram_wav2vec2.py
tdopierre/ProtAugment-LM-HWU64
e8b98bca77aee8bb840cf8c029e61a7aaa5f5c8d
2021-07-01T13:52:14.000Z
[ "pytorch", "bert", "fill-mask", "transformers", "autotrain_compatible" ]
fill-mask
false
tdopierre
null
tdopierre/ProtAugment-LM-HWU64
241
null
transformers
3,354
Entry not found
mesolitica/wav2vec2-xls-r-300m-mixed
626d64add848693049722e7f2bdbe1d7237f393c
2022-06-02T04:58:36.000Z
[ "pytorch", "tf", "wav2vec2", "automatic-speech-recognition", "transformers", "generated_from_keras_callback", "model-index" ]
automatic-speech-recognition
false
mesolitica
null
mesolitica/wav2vec2-xls-r-300m-mixed
241
null
transformers
3,355
--- tags: - generated_from_keras_callback model-index: - name: wav2vec2-xls-r-300m-mixed results: [] --- <!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # wav2vec2-xls-r-300m-mixed Finetuned https://huggingface.co/facebook/wav2vec2-xls-r-300m on https://github.com/huseinzol05/malaya-speech/tree/master/data/mixed-stt This model was finetuned on 3 languages, 1. Malay 2. Singlish 3. Mandarin **This model trained on a single RTX 3090 Ti 24GB VRAM, provided by https://mesolitica.com/**. ## Evaluation set Evaluation set from https://github.com/huseinzol05/malaya-speech/tree/master/pretrained-model/prepare-stt with sizes, ``` len(malay), len(singlish), len(mandarin) -> (765, 3579, 614) ``` It achieves the following results on the evaluation set based on [evaluate-gpu.ipynb](evaluate-gpu.ipynb): Mixed evaluation, ``` CER: 0.0481054244857041 WER: 0.1322198446007387 CER with LM: 0.041196586938584696 WER with LM: 0.09880169127621556 ``` Malay evaluation, ``` CER: 0.051636391937588406 WER: 0.19561999547293663 CER with LM: 0.03917689630621449 WER with LM: 0.12710746406824835 ``` Singlish evaluation, ``` CER: 0.0494915200071987 WER: 0.12763802881676573 CER with LM: 0.04271234986432335 WER with LM: 0.09677160640413336 ``` Mandarin evaluation, ``` CER: 0.035626554824269824 WER: 0.07993515937860181 CER with LM: 0.03487760945087219 WER with LM: 0.07536807168546154 ``` Language model from https://huggingface.co/huseinzol05/language-model-bahasa-manglish-combined
asahi417/lmqg-mt5-small-koquad-multitask
61db0373d2ee4dd9bc9f4ae6285f7dd3bad1c908
2022-06-09T11:53:51.000Z
[ "pytorch", "mt5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
asahi417
null
asahi417/lmqg-mt5-small-koquad-multitask
241
null
transformers
3,356
Entry not found
ccoreilly/wav2vec2-large-xlsr-catala
a4467e83126071845d754ee648e9ec3b9c5f5268
2021-07-06T00:12:57.000Z
[ "pytorch", "jax", "wav2vec2", "automatic-speech-recognition", "ca", "dataset:common_voice", "dataset:parlament_parla", "transformers", "audio", "speech", "xlsr-fine-tuning-week", "license:apache-2.0", "model-index" ]
automatic-speech-recognition
false
ccoreilly
null
ccoreilly/wav2vec2-large-xlsr-catala
240
null
transformers
3,357
--- language: ca datasets: - common_voice - parlament_parla metrics: - wer tags: - audio - automatic-speech-recognition - speech - xlsr-fine-tuning-week license: apache-2.0 model-index: - name: Catalan XLSR Wav2Vec2 Large results: - task: name: Speech Recognition type: automatic-speech-recognition datasets: - name: Common Voice ca type: common_voice args: ca - name: ParlamentParla url: https://www.openslr.org/59/ metrics: - name: Test WER type: wer value: 6.92 - name: Google Crowsourced Corpus WER type: wer value: 12.99 - name: Audiobook “La llegenda de Sant Jordi” WER type: wer value: 13.23 --- # Wav2Vec2-Large-XLSR-Català Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Catalan language using the [Common Voice](https://huggingface.co/datasets/common_voice) and [ParlamentParla](https://www.openslr.org/59/) datasets. **Attention:** The split train/dev/test used does not fully map with the CommonVoice 6.1 dataset. A custom split was used combining both the CommonVoice and ParlamentParla dataset and can be found [here](https://github.com/ccoreilly/wav2vec2-catala). Evaluating on the CV test dataset will produce a biased WER as 1144 audio files of that dataset were used in training/evaluation of this model. WER was calculated using this [test.csv](https://github.com/ccoreilly/wav2vec2-catala/blob/master/test.csv) which was not seen by the model during training/evaluation. You can find training and evaluation scripts in the github repository [ccoreilly/wav2vec2-catala](https://github.com/ccoreilly/wav2vec2-catala) When using this model, make sure that your speech input is sampled at 16kHz. ## Results Word error rate was evaluated on the following datasets unseen by the model: | Dataset | WER | | ------- | --- | | [Test split CV+ParlamentParla]((https://github.com/ccoreilly/wav2vec2-catala/blob/master/test.csv)) | 6.92% | | [Google Crowsourced Corpus](https://www.openslr.org/69/) | 12.99% | | Audiobook “La llegenda de Sant Jordi” | 13.23% | ## Usage The model can be used directly (without a language model) as follows: ```python import torch import torchaudio from datasets import load_dataset from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor test_dataset = load_dataset("common_voice", "ca", split="test[:2%]") processor = Wav2Vec2Processor.from_pretrained("ccoreilly/wav2vec2-large-xlsr-catala") model = Wav2Vec2ForCTC.from_pretrained("ccoreilly/wav2vec2-large-xlsr-catala") resampler = torchaudio.transforms.Resample(48_000, 16_000) # Preprocessing the datasets. # We need to read the audio files as arrays def speech_file_to_array_fn(batch): speech_array, sampling_rate = torchaudio.load(batch["path"]) batch["speech"] = resampler(speech_array).squeeze().numpy() return batch test_dataset = test_dataset.map(speech_file_to_array_fn) inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True) with torch.no_grad(): logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits predicted_ids = torch.argmax(logits, dim=-1) print("Prediction:", processor.batch_decode(predicted_ids)) print("Reference:", test_dataset["sentence"][:2]) ```
google/bert_uncased_L-12_H-128_A-2
769ccb240a0acd026d94f84a96e8a754e4b8eff1
2021-05-19T17:26:01.000Z
[ "pytorch", "jax", "bert", "arxiv:1908.08962", "transformers", "license:apache-2.0" ]
null
false
google
null
google/bert_uncased_L-12_H-128_A-2
240
null
transformers
3,358
--- 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
monologg/koelectra-base-finetuned-nsmc
55c42190841c633ca53f6960dad762d41bf091b5
2020-08-18T18:41:06.000Z
[ "pytorch", "electra", "text-classification", "transformers" ]
text-classification
false
monologg
null
monologg/koelectra-base-finetuned-nsmc
240
null
transformers
3,359
Entry not found
ravephelps/DialoGPT-small-MichaelSbott
5ba2c3fd899e1c1693aaf06df22bdb5f1931c54a
2021-08-28T12:54:58.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
ravephelps
null
ravephelps/DialoGPT-small-MichaelSbott
240
null
transformers
3,360
--- tags: - conversational --- # Michael Scott DialoGPT Model
usamazaheer/DialoGPT-small-harrypotter
abe0dfc5a5a068668e5aeef17ef9b131578e4f7d
2022-02-08T20:18:36.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
usamazaheer
null
usamazaheer/DialoGPT-small-harrypotter
240
null
transformers
3,361
--- tags: - conversational --- #Harry Potter DialoGPT Model
xfbai/AMRBART-large
d45c7b63a746de710375ed78c4acf111db4ac029
2022-04-26T06:14:16.000Z
[ "pytorch", "bart", "text2text-generation", "en", "arxiv:2203.07836", "transformers", "AMRBART", "license:mit", "autotrain_compatible" ]
text2text-generation
false
xfbai
null
xfbai/AMRBART-large
240
1
transformers
3,362
--- language: en tags: - AMRBART license: mit --- ## AMRBART (large-sized model) AMRBART model is continually pre-trained on the English text and AMR Graphs based on the BART model. It was introduced in the paper: [Graph Pre-training for AMR Parsing and Generation](https://arxiv.org/pdf/2203.07836.pdf) by bai et al. in ACL 2022 and first released in [this repository](https://github.com/muyeby/AMRBART). ## Model description AMRBART follows the BART model which uses a transformer encoder-encoder architecture. AMRBART is pre-trained with 6 tasks: + learning to reconstruct the text based on the corrupted text. + learning to reconstruct AMR graphs based on the corrupted AMR graph. + learning to reconstruct the text based on the corrupted text and its corresponding AMR graph. + learning to reconstruct an AMR graph based on the corrupted AMR graph and its corresponding text. + learning to reconstruct the text based on the corrupted text and its corresponding corrupted AMR graph. + learning to reconstruct an AMR graph based on the corrupted AMR graph and its corresponding corrupted text. AMRBART is particularly effective when fine-tuned for AMR parsing and AMR-to-text generation tasks. ## Training data The AMRBART model is pre-trained on [AMR3.0](https://catalog.ldc.upenn.edu/LDC2020T02), a dataset consisting of 55,635 training instances and [English Gigaword](https://catalog.ldc.upenn.edu/LDC2003T05) (we randomly sampled 200,000 sentences). ## Intended uses & limitations You can use the raw model for either AMR encoding or AMR parsing, but it's mostly intended to be fine-tuned on a downstream task. ## How to use Here is how to initialize this model in PyTorch: ```python from transformers import BartForConditionalGeneration model = BartForConditionalGeneration.from_pretrained("xfbai/AMRBART-large") ``` Please refer to [this repository](https://github.com/muyeby/AMRBART) for tokenizer initialization and data preprocessing. ## BibTeX entry and citation info Please cite this paper if you find this model helpful ```bibtex @inproceedings{bai-etal-2022-graph, title = "Graph Pre-training for {AMR} Parsing and Generation", author = "Bai, Xuefeng and Chen, Yulong and Zhang, Yue", booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)", month = may, year = "2022", address = "Online", publisher = "Association for Computational Linguistics", url = "todo", doi = "todo", pages = "todo" } ```
ckiplab/bert-base-han-chinese-pos
7d182977911b6e6103c3a208ba0e1e4493284e8a
2022-07-04T08:09:23.000Z
[ "pytorch", "bert", "token-classification", "zh", "transformers", "license:gpl-3.0", "autotrain_compatible" ]
token-classification
false
ckiplab
null
ckiplab/bert-base-han-chinese-pos
240
null
transformers
3,363
--- language: - zh thumbnail: https://ckip.iis.sinica.edu.tw/files/ckip_logo.png tags: - pytorch - token-classification - bert - zh license: gpl-3.0 --- # CKIP BERT Base Han Chinese POS This model provides part-of-speech (POS) tagging for the ancient Chinese language. Our training dataset covers four eras of the Chinese language. ## Homepage * [ckiplab/han-transformers](https://github.com/ckiplab/han-transformers) ## Training Datasets The copyright of the datasets belongs to the Institute of Linguistics, Academia Sinica. * [中央研究院上古漢語標記語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/akiwi/kiwi.sh) * [中央研究院中古漢語語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/dkiwi/kiwi.sh) * [中央研究院近代漢語語料庫](http://lingcorpus.iis.sinica.edu.tw/cgi-bin/kiwi/pkiwi/kiwi.sh) * [中央研究院現代漢語語料庫](http://asbc.iis.sinica.edu.tw) ## Contributors * Chin-Tung Lin at [CKIP](https://ckip.iis.sinica.edu.tw/) ## Usage * Using our model in your script ```python from transformers import ( AutoTokenizer, AutoModel, ) tokenizer = AutoTokenizer.from_pretrained("ckiplab/bert-base-han-chinese-pos") model = AutoModel.from_pretrained("ckiplab/bert-base-han-chinese-pos") ``` * Using our model for inference ```python >>> from transformers import pipeline >>> classifier = pipeline("token-classification", model="ckiplab/bert-base-han-chinese-pos") >>> classifier("帝堯曰放勳") [{'entity': 'NB1', 'score': 0.99410427, 'index': 1, 'word': '帝', 'start': 0, 'end': 1}, {'entity': 'NB1', 'score': 0.98874336, 'index': 2, 'word': '堯', 'start': 1, 'end': 2}, {'entity': 'VG', 'score': 0.97059363, 'index': 3, 'word': '曰', 'start': 2, 'end': 3}, {'entity': 'NB1', 'score': 0.9864504, 'index': 4, 'word': '放', 'start': 3, 'end': 4}, {'entity': 'NB1', 'score': 0.9543974, 'index': 5, 'word': '勳', 'start': 4, 'end': 5}] ```
Bee-Garbs/DialoGPT-real-cartman-small
906eddd8e689bc80a2b6ed33c0ef5106950b59ca
2021-12-07T01:55:25.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
Bee-Garbs
null
Bee-Garbs/DialoGPT-real-cartman-small
239
null
transformers
3,364
--- tags: - conversational --- # Cartman Southpark DialoGPT2 small 18 epochs
flax-community/gpt-neo-125M-code-clippy
61cb8c8fbcd541027ddec252ed2e207d0dece23e
2021-07-26T14:07:46.000Z
[ "pytorch", "jax", "tensorboard", "gpt_neo", "text-generation", "arxiv:2107.03374", "transformers" ]
text-generation
false
flax-community
null
flax-community/gpt-neo-125M-code-clippy
239
3
transformers
3,365
# GPT-Neo-125M-Code-Clippy > **Please refer to our new [GitHub Wiki](https://github.com/ncoop57/gpt-code-clippy/wiki) which documents our efforts in detail in creating the open source version of GitHub Copilot** ## Model Description GPT-Neo-125M-Code-Clippy is a [GPT-Neo-125M model](https://huggingface.co/EleutherAI/gpt-neo-125M) finetuned using causal language modeling on our version of the Code Clippy Data dataset that has duplicates, which was scraped from public Github repositories (more information in the provided link). This model is specialized to autocomplete methods in multiple programming languages. As discussed in OpenAI's [Codex paper](https://arxiv.org/abs/2107.03374), we modified the GPT-Neo model and tokenizer to accommodate for additional whitespace characters. Specifically, we add the following tokens `["\t\t", " ", " ", " "]` and since they are all related to indentation, we initialize the embedding layer of these tokens with the same weights as the `\t` token already present in the model in hopes the model will learn to associate these whitespace characters with indentation faster. A script to automatically do this can be found [here](https://github.com/ncoop57/gpt-code-clippy/blob/camera-ready/training/utilities/add_new_tokens.py). ## Training data [Code Clippy Data dataset](https://the-eye.eu/public/AI/training_data/code_clippy_data/code_clippy_dedup_data/). ## Training procedure The training script used to train this model can be found [here](https://github.com/ncoop57/gpt-code-clippy/blob/camera-ready/training/run_clm_streaming_flax.py). To reproduce the training one can use this command with the above script: ```bash ./run_clm_streaming_flax.py \ --output_dir $HOME/gpt-neo-125M-code-clippy \ --model_name_or_path="flax-community/gpt-neo-125M-code-clippy" \ --dataset_name $HOME/gpt-code-clippy/data_processing/code_clippy.py \ --data_dir /home/shared/code_clippy_data \ --text_column_name="text" \ --do_train --do_eval \ --block_size="2048" \ --per_device_train_batch_size="8" \ --per_device_eval_batch_size="16" \ --preprocessing_num_workers="8" \ --learning_rate="1e-4" \ --max_steps 100000 \ --warmup_steps 2500 \ --decay_steps 25000 \ --adam_beta1="0.9" \ --adam_beta2="0.95" \ --weight_decay="0.1" \ --overwrite_output_dir \ --logging_steps="100" \ --eval_steps="500" \ --push_to_hub="False" \ --report_to="all" \ --dtype="bfloat16" \ --skip_memory_metrics="True" \ --save_steps="500" \ --save_total_limit 10 \ --gradient_accumulation_steps 16 \ --report_to="wandb" \ --run_name="125m_1e-4lr_1024bs" \ --max_eval_samples 2000 \ --save_optimizer true ``` ## Intended Use and Limitations The model is finetuned on text files from github repositories (mostly programming languages but also markdown and other project related files). ### How to use You can use this model directly with a pipeline for text generation. This example generates a different sequence each time it's run: ```py from transformers import AutoModelForCausalLM, AutoTokenizer, FlaxAutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("flax-community/gpt-neo-125M-code-clippy") tokenizer = AutoTokenizer.from_pretrained("flax-community/gpt-neo-125M-code-clippy") prompt = """def greet(name): '''A function to greet user. Given a user name it should say hello''' """ input_ids = tokenizer(prompt, return_tensors='pt').input_ids.to(device) start = input_ids.size(1) out = model.generate(input_ids, do_sample=True, max_length=50, num_beams=2, early_stopping=True, eos_token_id=tokenizer.eos_token_id, ) print(tokenizer.decode(out[0][start:])) ``` ### Limitations and Biases The model is intended to be used for research purposes and comes with no guarantees of quality of generated code. The paper ["Evaluating Large Language Models Trained on Code"](https://arxiv.org/abs/2107.03374) from OpenAI has a good discussion on what the impact of a large language model trained on code could be. Therefore, some parts of their discuss are highlighted here as it pertains to this dataset and models that may be trained from it. **As well as some differences in views from the paper, particularly around legal implications**. 1. **Over-reliance:** This model may generate plausible solutions that may appear correct, but are not necessarily the correct solution. Not properly evaluating the generated code may cause have negative consequences such as the introduction of bugs, or the introduction of security vulnerabilities. Therefore, it is important that users are aware of the limitations and potential negative consequences of using this language model. 2. **Economic and labor market impacts:** Large language models trained on large code datasets such as this one that are capable of generating high-quality code have the potential to automate part of the software development process. This may negatively impact software developers. However, as discussed in the paper, as shown in the Summary Report of software developers from [O*NET OnLine](https://www.onetonline.org/link/summary/15-1252.00), developers don't just write software. 3. **Security implications:** No filtering or checking of vulnerabilities or buggy code was performed on the datase this model is trained on. This means that the dataset may contain code that may be malicious or contain vulnerabilities. Therefore, this model may generate vulnerable, buggy, or malicious code. In safety critical software, this could lead to software that may work improperly and could result in serious consequences depending on the software. Additionally, this model may be able to be used to generate malicious code on purpose in order to perform ransomware or other such attacks. 4. **Legal implications:** No filtering was performed on licensed code. This means that the dataset may contain restrictive licensed code. As discussed in the paper, public Github repositories may fall under "fair use." However, there has been little to no previous cases of such usages of licensed publicly available code. Therefore, any code generated with this model may be required to obey license terms that align with the software it was trained on such as GPL-3.0. It is unclear the legal ramifications of using a language model trained on this dataset. 5. **Biases:** The programming languages most represented in the dataset this model was trained on are Javascript and Python. Therefore, other, still popular languages such as C and C++, are less represented and therefore the models performance for these languages will be less comparatively. Additionally, this dataset only contains public repositories and so the model may not generate code that is representative of code written by private developers. No filtering was performed for potential racist, offensive, or otherwise inappropriate content. Therefore, this model may reflect such biases in its generation. GPT-Neo-125M-Code-Clippy is finetuned from GPT-Neo and might have inherited biases and limitations from it. See [GPT-Neo model card](https://huggingface.co/EleutherAI/gpt-neo-125M#limitations-and-biases) for details. ## Eval results Coming soon...
microsoft/beit-base-patch16-384
3f8133fb4ce0cd802b8eab61edd881bc2a624597
2022-01-28T10:19:30.000Z
[ "pytorch", "jax", "beit", "image-classification", "dataset:imagenet", "dataset:imagenet-21k", "arxiv:2106.08254", "transformers", "vision", "license:apache-2.0" ]
image-classification
false
microsoft
null
microsoft/beit-base-patch16-384
239
null
transformers
3,366
--- license: apache-2.0 tags: - image-classification - vision datasets: - imagenet - imagenet-21k --- # BEiT (base-sized model, fine-tuned on ImageNet-1k) BEiT model pre-trained in a self-supervised fashion on ImageNet-21k (14 million images, 21,841 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 [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 BeitFeatureExtractor, BeitForImageClassification 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 = BeitFeatureExtractor.from_pretrained('microsoft/beit-base-patch16-384') model = BeitForImageClassification.from_pretrained('microsoft/beit-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. ## 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 [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/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 (384x384). 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} } ```
textattack/albert-base-v2-CoLA
3e02233591f32405d343657a2f056d5afe21e86c
2020-07-06T16:28:50.000Z
[ "pytorch", "albert", "text-classification", "transformers" ]
text-classification
false
textattack
null
textattack/albert-base-v2-CoLA
239
null
transformers
3,367
## TextAttack Model Cardand the glue dataset loaded using the `nlp` library. The model was fine-tuned for 5 epochs with a batch size of 32, a learning rate of 3e-05, and a maximum sequence length of 128. Since this was a classification task, the model was trained with a cross-entropy loss function. The best score the model achieved on this task was 0.8245445829338447, as measured by the eval set accuracy, found after 2 epochs. For more information, check out [TextAttack on Github](https://github.com/QData/TextAttack).
asahi417/lmqg-mt5-small-dequad-multitask
85235e035cbb84aff9c9a1d3147e7ea85b078369
2022-06-09T11:26:43.000Z
[ "pytorch", "mt5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
asahi417
null
asahi417/lmqg-mt5-small-dequad-multitask
239
null
transformers
3,368
Entry not found
asahi417/lmqg-mt5-small-ruquad-multitask
4ba9350bfd985f2889ddff293bedb214e76decdf
2022-06-13T01:33:14.000Z
[ "pytorch", "mt5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
asahi417
null
asahi417/lmqg-mt5-small-ruquad-multitask
239
null
transformers
3,369
Entry not found
sijunhe/nezha-large-wwm
7f1935e1fba27f5ca374439228e8317d1975eee4
2022-06-24T03:55:48.000Z
[ "pytorch", "nezha", "fill-mask", "arxiv:1909.00204", "transformers", "license:afl-3.0", "autotrain_compatible" ]
fill-mask
false
sijunhe
null
sijunhe/nezha-large-wwm
239
null
transformers
3,370
--- license: afl-3.0 --- **Please use 'Bert' related tokenizer classes and 'Nezha' related model classes** [NEZHA: Neural Contextualized Representation for Chinese Language Understanding](https://arxiv.org/abs/1909.00204) Junqiu Wei, Xiaozhe Ren, Xiaoguang Li, Wenyong Huang, Yi Liao, Yasheng Wang, Jiashu Lin, Xin Jiang, Xiao Chen and Qun Liu. The original checkpoints can be found [here](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/NEZHA-PyTorch) ## Example Usage ``` from transformers import BertTokenizer, NezhaModel tokenizer = BertTokenizer.from_pretrained("sijunhe/nezha-large-wwm") model = NezhaModel.from_pretrained("sijunhe/nezha-large-wwm") text = "我爱北京天安门" encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ```
Ivo/emscad-skill-extraction-conference-token-classification
1e7c8e8ddf8726ebd8b10d7375b95d123c4c22b8
2021-06-15T09:20:03.000Z
[ "pytorch", "tf", "bert", "token-classification", "transformers", "autotrain_compatible" ]
token-classification
false
Ivo
null
Ivo/emscad-skill-extraction-conference-token-classification
238
null
transformers
3,371
Entry not found
finiteautomata/beto-headlines-sentiment-analysis
e73e01865fe516e5e9f5bf31eff1606b70b1d741
2021-07-06T12:33:57.000Z
[ "pytorch", "bert", "text-classification", "transformers" ]
text-classification
false
finiteautomata
null
finiteautomata/beto-headlines-sentiment-analysis
238
null
transformers
3,372
# Targeted Sentiment Analysis in News Headlines BERT classifier fine-tuned in a news headlines dataset annotated for target polarity. (details to be published) ## Examples Input is as follows `Headline [SEP] Target` where headline is the news title and target is an entity present in the headline. Try `Alberto Fernández: "El gobierno de Macri fue un desastre" [SEP] Macri` (should be NEG) and `Alberto Fernández: "El gobierno de Macri fue un desastre" [SEP] Alberto Fernández` (POS or NEU)
tinega/DialoGPT-small-harrypotter
4dfb8aaddd1f825ba362ea8f43dcbcda06cfba1f
2022-02-14T11:32:35.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
tinega
null
tinega/DialoGPT-small-harrypotter
238
null
transformers
3,373
--- tags: - conversational --- # Harry Potter DialoGPT MOdel
wietsedv/bert-base-dutch-cased-finetuned-udlassy-pos
769f7d091081bc31f6134ba497fa52e1531b94a8
2021-05-20T09:11:56.000Z
[ "pytorch", "jax", "bert", "token-classification", "transformers", "autotrain_compatible" ]
token-classification
false
wietsedv
null
wietsedv/bert-base-dutch-cased-finetuned-udlassy-pos
238
null
transformers
3,374
Entry not found
IDEA-CCNL/Erlangshen-Longformer-110M
54d92f1ea27093c63bb48881c8efba3349c7df58
2022-07-17T09:21:35.000Z
[ "pytorch", "longformer", "zh", "transformers", "license:apache-2.0" ]
null
false
IDEA-CCNL
null
IDEA-CCNL/Erlangshen-Longformer-110M
238
1
transformers
3,375
--- language: - zh license: apache-2.0 widget: - text: "生活的真谛是[MASK]。" --- # longformer model (Chinese),one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM). We modify the original position code of longformer to rotational position coding,and on the basis of [chinese_roformer_L-12_H-768_A-12.zip](https://github.com/ZhuiyiTechnology/roformer), use 180G of data to continue training ## Usage There is no structure of Longformer-base in [Transformers](https://github.com/huggingface/transformers), you can run follow code to get structure of longformer from [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM) ```shell git clone https://github.com/IDEA-CCNL/Fengshenbang-LM.git ``` ### Load Model ```python from fengshen import LongformerModel from fengshen import LongformerConfig from transformers import BertTokenizer tokenizer = BertTokenizer.from_pretrained("IDEA-CCNL/Erlangshen-Longformer-110M") config = LongformerConfig.from_pretrained("IDEA-CCNL/Erlangshen-Longformer-110M") model = LongformerModel.from_pretrained("IDEA-CCNL/Erlangshen-Longformer-110M") ``` ## Citation If you find the resource is useful, please cite the following website in your paper. ``` @misc{Fengshenbang-LM, title={Fengshenbang-LM}, author={IDEA-CCNL}, year={2021}, howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}}, } ```
shibing624/bert4ner-base-chinese
a24a2c4d3c5f2ca37b7bceb1991f1ce573e10530
2022-05-07T13:32:36.000Z
[ "pytorch", "bert", "token-classification", "zh", "transformers", "ner", "license:apache-2.0", "autotrain_compatible" ]
token-classification
false
shibing624
null
shibing624/bert4ner-base-chinese
238
1
transformers
3,376
--- language: - zh tags: - bert - pytorch - zh - ner license: "apache-2.0" --- # BERT for Chinese Named Entity Recognition(bert4ner) Model 中文实体识别模型 `bert4ner-base-chinese` evaluate PEOPLE(人民日报) test data: The overall performance of BERT on people **test**: | | Accuracy | Recall | F1 | | ------------ | ------------------ | ------------------ | ------------------ | | BertSoftmax | 0.9425 | 0.9627 | 0.9525 | 在PEOPLE的测试集上达到接近SOTA水平。 BertSoftmax的网络结构(原生BERT): ![arch](bert.png) ## Usage 本项目开源在实体识别项目:[nerpy](https://github.com/shibing624/nerpy),可支持bert4ner模型,通过如下命令调用: ```shell >>> from nerpy import NERModel >>> model = NERModel("bert", "shibing624/bert4ner-base-chinese") >>> predictions, raw_outputs, entities = model.predict(["常建良,男,1963年出生,工科学士,高级工程师"], split_on_space=False) entities: [('常建良', 'PER'), ('1963年', 'TIME')] ``` 模型文件组成: ``` bert4ner-base-chinese ├── config.json ├── model_args.json ├── pytorch_model.bin ├── special_tokens_map.json ├── tokenizer_config.json └── vocab.txt ``` ## Usage (HuggingFace Transformers) Without [nerpy](https://github.com/shibing624/nerpy), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the bio tag to get the entity words. Install package: ``` pip install transformers seqeval ``` ```python import os import torch from transformers import AutoTokenizer, AutoModelForTokenClassification from seqeval.metrics.sequence_labeling import get_entities os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained("shibing624/bert4ner-base-chinese") model = AutoModelForTokenClassification.from_pretrained("shibing624/bert4ner-base-chinese") label_list = ['I-ORG', 'B-LOC', 'O', 'B-ORG', 'I-LOC', 'I-PER', 'B-TIME', 'I-TIME', 'B-PER'] sentence = "王宏伟来自北京,是个警察,喜欢去王府井游玩儿。" def get_entity(sentence): tokens = tokenizer.tokenize(sentence) inputs = tokenizer.encode(sentence, return_tensors="pt") with torch.no_grad(): outputs = model(inputs).logits predictions = torch.argmax(outputs, dim=2) char_tags = [(token, label_list[prediction]) for token, prediction in zip(tokens, predictions[0].numpy())][1:-1] print(sentence) print(char_tags) pred_labels = [i[1] for i in char_tags] entities = [] line_entities = get_entities(pred_labels) for i in line_entities: word = sentence[i[1]: i[2] + 1] entity_type = i[0] entities.append((word, entity_type)) print("Sentence entity:") print(entities) get_entity(sentence) ``` output: ```shell 王宏伟来自北京,是个警察,喜欢去王府井游玩儿。 [('王', 'B-PER'), ('宏', 'I-PER'), ('伟', 'I-PER'), ('来', 'O'), ('自', 'O'), ('北', 'B-LOC'), ('京', 'I-LOC'), (',', 'O'), ('是', 'O'), ('个', 'O'), ('警', 'O'), ('察', 'O'), (',', 'O'), ('喜', 'O'), ('欢', 'O'), ('去', 'O'), ('王', 'B-LOC'), ('府', 'I-LOC'), ('井', 'I-LOC'), ('游', 'O'), ('玩', 'O'), ('儿', 'O'), ('。', 'O')] Sentence entity: [('王宏伟', 'PER'), ('北京', 'LOC'), ('王府井', 'LOC')] ``` ### 训练数据集 #### 中文实体识别数据集 | 数据集 | 语料 | 下载链接 | 文件大小 | | :------- | :--------- | :---------: | :---------: | | **`CNER中文实体识别数据集`** | CNER(12万字) | [CNER github](https://github.com/shibing624/nerpy/tree/main/examples/data/cner)| 1.1MB | | **`PEOPLE中文实体识别数据集`** | 人民日报数据集(200万字) | [PEOPLE github](https://github.com/shibing624/nerpy/tree/main/examples/data/people)| 12.8MB | CNER中文实体识别数据集,数据格式: ```text 美 B-LOC 国 I-LOC 的 O 华 B-PER 莱 I-PER 士 I-PER 我 O 跟 O 他 O ``` 如果需要训练bert4ner,请参考[https://github.com/shibing624/nerpy/tree/main/examples](https://github.com/shibing624/nerpy/tree/main/examples) ## Citation ```latex @software{nerpy, author = {Xu Ming}, title = {nerpy: Named Entity Recognition toolkit}, year = {2022}, url = {https://github.com/shibing624/nerpy}, } ```
asahi417/lmqg-mt5-small-esquad-multitask
9d383943a66228eda00534e3868198226f78a082
2022-06-09T12:16:25.000Z
[ "pytorch", "mt5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
asahi417
null
asahi417/lmqg-mt5-small-esquad-multitask
238
null
transformers
3,377
Entry not found
asahi417/lmqg-mt5-small-itquad-multitask
201d943215034814684f418aeed7fa454eaec867
2022-06-13T10:48:19.000Z
[ "pytorch", "mt5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
asahi417
null
asahi417/lmqg-mt5-small-itquad-multitask
238
null
transformers
3,378
Entry not found
asahi417/lmqg-mt5-small-frquad-multitask
df829846a77664f656e66fb3dce336c99777dce0
2022-06-13T12:23:16.000Z
[ "pytorch", "mt5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
asahi417
null
asahi417/lmqg-mt5-small-frquad-multitask
238
null
transformers
3,379
Entry not found
ElKulako/cryptobert
2e1ec4c73a4608b98d15fa4bb9b17ddd61bc61a4
2022-07-10T22:22:24.000Z
[ "pytorch", "roberta", "text-classification", "en", "dataset:ElKulako/stocktwits-crypto", "transformers", "cryptocurrency", "crypto", "BERT", "sentiment classification", "NLP", "bitcoin", "ethereum", "shib", "social media", "sentiment analysis", "cryptocurrency sentiment analysis" ]
text-classification
false
ElKulako
null
ElKulako/cryptobert
238
1
transformers
3,380
--- datasets: - ElKulako/stocktwits-crypto language: - en tags: - cryptocurrency - crypto - BERT - sentiment classification - NLP - bitcoin - ethereum - shib - social media - sentiment analysis - cryptocurrency sentiment analysis --- # CryptoBERT CryptoBERT is a pre-trained NLP model to analyse the language and sentiments of cryptocurrency-related social media posts and messages. It was built by further training the [cardiffnlp's Twitter-roBERTa-base](https://huggingface.co/cardiffnlp/twitter-roberta-base) language model on the cryptocurrency domain, using a corpus of over 3.2M unique cryptocurrency-related social media posts. (A research paper with more details will follow soon.) ## Classification Training The model was trained on the following labels: "Bearish" : 0, "Neutral": 1, "Bullish": 2 CryptoBERT's sentiment classification head was fine-tuned on a balanced dataset of 2M labelled StockTwits posts, sampled from [ElKulako/stocktwits-crypto](https://huggingface.co/datasets/ElKulako/stocktwits-crypto). CryptoBERT was trained with a max sequence length of 128. Technically, it can handle sequences of up to 514 tokens, however, going beyond 128 is not recommended. # Classification Example ```python from transformers import TextClassificationPipeline, AutoModelForSequenceClassification, AutoTokenizer model_name = "ElKulako/cryptobert" tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True) model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels = 3) pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, max_length=64, truncation=True, padding = 'max_length') # post_1 & post_3 = bullish, post_2 = bearish post_1 = " see y'all tomorrow and can't wait to see ada in the morning, i wonder what price it is going to be at. 😎🐂🤠💯😴, bitcoin is looking good go for it and flash by that 45k. " post_2 = " alright racers, it’s a race to the bottom! good luck today and remember there are no losers (minus those who invested in currency nobody really uses) take your marks... are you ready? go!!" post_3 = " i'm never selling. the whole market can bottom out. i'll continue to hold this dumpster fire until the day i die if i need to." df_posts = [post_1, post_2, post_3] preds = pipe(df_posts) print(preds) ``` ``` [{'label': 'Bullish', 'score': 0.8734585642814636}, {'label': 'Bearish', 'score': 0.9889495372772217}, {'label': 'Bullish', 'score': 0.6595883965492249}] ``` ## Training Corpus CryptoBERT was trained on 3.2M social media posts regarding various cryptocurrencies. Only non-duplicate posts of length above 4 words were considered. The following communities were used as sources for our corpora: (1) StockTwits - 1.875M posts about the top 100 cryptos by trading volume. Posts were collected from the 1st of November 2021 to the 16th of June 2022. [ElKulako/stocktwits-crypto](https://huggingface.co/datasets/ElKulako/stocktwits-crypto) (2) Telegram - 664K posts from top 5 telegram groups: [Binance](https://t.me/binanceexchange), [Bittrex](https://t.me/BittrexGlobalEnglish), [huobi global](https://t.me/huobiglobalofficial), [Kucoin](https://t.me/Kucoin_Exchange), [OKEx](https://t.me/OKExOfficial_English). Data from 16.11.2020 to 30.01.2021. Courtesy of [Anton](https://www.kaggle.com/datasets/aagghh/crypto-telegram-groups). (3) Reddit - 172K comments from various crypto investing threads, collected from May 2021 to May 2022 (4) Twitter - 496K posts with hashtags XBT, Bitcoin or BTC. Collected for May 2018. Courtesy of [Paul](https://www.kaggle.com/datasets/paul92s/bitcoin-tweets-14m).
DaNLP/da-bert-tone-subjective-objective
b0a47450aa6992164d0c990056b1f64c1e1b2d4b
2021-09-23T13:37:20.000Z
[ "pytorch", "tf", "bert", "text-classification", "da", "dataset:Twitter Sentiment", "dataset:Europarl Sentiment", "transformers", "subjectivity", "objectivity", "license:cc-by-sa-4.0" ]
text-classification
false
DaNLP
null
DaNLP/da-bert-tone-subjective-objective
237
1
transformers
3,381
--- language: - da tags: - bert - pytorch - subjectivity - objectivity license: cc-by-sa-4.0 datasets: - Twitter Sentiment - Europarl Sentiment widget: - text: Jeg tror alligvel, det bliver godt metrics: - f1 --- # Danish BERT Tone for the detection of subjectivity/objectivity The BERT Tone model detects whether a text (in Danish) is subjective or objective. The model is based on the finetuning of the pretrained [Danish BERT](https://github.com/certainlyio/nordic_bert) model by BotXO. See the [DaNLP documentation](https://danlp-alexandra.readthedocs.io/en/latest/docs/tasks/sentiment_analysis.html#bert-tone) for more details. Here is how to use the model: ```python from transformers import BertTokenizer, BertForSequenceClassification model = BertForSequenceClassification.from_pretrained("DaNLP/da-bert-tone-subjective-objective") tokenizer = BertTokenizer.from_pretrained("DaNLP/da-bert-tone-subjective-objective") ``` ## Training data The data used for training come from the [Twitter Sentiment](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#twitsent) and [EuroParl sentiment 2](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#europarl-sentiment2) datasets.
megantosh/flair-arabic-multi-ner
75348fbb37f7a264dd4baf7ea7cc4062c0de0cb0
2022-03-09T22:12:22.000Z
[ "pytorch", "ar", "en", "dataset:AQMAR", "dataset:ANERcorp", "flair", "Text Classification", "token-classification", "sequence-tagger-model", "license:apache-2.0" ]
token-classification
false
megantosh
null
megantosh/flair-arabic-multi-ner
237
null
flair
3,382
--- language: - ar - en license: apache-2.0 datasets: - AQMAR - ANERcorp thumbnail: https://www.informatik.hu-berlin.de/en/forschung-en/gebiete/ml-en/resolveuid/a6f82e0d7fa446a59c902cac4cafa9cb/@@images/image/preview tags: - flair - Text Classification - token-classification - sequence-tagger-model metrics: - f1 widget: - text: أعرف كل شيء عن جيجي - text: ترتقي شريحة M1 Pro وشريحة M1 Max ببنية شريحة M1 المذهلة إلى مستويات جديدة، إذ تأتيان للمرة الأولى ببنية نظام متكامل في شريحة (SoC) إلى جهاز نوت بوك للمحترفين. - text: "اختارها خيري بشارة كممثلة، دون سابقة معرفة أو تجربة تمثيلية، لتقف بجانب فاتن حمامة في فيلم «يوم مر ويوم حلو» (1988) وهي ما زالت شابة لم تتخطَ عامها الثاني" --- # Arabic NER Model using Flair Embeddings Training was conducted over 94 epochs, using a linear decaying learning rate of 2e-05, starting from 0.225 and a batch size of 32 with GloVe and Flair forward and backward embeddings. ## Original Datasets: - [AQMAR](http://www.cs.cmu.edu/~ark/ArabicNER/) - [ANERcorp](http://curtis.ml.cmu.edu/w/courses/index.php/ANERcorp) ## Results: - F1-score (micro) 0.8666 - F1-score (macro) 0.8488 | | Named Entity Type | True Posititves | False Positives | False Negatives | Precision | Recall | class-F1 | |------|-|----|----|----|-----------|--------|----------| | LOC | Location| 539 | 51 | 68 | 0.9136 | 0.8880 | 0.9006 | | MISC | Miscellaneous|408 | 57 | 89 | 0.8774 | 0.8209 | 0.8482 | | ORG | Organisation|167 | 43 | 64 | 0.7952 | 0.7229 | 0.7574 | | PER | Person (no title)|501 | 65 | 60 | 0.8852 | 0.8930 | 0.8891 | --- # Usage ```python from flair.data import Sentence from flair.models import SequenceTagger import pyarabic.araby as araby from icecream import ic tagger = SequenceTagger.load("julien-c/flair-ner") arTagger = SequenceTagger.load('megantosh/flair-arabic-multi-ner') sentence = Sentence('George Washington went to Washington .') arSentence = Sentence('عمرو عادلي أستاذ للاقتصاد السياسي المساعد في الجامعة الأمريكية بالقاهرة .') # predict NER tags tagger.predict(sentence) arTagger.predict(arSentence) # print sentence with predicted tags ic(sentence.to_tagged_string) ic(arSentence.to_tagged_string) ``` # Example ```bash 2021-07-07 14:30:59,649 loading file /Users/mega/.flair/models/flair-ner/f22eb997f66ae2eacad974121069abaefca5fe85fce71b49e527420ff45b9283.941c7c30b38aef8d8a4eb5c1b6dd7fe8583ff723fef457382589ad6a4e859cfc 2021-07-07 14:31:04,654 loading file /Users/mega/.flair/models/flair-arabic-multi-ner/c7af7ddef4fdcc681fcbe1f37719348afd2862b12aa1cfd4f3b93bd2d77282c7.242d030cb106124f7f9f6a88fb9af8e390f581d42eeca013367a86d585ee6dd6 ic| sentence.to_tagged_string: <bound method Sentence.to_tagged_string of Sentence: "George Washington went to Washington ." [− Tokens: 6 − Token-Labels: "George <B-PER> Washington <E-PER> went to Washington <S-LOC> ."]> ic| arSentence.to_tagged_string: <bound method Sentence.to_tagged_string of Sentence: "عمرو عادلي أستاذ للاقتصاد السياسي المساعد في الجامعة الأمريكية بالقاهرة ." [− Tokens: 11 − Token-Labels: "عمرو <B-PER> عادلي <I-PER> أستاذ للاقتصاد السياسي المساعد في الجامعة <B-ORG> الأمريكية <I-ORG> بالقاهرة <B-LOC> ."]> ic| entity: <PER-span (1,2): "George Washington"> ic| entity: <LOC-span (5): "Washington"> ic| entity: <PER-span (1,2): "عمرو عادلي"> ic| entity: <ORG-span (8,9): "الجامعة الأمريكية"> ic| entity: <LOC-span (10): "بالقاهرة"> ic| sentence.to_dict(tag_type='ner'): {"text":"عمرو عادلي أستاذ للاقتصاد السياسي المساعد في الجامعة الأمريكية بالقاهرة .", "labels":[], {"entities":[{{{ "text":"عمرو عادلي", "start_pos":0, "end_pos":10, "labels":[PER (0.9826)]}, {"text":"الجامعة الأمريكية", "start_pos":45, "end_pos":62, "labels":[ORG (0.7679)]}, {"text":"بالقاهرة", "start_pos":64, "end_pos":72, "labels":[LOC (0.8079)]}]} "text":"George Washington went to Washington .", "labels":[], "entities":[{ {"text":"George Washington", "start_pos":0, "end_pos":17, "labels":[PER (0.9968)]}, {"text":"Washington""start_pos":26, "end_pos":36, "labels":[LOC (0.9994)]}}]} ``` # Model Configuration ```python SequenceTagger( (embeddings): StackedEmbeddings( (list_embedding_0): WordEmbeddings('glove') (list_embedding_1): FlairEmbeddings( (lm): LanguageModel( (drop): Dropout(p=0.1, inplace=False) (encoder): Embedding(7125, 100) (rnn): LSTM(100, 2048) (decoder): Linear(in_features=2048, out_features=7125, bias=True) ) ) (list_embedding_2): FlairEmbeddings( (lm): LanguageModel( (drop): Dropout(p=0.1, inplace=False) (encoder): Embedding(7125, 100) (rnn): LSTM(100, 2048) (decoder): Linear(in_features=2048, out_features=7125, bias=True) ) ) ) (word_dropout): WordDropout(p=0.05) (locked_dropout): LockedDropout(p=0.5) (embedding2nn): Linear(in_features=4196, out_features=4196, bias=True) (rnn): LSTM(4196, 256, batch_first=True, bidirectional=True) (linear): Linear(in_features=512, out_features=15, bias=True) (beta): 1.0 (weights): None (weight_tensor) None ``` Due to the right-to-left in left-to-right context, some formatting errors might occur. and your code might appear like [this](https://ibb.co/ky20Lnq), (link accessed on 2020-10-27) # Citation *if you use this model, please consider citing [this work](https://www.researchgate.net/publication/358956953_Sequence_Labeling_Architectures_in_Diglossia_-_a_case_study_of_Arabic_and_its_dialects):* ```latex @unpublished{MMHU21 author = "M. Megahed", title = "Sequence Labeling Architectures in Diglossia", year = {2021}, doi = "10.13140/RG.2.2.34961.10084" url = {https://www.researchgate.net/publication/358956953_Sequence_Labeling_Architectures_in_Diglossia_-_a_case_study_of_Arabic_and_its_dialects} } ```
uyharold86/DialoGPT-small-RickAndMorty
0e5185b8ff4a4853b5bb450ad056755f47ca4e4b
2021-09-27T06:23:52.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
uyharold86
null
uyharold86/DialoGPT-small-RickAndMorty
237
null
transformers
3,383
--- tags: - conversational --- # Rick and Morty DialoGPT Model (small)
24adamaliv/DialoGPT-medium-Will
00b542a84bc1db9725e8a36b40daee60b28abd5f
2022-07-13T23:00:25.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
24adamaliv
null
24adamaliv/DialoGPT-medium-Will
237
null
transformers
3,384
--- tags: - conversational --- # Will Byers DialoGPT model
jogp10/DialoGPT-medium-arya
d3ce418ceb2eb2be89d8a92718eb87a62f5e879d
2021-09-02T01:36:46.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
jogp10
null
jogp10/DialoGPT-medium-arya
236
null
transformers
3,385
--- tags: - conversational --- # Arya DialoGPT Model
microsoft/wavlm-base-plus-sd
5bd86f0662bd55704109a794c6a1b1790ea0f91a
2022-03-25T12:06:46.000Z
[ "pytorch", "wavlm", "audio-frame-classification", "en", "arxiv:1912.07875", "arxiv:2106.06909", "arxiv:2101.00390", "arxiv:2110.13900", "transformers", "speech" ]
null
false
microsoft
null
microsoft/wavlm-base-plus-sd
236
2
transformers
3,386
--- language: - en tags: - speech --- # WavLM-Base-Plus for Speaker Diarization [Microsoft's WavLM](https://github.com/microsoft/unilm/tree/master/wavlm) The model was pretrained on 16kHz sampled speech audio with utterance and speaker contrastive loss. When using the model, make sure that your speech input is also sampled at 16kHz. The model was pre-trained on: - 60,000 hours of [Libri-Light](https://arxiv.org/abs/1912.07875) - 10,000 hours of [GigaSpeech](https://arxiv.org/abs/2106.06909) - 24,000 hours of [VoxPopuli](https://arxiv.org/abs/2101.00390) [Paper: WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900) Authors: Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu, Michael Zeng, Furu Wei **Abstract** *Self-supervised learning (SSL) achieves great success in speech recognition, while limited exploration has been attempted for other speech processing tasks. As speech signal contains multi-faceted information including speaker identity, paralinguistics, spoken content, etc., learning universal representations for all speech tasks is challenging. In this paper, we propose a new pre-trained model, WavLM, to solve full-stack downstream speech tasks. WavLM is built based on the HuBERT framework, with an emphasis on both spoken content modeling and speaker identity preservation. We first equip the Transformer structure with gated relative position bias to improve its capability on recognition tasks. For better speaker discrimination, we propose an utterance mixing training strategy, where additional overlapped utterances are created unsupervisely and incorporated during model training. Lastly, we scale up the training dataset from 60k hours to 94k hours. WavLM Large achieves state-of-the-art performance on the SUPERB benchmark, and brings significant improvements for various speech processing tasks on their representative benchmarks.* The original model can be found under https://github.com/microsoft/unilm/tree/master/wavlm. # Fine-tuning details The model is fine-tuned on the [LibriMix dataset](https://github.com/JorisCos/LibriMix) using just a linear layer for mapping the network outputs. # Usage ## Speaker Diarization ```python from transformers import Wav2Vec2FeatureExtractor, WavLMForAudioFrameClassification from datasets import load_dataset import torch dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation") feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained('microsoft/wavlm-base-plus-sd') model = WavLMForAudioFrameClassification.from_pretrained('microsoft/wavlm-base-plus-sd') # audio file is decoded on the fly inputs = feature_extractor(dataset[0]["audio"]["array"], return_tensors="pt") logits = model(**inputs).logits probabilities = torch.sigmoid(logits[0]) # labels is a one-hot array of shape (num_frames, num_speakers) labels = (probabilities > 0.5).long() ``` # License The official license can be found [here](https://github.com/microsoft/UniSpeech/blob/main/LICENSE) ![design](https://raw.githubusercontent.com/patrickvonplaten/scientific_images/master/wavlm.png)
moussaKam/frugalscore_medium_bert-base_bert-score
035612750d1c8e1d7a13ec64f7886f0a6e80943e
2022-02-01T10:50:43.000Z
[ "pytorch", "bert", "text-classification", "arxiv:2110.08559", "transformers" ]
text-classification
false
moussaKam
null
moussaKam/frugalscore_medium_bert-base_bert-score
236
null
transformers
3,387
# FrugalScore FrugalScore is an approach to learn a fixed, low cost version of any expensive NLG metric, while retaining most of its original performance Paper: https://arxiv.org/abs/2110.08559?context=cs Project github: https://github.com/moussaKam/FrugalScore The pretrained checkpoints presented in the paper : | FrugalScore | Student | Teacher | Method | |----------------------------------------------------|-------------|----------------|------------| | [moussaKam/frugalscore_tiny_bert-base_bert-score](https://huggingface.co/moussaKam/frugalscore_tiny_bert-base_bert-score) | BERT-tiny | BERT-Base | BERTScore | | [moussaKam/frugalscore_small_bert-base_bert-score](https://huggingface.co/moussaKam/frugalscore_small_bert-base_bert-score) | BERT-small | BERT-Base | BERTScore | | [moussaKam/frugalscore_medium_bert-base_bert-score](https://huggingface.co/moussaKam/frugalscore_medium_bert-base_bert-score) | BERT-medium | BERT-Base | BERTScore | | [moussaKam/frugalscore_tiny_roberta_bert-score](https://huggingface.co/moussaKam/frugalscore_tiny_roberta_bert-score) | BERT-tiny | RoBERTa-Large | BERTScore | | [moussaKam/frugalscore_small_roberta_bert-score](https://huggingface.co/moussaKam/frugalscore_small_roberta_bert-score) | BERT-small | RoBERTa-Large | BERTScore | | [moussaKam/frugalscore_medium_roberta_bert-score](https://huggingface.co/moussaKam/frugalscore_medium_roberta_bert-score) | BERT-medium | RoBERTa-Large | BERTScore | | [moussaKam/frugalscore_tiny_deberta_bert-score](https://huggingface.co/moussaKam/frugalscore_tiny_deberta_bert-score) | BERT-tiny | DeBERTa-XLarge | BERTScore | | [moussaKam/frugalscore_small_deberta_bert-score](https://huggingface.co/moussaKam/frugalscore_small_deberta_bert-score) | BERT-small | DeBERTa-XLarge | BERTScore | | [moussaKam/frugalscore_medium_deberta_bert-score](https://huggingface.co/moussaKam/frugalscore_medium_deberta_bert-score) | BERT-medium | DeBERTa-XLarge | BERTScore | | [moussaKam/frugalscore_tiny_bert-base_mover-score](https://huggingface.co/moussaKam/frugalscore_tiny_bert-base_mover-score) | BERT-tiny | BERT-Base | MoverScore | | [moussaKam/frugalscore_small_bert-base_mover-score](https://huggingface.co/moussaKam/frugalscore_small_bert-base_mover-score) | BERT-small | BERT-Base | MoverScore | | [moussaKam/frugalscore_medium_bert-base_mover-score](https://huggingface.co/moussaKam/frugalscore_medium_bert-base_mover-score) | BERT-medium | BERT-Base | MoverScore |
niharikadeokar/DialoGPT-small-Jakebot
d95c68a84f5711c87470c42d7e86959a1c7eb5b0
2021-12-03T05:46:22.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
niharikadeokar
null
niharikadeokar/DialoGPT-small-Jakebot
236
null
transformers
3,388
--- tags: - conversational --- # Jake Peralta DialoGPT Model
Aquasp34/DialoGPT-small-aqua1
976f9aa228c0cc184440eeb701b9285902bf3aa5
2022-03-03T20:44:13.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational", "lm-head", "casual-lm" ]
conversational
false
Aquasp34
null
Aquasp34/DialoGPT-small-aqua1
236
null
transformers
3,389
--- tags: - conversational - lm-head - casual-lm --- # Aqua Model
burakaytan/roberta-base-turkish-uncased
4bbeca17433c0b7064d073d7b23b7adce47d577a
2022-05-18T08:18:20.000Z
[ "pytorch", "roberta", "fill-mask", "tr", "transformers", "license:mit", "autotrain_compatible" ]
fill-mask
false
burakaytan
null
burakaytan/roberta-base-turkish-uncased
236
5
transformers
3,390
--- language: tr license: mit --- 🇹🇷 RoBERTaTurk ## Model description This is a Turkish RoBERTa base model pretrained on Turkish Wikipedia, Turkish OSCAR, and some news websites. The final training corpus has a size of 38 GB and 329.720.508 sentences. Thanks to Turkcell we could train the model on Intel(R) Xeon(R) Gold 6230R CPU @ 2.10GHz 256GB RAM 2 x GV100GL [Tesla V100 PCIe 32GB] GPU for 2.5M steps. # Usage Load transformers library with: ```python from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("burakaytan/roberta-base-turkish-uncased") model = AutoModelForMaskedLM.from_pretrained("burakaytan/roberta-base-turkish-uncased") ``` # Fill Mask Usage ```python from transformers import pipeline fill_mask = pipeline( "fill-mask", model="burakaytan/roberta-base-turkish-uncased", tokenizer="burakaytan/roberta-base-turkish-uncased" ) fill_mask("iki ülke arasında <mask> başladı") [{'sequence': 'iki ülke arasında savaş başladı', 'score': 0.3013845384120941, 'token': 1359, 'token_str': ' savaş'}, {'sequence': 'iki ülke arasında müzakereler başladı', 'score': 0.1058429479598999, 'token': 30439, 'token_str': ' müzakereler'}, {'sequence': 'iki ülke arasında görüşmeler başladı', 'score': 0.07718811184167862, 'token': 4916, 'token_str': ' görüşmeler'}, {'sequence': 'iki ülke arasında kriz başladı', 'score': 0.07174749672412872, 'token': 3908, 'token_str': ' kriz'}, {'sequence': 'iki ülke arasında çatışmalar başladı', 'score': 0.05678590387105942, 'token': 19346, 'token_str': ' çatışmalar'}] ``` ## Citation and Related Information To cite this model: ```bibtex @INPROCEEDINGS{999, author={Aytan, Burak and Sakar, C. Okan}, booktitle={2022 30th Signal Processing and Communications Applications Conference (SIU)}, title={Comparison of Transformer-Based Models Trained in Turkish and Different Languages on Turkish Natural Language Processing Problems}, year={2022}, volume={}, number={}, pages={}, doi={}} ```
QuoQA-NLP/KE-T5-Ko2En-Base
d520ebe60951bfdec650f9377db53f61a207701c
2022-07-12T04:55:34.000Z
[ "pytorch", "t5", "text2text-generation", "transformers", "autotrain_compatible" ]
text2text-generation
false
QuoQA-NLP
null
QuoQA-NLP/KE-T5-Ko2En-Base
236
null
transformers
3,391
Entry not found
bespin-global/klue-sentence-roberta-base-kornlu
e0560226adca8f9a7b291528846f67d7489ee44b
2022-02-07T07:14:21.000Z
[ "pytorch", "roberta", "feature-extraction", "dataset:kor_nlu", "sentence-transformers", "sentence-similarity", "transformers", "license:cc-by-nc-4.0" ]
sentence-similarity
false
bespin-global
null
bespin-global/klue-sentence-roberta-base-kornlu
235
null
sentence-transformers
3,392
--- pipeline_tag: sentence-similarity tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers datasets: - kor_nlu license: cc-by-nc-4.0 --- # bespin-global/klue-sentence-roberta-kornlu 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('bespin-global/klue-sentence-roberta-kornlu') 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('bespin-global/klue-sentence-roberta-kornlu') model = AutoModel.from_pretrained('bespin-global/klue-sentence-roberta-kornlu') # 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={MODEL_NAME}) ## Training The model was trained with the parameters: **DataLoader**: `torch.utils.data.dataloader.DataLoader` of length 180 with parameters: ``` {'batch_size': 32, '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": 4, "evaluation_steps": 1000, "evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator", "max_grad_norm": 1, "optimizer_class": "<class 'transformers.optimization.AdamW'>", "optimizer_params": { "lr": 2e-05 }, "scheduler": "WarmupLinear", "steps_per_epoch": null, "warmup_steps": 72, "weight_decay": 0.01 } ``` ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: RobertaModel (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 --> [Jaehyeong](https://huggingface.co/jaehyeong) at [Bespin Global](https://www.bespinglobal.com/)
doc2query/S2ORC-t5-base-v1
10903c6b1a2ecc8728fff62a4b9725b6b72a242c
2021-10-27T10:04:09.000Z
[ "pytorch", "t5", "text2text-generation", "en", "dataset:S2ORC", "arxiv:1904.08375", "arxiv:2104.08663", "transformers", "license:apache-2.0", "autotrain_compatible" ]
text2text-generation
false
doc2query
null
doc2query/S2ORC-t5-base-v1
235
1
transformers
3,393
--- language: en datasets: - S2ORC widget: - text: "Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects." license: apache-2.0 --- # doc2query/S2ORC-t5-base-v1 This is a [doc2query](https://arxiv.org/abs/1904.08375) model based on T5 (also known as [docT5query](https://cs.uwaterloo.ca/~jimmylin/publications/Nogueira_Lin_2019_docTTTTTquery-v2.pdf)). It can be used for: - **Document expansion**: You generate for your paragraphs 20-40 queries and index the paragraphs and the generates queries in a standard BM25 index like Elasticsearch, OpenSearch, or Lucene. The generated queries help to close the lexical gap of lexical search, as the generate queries contain synonyms. Further, it re-weights words giving important words a higher weight even if they appear seldomn in a paragraph. In our [BEIR](https://arxiv.org/abs/2104.08663) paper we showed that BM25+docT5query is a powerful search engine. In the [BEIR repository](https://github.com/UKPLab/beir) we have an example how to use docT5query with Pyserini. - **Domain Specific Training Data Generation**: It can be used to generate training data to learn an embedding model. On [SBERT.net](https://www.sbert.net/examples/unsupervised_learning/query_generation/README.html) we have an example how to use the model to generate (query, text) pairs for a given collection of unlabeled texts. These pairs can then be used to train powerful dense embedding models. ## Usage ```python from transformers import T5Tokenizer, T5ForConditionalGeneration model_name = 'doc2query/S2ORC-t5-base-v1' tokenizer = T5Tokenizer.from_pretrained(model_name) model = T5ForConditionalGeneration.from_pretrained(model_name) text = "Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects." input_ids = tokenizer.encode(text, max_length=320, truncation=True, return_tensors='pt') outputs = model.generate( input_ids=input_ids, max_length=64, do_sample=True, top_p=0.95, num_return_sequences=5) print("Text:") print(text) print("\nGenerated Queries:") for i in range(len(outputs)): query = tokenizer.decode(outputs[i], skip_special_tokens=True) print(f'{i + 1}: {query}') ``` **Note:** `model.generate()` is non-deterministic. It produces different queries each time you run it. ## Training This model fine-tuned [google/t5-v1_1-base](https://huggingface.co/google/t5-v1_1-base) for 156k training steps. For the training script, see the `train_script.py` in this repository. The input-text was truncated to 320 word pieces. Output text was generated up to 64 word pieces. This model was trained on a (title, abstract) pairs from [S2ORC](https://github.com/allenai/s2orc).
elgeish/gpt2-medium-arabic-poetry
34f7d39e7e64eafcd76e7040657406b5235a49a1
2021-05-21T15:45:14.000Z
[ "pytorch", "jax", "gpt2", "text-generation", "ar", "dataset:Arabic Poetry Dataset (6th - 21st century)", "transformers", "poetry", "license:apache-2.0", "model-index" ]
text-generation
false
elgeish
null
elgeish/gpt2-medium-arabic-poetry
235
2
transformers
3,394
--- language: ar datasets: - Arabic Poetry Dataset (6th - 21st century) metrics: - perplexity tags: - text-generation - poetry license: apache-2.0 widget: - text: "للوهلة الأولى قرأت في عينيه" model-index: - name: elgeish Arabic GPT2 Medium results: - task: name: Text Generation type: text-generation dataset: name: Arabic Poetry Dataset (6th - 21st century) type: poetry args: ar metrics: - name: Validation Perplexity type: perplexity value: 282.09 --- # GPT2-Medium-Arabic-Poetry Fine-tuned [aubmindlab/aragpt2-medium](https://huggingface.co/aubmindlab/aragpt2-medium) on the [Arabic Poetry Dataset (6th - 21st century)](https://www.kaggle.com/fahd09/arabic-poetry-dataset-478-2017) using 41,922 lines of poetry as the train split and 9,007 (by poets not in the train split) for validation. ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed set_seed(42) model_name = "elgeish/gpt2-medium-arabic-poetry" model = AutoModelForCausalLM.from_pretrained(model_name).to("cuda") tokenizer = AutoTokenizer.from_pretrained(model_name) prompt = "للوهلة الأولى قرأت في عينيه" input_ids = tokenizer.encode(prompt, return_tensors="pt") samples = model.generate( input_ids.to("cuda"), do_sample=True, early_stopping=True, max_length=32, min_length=16, num_return_sequences=3, pad_token_id=50256, repetition_penalty=1.5, top_k=32, top_p=0.95, ) for sample in samples: print(tokenizer.decode(sample.tolist())) print("--") ``` Here's the output: ``` للوهلة الأولى قرأت في عينيه عن تلك النسم لم تذكر شيءا فلربما نامت علي كتفيها العصافير وتناثرت اوراق التوت عليها وغابت الوردة من -- للوهلة الأولى قرأت في عينيه اية نشوة من ناره وهي تنظر الي المستقبل بعيون خلاقة ورسمت خطوطه العريضة علي جبينك العاري رسمت الخطوط الحمر فوق شعرك -- للوهلة الأولى قرأت في عينيه كل ما كان وما سيكون غدا اذا لم تكن امراة ستكبر كثيرا علي الورق الابيض او لا تري مثلا خطوطا رفيعة فوق صفحة الماء -- ```
facebook/detr-resnet-101-dc5
ad4955b9a3e68e213ec74f1866909630e32e7f7d
2021-11-03T16:18:45.000Z
[ "pytorch", "detr", "object-detection", "dataset:coco", "arxiv:2005.12872", "transformers", "license:apache-2.0" ]
object-detection
false
facebook
null
facebook/detr-resnet-101-dc5
235
2
transformers
3,395
--- license: apache-2.0 tags: - object-detection 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-101 backbone (dilated C5 stage) 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. ## 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 DetrFeatureExtractor, DetrForObjectDetection 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 = DetrFeatureExtractor.from_pretrained('facebook/detr-resnet-101-dc5') model = DetrForObjectDetection.from_pretrained('facebook/detr-resnet-101-dc5') inputs = feature_extractor(images=image, return_tensors="pt") outputs = model(**inputs) # model predicts bounding boxes and corresponding COCO classes logits = outputs.logits bboxes = outputs.pred_boxes ``` 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 **44.9** 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} } ```
ntjrrvarma/DialoGPT-small-RickBot
8c4af00c08ff5a13f5e786b36cc9daad84830042
2021-08-27T17:04:24.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
ntjrrvarma
null
ntjrrvarma/DialoGPT-small-RickBot
235
null
transformers
3,396
--- tags: - conversational --- # Rick DialoGPT Model
sonoisa/t5-base-japanese-title-generation
24a55d13c29dad961e761da31fc1febae84e6fda
2022-02-21T13:38:09.000Z
[ "pytorch", "t5", "text2text-generation", "ja", "transformers", "seq2seq", "license:cc-by-sa-4.0", "autotrain_compatible" ]
text2text-generation
false
sonoisa
null
sonoisa/t5-base-japanese-title-generation
235
1
transformers
3,397
--- language: ja tags: - t5 - text2text-generation - seq2seq license: cc-by-sa-4.0 --- # 記事本文からタイトルを生成するモデル SEE: https://qiita.com/sonoisa/items/a9af64ff641f0bbfed44
Cirilaron/DialoGPT-medium-raiden
335c38f00b609cdf8a7be5541700b3aae04e9e2a
2022-06-05T10:22:54.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
Cirilaron
null
Cirilaron/DialoGPT-medium-raiden
235
null
transformers
3,398
--- tags: - conversational --- #Raiden from Metal Gear Rising DialoGPT Model
arem/DialoGPT-medium-rickandmorty
81abe8ebbb35d8da2ae95026a33cfb9ca154b567
2022-06-24T08:48:59.000Z
[ "pytorch", "gpt2", "text-generation", "transformers", "conversational" ]
conversational
false
arem
null
arem/DialoGPT-medium-rickandmorty
235
null
transformers
3,399
--- tags: - conversational --- # Try my rick, it responds.