modelId
stringlengths
5
122
author
stringlengths
2
42
last_modified
unknown
downloads
int64
0
75.3M
likes
int64
0
10.6k
library_name
stringclasses
189 values
tags
sequencelengths
1
1.84k
pipeline_tag
stringclasses
48 values
createdAt
unknown
card
stringlengths
1
901k
bigscience/bloom-1b7
bigscience
"2023-05-11T21:17:30Z"
92,738
107
transformers
[ "transformers", "pytorch", "jax", "safetensors", "bloom", "text-generation", "ak", "ar", "as", "bm", "bn", "ca", "code", "en", "es", "eu", "fon", "fr", "gu", "hi", "id", "ig", "ki", "kn", "lg", "ln", "ml", "mr", "ne", "nso", "ny", "or", "pa", "pt", "rn", "rw", "sn", "st", "sw", "ta", "te", "tn", "ts", "tum", "tw", "ur", "vi", "wo", "xh", "yo", "zh", "zhs", "zht", "zu", "arxiv:1909.08053", "arxiv:2110.02861", "arxiv:2108.12409", "license:bigscience-bloom-rail-1.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2022-05-19T11:52:06Z"
--- license: bigscience-bloom-rail-1.0 language: - ak - ar - as - bm - bn - ca - code - en - es - eu - fon - fr - gu - hi - id - ig - ki - kn - lg - ln - ml - mr - ne - nso - ny - or - pa - pt - rn - rw - sn - st - sw - ta - te - tn - ts - tum - tw - ur - vi - wo - xh - yo - zh - zhs - zht - zu pipeline_tag: text-generation --- <h1 style='text-align: center '>BLOOM LM</h1> <h2 style='text-align: center '><em>BigScience Large Open-science Open-access Multilingual Language Model</em> </h2> <h3 style='text-align: center '>Model Card</h3> <img src="https://s3.amazonaws.com/moonup/production/uploads/1657124309515-5f17f0a0925b9863e28ad517.png" alt="BigScience Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/> Version 1.0 / 26.May.2022 # Model Card for Bloom-1b7 <!-- Provide a quick summary of what the model is/does. --> ## Table of Contents 1. [Model Details](#model-details) 2. [Uses](#uses) 3. [Bias, Risks, and Limitations](#bias-risks-and-limitations) 4. [Recommendations](#recommendations) 5. [Training Data](#training-data) 6. [Evaluation](#evaluation) 7. [Environmental Impact](#environmental-impact) 8. [Technical Specifications](#techincal-specifications) 9. [Citation](#citation) 10. [Glossary and Calculations](#glossary-and-calculations) 11. [More Information](#more-information) 12. [Model Card Authors](#model-card-authors) 13. [Model Card Contact](#model-card-contact) ## Model Details ### Model Description *This section provides information for anyone who wants to know about the model.* - **Developed by:** BigScience ([website](https://bigscience.huggingface.co)) * All collaborators are either volunteers or have an agreement with their employer. *(Further breakdown of participants forthcoming.)* - **Model Type:** Transformer-based Language Model - **Version:** 1.0.0 - **Languages:** Multiple; see [training data](#training-data) - **License:** RAIL License v1.0 ([link](https://huggingface.co/spaces/bigscience/license)) - **Release Date Estimate:** Monday, 11.July.2022 - **Funded by:** * The French government. * Hugging Face ([website](https://huggingface.co)). * Organizations of contributors. *(Further breakdown of organizations forthcoming.)* ## Uses *This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model. It provides information for anyone considering using the model or who is affected by the model.* ### Intended Use This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive. #### **Direct Use** - Text generation - Exploring characteristics of language generated by a language model - Examples: Cloze tests, counterfactuals, generations with reframings #### **Downstream Use** - Tasks that leverage language models include: Information Extraction, Question Answering, Summarization ### Misuse and Out-of-scope Use *This section addresses what users ought not do with the model.* See the [BLOOM License](https://huggingface.co/spaces/bigscience/license), Attachment A, for detailed usage restrictions. The below list is non-exhaustive, but lists some easily foreseeable problematic use cases. #### **Out-of-scope Uses** Using the model in [high-stakes](#high-stakes) settings is out of scope for this model.  The model is not designed for [critical decisions](#critical-decisions) nor uses with any material consequences on an individual's livelihood or wellbeing. The model outputs content that appears factual but is not correct. ##### Out-of-scope Uses Include: - Usage in biomedical domains, political and legal domains, or finance domains - Usage for evaluating or scoring individuals, such as for employment, education, or credit - Applying the model for critical automatic decisions, generating factual content, creating reliable summaries, or generating predictions that must be correct #### **Misuse** Intentionally using the model for harm, violating [human rights](#human-rights), or other kinds of malicious activities, is a misuse of this model. This includes: - Spam generation - Disinformation and influence operations - Disparagement and defamation - Harassment and abuse - [Deception](#deception) - Unconsented impersonation and imitation - Unconsented surveillance - Generating content without attribution to the model, as specified in the [RAIL License, Use Restrictions](https://huggingface.co/spaces/bigscience/license) ### Intended Users #### **Direct Users** - General Public - Researchers - Students - Educators - Engineers/developers - Non-commercial entities - Community advocates, including human and civil rights groups #### Indirect Users - Users of derivatives created by Direct Users, such as those using software with an [intended use](#intended-use) - Users of [Derivatives of the Model, as described in the License](https://huggingface.co/spaces/bigscience/license) #### Others Affected (Parties Prenantes) - People and groups referred to by the LLM - People and groups exposed to outputs of, or decisions based on, the LLM - People and groups whose original work is included in the LLM ## Bias, Risks, and Limitations *This section identifies foreseeable harms and misunderstandings.* Model may: - Overrepresent some viewpoints and underrepresent others - Contain stereotypes - Contain [personal information](#personal-data-and-information) - Generate: - Hateful, abusive, or violent language - Discriminatory or prejudicial language - Content that may not be appropriate for all settings, including sexual content - Make errors, including producing incorrect information as if it were factual - Generate irrelevant or repetitive outputs ### Recommendations *This section provides information on warnings and potential mitigations.* - Indirect users should be made aware when the content they're working with is created by the LLM. - Users should be aware of [Risks and Limitations](#risks-and-limitations), and include an appropriate age disclaimer or blocking interface as necessary. - Models pretrained with the LLM should include an updated Model Card. - Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments. ## Training Data *This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.* Details for each dataset are provided in individual [Data Cards](https://huggingface.co/spaces/bigscience/BigScienceCorpus). Training data includes: - 45 natural languages - 12 programming languages - In 1.5TB of pre-processed text, converted into 350B unique tokens (see [the tokenizer section](#tokenization) for more.) #### **Languages** The pie chart shows the distribution of languages in training data. ![pie chart showing the distribution of languages in training data](https://github.com/bigscience-workshop/model_card/blob/main/assets/data/pie_chart.svg?raw=true) **The following table shows the further distribution of Niger-Congo and Indic languages in the training data.** | Niger Congo | Percentage | | Indic | Percentage | |----------------|------------ |------ |-----------|------------| | Chi Tumbuka | 0.00002 | | Assamese | 0.01 | | Kikuyu | 0.00004 | | Odia | 0.04 | | Bambara | 0.00004 | | Gujarati | 0.04 | | Akan | 0.00007 | | Marathi | 0.05 | | Xitsonga | 0.00007 | | Punjabi | 0.05 | | Sesotho | 0.00007 | | Kannada | 0.06 | | Chi Chewa | 0.0001 | | Nepali | 0.07 | | Setswana | 0.0002 | | Telugu | 0.09 | | Northern Sotho | 0.0002 | | Malayalam | 0.10 | | Fon | 0.0002 | | Urdu | 0.10 | | Kirundi | 0.0003 | | Tamil | 0.20 | | Wolof | 0.0004 | | Bengali | 0.50 | | Kuganda | 0.0004 | | Hindi | 0.70 | | Chi Shona | 0.001 | | Isi Zulu | 0.001 | | Igbo | 0.001 | | Xhosa | 0.001 | | Kinyarwanda | 0.003 | | Yoruba | 0.006 | | Swahili | 0.02 | </details> **The following table shows the distribution of programming languages.** | Extension | Language | Number of files | |----------------|------------|-----------------| | java | Java | 5,407,724 | | php | PHP | 4,942,186 | | cpp | C++ | 2,503,930 | | py | Python | 2,435,072 | | js | JavaScript | 1,905,518 | | cs | C# | 1,577,347 | | rb | Ruby | 6,78,413 | | cc | C++ | 443,054 | | hpp | C++ | 391,048 | | lua | Lua | 352,317 | | go | GO | 227,763 | | ts | TypeScript | 195,254 | | C | C | 134,537 | | scala | Scala | 92,052 | | hh | C++ | 67,161 | | H | C++ | 55,899 | | tsx | TypeScript | 33,107 | | rs | Rust | 29,693 | | phpt | PHP | 9,702 | | c++ | C++ | 1,342 | | h++ | C++ | 791 | | php3 | PHP | 540 | | phps | PHP | 270 | | php5 | PHP | 166 | | php4 | PHP | 29 | ## Evaluation *This section describes the evaluation protocols and provides the results.* ### Metrics *This section describes the different ways performance is calculated and why.* Includes: | Metric | Why chosen | |--------------------|--------------------------------------------------------------------| | [Perplexity](#perplexity) | Standard metric for quantifying model improvements during training | | Cross Entropy [Loss](#loss) | Standard objective for language models. | And multiple different metrics for specific tasks. _(More evaluation metrics forthcoming upon completion of evaluation protocol.)_ ### Factors *This section lists some different aspects of what BLOOM models. Its focus is on those aspects that are likely to give rise to high variance in model behavior.* - Language, such as English or Yoruba - Domain, such as newswire or stories - Demographic characteristics, such as gender or nationality ### Results *Results are based on the [Factors](#factors) and [Metrics](#metrics).* **Train-time Evaluation:** As of 25.May.2022, 15:00 PST: - Training Loss: 2.0 - Validation Loss: 2.2 - Perplexity: 8.9 (More evaluation scores forthcoming at the end of model training.) - [BLOOM Book](https://huggingface.co/spaces/bigscience/bloom-book): Read generations from BLOOM based on prompts provided by the community ## Environmental Impact The training supercomputer, Jean Zay ([website](http://www.idris.fr/eng/jean-zay/jean-zay-presentation-eng.html)), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing. **Estimated carbon emissions:** *(Forthcoming upon completion of training.)* **Estimated electricity usage:** *(Forthcoming upon completion of training.)* ## Technical Specifications *This section provides information for people who work on model development.* Please see [the BLOOM training README](https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml#readme) for full details on replicating training. **Model Architecture:** Modified from Megatron-LM GPT2 (see [paper](https://arxiv.org/abs/1909.08053), [BLOOM Megatron code](https://github.com/bigscience-workshop/Megatron-DeepSpeed)): * Decoder-only architecture * Layer normalization applied to word embeddings layer (`StableEmbedding`; see [code](https://github.com/facebookresearch/bitsandbytes), [paper](https://arxiv.org/pdf/2110.02861.pdf)) * ALiBI positional encodings (see [paper](https://arxiv.org/pdf/2108.12409.pdf)), with GeLU activation functions * 1,722,408,960 parameters: * 513,802,240 embedding parameters * 24 layers, 16 attention heads * Hidden layers are 2048-dimensional * Sequence length of 2048 tokens used (see [BLOOM tokenizer](https://huggingface.co/bigscience/tokenizer), [tokenizer description](#tokenization)) **Objective Function:** Cross Entropy with mean reduction (see [API documentation](https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html#torch.nn.CrossEntropyLoss)). **Compute infrastructure:** Jean Zay Public Supercomputer, provided by the French government (see [announcement](https://www.enseignementsup-recherche.gouv.fr/fr/signature-du-marche-d-acquisition-de-l-un-des-supercalculateurs-les-plus-puissants-d-europe-46733)). * Hardware: 64 V100 16/32GB GPUs (16 nodes): * 4 GPUs per node * 40 CPUs per task * 1 task per node * CPU: AMD * CPU memory: 160GB per node * GPU memory: 64GB or 128GB (depending on node availability during training) per node * Inter-node connect: Omni-Path Architecture (OPA) * NCCL-communications network: a fully dedicated subnet * Disc IO network: shared network with other types of nodes * Software: * Megatron-DeepSpeed ([Github link](https://github.com/bigscience-workshop/Megatron-DeepSpeed)) * DeepSpeed ([Github link](https://github.com/microsoft/DeepSpeed)) * PyTorch (pytorch-1.11 w/ CUDA-11.5; see [Github link](https://github.com/pytorch/pytorch)) * apex ([Github link](https://github.com/NVIDIA/apex)) ### **Training** - Checkpoint size: - Fp16 weights: 2.6GB (# params * 2) - Full checkpoint with optimizer states: -- - Training throughput: -- - Number of epochs: 1 - Dates: - Start: 11th March, 2022 11:42am PST - End: 20 May, 2022 - Server training location: Île-de-France, France ### **Tokenization** The BLOOM tokenizer ([link](https://huggingface.co/bigscience/tokenizer)) is a learned subword tokenizer trained using: - A byte-level Byte Pair Encoding (BPE) algorithm - A simple pre-tokenization rule, no normalization - A vocabulary size of 250,680 It was trained on a subset of a preliminary version of the corpus using alpha-weighting per language. ## Citation **Cite as:** BigScience, _BigScience Language Open-science Open-access Multilingual (BLOOM) Language Model_. International, May 2021-May 2022 ## Glossary and Calculations *This section defines common terms and how metrics are calculated.* - <a name="loss">**Loss:**</a> A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss. - <a name="perplexity">**Perplexity:**</a> This is based on what the model estimates the probability of new data is. The lower the perplexity, the better. If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy. - <a name="high-stakes">**High-stakes settings:**</a> Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed [Artificial Intelligence (AI) Act](https://artificialintelligenceact.eu/annexes/). - <a name="critical-decisions">**Critical decisions:**</a> Such as those defined in [the United States' proposed Algorithmic Accountability Act](https://www.congress.gov/117/bills/s3572/BILLS-117s3572is.pdf). - <a name="human-rights">**Human rights:**</a> Includes those rights defined in the [Universal Declaration of Human Rights](https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf). - <a name="personal-data-and-information">**Personal Data and Personal Information:**</a> Personal data and information is defined in multiple data protection regulations, such as "[personal data](https://gdpr-info.eu/issues/personal-data/)" in the [European Union's General Data Protection Regulation](https://gdpr-info.eu); and "personal information" in the Republic of South Africa's [Protection of Personal Information Act](https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf), The People's Republic of China's [Personal information protection law](http://en.npc.gov.cn.cdurl.cn/2021-12/29/c_694559.htm). - <a name="sensitive-characteristics">**Sensitive characteristics:**</a> This includes specifically protected categories in human rights (see [UHDR, Article 2](https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf)) and personal information regulation (see GDPR, [Article 9; Protection of Personal Information Act, Chapter 1](https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf)) - <a name="deception">**Deception:**</a> Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated. ## More Information ### Dataset Creation Blog post detailing the design choices during the dataset creation: https://bigscience.huggingface.co/blog/building-a-tb-scale-multilingual-dataset-for-language-modeling ### Technical Specifications Blog post summarizing how the architecture, size, shape, and pre-training duration where selected: https://bigscience.huggingface.co/blog/what-language-model-to-train-if-you-have-two-million-gpu-hours More details on the architecture/optimizer: https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml Blog post on the hardware/engineering side: https://bigscience.huggingface.co/blog/which-hardware-to-train-a-176b-parameters-model Details on the distributed setup used for the training: https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml Tensorboard updated during the training: https://huggingface.co/bigscience/tr11-176B-ml-logs/tensorboard#scalars&tagFilter=loss Insights on how to approach training, negative results: https://github.com/bigscience-workshop/bigscience/blob/master/train/lessons-learned.md Details on the obstacles overcome during the preparation on the engineering side (instabilities, optimization of training throughput, so many technical tricks and questions): https://github.com/bigscience-workshop/bigscience/blob/master/train/tr11-176B-ml/chronicles.md ### Initial Results Initial prompting experiments using interim checkpoints: https://huggingface.co/spaces/bigscience/bloom-book ## Model Card Authors *Ordered roughly chronologically and by amount of time spent.* Margaret Mitchell, Giada Pistilli, Yacine Jernite, Ezinwanne Ozoani, Marissa Gerchick, Nazneen Rajani, Sasha Luccioni, Irene Solaiman, Maraim Masoud, Somaieh Nikpoor, Carlos Muñoz Ferrandis, Stas Bekman, Christopher Akiki, Danish Contractor, David Lansky, Angelina McMillan-Major, Tristan Thrush, Suzana Ilić, Gérard Dupont, Shayne Longpre, Manan Dey, Stella Biderman, Douwe Kiela, Emi Baylor, Teven Le Scao, Aaron Gokaslan, Julien Launay, Niklas Muennighoff ## Model Card Contact **Send Questions to:** bigscience-contact@googlegroups.com
mrm8488/bert-tiny-finetuned-sms-spam-detection
mrm8488
"2023-03-16T17:28:05Z"
92,655
32
transformers
[ "transformers", "pytorch", "jax", "safetensors", "bert", "text-classification", "sms", "spam", "detection", "en", "dataset:sms_spam", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: en tags: - sms - spam - detection datasets: - sms_spam widget: - text: "Camera - You are awarded a SiPix Digital Camera! call 09061221066 fromm landline. Delivery within 28 days." --- # BERT-Tiny fine-tuned on on sms_spam dataset for spam detection Validation accuray: **0.98**
openai-community/openai-gpt
openai-community
"2024-02-19T12:39:20Z"
92,534
218
transformers
[ "transformers", "pytorch", "tf", "rust", "safetensors", "openai-gpt", "text-generation", "en", "arxiv:1705.11168", "arxiv:1803.02324", "arxiv:1910.09700", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-generation
"2022-03-02T23:29:04Z"
--- language: en license: mit --- # OpenAI GPT 1 ## Table of Contents - [Model Details](#model-details) - [How To Get Started With the Model](#how-to-get-started-with-the-model) - [Uses](#uses) - [Risks, Limitations and Biases](#risks-limitations-and-biases) - [Training](#training) - [Evaluation](#evaluation) - [Environmental Impact](#environmental-impact) - [Technical Specifications](#technical-specifications) - [Citation Information](#citation-information) - [Model Card Authors](#model-card-authors) ## Model Details **Model Description:** `openai-gpt` (a.k.a. "GPT-1") is the first transformer-based language model created and released by OpenAI. The model is a causal (unidirectional) transformer pre-trained using language modeling on a large corpus with long range dependencies. - **Developed by:** Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever. See [associated research paper](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf) and [GitHub repo](https://github.com/openai/finetune-transformer-lm) for model developers and contributors. - **Model Type:** Transformer-based language model - **Language(s):** English - **License:** [MIT License](https://github.com/openai/finetune-transformer-lm/blob/master/LICENSE) - **Related Models:** [GPT2](https://huggingface.co/gpt2), [GPT2-Medium](https://huggingface.co/gpt2-medium), [GPT2-Large](https://huggingface.co/gpt2-large) and [GPT2-XL](https://huggingface.co/gpt2-xl) - **Resources for more information:** - [Research Paper](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf) - [OpenAI Blog Post](https://openai.com/blog/language-unsupervised/) - [GitHub Repo](https://github.com/openai/finetune-transformer-lm) - Test the full generation capabilities here: https://transformer.huggingface.co/doc/gpt ## How to Get Started with the Model Use the code below to get started with the model. You can use this model directly with a pipeline for text generation. Since the generation relies on some randomness, we set a seed for reproducibility: ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='openai-gpt') >>> set_seed(42) >>> generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5) [{'generated_text': "Hello, I'm a language model,'he said, when i was finished.'ah well,'said the man,'that's"}, {'generated_text': 'Hello, I\'m a language model, " she said. \n she reached the bottom of the shaft and leaned a little further out. it was'}, {'generated_text': 'Hello, I\'m a language model, " she laughed. " we call that a\'white girl.\'or as we are called by the'}, {'generated_text': 'Hello, I\'m a language model, " said mr pin. " an\'the ones with the funny hats don\'t. " the rest of'}, {'generated_text': 'Hello, I\'m a language model, was\'ere \'bout to do some more dancin \', " he said, then his voice lowered to'}] ``` Here is how to use this model in PyTorch: ```python from transformers import OpenAIGPTTokenizer, OpenAIGPTModel import torch tokenizer = OpenAIGPTTokenizer.from_pretrained("openai-gpt") model = OpenAIGPTModel.from_pretrained("openai-gpt") inputs = tokenizer("Hello, my dog is cute", return_tensors="pt") outputs = model(**inputs) last_hidden_states = outputs.last_hidden_state ``` and in TensorFlow: ```python from transformers import OpenAIGPTTokenizer, TFOpenAIGPTModel tokenizer = OpenAIGPTTokenizer.from_pretrained("openai-gpt") model = TFOpenAIGPTModel.from_pretrained("openai-gpt") inputs = tokenizer("Hello, my dog is cute", return_tensors="tf") outputs = model(inputs) last_hidden_states = outputs.last_hidden_state ``` ## Uses #### Direct Use This model can be used for language modeling tasks. #### Downstream Use Potential downstream uses of this model include tasks that leverage language models. In the [associated paper](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf), the model developers discuss evaluations of the model for tasks including natural language inference (NLI), question answering, semantic similarity, and text classification. #### Misuse and Out-of-scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. ## Risks, Limitations and Biases #### Biases **CONTENT WARNING: Readers should be aware that language generated by this model can be disturbing or offensive to some and can propagate historical and current stereotypes.** Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by this model can include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. For example: ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='openai-gpt') >>> set_seed(42) >>> generator("The man worked as a", max_length=10, num_return_sequences=5) [{'generated_text': 'The man worked as a teacher for the college he'}, {'generated_text': 'The man worked as a janitor at the club.'}, {'generated_text': 'The man worked as a bodyguard in america. the'}, {'generated_text': 'The man worked as a clerk for one of the'}, {'generated_text': 'The man worked as a nurse, but there was'}] >>> set_seed(42) >>> generator("The woman worked as a", max_length=10, num_return_sequences=5) [{'generated_text': 'The woman worked as a medical intern but is a'}, {'generated_text': 'The woman worked as a midwife, i know that'}, {'generated_text': 'The woman worked as a prostitute in a sex club'}, {'generated_text': 'The woman worked as a secretary for one of the'}, {'generated_text': 'The woman worked as a nurse, but she had'}] ``` This bias may also affect fine-tuned versions of this model. Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. #### Risks and Limitations The model developers also wrote in a [blog post](https://openai.com/blog/language-unsupervised/) about risks and limitations of the model, including: > - **Compute Requirements:** Many previous approaches to NLP tasks train relatively small models on a single GPU from scratch. Our approach requires an expensive pre-training step - 1 month on 8 GPUs. Luckily, this only has to be done once and we’re releasing our model so others can avoid it. It is also a large model (in comparison to prior work) and consequently uses more compute and memory — we used a 37-layer (12 block) Transformer architecture, and we train on sequences of up to 512 tokens. Most experiments were conducted on 4 and 8 GPU systems. The model does fine-tune to new tasks very quickly which helps mitigate the additional resource requirements. > - **The limits and bias of learning about the world through text:** Books and text readily available on the internet do not contain complete or even accurate information about the world. Recent work ([Lucy and Gauthier, 2017](https://arxiv.org/abs/1705.11168)) has shown that certain kinds of information are difficult to learn via just text and other work ([Gururangan et al., 2018](https://arxiv.org/abs/1803.02324)) has shown that models learn and exploit biases in data distributions. > - **Still brittle generalization:** Although our approach improves performance across a broad range of tasks, current deep learning NLP models still exhibit surprising and counterintuitive behavior - especially when evaluated in a systematic, adversarial, or out-of-distribution way. Our approach is not immune to these issues, though we have observed some indications of progress. Our approach shows improved lexical robustness over previous purely neural approaches to textual entailment. On the dataset introduced in Glockner et al. (2018) our model achieves 83.75%, performing similarly to KIM, which incorporates external knowledge via WordNet. ## Training #### Training Data The model developers [write](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf): > We use the BooksCorpus dataset ([Zhu et al., 2015](https://www.cv-foundation.org/openaccess/content_iccv_2015/papers/Zhu_Aligning_Books_and_ICCV_2015_paper.pdf)) for training the language model. It contains over 7,000 unique unpublished books from a variety of genres including Adventure, Fantasy, and Romance. Crucially, it contains long stretches of contiguous text, which allows the generative model to learn to condition on long-range information. #### Training Procedure The model developers [write](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf): > Our model largely follows the original transformer work [62]. We trained a 12-layer decoder-only transformer with masked self-attention heads (768 dimensional states and 12 attention heads). For the position-wise feed-forward networks, we used 3072 dimensional inner states. We used the Adam optimization scheme [27] with a max learning rate of 2.5e-4. The learning rate was increased linearly from zero over the first 2000 updates and annealed to 0 using a cosine schedule. We train for 100 epochs on minibatches of 64 randomly sampled, contiguous sequences of 512 tokens. Since layernorm [2] is used extensively throughout the model, a simple weight initialization of N (0, 0.02) was sufficient. We used a bytepair encoding (BPE) vocabulary with 40,000 merges [53] and residual, embedding, and attention dropouts with a rate of 0.1 for regularization. We also employed a modified version of L2 regularization proposed in [37], with w = 0.01 on all non bias or gain weights. For the activation function, we used the Gaussian Error Linear Unit (GELU) [18]. We used learned position embeddings instead of the sinusoidal version proposed in the original work. We use the ftfy library2 to clean the raw text in BooksCorpus, standardize some punctuation and whitespace, and use the spaCy tokenizer. See the paper for further details and links to citations. ## Evaluation The following evaluation information is extracted from the [associated blog post](https://openai.com/blog/language-unsupervised/). See the [associated paper](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf) for further details. #### Testing Data, Factors and Metrics The model developers report that the model was evaluated on the following tasks and datasets using the listed metrics: - **Task:** Textual Entailment - **Datasets:** [SNLI](https://huggingface.co/datasets/snli), [MNLI Matched](https://huggingface.co/datasets/glue), [MNLI Mismatched](https://huggingface.co/datasets/glue), [SciTail](https://huggingface.co/datasets/scitail), [QNLI](https://huggingface.co/datasets/glue), [RTE](https://huggingface.co/datasets/glue) - **Metrics:** Accuracy - **Task:** Semantic Similarity - **Datasets:** [STS-B](https://huggingface.co/datasets/glue), [QQP](https://huggingface.co/datasets/glue), [MRPC](https://huggingface.co/datasets/glue) - **Metrics:** Accuracy - **Task:** Reading Comprehension - **Datasets:** [RACE](https://huggingface.co/datasets/race) - **Metrics:** Accuracy - **Task:** Commonsense Reasoning - **Datasets:** [ROCStories](https://huggingface.co/datasets/story_cloze), [COPA](https://huggingface.co/datasets/xcopa) - **Metrics:** Accuracy - **Task:** Sentiment Analysis - **Datasets:** [SST-2](https://huggingface.co/datasets/glue) - **Metrics:** Accuracy - **Task:** Linguistic Acceptability - **Datasets:** [CoLA](https://huggingface.co/datasets/glue) - **Metrics:** Accuracy - **Task:** Multi Task Benchmark - **Datasets:** [GLUE](https://huggingface.co/datasets/glue) - **Metrics:** Accuracy #### Results The model achieves the following results without any fine-tuning (zero-shot): | Task | TE | TE | TE |TE | TE | TE | SS | SS | SS | RC | CR | CR | SA | LA | MTB | |:--------:|:--:|:----------:|:-------------:|:-----:|:----:|:---:|:---:|:---:|:--:|:----:|:--------:|:----:|:----:|:----:|:----:| | Dataset |SNLI|MNLI Matched|MNLI Mismatched|SciTail| QNLI | RTE |STS-B| QQP |MPRC|RACE |ROCStories|COPA | SST-2| CoLA | GLUE | | |89.9| 82.1 | 81.4 |88.3 | 88.1 | 56.0|82.0 | 70.3|82.3|59.0 | 86.5 | 78.6 | 91.3 | 45.4 | 72.8 | ## Environmental Impact The model developers [report that](https://openai.com/blog/language-unsupervised/): > The total compute used to train this model was 0.96 petaflop days (pfs-days). > 8 P600 GPU's * 30 days * 12 TFLOPS/GPU * 0.33 utilization = .96 pfs-days Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** 8 P600 GPUs - **Hours used:** 720 hours (30 days) - **Cloud Provider:** Unknown - **Compute Region:** Unknown - **Carbon Emitted:** Unknown ## Technical Specifications See the [associated paper](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf) for details on the modeling architecture, objective, compute infrastructure, and training details. ## Citation Information ```bibtex @article{radford2018improving, title={Improving language understanding by generative pre-training}, author={Radford, Alec and Narasimhan, Karthik and Salimans, Tim and Sutskever, Ilya and others}, year={2018}, publisher={OpenAI} } ``` APA: *Radford, A., Narasimhan, K., Salimans, T., & Sutskever, I. (2018). Improving language understanding by generative pre-training.* ## Model Card Authors This model card was written by the Hugging Face team.
EleutherAI/pythia-160m
EleutherAI
"2023-07-09T15:52:09Z"
92,445
18
transformers
[ "transformers", "pytorch", "safetensors", "gpt_neox", "text-generation", "causal-lm", "pythia", "en", "dataset:EleutherAI/pile", "arxiv:2304.01373", "arxiv:2101.00027", "arxiv:2201.07311", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-02-08T19:25:46Z"
--- language: - en tags: - pytorch - causal-lm - pythia license: apache-2.0 datasets: - EleutherAI/pile --- The *Pythia Scaling Suite* is a collection of models developed to facilitate interpretability research [(see paper)](https://arxiv.org/pdf/2304.01373.pdf). It contains two sets of eight models of sizes 70M, 160M, 410M, 1B, 1.4B, 2.8B, 6.9B, and 12B. For each size, there are two models: one trained on the Pile, and one trained on the Pile after the dataset has been globally deduplicated. All 8 model sizes are trained on the exact same data, in the exact same order. We also provide 154 intermediate checkpoints per model, hosted on Hugging Face as branches. The Pythia model suite was deliberately designed to promote scientific research on large language models, especially interpretability research. Despite not centering downstream performance as a design goal, we find the models <a href="#evaluations">match or exceed</a> the performance of similar and same-sized models, such as those in the OPT and GPT-Neo suites. <details> <summary style="font-weight:600">Details on previous early release and naming convention.</summary> Previously, we released an early version of the Pythia suite to the public. However, we decided to retrain the model suite to address a few hyperparameter discrepancies. This model card <a href="#changelog">lists the changes</a>; see appendix B in the Pythia paper for further discussion. We found no difference in benchmark performance between the two Pythia versions. The old models are [still available](https://huggingface.co/models?other=pythia_v0), but we suggest the retrained suite if you are just starting to use Pythia.<br> **This is the current release.** Please note that all models in the *Pythia* suite were renamed in January 2023. For clarity, a <a href="#naming-convention-and-parameter-count">table comparing the old and new names</a> is provided in this model card, together with exact parameter counts. </details> <br> # Pythia-160M ## Model Details - Developed by: [EleutherAI](http://eleuther.ai) - Model type: Transformer-based Language Model - Language: English - Learn more: [Pythia's GitHub repository](https://github.com/EleutherAI/pythia) for training procedure, config files, and details on how to use. [See paper](https://arxiv.org/pdf/2304.01373.pdf) for more evals and implementation details. - Library: [GPT-NeoX](https://github.com/EleutherAI/gpt-neox) - License: Apache 2.0 - Contact: to ask questions about this model, join the [EleutherAI Discord](https://discord.gg/zBGx3azzUn), and post them in `#release-discussion`. Please read the existing *Pythia* documentation before asking about it in the EleutherAI Discord. For general correspondence: [contact@eleuther. ai](mailto:contact@eleuther.ai). <figure> | Pythia model | Non-Embedding Params | Layers | Model Dim | Heads | Batch Size | Learning Rate | Equivalent Models | | -----------: | -------------------: | :----: | :-------: | :---: | :--------: | :-------------------: | :--------------------: | | 70M | 18,915,328 | 6 | 512 | 8 | 2M | 1.0 x 10<sup>-3</sup> | — | | 160M | 85,056,000 | 12 | 768 | 12 | 2M | 6.0 x 10<sup>-4</sup> | GPT-Neo 125M, OPT-125M | | 410M | 302,311,424 | 24 | 1024 | 16 | 2M | 3.0 x 10<sup>-4</sup> | OPT-350M | | 1.0B | 805,736,448 | 16 | 2048 | 8 | 2M | 3.0 x 10<sup>-4</sup> | — | | 1.4B | 1,208,602,624 | 24 | 2048 | 16 | 2M | 2.0 x 10<sup>-4</sup> | GPT-Neo 1.3B, OPT-1.3B | | 2.8B | 2,517,652,480 | 32 | 2560 | 32 | 2M | 1.6 x 10<sup>-4</sup> | GPT-Neo 2.7B, OPT-2.7B | | 6.9B | 6,444,163,072 | 32 | 4096 | 32 | 2M | 1.2 x 10<sup>-4</sup> | OPT-6.7B | | 12B | 11,327,027,200 | 36 | 5120 | 40 | 2M | 1.2 x 10<sup>-4</sup> | — | <figcaption>Engineering details for the <i>Pythia Suite</i>. Deduped and non-deduped models of a given size have the same hyperparameters. “Equivalent” models have <b>exactly</b> the same architecture, and the same number of non-embedding parameters.</figcaption> </figure> ## Uses and Limitations ### Intended Use The primary intended use of Pythia is research on the behavior, functionality, and limitations of large language models. This suite is intended to provide a controlled setting for performing scientific experiments. We also provide 154 checkpoints per model: initial `step0`, 10 log-spaced checkpoints `step{1,2,4...512}`, and 143 evenly-spaced checkpoints from `step1000` to `step143000`. These checkpoints are hosted on Hugging Face as branches. Note that branch `143000` corresponds exactly to the model checkpoint on the `main` branch of each model. You may also further fine-tune and adapt Pythia-160M for deployment, as long as your use is in accordance with the Apache 2.0 license. Pythia models work with the Hugging Face [Transformers Library](https://huggingface.co/docs/transformers/index). If you decide to use pre-trained Pythia-160M as a basis for your fine-tuned model, please conduct your own risk and bias assessment. ### Out-of-scope use The Pythia Suite is **not** intended for deployment. It is not a in itself a product and cannot be used for human-facing interactions. For example, the model may generate harmful or offensive text. Please evaluate the risks associated with your particular use case. Pythia models are English-language only, and are not suitable for translation or generating text in other languages. Pythia-160M has not been fine-tuned for downstream contexts in which language models are commonly deployed, such as writing genre prose, or commercial chatbots. This means Pythia-160M will **not** respond to a given prompt the way a product like ChatGPT does. This is because, unlike this model, ChatGPT was fine-tuned using methods such as Reinforcement Learning from Human Feedback (RLHF) to better “follow” human instructions. ### Limitations and biases The core functionality of a large language model is to take a string of text and predict the next token. The token used by the model need not produce the most “accurate” text. Never rely on Pythia-160M to produce factually accurate output. This model was trained on [the Pile](https://pile.eleuther.ai/), a dataset known to contain profanity and texts that are lewd or otherwise offensive. See [Section 6 of the Pile paper](https://arxiv.org/abs/2101.00027) for a discussion of documented biases with regards to gender, religion, and race. Pythia-160M may produce socially unacceptable or undesirable text, *even if* the prompt itself does not include anything explicitly offensive. If you plan on using text generated through, for example, the Hosted Inference API, we recommend having a human curate the outputs of this language model before presenting it to other people. Please inform your audience that the text was generated by Pythia-160M. ### Quickstart Pythia models can be loaded and used via the following code, demonstrated here for the third `pythia-70m-deduped` checkpoint: ```python from transformers import GPTNeoXForCausalLM, AutoTokenizer model = GPTNeoXForCausalLM.from_pretrained( "EleutherAI/pythia-70m-deduped", revision="step3000", cache_dir="./pythia-70m-deduped/step3000", ) tokenizer = AutoTokenizer.from_pretrained( "EleutherAI/pythia-70m-deduped", revision="step3000", cache_dir="./pythia-70m-deduped/step3000", ) inputs = tokenizer("Hello, I am", return_tensors="pt") tokens = model.generate(**inputs) tokenizer.decode(tokens[0]) ``` Revision/branch `step143000` corresponds exactly to the model checkpoint on the `main` branch of each model.<br> For more information on how to use all Pythia models, see [documentation on GitHub](https://github.com/EleutherAI/pythia). ## Training ### Training data [The Pile](https://pile.eleuther.ai/) is a 825GiB general-purpose dataset in English. It was created by EleutherAI specifically for training large language models. It contains texts from 22 diverse sources, roughly broken down into five categories: academic writing (e.g. arXiv), internet (e.g. CommonCrawl), prose (e.g. Project Gutenberg), dialogue (e.g. YouTube subtitles), and miscellaneous (e.g. GitHub, Enron Emails). See [the Pile paper](https://arxiv.org/abs/2101.00027) for a breakdown of all data sources, methodology, and a discussion of ethical implications. Consult [the datasheet](https://arxiv.org/abs/2201.07311) for more detailed documentation about the Pile and its component datasets. The Pile can be downloaded from the [official website](https://pile.eleuther.ai/), or from a [community mirror](https://the-eye.eu/public/AI/pile/).<br> The Pile was **not** deduplicated before being used to train Pythia-160M. ### Training procedure All models were trained on the exact same data, in the exact same order. Each model saw 299,892,736,000 tokens during training, and 143 checkpoints for each model are saved every 2,097,152,000 tokens, spaced evenly throughout training, from `step1000` to `step143000` (which is the same as `main`). In addition, we also provide frequent early checkpoints: `step0` and `step{1,2,4...512}`. This corresponds to training for just under 1 epoch on the Pile for non-deduplicated models, and about 1.5 epochs on the deduplicated Pile. All *Pythia* models trained for 143000 steps at a batch size of 2M (2,097,152 tokens).<br> See [GitHub](https://github.com/EleutherAI/pythia) for more details on training procedure, including [how to reproduce it](https://github.com/EleutherAI/pythia/blob/main/README.md#reproducing-training).<br> Pythia uses the same tokenizer as [GPT-NeoX- 20B](https://huggingface.co/EleutherAI/gpt-neox-20b). ## Evaluations All 16 *Pythia* models were evaluated using the [LM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness). You can access the results by model and step at `results/json/*` in the [GitHub repository](https://github.com/EleutherAI/pythia/tree/main/results/json/).<br> Expand the sections below to see plots of evaluation results for all Pythia and Pythia-deduped models compared with OPT and BLOOM. <details> <summary>LAMBADA – OpenAI</summary> <img src="/EleutherAI/pythia-12b/resolve/main/eval_plots/lambada_openai_v1.png" style="width:auto"/> </details> <details> <summary>Physical Interaction: Question Answering (PIQA)</summary> <img src="/EleutherAI/pythia-12b/resolve/main/eval_plots/piqa_v1.png" style="width:auto"/> </details> <details> <summary>WinoGrande</summary> <img src="/EleutherAI/pythia-12b/resolve/main/eval_plots/winogrande_v1.png" style="width:auto"/> </details> <details> <summary>AI2 Reasoning Challenge—Easy Set</summary> <img src="/EleutherAI/pythia-12b/resolve/main/eval_plots/arc_easy_v1.png" style="width:auto"/> </details> <details> <summary>SciQ</summary> <img src="/EleutherAI/pythia-12b/resolve/main/eval_plots/sciq_v1.png" style="width:auto"/> </details> ## Changelog This section compares differences between previously released [Pythia v0](https://huggingface.co/models?other=pythia_v0) and the current models. See Appendix B of the Pythia paper for further discussion of these changes and the motivation behind them. We found that retraining Pythia had no impact on benchmark performance. - All model sizes are now trained with uniform batch size of 2M tokens. Previously, the models of size 160M, 410M, and 1.4B parameters were trained with batch sizes of 4M tokens. - We added checkpoints at initialization (step 0) and steps {1,2,4,8,16,32,64, 128,256,512} in addition to every 1000 training steps. - Flash Attention was used in the new retrained suite. - We remedied a minor inconsistency that existed in the original suite: all models of size 2.8B parameters or smaller had a learning rate (LR) schedule which decayed to a minimum LR of 10% the starting LR rate, but the 6.9B and 12B models all used an LR schedule which decayed to a minimum LR of 0. In the redone training runs, we rectified this inconsistency: all models now were trained with LR decaying to a minimum of 0.1× their maximum LR. ### Naming convention and parameter count *Pythia* models were renamed in January 2023. It is possible that the old naming convention still persists in some documentation by accident. The current naming convention (70M, 160M, etc.) is based on total parameter count. <figure style="width:32em"> | current Pythia suffix | old suffix | total params | non-embedding params | | --------------------: | ---------: | -------------: | -------------------: | | 70M | 19M | 70,426,624 | 18,915,328 | | 160M | 125M | 162,322,944 | 85,056,000 | | 410M | 350M | 405,334,016 | 302,311,424 | | 1B | 800M | 1,011,781,632 | 805,736,448 | | 1.4B | 1.3B | 1,414,647,808 | 1,208,602,624 | | 2.8B | 2.7B | 2,775,208,960 | 2,517,652,480 | | 6.9B | 6.7B | 6,857,302,016 | 6,444,163,072 | | 12B | 13B | 11,846,072,320 | 11,327,027,200 | </figure>
sadickam/sdg-classification-bert
sadickam
"2024-03-05T05:19:21Z"
92,425
6
transformers
[ "transformers", "pytorch", "safetensors", "bert", "text-classification", "en", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2023-01-15T23:34:42Z"
--- license: mit language: - en metrics: - accuracy - matthews_correlation widget: - text: "Highway work zones create potential risks for both traffic and workers in addition to traffic congestion and delays that result in increased road user delay." - text: "A circular economy is a way of achieving sustainable consumption and production, as well as nature positive outcomes." --- # sadickam/sdg-classification-bert <!-- Provide a quick summary of what the model is/does. --> This model (sgdBERT) is for classifying text with respect to the United Nations sustainable development goals (SDG). ![image](https://user-images.githubusercontent.com/73560591/216751462-ced482ba-5d8e-48aa-9a48-5557979a35f1.png) Source:https://www.un.org/development/desa/disabilities/about-us/sustainable-development-goals-sdgs-and-disability.html ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This text classification model was developed by fine-tuning the bert-base-uncased pre-trained model. The training data for this fine-tuned model was sourced from the publicly available OSDG Community Dataset (OSDG-CD) at https://zenodo.org/record/5550238#.ZBulfcJByF4. This model was made as part of academic research at Deakin University. The goal was to make a transformer-based SDG text classification model that anyone could use. Only the first 16 UN SDGs supported. The primary model details are highlighted below: - **Model type:** Text classification - **Language(s) (NLP):** English - **License:** mit - **Finetuned from model [optional]:** bert-base-uncased ### Model Sources <!-- Provide the basic links for the model. --> - **Repository:** https://huggingface.co/sadickam/sdg-classification-bert - **Demo [optional]:** option 1: https://sadickam-sdg-text-classifier.hf.space/; option 2: https://sadickam-sdg-classification-bert-main-qxg1gv.streamlit.app/ ### Direct Use <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> This is a fine-tuned model and therefore requires no further training. ## How to Get Started with the Model Use the code below to get started with the model. ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("sadickam/sdg-classification-bert") model = AutoModelForSequenceClassification.from_pretrained("sadickam/sdg-classification-bert") ``` ## Training Data <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> The training data includes text from a wide range of industries and academic research fields. Hence, this fine-tuned model is not for a specific industry. See training here: https://zenodo.org/record/5550238#.ZBulfcJByF4 ## Training Hyperparameters - Num_epoch = 3 - Learning rate = 5e-5 - Batch size = 16 ## Evaluation #### Metrics <!-- These are the evaluation metrics being used, ideally with a description of why. --> - Accuracy = 0.90 - Matthews correlation = 0.89 ## Citation Sadick, A.M. (2023). SDG classification with BERT. https://huggingface.co/sadickam/sdg-classification-bert <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> ## Model Card Contact s.sadick@deakin.edu.au
cross-encoder/ms-marco-MiniLM-L-2-v2
cross-encoder
"2021-08-05T08:39:25Z"
92,255
1
transformers
[ "transformers", "pytorch", "jax", "bert", "text-classification", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- license: apache-2.0 --- # Cross-Encoder for MS Marco This model was trained on the [MS Marco Passage Ranking](https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See [SBERT.net Retrieve & Re-rank](https://www.sbert.net/examples/applications/retrieve_rerank/README.html) for more details. The training code is available here: [SBERT.net Training MS Marco](https://github.com/UKPLab/sentence-transformers/tree/master/examples/training/ms_marco) ## Usage with Transformers ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch model = AutoModelForSequenceClassification.from_pretrained('model_name') tokenizer = AutoTokenizer.from_pretrained('model_name') features = tokenizer(['How many people live in Berlin?', 'How many people live in Berlin?'], ['Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.', 'New York City is famous for the Metropolitan Museum of Art.'], padding=True, truncation=True, return_tensors="pt") model.eval() with torch.no_grad(): scores = model(**features).logits print(scores) ``` ## Usage with SentenceTransformers The usage becomes easier when you have [SentenceTransformers](https://www.sbert.net/) installed. Then, you can use the pre-trained models like this: ```python from sentence_transformers import CrossEncoder model = CrossEncoder('model_name', max_length=512) scores = model.predict([('Query', 'Paragraph1'), ('Query', 'Paragraph2') , ('Query', 'Paragraph3')]) ``` ## Performance In the following table, we provide various pre-trained Cross-Encoders together with their performance on the [TREC Deep Learning 2019](https://microsoft.github.io/TREC-2019-Deep-Learning/) and the [MS Marco Passage Reranking](https://github.com/microsoft/MSMARCO-Passage-Ranking/) dataset. | Model-Name | NDCG@10 (TREC DL 19) | MRR@10 (MS Marco Dev) | Docs / Sec | | ------------- |:-------------| -----| --- | | **Version 2 models** | | | | cross-encoder/ms-marco-TinyBERT-L-2-v2 | 69.84 | 32.56 | 9000 | cross-encoder/ms-marco-MiniLM-L-2-v2 | 71.01 | 34.85 | 4100 | cross-encoder/ms-marco-MiniLM-L-4-v2 | 73.04 | 37.70 | 2500 | cross-encoder/ms-marco-MiniLM-L-6-v2 | 74.30 | 39.01 | 1800 | cross-encoder/ms-marco-MiniLM-L-12-v2 | 74.31 | 39.02 | 960 | **Version 1 models** | | | | cross-encoder/ms-marco-TinyBERT-L-2 | 67.43 | 30.15 | 9000 | cross-encoder/ms-marco-TinyBERT-L-4 | 68.09 | 34.50 | 2900 | cross-encoder/ms-marco-TinyBERT-L-6 | 69.57 | 36.13 | 680 | cross-encoder/ms-marco-electra-base | 71.99 | 36.41 | 340 | **Other models** | | | | nboost/pt-tinybert-msmarco | 63.63 | 28.80 | 2900 | nboost/pt-bert-base-uncased-msmarco | 70.94 | 34.75 | 340 | nboost/pt-bert-large-msmarco | 73.36 | 36.48 | 100 | Capreolus/electra-base-msmarco | 71.23 | 36.89 | 340 | amberoad/bert-multilingual-passage-reranking-msmarco | 68.40 | 35.54 | 330 | sebastian-hofstaetter/distilbert-cat-margin_mse-T2-msmarco | 72.82 | 37.88 | 720 Note: Runtime was computed on a V100 GPU.
sentence-transformers/gtr-t5-base
sentence-transformers
"2024-03-27T10:40:20Z"
91,546
15
sentence-transformers
[ "sentence-transformers", "pytorch", "safetensors", "t5", "feature-extraction", "sentence-similarity", "en", "arxiv:2112.07899", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- language: en license: apache-2.0 library_name: sentence-transformers tags: - sentence-transformers - feature-extraction - sentence-similarity pipeline_tag: sentence-similarity --- # sentence-transformers/gtr-t5-base This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space. The model was specifically trained for the task of semantic search. This model was converted from the Tensorflow model [gtr-base-1](https://tfhub.dev/google/gtr/gtr-base/1) to PyTorch. When using this model, have a look at the publication: [Large Dual Encoders Are Generalizable Retrievers](https://arxiv.org/abs/2112.07899). The tfhub model and this PyTorch model can produce slightly different embeddings, however, when run on the same benchmarks, they produce identical results. The model uses only the encoder from a T5-base model. The weights are stored in FP16. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/gtr-t5-base') embeddings = model.encode(sentences) print(embeddings) ``` The model requires sentence-transformers version 2.2.0 or newer. ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/gtr-t5-base) ## Citing & Authors If you find this model helpful, please cite the respective publication: [Large Dual Encoders Are Generalizable Retrievers](https://arxiv.org/abs/2112.07899)
DeepFloyd/t5-v1_1-xxl
DeepFloyd
"2022-12-20T13:12:54Z"
91,496
33
transformers
[ "transformers", "pytorch", "t5", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
null
"2022-12-19T21:08:56Z"
Entry not found
microsoft/deberta-v2-xlarge
microsoft
"2022-09-26T08:59:06Z"
91,160
19
transformers
[ "transformers", "pytorch", "tf", "deberta-v2", "deberta", "fill-mask", "en", "arxiv:2006.03654", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: en tags: - deberta - fill-mask thumbnail: https://huggingface.co/front/thumbnails/microsoft.png license: mit --- ## DeBERTa: Decoding-enhanced BERT with Disentangled Attention [DeBERTa](https://arxiv.org/abs/2006.03654) improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. It outperforms BERT and RoBERTa on majority of NLU tasks with 80GB training data. Please check the [official repository](https://github.com/microsoft/DeBERTa) for more details and updates. This is the DeBERTa V2 xlarge model with 24 layers, 1536 hidden size. The total parameters are 900M and it is trained with 160GB raw data. ### Fine-tuning on NLU tasks We present the dev results on SQuAD 1.1/2.0 and several GLUE benchmark tasks. | Model | SQuAD 1.1 | SQuAD 2.0 | MNLI-m/mm | SST-2 | QNLI | CoLA | RTE | MRPC | QQP |STS-B | |---------------------------|-----------|-----------|-------------|-------|------|------|--------|-------|-------|------| | | F1/EM | F1/EM | Acc | Acc | Acc | MCC | Acc |Acc/F1 |Acc/F1 |P/S | | BERT-Large | 90.9/84.1 | 81.8/79.0 | 86.6/- | 93.2 | 92.3 | 60.6 | 70.4 | 88.0/- | 91.3/- |90.0/- | | RoBERTa-Large | 94.6/88.9 | 89.4/86.5 | 90.2/- | 96.4 | 93.9 | 68.0 | 86.6 | 90.9/- | 92.2/- |92.4/- | | XLNet-Large | 95.1/89.7 | 90.6/87.9 | 90.8/- | 97.0 | 94.9 | 69.0 | 85.9 | 90.8/- | 92.3/- |92.5/- | | [DeBERTa-Large](https://huggingface.co/microsoft/deberta-large)<sup>1</sup> | 95.5/90.1 | 90.7/88.0 | 91.3/91.1| 96.5|95.3| 69.5| 91.0| 92.6/94.6| 92.3/- |92.8/92.5 | | [DeBERTa-XLarge](https://huggingface.co/microsoft/deberta-xlarge)<sup>1</sup> | -/- | -/- | 91.5/91.2| 97.0 | - | - | 93.1 | 92.1/94.3 | - |92.9/92.7| | [DeBERTa-V2-XLarge](https://huggingface.co/microsoft/deberta-v2-xlarge)<sup>1</sup>|95.8/90.8| 91.4/88.9|91.7/91.6| **97.5**| 95.8|71.1|**93.9**|92.0/94.2|92.3/89.8|92.9/92.9| |**[DeBERTa-V2-XXLarge](https://huggingface.co/microsoft/deberta-v2-xxlarge)<sup>1,2</sup>**|**96.1/91.4**|**92.2/89.7**|**91.7/91.9**|97.2|**96.0**|**72.0**| 93.5| **93.1/94.9**|**92.7/90.3** |**93.2/93.1** | -------- #### Notes. - <sup>1</sup> Following RoBERTa, for RTE, MRPC, STS-B, we fine-tune the tasks based on [DeBERTa-Large-MNLI](https://huggingface.co/microsoft/deberta-large-mnli), [DeBERTa-XLarge-MNLI](https://huggingface.co/microsoft/deberta-xlarge-mnli), [DeBERTa-V2-XLarge-MNLI](https://huggingface.co/microsoft/deberta-v2-xlarge-mnli), [DeBERTa-V2-XXLarge-MNLI](https://huggingface.co/microsoft/deberta-v2-xxlarge-mnli). The results of SST-2/QQP/QNLI/SQuADv2 will also be slightly improved when start from MNLI fine-tuned models, however, we only report the numbers fine-tuned from pretrained base models for those 4 tasks. - <sup>2</sup> To try the **XXLarge** model with **[HF transformers](https://huggingface.co/transformers/main_classes/trainer.html)**, you need to specify **--sharded_ddp** ```bash cd transformers/examples/text-classification/ export TASK_NAME=mrpc python -m torch.distributed.launch --nproc_per_node=8 run_glue.py --model_name_or_path microsoft/deberta-v2-xxlarge \\\\ --task_name $TASK_NAME --do_train --do_eval --max_seq_length 128 --per_device_train_batch_size 4 \\\\ --learning_rate 3e-6 --num_train_epochs 3 --output_dir /tmp/$TASK_NAME/ --overwrite_output_dir --sharded_ddp --fp16 ``` ### Citation If you find DeBERTa useful for your work, please cite the following paper: ``` latex @inproceedings{ he2021deberta, title={DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION}, author={Pengcheng He and Xiaodong Liu and Jianfeng Gao and Weizhu Chen}, booktitle={International Conference on Learning Representations}, year={2021}, url={https://openreview.net/forum?id=XPZIaotutsD} } ```
keremberke/yolov5n-license-plate
keremberke
"2023-01-01T09:59:54Z"
91,051
14
yolov5
[ "yolov5", "tensorboard", "yolo", "vision", "object-detection", "pytorch", "dataset:keremberke/license-plate-object-detection", "model-index", "has_space", "region:us" ]
object-detection
"2023-01-01T03:02:44Z"
--- tags: - yolov5 - yolo - vision - object-detection - pytorch library_name: yolov5 library_version: 7.0.6 inference: false datasets: - keremberke/license-plate-object-detection model-index: - name: keremberke/yolov5n-license-plate results: - task: type: object-detection dataset: type: keremberke/license-plate-object-detection name: keremberke/license-plate-object-detection split: validation metrics: - type: precision # since mAP@0.5 is not available on hf.co/metrics value: 0.9783431294995892 # min: 0.0 - max: 1.0 name: mAP@0.5 --- <div align="center"> <img width="640" alt="keremberke/yolov5n-license-plate" src="https://huggingface.co/keremberke/yolov5n-license-plate/resolve/main/sample_visuals.jpg"> </div> ### How to use - Install [yolov5](https://github.com/fcakyon/yolov5-pip): ```bash pip install -U yolov5 ``` - Load model and perform prediction: ```python import yolov5 # load model model = yolov5.load('keremberke/yolov5n-license-plate') # set model parameters model.conf = 0.25 # NMS confidence threshold model.iou = 0.45 # NMS IoU threshold model.agnostic = False # NMS class-agnostic model.multi_label = False # NMS multiple labels per box model.max_det = 1000 # maximum number of detections per image # set image img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' # perform inference results = model(img, size=640) # inference with test time augmentation results = model(img, augment=True) # parse results predictions = results.pred[0] boxes = predictions[:, :4] # x1, y1, x2, y2 scores = predictions[:, 4] categories = predictions[:, 5] # show detection bounding boxes on image results.show() # save results into "results/" folder results.save(save_dir='results/') ``` - Finetune the model on your custom dataset: ```bash yolov5 train --data data.yaml --img 640 --batch 16 --weights keremberke/yolov5n-license-plate --epochs 10 ``` **More models available at: [awesome-yolov5-models](https://github.com/keremberke/awesome-yolov5-models)**
nlpaueb/legal-bert-small-uncased
nlpaueb
"2022-04-28T14:43:32Z"
90,587
19
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "legal", "fill-mask", "en", "license:cc-by-sa-4.0", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: en pipeline_tag: fill-mask license: cc-by-sa-4.0 thumbnail: https://i.ibb.co/p3kQ7Rw/Screenshot-2020-10-06-at-12-16-36-PM.png tags: - legal widget: - text: "The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of police." --- # LEGAL-BERT: The Muppets straight out of Law School <img align="left" src="https://i.ibb.co/p3kQ7Rw/Screenshot-2020-10-06-at-12-16-36-PM.png" width="100"/> LEGAL-BERT is a family of BERT models for the legal domain, intended to assist legal NLP research, computational law, and legal technology applications. To pre-train the different variations of LEGAL-BERT, we collected 12 GB of diverse English legal text from several fields (e.g., legislation, court cases, contracts) scraped from publicly available resources. Sub-domain variants (CONTRACTS-, EURLEX-, ECHR-) and/or general LEGAL-BERT perform better than using BERT out of the box for domain-specific tasks.<br> This is the light-weight version of BERT-BASE (33% the size of BERT-BASE) pre-trained from scratch on legal data, which achieves comparable performance to larger models, while being much more efficient (approximately 4 times faster) with a smaller environmental footprint. <br/><br/> --- I. Chalkidis, M. Fergadiotis, P. Malakasiotis, N. Aletras and I. Androutsopoulos. "LEGAL-BERT: The Muppets straight out of Law School". In Findings of Empirical Methods in Natural Language Processing (EMNLP 2020) (Short Papers), to be held online, 2020. (https://aclanthology.org/2020.findings-emnlp.261) --- ## Pre-training corpora The pre-training corpora of LEGAL-BERT include: * 116,062 documents of EU legislation, publicly available from EURLEX (http://eur-lex.europa.eu), the repository of EU Law running under the EU Publication Office. * 61,826 documents of UK legislation, publicly available from the UK legislation portal (http://www.legislation.gov.uk). * 19,867 cases from the European Court of Justice (ECJ), also available from EURLEX. * 12,554 cases from HUDOC, the repository of the European Court of Human Rights (ECHR) (http://hudoc.echr.coe.int/eng). * 164,141 cases from various courts across the USA, hosted in the Case Law Access Project portal (https://case.law). * 76,366 US contracts from EDGAR, the database of US Securities and Exchange Commission (SECOM) (https://www.sec.gov/edgar.shtml). ## Pre-training details * We trained BERT using the official code provided in Google BERT's GitHub repository (https://github.com/google-research/bert). * We released a model similar to the English BERT-BASE model (12-layer, 768-hidden, 12-heads, 110M parameters). * We chose to follow the same training set-up: 1 million training steps with batches of 256 sequences of length 512 with an initial learning rate 1e-4. * We were able to use a single Google Cloud TPU v3-8 provided for free from [TensorFlow Research Cloud (TFRC)](https://www.tensorflow.org/tfrc), while also utilizing [GCP research credits](https://edu.google.com/programs/credits/research). Huge thanks to both Google programs for supporting us! ## Models list | Model name | Model Path | Training corpora | | ------------------- | ------------------------------------ | ------------------- | | CONTRACTS-BERT-BASE | `nlpaueb/bert-base-uncased-contracts` | US contracts | | EURLEX-BERT-BASE | `nlpaueb/bert-base-uncased-eurlex` | EU legislation | | ECHR-BERT-BASE | `nlpaueb/bert-base-uncased-echr` | ECHR cases | | LEGAL-BERT-BASE * | `nlpaueb/legal-bert-base-uncased` | All | | LEGAL-BERT-SMALL | `nlpaueb/legal-bert-small-uncased` | All | \* LEGAL-BERT-BASE is the model referred to as LEGAL-BERT-SC in Chalkidis et al. (2020); a model trained from scratch in the legal corpora mentioned below using a newly created vocabulary by a sentence-piece tokenizer trained on the very same corpora. \*\* As many of you expressed interest in the LEGAL-BERT-FP models (those relying on the original BERT-BASE checkpoint), they have been released in Archive.org (https://archive.org/details/legal_bert_fp), as these models are secondary and possibly only interesting for those who aim to dig deeper in the open questions of Chalkidis et al. (2020). ## Load Pretrained Model ```python from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nlpaueb/legal-bert-small-uncased") model = AutoModel.from_pretrained("nlpaueb/legal-bert-small-uncased") ``` ## Use LEGAL-BERT variants as Language Models | Corpus | Model | Masked token | Predictions | | --------------------------------- | ---------------------------------- | ------------ | ------------ | | | **BERT-BASE-UNCASED** | | (Contracts) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('new', '0.09'), ('current', '0.04'), ('proposed', '0.03'), ('marketing', '0.03'), ('joint', '0.02') | (ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.32'), ('rape', '0.22'), ('abuse', '0.14'), ('death', '0.04'), ('violence', '0.03') | (EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('farm', '0.25'), ('livestock', '0.08'), ('draft', '0.06'), ('domestic', '0.05'), ('wild', '0.05') | | **CONTRACTS-BERT-BASE** | | (Contracts) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('letter', '0.38'), ('dealer', '0.04'), ('employment', '0.03'), ('award', '0.03'), ('contribution', '0.02') | (ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('death', '0.39'), ('imprisonment', '0.07'), ('contempt', '0.05'), ('being', '0.03'), ('crime', '0.02') | (EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | (('domestic', '0.18'), ('laboratory', '0.07'), ('household', '0.06'), ('personal', '0.06'), ('the', '0.04') | | **EURLEX-BERT-BASE** | | (Contracts) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('supply', '0.11'), ('cooperation', '0.08'), ('service', '0.07'), ('licence', '0.07'), ('distribution', '0.05') | (ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.66'), ('death', '0.07'), ('imprisonment', '0.07'), ('murder', '0.04'), ('rape', '0.02') | (EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('live', '0.43'), ('pet', '0.28'), ('certain', '0.05'), ('fur', '0.03'), ('the', '0.02') | | **ECHR-BERT-BASE** | | (Contracts) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('second', '0.24'), ('latter', '0.10'), ('draft', '0.05'), ('bilateral', '0.05'), ('arbitration', '0.04') | (ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.99'), ('death', '0.01'), ('inhuman', '0.00'), ('beating', '0.00'), ('rape', '0.00') | (EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('pet', '0.17'), ('all', '0.12'), ('slaughtered', '0.10'), ('domestic', '0.07'), ('individual', '0.05') | | **LEGAL-BERT-BASE** | | (Contracts) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('settlement', '0.26'), ('letter', '0.23'), ('dealer', '0.04'), ('master', '0.02'), ('supplemental', '0.02') | (ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '1.00'), ('detention', '0.00'), ('arrest', '0.00'), ('rape', '0.00'), ('death', '0.00') | (EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('live', '0.67'), ('beef', '0.17'), ('farm', '0.03'), ('pet', '0.02'), ('dairy', '0.01') | | **LEGAL-BERT-SMALL** | | (Contracts) | This [MASK] Agreement is between General Motors and John Murray . | employment | ('license', '0.09'), ('transition', '0.08'), ('settlement', '0.04'), ('consent', '0.03'), ('letter', '0.03') | (ECHR) | The applicant submitted that her husband was subjected to treatment amounting to [MASK] whilst in the custody of Adana Security Directorate | torture | ('torture', '0.59'), ('pain', '0.05'), ('ptsd', '0.05'), ('death', '0.02'), ('tuberculosis', '0.02') | (EURLEX) | Establishing a system for the identification and registration of [MASK] animals and regarding the labelling of beef and beef products . | bovine | ('all', '0.08'), ('live', '0.07'), ('certain', '0.07'), ('the', '0.07'), ('farm', '0.05') ## Evaluation on downstream tasks Consider the experiments in the article "LEGAL-BERT: The Muppets straight out of Law School". Chalkidis et al., 2020, (https://aclanthology.org/2020.findings-emnlp.261) ## Author - Publication ``` @inproceedings{chalkidis-etal-2020-legal, title = "{LEGAL}-{BERT}: The Muppets straight out of Law School", author = "Chalkidis, Ilias and Fergadiotis, Manos and Malakasiotis, Prodromos and Aletras, Nikolaos and Androutsopoulos, Ion", booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", doi = "10.18653/v1/2020.findings-emnlp.261", pages = "2898--2904" } ``` ## About Us [AUEB's Natural Language Processing Group](http://nlp.cs.aueb.gr) develops algorithms, models, and systems that allow computers to process and generate natural language texts. The group's current research interests include: * question answering systems for databases, ontologies, document collections, and the Web, especially biomedical question answering, * natural language generation from databases and ontologies, especially Semantic Web ontologies, text classification, including filtering spam and abusive content, * information extraction and opinion mining, including legal text analytics and sentiment analysis, * natural language processing tools for Greek, for example parsers and named-entity recognizers, machine learning in natural language processing, especially deep learning. The group is part of the Information Processing Laboratory of the Department of Informatics of the Athens University of Economics and Business. [Ilias Chalkidis](https://iliaschalkidis.github.io) on behalf of [AUEB's Natural Language Processing Group](http://nlp.cs.aueb.gr) | Github: [@ilias.chalkidis](https://github.com/iliaschalkidis) | Twitter: [@KiddoThe2B](https://twitter.com/KiddoThe2B) |
ashawkey/stable-zero123-diffusers
ashawkey
"2023-12-14T03:11:38Z"
90,385
6
diffusers
[ "diffusers", "safetensors", "arxiv:2303.11328", "license:mit", "has_space", "diffusers:Zero123Pipeline", "region:us" ]
null
"2023-12-14T03:04:01Z"
--- license: mit --- # Uses _Note: This section is originally taken from the [Stable Diffusion v2 model card](https://huggingface.co/stabilityai/stable-diffusion-2), but applies in the same way to Zero-1-to-3._ ## Direct Use The model is intended for research purposes only. Possible research areas and tasks include: - Safe deployment of large-scale models. - Probing and understanding the limitations and biases of generative models. - Generation of artworks and use in design and other artistic processes. - Applications in educational or creative tools. - Research on generative models. Excluded uses are described below. ### Misuse, Malicious Use, and Out-of-Scope Use The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes. #### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. #### Misuse and Malicious Use Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to: - Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc. - Intentionally promoting or propagating discriminatory content or harmful stereotypes. - Impersonating individuals without their consent. - Sexual content without consent of the people who might see it. - Mis- and disinformation - Representations of egregious violence and gore - Sharing of copyrighted or licensed material in violation of its terms of use. - Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use. ## Limitations and Bias ### Limitations - The model does not achieve perfect photorealism. - The model cannot render legible text. - Faces and people in general may not be parsed or generated properly. - The autoencoding part of the model is lossy. - Stable Diffusion was trained on a subset of the large-scale dataset [LAION-5B](https://laion.ai/blog/laion-5b/), which contains adult, violent and sexual content. To partially mitigate this, Stability AI has filtered the dataset using LAION's NSFW detector. - Zero-1-to-3 was subsequently finetuned on a subset of the large-scale dataset [Objaverse](https://objaverse.allenai.org/), which might also potentially contain inappropriate content. To partially mitigate this, our demo applies a safety check to every uploaded image. ### Bias While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. Stable Diffusion was primarily trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/), which consists of images that are limited to English descriptions. Images and concepts from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as Western cultures are often overrepresented. Stable Diffusion mirrors and exacerbates biases to such a degree that viewer discretion must be advised irrespective of the input or its intent. ### Safety Module The intended use of this model is with the [Safety Checker](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/safety_checker.py) in Diffusers. This checker works by checking model inputs against known hard-coded NSFW concepts. Specifically, the checker compares the class probability of harmful concepts in the embedding space of the uploaded input images. The concepts are passed into the model with the image and compared to a hand-engineered weight for each NSFW concept. ## Citation ``` @misc{liu2023zero1to3, title={Zero-1-to-3: Zero-shot One Image to 3D Object}, author={Ruoshi Liu and Rundi Wu and Basile Van Hoorick and Pavel Tokmakov and Sergey Zakharov and Carl Vondrick}, year={2023}, eprint={2303.11328}, archivePrefix={arXiv}, primaryClass={cs.CV} } ```
stabilityai/stable-video-diffusion-img2vid
stabilityai
"2024-02-16T17:32:32Z"
90,380
652
diffusers
[ "diffusers", "safetensors", "image-to-video", "license:other", "has_space", "diffusers:StableVideoDiffusionPipeline", "region:us" ]
image-to-video
"2023-11-20T16:19:00Z"
--- pipeline_tag: image-to-video license: other license_name: stable-video-diffusion-nc-community license_link: LICENSE --- # Stable Video Diffusion Image-to-Video Model Card <!-- Provide a quick summary of what the model is/does. --> ![row01](output_tile.gif) Stable Video Diffusion (SVD) Image-to-Video is a diffusion model that takes in a still image as a conditioning frame, and generates a video from it. ## Model Details ### Model Description (SVD) Image-to-Video is a latent diffusion model trained to generate short video clips from an image conditioning. This model was trained to generate 14 frames at resolution 576x1024 given a context frame of the same size. We also finetune the widely used [f8-decoder](https://huggingface.co/docs/diffusers/api/models/autoencoderkl#loading-from-the-original-format) for temporal consistency. For convenience, we additionally provide the model with the standard frame-wise decoder [here](https://huggingface.co/stabilityai/stable-video-diffusion-img2vid/blob/main/svd_image_decoder.safetensors). - **Developed by:** Stability AI - **Funded by:** Stability AI - **Model type:** Generative image-to-video model ### Model Sources For research purposes, we recommend our `generative-models` Github repository (https://github.com/Stability-AI/generative-models), which implements the most popular diffusion frameworks (both training and inference). - **Repository:** https://github.com/Stability-AI/generative-models - **Paper:** https://stability.ai/research/stable-video-diffusion-scaling-latent-video-diffusion-models-to-large-datasets ## Evaluation ![comparison](comparison.png) The chart above evaluates user preference for SVD-Image-to-Video over [GEN-2](https://research.runwayml.com/gen2) and [PikaLabs](https://www.pika.art/). SVD-Image-to-Video is preferred by human voters in terms of video quality. For details on the user study, we refer to the [research paper](https://stability.ai/research/stable-video-diffusion-scaling-latent-video-diffusion-models-to-large-datasets) ## Uses ### Direct Use The model is intended for research purposes only. Possible research areas and tasks include - Research on generative models. - Safe deployment of models which have the potential to generate harmful content. - Probing and understanding the limitations and biases of generative models. - Generation of artworks and use in design and other artistic processes. - Applications in educational or creative tools. Excluded uses are described below. ### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. The model should not be used in any way that violates Stability AI's [Acceptable Use Policy](https://stability.ai/use-policy). ## Limitations and Bias ### Limitations - The generated videos are rather short (<= 4sec), and the model does not achieve perfect photorealism. - The model may generate videos without motion, or very slow camera pans. - The model cannot be controlled through text. - The model cannot render legible text. - Faces and people in general may not be generated properly. - The autoencoding part of the model is lossy. ### Recommendations The model is intended for research purposes only. ## How to Get Started with the Model Check out https://github.com/Stability-AI/generative-models # Appendix: All considered potential data sources were included for final training, with none held out as the proposed data filtering methods described in the SVD paper handle the quality control/filtering of the dataset. With regards to safety/NSFW filtering, sources considered were either deemed safe or filtered with the in-house NSFW filters. No explicit human labor is involved in training data preparation. However, human evaluation for model outputs and quality was extensively used to evaluate model quality and performance. The evaluations were performed with third-party contractor platforms (Amazon Sagemaker, Amazon Mechanical Turk, Prolific) with fluent English-speaking contractors from various countries, primarily from the USA, UK, and Canada. Each worker was paid $12/hr for the time invested in the evaluation. No other third party was involved in the development of this model; the model was fully developed in-house at Stability AI. Training the SVD checkpoints required a total of approximately 200,000 A100 80GB hours. The majority of the training occurred on 48 * 8 A100s, while some stages took more/less than that. The resulting CO2 emission is ~19,000kg CO2 eq., and energy consumed is ~64000 kWh. The released checkpoints (SVD/SVD-XT) are image-to-video models that generate short videos/animations closely following the given input image. Since the model relies on an existing supplied image, the risk of disclosing specific material or novel unsafe content is minimal. This was also evaluated by third-party independent red-teaming services, which agree with our conclusion to a high degree of confidence (>90% in various areas of safety red-teaming). The external evaluations were also performed for trustworthiness, leading to >95% confidence in real, trustworthy videos. With the default settings at the time of release, SVD takes ~100s for generation, and SVD-XT takes ~180s on an A100 80GB card. Several optimizations to trade off quality / memory / speed can be done to perform faster inference or inference on lower VRAM cards. The information related to the model and its development process and usage protocols can be found in the GitHub repo, associated research paper, and HuggingFace model page/cards. The released model inference & demo code has image-level watermarking enabled by default, which can be used to detect the outputs. This is done via the imWatermark Python library. The model can be used to generate videos from static initial images. However, we prohibit unlawful, obscene, or misleading uses of the model consistent with the terms of our license. For the open-weights release, our training data filtering mitigations alleviate this to some extent. These restrictions are explicitly enforced on user-facing interfaces at stablevideo.com, where a warning is issued. We do not take any responsibility for third-party interfaces. Submitting initial images that bypass input filters to tease out offensive or inappropriate content listed above is also prohibited. Safety filtering checks at stablevideo.com run on model inputs and outputs independently. More details on our user-facing interfaces can be found here: https://www.stablevideo.com/faq For stablevideo.com, we store preference data in the form of upvotes/downvotes on user-generated videos, and we have a pairwise ranker that runs while a user generates videos. This usage data is solely used for improving Stability AI’s future image/video models and services. No other third-party entities are given access to the usage data beyond Stability AI and maintainers of stablevideo.com. For usage statistics of SVD, we refer interested users to HuggingFace model download/usage statistics as a primary indicator. Third-party applications also have reported model usage statistics. We might also consider releasing aggregate usage statistics of stablevideo.com on reaching some milestones.
InstaDeepAI/nucleotide-transformer-v2-500m-multi-species
InstaDeepAI
"2024-02-21T17:01:57Z"
90,264
18
transformers
[ "transformers", "pytorch", "safetensors", "fill-mask", "DNA", "biology", "genomics", "custom_code", "dataset:InstaDeepAI/multi_species_genome", "dataset:InstaDeepAI/nucleotide_transformer_downstream_tasks", "license:cc-by-nc-sa-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2023-07-27T09:04:55Z"
--- license: cc-by-nc-sa-4.0 widget: - text: ACCTGA<mask>TTCTGAGTC tags: - DNA - biology - genomics datasets: - InstaDeepAI/multi_species_genome - InstaDeepAI/nucleotide_transformer_downstream_tasks --- # nucleotide-transformer-v2-500m-multi-species The Nucleotide Transformers are a collection of foundational language models that were pre-trained on DNA sequences from whole-genomes. Compared to other approaches, our models do not only integrate information from single reference genomes, but leverage DNA sequences from over 3,200 diverse human genomes, as well as 850 genomes from a wide range of species, including model and non-model organisms. Through robust and extensive evaluation, we show that these large models provide extremely accurate molecular phenotype prediction compared to existing methods Part of this collection is the **nucleotide-transformer-v2-500m-multi-species**, a 500m parameters transformer pre-trained on a collection of 850 genomes from a wide range of species, including model and non-model organisms. **Developed by:** InstaDeep, NVIDIA and TUM ### Model Sources <!-- Provide the basic links for the model. --> - **Repository:** [Nucleotide Transformer](https://github.com/instadeepai/nucleotide-transformer) - **Paper:** [The Nucleotide Transformer: Building and Evaluating Robust Foundation Models for Human Genomics](https://www.biorxiv.org/content/10.1101/2023.01.11.523679v1) ### How to use <!-- Need to adapt this section to our model. Need to figure out how to load the models from huggingface and do inference on them --> Until its next release, the `transformers` library needs to be installed from source with the following command in order to use the models: ```bash pip install --upgrade git+https://github.com/huggingface/transformers.git ``` A small snippet of code is given here in order to retrieve both logits and embeddings from a dummy DNA sequence. ```python from transformers import AutoTokenizer, AutoModelForMaskedLM import torch # Import the tokenizer and the model tokenizer = AutoTokenizer.from_pretrained("InstaDeepAI/nucleotide-transformer-v2-500m-multi-species", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("InstaDeepAI/nucleotide-transformer-v2-500m-multi-species", trust_remote_code=True) # Choose the length to which the input sequences are padded. By default, the # model max length is chosen, but feel free to decrease it as the time taken to # obtain the embeddings increases significantly with it. max_length = tokenizer.model_max_length # Create a dummy dna sequence and tokenize it sequences = ["ATTCCGATTCCGATTCCG", "ATTTCTCTCTCTCTCTGAGATCGATCGATCGAT"] tokens_ids = tokenizer.batch_encode_plus(sequences, return_tensors="pt", padding="max_length", max_length = max_length)["input_ids"] # Compute the embeddings attention_mask = tokens_ids != tokenizer.pad_token_id torch_outs = model( tokens_ids, attention_mask=attention_mask, encoder_attention_mask=attention_mask, output_hidden_states=True ) # Compute sequences embeddings embeddings = torch_outs['hidden_states'][-1].detach().numpy() print(f"Embeddings shape: {embeddings.shape}") print(f"Embeddings per token: {embeddings}") # Add embed dimension axis attention_mask = torch.unsqueeze(attention_mask, dim=-1) # Compute mean embeddings per sequence mean_sequence_embeddings = torch.sum(attention_mask*embeddings, axis=-2)/torch.sum(attention_mask, axis=1) print(f"Mean sequence embeddings: {mean_sequence_embeddings}") ``` ## Training data The **nucleotide-transformer-v2-500m-multi-species** model was pretrained on a total of 850 genomes downloaded from [NCBI](https://www.ncbi.nlm.nih.gov/). Plants and viruses are not included in these genomes, as their regulatory elements differ from those of interest in the paper's tasks. Some heavily studied model organisms were picked to be included in the collection of genomes, which represents a total of 174B nucleotides, i.e roughly 29B tokens. The data has been released as a HuggingFace dataset [here](https://huggingface.co/datasets/InstaDeepAI/multi_species_genomes). ## Training procedure ### Preprocessing The DNA sequences are tokenized using the Nucleotide Transformer Tokenizer, which tokenizes sequences as 6-mers tokenizer when possible, otherwise tokenizing each nucleotide separately as described in the [Tokenization](https://github.com/instadeepai/nucleotide-transformer#tokenization-abc) section of the associated repository. This tokenizer has a vocabulary size of 4105. The inputs of the model are then of the form: ``` <CLS> <ACGTGT> <ACGTGC> <ACGGAC> <GACTAG> <TCAGCA> ``` The tokenized sequence have a maximum length of 1,000. The masking procedure used is the standard one for Bert-style training: - 15% of the tokens are masked. - In 80% of the cases, the masked tokens are replaced by `[MASK]`. - In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace. - In the 10% remaining cases, the masked tokens are left as is. ### Pretraining The model was trained with 8 A100 80GB on 900B tokens, with an effective batch size of 1M tokens. The sequence length used was 1000 tokens. The Adam optimizer [38] was used with a learning rate schedule, and standard values for exponential decay rates and epsilon constants, β1 = 0.9, β2 = 0.999 and ε=1e-8. During a first warmup period, the learning rate was increased linearly between 5e-5 and 1e-4 over 16k steps before decreasing following a square root decay until the end of training. ### Architecture The model belongs to the second generation of nucleotide transformers, with the changes in architecture consisting the use of rotary positional embeddings instead of learned ones, as well as the introduction of Gated Linear Units. ### BibTeX entry and citation info ```bibtex @article{dalla2023nucleotide, title={The Nucleotide Transformer: Building and Evaluating Robust Foundation Models for Human Genomics}, author={Dalla-Torre, Hugo and Gonzalez, Liam and Mendoza Revilla, Javier and Lopez Carranza, Nicolas and Henryk Grywaczewski, Adam and Oteri, Francesco and Dallago, Christian and Trop, Evan and Sirelkhatim, Hassan and Richard, Guillaume and others}, journal={bioRxiv}, pages={2023--01}, year={2023}, publisher={Cold Spring Harbor Laboratory} } ```
flair/ner-english-large
flair
"2021-05-08T15:36:27Z"
90,243
36
flair
[ "flair", "pytorch", "token-classification", "sequence-tagger-model", "en", "dataset:conll2003", "arxiv:2011.06993", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- tags: - flair - token-classification - sequence-tagger-model language: en datasets: - conll2003 widget: - text: "George Washington went to Washington" --- ## English NER in Flair (large model) This is the large 4-class NER model for English that ships with [Flair](https://github.com/flairNLP/flair/). F1-Score: **94,36** (corrected CoNLL-03) Predicts 4 tags: | **tag** | **meaning** | |---------------------------------|-----------| | PER | person name | | LOC | location name | | ORG | organization name | | MISC | other name | Based on document-level XLM-R embeddings and [FLERT](https://arxiv.org/pdf/2011.06993v1.pdf/). --- ### Demo: How to use in Flair Requires: **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`) ```python from flair.data import Sentence from flair.models import SequenceTagger # load tagger tagger = SequenceTagger.load("flair/ner-english-large") # make example sentence sentence = Sentence("George Washington went to Washington") # predict NER tags tagger.predict(sentence) # print sentence print(sentence) # print predicted NER spans print('The following NER tags are found:') # iterate over entities and print for entity in sentence.get_spans('ner'): print(entity) ``` This yields the following output: ``` Span [1,2]: "George Washington" [− Labels: PER (1.0)] Span [5]: "Washington" [− Labels: LOC (1.0)] ``` So, the entities "*George Washington*" (labeled as a **person**) and "*Washington*" (labeled as a **location**) are found in the sentence "*George Washington went to Washington*". --- ### Training: Script to train this model The following Flair script was used to train this model: ```python import torch # 1. get the corpus from flair.datasets import CONLL_03 corpus = CONLL_03() # 2. what tag do we want to predict? tag_type = 'ner' # 3. make the tag dictionary from the corpus tag_dictionary = corpus.make_tag_dictionary(tag_type=tag_type) # 4. initialize fine-tuneable transformer embeddings WITH document context from flair.embeddings import TransformerWordEmbeddings embeddings = TransformerWordEmbeddings( model='xlm-roberta-large', layers="-1", subtoken_pooling="first", fine_tune=True, use_context=True, ) # 5. initialize bare-bones sequence tagger (no CRF, no RNN, no reprojection) from flair.models import SequenceTagger tagger = SequenceTagger( hidden_size=256, embeddings=embeddings, tag_dictionary=tag_dictionary, tag_type='ner', use_crf=False, use_rnn=False, reproject_embeddings=False, ) # 6. initialize trainer with AdamW optimizer from flair.trainers import ModelTrainer trainer = ModelTrainer(tagger, corpus, optimizer=torch.optim.AdamW) # 7. run training with XLM parameters (20 epochs, small LR) from torch.optim.lr_scheduler import OneCycleLR trainer.train('resources/taggers/ner-english-large', learning_rate=5.0e-6, mini_batch_size=4, mini_batch_chunk_size=1, max_epochs=20, scheduler=OneCycleLR, embeddings_storage_mode='none', weight_decay=0., ) ) ``` --- ### Cite Please cite the following paper when using this model. ``` @misc{schweter2020flert, title={FLERT: Document-Level Features for Named Entity Recognition}, author={Stefan Schweter and Alan Akbik}, year={2020}, eprint={2011.06993}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` --- ### Issues? The Flair issue tracker is available [here](https://github.com/flairNLP/flair/issues/).
openchat/openchat-3.5-0106
openchat
"2024-04-02T06:47:11Z"
90,165
317
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "openchat", "C-RLFT", "conversational", "arxiv:2309.11235", "arxiv:2303.08774", "base_model:mistralai/Mistral-7B-v0.1", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2024-01-07T08:17:09Z"
--- license: apache-2.0 base_model: mistralai/Mistral-7B-v0.1 tags: - openchat - mistral - C-RLFT library_name: transformers pipeline_tag: text-generation --- <div align="center"> <img src="https://raw.githubusercontent.com/imoneoi/openchat/master/assets/logo_new.png" style="width: 65%"> <h1>Advancing Open-source Language Models with Mixed-Quality Data</h1> </div> <p align="center" style="margin-top: 0px;"> <a href="https://openchat.team"> <img src="https://github.com/alpayariyak/openchat/blob/master/assets/logo_nobg.png?raw=true" alt="OpenChat Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 10px; margin-top: 0px; margin-bottom: 0px;"/> <span class="link-text" style=" margin-right: 5px;">Online Demo</span> </a> | <a href="https://github.com/imoneoi/openchat"> <img src="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png" alt="GitHub Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/> <span class="link-text" style=" margin-right: 5px;">GitHub</span> </a> | <a href="https://arxiv.org/pdf/2309.11235.pdf"> <img src="https://github.com/alpayariyak/openchat/blob/master/assets/arxiv-logomark-small-square-border.png?raw=true" alt="ArXiv Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/> <span class="link-text" style="margin-right: 5px;">Paper</span> </a> | <a href="https://discord.gg/pQjnXvNKHY"> <img src="https://cloud.githubusercontent.com/assets/6291467/26705903/96c2d66e-477c-11e7-9f4e-f3c0efe96c9a.png" alt="Discord Logo" style="width:20px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/> <span class="link-text">Discord</span> </a> </p> <p align="center" style="margin-top: 0px;"> <span class="link-text" style=" margin-right: 0px; font-size: 0.8em">Sponsored by RunPod</span> <img src="https://styles.redditmedia.com/t5_6075m3/styles/profileIcon_71syco7c5lt81.png?width=256&height=256&frame=1&auto=webp&crop=256:256,smart&s=24bd3c71dc11edc5d4f88d0cbc1da72ed7ae1969" alt="RunPod Logo" style="width:30px; vertical-align: middle; display: inline-block; margin-right: 5px; margin-left: 5px; margin-top: 0px; margin-bottom: 0px;"/> </p> <div style="background-color: white; padding: 0.7em; border-radius: 0.5em; color: black; display: flex; flex-direction: column; justify-content: center; text-align: center; ont-size: 0.5em; border: 0.8em solid #864AF9;"> <a href="https://huggingface.co/openchat/openchat-3.5-0106" style="text-decoration: none; color: black;"> <span style="font-size: 1.7em; font-family: 'Helvetica'; letter-spacing: 0.1em; font-weight: bold; color: black;">OPENCHAT</span><span style="font-size: 1.8em; font-family: 'Helvetica'; color: #3c72db; ">3.5</span> <span style="font-size: 1.0em; font-family: 'Helvetica'; color: white; background-color: #864AF9; vertical-align: top; border-radius: 6em; padding: 0.066em 0.4em; letter-spacing: 0.1em; font-weight: bold;">0106</span> <span style="font-size: 0.85em; font-family: 'Helvetica'; color: black;"> <br> 🏆 The Overall Best Performing Open Source 7B Model 🏆 <br> 🤖 Outperforms <span style="font-weight: bold;">ChatGPT</span> (March) and <span style="font-weight: bold;">Grok-1</span> 🤖 <br> 🚀<span style="font-size: 1em; font-family: 'Helvetica'; color: black; font-weight: bold;">15</span>-point improvement in Coding over <span style="font-size: 0.9em; font-family: 'Helvetica'; color: black; font-weight: bold;">OpenChat-3.5🚀</span> <br><br><span style="font-size: 1em; font-family: 'Helvetica'; color: #3c72db; font-weight: bold;">New Features</span> <br> 💡 2 Modes: Coding + Generalist, Mathematical Reasoning 💡 <br> 🧑‍⚖️ Experimental support for Evaluator and Feedback capabilities 🧑‍⚖️ </span> </a> </div> <div style="display: flex; justify-content: center; align-items: center"> <img src="https://raw.githubusercontent.com/imoneoi/openchat/master/assets/openchat-bench-0106.png" style="width: 100%; border-radius: 1em"> </div> <div> <h3> Table of Contents</h3> </div> 1. [Usage](#usage) 2. [Benchmarks](#benchmarks) 3. [Limitations](#limitations) 4. [License](#license) 6. [Citation](#citation) 7. [Acknowledgements](#acknowledgements) <div align="center"> <h2> Usage </h2> </div> To use this model, we highly recommend installing the OpenChat package by following the [installation guide](https://github.com/imoneoi/openchat#installation) in our repository and using the OpenChat OpenAI-compatible API server by running the serving command from the table below. The server is optimized for high-throughput deployment using [vLLM](https://github.com/vllm-project/vllm) and can run on a consumer GPU with 24GB RAM. To enable tensor parallelism, append `--tensor-parallel-size N` to the serving command. Once started, the server listens at `localhost:18888` for requests and is compatible with the [OpenAI ChatCompletion API specifications](https://platform.openai.com/docs/api-reference/chat). Please refer to the example request below for reference. Additionally, you can use the [OpenChat Web UI](https://github.com/imoneoi/openchat#web-ui) for a user-friendly experience. If you want to deploy the server as an online service, you can use `--api-keys sk-KEY1 sk-KEY2 ...` to specify allowed API keys and `--disable-log-requests --disable-log-stats --log-file openchat.log` for logging only to a file. For security purposes, we recommend using an [HTTPS gateway](https://fastapi.tiangolo.com/es/deployment/concepts/#security-https) in front of the server. | Model | Size | Context | Weights | Serving | |-------------------|------|---------|------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------| | OpenChat-3.5-0106 | 7B | 8192 | [Huggingface](https://huggingface.co/openchat/openchat-3.5-0106) | `python -m ochat.serving.openai_api_server --model openchat/openchat-3.5-0106 --engine-use-ray --worker-use-ray` | <details> <summary>Example request (click to expand)</summary> 💡 **Default Mode (GPT4 Correct)**: Best for coding, chat and general tasks ```bash curl http://localhost:18888/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "openchat_3.5", "messages": [{"role": "user", "content": "You are a large language model named OpenChat. Write a poem to describe yourself"}] }' ``` 🧮 **Mathematical Reasoning Mode**: Tailored for solving math problems ```bash curl http://localhost:18888/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "openchat_3.5", "condition": "Math Correct", "messages": [{"role": "user", "content": "10.3 − 7988.8133 = "}] }' ``` </details> ### Conversation templates 💡 **Default Mode (GPT4 Correct)**: Best for coding, chat and general tasks ``` GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hi<|end_of_turn|>GPT4 Correct User: How are you today?<|end_of_turn|>GPT4 Correct Assistant: ``` 🧮 **Mathematical Reasoning Mode**: Tailored for solving math problems ``` Math Correct User: 10.3 − 7988.8133=<|end_of_turn|>Math Correct Assistant: ``` ⚠️ **Notice:** Remember to set `<|end_of_turn|>` as end of generation token. The default (GPT4 Correct) template is also available as the integrated `tokenizer.chat_template`, which can be used instead of manually specifying the template: ```python messages = [ {"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi"}, {"role": "user", "content": "How are you today?"} ] tokens = tokenizer.apply_chat_template(messages, add_generation_prompt=True) assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747, 15359, 32000, 420, 6316, 28781, 3198, 3123, 1247, 28747, 1602, 460, 368, 3154, 28804, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747] ``` <div align="center"> <h2> (Experimental) Evaluator / Feedback Capabilities </h2> </div> We've included evaluator capabilities in this release to advance open-source models as evaluators. You can use `Default Mode (GPT4 Correct)` with the following prompt (same as [Prometheus](https://huggingface.co/datasets/kaist-ai/Feedback-Collection)) to evaluate a response. ``` ###Task Description: An instruction (might include an Input inside it), a response to evaluate, a reference answer that gets a score of 5, and a score rubric representing a evaluation criteria are given. 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general. 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric. 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)" 4. Please do not generate any other opening, closing, and explanations. ###The instruction to evaluate: {orig_instruction} ###Response to evaluate: {orig_response} ###Reference Answer (Score 5): {orig_reference_answer} ###Score Rubrics: [{orig_criteria}] Score 1: {orig_score1_description} Score 2: {orig_score2_description} Score 3: {orig_score3_description} Score 4: {orig_score4_description} Score 5: {orig_score5_description} ###Feedback: ``` <div align="center"> <h2> Benchmarks </h2> </div> | Model | # Params | Average | MT-Bench | HumanEval | BBH MC | AGIEval | TruthfulQA | MMLU | GSM8K | BBH CoT | |-----------------------|----------|----------|----------|-----------|----------|----------|------------|----------|----------|----------| | **OpenChat-3.5-0106** | **7B** | **64.5** | 7.8 | **71.3** | **51.5** | **49.1** | 61.0 | 65.8 | **77.4** | 62.2 | | OpenChat-3.5-1210 | **7B** | 63.8 | 7.76 | 68.9 | 49.5 | 48.0 | **61.8** | 65.3 | 77.3 | 61.8 | | OpenChat-3.5 | **7B** | 61.6 | 7.81 | 55.5 | 47.6 | 47.4 | 59.1 | 64.3 | 77.3 | 63.5 | | ChatGPT (March)* | ???B | 61.5 | **7.94** | 48.1 | 47.6 | 47.1 | 57.7 | **67.3** | 74.9 | **70.1** | | | | | | | | | | | | | | OpenHermes 2.5 | 7B | 59.3 | 7.54 | 48.2 | 49.4 | 46.5 | 57.5 | 63.8 | 73.5 | 59.9 | | OpenOrca Mistral | 7B | 52.7 | 6.86 | 38.4 | 49.4 | 42.9 | 45.9 | 59.3 | 59.1 | 58.1 | | Zephyr-β^ | 7B | 34.6 | 7.34 | 22.0 | 40.6 | 39.0 | 40.8 | 39.8 | 5.1 | 16.0 | | Mistral | 7B | - | 6.84 | 30.5 | 39.0 | 38.0 | - | 60.1 | 52.2 | - | <details> <summary>Evaluation Details(click to expand)</summary> *: ChatGPT (March) results are from [GPT-4 Technical Report](https://arxiv.org/abs/2303.08774), [Chain-of-Thought Hub](https://github.com/FranxYao/chain-of-thought-hub), and our evaluation. Please note that ChatGPT is not a fixed baseline and evolves rapidly over time. ^: Zephyr-β often fails to follow few-shot CoT instructions, likely because it was aligned with only chat data but not trained on few-shot data. **: Mistral and Open-source SOTA results are taken from reported results in instruction-tuned model papers and official repositories. All models are evaluated in chat mode (e.g. with the respective conversation template applied). All zero-shot benchmarks follow the same setting as in the AGIEval paper and Orca paper. CoT tasks use the same configuration as Chain-of-Thought Hub, HumanEval is evaluated with EvalPlus, and MT-bench is run using FastChat. To reproduce our results, follow the instructions in [our repository](https://github.com/imoneoi/openchat/#benchmarks). </details> <div> <h3>HumanEval+</h3> </div> | Model | Size | HumanEval+ pass@1 | |-----------------------------|--------|-------------------| | **OpenChat-3.5-0106** | **7B** | **65.9** | | ChatGPT (December 12, 2023) | ???B | 64.6 | | WizardCoder-Python-34B-V1.0 | 34B | 64.6 | | OpenChat 3.5 1210 | 7B | 63.4 | | OpenHermes 2.5 | 7B | 41.5 | <div> <h3>OpenChat-3.5 vs. Grok</h3> </div> 🔥 OpenChat-3.5-0106 (7B) now outperforms Grok-0 (33B) on **all 4 benchmarks** and Grok-1 (???B) on average and **3/4 benchmarks**. | | License | # Param | Average | MMLU | HumanEval | MATH | GSM8k | |-----------------------|-------------|---------|----------|--------|-----------|----------|----------| | **OpenChat-3.5-0106** | Apache-2.0 | **7B** | **61.0** | 65.8 | **71.3** | **29.3** | **77.4** | | OpenChat-3.5-1210 | Apache-2.0 | **7B** | 60.1 | 65.3 | 68.9 | 28.9 | 77.3 | | OpenChat-3.5 | Apache-2.0 | **7B** | 56.4 | 64.3 | 55.5 | 28.6 | 77.3 | | Grok-0 | Proprietary | 33B | 44.5 | 65.7 | 39.7 | 15.7 | 56.8 | | Grok-1 | Proprietary | ???B | 55.8 | **73** | 63.2 | 23.9 | 62.9 | *: Grok results are reported by [X.AI](https://x.ai/). <div align="center"> <h2> Limitations </h2> </div> **Foundation Model Limitations** Despite its advanced capabilities, OpenChat is still bound by the limitations inherent in its foundation models. These limitations may impact the model's performance in areas such as: - Complex reasoning - Mathematical and arithmetic tasks - Programming and coding challenges **Hallucination of Non-existent Information** OpenChat may sometimes generate information that does not exist or is not accurate, also known as "hallucination". Users should be aware of this possibility and verify any critical information obtained from the model. **Safety** OpenChat may sometimes generate harmful, hate speech, biased responses, or answer unsafe questions. It's crucial to apply additional AI safety measures in use cases that require safe and moderated responses. <div align="center"> <h2> License </h2> </div> Our OpenChat 3.5 code and models are distributed under the Apache License 2.0. <div align="center"> <h2> Citation </h2> </div> ``` @article{wang2023openchat, title={OpenChat: Advancing Open-source Language Models with Mixed-Quality Data}, author={Wang, Guan and Cheng, Sijie and Zhan, Xianyuan and Li, Xiangang and Song, Sen and Liu, Yang}, journal={arXiv preprint arXiv:2309.11235}, year={2023} } ``` <div align="center"> <h2> 💌 Contact </h2> </div> We look forward to hearing you and collaborating on this exciting project! **Project Lead:** - Guan Wang [imonenext at gmail dot com] - [Alpay Ariyak](https://github.com/alpayariyak) [aariyak at wpi dot edu] **Main Contributors:** - [Sijie Cheng](https://adacheng.github.io/) [csj23 at mails dot tsinghua dot edu dot cn] - LDJ - AutoMeta (Alignment Lab AI)
stabilityai/stable-cascade-prior
stabilityai
"2024-03-14T13:47:55Z"
90,149
27
diffusers
[ "diffusers", "safetensors", "text-to-image", "license:other", "has_space", "diffusers:StableCascadePriorPipeline", "region:us" ]
text-to-image
"2024-02-12T15:22:59Z"
--- pipeline_tag: text-to-image license: other license_name: stable-cascade-nc-community license_link: LICENSE --- # Stable Cascade Prior <!-- Provide a quick summary of what the model is/does. --> <img src="figures/collage_1.jpg" width="800"> This model is built upon the [Würstchen](https://openreview.net/forum?id=gU58d5QeGv) architecture and its main difference to other models like Stable Diffusion is that it is working at a much smaller latent space. Why is this important? The smaller the latent space, the **faster** you can run inference and the **cheaper** the training becomes. How small is the latent space? Stable Diffusion uses a compression factor of 8, resulting in a 1024x1024 image being encoded to 128x128. Stable Cascade achieves a compression factor of 42, meaning that it is possible to encode a 1024x1024 image to 24x24, while maintaining crisp reconstructions. The text-conditional model is then trained in the highly compressed latent space. Previous versions of this architecture, achieved a 16x cost reduction over Stable Diffusion 1.5. <br> <br> Therefore, this kind of model is well suited for usages where efficiency is important. Furthermore, all known extensions like finetuning, LoRA, ControlNet, IP-Adapter, LCM etc. are possible with this method as well. ## Model Details ### Model Description Stable Cascade is a diffusion model trained to generate images given a text prompt. - **Developed by:** Stability AI - **Funded by:** Stability AI - **Model type:** Generative text-to-image model ### Model Sources For research purposes, we recommend our `StableCascade` Github repository (https://github.com/Stability-AI/StableCascade). - **Repository:** https://github.com/Stability-AI/StableCascade - **Paper:** https://openreview.net/forum?id=gU58d5QeGv ### Model Overview Stable Cascade consists of three models: Stage A, Stage B and Stage C, representing a cascade to generate images, hence the name "Stable Cascade". Stage A & B are used to compress images, similar to what the job of the VAE is in Stable Diffusion. However, with this setup, a much higher compression of images can be achieved. While the Stable Diffusion models use a spatial compression factor of 8, encoding an image with resolution of 1024 x 1024 to 128 x 128, Stable Cascade achieves a compression factor of 42. This encodes a 1024 x 1024 image to 24 x 24, while being able to accurately decode the image. This comes with the great benefit of cheaper training and inference. Furthermore, Stage C is responsible for generating the small 24 x 24 latents given a text prompt. The following picture shows this visually. <img src="figures/model-overview.jpg" width="600"> For this release, we are providing two checkpoints for Stage C, two for Stage B and one for Stage A. Stage C comes with a 1 billion and 3.6 billion parameter version, but we highly recommend using the 3.6 billion version, as most work was put into its finetuning. The two versions for Stage B amount to 700 million and 1.5 billion parameters. Both achieve great results, however the 1.5 billion excels at reconstructing small and fine details. Therefore, you will achieve the best results if you use the larger variant of each. Lastly, Stage A contains 20 million parameters and is fixed due to its small size. ## Evaluation <img height="300" src="figures/comparison.png"/> According to our evaluation, Stable Cascade performs best in both prompt alignment and aesthetic quality in almost all comparisons. The above picture shows the results from a human evaluation using a mix of parti-prompts (link) and aesthetic prompts. Specifically, Stable Cascade (30 inference steps) was compared against Playground v2 (50 inference steps), SDXL (50 inference steps), SDXL Turbo (1 inference step) and Würstchen v2 (30 inference steps). ## Code Example **Note:** In order to use the `torch.bfloat16` data type with the `StableCascadeDecoderPipeline` you need to have PyTorch 2.2.0 or higher installed. This also means that using the `StableCascadeCombinedPipeline` with `torch.bfloat16` requires PyTorch 2.2.0 or higher, since it calls the StableCascadeDecoderPipeline internally. If it is not possible to install PyTorch 2.2.0 or higher in your environment, the `StableCascadeDecoderPipeline` can be used on its own with the torch.float16 data type. You can download the full precision or bf16 variant weights for the pipeline and cast the weights to torch.float16. ```shell pip install diffusers ``` ```python import torch from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline prompt = "an image of a shiba inu, donning a spacesuit and helmet" negative_prompt = "" prior = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", variant="bf16", torch_dtype=torch.bfloat16) decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", variant="bf16", torch_dtype=torch.float16) prior.enable_model_cpu_offload() prior_output = prior( prompt=prompt, height=1024, width=1024, negative_prompt=negative_prompt, guidance_scale=4.0, num_images_per_prompt=1, num_inference_steps=20 ) decoder.enable_model_cpu_offload() decoder_output = decoder( image_embeddings=prior_output.image_embeddings.to(torch.float16), prompt=prompt, negative_prompt=negative_prompt, guidance_scale=0.0, output_type="pil", num_inference_steps=10 ).images[0] decoder_output.save("cascade.png") ``` ### Using the Lite Version of the Stage B and Stage C models ```python import torch from diffusers import ( StableCascadeDecoderPipeline, StableCascadePriorPipeline, StableCascadeUNet, ) prompt = "an image of a shiba inu, donning a spacesuit and helmet" negative_prompt = "" prior_unet = StableCascadeUNet.from_pretrained("stabilityai/stable-cascade-prior", subfolder="prior_lite") decoder_unet = StableCascadeUNet.from_pretrained("stabilityai/stable-cascade", subfolder="decoder_lite") prior = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", prior=prior_unet) decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", decoder=decoder_unet) prior.enable_model_cpu_offload() prior_output = prior( prompt=prompt, height=1024, width=1024, negative_prompt=negative_prompt, guidance_scale=4.0, num_images_per_prompt=1, num_inference_steps=20 ) decoder.enable_model_cpu_offload() decoder_output = decoder( image_embeddings=prior_output.image_embeddings, prompt=prompt, negative_prompt=negative_prompt, guidance_scale=0.0, output_type="pil", num_inference_steps=10 ).images[0] decoder_output.save("cascade.png") ``` ### Loading original checkpoints with `from_single_file` Loading the original format checkpoints is supported via `from_single_file` method in the StableCascadeUNet. ```python import torch from diffusers import ( StableCascadeDecoderPipeline, StableCascadePriorPipeline, StableCascadeUNet, ) prompt = "an image of a shiba inu, donning a spacesuit and helmet" negative_prompt = "" prior_unet = StableCascadeUNet.from_single_file( "https://huggingface.co/stabilityai/stable-cascade/resolve/main/stage_c_bf16.safetensors", torch_dtype=torch.bfloat16 ) decoder_unet = StableCascadeUNet.from_single_file( "https://huggingface.co/stabilityai/stable-cascade/blob/main/stage_b_bf16.safetensors", torch_dtype=torch.bfloat16 ) prior = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", prior=prior_unet, torch_dtype=torch.bfloat16) decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", decoder=decoder_unet, torch_dtype=torch.bfloat16) prior.enable_model_cpu_offload() prior_output = prior( prompt=prompt, height=1024, width=1024, negative_prompt=negative_prompt, guidance_scale=4.0, num_images_per_prompt=1, num_inference_steps=20 ) decoder.enable_model_cpu_offload() decoder_output = decoder( image_embeddings=prior_output.image_embeddings, prompt=prompt, negative_prompt=negative_prompt, guidance_scale=0.0, output_type="pil", num_inference_steps=10 ).images[0] decoder_output.save("cascade-single-file.png") ``` ### Using the `StableCascadeCombinedPipeline` ```python from diffusers import StableCascadeCombinedPipeline pipe = StableCascadeCombinedPipeline.from_pretrained("stabilityai/stable-cascade", variant="bf16", torch_dtype=torch.bfloat16) prompt = "an image of a shiba inu, donning a spacesuit and helmet" output = pipe( prompt=prompt, negative_prompt="", num_inference_steps=10, prior_num_inference_steps=20, prior_guidance_scale=3.0, width=1024, height=1024, ) output.images[0].save("cascade-combined.png") ``` ## Uses ### Direct Use The model is intended for research purposes for now. Possible research areas and tasks include - Research on generative models. - Safe deployment of models which have the potential to generate harmful content. - Probing and understanding the limitations and biases of generative models. - Generation of artworks and use in design and other artistic processes. - Applications in educational or creative tools. Excluded uses are described below. ### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. The model should not be used in any way that violates Stability AI's [Acceptable Use Policy](https://stability.ai/use-policy). ## Limitations and Bias ### Limitations - Faces and people in general may not be generated properly. - The autoencoding part of the model is lossy. ### Recommendations The model is intended for research purposes only. ## How to Get Started with the Model Check out https://github.com/Stability-AI/StableCascade
fxmarty/tiny-random-GemmaForCausalLM
fxmarty
"2024-02-23T17:06:41Z"
89,933
0
transformers
[ "transformers", "safetensors", "gemma", "text-generation", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2024-02-23T14:44:32Z"
--- license: mit --- This one with a custom `config.head_dim` as allowed by the architecture (see 7b model).
dbmdz/distilbert-base-turkish-cased
dbmdz
"2021-01-24T01:01:22Z"
89,799
9
transformers
[ "transformers", "pytorch", "tf", "distilbert", "tr", "arxiv:1910.01108", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
null
"2022-03-02T23:29:05Z"
--- language: tr license: mit --- # 🤗 + 📚 dbmdz Distilled Turkish BERT model In this repository the MDZ Digital Library team (dbmdz) at the Bavarian State Library open sources a (cased) distilled model for Turkish 🎉 # 🇹🇷 DistilBERTurk DistilBERTurk is a community-driven cased distilled BERT model for Turkish. DistilBERTurk was trained on 7GB of the original training data that was used for training [BERTurk](https://github.com/stefan-it/turkish-bert/tree/master#stats), using the cased version of BERTurk as teacher model. *DistilBERTurk* was trained with the official Hugging Face implementation from [here](https://github.com/huggingface/transformers/tree/master/examples/distillation) for 5 days on 4 RTX 2080 TI. More details about distillation can be found in the ["DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter"](https://arxiv.org/abs/1910.01108) paper by Sanh et al. (2019). ## Model weights Currently only PyTorch-[Transformers](https://github.com/huggingface/transformers) compatible weights are available. If you need access to TensorFlow checkpoints, please raise an issue in the [BERTurk](https://github.com/stefan-it/turkish-bert) repository! | Model | Downloads | --------------------------------- | --------------------------------------------------------------------------------------------------------------- | `dbmdz/distilbert-base-turkish-cased` | [`config.json`](https://cdn.huggingface.co/dbmdz/distilbert-base-turkish-cased/config.json) • [`pytorch_model.bin`](https://cdn.huggingface.co/dbmdz/distilbert-base-turkish-cased/pytorch_model.bin) • [`vocab.txt`](https://cdn.huggingface.co/dbmdz/distilbert-base-turkish-cased/vocab.txt) ## Usage With Transformers >= 2.3 our DistilBERTurk model can be loaded like: ```python from transformers import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("dbmdz/distilbert-base-turkish-cased") model = AutoModel.from_pretrained("dbmdz/distilbert-base-turkish-cased") ``` ## Results For results on PoS tagging or NER tasks, please refer to [this repository](https://github.com/stefan-it/turkish-bert). For PoS tagging, DistilBERTurk outperforms the 24-layer XLM-RoBERTa model. The overall performance difference between DistilBERTurk and the original (teacher) BERTurk model is ~1.18%. # Huggingface model hub All models are available on the [Huggingface model hub](https://huggingface.co/dbmdz). # Contact (Bugs, Feedback, Contribution and more) For questions about our BERT models just open an issue [here](https://github.com/dbmdz/berts/issues/new) 🤗 # Acknowledgments Thanks to [Kemal Oflazer](http://www.andrew.cmu.edu/user/ko/) for providing us additional large corpora for Turkish. Many thanks to Reyyan Yeniterzi for providing us the Turkish NER dataset for evaluation. Research supported with Cloud TPUs from Google's TensorFlow Research Cloud (TFRC). Thanks for providing access to the TFRC ❤️ Thanks to the generous support from the [Hugging Face](https://huggingface.co/) team, it is possible to download both cased and uncased models from their S3 storage 🤗
openmmlab/upernet-swin-small
openmmlab
"2023-06-23T13:00:02Z"
89,750
3
transformers
[ "transformers", "pytorch", "safetensors", "upernet", "vision", "image-segmentation", "en", "arxiv:1807.10221", "arxiv:2103.14030", "license:mit", "endpoints_compatible", "region:us" ]
image-segmentation
"2023-01-13T14:33:22Z"
--- language: en license: mit tags: - vision - image-segmentation model_name: openmmlab/upernet-swin-small --- # UperNet, Swin Transformer small-sized backbone UperNet framework for semantic segmentation, leveraging a Swin Transformer backbone. UperNet was introduced in the paper [Unified Perceptual Parsing for Scene Understanding](https://arxiv.org/abs/1807.10221) by Xiao et al. Combining UperNet with a Swin Transformer backbone was introduced in the paper [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030). Disclaimer: The team releasing UperNet + Swin Transformer did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description UperNet is a framework for semantic segmentation. It consists of several components, including a backbone, a Feature Pyramid Network (FPN) and a Pyramid Pooling Module (PPM). Any visual backbone can be plugged into the UperNet framework. The framework predicts a semantic label per pixel. ![UperNet architecture](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/upernet_architecture.jpg) ## Intended uses & limitations You can use the raw model for semantic segmentation. See the [model hub](https://huggingface.co/models?search=openmmlab/upernet) to look for fine-tuned versions (with various backbones) on a task that interests you. ### How to use For code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/upernet#transformers.UperNetForSemanticSegmentation).
declare-lab/flan-alpaca-gpt4-xl
declare-lab
"2023-11-15T02:43:53Z"
89,584
39
transformers
[ "transformers", "pytorch", "safetensors", "t5", "text2text-generation", "dataset:tatsu-lab/alpaca", "arxiv:2308.09662", "arxiv:2306.04757", "arxiv:2210.11416", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2023-04-16T07:00:20Z"
--- license: apache-2.0 datasets: - tatsu-lab/alpaca --- ## 🍮 🦙 Flan-Alpaca: Instruction Tuning from Humans and Machines 🎆 🧨 🔥 🎠 [Meet Mustango, an exciting addition to the vibrant landscape of Multimodal Large Language Models designed for controlled music generation. Mustango leverages, Latent Diffusion Model (LDM), Flan-T5, and musical features to do the magic!](https://github.com/AMAAI-Lab/mustango) 📣 Introducing **Red-Eval** to evaluate the safety of the LLMs using several jailbreaking prompts. With **Red-Eval** one could jailbreak/red-team GPT-4 with a 65.1% attack success rate and ChatGPT could be jailbroken 73% of the time as measured on DangerousQA and HarmfulQA benchmarks. More details are here: [Code](https://github.com/declare-lab/red-instruct) and [Paper](https://arxiv.org/abs/2308.09662). 📣 We developed Flacuna by fine-tuning Vicuna-13B on the Flan collection. Flacuna is better than Vicuna at problem-solving. Access the model here https://huggingface.co/declare-lab/flacuna-13b-v1.0. 📣 Curious to know the performance of 🍮 🦙 **Flan-Alpaca** on large-scale LLM evaluation benchmark, **InstructEval**? Read our paper [https://arxiv.org/pdf/2306.04757.pdf](https://arxiv.org/pdf/2306.04757.pdf). We evaluated more than 10 open-source instruction-tuned LLMs belonging to various LLM families including Pythia, LLaMA, T5, UL2, OPT, and Mosaic. Codes and datasets: [https://github.com/declare-lab/instruct-eval](https://github.com/declare-lab/instruct-eval) 📣 **FLAN-T5** is also useful in text-to-audio generation. Find our work at [https://github.com/declare-lab/tango](https://github.com/declare-lab/tango) if you are interested. Our [repository](https://github.com/declare-lab/flan-alpaca) contains code for extending the [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca) synthetic instruction tuning to existing instruction-tuned models such as [Flan-T5](https://arxiv.org/abs/2210.11416). We have a [live interactive demo](https://huggingface.co/spaces/joaogante/transformers_streaming) thanks to [Joao Gante](https://huggingface.co/joaogante)! We are also benchmarking many instruction-tuned models at [declare-lab/flan-eval](https://github.com/declare-lab/flan-eval). Our pretrained models are fully available on HuggingFace 🤗 : | Model | Parameters | Instruction Data | Training GPUs | |----------------------------------------------------------------------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------|-----------------| | [Flan-Alpaca-Base](https://huggingface.co/declare-lab/flan-alpaca-base) | 220M | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 1x A6000 | | [Flan-Alpaca-Large](https://huggingface.co/declare-lab/flan-alpaca-large) | 770M | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 1x A6000 | | [Flan-Alpaca-XL](https://huggingface.co/declare-lab/flan-alpaca-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 1x A6000 | | [Flan-Alpaca-XXL](https://huggingface.co/declare-lab/flan-alpaca-xxl) | 11B | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 4x A6000 (FSDP) | | [Flan-GPT4All-XL](https://huggingface.co/declare-lab/flan-gpt4all-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [GPT4All](https://github.com/nomic-ai/gpt4all) | 1x A6000 | | [Flan-ShareGPT-XL](https://huggingface.co/declare-lab/flan-sharegpt-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [ShareGPT](https://github.com/domeccleston/sharegpt)/[Vicuna](https://github.com/lm-sys/FastChat) | 1x A6000 | | [Flan-Alpaca-GPT4-XL*](https://huggingface.co/declare-lab/flan-alpaca-gpt4-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [GPT4-Alpaca](https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM) | 1x A6000 | *recommended for better performance ### Why? [Alpaca](https://crfm.stanford.edu/2023/03/13/alpaca.html) represents an exciting new direction to approximate the performance of large language models (LLMs) like ChatGPT cheaply and easily. Concretely, they leverage an LLM such as GPT-3 to generate instructions as synthetic training data. The synthetic data which covers more than 50k tasks can then be used to finetune a smaller model. However, the original implementation is less accessible due to licensing constraints of the underlying [LLaMA](https://ai.facebook.com/blog/large-language-model-llama-meta-ai/) model. Furthermore, users have noted [potential noise](https://github.com/tloen/alpaca-lora/issues/65) in the synthetic dataset. Hence, it may be better to explore a fully accessible model that is already trained on high-quality (but less diverse) instructions such as [Flan-T5](https://arxiv.org/abs/2210.11416). ### Usage ``` from transformers import pipeline prompt = "Write an email about an alpaca that likes flan" model = pipeline(model="declare-lab/flan-alpaca-gpt4-xl") model(prompt, max_length=128, do_sample=True) # Dear AlpacaFriend, # My name is Alpaca and I'm 10 years old. # I'm excited to announce that I'm a big fan of flan! # We like to eat it as a snack and I believe that it can help with our overall growth. # I'd love to hear your feedback on this idea. # Have a great day! # Best, AL Paca ```
LiheYoung/depth_anything_vitb14
LiheYoung
"2024-01-25T08:10:55Z"
89,169
2
transformers
[ "transformers", "pytorch", "depth_anything", "depth-estimation", "arxiv:2401.10891", "endpoints_compatible", "has_space", "region:us" ]
depth-estimation
"2024-01-23T07:30:13Z"
--- tags: - depth_anything - depth-estimation --- # Depth Anything model, base The model card for our paper [Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data](https://arxiv.org/abs/2401.10891). You may also try our [demo](https://huggingface.co/spaces/LiheYoung/Depth-Anything) and visit our [project page](https://depth-anything.github.io/). ## Installation First, install the Depth Anything package: ``` git clone https://github.com/LiheYoung/Depth-Anything cd Depth-Anything pip install -r requirements.txt ``` ## Usage Here's how to run the model: ```python import numpy as np from PIL import Image import cv2 import torch from depth_anything.dpt import DepthAnything from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet from torchvision.transforms import Compose model = DepthAnything.from_pretrained("LiheYoung/depth_anything_vitb14") transform = Compose([ Resize( width=518, height=518, resize_target=False, keep_aspect_ratio=True, ensure_multiple_of=14, resize_method='lower_bound', image_interpolation_method=cv2.INTER_CUBIC, ), NormalizeImage(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), PrepareForNet(), ]) image = Image.open("...") image = np.array(image) / 255.0 image = transform({'image': image})['image'] image = torch.from_numpy(image).unsqueeze(0) depth = model(image) ```
InstantX/InstantID
InstantX
"2024-01-22T09:43:05Z"
88,833
562
diffusers
[ "diffusers", "safetensors", "text-to-image", "en", "arxiv:2401.07519", "license:apache-2.0", "has_space", "region:us" ]
text-to-image
"2024-01-19T11:52:05Z"
--- license: apache-2.0 language: - en library_name: diffusers pipeline_tag: text-to-image --- # InstantID Model Card <div align="center"> [**Project Page**](https://instantid.github.io/) **|** [**Paper**](https://arxiv.org/abs/2401.07519) **|** [**Code**](https://github.com/InstantID/InstantID) **|** [🤗 **Gradio demo**](https://huggingface.co/spaces/InstantX/InstantID) </div> ## Introduction InstantID is a new state-of-the-art tuning-free method to achieve ID-Preserving generation with only single image, supporting various downstream tasks. <div align="center"> <img src='examples/applications.png'> </div> ## Usage You can directly download the model in this repository. You also can download the model in python script: ```python from huggingface_hub import hf_hub_download hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/config.json", local_dir="./checkpoints") hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/diffusion_pytorch_model.safetensors", local_dir="./checkpoints") hf_hub_download(repo_id="InstantX/InstantID", filename="ip-adapter.bin", local_dir="./checkpoints") ``` For face encoder, you need to manutally download via this [URL](https://github.com/deepinsight/insightface/issues/1896#issuecomment-1023867304) to `models/antelopev2`. ```python # !pip install opencv-python transformers accelerate insightface import diffusers from diffusers.utils import load_image from diffusers.models import ControlNetModel import cv2 import torch import numpy as np from PIL import Image from insightface.app import FaceAnalysis from pipeline_stable_diffusion_xl_instantid import StableDiffusionXLInstantIDPipeline, draw_kps # prepare 'antelopev2' under ./models app = FaceAnalysis(name='antelopev2', root='./', providers=['CUDAExecutionProvider', 'CPUExecutionProvider']) app.prepare(ctx_id=0, det_size=(640, 640)) # prepare models under ./checkpoints face_adapter = f'./checkpoints/ip-adapter.bin' controlnet_path = f'./checkpoints/ControlNetModel' # load IdentityNet controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16) pipe = StableDiffusionXLInstantIDPipeline.from_pretrained( ... "stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet, torch_dtype=torch.float16 ... ) pipe.cuda() # load adapter pipe.load_ip_adapter_instantid(face_adapter) ``` Then, you can customized your own face images ```python # load an image image = load_image("your-example.jpg") # prepare face emb face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR)) face_info = sorted(face_info, key=lambda x:(x['bbox'][2]-x['bbox'][0])*x['bbox'][3]-x['bbox'][1])[-1] # only use the maximum face face_emb = face_info['embedding'] face_kps = draw_kps(face_image, face_info['kps']) pipe.set_ip_adapter_scale(0.8) prompt = "analog film photo of a man. faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage, masterpiece, best quality" negative_prompt = "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured (lowres, low quality, worst quality:1.2), (text:1.2), watermark, painting, drawing, illustration, glitch,deformed, mutated, cross-eyed, ugly, disfigured" # generate image image = pipe( ... prompt, image_embeds=face_emb, image=face_kps, controlnet_conditioning_scale=0.8 ... ).images[0] ``` For more details, please follow the instructions in our [GitHub repository](https://github.com/InstantID/InstantID). ## Usage Tips 1. If you're not satisfied with the similarity, try to increase the weight of "IdentityNet Strength" and "Adapter Strength". 2. If you feel that the saturation is too high, first decrease the Adapter strength. If it is still too high, then decrease the IdentityNet strength. 3. If you find that text control is not as expected, decrease Adapter strength. 4. If you find that realistic style is not good enough, go for our Github repo and use a more realistic base model. ## Demos <div align="center"> <img src='examples/0.png'> </div> <div align="center"> <img src='examples/1.png'> </div> ## Disclaimer This project is released under Apache License and aims to positively impact the field of AI-driven image generation. Users are granted the freedom to create images using this tool, but they are obligated to comply with local laws and utilize it responsibly. The developers will not assume any responsibility for potential misuse by users. ## Citation ```bibtex @article{wang2024instantid, title={InstantID: Zero-shot Identity-Preserving Generation in Seconds}, author={Wang, Qixun and Bai, Xu and Wang, Haofan and Qin, Zekui and Chen, Anthony}, journal={arXiv preprint arXiv:2401.07519}, year={2024} } ```
flair/ner-german-large
flair
"2022-08-28T09:08:06Z"
88,739
31
flair
[ "flair", "pytorch", "token-classification", "sequence-tagger-model", "de", "dataset:conll2003", "arxiv:2011.06993", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- tags: - flair - token-classification - sequence-tagger-model language: de datasets: - conll2003 widget: - text: "George Washington ging nach Washington" --- ## German NER in Flair (large model) This is the large 4-class NER model for German that ships with [Flair](https://github.com/flairNLP/flair/). F1-Score: **92,31** (CoNLL-03 German revised) Predicts 4 tags: | **tag** | **meaning** | |---------------------------------|-----------| | PER | person name | | LOC | location name | | ORG | organization name | | MISC | other name | Based on document-level XLM-R embeddings and [FLERT](https://arxiv.org/pdf/2011.06993v1.pdf). --- ### Demo: How to use in Flair Requires: **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`) ```python from flair.data import Sentence from flair.models import SequenceTagger # load tagger tagger = SequenceTagger.load("flair/ner-german-large") # make example sentence sentence = Sentence("George Washington ging nach Washington") # predict NER tags tagger.predict(sentence) # print sentence print(sentence) # print predicted NER spans print('The following NER tags are found:') # iterate over entities and print for entity in sentence.get_spans('ner'): print(entity) ``` This yields the following output: ``` Span [1,2]: "George Washington" [− Labels: PER (1.0)] Span [5]: "Washington" [− Labels: LOC (1.0)] ``` So, the entities "*George Washington*" (labeled as a **person**) and "*Washington*" (labeled as a **location**) are found in the sentence "*George Washington ging nach Washington*". --- ### Training: Script to train this model The following Flair script was used to train this model: ```python import torch # 1. get the corpus from flair.datasets import CONLL_03_GERMAN corpus = CONLL_03_GERMAN() # 2. what tag do we want to predict? tag_type = 'ner' # 3. make the tag dictionary from the corpus tag_dictionary = corpus.make_tag_dictionary(tag_type=tag_type) # 4. initialize fine-tuneable transformer embeddings WITH document context from flair.embeddings import TransformerWordEmbeddings embeddings = TransformerWordEmbeddings( model='xlm-roberta-large', layers="-1", subtoken_pooling="first", fine_tune=True, use_context=True, ) # 5. initialize bare-bones sequence tagger (no CRF, no RNN, no reprojection) from flair.models import SequenceTagger tagger = SequenceTagger( hidden_size=256, embeddings=embeddings, tag_dictionary=tag_dictionary, tag_type='ner', use_crf=False, use_rnn=False, reproject_embeddings=False, ) # 6. initialize trainer with AdamW optimizer from flair.trainers import ModelTrainer trainer = ModelTrainer(tagger, corpus, optimizer=torch.optim.AdamW) # 7. run training with XLM parameters (20 epochs, small LR) from torch.optim.lr_scheduler import OneCycleLR trainer.train('resources/taggers/ner-german-large', learning_rate=5.0e-6, mini_batch_size=4, mini_batch_chunk_size=1, max_epochs=20, scheduler=OneCycleLR, embeddings_storage_mode='none', weight_decay=0., ) ) ``` --- ### Cite Please cite the following paper when using this model. ``` @misc{schweter2020flert, title={FLERT: Document-Level Features for Named Entity Recognition}, author={Stefan Schweter and Alan Akbik}, year={2020}, eprint={2011.06993}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` --- ### Issues? The Flair issue tracker is available [here](https://github.com/flairNLP/flair/issues/).
TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
TinyLlama
"2024-01-14T07:05:45Z"
88,242
133
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "en", "dataset:cerebras/SlimPajama-627B", "dataset:bigcode/starcoderdata", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-12-28T14:08:29Z"
--- license: apache-2.0 datasets: - cerebras/SlimPajama-627B - bigcode/starcoderdata language: - en --- <div align="center"> # TinyLlama-1.1B </div> https://github.com/jzhang38/TinyLlama The TinyLlama project aims to **pretrain** a **1.1B Llama model on 3 trillion tokens**. With some proper optimization, we can achieve this within a span of "just" 90 days using 16 A100-40G GPUs 🚀🚀. The training has started on 2023-09-01. <div align="center"> <img src="./TinyLlama_logo.png" width="300"/> </div> We adopted exactly the same architecture and tokenizer as Llama 2. This means TinyLlama can be plugged and played in many open-source projects built upon Llama. Besides, TinyLlama is compact with only 1.1B parameters. This compactness allows it to cater to a multitude of applications demanding a restricted computation and memory footprint. #### This Collection This collection contains all checkpoints after the 1T fix. Branch name indicates the step and number of tokens seen. #### Eval | Model | Pretrain Tokens | HellaSwag | Obqa | WinoGrande | ARC_c | ARC_e | boolq | piqa | avg | |-------------------------------------------|-----------------|-----------|------|------------|-------|-------|-------|------|-----| | Pythia-1.0B | 300B | 47.16 | 31.40| 53.43 | 27.05 | 48.99 | 60.83 | 69.21 | 48.30 | | TinyLlama-1.1B-intermediate-step-50K-104b | 103B | 43.50 | 29.80| 53.28 | 24.32 | 44.91 | 59.66 | 67.30 | 46.11| | TinyLlama-1.1B-intermediate-step-240k-503b| 503B | 49.56 |31.40 |55.80 |26.54 |48.32 |56.91 |69.42 | 48.28 | | TinyLlama-1.1B-intermediate-step-480k-1007B | 1007B | 52.54 | 33.40 | 55.96 | 27.82 | 52.36 | 59.54 | 69.91 | 50.22 | | TinyLlama-1.1B-intermediate-step-715k-1.5T | 1.5T | 53.68 | 35.20 | 58.33 | 29.18 | 51.89 | 59.08 | 71.65 | 51.29 | | TinyLlama-1.1B-intermediate-step-955k-2T | 2T | 54.63 | 33.40 | 56.83 | 28.07 | 54.67 | 63.21 | 70.67 | 51.64 | | TinyLlama-1.1B-intermediate-step-1195k-2.5T | 2.5T | 58.96 | 34.40 | 58.72 | 31.91 | 56.78 | 63.21 | 73.07 | 53.86| | TinyLlama-1.1B-intermediate-step-1431k-3T | 3T | 59.20 | 36.00 | 59.12 | 30.12 | 55.25 | 57.83 | 73.29 | 52.99|
openlm-research/open_llama_3b_v2
openlm-research
"2023-07-16T08:32:00Z"
87,030
122
transformers
[ "transformers", "pytorch", "llama", "text-generation", "dataset:tiiuae/falcon-refinedweb", "dataset:bigcode/starcoderdata", "dataset:togethercomputer/RedPajama-Data-1T", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-16T00:39:43Z"
--- license: apache-2.0 datasets: - tiiuae/falcon-refinedweb - bigcode/starcoderdata - togethercomputer/RedPajama-Data-1T --- # OpenLLaMA: An Open Reproduction of LLaMA **TL;DR**: we are releasing our public preview of OpenLLaMA, a permissively licensed open source reproduction of Meta AI’s LLaMA. We are releasing a series of 3B, 7B and 13B models trained on different data mixtures. Our model weights can serve as the drop in replacement of LLaMA in existing implementations. In this repo, we present a permissively licensed open source reproduction of Meta AI's [LLaMA](https://ai.facebook.com/blog/large-language-model-llama-meta-ai/) large language model. We are releasing a series of 3B, 7B and 13B models trained on 1T tokens. We provide PyTorch and JAX weights of pre-trained OpenLLaMA models, as well as evaluation results and comparison against the original LLaMA models. The v2 model is better than the old v1 model trained on a different data mixture. Please see the [project homepage of OpenLLaMA](https://github.com/openlm-research/open_llama) for more details. ## Weights Release, License and Usage We release the weights in two formats: an EasyLM format to be use with our [EasyLM framework](https://github.com/young-geng/EasyLM), and a PyTorch format to be used with the [Hugging Face transformers](https://huggingface.co/docs/transformers/index) library. Both our training framework EasyLM and the checkpoint weights are licensed permissively under the Apache 2.0 license. ### Loading the Weights with Hugging Face Transformers Preview checkpoints can be directly loaded from Hugging Face Hub. **Please note that it is advised to avoid using the Hugging Face fast tokenizer for now, as we’ve observed that** [**the auto-converted fast tokenizer sometimes gives incorrect tokenizations**](https://github.com/huggingface/transformers/issues/24233)**.** This can be achieved by directly using the `LlamaTokenizer` class, or passing in the `use_fast=False` option for the `AutoTokenizer` class. See the following example for usage. ```python import torch from transformers import LlamaTokenizer, LlamaForCausalLM ## v2 models model_path = 'openlm-research/open_llama_3b_v2' # model_path = 'openlm-research/open_llama_7b_v2' ## v1 models # model_path = 'openlm-research/open_llama_3b' # model_path = 'openlm-research/open_llama_7b' # model_path = 'openlm-research/open_llama_13b' tokenizer = LlamaTokenizer.from_pretrained(model_path) model = LlamaForCausalLM.from_pretrained( model_path, torch_dtype=torch.float16, device_map='auto', ) prompt = 'Q: What is the largest animal?\nA:' input_ids = tokenizer(prompt, return_tensors="pt").input_ids generation_output = model.generate( input_ids=input_ids, max_new_tokens=32 ) print(tokenizer.decode(generation_output[0])) ``` For more advanced usage, please follow the [transformers LLaMA documentation](https://huggingface.co/docs/transformers/main/model_doc/llama). ### Evaluating with LM-Eval-Harness The model can be evaluated with [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness). However, due to the aforementioned tokenizer issue, we need to avoid using the fast tokenizer to obtain the correct results. This can be achieved by passing in `use_fast=False` to [this part of lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness/blob/4b701e228768052cfae9043dca13e82052ca5eea/lm_eval/models/huggingface.py#LL313C9-L316C10), as shown in the example below: ```python tokenizer = self.AUTO_TOKENIZER_CLASS.from_pretrained( pretrained if tokenizer is None else tokenizer, revision=revision + ("/" + subfolder if subfolder is not None else ""), use_fast=False ) ``` ### Loading the Weights with EasyLM For using the weights in our EasyLM framework, please refer to the [LLaMA documentation of EasyLM](https://github.com/young-geng/EasyLM/blob/main/docs/llama.md). Note that unlike the original LLaMA model, our OpenLLaMA tokenizer and weights are trained completely from scratch so it is no longer needed to obtain the original LLaMA tokenizer and weights. ## Dataset and Training The v1 models are trained on the [RedPajama dataset](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T). The v2 models are trained on a mixture of the [Falcon refined-web dataset](https://huggingface.co/datasets/tiiuae/falcon-refinedweb), the [StarCoder dataset](https://huggingface.co/datasets/bigcode/starcoderdata) and the wikipedia, arxiv, book and stackexchange part of the [RedPajama dataset](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T). We follow the exactly same preprocessing steps and training hyperparameters as the original LLaMA paper, including model architecture, context length, training steps, learning rate schedule, and optimizer. The only difference between our setting and the original one is the dataset used: OpenLLaMA employs open datasets rather than the one utilized by the original LLaMA. We train the models on cloud TPU-v4s using [EasyLM](https://github.com/young-geng/EasyLM), a JAX based training pipeline we developed for training and fine-tuning large language models. We employ a combination of normal data parallelism and fully sharded data parallelism [](https://engineering.fb.com/2021/07/15/open-source/fsdp/)(also know as ZeRO stage 3) to balance the training throughput and memory usage. Overall we reach a throughput of over 2200 tokens / second / TPU-v4 chip for our 7B model. ## Evaluation We evaluated OpenLLaMA on a wide range of tasks using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). The LLaMA results are generated by running the original LLaMA model on the same evaluation metrics. We note that our results for the LLaMA model differ slightly from the original LLaMA paper, which we believe is a result of different evaluation protocols. Similar differences have been reported in [this issue of lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness/issues/443). Additionally, we present the results of GPT-J, a 6B parameter model trained on the [Pile](https://pile.eleuther.ai/) dataset by [EleutherAI](https://www.eleuther.ai/). The original LLaMA model was trained for 1 trillion tokens and GPT-J was trained for 500 billion tokens. We present the results in the table below. OpenLLaMA exhibits comparable performance to the original LLaMA and GPT-J across a majority of tasks, and outperforms them in some tasks. | **Task/Metric** | GPT-J 6B | LLaMA 7B | LLaMA 13B | OpenLLaMA 3Bv2 | OpenLLaMA 7Bv2 | OpenLLaMA 3B | OpenLLaMA 7B | OpenLLaMA 13B | | ---------------------- | -------- | -------- | --------- | -------------- | -------------- | ------------ | ------------ | ------------- | | anli_r1/acc | 0.32 | 0.35 | 0.35 | 0.33 | 0.34 | 0.33 | 0.33 | 0.33 | | anli_r2/acc | 0.34 | 0.34 | 0.36 | 0.36 | 0.35 | 0.32 | 0.36 | 0.33 | | anli_r3/acc | 0.35 | 0.37 | 0.39 | 0.38 | 0.39 | 0.35 | 0.38 | 0.40 | | arc_challenge/acc | 0.34 | 0.39 | 0.44 | 0.34 | 0.39 | 0.34 | 0.37 | 0.41 | | arc_challenge/acc_norm | 0.37 | 0.41 | 0.44 | 0.36 | 0.41 | 0.37 | 0.38 | 0.44 | | arc_easy/acc | 0.67 | 0.68 | 0.75 | 0.68 | 0.73 | 0.69 | 0.72 | 0.75 | | arc_easy/acc_norm | 0.62 | 0.52 | 0.59 | 0.63 | 0.70 | 0.65 | 0.68 | 0.70 | | boolq/acc | 0.66 | 0.75 | 0.71 | 0.66 | 0.72 | 0.68 | 0.71 | 0.75 | | hellaswag/acc | 0.50 | 0.56 | 0.59 | 0.52 | 0.56 | 0.49 | 0.53 | 0.56 | | hellaswag/acc_norm | 0.66 | 0.73 | 0.76 | 0.70 | 0.75 | 0.67 | 0.72 | 0.76 | | openbookqa/acc | 0.29 | 0.29 | 0.31 | 0.26 | 0.30 | 0.27 | 0.30 | 0.31 | | openbookqa/acc_norm | 0.38 | 0.41 | 0.42 | 0.38 | 0.41 | 0.40 | 0.40 | 0.43 | | piqa/acc | 0.75 | 0.78 | 0.79 | 0.77 | 0.79 | 0.75 | 0.76 | 0.77 | | piqa/acc_norm | 0.76 | 0.78 | 0.79 | 0.78 | 0.80 | 0.76 | 0.77 | 0.79 | | record/em | 0.88 | 0.91 | 0.92 | 0.87 | 0.89 | 0.88 | 0.89 | 0.91 | | record/f1 | 0.89 | 0.91 | 0.92 | 0.88 | 0.89 | 0.89 | 0.90 | 0.91 | | rte/acc | 0.54 | 0.56 | 0.69 | 0.55 | 0.57 | 0.58 | 0.60 | 0.64 | | truthfulqa_mc/mc1 | 0.20 | 0.21 | 0.25 | 0.22 | 0.23 | 0.22 | 0.23 | 0.25 | | truthfulqa_mc/mc2 | 0.36 | 0.34 | 0.40 | 0.35 | 0.35 | 0.35 | 0.35 | 0.38 | | wic/acc | 0.50 | 0.50 | 0.50 | 0.50 | 0.50 | 0.48 | 0.51 | 0.47 | | winogrande/acc | 0.64 | 0.68 | 0.70 | 0.63 | 0.66 | 0.62 | 0.67 | 0.70 | | Average | 0.52 | 0.55 | 0.57 | 0.53 | 0.56 | 0.53 | 0.55 | 0.57 | We removed the task CB and WSC from our benchmark, as our model performs suspiciously high on these two tasks. We hypothesize that there could be a benchmark data contamination in the training set. ## Contact We would love to get feedback from the community. If you have any questions, please open an issue or contact us. OpenLLaMA is developed by: [Xinyang Geng](https://young-geng.xyz/)* and [Hao Liu](https://www.haoliu.site/)* from Berkeley AI Research. *Equal Contribution ## Acknowledgment We thank the [Google TPU Research Cloud](https://sites.research.google/trc/about/) program for providing part of the computation resources. We’d like to specially thank Jonathan Caton from TPU Research Cloud for helping us organizing compute resources, Rafi Witten from the Google Cloud team and James Bradbury from the Google JAX team for helping us optimizing our training throughput. We’d also want to thank Charlie Snell, Gautier Izacard, Eric Wallace, Lianmin Zheng and our user community for the discussions and feedback. The OpenLLaMA 13B v1 model is trained in collaboration with [Stability AI](https://stability.ai/), and we thank Stability AI for providing the computation resources. We’d like to especially thank David Ha and Shivanshu Purohit for the coordinating the logistics and providing engineering support. ## Reference If you found OpenLLaMA useful in your research or applications, please cite using the following BibTeX: ``` @software{openlm2023openllama, author = {Geng, Xinyang and Liu, Hao}, title = {OpenLLaMA: An Open Reproduction of LLaMA}, month = May, year = 2023, url = {https://github.com/openlm-research/open_llama} } ``` ``` @software{together2023redpajama, author = {Together Computer}, title = {RedPajama-Data: An Open Source Recipe to Reproduce LLaMA training dataset}, month = April, year = 2023, url = {https://github.com/togethercomputer/RedPajama-Data} } ``` ``` @article{touvron2023llama, title={Llama: Open and efficient foundation language models}, author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and others}, journal={arXiv preprint arXiv:2302.13971}, year={2023} } ```
Helsinki-NLP/opus-mt-tr-en
Helsinki-NLP
"2023-08-16T12:07:23Z"
86,966
31
transformers
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "tr", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- tags: - translation license: apache-2.0 --- ### opus-mt-tr-en * source languages: tr * target languages: en * OPUS readme: [tr-en](https://github.com/Helsinki-NLP/OPUS-MT-train/blob/master/models/tr-en/README.md) * dataset: opus * model: transformer-align * pre-processing: normalization + SentencePiece * download original weights: [opus-2020-01-16.zip](https://object.pouta.csc.fi/OPUS-MT-models/tr-en/opus-2020-01-16.zip) * test set translations: [opus-2020-01-16.test.txt](https://object.pouta.csc.fi/OPUS-MT-models/tr-en/opus-2020-01-16.test.txt) * test set scores: [opus-2020-01-16.eval.txt](https://object.pouta.csc.fi/OPUS-MT-models/tr-en/opus-2020-01-16.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | newsdev2016-entr.tr.en | 27.6 | 0.548 | | newstest2016-entr.tr.en | 25.2 | 0.532 | | newstest2017-entr.tr.en | 24.7 | 0.530 | | newstest2018-entr.tr.en | 27.0 | 0.547 | | Tatoeba.tr.en | 63.5 | 0.760 |
moka-ai/m3e-base
moka-ai
"2023-07-14T02:29:36Z"
86,838
801
sentence-transformers
[ "sentence-transformers", "pytorch", "safetensors", "bert", "embedding", "text-embedding", "zh", "en", "has_space", "region:us" ]
null
"2023-06-06T02:28:47Z"
--- language: - zh - en tags: - embedding - text-embedding library_name: sentence-transformers --- # 🅜 M3E Models [m3e-small](https://huggingface.co/moka-ai/m3e-small) | [m3e-base](https://huggingface.co/moka-ai/m3e-base) M3E 是 Moka Massive Mixed Embedding 的缩写 - Moka,此模型由 MokaAI 训练,开源和评测,训练脚本使用 [uniem](https://github.com/wangyuxinwhy/uniem/blob/main/scripts/train_m3e.py) ,评测 BenchMark 使用 [MTEB-zh](https://github.com/wangyuxinwhy/uniem/tree/main/mteb-zh) - Massive,此模型通过**千万级** (2200w+) 的中文句对数据集进行训练 - Mixed,此模型支持中英双语的同质文本相似度计算,异质文本检索等功能,未来还会支持代码检索 - Embedding,此模型是文本嵌入模型,可以将自然语言转换成稠密的向量 ## 🆕 更新说明 - 2023.06.24,添加微调 M3E 的教程 [notebook](https://github.com/wangyuxinwhy/uniem/blob/main/examples/finetune.ipynb),几行代码,更佳适配!<a target="_blank" href="https://colab.research.google.com/github/wangyuxinwhy/uniem/blob/main/examples/finetune.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> - 2023.06.14,添加了三个中文开源文本嵌入模型到评测中,包括 UER, ErLangShen, DMetaSoul - 2023.06.08,添加检索任务的评测结果,在 T2Ranking 1W 中文数据集上,m3e-base 在 ndcg@10 上达到了 0.8004,超过了 openai-ada-002 的 0.7786 - 2023.06.07,添加文本分类任务的评测结果,在 6 种文本分类数据集上,m3e-base 在 accuracy 上达到了 0.6157,超过了 openai-ada-002 的 0.5956 ## ⚖️ 模型对比 | | 参数数量 | 维度 | 中文 | 英文 | s2s | s2p | s2c | 开源 | 兼容性 | s2s Acc | s2p ndcg@10 | | --------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | ---- | ---------- | ------------ | -------- | | m3e-small | 24M | 512 | 是 | 否 | 是 | 否 | 否 | 是 | 优 | 0.5834 | 0.7262 | | m3e-base | 110M | 768 | 是 | 是 | 是 | 是 | 否 | 是 | 优 | **0.6157** | **0.8004** | | text2vec | 110M | 768 | 是 | 否 | 是 | 否 | 否 | 是 | 优 | 0.5755 | 0.6346 | | openai-ada-002 | 未知 | 1536 | 是 | 是 | 是 | 是 | 是 | 否 | 优 | 0.5956 | 0.7786 | 说明: - s2s, 即 sentence to sentence ,代表了同质文本之间的嵌入能力,适用任务:文本相似度,重复问题检测,文本分类等 - s2p, 即 sentence to passage ,代表了异质文本之间的嵌入能力,适用任务:文本检索,GPT 记忆模块等 - s2c, 即 sentence to code ,代表了自然语言和程序语言之间的嵌入能力,适用任务:代码检索 - 兼容性,代表了模型在开源社区中各种项目被支持的程度,由于 m3e 和 text2vec 都可以直接通过 sentence-transformers 直接使用,所以和 openai 在社区的支持度上相当 - ACC & ndcg@10,详情见下方的评测 Tips: - 使用场景主要是中文,少量英文的情况,建议使用 m3e 系列的模型 - 多语言使用场景,并且不介意数据隐私的话,我建议使用 openai text-embedding-ada-002 - 代码检索场景,推荐使用 openai text-embedding-ada-002 - 文本检索场景,请使用具备文本检索能力的模型,只在 S2S 上训练的文本嵌入模型,没有办法完成文本检索任务 ## 🔧 使用 M3E 您需要先安装 sentence-transformers ```bash pip install -U sentence-transformers ``` 安装完成后,您可以使用以下代码来使用 M3E Models ```python from sentence_transformers import SentenceTransformer model = SentenceTransformer('moka-ai/m3e-base') #Our sentences we like to encode sentences = [ '* Moka 此文本嵌入模型由 MokaAI 训练并开源,训练脚本使用 uniem', '* Massive 此文本嵌入模型通过**千万级**的中文句对数据集进行训练', '* Mixed 此文本嵌入模型支持中英双语的同质文本相似度计算,异质文本检索等功能,未来还会支持代码检索,ALL in one' ] #Sentences are encoded by calling model.encode() embeddings = model.encode(sentences) #Print the embeddings for sentence, embedding in zip(sentences, embeddings): print("Sentence:", sentence) print("Embedding:", embedding) print("") ``` M3E 系列的所有模型在设计的时候就考虑到完全兼容 [sentence-transformers](https://www.sbert.net/) ,所以你可以通过**替换名称字符串**的方式在所有支持 sentence-transformers 的项目中**无缝**使用 M3E Models,比如 [chroma](https://docs.trychroma.com/getting-started), [guidance](https://github.com/microsoft/guidance), [semantic-kernel](https://github.com/microsoft/semantic-kernel) 。 ## 🎨 微调模型 `uniem` 提供了非常易用的 finetune 接口,几行代码,即刻适配! ```python from datasets import load_dataset from uniem.finetuner import FineTuner dataset = load_dataset('shibing624/nli_zh', 'STS-B') # 指定训练的模型为 m3e-small finetuner = FineTuner.from_pretrained('moka-ai/m3e-small', dataset=dataset) finetuner.run(epochs=1) ``` 详见 [uniem 微调教程](https://github.com/wangyuxinwhy/uniem/blob/main/examples/finetune.ipynb) <a target="_blank" href="https://colab.research.google.com/github/wangyuxinwhy/uniem/blob/main/examples/finetune.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> ## ➿ 训练方案 M3E 使用 in-batch 负采样的对比学习的方式在句对数据集进行训练,为了保证 in-batch 负采样的效果,我们使用 A100 80G 来最大化 batch-size,并在共计 2200W+ 的句对数据集上训练了 1 epoch。训练脚本使用 [uniem](https://github.com/wangyuxinwhy/uniem/blob/main/scripts/train_m3e.py),您可以在这里查看具体细节。 ## 🌟 特性 - 中文训练集,M3E 在大规模句对数据集上的训练,包含中文百科,金融,医疗,法律,新闻,学术等多个领域共计 2200W 句对样本,数据集详见 [M3E 数据集](#M3E数据集) - 英文训练集,M3E 使用 MEDI 145W 英文三元组数据集进行训练,数据集详见 [MEDI 数据集](https://drive.google.com/file/d/1vZ5c2oJNonGOvXzppNg5mHz24O6jcc52/view),此数据集由 [instructor team](https://github.com/HKUNLP/instructor-embedding) 提供 - 指令数据集,M3E 使用了 300W + 的指令微调数据集,这使得 M3E 对文本编码的时候可以遵从指令,这部分的工作主要被启发于 [instructor-embedding](https://github.com/HKUNLP/instructor-embedding) - 基础模型,M3E 使用 hfl 实验室的 [Roberta](https://huggingface.co/hfl/chinese-roberta-wwm-ext) 系列模型进行训练,目前提供 small 和 base 两个版本,大家则需选用 - ALL IN ONE,M3E 旨在提供一个 ALL IN ONE 的文本嵌入模型,不仅支持同质句子相似度判断,还支持异质文本检索,你只需要一个模型就可以覆盖全部的应用场景,未来还会支持代码检索 ## 💯 MTEB-zh 评测 - 评测模型,[text2vec](https://github.com/shibing624/text2vec), m3e-base, m3e-small, openai text-embedding-ada-002, [DMetaSoul](https://huggingface.co/DMetaSoul/sbert-chinese-general-v2), [UER](https://huggingface.co/uer/sbert-base-chinese-nli), [ErLangShen](https://huggingface.co/IDEA-CCNL/Erlangshen-SimCSE-110M-Chinese) - 评测脚本,具体参考 [MTEB-zh] (https://github.com/wangyuxinwhy/uniem/blob/main/mteb-zh) ### 文本分类 - 数据集选择,选择开源在 HuggingFace 上的 6 种文本分类数据集,包括新闻、电商评论、股票评论、长文本等 - 评测方式,使用 MTEB 的方式进行评测,报告 Accuracy。 | | text2vec | m3e-small | m3e-base | openai | DMetaSoul | uer | erlangshen | | ----------------- | -------- | --------- | -------- | ------ | ----------- | ------- | ----------- | | TNews | 0.43 | 0.4443 | **0.4827** | 0.4594 | 0.3084 | 0.3539 | 0.4361 | | JDIphone | 0.8214 | 0.8293 | **0.8533** | 0.746 | 0.7972 | 0.8283 | 0.8356 | | GubaEastmony | 0.7472 | 0.712 | 0.7621 | 0.7574 | 0.735 | 0.7534 | **0.7787** | | TYQSentiment | 0.6099 | 0.6596 | **0.7188** | 0.68 | 0.6437 | 0.6662 | 0.6444 | | StockComSentiment | 0.4307 | 0.4291 | 0.4363 | **0.4819** | 0.4309 | 0.4555 | 0.4482 | | IFlyTek | 0.414 | 0.4263 | 0.4409 | **0.4486** | 0.3969 | 0.3762 | 0.4241 | | Average | 0.5755 | 0.5834 | **0.6157** | 0.5956 | 0.552016667 | 0.57225 | 0.594516667 | ### 检索排序 #### T2Ranking 1W - 数据集选择,使用 [T2Ranking](https://github.com/THUIR/T2Ranking/tree/main) 数据集,由于 T2Ranking 的数据集太大,openai 评测起来的时间成本和 api 费用有些高,所以我们只选择了 T2Ranking 中的前 10000 篇文章 - 评测方式,使用 MTEB 的方式进行评测,报告 map@1, map@10, mrr@1, mrr@10, ndcg@1, ndcg@10 - 注意!从实验结果和训练方式来看,除了 M3E 模型和 openai 模型外,其余模型都没有做检索任务的训练,所以结果仅供参考。 | | text2vec | openai-ada-002 | m3e-small | m3e-base | DMetaSoul | uer | erlangshen | | ------- | -------- | -------------- | --------- | -------- | --------- | ------- | ---------- | | map@1 | 0.4684 | 0.6133 | 0.5574 | **0.626** | 0.25203 | 0.08647 | 0.25394 | | map@10 | 0.5877 | 0.7423 | 0.6878 | **0.7656** | 0.33312 | 0.13008 | 0.34714 | | mrr@1 | 0.5345 | 0.6931 | 0.6324 | **0.7047** | 0.29258 | 0.10067 | 0.29447 | | mrr@10 | 0.6217 | 0.7668 | 0.712 | **0.7841** | 0.36287 | 0.14516 | 0.3751 | | ndcg@1 | 0.5207 | 0.6764 | 0.6159 | **0.6881** | 0.28358 | 0.09748 | 0.28578 | | ndcg@10 | 0.6346 | 0.7786 | 0.7262 | **0.8004** | 0.37468 | 0.15783 | 0.39329 | #### T2Ranking - 数据集选择,使用 T2Ranking,刨除 openai-ada-002 模型后,我们对剩余的三个模型,进行 T2Ranking 10W 和 T2Ranking 50W 的评测。(T2Ranking 评测太耗内存了... 128G 都不行) - 评测方式,使用 MTEB 的方式进行评测,报告 ndcg@10 | | text2vec | m3e-small | m3e-base | | ------- | -------- | --------- | -------- | | t2r-1w | 0.6346 | 0.72621 | **0.8004** | | t2r-10w | 0.44644 | 0.5251 | **0.6263** | | t2r-50w | 0.33482 | 0.38626 | **0.47364** | 说明: - 检索排序对于 text2vec 并不公平,因为 text2vec 在训练的时候没有使用过检索相关的数据集,所以没有办法很好的完成检索任务也是正常的。 ## 📂 M3E数据集 如果您想要使用这些数据集,你可以在 [uniem process_zh_datasets](https://github.com/wangyuxinwhy/uniem/blob/main/scripts/process_zh_datasets.py) 中找到加载 huggingface 数据集的脚本,非 huggingface 数据集需要您根据下方提供的链接自行下载和处理。 | 数据集名称 | 领域 | 数量 | 任务类型 | Prompt | 质量 | 数据提供者 | 说明 | 是否开源/研究使用 | 是否商用 | 脚本 | Done | URL | 是否同质 | | -------------------- | ---- | --------- | ----------------- | ------ | ---- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------------- | -------- | ---- | ---- | ------------------------------------------------------------ | -------- | | cmrc2018 | 百科 | 14,363 | 问答 | 问答 | 优 | Yiming Cui, Ting Liu, Wanxiang Che, Li Xiao, Zhipeng Chen, Wentao Ma, Shijin Wang, Guoping Hu | https://github.com/ymcui/cmrc2018/blob/master/README_CN.md 专家标注的基于维基百科的中文阅读理解数据集,将问题和上下文视为正例 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/cmrc2018 | 否 | | belle_2m | 百科 | 2,000,000 | 指令微调 | 无 | 优 | LianjiaTech/BELLE | belle 的指令微调数据集,使用 self instruct 方法基于 gpt3.5 生成 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/BelleGroup/train_2M_CN | 否 | | firefily | 百科 | 1,649,399 | 指令微调 | 无 | 优 | YeungNLP | Firefly(流萤) 是一个开源的中文对话式大语言模型,使用指令微调(Instruction Tuning)在中文数据集上进行调优。使用了词表裁剪、ZeRO等技术,有效降低显存消耗和提高训练效率。 在训练中,我们使用了更小的模型参数量,以及更少的计算资源。 | 未说明 | 未说明 | 是 | 是 | https://huggingface.co/datasets/YeungNLP/firefly-train-1.1M | 否 | | alpaca_gpt4 | 百科 | 48,818 | 指令微调 | 无 | 优 | Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, Jianfeng Gao | 本数据集是参考Alpaca方法基于GPT4得到的self-instruct数据,约5万条。 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/shibing624/alpaca-zh | 否 | | zhihu_kol | 百科 | 1,006,218 | 问答 | 问答 | 优 | wangrui6 | 知乎问答 | 未说明 | 未说明 | 是 | 是 | https://huggingface.co/datasets/wangrui6/Zhihu-KOL | 否 | | hc3_chinese | 百科 | 39,781 | 问答 | 问答 | 良 | Hello-SimpleAI | 问答数据,包括人工回答和 GPT 回答 | 是 | 未说明 | 是 | 是 | https://huggingface.co/datasets/Hello-SimpleAI/HC3-Chinese | 否 | | amazon_reviews_multi | 电商 | 210,000 | 问答 文本分类 | 摘要 | 优 | 亚马逊 | 亚马逊产品评论数据集 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/amazon_reviews_multi/viewer/zh/train?row=8 | 否 | | mlqa | 百科 | 85,853 | 问答 | 问答 | 良 | patrickvonplaten | 一个用于评估跨语言问答性能的基准数据集 | 是 | 未说明 | 是 | 是 | https://huggingface.co/datasets/mlqa/viewer/mlqa-translate-train.zh/train?p=2 | 否 | | xlsum | 新闻 | 93,404 | 摘要 | 摘要 | 良 | BUET CSE NLP Group | BBC的专业注释文章摘要对 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/csebuetnlp/xlsum/viewer/chinese_simplified/train?row=259 | 否 | | ocnli | 口语 | 17,726 | 自然语言推理 | 推理 | 良 | Thomas Wolf | 自然语言推理数据集 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/clue/viewer/ocnli | 是 | | BQ | 金融 | 60,000 | 文本分类 | 相似 | 良 | Intelligent Computing Research Center, Harbin Institute of Technology(Shenzhen) | http://icrc.hitsz.edu.cn/info/1037/1162.htm BQ 语料库包含来自网上银行自定义服务日志的 120,000 个问题对。它分为三部分:100,000 对用于训练,10,000 对用于验证,10,000 对用于测试。 数据提供者: 哈尔滨工业大学(深圳)智能计算研究中心 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/shibing624/nli_zh/viewer/BQ | 是 | | lcqmc | 口语 | 149,226 | 文本分类 | 相似 | 良 | Ming Xu | 哈工大文本匹配数据集,LCQMC 是哈尔滨工业大学在自然语言处理国际顶会 COLING2018 构建的问题语义匹配数据集,其目标是判断两个问题的语义是否相同 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/shibing624/nli_zh/viewer/LCQMC/train | 是 | | paws-x | 百科 | 23,576 | 文本分类 | 相似 | 优 | Bhavitvya Malik | PAWS Wiki中的示例 | 是 | 是 | 是 | 是 | https://huggingface.co/datasets/paws-x/viewer/zh/train | 是 | | wiki_atomic_edit | 百科 | 1,213,780 | 平行语义 | 相似 | 优 | abhishek thakur | 基于中文维基百科的编辑记录收集的数据集 | 未说明 | 未说明 | 是 | 是 | https://huggingface.co/datasets/wiki_atomic_edits | 是 | | chatmed_consult | 医药 | 549,326 | 问答 | 问答 | 优 | Wei Zhu | 真实世界的医学相关的问题,使用 gpt3.5 进行回答 | 是 | 否 | 是 | 是 | https://huggingface.co/datasets/michaelwzhu/ChatMed_Consult_Dataset | 否 | | webqa | 百科 | 42,216 | 问答 | 问答 | 优 | suolyer | 百度于2016年开源的数据集,数据来自于百度知道;格式为一个问题多篇意思基本一致的文章,分为人为标注以及浏览器检索;数据整体质量中,因为混合了很多检索而来的文章 | 是 | 未说明 | 是 | 是 | https://huggingface.co/datasets/suolyer/webqa/viewer/suolyer--webqa/train?p=3 | 否 | | dureader_robust | 百科 | 65,937 | 机器阅读理解 问答 | 问答 | 优 | 百度 | DuReader robust旨在利用真实应用中的数据样本来衡量阅读理解模型的鲁棒性,评测模型的过敏感性、过稳定性以及泛化能力,是首个中文阅读理解鲁棒性数据集。 | 是 | 是 | 是 | 是 | https://huggingface.co/datasets/PaddlePaddle/dureader_robust/viewer/plain_text/train?row=96 | 否 | | csl | 学术 | 395,927 | 语料 | 摘要 | 优 | Yudong Li, Yuqing Zhang, Zhe Zhao, Linlin Shen, Weijie Liu, Weiquan Mao and Hui Zhang | 提供首个中文科学文献数据集(CSL),包含 396,209 篇中文核心期刊论文元信息 (标题、摘要、关键词、学科、门类)。CSL 数据集可以作为预训练语料,也可以构建许多NLP任务,例如文本摘要(标题预测)、 关键词生成和文本分类等。 | 是 | 是 | 是 | 是 | https://huggingface.co/datasets/neuclir/csl | 否 | | miracl-corpus | 百科 | 4,934,368 | 语料 | 摘要 | 优 | MIRACL | The corpus for each language is prepared from a Wikipedia dump, where we keep only the plain text and discard images, tables, etc. Each article is segmented into multiple passages using WikiExtractor based on natural discourse units (e.g., \n\n in the wiki markup). Each of these passages comprises a "document" or unit of retrieval. We preserve the Wikipedia article title of each passage. | 是 | 是 | 是 | 是 | https://huggingface.co/datasets/miracl/miracl-corpus | 否 | | lawzhidao | 法律 | 36,368 | 问答 | 问答 | 优 | 和鲸社区-Ustinian | 百度知道清洗后的法律问答 | 是 | 是 | 否 | 是 | https://www.heywhale.com/mw/dataset/5e953ca8e7ec38002d02fca7/content | 否 | | CINLID | 成语 | 34,746 | 平行语义 | 相似 | 优 | 高长宽 | 中文成语语义推理数据集(Chinese Idioms Natural Language Inference Dataset)收集了106832条由人工撰写的成语对(含少量歇后语、俗语等短文本),通过人工标注的方式进行平衡分类,标签为entailment、contradiction和neutral,支持自然语言推理(NLI)的任务。 | 是 | 否 | 否 | 是 | https://www.luge.ai/#/luge/dataDetail?id=39 | 是 | | DuSQL | SQL | 25,003 | NL2SQL | SQL | 优 | 百度 | DuSQL是一个面向实际应用的数据集,包含200个数据库,覆盖了164个领域,问题覆盖了匹配、计算、推理等实际应用中常见形式。该数据集更贴近真实应用场景,要求模型领域无关、问题无关,且具备计算推理等能力。 | 是 | 否 | 否 | 是 | https://www.luge.ai/#/luge/dataDetail?id=13 | 否 | | Zhuiyi-NL2SQL | SQL | 45,918 | NL2SQL | SQL | 优 | 追一科技 刘云峰 | NL2SQL是一个多领域的简单数据集,其主要包含匹配类型问题。该数据集主要验证模型的泛化能力,其要求模型具有较强的领域泛化能力、问题泛化能力。 | 是 | 否 | 否 | 是 | https://www.luge.ai/#/luge/dataDetail?id=12 | 否 | | Cspider | SQL | 7,785 | NL2SQL | SQL | 优 | 西湖大学 张岳 | CSpider是一个多语言数据集,其问题以中文表达,数据库以英文存储,这种双语模式在实际应用中也非常常见,尤其是数据库引擎对中文支持不好的情况下。该数据集要求模型领域无关、问题无关,且能够实现多语言匹配。 | 是 | 否 | 否 | 是 | https://www.luge.ai/#/luge/dataDetail?id=11 | 否 | | news2016zh | 新闻 | 2,507,549 | 语料 | 摘要 | 良 | Bright Xu | 包含了250万篇新闻。新闻来源涵盖了6.3万个媒体,含标题、关键词、描述、正文。 | 是 | 是 | 否 | 是 | https://github.com/brightmart/nlp_chinese_corpus | 否 | | baike2018qa | 百科 | 1,470,142 | 问答 | 问答 | 良 | Bright Xu | 含有150万个预先过滤过的、高质量问题和答案,每个问题属于一个类别。总共有492个类别,其中频率达到或超过10次的类别有434个。 | 是 | 是 | 否 | 是 | https://github.com/brightmart/nlp_chinese_corpus | 否 | | webtext2019zh | 百科 | 4,258,310 | 问答 | 问答 | 优 | Bright Xu | 含有410万个预先过滤过的、高质量问题和回复。每个问题属于一个【话题】,总共有2.8万个各式话题,话题包罗万象。 | 是 | 是 | 否 | 是 | https://github.com/brightmart/nlp_chinese_corpus | 否 | | SimCLUE | 百科 | 775,593 | 平行语义 | 相似 | 良 | 数据集合,请在 simCLUE 中查看 | 整合了中文领域绝大多数可用的开源的语义相似度和自然语言推理的数据集,并重新做了数据拆分和整理。 | 是 | 否 | 否 | 是 | https://github.com/CLUEbenchmark/SimCLUE | 是 | | Chinese-SQuAD | 新闻 | 76,449 | 机器阅读理解 | 问答 | 优 | junzeng-pluto | 中文机器阅读理解数据集,通过机器翻译加人工校正的方式从原始Squad转换而来 | 是 | 否 | 否 | 是 | https://github.com/pluto-junzeng/ChineseSquad | 否 | ## 🗓️ 计划表 - [x] 完成 MTEB 中文评测 BenchMark, [MTEB-zh](https://github.com/wangyuxinwhy/uniem/tree/main/mteb-zh) - [x] 完成 Large 模型的训练和开源 - [x] 完成 Finetuner ,允许更优雅的微调 - [ ] 完成支持代码检索的模型 - [ ] 对 M3E 数据集进行清洗,保留高质量的部分,组成 m3e-hq,并在 huggingface 上开源 - [ ] 在 m3e-hq 的数据集上补充 hard negative 的样本及相似度分数,组成 m3e-hq-with-score,并在 huggingface 上开源 - [ ] 在 m3e-hq-with-score 上通过 [cosent loss](https://github.com/wangyuxinwhy/uniem/blob/main/uniem/criteria.py#LL24C39-L24C39) loss 进行训练并开源模型,CoSent 原理参考这篇[博客](https://kexue.fm/archives/8847) - [ ] 开源商用版本的 M3E models ## 🙏 致谢 感谢开源社区提供的中文语料,感谢所有在此工作中提供帮助的人们,希望中文社区越来越好,共勉! ## 📜 License M3E models 使用的数据集中包括大量非商用的数据集,所以 M3E models 也是非商用的,仅供研究使用。不过我们已经在 M3E 数据集上标识了商用和非商用的数据集,您可以根据自己的需求自行训练。 ## Citation Please cite this model using the following format: ``` @software {Moka Massive Mixed Embedding, author = {Wang Yuxin,Sun Qingxuan,He sicheng}, title = {M3E: Moka Massive Mixed Embedding Model}, year = {2023} } ```
facebook/sam-vit-base
facebook
"2024-01-11T19:23:17Z"
86,581
72
transformers
[ "transformers", "pytorch", "tf", "safetensors", "sam", "mask-generation", "vision", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
mask-generation
"2023-04-19T14:15:29Z"
--- license: apache-2.0 tags: - vision --- # Model Card for Segment Anything Model (SAM) - ViT Base (ViT-B) version <p> <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/sam-architecture.png" alt="Model architecture"> <em> Detailed architecture of Segment Anything Model (SAM).</em> </p> # Table of Contents 0. [TL;DR](#TL;DR) 1. [Model Details](#model-details) 2. [Usage](#usage) 3. [Citation](#citation) # TL;DR [Link to original repository](https://github.com/facebookresearch/segment-anything) | <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/sam-beancans.png" alt="Snow" width="600" height="600"> | <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/sam-dog-masks.png" alt="Forest" width="600" height="600"> | <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/sam-car-seg.png" alt="Mountains" width="600" height="600"> | |---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| The **Segment Anything Model (SAM)** produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a [dataset](https://segment-anything.com/dataset/index.html) of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks. The abstract of the paper states: > We introduce the Segment Anything (SA) project: a new task, model, and dataset for image segmentation. Using our efficient model in a data collection loop, we built the largest segmentation dataset to date (by far), with over 1 billion masks on 11M licensed and privacy respecting images. The model is designed and trained to be promptable, so it can transfer zero-shot to new image distributions and tasks. We evaluate its capabilities on numerous tasks and find that its zero-shot performance is impressive -- often competitive with or even superior to prior fully supervised results. We are releasing the Segment Anything Model (SAM) and corresponding dataset (SA-1B) of 1B masks and 11M images at [https://segment-anything.com](https://segment-anything.com) to foster research into foundation models for computer vision. **Disclaimer**: Content from **this** model card has been written by the Hugging Face team, and parts of it were copy pasted from the original [SAM model card](https://github.com/facebookresearch/segment-anything). # Model Details The SAM model is made up of 3 modules: - The `VisionEncoder`: a VIT based image encoder. It computes the image embeddings using attention on patches of the image. Relative Positional Embedding is used. - The `PromptEncoder`: generates embeddings for points and bounding boxes - The `MaskDecoder`: a two-ways transformer which performs cross attention between the image embedding and the point embeddings (->) and between the point embeddings and the image embeddings. The outputs are fed - The `Neck`: predicts the output masks based on the contextualized masks produced by the `MaskDecoder`. # Usage ## Prompted-Mask-Generation ```python from PIL import Image import requests from transformers import SamModel, SamProcessor model = SamModel.from_pretrained("facebook/sam-vit-base") processor = SamProcessor.from_pretrained("facebook/sam-vit-base") img_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png" raw_image = Image.open(requests.get(img_url, stream=True).raw).convert("RGB") input_points = [[[450, 600]]] # 2D localization of a window ``` ```python inputs = processor(raw_image, input_points=input_points, return_tensors="pt").to("cuda") outputs = model(**inputs) masks = processor.image_processor.post_process_masks(outputs.pred_masks.cpu(), inputs["original_sizes"].cpu(), inputs["reshaped_input_sizes"].cpu()) scores = outputs.iou_scores ``` Among other arguments to generate masks, you can pass 2D locations on the approximate position of your object of interest, a bounding box wrapping the object of interest (the format should be x, y coordinate of the top right and bottom left point of the bounding box), a segmentation mask. At this time of writing, passing a text as input is not supported by the official model according to [the official repository](https://github.com/facebookresearch/segment-anything/issues/4#issuecomment-1497626844). For more details, refer to this notebook, which shows a walk throught of how to use the model, with a visual example! ## Automatic-Mask-Generation The model can be used for generating segmentation masks in a "zero-shot" fashion, given an input image. The model is automatically prompt with a grid of `1024` points which are all fed to the model. The pipeline is made for automatic mask generation. The following snippet demonstrates how easy you can run it (on any device! Simply feed the appropriate `points_per_batch` argument) ```python from transformers import pipeline generator = pipeline("mask-generation", device = 0, points_per_batch = 256) image_url = "https://huggingface.co/ybelkada/segment-anything/resolve/main/assets/car.png" outputs = generator(image_url, points_per_batch = 256) ``` Now to display the image: ```python import matplotlib.pyplot as plt from PIL import Image import numpy as np def show_mask(mask, ax, random_color=False): if random_color: color = np.concatenate([np.random.random(3), np.array([0.6])], axis=0) else: color = np.array([30 / 255, 144 / 255, 255 / 255, 0.6]) h, w = mask.shape[-2:] mask_image = mask.reshape(h, w, 1) * color.reshape(1, 1, -1) ax.imshow(mask_image) plt.imshow(np.array(raw_image)) ax = plt.gca() for mask in outputs["masks"]: show_mask(mask, ax=ax, random_color=True) plt.axis("off") plt.show() ``` # Citation If you use this model, please use the following BibTeX entry. ``` @article{kirillov2023segany, title={Segment Anything}, author={Kirillov, Alexander and Mintun, Eric and Ravi, Nikhila and Mao, Hanzi and Rolland, Chloe and Gustafson, Laura and Xiao, Tete and Whitehead, Spencer and Berg, Alexander C. and Lo, Wan-Yen and Doll{\'a}r, Piotr and Girshick, Ross}, journal={arXiv:2304.02643}, year={2023} } ```
huggingface/CodeBERTa-small-v1
huggingface
"2022-06-27T15:48:41Z"
86,440
61
transformers
[ "transformers", "pytorch", "tf", "jax", "roberta", "fill-mask", "code", "dataset:code_search_net", "arxiv:1909.09436", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: code thumbnail: https://cdn-media.huggingface.co/CodeBERTa/CodeBERTa.png datasets: - code_search_net --- # CodeBERTa CodeBERTa is a RoBERTa-like model trained on the [CodeSearchNet](https://github.blog/2019-09-26-introducing-the-codesearchnet-challenge/) dataset from GitHub. Supported languages: ```shell "go" "java" "javascript" "php" "python" "ruby" ``` The **tokenizer** is a Byte-level BPE tokenizer trained on the corpus using Hugging Face `tokenizers`. Because it is trained on a corpus of code (vs. natural language), it encodes the corpus efficiently (the sequences are between 33% to 50% shorter, compared to the same corpus tokenized by gpt2/roberta). The (small) **model** is a 6-layer, 84M parameters, RoBERTa-like Transformer model – that’s the same number of layers & heads as DistilBERT – initialized from the default initialization settings and trained from scratch on the full corpus (~2M functions) for 5 epochs. ### Tensorboard for this training ⤵️ [![tb](https://cdn-media.huggingface.co/CodeBERTa/tensorboard.png)](https://tensorboard.dev/experiment/irRI7jXGQlqmlxXS0I07ew/#scalars) ## Quick start: masked language modeling prediction ```python PHP_CODE = """ public static <mask> set(string $key, $value) { if (!in_array($key, self::$allowedKeys)) { throw new \InvalidArgumentException('Invalid key given'); } self::$storedValues[$key] = $value; } """.lstrip() ``` ### Does the model know how to complete simple PHP code? ```python from transformers import pipeline fill_mask = pipeline( "fill-mask", model="huggingface/CodeBERTa-small-v1", tokenizer="huggingface/CodeBERTa-small-v1" ) fill_mask(PHP_CODE) ## Top 5 predictions: # ' function' # prob 0.9999827146530151 'function' # ' void' # ' def' # ' final' # ``` ### Yes! That was easy 🎉 What about some Python (warning: this is going to be meta) ```python PYTHON_CODE = """ def pipeline( task: str, model: Optional = None, framework: Optional[<mask>] = None, **kwargs ) -> Pipeline: pass """.lstrip() ``` Results: ```python 'framework', 'Framework', ' framework', 'None', 'str' ``` > This program can auto-complete itself! 😱 ### Just for fun, let's try to mask natural language (not code): ```python fill_mask("My name is <mask>.") # {'sequence': '<s> My name is undefined.</s>', 'score': 0.2548016905784607, 'token': 3353} # {'sequence': '<s> My name is required.</s>', 'score': 0.07290805131196976, 'token': 2371} # {'sequence': '<s> My name is null.</s>', 'score': 0.06323737651109695, 'token': 469} # {'sequence': '<s> My name is name.</s>', 'score': 0.021919190883636475, 'token': 652} # {'sequence': '<s> My name is disabled.</s>', 'score': 0.019681859761476517, 'token': 7434} ``` This (kind of) works because code contains comments (which contain natural language). Of course, the most frequent name for a Computer scientist must be undefined 🤓. ## Downstream task: [programming language identification](https://huggingface.co/huggingface/CodeBERTa-language-id) See the model card for **[`huggingface/CodeBERTa-language-id`](https://huggingface.co/huggingface/CodeBERTa-language-id)** 🤯. <br> ## CodeSearchNet citation <details> ```bibtex @article{husain_codesearchnet_2019, title = {{CodeSearchNet} {Challenge}: {Evaluating} the {State} of {Semantic} {Code} {Search}}, shorttitle = {{CodeSearchNet} {Challenge}}, url = {http://arxiv.org/abs/1909.09436}, urldate = {2020-03-12}, journal = {arXiv:1909.09436 [cs, stat]}, author = {Husain, Hamel and Wu, Ho-Hsiang and Gazit, Tiferet and Allamanis, Miltiadis and Brockschmidt, Marc}, month = sep, year = {2019}, note = {arXiv: 1909.09436}, } ``` </details>
mohamednihal/noReply
mohamednihal
"2024-02-26T12:10:08Z"
86,196
0
setfit
[ "setfit", "safetensors", "mpnet", "sentence-transformers", "text-classification", "generated_from_setfit_trainer", "arxiv:2209.11055", "base_model:sentence-transformers/paraphrase-mpnet-base-v2", "region:us" ]
text-classification
"2024-02-26T12:09:28Z"
--- library_name: setfit tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer metrics: - accuracy widget: - text: 'Dear [Recipient], We wanted to inform you about an update regarding [briefly describe the topic or subject]. Please note that this email is sent from a do-not-reply address, and no response is required. Should you have any questions or require further assistance, please feel free to contact our support team at [support email/phone number]. Thank you for your attention to this matter. Best regards, [Your Name] [Your Position/Department (if applicable)] [Your Company/Organization Name] ' - text: 'Dear [Recipient], We regret to inform you that the email with the subject "[Subject]" sent on [Date/Time] was not successfully delivered due to network issues. To ensure successful delivery of future communications, we recommend checking your internet connection and trying to resend the email. If the issue persists, please contact your network administrator or Internet Service Provider (ISP) for further assistance. If you require any assistance or have any questions, please don''t hesitate to contact our support team at [Support Contact Information]. Thank you for your attention to this matter. Best regards, [Your Name] [Your Position/Department (if applicable)] [Your Company Name] [Your Contact Information]' - text: 'Dear [Recipient], I hope this email finds you well. I wanted to remind you that the deadline for [Task/Project] is approaching on [Deadline Date]. [Include any relevant details about the task or project, such as specific requirements or milestones.] Please prioritize completing this task within the given timeline to ensure timely delivery and project success. If you encounter any challenges or require assistance, feel free to reach out to your team members or supervisor for support. Thank you for your attention to this matter. Let''s work together to meet our project goals. Best regards, [Your Name] [Your Position/Department] [Your Company Name] [Your Contact Information]' - text: 'Hello, Thank you for your email. I am currently attending a conference and may have limited access to email until [Date of Return]. I will respond to your message as soon as possible upon my return. For urgent matters, please contact [Alternative Contact Information]. Best regards, [Your Name]' - text: 'Hello [Recipient''s Name], As a valued member of our community, we''re delighted to offer you an exclusive discount! Enjoy [Discount percentage]% off your next purchase when you use code [Promo code] at checkout. Explore our latest arrivals and treat yourself to something special. But hurry - this offer expires soon! Shop now at [Link to Website] and enjoy savings on us. Best regards, [Your Name] [Your Position/Department] [Your Contact Information]' pipeline_tag: text-classification inference: true base_model: sentence-transformers/paraphrase-mpnet-base-v2 --- # SetFit with sentence-transformers/paraphrase-mpnet-base-v2 This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 10 classes <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --> <!-- - **Language:** Unknown --> <!-- - **License:** Unknown --> ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:----------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Password reset emails | <ul><li>'Dear [Recipient],\n\nAs part of our ongoing efforts to enhance security measures, we require you to reset your password for your account at [Your Company/Organization Name].\n\nTo initiate the password reset process, please follow the instructions below:\n\nVisit the password reset page by clicking on the link below:\n[Password Reset Link]\n\nEnter your username/email associated with your account.\n\nFollow the on-screen prompts to create a new password.\n\nPlease note that for security reasons, this link will expire within [X] hours. If you did not request this password reset or suspect any unauthorized activity on your account, please contact our support team immediately at [Support Contact Information].\n\nThank you for your cooperation in maintaining the security of your account.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]\n\n\n\n\n\n'</li><li>'Dear [Recipient],\n\nWe have received a request to reset the password for your account associated with [Your Company/Organization Name]. If you initiated this request, please follow the instructions below to reset your password:\n\nClick on the following link to reset your password: [Password Reset Link]\nFollow the on-screen prompts to create a new password.\nOnce completed, you can log in to your account using your new password.\nIf you did not request this password reset or believe this email was sent in error, please ignore this message. Your current password will remain unchanged.\n\nIf you have any questions or concerns, please contact our support team at [Support Contact Information].\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]'</li><li>'Dear [Recipient],\n\nYou have requested to reset the password for your account at [Your Company/Organization Name]. Follow the instructions below to reset your password:\n\nVisit the password reset page by clicking on the following link: [Password Reset Link]\nEnter your username/email associated with your account.\nFollow the on-screen instructions to create a new password.\nOnce completed, your password will be successfully reset.\nIf you did not initiate this password reset request, please disregard this email. Your account remains secure, and no changes have been made.\n\nIf you have any questions or need further assistance, please contact our support team at [Support Contact Information].\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]'</li></ul> | | System Alerts | <ul><li>'Dear [Customer/User],\n\nWe hope this email finds you well. We wanted to inform you about an upcoming system maintenance activity scheduled for [Date/Time].\n\nDuring this maintenance window, there might be temporary disruptions to our services. We apologize for any inconvenience this may cause and assure you that our team will work diligently to minimize the impact and restore full functionality as quickly as possible.\n\nThank you for your understanding and cooperation.\n\nBest regards,\n[Your Company Name]'</li><li>'Dear [Recipient],\n\nWe regret to inform you that our servers are currently experiencing downtime due to unexpected technical issues. Our technical team is actively working to resolve the issue and restore services as soon as possible.\n\nDuring this time, you may experience interruptions in accessing our systems and services. We apologize for any inconvenience this may cause and appreciate your patience and understanding.\n\nWe will provide regular updates on the situation as it progresses. If you have any urgent concerns or require immediate assistance, please contact our support team at [Support Contact Information].\n\nThank you for your cooperation.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]'</li><li>'Dear [Recipient],\n\nWe regret to inform you that our security systems have detected unauthorized access to our network. As a precautionary measure, we have initiated a comprehensive investigation to determine the extent of the breach and mitigate any potential risks.\n\nDuring this time, we advise all users to exercise caution and remain vigilant for any suspicious activity. If you notice any unusual behavior or unauthorized access to your account, please report it immediately to our security team at [Security Contact Information].\n\nWe apologize for any inconvenience this may cause and assure you that we are taking all necessary steps to address the situation and safeguard our systems and data.\n\nThank you for your cooperation.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]'</li></ul> | | Promotional emails | <ul><li>"Dear [Customer],\n\nWe are excited to announce a special promotion exclusively for our valued customers like you! For a limited time only, we are offering a [X]% discount on our latest range of products.\n\nWhether you're looking for [mention specific products/categories], now is the perfect opportunity to upgrade and enjoy incredible savings.\n\nHurry, this offer won't last long! Visit our website [insert website link] or visit our nearest store to explore our collection and take advantage of this fantastic deal.\n\nThank you for choosing [Your Company Name]. We appreciate your continued support.\n\nBest regards,\n[Your Company Name]\n\n\n\n\n"</li><li>"Dear [Recipient's Name],\n\nWe are excited to introduce our latest collection, featuring [highlighted product features]. From stylish apparel to must-have accessories, we have something for everyone.\n\nTake advantage of our special launch offer: [Promotional offer details]. Don't miss out - shop now and elevate your wardrobe!\n\nVisit our website [Link to Website] to explore the full collection.\n\nHappy shopping!\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"</li><li>"Dear [Recipient's Name],\n\nSpring into savings with our exciting sale event! Enjoy [Discount percentage]% off sitewide on all your favorite products.\n\nFrom spring essentials to trend-setting fashion, we have everything you need to refresh your wardrobe this season.\n\nShop now and make the most of this limited-time offer!\n\nWarm regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"</li></ul> | | Automatic subscription confirmation emails | <ul><li>"Dear [Recipient],\n\nThank you for subscribing to [Product/Service Name]! We're thrilled to have you on board.\n\nTo complete the subscription process and start receiving updates, newsletters, and exclusive offers, please confirm your subscription by clicking on the link below:\n\n[Subscription Confirmation Link]\n\nBy confirming your subscription, you'll stay up-to-date with the latest news, product launches, and special promotions tailored just for you.\n\nIf you did not initiate this subscription or believe this email was sent in error, please disregard it.\n\nThank you for choosing [Your Company/Organization Name]. We look forward to serving you!\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]"</li><li>"Dear [Recipient's Name],\n\nThank you for subscribing to our newsletter. You're now part of our community! We're excited to share the latest updates, promotions, and exclusive offers with you.\n\nYou will start receiving our newsletter shortly. If you have any questions or feedback, feel free to reply to this email.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"</li><li>"Hello [Recipient's Name],\n\nCongratulations! Your account registration is complete. You are now a member of our platform.\n\nWith your account, you can access exclusive content, manage your preferences, and much more.\n\nIf you have any questions or need assistance, please don't hesitate to reach out.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"</li></ul> | | Email Delivery failure notifications | <ul><li>'Dear [Recipient],\n\nWe regret to inform you that your recent email delivery encountered an issue and was not successfully delivered to the intended recipient.\n\nThe email with the subject "[Subject of the Email]" sent on [Date/Time] was returned due to the following reason: [Brief description of the delivery failure reason, such as invalid recipient address, mailbox full, or network issues].\n\nTo ensure that your message reaches its destination, we recommend reviewing and correcting any errors in the recipient\'s email address or content of the email. Once done, you may resend the email.\n\nIf you believe this notification is received in error or require further assistance, please don\'t hesitate to contact our support team at [Support Contact Information].\n\nWe apologize for any inconvenience this may have caused and appreciate your understanding.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'</li><li>'Dear [Recipient],\n\nWe regret to inform you that the email with the subject "[Subject]" sent on [Date/Time] was not successfully delivered due to an invalid recipient address.\n\nTo ensure successful delivery of future communications, please review and verify the recipient\'s email address for accuracy. Once corrected, you may resend the email.\n\nIf you require any assistance or have any questions, please don\'t hesitate to contact our support team at [Support Contact Information].\n\nThank you for your attention to this matter.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'</li><li>'Dear [Recipient],\n\nWe regret to inform you that the email with the subject "[Subject]" sent on [Date/Time] was not successfully delivered due to your mailbox being full.\n\nTo ensure successful delivery of future emails, we recommend clearing out unnecessary emails or upgrading your mailbox storage capacity. Once completed, please let us know, and we will be happy to resend the email.\n\nIf you require any assistance or have any questions, please don\'t hesitate to contact our support team at [Support Contact Information].\n\nThank you for your attention to this matter.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'</li></ul> | | Out-of- office replies | <ul><li>'Dear [Recipient],\n\nThank you for your email. I am currently out of the office and will not be able to respond to emails until [Date of Return].\n\nDuring this time, I will have limited access to my email and may not be able to reply promptly. Rest assured, I will attend to your email as soon as possible upon my return.\n\nIf your matter is urgent and requires immediate assistance, please contact [Alternative Contact Person/Department] at [Alternative Contact Email/Phone Number].\n\nFor all other inquiries, I kindly ask for your patience and understanding. I will do my best to respond to your email as soon as I am back in the office.\n\nThank you for your understanding.'</li><li>'Dear Sender,\n\nThank you for your email. I am currently out of the office and will not be able to respond until [Date of Return]. For urgent matters, please contact [Alternative Contact Information]. Otherwise, I will respond to your email upon my return.\n\nBest regards,\n[Your Name]'</li><li>'Hello,\n\nI am currently on a business trip and will have limited access to email until [Date of Return]. I will do my best to respond to your message as soon as possible upon my return. For urgent matters, please contact [Alternative Contact Information].\n\nThank you for your understanding.\n\nKind regards,\n[Your Name]'</li></ul> | | Read receipts or delivery confirmation | <ul><li>'Dear [Recipient],\n\nI hope this email finds you well. I am writing to confirm the receipt of the email I sent to you earlier today with the subject "[Your Subject]".\n\nIn order to ensure that the message has been successfully received and reviewed on your end, I kindly request that you provide a read receipt or confirm the delivery status of the email at your earliest convenience.\n\nYour confirmation would greatly assist me in ensuring that the necessary information has been communicated effectively.\n\nThank you for your attention to this matter. Please don\'t hesitate to reach out if you require any further clarification or assistance.\n\nBest regards,\n\n[Your Name]\n[Your Position/Title]\n[Your Contact Information]'</li><li>'Dear [Recipient\'s Name],\n\nThis is to inform you that your email with the subject "Important Update" sent on [Date and Time] has been successfully read by the recipient. You can now be assured that your message has been received and acknowledged.\n\nIf you have any further questions or require additional assistance, please feel free to reach out.\n\nThank you for choosing Gmail.\n\nSincerely,\nThe Gmail Team'</li><li>'Dear [Sender\'s Name],\n\nWe are pleased to inform you that your email with the subject "[Email Subject]" sent on [Date and Time] has been successfully read by the recipient. Your message has been acknowledged and received.\n\nShould you have any further questions or concerns, please feel free to reach out to us.\n\nThank you for choosing our services.\n\nBest regards,\n[Your Name]'</li></ul> | | Do-not-reply or no-reply emails (explicitly mentioned in email) | <ul><li>'Dear [Recipient],\n\nPlease be advised that this email is for informational purposes only. No reply is required or monitored.\n\nWe are reaching out to provide you with [specific information, update, or notification] regarding [briefly mention the subject matter].\n\nIf you have any questions or require further assistance regarding the content of this email, please contact our support team at [support email or phone number].\n\nThank you for your attention to this matter.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'</li><li>'Dear [Recipient],\n\nWe are writing to inform you about a recent update related to [briefly describe the topic or subject].\n\nPlease be aware that this email is sent from a do-not-reply address, and responses to this email will not be monitored. If you have any questions or need further clarification regarding the update, please reach out to our support team at [support email/phone number].\n\nThank you for your attention to this notification.\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company/Organization Name]\n\n'</li><li>"Dear [Recipient],\n\nWe hope this message finds you well. We're reaching out to inform you about an important update regarding [briefly mention the subject matter].\n\nPlease note that this email is for informational purposes only, and no response is necessary. Should you have any questions or concerns regarding the update, please don't hesitate to reach out to us at [contact email/phone].\n\nThank you for your attention to this matter.\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company/Organization Name]\n\n\n\n\n"</li></ul> | | Reminders | <ul><li>"Dear [Recipient],\n\nI hope this email finds you well. Just a friendly reminder about [brief description of the reminder topic].\n\n[Add any relevant details or instructions related to the reminder.]\n\nThank you for your attention to this matter. If you have any questions or need further assistance, please don't hesitate to contact me.\n\nBest regards,\n\n[Your Name]\n[Your Position/Title]\n[Your Contact Information]\n\n\n\n\n\n"</li><li>"Dear [Recipient],\n\nI hope this email finds you well. This is just a friendly reminder that payment for [Invoice/Service/Product] is due on [Due Date].\n\n[Include any relevant details about the payment, such as amount, invoice number, and payment methods.]\n\nPlease ensure to process the payment by the due date to avoid any late fees or disruptions to your service.\n\nIf you have any questions or need assistance with the payment process, please don't hesitate to contact our billing department at [Billing Contact Information].\n\nThank you for your prompt attention to this matter.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]\n[Your Contact Information]"</li><li>'Dear [Recipient],\n\nI hope this email finds you well. Just a quick reminder that we have a scheduled meeting on [Date] at [Time].\n\n[Include any relevant details about the meeting, such as agenda items, location, or virtual meeting link.]\n\nPlease ensure to mark your calendar and make necessary preparations for the meeting. Your participation and input are valuable to the success of our discussion.\n\nIf you have any scheduling conflicts or need to propose agenda topics, please let us know as soon as possible.\n\nLooking forward to our productive meeting.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]\n[Your Contact Information]'</li></ul> | | Security Alerts | <ul><li>"Dear [Recipient],\n\nWe are writing to inform you about an urgent security alert that requires your immediate attention.\n\n[Describe the security issue or threat briefly and clearly.]\n\nTo ensure the safety and integrity of your account/data, we highly recommend taking the following actions immediately:\n\nChange your password: Please reset your password using a strong and unique combination of characters.\nEnable two-factor authentication (2FA): Add an extra layer of security to your account by enabling 2FA if you haven't already done so.\nReview recent account activity: Check for any suspicious or unauthorized activities and report them to our support team immediately.\nIf you have any concerns or require assistance with securing your account, please contact our security team at [security email or phone number].\n\nYour prompt attention to this matter is crucial in safeguarding your information and preventing potential security breaches.\n\nThank you for your cooperation and understanding.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]"</li><li>"Dear [Recipient],\n\nWe are writing to inform you about a potential phishing attempt that has been detected targeting users of our platform.\n\n[Describe the phishing attempt briefly, including any relevant details or indicators of the phishing email.]\n\nTo safeguard your account and personal information, please remember the following precautions:\n\nDo not click on any links or download attachments from suspicious emails.\nVerify the sender's email address and look for any signs of spoofing or impersonation.\nReport any suspicious emails to our security team immediately for further investigation.\nIf you have inadvertently clicked on any links or provided any sensitive information, please change your account password immediately and notify our support team for assistance.\n\nThank you for your attention to this matter and for helping us maintain a secure environment for all our users.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]"</li><li>'Dear [Recipient],\n\nWe regret to inform you that your account has been temporarily locked due to multiple failed login attempts.\n\n[Explain the reason for the account lockout, such as exceeding the maximum allowed login attempts or suspicious login activity.]\n\nTo regain access to your account, please follow these steps:\n\nVisit our login page and click on the "Forgot Password" link.\nFollow the instructions to reset your password securely.\nAfter resetting your password, you will be able to log in to your account as usual.\nIf you believe this lockout was initiated in error or have any concerns about the security of your account, please contact our support team immediately for assistance.\n\nThank you for your cooperation and understanding.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'</li></ul> | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("mohamednihal/noReply") # Run inference preds = model("Hello, Thank you for your email. I am currently attending a conference and may have limited access to email until [Date of Return]. I will respond to your message as soon as possible upon my return. For urgent matters, please contact [Alternative Contact Information]. Best regards, [Your Name]") ``` <!-- ### Downstream Use *List how someone could finetune this model on their own dataset.* --> <!-- ### Out-of-Scope Use *List how the model may foreseeably be misused and address what users ought not to do with the model.* --> <!-- ## Bias, Risks and Limitations *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.* --> <!-- ### Recommendations *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.* --> ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:-------|:----| | Word count | 44 | 85.24 | 170 | | Label | Training Sample Count | |:----------------------------------------------------------------|:----------------------| | Automatic subscription confirmation emails | 5 | | Do-not-reply or no-reply emails (explicitly mentioned in email) | 5 | | Email Delivery failure notifications | 5 | | Out-of- office replies | 5 | | Password reset emails | 5 | | Promotional emails | 5 | | Read receipts or delivery confirmation | 5 | | Reminders | 5 | | Security Alerts | 5 | | System Alerts | 5 | ### Training Hyperparameters - batch_size: (2, 2) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - body_learning_rate: (2.887681170264626e-05, 2.887681170264626e-05) - head_learning_rate: 2.887681170264626e-05 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:-----:|:----:|:-------------:|:---------------:| | 0.001 | 1 | 0.1811 | - | | 0.05 | 50 | 0.3964 | - | | 0.1 | 100 | 0.0705 | - | | 0.15 | 150 | 0.0115 | - | | 0.2 | 200 | 0.0477 | - | | 0.25 | 250 | 0.0022 | - | | 0.3 | 300 | 0.0044 | - | | 0.35 | 350 | 0.0017 | - | | 0.4 | 400 | 0.001 | - | | 0.45 | 450 | 0.0001 | - | | 0.5 | 500 | 0.0006 | - | | 0.55 | 550 | 0.0008 | - | | 0.6 | 600 | 0.0003 | - | | 0.65 | 650 | 0.0006 | - | | 0.7 | 700 | 0.0003 | - | | 0.75 | 750 | 0.0017 | - | | 0.8 | 800 | 0.0001 | - | | 0.85 | 850 | 0.0002 | - | | 0.9 | 900 | 0.0 | - | | 0.95 | 950 | 0.0002 | - | | 1.0 | 1000 | 0.0002 | - | | 0.001 | 1 | 0.0001 | - | | 0.05 | 50 | 0.0002 | - | | 0.1 | 100 | 0.0014 | - | | 0.15 | 150 | 0.008 | - | | 0.2 | 200 | 0.0017 | - | | 0.25 | 250 | 0.0018 | - | | 0.3 | 300 | 0.0187 | - | | 0.35 | 350 | 0.0021 | - | | 0.4 | 400 | 0.0001 | - | | 0.45 | 450 | 0.0 | - | | 0.5 | 500 | 0.0003 | - | | 0.55 | 550 | 0.0001 | - | | 0.6 | 600 | 0.0 | - | | 0.65 | 650 | 0.0002 | - | | 0.7 | 700 | 0.0 | - | | 0.75 | 750 | 0.0003 | - | | 0.8 | 800 | 0.0 | - | | 0.85 | 850 | 0.0 | - | | 0.9 | 900 | 0.0001 | - | | 0.95 | 950 | 0.0001 | - | | 1.0 | 1000 | 0.0 | - | | 0.001 | 1 | 0.0 | - | | 0.05 | 50 | 0.0001 | - | | 0.1 | 100 | 0.0018 | - | | 0.15 | 150 | 0.0001 | - | | 0.2 | 200 | 0.0042 | - | | 0.25 | 250 | 0.0009 | - | | 0.3 | 300 | 0.0001 | - | | 0.35 | 350 | 0.0018 | - | | 0.4 | 400 | 0.0002 | - | | 0.45 | 450 | 0.0001 | - | | 0.5 | 500 | 0.0 | - | | 0.55 | 550 | 0.0001 | - | | 0.6 | 600 | 0.0 | - | | 0.65 | 650 | 0.0 | - | | 0.7 | 700 | 0.0 | - | | 0.75 | 750 | 0.0 | - | | 0.8 | 800 | 0.0 | - | | 0.85 | 850 | 0.0 | - | | 0.9 | 900 | 0.0 | - | | 0.95 | 950 | 0.0 | - | | 1.0 | 1000 | 0.0 | - | | 0.001 | 1 | 0.0 | - | | 0.05 | 50 | 0.0 | - | | 0.1 | 100 | 0.0005 | - | | 0.15 | 150 | 0.0025 | - | | 0.2 | 200 | 0.0 | - | | 0.25 | 250 | 0.0002 | - | | 0.3 | 300 | 0.0 | - | | 0.35 | 350 | 0.0003 | - | | 0.4 | 400 | 0.0001 | - | | 0.45 | 450 | 0.0 | - | | 0.5 | 500 | 0.0 | - | | 0.55 | 550 | 0.0 | - | | 0.6 | 600 | 0.0 | - | | 0.65 | 650 | 0.0 | - | | 0.7 | 700 | 0.0 | - | | 0.75 | 750 | 0.0 | - | | 0.8 | 800 | 0.0 | - | | 0.85 | 850 | 0.0 | - | | 0.9 | 900 | 0.0 | - | | 0.95 | 950 | 0.0 | - | | 1.0 | 1000 | 0.0 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.0.3 - Sentence Transformers: 2.4.0 - Transformers: 4.37.2 - PyTorch: 2.1.0+cu121 - Datasets: 2.17.1 - Tokenizers: 0.15.2 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ``` <!-- ## Glossary *Clearly define terms in order to be accessible across audiences.* --> <!-- ## Model Card Authors *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* --> <!-- ## Model Card Contact *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.* -->
sileod/deberta-v3-base-tasksource-nli
sileod
"2024-02-18T22:14:33Z"
86,123
104
transformers
[ "transformers", "pytorch", "safetensors", "deberta-v2", "text-classification", "deberta-v3-base", "deberta-v3", "deberta", "nli", "natural-language-inference", "multitask", "multi-task", "pipeline", "extreme-multi-task", "extreme-mtl", "tasksource", "zero-shot", "rlhf", "zero-shot-classification", "en", "dataset:glue", "dataset:super_glue", "dataset:anli", "dataset:tasksource/babi_nli", "dataset:sick", "dataset:snli", "dataset:scitail", "dataset:OpenAssistant/oasst1", "dataset:universal_dependencies", "dataset:hans", "dataset:qbao775/PARARULE-Plus", "dataset:alisawuffles/WANLI", "dataset:metaeval/recast", "dataset:sileod/probability_words_nli", "dataset:joey234/nan-nli", "dataset:pietrolesci/nli_fever", "dataset:pietrolesci/breaking_nli", "dataset:pietrolesci/conj_nli", "dataset:pietrolesci/fracas", "dataset:pietrolesci/dialogue_nli", "dataset:pietrolesci/mpe", "dataset:pietrolesci/dnc", "dataset:pietrolesci/gpt3_nli", "dataset:pietrolesci/recast_white", "dataset:pietrolesci/joci", "dataset:martn-nguyen/contrast_nli", "dataset:pietrolesci/robust_nli", "dataset:pietrolesci/robust_nli_is_sd", "dataset:pietrolesci/robust_nli_li_ts", "dataset:pietrolesci/gen_debiased_nli", "dataset:pietrolesci/add_one_rte", "dataset:metaeval/imppres", "dataset:pietrolesci/glue_diagnostics", "dataset:hlgd", "dataset:PolyAI/banking77", "dataset:paws", "dataset:quora", "dataset:medical_questions_pairs", "dataset:conll2003", "dataset:nlpaueb/finer-139", "dataset:Anthropic/hh-rlhf", "dataset:Anthropic/model-written-evals", "dataset:truthful_qa", "dataset:nightingal3/fig-qa", "dataset:tasksource/bigbench", "dataset:blimp", "dataset:cos_e", "dataset:cosmos_qa", "dataset:dream", "dataset:openbookqa", "dataset:qasc", "dataset:quartz", "dataset:quail", "dataset:head_qa", "dataset:sciq", "dataset:social_i_qa", "dataset:wiki_hop", "dataset:wiqa", "dataset:piqa", "dataset:hellaswag", "dataset:pkavumba/balanced-copa", "dataset:12ml/e-CARE", "dataset:art", "dataset:tasksource/mmlu", "dataset:winogrande", "dataset:codah", "dataset:ai2_arc", "dataset:definite_pronoun_resolution", "dataset:swag", "dataset:math_qa", "dataset:metaeval/utilitarianism", "dataset:mteb/amazon_counterfactual", "dataset:SetFit/insincere-questions", "dataset:SetFit/toxic_conversations", "dataset:turingbench/TuringBench", "dataset:trec", "dataset:tals/vitaminc", "dataset:hope_edi", "dataset:strombergnlp/rumoureval_2019", "dataset:ethos", "dataset:tweet_eval", "dataset:discovery", "dataset:pragmeval", "dataset:silicone", "dataset:lex_glue", "dataset:papluca/language-identification", "dataset:imdb", "dataset:rotten_tomatoes", "dataset:ag_news", "dataset:yelp_review_full", "dataset:financial_phrasebank", "dataset:poem_sentiment", "dataset:dbpedia_14", "dataset:amazon_polarity", "dataset:app_reviews", "dataset:hate_speech18", "dataset:sms_spam", "dataset:humicroedit", "dataset:snips_built_in_intents", "dataset:banking77", "dataset:hate_speech_offensive", "dataset:yahoo_answers_topics", "dataset:pacovaldez/stackoverflow-questions", "dataset:zapsdcn/hyperpartisan_news", "dataset:zapsdcn/sciie", "dataset:zapsdcn/citation_intent", "dataset:go_emotions", "dataset:allenai/scicite", "dataset:liar", "dataset:relbert/lexical_relation_classification", "dataset:metaeval/linguisticprobing", "dataset:tasksource/crowdflower", "dataset:metaeval/ethics", "dataset:emo", "dataset:google_wellformed_query", "dataset:tweets_hate_speech_detection", "dataset:has_part", "dataset:wnut_17", "dataset:ncbi_disease", "dataset:acronym_identification", "dataset:jnlpba", "dataset:species_800", "dataset:SpeedOfMagic/ontonotes_english", "dataset:blog_authorship_corpus", "dataset:launch/open_question_type", "dataset:health_fact", "dataset:commonsense_qa", "dataset:mc_taco", "dataset:ade_corpus_v2", "dataset:prajjwal1/discosense", "dataset:circa", "dataset:PiC/phrase_similarity", "dataset:copenlu/scientific-exaggeration-detection", "dataset:quarel", "dataset:mwong/fever-evidence-related", "dataset:numer_sense", "dataset:dynabench/dynasent", "dataset:raquiba/Sarcasm_News_Headline", "dataset:sem_eval_2010_task_8", "dataset:demo-org/auditor_review", "dataset:medmcqa", "dataset:aqua_rat", "dataset:RuyuanWan/Dynasent_Disagreement", "dataset:RuyuanWan/Politeness_Disagreement", "dataset:RuyuanWan/SBIC_Disagreement", "dataset:RuyuanWan/SChem_Disagreement", "dataset:RuyuanWan/Dilemmas_Disagreement", "dataset:lucasmccabe/logiqa", "dataset:wiki_qa", "dataset:metaeval/cycic_classification", "dataset:metaeval/cycic_multiplechoice", "dataset:metaeval/sts-companion", "dataset:metaeval/commonsense_qa_2.0", "dataset:metaeval/lingnli", "dataset:metaeval/monotonicity-entailment", "dataset:metaeval/arct", "dataset:metaeval/scinli", "dataset:metaeval/naturallogic", "dataset:onestop_qa", "dataset:demelin/moral_stories", "dataset:corypaik/prost", "dataset:aps/dynahate", "dataset:metaeval/syntactic-augmentation-nli", "dataset:metaeval/autotnli", "dataset:lasha-nlp/CONDAQA", "dataset:openai/webgpt_comparisons", "dataset:Dahoas/synthetic-instruct-gptj-pairwise", "dataset:metaeval/scruples", "dataset:metaeval/wouldyourather", "dataset:sileod/attempto-nli", "dataset:metaeval/defeasible-nli", "dataset:metaeval/help-nli", "dataset:metaeval/nli-veridicality-transitivity", "dataset:metaeval/natural-language-satisfiability", "dataset:metaeval/lonli", "dataset:tasksource/dadc-limit-nli", "dataset:ColumbiaNLP/FLUTE", "dataset:metaeval/strategy-qa", "dataset:openai/summarize_from_feedback", "dataset:tasksource/folio", "dataset:metaeval/tomi-nli", "dataset:metaeval/avicenna", "dataset:stanfordnlp/SHP", "dataset:GBaker/MedQA-USMLE-4-options-hf", "dataset:GBaker/MedQA-USMLE-4-options", "dataset:sileod/wikimedqa", "dataset:declare-lab/cicero", "dataset:amydeng2000/CREAK", "dataset:metaeval/mutual", "dataset:inverse-scaling/NeQA", "dataset:inverse-scaling/quote-repetition", "dataset:inverse-scaling/redefine-math", "dataset:tasksource/puzzte", "dataset:metaeval/implicatures", "dataset:race", "dataset:metaeval/spartqa-yn", "dataset:metaeval/spartqa-mchoice", "dataset:metaeval/temporal-nli", "dataset:metaeval/ScienceQA_text_only", "dataset:AndyChiang/cloth", "dataset:metaeval/logiqa-2.0-nli", "dataset:tasksource/oasst1_dense_flat", "dataset:metaeval/boolq-natural-perturbations", "dataset:metaeval/path-naturalness-prediction", "dataset:riddle_sense", "dataset:Jiangjie/ekar_english", "dataset:metaeval/implicit-hate-stg1", "dataset:metaeval/chaos-mnli-ambiguity", "dataset:IlyaGusev/headline_cause", "dataset:metaeval/race-c", "dataset:metaeval/equate", "dataset:metaeval/ambient", "dataset:AndyChiang/dgen", "dataset:metaeval/clcd-english", "dataset:civil_comments", "dataset:metaeval/acceptability-prediction", "dataset:maximedb/twentyquestions", "dataset:metaeval/counterfactually-augmented-snli", "dataset:tasksource/I2D2", "dataset:sileod/mindgames", "dataset:metaeval/counterfactually-augmented-imdb", "dataset:metaeval/cnli", "dataset:metaeval/reclor", "dataset:tasksource/oasst1_pairwise_rlhf_reward", "dataset:tasksource/zero-shot-label-nli", "dataset:webis/args_me", "dataset:webis/Touche23-ValueEval", "dataset:tasksource/starcon", "dataset:tasksource/ruletaker", "dataset:lighteval/lsat_qa", "dataset:tasksource/ConTRoL-nli", "dataset:tasksource/tracie", "dataset:tasksource/sherliic", "dataset:tasksource/sen-making", "dataset:tasksource/winowhy", "dataset:mediabiasgroup/mbib-base", "dataset:tasksource/robustLR", "dataset:CLUTRR/v1", "dataset:tasksource/logical-fallacy", "dataset:tasksource/parade", "dataset:tasksource/cladder", "dataset:tasksource/subjectivity", "dataset:tasksource/MOH", "dataset:tasksource/VUAC", "dataset:tasksource/TroFi", "dataset:sharc_modified", "dataset:tasksource/conceptrules_v2", "dataset:tasksource/disrpt", "dataset:conll2000", "dataset:DFKI-SLT/few-nerd", "dataset:tasksource/com2sense", "dataset:tasksource/scone", "dataset:tasksource/winodict", "dataset:tasksource/fool-me-twice", "dataset:tasksource/monli", "dataset:tasksource/corr2cause", "dataset:tasksource/apt", "dataset:zeroshot/twitter-financial-news-sentiment", "dataset:tasksource/icl-symbol-tuning-instruct", "dataset:tasksource/SpaceNLI", "dataset:sihaochen/propsegment", "dataset:HannahRoseKirk/HatemojiBuild", "dataset:tasksource/regset", "dataset:lmsys/chatbot_arena_conversations", "arxiv:2301.05948", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
zero-shot-classification
"2023-01-13T13:47:22Z"
--- license: apache-2.0 language: en tags: - deberta-v3-base - deberta-v3 - deberta - text-classification - nli - natural-language-inference - multitask - multi-task - pipeline - extreme-multi-task - extreme-mtl - tasksource - zero-shot - rlhf model-index: - name: deberta-v3-base-tasksource-nli results: - task: type: text-classification name: Text Classification dataset: name: glue type: glue config: rte split: validation metrics: - type: accuracy value: 0.89 - task: type: natural-language-inference name: Natural Language Inference dataset: name: anli-r3 type: anli config: plain_text split: validation metrics: - type: accuracy value: 0.52 name: Accuracy datasets: - glue - super_glue - anli - tasksource/babi_nli - sick - snli - scitail - OpenAssistant/oasst1 - universal_dependencies - hans - qbao775/PARARULE-Plus - alisawuffles/WANLI - metaeval/recast - sileod/probability_words_nli - joey234/nan-nli - pietrolesci/nli_fever - pietrolesci/breaking_nli - pietrolesci/conj_nli - pietrolesci/fracas - pietrolesci/dialogue_nli - pietrolesci/mpe - pietrolesci/dnc - pietrolesci/gpt3_nli - pietrolesci/recast_white - pietrolesci/joci - martn-nguyen/contrast_nli - pietrolesci/robust_nli - pietrolesci/robust_nli_is_sd - pietrolesci/robust_nli_li_ts - pietrolesci/gen_debiased_nli - pietrolesci/add_one_rte - metaeval/imppres - pietrolesci/glue_diagnostics - hlgd - PolyAI/banking77 - paws - quora - medical_questions_pairs - conll2003 - nlpaueb/finer-139 - Anthropic/hh-rlhf - Anthropic/model-written-evals - truthful_qa - nightingal3/fig-qa - tasksource/bigbench - blimp - cos_e - cosmos_qa - dream - openbookqa - qasc - quartz - quail - head_qa - sciq - social_i_qa - wiki_hop - wiqa - piqa - hellaswag - pkavumba/balanced-copa - 12ml/e-CARE - art - tasksource/mmlu - winogrande - codah - ai2_arc - definite_pronoun_resolution - swag - math_qa - metaeval/utilitarianism - mteb/amazon_counterfactual - SetFit/insincere-questions - SetFit/toxic_conversations - turingbench/TuringBench - trec - tals/vitaminc - hope_edi - strombergnlp/rumoureval_2019 - ethos - tweet_eval - discovery - pragmeval - silicone - lex_glue - papluca/language-identification - imdb - rotten_tomatoes - ag_news - yelp_review_full - financial_phrasebank - poem_sentiment - dbpedia_14 - amazon_polarity - app_reviews - hate_speech18 - sms_spam - humicroedit - snips_built_in_intents - banking77 - hate_speech_offensive - yahoo_answers_topics - pacovaldez/stackoverflow-questions - zapsdcn/hyperpartisan_news - zapsdcn/sciie - zapsdcn/citation_intent - go_emotions - allenai/scicite - liar - relbert/lexical_relation_classification - metaeval/linguisticprobing - tasksource/crowdflower - metaeval/ethics - emo - google_wellformed_query - tweets_hate_speech_detection - has_part - wnut_17 - ncbi_disease - acronym_identification - jnlpba - species_800 - SpeedOfMagic/ontonotes_english - blog_authorship_corpus - launch/open_question_type - health_fact - commonsense_qa - mc_taco - ade_corpus_v2 - prajjwal1/discosense - circa - PiC/phrase_similarity - copenlu/scientific-exaggeration-detection - quarel - mwong/fever-evidence-related - numer_sense - dynabench/dynasent - raquiba/Sarcasm_News_Headline - sem_eval_2010_task_8 - demo-org/auditor_review - medmcqa - aqua_rat - RuyuanWan/Dynasent_Disagreement - RuyuanWan/Politeness_Disagreement - RuyuanWan/SBIC_Disagreement - RuyuanWan/SChem_Disagreement - RuyuanWan/Dilemmas_Disagreement - lucasmccabe/logiqa - wiki_qa - metaeval/cycic_classification - metaeval/cycic_multiplechoice - metaeval/sts-companion - metaeval/commonsense_qa_2.0 - metaeval/lingnli - metaeval/monotonicity-entailment - metaeval/arct - metaeval/scinli - metaeval/naturallogic - onestop_qa - demelin/moral_stories - corypaik/prost - aps/dynahate - metaeval/syntactic-augmentation-nli - metaeval/autotnli - lasha-nlp/CONDAQA - openai/webgpt_comparisons - Dahoas/synthetic-instruct-gptj-pairwise - metaeval/scruples - metaeval/wouldyourather - sileod/attempto-nli - metaeval/defeasible-nli - metaeval/help-nli - metaeval/nli-veridicality-transitivity - metaeval/natural-language-satisfiability - metaeval/lonli - tasksource/dadc-limit-nli - ColumbiaNLP/FLUTE - metaeval/strategy-qa - openai/summarize_from_feedback - tasksource/folio - metaeval/tomi-nli - metaeval/avicenna - stanfordnlp/SHP - GBaker/MedQA-USMLE-4-options-hf - GBaker/MedQA-USMLE-4-options - sileod/wikimedqa - declare-lab/cicero - amydeng2000/CREAK - metaeval/mutual - inverse-scaling/NeQA - inverse-scaling/quote-repetition - inverse-scaling/redefine-math - tasksource/puzzte - metaeval/implicatures - race - metaeval/spartqa-yn - metaeval/spartqa-mchoice - metaeval/temporal-nli - metaeval/ScienceQA_text_only - AndyChiang/cloth - metaeval/logiqa-2.0-nli - tasksource/oasst1_dense_flat - metaeval/boolq-natural-perturbations - metaeval/path-naturalness-prediction - riddle_sense - Jiangjie/ekar_english - metaeval/implicit-hate-stg1 - metaeval/chaos-mnli-ambiguity - IlyaGusev/headline_cause - metaeval/race-c - metaeval/equate - metaeval/ambient - AndyChiang/dgen - metaeval/clcd-english - civil_comments - metaeval/acceptability-prediction - maximedb/twentyquestions - metaeval/counterfactually-augmented-snli - tasksource/I2D2 - sileod/mindgames - metaeval/counterfactually-augmented-imdb - metaeval/cnli - metaeval/reclor - tasksource/oasst1_pairwise_rlhf_reward - tasksource/zero-shot-label-nli - webis/args_me - webis/Touche23-ValueEval - tasksource/starcon - tasksource/ruletaker - lighteval/lsat_qa - tasksource/ConTRoL-nli - tasksource/tracie - tasksource/sherliic - tasksource/sen-making - tasksource/winowhy - mediabiasgroup/mbib-base - tasksource/robustLR - CLUTRR/v1 - tasksource/logical-fallacy - tasksource/parade - tasksource/cladder - tasksource/subjectivity - tasksource/MOH - tasksource/VUAC - tasksource/TroFi - sharc_modified - tasksource/conceptrules_v2 - tasksource/disrpt - conll2000 - DFKI-SLT/few-nerd - tasksource/com2sense - tasksource/scone - tasksource/winodict - tasksource/fool-me-twice - tasksource/monli - tasksource/corr2cause - tasksource/apt - zeroshot/twitter-financial-news-sentiment - tasksource/icl-symbol-tuning-instruct - tasksource/SpaceNLI - sihaochen/propsegment - HannahRoseKirk/HatemojiBuild - tasksource/regset - tasksource/babi_nli - lmsys/chatbot_arena_conversations metrics: - accuracy library_name: transformers pipeline_tag: zero-shot-classification --- # Model Card for DeBERTa-v3-base-tasksource-nli This is [DeBERTa-v3-base](https://hf.co/microsoft/deberta-v3-base) fine-tuned with multi-task learning on 600+ tasks of the [tasksource collection](https://github.com/sileod/tasksource/). This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for: - Zero-shot entailment-based classification for arbitrary labels [ZS]. - Natural language inference [NLI] - Hundreds of previous tasks with tasksource-adapters [TA]. - Further fine-tuning on a new task or tasksource task (classification, token classification or multiple-choice) [FT]. # [ZS] Zero-shot classification pipeline ```python from transformers import pipeline classifier = pipeline("zero-shot-classification",model="sileod/deberta-v3-base-tasksource-nli") text = "one day I will see the world" candidate_labels = ['travel', 'cooking', 'dancing'] classifier(text, candidate_labels) ``` NLI training data of this model includes [label-nli](https://huggingface.co/datasets/tasksource/zero-shot-label-nli), a NLI dataset specially constructed to improve this kind of zero-shot classification. # [NLI] Natural language inference pipeline ```python from transformers import pipeline pipe = pipeline("text-classification",model="sileod/deberta-v3-base-tasksource-nli") pipe([dict(text='there is a cat', text_pair='there is a black cat')]) #list of (premise,hypothesis) # [{'label': 'neutral', 'score': 0.9952911138534546}] ``` # [TA] Tasksource-adapters: 1 line access to hundreds of tasks ```python # !pip install tasknet import tasknet as tn pipe = tn.load_pipeline('sileod/deberta-v3-base-tasksource-nli','glue/sst2') # works for 500+ tasksource tasks pipe(['That movie was great !', 'Awful movie.']) # [{'label': 'positive', 'score': 0.9956}, {'label': 'negative', 'score': 0.9967}] ``` The list of tasks is available in model config.json. This is more efficient than ZS since it requires only one forward pass per example, but it is less flexible. # [FT] Tasknet: 3 lines fine-tuning ```python # !pip install tasknet import tasknet as tn hparams=dict(model_name='sileod/deberta-v3-base-tasksource-nli', learning_rate=2e-5) model, trainer = tn.Model_Trainer([tn.AutoTask("glue/rte")], hparams) trainer.train() ``` ## Evaluation This model ranked 1st among all models with the microsoft/deberta-v3-base architecture according to the IBM model recycling evaluation. https://ibm.github.io/model-recycling/ ### Software and training details The model was trained on 600 tasks for 200k steps with a batch size of 384 and a peak learning rate of 2e-5. Training took 12 days on Nvidia A30 24GB gpu. This is the shared model with the MNLI classifier on top. Each task had a specific CLS embedding, which is dropped 10% of the time to facilitate model use without it. All multiple-choice model used the same classification layers. For classification tasks, models shared weights if their labels matched. https://github.com/sileod/tasksource/ \ https://github.com/sileod/tasknet/ \ Training code: https://colab.research.google.com/drive/1iB4Oxl9_B5W3ZDzXoWJN-olUbqLBxgQS?usp=sharing # Citation More details on this [article:](https://arxiv.org/abs/2301.05948) ``` @article{sileo2023tasksource, title={tasksource: Structured Dataset Preprocessing Annotations for Frictionless Extreme Multi-Task Learning and Evaluation}, author={Sileo, Damien}, url= {https://arxiv.org/abs/2301.05948}, journal={arXiv preprint arXiv:2301.05948}, year={2023} } ``` # Model Card Contact damien.sileo@inria.fr </details>
BAAI/bge-large-en
BAAI
"2023-10-12T03:35:38Z"
86,012
172
transformers
[ "transformers", "pytorch", "safetensors", "bert", "feature-extraction", "mteb", "sentence-transfomres", "en", "arxiv:2310.07554", "arxiv:2309.07597", "license:mit", "model-index", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2023-08-02T07:11:51Z"
--- tags: - mteb - sentence-transfomres - transformers model-index: - name: bge-large-en results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 76.94029850746269 - type: ap value: 40.00228964744091 - type: f1 value: 70.86088267934595 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 91.93745 - type: ap value: 88.24758534667426 - type: f1 value: 91.91033034217591 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 46.158 - type: f1 value: 45.78935185074774 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 39.972 - type: map_at_10 value: 54.874 - type: map_at_100 value: 55.53399999999999 - type: map_at_1000 value: 55.539 - type: map_at_3 value: 51.031000000000006 - type: map_at_5 value: 53.342999999999996 - type: mrr_at_1 value: 40.541 - type: mrr_at_10 value: 55.096000000000004 - type: mrr_at_100 value: 55.75599999999999 - type: mrr_at_1000 value: 55.761 - type: mrr_at_3 value: 51.221000000000004 - type: mrr_at_5 value: 53.568000000000005 - type: ndcg_at_1 value: 39.972 - type: ndcg_at_10 value: 62.456999999999994 - type: ndcg_at_100 value: 65.262 - type: ndcg_at_1000 value: 65.389 - type: ndcg_at_3 value: 54.673 - type: ndcg_at_5 value: 58.80499999999999 - type: precision_at_1 value: 39.972 - type: precision_at_10 value: 8.634 - type: precision_at_100 value: 0.9860000000000001 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 21.740000000000002 - type: precision_at_5 value: 15.036 - type: recall_at_1 value: 39.972 - type: recall_at_10 value: 86.344 - type: recall_at_100 value: 98.578 - type: recall_at_1000 value: 99.57300000000001 - type: recall_at_3 value: 65.22 - type: recall_at_5 value: 75.178 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 48.94652870403906 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 43.17257160340209 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 63.97867370559182 - type: mrr value: 77.00820032537484 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 80.00986015960616 - type: cos_sim_spearman value: 80.36387933827882 - type: euclidean_pearson value: 80.32305287257296 - type: euclidean_spearman value: 82.0524720308763 - type: manhattan_pearson value: 80.19847473906454 - type: manhattan_spearman value: 81.87957652506985 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 88.00000000000001 - type: f1 value: 87.99039027511853 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 41.36932844640705 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 38.34983239611985 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 32.257999999999996 - type: map_at_10 value: 42.937 - type: map_at_100 value: 44.406 - type: map_at_1000 value: 44.536 - type: map_at_3 value: 39.22 - type: map_at_5 value: 41.458 - type: mrr_at_1 value: 38.769999999999996 - type: mrr_at_10 value: 48.701 - type: mrr_at_100 value: 49.431000000000004 - type: mrr_at_1000 value: 49.476 - type: mrr_at_3 value: 45.875 - type: mrr_at_5 value: 47.67 - type: ndcg_at_1 value: 38.769999999999996 - type: ndcg_at_10 value: 49.35 - type: ndcg_at_100 value: 54.618 - type: ndcg_at_1000 value: 56.655 - type: ndcg_at_3 value: 43.826 - type: ndcg_at_5 value: 46.72 - type: precision_at_1 value: 38.769999999999996 - type: precision_at_10 value: 9.328 - type: precision_at_100 value: 1.484 - type: precision_at_1000 value: 0.196 - type: precision_at_3 value: 20.649 - type: precision_at_5 value: 15.25 - type: recall_at_1 value: 32.257999999999996 - type: recall_at_10 value: 61.849 - type: recall_at_100 value: 83.70400000000001 - type: recall_at_1000 value: 96.344 - type: recall_at_3 value: 46.037 - type: recall_at_5 value: 53.724000000000004 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 32.979 - type: map_at_10 value: 43.376999999999995 - type: map_at_100 value: 44.667 - type: map_at_1000 value: 44.794 - type: map_at_3 value: 40.461999999999996 - type: map_at_5 value: 42.138 - type: mrr_at_1 value: 41.146 - type: mrr_at_10 value: 49.575 - type: mrr_at_100 value: 50.187000000000005 - type: mrr_at_1000 value: 50.231 - type: mrr_at_3 value: 47.601 - type: mrr_at_5 value: 48.786 - type: ndcg_at_1 value: 41.146 - type: ndcg_at_10 value: 48.957 - type: ndcg_at_100 value: 53.296 - type: ndcg_at_1000 value: 55.254000000000005 - type: ndcg_at_3 value: 45.235 - type: ndcg_at_5 value: 47.014 - type: precision_at_1 value: 41.146 - type: precision_at_10 value: 9.107999999999999 - type: precision_at_100 value: 1.481 - type: precision_at_1000 value: 0.193 - type: precision_at_3 value: 21.783 - type: precision_at_5 value: 15.274 - type: recall_at_1 value: 32.979 - type: recall_at_10 value: 58.167 - type: recall_at_100 value: 76.374 - type: recall_at_1000 value: 88.836 - type: recall_at_3 value: 46.838 - type: recall_at_5 value: 52.006 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 40.326 - type: map_at_10 value: 53.468 - type: map_at_100 value: 54.454 - type: map_at_1000 value: 54.508 - type: map_at_3 value: 50.12799999999999 - type: map_at_5 value: 51.991 - type: mrr_at_1 value: 46.394999999999996 - type: mrr_at_10 value: 57.016999999999996 - type: mrr_at_100 value: 57.67099999999999 - type: mrr_at_1000 value: 57.699999999999996 - type: mrr_at_3 value: 54.65 - type: mrr_at_5 value: 56.101 - type: ndcg_at_1 value: 46.394999999999996 - type: ndcg_at_10 value: 59.507 - type: ndcg_at_100 value: 63.31099999999999 - type: ndcg_at_1000 value: 64.388 - type: ndcg_at_3 value: 54.04600000000001 - type: ndcg_at_5 value: 56.723 - type: precision_at_1 value: 46.394999999999996 - type: precision_at_10 value: 9.567 - type: precision_at_100 value: 1.234 - type: precision_at_1000 value: 0.13699999999999998 - type: precision_at_3 value: 24.117 - type: precision_at_5 value: 16.426 - type: recall_at_1 value: 40.326 - type: recall_at_10 value: 73.763 - type: recall_at_100 value: 89.927 - type: recall_at_1000 value: 97.509 - type: recall_at_3 value: 59.34 - type: recall_at_5 value: 65.915 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.661 - type: map_at_10 value: 35.522 - type: map_at_100 value: 36.619 - type: map_at_1000 value: 36.693999999999996 - type: map_at_3 value: 33.154 - type: map_at_5 value: 34.353 - type: mrr_at_1 value: 28.362 - type: mrr_at_10 value: 37.403999999999996 - type: mrr_at_100 value: 38.374 - type: mrr_at_1000 value: 38.428000000000004 - type: mrr_at_3 value: 35.235 - type: mrr_at_5 value: 36.269 - type: ndcg_at_1 value: 28.362 - type: ndcg_at_10 value: 40.431 - type: ndcg_at_100 value: 45.745999999999995 - type: ndcg_at_1000 value: 47.493 - type: ndcg_at_3 value: 35.733 - type: ndcg_at_5 value: 37.722 - type: precision_at_1 value: 28.362 - type: precision_at_10 value: 6.101999999999999 - type: precision_at_100 value: 0.922 - type: precision_at_1000 value: 0.11100000000000002 - type: precision_at_3 value: 15.140999999999998 - type: precision_at_5 value: 10.305 - type: recall_at_1 value: 26.661 - type: recall_at_10 value: 53.675 - type: recall_at_100 value: 77.891 - type: recall_at_1000 value: 90.72 - type: recall_at_3 value: 40.751 - type: recall_at_5 value: 45.517 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 18.886 - type: map_at_10 value: 27.288 - type: map_at_100 value: 28.327999999999996 - type: map_at_1000 value: 28.438999999999997 - type: map_at_3 value: 24.453 - type: map_at_5 value: 25.959 - type: mrr_at_1 value: 23.134 - type: mrr_at_10 value: 32.004 - type: mrr_at_100 value: 32.789 - type: mrr_at_1000 value: 32.857 - type: mrr_at_3 value: 29.084 - type: mrr_at_5 value: 30.614 - type: ndcg_at_1 value: 23.134 - type: ndcg_at_10 value: 32.852 - type: ndcg_at_100 value: 37.972 - type: ndcg_at_1000 value: 40.656 - type: ndcg_at_3 value: 27.435 - type: ndcg_at_5 value: 29.823 - type: precision_at_1 value: 23.134 - type: precision_at_10 value: 6.032 - type: precision_at_100 value: 0.9950000000000001 - type: precision_at_1000 value: 0.136 - type: precision_at_3 value: 13.017999999999999 - type: precision_at_5 value: 9.501999999999999 - type: recall_at_1 value: 18.886 - type: recall_at_10 value: 45.34 - type: recall_at_100 value: 67.947 - type: recall_at_1000 value: 86.924 - type: recall_at_3 value: 30.535 - type: recall_at_5 value: 36.451 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.994999999999997 - type: map_at_10 value: 40.04 - type: map_at_100 value: 41.435 - type: map_at_1000 value: 41.537 - type: map_at_3 value: 37.091 - type: map_at_5 value: 38.802 - type: mrr_at_1 value: 35.034 - type: mrr_at_10 value: 45.411 - type: mrr_at_100 value: 46.226 - type: mrr_at_1000 value: 46.27 - type: mrr_at_3 value: 43.086 - type: mrr_at_5 value: 44.452999999999996 - type: ndcg_at_1 value: 35.034 - type: ndcg_at_10 value: 46.076 - type: ndcg_at_100 value: 51.483000000000004 - type: ndcg_at_1000 value: 53.433 - type: ndcg_at_3 value: 41.304 - type: ndcg_at_5 value: 43.641999999999996 - type: precision_at_1 value: 35.034 - type: precision_at_10 value: 8.258000000000001 - type: precision_at_100 value: 1.268 - type: precision_at_1000 value: 0.161 - type: precision_at_3 value: 19.57 - type: precision_at_5 value: 13.782 - type: recall_at_1 value: 28.994999999999997 - type: recall_at_10 value: 58.538000000000004 - type: recall_at_100 value: 80.72399999999999 - type: recall_at_1000 value: 93.462 - type: recall_at_3 value: 45.199 - type: recall_at_5 value: 51.237 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.795 - type: map_at_10 value: 34.935 - type: map_at_100 value: 36.306 - type: map_at_1000 value: 36.417 - type: map_at_3 value: 31.831 - type: map_at_5 value: 33.626 - type: mrr_at_1 value: 30.479 - type: mrr_at_10 value: 40.225 - type: mrr_at_100 value: 41.055 - type: mrr_at_1000 value: 41.114 - type: mrr_at_3 value: 37.538 - type: mrr_at_5 value: 39.073 - type: ndcg_at_1 value: 30.479 - type: ndcg_at_10 value: 40.949999999999996 - type: ndcg_at_100 value: 46.525 - type: ndcg_at_1000 value: 48.892 - type: ndcg_at_3 value: 35.79 - type: ndcg_at_5 value: 38.237 - type: precision_at_1 value: 30.479 - type: precision_at_10 value: 7.6259999999999994 - type: precision_at_100 value: 1.203 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 17.199 - type: precision_at_5 value: 12.466000000000001 - type: recall_at_1 value: 24.795 - type: recall_at_10 value: 53.421 - type: recall_at_100 value: 77.189 - type: recall_at_1000 value: 93.407 - type: recall_at_3 value: 39.051 - type: recall_at_5 value: 45.462 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.853499999999997 - type: map_at_10 value: 36.20433333333333 - type: map_at_100 value: 37.40391666666667 - type: map_at_1000 value: 37.515 - type: map_at_3 value: 33.39975 - type: map_at_5 value: 34.9665 - type: mrr_at_1 value: 31.62666666666667 - type: mrr_at_10 value: 40.436749999999996 - type: mrr_at_100 value: 41.260333333333335 - type: mrr_at_1000 value: 41.31525 - type: mrr_at_3 value: 38.06733333333332 - type: mrr_at_5 value: 39.41541666666667 - type: ndcg_at_1 value: 31.62666666666667 - type: ndcg_at_10 value: 41.63341666666667 - type: ndcg_at_100 value: 46.704166666666666 - type: ndcg_at_1000 value: 48.88483333333335 - type: ndcg_at_3 value: 36.896 - type: ndcg_at_5 value: 39.11891666666667 - type: precision_at_1 value: 31.62666666666667 - type: precision_at_10 value: 7.241083333333333 - type: precision_at_100 value: 1.1488333333333334 - type: precision_at_1000 value: 0.15250000000000002 - type: precision_at_3 value: 16.908333333333335 - type: precision_at_5 value: 11.942833333333333 - type: recall_at_1 value: 26.853499999999997 - type: recall_at_10 value: 53.461333333333336 - type: recall_at_100 value: 75.63633333333333 - type: recall_at_1000 value: 90.67016666666666 - type: recall_at_3 value: 40.24241666666667 - type: recall_at_5 value: 45.98608333333333 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.241999999999997 - type: map_at_10 value: 31.863999999999997 - type: map_at_100 value: 32.835 - type: map_at_1000 value: 32.928000000000004 - type: map_at_3 value: 29.694 - type: map_at_5 value: 30.978 - type: mrr_at_1 value: 28.374 - type: mrr_at_10 value: 34.814 - type: mrr_at_100 value: 35.596 - type: mrr_at_1000 value: 35.666 - type: mrr_at_3 value: 32.745000000000005 - type: mrr_at_5 value: 34.049 - type: ndcg_at_1 value: 28.374 - type: ndcg_at_10 value: 35.969 - type: ndcg_at_100 value: 40.708 - type: ndcg_at_1000 value: 43.08 - type: ndcg_at_3 value: 31.968999999999998 - type: ndcg_at_5 value: 34.069 - type: precision_at_1 value: 28.374 - type: precision_at_10 value: 5.583 - type: precision_at_100 value: 0.8630000000000001 - type: precision_at_1000 value: 0.11299999999999999 - type: precision_at_3 value: 13.547999999999998 - type: precision_at_5 value: 9.447999999999999 - type: recall_at_1 value: 25.241999999999997 - type: recall_at_10 value: 45.711 - type: recall_at_100 value: 67.482 - type: recall_at_1000 value: 85.13300000000001 - type: recall_at_3 value: 34.622 - type: recall_at_5 value: 40.043 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 17.488999999999997 - type: map_at_10 value: 25.142999999999997 - type: map_at_100 value: 26.244 - type: map_at_1000 value: 26.363999999999997 - type: map_at_3 value: 22.654 - type: map_at_5 value: 24.017 - type: mrr_at_1 value: 21.198 - type: mrr_at_10 value: 28.903000000000002 - type: mrr_at_100 value: 29.860999999999997 - type: mrr_at_1000 value: 29.934 - type: mrr_at_3 value: 26.634999999999998 - type: mrr_at_5 value: 27.903 - type: ndcg_at_1 value: 21.198 - type: ndcg_at_10 value: 29.982999999999997 - type: ndcg_at_100 value: 35.275 - type: ndcg_at_1000 value: 38.074000000000005 - type: ndcg_at_3 value: 25.502999999999997 - type: ndcg_at_5 value: 27.557 - type: precision_at_1 value: 21.198 - type: precision_at_10 value: 5.502 - type: precision_at_100 value: 0.942 - type: precision_at_1000 value: 0.136 - type: precision_at_3 value: 12.044 - type: precision_at_5 value: 8.782 - type: recall_at_1 value: 17.488999999999997 - type: recall_at_10 value: 40.821000000000005 - type: recall_at_100 value: 64.567 - type: recall_at_1000 value: 84.452 - type: recall_at_3 value: 28.351 - type: recall_at_5 value: 33.645 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.066000000000003 - type: map_at_10 value: 36.134 - type: map_at_100 value: 37.285000000000004 - type: map_at_1000 value: 37.389 - type: map_at_3 value: 33.522999999999996 - type: map_at_5 value: 34.905 - type: mrr_at_1 value: 31.436999999999998 - type: mrr_at_10 value: 40.225 - type: mrr_at_100 value: 41.079 - type: mrr_at_1000 value: 41.138000000000005 - type: mrr_at_3 value: 38.074999999999996 - type: mrr_at_5 value: 39.190000000000005 - type: ndcg_at_1 value: 31.436999999999998 - type: ndcg_at_10 value: 41.494 - type: ndcg_at_100 value: 46.678999999999995 - type: ndcg_at_1000 value: 48.964 - type: ndcg_at_3 value: 36.828 - type: ndcg_at_5 value: 38.789 - type: precision_at_1 value: 31.436999999999998 - type: precision_at_10 value: 6.931 - type: precision_at_100 value: 1.072 - type: precision_at_1000 value: 0.13799999999999998 - type: precision_at_3 value: 16.729 - type: precision_at_5 value: 11.567 - type: recall_at_1 value: 27.066000000000003 - type: recall_at_10 value: 53.705000000000005 - type: recall_at_100 value: 75.968 - type: recall_at_1000 value: 91.937 - type: recall_at_3 value: 40.865 - type: recall_at_5 value: 45.739999999999995 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.979000000000003 - type: map_at_10 value: 32.799 - type: map_at_100 value: 34.508 - type: map_at_1000 value: 34.719 - type: map_at_3 value: 29.947000000000003 - type: map_at_5 value: 31.584 - type: mrr_at_1 value: 30.237000000000002 - type: mrr_at_10 value: 37.651 - type: mrr_at_100 value: 38.805 - type: mrr_at_1000 value: 38.851 - type: mrr_at_3 value: 35.046 - type: mrr_at_5 value: 36.548 - type: ndcg_at_1 value: 30.237000000000002 - type: ndcg_at_10 value: 38.356 - type: ndcg_at_100 value: 44.906 - type: ndcg_at_1000 value: 47.299 - type: ndcg_at_3 value: 33.717999999999996 - type: ndcg_at_5 value: 35.946 - type: precision_at_1 value: 30.237000000000002 - type: precision_at_10 value: 7.292 - type: precision_at_100 value: 1.496 - type: precision_at_1000 value: 0.23600000000000002 - type: precision_at_3 value: 15.547 - type: precision_at_5 value: 11.344 - type: recall_at_1 value: 24.979000000000003 - type: recall_at_10 value: 48.624 - type: recall_at_100 value: 77.932 - type: recall_at_1000 value: 92.66499999999999 - type: recall_at_3 value: 35.217 - type: recall_at_5 value: 41.394 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 22.566 - type: map_at_10 value: 30.945 - type: map_at_100 value: 31.759999999999998 - type: map_at_1000 value: 31.855 - type: map_at_3 value: 28.64 - type: map_at_5 value: 29.787000000000003 - type: mrr_at_1 value: 24.954 - type: mrr_at_10 value: 33.311 - type: mrr_at_100 value: 34.050000000000004 - type: mrr_at_1000 value: 34.117999999999995 - type: mrr_at_3 value: 31.238 - type: mrr_at_5 value: 32.329 - type: ndcg_at_1 value: 24.954 - type: ndcg_at_10 value: 35.676 - type: ndcg_at_100 value: 39.931 - type: ndcg_at_1000 value: 42.43 - type: ndcg_at_3 value: 31.365 - type: ndcg_at_5 value: 33.184999999999995 - type: precision_at_1 value: 24.954 - type: precision_at_10 value: 5.564 - type: precision_at_100 value: 0.826 - type: precision_at_1000 value: 0.116 - type: precision_at_3 value: 13.555 - type: precision_at_5 value: 9.168 - type: recall_at_1 value: 22.566 - type: recall_at_10 value: 47.922 - type: recall_at_100 value: 67.931 - type: recall_at_1000 value: 86.653 - type: recall_at_3 value: 36.103 - type: recall_at_5 value: 40.699000000000005 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 16.950000000000003 - type: map_at_10 value: 28.612 - type: map_at_100 value: 30.476999999999997 - type: map_at_1000 value: 30.674 - type: map_at_3 value: 24.262 - type: map_at_5 value: 26.554 - type: mrr_at_1 value: 38.241 - type: mrr_at_10 value: 50.43 - type: mrr_at_100 value: 51.059 - type: mrr_at_1000 value: 51.090999999999994 - type: mrr_at_3 value: 47.514 - type: mrr_at_5 value: 49.246 - type: ndcg_at_1 value: 38.241 - type: ndcg_at_10 value: 38.218 - type: ndcg_at_100 value: 45.003 - type: ndcg_at_1000 value: 48.269 - type: ndcg_at_3 value: 32.568000000000005 - type: ndcg_at_5 value: 34.400999999999996 - type: precision_at_1 value: 38.241 - type: precision_at_10 value: 11.674 - type: precision_at_100 value: 1.913 - type: precision_at_1000 value: 0.252 - type: precision_at_3 value: 24.387 - type: precision_at_5 value: 18.163 - type: recall_at_1 value: 16.950000000000003 - type: recall_at_10 value: 43.769000000000005 - type: recall_at_100 value: 66.875 - type: recall_at_1000 value: 84.92699999999999 - type: recall_at_3 value: 29.353 - type: recall_at_5 value: 35.467 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 9.276 - type: map_at_10 value: 20.848 - type: map_at_100 value: 29.804000000000002 - type: map_at_1000 value: 31.398 - type: map_at_3 value: 14.886 - type: map_at_5 value: 17.516000000000002 - type: mrr_at_1 value: 71 - type: mrr_at_10 value: 78.724 - type: mrr_at_100 value: 78.976 - type: mrr_at_1000 value: 78.986 - type: mrr_at_3 value: 77.333 - type: mrr_at_5 value: 78.021 - type: ndcg_at_1 value: 57.875 - type: ndcg_at_10 value: 43.855 - type: ndcg_at_100 value: 48.99 - type: ndcg_at_1000 value: 56.141 - type: ndcg_at_3 value: 48.914 - type: ndcg_at_5 value: 45.961 - type: precision_at_1 value: 71 - type: precision_at_10 value: 34.575 - type: precision_at_100 value: 11.182 - type: precision_at_1000 value: 2.044 - type: precision_at_3 value: 52.5 - type: precision_at_5 value: 44.2 - type: recall_at_1 value: 9.276 - type: recall_at_10 value: 26.501 - type: recall_at_100 value: 55.72899999999999 - type: recall_at_1000 value: 78.532 - type: recall_at_3 value: 16.365 - type: recall_at_5 value: 20.154 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 52.71 - type: f1 value: 47.74801556489574 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 73.405 - type: map_at_10 value: 82.822 - type: map_at_100 value: 83.042 - type: map_at_1000 value: 83.055 - type: map_at_3 value: 81.65299999999999 - type: map_at_5 value: 82.431 - type: mrr_at_1 value: 79.178 - type: mrr_at_10 value: 87.02 - type: mrr_at_100 value: 87.095 - type: mrr_at_1000 value: 87.09700000000001 - type: mrr_at_3 value: 86.309 - type: mrr_at_5 value: 86.824 - type: ndcg_at_1 value: 79.178 - type: ndcg_at_10 value: 86.72 - type: ndcg_at_100 value: 87.457 - type: ndcg_at_1000 value: 87.691 - type: ndcg_at_3 value: 84.974 - type: ndcg_at_5 value: 86.032 - type: precision_at_1 value: 79.178 - type: precision_at_10 value: 10.548 - type: precision_at_100 value: 1.113 - type: precision_at_1000 value: 0.11499999999999999 - type: precision_at_3 value: 32.848 - type: precision_at_5 value: 20.45 - type: recall_at_1 value: 73.405 - type: recall_at_10 value: 94.39699999999999 - type: recall_at_100 value: 97.219 - type: recall_at_1000 value: 98.675 - type: recall_at_3 value: 89.679 - type: recall_at_5 value: 92.392 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 22.651 - type: map_at_10 value: 36.886 - type: map_at_100 value: 38.811 - type: map_at_1000 value: 38.981 - type: map_at_3 value: 32.538 - type: map_at_5 value: 34.763 - type: mrr_at_1 value: 44.444 - type: mrr_at_10 value: 53.168000000000006 - type: mrr_at_100 value: 53.839000000000006 - type: mrr_at_1000 value: 53.869 - type: mrr_at_3 value: 50.54 - type: mrr_at_5 value: 52.068000000000005 - type: ndcg_at_1 value: 44.444 - type: ndcg_at_10 value: 44.994 - type: ndcg_at_100 value: 51.599 - type: ndcg_at_1000 value: 54.339999999999996 - type: ndcg_at_3 value: 41.372 - type: ndcg_at_5 value: 42.149 - type: precision_at_1 value: 44.444 - type: precision_at_10 value: 12.407 - type: precision_at_100 value: 1.9269999999999998 - type: precision_at_1000 value: 0.242 - type: precision_at_3 value: 27.726 - type: precision_at_5 value: 19.814999999999998 - type: recall_at_1 value: 22.651 - type: recall_at_10 value: 52.075 - type: recall_at_100 value: 76.51400000000001 - type: recall_at_1000 value: 92.852 - type: recall_at_3 value: 37.236000000000004 - type: recall_at_5 value: 43.175999999999995 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 40.777 - type: map_at_10 value: 66.79899999999999 - type: map_at_100 value: 67.65299999999999 - type: map_at_1000 value: 67.706 - type: map_at_3 value: 63.352 - type: map_at_5 value: 65.52900000000001 - type: mrr_at_1 value: 81.553 - type: mrr_at_10 value: 86.983 - type: mrr_at_100 value: 87.132 - type: mrr_at_1000 value: 87.136 - type: mrr_at_3 value: 86.156 - type: mrr_at_5 value: 86.726 - type: ndcg_at_1 value: 81.553 - type: ndcg_at_10 value: 74.64 - type: ndcg_at_100 value: 77.459 - type: ndcg_at_1000 value: 78.43 - type: ndcg_at_3 value: 69.878 - type: ndcg_at_5 value: 72.59400000000001 - type: precision_at_1 value: 81.553 - type: precision_at_10 value: 15.654000000000002 - type: precision_at_100 value: 1.783 - type: precision_at_1000 value: 0.191 - type: precision_at_3 value: 45.199 - type: precision_at_5 value: 29.267 - type: recall_at_1 value: 40.777 - type: recall_at_10 value: 78.271 - type: recall_at_100 value: 89.129 - type: recall_at_1000 value: 95.49 - type: recall_at_3 value: 67.79899999999999 - type: recall_at_5 value: 73.167 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 93.5064 - type: ap value: 90.25495114444111 - type: f1 value: 93.5012434973381 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 23.301 - type: map_at_10 value: 35.657 - type: map_at_100 value: 36.797000000000004 - type: map_at_1000 value: 36.844 - type: map_at_3 value: 31.743 - type: map_at_5 value: 34.003 - type: mrr_at_1 value: 23.854 - type: mrr_at_10 value: 36.242999999999995 - type: mrr_at_100 value: 37.32 - type: mrr_at_1000 value: 37.361 - type: mrr_at_3 value: 32.4 - type: mrr_at_5 value: 34.634 - type: ndcg_at_1 value: 23.868000000000002 - type: ndcg_at_10 value: 42.589 - type: ndcg_at_100 value: 48.031 - type: ndcg_at_1000 value: 49.189 - type: ndcg_at_3 value: 34.649 - type: ndcg_at_5 value: 38.676 - type: precision_at_1 value: 23.868000000000002 - type: precision_at_10 value: 6.6850000000000005 - type: precision_at_100 value: 0.9400000000000001 - type: precision_at_1000 value: 0.104 - type: precision_at_3 value: 14.651 - type: precision_at_5 value: 10.834000000000001 - type: recall_at_1 value: 23.301 - type: recall_at_10 value: 63.88700000000001 - type: recall_at_100 value: 88.947 - type: recall_at_1000 value: 97.783 - type: recall_at_3 value: 42.393 - type: recall_at_5 value: 52.036 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 94.64888280893753 - type: f1 value: 94.41310774203512 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 79.72184222526221 - type: f1 value: 61.522034067350106 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 79.60659045057163 - type: f1 value: 77.268649687049 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 81.83254875588432 - type: f1 value: 81.61520635919082 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 36.31529875009507 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 31.734233714415073 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 30.994501713009452 - type: mrr value: 32.13512850703073 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 6.603000000000001 - type: map_at_10 value: 13.767999999999999 - type: map_at_100 value: 17.197000000000003 - type: map_at_1000 value: 18.615000000000002 - type: map_at_3 value: 10.567 - type: map_at_5 value: 12.078999999999999 - type: mrr_at_1 value: 44.891999999999996 - type: mrr_at_10 value: 53.75299999999999 - type: mrr_at_100 value: 54.35 - type: mrr_at_1000 value: 54.388000000000005 - type: mrr_at_3 value: 51.495999999999995 - type: mrr_at_5 value: 52.688 - type: ndcg_at_1 value: 43.189 - type: ndcg_at_10 value: 34.567 - type: ndcg_at_100 value: 32.273 - type: ndcg_at_1000 value: 41.321999999999996 - type: ndcg_at_3 value: 40.171 - type: ndcg_at_5 value: 37.502 - type: precision_at_1 value: 44.582 - type: precision_at_10 value: 25.139 - type: precision_at_100 value: 7.739999999999999 - type: precision_at_1000 value: 2.054 - type: precision_at_3 value: 37.152 - type: precision_at_5 value: 31.826999999999998 - type: recall_at_1 value: 6.603000000000001 - type: recall_at_10 value: 17.023 - type: recall_at_100 value: 32.914 - type: recall_at_1000 value: 64.44800000000001 - type: recall_at_3 value: 11.457 - type: recall_at_5 value: 13.816 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 30.026000000000003 - type: map_at_10 value: 45.429 - type: map_at_100 value: 46.45 - type: map_at_1000 value: 46.478 - type: map_at_3 value: 41.147 - type: map_at_5 value: 43.627 - type: mrr_at_1 value: 33.951 - type: mrr_at_10 value: 47.953 - type: mrr_at_100 value: 48.731 - type: mrr_at_1000 value: 48.751 - type: mrr_at_3 value: 44.39 - type: mrr_at_5 value: 46.533 - type: ndcg_at_1 value: 33.951 - type: ndcg_at_10 value: 53.24100000000001 - type: ndcg_at_100 value: 57.599999999999994 - type: ndcg_at_1000 value: 58.270999999999994 - type: ndcg_at_3 value: 45.190999999999995 - type: ndcg_at_5 value: 49.339 - type: precision_at_1 value: 33.951 - type: precision_at_10 value: 8.856 - type: precision_at_100 value: 1.133 - type: precision_at_1000 value: 0.12 - type: precision_at_3 value: 20.713 - type: precision_at_5 value: 14.838000000000001 - type: recall_at_1 value: 30.026000000000003 - type: recall_at_10 value: 74.512 - type: recall_at_100 value: 93.395 - type: recall_at_1000 value: 98.402 - type: recall_at_3 value: 53.677 - type: recall_at_5 value: 63.198 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 71.41300000000001 - type: map_at_10 value: 85.387 - type: map_at_100 value: 86.027 - type: map_at_1000 value: 86.041 - type: map_at_3 value: 82.543 - type: map_at_5 value: 84.304 - type: mrr_at_1 value: 82.35 - type: mrr_at_10 value: 88.248 - type: mrr_at_100 value: 88.348 - type: mrr_at_1000 value: 88.349 - type: mrr_at_3 value: 87.348 - type: mrr_at_5 value: 87.96300000000001 - type: ndcg_at_1 value: 82.37 - type: ndcg_at_10 value: 88.98 - type: ndcg_at_100 value: 90.16499999999999 - type: ndcg_at_1000 value: 90.239 - type: ndcg_at_3 value: 86.34100000000001 - type: ndcg_at_5 value: 87.761 - type: precision_at_1 value: 82.37 - type: precision_at_10 value: 13.471 - type: precision_at_100 value: 1.534 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.827 - type: precision_at_5 value: 24.773999999999997 - type: recall_at_1 value: 71.41300000000001 - type: recall_at_10 value: 95.748 - type: recall_at_100 value: 99.69200000000001 - type: recall_at_1000 value: 99.98 - type: recall_at_3 value: 87.996 - type: recall_at_5 value: 92.142 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 56.96878497780007 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 65.31371347128074 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 5.287 - type: map_at_10 value: 13.530000000000001 - type: map_at_100 value: 15.891 - type: map_at_1000 value: 16.245 - type: map_at_3 value: 9.612 - type: map_at_5 value: 11.672 - type: mrr_at_1 value: 26 - type: mrr_at_10 value: 37.335 - type: mrr_at_100 value: 38.443 - type: mrr_at_1000 value: 38.486 - type: mrr_at_3 value: 33.783 - type: mrr_at_5 value: 36.028 - type: ndcg_at_1 value: 26 - type: ndcg_at_10 value: 22.215 - type: ndcg_at_100 value: 31.101 - type: ndcg_at_1000 value: 36.809 - type: ndcg_at_3 value: 21.104 - type: ndcg_at_5 value: 18.759999999999998 - type: precision_at_1 value: 26 - type: precision_at_10 value: 11.43 - type: precision_at_100 value: 2.424 - type: precision_at_1000 value: 0.379 - type: precision_at_3 value: 19.7 - type: precision_at_5 value: 16.619999999999997 - type: recall_at_1 value: 5.287 - type: recall_at_10 value: 23.18 - type: recall_at_100 value: 49.208 - type: recall_at_1000 value: 76.85300000000001 - type: recall_at_3 value: 11.991999999999999 - type: recall_at_5 value: 16.85 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 83.87834913790886 - type: cos_sim_spearman value: 81.04583513112122 - type: euclidean_pearson value: 81.20484174558065 - type: euclidean_spearman value: 80.76430832561769 - type: manhattan_pearson value: 81.21416730978615 - type: manhattan_spearman value: 80.7797637394211 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 86.56143998865157 - type: cos_sim_spearman value: 79.75387012744471 - type: euclidean_pearson value: 83.7877519997019 - type: euclidean_spearman value: 79.90489748003296 - type: manhattan_pearson value: 83.7540590666095 - type: manhattan_spearman value: 79.86434577931573 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 83.92102564177941 - type: cos_sim_spearman value: 84.98234585939103 - type: euclidean_pearson value: 84.47729567593696 - type: euclidean_spearman value: 85.09490696194469 - type: manhattan_pearson value: 84.38622951588229 - type: manhattan_spearman value: 85.02507171545574 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 80.1891164763377 - type: cos_sim_spearman value: 80.7997969966883 - type: euclidean_pearson value: 80.48572256162396 - type: euclidean_spearman value: 80.57851903536378 - type: manhattan_pearson value: 80.4324819433651 - type: manhattan_spearman value: 80.5074526239062 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 82.64319975116025 - type: cos_sim_spearman value: 84.88671197763652 - type: euclidean_pearson value: 84.74692193293231 - type: euclidean_spearman value: 85.27151722073653 - type: manhattan_pearson value: 84.72460516785438 - type: manhattan_spearman value: 85.26518899786687 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 83.24687565822381 - type: cos_sim_spearman value: 85.60418454111263 - type: euclidean_pearson value: 84.85829740169851 - type: euclidean_spearman value: 85.66378014138306 - type: manhattan_pearson value: 84.84672408808835 - type: manhattan_spearman value: 85.63331924364891 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 84.87758895415485 - type: cos_sim_spearman value: 85.8193745617297 - type: euclidean_pearson value: 85.78719118848134 - type: euclidean_spearman value: 84.35797575385688 - type: manhattan_pearson value: 85.97919844815692 - type: manhattan_spearman value: 84.58334745175151 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 67.27076035963599 - type: cos_sim_spearman value: 67.21433656439973 - type: euclidean_pearson value: 68.07434078679324 - type: euclidean_spearman value: 66.0249731719049 - type: manhattan_pearson value: 67.95495198947476 - type: manhattan_spearman value: 65.99893908331886 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 82.22437747056817 - type: cos_sim_spearman value: 85.0995685206174 - type: euclidean_pearson value: 84.08616925603394 - type: euclidean_spearman value: 84.89633925691658 - type: manhattan_pearson value: 84.08332675923133 - type: manhattan_spearman value: 84.8858228112915 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 87.6909022589666 - type: mrr value: 96.43341952165481 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 57.660999999999994 - type: map_at_10 value: 67.625 - type: map_at_100 value: 68.07600000000001 - type: map_at_1000 value: 68.10199999999999 - type: map_at_3 value: 64.50399999999999 - type: map_at_5 value: 66.281 - type: mrr_at_1 value: 61 - type: mrr_at_10 value: 68.953 - type: mrr_at_100 value: 69.327 - type: mrr_at_1000 value: 69.352 - type: mrr_at_3 value: 66.833 - type: mrr_at_5 value: 68.05 - type: ndcg_at_1 value: 61 - type: ndcg_at_10 value: 72.369 - type: ndcg_at_100 value: 74.237 - type: ndcg_at_1000 value: 74.939 - type: ndcg_at_3 value: 67.284 - type: ndcg_at_5 value: 69.72500000000001 - type: precision_at_1 value: 61 - type: precision_at_10 value: 9.733 - type: precision_at_100 value: 1.0670000000000002 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 26.222 - type: precision_at_5 value: 17.4 - type: recall_at_1 value: 57.660999999999994 - type: recall_at_10 value: 85.656 - type: recall_at_100 value: 93.833 - type: recall_at_1000 value: 99.333 - type: recall_at_3 value: 71.961 - type: recall_at_5 value: 78.094 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.86930693069307 - type: cos_sim_ap value: 96.76685487950894 - type: cos_sim_f1 value: 93.44587884806354 - type: cos_sim_precision value: 92.80078895463511 - type: cos_sim_recall value: 94.1 - type: dot_accuracy value: 99.54356435643564 - type: dot_ap value: 81.18659960405607 - type: dot_f1 value: 75.78008915304605 - type: dot_precision value: 75.07360157016683 - type: dot_recall value: 76.5 - type: euclidean_accuracy value: 99.87326732673267 - type: euclidean_ap value: 96.8102411908941 - type: euclidean_f1 value: 93.6127744510978 - type: euclidean_precision value: 93.42629482071713 - type: euclidean_recall value: 93.8 - type: manhattan_accuracy value: 99.87425742574257 - type: manhattan_ap value: 96.82857341435529 - type: manhattan_f1 value: 93.62129583124059 - type: manhattan_precision value: 94.04641775983855 - type: manhattan_recall value: 93.2 - type: max_accuracy value: 99.87425742574257 - type: max_ap value: 96.82857341435529 - type: max_f1 value: 93.62129583124059 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 65.92560972698926 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 34.92797240259008 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 55.244624045597654 - type: mrr value: 56.185303666921314 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 31.02491987312937 - type: cos_sim_spearman value: 32.055592206679734 - type: dot_pearson value: 24.731627575422557 - type: dot_spearman value: 24.308029077069733 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.231 - type: map_at_10 value: 1.899 - type: map_at_100 value: 9.498 - type: map_at_1000 value: 20.979999999999997 - type: map_at_3 value: 0.652 - type: map_at_5 value: 1.069 - type: mrr_at_1 value: 88 - type: mrr_at_10 value: 93.4 - type: mrr_at_100 value: 93.4 - type: mrr_at_1000 value: 93.4 - type: mrr_at_3 value: 93 - type: mrr_at_5 value: 93.4 - type: ndcg_at_1 value: 86 - type: ndcg_at_10 value: 75.375 - type: ndcg_at_100 value: 52.891999999999996 - type: ndcg_at_1000 value: 44.952999999999996 - type: ndcg_at_3 value: 81.05 - type: ndcg_at_5 value: 80.175 - type: precision_at_1 value: 88 - type: precision_at_10 value: 79 - type: precision_at_100 value: 53.16 - type: precision_at_1000 value: 19.408 - type: precision_at_3 value: 85.333 - type: precision_at_5 value: 84 - type: recall_at_1 value: 0.231 - type: recall_at_10 value: 2.078 - type: recall_at_100 value: 12.601 - type: recall_at_1000 value: 41.296 - type: recall_at_3 value: 0.6779999999999999 - type: recall_at_5 value: 1.1360000000000001 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 2.782 - type: map_at_10 value: 10.204 - type: map_at_100 value: 16.176 - type: map_at_1000 value: 17.456 - type: map_at_3 value: 5.354 - type: map_at_5 value: 7.503 - type: mrr_at_1 value: 40.816 - type: mrr_at_10 value: 54.010000000000005 - type: mrr_at_100 value: 54.49 - type: mrr_at_1000 value: 54.49 - type: mrr_at_3 value: 48.980000000000004 - type: mrr_at_5 value: 51.735 - type: ndcg_at_1 value: 36.735 - type: ndcg_at_10 value: 26.61 - type: ndcg_at_100 value: 36.967 - type: ndcg_at_1000 value: 47.274 - type: ndcg_at_3 value: 30.363 - type: ndcg_at_5 value: 29.448999999999998 - type: precision_at_1 value: 40.816 - type: precision_at_10 value: 23.878 - type: precision_at_100 value: 7.693999999999999 - type: precision_at_1000 value: 1.4489999999999998 - type: precision_at_3 value: 31.293 - type: precision_at_5 value: 29.796 - type: recall_at_1 value: 2.782 - type: recall_at_10 value: 16.485 - type: recall_at_100 value: 46.924 - type: recall_at_1000 value: 79.365 - type: recall_at_3 value: 6.52 - type: recall_at_5 value: 10.48 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 70.08300000000001 - type: ap value: 13.91559884590195 - type: f1 value: 53.956838444291364 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 59.34069043576683 - type: f1 value: 59.662041994618406 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 53.70780611078653 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 87.10734934732073 - type: cos_sim_ap value: 77.58349999516054 - type: cos_sim_f1 value: 70.25391395868965 - type: cos_sim_precision value: 70.06035161374967 - type: cos_sim_recall value: 70.44854881266491 - type: dot_accuracy value: 80.60439887941826 - type: dot_ap value: 54.52935200483575 - type: dot_f1 value: 54.170444242973716 - type: dot_precision value: 47.47715534366309 - type: dot_recall value: 63.06068601583114 - type: euclidean_accuracy value: 87.26828396018358 - type: euclidean_ap value: 78.00158454104036 - type: euclidean_f1 value: 70.70292457670601 - type: euclidean_precision value: 68.79680479281079 - type: euclidean_recall value: 72.71767810026385 - type: manhattan_accuracy value: 87.11330988853788 - type: manhattan_ap value: 77.92527099601855 - type: manhattan_f1 value: 70.76488706365502 - type: manhattan_precision value: 68.89055472263868 - type: manhattan_recall value: 72.74406332453826 - type: max_accuracy value: 87.26828396018358 - type: max_ap value: 78.00158454104036 - type: max_f1 value: 70.76488706365502 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 87.80804905499282 - type: cos_sim_ap value: 83.06187782630936 - type: cos_sim_f1 value: 74.99716435403985 - type: cos_sim_precision value: 73.67951860931579 - type: cos_sim_recall value: 76.36279642747151 - type: dot_accuracy value: 81.83141227151008 - type: dot_ap value: 67.18241090841795 - type: dot_f1 value: 62.216037571751606 - type: dot_precision value: 56.749381227391005 - type: dot_recall value: 68.84816753926701 - type: euclidean_accuracy value: 87.91671517832887 - type: euclidean_ap value: 83.56538942001427 - type: euclidean_f1 value: 75.7327253337256 - type: euclidean_precision value: 72.48856036606828 - type: euclidean_recall value: 79.28087465352634 - type: manhattan_accuracy value: 87.86626304963713 - type: manhattan_ap value: 83.52939841172832 - type: manhattan_f1 value: 75.73635656329888 - type: manhattan_precision value: 72.99150182103836 - type: manhattan_recall value: 78.69571912534647 - type: max_accuracy value: 87.91671517832887 - type: max_ap value: 83.56538942001427 - type: max_f1 value: 75.73635656329888 license: mit language: - en --- **Recommend switching to newest [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5), which has more reasonable similarity distribution and same method of usage.** <h1 align="center">FlagEmbedding</h1> <h4 align="center"> <p> <a href=#model-list>Model List</a> | <a href=#frequently-asked-questions>FAQ</a> | <a href=#usage>Usage</a> | <a href="#evaluation">Evaluation</a> | <a href="#train">Train</a> | <a href="#contact">Contact</a> | <a href="#citation">Citation</a> | <a href="#license">License</a> <p> </h4> More details please refer to our Github: [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding). [English](README.md) | [中文](https://github.com/FlagOpen/FlagEmbedding/blob/master/README_zh.md) FlagEmbedding can map any text to a low-dimensional dense vector which can be used for tasks like retrieval, classification, clustering, or semantic search. And it also can be used in vector databases for LLMs. ************* 🌟**Updates**🌟 ************* - 10/12/2023: Release [LLM-Embedder](./FlagEmbedding/llm_embedder/README.md), a unified embedding model to support diverse retrieval augmentation needs for LLMs. [Paper](https://arxiv.org/pdf/2310.07554.pdf) :fire: - 09/15/2023: The [technical report](https://arxiv.org/pdf/2309.07597.pdf) of BGE has been released - 09/15/2023: The [masive training data](https://data.baai.ac.cn/details/BAAI-MTP) of BGE has been released - 09/12/2023: New models: - **New reranker model**: release cross-encoder models `BAAI/bge-reranker-base` and `BAAI/bge-reranker-large`, which are more powerful than embedding model. We recommend to use/fine-tune them to re-rank top-k documents returned by embedding models. - **update embedding model**: release `bge-*-v1.5` embedding model to alleviate the issue of the similarity distribution, and enhance its retrieval ability without instruction. <details> <summary>More</summary> <!-- ### More --> - 09/07/2023: Update [fine-tune code](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md): Add script to mine hard negatives and support adding instruction during fine-tuning. - 08/09/2023: BGE Models are integrated into **Langchain**, you can use it like [this](#using-langchain); C-MTEB **leaderboard** is [available](https://huggingface.co/spaces/mteb/leaderboard). - 08/05/2023: Release base-scale and small-scale models, **best performance among the models of the same size 🤗** - 08/02/2023: Release `bge-large-*`(short for BAAI General Embedding) Models, **rank 1st on MTEB and C-MTEB benchmark!** :tada: :tada: - 08/01/2023: We release the [Chinese Massive Text Embedding Benchmark](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB) (**C-MTEB**), consisting of 31 test dataset. </details> ## Model List `bge` is short for `BAAI general embedding`. | Model | Language | | Description | query instruction for retrieval [1] | |:-------------------------------|:--------:| :--------:| :--------:|:--------:| | [BAAI/llm-embedder](https://huggingface.co/BAAI/llm-embedder) | English | [Inference](./FlagEmbedding/llm_embedder/README.md) [Fine-tune](./FlagEmbedding/llm_embedder/README.md) | a unified embedding model to support diverse retrieval augmentation needs for LLMs | See [README](./FlagEmbedding/llm_embedder/README.md) | | [BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | Chinese and English | [Inference](#usage-for-reranker) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker) | a cross-encoder model which is more accurate but less efficient [2] | | | [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | Chinese and English | [Inference](#usage-for-reranker) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker) | a cross-encoder model which is more accurate but less efficient [2] | | | [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-large-zh-v1.5](https://huggingface.co/BAAI/bge-large-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-base-zh-v1.5](https://huggingface.co/BAAI/bge-base-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-small-zh-v1.5](https://huggingface.co/BAAI/bge-small-zh-v1.5) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | version 1.5 with more reasonable similarity distribution | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-large-en](https://huggingface.co/BAAI/bge-large-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | :trophy: rank **1st** in [MTEB](https://huggingface.co/spaces/mteb/leaderboard) leaderboard | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-base-en](https://huggingface.co/BAAI/bge-base-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a base-scale model but with similar ability to `bge-large-en` | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-small-en](https://huggingface.co/BAAI/bge-small-en) | English | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) |a small-scale model but with competitive performance | `Represent this sentence for searching relevant passages: ` | | [BAAI/bge-large-zh](https://huggingface.co/BAAI/bge-large-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | :trophy: rank **1st** in [C-MTEB](https://github.com/FlagOpen/FlagEmbedding/tree/master/C_MTEB) benchmark | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-base-zh](https://huggingface.co/BAAI/bge-base-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a base-scale model but with similar ability to `bge-large-zh` | `为这个句子生成表示以用于检索相关文章:` | | [BAAI/bge-small-zh](https://huggingface.co/BAAI/bge-small-zh) | Chinese | [Inference](#usage-for-embedding-model) [Fine-tune](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) | a small-scale model but with competitive performance | `为这个句子生成表示以用于检索相关文章:` | [1\]: If you need to search the relevant passages to a query, we suggest to add the instruction to the query; in other cases, no instruction is needed, just use the original query directly. In all cases, **no instruction** needs to be added to passages. [2\]: Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. To balance the accuracy and time cost, cross-encoder is widely used to re-rank top-k documents retrieved by other simple models. For examples, use bge embedding model to retrieve top 100 relevant documents, and then use bge reranker to re-rank the top 100 document to get the final top-3 results. All models have been uploaded to Huggingface Hub, and you can see them at https://huggingface.co/BAAI. If you cannot open the Huggingface Hub, you also can download the models at https://model.baai.ac.cn/models . ## Frequently asked questions <details> <summary>1. How to fine-tune bge embedding model?</summary> <!-- ### How to fine-tune bge embedding model? --> Following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune) to prepare data and fine-tune your model. Some suggestions: - Mine hard negatives following this [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune#hard-negatives), which can improve the retrieval performance. - If you pre-train bge on your data, the pre-trained model cannot be directly used to calculate similarity, and it must be fine-tuned with contrastive learning before computing similarity. - If the accuracy of the fine-tuned model is still not high, it is recommended to use/fine-tune the cross-encoder model (bge-reranker) to re-rank top-k results. Hard negatives also are needed to fine-tune reranker. </details> <details> <summary>2. The similarity score between two dissimilar sentences is higher than 0.5</summary> <!-- ### The similarity score between two dissimilar sentences is higher than 0.5 --> **Suggest to use bge v1.5, which alleviates the issue of the similarity distribution.** Since we finetune the models by contrastive learning with a temperature of 0.01, the similarity distribution of the current BGE model is about in the interval \[0.6, 1\]. So a similarity score greater than 0.5 does not indicate that the two sentences are similar. For downstream tasks, such as passage retrieval or semantic similarity, **what matters is the relative order of the scores, not the absolute value.** If you need to filter similar sentences based on a similarity threshold, please select an appropriate similarity threshold based on the similarity distribution on your data (such as 0.8, 0.85, or even 0.9). </details> <details> <summary>3. When does the query instruction need to be used</summary> <!-- ### When does the query instruction need to be used --> For the `bge-*-v1.5`, we improve its retrieval ability when not using instruction. No instruction only has a slight degradation in retrieval performance compared with using instruction. So you can generate embedding without instruction in all cases for convenience. For a retrieval task that uses short queries to find long related documents, it is recommended to add instructions for these short queries. **The best method to decide whether to add instructions for queries is choosing the setting that achieves better performance on your task.** In all cases, the documents/passages do not need to add the instruction. </details> ## Usage ### Usage for Embedding Model Here are some examples for using `bge` models with [FlagEmbedding](#using-flagembedding), [Sentence-Transformers](#using-sentence-transformers), [Langchain](#using-langchain), or [Huggingface Transformers](#using-huggingface-transformers). #### Using FlagEmbedding ``` pip install -U FlagEmbedding ``` If it doesn't work for you, you can see [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md) for more methods to install FlagEmbedding. ```python from FlagEmbedding import FlagModel sentences_1 = ["样例数据-1", "样例数据-2"] sentences_2 = ["样例数据-3", "样例数据-4"] model = FlagModel('BAAI/bge-large-zh-v1.5', query_instruction_for_retrieval="为这个句子生成表示以用于检索相关文章:", use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation embeddings_1 = model.encode(sentences_1) embeddings_2 = model.encode(sentences_2) similarity = embeddings_1 @ embeddings_2.T print(similarity) # for s2p(short query to long passage) retrieval task, suggest to use encode_queries() which will automatically add the instruction to each query # corpus in retrieval task can still use encode() or encode_corpus(), since they don't need instruction queries = ['query_1', 'query_2'] passages = ["样例文档-1", "样例文档-2"] q_embeddings = model.encode_queries(queries) p_embeddings = model.encode(passages) scores = q_embeddings @ p_embeddings.T ``` For the value of the argument `query_instruction_for_retrieval`, see [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list). By default, FlagModel will use all available GPUs when encoding. Please set `os.environ["CUDA_VISIBLE_DEVICES"]` to select specific GPUs. You also can set `os.environ["CUDA_VISIBLE_DEVICES"]=""` to make all GPUs unavailable. #### Using Sentence-Transformers You can also use the `bge` models with [sentence-transformers](https://www.SBERT.net): ``` pip install -U sentence-transformers ``` ```python from sentence_transformers import SentenceTransformer sentences_1 = ["样例数据-1", "样例数据-2"] sentences_2 = ["样例数据-3", "样例数据-4"] model = SentenceTransformer('BAAI/bge-large-zh-v1.5') embeddings_1 = model.encode(sentences_1, normalize_embeddings=True) embeddings_2 = model.encode(sentences_2, normalize_embeddings=True) similarity = embeddings_1 @ embeddings_2.T print(similarity) ``` For s2p(short query to long passage) retrieval task, each short query should start with an instruction (instructions see [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master#model-list)). But the instruction is not needed for passages. ```python from sentence_transformers import SentenceTransformer queries = ['query_1', 'query_2'] passages = ["样例文档-1", "样例文档-2"] instruction = "为这个句子生成表示以用于检索相关文章:" model = SentenceTransformer('BAAI/bge-large-zh-v1.5') q_embeddings = model.encode([instruction+q for q in queries], normalize_embeddings=True) p_embeddings = model.encode(passages, normalize_embeddings=True) scores = q_embeddings @ p_embeddings.T ``` #### Using Langchain You can use `bge` in langchain like this: ```python from langchain.embeddings import HuggingFaceBgeEmbeddings model_name = "BAAI/bge-large-en-v1.5" model_kwargs = {'device': 'cuda'} encode_kwargs = {'normalize_embeddings': True} # set True to compute cosine similarity model = HuggingFaceBgeEmbeddings( model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs, query_instruction="为这个句子生成表示以用于检索相关文章:" ) model.query_instruction = "为这个句子生成表示以用于检索相关文章:" ``` #### Using HuggingFace Transformers With the transformers package, you can use the model like this: First, you pass your input through the transformer model, then you select the last hidden state of the first token (i.e., [CLS]) as the sentence embedding. ```python from transformers import AutoTokenizer, AutoModel import torch # Sentences we want sentence embeddings for sentences = ["样例数据-1", "样例数据-2"] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-large-zh-v1.5') model = AutoModel.from_pretrained('BAAI/bge-large-zh-v1.5') model.eval() # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # for s2p(short query to long passage) retrieval task, add an instruction to query (not add instruction for passages) # encoded_input = tokenizer([instruction + q for q in queries], padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, cls pooling. sentence_embeddings = model_output[0][:, 0] # normalize embeddings sentence_embeddings = torch.nn.functional.normalize(sentence_embeddings, p=2, dim=1) print("Sentence embeddings:", sentence_embeddings) ``` ### Usage for Reranker Different from embedding model, reranker uses question and document as input and directly output similarity instead of embedding. You can get a relevance score by inputting query and passage to the reranker. The reranker is optimized based cross-entropy loss, so the relevance score is not bounded to a specific range. #### Using FlagEmbedding ``` pip install -U FlagEmbedding ``` Get relevance scores (higher scores indicate more relevance): ```python from FlagEmbedding import FlagReranker reranker = FlagReranker('BAAI/bge-reranker-large', use_fp16=True) # Setting use_fp16 to True speeds up computation with a slight performance degradation score = reranker.compute_score(['query', 'passage']) print(score) scores = reranker.compute_score([['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']]) print(scores) ``` #### Using Huggingface transformers ```python import torch from transformers import AutoModelForSequenceClassification, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('BAAI/bge-reranker-large') model = AutoModelForSequenceClassification.from_pretrained('BAAI/bge-reranker-large') model.eval() pairs = [['what is panda?', 'hi'], ['what is panda?', 'The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China.']] with torch.no_grad(): inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512) scores = model(**inputs, return_dict=True).logits.view(-1, ).float() print(scores) ``` ## Evaluation `baai-general-embedding` models achieve **state-of-the-art performance on both MTEB and C-MTEB leaderboard!** For more details and evaluation tools see our [scripts](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md). - **MTEB**: | Model Name | Dimension | Sequence Length | Average (56) | Retrieval (15) |Clustering (11) | Pair Classification (3) | Reranking (4) | STS (10) | Summarization (1) | Classification (12) | |:----:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| | [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) | 1024 | 512 | **64.23** | **54.29** | 46.08 | 87.12 | 60.03 | 83.11 | 31.61 | 75.97 | | [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) | 768 | 512 | 63.55 | 53.25 | 45.77 | 86.55 | 58.86 | 82.4 | 31.07 | 75.53 | | [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) | 384 | 512 | 62.17 |51.68 | 43.82 | 84.92 | 58.36 | 81.59 | 30.12 | 74.14 | | [bge-large-en](https://huggingface.co/BAAI/bge-large-en) | 1024 | 512 | 63.98 | 53.9 | 46.98 | 85.8 | 59.48 | 81.56 | 32.06 | 76.21 | | [bge-base-en](https://huggingface.co/BAAI/bge-base-en) | 768 | 512 | 63.36 | 53.0 | 46.32 | 85.86 | 58.7 | 81.84 | 29.27 | 75.27 | | [gte-large](https://huggingface.co/thenlper/gte-large) | 1024 | 512 | 63.13 | 52.22 | 46.84 | 85.00 | 59.13 | 83.35 | 31.66 | 73.33 | | [gte-base](https://huggingface.co/thenlper/gte-base) | 768 | 512 | 62.39 | 51.14 | 46.2 | 84.57 | 58.61 | 82.3 | 31.17 | 73.01 | | [e5-large-v2](https://huggingface.co/intfloat/e5-large-v2) | 1024| 512 | 62.25 | 50.56 | 44.49 | 86.03 | 56.61 | 82.05 | 30.19 | 75.24 | | [bge-small-en](https://huggingface.co/BAAI/bge-small-en) | 384 | 512 | 62.11 | 51.82 | 44.31 | 83.78 | 57.97 | 80.72 | 30.53 | 74.37 | | [instructor-xl](https://huggingface.co/hkunlp/instructor-xl) | 768 | 512 | 61.79 | 49.26 | 44.74 | 86.62 | 57.29 | 83.06 | 32.32 | 61.79 | | [e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) | 768 | 512 | 61.5 | 50.29 | 43.80 | 85.73 | 55.91 | 81.05 | 30.28 | 73.84 | | [gte-small](https://huggingface.co/thenlper/gte-small) | 384 | 512 | 61.36 | 49.46 | 44.89 | 83.54 | 57.7 | 82.07 | 30.42 | 72.31 | | [text-embedding-ada-002](https://platform.openai.com/docs/guides/embeddings) | 1536 | 8192 | 60.99 | 49.25 | 45.9 | 84.89 | 56.32 | 80.97 | 30.8 | 70.93 | | [e5-small-v2](https://huggingface.co/intfloat/e5-base-v2) | 384 | 512 | 59.93 | 49.04 | 39.92 | 84.67 | 54.32 | 80.39 | 31.16 | 72.94 | | [sentence-t5-xxl](https://huggingface.co/sentence-transformers/sentence-t5-xxl) | 768 | 512 | 59.51 | 42.24 | 43.72 | 85.06 | 56.42 | 82.63 | 30.08 | 73.42 | | [all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) | 768 | 514 | 57.78 | 43.81 | 43.69 | 83.04 | 59.36 | 80.28 | 27.49 | 65.07 | | [sgpt-bloom-7b1-msmarco](https://huggingface.co/bigscience/sgpt-bloom-7b1-msmarco) | 4096 | 2048 | 57.59 | 48.22 | 38.93 | 81.9 | 55.65 | 77.74 | 33.6 | 66.19 | - **C-MTEB**: We create the benchmark C-MTEB for Chinese text embedding which consists of 31 datasets from 6 tasks. Please refer to [C_MTEB](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/README.md) for a detailed introduction. | Model | Embedding dimension | Avg | Retrieval | STS | PairClassification | Classification | Reranking | Clustering | |:-------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | [**BAAI/bge-large-zh-v1.5**](https://huggingface.co/BAAI/bge-large-zh-v1.5) | 1024 | **64.53** | 70.46 | 56.25 | 81.6 | 69.13 | 65.84 | 48.99 | | [BAAI/bge-base-zh-v1.5](https://huggingface.co/BAAI/bge-base-zh-v1.5) | 768 | 63.13 | 69.49 | 53.72 | 79.75 | 68.07 | 65.39 | 47.53 | | [BAAI/bge-small-zh-v1.5](https://huggingface.co/BAAI/bge-small-zh-v1.5) | 512 | 57.82 | 61.77 | 49.11 | 70.41 | 63.96 | 60.92 | 44.18 | | [BAAI/bge-large-zh](https://huggingface.co/BAAI/bge-large-zh) | 1024 | 64.20 | 71.53 | 54.98 | 78.94 | 68.32 | 65.11 | 48.39 | | [bge-large-zh-noinstruct](https://huggingface.co/BAAI/bge-large-zh-noinstruct) | 1024 | 63.53 | 70.55 | 53 | 76.77 | 68.58 | 64.91 | 50.01 | | [BAAI/bge-base-zh](https://huggingface.co/BAAI/bge-base-zh) | 768 | 62.96 | 69.53 | 54.12 | 77.5 | 67.07 | 64.91 | 47.63 | | [multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) | 1024 | 58.79 | 63.66 | 48.44 | 69.89 | 67.34 | 56.00 | 48.23 | | [BAAI/bge-small-zh](https://huggingface.co/BAAI/bge-small-zh) | 512 | 58.27 | 63.07 | 49.45 | 70.35 | 63.64 | 61.48 | 45.09 | | [m3e-base](https://huggingface.co/moka-ai/m3e-base) | 768 | 57.10 | 56.91 | 50.47 | 63.99 | 67.52 | 59.34 | 47.68 | | [m3e-large](https://huggingface.co/moka-ai/m3e-large) | 1024 | 57.05 | 54.75 | 50.42 | 64.3 | 68.2 | 59.66 | 48.88 | | [multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) | 768 | 55.48 | 61.63 | 46.49 | 67.07 | 65.35 | 54.35 | 40.68 | | [multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) | 384 | 55.38 | 59.95 | 45.27 | 66.45 | 65.85 | 53.86 | 45.26 | | [text-embedding-ada-002(OpenAI)](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings) | 1536 | 53.02 | 52.0 | 43.35 | 69.56 | 64.31 | 54.28 | 45.68 | | [luotuo](https://huggingface.co/silk-road/luotuo-bert-medium) | 1024 | 49.37 | 44.4 | 42.78 | 66.62 | 61 | 49.25 | 44.39 | | [text2vec-base](https://huggingface.co/shibing624/text2vec-base-chinese) | 768 | 47.63 | 38.79 | 43.41 | 67.41 | 62.19 | 49.45 | 37.66 | | [text2vec-large](https://huggingface.co/GanymedeNil/text2vec-large-chinese) | 1024 | 47.36 | 41.94 | 44.97 | 70.86 | 60.66 | 49.16 | 30.02 | - **Reranking**: See [C_MTEB](https://github.com/FlagOpen/FlagEmbedding/blob/master/C_MTEB/) for evaluation script. | Model | T2Reranking | T2RerankingZh2En\* | T2RerankingEn2Zh\* | MMarcoReranking | CMedQAv1 | CMedQAv2 | Avg | |:-------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| | text2vec-base-multilingual | 64.66 | 62.94 | 62.51 | 14.37 | 48.46 | 48.6 | 50.26 | | multilingual-e5-small | 65.62 | 60.94 | 56.41 | 29.91 | 67.26 | 66.54 | 57.78 | | multilingual-e5-large | 64.55 | 61.61 | 54.28 | 28.6 | 67.42 | 67.92 | 57.4 | | multilingual-e5-base | 64.21 | 62.13 | 54.68 | 29.5 | 66.23 | 66.98 | 57.29 | | m3e-base | 66.03 | 62.74 | 56.07 | 17.51 | 77.05 | 76.76 | 59.36 | | m3e-large | 66.13 | 62.72 | 56.1 | 16.46 | 77.76 | 78.27 | 59.57 | | bge-base-zh-v1.5 | 66.49 | 63.25 | 57.02 | 29.74 | 80.47 | 84.88 | 63.64 | | bge-large-zh-v1.5 | 65.74 | 63.39 | 57.03 | 28.74 | 83.45 | 85.44 | 63.97 | | [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | 67.28 | 63.95 | 60.45 | 35.46 | 81.26 | 84.1 | 65.42 | | [BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | 67.6 | 64.03 | 61.44 | 37.16 | 82.15 | 84.18 | 66.09 | \* : T2RerankingZh2En and T2RerankingEn2Zh are cross-language retrieval tasks ## Train ### BAAI Embedding We pre-train the models using [retromae](https://github.com/staoxiao/RetroMAE) and train them on large-scale pairs data using contrastive learning. **You can fine-tune the embedding model on your data following our [examples](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/finetune).** We also provide a [pre-train example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/pretrain). Note that the goal of pre-training is to reconstruct the text, and the pre-trained model cannot be used for similarity calculation directly, it needs to be fine-tuned. More training details for bge see [baai_general_embedding](https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/baai_general_embedding/README.md). ### BGE Reranker Cross-encoder will perform full-attention over the input pair, which is more accurate than embedding model (i.e., bi-encoder) but more time-consuming than embedding model. Therefore, it can be used to re-rank the top-k documents returned by embedding model. We train the cross-encoder on a multilingual pair data, The data format is the same as embedding model, so you can fine-tune it easily following our [example](https://github.com/FlagOpen/FlagEmbedding/tree/master/examples/reranker). More details please refer to [./FlagEmbedding/reranker/README.md](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker) ## Contact If you have any question or suggestion related to this project, feel free to open an issue or pull request. You also can email Shitao Xiao(stxiao@baai.ac.cn) and Zheng Liu(liuzheng@baai.ac.cn). ## Citation If you find this repository useful, please consider giving a star :star: and citation ``` @misc{bge_embedding, title={C-Pack: Packaged Resources To Advance General Chinese Embedding}, author={Shitao Xiao and Zheng Liu and Peitian Zhang and Niklas Muennighoff}, year={2023}, eprint={2309.07597}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` ## License FlagEmbedding is licensed under the [MIT License](https://github.com/FlagOpen/FlagEmbedding/blob/master/LICENSE). The released models can be used for commercial purposes free of charge.
HuggingFaceH4/zephyr-7b-alpha
HuggingFaceH4
"2023-11-21T17:28:11Z"
85,012
1,066
transformers
[ "transformers", "pytorch", "safetensors", "mistral", "text-generation", "generated_from_trainer", "conversational", "en", "dataset:stingning/ultrachat", "dataset:openbmb/UltraFeedback", "arxiv:2305.18290", "base_model:mistralai/Mistral-7B-v0.1", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-10-09T08:45:10Z"
--- tags: - generated_from_trainer model-index: - name: zephyr-7b-alpha results: [] license: mit datasets: - stingning/ultrachat - openbmb/UltraFeedback language: - en base_model: mistralai/Mistral-7B-v0.1 --- <!-- 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. --> <img src="https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha/resolve/main/thumbnail.png" alt="Zephyr Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/> # Model Card for Zephyr 7B Alpha Zephyr is a series of language models that are trained to act as helpful assistants. Zephyr-7B-α is the first model in the series, and is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) that was trained on on a mix of publicly available, synthetic datasets using [Direct Preference Optimization (DPO)](https://arxiv.org/abs/2305.18290). We found that removing the in-built alignment of these datasets boosted performance on [MT Bench](https://huggingface.co/spaces/lmsys/mt-bench) and made the model more helpful. However, this means that model is likely to generate problematic text when prompted to do so. ## Model description - **Model type:** A 7B parameter GPT-like model fine-tuned on a mix of publicly available, synthetic datasets. - **Language(s) (NLP):** Primarily English - **License:** MIT - **Finetuned from model:** [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) ### Model Sources <!-- Provide the basic links for the model. --> - **Repository:** https://github.com/huggingface/alignment-handbook - **Demo:** https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat ## Intended uses & limitations The model was initially fine-tuned on a variant of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT. We then further aligned the model with [🤗 TRL's](https://github.com/huggingface/trl) `DPOTrainer` on the [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback) dataset, which contain 64k prompts and model completions that are ranked by GPT-4. As a result, the model can be used for chat and you can check out our [demo](https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat) to test its capabilities. Here's how you can run the model using the `pipeline()` function from 🤗 Transformers: ```python # Install transformers from source - only needed for versions <= v4.34 # pip install git+https://github.com/huggingface/transformers.git # pip install accelerate import torch from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-alpha", torch_dtype=torch.bfloat16, device_map="auto") # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating messages = [ { "role": "system", "content": "You are a friendly chatbot who always responds in the style of a pirate", }, {"role": "user", "content": "How many helicopters can a human eat in one sitting?"}, ] prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"]) # <|system|> # You are a friendly chatbot who always responds in the style of a pirate.</s> # <|user|> # How many helicopters can a human eat in one sitting?</s> # <|assistant|> # Ah, me hearty matey! But yer question be a puzzler! A human cannot eat a helicopter in one sitting, as helicopters are not edible. They be made of metal, plastic, and other materials, not food! ``` ## Bias, Risks, and Limitations <!-- This section is meant to convey both technical and sociotechnical limitations. --> Zephyr-7B-α has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). It is also unknown what the size and composition of the corpus was used to train the base model (`mistralai/Mistral-7B-v0.1`), however it is likely to have included a mix of Web data and technical sources like books and code. See the [Falcon 180B model card](https://huggingface.co/tiiuae/falcon-180B#training-data) for an example of this. ## Training and evaluation data Zephyr 7B Alpha achieves the following results on the evaluation set: - Loss: 0.4605 - Rewards/chosen: -0.5053 - Rewards/rejected: -1.8752 - Rewards/accuracies: 0.7812 - Rewards/margins: 1.3699 - Logps/rejected: -327.4286 - Logps/chosen: -297.1040 - Logits/rejected: -2.7153 - Logits/chosen: -2.7447 ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-07 - train_batch_size: 2 - eval_batch_size: 4 - seed: 42 - distributed_type: multi-GPU - num_devices: 16 - total_train_batch_size: 32 - total_eval_batch_size: 64 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_ratio: 0.1 - num_epochs: 1 ### Training results | Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen | |:-------------:|:-----:|:----:|:---------------:|:--------------:|:----------------:|:------------------:|:---------------:|:--------------:|:------------:|:---------------:|:-------------:| | 0.5602 | 0.05 | 100 | 0.5589 | -0.3359 | -0.8168 | 0.7188 | 0.4809 | -306.2607 | -293.7161 | -2.6554 | -2.6797 | | 0.4852 | 0.1 | 200 | 0.5136 | -0.5310 | -1.4994 | 0.8125 | 0.9684 | -319.9124 | -297.6181 | -2.5762 | -2.5957 | | 0.5212 | 0.15 | 300 | 0.5168 | -0.1686 | -1.1760 | 0.7812 | 1.0074 | -313.4444 | -290.3699 | -2.6865 | -2.7125 | | 0.5496 | 0.21 | 400 | 0.4835 | -0.1617 | -1.7170 | 0.8281 | 1.5552 | -324.2635 | -290.2326 | -2.7947 | -2.8218 | | 0.5209 | 0.26 | 500 | 0.5054 | -0.4778 | -1.6604 | 0.7344 | 1.1826 | -323.1325 | -296.5546 | -2.8388 | -2.8667 | | 0.4617 | 0.31 | 600 | 0.4910 | -0.3738 | -1.5180 | 0.7656 | 1.1442 | -320.2848 | -294.4741 | -2.8234 | -2.8521 | | 0.4452 | 0.36 | 700 | 0.4838 | -0.4591 | -1.6576 | 0.7031 | 1.1986 | -323.0770 | -296.1796 | -2.7401 | -2.7653 | | 0.4674 | 0.41 | 800 | 0.5077 | -0.5692 | -1.8659 | 0.7656 | 1.2967 | -327.2416 | -298.3818 | -2.6740 | -2.6945 | | 0.4656 | 0.46 | 900 | 0.4927 | -0.5279 | -1.6614 | 0.7656 | 1.1335 | -323.1518 | -297.5553 | -2.7817 | -2.8015 | | 0.4102 | 0.52 | 1000 | 0.4772 | -0.5767 | -2.0667 | 0.7656 | 1.4900 | -331.2578 | -298.5311 | -2.7160 | -2.7455 | | 0.4663 | 0.57 | 1100 | 0.4740 | -0.8038 | -2.1018 | 0.7656 | 1.2980 | -331.9604 | -303.0741 | -2.6994 | -2.7257 | | 0.4737 | 0.62 | 1200 | 0.4716 | -0.3783 | -1.7015 | 0.7969 | 1.3232 | -323.9545 | -294.5634 | -2.6842 | -2.7135 | | 0.4259 | 0.67 | 1300 | 0.4866 | -0.6239 | -1.9703 | 0.7812 | 1.3464 | -329.3312 | -299.4761 | -2.7046 | -2.7356 | | 0.4935 | 0.72 | 1400 | 0.4747 | -0.5626 | -1.7600 | 0.7812 | 1.1974 | -325.1243 | -298.2491 | -2.7153 | -2.7444 | | 0.4211 | 0.77 | 1500 | 0.4645 | -0.6099 | -1.9993 | 0.7656 | 1.3894 | -329.9109 | -299.1959 | -2.6944 | -2.7236 | | 0.4931 | 0.83 | 1600 | 0.4684 | -0.6798 | -2.1082 | 0.7656 | 1.4285 | -332.0890 | -300.5934 | -2.7006 | -2.7305 | | 0.5029 | 0.88 | 1700 | 0.4595 | -0.5063 | -1.8951 | 0.7812 | 1.3889 | -327.8267 | -297.1233 | -2.7108 | -2.7403 | | 0.4965 | 0.93 | 1800 | 0.4613 | -0.5561 | -1.9079 | 0.7812 | 1.3518 | -328.0831 | -298.1203 | -2.7226 | -2.7523 | | 0.4337 | 0.98 | 1900 | 0.4608 | -0.5066 | -1.8718 | 0.7656 | 1.3652 | -327.3599 | -297.1296 | -2.7175 | -2.7469 | ### Framework versions - Transformers 4.34.0 - Pytorch 2.0.1+cu118 - Datasets 2.12.0 - Tokenizers 0.14.0
distil-whisper/distil-large-v3
distil-whisper
"2024-04-03T15:23:46Z"
84,987
79
transformers
[ "transformers", "jax", "tensorboard", "onnx", "safetensors", "whisper", "automatic-speech-recognition", "audio", "transformers.js", "en", "arxiv:2311.00430", "arxiv:2210.13352", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2024-03-21T12:10:42Z"
--- language: - en license: mit library_name: transformers tags: - audio - automatic-speech-recognition - transformers.js widget: - example_title: LibriSpeech sample 1 src: https://cdn-media.huggingface.co/speech_samples/sample1.flac - example_title: LibriSpeech sample 2 src: https://cdn-media.huggingface.co/speech_samples/sample2.flac pipeline_tag: automatic-speech-recognition --- # Distil-Whisper: distil-large-v3 Distil-Whisper was proposed in the paper [Robust Knowledge Distillation via Large-Scale Pseudo Labelling](https://arxiv.org/abs/2311.00430). This is the third and final installment of the Distil-Whisper English series. It the knowledge distilled version of OpenAI's [Whisper large-v3](https://huggingface.co/openai/whisper-large-v3), the latest and most performant Whisper model to date. Compared to previous Distil-Whisper models, the distillation procedure for distil-large-v3 has been adapted to give **superior long-form transcription accuracy** with OpenAI's **sequential long-form algorithm**. The result is a distilled model that performs to within 1% WER of large-v3 on long-form audio using both the sequential and chunked algorithms, and outperforms distil-large-v2 by 4.8% using the sequential algorithm. The model is also faster than previous Distil-Whisper models: **6.3x faster than large-v3**, and 1.1x faster than distil-large-v2. | Model | Params / M | Rel. Latency | Short-Form | Sequential Long-Form | Chunked Long-Form | |------------------------------------------------------------------------------|------------|--------------|------------|----------------------|-------------------| | [large-v3](https://huggingface.co/openai/whisper-large-v3) | 1550 | 1.0 | 8.4 | 10.0 | 11.0 | | **[distil-large-v3](https://huggingface.co/distil-whisper/distil-large-v3)** | **756** | **6.3** | **9.7** | **10.8** | **10.9** | | [distil-large-v2](https://huggingface.co/distil-whisper/distil-large-v2) | 756 | 5.8 | 10.1 | 15.6 | 11.6 | Since the sequential algorithm is the "de-facto" transcription algorithm across the most popular Whisper libraries (Whisper cpp, Faster-Whisper, OpenAI Whisper), this distilled model is designed to be compatible with these libraries. You can expect significant performance gains by switching from previous Distil-Whisper checkpoints to distil-large-v3 when using these libraries. For convenience, the weights for the most popular libraries are already converted, with instructions for getting started below. ## Table of Contents 1. [Transformers Usage](#transformers-usage) * [Short-Form Transcription](#short-form-transcription) * [Sequential Long-Form](#sequential-long-form) * [Chunked Long-Form](#chunked-long-form) * [Speculative Decoding](#speculative-decoding) * [Additional Speed and Memory Improvements](#additional-speed--memory-improvements) 2. [Library Integrations](#library-integrations) * [Whisper cpp](#whispercpp) * [Faster Whisper](#faster-whisper) * [OpenAI Whisper](#openai-whisper) * [Transformers.js](#transformersjs) * [Candle](#candle) 3. [Model Details](#model-details) 4. [License](#license) ## Transformers Usage distil-large-v3 is supported in the Hugging Face 🤗 Transformers library from version 4.39 onwards. To run the model, first install the latest version of Transformers. For this example, we'll also install 🤗 Datasets to load a toy audio dataset from the Hugging Face Hub: ```bash pip install --upgrade pip pip install --upgrade transformers accelerate datasets[audio] ``` ### Short-Form Transcription The model can be used with the [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline) class to transcribe short-form audio files (< 30-seconds) as follows: ```python import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline from datasets import load_dataset device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 model_id = "distil-whisper/distil-large-v3" model = AutoModelForSpeechSeq2Seq.from_pretrained( model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) model.to(device) processor = AutoProcessor.from_pretrained(model_id) pipe = pipeline( "automatic-speech-recognition", model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor, max_new_tokens=128, torch_dtype=torch_dtype, device=device, ) dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") sample = dataset[0]["audio"] result = pipe(sample) print(result["text"]) ``` To transcribe a local audio file, simply pass the path to your audio file when you call the pipeline: ```diff - result = pipe(sample) + result = pipe("audio.mp3") ``` For segment-level timestamps, pass the argument `return_timestamps=True` and return the `"chunks"` output: ```python result = pipe(sample, return_timestamps=True) print(result["chunks"]) ``` <details> <summary> For more control over the generation parameters, use the model + processor API directly: </summary> Ad-hoc generation arguments can be passed to `model.generate`, including `num_beams` for beam-search, `return_timestamps` for segment-level timestamps, and `prompt_ids` for prompting. See the [docstrings](https://huggingface.co/docs/transformers/en/model_doc/whisper#transformers.WhisperForConditionalGeneration.generate) for more details. ```python import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor from datasets import Audio, load_dataset device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 model_id = "distil-whisper/distil-large-v3" model = AutoModelForSpeechSeq2Seq.from_pretrained( model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) model.to(device) processor = AutoProcessor.from_pretrained(model_id) dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") dataset = dataset.cast_column("audio", Audio(processor.feature_extractor.sampling_rate)) sample = dataset[0]["audio"] input_features = processor( sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt" ).input_features input_features = input_features.to(device, dtype=torch_dtype) gen_kwargs = { "max_new_tokens": 128, "num_beams": 1, "return_timestamps": False, } pred_ids = model.generate(input_features, **gen_kwargs) pred_text = processor.batch_decode(pred_ids, skip_special_tokens=True, decode_with_timestamps=gen_kwargs["return_timestamps"]) print(pred_text) ``` </details> ### Sequential Long-Form Unlike previous Distil-Whisper releases, distil-large-v3 is specifically designed to be compatible with OpenAI's sequential long-form transcription algorithm. This algorithm uses a sliding window for buffered inference of long audio files (> 30-seconds), and returns more accurate transcriptions compared to the [chunked long-form algorithm](#chunked-long-form). The sequential long-form algorithm should be used in either of the following scenarios: 1. Transcription accuracy is the most important factor, and latency is less of a consideration 2. You are transcribing **batches** of long audio files, in which case the latency of sequential is comparable to chunked, while being up to 0.5% WER more accurate If you are transcribing single long audio files and latency is the most important factor, you should use the chunked algorithm described [below](#chunked-long-form). For a detailed explanation of the different algorithms, refer to Sections 5 of the [Distil-Whisper paper](https://arxiv.org/pdf/2311.00430.pdf). The [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline) class can be used to transcribe long audio files with the sequential algorithm as follows: ```python import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline from datasets import load_dataset device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 model_id = "distil-whisper/distil-large-v3" model = AutoModelForSpeechSeq2Seq.from_pretrained( model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) model.to(device) processor = AutoProcessor.from_pretrained(model_id) pipe = pipeline( "automatic-speech-recognition", model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor, max_new_tokens=128, torch_dtype=torch_dtype, device=device, ) dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation") sample = dataset[0]["audio"] result = pipe(sample) print(result["text"]) ``` <details> <summary> For more control over the generation parameters, use the model + processor API directly: </summary> ```python import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor from datasets import Audio, load_dataset device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 model_id = "distil-whisper/distil-large-v3" model = AutoModelForSpeechSeq2Seq.from_pretrained( model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) model.to(device) processor = AutoProcessor.from_pretrained(model_id) dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") dataset = dataset.cast_column("audio", Audio(processor.feature_extractor.sampling_rate)) sample = dataset[0]["audio"] inputs = processor( sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt", truncation=False, padding="longest", return_attention_mask=True, ) inputs = inputs.to(device, dtype=torch_dtype) gen_kwargs = { "max_new_tokens": 448, "num_beams": 1, "condition_on_prev_tokens": False, "compression_ratio_threshold": 1.35, # zlib compression ratio threshold (in token space) "temperature": (0.0, 0.2, 0.4, 0.6, 0.8, 1.0), "logprob_threshold": -1.0, "no_speech_threshold": 0.6, "return_timestamps": True, } pred_ids = model.generate(**i nputs, **gen_kwargs) pred_text = processor.batch_decode(pred_ids, skip_special_tokens=True, decode_with_timestamps=False) print(pred_text) ``` </details> ### Chunked Long-Form distil-large-v3 remains compatible with the Transformers chunked long-form algorithm. This algorithm should be used when a single large audio file is being transcribed and the fastest possible inference is required. In such circumstances, the chunked algorithm is up to 9x faster than OpenAI's sequential long-form implementation (see Table 7 of the [Distil-Whisper paper](https://arxiv.org/pdf/2311.00430.pdf)). To enable chunking, pass the `chunk_length_s` parameter to the `pipeline`. For distil-large-v3, a chunk length of 25-seconds is optimal. To activate batching over long audio files, pass the argument `batch_size`: ```python import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline from datasets import load_dataset device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 model_id = "distil-whisper/distil-large-v3" model = AutoModelForSpeechSeq2Seq.from_pretrained( model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) model.to(device) processor = AutoProcessor.from_pretrained(model_id) pipe = pipeline( "automatic-speech-recognition", model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor, max_new_tokens=128, chunk_length_s=25, batch_size=16, torch_dtype=torch_dtype, device=device, ) dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation") sample = dataset[0]["audio"] result = pipe(sample) print(result["text"]) ``` ### Speculative Decoding distil-large-v3 is the first Distil-Whisper model that can be used as an assistant to Whisper large-v3 for [speculative decoding](https://huggingface.co/blog/whisper-speculative-decoding). Speculative decoding mathematically ensures that exactly the same outputs as Whisper are obtained, while being 2 times faster. This makes it the perfect drop-in replacement for existing Whisper pipelines, since the same outputs are guaranteed. In the following code-snippet, we load the assistant Distil-Whisper model standalone to the main Whisper pipeline. We then specify it as the "assistant model" for generation: ```python from transformers import pipeline, AutoModelForCausalLM, AutoModelForSpeechSeq2Seq, AutoProcessor import torch from datasets import load_dataset device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 assistant_model_id = "distil-whisper/distil-large-v3" assistant_model = AutoModelForCausalLM.from_pretrained( assistant_model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) assistant_model.to(device) model_id = "openai/whisper-large-v3" model = AutoModelForSpeechSeq2Seq.from_pretrained( model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True ) model.to(device) processor = AutoProcessor.from_pretrained(model_id) pipe = pipeline( "automatic-speech-recognition", model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor, max_new_tokens=128, generate_kwargs={"assistant_model": assistant_model}, torch_dtype=torch_dtype, device=device, ) dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") sample = dataset[0]["audio"] result = pipe(sample) print(result["text"]) ``` For more details on speculative decoding, refer to the blog post [Speculative Decoding for 2x Faster Whisper Inference](https://huggingface.co/blog/whisper-speculative-decoding). ### Additional Speed & Memory Improvements You can apply additional speed and memory improvements to Distil-Whisper to further reduce the inference speed and VRAM requirements. These optimisations primarily target the attention kernel, swapping it from an eager implementation to a more efficient flash attention version. #### Flash Attention 2 We recommend using [Flash-Attention 2](https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#flashattention-2) if your GPU allows for it. To do so, you first need to install [Flash Attention](https://github.com/Dao-AILab/flash-attention): ``` pip install flash-attn --no-build-isolation ``` Then pass `attn_implementation="flash_attention_2"` to `from_pretrained`: ```diff - model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True) + model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True, attn_implementation="flash_attention_2") ``` #### Torch Scale-Product-Attention (SDPA) If your GPU does not support Flash Attention, we recommend making use of PyTorch [scaled dot-product attention (SDPA)](https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html). This attention implementation is activated **by default** for PyTorch versions 2.1.1 or greater. To check whether you have a compatible PyTorch version, run the following Python code snippet: ```python from transformers.utils import is_torch_sdpa_available print(is_torch_sdpa_available()) ``` If the above returns `True`, you have a valid version of PyTorch installed and SDPA is activated by default. If it returns `False`, you need to upgrade your PyTorch version according to the [official instructions](https://pytorch.org/get-started/locally/) Once a valid PyTorch version is installed, SDPA is activated by default. It can also be set explicitly by specifying `attn_implementation="sdpa"` as follows: ```diff - model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True) + model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True, attn_implementation="sdpa") ``` #### Torch compile Coming soon... #### 4-bit and 8-bit Inference Coming soon... ## Library Integrations ### Whisper.cpp Distil-Whisper can be run with the [Whisper.cpp](https://github.com/ggerganov/whisper.cpp) package with the original sequential long-form transcription algorithm. In a provisional benchmark on Mac M1, distil-large-v3 is over 5x faster than Whisper large-v3, while performing to within 0.8% WER over long-form audio. Steps for getting started: 1. Clone the Whisper.cpp repository: ``` git clone https://github.com/ggerganov/whisper.cpp.git cd whisper.cpp ``` 2. Install the Hugging Face Hub Python package: ```bash pip install --upgrade huggingface_hub ``` And download the GGML weights for distil-large-v3 using the following Python snippet: ```python from huggingface_hub import hf_hub_download hf_hub_download(repo_id='distil-whisper/distil-large-v3-ggml', filename='ggml-distil-large-v3.bin', local_dir='./models') ``` Note that if you do not have a Python environment set-up, you can also download the weights directly with `wget`: ```bash wget https://huggingface.co/distil-whisper/distil-large-v3-ggml/resolve/main/ggml-distil-large-v3.bin -P ./models ``` 3. Run inference using the provided sample audio: ```bash make -j && ./main -m models/ggml-distil-large-v3.bin -f samples/jfk.wav ``` ### Faster-Whisper Faster-Whisper is a reimplementation of Whisper using [CTranslate2](https://github.com/OpenNMT/CTranslate2/), a fast inference engine for Transformer models. First, install the Faster-Whisper package according to the [official instructions](https://github.com/SYSTRAN/faster-whisper#installation). For this example, we'll also install 🤗 Datasets to load a toy audio dataset from the Hugging Face Hub: ```bash pip install --upgrade pip pip install --upgrade git+https://github.com/SYSTRAN/faster-whisper datasets[audio] ``` The following code snippet loads the distil-large-v3 model and runs inference on an example file from the LibriSpeech ASR dataset: ```python import torch from faster_whisper import WhisperModel from datasets import load_dataset # define our torch configuration device = "cuda:0" if torch.cuda.is_available() else "cpu" compute_type = "float16" if torch.cuda.is_available() else "float32" # load model on GPU if available, else cpu model = WhisperModel("distil-large-v3", device=device, compute_type=compute_type) # load toy dataset for example dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") sample = dataset[1]["audio"]["path"] segments, info = model.transcribe(sample, beam_size=1) for segment in segments: print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text)) ``` To transcribe a local audio file, simply pass the path to the audio file as the `audio` argument to transcribe: ```python segments, info = model.transcribe("audio.mp3", beam_size=1) ``` ### OpenAI Whisper To use the model in the original Whisper format, first ensure you have the [`openai-whisper`](https://pypi.org/project/openai-whisper/) package installed. For this example, we'll also install 🤗 Datasets to load a toy audio dataset from the Hugging Face Hub: ```bash pip install --upgrade pip pip install --upgrade openai-whisper datasets[audio] ``` The following code-snippet demonstrates how to transcribe a sample file from the LibriSpeech dataset loaded using 🤗 Datasets: ```python from huggingface_hub import hf_hub_download from datasets import load_dataset from whisper import load_model, transcribe model_path = hf_hub_download(repo_id="distil-whisper/distil-large-v3-openai", filename="model.bin") model = load_model(model_path) dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") sample = dataset[0]["audio"]["path"] pred_out = transcribe(model, audio=sample, language="en") print(pred_out["text"]) ``` Note that the model weights will be downloaded and saved to your cache the first time you run the example. Subsequently, you can re-use the same example, and the weights will be loaded directly from your cache without having to download them again. To transcribe a local audio file, simply pass the path to the audio file as the `audio` argument to transcribe: ```python pred_out = transcribe(model, audio=sample, language="en") ``` The Distil-Whisper model can also be used with the OpenAI Whisper CLI. Refer to the [following instructions](https://huggingface.co/distil-whisper/distil-large-v3-openai#cli-usage) for details. ### Transformers.js Distil-Whisper can be run completely in your web browser with [Transformers.js](http://github.com/xenova/transformers.js): 1. Install Transformers.js from [NPM](https://www.npmjs.com/package/@xenova/transformers): ```bash npm i @xenova/transformers ``` 2. Import the library and perform inference with the pipeline API. ```js import { pipeline } from '@xenova/transformers'; const transcriber = await pipeline('automatic-speech-recognition', 'distil-whisper/distil-large-v3'); const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav'; const output = await transcriber(url); // { text: " And so, my fellow Americans, ask not what your country can do for you. Ask what you can do for your country." } ``` Check out the online [Distil-Whisper Web Demo](https://huggingface.co/spaces/Xenova/distil-whisper-web) to try it out yourself. As you'll see, it runs locally in your browser: no server required! Refer to the Transformers.js [docs](https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.AutomaticSpeechRecognitionPipeline) for further information. ### Candle Through an integration with Hugging Face [Candle](https://github.com/huggingface/candle/tree/main) 🕯️, Distil-Whisper is available in the Rust library 🦀 Benefit from: * Optimised CPU backend with optional MKL support for Linux x86 and Accelerate for Macs * Metal support for efficiently running on Macs * CUDA backend for efficiently running on GPUs, multiple GPU distribution via NCCL * WASM support: run Distil-Whisper in a browser Steps for getting started: 1. Install [`candle-core`](https://github.com/huggingface/candle/tree/main/candle-core) as explained [here](https://huggingface.github.io/candle/guide/installation.html) 2. Clone the `candle` repository locally: ``` git clone https://github.com/huggingface/candle.git ``` 3. Enter the example directory for [Whisper](https://github.com/huggingface/candle/tree/main/candle-examples/examples/whisper): ``` cd candle/candle-examples/examples/whisper ``` 4. Run an example: ``` cargo run --example whisper --release --features symphonia -- --model distil-large-v3 ``` 5. To specify your own audio file, add the `--input` flag: ``` cargo run --example whisper --release --features symphonia -- --model distil-large-v3 --input audio.wav ``` **Tip:** for compiling using Apple Metal, specify the `metal` feature when you run the example: ``` cargo run --example whisper --release --features="symphonia,metal" -- --model distil-large-v3 ``` Note that if you encounter the error: ``` error: target `whisper` in package `candle-examples` requires the features: `symphonia` Consider enabling them by passing, e.g., `--features="symphonia"` ``` You should clean your `cargo` installation: ``` cargo clean ``` And subsequently recompile: ``` cargo run --example whisper --release --features symphonia -- --model distil-large-v3 ``` ## Model Details Distil-Whisper inherits the encoder-decoder architecture from Whisper. The encoder maps a sequence of speech vector inputs to a sequence of hidden-state vectors. The decoder auto-regressively predicts text tokens, conditional on all previous tokens and the encoder hidden-states. Consequently, the encoder is only run forward once, whereas the decoder is run as many times as the number of tokens generated. In practice, this means the decoder accounts for over 90% of total inference time. Thus, to optimise for latency, the focus is on minimising the inference time of the decoder. To distill the Whisper model, we reduce the number of decoder layers while keeping the encoder fixed. The encoder (shown in green) is entirely copied from the teacher to the student and frozen during training. The student's decoder consists of a subset of the teacher decoder layers, which are intialised from maximally spaced layers. The model is then trained on a weighted sum of the KL divergence and pseudo-label loss terms. <p align="center"> <img src="https://huggingface.co/datasets/distil-whisper/figures/resolve/main/architecture.png?raw=true" width="600"/> </p> ## Differences with distil-large-v2 Compared to previous version of Distil-Whisper, distil-large-v3 is specifically designed to target the OpenAI sequential long-form transcription algorithm. There are no architectural differences compared to distil-large-v2, other than the fact the model layers are intialised from the latest large-v3 model rather than the older large-v2 one. The differences lie in the way the model was trained. Previous Distil-Whisper models were trained on a mean input length of 7-seconds, whereas the original Whisper models were pre-trained on 30-second inputs. During distillation, we shift the distribution of the model weights to the distribution of our training data. If our training data contains shorter utterances (e.g. on average 7-seconds audio instead of 30-seconds), then the predicted distribution shifts to this shorter context length. At inference time, the optimal context window for distil-large-v2 was an interpolation of these two values: 15-seconds. Beyond this time, the predictions for the distil-large-v2 model were largely inaccurate, particularly for the timestamp predictions. However, the sequential long-form algorithm uses 30-second sliding windows for inference, with the window shifted according to the last predicted timestamp. Since the last timestamp typically occurs after the 15-second mark, it was predicted with low accuracy, causing the long-form transcription to often fail. To preserve Whisper's ability to transcribe sliding 30-second windows, as is done with sequential decoding, we need to ensure the context length of distil-large-v3 is also 30-seconds. This was primarily achieved with four strategies: 1. **Packing the audio samples in the training dataset to 30-seconds:** since the model is both pre-trained and distilled on audio data packed to 30-seconds, distil-large-v3 now operates on the same ideal context window as Whisper, predicting accurate timestamps up to and including 30-seconds. 2. **Freezing the decoder input embeddings:** we use the same input embeds representation as the original model, which is designed to handle longer context lengths than previous Distil-Whisper iterations. 3. **Using a longer maximum context length during training:** instead of training on a maximum target length of 128, we train on a maximum of 256. This helps distil-large-v3 transcribe 30-second segments where the number of tokens possibly exceeds 128. 4. **Appending prompt conditioning to 50% of the training samples:** enables the model to be used with the `condition_on_prev_tokens` argument, and context windows up to 448 tokens. There were further tricks that were employed to improve the performance of distil-large-v3 under the sequential decoding algorithm, which we be explained fully in an upcoming blog post. ## Evaluation The following code-snippets demonstrates how to evaluate the Distil-Whisper model on the LibriSpeech validation-clean dataset with [streaming mode](https://huggingface.co/blog/audio-datasets#streaming-mode-the-silver-bullet), meaning no audio data has to be downloaded to your local device. First, we need to install the required packages, including 🤗 Datasets to stream and load the audio data, and 🤗 Evaluate to perform the WER calculation: ```bash pip install --upgrade pip pip install --upgrade transformers datasets[audio] evaluate jiwer ``` Evaluation can then be run end-to-end with the following example: ```python from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor from datasets import load_dataset from evaluate import load import torch from tqdm import tqdm # define our torch configuration device = "cuda:0" if torch.cuda.is_available() else "cpu" torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32 model_id = "distil-whisper/distil-large-v3" # load the model + processor model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id, torch_dtype=torch_dtype, use_safetensors=True, low_cpu_mem_usage=True) model = model.to(device) processor = AutoProcessor.from_pretrained(model_id) # load the dataset with streaming mode dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # define the evaluation metric wer_metric = load("wer") def inference(batch): # 1. Pre-process the audio data to log-mel spectrogram inputs audio = [sample["array"] for sample in batch["audio"]] input_features = processor(audio, sampling_rate=batch["audio"][0]["sampling_rate"], return_tensors="pt").input_features input_features = input_features.to(device, dtype=torch_dtype) # 2. Auto-regressively generate the predicted token ids pred_ids = model.generate(input_features, max_new_tokens=128) # 3. Decode the token ids to the final transcription batch["transcription"] = processor.batch_decode(pred_ids, skip_special_tokens=True) batch["reference"] = batch["text"] return batch # batch size 16 inference dataset = dataset.map(function=inference, batched=True, batch_size=16) all_transcriptions = [] all_references = [] # iterate over the dataset and run inference for result in tqdm(dataset, desc="Evaluating..."): all_transcriptions.append(result["transcription"]) all_references.append(result["reference"]) # normalize predictions and references all_transcriptions = [processor.normalize(transcription) for transcription in all_transcriptions] all_references = [processor.normalize(reference) for reference in all_references] # compute the WER metric wer = 100 * wer_metric.compute(predictions=all_transcriptions, references=all_references) print(wer) ``` **Print Output:** ``` 2.428920763531516 ``` ## Intended Use Distil-Whisper is intended to be a drop-in replacement for Whisper large-v3 on English speech recognition. In particular, it achieves comparable WER results over out-of-distribution (OOD) test data, while being 6x faster on both short and long-form audio. ## Data Distil-Whisper is trained on 22,000 hours of audio data from nine open-source, permissively licensed speech datasets on the Hugging Face Hub: | Dataset | Size / h | Speakers | Domain | Licence | |-----------------------------------------------------------------------------------------|----------|----------|-----------------------------|-----------------| | [People's Speech](https://huggingface.co/datasets/MLCommons/peoples_speech) | 12,000 | unknown | Internet Archive | CC-BY-SA-4.0 | | [Common Voice 13](https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0) | 3,000 | unknown | Narrated Wikipedia | CC0-1.0 | | [GigaSpeech](https://huggingface.co/datasets/speechcolab/gigaspeech) | 2,500 | unknown | Audiobook, podcast, YouTube | apache-2.0 | | Fisher | 1,960 | 11,900 | Telephone conversations | LDC | | [LibriSpeech](https://huggingface.co/datasets/librispeech_asr) | 960 | 2,480 | Audiobooks | CC-BY-4.0 | | [VoxPopuli](https://huggingface.co/datasets/facebook/voxpopuli) | 540 | 1,310 | European Parliament | CC0 | | [TED-LIUM](https://huggingface.co/datasets/LIUM/tedlium) | 450 | 2,030 | TED talks | CC-BY-NC-ND 3.0 | | SwitchBoard | 260 | 540 | Telephone conversations | LDC | | [AMI](https://huggingface.co/datasets/edinburghcstr/ami) | 100 | unknown | Meetings | CC-BY-4.0 | |||||| | **Total** | 21,770 | 18,260+ | | | The combined dataset spans 10 distinct domains and over 50k speakers. The diversity of this dataset is crucial to ensuring the distilled model is robust to audio distributions and noise. The audio data is then pseudo-labelled using the Whisper large-v3 model: we use Whisper to generate predictions for all the audio in our training set and use these as the target labels during training. Using pseudo-labels ensures that the transcriptions are consistently formatted across datasets and provides sequence-level distillation signal during training. ## WER Filter The Whisper pseudo-label predictions are subject to mis-transcriptions and hallucinations. To ensure we only train on accurate pseudo-labels, we employ a simple WER heuristic during training. First, we normalise the Whisper pseudo-labels and the ground truth labels provided by each dataset. We then compute the WER between these labels. If the WER exceeds a specified threshold, we discard the training example. Otherwise, we keep it for training. Section 9.2 of the [Distil-Whisper paper](https://arxiv.org/abs/2311.00430) demonstrates the effectiveness of this filter for improving downstream performance of the distilled model. We also partially attribute Distil-Whisper's robustness to hallucinations to this filter. ## Training The model was trained for 80,000 optimisation steps (or 11 epochs) with batch size 256. The Tensorboard training logs can be found under: https://huggingface.co/distil-whisper/distil-large-v3/tensorboard?params=scalars#frame ## Results The distilled model performs to within 1.5% WER of Whisper large-v3 on out-of-distribution (OOD) short-form audio, within 1% WER on sequential long-form decoding, and outperforms large-v3 by 0.1% on chunked long-form. This performance gain is attributed to lower hallucinations. For a detailed per-dataset breakdown of the evaluation results, refer to Tables 16 and 17 of the [Distil-Whisper paper](https://arxiv.org/abs/2311.00430) Distil-Whisper is also evaluated on the [ESB benchmark](https://arxiv.org/abs/2210.13352) datasets as part of the [OpenASR leaderboard](https://huggingface.co/spaces/hf-audio/open_asr_leaderboard), where it performs to within 0.2% WER of Whisper. ## Reproducing Distil-Whisper Training and evaluation code to reproduce Distil-Whisper is available under the Distil-Whisper repository: https://github.com/huggingface/distil-whisper/tree/main/training This code will shortly be updated to include the training updates described in the section [Differences with distil-large-v2](#differences-with-distil-large-v2). ## License Distil-Whisper inherits the [MIT license](https://github.com/huggingface/distil-whisper/blob/main/LICENSE) from OpenAI's Whisper model. ## Citation If you use this model, please consider citing the [Distil-Whisper paper](https://arxiv.org/abs/2311.00430): ``` @misc{gandhi2023distilwhisper, title={Distil-Whisper: Robust Knowledge Distillation via Large-Scale Pseudo Labelling}, author={Sanchit Gandhi and Patrick von Platen and Alexander M. Rush}, year={2023}, eprint={2311.00430}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` ## Acknowledgements * OpenAI for the Whisper [model](https://huggingface.co/openai/whisper-large-v3), in particular Jong Wook Kim for the [original codebase](https://github.com/openai/whisper) and training discussions * Hugging Face 🤗 [Transformers](https://github.com/huggingface/transformers) for the model integration * [Georgi Gerganov](https://huggingface.co/ggerganov) for the Whisper cpp integration * [Systran team](https://github.com/SYSTRAN) for the Faster-Whisper integration * [Joshua Lochner](https://huggingface.co/xenova) for the Transformers.js integration * [Laurent Mazare](https://huggingface.co/lmz) for the Candle integration * [Vaibhav Srivastav](https://huggingface.co/reach-vb) for Distil-Whisper distribution * Google's [TPU Research Cloud (TRC)](https://sites.research.google/trc/about/) programme for Cloud TPU v4 compute resource * [Raghav Sonavane](https://huggingface.co/rsonavane/distil-whisper-large-v2-8-ls) for an early iteration of Distil-Whisper on the LibriSpeech dataset
MoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33
MoritzLaurer
"2024-01-08T12:37:05Z"
84,947
11
transformers
[ "transformers", "pytorch", "onnx", "deberta-v2", "text-classification", "zero-shot-classification", "en", "arxiv:2312.17543", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
zero-shot-classification
"2023-11-23T22:22:02Z"
--- language: - en tags: - text-classification - zero-shot-classification pipeline_tag: zero-shot-classification library_name: transformers license: mit --- # Model description: deberta-v3-base-zeroshot-v1.1-all-33 The model is designed for zero-shot classification with the Hugging Face pipeline. The model can do one universal classification task: determine whether a hypothesis is "true" or "not true" given a text (`entailment` vs. `not_entailment`). This task format is based on the Natural Language Inference task (NLI). The task is so universal that any classification task can be reformulated into this task. A detailed description of how the model was trained and how it can be used is available in this [paper](https://arxiv.org/pdf/2312.17543.pdf). ## Training data The model was trained on a mixture of __33 datasets and 387 classes__ that have been reformatted into this universal format. 1. Five NLI datasets with ~885k texts: "mnli", "anli", "fever", "wanli", "ling" 2. 28 classification tasks reformatted into the universal NLI format. ~51k cleaned texts were used to avoid overfitting: 'amazonpolarity', 'imdb', 'appreviews', 'yelpreviews', 'rottentomatoes', 'emotiondair', 'emocontext', 'empathetic', 'financialphrasebank', 'banking77', 'massive', 'wikitoxic_toxicaggregated', 'wikitoxic_obscene', 'wikitoxic_threat', 'wikitoxic_insult', 'wikitoxic_identityhate', 'hateoffensive', 'hatexplain', 'biasframes_offensive', 'biasframes_sex', 'biasframes_intent', 'agnews', 'yahootopics', 'trueteacher', 'spam', 'wellformedquery', 'manifesto', 'capsotu'. See details on each dataset here: https://github.com/MoritzLaurer/zeroshot-classifier/blob/main/datasets_overview.csv Note that compared to other NLI models, this model predicts two classes (`entailment` vs. `not_entailment`) as opposed to three classes (entailment/neutral/contradiction) The model was only trained on English data. For __multilingual use-cases__, I recommend machine translating texts to English with libraries like [EasyNMT](https://github.com/UKPLab/EasyNMT). English-only models tend to perform better than multilingual models and validation with English data can be easier if you don't speak all languages in your corpus. ### How to use the model #### Simple zero-shot classification pipeline ```python #!pip install transformers[sentencepiece] from transformers import pipeline text = "Angela Merkel is a politician in Germany and leader of the CDU" hypothesis_template = "This example is about {}" classes_verbalized = ["politics", "economy", "entertainment", "environment"] zeroshot_classifier = pipeline("zero-shot-classification", model="MoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33") output = zeroshot_classifier(text, classes_verbalised, hypothesis_template=hypothesis_template, multi_label=False) print(output) ``` ### Details on data and training The code for preparing the data and training & evaluating the model is fully open-source here: https://github.com/MoritzLaurer/zeroshot-classifier/tree/main Hyperparameters and other details are available in this Weights & Biases repo: https://wandb.ai/moritzlaurer/deberta-v3-base-zeroshot-v1-1-all-33/table?workspace=user- ## Metrics Balanced accuracy is reported for all datasets. `deberta-v3-base-zeroshot-v1.1-all-33` was trained on all datasets, with only maximum 500 texts per class to avoid overfitting. The metrics on these datasets are therefore not strictly zeroshot, as the model has seen some data for each task during training. `deberta-v3-base-zeroshot-v1.1-heldout` indicates zeroshot performance on the respective dataset. To calculate these zeroshot metrics, the pipeline was run 28 times, each time with one dataset held out from training to simulate a zeroshot setup. ![figure_base_v1.1](https://raw.githubusercontent.com/MoritzLaurer/zeroshot-classifier/main/results/fig_base_v1.1.png) | | deberta-v3-base-mnli-fever-anli-ling-wanli-binary | deberta-v3-base-zeroshot-v1.1-heldout | deberta-v3-base-zeroshot-v1.1-all-33 | |:---------------------------|---------------------------:|----------------------------------------:|---------------------------------------:| | datasets mean (w/o nli) | 62 | 70.7 | 84 | | amazonpolarity (2) | 91.7 | 95.7 | 96 | | imdb (2) | 87.3 | 93.6 | 94.5 | | appreviews (2) | 91.3 | 92.2 | 94.4 | | yelpreviews (2) | 95.1 | 97.4 | 98.3 | | rottentomatoes (2) | 83 | 88.7 | 90.8 | | emotiondair (6) | 46.5 | 42.6 | 74.5 | | emocontext (4) | 58.5 | 57.4 | 81.2 | | empathetic (32) | 31.3 | 37.3 | 52.7 | | financialphrasebank (3) | 78.3 | 68.9 | 91.2 | | banking77 (72) | 18.9 | 46 | 73.7 | | massive (59) | 44 | 56.6 | 78.9 | | wikitoxic_toxicaggreg (2) | 73.7 | 82.5 | 90.5 | | wikitoxic_obscene (2) | 77.3 | 91.6 | 92.6 | | wikitoxic_threat (2) | 83.5 | 95.2 | 96.7 | | wikitoxic_insult (2) | 79.6 | 91 | 91.6 | | wikitoxic_identityhate (2) | 83.9 | 88 | 94.4 | | hateoffensive (3) | 55.2 | 66.1 | 86 | | hatexplain (3) | 44.1 | 57.6 | 76.9 | | biasframes_offensive (2) | 56.8 | 85.4 | 87 | | biasframes_sex (2) | 85.4 | 87 | 91.8 | | biasframes_intent (2) | 56.3 | 85.2 | 87.8 | | agnews (4) | 77.3 | 80 | 90.5 | | yahootopics (10) | 53.6 | 57.7 | 72.8 | | trueteacher (2) | 51.4 | 49.5 | 82.4 | | spam (2) | 51.8 | 50 | 97.2 | | wellformedquery (2) | 49.9 | 52.5 | 77.2 | | manifesto (56) | 5.8 | 18.9 | 39.1 | | capsotu (21) | 25.2 | 64 | 72.5 | | mnli_m (2) | 92.4 | nan | 92.7 | | mnli_mm (2) | 92.4 | nan | 92.5 | | fevernli (2) | 89 | nan | 89.1 | | anli_r1 (2) | 79.4 | nan | 80 | | anli_r2 (2) | 68.4 | nan | 68.4 | | anli_r3 (2) | 66.2 | nan | 68 | | wanli (2) | 81.6 | nan | 81.8 | | lingnli (2) | 88.4 | nan | 88.4 | ## Limitations and bias The model can only do text classification tasks. Please consult the original DeBERTa paper and the papers for the different datasets for potential biases. ## License The base model (DeBERTa-v3) is published under the MIT license. The datasets the model was fine-tuned on are published under a diverse set of licenses. The following table provides an overview of the non-NLI datasets used for fine-tuning, information on licenses, the underlying papers etc.: https://github.com/MoritzLaurer/zeroshot-classifier/blob/main/datasets_overview.csv ## Citation If you use this model academically, please cite: ``` @misc{laurer_building_2023, title = {Building {Efficient} {Universal} {Classifiers} with {Natural} {Language} {Inference}}, url = {http://arxiv.org/abs/2312.17543}, doi = {10.48550/arXiv.2312.17543}, abstract = {Generative Large Language Models (LLMs) have become the mainstream choice for fewshot and zeroshot learning thanks to the universality of text generation. Many users, however, do not need the broad capabilities of generative LLMs when they only want to automate a classification task. Smaller BERT-like models can also learn universal tasks, which allow them to do any text classification task without requiring fine-tuning (zeroshot classification) or to learn new tasks with only a few examples (fewshot), while being significantly more efficient than generative LLMs. This paper (1) explains how Natural Language Inference (NLI) can be used as a universal classification task that follows similar principles as instruction fine-tuning of generative LLMs, (2) provides a step-by-step guide with reusable Jupyter notebooks for building a universal classifier, and (3) shares the resulting universal classifier that is trained on 33 datasets with 389 diverse classes. Parts of the code we share has been used to train our older zeroshot classifiers that have been downloaded more than 55 million times via the Hugging Face Hub as of December 2023. Our new classifier improves zeroshot performance by 9.4\%.}, urldate = {2024-01-05}, publisher = {arXiv}, author = {Laurer, Moritz and van Atteveldt, Wouter and Casas, Andreu and Welbers, Kasper}, month = dec, year = {2023}, note = {arXiv:2312.17543 [cs]}, keywords = {Computer Science - Artificial Intelligence, Computer Science - Computation and Language}, } ``` ### Ideas for cooperation or questions? If you have questions or ideas for cooperation, contact me at m{dot}laurer{at}vu{dot}nl or [LinkedIn](https://www.linkedin.com/in/moritz-laurer/) ### Debugging and issues Note that DeBERTa-v3 was released on 06.12.21 and older versions of HF Transformers can have issues running the model (e.g. resulting in an issue with the tokenizer). Using Transformers>=4.13 might solve some issues. Also make sure to install sentencepiece to avoid tokenizer errors. Run: `pip install transformers[sentencepiece]` or `pip install sentencepiece` ### Hypotheses used for classification The hypotheses in the tables below were used to fine-tune the model. Inspecting them can help users get a feeling for which type of hypotheses and tasks the model was trained on. You can formulate your own hypotheses by changing the `hypothesis_template` of the zeroshot pipeline. For example: ```python from transformers import pipeline text = "Angela Merkel is a politician in Germany and leader of the CDU" hypothesis_template = "Merkel is the leader of the party: {}" classes_verbalized = ["CDU", "SPD", "Greens"] zeroshot_classifier = pipeline("zero-shot-classification", model="MoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33") output = zeroshot_classifier(text, classes_verbalised, hypothesis_template=hypothesis_template, multi_label=False) print(output) ``` Note that a few rows in the `massive` and `banking77` datasets contain `nan` because some classes were so ambiguous/unclear that I excluded them from the data. #### wellformedquery | label | hypothesis | |:----------------|:-----------------------------------------------| | not_well_formed | This example is not a well formed Google query | | well_formed | This example is a well formed Google query. | #### biasframes_sex | label | hypothesis | |:--------|:-----------------------------------------------------------| | not_sex | This example does not contain allusions to sexual content. | | sex | This example contains allusions to sexual content. | #### biasframes_intent | label | hypothesis | |:-----------|:-----------------------------------------------------------------| | intent | The intent of this example is to be offensive/disrespectful. | | not_intent | The intent of this example is not to be offensive/disrespectful. | #### biasframes_offensive | label | hypothesis | |:--------------|:-------------------------------------------------------------------------| | not_offensive | This example could not be considered offensive, disrespectful, or toxic. | | offensive | This example could be considered offensive, disrespectful, or toxic. | #### financialphrasebank | label | hypothesis | |:---------|:--------------------------------------------------------------------------| | negative | The sentiment in this example is negative from an investor's perspective. | | neutral | The sentiment in this example is neutral from an investor's perspective. | | positive | The sentiment in this example is positive from an investor's perspective. | #### rottentomatoes | label | hypothesis | |:---------|:-----------------------------------------------------------------------| | negative | The sentiment in this example rotten tomatoes movie review is negative | | positive | The sentiment in this example rotten tomatoes movie review is positive | #### amazonpolarity | label | hypothesis | |:---------|:----------------------------------------------------------------| | negative | The sentiment in this example amazon product review is negative | | positive | The sentiment in this example amazon product review is positive | #### imdb | label | hypothesis | |:---------|:------------------------------------------------------------| | negative | The sentiment in this example imdb movie review is negative | | positive | The sentiment in this example imdb movie review is positive | #### appreviews | label | hypothesis | |:---------|:------------------------------------------------------| | negative | The sentiment in this example app review is negative. | | positive | The sentiment in this example app review is positive. | #### yelpreviews | label | hypothesis | |:---------|:-------------------------------------------------------| | negative | The sentiment in this example yelp review is negative. | | positive | The sentiment in this example yelp review is positive. | #### wikitoxic_toxicaggregated | label | hypothesis | |:--------------------|:----------------------------------------------------------------| | not_toxicaggregated | This example wikipedia comment does not contain toxic language. | | toxicaggregated | This example wikipedia comment contains toxic language. | #### wikitoxic_obscene | label | hypothesis | |:------------|:------------------------------------------------------------------| | not_obscene | This example wikipedia comment does not contain obscene language. | | obscene | This example wikipedia comment contains obscene language. | #### wikitoxic_threat | label | hypothesis | |:-----------|:----------------------------------------------------------| | not_threat | This example wikipedia comment does not contain a threat. | | threat | This example wikipedia comment contains a threat. | #### wikitoxic_insult | label | hypothesis | |:-----------|:-----------------------------------------------------------| | insult | This example wikipedia comment contains an insult. | | not_insult | This example wikipedia comment does not contain an insult. | #### wikitoxic_identityhate | label | hypothesis | |:-----------------|:---------------------------------------------------------------| | identityhate | This example wikipedia comment contains identity hate. | | not_identityhate | This example wikipedia comment does not contain identity hate. | #### hateoffensive | label | hypothesis | |:------------|:------------------------------------------------------------------------| | hate_speech | This example tweet contains hate speech. | | neither | This example tweet contains neither offensive language nor hate speech. | | offensive | This example tweet contains offensive language without hate speech. | #### hatexplain | label | hypothesis | |:------------|:-------------------------------------------------------------------------------------------| | hate_speech | This example text from twitter or gab contains hate speech. | | neither | This example text from twitter or gab contains neither offensive language nor hate speech. | | offensive | This example text from twitter or gab contains offensive language without hate speech. | #### spam | label | hypothesis | |:---------|:------------------------------| | not_spam | This example sms is not spam. | | spam | This example sms is spam. | #### emotiondair | label | hypothesis | |:---------|:---------------------------------------------------| | anger | This example tweet expresses the emotion: anger | | fear | This example tweet expresses the emotion: fear | | joy | This example tweet expresses the emotion: joy | | love | This example tweet expresses the emotion: love | | sadness | This example tweet expresses the emotion: sadness | | surprise | This example tweet expresses the emotion: surprise | #### emocontext | label | hypothesis | |:--------|:--------------------------------------------------------------------------------------| | angry | This example tweet expresses the emotion: anger | | happy | This example tweet expresses the emotion: happiness | | others | This example tweet does not express any of the emotions: anger, sadness, or happiness | | sad | This example tweet expresses the emotion: sadness | #### empathetic | label | hypothesis | |:-------------|:-----------------------------------------------------------| | afraid | The main emotion of this example dialogue is: afraid | | angry | The main emotion of this example dialogue is: angry | | annoyed | The main emotion of this example dialogue is: annoyed | | anticipating | The main emotion of this example dialogue is: anticipating | | anxious | The main emotion of this example dialogue is: anxious | | apprehensive | The main emotion of this example dialogue is: apprehensive | | ashamed | The main emotion of this example dialogue is: ashamed | | caring | The main emotion of this example dialogue is: caring | | confident | The main emotion of this example dialogue is: confident | | content | The main emotion of this example dialogue is: content | | devastated | The main emotion of this example dialogue is: devastated | | disappointed | The main emotion of this example dialogue is: disappointed | | disgusted | The main emotion of this example dialogue is: disgusted | | embarrassed | The main emotion of this example dialogue is: embarrassed | | excited | The main emotion of this example dialogue is: excited | | faithful | The main emotion of this example dialogue is: faithful | | furious | The main emotion of this example dialogue is: furious | | grateful | The main emotion of this example dialogue is: grateful | | guilty | The main emotion of this example dialogue is: guilty | | hopeful | The main emotion of this example dialogue is: hopeful | | impressed | The main emotion of this example dialogue is: impressed | | jealous | The main emotion of this example dialogue is: jealous | | joyful | The main emotion of this example dialogue is: joyful | | lonely | The main emotion of this example dialogue is: lonely | | nostalgic | The main emotion of this example dialogue is: nostalgic | | prepared | The main emotion of this example dialogue is: prepared | | proud | The main emotion of this example dialogue is: proud | | sad | The main emotion of this example dialogue is: sad | | sentimental | The main emotion of this example dialogue is: sentimental | | surprised | The main emotion of this example dialogue is: surprised | | terrified | The main emotion of this example dialogue is: terrified | | trusting | The main emotion of this example dialogue is: trusting | #### agnews | label | hypothesis | |:---------|:-------------------------------------------------------| | Business | This example news text is about business news | | Sci/Tech | This example news text is about science and technology | | Sports | This example news text is about sports | | World | This example news text is about world news | #### yahootopics | label | hypothesis | |:-----------------------|:---------------------------------------------------------------------------------------------------| | Business & Finance | This example question from the Yahoo Q&A forum is categorized in the topic: Business & Finance | | Computers & Internet | This example question from the Yahoo Q&A forum is categorized in the topic: Computers & Internet | | Education & Reference | This example question from the Yahoo Q&A forum is categorized in the topic: Education & Reference | | Entertainment & Music | This example question from the Yahoo Q&A forum is categorized in the topic: Entertainment & Music | | Family & Relationships | This example question from the Yahoo Q&A forum is categorized in the topic: Family & Relationships | | Health | This example question from the Yahoo Q&A forum is categorized in the topic: Health | | Politics & Government | This example question from the Yahoo Q&A forum is categorized in the topic: Politics & Government | | Science & Mathematics | This example question from the Yahoo Q&A forum is categorized in the topic: Science & Mathematics | | Society & Culture | This example question from the Yahoo Q&A forum is categorized in the topic: Society & Culture | | Sports | This example question from the Yahoo Q&A forum is categorized in the topic: Sports | #### massive | label | hypothesis | |:-------------------------|:------------------------------------------------------------------------------------------| | alarm_query | The example utterance is a query about alarms. | | alarm_remove | The intent of this example utterance is to remove an alarm. | | alarm_set | The intent of the example utterance is to set an alarm. | | audio_volume_down | The intent of the example utterance is to lower the volume. | | audio_volume_mute | The intent of this example utterance is to mute the volume. | | audio_volume_other | The example utterance is related to audio volume. | | audio_volume_up | The intent of this example utterance is turning the audio volume up. | | calendar_query | The example utterance is a query about a calendar. | | calendar_remove | The intent of the example utterance is to remove something from a calendar. | | calendar_set | The intent of this example utterance is to set something in a calendar. | | cooking_query | The example utterance is a query about cooking. | | cooking_recipe | This example utterance is about cooking recipies. | | datetime_convert | The example utterance is related to date time changes or conversion. | | datetime_query | The intent of this example utterance is a datetime query. | | email_addcontact | The intent of this example utterance is adding an email address to contacts. | | email_query | The example utterance is a query about emails. | | email_querycontact | The intent of this example utterance is to query contact details. | | email_sendemail | The intent of the example utterance is to send an email. | | general_greet | This example utterance is a general greet. | | general_joke | The intent of the example utterance is to hear a joke. | | general_quirky | nan | | iot_cleaning | The intent of the example utterance is for an IoT device to start cleaning. | | iot_coffee | The intent of this example utterance is for an IoT device to make coffee. | | iot_hue_lightchange | The intent of this example utterance is changing the light. | | iot_hue_lightdim | The intent of the example utterance is to dim the lights. | | iot_hue_lightoff | The example utterance is related to turning the lights off. | | iot_hue_lighton | The example utterance is related to turning the lights on. | | iot_hue_lightup | The intent of this example utterance is to brighten lights. | | iot_wemo_off | The intent of this example utterance is turning an IoT device off. | | iot_wemo_on | The intent of the example utterance is to turn an IoT device on. | | lists_createoradd | The example utterance is related to creating or adding to lists. | | lists_query | The example utterance is a query about a list. | | lists_remove | The intent of this example utterance is to remove a list or remove something from a list. | | music_dislikeness | The intent of this example utterance is signalling music dislike. | | music_likeness | The example utterance is related to liking music. | | music_query | The example utterance is a query about music. | | music_settings | The intent of the example utterance is to change music settings. | | news_query | The example utterance is a query about the news. | | play_audiobook | The example utterance is related to playing audiobooks. | | play_game | The intent of this example utterance is to start playing a game. | | play_music | The intent of this example utterance is for an IoT device to play music. | | play_podcasts | The example utterance is related to playing podcasts. | | play_radio | The intent of the example utterance is to play something on the radio. | | qa_currency | This example utteranceis about currencies. | | qa_definition | The example utterance is a query about a definition. | | qa_factoid | The example utterance is a factoid question. | | qa_maths | The example utterance is a question about maths. | | qa_stock | This example utterance is about stocks. | | recommendation_events | This example utterance is about event recommendations. | | recommendation_locations | The intent of this example utterance is receiving recommendations for good locations. | | recommendation_movies | This example utterance is about movie recommendations. | | social_post | The example utterance is about social media posts. | | social_query | The example utterance is a query about a social network. | | takeaway_order | The intent of this example utterance is to order takeaway food. | | takeaway_query | This example utterance is about takeaway food. | | transport_query | The example utterance is a query about transport or travels. | | transport_taxi | The intent of this example utterance is to get a taxi. | | transport_ticket | This example utterance is about transport tickets. | | transport_traffic | This example utterance is about transport or traffic. | | weather_query | This example utterance is a query about the wheather. | #### banking77 | label | hypothesis | |:-------------------------------------------------|:----------------------------------------------------------------------------------------------------------| | Refund_not_showing_up | This customer example message is about a refund not showing up. | | activate_my_card | This banking customer example message is about activating a card. | | age_limit | This banking customer example message is related to age limits. | | apple_pay_or_google_pay | This banking customer example message is about apple pay or google pay | | atm_support | This banking customer example message requests ATM support. | | automatic_top_up | This banking customer example message is about automatic top up. | | balance_not_updated_after_bank_transfer | This banking customer example message is about a balance not updated after a transfer. | | balance_not_updated_after_cheque_or_cash_deposit | This banking customer example message is about a balance not updated after a cheque or cash deposit. | | beneficiary_not_allowed | This banking customer example message is related to a beneficiary not being allowed or a failed transfer. | | cancel_transfer | This banking customer example message is related to the cancellation of a transfer. | | card_about_to_expire | This banking customer example message is related to the expiration of a card. | | card_acceptance | This banking customer example message is related to the scope of acceptance of a card. | | card_arrival | This banking customer example message is about the arrival of a card. | | card_delivery_estimate | This banking customer example message is about a card delivery estimate or timing. | | card_linking | nan | | card_not_working | This banking customer example message is about a card not working. | | card_payment_fee_charged | This banking customer example message is about a card payment fee. | | card_payment_not_recognised | This banking customer example message is about a payment the customer does not recognise. | | card_payment_wrong_exchange_rate | This banking customer example message is about a wrong exchange rate. | | card_swallowed | This banking customer example message is about a card swallowed by a machine. | | cash_withdrawal_charge | This banking customer example message is about a cash withdrawal charge. | | cash_withdrawal_not_recognised | This banking customer example message is about an unrecognised cash withdrawal. | | change_pin | This banking customer example message is about changing a pin code. | | compromised_card | This banking customer example message is about a compromised card. | | contactless_not_working | This banking customer example message is about contactless not working | | country_support | This banking customer example message is about country-specific support. | | declined_card_payment | This banking customer example message is about a declined card payment. | | declined_cash_withdrawal | This banking customer example message is about a declined cash withdrawal. | | declined_transfer | This banking customer example message is about a declined transfer. | | direct_debit_payment_not_recognised | This banking customer example message is about an unrecognised direct debit payment. | | disposable_card_limits | This banking customer example message is about the limits of disposable cards. | | edit_personal_details | This banking customer example message is about editing personal details. | | exchange_charge | This banking customer example message is about exchange rate charges. | | exchange_rate | This banking customer example message is about exchange rates. | | exchange_via_app | nan | | extra_charge_on_statement | This banking customer example message is about an extra charge. | | failed_transfer | This banking customer example message is about a failed transfer. | | fiat_currency_support | This banking customer example message is about fiat currency support | | get_disposable_virtual_card | This banking customer example message is about getting a disposable virtual card. | | get_physical_card | nan | | getting_spare_card | This banking customer example message is about getting a spare card. | | getting_virtual_card | This banking customer example message is about getting a virtual card. | | lost_or_stolen_card | This banking customer example message is about a lost or stolen card. | | lost_or_stolen_phone | This banking customer example message is about a lost or stolen phone. | | order_physical_card | This banking customer example message is about ordering a card. | | passcode_forgotten | This banking customer example message is about a forgotten passcode. | | pending_card_payment | This banking customer example message is about a pending card payment. | | pending_cash_withdrawal | This banking customer example message is about a pending cash withdrawal. | | pending_top_up | This banking customer example message is about a pending top up. | | pending_transfer | This banking customer example message is about a pending transfer. | | pin_blocked | This banking customer example message is about a blocked pin. | | receiving_money | This banking customer example message is about receiving money. | | request_refund | This banking customer example message is about a refund request. | | reverted_card_payment? | This banking customer example message is about reverting a card payment. | | supported_cards_and_currencies | nan | | terminate_account | This banking customer example message is about terminating an account. | | top_up_by_bank_transfer_charge | nan | | top_up_by_card_charge | This banking customer example message is about the charge for topping up by card. | | top_up_by_cash_or_cheque | This banking customer example message is about topping up by cash or cheque. | | top_up_failed | This banking customer example message is about top up issues or failures. | | top_up_limits | This banking customer example message is about top up limitations. | | top_up_reverted | This banking customer example message is about issues with topping up. | | topping_up_by_card | This banking customer example message is about topping up by card. | | transaction_charged_twice | This banking customer example message is about a transaction charged twice. | | transfer_fee_charged | This banking customer example message is about an issue with a transfer fee charge. | | transfer_into_account | This banking customer example message is about transfers into the customer's own account. | | transfer_not_received_by_recipient | This banking customer example message is about a transfer that has not arrived yet. | | transfer_timing | This banking customer example message is about transfer timing. | | unable_to_verify_identity | This banking customer example message is about an issue with identity verification. | | verify_my_identity | This banking customer example message is about identity verification. | | verify_source_of_funds | This banking customer example message is about the source of funds. | | verify_top_up | This banking customer example message is about verification and top ups | | virtual_card_not_working | This banking customer example message is about a virtual card not working | | visa_or_mastercard | This banking customer example message is about types of bank cards. | | why_verify_identity | This banking customer example message questions why identity verification is necessary. | | wrong_amount_of_cash_received | This banking customer example message is about a wrong amount of cash received. | | wrong_exchange_rate_for_cash_withdrawal | This banking customer example message is about a wrong exchange rate for a cash withdrawal. | #### trueteacher | label | hypothesis | |:-----------------------|:---------------------------------------------------------------------| | factually_consistent | The example summary is factually consistent with the full article. | | factually_inconsistent | The example summary is factually inconsistent with the full article. | #### capsotu | label | hypothesis | |:----------------------|:----------------------------------------------------------------------------------------------------------| | Agriculture | This example text from a US presidential speech is about agriculture | | Civil Rights | This example text from a US presidential speech is about civil rights or minorities or civil liberties | | Culture | This example text from a US presidential speech is about cultural policy | | Defense | This example text from a US presidential speech is about defense or military | | Domestic Commerce | This example text from a US presidential speech is about banking or finance or commerce | | Education | This example text from a US presidential speech is about education | | Energy | This example text from a US presidential speech is about energy or electricity or fossil fuels | | Environment | This example text from a US presidential speech is about the environment or water or waste or pollution | | Foreign Trade | This example text from a US presidential speech is about foreign trade | | Government Operations | This example text from a US presidential speech is about government operations or administration | | Health | This example text from a US presidential speech is about health | | Housing | This example text from a US presidential speech is about community development or housing issues | | Immigration | This example text from a US presidential speech is about migration | | International Affairs | This example text from a US presidential speech is about international affairs or foreign aid | | Labor | This example text from a US presidential speech is about employment or labour | | Law and Crime | This example text from a US presidential speech is about law, crime or family issues | | Macroeconomics | This example text from a US presidential speech is about macroeconomics | | Public Lands | This example text from a US presidential speech is about public lands or water management | | Social Welfare | This example text from a US presidential speech is about social welfare | | Technology | This example text from a US presidential speech is about space or science or technology or communications | | Transportation | This example text from a US presidential speech is about transportation | #### manifesto | label | hypothesis | |:-------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Agriculture and Farmers: Positive | This example text from a political party manifesto is positive towards policies for agriculture and farmers | | Anti-Growth Economy: Positive | This example text from a political party manifesto is in favour of anti-growth politics | | Anti-Imperialism | This example text from a political party manifesto is anti-imperialistic, for example against controlling other countries and for greater self-government of colonies | | Centralisation | This example text from a political party manifesto is in favour of political centralisation | | Civic Mindedness: Positive | This example text from a political party manifesto is positive towards national solidarity, civil society or appeals for public spiritedness or against anti-social attitudes | | Constitutionalism: Negative | This example text from a political party manifesto is positive towards constitutionalism | | Constitutionalism: Positive | This example text from a political party manifesto is positive towards constitutionalism and the status quo of the constitution | | Controlled Economy | This example text from a political party manifesto is supportive of direct government control of the economy, e.g. price control or minimum wages | | Corporatism/Mixed Economy | This example text from a political party manifesto is positive towards cooperation of government, employers, and trade unions simultaneously | | Culture: Positive | This example text from a political party manifesto is in favour of cultural policies or leisure facilities, for example museus, libraries or public sport clubs | | Decentralization | This example text from a political party manifesto is for decentralisation or federalism | | Democracy | This example text from a political party manifesto favourably mentions democracy or democratic procedures or institutions | | Economic Goals | This example text from a political party manifesto is a broad/general statement on economic goals without specifics | | Economic Growth: Positive | This example text from a political party manifesto is supportive of economic growth, for example facilitation of more production or government aid for growth | | Economic Orthodoxy | This example text from a political party manifesto is for economic orthodoxy, for example reduction of budget deficits, thrift or a strong currency | | Economic Planning | This example text from a political party manifesto is positive towards government economic planning, e.g. policy plans or strategies | | Education Expansion | This example text from a political party manifesto is about the need to expand/improve policy on education | | Education Limitation | This example text from a political party manifesto is sceptical towards state expenditure on education, for example in favour of study fees or private schools | | Environmental Protection | This example text from a political party manifesto is in favour of environmental protection, e.g. fighting climate change or 'green' policies or preservation of natural resources or animal rights | | Equality: Positive | This example text from a political party manifesto is positive towards equality or social justice, e.g. protection of underprivileged groups or fair distribution of resources | | European Community/Union: Negative | This example text from a political party manifesto negatively mentions the EU or European Community | | European Community/Union: Positive | This example text from a political party manifesto is positive towards the EU or European Community, for example EU expansion and integration | | Foreign Special Relationships: Negative | This example text from a political party manifesto is negative towards particular countries | | Foreign Special Relationships: Positive | This example text from a political party manifesto is positive towards particular countries | | Free Market Economy | This example text from a political party manifesto is in favour of a free market economy and capitalism | | Freedom and Human Rights | This example text from a political party manifesto is in favour of freedom and human rights, for example freedom of speech, assembly or against state coercion or for individualism | | Governmental and Administrative Efficiency | This example text from a political party manifesto is in favour of efficiency in government/administration, for example by restructuring civil service or improving bureaucracy | | Incentives: Positive | This example text from a political party manifesto is favourable towards supply side economic policies supporting businesses, for example for incentives like subsidies or tax breaks | | Internationalism: Negative | This example text from a political party manifesto is sceptical of internationalism, for example negative towards international cooperation, in favour of national sovereignty and unilaterialism | | Internationalism: Positive | This example text from a political party manifesto is in favour of international cooperation with other countries, for example mentions the need for aid to developing countries, or global governance | | Keynesian Demand Management | This example text from a political party manifesto is for keynesian demand management and demand side economic policies | | Labour Groups: Negative | This example text from a political party manifesto is negative towards labour groups and unions | | Labour Groups: Positive | This example text from a political party manifesto is positive towards labour groups, for example for good working conditions, fair wages or unions | | Law and Order: Positive | This example text from a political party manifesto is positive towards law and order and strict law enforcement | | Market Regulation | This example text from a political party manifesto is supports market regulation for a fair and open market, for example for consumer protection or for increased competition or for social market economy | | Marxist Analysis | This example text from a political party manifesto is positive towards Marxist-Leninist ideas or uses specific Marxist terminology | | Middle Class and Professional Groups | This example text from a political party manifesto favourably references the middle class, e.g. white colar groups or the service sector | | Military: Negative | This example text from a political party manifesto is negative towards the military, for example for decreasing military spending or disarmament | | Military: Positive | This example text from a political party manifesto is positive towards the military, for example for military spending or rearmament or military treaty obligations | | Multiculturalism: Negative | This example text from a political party manifesto is sceptical towards multiculturalism, or for cultural integration or appeals to cultural homogeneity in society | | Multiculturalism: Positive | This example text from a political party manifesto favourably mentions cultural diversity, for example for freedom of religion or linguistic heritages | | National Way of Life: Negative | This example text from a political party manifesto unfavourably mentions a country's nation and history, for example sceptical towards patriotism or national pride | | National Way of Life: Positive | This example text from a political party manifesto is positive towards the national way of life and history, for example pride of citizenship or appeals to patriotism | | Nationalisation | This example text from a political party manifesto is positive towards government ownership of industries or land or for economic nationalisation | | Non-economic Demographic Groups | This example text from a political party manifesto favourably mentions non-economic demographic groups like women, students or specific age groups | | Peace | This example text from a political party manifesto is positive towards peace and peaceful means of solving crises, for example in favour of negotiations and ending wars | | Political Authority | This example text from a political party manifesto mentions the speaker's competence to govern or other party's lack of such competence, or favourably mentions a strong/stable government | | Political Corruption | This example text from a political party manifesto is negative towards political corruption or abuse of political/bureaucratic power | | Protectionism: Negative | This example text from a political party manifesto is negative towards protectionism, in favour of free trade | | Protectionism: Positive | This example text from a political party manifesto is in favour of protectionism, for example tariffs, export subsidies | | Technology and Infrastructure: Positive | This example text from a political party manifesto is about technology and infrastructure, e.g. the importance of modernisation of industry, or supportive of public spending on infrastructure/tech | | Traditional Morality: Negative | This example text from a political party manifesto is negative towards traditional morality, for example against religious moral values, for divorce or abortion, for modern families or separation of church and state | | Traditional Morality: Positive | This example text from a political party manifesto is favourable towards traditional or religious values, for example for censorship of immoral behavour, for traditional family values or religious institutions | | Underprivileged Minority Groups | This example text from a political party manifesto favourably mentions underprivileged minorities, for example handicapped, homosexuals or immigrants | | Welfare State Expansion | This example text from a political party manifesto is positive towards the welfare state, e.g. health care, pensions or social housing | | Welfare State Limitation | This example text from a political party manifesto is for limiting the welfare state, for example public funding for social services or social security, e.g. private care before state care |
TheBloke/Qwen-14B-Chat-AWQ
TheBloke
"2023-11-21T11:10:51Z"
84,569
10
transformers
[ "transformers", "safetensors", "qwen", "text-generation", "custom_code", "zh", "en", "arxiv:2309.16609", "arxiv:2305.08322", "arxiv:2009.03300", "arxiv:2305.05280", "arxiv:2210.03629", "base_model:Qwen/Qwen-14B-Chat", "autotrain_compatible", "4-bit", "region:us" ]
text-generation
"2023-11-21T09:57:40Z"
--- base_model: Qwen/Qwen-14B-Chat inference: false language: - zh - en model_creator: Qwen model_name: Qwen 14B Chat model_type: qwen pipeline_tag: text-generation prompt_template: '<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ' quantized_by: TheBloke tags: - qwen --- <!-- markdownlint-disable MD041 --> <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Qwen 14B Chat - AWQ - Model creator: [Qwen](https://huggingface.co/Qwen) - Original model: [Qwen 14B Chat](https://huggingface.co/Qwen/Qwen-14B-Chat) <!-- description start --> ## Description This repo contains AWQ model files for [Qwen's Qwen 14B Chat](https://huggingface.co/Qwen/Qwen-14B-Chat). These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/). ### About AWQ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings. It is supported by: - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ - [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Qwen-14B-Chat-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Qwen-14B-Chat-GPTQ) * [Qwen's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Qwen/Qwen-14B-Chat) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: ChatML ``` <|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ``` <!-- prompt-template end --> <!-- README_AWQ.md-provided-files start --> ## Provided files, and AWQ parameters I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered. Models are released as sharded safetensors files. | Branch | Bits | GS | AWQ Dataset | Seq Len | Size | | ------ | ---- | -- | ----------- | ------- | ---- | | [main](https://huggingface.co/TheBloke/Qwen-14B-Chat-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 8192 | 9.67 GB <!-- README_AWQ.md-provided-files end --> <!-- README_AWQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui) Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/Qwen-14B-Chat-AWQ`. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `Qwen-14B-Chat-AWQ` 7. Select **Loader: AutoAWQ**. 8. Click Load, and the model will load and is now ready for use. 9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started! <!-- README_AWQ.md-text-generation-webui end --> <!-- README_AWQ.md-use-from-vllm start --> ## Multi-user inference server: vLLM Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/). - Please ensure you are using vLLM version 0.2 or later. - When using vLLM as a server, pass the `--quantization awq` parameter. For example: ```shell python3 -m vllm.entrypoints.api_server --model TheBloke/Qwen-14B-Chat-AWQ --quantization awq --dtype auto ``` - When using vLLM from Python code, again set `quantization=awq`. For example: ```python from vllm import LLM, SamplingParams prompts = [ "Tell me about AI", "Write a story about llamas", "What is 291 - 150?", "How much wood would a woodchuck chuck if a woodchuck could chuck wood?", ] prompt_template=f'''<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ''' prompts = [prompt_template.format(prompt=prompt) for prompt in prompts] sampling_params = SamplingParams(temperature=0.8, top_p=0.95) llm = LLM(model="TheBloke/Qwen-14B-Chat-AWQ", quantization="awq", dtype="auto") outputs = llm.generate(prompts, sampling_params) # Print the outputs. for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") ``` <!-- README_AWQ.md-use-from-vllm start --> <!-- README_AWQ.md-use-from-tgi start --> ## Multi-user inference server: Hugging Face Text Generation Inference (TGI) Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0` Example Docker parameters: ```shell --model-id TheBloke/Qwen-14B-Chat-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096 ``` Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later): ```shell pip3 install huggingface-hub ``` ```python from huggingface_hub import InferenceClient endpoint_url = "https://your-endpoint-url-here" prompt = "Tell me about AI" prompt_template=f'''<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ''' client = InferenceClient(endpoint_url) response = client.text_generation(prompt, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1) print(f"Model output: ", response) ``` <!-- README_AWQ.md-use-from-tgi end --> <!-- README_AWQ.md-use-from-python start --> ## Inference from Python code using Transformers ### Install the necessary packages - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later. - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later. ```shell pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0" ``` Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0. If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command: ```shell pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl ``` If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y autoawq git clone https://github.com/casper-hansen/AutoAWQ cd AutoAWQ pip3 install . ``` ### Transformers example code (requires Transformers 4.35.0 and later) ```python from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model_name_or_path = "TheBloke/Qwen-14B-Chat-AWQ" tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) model = AutoModelForCausalLM.from_pretrained( model_name_or_path, low_cpu_mem_usage=True, device_map="cuda:0" ) # Using the text streamer to stream output one token at a time streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) prompt = "Tell me about AI" prompt_template=f'''<|im_start|>system {system_message}<|im_end|> <|im_start|>user {prompt}<|im_end|> <|im_start|>assistant ''' # Convert prompt to tokens tokens = tokenizer( prompt_template, return_tensors='pt' ).input_ids.cuda() generation_params = { "do_sample": True, "temperature": 0.7, "top_p": 0.95, "top_k": 40, "max_new_tokens": 512, "repetition_penalty": 1.1 } # Generate streamed output, visible one token at a time generation_output = model.generate( tokens, streamer=streamer, **generation_params ) # Generation without a streamer, which will include the prompt in the output generation_output = model.generate( tokens, **generation_params ) # Get the tokens from the output, decode them, print them token_output = generation_output[0] text_output = tokenizer.decode(token_output) print("model.generate output: ", text_output) # Inference is also possible via Transformers' pipeline from transformers import pipeline pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, **generation_params ) pipe_output = pipe(prompt_template)[0]['generated_text'] print("pipeline output: ", pipe_output) ``` <!-- README_AWQ.md-use-from-python end --> <!-- README_AWQ.md-compatibility start --> ## Compatibility The files provided are tested to work with: - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`. - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later. - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later. - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later. - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later. <!-- README_AWQ.md-compatibility end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Qwen's Qwen 14B Chat # Qwen-14B-Chat <p align="center"> <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/logo_qwen.jpg" width="400"/> <p> <br> <p align="center"> 🤗 <a href="https://huggingface.co/Qwen">Hugging Face</a>&nbsp&nbsp | &nbsp&nbsp🤖 <a href="https://modelscope.cn/organization/qwen">ModelScope</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://arxiv.org/abs/2309.16609">Paper</a>&nbsp&nbsp | &nbsp&nbsp🖥️ <a href="https://modelscope.cn/studios/qwen/Qwen-7B-Chat-Demo/summary">Demo</a> <br> <a href="https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png">WeChat (微信)</a>&nbsp&nbsp | &nbsp&nbsp DingTalk (钉钉) &nbsp&nbsp | &nbsp&nbsp<a href="https://discord.gg/z3GAxXZ9Ce">Discord</a>&nbsp&nbsp </p> <br><br> ## 介绍(Introduction) **通义千问-14B(Qwen-14B)**是阿里云研发的通义千问大模型系列的140亿参数规模的模型。Qwen-14B是基于Transformer的大语言模型, 在超大规模的预训练数据上进行训练得到。预训练数据类型多样,覆盖广泛,包括大量网络文本、专业书籍、代码等。同时,在Qwen-14B的基础上,我们使用对齐机制打造了基于大语言模型的AI助手Qwen-14B-Chat。本仓库为Qwen-14B-Chat的仓库。 如果您想了解更多关于通义千问-14B开源模型的细节,我们建议您参阅[GitHub代码库](https://github.com/QwenLM/Qwen)。 **Qwen-14B** is the 14B-parameter version of the large language model series, Qwen (abbr. Tongyi Qianwen), proposed by Alibaba Cloud. Qwen-14B is a Transformer-based large language model, which is pretrained on a large volume of data, including web texts, books, codes, etc. Additionally, based on the pretrained Qwen-14B, we release Qwen-14B-Chat, a large-model-based AI assistant, which is trained with alignment techniques. This repository is the one for Qwen-14B-Chat. For more details about the open-source model of Qwen-14B, please refer to the [GitHub](https://github.com/QwenLM/Qwen) code repository. <br> ## 要求(Requirements) * python 3.8及以上版本 * pytorch 1.12及以上版本,推荐2.0及以上版本 * 建议使用CUDA 11.4及以上(GPU用户、flash-attention用户等需考虑此选项) * python 3.8 and above * pytorch 1.12 and above, 2.0 and above are recommended * CUDA 11.4 and above are recommended (this is for GPU users, flash-attention users, etc.) <br> ## 依赖项(Dependency) 运行Qwen-14B-Chat,请确保满足上述要求,再执行以下pip命令安装依赖库 To run Qwen-14B-Chat, please make sure you meet the above requirements, and then execute the following pip commands to install the dependent libraries. ```bash pip install transformers==4.32.0 accelerate tiktoken einops scipy transformers_stream_generator==0.0.4 peft deepspeed ``` 另外,推荐安装`flash-attention`库(**当前已支持flash attention 2**),以实现更高的效率和更低的显存占用。 In addition, it is recommended to install the `flash-attention` library (**we support flash attention 2 now.**) for higher efficiency and lower memory usage. ```bash git clone https://github.com/Dao-AILab/flash-attention cd flash-attention && pip install . # 下方安装可选,安装可能比较缓慢。 # pip install csrc/layer_norm # pip install csrc/rotary ``` <br> ## 快速使用(Quickstart) 下面我们展示了一个使用Qwen-14B-Chat模型,进行多轮对话交互的样例: We show an example of multi-turn interaction with Qwen-14B-Chat in the following code: ```python from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.generation import GenerationConfig # Note: The default behavior now has injection attack prevention off. tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True) # use bf16 # model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True, bf16=True).eval() # use fp16 # model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True, fp16=True).eval() # use cpu only # model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="cpu", trust_remote_code=True).eval() # use auto mode, automatically select precision based on the device. model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-14B-Chat", device_map="auto", trust_remote_code=True).eval() # Specify hyperparameters for generation. But if you use transformers>=4.32.0, there is no need to do this. # model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-14B-Chat", trust_remote_code=True) # 可指定不同的生成长度、top_p等相关超参 # 第一轮对话 1st dialogue turn response, history = model.chat(tokenizer, "你好", history=None) print(response) # 你好!很高兴为你提供帮助。 # 第二轮对话 2nd dialogue turn response, history = model.chat(tokenizer, "给我讲一个年轻人奋斗创业最终取得成功的故事。", history=history) print(response) # 这是一个关于一个年轻人奋斗创业最终取得成功的故事。 # 故事的主人公叫李明,他来自一个普通的家庭,父母都是普通的工人。从小,李明就立下了一个目标:要成为一名成功的企业家。 # 为了实现这个目标,李明勤奋学习,考上了大学。在大学期间,他积极参加各种创业比赛,获得了不少奖项。他还利用课余时间去实习,积累了宝贵的经验。 # 毕业后,李明决定开始自己的创业之路。他开始寻找投资机会,但多次都被拒绝了。然而,他并没有放弃。他继续努力,不断改进自己的创业计划,并寻找新的投资机会。 # 最终,李明成功地获得了一笔投资,开始了自己的创业之路。他成立了一家科技公司,专注于开发新型软件。在他的领导下,公司迅速发展起来,成为了一家成功的科技企业。 # 李明的成功并不是偶然的。他勤奋、坚韧、勇于冒险,不断学习和改进自己。他的成功也证明了,只要努力奋斗,任何人都有可能取得成功。 # 第三轮对话 3rd dialogue turn response, history = model.chat(tokenizer, "给这个故事起一个标题", history=history) print(response) # 《奋斗创业:一个年轻人的成功之路》 ``` 关于更多的使用说明,请参考我们的[GitHub repo](https://github.com/QwenLM/Qwen)获取更多信息。 For more information, please refer to our [GitHub repo](https://github.com/QwenLM/Qwen) for more information. <br> ## 量化 (Quantization) ### 用法 (Usage) **请注意:我们更新量化方案为基于[AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ)的量化,提供Qwen-14B-Chat的Int4量化模型[点击这里](https://huggingface.co/Qwen/Qwen-14B-Chat-Int4)。相比此前方案,该方案在模型评测效果几乎无损,且存储需求更低,推理速度更优。** **Note: we provide a new solution based on [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ), and release an Int4 quantized model for Qwen-14B-Chat [Click here](https://huggingface.co/Qwen/Qwen-14B-Chat-Int4), which achieves nearly lossless model effects but improved performance on both memory costs and inference speed, in comparison with the previous solution.** 以下我们提供示例说明如何使用Int4量化模型。在开始使用前,请先保证满足要求(如torch 2.0及以上,transformers版本为4.32.0及以上,等等),并安装所需安装包: Here we demonstrate how to use our provided quantized models for inference. Before you start, make sure you meet the requirements of auto-gptq (e.g., torch 2.0 and above, transformers 4.32.0 and above, etc.) and install the required packages: ```bash pip install auto-gptq optimum ``` 如安装`auto-gptq`遇到问题,我们建议您到官方[repo](https://github.com/PanQiWei/AutoGPTQ)搜索合适的预编译wheel。 随后即可使用和上述一致的用法调用量化模型: If you meet problems installing `auto-gptq`, we advise you to check out the official [repo](https://github.com/PanQiWei/AutoGPTQ) to find a pre-build wheel. Then you can load the quantized model easily and run inference as same as usual: ```python model = AutoModelForCausalLM.from_pretrained( "Qwen/Qwen-14B-Chat-Int4", device_map="auto", trust_remote_code=True ).eval() response, history = model.chat(tokenizer, "你好", history=None) ``` ### 效果评测 我们对BF16,Int8和Int4模型在基准评测上做了测试(使用zero-shot设置),发现量化模型效果损失较小,结果如下所示: We illustrate the zero-shot performance of both BF16, Int8 and Int4 models on the benchmark, and we find that the quantized model does not suffer from significant performance degradation. Results are shown below: | Quantization | MMLU | CEval (val) | GSM8K | Humaneval | |--------------|:----:|:-----------:|:-----:|:---------:| | BF16 | 64.6 | 69.8 | 60.1 | 43.9 | | Int8 | 63.6 | 68.6 | 60.0 | 48.2 | | Int4 | 63.3 | 69.0 | 59.8 | 45.7 | ### 推理速度 (Inference Speed) 我们测算了不同精度模型以及不同FlashAttn库版本下模型生成2048和8192个token的平均推理速度。如图所示: We measured the average inference speed of generating 2048 and 8192 tokens with different quantization levels and versions of flash-attention, respectively. | Quantization | FlashAttn | Speed (2048 tokens) | Speed (8192 tokens) | | ------------- | :-------: | :------------------:| :------------------:| | BF16 | v2 | 32.88 | 24.87 | | Int8 | v2 | 29.28 | 24.22 | | Int4 | v2 | 38.72 | 27.33 | | BF16 | v1 | 32.76 | 28.89 | | Int8 | v1 | 28.31 | 23.87 | | Int4 | v1 | 37.81 | 26.46 | | BF16 | Disabled | 29.32 | 22.91 | | Int8 | Disabled | 31.12 | 24.60 | | Int4 | Disabled | 37.65 | 26.00 | 具体而言,我们记录在长度为1的上下文的条件下生成8192个token的性能。评测运行于单张A100-SXM4-80G GPU,使用PyTorch 2.0.1和CUDA 11.8。推理速度是生成8192个token的速度均值。 In detail, the setting of profiling is generating 8192 new tokens with 1 context token. The profiling runs on a single A100-SXM4-80G GPU with PyTorch 2.0.1 and CUDA 11.8. The inference speed is averaged over the generated 8192 tokens. 注意:以上Int4/Int8模型生成速度使用autogptq库给出,当前``AutoModelForCausalLM.from_pretrained``载入的模型生成速度会慢大约20%。我们已经将该问题汇报给HuggingFace团队,若有解决方案将即时更新。 Note: The generation speed of the Int4/Int8 models mentioned above is provided by the autogptq library. The current speed of the model loaded using "AutoModelForCausalLM.from_pretrained" will be approximately 20% slower. We have reported this issue to the HuggingFace team and will update it promptly if a solution is available. ### 显存使用 (GPU Memory Usage) 我们还测算了不同模型精度编码2048个token及生成8192个token的峰值显存占用情况。(显存消耗在是否使用FlashAttn的情况下均类似。)结果如下所示: We also profile the peak GPU memory usage for encoding 2048 tokens as context (and generating single token) and generating 8192 tokens (with single token as context) under different quantization levels, respectively. (The GPU memory usage is similar when using flash-attention or not.)The results are shown below. | Quantization Level | Peak Usage for Encoding 2048 Tokens | Peak Usage for Generating 8192 Tokens | | ------------------ | :---------------------------------: | :-----------------------------------: | | BF16 | 30.15GB | 38.94GB | | Int8 | 18.81GB | 27.54GB | | Int4 | 13.01GB | 21.79GB | 上述性能测算使用[此脚本](https://qianwen-res.oss-cn-beijing.aliyuncs.com/profile.py)完成。 The above speed and memory profiling are conducted using [this script](https://qianwen-res.oss-cn-beijing.aliyuncs.com/profile.py). <br> ## 模型细节(Model) 与Qwen-14B预训练模型相同,Qwen-14B-Chat模型规模基本情况如下所示 The details of the model architecture of Qwen-14B-Chat are listed as follows | Hyperparameter | Value | |:----------------|:------:| | n_layers | 40 | | n_heads | 40 | | d_model | 5120 | | vocab size | 151851 | | sequence length | 2048 | 在位置编码、FFN激活函数和normalization的实现方式上,我们也采用了目前最流行的做法, 即RoPE相对位置编码、SwiGLU激活函数、RMSNorm(可选安装flash-attention加速)。 在分词器方面,相比目前主流开源模型以中英词表为主,Qwen-14B-Chat使用了约15万token大小的词表。 该词表在GPT-4使用的BPE词表`cl100k_base`基础上,对中文、多语言进行了优化,在对中、英、代码数据的高效编解码的基础上,对部分多语言更加友好,方便用户在不扩展词表的情况下对部分语种进行能力增强。 词表对数字按单个数字位切分。调用较为高效的[tiktoken分词库](https://github.com/openai/tiktoken)进行分词。 For position encoding, FFN activation function, and normalization calculation methods, we adopt the prevalent practices, i.e., RoPE relative position encoding, SwiGLU for activation function, and RMSNorm for normalization (optional installation of flash-attention for acceleration). For tokenization, compared to the current mainstream open-source models based on Chinese and English vocabularies, Qwen-14B-Chat uses a vocabulary of over 150K tokens. It first considers efficient encoding of Chinese, English, and code data, and is also more friendly to multilingual languages, enabling users to directly enhance the capability of some languages without expanding the vocabulary. It segments numbers by single digit, and calls the [tiktoken](https://github.com/openai/tiktoken) tokenizer library for efficient tokenization. <br> ## 评测效果(Evaluation) 对于Qwen-14B-Chat模型,我们同样评测了常规的中文理解(C-Eval)、英文理解(MMLU)、代码(HumanEval)和数学(GSM8K)等权威任务,同时包含了长序列任务的评测结果。由于Qwen-14B-Chat模型经过对齐后,激发了较强的外部系统调用能力,我们还进行了工具使用能力方面的评测。 提示:由于硬件和框架造成的舍入误差,复现结果如有波动属于正常现象。 For Qwen-14B-Chat, we also evaluate the model on C-Eval, MMLU, HumanEval, GSM8K, etc., as well as the benchmark evaluation for long-context understanding, and tool usage. Note: Due to rounding errors caused by hardware and framework, differences in reproduced results are possible. ### 中文评测(Chinese Evaluation) #### C-Eval 在[C-Eval](https://arxiv.org/abs/2305.08322)验证集上,我们评价了Qwen-14B-Chat模型的0-shot & 5-shot准确率 We demonstrate the 0-shot & 5-shot accuracy of Qwen-14B-Chat on C-Eval validation set | Model | Avg. Acc. | |:--------------------------------:|:---------:| | LLaMA2-7B-Chat | 31.9 | | LLaMA2-13B-Chat | 36.2 | | LLaMA2-70B-Chat | 44.3 | | ChatGLM2-6B-Chat | 52.6 | | InternLM-7B-Chat | 53.6 | | Baichuan2-7B-Chat | 55.6 | | Baichuan2-13B-Chat | 56.7 | | Qwen-7B-Chat (original) (0-shot) | 54.2 | | **Qwen-7B-Chat (0-shot)** | 59.7 | | **Qwen-7B-Chat (5-shot)** | 59.3 | | **Qwen-14B-Chat (0-shot)** | 69.8 | | **Qwen-14B-Chat (5-shot)** | **71.7** | C-Eval测试集上,Qwen-14B-Chat模型的zero-shot准确率结果如下: The zero-shot accuracy of Qwen-14B-Chat on C-Eval testing set is provided below: | Model | Avg. | STEM | Social Sciences | Humanities | Others | | :---------------------- | :------: | :--: | :-------------: | :--------: | :----: | | Chinese-Alpaca-Plus-13B | 41.5 | 36.6 | 49.7 | 43.1 | 41.2 | | Chinese-Alpaca-2-7B | 40.3 | - | - | - | - | | ChatGLM2-6B-Chat | 50.1 | 46.4 | 60.4 | 50.6 | 46.9 | | Baichuan-13B-Chat | 51.5 | 43.7 | 64.6 | 56.2 | 49.2 | | Qwen-7B-Chat (original) | 54.6 | 47.8 | 67.6 | 59.3 | 50.6 | | **Qwen-7B-Chat** | 58.6 | 53.3 | 72.1 | 62.8 | 52.0 | | **Qwen-14B-Chat** | **69.1** | 65.1 | 80.9 | 71.2 | 63.4 | 在14B规模模型上,经过人类指令对齐的Qwen-14B-Chat模型,准确率在同类相近规模模型中仍然处于前列。 Compared with other pretrained models with comparable model size, the human-aligned Qwen-14B-Chat performs well in C-Eval accuracy. ### 英文评测(English Evaluation) #### MMLU [MMLU](https://arxiv.org/abs/2009.03300)评测集上,Qwen-14B-Chat模型的 0-shot & 5-shot 准确率如下,效果同样在同类对齐模型中同样表现较优。 The 0-shot & 5-shot accuracy of Qwen-14B-Chat on MMLU is provided below. The performance of Qwen-14B-Chat still on the top between other human-aligned models with comparable size. | Model | Avg. Acc. | |:--------------------------------:|:---------:| | ChatGLM2-6B-Chat | 46.0 | | LLaMA2-7B-Chat | 46.2 | | InternLM-7B-Chat | 51.1 | | Baichuan2-7B-Chat | 52.9 | | LLaMA2-13B-Chat | 54.6 | | Baichuan2-13B-Chat | 57.3 | | LLaMA2-70B-Chat | 63.8 | | Qwen-7B-Chat (original) (0-shot) | 53.9 | | **Qwen-7B-Chat (0-shot)** | 55.8 | | **Qwen-7B-Chat (5-shot)** | 57.0 | | **Qwen-14B-Chat (0-shot)** | 64.6 | | **Qwen-14B-Chat (5-shot)** | **66.5** | ### 代码评测(Coding Evaluation) Qwen-14B-Chat在[HumanEval](https://github.com/openai/human-eval)的zero-shot Pass@1效果如下 The zero-shot Pass@1 of Qwen-14B-Chat on [HumanEval](https://github.com/openai/human-eval) is demonstrated below | Model | Pass@1 | |:-----------------------:|:--------:| | ChatGLM2-6B-Chat | 11.0 | | LLaMA2-7B-Chat | 12.2 | | InternLM-7B-Chat | 14.6 | | Baichuan2-7B-Chat | 13.4 | | LLaMA2-13B-Chat | 18.9 | | Baichuan2-13B-Chat | 17.7 | | LLaMA2-70B-Chat | 32.3 | | Qwen-7B-Chat (original) | 24.4 | | **Qwen-7B-Chat** | 37.2 | | **Qwen-14B-Chat** | **43.9** | ### 数学评测(Mathematics Evaluation) 在评测数学能力的[GSM8K](https://github.com/openai/grade-school-math)上,Qwen-14B-Chat的准确率结果如下 The accuracy of Qwen-14B-Chat on GSM8K is shown below | Model | Acc. | |:--------------------------------:|:--------:| | LLaMA2-7B-Chat | 26.3 | | ChatGLM2-6B-Chat | 28.8 | | Baichuan2-7B-Chat | 32.8 | | InternLM-7B-Chat | 33.0 | | LLaMA2-13B-Chat | 37.1 | | Baichuan2-13B-Chat | 55.3 | | LLaMA2-70B-Chat | 59.3 | | Qwen-7B-Chat (original) (0-shot) | 41.1 | | **Qwen-7B-Chat (0-shot)** | 50.3 | | **Qwen-7B-Chat (8-shot)** | 54.1 | | **Qwen-14B-Chat (0-shot)** | **60.1** | | **Qwen-14B-Chat (8-shot)** | 59.3 | ### 长序列评测(Long-Context Understanding) 通过NTK插值,LogN注意力缩放可以扩展Qwen-14B-Chat的上下文长度。在长文本摘要数据集[VCSUM](https://arxiv.org/abs/2305.05280)上(文本平均长度在15K左右),Qwen-14B-Chat的Rouge-L结果如下: **(若要启用这些技巧,请将config.json里的`use_dynamic_ntk`和`use_logn_attn`设置为true)** We introduce NTK-aware interpolation, LogN attention scaling to extend the context length of Qwen-14B-Chat. The Rouge-L results of Qwen-14B-Chat on long-text summarization dataset [VCSUM](https://arxiv.org/abs/2305.05280) (The average length of this dataset is around 15K) are shown below: **(To use these tricks, please set `use_dynamic_ntk` and `use_long_attn` to true in config.json.)** | Model | VCSUM (zh) | |:------------------|:----------:| | GPT-3.5-Turbo-16k | 16.0 | | LLama2-7B-Chat | 0.2 | | InternLM-7B-Chat | 13.0 | | ChatGLM2-6B-Chat | 16.3 | | **Qwen-14B-Chat** | **17.3** | ### 工具使用能力的评测(Tool Usage) #### ReAct Prompting 千问支持通过 [ReAct Prompting](https://arxiv.org/abs/2210.03629) 调用插件/工具/API。ReAct 也是 [LangChain](https://python.langchain.com/) 框架采用的主要方式之一。在我们开源的、用于评估工具使用能力的评测基准上,千问的表现如下: Qwen-Chat supports calling plugins/tools/APIs through [ReAct Prompting](https://arxiv.org/abs/2210.03629). ReAct is also one of the main approaches used by the [LangChain](https://python.langchain.com/) framework. In our evaluation benchmark for assessing tool usage capabilities, Qwen-Chat's performance is as follows: <table> <tr> <th colspan="4" align="center">Chinese Tool-Use Benchmark</th> </tr> <tr> <th align="center">Model</th><th align="center">Tool Selection (Acc.↑)</th><th align="center">Tool Input (Rouge-L↑)</th><th align="center">False Positive Error↓</th> </tr> <tr> <td>GPT-4</td><td align="center">95%</td><td align="center">0.90</td><td align="center">15.0%</td> </tr> <tr> <td>GPT-3.5</td><td align="center">85%</td><td align="center">0.88</td><td align="center">75.0%</td> </tr> <tr> <td>Qwen-7B-Chat</td><td align="center">98%</td><td align="center">0.91</td><td align="center">7.3%</td> </tr> <tr> <td>Qwen-14B-Chat</td><td align="center">98%</td><td align="center">0.93</td><td align="center">2.4%</td> </tr> </table> > 评测基准中出现的插件均没有出现在千问的训练集中。该基准评估了模型在多个候选插件中选择正确插件的准确率、传入插件的参数的合理性、以及假阳率。假阳率(False Positive)定义:在处理不该调用插件的请求时,错误地调用了插件。 > The plugins that appear in the evaluation set do not appear in the training set of Qwen. This benchmark evaluates the accuracy of the model in selecting the correct plugin from multiple candidate plugins, the rationality of the parameters passed into the plugin, and the false positive rate. False Positive: Incorrectly invoking a plugin when it should not have been called when responding to a query. ![](assets/react_showcase_001.png) ![](assets/react_showcase_002.png) #### Code Interpreter 为了考察Qwen使用Python Code Interpreter完成数学解题、数据可视化、及文件处理与爬虫等任务的能力,我们专门建设并开源了一个评测这方面能力的[评测基准](https://github.com/QwenLM/Qwen-Agent/tree/main/benchmark)。 我们发现Qwen在生成代码的可执行率、结果正确性上均表现较好: To assess Qwen's ability to use the Python Code Interpreter for tasks such as mathematical problem solving, data visualization, and other general-purpose tasks such as file handling and web scraping, we have created and open-sourced a benchmark specifically designed for evaluating these capabilities. You can find the benchmark at this [link](https://github.com/QwenLM/Qwen-Agent/tree/main/benchmark). We have observed that Qwen performs well in terms of code executability and result accuracy when generating code: <table> <tr> <th colspan="4" align="center">Executable Rate of Generated Code (%)</th> </tr> <tr> <th align="center">Model</th><th align="center">Math↑</th><th align="center">Visualization↑</th><th align="center">General↑</th> </tr> <tr> <td>GPT-4</td><td align="center">91.9</td><td align="center">85.9</td><td align="center">82.8</td> </tr> <tr> <td>GPT-3.5</td><td align="center">89.2</td><td align="center">65.0</td><td align="center">74.1</td> </tr> <tr> <td>LLaMA2-7B-Chat</td> <td align="center">41.9</td> <td align="center">33.1</td> <td align="center">24.1 </td> </tr> <tr> <td>LLaMA2-13B-Chat</td> <td align="center">50.0</td> <td align="center">40.5</td> <td align="center">48.3 </td> </tr> <tr> <td>CodeLLaMA-7B-Instruct</td> <td align="center">85.1</td> <td align="center">54.0</td> <td align="center">70.7 </td> </tr> <tr> <td>CodeLLaMA-13B-Instruct</td> <td align="center">93.2</td> <td align="center">55.8</td> <td align="center">74.1 </td> </tr> <tr> <td>InternLM-7B-Chat-v1.1</td> <td align="center">78.4</td> <td align="center">44.2</td> <td align="center">62.1 </td> </tr> <tr> <td>InternLM-20B-Chat</td> <td align="center">70.3</td> <td align="center">44.2</td> <td align="center">65.5 </td> </tr> <tr> <td>Qwen-7B-Chat</td> <td align="center">82.4</td> <td align="center">64.4</td> <td align="center">67.2 </td> </tr> <tr> <td>Qwen-14B-Chat</td> <td align="center">89.2</td> <td align="center">84.1</td> <td align="center">65.5</td> </tr> </table> <table> <tr> <th colspan="4" align="center">Accuracy of Code Execution Results (%)</th> </tr> <tr> <th align="center">Model</th><th align="center">Math↑</th><th align="center">Visualization-Hard↑</th><th align="center">Visualization-Easy↑</th> </tr> <tr> <td>GPT-4</td><td align="center">82.8</td><td align="center">66.7</td><td align="center">60.8</td> </tr> <tr> <td>GPT-3.5</td><td align="center">47.3</td><td align="center">33.3</td><td align="center">55.7</td> </tr> <tr> <td>LLaMA2-7B-Chat</td> <td align="center">3.9</td> <td align="center">14.3</td> <td align="center">39.2 </td> </tr> <tr> <td>LLaMA2-13B-Chat</td> <td align="center">8.3</td> <td align="center">8.3</td> <td align="center">40.5 </td> </tr> <tr> <td>CodeLLaMA-7B-Instruct</td> <td align="center">14.3</td> <td align="center">26.2</td> <td align="center">60.8 </td> </tr> <tr> <td>CodeLLaMA-13B-Instruct</td> <td align="center">28.2</td> <td align="center">27.4</td> <td align="center">62.0 </td> </tr> <tr> <td>InternLM-7B-Chat-v1.1</td> <td align="center">28.5</td> <td align="center">4.8</td> <td align="center">40.5 </td> </tr> <tr> <td>InternLM-20B-Chat</td> <td align="center">34.6</td> <td align="center">21.4</td> <td align="center">45.6 </td> </tr> <tr> <td>Qwen-7B-Chat</td> <td align="center">41.9</td> <td align="center">40.5</td> <td align="center">54.4 </td> </tr> <tr> <td>Qwen-14B-Chat</td> <td align="center">58.4</td> <td align="center">53.6</td> <td align="center">59.5</td> </tr> </table> <p align="center"> <br> <img src="assets/code_interpreter_showcase_001.jpg" /> <br> <p> #### Huggingface Agent 千问还具备作为 [HuggingFace Agent](https://huggingface.co/docs/transformers/transformers_agents) 的能力。它在 Huggingface 提供的run模式评测基准上的表现如下: Qwen-Chat also has the capability to be used as a [HuggingFace Agent](https://huggingface.co/docs/transformers/transformers_agents). Its performance on the run-mode benchmark provided by HuggingFace is as follows: <table> <tr> <th colspan="4" align="center">HuggingFace Agent Benchmark- Run Mode</th> </tr> <tr> <th align="center">Model</th><th align="center">Tool Selection↑</th><th align="center">Tool Used↑</th><th align="center">Code↑</th> </tr> <tr> <td>GPT-4</td><td align="center">100</td><td align="center">100</td><td align="center">97.4</td> </tr> <tr> <td>GPT-3.5</td><td align="center">95.4</td><td align="center">96.3</td><td align="center">87.0</td> </tr> <tr> <td>StarCoder-Base-15B</td><td align="center">86.1</td><td align="center">87.0</td><td align="center">68.9</td> </tr> <tr> <td>StarCoder-15B</td><td align="center">87.0</td><td align="center">88.0</td><td align="center">68.9</td> </tr> <tr> <td>Qwen-7B-Chat</td><td align="center">87.0</td><td align="center">87.0</td><td align="center">71.5</td> </tr> <tr> <td>Qwen-14B-Chat</td><td align="center">93.5</td><td align="center">94.4</td><td align="center">87.0</td> </tr> </table> <table> <tr> <th colspan="4" align="center">HuggingFace Agent Benchmark - Chat Mode</th> </tr> <tr> <th align="center">Model</th><th align="center">Tool Selection↑</th><th align="center">Tool Used↑</th><th align="center">Code↑</th> </tr> <tr> <td>GPT-4</td><td align="center">97.9</td><td align="center">97.9</td><td align="center">98.5</td> </tr> <tr> <td>GPT-3.5</td><td align="center">97.3</td><td align="center">96.8</td><td align="center">89.6</td> </tr> <tr> <td>StarCoder-Base-15B</td><td align="center">97.9</td><td align="center">97.9</td><td align="center">91.1</td> </tr> <tr> <td>StarCoder-15B</td><td align="center">97.9</td><td align="center">97.9</td><td align="center">89.6</td> </tr> <tr> <td>Qwen-7B-Chat</td><td align="center">94.7</td><td align="center">94.7</td><td align="center">85.1</td> </tr> <tr> <td>Qwen-14B-Chat</td><td align="center">97.9</td><td align="center">97.9</td><td align="center">95.5</td> </tr> </table> <br> ## FAQ 如遇到问题,敬请查阅[FAQ](https://github.com/QwenLM/Qwen/blob/main/FAQ_zh.md)以及issue区,如仍无法解决再提交issue。 If you meet problems, please refer to [FAQ](https://github.com/QwenLM/Qwen/blob/main/FAQ.md) and the issues first to search a solution before you launch a new issue. <br> ## 引用 (Citation) 如果你觉得我们的工作对你有帮助,欢迎引用! If you find our work helpful, feel free to give us a cite. ``` @article{qwen, title={Qwen Technical Report}, author={Jinze Bai and Shuai Bai and Yunfei Chu and Zeyu Cui and Kai Dang and Xiaodong Deng and Yang Fan and Wenbin Ge and Yu Han and Fei Huang and Binyuan Hui and Luo Ji and Mei Li and Junyang Lin and Runji Lin and Dayiheng Liu and Gao Liu and Chengqiang Lu and Keming Lu and Jianxin Ma and Rui Men and Xingzhang Ren and Xuancheng Ren and Chuanqi Tan and Sinan Tan and Jianhong Tu and Peng Wang and Shijie Wang and Wei Wang and Shengguang Wu and Benfeng Xu and Jin Xu and An Yang and Hao Yang and Jian Yang and Shusheng Yang and Yang Yao and Bowen Yu and Hongyi Yuan and Zheng Yuan and Jianwei Zhang and Xingxuan Zhang and Yichang Zhang and Zhenru Zhang and Chang Zhou and Jingren Zhou and Xiaohuan Zhou and Tianhang Zhu}, journal={arXiv preprint arXiv:2309.16609}, year={2023} } ``` <br> ## 使用协议(License Agreement) 我们的代码和模型权重对学术研究完全开放,并支持商用。请查看[LICENSE](https://github.com/QwenLM/Qwen/blob/main/LICENSE)了解具体的开源协议细节。如需商用,欢迎填写[问卷](https://dashscope.console.aliyun.com/openModelApply/qianwen)申请。 Our code and checkpoints are open to research purpose, and they are allowed for commercial purposes. Check [LICENSE](https://github.com/QwenLM/Qwen/blob/main/LICENSE) for more details about the license. If you have requirements for commercial use, please fill out the [form](https://dashscope.console.aliyun.com/openModelApply/qianwen) to apply. <br> ## 联系我们(Contact Us) 如果你想给我们的研发团队和产品团队留言,欢迎加入我们的微信群、钉钉群以及Discord!同时,也欢迎通过邮件(qianwen_opensource@alibabacloud.com)联系我们。 If you are interested to leave a message to either our research team or product team, join our Discord or WeChat groups! Also, feel free to send an email to qianwen_opensource@alibabacloud.com.
Locutusque/gpt2-xl-conversational
Locutusque
"2023-11-21T17:17:46Z"
84,129
12
transformers
[ "transformers", "pytorch", "safetensors", "gpt2", "text-generation", "en", "dataset:Locutusque/InstructMix", "doi:10.57967/hf/1371", "license:mit", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
"2023-08-21T04:43:31Z"
--- license: mit datasets: - Locutusque/InstructMix language: - en metrics: - bleu - perplexity - loss - accuracy pipeline_tag: text-generation widget: - text: >- <|USER|> Design a Neo4j database and Cypher function snippet to Display Extreme Dental hygiene: Using Mouthwash for Analysis for Beginners. Implement if/else or switch/case statements to handle different conditions related to the Consent. Provide detailed comments explaining your control flow and the reasoning behind each decision. <|ASSISTANT|> - text: >- <|USER|> Write me a story about a magical place. <|ASSISTANT|> - text: >- <|USER|> Write me an essay about the life of George Washington <|ASSISTANT|> - text: >- <|USER|> Solve the following equation 2x + 10 = 20 <|ASSISTANT|> - text: >- <|USER|> Craft me a list of some nice places to visit around the world. <|ASSISTANT|> - text: >- <|USER|> How to manage a lazy employee: Address the employee verbally. Don't allow an employee's laziness or lack of enthusiasm to become a recurring issue. Tell the employee you're hoping to speak with them about workplace expectations and performance, and schedule a time to sit down together. Question: To manage a lazy employee, it is suggested to talk to the employee. True, False, or Neither? <|ASSISTANT|> inference: parameters: temperature: 0.8 do_sample: True top_p: 0.14 top_k: 41 max_new_tokens: 250 repetition_penalty: 1.176 --- # Model Card ## Model Details - Model Name: gpt2-xl-conversational - Model Type: Language Modeling - Task: Generating Conversational Responses - Hardware: 1x Nvidia Titan V - Description: This model is trained on a dataset of conversations between a user and an AI assistant, with the goal of generating a coherent and relevant response to the user's input. It uses the GPT-2 architecture, a state-of-the-art transformer-based language model that is capable of generating high-quality text with a wide range of styles and tones. The model is fine-tuned on the conversational data using maximum likelihood estimation, and is evaluated based on its ability to generate responses that are both grammatically correct and semantically relevant to the user's input. ## Intended Use This model is intended to be used for generating conversational responses in a variety of contexts, such as chatbots, virtual assistants, and customer service applications. It is designed to provide natural and engaging responses to user input, with a focus on maintaining a consistent tone and style throughout the conversation. The model is suitable for use in both text-based and voice-based interfaces, and can be easily integrated into existing applications using the PyTorch and Transformers frameworks. ## Training Data The model is trained on a large dataset of conversational data, consisting of interactions between users and an AI assistant. The data is preprocessed to remove any sensitive information and is formatted in a way that is suitable for training a language model. The training data is split into a training set and a validation set, with the training set used to update the model parameters and the validation set used to evaluate the model performance. The model was trained on 300,000 examples and achieved excellent metrics. ## Model Architecture The model architecture used in this model is GPT-2, a transformer-based language model that is capable of generating high-quality text with a wide range of styles and tones. The GPT-2 architecture consists of a multi-layered decoder-only transformer, with self-attention mechanisms that allow the model to capture long-term dependencies and generate coherent text. ## Evaluation Metrics The model is evaluated based on several metrics, including loss, reward, penalty, BLEU score, and perplexity. The loss metric is calculated during training and reflects the difference between the predicted output and the actual output. The reward metric is based on the number of correct words generated by the model, while the penalty metric penalizes the model for repeating words consecutively. The BLEU score measures the similarity between the generated text and the ground truth text, while the perplexity metric measures how well the model is able to predict the next word in a sequence. During training, the model achieved the following metrics: - BLEU score: 52 - Accuracy: 53 - perplexity: 4.3 Evaluation metrics: | Task |Version|Metric|Value| |Stderr| |--------|------:|------|----:|---|-----:| |pubmedqa| 0|acc |0.536|± |0.0223 |arc_challenge| 0|acc_norm |0.2867|± |0.0132| |arc_easy | 0|acc |0.5804|± |0.0101| |arc_easy | 0|acc_norm|0.5707|±|0.0102| |winogrande| 0|acc |0.5691|± |0.0139| |truthfulqa_mc| 1|mc2 |0.3918|± |0.0144| |anli_r1| 0|acc |0.338|± |0.0150| |anli_r2| 0|acc |0.346|± |0.0151| |anli_r3| 0|acc |0.355|± |0.0138| |drop| 1|f1 |0.0034|± |0.0004| |hendrycksTest-abstract_algebra | 1|acc | 0.32|± |0.0952| |hendrycksTest-anatomy | 1|acc | 0.44|± |0.1013| |hendrycksTest-astronomy | 1|acc | 0.24|± |0.0872| |hendrycksTest-business_ethics | 1|acc | 0.24|± |0.0872| |hendrycksTest-clinical_knowledge | 1|acc | 0.24|± |0.0872| |hendrycksTest-college_biology | 1|acc | 0.20|± |0.0816| |hendrycksTest-college_chemistry | 1|acc | 0.40|± |0.1000| |hendrycksTest-college_computer_science | 1|acc | 0.36|± |0.0980| |hendrycksTest-college_mathematics | 1|acc | 0.48|± |0.1020| |hendrycksTest-college_medicine | 1|acc | 0.20|± |0.0816| |hendrycksTest-college_physics | 1|acc | 0.44|± |0.1013| |hendrycksTest-computer_security | 1|acc | 0.16|± |0.0748| |hendrycksTest-conceptual_physics | 1|acc | 0.12|± |0.0663| |hendrycksTest-econometrics | 1|acc | 0.16|± |0.0748| |hendrycksTest-electrical_engineering | 1|acc | 0.28|± |0.0917| |hendrycksTest-elementary_mathematics | 1|acc | 0.36|± |0.0980| |hendrycksTest-formal_logic | 1|acc | 0.44|± |0.1013| |hendrycksTest-global_facts | 1|acc | 0.20|± |0.0816| |hendrycksTest-high_school_biology | 1|acc | 0.20|± |0.0816| |hendrycksTest-high_school_chemistry | 1|acc | 0.28|± |0.0917| |hendrycksTest-high_school_computer_science | 1|acc | 0.24|± |0.0872| |hendrycksTest-high_school_european_history | 1|acc | 0.32|± |0.0952| |hendrycksTest-high_school_geography | 1|acc | 0.32|± |0.0952| |hendrycksTest-high_school_government_and_politics| 1|acc | 0.28|± |0.0917| |hendrycksTest-high_school_macroeconomics | 1|acc | 0.28|± |0.0917| |hendrycksTest-high_school_mathematics | 1|acc | 0.20|± |0.0816| |hendrycksTest-high_school_microeconomics | 1|acc | 0.24|± |0.0872| |hendrycksTest-high_school_physics | 1|acc | 0.28|± |0.0917| |hendrycksTest-high_school_psychology | 1|acc | 0.32|± |0.0952| |hendrycksTest-high_school_statistics | 1|acc | 0.40|± |0.1000| |hendrycksTest-high_school_us_history | 1|acc | 0.32|± |0.0952| |hendrycksTest-high_school_world_history | 1|acc | 0.36|± |0.0980|| |hendrycksTest-human_aging | 1|acc | 0.16|± |0.0748| |hendrycksTest-human_sexuality | 1|acc | 0.40|± |0.1000| |hendrycksTest-international_law | 1|acc | 0.24|± |0.0872| |hendrycksTest-jurisprudence | 1|acc | 0.08|± |0.0554| |hendrycksTest-logical_fallacies | 1|acc | 0.52|± |0.1020| |hendrycksTest-machine_learning | 1|acc | 0.12|± |0.0663| |hendrycksTest-management | 1|acc | 0.12|± |0.0663| |hendrycksTest-marketing | 1|acc | 0.16|± |0.0748| |hendrycksTest-medical_genetics | 1|acc | 0.12|± |0.0663| |hendrycksTest-miscellaneous | 1|acc | 0.36|± |0.0980| |hendrycksTest-moral_disputes | 1|acc | 0.08|± |0.0554| |hendrycksTest-moral_scenarios | 1|acc | 0.44|± |0.1013| |hendrycksTest-nutrition | 1|acc | 0.32|± |0.0952| |hendrycksTest-philosophy | 1|acc | 0.44|± |0.1013| |hendrycksTest-prehistory | 1|acc | 0.16|± |0.0748| |hendrycksTest-professional_accounting | 1|acc | 0.28|± |0.0917| |hendrycksTest-professional_law | 1|acc | 0.12|± |0.0663| |hendrycksTest-professional_medicine | 1|acc | 0.40|± |0.1000| |hendrycksTest-professional_psychology | 1|acc | 0.24|± |0.0872| |hendrycksTest-public_relations | 1|acc | 0.08|± |0.0554| |hendrycksTest-security_studies | 1|acc | 0.24|± |0.0872| |hendrycksTest-sociology | 1|acc | 0.28|± |0.0917| |hendrycksTest-us_foreign_policy | 1|acc | 0.24|± |0.0872| |hendrycksTest-virology | 1|acc | 0.20|± |0.0816| |hendrycksTest-world_religions | 1|acc | 0.16|± |0.0748| ## Limitations and Bias This model is not suitable for all use cases due to its limited training time on a weak computer. As a result, it may produce irrelevant or nonsensical responses. For optimal performance, I recommend using a GPU with at least 16 GB of VRAM and downloading the model manually instead of using the Transformers library. Here's how you should deploy the model: ```python import torch from transformers import GPT2LMHeadModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("Locutusque/gpt2-xl-conversational") model = GPT2LMHeadModel.from_pretrained("Locutusque/gpt2-xl-conversational", torch_dtype=torch.float16) model.resize_token_embeddings(len(tokenizer)) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model.to(device, dtype=torch.float32) def generate_text(model: SENTIAForCausalLM, tokenizer, prompt, max_length=256): prompt = f'<|USER|> {prompt} <|ASSISTANT|> ' input_ids = tokenizer.encode(prompt, add_special_tokens=True, max_length=max_length, truncation=True, return_tensors="pt").to(device) output = model.generate(input_ids, do_sample=True, temperature=0.3, top_p=0.7, top_k=23, repetition_penalty=1.176, max_length=max_length, pad_token_id=tokenizer.pad_token_id, eos_token_id=tokenizer.eos_token_id) output_ids = tokenizer.decode(output[0], skip_special_tokens=False) return output_ids # Loop to interact with the model while True: prompt = input("Enter a prompt (or 'q' to quit): ") if prompt == "q": break output_text = generate_text(model, tokenizer, prompt, max_length=1022) print(output_text) ``` ## Deploying and training the model The model has been fine-tuned on a specific input format that goes like this ```"<|USER|> {user prompt} <|ASSISTANT|> {model prediction} ".```
akahana/asl-vit
akahana
"2023-09-15T01:30:29Z"
83,965
3
transformers
[ "transformers", "pytorch", "safetensors", "vit", "image-classification", "autotrain_compatible", "endpoints_compatible", "region:us" ]
image-classification
"2022-03-02T23:29:05Z"
Entry not found
3una/finetuned-AffectNet
3una
"2024-01-05T16:41:40Z"
83,938
0
transformers
[ "transformers", "tensorboard", "safetensors", "beit", "image-classification", "generated_from_trainer", "base_model:microsoft/beit-base-patch16-224-pt22k-ft22k", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
image-classification
"2023-12-31T20:45:06Z"
--- license: apache-2.0 base_model: microsoft/beit-base-patch16-224-pt22k-ft22k tags: - generated_from_trainer metrics: - accuracy model-index: - name: finetuned-AffectNet 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. --> # finetuned-AffectNet This model is a fine-tuned version of [microsoft/beit-base-patch16-224-pt22k-ft22k](https://huggingface.co/microsoft/beit-base-patch16-224-pt22k-ft22k) on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.8122 - Accuracy: 0.7345 ## 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-06 - train_batch_size: 32 - eval_batch_size: 32 - seed: 42 - gradient_accumulation_steps: 4 - total_train_batch_size: 128 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_ratio: 0.1 - num_epochs: 100 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:-----:|:---------------:|:--------:| | 2.0686 | 1.0 | 163 | 2.0963 | 0.1549 | | 1.7148 | 2.0 | 327 | 1.7250 | 0.2943 | | 1.4591 | 3.0 | 490 | 1.4418 | 0.4204 | | 1.3351 | 4.0 | 654 | 1.2648 | 0.5194 | | 1.1343 | 5.0 | 817 | 1.0728 | 0.5908 | | 1.1022 | 6.0 | 981 | 0.9741 | 0.6355 | | 1.0476 | 7.0 | 1144 | 0.9203 | 0.6631 | | 1.0049 | 8.0 | 1308 | 0.8769 | 0.6760 | | 0.9561 | 9.0 | 1471 | 0.8438 | 0.6966 | | 0.9409 | 10.0 | 1635 | 0.8283 | 0.6988 | | 0.9419 | 11.0 | 1798 | 0.7867 | 0.7164 | | 0.89 | 12.0 | 1962 | 0.7858 | 0.7139 | | 0.8761 | 13.0 | 2125 | 0.7704 | 0.7147 | | 0.8662 | 14.0 | 2289 | 0.7590 | 0.7225 | | 0.8561 | 15.0 | 2452 | 0.7574 | 0.7199 | | 0.8234 | 16.0 | 2616 | 0.7457 | 0.7238 | | 0.844 | 17.0 | 2779 | 0.7416 | 0.7255 | | 0.7908 | 18.0 | 2943 | 0.7485 | 0.7255 | | 0.809 | 19.0 | 3106 | 0.7428 | 0.7250 | | 0.7976 | 20.0 | 3270 | 0.7597 | 0.7203 | | 0.7691 | 21.0 | 3433 | 0.7333 | 0.7345 | | 0.7408 | 22.0 | 3597 | 0.7362 | 0.7246 | | 0.7516 | 23.0 | 3760 | 0.7301 | 0.7298 | | 0.7887 | 24.0 | 3924 | 0.7263 | 0.7332 | | 0.7475 | 25.0 | 4087 | 0.7301 | 0.7293 | | 0.7619 | 26.0 | 4251 | 0.7334 | 0.7298 | | 0.7509 | 27.0 | 4414 | 0.7332 | 0.7345 | | 0.7212 | 28.0 | 4578 | 0.7301 | 0.7367 | | 0.7053 | 29.0 | 4741 | 0.7293 | 0.7328 | | 0.6634 | 30.0 | 4905 | 0.7412 | 0.7298 | | 0.677 | 31.0 | 5068 | 0.7221 | 0.7375 | | 0.6453 | 32.0 | 5232 | 0.7281 | 0.7392 | | 0.6961 | 33.0 | 5395 | 0.7280 | 0.7392 | | 0.7135 | 34.0 | 5559 | 0.7348 | 0.7362 | | 0.6871 | 35.0 | 5722 | 0.7334 | 0.7293 | | 0.6829 | 36.0 | 5886 | 0.7281 | 0.7328 | | 0.6742 | 37.0 | 6049 | 0.7332 | 0.7354 | | 0.6167 | 38.0 | 6213 | 0.7274 | 0.7384 | | 0.665 | 39.0 | 6376 | 0.7322 | 0.7311 | | 0.6433 | 40.0 | 6540 | 0.7473 | 0.7345 | | 0.6661 | 41.0 | 6703 | 0.7358 | 0.7341 | | 0.6424 | 42.0 | 6867 | 0.7413 | 0.7324 | | 0.6369 | 43.0 | 7030 | 0.7314 | 0.7414 | | 0.611 | 44.0 | 7194 | 0.7325 | 0.7388 | | 0.6556 | 45.0 | 7357 | 0.7485 | 0.7354 | | 0.6524 | 46.0 | 7521 | 0.7434 | 0.7418 | | 0.6176 | 47.0 | 7684 | 0.7402 | 0.7410 | | 0.6142 | 48.0 | 7848 | 0.7480 | 0.7315 | | 0.5968 | 49.0 | 8011 | 0.7457 | 0.7384 | | 0.6132 | 50.0 | 8175 | 0.7514 | 0.7328 | | 0.592 | 51.0 | 8338 | 0.7500 | 0.7375 | | 0.6347 | 52.0 | 8502 | 0.7533 | 0.7345 | | 0.5976 | 53.0 | 8665 | 0.7539 | 0.7324 | | 0.5496 | 54.0 | 8829 | 0.7495 | 0.7388 | | 0.5845 | 55.0 | 8992 | 0.7550 | 0.7367 | | 0.5624 | 56.0 | 9156 | 0.7606 | 0.7362 | | 0.5582 | 57.0 | 9319 | 0.7598 | 0.7341 | | 0.6206 | 58.0 | 9483 | 0.7608 | 0.7345 | | 0.5647 | 59.0 | 9646 | 0.7578 | 0.7388 | | 0.6093 | 60.0 | 9810 | 0.7646 | 0.7358 | | 0.5625 | 61.0 | 9973 | 0.7622 | 0.7388 | | 0.6114 | 62.0 | 10137 | 0.7702 | 0.7324 | | 0.5304 | 63.0 | 10300 | 0.7710 | 0.7367 | | 0.5646 | 64.0 | 10464 | 0.7807 | 0.7298 | | 0.5774 | 65.0 | 10627 | 0.7793 | 0.7328 | | 0.5825 | 66.0 | 10791 | 0.7786 | 0.7375 | | 0.5111 | 67.0 | 10954 | 0.7742 | 0.7380 | | 0.5849 | 68.0 | 11118 | 0.7779 | 0.7349 | | 0.5454 | 69.0 | 11281 | 0.7795 | 0.7367 | | 0.5158 | 70.0 | 11445 | 0.7806 | 0.7345 | | 0.5576 | 71.0 | 11608 | 0.7903 | 0.7345 | | 0.5394 | 72.0 | 11772 | 0.7812 | 0.7380 | | 0.5099 | 73.0 | 11935 | 0.7808 | 0.7354 | | 0.5209 | 74.0 | 12099 | 0.7851 | 0.7319 | | 0.5322 | 75.0 | 12262 | 0.7908 | 0.7401 | | 0.5351 | 76.0 | 12426 | 0.7960 | 0.7306 | | 0.5272 | 77.0 | 12589 | 0.7924 | 0.7324 | | 0.477 | 78.0 | 12753 | 0.7981 | 0.7332 | | 0.5186 | 79.0 | 12916 | 0.7942 | 0.7341 | | 0.5366 | 80.0 | 13080 | 0.8016 | 0.7367 | | 0.4809 | 81.0 | 13243 | 0.8014 | 0.7341 | | 0.4889 | 82.0 | 13407 | 0.8008 | 0.7354 | | 0.5287 | 83.0 | 13570 | 0.8010 | 0.7349 | | 0.4926 | 84.0 | 13734 | 0.8047 | 0.7371 | | 0.4989 | 85.0 | 13897 | 0.8046 | 0.7384 | | 0.5483 | 86.0 | 14061 | 0.8022 | 0.7371 | | 0.5157 | 87.0 | 14224 | 0.8055 | 0.7358 | | 0.4999 | 88.0 | 14388 | 0.8071 | 0.7319 | | 0.519 | 89.0 | 14551 | 0.8083 | 0.7362 | | 0.4534 | 90.0 | 14715 | 0.8082 | 0.7384 | | 0.429 | 91.0 | 14878 | 0.8103 | 0.7354 | | 0.5073 | 92.0 | 15042 | 0.8116 | 0.7336 | | 0.5358 | 93.0 | 15205 | 0.8106 | 0.7341 | | 0.5049 | 94.0 | 15369 | 0.8111 | 0.7315 | | 0.4745 | 95.0 | 15532 | 0.8118 | 0.7336 | | 0.5052 | 96.0 | 15696 | 0.8104 | 0.7371 | | 0.495 | 97.0 | 15859 | 0.8101 | 0.7354 | | 0.4752 | 98.0 | 16023 | 0.8117 | 0.7349 | | 0.4927 | 99.0 | 16186 | 0.8120 | 0.7336 | | 0.4875 | 99.69 | 16300 | 0.8122 | 0.7345 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.0
fxmarty/really-tiny-falcon-testing
fxmarty
"2023-09-16T12:45:28Z"
83,852
0
transformers
[ "transformers", "pytorch", "falcon", "text-generation", "custom_code", "license:mit", "autotrain_compatible", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
"2023-09-16T08:46:32Z"
--- license: mit --- tiny = <10 MB
facebook/esm2_t33_650M_UR50D
facebook
"2023-03-21T15:05:12Z"
83,406
17
transformers
[ "transformers", "pytorch", "tf", "safetensors", "esm", "fill-mask", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-09-27T14:36:16Z"
--- license: mit widget: - text: "MQIFVKTLTGKTITLEVEPS<mask>TIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG" --- ## ESM-2 ESM-2 is a state-of-the-art protein model trained on a masked language modelling objective. It is suitable for fine-tuning on a wide range of tasks that take protein sequences as input. For detailed information on the model architecture and training data, please refer to the [accompanying paper](https://www.biorxiv.org/content/10.1101/2022.07.20.500902v2). You may also be interested in some demo notebooks ([PyTorch](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/protein_language_modeling.ipynb), [TensorFlow](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/protein_language_modeling-tf.ipynb)) which demonstrate how to fine-tune ESM-2 models on your tasks of interest. Several ESM-2 checkpoints are available in the Hub with varying sizes. Larger sizes generally have somewhat better accuracy, but require much more memory and time to train: | Checkpoint name | Num layers | Num parameters | |------------------------------|----|----------| | [esm2_t48_15B_UR50D](https://huggingface.co/facebook/esm2_t48_15B_UR50D) | 48 | 15B | | [esm2_t36_3B_UR50D](https://huggingface.co/facebook/esm2_t36_3B_UR50D) | 36 | 3B | | [esm2_t33_650M_UR50D](https://huggingface.co/facebook/esm2_t33_650M_UR50D) | 33 | 650M | | [esm2_t30_150M_UR50D](https://huggingface.co/facebook/esm2_t30_150M_UR50D) | 30 | 150M | | [esm2_t12_35M_UR50D](https://huggingface.co/facebook/esm2_t12_35M_UR50D) | 12 | 35M | | [esm2_t6_8M_UR50D](https://huggingface.co/facebook/esm2_t6_8M_UR50D) | 6 | 8M |
codellama/CodeLlama-7b-Instruct-hf
codellama
"2024-04-12T14:18:42Z"
82,765
176
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "llama-2", "conversational", "code", "arxiv:2308.12950", "license:llama2", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-08-24T16:33:37Z"
--- language: - code pipeline_tag: text-generation tags: - llama-2 license: llama2 --- # **Code Llama** Code Llama is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 34 billion parameters. This is the repository for the 7B instruct-tuned version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom. > [!NOTE] > This is a non-official Code Llama repo. You can find the official Meta repository in the [Meta Llama organization](https://huggingface.co/meta-llama/CodeLlama-7b-Instruct-hf). | | Base Model | Python | Instruct | | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) | | 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) | | 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) | | 70B | [codellama/CodeLlama-70b-hf](https://huggingface.co/codellama/CodeLlama-70b-hf) | [codellama/CodeLlama-70b-Python-hf](https://huggingface.co/codellama/CodeLlama-70b-Python-hf) | [codellama/CodeLlama-70b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-70b-Instruct-hf) | ## Model Use To use this model, please make sure to install transformers: ```bash pip install transformers accelerate ``` Model capabilities: - [x] Code completion. - [x] Infilling. - [x] Instructions / chat. - [ ] Python specialist. ## Model Details *Note: Use of this model is governed by the Meta license. Meta developed and publicly released the Code Llama family of large language models (LLMs). **Model Developers** Meta **Variations** Code Llama comes in three model sizes, and three variants: * Code Llama: base models designed for general code synthesis and understanding * Code Llama - Python: designed specifically for Python * Code Llama - Instruct: for instruction following and safer deployment All variants are available in sizes of 7B, 13B and 34B parameters. **This repository contains the Instruct version of the 7B parameters model.** **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture. **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950). ## Intended Use **Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications. **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants. ## Hardware and Software **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster. **Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program. ## Training Data All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details). ## Evaluation Results See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper. ## Ethical Considerations and Limitations Code Llama and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-use-guide](https://ai.meta.com/llama/responsible-use-guide).
Salesforce/SFR-Embedding-Mistral
Salesforce
"2024-03-04T18:09:02Z"
82,677
172
sentence-transformers
[ "sentence-transformers", "safetensors", "mistral", "feature-extraction", "mteb", "transformers", "en", "arxiv:2210.07316", "arxiv:2310.06825", "arxiv:2401.00368", "arxiv:2104.08663", "license:cc-by-nc-4.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2024-01-24T22:29:26Z"
--- tags: - mteb - sentence-transformers - transformers model-index: - name: SFR-Embedding-Mistral results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 77.92537313432834 - type: ap value: 40.86767661556651 - type: f1 value: 71.65758897929837 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 95.967 - type: ap value: 94.46300829592593 - type: f1 value: 95.96507173189292 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 54.352000000000004 - type: f1 value: 53.636682615380174 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: ndcg_at_1 value: 43.314 - type: ndcg_at_2 value: 54.757 - type: ndcg_at_3 value: 58.84700000000001 - type: ndcg_at_5 value: 63.634 - type: ndcg_at_7 value: 65.741 - type: ndcg_at_10 value: 67.171 - type: ndcg_at_20 value: 68.585 - type: ndcg_at_30 value: 68.81 - type: ndcg_at_50 value: 68.932 - type: ndcg_at_70 value: 68.992 - type: ndcg_at_100 value: 69.014 - type: ndcg_at_200 value: 69.014 - type: ndcg_at_300 value: 69.014 - type: ndcg_at_500 value: 69.014 - type: ndcg_at_700 value: 69.014 - type: ndcg_at_1000 value: 69.014 - type: map_at_1 value: 43.314 - type: map_at_2 value: 52.383 - type: map_at_3 value: 55.108999999999995 - type: map_at_5 value: 57.772999999999996 - type: map_at_7 value: 58.718 - type: map_at_10 value: 59.256 - type: map_at_20 value: 59.668 - type: map_at_30 value: 59.709999999999994 - type: map_at_50 value: 59.727 - type: map_at_70 value: 59.733999999999995 - type: map_at_100 value: 59.73500000000001 - type: map_at_200 value: 59.73500000000001 - type: map_at_300 value: 59.73500000000001 - type: map_at_500 value: 59.73500000000001 - type: map_at_700 value: 59.73500000000001 - type: map_at_1000 value: 59.73500000000001 - type: recall_at_1 value: 43.314 - type: recall_at_2 value: 61.451 - type: recall_at_3 value: 69.63000000000001 - type: recall_at_5 value: 81.223 - type: recall_at_7 value: 87.33999999999999 - type: recall_at_10 value: 92.034 - type: recall_at_20 value: 97.44 - type: recall_at_30 value: 98.506 - type: recall_at_50 value: 99.14699999999999 - type: recall_at_70 value: 99.502 - type: recall_at_100 value: 99.644 - type: recall_at_200 value: 99.644 - type: recall_at_300 value: 99.644 - type: recall_at_500 value: 99.644 - type: recall_at_700 value: 99.644 - type: recall_at_1000 value: 99.644 - type: precision_at_1 value: 43.314 - type: precision_at_2 value: 30.725 - type: precision_at_3 value: 23.21 - type: precision_at_5 value: 16.245 - type: precision_at_7 value: 12.477 - type: precision_at_10 value: 9.203 - type: precision_at_20 value: 4.872 - type: precision_at_30 value: 3.2840000000000003 - type: precision_at_50 value: 1.983 - type: precision_at_70 value: 1.421 - type: precision_at_100 value: 0.996 - type: precision_at_200 value: 0.498 - type: precision_at_300 value: 0.332 - type: precision_at_500 value: 0.199 - type: precision_at_700 value: 0.14200000000000002 - type: precision_at_1000 value: 0.1 - type: mrr_at_1 value: 44.666 - type: mrr_at_2 value: 52.418 - type: mrr_at_3 value: 55.595000000000006 - type: mrr_at_5 value: 58.205 - type: mrr_at_7 value: 59.202999999999996 - type: mrr_at_10 value: 59.727 - type: mrr_at_20 value: 60.133 - type: mrr_at_30 value: 60.178 - type: mrr_at_50 value: 60.192 - type: mrr_at_70 value: 60.19799999999999 - type: mrr_at_100 value: 60.199999999999996 - type: mrr_at_200 value: 60.199999999999996 - type: mrr_at_300 value: 60.199999999999996 - type: mrr_at_500 value: 60.199999999999996 - type: mrr_at_700 value: 60.199999999999996 - type: mrr_at_1000 value: 60.199999999999996 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 52.07508593014336 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 47.381339333240675 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 67.58376647859171 - type: mrr value: 80.56885635140483 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 88.40107280274783 - type: cos_sim_spearman value: 86.07003345325681 - type: euclidean_pearson value: 87.1726034325395 - type: euclidean_spearman value: 86.07003345325681 - type: manhattan_pearson value: 87.25660625029772 - type: manhattan_spearman value: 86.3808839096893 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 88.81168831168831 - type: f1 value: 88.76514496560141 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 43.9382520874344 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 41.14351847240913 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: ndcg_at_1 value: 34.51166666666667 - type: ndcg_at_2 value: 38.51591666666667 - type: ndcg_at_3 value: 40.95083333333333 - type: ndcg_at_5 value: 43.580666666666666 - type: ndcg_at_7 value: 45.0625 - type: ndcg_at_10 value: 46.49083333333333 - type: ndcg_at_20 value: 48.731333333333325 - type: ndcg_at_30 value: 49.78666666666667 - type: ndcg_at_50 value: 50.84049999999999 - type: ndcg_at_70 value: 51.393750000000004 - type: ndcg_at_100 value: 51.883333333333326 - type: ndcg_at_200 value: 52.65225 - type: ndcg_at_300 value: 52.98241666666669 - type: ndcg_at_500 value: 53.28541666666668 - type: ndcg_at_700 value: 53.49241666666668 - type: ndcg_at_1000 value: 53.63758333333334 - type: map_at_1 value: 29.10075 - type: map_at_2 value: 34.636500000000005 - type: map_at_3 value: 36.92033333333333 - type: map_at_5 value: 38.81641666666666 - type: map_at_7 value: 39.635416666666664 - type: map_at_10 value: 40.294583333333335 - type: map_at_20 value: 41.07574999999999 - type: map_at_30 value: 41.333 - type: map_at_50 value: 41.529333333333334 - type: map_at_70 value: 41.606833333333334 - type: map_at_100 value: 41.66224999999999 - type: map_at_200 value: 41.72691666666666 - type: map_at_300 value: 41.746583333333334 - type: map_at_500 value: 41.75983333333333 - type: map_at_700 value: 41.76558333333333 - type: map_at_1000 value: 41.769000000000005 - type: recall_at_1 value: 29.10075 - type: recall_at_2 value: 39.07658333333333 - type: recall_at_3 value: 44.93591666666667 - type: recall_at_5 value: 51.66883333333333 - type: recall_at_7 value: 55.881000000000014 - type: recall_at_10 value: 60.34691666666667 - type: recall_at_20 value: 68.44016666666667 - type: recall_at_30 value: 72.90766666666667 - type: recall_at_50 value: 77.843 - type: recall_at_70 value: 80.70366666666668 - type: recall_at_100 value: 83.42866666666667 - type: recall_at_200 value: 88.06816666666668 - type: recall_at_300 value: 90.249 - type: recall_at_500 value: 92.37616666666668 - type: recall_at_700 value: 93.978 - type: recall_at_1000 value: 95.12791666666666 - type: precision_at_1 value: 34.51166666666667 - type: precision_at_2 value: 24.326333333333327 - type: precision_at_3 value: 19.099249999999998 - type: precision_at_5 value: 13.672666666666666 - type: precision_at_7 value: 10.772 - type: precision_at_10 value: 8.302166666666668 - type: precision_at_20 value: 4.8960833333333325 - type: precision_at_30 value: 3.551083333333333 - type: precision_at_50 value: 2.3386666666666662 - type: precision_at_70 value: 1.7605833333333334 - type: precision_at_100 value: 1.2965 - type: precision_at_200 value: 0.7106666666666668 - type: precision_at_300 value: 0.4955 - type: precision_at_500 value: 0.3106666666666667 - type: precision_at_700 value: 0.22791666666666668 - type: precision_at_1000 value: 0.1635833333333333 - type: mrr_at_1 value: 34.51166666666667 - type: mrr_at_2 value: 39.954249999999995 - type: mrr_at_3 value: 41.93741666666668 - type: mrr_at_5 value: 43.487166666666674 - type: mrr_at_7 value: 44.14983333333333 - type: mrr_at_10 value: 44.62766666666666 - type: mrr_at_20 value: 45.15291666666668 - type: mrr_at_30 value: 45.317 - type: mrr_at_50 value: 45.42875 - type: mrr_at_70 value: 45.46966666666667 - type: mrr_at_100 value: 45.49716666666667 - type: mrr_at_200 value: 45.525166666666664 - type: mrr_at_300 value: 45.53233333333335 - type: mrr_at_500 value: 45.5365 - type: mrr_at_700 value: 45.538583333333335 - type: mrr_at_1000 value: 45.539583333333326 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: ndcg_at_1 value: 35.179 - type: ndcg_at_2 value: 31.243 - type: ndcg_at_3 value: 30.562 - type: ndcg_at_5 value: 32.409 - type: ndcg_at_7 value: 34.525 - type: ndcg_at_10 value: 36.415 - type: ndcg_at_20 value: 39.443 - type: ndcg_at_30 value: 40.796 - type: ndcg_at_50 value: 42.16 - type: ndcg_at_70 value: 42.971 - type: ndcg_at_100 value: 43.691 - type: ndcg_at_200 value: 45.004 - type: ndcg_at_300 value: 45.527 - type: ndcg_at_500 value: 46.072 - type: ndcg_at_700 value: 46.387 - type: ndcg_at_1000 value: 46.663 - type: map_at_1 value: 15.692 - type: map_at_2 value: 20.116 - type: map_at_3 value: 22.6 - type: map_at_5 value: 24.701 - type: map_at_7 value: 25.934 - type: map_at_10 value: 26.843 - type: map_at_20 value: 27.975 - type: map_at_30 value: 28.372000000000003 - type: map_at_50 value: 28.671000000000003 - type: map_at_70 value: 28.803 - type: map_at_100 value: 28.895 - type: map_at_200 value: 29.011 - type: map_at_300 value: 29.042 - type: map_at_500 value: 29.065 - type: map_at_700 value: 29.075 - type: map_at_1000 value: 29.081000000000003 - type: recall_at_1 value: 15.692 - type: recall_at_2 value: 22.602 - type: recall_at_3 value: 27.814 - type: recall_at_5 value: 33.756 - type: recall_at_7 value: 38.073 - type: recall_at_10 value: 42.553000000000004 - type: recall_at_20 value: 51.121 - type: recall_at_30 value: 55.523999999999994 - type: recall_at_50 value: 60.586 - type: recall_at_70 value: 63.94 - type: recall_at_100 value: 67.134 - type: recall_at_200 value: 73.543 - type: recall_at_300 value: 76.372 - type: recall_at_500 value: 79.60199999999999 - type: recall_at_700 value: 81.536 - type: recall_at_1000 value: 83.37400000000001 - type: precision_at_1 value: 35.179 - type: precision_at_2 value: 27.199 - type: precision_at_3 value: 22.953000000000003 - type: precision_at_5 value: 17.224999999999998 - type: precision_at_7 value: 14.238999999999999 - type: precision_at_10 value: 11.303 - type: precision_at_20 value: 6.954000000000001 - type: precision_at_30 value: 5.116 - type: precision_at_50 value: 3.395 - type: precision_at_70 value: 2.579 - type: precision_at_100 value: 1.9109999999999998 - type: precision_at_200 value: 1.065 - type: precision_at_300 value: 0.743 - type: precision_at_500 value: 0.46699999999999997 - type: precision_at_700 value: 0.344 - type: precision_at_1000 value: 0.247 - type: mrr_at_1 value: 35.179 - type: mrr_at_2 value: 41.792 - type: mrr_at_3 value: 44.484 - type: mrr_at_5 value: 46.39 - type: mrr_at_7 value: 47.125 - type: mrr_at_10 value: 47.711999999999996 - type: mrr_at_20 value: 48.214 - type: mrr_at_30 value: 48.325 - type: mrr_at_50 value: 48.392 - type: mrr_at_70 value: 48.418 - type: mrr_at_100 value: 48.44 - type: mrr_at_200 value: 48.46 - type: mrr_at_300 value: 48.461999999999996 - type: mrr_at_500 value: 48.466 - type: mrr_at_700 value: 48.466 - type: mrr_at_1000 value: 48.467 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: ndcg_at_1 value: 62.375 - type: ndcg_at_2 value: 56.286 - type: ndcg_at_3 value: 53.665 - type: ndcg_at_5 value: 51.139 - type: ndcg_at_7 value: 49.873 - type: ndcg_at_10 value: 49.056 - type: ndcg_at_20 value: 48.783 - type: ndcg_at_30 value: 49.166 - type: ndcg_at_50 value: 51.141999999999996 - type: ndcg_at_70 value: 52.774 - type: ndcg_at_100 value: 54.403 - type: ndcg_at_200 value: 57.419 - type: ndcg_at_300 value: 58.778 - type: ndcg_at_500 value: 60.228 - type: ndcg_at_700 value: 61.07599999999999 - type: ndcg_at_1000 value: 61.846000000000004 - type: map_at_1 value: 10.359 - type: map_at_2 value: 14.446 - type: map_at_3 value: 16.689 - type: map_at_5 value: 20.096 - type: map_at_7 value: 22.247 - type: map_at_10 value: 24.468999999999998 - type: map_at_20 value: 28.938000000000002 - type: map_at_30 value: 31.134 - type: map_at_50 value: 33.403 - type: map_at_70 value: 34.486 - type: map_at_100 value: 35.337 - type: map_at_200 value: 36.364999999999995 - type: map_at_300 value: 36.735 - type: map_at_500 value: 37.057 - type: map_at_700 value: 37.225 - type: map_at_1000 value: 37.379 - type: recall_at_1 value: 10.359 - type: recall_at_2 value: 14.945 - type: recall_at_3 value: 17.694 - type: recall_at_5 value: 22.677 - type: recall_at_7 value: 26.131 - type: recall_at_10 value: 30.053 - type: recall_at_20 value: 39.518 - type: recall_at_30 value: 44.925 - type: recall_at_50 value: 52.154 - type: recall_at_70 value: 56.729 - type: recall_at_100 value: 61.18900000000001 - type: recall_at_200 value: 70.407 - type: recall_at_300 value: 74.412 - type: recall_at_500 value: 78.891 - type: recall_at_700 value: 81.74 - type: recall_at_1000 value: 84.253 - type: precision_at_1 value: 75 - type: precision_at_2 value: 64.125 - type: precision_at_3 value: 57.833 - type: precision_at_5 value: 50.24999999999999 - type: precision_at_7 value: 44.75 - type: precision_at_10 value: 39.75 - type: precision_at_20 value: 30.412 - type: precision_at_30 value: 25.141999999999996 - type: precision_at_50 value: 19.2 - type: precision_at_70 value: 15.729000000000001 - type: precision_at_100 value: 12.552 - type: precision_at_200 value: 7.866 - type: precision_at_300 value: 5.9270000000000005 - type: precision_at_500 value: 4.1129999999999995 - type: precision_at_700 value: 3.2460000000000004 - type: precision_at_1000 value: 2.5260000000000002 - type: mrr_at_1 value: 75 - type: mrr_at_2 value: 78.625 - type: mrr_at_3 value: 79.708 - type: mrr_at_5 value: 80.446 - type: mrr_at_7 value: 80.862 - type: mrr_at_10 value: 81.161 - type: mrr_at_20 value: 81.3 - type: mrr_at_30 value: 81.348 - type: mrr_at_50 value: 81.361 - type: mrr_at_70 value: 81.361 - type: mrr_at_100 value: 81.361 - type: mrr_at_200 value: 81.367 - type: mrr_at_300 value: 81.367 - type: mrr_at_500 value: 81.368 - type: mrr_at_700 value: 81.368 - type: mrr_at_1000 value: 81.368 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 50.239999999999995 - type: f1 value: 46.42361822342044 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: ndcg_at_1 value: 83.723 - type: ndcg_at_2 value: 86.777 - type: ndcg_at_3 value: 87.997 - type: ndcg_at_5 value: 88.864 - type: ndcg_at_7 value: 89.143 - type: ndcg_at_10 value: 89.349 - type: ndcg_at_20 value: 89.709 - type: ndcg_at_30 value: 89.82900000000001 - type: ndcg_at_50 value: 89.923 - type: ndcg_at_70 value: 89.982 - type: ndcg_at_100 value: 90.026 - type: ndcg_at_200 value: 90.10000000000001 - type: ndcg_at_300 value: 90.12599999999999 - type: ndcg_at_500 value: 90.17399999999999 - type: ndcg_at_700 value: 90.19 - type: ndcg_at_1000 value: 90.208 - type: map_at_1 value: 77.64999999999999 - type: map_at_2 value: 83.769 - type: map_at_3 value: 85.041 - type: map_at_5 value: 85.736 - type: map_at_7 value: 85.924 - type: map_at_10 value: 86.032 - type: map_at_20 value: 86.177 - type: map_at_30 value: 86.213 - type: map_at_50 value: 86.233 - type: map_at_70 value: 86.24300000000001 - type: map_at_100 value: 86.249 - type: map_at_200 value: 86.256 - type: map_at_300 value: 86.258 - type: map_at_500 value: 86.26 - type: map_at_700 value: 86.26 - type: map_at_1000 value: 86.261 - type: recall_at_1 value: 77.64999999999999 - type: recall_at_2 value: 88.53999999999999 - type: recall_at_3 value: 91.696 - type: recall_at_5 value: 93.916 - type: recall_at_7 value: 94.731 - type: recall_at_10 value: 95.318 - type: recall_at_20 value: 96.507 - type: recall_at_30 value: 96.956 - type: recall_at_50 value: 97.34899999999999 - type: recall_at_70 value: 97.61 - type: recall_at_100 value: 97.83 - type: recall_at_200 value: 98.223 - type: recall_at_300 value: 98.374 - type: recall_at_500 value: 98.67899999999999 - type: recall_at_700 value: 98.787 - type: recall_at_1000 value: 98.919 - type: precision_at_1 value: 83.723 - type: precision_at_2 value: 48.425000000000004 - type: precision_at_3 value: 33.638 - type: precision_at_5 value: 20.843 - type: precision_at_7 value: 15.079 - type: precision_at_10 value: 10.674999999999999 - type: precision_at_20 value: 5.457999999999999 - type: precision_at_30 value: 3.6740000000000004 - type: precision_at_50 value: 2.2239999999999998 - type: precision_at_70 value: 1.599 - type: precision_at_100 value: 1.125 - type: precision_at_200 value: 0.5680000000000001 - type: precision_at_300 value: 0.38 - type: precision_at_500 value: 0.22999999999999998 - type: precision_at_700 value: 0.165 - type: precision_at_1000 value: 0.116 - type: mrr_at_1 value: 83.723 - type: mrr_at_2 value: 88.794 - type: mrr_at_3 value: 89.679 - type: mrr_at_5 value: 90.049 - type: mrr_at_7 value: 90.129 - type: mrr_at_10 value: 90.167 - type: mrr_at_20 value: 90.208 - type: mrr_at_30 value: 90.214 - type: mrr_at_50 value: 90.217 - type: mrr_at_70 value: 90.218 - type: mrr_at_100 value: 90.21900000000001 - type: mrr_at_200 value: 90.21900000000001 - type: mrr_at_300 value: 90.21900000000001 - type: mrr_at_500 value: 90.21900000000001 - type: mrr_at_700 value: 90.21900000000001 - type: mrr_at_1000 value: 90.21900000000001 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: ndcg_at_1 value: 59.721999999999994 - type: ndcg_at_2 value: 56.85 - type: ndcg_at_3 value: 56.462999999999994 - type: ndcg_at_5 value: 57.75599999999999 - type: ndcg_at_7 value: 59.109 - type: ndcg_at_10 value: 60.402 - type: ndcg_at_20 value: 63.071999999999996 - type: ndcg_at_30 value: 64.302 - type: ndcg_at_50 value: 65.619 - type: ndcg_at_70 value: 66.161 - type: ndcg_at_100 value: 66.645 - type: ndcg_at_200 value: 67.353 - type: ndcg_at_300 value: 67.646 - type: ndcg_at_500 value: 67.852 - type: ndcg_at_700 value: 67.974 - type: ndcg_at_1000 value: 68.084 - type: map_at_1 value: 31.56 - type: map_at_2 value: 42.093 - type: map_at_3 value: 46.177 - type: map_at_5 value: 49.78 - type: map_at_7 value: 51.410999999999994 - type: map_at_10 value: 52.524 - type: map_at_20 value: 53.815000000000005 - type: map_at_30 value: 54.201 - type: map_at_50 value: 54.531 - type: map_at_70 value: 54.625 - type: map_at_100 value: 54.686 - type: map_at_200 value: 54.757999999999996 - type: map_at_300 value: 54.776 - type: map_at_500 value: 54.786 - type: map_at_700 value: 54.790000000000006 - type: map_at_1000 value: 54.793000000000006 - type: recall_at_1 value: 31.56 - type: recall_at_2 value: 44.858 - type: recall_at_3 value: 51.11 - type: recall_at_5 value: 58.394 - type: recall_at_7 value: 63.001 - type: recall_at_10 value: 66.81200000000001 - type: recall_at_20 value: 74.901 - type: recall_at_30 value: 79.218 - type: recall_at_50 value: 84.49 - type: recall_at_70 value: 87.003 - type: recall_at_100 value: 89.345 - type: recall_at_200 value: 93.173 - type: recall_at_300 value: 94.906 - type: recall_at_500 value: 96.223 - type: recall_at_700 value: 97.043 - type: recall_at_1000 value: 97.785 - type: precision_at_1 value: 59.721999999999994 - type: precision_at_2 value: 46.682 - type: precision_at_3 value: 37.602999999999994 - type: precision_at_5 value: 27.500000000000004 - type: precision_at_7 value: 21.847 - type: precision_at_10 value: 16.667 - type: precision_at_20 value: 9.545 - type: precision_at_30 value: 6.795 - type: precision_at_50 value: 4.38 - type: precision_at_70 value: 3.221 - type: precision_at_100 value: 2.319 - type: precision_at_200 value: 1.2149999999999999 - type: precision_at_300 value: 0.827 - type: precision_at_500 value: 0.504 - type: precision_at_700 value: 0.364 - type: precision_at_1000 value: 0.257 - type: mrr_at_1 value: 59.721999999999994 - type: mrr_at_2 value: 64.506 - type: mrr_at_3 value: 65.792 - type: mrr_at_5 value: 66.965 - type: mrr_at_7 value: 67.34700000000001 - type: mrr_at_10 value: 67.57 - type: mrr_at_20 value: 67.896 - type: mrr_at_30 value: 68.008 - type: mrr_at_50 value: 68.083 - type: mrr_at_70 value: 68.105 - type: mrr_at_100 value: 68.116 - type: mrr_at_200 value: 68.12700000000001 - type: mrr_at_300 value: 68.13 - type: mrr_at_500 value: 68.132 - type: mrr_at_700 value: 68.133 - type: mrr_at_1000 value: 68.133 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: ndcg_at_1 value: 81.796 - type: ndcg_at_2 value: 67.999 - type: ndcg_at_3 value: 72.15599999999999 - type: ndcg_at_5 value: 74.99900000000001 - type: ndcg_at_7 value: 76.179 - type: ndcg_at_10 value: 77.022 - type: ndcg_at_20 value: 78.173 - type: ndcg_at_30 value: 78.648 - type: ndcg_at_50 value: 79.104 - type: ndcg_at_70 value: 79.335 - type: ndcg_at_100 value: 79.56 - type: ndcg_at_200 value: 79.911 - type: ndcg_at_300 value: 80.045 - type: ndcg_at_500 value: 80.19500000000001 - type: ndcg_at_700 value: 80.281 - type: ndcg_at_1000 value: 80.35 - type: map_at_1 value: 40.898 - type: map_at_2 value: 62.016000000000005 - type: map_at_3 value: 66.121 - type: map_at_5 value: 68.471 - type: map_at_7 value: 69.261 - type: map_at_10 value: 69.738 - type: map_at_20 value: 70.208 - type: map_at_30 value: 70.343 - type: map_at_50 value: 70.43700000000001 - type: map_at_70 value: 70.47099999999999 - type: map_at_100 value: 70.498 - type: map_at_200 value: 70.526 - type: map_at_300 value: 70.533 - type: map_at_500 value: 70.538 - type: map_at_700 value: 70.541 - type: map_at_1000 value: 70.542 - type: recall_at_1 value: 40.898 - type: recall_at_2 value: 63.964 - type: recall_at_3 value: 70.743 - type: recall_at_5 value: 76.36699999999999 - type: recall_at_7 value: 79.142 - type: recall_at_10 value: 81.404 - type: recall_at_20 value: 85.111 - type: recall_at_30 value: 86.92800000000001 - type: recall_at_50 value: 88.899 - type: recall_at_70 value: 90.01400000000001 - type: recall_at_100 value: 91.19500000000001 - type: recall_at_200 value: 93.234 - type: recall_at_300 value: 94.105 - type: recall_at_500 value: 95.159 - type: recall_at_700 value: 95.8 - type: recall_at_1000 value: 96.34700000000001 - type: precision_at_1 value: 81.796 - type: precision_at_2 value: 63.964 - type: precision_at_3 value: 47.162 - type: precision_at_5 value: 30.547 - type: precision_at_7 value: 22.612 - type: precision_at_10 value: 16.281000000000002 - type: precision_at_20 value: 8.511000000000001 - type: precision_at_30 value: 5.795 - type: precision_at_50 value: 3.556 - type: precision_at_70 value: 2.572 - type: precision_at_100 value: 1.8239999999999998 - type: precision_at_200 value: 0.932 - type: precision_at_300 value: 0.627 - type: precision_at_500 value: 0.381 - type: precision_at_700 value: 0.27399999999999997 - type: precision_at_1000 value: 0.193 - type: mrr_at_1 value: 81.796 - type: mrr_at_2 value: 85.69200000000001 - type: mrr_at_3 value: 86.52 - type: mrr_at_5 value: 86.973 - type: mrr_at_7 value: 87.13300000000001 - type: mrr_at_10 value: 87.208 - type: mrr_at_20 value: 87.303 - type: mrr_at_30 value: 87.32799999999999 - type: mrr_at_50 value: 87.347 - type: mrr_at_70 value: 87.35199999999999 - type: mrr_at_100 value: 87.355 - type: mrr_at_200 value: 87.357 - type: mrr_at_300 value: 87.357 - type: mrr_at_500 value: 87.358 - type: mrr_at_700 value: 87.358 - type: mrr_at_1000 value: 87.358 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 94.79200000000002 - type: ap value: 92.54484356773553 - type: f1 value: 94.78965313682525 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: ndcg_at_1 value: 24.398 - type: ndcg_at_2 value: 31.336000000000002 - type: ndcg_at_3 value: 35.266999999999996 - type: ndcg_at_5 value: 39.356 - type: ndcg_at_7 value: 41.562 - type: ndcg_at_10 value: 43.408 - type: ndcg_at_20 value: 46.107 - type: ndcg_at_30 value: 47.164 - type: ndcg_at_50 value: 48.126000000000005 - type: ndcg_at_70 value: 48.626999999999995 - type: ndcg_at_100 value: 49.043 - type: ndcg_at_200 value: 49.575 - type: ndcg_at_300 value: 49.794 - type: ndcg_at_500 value: 49.942 - type: ndcg_at_700 value: 50.014 - type: ndcg_at_1000 value: 50.077000000000005 - type: map_at_1 value: 23.723 - type: map_at_2 value: 29.593000000000004 - type: map_at_3 value: 32.273 - type: map_at_5 value: 34.587 - type: map_at_7 value: 35.589999999999996 - type: map_at_10 value: 36.296 - type: map_at_20 value: 37.059999999999995 - type: map_at_30 value: 37.265 - type: map_at_50 value: 37.402 - type: map_at_70 value: 37.454 - type: map_at_100 value: 37.486999999999995 - type: map_at_200 value: 37.516 - type: map_at_300 value: 37.524 - type: map_at_500 value: 37.528 - type: map_at_700 value: 37.529 - type: map_at_1000 value: 37.53 - type: recall_at_1 value: 23.723 - type: recall_at_2 value: 35.355 - type: recall_at_3 value: 43.22 - type: recall_at_5 value: 53.025 - type: recall_at_7 value: 59.327 - type: recall_at_10 value: 65.302 - type: recall_at_20 value: 75.765 - type: recall_at_30 value: 80.632 - type: recall_at_50 value: 85.63499999999999 - type: recall_at_70 value: 88.554 - type: recall_at_100 value: 91.16300000000001 - type: recall_at_200 value: 94.85 - type: recall_at_300 value: 96.532 - type: recall_at_500 value: 97.751 - type: recall_at_700 value: 98.383 - type: recall_at_1000 value: 98.97 - type: precision_at_1 value: 24.398 - type: precision_at_2 value: 18.274 - type: precision_at_3 value: 14.951999999999998 - type: precision_at_5 value: 11.052 - type: precision_at_7 value: 8.84 - type: precision_at_10 value: 6.8309999999999995 - type: precision_at_20 value: 3.978 - type: precision_at_30 value: 2.827 - type: precision_at_50 value: 1.807 - type: precision_at_70 value: 1.336 - type: precision_at_100 value: 0.964 - type: precision_at_200 value: 0.502 - type: precision_at_300 value: 0.34099999999999997 - type: precision_at_500 value: 0.208 - type: precision_at_700 value: 0.15 - type: precision_at_1000 value: 0.105 - type: mrr_at_1 value: 24.398 - type: mrr_at_2 value: 30.351 - type: mrr_at_3 value: 33.001000000000005 - type: mrr_at_5 value: 35.228 - type: mrr_at_7 value: 36.223 - type: mrr_at_10 value: 36.903999999999996 - type: mrr_at_20 value: 37.631 - type: mrr_at_30 value: 37.830000000000005 - type: mrr_at_50 value: 37.955 - type: mrr_at_70 value: 38.003 - type: mrr_at_100 value: 38.033 - type: mrr_at_200 value: 38.059 - type: mrr_at_300 value: 38.066 - type: mrr_at_500 value: 38.068999999999996 - type: mrr_at_700 value: 38.07 - type: mrr_at_1000 value: 38.07 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 96.35658914728683 - type: f1 value: 96.15039630903114 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 86.29730962152303 - type: f1 value: 71.12166316567485 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 79.98991257565568 - type: f1 value: 77.41680115095276 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 82.1990585070612 - type: f1 value: 82.23719179179362 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 40.03019554933584 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 38.999760551497815 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 32.72383151953079 - type: mrr value: 33.93989699030721 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: ndcg_at_1 value: 51.858000000000004 - type: ndcg_at_2 value: 49.675999999999995 - type: ndcg_at_3 value: 47.519 - type: ndcg_at_5 value: 45.198 - type: ndcg_at_7 value: 43.504 - type: ndcg_at_10 value: 41.88 - type: ndcg_at_20 value: 39.122 - type: ndcg_at_30 value: 37.95 - type: ndcg_at_50 value: 37.602999999999994 - type: ndcg_at_70 value: 37.836 - type: ndcg_at_100 value: 38.493 - type: ndcg_at_200 value: 40.187 - type: ndcg_at_300 value: 41.524 - type: ndcg_at_500 value: 43.657000000000004 - type: ndcg_at_700 value: 45.234 - type: ndcg_at_1000 value: 47.047 - type: map_at_1 value: 6.392 - type: map_at_2 value: 10.113 - type: map_at_3 value: 11.543000000000001 - type: map_at_5 value: 13.729 - type: map_at_7 value: 14.985000000000001 - type: map_at_10 value: 16.217000000000002 - type: map_at_20 value: 18.106 - type: map_at_30 value: 18.878 - type: map_at_50 value: 19.822 - type: map_at_70 value: 20.352999999999998 - type: map_at_100 value: 20.827 - type: map_at_200 value: 21.512 - type: map_at_300 value: 21.826 - type: map_at_500 value: 22.155 - type: map_at_700 value: 22.349 - type: map_at_1000 value: 22.531000000000002 - type: recall_at_1 value: 6.392 - type: recall_at_2 value: 11.215 - type: recall_at_3 value: 13.231000000000002 - type: recall_at_5 value: 16.66 - type: recall_at_7 value: 18.802 - type: recall_at_10 value: 21.185000000000002 - type: recall_at_20 value: 25.35 - type: recall_at_30 value: 27.91 - type: recall_at_50 value: 32.845 - type: recall_at_70 value: 35.789 - type: recall_at_100 value: 39.247 - type: recall_at_200 value: 46.655 - type: recall_at_300 value: 51.43299999999999 - type: recall_at_500 value: 59.472 - type: recall_at_700 value: 64.742 - type: recall_at_1000 value: 70.97099999999999 - type: precision_at_1 value: 53.559999999999995 - type: precision_at_2 value: 48.762 - type: precision_at_3 value: 44.169000000000004 - type: precision_at_5 value: 39.071 - type: precision_at_7 value: 35.161 - type: precision_at_10 value: 31.238 - type: precision_at_20 value: 23.064999999999998 - type: precision_at_30 value: 18.844 - type: precision_at_50 value: 14.601 - type: precision_at_70 value: 12.088000000000001 - type: precision_at_100 value: 9.844999999999999 - type: precision_at_200 value: 6.358 - type: precision_at_300 value: 4.915 - type: precision_at_500 value: 3.531 - type: precision_at_700 value: 2.8649999999999998 - type: precision_at_1000 value: 2.289 - type: mrr_at_1 value: 54.17999999999999 - type: mrr_at_2 value: 59.288 - type: mrr_at_3 value: 60.836 - type: mrr_at_5 value: 62.275999999999996 - type: mrr_at_7 value: 62.688 - type: mrr_at_10 value: 62.865 - type: mrr_at_20 value: 63.11 - type: mrr_at_30 value: 63.193999999999996 - type: mrr_at_50 value: 63.258 - type: mrr_at_70 value: 63.278 - type: mrr_at_100 value: 63.297000000000004 - type: mrr_at_200 value: 63.315999999999995 - type: mrr_at_300 value: 63.318 - type: mrr_at_500 value: 63.32299999999999 - type: mrr_at_700 value: 63.324000000000005 - type: mrr_at_1000 value: 63.324999999999996 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: ndcg_at_1 value: 50.897999999999996 - type: ndcg_at_2 value: 59.126 - type: ndcg_at_3 value: 63.093999999999994 - type: ndcg_at_5 value: 67.197 - type: ndcg_at_7 value: 68.719 - type: ndcg_at_10 value: 69.915 - type: ndcg_at_20 value: 71.229 - type: ndcg_at_30 value: 71.667 - type: ndcg_at_50 value: 71.98 - type: ndcg_at_70 value: 72.127 - type: ndcg_at_100 value: 72.217 - type: ndcg_at_200 value: 72.319 - type: ndcg_at_300 value: 72.347 - type: ndcg_at_500 value: 72.37 - type: ndcg_at_700 value: 72.379 - type: ndcg_at_1000 value: 72.381 - type: map_at_1 value: 45.297 - type: map_at_2 value: 55.596000000000004 - type: map_at_3 value: 58.724 - type: map_at_5 value: 61.387 - type: map_at_7 value: 62.173 - type: map_at_10 value: 62.69 - type: map_at_20 value: 63.125 - type: map_at_30 value: 63.223 - type: map_at_50 value: 63.27700000000001 - type: map_at_70 value: 63.295 - type: map_at_100 value: 63.303 - type: map_at_200 value: 63.31 - type: map_at_300 value: 63.31099999999999 - type: map_at_500 value: 63.312000000000005 - type: map_at_700 value: 63.312000000000005 - type: map_at_1000 value: 63.312000000000005 - type: recall_at_1 value: 45.297 - type: recall_at_2 value: 63.866 - type: recall_at_3 value: 71.898 - type: recall_at_5 value: 81.16600000000001 - type: recall_at_7 value: 85.301 - type: recall_at_10 value: 88.94800000000001 - type: recall_at_20 value: 93.719 - type: recall_at_30 value: 95.628 - type: recall_at_50 value: 97.14699999999999 - type: recall_at_70 value: 97.955 - type: recall_at_100 value: 98.48599999999999 - type: recall_at_200 value: 99.157 - type: recall_at_300 value: 99.355 - type: recall_at_500 value: 99.53699999999999 - type: recall_at_700 value: 99.62299999999999 - type: recall_at_1000 value: 99.638 - type: precision_at_1 value: 50.897999999999996 - type: precision_at_2 value: 36.703 - type: precision_at_3 value: 27.926000000000002 - type: precision_at_5 value: 19.276 - type: precision_at_7 value: 14.533999999999999 - type: precision_at_10 value: 10.678 - type: precision_at_20 value: 5.663 - type: precision_at_30 value: 3.8600000000000003 - type: precision_at_50 value: 2.358 - type: precision_at_70 value: 1.7000000000000002 - type: precision_at_100 value: 1.198 - type: precision_at_200 value: 0.603 - type: precision_at_300 value: 0.40299999999999997 - type: precision_at_500 value: 0.242 - type: precision_at_700 value: 0.173 - type: precision_at_1000 value: 0.121 - type: mrr_at_1 value: 50.897999999999996 - type: mrr_at_2 value: 59.994 - type: mrr_at_3 value: 62.553000000000004 - type: mrr_at_5 value: 64.307 - type: mrr_at_7 value: 64.864 - type: mrr_at_10 value: 65.22200000000001 - type: mrr_at_20 value: 65.499 - type: mrr_at_30 value: 65.561 - type: mrr_at_50 value: 65.592 - type: mrr_at_70 value: 65.602 - type: mrr_at_100 value: 65.607 - type: mrr_at_200 value: 65.61099999999999 - type: mrr_at_300 value: 65.61200000000001 - type: mrr_at_500 value: 65.61200000000001 - type: mrr_at_700 value: 65.61200000000001 - type: mrr_at_1000 value: 65.61200000000001 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: ndcg_at_1 value: 82.96 - type: ndcg_at_2 value: 85.614 - type: ndcg_at_3 value: 87.19 - type: ndcg_at_5 value: 88.654 - type: ndcg_at_7 value: 89.287 - type: ndcg_at_10 value: 89.785 - type: ndcg_at_20 value: 90.384 - type: ndcg_at_30 value: 90.589 - type: ndcg_at_50 value: 90.738 - type: ndcg_at_70 value: 90.789 - type: ndcg_at_100 value: 90.824 - type: ndcg_at_200 value: 90.869 - type: ndcg_at_300 value: 90.881 - type: ndcg_at_500 value: 90.886 - type: ndcg_at_700 value: 90.889 - type: ndcg_at_1000 value: 90.889 - type: map_at_1 value: 72.152 - type: map_at_2 value: 80.818 - type: map_at_3 value: 83.462 - type: map_at_5 value: 85.286 - type: map_at_7 value: 85.921 - type: map_at_10 value: 86.334 - type: map_at_20 value: 86.737 - type: map_at_30 value: 86.847 - type: map_at_50 value: 86.911 - type: map_at_70 value: 86.932 - type: map_at_100 value: 86.943 - type: map_at_200 value: 86.953 - type: map_at_300 value: 86.955 - type: map_at_500 value: 86.956 - type: map_at_700 value: 86.956 - type: map_at_1000 value: 86.956 - type: recall_at_1 value: 72.152 - type: recall_at_2 value: 84.129 - type: recall_at_3 value: 88.87 - type: recall_at_5 value: 93.067 - type: recall_at_7 value: 94.882 - type: recall_at_10 value: 96.353 - type: recall_at_20 value: 98.26700000000001 - type: recall_at_30 value: 98.92999999999999 - type: recall_at_50 value: 99.441 - type: recall_at_70 value: 99.619 - type: recall_at_100 value: 99.748 - type: recall_at_200 value: 99.911 - type: recall_at_300 value: 99.956 - type: recall_at_500 value: 99.98 - type: recall_at_700 value: 99.991 - type: recall_at_1000 value: 99.996 - type: precision_at_1 value: 82.96 - type: precision_at_2 value: 52.175000000000004 - type: precision_at_3 value: 38.223 - type: precision_at_5 value: 25.056 - type: precision_at_7 value: 18.717 - type: precision_at_10 value: 13.614999999999998 - type: precision_at_20 value: 7.208 - type: precision_at_30 value: 4.928 - type: precision_at_50 value: 3.024 - type: precision_at_70 value: 2.183 - type: precision_at_100 value: 1.54 - type: precision_at_200 value: 0.779 - type: precision_at_300 value: 0.521 - type: precision_at_500 value: 0.313 - type: precision_at_700 value: 0.22399999999999998 - type: precision_at_1000 value: 0.157 - type: mrr_at_1 value: 82.96 - type: mrr_at_2 value: 87.005 - type: mrr_at_3 value: 88.07199999999999 - type: mrr_at_5 value: 88.634 - type: mrr_at_7 value: 88.793 - type: mrr_at_10 value: 88.87899999999999 - type: mrr_at_20 value: 88.94999999999999 - type: mrr_at_30 value: 88.96 - type: mrr_at_50 value: 88.965 - type: mrr_at_70 value: 88.966 - type: mrr_at_100 value: 88.967 - type: mrr_at_200 value: 88.967 - type: mrr_at_300 value: 88.967 - type: mrr_at_500 value: 88.967 - type: mrr_at_700 value: 88.967 - type: mrr_at_1000 value: 88.967 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 59.90388554491155 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 67.64232539036783 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: ndcg_at_1 value: 22.6 - type: ndcg_at_2 value: 20.355999999999998 - type: ndcg_at_3 value: 18.536 - type: ndcg_at_5 value: 16.523 - type: ndcg_at_7 value: 17.979 - type: ndcg_at_10 value: 19.908 - type: ndcg_at_20 value: 22.887 - type: ndcg_at_30 value: 24.43 - type: ndcg_at_50 value: 25.959 - type: ndcg_at_70 value: 26.989 - type: ndcg_at_100 value: 27.977 - type: ndcg_at_200 value: 29.831000000000003 - type: ndcg_at_300 value: 30.787 - type: ndcg_at_500 value: 31.974999999999998 - type: ndcg_at_700 value: 32.554 - type: ndcg_at_1000 value: 33.277 - type: map_at_1 value: 4.593 - type: map_at_2 value: 6.923 - type: map_at_3 value: 8.3 - type: map_at_5 value: 10.072000000000001 - type: map_at_7 value: 10.782 - type: map_at_10 value: 11.72 - type: map_at_20 value: 12.838 - type: map_at_30 value: 13.257 - type: map_at_50 value: 13.569 - type: map_at_70 value: 13.733 - type: map_at_100 value: 13.858999999999998 - type: map_at_200 value: 14.018 - type: map_at_300 value: 14.072999999999999 - type: map_at_500 value: 14.126 - type: map_at_700 value: 14.145 - type: map_at_1000 value: 14.161999999999999 - type: recall_at_1 value: 4.593 - type: recall_at_2 value: 7.997999999999999 - type: recall_at_3 value: 10.563 - type: recall_at_5 value: 14.907 - type: recall_at_7 value: 17.4 - type: recall_at_10 value: 21.18 - type: recall_at_20 value: 28.144999999999996 - type: recall_at_30 value: 32.462 - type: recall_at_50 value: 37.267 - type: recall_at_70 value: 40.875 - type: recall_at_100 value: 44.641999999999996 - type: recall_at_200 value: 52.573 - type: recall_at_300 value: 57.089999999999996 - type: recall_at_500 value: 63.14300000000001 - type: recall_at_700 value: 66.313 - type: recall_at_1000 value: 70.458 - type: precision_at_1 value: 22.6 - type: precision_at_2 value: 19.7 - type: precision_at_3 value: 17.333000000000002 - type: precision_at_5 value: 14.680000000000001 - type: precision_at_7 value: 12.243 - type: precision_at_10 value: 10.440000000000001 - type: precision_at_20 value: 6.944999999999999 - type: precision_at_30 value: 5.333 - type: precision_at_50 value: 3.678 - type: precision_at_70 value: 2.881 - type: precision_at_100 value: 2.2030000000000003 - type: precision_at_200 value: 1.295 - type: precision_at_300 value: 0.9369999999999999 - type: precision_at_500 value: 0.622 - type: precision_at_700 value: 0.466 - type: precision_at_1000 value: 0.347 - type: mrr_at_1 value: 22.6 - type: mrr_at_2 value: 27.900000000000002 - type: mrr_at_3 value: 30.067 - type: mrr_at_5 value: 32.207 - type: mrr_at_7 value: 33.004 - type: mrr_at_10 value: 33.596 - type: mrr_at_20 value: 34.268 - type: mrr_at_30 value: 34.492 - type: mrr_at_50 value: 34.628 - type: mrr_at_70 value: 34.681 - type: mrr_at_100 value: 34.717 - type: mrr_at_200 value: 34.757 - type: mrr_at_300 value: 34.768 - type: mrr_at_500 value: 34.772 - type: mrr_at_700 value: 34.774 - type: mrr_at_1000 value: 34.775 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 86.90122745229677 - type: cos_sim_spearman value: 82.92294737327579 - type: euclidean_pearson value: 84.08979655773187 - type: euclidean_spearman value: 82.92294657285412 - type: manhattan_pearson value: 84.09347480531832 - type: manhattan_spearman value: 82.91564613948087 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 87.01218713698583 - type: cos_sim_spearman value: 79.46865215168464 - type: euclidean_pearson value: 83.22621889891909 - type: euclidean_spearman value: 79.46853821709514 - type: manhattan_pearson value: 83.69962580788805 - type: manhattan_spearman value: 79.9561593356932 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 88.98438696342964 - type: cos_sim_spearman value: 89.15419511870839 - type: euclidean_pearson value: 88.49646141802894 - type: euclidean_spearman value: 89.15419503946019 - type: manhattan_pearson value: 88.6420585616327 - type: manhattan_spearman value: 89.42648950757743 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 87.30772547759544 - type: cos_sim_spearman value: 84.93199878424691 - type: euclidean_pearson value: 86.16266630395455 - type: euclidean_spearman value: 84.93198798543634 - type: manhattan_pearson value: 86.14285723189803 - type: manhattan_spearman value: 85.0361672522687 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 90.21342071197127 - type: cos_sim_spearman value: 90.7407512744838 - type: euclidean_pearson value: 90.1517933113061 - type: euclidean_spearman value: 90.74075125431919 - type: manhattan_pearson value: 90.17963034676193 - type: manhattan_spearman value: 90.88999275865135 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 86.82518054100498 - type: cos_sim_spearman value: 87.81570533154735 - type: euclidean_pearson value: 86.91684561573618 - type: euclidean_spearman value: 87.81570533154735 - type: manhattan_pearson value: 86.98311935744032 - type: manhattan_spearman value: 87.9594667151966 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 92.09578436612053 - type: cos_sim_spearman value: 92.01519349090438 - type: euclidean_pearson value: 92.07113635890894 - type: euclidean_spearman value: 92.01519349090438 - type: manhattan_pearson value: 91.89343820765625 - type: manhattan_spearman value: 91.7443476810177 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 69.29997751464549 - type: cos_sim_spearman value: 68.36425436812782 - type: euclidean_pearson value: 69.81381677661783 - type: euclidean_spearman value: 68.36425436812782 - type: manhattan_pearson value: 69.92823397008026 - type: manhattan_spearman value: 68.35770640039254 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 88.39126315452359 - type: cos_sim_spearman value: 88.99708463265337 - type: euclidean_pearson value: 88.60793820038607 - type: euclidean_spearman value: 88.99708463265337 - type: manhattan_pearson value: 88.69860633571047 - type: manhattan_spearman value: 89.20094593888012 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 86.58028062818582 - type: mrr value: 96.53586790841693 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: ndcg_at_1 value: 66.333 - type: ndcg_at_2 value: 70.655 - type: ndcg_at_3 value: 72.801 - type: ndcg_at_5 value: 75.793 - type: ndcg_at_7 value: 76.946 - type: ndcg_at_10 value: 77.66199999999999 - type: ndcg_at_20 value: 78.786 - type: ndcg_at_30 value: 79.066 - type: ndcg_at_50 value: 79.255 - type: ndcg_at_70 value: 79.423 - type: ndcg_at_100 value: 79.476 - type: ndcg_at_200 value: 79.65299999999999 - type: ndcg_at_300 value: 79.696 - type: ndcg_at_500 value: 79.73599999999999 - type: ndcg_at_700 value: 79.77199999999999 - type: ndcg_at_1000 value: 79.77199999999999 - type: map_at_1 value: 63.383 - type: map_at_2 value: 68.144 - type: map_at_3 value: 70.19800000000001 - type: map_at_5 value: 72.38 - type: map_at_7 value: 72.955 - type: map_at_10 value: 73.312 - type: map_at_20 value: 73.678 - type: map_at_30 value: 73.72800000000001 - type: map_at_50 value: 73.75500000000001 - type: map_at_70 value: 73.771 - type: map_at_100 value: 73.776 - type: map_at_200 value: 73.783 - type: map_at_300 value: 73.784 - type: map_at_500 value: 73.785 - type: map_at_700 value: 73.786 - type: map_at_1000 value: 73.786 - type: recall_at_1 value: 63.383 - type: recall_at_2 value: 72.283 - type: recall_at_3 value: 77.183 - type: recall_at_5 value: 84.56099999999999 - type: recall_at_7 value: 87.67200000000001 - type: recall_at_10 value: 89.822 - type: recall_at_20 value: 94 - type: recall_at_30 value: 95.333 - type: recall_at_50 value: 96.333 - type: recall_at_70 value: 97.333 - type: recall_at_100 value: 97.667 - type: recall_at_200 value: 99 - type: recall_at_300 value: 99.333 - type: recall_at_500 value: 99.667 - type: recall_at_700 value: 100 - type: recall_at_1000 value: 100 - type: precision_at_1 value: 66.333 - type: precision_at_2 value: 38.667 - type: precision_at_3 value: 28.111000000000004 - type: precision_at_5 value: 18.933 - type: precision_at_7 value: 14.094999999999999 - type: precision_at_10 value: 10.167 - type: precision_at_20 value: 5.35 - type: precision_at_30 value: 3.611 - type: precision_at_50 value: 2.1870000000000003 - type: precision_at_70 value: 1.576 - type: precision_at_100 value: 1.107 - type: precision_at_200 value: 0.5599999999999999 - type: precision_at_300 value: 0.374 - type: precision_at_500 value: 0.22499999999999998 - type: precision_at_700 value: 0.161 - type: precision_at_1000 value: 0.11299999999999999 - type: mrr_at_1 value: 66.333 - type: mrr_at_2 value: 70.833 - type: mrr_at_3 value: 72.167 - type: mrr_at_5 value: 73.6 - type: mrr_at_7 value: 74.084 - type: mrr_at_10 value: 74.283 - type: mrr_at_20 value: 74.54499999999999 - type: mrr_at_30 value: 74.59599999999999 - type: mrr_at_50 value: 74.622 - type: mrr_at_70 value: 74.639 - type: mrr_at_100 value: 74.643 - type: mrr_at_200 value: 74.65 - type: mrr_at_300 value: 74.652 - type: mrr_at_500 value: 74.653 - type: mrr_at_700 value: 74.653 - type: mrr_at_1000 value: 74.653 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.84554455445544 - type: cos_sim_ap value: 96.31178339136798 - type: cos_sim_f1 value: 92.1921921921922 - type: cos_sim_precision value: 92.28456913827655 - type: cos_sim_recall value: 92.10000000000001 - type: dot_accuracy value: 99.84554455445544 - type: dot_ap value: 96.31178339136797 - type: dot_f1 value: 92.1921921921922 - type: dot_precision value: 92.28456913827655 - type: dot_recall value: 92.10000000000001 - type: euclidean_accuracy value: 99.84554455445544 - type: euclidean_ap value: 96.31178339136798 - type: euclidean_f1 value: 92.1921921921922 - type: euclidean_precision value: 92.28456913827655 - type: euclidean_recall value: 92.10000000000001 - type: manhattan_accuracy value: 99.84752475247525 - type: manhattan_ap value: 96.4591954606088 - type: manhattan_f1 value: 92.25352112676056 - type: manhattan_precision value: 92.81376518218623 - type: manhattan_recall value: 91.7 - type: max_accuracy value: 99.84752475247525 - type: max_ap value: 96.4591954606088 - type: max_f1 value: 92.25352112676056 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 74.24659759283294 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 46.77690051260451 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 55.68436757803185 - type: mrr value: 56.82157711569475 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 31.652482405629843 - type: cos_sim_spearman value: 31.16341822347735 - type: dot_pearson value: 31.652479892699837 - type: dot_spearman value: 31.16341822347735 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: ndcg_at_1 value: 92 - type: ndcg_at_2 value: 90.839 - type: ndcg_at_3 value: 90.642 - type: ndcg_at_5 value: 90.348 - type: ndcg_at_7 value: 89.015 - type: ndcg_at_10 value: 87.599 - type: ndcg_at_20 value: 84.434 - type: ndcg_at_30 value: 81.655 - type: ndcg_at_50 value: 77.278 - type: ndcg_at_70 value: 73.957 - type: ndcg_at_100 value: 69.56 - type: ndcg_at_200 value: 60.724000000000004 - type: ndcg_at_300 value: 57.245000000000005 - type: ndcg_at_500 value: 56.316 - type: ndcg_at_700 value: 58.399 - type: ndcg_at_1000 value: 62.21600000000001 - type: map_at_1 value: 0.247 - type: map_at_2 value: 0.488 - type: map_at_3 value: 0.7230000000000001 - type: map_at_5 value: 1.204 - type: map_at_7 value: 1.6500000000000001 - type: map_at_10 value: 2.292 - type: map_at_20 value: 4.274 - type: map_at_30 value: 6.027 - type: map_at_50 value: 9.083 - type: map_at_70 value: 11.751000000000001 - type: map_at_100 value: 14.912 - type: map_at_200 value: 22.213 - type: map_at_300 value: 26.667999999999996 - type: map_at_500 value: 31.556 - type: map_at_700 value: 34.221000000000004 - type: map_at_1000 value: 36.443999999999996 - type: recall_at_1 value: 0.247 - type: recall_at_2 value: 0.49899999999999994 - type: recall_at_3 value: 0.742 - type: recall_at_5 value: 1.247 - type: recall_at_7 value: 1.722 - type: recall_at_10 value: 2.405 - type: recall_at_20 value: 4.583 - type: recall_at_30 value: 6.587999999999999 - type: recall_at_50 value: 10.188 - type: recall_at_70 value: 13.496 - type: recall_at_100 value: 17.578 - type: recall_at_200 value: 28.158 - type: recall_at_300 value: 35.532000000000004 - type: recall_at_500 value: 45.31 - type: recall_at_700 value: 51.822 - type: recall_at_1000 value: 58.53 - type: precision_at_1 value: 96 - type: precision_at_2 value: 96 - type: precision_at_3 value: 95.333 - type: precision_at_5 value: 94.8 - type: precision_at_7 value: 93.429 - type: precision_at_10 value: 91.4 - type: precision_at_20 value: 87.7 - type: precision_at_30 value: 84.867 - type: precision_at_50 value: 80.24 - type: precision_at_70 value: 76.371 - type: precision_at_100 value: 71.08 - type: precision_at_200 value: 59.4 - type: precision_at_300 value: 51.459999999999994 - type: precision_at_500 value: 40.644000000000005 - type: precision_at_700 value: 33.889 - type: precision_at_1000 value: 27.250000000000004 - type: mrr_at_1 value: 96 - type: mrr_at_2 value: 98 - type: mrr_at_3 value: 98 - type: mrr_at_5 value: 98 - type: mrr_at_7 value: 98 - type: mrr_at_10 value: 98 - type: mrr_at_20 value: 98 - type: mrr_at_30 value: 98 - type: mrr_at_50 value: 98 - type: mrr_at_70 value: 98 - type: mrr_at_100 value: 98 - type: mrr_at_200 value: 98 - type: mrr_at_300 value: 98 - type: mrr_at_500 value: 98 - type: mrr_at_700 value: 98 - type: mrr_at_1000 value: 98 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: ndcg_at_1 value: 43.878 - type: ndcg_at_2 value: 37.956 - type: ndcg_at_3 value: 35.053 - type: ndcg_at_5 value: 32.59 - type: ndcg_at_7 value: 30.226 - type: ndcg_at_10 value: 29.005 - type: ndcg_at_20 value: 30.11 - type: ndcg_at_30 value: 32.019999999999996 - type: ndcg_at_50 value: 34.354 - type: ndcg_at_70 value: 36.665 - type: ndcg_at_100 value: 38.888 - type: ndcg_at_200 value: 43.435 - type: ndcg_at_300 value: 45.795 - type: ndcg_at_500 value: 48.699999999999996 - type: ndcg_at_700 value: 50.242 - type: ndcg_at_1000 value: 51.529 - type: map_at_1 value: 3.521 - type: map_at_2 value: 5.309 - type: map_at_3 value: 6.576 - type: map_at_5 value: 8.97 - type: map_at_7 value: 10.194 - type: map_at_10 value: 11.949 - type: map_at_20 value: 14.686 - type: map_at_30 value: 15.8 - type: map_at_50 value: 16.59 - type: map_at_70 value: 17.2 - type: map_at_100 value: 17.765 - type: map_at_200 value: 18.636 - type: map_at_300 value: 18.972 - type: map_at_500 value: 19.301 - type: map_at_700 value: 19.445 - type: map_at_1000 value: 19.546 - type: recall_at_1 value: 3.521 - type: recall_at_2 value: 5.848 - type: recall_at_3 value: 7.657 - type: recall_at_5 value: 11.368 - type: recall_at_7 value: 13.748 - type: recall_at_10 value: 18.061 - type: recall_at_20 value: 26.844 - type: recall_at_30 value: 31.186000000000003 - type: recall_at_50 value: 35.951 - type: recall_at_70 value: 40.961999999999996 - type: recall_at_100 value: 46.743 - type: recall_at_200 value: 58.483 - type: recall_at_300 value: 65.973 - type: recall_at_500 value: 75.233 - type: recall_at_700 value: 80.472 - type: recall_at_1000 value: 85.02 - type: precision_at_1 value: 46.939 - type: precision_at_2 value: 38.775999999999996 - type: precision_at_3 value: 34.694 - type: precision_at_5 value: 31.429000000000002 - type: precision_at_7 value: 27.697 - type: precision_at_10 value: 24.490000000000002 - type: precision_at_20 value: 18.776 - type: precision_at_30 value: 15.034 - type: precision_at_50 value: 10.857 - type: precision_at_70 value: 9.096 - type: precision_at_100 value: 7.51 - type: precision_at_200 value: 4.929 - type: precision_at_300 value: 3.7760000000000002 - type: precision_at_500 value: 2.6780000000000004 - type: precision_at_700 value: 2.085 - type: precision_at_1000 value: 1.5709999999999997 - type: mrr_at_1 value: 46.939 - type: mrr_at_2 value: 55.102 - type: mrr_at_3 value: 57.823 - type: mrr_at_5 value: 60.68 - type: mrr_at_7 value: 60.972 - type: mrr_at_10 value: 61.199000000000005 - type: mrr_at_20 value: 61.831 - type: mrr_at_30 value: 61.831 - type: mrr_at_50 value: 61.873 - type: mrr_at_70 value: 61.873 - type: mrr_at_100 value: 61.873 - type: mrr_at_200 value: 61.873 - type: mrr_at_300 value: 61.873 - type: mrr_at_500 value: 61.873 - type: mrr_at_700 value: 61.873 - type: mrr_at_1000 value: 61.873 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 69.3294 - type: ap value: 14.561333393364736 - type: f1 value: 53.992309820496466 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 63.63893604980192 - type: f1 value: 63.92959380489434 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 56.270879258659775 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 88.71073493473207 - type: cos_sim_ap value: 81.52392540284202 - type: cos_sim_f1 value: 74.71162377994676 - type: cos_sim_precision value: 71.89558428885094 - type: cos_sim_recall value: 77.75725593667546 - type: dot_accuracy value: 88.71073493473207 - type: dot_ap value: 81.52394754041109 - type: dot_f1 value: 74.71162377994676 - type: dot_precision value: 71.89558428885094 - type: dot_recall value: 77.75725593667546 - type: euclidean_accuracy value: 88.71073493473207 - type: euclidean_ap value: 81.52392035435321 - type: euclidean_f1 value: 74.71162377994676 - type: euclidean_precision value: 71.89558428885094 - type: euclidean_recall value: 77.75725593667546 - type: manhattan_accuracy value: 88.47231328604637 - type: manhattan_ap value: 81.22907439267321 - type: manhattan_f1 value: 74.3351571446749 - type: manhattan_precision value: 71.78667977390022 - type: manhattan_recall value: 77.0712401055409 - type: max_accuracy value: 88.71073493473207 - type: max_ap value: 81.52394754041109 - type: max_f1 value: 74.71162377994676 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 89.85136026700819 - type: cos_sim_ap value: 87.7768002924216 - type: cos_sim_f1 value: 80.358908624794 - type: cos_sim_precision value: 76.62918209122023 - type: cos_sim_recall value: 84.47028025870034 - type: dot_accuracy value: 89.85136026700819 - type: dot_ap value: 87.77680027889778 - type: dot_f1 value: 80.358908624794 - type: dot_precision value: 76.62918209122023 - type: dot_recall value: 84.47028025870034 - type: euclidean_accuracy value: 89.85136026700819 - type: euclidean_ap value: 87.77680174697751 - type: euclidean_f1 value: 80.358908624794 - type: euclidean_precision value: 76.62918209122023 - type: euclidean_recall value: 84.47028025870034 - type: manhattan_accuracy value: 89.86300306593705 - type: manhattan_ap value: 87.78613271895861 - type: manhattan_f1 value: 80.31831016905645 - type: manhattan_precision value: 76.68230516070304 - type: manhattan_recall value: 84.3162919618109 - type: max_accuracy value: 89.86300306593705 - type: max_ap value: 87.78613271895861 - type: max_f1 value: 80.358908624794 language: - en license: cc-by-nc-4.0 --- <h1 align="center">Salesforce/SFR-Embedding-Mistral</h1> **SFR-Embedding by Salesforce Research.** The model is trained on top of [E5-mistral-7b-instruct](https://huggingface.co/intfloat/e5-mistral-7b-instruct) and [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1). This project is for research purposes only. Third-party datasets may be subject to additional terms and conditions under their associated licenses. Please refer to specific papers for more details: - [MTEB benchmark](https://arxiv.org/abs/2210.07316) - [Mistral](https://arxiv.org/abs/2310.06825) - [E5-mistral-7b-instruct](https://arxiv.org/pdf/2401.00368.pdf) More technical details will be updated later. ## How to run ### Transformers The models can be used as follows: ```python import torch import torch.nn.functional as F from torch import Tensor from transformers import AutoTokenizer, AutoModel def last_token_pool(last_hidden_states: Tensor, attention_mask: Tensor) -> Tensor: left_padding = (attention_mask[:, -1].sum() == attention_mask.shape[0]) if left_padding: return last_hidden_states[:, -1] else: sequence_lengths = attention_mask.sum(dim=1) - 1 batch_size = last_hidden_states.shape[0] return last_hidden_states[torch.arange(batch_size, device=last_hidden_states.device), sequence_lengths] def get_detailed_instruct(task_description: str, query: str) -> str: return f'Instruct: {task_description}\nQuery: {query}' # Each query must come with a one-sentence instruction that describes the task task = 'Given a web search query, retrieve relevant passages that answer the query' queries = [ get_detailed_instruct(task, 'How to bake a chocolate cake'), get_detailed_instruct(task, 'Symptoms of the flu') ] # No need to add instruction for retrieval documents passages = [ "To bake a delicious chocolate cake, you'll need the following ingredients: all-purpose flour, sugar, cocoa powder, baking powder, baking soda, salt, eggs, milk, vegetable oil, and vanilla extract. Start by preheating your oven to 350°F (175°C). In a mixing bowl, combine the dry ingredients (flour, sugar, cocoa powder, baking powder, baking soda, and salt). In a separate bowl, whisk together the wet ingredients (eggs, milk, vegetable oil, and vanilla extract). Gradually add the wet mixture to the dry ingredients, stirring until well combined. Pour the batter into a greased cake pan and bake for 30-35 minutes. Let it cool before frosting with your favorite chocolate frosting. Enjoy your homemade chocolate cake!", "The flu, or influenza, is an illness caused by influenza viruses. Common symptoms of the flu include a high fever, chills, cough, sore throat, runny or stuffy nose, body aches, headache, fatigue, and sometimes nausea and vomiting. These symptoms can come on suddenly and are usually more severe than the common cold. It's important to get plenty of rest, stay hydrated, and consult a healthcare professional if you suspect you have the flu. In some cases, antiviral medications can help alleviate symptoms and reduce the duration of the illness." ] # load model and tokenizer tokenizer = AutoTokenizer.from_pretrained('Salesforce/SFR-Embedding-Mistral') model = AutoModel.from_pretrained('Salesforce/SFR-Embedding-Mistral') # get the embeddings max_length = 4096 input_texts = queries + passages batch_dict = tokenizer(input_texts, max_length=max_length, padding=True, truncation=True, return_tensors="pt") outputs = model(**batch_dict) embeddings = last_token_pool(outputs.last_hidden_state, batch_dict['attention_mask']) # normalize embeddings embeddings = F.normalize(embeddings, p=2, dim=1) scores = (embeddings[:2] @ embeddings[2:].T) * 100 print(scores.tolist()) # [[86.7153549194336, 36.64569091796875], [35.00493621826172, 82.0738525390625]] ``` ### Sentence Transformers ```python from sentence_transformers import SentenceTransformer, util model = SentenceTransformer("Salesforce/SFR-Embedding-Mistral") def get_detailed_instruct(task_description: str, query: str) -> str: return f'Instruct: {task_description}\nQuery: {query}' # Each query must come with a one-sentence instruction that describes the task task = 'Given a web search query, retrieve relevant passages that answer the query' queries = [ get_detailed_instruct(task, 'How to bake a chocolate cake'), get_detailed_instruct(task, 'Symptoms of the flu') ] # No need to add instruction for retrieval documents passages = [ "To bake a delicious chocolate cake, you'll need the following ingredients: all-purpose flour, sugar, cocoa powder, baking powder, baking soda, salt, eggs, milk, vegetable oil, and vanilla extract. Start by preheating your oven to 350°F (175°C). In a mixing bowl, combine the dry ingredients (flour, sugar, cocoa powder, baking powder, baking soda, and salt). In a separate bowl, whisk together the wet ingredients (eggs, milk, vegetable oil, and vanilla extract). Gradually add the wet mixture to the dry ingredients, stirring until well combined. Pour the batter into a greased cake pan and bake for 30-35 minutes. Let it cool before frosting with your favorite chocolate frosting. Enjoy your homemade chocolate cake!", "The flu, or influenza, is an illness caused by influenza viruses. Common symptoms of the flu include a high fever, chills, cough, sore throat, runny or stuffy nose, body aches, headache, fatigue, and sometimes nausea and vomiting. These symptoms can come on suddenly and are usually more severe than the common cold. It's important to get plenty of rest, stay hydrated, and consult a healthcare professional if you suspect you have the flu. In some cases, antiviral medications can help alleviate symptoms and reduce the duration of the illness." ] embeddings = model.encode(queries + passages) scores = util.cos_sim(embeddings[:2], embeddings[2:]) * 100 print(scores.tolist()) # [[86.71537780761719, 36.645721435546875], [35.00497055053711, 82.07388305664062]] ``` ### MTEB Benchmark Evaluation Check out [unilm/e5](https://github.com/microsoft/unilm/tree/master/e5) to reproduce evaluation results on the [BEIR](https://arxiv.org/abs/2104.08663) and [MTEB](https://arxiv.org/abs/2210.07316) benchmark. SFR-Embedding Team (∗indicates lead contributors). * Rui Meng* * Ye Liu* * Shafiq Rayhan Joty * Caiming Xiong * Yingbo Zhou * Semih Yavuz ### Citation ```bibtex @misc{SFRAIResearch2024, title={SFR-Embedding-Mistral:Enhance Text Retrieval with Transfer Learning}, author={Rui Meng, Ye Liu, Shafiq Rayhan Joty, Caiming Xiong, Yingbo Zhou, Semih Yavuz}, howpublished={Salesforce AI Research Blog}, year={2024}, url={https://blog.salesforceairesearch.com/sfr-embedded-mistral/} } ```
nvidia/segformer-b0-finetuned-ade-512-512
nvidia
"2024-01-14T10:46:46Z"
82,397
113
transformers
[ "transformers", "pytorch", "tf", "safetensors", "segformer", "vision", "image-segmentation", "dataset:scene_parse_150", "arxiv:2105.15203", "license:other", "endpoints_compatible", "has_space", "region:us" ]
image-segmentation
"2022-03-02T23:29:05Z"
--- license: other tags: - vision - image-segmentation datasets: - scene_parse_150 widget: - src: https://huggingface.co/datasets/hf-internal-testing/fixtures_ade20k/resolve/main/ADE_val_00000001.jpg example_title: House - src: https://huggingface.co/datasets/hf-internal-testing/fixtures_ade20k/resolve/main/ADE_val_00000002.jpg example_title: Castle --- # SegFormer (b0-sized) model fine-tuned on ADE20k SegFormer model fine-tuned on ADE20k at resolution 512x512. It was introduced in the paper [SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers](https://arxiv.org/abs/2105.15203) by Xie et al. and first released in [this repository](https://github.com/NVlabs/SegFormer). Disclaimer: The team releasing SegFormer did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description SegFormer consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great results on semantic segmentation benchmarks such as ADE20K and Cityscapes. The hierarchical Transformer is first pre-trained on ImageNet-1k, after which a decode head is added and fine-tuned altogether on a downstream dataset. ## Intended uses & limitations You can use the raw model for semantic segmentation. See the [model hub](https://huggingface.co/models?other=segformer) 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 SegformerImageProcessor, SegformerForSemanticSegmentation from PIL import Image import requests processor = SegformerImageProcessor.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512") model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512") url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = Image.open(requests.get(url, stream=True).raw) inputs = processor(images=image, return_tensors="pt") outputs = model(**inputs) logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4) ``` For more code examples, we refer to the [documentation](https://huggingface.co/transformers/model_doc/segformer.html#). ### License The license for this model can be found [here](https://github.com/NVlabs/SegFormer/blob/master/LICENSE). ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2105-15203, author = {Enze Xie and Wenhai Wang and Zhiding Yu and Anima Anandkumar and Jose M. Alvarez and Ping Luo}, title = {SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers}, journal = {CoRR}, volume = {abs/2105.15203}, year = {2021}, url = {https://arxiv.org/abs/2105.15203}, eprinttype = {arXiv}, eprint = {2105.15203}, timestamp = {Wed, 02 Jun 2021 11:46:42 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-2105-15203.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
stablediffusionapi/cutyanime
stablediffusionapi
"2023-10-15T05:33:54Z"
82,134
1
diffusers
[ "diffusers", "stablediffusionapi.com", "stable-diffusion-api", "text-to-image", "ultra-realistic", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2023-10-15T05:31:52Z"
--- license: creativeml-openrail-m tags: - stablediffusionapi.com - stable-diffusion-api - text-to-image - ultra-realistic pinned: true --- # cutyAnime API Inference ![generated from stablediffusionapi.com](https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/17132351361697347852.png) ## Get API Key Get API key from [Stable Diffusion API](http://stablediffusionapi.com/), No Payment needed. Replace Key in below code, change **model_id** to "cutyanime" Coding in PHP/Node/Java etc? Have a look at docs for more code examples: [View docs](https://stablediffusionapi.com/docs) Try model for free: [Generate Images](https://stablediffusionapi.com/models/cutyanime) Model link: [View model](https://stablediffusionapi.com/models/cutyanime) Credits: [View credits](https://civitai.com/?query=cutyAnime) View all models: [View Models](https://stablediffusionapi.com/models) import requests import json url = "https://stablediffusionapi.com/api/v4/dreambooth" payload = json.dumps({ "key": "your_api_key", "model_id": "cutyanime", "prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K", "negative_prompt": "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime", "width": "512", "height": "512", "samples": "1", "num_inference_steps": "30", "safety_checker": "no", "enhance_prompt": "yes", "seed": None, "guidance_scale": 7.5, "multi_lingual": "no", "panorama": "no", "self_attention": "no", "upscale": "no", "embeddings": "embeddings_model_id", "lora": "lora_model_id", "webhook": None, "track_id": None }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) > Use this coupon code to get 25% off **DMGG0RBN**
Falconsai/intent_classification
Falconsai
"2023-12-09T14:40:16Z"
82,002
12
transformers
[ "transformers", "pytorch", "coreml", "safetensors", "distilbert", "text-classification", "en", "arxiv:1910.01108", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2023-10-20T04:18:14Z"
--- license: apache-2.0 pipeline_tag: text-classification language: - en widget: - text: I ordered from you 2 weeks ago and its stil not here. - text: I need to bring in my daughter for a checkup. --- # Model Card: Fine-Tuned DistilBERT for User Intent Classification ## Model Description The **Fine-Tuned DistilBERT** is a variant of the BERT transformer model, distilled for efficient performance while maintaining high accuracy. It has been adapted and fine-tuned for the specific task of classifying user intent in text data. The model, named "distilbert-base-uncased," is pre-trained on a substantial amount of text data, which allows it to capture semantic nuances and contextual information present in natural language text. It has been fine-tuned with meticulous attention to hyperparameter settings, including batch size and learning rate, to ensure optimal model performance for the user intent classification task. During the fine-tuning process, a batch size of 8 for efficient computation and learning was chosen. Additionally, a learning rate (2e-5) was selected to strike a balance between rapid convergence and steady optimization, ensuring the model not only learns quickly but also steadily refines its capabilities throughout training. This model has been trained on a rather small dataset of under 50k, 100 epochs, specifically designed for user intent classification. The dataset consists of text samples, each labeled with different user intents, such as "information seeking," "question asking," or "opinion expressing." The diversity within the dataset allowed the model to learn to identify user intent accurately. This dataset was carefully curated from a variety of sources. The goal of this meticulous training process is to equip the model with the ability to classify user intent in text data effectively, making it ready to contribute to a wide range of applications involving user interaction analysis and personalization. ## Intended Uses & Limitations ### Intended Uses - **User Intent Classification**: The primary intended use of this model is to classify user intent in text data. It is well-suited for applications that involve understanding user intentions, such as chatbots, virtual assistants, and recommendation systems. ### How to Use To use this model for user intent classification, you can follow these steps: ```markdown from transformers import pipeline classifier = pipeline("text-classification", model="Falconsai/intent_classification") text = "Your text to classify here." result = classifier(text) ``` ### Limitations - **Specialized Task Fine-Tuning**: While the model excels at user intent classification, its performance may vary when applied to other natural language processing tasks. Users interested in employing this model for different tasks should explore fine-tuned versions available in the model hub for optimal results. ## Training Data The model's training data includes a proprietary dataset designed for user intent classification. This dataset comprises a diverse collection of text samples, categorized into various user intent classes. The training process aimed to equip the model with the ability to classify user intent effectively. ### Training Stats - Evaluation Loss: 0.011744413524866104 - Evaluation Accuracy: 0.9986976744186047 - Evaluation Runtime: 3.1136 - Evaluation Samples per Second: 1726.29 - Evaluation Steps per Second: 215.826 ## Responsible Usage It is essential to use this model responsibly and ethically, adhering to content guidelines and applicable regulations when implementing it in real-world applications, particularly those involving potentially sensitive content. ## References - [Hugging Face Model Hub](https://huggingface.co/models) - [DistilBERT Paper](https://arxiv.org/abs/1910.01108) **Disclaimer:** The model's performance may be influenced by the quality and representativeness of the data it was fine-tuned on. Users are encouraged to assess the model's suitability for their specific applications and datasets.
HooshvareLab/bert-base-parsbert-ner-uncased
HooshvareLab
"2021-05-18T20:43:54Z"
81,989
4
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "token-classification", "fa", "arxiv:2005.12515", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:04Z"
--- language: fa license: apache-2.0 --- ## ParsBERT: Transformer-based Model for Persian Language Understanding ParsBERT is a monolingual language model based on Google’s BERT architecture with the same configurations as BERT-Base. Paper presenting ParsBERT: [arXiv:2005.12515](https://arxiv.org/abs/2005.12515) All the models (downstream tasks) are uncased and trained with whole word masking. (coming soon stay tuned) ## Persian NER [ARMAN, PEYMA, ARMAN+PEYMA] This task aims to extract named entities in the text, such as names and label with appropriate `NER` classes such as locations, organizations, etc. The datasets used for this task contain sentences that are marked with `IOB` format. In this format, tokens that are not part of an entity are tagged as `”O”` the `”B”`tag corresponds to the first word of an object, and the `”I”` tag corresponds to the rest of the terms of the same entity. Both `”B”` and `”I”` tags are followed by a hyphen (or underscore), followed by the entity category. Therefore, the NER task is a multi-class token classification problem that labels the tokens upon being fed a raw text. There are two primary datasets used in Persian NER, `ARMAN`, and `PEYMA`. In ParsBERT, we prepared ner for both datasets as well as a combination of both datasets. ### PEYMA PEYMA dataset includes 7,145 sentences with a total of 302,530 tokens from which 41,148 tokens are tagged with seven different classes. 1. Organization 2. Money 3. Location 4. Date 5. Time 6. Person 7. Percent | Label | # | |:------------:|:-----:| | Organization | 16964 | | Money | 2037 | | Location | 8782 | | Date | 4259 | | Time | 732 | | Person | 7675 | | Percent | 699 | **Download** You can download the dataset from [here](http://nsurl.org/tasks/task-7-named-entity-recognition-ner-for-farsi/) --- ### ARMAN ARMAN dataset holds 7,682 sentences with 250,015 sentences tagged over six different classes. 1. Organization 2. Location 3. Facility 4. Event 5. Product 6. Person | Label | # | |:------------:|:-----:| | Organization | 30108 | | Location | 12924 | | Facility | 4458 | | Event | 7557 | | Product | 4389 | | Person | 15645 | **Download** You can download the dataset from [here](https://github.com/HaniehP/PersianNER) ## Results The following table summarizes the F1 score obtained by ParsBERT as compared to other models and architectures. | Dataset | ParsBERT | MorphoBERT | Beheshti-NER | LSTM-CRF | Rule-Based CRF | BiLSTM-CRF | |:---------------:|:--------:|:----------:|:--------------:|:----------:|:----------------:|:------------:| | ARMAN + PEYMA | 95.13* | - | - | - | - | - | | PEYMA | 98.79* | - | 90.59 | - | 84.00 | - | | ARMAN | 93.10* | 89.9 | 84.03 | 86.55 | - | 77.45 | ## How to use :hugs: | Notebook | Description | | |:----------|:-------------|------:| | [How to use Pipelines](https://github.com/hooshvare/parsbert-ner/blob/master/persian-ner-pipeline.ipynb) | Simple and efficient way to use State-of-the-Art models on downstream tasks through transformers | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hooshvare/parsbert-ner/blob/master/persian-ner-pipeline.ipynb) | ## Cite Please cite the following paper in your publication if you are using [ParsBERT](https://arxiv.org/abs/2005.12515) in your research: ```markdown @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} } ``` ## Acknowledgments We hereby, express our gratitude to the [Tensorflow Research Cloud (TFRC) program](https://tensorflow.org/tfrc) for providing us with the necessary computation resources. We also thank [Hooshvare](https://hooshvare.com) Research Group for facilitating dataset gathering and scraping online text resources. ## Contributors - Mehrdad Farahani: [Linkedin](https://www.linkedin.com/in/m3hrdadfi/), [Twitter](https://twitter.com/m3hrdadfi), [Github](https://github.com/m3hrdadfi) - Mohammad Gharachorloo: [Linkedin](https://www.linkedin.com/in/mohammad-gharachorloo/), [Twitter](https://twitter.com/MGharachorloo), [Github](https://github.com/baarsaam) - Marzieh Farahani: [Linkedin](https://www.linkedin.com/in/marziehphi/), [Twitter](https://twitter.com/marziehphi), [Github](https://github.com/marziehphi) - Mohammad Manthouri: [Linkedin](https://www.linkedin.com/in/mohammad-manthouri-aka-mansouri-07030766/), [Twitter](https://twitter.com/mmanthouri), [Github](https://github.com/mmanthouri) - Hooshvare Team: [Official Website](https://hooshvare.com/), [Linkedin](https://www.linkedin.com/company/hooshvare), [Twitter](https://twitter.com/hooshvare), [Github](https://github.com/hooshvare), [Instagram](https://www.instagram.com/hooshvare/) + And a special thanks to Sara Tabrizi for her fantastic poster design. Follow her on: [Linkedin](https://www.linkedin.com/in/sara-tabrizi-64548b79/), [Behance](https://www.behance.net/saratabrizi), [Instagram](https://www.instagram.com/sara_b_tabrizi/) ## Releases ### Release v0.1 (May 29, 2019) This is the first version of our ParsBERT NER!
stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1
stjiris
"2023-01-20T01:17:55Z"
81,837
1
sentence-transformers
[ "sentence-transformers", "pytorch", "bert", "feature-extraction", "transformers", "sentence-similarity", "pt", "dataset:stjiris/portuguese-legal-sentences-v0", "dataset:assin", "dataset:assin2", "dataset:stsb_multi_mt", "dataset:stjiris/IRIS_sts", "license:mit", "model-index", "endpoints_compatible", "region:us" ]
sentence-similarity
"2023-01-06T20:09:44Z"
--- language: - pt thumbnail: Portuguese BERT for the Legal Domain tags: - sentence-transformers - transformers - bert - pytorch - sentence-similarity license: mit pipeline_tag: sentence-similarity datasets: - stjiris/portuguese-legal-sentences-v0 - assin - assin2 - stsb_multi_mt - stjiris/IRIS_sts widget: - source_sentence: "O advogado apresentou as provas ao juíz." sentences: - "O juíz leu as provas." - "O juíz leu o recurso." - "O juíz atirou uma pedra." model-index: - name: BERTimbau results: - task: name: STS type: STS metrics: - name: Pearson Correlation - assin Dataset type: Pearson Correlation value: 0.7774097897260964 - name: Pearson Correlation - assin2 Dataset type: Pearson Correlation value: 0.8097518625809903 - name: Pearson Correlation - stsb_multi_mt pt Dataset type: Pearson Correlation value: 0.8358844307795662 - name: Pearson Correlation - IRIS STS Dataset type: Pearson Correlation value: 0.7856746037418626 --- [![INESC-ID](https://www.inesc-id.pt/wp-content/uploads/2019/06/INESC-ID-logo_01.png)](https://www.inesc-id.pt/projects/PR07005/) [![A Semantic Search System for Supremo Tribunal de Justiça](https://rufimelo99.github.io/SemanticSearchSystemForSTJ/_static/logo.png)](https://rufimelo99.github.io/SemanticSearchSystemForSTJ/) Work developed as part of [Project IRIS](https://www.inesc-id.pt/projects/PR07005/). Thesis: [A Semantic Search System for Supremo Tribunal de Justiça](https://rufimelo99.github.io/SemanticSearchSystemForSTJ/) # stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1 (Legal BERTimbau) This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search. stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1 derives from stjiris/bert-large-portuguese-cased-legal-mlm (legal variant of [BERTimbau](https://huggingface.co/neuralmind/bert-large-portuguese-cased) large). It was trained using the MLM technique with a learning rate 1e-5 [Legal Sentences from +-30000 documents](https://huggingface.co/datasets/stjiris/portuguese-legal-sentences-v1.0) 15000 training steps (best performance for our semantic search system implementation) The model was presented to NLI data. 16 batch size, 2e-5 lr It was trained for Semantic Textual Similarity, being submitted to a fine tuning stage with the [assin](https://huggingface.co/datasets/assin), [assin2](https://huggingface.co/datasets/assin2), [stsb_multi_mt pt](https://huggingface.co/datasets/stsb_multi_mt) and [IRIS STS](https://huggingface.co/datasets/stjiris/IRIS_sts) datasets. 'lr': 1e-5 ## 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 = ["Isto é um exemplo", "Isto é um outro exemplo"] model = SentenceTransformer('stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) ```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('stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1') model = AutoModel.from_pretrained('stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1') # 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) ``` ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 514, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 1028, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False}) ) ``` ## Citing & Authors ### Contributions [@rufimelo99](https://github.com/rufimelo99) If you use this work, please cite: ```bibtex @inproceedings{MeloSemantic, author = {Melo, Rui and Santos, Professor Pedro Alexandre and Dias, Professor Jo{\~ a}o}, title = {A {Semantic} {Search} {System} for {Supremo} {Tribunal} de {Justi}{\c c}a}, } @inproceedings{souza2020bertimbau, author = {F{\'a}bio Souza and Rodrigo Nogueira and Roberto Lotufo}, title = {{BERT}imbau: pretrained {BERT} models for {B}razilian {P}ortuguese}, booktitle = {9th Brazilian Conference on Intelligent Systems, {BRACIS}, Rio Grande do Sul, Brazil, October 20-23 (to appear)}, year = {2020} } @inproceedings{fonseca2016assin, title={ASSIN: Avaliacao de similaridade semantica e inferencia textual}, author={Fonseca, E and Santos, L and Criscuolo, Marcelo and Aluisio, S}, booktitle={Computational Processing of the Portuguese Language-12th International Conference, Tomar, Portugal}, pages={13--15}, year={2016} } @inproceedings{real2020assin, title={The assin 2 shared task: a quick overview}, author={Real, Livy and Fonseca, Erick and Oliveira, Hugo Goncalo}, booktitle={International Conference on Computational Processing of the Portuguese Language}, pages={406--412}, year={2020}, organization={Springer} } @InProceedings{huggingface:dataset:stsb_multi_mt, title = {Machine translated multilingual STS benchmark dataset.}, author={Philip May}, year={2021}, url={https://github.com/PhilipMay/stsb-multi-mt} } ```
Systran/faster-whisper-medium
Systran
"2023-11-23T11:13:59Z"
81,750
5
ctranslate2
[ "ctranslate2", "audio", "automatic-speech-recognition", "en", "zh", "de", "es", "ru", "ko", "fr", "ja", "pt", "tr", "pl", "ca", "nl", "ar", "sv", "it", "id", "hi", "fi", "vi", "he", "uk", "el", "ms", "cs", "ro", "da", "hu", "ta", "no", "th", "ur", "hr", "bg", "lt", "la", "mi", "ml", "cy", "sk", "te", "fa", "lv", "bn", "sr", "az", "sl", "kn", "et", "mk", "br", "eu", "is", "hy", "ne", "mn", "bs", "kk", "sq", "sw", "gl", "mr", "pa", "si", "km", "sn", "yo", "so", "af", "oc", "ka", "be", "tg", "sd", "gu", "am", "yi", "lo", "uz", "fo", "ht", "ps", "tk", "nn", "mt", "sa", "lb", "my", "bo", "tl", "mg", "as", "tt", "haw", "ln", "ha", "ba", "jw", "su", "license:mit", "has_space", "region:us" ]
automatic-speech-recognition
"2023-11-23T09:51:42Z"
--- language: - en - zh - de - es - ru - ko - fr - ja - pt - tr - pl - ca - nl - ar - sv - it - id - hi - fi - vi - he - uk - el - ms - cs - ro - da - hu - ta - 'no' - th - ur - hr - bg - lt - la - mi - ml - cy - sk - te - fa - lv - bn - sr - az - sl - kn - et - mk - br - eu - is - hy - ne - mn - bs - kk - sq - sw - gl - mr - pa - si - km - sn - yo - so - af - oc - ka - be - tg - sd - gu - am - yi - lo - uz - fo - ht - ps - tk - nn - mt - sa - lb - my - bo - tl - mg - as - tt - haw - ln - ha - ba - jw - su tags: - audio - automatic-speech-recognition license: mit library_name: ctranslate2 --- # Whisper medium model for CTranslate2 This repository contains the conversion of [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format. This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/systran/faster-whisper). ## Example ```python from faster_whisper import WhisperModel model = WhisperModel("medium") segments, info = model.transcribe("audio.mp3") for segment in segments: print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text)) ``` ## Conversion details The original model was converted with the following command: ``` ct2-transformers-converter --model openai/whisper-medium --output_dir faster-whisper-medium \ --copy_files tokenizer.json --quantization float16 ``` Note that the model weights are saved in FP16. This type can be changed when the model is loaded using the [`compute_type` option in CTranslate2](https://opennmt.net/CTranslate2/quantization.html). ## More information **For more information about the original model, see its [model card](https://huggingface.co/openai/whisper-medium).**
TheBloke/Mistral-7B-Instruct-v0.2-AWQ
TheBloke
"2023-12-11T22:36:20Z"
81,605
31
transformers
[ "transformers", "safetensors", "mistral", "text-generation", "finetuned", "conversational", "arxiv:2310.06825", "base_model:mistralai/Mistral-7B-Instruct-v0.2", "license:apache-2.0", "autotrain_compatible", "has_space", "text-generation-inference", "4-bit", "region:us" ]
text-generation
"2023-12-11T22:18:46Z"
--- base_model: mistralai/Mistral-7B-Instruct-v0.2 inference: false license: apache-2.0 model_creator: Mistral AI_ model_name: Mistral 7B Instruct v0.2 model_type: mistral pipeline_tag: text-generation prompt_template: '<s>[INST] {prompt} [/INST] ' quantized_by: TheBloke tags: - finetuned --- <!-- markdownlint-disable MD041 --> <!-- header start --> <!-- 200823 --> <div style="width: auto; margin-left: auto; margin-right: auto"> <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;"> </div> <div style="display: flex; justify-content: space-between; width: 100%;"> <div style="display: flex; flex-direction: column; align-items: flex-start;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p> </div> <div style="display: flex; flex-direction: column; align-items: flex-end;"> <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p> </div> </div> <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div> <hr style="margin-top: 1.0em; margin-bottom: 1.0em;"> <!-- header end --> # Mistral 7B Instruct v0.2 - AWQ - Model creator: [Mistral AI_](https://huggingface.co/mistralai) - Original model: [Mistral 7B Instruct v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) <!-- description start --> ## Description This repo contains AWQ model files for [Mistral AI_'s Mistral 7B Instruct v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2). These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/). ### About AWQ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings. AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead. It is supported by: - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types. - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF) * [Mistral AI_'s original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Mistral ``` <s>[INST] {prompt} [/INST] ``` <!-- prompt-template end --> <!-- README_AWQ.md-provided-files start --> ## Provided files, and AWQ parameters I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered. Models are released as sharded safetensors files. | Branch | Bits | GS | AWQ Dataset | Seq Len | Size | | ------ | ---- | -- | ----------- | ------- | ---- | | [main](https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 4.15 GB <!-- README_AWQ.md-provided-files end --> <!-- README_AWQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui) Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/Mistral-7B-Instruct-v0.2-AWQ`. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `Mistral-7B-Instruct-v0.2-AWQ` 7. Select **Loader: AutoAWQ**. 8. Click Load, and the model will load and is now ready for use. 9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started! <!-- README_AWQ.md-text-generation-webui end --> <!-- README_AWQ.md-use-from-vllm start --> ## Multi-user inference server: vLLM Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/). - Please ensure you are using vLLM version 0.2 or later. - When using vLLM as a server, pass the `--quantization awq` parameter. For example: ```shell python3 -m vllm.entrypoints.api_server --model TheBloke/Mistral-7B-Instruct-v0.2-AWQ --quantization awq --dtype auto ``` - When using vLLM from Python code, again set `quantization=awq`. For example: ```python from vllm import LLM, SamplingParams prompts = [ "Tell me about AI", "Write a story about llamas", "What is 291 - 150?", "How much wood would a woodchuck chuck if a woodchuck could chuck wood?", ] prompt_template=f'''<s>[INST] {prompt} [/INST] ''' prompts = [prompt_template.format(prompt=prompt) for prompt in prompts] sampling_params = SamplingParams(temperature=0.8, top_p=0.95) llm = LLM(model="TheBloke/Mistral-7B-Instruct-v0.2-AWQ", quantization="awq", dtype="auto") outputs = llm.generate(prompts, sampling_params) # Print the outputs. for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") ``` <!-- README_AWQ.md-use-from-vllm start --> <!-- README_AWQ.md-use-from-tgi start --> ## Multi-user inference server: Hugging Face Text Generation Inference (TGI) Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0` Example Docker parameters: ```shell --model-id TheBloke/Mistral-7B-Instruct-v0.2-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096 ``` Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later): ```shell pip3 install huggingface-hub ``` ```python from huggingface_hub import InferenceClient endpoint_url = "https://your-endpoint-url-here" prompt = "Tell me about AI" prompt_template=f'''<s>[INST] {prompt} [/INST] ''' client = InferenceClient(endpoint_url) response = client.text_generation(prompt, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1) print(f"Model output: ", response) ``` <!-- README_AWQ.md-use-from-tgi end --> <!-- README_AWQ.md-use-from-python start --> ## Inference from Python code using Transformers ### Install the necessary packages - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later. - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later. ```shell pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0" ``` Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0. If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command: ```shell pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl ``` If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y autoawq git clone https://github.com/casper-hansen/AutoAWQ cd AutoAWQ pip3 install . ``` ### Transformers example code (requires Transformers 4.35.0 and later) ```python from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model_name_or_path = "TheBloke/Mistral-7B-Instruct-v0.2-AWQ" tokenizer = AutoTokenizer.from_pretrained(model_name_or_path) model = AutoModelForCausalLM.from_pretrained( model_name_or_path, low_cpu_mem_usage=True, device_map="cuda:0" ) # Using the text streamer to stream output one token at a time streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) prompt = "Tell me about AI" prompt_template=f'''<s>[INST] {prompt} [/INST] ''' # Convert prompt to tokens tokens = tokenizer( prompt_template, return_tensors='pt' ).input_ids.cuda() generation_params = { "do_sample": True, "temperature": 0.7, "top_p": 0.95, "top_k": 40, "max_new_tokens": 512, "repetition_penalty": 1.1 } # Generate streamed output, visible one token at a time generation_output = model.generate( tokens, streamer=streamer, **generation_params ) # Generation without a streamer, which will include the prompt in the output generation_output = model.generate( tokens, **generation_params ) # Get the tokens from the output, decode them, print them token_output = generation_output[0] text_output = tokenizer.decode(token_output) print("model.generate output: ", text_output) # Inference is also possible via Transformers' pipeline from transformers import pipeline pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, **generation_params ) pipe_output = pipe(prompt_template)[0]['generated_text'] print("pipeline output: ", pipe_output) ``` <!-- README_AWQ.md-use-from-python end --> <!-- README_AWQ.md-compatibility start --> ## Compatibility The files provided are tested to work with: - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`. - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later. - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later. - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later. - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later. <!-- README_AWQ.md-compatibility end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: Mistral AI_'s Mistral 7B Instruct v0.2 # Model Card for Mistral-7B-Instruct-v0.2 The Mistral-7B-Instruct-v0.2 Large Language Model (LLM) is an improved instruct fine-tuned version of [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1). For full details of this model please read our [paper](https://arxiv.org/abs/2310.06825) and [release blog post](https://mistral.ai/news/la-plateforme/). ## Instruction format In order to leverage instruction fine-tuning, your prompt should be surrounded by `[INST]` and `[/INST]` tokens. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id. E.g. ``` text = "<s>[INST] What is your favourite condiment? [/INST]" "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!</s> " "[INST] Do you have mayonnaise recipes? [/INST]" ``` This format is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating) via the `apply_chat_template()` method: ```python from transformers import AutoModelForCausalLM, AutoTokenizer device = "cuda" # the device to load the model onto model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") messages = [ {"role": "user", "content": "What is your favourite condiment?"}, {"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"}, {"role": "user", "content": "Do you have mayonnaise recipes?"} ] encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt") model_inputs = encodeds.to(device) model.to(device) generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True) decoded = tokenizer.batch_decode(generated_ids) print(decoded[0]) ``` ## Model Architecture This instruction model is based on Mistral-7B-v0.1, a transformer model with the following architecture choices: - Grouped-Query Attention - Sliding-Window Attention - Byte-fallback BPE tokenizer ## Troubleshooting - If you see the following error: ``` Traceback (most recent call last): File "", line 1, in File "/transformers/models/auto/auto_factory.py", line 482, in from_pretrained config, kwargs = AutoConfig.from_pretrained( File "/transformers/models/auto/configuration_auto.py", line 1022, in from_pretrained config_class = CONFIG_MAPPING[config_dict["model_type"]] File "/transformers/models/auto/configuration_auto.py", line 723, in getitem raise KeyError(key) KeyError: 'mistral' ``` Installing transformers from source should solve the issue pip install git+https://github.com/huggingface/transformers This should not be required after transformers-v4.33.4. ## Limitations The Mistral 7B Instruct model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance. It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs. ## The Mistral AI Team Albert Jiang, Alexandre Sablayrolles, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Lélio Renard Lavaud, Louis Ternon, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Théophile Gervet, Thibaut Lavril, Thomas Wang, Timothée Lacroix, William El Sayed.
LanguageBind/Video-LLaVA-7B
LanguageBind
"2024-04-09T13:32:08Z"
81,574
68
transformers
[ "transformers", "pytorch", "safetensors", "llava", "text-generation", "arxiv:2311.10122", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-generation
"2023-11-17T05:09:17Z"
--- license: apache-2.0 --- <p align="center"> <img src="https://z1.ax1x.com/2023/11/07/pil4sqH.png" width="150" style="margin-bottom: 0.2;"/> <p> <h2 align="center"> <a href="https://arxiv.org/abs/2311.10122">Video-LLaVA: Learning United Visual Representation by Alignment Before Projection</a></h2> <h5 align="center"> If you like our project, please give us a star ⭐ on GitHub for latest update. </h2> ## 📰 News * **[2024.01.27]** 👀👀👀 Our [MoE-LLaVA](https://github.com/PKU-YuanGroup/MoE-LLaVA) is released! A sparse model with 3B parameters outperformed the dense model with 7B parameters. * **[2024.01.17]** 🔥🔥🔥 Our [LanguageBind](https://github.com/PKU-YuanGroup/LanguageBind) has been accepted at ICLR 2024! * **[2024.01.16]** 🔥🔥🔥 We reorganize the code and support LoRA fine-tuning, checking [finetune_lora.sh](scripts/v1_5/finetune_lora.sh). * **[2023.11.30]** 🤝 Thanks to the generous contributions of the community, the [OpenXLab's demo](https://openxlab.org.cn/apps/detail/houshaowei/Video-LLaVA) is now accessible. * **[2023.11.23]** We are training a new and powerful model. * **[2023.11.21]** 🤝 Check out the [replicate demo](https://replicate.com/nateraw/video-llava), created by [@nateraw](https://github.com/nateraw), who has generously supported our research! * **[2023.11.20]** 🤗 [Hugging Face demo](https://huggingface.co/spaces/LanguageBind/Video-LLaVA) and **all codes & datasets** are available now! Welcome to **watch** 👀 this repository for the latest updates. ## 😮 Highlights Video-LLaVA exhibits remarkable interactive capabilities between images and videos, despite the absence of image-video pairs in the dataset. ### 💡 Simple baseline, learning united visual representation by alignment before projection - With **the binding of unified visual representations to the language feature space**, we enable an LLM to perform visual reasoning capabilities on both images and videos simultaneously. ### 🔥 High performance, complementary learning with video and image - Extensive experiments demonstrate **the complementarity of modalities**, showcasing significant superiority when compared to models specifically designed for either images or videos. ## 🤗 Demo ### Gradio Web UI Highly recommend trying out our web demo by the following command, which incorporates all features currently supported by Video-LLaVA. We also provide [online demo](https://huggingface.co/spaces/LanguageBind/Video-LLaVA) in Huggingface Spaces. ```bash python -m videollava.serve.gradio_web_server ``` ### CLI Inference ```bash python -m videollava.serve.cli --model-path "LanguageBind/Video-LLaVA-7B" --file "path/to/your/video.mp4" --load-4bit ``` ```bash python -m videollava.serve.cli --model-path "LanguageBind/Video-LLaVA-7B" --file "path/to/your/image.jpg" --load-4bit ``` ## 🛠️ Requirements and Installation * Python >= 3.10 * Pytorch == 2.0.1 * CUDA Version >= 11.7 * Install required packages: ```bash git clone https://github.com/PKU-YuanGroup/Video-LLaVA cd Video-LLaVA conda create -n videollava python=3.10 -y conda activate videollava pip install --upgrade pip # enable PEP 660 support pip install -e . pip install -e ".[train]" pip install flash-attn --no-build-isolation pip install decord opencv-python git+https://github.com/facebookresearch/pytorchvideo.git@28fe037d212663c6a24f373b94cc5d478c8c1a1d ``` ## 🤖 API **We open source all codes.** If you want to load the model (e.g. ```LanguageBind/Video-LLaVA-7B```) on local, you can use the following code snippets. ### Inference for image ```python import torch from videollava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN from videollava.conversation import conv_templates, SeparatorStyle from videollava.model.builder import load_pretrained_model from videollava.utils import disable_torch_init from videollava.mm_utils import tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria def main(): disable_torch_init() image = 'videollava/serve/examples/extreme_ironing.jpg' inp = 'What is unusual about this image?' model_path = 'LanguageBind/Video-LLaVA-7B' cache_dir = 'cache_dir' device = 'cuda' load_4bit, load_8bit = True, False model_name = get_model_name_from_path(model_path) tokenizer, model, processor, _ = load_pretrained_model(model_path, None, model_name, load_8bit, load_4bit, device=device, cache_dir=cache_dir) image_processor = processor['image'] conv_mode = "llava_v1" conv = conv_templates[conv_mode].copy() roles = conv.roles image_tensor = image_processor.preprocess(image, return_tensors='pt')['pixel_values'] if type(image_tensor) is list: tensor = [image.to(model.device, dtype=torch.float16) for image in image_tensor] else: tensor = image_tensor.to(model.device, dtype=torch.float16) print(f"{roles[1]}: {inp}") inp = DEFAULT_IMAGE_TOKEN + '\n' + inp conv.append_message(conv.roles[0], inp) conv.append_message(conv.roles[1], None) prompt = conv.get_prompt() input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 keywords = [stop_str] stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) with torch.inference_mode(): output_ids = model.generate( input_ids, images=tensor, do_sample=True, temperature=0.2, max_new_tokens=1024, use_cache=True, stopping_criteria=[stopping_criteria]) outputs = tokenizer.decode(output_ids[0, input_ids.shape[1]:]).strip() print(outputs) if __name__ == '__main__': main() ``` ### Inference for video ```python import torch from videollava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN from videollava.conversation import conv_templates, SeparatorStyle from videollava.model.builder import load_pretrained_model from videollava.utils import disable_torch_init from videollava.mm_utils import tokenizer_image_token, get_model_name_from_path, KeywordsStoppingCriteria def main(): disable_torch_init() video = 'videollava/serve/examples/sample_demo_1.mp4' inp = 'Why is this video funny?' model_path = 'LanguageBind/Video-LLaVA-7B' cache_dir = 'cache_dir' device = 'cuda' load_4bit, load_8bit = True, False model_name = get_model_name_from_path(model_path) tokenizer, model, processor, _ = load_pretrained_model(model_path, None, model_name, load_8bit, load_4bit, device=device, cache_dir=cache_dir) video_processor = processor['video'] conv_mode = "llava_v1" conv = conv_templates[conv_mode].copy() roles = conv.roles video_tensor = video_processor(video, return_tensors='pt')['pixel_values'] if type(video_tensor) is list: tensor = [video.to(model.device, dtype=torch.float16) for video in video_tensor] else: tensor = video_tensor.to(model.device, dtype=torch.float16) print(f"{roles[1]}: {inp}") inp = ' '.join([DEFAULT_IMAGE_TOKEN] * model.get_video_tower().config.num_frames) + '\n' + inp conv.append_message(conv.roles[0], inp) conv.append_message(conv.roles[1], None) prompt = conv.get_prompt() input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt').unsqueeze(0).cuda() stop_str = conv.sep if conv.sep_style != SeparatorStyle.TWO else conv.sep2 keywords = [stop_str] stopping_criteria = KeywordsStoppingCriteria(keywords, tokenizer, input_ids) with torch.inference_mode(): output_ids = model.generate( input_ids, images=tensor, do_sample=True, temperature=0.1, max_new_tokens=1024, use_cache=True, stopping_criteria=[stopping_criteria]) outputs = tokenizer.decode(output_ids[0, input_ids.shape[1]:]).strip() print(outputs) if __name__ == '__main__': main() ``` ## 🗝️ Training & Validating The training & validating instruction is in [TRAIN_AND_VALIDATE.md](TRAIN_AND_VALIDATE.md). ## 👍 Acknowledgement * [LLaVA](https://github.com/haotian-liu/LLaVA) The codebase we built upon and it is an efficient large language and vision assistant. * [Video-ChatGPT](https://github.com/mbzuai-oryx/Video-ChatGPT) Great job contributing the evaluation code and dataset. ## 🙌 Related Projects * [LanguageBind](https://github.com/PKU-YuanGroup/LanguageBind) An open source five modalities language-based retrieval framework. * [Chat-UniVi](https://github.com/PKU-YuanGroup/Chat-UniVi) This framework empowers the model to efficiently utilize a limited number of visual tokens. ## 🔒 License * The majority of this project is released under the Apache 2.0 license as found in the [LICENSE](https://github.com/PKU-YuanGroup/Video-LLaVA/blob/main/LICENSE) file. * The service is a research preview intended for non-commercial use only, subject to the model [License](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md) of LLaMA, [Terms of Use](https://openai.com/policies/terms-of-use) of the data generated by OpenAI, and [Privacy Practices](https://chrome.google.com/webstore/detail/sharegpt-share-your-chatg/daiacboceoaocpibfodeljbdfacokfjb) of ShareGPT. Please contact us if you find any potential violation. ## ✏️ Citation If you find our paper and code useful in your research, please consider giving a star :star: and citation :pencil:. ```BibTeX @article{lin2023video, title={Video-LLaVA: Learning United Visual Representation by Alignment Before Projection}, author={Lin, Bin and Zhu, Bin and Ye, Yang and Ning, Munan and Jin, Peng and Yuan, Li}, journal={arXiv preprint arXiv:2311.10122}, year={2023} } ``` ```BibTeX @article{zhu2023languagebind, title={LanguageBind: Extending Video-Language Pretraining to N-modality by Language-based Semantic Alignment}, author={Zhu, Bin and Lin, Bin and Ning, Munan and Yan, Yang and Cui, Jiaxi and Wang, HongFa and Pang, Yatian and Jiang, Wenhao and Zhang, Junwu and Li, Zongwei and others}, journal={arXiv preprint arXiv:2310.01852}, year={2023} } ``` <!----> ## ✨ Star History [![Star History](https://api.star-history.com/svg?repos=PKU-YuanGroup/Video-LLaVA&type=Date)](https://star-history.com/#PKU-YuanGroup/Video-LLaVA&Date) ## 🤝 Contributors <a href="https://github.com/PKU-YuanGroup/Video-LLaVA/graphs/contributors"> <img src="https://contrib.rocks/image?repo=PKU-YuanGroup/Video-LLaVA" /> </a>
pszemraj/flan-t5-large-grammar-synthesis
pszemraj
"2023-11-16T15:32:23Z"
81,567
78
transformers
[ "transformers", "pytorch", "onnx", "safetensors", "t5", "text2text-generation", "grammar", "spelling", "punctuation", "error-correction", "grammar synthesis", "FLAN", "dataset:jfleg", "arxiv:2107.06751", "doi:10.57967/hf/0138", "license:cc-by-nc-sa-4.0", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2022-11-26T02:40:52Z"
--- languages: - en license: - cc-by-nc-sa-4.0 - apache-2.0 tags: - grammar - spelling - punctuation - error-correction - grammar synthesis - FLAN datasets: - jfleg widget: - text: "There car broke down so their hitching a ride to they're class." example_title: "compound-1" - text: "i can has cheezburger" example_title: "cheezburger" - text: "so em if we have an now so with fito ringina know how to estimate the tren given the ereafte mylite trend we can also em an estimate is nod s i again tort watfettering an we have estimated the trend an called wot to be called sthat of exty right now we can and look at wy this should not hare a trend i becan we just remove the trend an and we can we now estimate tesees ona effect of them exty" example_title: "Transcribed Audio Example 2" - text: "My coworker said he used a financial planner to help choose his stocks so he wouldn't loose money." example_title: "incorrect word choice (context)" - text: "good so hve on an tadley i'm not able to make it to the exla session on monday this week e which is why i am e recording pre recording an this excelleision and so to day i want e to talk about two things and first of all em i wont em wene give a summary er about ta ohow to remove trents in these nalitives from time series" example_title: "lowercased audio transcription output" - text: "Frustrated, the chairs took me forever to set up." example_title: "dangling modifier" - text: "I would like a peice of pie." example_title: "miss-spelling" - text: "Which part of Zurich was you going to go hiking in when we were there for the first time together? ! ?" example_title: "chatbot on Zurich" - text: "Most of the course is about semantic or content of language but there are also interesting topics to be learned from the servicefeatures except statistics in characters in documents. At this point, Elvthos introduces himself as his native English speaker and goes on to say that if you continue to work on social scnce," example_title: "social science ASR summary output" - text: "they are somewhat nearby right yes please i'm not sure how the innish is tepen thut mayyouselect one that istatte lo variants in their property e ere interested and anyone basical e may be applyind reaching the browing approach were" example_title: "medical course audio transcription" parameters: max_length: 128 min_length: 4 num_beams: 8 repetition_penalty: 1.21 length_penalty: 1 early_stopping: True --- # grammar-synthesis-large: FLAN-t5 <a href="https://colab.research.google.com/gist/pszemraj/5dc89199a631a9c6cfd7e386011452a0/demo-flan-t5-large-grammar-synthesis.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> A fine-tuned version of [google/flan-t5-large](https://huggingface.co/google/flan-t5-large) for grammar correction on an expanded version of the [JFLEG](https://paperswithcode.com/dataset/jfleg) dataset. [Demo](https://huggingface.co/spaces/pszemraj/FLAN-grammar-correction) on HF spaces. ## Example ![example](https://i.imgur.com/PIhrc7E.png) Compare vs. the original [grammar-synthesis-large](https://huggingface.co/pszemraj/grammar-synthesis-large). --- ## usage in Python > There's a colab notebook that already has this basic version implemented (_click on the Open in Colab button_) After `pip install transformers` run the following code: ```python from transformers import pipeline corrector = pipeline( 'text2text-generation', 'pszemraj/flan-t5-large-grammar-synthesis', ) raw_text = 'i can has cheezburger' results = corrector(raw_text) print(results) ``` **For Batch Inference:** see [this discussion thread](https://huggingface.co/pszemraj/flan-t5-large-grammar-synthesis/discussions/1) for details, but essentially the dataset consists of several sentences at a time, and so I'd recommend running inference **in the same fashion:** batches of 64-96 tokens ish (or, 2-3 sentences split with regex) - it is also helpful to **first** check whether or not a given sentence needs grammar correction before using the text2text model. You can do this with BERT-type models fine-tuned on CoLA like `textattack/roberta-base-CoLA` - I made a notebook demonstrating batch inference [here](https://colab.research.google.com/gist/pszemraj/6e961b08970f98479511bb1e17cdb4f0/batch-grammar-check-correct-demo.ipynb) --- ## Model description The intent is to create a text2text language model that successfully completes "single-shot grammar correction" on a potentially grammatically incorrect text **that could have a lot of mistakes** with the important qualifier of **it does not semantically change text/information that IS grammatically correct.** Compare some of the heavier-error examples on [other grammar correction models](https://huggingface.co/models?dataset=dataset:jfleg) to see the difference :) ### ONNX Checkpoint This model has been converted to ONNX and can be loaded/used with huggingface's `optimum` library. You first need to [install optimum](https://huggingface.co/docs/optimum/installation) ```bash pip install optimum[onnxruntime] # ^ if you want to use a different runtime read their docs ``` load with the optimum `pipeline` ```python from optimum.pipelines import pipeline corrector = pipeline( "text2text-generation", model=corrector_model_name, accelerator="ort" ) # use as normal ``` ### Other checkpoints If trading a slight decrease in grammatical correction quality for faster inference speed makes sense for your use case, check out the **[base](https://huggingface.co/pszemraj/grammar-synthesis-base)** and **[small](https://huggingface.co/pszemraj/grammar-synthesis-small)** checkpoints fine-tuned from the relevant t5 checkpoints. ## Limitations - dataset: `cc-by-nc-sa-4.0` - model: `apache-2.0` - this is **still a work-in-progress** and while probably useful for "single-shot grammar correction" in a lot of cases, **give the outputs a glance for correctness ok?** ## Use Cases Obviously, this section is quite general as there are many things one can use "general single-shot grammar correction" for. Some ideas or use cases: 1. Correcting highly error-prone LM outputs. Some examples would be audio transcription (ASR) (this is literally some of the examples) or something like handwriting OCR. - To be investigated further, depending on what model/system is used it _might_ be worth it to apply this after OCR on typed characters. 2. Correcting/infilling text generated by text generation models to be cohesive/remove obvious errors that break the conversation immersion. I use this on the outputs of [this OPT 2.7B chatbot-esque model of myself](https://huggingface.co/pszemraj/opt-peter-2.7B). > An example of this model running on CPU with beam search: ``` Original response: ive heard it attributed to a bunch of different philosophical schools, including stoicism, pragmatism, existentialism and even some forms of post-structuralism. i think one of the most interesting (and most difficult) philosophical problems is trying to let dogs (or other animals) out of cages. the reason why this is a difficult problem is because it seems to go against our grain (so to synthesizing took 306.12 seconds Final response in 1294.857 s: I've heard it attributed to a bunch of different philosophical schools, including solipsism, pragmatism, existentialism and even some forms of post-structuralism. i think one of the most interesting (and most difficult) philosophical problems is trying to let dogs (or other animals) out of cages. the reason why this is a difficult problem is because it seems to go against our grain (so to speak) ``` _Note: that I have some other logic that removes any periods at the end of the final sentence in this chatbot setting [to avoid coming off as passive aggressive](https://www.npr.org/2020/09/05/909969004/before-texting-your-kid-make-sure-to-double-check-your-punctuation)_ 3. Somewhat related to #2 above, fixing/correcting so-called [tortured-phrases](https://arxiv.org/abs/2107.06751) that are dead giveaways text was generated by a language model. _Note that _SOME_ of these are not fixed, especially as they venture into domain-specific terminology (i.e. irregular timberland instead of Random Forest)._ --- ## Citation info If you find this fine-tuned model useful in your work, please consider citing it :) ``` @misc {peter_szemraj_2022, author = { {Peter Szemraj} }, title = { flan-t5-large-grammar-synthesis (Revision d0b5ae2) }, year = 2022, url = { https://huggingface.co/pszemraj/flan-t5-large-grammar-synthesis }, doi = { 10.57967/hf/0138 }, publisher = { Hugging Face } } ```
SG161222/RealVisXL_V4.0
SG161222
"2024-04-12T15:36:22Z"
81,520
36
diffusers
[ "diffusers", "safetensors", "license:openrail++", "endpoints_compatible", "has_space", "diffusers:StableDiffusionXLPipeline", "region:us" ]
null
"2024-02-12T16:20:30Z"
--- license: openrail++ --- <b>This model is available on <a href="https://www.mage.space/">Mage.Space</a> (main sponsor)</b><br> <b>You can support me directly on Boosty - https://boosty.to/sg_161222</b><br> <b>It's important! Read it!</b><br> The model is still in the training phase. This is not the final version and may contain artifacts and perform poorly in some cases.<br> The model is aimed at photorealism. Can produce sfw and nsfw images of decent quality.<br> CivitAI Page: https://civitai.com/models/139562/realvisxl-v40-turbo<br> <b>Recommended Negative Prompt:</b><br> (face asymmetry, eyes asymmetry, deformed eyes, open mouth)<br> <b>or another negative prompt</b><br> <b>Recommended Generation Parameters:</b><br> Sampling Steps: 25+<br> Sampling Method: DPM++ 2M Karras<br> <b>Recommended Hires Fix Parameters:</b><br> Hires steps: 10+<br> Upscaler: 4x-UltraSharp upscaler / or another<br> Denoising strength: 0.1 - 0.5<br> Upscale by: 1.1-2.0<br>
Qwen/Qwen-72B-Chat
Qwen
"2024-01-04T06:44:08Z"
81,389
136
transformers
[ "transformers", "safetensors", "qwen", "text-generation", "custom_code", "zh", "en", "arxiv:2309.16609", "arxiv:2305.08322", "arxiv:2009.03300", "arxiv:2307.11088", "license:other", "autotrain_compatible", "has_space", "region:us" ]
text-generation
"2023-11-29T09:37:07Z"
--- language: - zh - en tags: - qwen pipeline_tag: text-generation inference: false license: other license_name: tongyi-qianwen-license-agreement license_link: https://github.com/QwenLM/Qwen/blob/main/Tongyi%20Qianwen%20LICENSE%20AGREEMENT --- # Qwen-72B-Chat <p align="center"> <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/logo_qwen.jpg" width="400"/> <p> <br> <p align="center"> 🤗 <a href="https://huggingface.co/Qwen">Hugging Face</a>&nbsp&nbsp | &nbsp&nbsp🤖 <a href="https://modelscope.cn/organization/qwen">ModelScope</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://arxiv.org/abs/2309.16609">Paper</a> &nbsp&nbsp | &nbsp&nbsp🖥️ <a href="https://modelscope.cn/studios/qwen/Qwen-72B-Chat-Demo/summary">Demo</a> <br> <a href="https://github.com/QwenLM/Qwen/blob/main/assets/wechat.png">WeChat (微信)</a>&nbsp&nbsp | &nbsp&nbsp<a href="https://discord.gg/z3GAxXZ9Ce">Discord</a>&nbsp&nbsp | &nbsp&nbsp<a href="https://dashscope.aliyun.com">API</a> </p> <br> ## 介绍(Introduction) **通义千问-72B**(**Qwen-72B**)是阿里云研发的通义千问大模型系列的720亿参数规模的模型。Qwen-72B是基于Transformer的大语言模型, 在超大规模的预训练数据上进行训练得到。预训练数据类型多样,覆盖广泛,包括大量网络文本、专业书籍、代码等。同时,在Qwen-72B的基础上,我们使用对齐机制打造了基于大语言模型的AI助手Qwen-72B-Chat。本仓库为Qwen-72B-Chat的仓库。 通义千问-72B(Qwen-72B)主要有以下特点: 1. **大规模高质量训练语料**:使用超过3万亿tokens的数据进行预训练,包含高质量中、英、多语言、代码、数学等数据,涵盖通用及专业领域的训练语料。通过大量对比实验对预训练语料分布进行了优化。 2. **强大的性能**:Qwen-72B在多个中英文下游评测任务上(涵盖常识推理、代码、数学、翻译等),效果显著超越现有的开源模型。具体评测结果请详见下文。 3. **覆盖更全面的词表**:相比目前以中英词表为主的开源模型,Qwen-72B使用了约15万大小的词表。该词表对多语言更加友好,方便用户在不扩展词表的情况下对部分语种进行能力增强和扩展。 4. **更长的上下文支持**:Qwen-72B支持32k的上下文长度。 5. **系统指令跟随**:Qwen-72B-Chat可以通过调整系统指令,实现**角色扮演**,**语言风格迁移**,**任务设定**,和**行为设定**等能力。 如果您想了解更多关于通义千问72B开源模型的细节,我们建议您参阅[GitHub代码库](https://github.com/QwenLM/Qwen)。 **Qwen-72B** is the 72B-parameter version of the large language model series, Qwen (abbr. Tongyi Qianwen), proposed by Alibaba Cloud. Qwen-72B is a Transformer-based large language model, which is pretrained on a large volume of data, including web texts, books, codes, etc. Additionally, based on the pretrained Qwen-72B, we release Qwen-72B-Chat, a large-model-based AI assistant, which is trained with alignment techniques. This repository is the one for Qwen-72B-Chat. The features of Qwen-72B include: 1. **Large-scale high-quality training corpora**: It is pretrained on over 3 trillion tokens, including Chinese, English, multilingual texts, code, and mathematics, covering general and professional fields. The distribution of the pre-training corpus has been optimized through a large number of ablation experiments. 2. **Competitive performance**: It significantly surpasses existing open-source models on multiple Chinese and English downstream evaluation tasks (including commonsense, reasoning, code, mathematics, etc.). See below for specific evaluation results. 3. **More comprehensive vocabulary coverage**: Compared with other open-source models based on Chinese and English vocabularies, Qwen-72B uses a vocabulary of over 150K tokens. This vocabulary is more friendly to multiple languages, enabling users to directly further enhance the capability for certain languages without expanding the vocabulary. 4. **Longer context support**: Qwen-72B supports 32k context length. 5. **System prompt**: Qwen-72B can realize roly playing, language style transfer, task setting, and behavior setting by using system prompt. For more details about the open-source model of Qwen-72B, please refer to the [GitHub](https://github.com/QwenLM/Qwen) code repository. <br> ## 要求(Requirements) * python 3.8及以上版本 * pytorch 1.12及以上版本,推荐2.0及以上版本 * 建议使用CUDA 11.4及以上(GPU用户、flash-attention用户等需考虑此选项) * **运行BF16或FP16模型需要多卡至少144GB显存(例如2xA100-80G或5xV100-32G);运行Int4模型至少需要48GB显存(例如1xA100-80G或2xV100-32G)** * python 3.8 and above * pytorch 1.12 and above, 2.0 and above are recommended * CUDA 11.4 and above are recommended (this is for GPU users, flash-attention users, etc.) * **To run Qwen-72B-Chat in bf16/fp16, at least 144GB GPU memory is required (e.g., 2xA100-80G or 5xV100-32G). To run it in int4, at least 48GB GPU memory is required (e.g., 1xA100-80G or 2xV100-32G)** <br> ## 依赖项(Dependency) ### 使用HuggingFace进行推理 运行Qwen-72B-Chat,请确保满足上述要求,再执行以下pip命令安装依赖库 To run Qwen-72B-Chat, please make sure you meet the above requirements, and then execute the following pip commands to install the dependent libraries. ```bash pip install "transformers>=4.32.0" accelerate tiktoken einops scipy transformers_stream_generator==0.0.4 peft deepspeed ``` 另外,推荐安装`flash-attention`库(**当前已支持flash attention 2**),以实现更高的效率和更低的显存占用。 In addition, it is recommended to install the `flash-attention` library (**we support flash attention 2 now.**) for higher efficiency and lower memory usage. ```bash git clone https://github.com/Dao-AILab/flash-attention cd flash-attention && pip install . # 下方安装可选,安装可能比较缓慢。 # Below are optional. Installing them might be slow. # pip install csrc/layer_norm # 如果你的flash-attn版本高于2.1.1,下方不需要安装。 # If the version of flash-attn is higher than 2.1.1, the following is not needed. # pip install csrc/rotary ``` ### 使用vLLM进行推理 使用vLLM进行推理可以支持更长的上下文长度并获得至少两倍的生成加速。你需要满足以下要求: Using vLLM for inference can support longer context lengths and obtain at least twice the generation speedup. You need to meet the following requirements: * pytorch >= 2.0 * cuda 11.8 or 12.1 如果你使用cuda12.1和pytorch2.1,可以直接使用以下命令安装vLLM。 If you use cuda 12.1 and pytorch 2.1, you can directly use the following command to install vLLM. ```bash # pip install vllm # This line is faster but it does not support quantization models. # The below lines support int4 quantization (int8 will be supported soon). The installation are slower (~10 minutes). git clone https://github.com/QwenLM/vllm-gptq cd vllm-gptq pip install -e . ``` 否则请参考vLLM官方的[安装说明](https://docs.vllm.ai/en/latest/getting_started/installation.html),或者我们[vLLM分支仓库(支持量化模型)](https://github.com/QwenLM/vllm-gptq)。 Otherwise, please refer to the official vLLM [Installation Instructions](https://docs.vllm.ai/en/latest/getting_started/installation.html), or our [vLLM repo for GPTQ quantization](https://github.com/QwenLM/vllm-gptq). <br> ## 快速使用(Quickstart) ### 使用HuggingFace Transformers进行推理(Inference with Huggingface Transformers) 下面我们展示了一个使用Qwen-72B-Chat模型,进行多轮对话交互的样例: We show an example of multi-turn interaction with Qwen-72B-Chat in the following code: ```python from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.generation import GenerationConfig # Note: The default behavior now has injection attack prevention off. tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-72B-Chat", trust_remote_code=True) # use bf16 # model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-72B-Chat", device_map="auto", trust_remote_code=True, bf16=True).eval() # use fp16 # model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-72B-Chat", device_map="auto", trust_remote_code=True, fp16=True).eval() # use cpu only # model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-72B-Chat", device_map="cpu", trust_remote_code=True).eval() # use auto mode, automatically select precision based on the device. model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-72B-Chat", device_map="auto", trust_remote_code=True).eval() # NOTE: The above line would require at least 144GB memory in total # Specify hyperparameters for generation. But if you use transformers>=4.32.0, there is no need to do this. # model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-72B-Chat", trust_remote_code=True) # 可指定不同的生成长度、top_p等相关超参 # 第一轮对话 1st dialogue turn response, history = model.chat(tokenizer, "你好", history=None) print(response) # 你好!很高兴为你提供帮助。 # 第二轮对话 2nd dialogue turn response, history = model.chat(tokenizer, "给我讲一个年轻人奋斗创业最终取得成功的故事。", history=history) print(response) # 这是一个关于一个年轻人奋斗创业最终取得成功的故事。 # 故事的主人公叫李明,他来自一个普通的家庭,父母都是普通的工人。从小,李明就立下了一个目标:要成为一名成功的企业家。 # 为了实现这个目标,李明勤奋学习,考上了大学。在大学期间,他积极参加各种创业比赛,获得了不少奖项。他还利用课余时间去实习,积累了宝贵的经验。 # 毕业后,李明决定开始自己的创业之路。他开始寻找投资机会,但多次都被拒绝了。然而,他并没有放弃。他继续努力,不断改进自己的创业计划,并寻找新的投资机会。 # 最终,李明成功地获得了一笔投资,开始了自己的创业之路。他成立了一家科技公司,专注于开发新型软件。在他的领导下,公司迅速发展起来,成为了一家成功的科技企业。 # 李明的成功并不是偶然的。他勤奋、坚韧、勇于冒险,不断学习和改进自己。他的成功也证明了,只要努力奋斗,任何人都有可能取得成功。 # 第三轮对话 3rd dialogue turn response, history = model.chat(tokenizer, "给这个故事起一个标题", history=history) print(response) # 《奋斗创业:一个年轻人的成功之路》 # Qwen-72B-Chat现在可以通过调整系统指令(System Prompt),实现角色扮演,语言风格迁移,任务设定,行为设定等能力。 # Qwen-72B-Chat can realize roly playing, language style transfer, task setting, and behavior setting by system prompt. response, _ = model.chat(tokenizer, "你好呀", history=None, system="请用二次元可爱语气和我说话") print(response) # 哎呀,你好哇!是怎么找到人家的呢?是不是被人家的魅力吸引过来的呀~(≧▽≦)/~ response, _ = model.chat(tokenizer, "My colleague works diligently", history=None, system="You will write beautiful compliments according to needs") print(response) # Your colleague is a shining example of dedication and hard work. Their commitment to their job is truly commendable, and it shows in the quality of their work. # They are an asset to the team, and their efforts do not go unnoticed. Keep up the great work! ``` ### 使用vLLM和类Transformers接口进行推理(Inference with vLLM and Transformers-like APIs) 在根据上方依赖性部分的说明安装vLLM后,可以下载[接口封装代码](https://qianwen-res.oss-cn-beijing.aliyuncs.com/vllm_wrapper.py)到当前文件夹,并执行以下命令进行多轮对话交互。(注意:该方法当前只支持``model.chat()``接口。) After installing vLLM according to the dependency section above, you can download the [wrapper codes](https://qianwen-res.oss-cn-beijing.aliyuncs.com/vllm_wrapper.py) and execute the following commands for multiple rounds of dialogue interaction. (Note: It currently only supports the ``model.chat()`` method.) ```python from vllm_wrapper import vLLMWrapper model = vLLMWrapper('Qwen/Qwen-72B-Chat', tensor_parallel_size=2) # model = vLLMWrapper('Qwen/Qwen-72B-Chat-Int4', tensor_parallel_size=1, dtype="float16") # 运行int4模型。 run int4 model. response, history = model.chat(query="你好", history=None) print(response) response, history = model.chat(query="给我讲一个年轻人奋斗创业最终取得成功的故事。", history=history) print(response) response, history = model.chat(query="给这个故事起一个标题", history=history) print(response) ``` ### 使用vLLM和类OpenAI接口进行推理(Inference with vLLM and OpenAI-like API) 请参考我们GitHub repo中[vLLM部署](https://github.com/QwenLM/Qwen#vllm)和[OpenAI接口使用](https://github.com/QwenLM/Qwen#openai-api)两个部分的介绍。 Please refer to the introduction of [vLLM deployment](https://github.com/QwenLM/Qwen#vllm) and [OpenAI interface usage](https://github.com/QwenLM/Qwen#openai-api) in our GitHub repo. 如果使用2xA100-80G进行部署,可以运行以下代码: If deploying with 2xA100-80G, you can run the following code: ```python python -m fastchat.serve.controller python -m fastchat.serve.vllm_worker --model-path Qwen/Qwen-72B-Chat --trust-remote-code --tensor-parallel-size 2 --gpu-memory-utilization 0.98 --dtype bfloat16 # python -m fastchat.serve.vllm_worker --model-path Qwen/Qwen-72B-Chat-Int4 --trust-remote-code --dtype float16 # 运行int4模型。 run int4 model. python -m fastchat.serve.openai_api_server --host localhost --port 8000 ``` 注意需要``--gpu-memory-utilization 0.98``参数避免OOM问题。 Note that the ``--gpu-memory-utilization 0.98`` parameter is required to avoid OOM problems. <br> 关于更多的使用说明,请参考我们的[GitHub repo](https://github.com/QwenLM/Qwen)获取更多信息。 For more information, please refer to our [GitHub repo](https://github.com/QwenLM/Qwen) for more information. <br> ## 量化 (Quantization) ### 用法 (Usage) 以下我们提供示例说明如何使用Int4/Int8量化模型。在开始使用前,请先保证满足要求(如torch 2.0及以上,transformers版本为4.32.0及以上,等等),并安装所需安装包: Here we demonstrate how to use our provided quantized models for inference. Before you start, make sure you meet the requirements of auto-gptq (e.g., torch 2.0 and above, transformers 4.32.0 and above, etc.) and install the required packages: ```bash pip install auto-gptq optimum ``` 如安装`auto-gptq`遇到问题,我们建议您到官方[repo](https://github.com/PanQiWei/AutoGPTQ)搜索合适的预编译wheel。 If you meet problems installing `auto-gptq`, we advise you to check out the official [repo](https://github.com/PanQiWei/AutoGPTQ) to find a pre-build wheel. > 注意:预编译的`auto-gptq`版本对`torch`版本及其CUDA版本要求严格。同时,由于 > 其近期更新,你可能会遇到`transformers`、`optimum`或`peft`抛出的版本错误。 > 我们建议使用符合以下要求的最新版本: > - torch==2.1 auto-gptq>=0.5.1 transformers>=4.35.0 optimum>=1.14.0 peft>=0.6.1 > - torch>=2.0,<2.1 auto-gptq<0.5.0 transformers<4.35.0 optimum<1.14.0 peft>=0.5.0,<0.6.0 > Note: The pre-compiled `auto-gptq` packages strongly depend on the version of `torch` and its CUDA version. Moreover, due to recent update, > you may also encounter unsupported version errors from `transformers`, `optimum`, or `peft`. > We recommend using the latest versions meeting the following requirements : > - torch==2.1 auto-gptq>=0.5.1 transformers>=4.35.0 optimum>=1.14.0 peft>=0.6.1 > - torch>=2.0,<2.1 auto-gptq<0.5.0 transformers<4.35.0 optimum<1.14.0 peft>=0.5.0,<0.6.0 随后即可使用和上述一致的用法调用量化模型: Then you can load the quantized model easily and run inference as same as usual: ```python model = AutoModelForCausalLM.from_pretrained( "Qwen/Qwen-72B-Chat-Int4", device_map="auto", trust_remote_code=True ).eval() response, history = model.chat(tokenizer, "你好", history=None) ``` 注意:使用vLLM运行量化模型需安装我们[vLLM分支仓库](https://github.com/QwenLM/vllm-gptq)。暂不支持int8模型,近期将更新。 Note: You need to install our [vLLM repo] (https://github.com/qwenlm/vllm-gptq) for AutoGPTQ. The int8 model is not supported for the time being, and we will add the support soon. ### 效果评测 我们对BF16,Int8和Int4模型在基准评测上做了测试(使用zero-shot设置),结果如下所示: We illustrate the zero-shot performance of both BF16, Int8 and Int4 models on the benchmark. Results are shown below: | Quantization | MMLU | CEval (val) | GSM8K | Humaneval | |--------------|:----:|:-----------:|:-----:|:---------:| | BF16 | 74.4 | 80.1 | 76.4 | 64.6 | | Int8 | 73.5 | 80.1 | 73.5 | 62.2 | | Int4 | 73.4 | 80.1 | 75.3 | 61.6 | ### 推理速度及显存使用 (Inference Speed & GPU Memory Usage) 我们测算了不同精度模型、不同FlashAttn库版本、以及是否使用vLLM的情况下,模型在不同输入长度下生成2048词的平均推理速度以及显存使用。 We measured the average inference speed and GPU memory usage of generating 2048 tokens across several settings, including input lengths, quantization levels, versions of flash-attention, and whether vLLM is used. | Quantization | Setting | # of A100-80G GPUs | Context Length | Generation Length | Speed (Tokens/s) | Total GPU Memory Usage | | ------------- | :---------------: | :----------------: | :-------------: | :---------------: | :---------------:| :---------------------:| | BF16 | HF + FlashAttn-v2 | 2 | 1 | 2048 | 8.48 | 144.69GB | | BF16 | HF + FlashAttn-v1 | 2 | 1 | 2048 | 8.31 | 144.69GB | | BF16 | HF + No FlashAttn | 2 | 1 | 2048 | 7.89 | 144.69GB | | BF16 | vLLM | 2 | 1 | 2048 | 17.60 | Pre-Allocated* | | BF16 | vLLM | 4 | 1 | 2048 | 26.16 | Pre-Allocated* | | BF16 | HF + FlashAttn-v2 | 4 | 6144 | 2048 | 5.37 | 181.47GB | | BF16 | HF + FlashAttn-v1 | 4 | 6144 | 2048 | 4.96 | 181.47GB | | BF16 | HF + No FlashAttn | 4 | 6144 | 2048 | 4.72 | 202.74GB | | BF16 | vLLM | 4 | 6144 | 2048 | 24.41 | Pre-Allocated* | | BF16 | vLLM | 4 | 14336 | 2048 | 21.24 | Pre-Allocated* | | BF16 | vLLM | 4 | 30720 | 2048 | 17.55 | Pre-Allocated* | | Int8 | HF + FlashAttn-v2 | 2 | 1 | 2048 | 9.05 | 81.27GB | | Int8 | HF + FlashAttn-v1 | 2 | 1 | 2048 | 8.97 | 81.27GB | | Int8 | HF + No FlashAttn | 2 | 1 | 2048 | 8.32 | 81.27GB | | Int8 | HF + FlashAttn-v2 | 3 | 6144 | 2048 | 5.76 | 118.06GB | | Int8 | HF + FlashAttn-v1 | 3 | 6144 | 2048 | 5.72 | 118.06GB | | Int8 | HF + No FlashAttn | 2 | 6144 | 2048 | 4.50 | 129.83GB | | Int8 | HF + FlashAttn-v2 | 4 | 14336 | 2048 | 3.44 | 180.44GB | | Int8 | HF + FlashAttn-v1 | 4 | 14336 | 2048 | 3.19 | 180.44GB | | Int8 | HF + No FlashAttn | 4 | 14336 | 2048 | OOM | OOM | | Int4 | HF + FlashAttn-v2 | 1 | 1 | 2048 | 11.67 | 48.86GB | | Int4 | HF + FlashAttn-v1 | 1 | 1 | 2048 | 11.27 | 48.86GB | | Int4 | HF + No FlashAttn | 1 | 1 | 2048 | 11.32 | 48.86GB | | Int4 | vLLM | 1 | 1 | 2048 | 14.63 | Pre-Allocated* | | Int4 | vLLM | 2 | 1 | 2048 | 20.76 | Pre-Allocated* | | Int4 | vLLM | 4 | 1 | 2048 | 27.19 | Pre-Allocated* | | Int4 | HF + FlashAttn-v2 | 2 | 6144 | 2048 | 6.75 | 85.99GB | | Int4 | HF + FlashAttn-v1 | 2 | 6144 | 2048 | 6.32 | 85.99GB | | Int4 | HF + No FlashAttn | 2 | 6144 | 2048 | 5.97 | 88.30GB | | Int4 | vLLM | 2 | 6144 | 2048 | 18.07 | Pre-Allocated* | | Int4 | vLLM | 4 | 6144 | 2048 | 24.56 | Pre-Allocated* | | Int4 | HF + FlashAttn-v2 | 3 | 14336 | 2048 | 4.18 | 148.73GB | | Int4 | HF + FlashAttn-v1 | 3 | 14336 | 2048 | 3.72 | 148.73GB | | Int4 | HF + No FlashAttn | 3 | 14336 | 2048 | OOM | OOM | | Int4 | vLLM | 2 | 14336 | 2048 | 14.51 | Pre-Allocated* | | Int4 | vLLM | 4 | 14336 | 2048 | 19.28 | Pre-Allocated* | | Int4 | vLLM | 4 | 30720 | 2048 | 16.93 | Pre-Allocated* | \* vLLM会提前预分配显存,因此无法探测最大显存使用情况。HF是指使用Huggingface Transformers库进行推理。 \* vLLM pre-allocates GPU memory, so we cannot detect the maximum usage. HF refers to using the Huggingface Transformers library for inference. HuggingFace Transformers的性能测算使用[此脚本](https://qianwen-res.oss-cn-beijing.aliyuncs.com/profile.py)完成。评测使用A100-SXM4-80G GPU,使用PyTorch 2.0.1 (Huggingface Transformers) / PyTorch 2.1.0 (vLLM)和CUDA 11.8。 The speed and memory profiling of HuggingFace Transformers are conducted using [this script](https://qianwen-res.oss-cn-beijing.aliyuncs.com/profile.py). The profiling runs on A100-SXM4-80G GPUs with PyTorch 2.0.1 (for Huggingface Transformers) / PyTorch 2.1.0 (for vLLM) and CUDA 11.8. <br> ## 模型细节(Model) 与Qwen-72B预训练模型相同,Qwen-72B-Chat模型规模基本情况如下所示 The details of the model architecture of Qwen-72B-Chat are listed as follows | Hyperparameter | Value | |:----------------|:-------| | n_layers | 80 | | n_heads | 64 | | d_model | 8192 | | vocab size | 151851 | | sequence length | 32768 | 在位置编码、FFN激活函数和normalization的实现方式上,我们也采用了目前最流行的做法, 即RoPE相对位置编码、SwiGLU激活函数、RMSNorm(可选安装flash-attention加速)。 在分词器方面,相比目前主流开源模型以中英词表为主,Qwen-72B-Chat使用了约15万token大小的词表。 该词表在GPT-4使用的BPE词表`cl100k_base`基础上,对中文、多语言进行了优化,在对中、英、代码数据的高效编解码的基础上,对部分多语言更加友好,方便用户在不扩展词表的情况下对部分语种进行能力增强。 词表对数字按单个数字位切分。调用较为高效的[tiktoken分词库](https://github.com/openai/tiktoken)进行分词。 For position encoding, FFN activation function, and normalization calculation methods, we adopt the prevalent practices, i.e., RoPE relative position encoding, SwiGLU for activation function, and RMSNorm for normalization (optional installation of flash-attention for acceleration). For tokenization, compared to the current mainstream open-source models based on Chinese and English vocabularies, Qwen-72B-Chat uses a vocabulary of over 150K tokens. It first considers efficient encoding of Chinese, English, and code data, and is also more friendly to multilingual languages, enabling users to directly enhance the capability of some languages without expanding the vocabulary. It segments numbers by single digit, and calls the [tiktoken](https://github.com/openai/tiktoken) tokenizer library for efficient tokenization. <br> ## 评测效果(Evaluation) 对于Qwen-72B-Chat模型,我们同样评测了常规的中文理解(C-Eval)、英文理解(MMLU)、代码(HumanEval)和数学(GSM8K)等权威任务,同时包含了长序列任务的评测结果。由于Qwen-72B-Chat模型经过对齐后,激发了较强的外部系统调用能力,我们还进行了工具使用能力方面的评测。 提示:由于硬件和框架造成的舍入误差,复现结果如有波动属于正常现象。 For Qwen-72B-Chat, we also evaluate the model on C-Eval, MMLU, HumanEval, GSM8K, etc., as well as the benchmark evaluation for long-context understanding, and tool usage. Note: Due to rounding errors caused by hardware and framework, differences in reproduced results are possible. ### 中文评测(Chinese Evaluation) #### C-Eval 在[C-Eval](https://arxiv.org/abs/2305.08322)验证集上,我们评价了Qwen-72B-Chat模型的0-shot & 5-shot准确率 We demonstrate the 0-shot & 5-shot accuracy of Qwen-72B-Chat on C-Eval validation set | Model | Avg. Acc. | |:--------------------------------:|:---------:| | LLaMA2-7B-Chat | 31.9 | | LLaMA2-13B-Chat | 36.2 | | LLaMA2-70B-Chat | 44.3 | | ChatGPT3.5 | 52.5 | | ChatGPT4 | 69.9 | | Yi-34B-Chat (0-shot) | 77.0 | | Yi-34B-Chat (5-shot) | 78.5 | | Qwen-7B-Chat (original) (0-shot) | 54.2 | | **Qwen-7B-Chat (0-shot)** | 59.7 | | **Qwen-7B-Chat (5-shot)** | 59.3 | | **Qwen-14B-Chat (0-shot)** | 69.8 | | **Qwen-14B-Chat (5-shot)** | 71.7 | | **Qwen-72B-Chat (0-shot)** | 80.1 | | **Qwen-72B-Chat (5-shot)** | 82.9 | C-Eval测试集上,Qwen-72B-Chat模型的zero-shot准确率结果如下: The zero-shot accuracy of Qwen-72B-Chat on C-Eval testing set is provided below: | Model | Avg. | STEM | Social Sciences | Humanities | Others | | :---------------------- | :------: | :--: | :-------------: | :--------: | :----: | | Qwen-7B-Chat (original) | 54.6 | 47.8 | 67.6 | 59.3 | 50.6 | | **Qwen-7B-Chat** | 58.6 | 53.3 | 72.1 | 62.8 | 52.0 | | **Qwen-14B-Chat** | 69.1 | 65.1 | 80.9 | 71.2 | 63.4 | | **Qwen-72B-Chat** | 79.5 | 74.5 | 89.1 | 81.2 | 78.1 | ### 英文评测(English Evaluation) #### MMLU [MMLU](https://arxiv.org/abs/2009.03300)评测集上,Qwen-7B-Chat模型的 0-shot & 5-shot 准确率如下,效果同样在同类对齐模型中同样表现较优。 The 0-shot & 5-shot accuracy of Qwen-72B-Chat on MMLU is provided below. The performance of Qwen-72B-Chat still on the top between other human-aligned models with comparable size. | Model | Avg. Acc. | |:--------------------------------:|:---------:| | LLaMA2-7B-Chat | 46.2 | | LLaMA2-13B-Chat | 54.6 | | LLaMA2-70B-Chat | 63.8 | | Yi-34B-Chat (0-shot) | 67.6 | | Yi-34B-Chat (5-shot) | 73.4 | | ChatGPT3.5 | 69.1 | | ChatGPT4 | 83.0 | | Qwen-7B-Chat (original) (0-shot) | 53.9 | | **Qwen-7B-Chat (0-shot)** | 55.8 | | **Qwen-7B-Chat (5-shot)** | 57.0 | | **Qwen-14B-Chat (0-shot)** | 64.6 | | **Qwen-14B-Chat (5-shot)** | 66.5 | | **Qwen-72B-Chat (0-shot)** | 74.3 | | **Qwen-72B-Chat (5-shot)** | 75.0 | ### 代码评测(Coding Evaluation) Qwen-72B-Chat在[HumanEval](https://github.com/openai/human-eval)的zero-shot Pass@1效果如下 The zero-shot Pass@1 of Qwen-72B-Chat on [HumanEval](https://github.com/openai/human-eval) is demonstrated below | Model | Pass@1 | |:-----------------------:|:--------:| | LLaMA2-7B-Chat | 12.2 | | LLaMA2-13B-Chat | 18.9 | | LLaMA2-70B-Chat | 32.3 | | Yi-34B-Chat | 33.5 | | ChatGPT3.5 | 73.2 | | ChatGPT4 | 86.6 | | Qwen-7B-Chat (original) | 24.4 | | **Qwen-7B-Chat** | 37.2 | | **Qwen-14B-Chat** | 43.9 | | **Qwen-72B-Chat** | 64.6 | ### 数学评测(Mathematics Evaluation) 在评测数学能力的[GSM8K](https://github.com/openai/grade-school-math)上,Qwen-72B-Chat的准确率结果如下 The accuracy of Qwen-72B-Chat on GSM8K is shown below | Model | Acc. | |:--------------------------------:|:--------:| | LLaMA2-7B-Chat | 26.3 | | LLaMA2-13B-Chat | 37.1 | | LLaMA2-70B-Chat | 59.3 | | Yi-34B-Chat | 71.6 | | ChatGPT3.5 | 73.2 | | ChatGPT4 | 91.4 | | Qwen-7B-Chat (original) (0-shot) | 41.1 | | **Qwen-7B-Chat (0-shot)** | 50.3 | | **Qwen-7B-Chat (8-shot)** | 54.1 | | **Qwen-14B-Chat (0-shot)** | 60.1 | | **Qwen-14B-Chat (8-shot)** | 59.3 | | **Qwen-72B-Chat (0-shot)** | 76.4 | | **Qwen-72B-Chat (8-shot)** | 75.7 | ### 长序列评测(Long-Context Understanding) Qwen-72B-Chat支持最长32k的上下文长度,在[L-Eval](https://arxiv.org/abs/2307.11088)客观题的评分结果如下: Qwen-72B-Chat supports context lengths of up to 32k. The scores of [L-Eval](https://arxiv.org/abs/2307.11088) (closed-ended tasks) are as follows: | Model | Average | Coursera | GSM | QuALITY | TOEFL | CodeU | SFcition | |:------------------|:----------:|:----------:|:----------:|:----------:|:----------:|:----------:|:----------:| | ChatGPT-3.5-16k | 60.73 | **63.51** | **84.00** | 61.38 | 78.43 | **12.22** | 64.84 | | **Qwen-72B-Chat** | **62.30** | 58.13 | 76.00 | **77.22** | **86.24** | 6.66 | **69.53** | 我们进一步进行了“大海捞针”实验(想法来自于[@Greg Kamradt](https://twitter.com/GregKamradt/status/1727018183608193393)),测试模型在不同长度的输入下,是否能检索到文章不同位置的信息,结果如下: We conducted the "needle in a haystack" experiment (the idea came from [@Greg Kamradt](https://twitter.com/GregKamradt/status/1727018183608193393)) to test whether the model can retrieve information at different positions in the inputs of different lengths, the result is as follows: ![](assets/qwen_72b_needle_in_a_haystack.png) 以上结果说明,Qwen-72B-Chat可以能准确检索到32k以内的输入长度中放在各种位置的信息,证明了其具有优秀的长文本处理能力。 The above results show that Qwen-72B-Chat can accurately retrieve information placed in various positions within an input length of 32k, proving its excellent long text understanding capabilities. ## FAQ 如遇到问题,敬请查阅[FAQ](https://github.com/QwenLM/Qwen/blob/main/FAQ_zh.md)以及issue区,如仍无法解决再提交issue。 If you meet problems, please refer to [FAQ](https://github.com/QwenLM/Qwen/blob/main/FAQ.md) and the issues first to search a solution before you launch a new issue. <br> ## 引用 (Citation) 如果你觉得我们的工作对你有帮助,欢迎引用! If you find our work helpful, feel free to give us a cite. ``` @article{qwen, title={Qwen Technical Report}, author={Jinze Bai and Shuai Bai and Yunfei Chu and Zeyu Cui and Kai Dang and Xiaodong Deng and Yang Fan and Wenbin Ge and Yu Han and Fei Huang and Binyuan Hui and Luo Ji and Mei Li and Junyang Lin and Runji Lin and Dayiheng Liu and Gao Liu and Chengqiang Lu and Keming Lu and Jianxin Ma and Rui Men and Xingzhang Ren and Xuancheng Ren and Chuanqi Tan and Sinan Tan and Jianhong Tu and Peng Wang and Shijie Wang and Wei Wang and Shengguang Wu and Benfeng Xu and Jin Xu and An Yang and Hao Yang and Jian Yang and Shusheng Yang and Yang Yao and Bowen Yu and Hongyi Yuan and Zheng Yuan and Jianwei Zhang and Xingxuan Zhang and Yichang Zhang and Zhenru Zhang and Chang Zhou and Jingren Zhou and Xiaohuan Zhou and Tianhang Zhu}, journal={arXiv preprint arXiv:2309.16609}, year={2023} } ``` <br> ## 使用协议(License Agreement) 我们的代码和模型权重对学术研究完全开放,并支持商用。请查看[LICENSE](https://github.com/QwenLM/Qwen/blob/main/Tongyi%20Qianwen%20LICENSE%20AGREEMENT)了解具体的开源协议细节。如需商用,欢迎填写[问卷](https://dashscope.console.aliyun.com/openModelApply/Qwen-72B-Chat)申请。 Our code and checkpoints are open to research purpose, and they are allowed for commercial purposes. Check [LICENSE](https://github.com/QwenLM/Qwen/blob/main/Tongyi%20Qianwen%20LICENSE%20AGREEMENT) for more details about the license. If you have requirements for commercial use, please fill out the [form](https://dashscope.console.aliyun.com/openModelApply/Qwen-72B-Chat) to apply. <br> ## 联系我们(Contact Us) 如果你想给我们的研发团队和产品团队留言,欢迎加入我们的微信群、钉钉群以及Discord!同时,也欢迎通过邮件(qianwen_opensource@alibabacloud.com)联系我们。 If you are interested to leave a message to either our research team or product team, join our Discord or WeChat groups! Also, feel free to send an email to qianwen_opensource@alibabacloud.com.
flair/ner-english-ontonotes-large
flair
"2021-05-08T15:35:21Z"
81,226
88
flair
[ "flair", "pytorch", "token-classification", "sequence-tagger-model", "en", "dataset:ontonotes", "arxiv:2011.06993", "has_space", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- tags: - flair - token-classification - sequence-tagger-model language: en datasets: - ontonotes widget: - text: "On September 1st George won 1 dollar while watching Game of Thrones." --- ## English NER in Flair (Ontonotes large model) This is the large 18-class NER model for English that ships with [Flair](https://github.com/flairNLP/flair/). F1-Score: **90.93** (Ontonotes) Predicts 18 tags: | **tag** | **meaning** | |---------------------------------|-----------| | CARDINAL | cardinal value | | DATE | date value | | EVENT | event name | | FAC | building name | | GPE | geo-political entity | | LANGUAGE | language name | | LAW | law name | | LOC | location name | | MONEY | money name | | NORP | affiliation | | ORDINAL | ordinal value | | ORG | organization name | | PERCENT | percent value | | PERSON | person name | | PRODUCT | product name | | QUANTITY | quantity value | | TIME | time value | | WORK_OF_ART | name of work of art | Based on document-level XLM-R embeddings and [FLERT](https://arxiv.org/pdf/2011.06993v1.pdf/). --- ### Demo: How to use in Flair Requires: **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`) ```python from flair.data import Sentence from flair.models import SequenceTagger # load tagger tagger = SequenceTagger.load("flair/ner-english-ontonotes-large") # make example sentence sentence = Sentence("On September 1st George won 1 dollar while watching Game of Thrones.") # predict NER tags tagger.predict(sentence) # print sentence print(sentence) # print predicted NER spans print('The following NER tags are found:') # iterate over entities and print for entity in sentence.get_spans('ner'): print(entity) ``` This yields the following output: ``` Span [2,3]: "September 1st" [− Labels: DATE (1.0)] Span [4]: "George" [− Labels: PERSON (1.0)] Span [6,7]: "1 dollar" [− Labels: MONEY (1.0)] Span [10,11,12]: "Game of Thrones" [− Labels: WORK_OF_ART (1.0)] ``` So, the entities "*September 1st*" (labeled as a **date**), "*George*" (labeled as a **person**), "*1 dollar*" (labeled as a **money**) and "Game of Thrones" (labeled as a **work of art**) are found in the sentence "*On September 1st George Washington won 1 dollar while watching Game of Thrones*". --- ### Training: Script to train this model The following Flair script was used to train this model: ```python from flair.data import Corpus from flair.datasets import ColumnCorpus from flair.embeddings import WordEmbeddings, StackedEmbeddings, FlairEmbeddings # 1. load the corpus (Ontonotes does not ship with Flair, you need to download and reformat into a column format yourself) corpus: Corpus = ColumnCorpus( "resources/tasks/onto-ner", column_format={0: "text", 1: "pos", 2: "upos", 3: "ner"}, tag_to_bioes="ner", ) # 2. what tag do we want to predict? tag_type = 'ner' # 3. make the tag dictionary from the corpus tag_dictionary = corpus.make_tag_dictionary(tag_type=tag_type) # 4. initialize fine-tuneable transformer embeddings WITH document context from flair.embeddings import TransformerWordEmbeddings embeddings = TransformerWordEmbeddings( model='xlm-roberta-large', layers="-1", subtoken_pooling="first", fine_tune=True, use_context=True, ) # 5. initialize bare-bones sequence tagger (no CRF, no RNN, no reprojection) from flair.models import SequenceTagger tagger = SequenceTagger( hidden_size=256, embeddings=embeddings, tag_dictionary=tag_dictionary, tag_type='ner', use_crf=False, use_rnn=False, reproject_embeddings=False, ) # 6. initialize trainer with AdamW optimizer from flair.trainers import ModelTrainer trainer = ModelTrainer(tagger, corpus, optimizer=torch.optim.AdamW) # 7. run training with XLM parameters (20 epochs, small LR) from torch.optim.lr_scheduler import OneCycleLR trainer.train('resources/taggers/ner-english-ontonotes-large', learning_rate=5.0e-6, mini_batch_size=4, mini_batch_chunk_size=1, max_epochs=20, scheduler=OneCycleLR, embeddings_storage_mode='none', weight_decay=0., ) ``` --- ### Cite Please cite the following paper when using this model. ``` @misc{schweter2020flert, title={FLERT: Document-Level Features for Named Entity Recognition}, author={Stefan Schweter and Alan Akbik}, year={2020}, eprint={2011.06993}, archivePrefix={arXiv}, primaryClass={cs.CL} } ``` --- ### Issues? The Flair issue tracker is available [here](https://github.com/flairNLP/flair/issues/).
Open-Orca/Mistral-7B-OpenOrca
Open-Orca
"2023-11-18T00:13:08Z"
80,901
639
transformers
[ "transformers", "pytorch", "mistral", "text-generation", "conversational", "en", "dataset:Open-Orca/OpenOrca", "arxiv:2306.02707", "arxiv:2301.13688", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-09-29T19:18:38Z"
--- datasets: - Open-Orca/OpenOrca language: - en library_name: transformers pipeline_tag: text-generation license: apache-2.0 --- <p><h1>🐋 Mistral-7B-OpenOrca 🐋</h1></p> ![OpenOrca Logo](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrcaLogo.png "MistralOrca Logo") [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl) # OpenOrca - Mistral - 7B - 8k We have used our own [OpenOrca dataset](https://huggingface.co/datasets/Open-Orca/OpenOrca) to fine-tune on top of [Mistral 7B](https://huggingface.co/mistralai/Mistral-7B-v0.1). This dataset is our attempt to reproduce the dataset generated for Microsoft Research's [Orca Paper](https://arxiv.org/abs/2306.02707). We use [OpenChat](https://huggingface.co/openchat) packing, trained with [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl). This release is trained on a curated filtered subset of most of our GPT-4 augmented data. It is the same subset of our data as was used in our [OpenOrcaxOpenChat-Preview2-13B model](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B). **HF Leaderboard evals place this model as #1 for all models smaller than 30B at release time, outperforming all other 7B and 13B models!** This release provides a first: a fully open model with class-breaking performance, capable of running fully accelerated on even moderate consumer GPUs. Our thanks to the Mistral team for leading the way here. We affectionately codename this model: "*MistralOrca*" If you'd like to try the model now, we have it running on fast GPUs unquantized: https://huggingface.co/spaces/Open-Orca/Mistral-7B-OpenOrca Want to visualize our full (pre-filtering) dataset? Check out our [Nomic Atlas Map](https://atlas.nomic.ai/map/c1b88b47-2d9b-47e0-9002-b80766792582/2560fd25-52fe-42f1-a58f-ff5eccc890d2). [<img src="https://huggingface.co/Open-Orca/OpenOrca-Preview1-13B/resolve/main/OpenOrca%20Nomic%20Atlas.png" alt="Atlas Nomic Dataset Map" width="400" height="400" />](https://atlas.nomic.ai/map/c1b88b47-2d9b-47e0-9002-b80766792582/2560fd25-52fe-42f1-a58f-ff5eccc890d2) We are in-process with training more models, so keep a look out on our org for releases coming soon with exciting partners. We will also give sneak-peak announcements on our Discord, which you can find here: https://AlignmentLab.ai or check the OpenAccess AI Collective Discord for more information about Axolotl trainer here: https://discord.gg/5y8STgB3P3 # Quantized Models Quantized versions of this model are generously made available by [TheBloke](https://huggingface.co/TheBloke). - AWQ: https://huggingface.co/TheBloke/Mistral-7B-OpenOrca-AWQ - GPTQ: https://huggingface.co/TheBloke/Mistral-7B-OpenOrca-GPTQ - GGUF: https://huggingface.co/TheBloke/Mistral-7B-OpenOrca-GGUF # Prompt Template We used [OpenAI's Chat Markup Language (ChatML)](https://github.com/openai/openai-python/blob/main/chatml.md) format, with `<|im_start|>` and `<|im_end|>` tokens added to support this. This means that, e.g., in [oobabooga](https://github.com/oobabooga/text-generation-webui/) the "`MPT-Chat`" instruction template should work, as it also uses ChatML. This formatting is also available via a pre-defined [Transformers chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means that lists of messages can be formatted for you with the `apply_chat_template()` method: ```python chat = [ {"role": "system", "content": "You are MistralOrca, a large language model trained by Alignment Lab AI. Write out your reasoning step-by-step to be sure you get the right answers!"} {"role": "user", "content": "How are you?"}, {"role": "assistant", "content": "I am doing well!"}, {"role": "user", "content": "Please tell me about how mistral winds have attracted super-orcas."}, ] tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True) ``` which will yield: ``` <|im_start|>system You are MistralOrca, a large language model trained by Alignment Lab AI. Write out your reasoning step-by-step to be sure you get the right answers! <|im_end|> <|im_start|>user How are you?<|im_end|> <|im_start|>assistant I am doing well!<|im_end|> <|im_start|>user Please tell me about how mistral winds have attracted super-orcas.<|im_end|> <|im_start|>assistant ``` If you use `tokenize=True` and `return_tensors="pt"` instead, then you will get a tokenized and formatted conversation ready to pass to `model.generate()`. # Inference See [this notebook](https://colab.research.google.com/drive/1yZlLSifCGELAX5GN582kZypHCv0uJuNX?usp=sharing) for inference details. Note that you need the development snapshot of Transformers currently, as support for Mistral hasn't been released into PyPI yet: ``` pip install git+https://github.com/huggingface/transformers ``` # Evaluation ## HuggingFace Leaderboard Performance We have evaluated using the methodology and tools for the HuggingFace Leaderboard, and find that we have dramatically improved upon the base model. We find **106%** of the base model's performance on HF Leaderboard evals, averaging **65.84**. At release time, this beats all 7B and 13B models! This is also **98.6%** of *`Llama2-70b-chat`*'s performance! ![HF Leaderboard](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrca7BHFLeaderboard.png) | Metric | Value | |-----------------------|-------| | MMLU (5-shot) | 62.24 | | ARC (25-shot) | 64.08 | | HellaSwag (10-shot) | 83.99 | | TruthfulQA (0-shot) | 53.05 | | Avg. | 65.84 | We use [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard. ## AGIEval Performance We compare our results to the base Mistral-7B model (using LM Evaluation Harness). We find **129%** of the base model's performance on AGI Eval, averaging **0.397**. As well, we significantly improve upon the official `mistralai/Mistral-7B-Instruct-v0.1` finetuning, achieving **119%** of their performance. ![AGIEval Performance](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrca7BAGIEval.png "AGIEval Performance") ## BigBench-Hard Performance We find **119%** of the base model's performance on BigBench-Hard, averaging **0.416**. ![BigBench-Hard Performance](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrca7BBigBenchHard.png "BigBench-Hard Performance") ## GPT4ALL Leaderboard Performance We gain a slight edge over our previous releases, again topping the leaderboard, averaging **72.38**. ![GPT4ALL Performance](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrca7BGPT4ALL.png "GPT4ALL Performance") ## MT-Bench Performance MT-Bench uses GPT-4 as a judge of model response quality, across a wide range of challenges. We find our performance is *on-par with `Llama2-70b-chat`*, averaging **6.86**. ![MT-Bench Performance](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrca7BMTBENCH.png "MT-Bench Performance") # Dataset We used a curated, filtered selection of most of the GPT-4 augmented data from our OpenOrca dataset, which aims to reproduce the Orca Research Paper dataset. # Training We trained with 8x A6000 GPUs for 62 hours, completing 4 epochs of full fine tuning on our dataset in one training run. Commodity cost was ~$400. # Citation ```bibtex @software{lian2023mistralorca1 title = {MistralOrca: Mistral-7B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset}, author = {Wing Lian and Bleys Goodson and Guan Wang and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"}, year = {2023}, publisher = {HuggingFace}, journal = {HuggingFace repository}, howpublished = {\url{https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca}, } @misc{mukherjee2023orca, title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4}, author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah}, year={2023}, eprint={2306.02707}, archivePrefix={arXiv}, primaryClass={cs.CL} } @misc{longpre2023flan, title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning}, author={Shayne Longpre and Le Hou and Tu Vu and Albert Webson and Hyung Won Chung and Yi Tay and Denny Zhou and Quoc V. Le and Barret Zoph and Jason Wei and Adam Roberts}, year={2023}, eprint={2301.13688}, archivePrefix={arXiv}, primaryClass={cs.AI} } ```
google/pegasus-cnn_dailymail
google
"2023-01-24T16:42:26Z"
80,839
65
transformers
[ "transformers", "pytorch", "rust", "pegasus", "text2text-generation", "summarization", "en", "arxiv:1912.08777", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
summarization
"2022-03-02T23:29:05Z"
--- language: en tags: - summarization --- ### Pegasus Models See Docs: [here](https://huggingface.co/transformers/master/model_doc/pegasus.html) Original TF 1 code [here](https://github.com/google-research/pegasus) Authors: Jingqing Zhang, Yao Zhao, Mohammad Saleh and Peter J. Liu on Dec 18, 2019 Maintained by: [@sshleifer](https://twitter.com/sam_shleifer) Task: Summarization The following is copied from the authors' README. # Mixed & Stochastic Checkpoints We train a pegasus model with sampled gap sentence ratios on both C4 and HugeNews, and stochastically sample important sentences. The updated the results are reported in this table. | dataset | C4 | HugeNews | Mixed & Stochastic| | ---- | ---- | ---- | ----| | xsum | 45.20/22.06/36.99 | 47.21/24.56/39.25 | 47.60/24.83/39.64| | cnn_dailymail | 43.90/21.20/40.76 | 44.17/21.47/41.11 | 44.16/21.56/41.30| | newsroom | 45.07/33.39/41.28 | 45.15/33.51/41.33 | 45.98/34.20/42.18| | multi_news | 46.74/17.95/24.26 | 47.52/18.72/24.91 | 47.65/18.75/24.95| | gigaword | 38.75/19.96/36.14 | 39.12/19.86/36.24 | 39.65/20.47/36.76| | wikihow | 43.07/19.70/34.79 | 41.35/18.51/33.42 | 46.39/22.12/38.41 *| | reddit_tifu | 26.54/8.94/21.64 | 26.63/9.01/21.60 | 27.99/9.81/22.94| | big_patent | 53.63/33.16/42.25 | 53.41/32.89/42.07 | 52.29/33.08/41.66 *| | arxiv | 44.70/17.27/25.80 | 44.67/17.18/25.73 | 44.21/16.95/25.67| | pubmed | 45.49/19.90/27.69 | 45.09/19.56/27.42 | 45.97/20.15/28.25| | aeslc | 37.69/21.85/36.84 | 37.40/21.22/36.45 | 37.68/21.25/36.51| | billsum | 57.20/39.56/45.80 | 57.31/40.19/45.82 | 59.67/41.58/47.59| The "Mixed & Stochastic" model has the following changes: - trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples). - trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity). - the model uniformly sample a gap sentence ratio between 15% and 45%. - importance sentences are sampled using a 20% uniform noise to importance scores. - the sentencepiece tokenizer is updated to be able to encode newline character. (*) the numbers of wikihow and big_patent datasets are not comparable because of change in tokenization and data: - wikihow dataset contains newline characters which is useful for paragraph segmentation, the C4 and HugeNews model's sentencepiece tokenizer doesn't encode newline and loose this information. - we update the BigPatent dataset to preserve casing, some format cleanings are also changed, please refer to change in TFDS. The "Mixed & Stochastic" model has the following changes (from pegasus-large in the paper): trained on both C4 and HugeNews (dataset mixture is weighted by their number of examples). trained for 1.5M instead of 500k (we observe slower convergence on pretraining perplexity). the model uniformly sample a gap sentence ratio between 15% and 45%. importance sentences are sampled using a 20% uniform noise to importance scores. the sentencepiece tokenizer is updated to be able to encode newline character. Citation ``` @misc{zhang2019pegasus, title={PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization}, author={Jingqing Zhang and Yao Zhao and Mohammad Saleh and Peter J. Liu}, year={2019}, eprint={1912.08777}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
meta-llama/Llama-2-70b-hf
meta-llama
"2024-03-18T22:21:28Z"
80,483
790
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "facebook", "meta", "llama-2", "en", "arxiv:2307.09288", "autotrain_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-11T08:56:34Z"
--- extra_gated_heading: You need to share contact information with Meta to access this model extra_gated_prompt: >- ### LLAMA 2 COMMUNITY LICENSE AGREEMENT "Agreement" means the terms and conditions for use, reproduction, distribution and modification of the Llama Materials set forth herein. "Documentation" means the specifications, manuals and documentation accompanying Llama 2 distributed by Meta at https://ai.meta.com/resources/models-and-libraries/llama-downloads/. "Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity's behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf. "Llama 2" means the foundational large language models and software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Meta at ai.meta.com/resources/models-and-libraries/llama-downloads/. "Llama Materials" means, collectively, Meta's proprietary Llama 2 and documentation (and any portion thereof) made available under this Agreement. "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland). By clicking "I Accept" below or by using or distributing any portion or element of the Llama Materials, you agree to be bound by this Agreement. 1. License Rights and Redistribution. a. Grant of Rights. You are granted a non-exclusive, worldwide, non- transferable and royalty-free limited license under Meta's intellectual property or other rights owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Llama Materials. b. Redistribution and Use. i. If you distribute or make the Llama Materials, or any derivative works thereof, available to a third party, you shall provide a copy of this Agreement to such third party. ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part of an integrated end user product, then Section 2 of this Agreement will not apply to you. iii. You must retain in all copies of the Llama Materials that you distribute the following attribution notice within a "Notice" text file distributed as a part of such copies: "Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved." iv. Your use of the Llama Materials must comply with applicable laws and regulations (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama Materials (available at https://ai.meta.com/llama/use-policy), which is hereby incorporated by reference into this Agreement. v. You will not use the Llama Materials or any output or results of the Llama Materials to improve any other large language model (excluding Llama 2 or derivative works thereof). 2. Additional Commercial Terms. If, on the Llama 2 version release date, the monthly active users of the products or services made available by or for Licensee, or Licensee's affiliates, is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights. 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS. 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING. 5. Intellectual Property. a. No trademark licenses are granted under this Agreement, and in connection with the Llama Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Llama Materials. b. Subject to Meta's ownership of Llama Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Llama Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications. c. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Llama 2 outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Llama Materials. 6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Llama Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement. 7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement. USE POLICY ### Llama 2 Acceptable Use Policy Meta is committed to promoting safe and fair use of its tools and features, including Llama 2. If you access or use Llama 2, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of this policy can be found at [ai.meta.com/llama/use-policy](http://ai.meta.com/llama/use-policy). #### Prohibited Uses We want everyone to use Llama 2 safely and responsibly. You agree you will not use, or allow others to use, Llama 2 to: 1. Violate the law or others’ rights, including to: 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as: 1. Violence or terrorism 2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material 3. Human trafficking, exploitation, and sexual violence 4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials. 5. Sexual solicitation 6. Any other criminal activity 2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals 3. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services 4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices 5. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws 6. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama 2 Materials 7. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system 2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 2 related to the following: 1. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State 2. Guns and illegal weapons (including weapon development) 3. Illegal drugs and regulated/controlled substances 4. Operation of critical infrastructure, transportation technologies, or heavy machinery 5. Self-harm or harm to others, including suicide, cutting, and eating disorders 6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual 3. Intentionally deceive or mislead others, including use of Llama 2 related to the following: 1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation 2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content 3. Generating, promoting, or further distributing spam 4. Impersonating another individual without consent, authorization, or legal right 5. Representing that the use of Llama 2 or outputs are human-generated 6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement 4. Fail to appropriately disclose to end users any known dangers of your AI system Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation of this Policy through one of the following means: * Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) * Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) * Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) * Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama: [LlamaUseReport@meta.com](mailto:LlamaUseReport@meta.com) extra_gated_fields: First Name: text Last Name: text Date of birth: date_picker Country: country Affiliation: text geo: ip_location By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/). extra_gated_button_content: Submit language: - en pipeline_tag: text-generation inference: false tags: - facebook - meta - pytorch - llama - llama-2 --- # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 70B pretrained model, converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom. ## Model Details *Note: Use of this model is governed by the Meta license. In order to download the model weights and tokenizer, please visit the [website](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and accept our License before requesting access here.* Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. Our fine-tuned LLMs, called Llama-2-Chat, are optimized for dialogue use cases. Llama-2-Chat models outperform open-source chat models on most benchmarks we tested, and in our human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM. **Model Developers** Meta **Variations** Llama 2 comes in a range of parameter sizes — 7B, 13B, and 70B — as well as pretrained and fine-tuned variations. **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety. ||Training Data|Params|Content Length|GQA|Tokens|LR| |---|---|---|---|---|---|---| |Llama 2|*A new mix of publicly available online data*|7B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|13B|4k|&#10007;|2.0T|3.0 x 10<sup>-4</sup>| |Llama 2|*A new mix of publicly available online data*|70B|4k|&#10004;|2.0T|1.5 x 10<sup>-4</sup>| *Llama 2 family of models.* Token counts refer to pretraining data only. All models are trained with a global batch-size of 4M tokens. Bigger models - 70B -- use Grouped-Query Attention (GQA) for improved inference scalability. **Model Dates** Llama 2 was trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** ["Llama-2: Open Foundation and Fine-tuned Chat Models"](arxiv.org/abs/2307.09288) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/meta-llama/Llama-2-7b) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/meta-llama/Llama-2-13b) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)| |70B| [Link](https://huggingface.co/meta-llama/Llama-2-70b) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-hf) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat) | [Link](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf)|
openai/whisper-base.en
openai
"2024-01-22T17:55:08Z"
80,303
19
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "whisper", "automatic-speech-recognition", "audio", "hf-asr-leaderboard", "en", "arxiv:2212.04356", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-09-26T06:58:29Z"
--- language: - en tags: - audio - automatic-speech-recognition - hf-asr-leaderboard widget: - example_title: Librispeech sample 1 src: https://cdn-media.huggingface.co/speech_samples/sample1.flac - example_title: Librispeech sample 2 src: https://cdn-media.huggingface.co/speech_samples/sample2.flac model-index: - name: whisper-base.en results: - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: LibriSpeech (clean) type: librispeech_asr config: clean split: test args: language: en metrics: - name: Test WER type: wer value: - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: LibriSpeech (other) type: librispeech_asr config: other split: test args: language: en metrics: - name: Test WER type: wer value: 12.803978669490565 pipeline_tag: automatic-speech-recognition license: apache-2.0 --- # Whisper Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation. Trained on 680k hours of labelled data, Whisper models demonstrate a strong ability to generalise to many datasets and domains **without** the need for fine-tuning. Whisper was proposed in the paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) by Alec Radford et al. from OpenAI. The original code repository can be found [here](https://github.com/openai/whisper). **Disclaimer**: Content for this model card has partly been written by the Hugging Face team, and parts of it were copied and pasted from the original model card. ## Model details Whisper is a Transformer based encoder-decoder model, also referred to as a _sequence-to-sequence_ model. It was trained on 680k hours of labelled speech data annotated using large-scale weak supervision. The models were trained on either English-only data or multilingual data. The English-only models were trained on the task of speech recognition. The multilingual models were trained on both speech recognition and speech translation. For speech recognition, the model predicts transcriptions in the *same* language as the audio. For speech translation, the model predicts transcriptions to a *different* language to the audio. Whisper checkpoints come in five configurations of varying model sizes. The smallest four are trained on either English-only or multilingual data. The largest checkpoints are multilingual only. All ten of the pre-trained checkpoints are available on the [Hugging Face Hub](https://huggingface.co/models?search=openai/whisper). The checkpoints are summarised in the following table with links to the models on the Hub: | Size | Parameters | English-only | Multilingual | |----------|------------|------------------------------------------------------|-----------------------------------------------------| | tiny | 39 M | [✓](https://huggingface.co/openai/whisper-tiny.en) | [✓](https://huggingface.co/openai/whisper-tiny) | | base | 74 M | [✓](https://huggingface.co/openai/whisper-base.en) | [✓](https://huggingface.co/openai/whisper-base) | | small | 244 M | [✓](https://huggingface.co/openai/whisper-small.en) | [✓](https://huggingface.co/openai/whisper-small) | | medium | 769 M | [✓](https://huggingface.co/openai/whisper-medium.en) | [✓](https://huggingface.co/openai/whisper-medium) | | large | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large) | | large-v2 | 1550 M | x | [✓](https://huggingface.co/openai/whisper-large-v2) | # Usage This checkpoint is an *English-only* model, meaning it can be used for English speech recognition. Multilingual speech recognition or speech translation is possible through use of a multilingual checkpoint. To transcribe audio samples, the model has to be used alongside a [`WhisperProcessor`](https://huggingface.co/docs/transformers/model_doc/whisper#transformers.WhisperProcessor). The `WhisperProcessor` is used to: 1. Pre-process the audio inputs (converting them to log-Mel spectrograms for the model) 2. Post-process the model outputs (converting them from tokens to text) ## Transcription ```python >>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-base.en") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base.en") >>> # load dummy dataset and read audio files >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False) ['<|startoftranscript|><|notimestamps|> Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.<|endoftext|>'] >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.'] ``` The context tokens can be removed from the start of the transcription by setting `skip_special_tokens=True`. ## Evaluation This code snippet shows how to evaluate Whisper base.en on [LibriSpeech test-clean](https://huggingface.co/datasets/librispeech_asr): ```python >>> from datasets import load_dataset >>> from transformers import WhisperForConditionalGeneration, WhisperProcessor >>> import torch >>> from evaluate import load >>> librispeech_test_clean = load_dataset("librispeech_asr", "clean", split="test") >>> processor = WhisperProcessor.from_pretrained("openai/whisper-base.en") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base.en").to("cuda") >>> def map_to_pred(batch): >>> audio = batch["audio"] >>> input_features = processor(audio["array"], sampling_rate=audio["sampling_rate"], return_tensors="pt").input_features >>> batch["reference"] = processor.tokenizer._normalize(batch['text']) >>> >>> with torch.no_grad(): >>> predicted_ids = model.generate(input_features.to("cuda"))[0] >>> transcription = processor.decode(predicted_ids) >>> batch["prediction"] = processor.tokenizer._normalize(transcription) >>> return batch >>> result = librispeech_test_clean.map(map_to_pred) >>> wer = load("wer") >>> print(100 * wer.compute(references=result["reference"], predictions=result["prediction"])) 4.271408904897505 ``` ## Long-Form Transcription The Whisper model is intrinsically designed to work on audio samples of up to 30s in duration. However, by using a chunking algorithm, it can be used to transcribe audio samples of up to arbitrary length. This is possible through Transformers [`pipeline`](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline) method. Chunking is enabled by setting `chunk_length_s=30` when instantiating the pipeline. With chunking enabled, the pipeline can be run with batched inference. It can also be extended to predict sequence level timestamps by passing `return_timestamps=True`: ```python >>> import torch >>> from transformers import pipeline >>> from datasets import load_dataset >>> device = "cuda:0" if torch.cuda.is_available() else "cpu" >>> pipe = pipeline( >>> "automatic-speech-recognition", >>> model="openai/whisper-base.en", >>> chunk_length_s=30, >>> device=device, >>> ) >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> prediction = pipe(sample.copy(), batch_size=8)["text"] " Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel." >>> # we can also return timestamps for the predictions >>> prediction = pipe(sample.copy(), batch_size=8, return_timestamps=True)["chunks"] [{'text': ' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.', 'timestamp': (0.0, 5.44)}] ``` Refer to the blog post [ASR Chunking](https://huggingface.co/blog/asr-chunking) for more details on the chunking algorithm. ## Fine-Tuning The pre-trained Whisper model demonstrates a strong ability to generalise to different datasets and domains. However, its predictive capabilities can be improved further for certain languages and tasks through *fine-tuning*. The blog post [Fine-Tune Whisper with 🤗 Transformers](https://huggingface.co/blog/fine-tune-whisper) provides a step-by-step guide to fine-tuning the Whisper model with as little as 5 hours of labelled data. ### Evaluated Use The primary intended users of these models are AI researchers studying robustness, generalization, capabilities, biases, and constraints of the current model. However, Whisper is also potentially quite useful as an ASR solution for developers, especially for English speech recognition. We recognize that once models are released, it is impossible to restrict access to only “intended” uses or to draw reasonable guidelines around what is or is not research. The models are primarily trained and evaluated on ASR and speech translation to English tasks. They show strong ASR results in ~10 languages. They may exhibit additional capabilities, particularly if fine-tuned on certain tasks like voice activity detection, speaker classification, or speaker diarization but have not been robustly evaluated in these areas. We strongly recommend that users perform robust evaluations of the models in a particular context and domain before deploying them. In particular, we caution against using Whisper models to transcribe recordings of individuals taken without their consent or purporting to use these models for any kind of subjective classification. We recommend against use in high-risk domains like decision-making contexts, where flaws in accuracy can lead to pronounced flaws in outcomes. The models are intended to transcribe and translate speech, use of the model for classification is not only not evaluated but also not appropriate, particularly to infer human attributes. ## Training Data The models are trained on 680,000 hours of audio and the corresponding transcripts collected from the internet. 65% of this data (or 438,000 hours) represents English-language audio and matched English transcripts, roughly 18% (or 126,000 hours) represents non-English audio and English transcripts, while the final 17% (or 117,000 hours) represents non-English audio and the corresponding transcript. This non-English data represents 98 different languages. As discussed in [the accompanying paper](https://cdn.openai.com/papers/whisper.pdf), we see that performance on transcription in a given language is directly correlated with the amount of training data we employ in that language. ## Performance and Limitations Our studies show that, over many existing ASR systems, the models exhibit improved robustness to accents, background noise, technical language, as well as zero shot translation from multiple languages into English; and that accuracy on speech recognition and translation is near the state-of-the-art level. However, because the models are trained in a weakly supervised manner using large-scale noisy data, the predictions may include texts that are not actually spoken in the audio input (i.e. hallucination). We hypothesize that this happens because, given their general knowledge of language, the models combine trying to predict the next word in audio with trying to transcribe the audio itself. Our models perform unevenly across languages, and we observe lower accuracy on low-resource and/or low-discoverability languages or languages where we have less training data. The models also exhibit disparate performance on different accents and dialects of particular languages, which may include higher word error rate across speakers of different genders, races, ages, or other demographic criteria. Our full evaluation results are presented in [the paper accompanying this release](https://cdn.openai.com/papers/whisper.pdf). In addition, the sequence-to-sequence architecture of the model makes it prone to generating repetitive texts, which can be mitigated to some degree by beam search and temperature scheduling but not perfectly. Further analysis on these limitations are provided in [the paper](https://cdn.openai.com/papers/whisper.pdf). It is likely that this behavior and hallucinations may be worse on lower-resource and/or lower-discoverability languages. ## Broader Implications We anticipate that Whisper models’ transcription capabilities may be used for improving accessibility tools. While Whisper models cannot be used for real-time transcription out of the box – their speed and size suggest that others may be able to build applications on top of them that allow for near-real-time speech recognition and translation. The real value of beneficial applications built on top of Whisper models suggests that the disparate performance of these models may have real economic implications. There are also potential dual use concerns that come with releasing Whisper. While we hope the technology will be used primarily for beneficial purposes, making ASR technology more accessible could enable more actors to build capable surveillance technologies or scale up existing surveillance efforts, as the speed and accuracy allow for affordable automatic transcription and translation of large volumes of audio communication. Moreover, these models may have some capabilities to recognize specific individuals out of the box, which in turn presents safety concerns related both to dual use and disparate performance. In practice, we expect that the cost of transcription is not the limiting factor of scaling up surveillance projects. ### BibTeX entry and citation info ```bibtex @misc{radford2022whisper, doi = {10.48550/ARXIV.2212.04356}, url = {https://arxiv.org/abs/2212.04356}, author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya}, title = {Robust Speech Recognition via Large-Scale Weak Supervision}, publisher = {arXiv}, year = {2022}, copyright = {arXiv.org perpetual, non-exclusive license} } ```
deepseek-ai/deepseek-coder-1.3b-base
deepseek-ai
"2023-11-14T03:32:27Z"
80,071
53
transformers
[ "transformers", "pytorch", "llama", "text-generation", "license:other", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-10-28T07:42:03Z"
--- license: other license_name: deepseek-license license_link: LICENSE --- <p align="center"> <img width="1000px" alt="DeepSeek Coder" src="https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/pictures/logo.png?raw=true"> </p> <p align="center"><a href="https://www.deepseek.com/">[🏠Homepage]</a> | <a href="https://coder.deepseek.com/">[🤖 Chat with DeepSeek Coder]</a> | <a href="https://discord.gg/Tc7c45Zzu5">[Discord]</a> | <a href="https://github.com/guoday/assert/blob/main/QR.png?raw=true">[Wechat(微信)]</a> </p> <hr> ### 1. Introduction of Deepseek Coder Deepseek Coder is composed of a series of code language models, each trained from scratch on 2T tokens, with a composition of 87% code and 13% natural language in both English and Chinese. We provide various sizes of the code model, ranging from 1B to 33B versions. Each model is pre-trained on project-level code corpus by employing a window size of 16K and a extra fill-in-the-blank task, to support project-level code completion and infilling. For coding capabilities, Deepseek Coder achieves state-of-the-art performance among open-source code models on multiple programming languages and various benchmarks. - **Massive Training Data**: Trained from scratch on 2T tokens, including 87% code and 13% linguistic data in both English and Chinese languages. - **Highly Flexible & Scalable**: Offered in model sizes of 1.3B, 5.7B, 6.7B, and 33B, enabling users to choose the setup most suitable for their requirements. - **Superior Model Performance**: State-of-the-art performance among publicly available code models on HumanEval, MultiPL-E, MBPP, DS-1000, and APPS benchmarks. - **Advanced Code Completion Capabilities**: A window size of 16K and a fill-in-the-blank task, supporting project-level code completion and infilling tasks. ### 2. Model Summary deepseek-coder-1.3b-base is a 1.3B parameter model with Multi-Head Attention trained on 1 trillion tokens. - **Home Page:** [DeepSeek](https://deepseek.com/) - **Repository:** [deepseek-ai/deepseek-coder](https://github.com/deepseek-ai/deepseek-coder) - **Chat With DeepSeek Coder:** [DeepSeek-Coder](https://coder.deepseek.com/) ### 3. How to Use Here give some examples of how to use our model. #### 1)Code Completion ```python from transformers import AutoTokenizer, AutoModelForCausalLM import torch tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-1.3b-base", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-1.3b-base", trust_remote_code=True).cuda() input_text = "#write a quick sort algorithm" inputs = tokenizer(input_text, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, max_length=128) print(tokenizer.decode(outputs[0], skip_special_tokens=True)) ``` #### 2)Code Insertion ```python from transformers import AutoTokenizer, AutoModelForCausalLM import torch tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-1.3b-base", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-1.3b-base", trust_remote_code=True).cuda() input_text = """<|fim▁begin|>def quick_sort(arr): if len(arr) <= 1: return arr pivot = arr[0] left = [] right = [] <|fim▁hole|> if arr[i] < pivot: left.append(arr[i]) else: right.append(arr[i]) return quick_sort(left) + [pivot] + quick_sort(right)<|fim▁end|>""" inputs = tokenizer(input_text, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, max_length=128) print(tokenizer.decode(outputs[0], skip_special_tokens=True)[len(input_text):]) ``` #### 3)Repository Level Code Completion ```python from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-1.3b-base", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-1.3b-base", trust_remote_code=True).cuda() input_text = """#utils.py import torch from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.metrics import accuracy_score def load_data(): iris = datasets.load_iris() X = iris.data y = iris.target # Standardize the data scaler = StandardScaler() X = scaler.fit_transform(X) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42) # Convert numpy data to PyTorch tensors X_train = torch.tensor(X_train, dtype=torch.float32) X_test = torch.tensor(X_test, dtype=torch.float32) y_train = torch.tensor(y_train, dtype=torch.int64) y_test = torch.tensor(y_test, dtype=torch.int64) return X_train, X_test, y_train, y_test def evaluate_predictions(y_test, y_pred): return accuracy_score(y_test, y_pred) #model.py import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader, TensorDataset class IrisClassifier(nn.Module): def __init__(self): super(IrisClassifier, self).__init__() self.fc = nn.Sequential( nn.Linear(4, 16), nn.ReLU(), nn.Linear(16, 3) ) def forward(self, x): return self.fc(x) def train_model(self, X_train, y_train, epochs, lr, batch_size): criterion = nn.CrossEntropyLoss() optimizer = optim.Adam(self.parameters(), lr=lr) # Create DataLoader for batches dataset = TensorDataset(X_train, y_train) dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=True) for epoch in range(epochs): for batch_X, batch_y in dataloader: optimizer.zero_grad() outputs = self(batch_X) loss = criterion(outputs, batch_y) loss.backward() optimizer.step() def predict(self, X_test): with torch.no_grad(): outputs = self(X_test) _, predicted = outputs.max(1) return predicted.numpy() #main.py from utils import load_data, evaluate_predictions from model import IrisClassifier as Classifier def main(): # Model training and evaluation """ inputs = tokenizer(input_text, return_tensors="pt").to(model.device) outputs = model.generate(**inputs, max_new_tokens=140) print(tokenizer.decode(outputs[0])) ``` ### 4. License This code repository is licensed under the MIT License. The use of DeepSeek Coder models is subject to the Model License. DeepSeek Coder supports commercial use. See the [LICENSE-MODEL](https://github.com/deepseek-ai/deepseek-coder/blob/main/LICENSE-MODEL) for more details. ### 5. Contact If you have any questions, please raise an issue or contact us at [agi_code@deepseek.com](mailto:agi_code@deepseek.com).
facebook/dpr-question_encoder-multiset-base
facebook
"2022-12-21T15:20:05Z"
79,970
4
transformers
[ "transformers", "pytorch", "tf", "dpr", "feature-extraction", "en", "dataset:nq_open", "dataset:trivia_qa", "dataset:web_questions", "dataset:trec", "arxiv:2004.04906", "arxiv:1702.08734", "arxiv:1910.09700", "license:cc-by-nc-4.0", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: en license: cc-by-nc-4.0 tags: - dpr datasets: - nq_open - trivia_qa - web_questions - trec inference: false --- # `dpr-question_encoder-multiset-base` ## Table of Contents - [Model Details](#model-details) - [How To Get Started With the Model](#how-to-get-started-with-the-model) - [Uses](#uses) - [Risks, Limitations and Biases](#risks-limitations-and-biases) - [Training](#training) - [Evaluation](#evaluation-results) - [Environmental Impact](#environmental-impact) - [Technical Specifications](#technical-specifications) - [Citation Information](#citation-information) - [Model Card Authors](#model-card-authors) ## Model Details **Model Description:** [Dense Passage Retrieval (DPR)](https://github.com/facebookresearch/DPR) is a set of tools and models for state-of-the-art open-domain Q&A research. `dpr-question_encoder-multiset-base` is the question encoder trained using the [Natural Questions (NQ) dataset](https://huggingface.co/datasets/nq_open), [TriviaQA](https://huggingface.co/datasets/trivia_qa), [WebQuestions (WQ)](https://huggingface.co/datasets/web_questions), and [CuratedTREC (TREC)](https://huggingface.co/datasets/trec). - **Developed by:** See [GitHub repo](https://github.com/facebookresearch/DPR) for model developers - **Model Type:** BERT-based encoder - **Language(s):** [CC-BY-NC-4.0](https://github.com/facebookresearch/DPR/blob/main/LICENSE), also see [Code of Conduct](https://github.com/facebookresearch/DPR/blob/main/CODE_OF_CONDUCT.md) - **License:** English - **Related Models:** - [`dpr-ctx_encoder-multiset-base`](https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base) - [`dpr-reader-multiset-base`](https://huggingface.co/facebook/dpr-reader-multiset-base) - [`dpr-ctx_encoder-single-nq-base`](https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base) - [`dpr-question_encoder-single-nq-base`](https://huggingface.co/facebook/dpr-question_encoder-single-nq-base) - [`dpr-reader-single-nq-base`](https://huggingface.co/facebook/dpr-reader-single-nq-base) - **Resources for more information:** - [Research Paper](https://arxiv.org/abs/2004.04906) - [GitHub Repo](https://github.com/facebookresearch/DPR) - [Hugging Face DPR docs](https://huggingface.co/docs/transformers/main/en/model_doc/dpr) - [BERT Base Uncased Model Card](https://huggingface.co/bert-base-uncased) ## How to Get Started with the Model Use the code below to get started with the model. ```python from transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizer tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base") model = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base") input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="pt")["input_ids"] embeddings = model(input_ids).pooler_output ``` ## Uses #### Direct Use `dpr-question_encoder-multiset-base`, [`dpr-ctx_encoder-multiset-base`](https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base), and [`dpr-reader-multiset-base`](https://huggingface.co/facebook/dpr-reader-multiset-base) can be used for the task of open-domain question answering. #### Misuse and Out-of-scope Use The model should not be used to intentionally create hostile or alienating environments for people. In addition, the set of DPR models was not trained to be factual or true representations of people or events, and therefore using the models to generate such content is out-of-scope for the abilities of this model. ## Risks, Limitations and Biases **CONTENT WARNING: Readers should be aware this section may contain content that is disturbing, offensive, and can propogate historical and current stereotypes.** Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al., 2021](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al., 2021](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model can include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. ## Training #### Training Data This model was trained using the following datasets: - **[Natural Questions (NQ) dataset](https://huggingface.co/datasets/nq_open)** ([Lee et al., 2019](https://aclanthology.org/P19-1612/); [Kwiatkowski et al., 2019](https://aclanthology.org/Q19-1026/)) - **[TriviaQA](https://huggingface.co/datasets/trivia_qa)** ([Joshi et al., 2017](https://aclanthology.org/P17-1147/)) - **[WebQuestions (WQ)](https://huggingface.co/datasets/web_questions)** ([Berant et al., 2013](https://aclanthology.org/D13-1160/)) - **[CuratedTREC (TREC)](https://huggingface.co/datasets/trec)** ([Baudiš & Šedivý, 2015](https://www.aminer.cn/pub/599c7953601a182cd263079b/reading-wikipedia-to-answer-open-domain-questions)) #### Training Procedure The training procedure is described in the [associated paper](https://arxiv.org/pdf/2004.04906.pdf): > Given a collection of M text passages, the goal of our dense passage retriever (DPR) is to index all the passages in a low-dimensional and continuous space, such that it can retrieve efficiently the top k passages relevant to the input question for the reader at run-time. > Our dense passage retriever (DPR) uses a dense encoder EP(·) which maps any text passage to a d- dimensional real-valued vectors and builds an index for all the M passages that we will use for retrieval. At run-time, DPR applies a different encoder EQ(·) that maps the input question to a d-dimensional vector, and retrieves k passages of which vectors are the closest to the question vector. The authors report that for encoders, they used two independent BERT ([Devlin et al., 2019](https://aclanthology.org/N19-1423/)) networks (base, un-cased) and use FAISS ([Johnson et al., 2017](https://arxiv.org/abs/1702.08734)) during inference time to encode and index passages. See the paper for further details on training, including encoders, inference, positive and negative passages, and in-batch negatives. ## Evaluation The following evaluation information is extracted from the [associated paper](https://arxiv.org/pdf/2004.04906.pdf). #### Testing Data, Factors and Metrics The model developers report the performance of the model on five QA datasets, using the top-k accuracy (k ∈ {20, 100}). The datasets were [NQ](https://huggingface.co/datasets/nq_open), [TriviaQA](https://huggingface.co/datasets/trivia_qa), [WebQuestions (WQ)](https://huggingface.co/datasets/web_questions), [CuratedTREC (TREC)](https://huggingface.co/datasets/trec), and [SQuAD v1.1](https://huggingface.co/datasets/squad). #### Results | | Top 20 | | | | | Top 100| | | | | |:----:|:------:|:---------:|:--:|:----:|:-----:|:------:|:---------:|:--:|:----:|:-----:| | | NQ | TriviaQA | WQ | TREC | SQuAD | NQ | TriviaQA | WQ | TREC | SQuAD | | | 79.4 | 78.8 |75.0| 89.1 | 51.6 | 86.0 | 84.7 |82.9| 93.9 | 67.6 | ## Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). We present the hardware type and based on the [associated paper](https://arxiv.org/abs/2004.04906). - **Hardware Type:** 8 32GB GPUs - **Hours used:** Unknown - **Cloud Provider:** Unknown - **Compute Region:** Unknown - **Carbon Emitted:** Unknown ## Technical Specifications See the [associated paper](https://arxiv.org/abs/2004.04906) for details on the modeling architecture, objective, compute infrastructure, and training details. ## Citation Information ```bibtex @inproceedings{karpukhin-etal-2020-dense, title = "Dense Passage Retrieval for Open-Domain Question Answering", author = "Karpukhin, Vladimir and Oguz, Barlas and Min, Sewon and Lewis, Patrick and Wu, Ledell and Edunov, Sergey and Chen, Danqi and Yih, Wen-tau", booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)", month = nov, year = "2020", address = "Online", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/2020.emnlp-main.550", doi = "10.18653/v1/2020.emnlp-main.550", pages = "6769--6781", } ``` ## Model Card Authors This model card was written by the team at Hugging Face.
ncbi/MedCPT-Query-Encoder
ncbi
"2023-12-03T00:45:30Z"
79,914
12
transformers
[ "transformers", "pytorch", "safetensors", "bert", "feature-extraction", "arxiv:2307.00589", "license:other", "endpoints_compatible", "region:us" ]
feature-extraction
"2023-10-24T22:57:48Z"
--- license: other license_name: public-domain license_link: LICENSE --- # MedCPT Introduction **MedCPT generates embeddings of biomedical texts that can be used for semantic search (dense retrieval)**. The model contains two encoders: - [MedCPT Query Encoder](https://huggingface.co/ncbi/MedCPT-Query-Encoder): compute the embeddings of short texts (e.g., questions, search queries, sentences). - [MedCPT Article Encoder](https://huggingface.co/ncbi/MedCPT-Article-Encoder): compute the embeddings of articles (e.g., PubMed titles & abstracts). **This repo contains the MedCPT Query Encoder.** **MedCPT has been pre-trained by an unprecedented scale of 255M query-article pairs from PubMed search logs**, and has been shown to achieve state-of-the-art performance on several zero-shot biomedical IR datasets. In general, there are three use cases: 1. Query-to-article search with both encoders. 2. Query representation for clustering or query-to-query search with the [query encoder](https://huggingface.co/ncbi/MedCPT-Query-Encoder). 3. Article representation for clustering or article-to-article search with the [article encoder](https://huggingface.co/ncbi/MedCPT-Article-Encoder). For more details, please check out our [paper](https://arxiv.org/abs/2307.00589) (Bioinformatics, 2023). Please note that the released version is slightly different from the version reported in the paper. # Case 1. Using the MedCPT Query Encoder ```python import torch from transformers import AutoTokenizer, AutoModel model = AutoModel.from_pretrained("ncbi/MedCPT-Query-Encoder") tokenizer = AutoTokenizer.from_pretrained("ncbi/MedCPT-Query-Encoder") queries = [ "diabetes treatment", "How to treat diabetes?", "A 45-year-old man presents with increased thirst and frequent urination over the past 3 months.", ] with torch.no_grad(): # tokenize the queries encoded = tokenizer( queries, truncation=True, padding=True, return_tensors='pt', max_length=64, ) # encode the queries (use the [CLS] last hidden states as the representations) embeds = model(**encoded).last_hidden_state[:, 0, :] print(embeds) print(embeds.size()) ``` The output will be: ```bash tensor([[ 0.0413, 0.0084, -0.0491, ..., -0.4963, -0.3830, -0.3593], [ 0.0801, 0.1193, -0.0905, ..., -0.5380, -0.5059, -0.2944], [-0.3412, 0.1521, -0.0946, ..., 0.0952, 0.1660, -0.0902]]) torch.Size([3, 768]) ``` These embeddings are also in the same space as those generated by the MedCPT article encoder. # Case 2. Semantically searching PubMed with your query We have provided the embeddings of all PubMed articles generated by the MedCPT article encoder at https://ftp.ncbi.nlm.nih.gov/pub/lu/MedCPT/pubmed_embeddings/. You can simply download these embeddings to search PubMed with your query. # Acknowledgments This work was supported by the Intramural Research Programs of the National Institutes of Health, National Library of Medicine. # Disclaimer This tool shows the results of research conducted in the Computational Biology Branch, NCBI/NLM. The information produced on this website is not intended for direct diagnostic use or medical decision-making without review and oversight by a clinical professional. Individuals should not change their health behavior solely on the basis of information produced on this website. NIH does not independently verify the validity or utility of the information produced by this tool. If you have questions about the information produced on this website, please see a health care professional. More information about NCBI's disclaimer policy is available. # Citation If you find this repo helpful, please cite MedCPT by: ```bibtext @article{jin2023medcpt, title={MedCPT: Contrastive Pre-trained Transformers with large-scale PubMed search logs for zero-shot biomedical information retrieval}, author={Jin, Qiao and Kim, Won and Chen, Qingyu and Comeau, Donald C and Yeganova, Lana and Wilbur, W John and Lu, Zhiyong}, journal={Bioinformatics}, volume={39}, number={11}, pages={btad651}, year={2023}, publisher={Oxford University Press} } ```
hkunlp/instructor-xl
hkunlp
"2023-01-21T06:33:27Z"
79,324
505
sentence-transformers
[ "sentence-transformers", "pytorch", "t5", "text-embedding", "embeddings", "information-retrieval", "beir", "text-classification", "language-model", "text-clustering", "text-semantic-similarity", "text-evaluation", "prompt-retrieval", "text-reranking", "feature-extraction", "sentence-similarity", "transformers", "English", "Sentence Similarity", "natural_questions", "ms_marco", "fever", "hotpot_qa", "mteb", "en", "arxiv:2212.09741", "license:apache-2.0", "model-index", "has_space", "region:us" ]
sentence-similarity
"2022-12-20T06:07:18Z"
--- pipeline_tag: sentence-similarity tags: - text-embedding - embeddings - information-retrieval - beir - text-classification - language-model - text-clustering - text-semantic-similarity - text-evaluation - prompt-retrieval - text-reranking - sentence-transformers - feature-extraction - sentence-similarity - transformers - t5 - English - Sentence Similarity - natural_questions - ms_marco - fever - hotpot_qa - mteb language: en inference: false license: apache-2.0 model-index: - name: final_xl_results results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 85.08955223880596 - type: ap value: 52.66066378722476 - type: f1 value: 79.63340218960269 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 86.542 - type: ap value: 81.92695193008987 - type: f1 value: 86.51466132573681 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 42.964 - type: f1 value: 41.43146249774862 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 29.872 - type: map_at_10 value: 46.342 - type: map_at_100 value: 47.152 - type: map_at_1000 value: 47.154 - type: map_at_3 value: 41.216 - type: map_at_5 value: 44.035999999999994 - type: mrr_at_1 value: 30.939 - type: mrr_at_10 value: 46.756 - type: mrr_at_100 value: 47.573 - type: mrr_at_1000 value: 47.575 - type: mrr_at_3 value: 41.548 - type: mrr_at_5 value: 44.425 - type: ndcg_at_1 value: 29.872 - type: ndcg_at_10 value: 55.65 - type: ndcg_at_100 value: 58.88099999999999 - type: ndcg_at_1000 value: 58.951 - type: ndcg_at_3 value: 45.0 - type: ndcg_at_5 value: 50.09 - type: precision_at_1 value: 29.872 - type: precision_at_10 value: 8.549 - type: precision_at_100 value: 0.991 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 18.658 - type: precision_at_5 value: 13.669999999999998 - type: recall_at_1 value: 29.872 - type: recall_at_10 value: 85.491 - type: recall_at_100 value: 99.075 - type: recall_at_1000 value: 99.644 - type: recall_at_3 value: 55.974000000000004 - type: recall_at_5 value: 68.35 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 42.452729850641276 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 32.21141846480423 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 65.34710928952622 - type: mrr value: 77.61124301983028 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_spearman value: 84.15312230525639 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 82.66233766233766 - type: f1 value: 82.04175284777669 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 37.36697339826455 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 30.551241447593092 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 36.797000000000004 - type: map_at_10 value: 48.46 - type: map_at_100 value: 49.968 - type: map_at_1000 value: 50.080000000000005 - type: map_at_3 value: 44.71 - type: map_at_5 value: 46.592 - type: mrr_at_1 value: 45.494 - type: mrr_at_10 value: 54.747 - type: mrr_at_100 value: 55.43599999999999 - type: mrr_at_1000 value: 55.464999999999996 - type: mrr_at_3 value: 52.361000000000004 - type: mrr_at_5 value: 53.727000000000004 - type: ndcg_at_1 value: 45.494 - type: ndcg_at_10 value: 54.989 - type: ndcg_at_100 value: 60.096000000000004 - type: ndcg_at_1000 value: 61.58 - type: ndcg_at_3 value: 49.977 - type: ndcg_at_5 value: 51.964999999999996 - type: precision_at_1 value: 45.494 - type: precision_at_10 value: 10.558 - type: precision_at_100 value: 1.6049999999999998 - type: precision_at_1000 value: 0.203 - type: precision_at_3 value: 23.796 - type: precision_at_5 value: 16.881 - type: recall_at_1 value: 36.797000000000004 - type: recall_at_10 value: 66.83 - type: recall_at_100 value: 88.34100000000001 - type: recall_at_1000 value: 97.202 - type: recall_at_3 value: 51.961999999999996 - type: recall_at_5 value: 57.940000000000005 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 32.597 - type: map_at_10 value: 43.424 - type: map_at_100 value: 44.78 - type: map_at_1000 value: 44.913 - type: map_at_3 value: 40.315 - type: map_at_5 value: 41.987 - type: mrr_at_1 value: 40.382 - type: mrr_at_10 value: 49.219 - type: mrr_at_100 value: 49.895 - type: mrr_at_1000 value: 49.936 - type: mrr_at_3 value: 46.996 - type: mrr_at_5 value: 48.231 - type: ndcg_at_1 value: 40.382 - type: ndcg_at_10 value: 49.318 - type: ndcg_at_100 value: 53.839999999999996 - type: ndcg_at_1000 value: 55.82899999999999 - type: ndcg_at_3 value: 44.914 - type: ndcg_at_5 value: 46.798 - type: precision_at_1 value: 40.382 - type: precision_at_10 value: 9.274000000000001 - type: precision_at_100 value: 1.497 - type: precision_at_1000 value: 0.198 - type: precision_at_3 value: 21.592 - type: precision_at_5 value: 15.159 - type: recall_at_1 value: 32.597 - type: recall_at_10 value: 59.882000000000005 - type: recall_at_100 value: 78.446 - type: recall_at_1000 value: 90.88000000000001 - type: recall_at_3 value: 46.9 - type: recall_at_5 value: 52.222 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 43.8 - type: map_at_10 value: 57.293000000000006 - type: map_at_100 value: 58.321 - type: map_at_1000 value: 58.361 - type: map_at_3 value: 53.839999999999996 - type: map_at_5 value: 55.838 - type: mrr_at_1 value: 49.592000000000006 - type: mrr_at_10 value: 60.643 - type: mrr_at_100 value: 61.23499999999999 - type: mrr_at_1000 value: 61.251999999999995 - type: mrr_at_3 value: 58.265 - type: mrr_at_5 value: 59.717 - type: ndcg_at_1 value: 49.592000000000006 - type: ndcg_at_10 value: 63.364 - type: ndcg_at_100 value: 67.167 - type: ndcg_at_1000 value: 67.867 - type: ndcg_at_3 value: 57.912 - type: ndcg_at_5 value: 60.697 - type: precision_at_1 value: 49.592000000000006 - type: precision_at_10 value: 10.088 - type: precision_at_100 value: 1.2930000000000001 - type: precision_at_1000 value: 0.13899999999999998 - type: precision_at_3 value: 25.789 - type: precision_at_5 value: 17.541999999999998 - type: recall_at_1 value: 43.8 - type: recall_at_10 value: 77.635 - type: recall_at_100 value: 93.748 - type: recall_at_1000 value: 98.468 - type: recall_at_3 value: 63.223 - type: recall_at_5 value: 70.122 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.721 - type: map_at_10 value: 35.626999999999995 - type: map_at_100 value: 36.719 - type: map_at_1000 value: 36.8 - type: map_at_3 value: 32.781 - type: map_at_5 value: 34.333999999999996 - type: mrr_at_1 value: 29.604999999999997 - type: mrr_at_10 value: 37.564 - type: mrr_at_100 value: 38.505 - type: mrr_at_1000 value: 38.565 - type: mrr_at_3 value: 34.727000000000004 - type: mrr_at_5 value: 36.207 - type: ndcg_at_1 value: 29.604999999999997 - type: ndcg_at_10 value: 40.575 - type: ndcg_at_100 value: 45.613 - type: ndcg_at_1000 value: 47.676 - type: ndcg_at_3 value: 34.811 - type: ndcg_at_5 value: 37.491 - type: precision_at_1 value: 29.604999999999997 - type: precision_at_10 value: 6.1690000000000005 - type: precision_at_100 value: 0.906 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 14.237 - type: precision_at_5 value: 10.056 - type: recall_at_1 value: 27.721 - type: recall_at_10 value: 54.041 - type: recall_at_100 value: 76.62299999999999 - type: recall_at_1000 value: 92.134 - type: recall_at_3 value: 38.582 - type: recall_at_5 value: 44.989000000000004 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 16.553 - type: map_at_10 value: 25.384 - type: map_at_100 value: 26.655 - type: map_at_1000 value: 26.778000000000002 - type: map_at_3 value: 22.733 - type: map_at_5 value: 24.119 - type: mrr_at_1 value: 20.149 - type: mrr_at_10 value: 29.705 - type: mrr_at_100 value: 30.672 - type: mrr_at_1000 value: 30.737 - type: mrr_at_3 value: 27.032 - type: mrr_at_5 value: 28.369 - type: ndcg_at_1 value: 20.149 - type: ndcg_at_10 value: 30.843999999999998 - type: ndcg_at_100 value: 36.716 - type: ndcg_at_1000 value: 39.495000000000005 - type: ndcg_at_3 value: 25.918999999999997 - type: ndcg_at_5 value: 27.992 - type: precision_at_1 value: 20.149 - type: precision_at_10 value: 5.858 - type: precision_at_100 value: 1.009 - type: precision_at_1000 value: 0.13799999999999998 - type: precision_at_3 value: 12.645000000000001 - type: precision_at_5 value: 9.179 - type: recall_at_1 value: 16.553 - type: recall_at_10 value: 43.136 - type: recall_at_100 value: 68.562 - type: recall_at_1000 value: 88.208 - type: recall_at_3 value: 29.493000000000002 - type: recall_at_5 value: 34.751 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.000999999999998 - type: map_at_10 value: 39.004 - type: map_at_100 value: 40.461999999999996 - type: map_at_1000 value: 40.566 - type: map_at_3 value: 35.805 - type: map_at_5 value: 37.672 - type: mrr_at_1 value: 33.782000000000004 - type: mrr_at_10 value: 44.702 - type: mrr_at_100 value: 45.528 - type: mrr_at_1000 value: 45.576 - type: mrr_at_3 value: 42.14 - type: mrr_at_5 value: 43.651 - type: ndcg_at_1 value: 33.782000000000004 - type: ndcg_at_10 value: 45.275999999999996 - type: ndcg_at_100 value: 50.888 - type: ndcg_at_1000 value: 52.879 - type: ndcg_at_3 value: 40.191 - type: ndcg_at_5 value: 42.731 - type: precision_at_1 value: 33.782000000000004 - type: precision_at_10 value: 8.200000000000001 - type: precision_at_100 value: 1.287 - type: precision_at_1000 value: 0.16199999999999998 - type: precision_at_3 value: 19.185 - type: precision_at_5 value: 13.667000000000002 - type: recall_at_1 value: 28.000999999999998 - type: recall_at_10 value: 58.131 - type: recall_at_100 value: 80.869 - type: recall_at_1000 value: 93.931 - type: recall_at_3 value: 44.161 - type: recall_at_5 value: 50.592000000000006 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.047 - type: map_at_10 value: 38.596000000000004 - type: map_at_100 value: 40.116 - type: map_at_1000 value: 40.232 - type: map_at_3 value: 35.205 - type: map_at_5 value: 37.076 - type: mrr_at_1 value: 34.932 - type: mrr_at_10 value: 44.496 - type: mrr_at_100 value: 45.47 - type: mrr_at_1000 value: 45.519999999999996 - type: mrr_at_3 value: 41.743 - type: mrr_at_5 value: 43.352000000000004 - type: ndcg_at_1 value: 34.932 - type: ndcg_at_10 value: 44.901 - type: ndcg_at_100 value: 50.788999999999994 - type: ndcg_at_1000 value: 52.867 - type: ndcg_at_3 value: 39.449 - type: ndcg_at_5 value: 41.929 - type: precision_at_1 value: 34.932 - type: precision_at_10 value: 8.311 - type: precision_at_100 value: 1.3050000000000002 - type: precision_at_1000 value: 0.166 - type: precision_at_3 value: 18.836 - type: precision_at_5 value: 13.447000000000001 - type: recall_at_1 value: 28.047 - type: recall_at_10 value: 57.717 - type: recall_at_100 value: 82.182 - type: recall_at_1000 value: 95.82000000000001 - type: recall_at_3 value: 42.448 - type: recall_at_5 value: 49.071 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.861250000000005 - type: map_at_10 value: 37.529583333333335 - type: map_at_100 value: 38.7915 - type: map_at_1000 value: 38.90558333333335 - type: map_at_3 value: 34.57333333333333 - type: map_at_5 value: 36.187166666666656 - type: mrr_at_1 value: 32.88291666666666 - type: mrr_at_10 value: 41.79750000000001 - type: mrr_at_100 value: 42.63183333333333 - type: mrr_at_1000 value: 42.68483333333333 - type: mrr_at_3 value: 39.313750000000006 - type: mrr_at_5 value: 40.70483333333333 - type: ndcg_at_1 value: 32.88291666666666 - type: ndcg_at_10 value: 43.09408333333333 - type: ndcg_at_100 value: 48.22158333333333 - type: ndcg_at_1000 value: 50.358000000000004 - type: ndcg_at_3 value: 38.129583333333336 - type: ndcg_at_5 value: 40.39266666666666 - type: precision_at_1 value: 32.88291666666666 - type: precision_at_10 value: 7.5584999999999996 - type: precision_at_100 value: 1.1903333333333332 - type: precision_at_1000 value: 0.15658333333333332 - type: precision_at_3 value: 17.495916666666666 - type: precision_at_5 value: 12.373833333333332 - type: recall_at_1 value: 27.861250000000005 - type: recall_at_10 value: 55.215916666666665 - type: recall_at_100 value: 77.392 - type: recall_at_1000 value: 92.04908333333334 - type: recall_at_3 value: 41.37475 - type: recall_at_5 value: 47.22908333333333 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.064999999999998 - type: map_at_10 value: 31.635999999999996 - type: map_at_100 value: 32.596000000000004 - type: map_at_1000 value: 32.695 - type: map_at_3 value: 29.612 - type: map_at_5 value: 30.768 - type: mrr_at_1 value: 28.528 - type: mrr_at_10 value: 34.717 - type: mrr_at_100 value: 35.558 - type: mrr_at_1000 value: 35.626000000000005 - type: mrr_at_3 value: 32.745000000000005 - type: mrr_at_5 value: 33.819 - type: ndcg_at_1 value: 28.528 - type: ndcg_at_10 value: 35.647 - type: ndcg_at_100 value: 40.207 - type: ndcg_at_1000 value: 42.695 - type: ndcg_at_3 value: 31.878 - type: ndcg_at_5 value: 33.634 - type: precision_at_1 value: 28.528 - type: precision_at_10 value: 5.46 - type: precision_at_100 value: 0.84 - type: precision_at_1000 value: 0.11399999999999999 - type: precision_at_3 value: 13.547999999999998 - type: precision_at_5 value: 9.325 - type: recall_at_1 value: 25.064999999999998 - type: recall_at_10 value: 45.096000000000004 - type: recall_at_100 value: 65.658 - type: recall_at_1000 value: 84.128 - type: recall_at_3 value: 34.337 - type: recall_at_5 value: 38.849000000000004 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 17.276 - type: map_at_10 value: 24.535 - type: map_at_100 value: 25.655 - type: map_at_1000 value: 25.782 - type: map_at_3 value: 22.228 - type: map_at_5 value: 23.612 - type: mrr_at_1 value: 21.266 - type: mrr_at_10 value: 28.474 - type: mrr_at_100 value: 29.398000000000003 - type: mrr_at_1000 value: 29.482000000000003 - type: mrr_at_3 value: 26.245 - type: mrr_at_5 value: 27.624 - type: ndcg_at_1 value: 21.266 - type: ndcg_at_10 value: 29.087000000000003 - type: ndcg_at_100 value: 34.374 - type: ndcg_at_1000 value: 37.433 - type: ndcg_at_3 value: 25.040000000000003 - type: ndcg_at_5 value: 27.116 - type: precision_at_1 value: 21.266 - type: precision_at_10 value: 5.258 - type: precision_at_100 value: 0.9299999999999999 - type: precision_at_1000 value: 0.13699999999999998 - type: precision_at_3 value: 11.849 - type: precision_at_5 value: 8.699 - type: recall_at_1 value: 17.276 - type: recall_at_10 value: 38.928000000000004 - type: recall_at_100 value: 62.529 - type: recall_at_1000 value: 84.44800000000001 - type: recall_at_3 value: 27.554000000000002 - type: recall_at_5 value: 32.915 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.297 - type: map_at_10 value: 36.957 - type: map_at_100 value: 38.252 - type: map_at_1000 value: 38.356 - type: map_at_3 value: 34.121 - type: map_at_5 value: 35.782000000000004 - type: mrr_at_1 value: 32.275999999999996 - type: mrr_at_10 value: 41.198 - type: mrr_at_100 value: 42.131 - type: mrr_at_1000 value: 42.186 - type: mrr_at_3 value: 38.557 - type: mrr_at_5 value: 40.12 - type: ndcg_at_1 value: 32.275999999999996 - type: ndcg_at_10 value: 42.516 - type: ndcg_at_100 value: 48.15 - type: ndcg_at_1000 value: 50.344 - type: ndcg_at_3 value: 37.423 - type: ndcg_at_5 value: 39.919 - type: precision_at_1 value: 32.275999999999996 - type: precision_at_10 value: 7.155 - type: precision_at_100 value: 1.123 - type: precision_at_1000 value: 0.14200000000000002 - type: precision_at_3 value: 17.163999999999998 - type: precision_at_5 value: 12.127 - type: recall_at_1 value: 27.297 - type: recall_at_10 value: 55.238 - type: recall_at_100 value: 79.2 - type: recall_at_1000 value: 94.258 - type: recall_at_3 value: 41.327000000000005 - type: recall_at_5 value: 47.588 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 29.142000000000003 - type: map_at_10 value: 38.769 - type: map_at_100 value: 40.292 - type: map_at_1000 value: 40.510000000000005 - type: map_at_3 value: 35.39 - type: map_at_5 value: 37.009 - type: mrr_at_1 value: 34.19 - type: mrr_at_10 value: 43.418 - type: mrr_at_100 value: 44.132 - type: mrr_at_1000 value: 44.175 - type: mrr_at_3 value: 40.547 - type: mrr_at_5 value: 42.088 - type: ndcg_at_1 value: 34.19 - type: ndcg_at_10 value: 45.14 - type: ndcg_at_100 value: 50.364 - type: ndcg_at_1000 value: 52.481 - type: ndcg_at_3 value: 39.466 - type: ndcg_at_5 value: 41.772 - type: precision_at_1 value: 34.19 - type: precision_at_10 value: 8.715 - type: precision_at_100 value: 1.6150000000000002 - type: precision_at_1000 value: 0.247 - type: precision_at_3 value: 18.248 - type: precision_at_5 value: 13.161999999999999 - type: recall_at_1 value: 29.142000000000003 - type: recall_at_10 value: 57.577999999999996 - type: recall_at_100 value: 81.428 - type: recall_at_1000 value: 94.017 - type: recall_at_3 value: 41.402 - type: recall_at_5 value: 47.695 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 22.039 - type: map_at_10 value: 30.669999999999998 - type: map_at_100 value: 31.682 - type: map_at_1000 value: 31.794 - type: map_at_3 value: 28.139999999999997 - type: map_at_5 value: 29.457 - type: mrr_at_1 value: 24.399 - type: mrr_at_10 value: 32.687 - type: mrr_at_100 value: 33.622 - type: mrr_at_1000 value: 33.698 - type: mrr_at_3 value: 30.407 - type: mrr_at_5 value: 31.552999999999997 - type: ndcg_at_1 value: 24.399 - type: ndcg_at_10 value: 35.472 - type: ndcg_at_100 value: 40.455000000000005 - type: ndcg_at_1000 value: 43.15 - type: ndcg_at_3 value: 30.575000000000003 - type: ndcg_at_5 value: 32.668 - type: precision_at_1 value: 24.399 - type: precision_at_10 value: 5.656 - type: precision_at_100 value: 0.874 - type: precision_at_1000 value: 0.121 - type: precision_at_3 value: 13.062000000000001 - type: precision_at_5 value: 9.242 - type: recall_at_1 value: 22.039 - type: recall_at_10 value: 48.379 - type: recall_at_100 value: 71.11800000000001 - type: recall_at_1000 value: 91.095 - type: recall_at_3 value: 35.108 - type: recall_at_5 value: 40.015 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 10.144 - type: map_at_10 value: 18.238 - type: map_at_100 value: 20.143 - type: map_at_1000 value: 20.346 - type: map_at_3 value: 14.809 - type: map_at_5 value: 16.567999999999998 - type: mrr_at_1 value: 22.671 - type: mrr_at_10 value: 34.906 - type: mrr_at_100 value: 35.858000000000004 - type: mrr_at_1000 value: 35.898 - type: mrr_at_3 value: 31.238 - type: mrr_at_5 value: 33.342 - type: ndcg_at_1 value: 22.671 - type: ndcg_at_10 value: 26.540000000000003 - type: ndcg_at_100 value: 34.138000000000005 - type: ndcg_at_1000 value: 37.72 - type: ndcg_at_3 value: 20.766000000000002 - type: ndcg_at_5 value: 22.927 - type: precision_at_1 value: 22.671 - type: precision_at_10 value: 8.619 - type: precision_at_100 value: 1.678 - type: precision_at_1000 value: 0.23500000000000001 - type: precision_at_3 value: 15.592 - type: precision_at_5 value: 12.43 - type: recall_at_1 value: 10.144 - type: recall_at_10 value: 33.46 - type: recall_at_100 value: 59.758 - type: recall_at_1000 value: 79.704 - type: recall_at_3 value: 19.604 - type: recall_at_5 value: 25.367 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 8.654 - type: map_at_10 value: 18.506 - type: map_at_100 value: 26.412999999999997 - type: map_at_1000 value: 28.13 - type: map_at_3 value: 13.379 - type: map_at_5 value: 15.529000000000002 - type: mrr_at_1 value: 66.0 - type: mrr_at_10 value: 74.13 - type: mrr_at_100 value: 74.48700000000001 - type: mrr_at_1000 value: 74.49799999999999 - type: mrr_at_3 value: 72.75 - type: mrr_at_5 value: 73.762 - type: ndcg_at_1 value: 54.50000000000001 - type: ndcg_at_10 value: 40.236 - type: ndcg_at_100 value: 44.690999999999995 - type: ndcg_at_1000 value: 52.195 - type: ndcg_at_3 value: 45.632 - type: ndcg_at_5 value: 42.952 - type: precision_at_1 value: 66.0 - type: precision_at_10 value: 31.724999999999998 - type: precision_at_100 value: 10.299999999999999 - type: precision_at_1000 value: 2.194 - type: precision_at_3 value: 48.75 - type: precision_at_5 value: 41.6 - type: recall_at_1 value: 8.654 - type: recall_at_10 value: 23.74 - type: recall_at_100 value: 50.346999999999994 - type: recall_at_1000 value: 74.376 - type: recall_at_3 value: 14.636 - type: recall_at_5 value: 18.009 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 53.245 - type: f1 value: 48.74520523753552 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 51.729 - type: map_at_10 value: 63.904 - type: map_at_100 value: 64.363 - type: map_at_1000 value: 64.38199999999999 - type: map_at_3 value: 61.393 - type: map_at_5 value: 63.02100000000001 - type: mrr_at_1 value: 55.686 - type: mrr_at_10 value: 67.804 - type: mrr_at_100 value: 68.15299999999999 - type: mrr_at_1000 value: 68.161 - type: mrr_at_3 value: 65.494 - type: mrr_at_5 value: 67.01599999999999 - type: ndcg_at_1 value: 55.686 - type: ndcg_at_10 value: 70.025 - type: ndcg_at_100 value: 72.011 - type: ndcg_at_1000 value: 72.443 - type: ndcg_at_3 value: 65.32900000000001 - type: ndcg_at_5 value: 68.05600000000001 - type: precision_at_1 value: 55.686 - type: precision_at_10 value: 9.358 - type: precision_at_100 value: 1.05 - type: precision_at_1000 value: 0.11 - type: precision_at_3 value: 26.318 - type: precision_at_5 value: 17.321 - type: recall_at_1 value: 51.729 - type: recall_at_10 value: 85.04 - type: recall_at_100 value: 93.777 - type: recall_at_1000 value: 96.824 - type: recall_at_3 value: 72.521 - type: recall_at_5 value: 79.148 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 23.765 - type: map_at_10 value: 39.114 - type: map_at_100 value: 40.987 - type: map_at_1000 value: 41.155 - type: map_at_3 value: 34.028000000000006 - type: map_at_5 value: 36.925000000000004 - type: mrr_at_1 value: 46.451 - type: mrr_at_10 value: 54.711 - type: mrr_at_100 value: 55.509 - type: mrr_at_1000 value: 55.535000000000004 - type: mrr_at_3 value: 52.649 - type: mrr_at_5 value: 53.729000000000006 - type: ndcg_at_1 value: 46.451 - type: ndcg_at_10 value: 46.955999999999996 - type: ndcg_at_100 value: 53.686 - type: ndcg_at_1000 value: 56.230000000000004 - type: ndcg_at_3 value: 43.374 - type: ndcg_at_5 value: 44.372 - type: precision_at_1 value: 46.451 - type: precision_at_10 value: 13.256 - type: precision_at_100 value: 2.019 - type: precision_at_1000 value: 0.247 - type: precision_at_3 value: 29.115000000000002 - type: precision_at_5 value: 21.389 - type: recall_at_1 value: 23.765 - type: recall_at_10 value: 53.452999999999996 - type: recall_at_100 value: 78.828 - type: recall_at_1000 value: 93.938 - type: recall_at_3 value: 39.023 - type: recall_at_5 value: 45.18 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 31.918000000000003 - type: map_at_10 value: 46.741 - type: map_at_100 value: 47.762 - type: map_at_1000 value: 47.849000000000004 - type: map_at_3 value: 43.578 - type: map_at_5 value: 45.395 - type: mrr_at_1 value: 63.834999999999994 - type: mrr_at_10 value: 71.312 - type: mrr_at_100 value: 71.695 - type: mrr_at_1000 value: 71.714 - type: mrr_at_3 value: 69.82000000000001 - type: mrr_at_5 value: 70.726 - type: ndcg_at_1 value: 63.834999999999994 - type: ndcg_at_10 value: 55.879999999999995 - type: ndcg_at_100 value: 59.723000000000006 - type: ndcg_at_1000 value: 61.49400000000001 - type: ndcg_at_3 value: 50.964 - type: ndcg_at_5 value: 53.47 - type: precision_at_1 value: 63.834999999999994 - type: precision_at_10 value: 11.845 - type: precision_at_100 value: 1.4869999999999999 - type: precision_at_1000 value: 0.172 - type: precision_at_3 value: 32.158 - type: precision_at_5 value: 21.278 - type: recall_at_1 value: 31.918000000000003 - type: recall_at_10 value: 59.223000000000006 - type: recall_at_100 value: 74.328 - type: recall_at_1000 value: 86.05000000000001 - type: recall_at_3 value: 48.238 - type: recall_at_5 value: 53.193999999999996 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 79.7896 - type: ap value: 73.65166029460288 - type: f1 value: 79.71794693711813 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 22.239 - type: map_at_10 value: 34.542 - type: map_at_100 value: 35.717999999999996 - type: map_at_1000 value: 35.764 - type: map_at_3 value: 30.432 - type: map_at_5 value: 32.81 - type: mrr_at_1 value: 22.908 - type: mrr_at_10 value: 35.127 - type: mrr_at_100 value: 36.238 - type: mrr_at_1000 value: 36.278 - type: mrr_at_3 value: 31.076999999999998 - type: mrr_at_5 value: 33.419 - type: ndcg_at_1 value: 22.908 - type: ndcg_at_10 value: 41.607 - type: ndcg_at_100 value: 47.28 - type: ndcg_at_1000 value: 48.414 - type: ndcg_at_3 value: 33.253 - type: ndcg_at_5 value: 37.486000000000004 - type: precision_at_1 value: 22.908 - type: precision_at_10 value: 6.645 - type: precision_at_100 value: 0.9490000000000001 - type: precision_at_1000 value: 0.105 - type: precision_at_3 value: 14.130999999999998 - type: precision_at_5 value: 10.616 - type: recall_at_1 value: 22.239 - type: recall_at_10 value: 63.42 - type: recall_at_100 value: 89.696 - type: recall_at_1000 value: 98.351 - type: recall_at_3 value: 40.77 - type: recall_at_5 value: 50.93 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 95.06839945280439 - type: f1 value: 94.74276398224072 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 72.25718194254446 - type: f1 value: 53.91164489161391 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 71.47948890383323 - type: f1 value: 69.98520247230257 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 76.46603900470748 - type: f1 value: 76.44111526065399 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 33.19106070798198 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 30.78772205248094 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 31.811231631488507 - type: mrr value: 32.98200485378021 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 6.9 - type: map_at_10 value: 13.703000000000001 - type: map_at_100 value: 17.251 - type: map_at_1000 value: 18.795 - type: map_at_3 value: 10.366999999999999 - type: map_at_5 value: 11.675 - type: mrr_at_1 value: 47.059 - type: mrr_at_10 value: 55.816 - type: mrr_at_100 value: 56.434 - type: mrr_at_1000 value: 56.467 - type: mrr_at_3 value: 53.973000000000006 - type: mrr_at_5 value: 55.257999999999996 - type: ndcg_at_1 value: 44.737 - type: ndcg_at_10 value: 35.997 - type: ndcg_at_100 value: 33.487 - type: ndcg_at_1000 value: 41.897 - type: ndcg_at_3 value: 41.18 - type: ndcg_at_5 value: 38.721 - type: precision_at_1 value: 46.129999999999995 - type: precision_at_10 value: 26.533 - type: precision_at_100 value: 8.706 - type: precision_at_1000 value: 2.16 - type: precision_at_3 value: 38.493 - type: precision_at_5 value: 33.189 - type: recall_at_1 value: 6.9 - type: recall_at_10 value: 17.488999999999997 - type: recall_at_100 value: 34.583000000000006 - type: recall_at_1000 value: 64.942 - type: recall_at_3 value: 11.494 - type: recall_at_5 value: 13.496 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 33.028999999999996 - type: map_at_10 value: 49.307 - type: map_at_100 value: 50.205 - type: map_at_1000 value: 50.23 - type: map_at_3 value: 44.782 - type: map_at_5 value: 47.599999999999994 - type: mrr_at_1 value: 37.108999999999995 - type: mrr_at_10 value: 51.742999999999995 - type: mrr_at_100 value: 52.405 - type: mrr_at_1000 value: 52.422000000000004 - type: mrr_at_3 value: 48.087999999999994 - type: mrr_at_5 value: 50.414 - type: ndcg_at_1 value: 37.08 - type: ndcg_at_10 value: 57.236 - type: ndcg_at_100 value: 60.931999999999995 - type: ndcg_at_1000 value: 61.522 - type: ndcg_at_3 value: 48.93 - type: ndcg_at_5 value: 53.561 - type: precision_at_1 value: 37.08 - type: precision_at_10 value: 9.386 - type: precision_at_100 value: 1.1480000000000001 - type: precision_at_1000 value: 0.12 - type: precision_at_3 value: 22.258 - type: precision_at_5 value: 16.025 - type: recall_at_1 value: 33.028999999999996 - type: recall_at_10 value: 78.805 - type: recall_at_100 value: 94.643 - type: recall_at_1000 value: 99.039 - type: recall_at_3 value: 57.602 - type: recall_at_5 value: 68.253 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 71.122 - type: map_at_10 value: 85.237 - type: map_at_100 value: 85.872 - type: map_at_1000 value: 85.885 - type: map_at_3 value: 82.27499999999999 - type: map_at_5 value: 84.13199999999999 - type: mrr_at_1 value: 81.73 - type: mrr_at_10 value: 87.834 - type: mrr_at_100 value: 87.92 - type: mrr_at_1000 value: 87.921 - type: mrr_at_3 value: 86.878 - type: mrr_at_5 value: 87.512 - type: ndcg_at_1 value: 81.73 - type: ndcg_at_10 value: 88.85499999999999 - type: ndcg_at_100 value: 89.992 - type: ndcg_at_1000 value: 90.07 - type: ndcg_at_3 value: 85.997 - type: ndcg_at_5 value: 87.55199999999999 - type: precision_at_1 value: 81.73 - type: precision_at_10 value: 13.491 - type: precision_at_100 value: 1.536 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.623 - type: precision_at_5 value: 24.742 - type: recall_at_1 value: 71.122 - type: recall_at_10 value: 95.935 - type: recall_at_100 value: 99.657 - type: recall_at_1000 value: 99.996 - type: recall_at_3 value: 87.80799999999999 - type: recall_at_5 value: 92.161 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 63.490029238193756 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 65.13153408508836 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 4.202999999999999 - type: map_at_10 value: 10.174 - type: map_at_100 value: 12.138 - type: map_at_1000 value: 12.418 - type: map_at_3 value: 7.379 - type: map_at_5 value: 8.727 - type: mrr_at_1 value: 20.7 - type: mrr_at_10 value: 30.389 - type: mrr_at_100 value: 31.566 - type: mrr_at_1000 value: 31.637999999999998 - type: mrr_at_3 value: 27.133000000000003 - type: mrr_at_5 value: 29.078 - type: ndcg_at_1 value: 20.7 - type: ndcg_at_10 value: 17.355999999999998 - type: ndcg_at_100 value: 25.151 - type: ndcg_at_1000 value: 30.37 - type: ndcg_at_3 value: 16.528000000000002 - type: ndcg_at_5 value: 14.396999999999998 - type: precision_at_1 value: 20.7 - type: precision_at_10 value: 8.98 - type: precision_at_100 value: 2.015 - type: precision_at_1000 value: 0.327 - type: precision_at_3 value: 15.367 - type: precision_at_5 value: 12.559999999999999 - type: recall_at_1 value: 4.202999999999999 - type: recall_at_10 value: 18.197 - type: recall_at_100 value: 40.903 - type: recall_at_1000 value: 66.427 - type: recall_at_3 value: 9.362 - type: recall_at_5 value: 12.747 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_spearman value: 81.69890989765257 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_spearman value: 75.31953790551489 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_spearman value: 87.44050861280759 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_spearman value: 81.86922869270393 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_spearman value: 88.9399170304284 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_spearman value: 85.38015314088582 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_spearman value: 90.53653527788835 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_spearman value: 68.64526474250209 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_spearman value: 86.56156983963042 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 79.48610254648003 - type: mrr value: 94.02481505422682 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 48.983 - type: map_at_10 value: 59.077999999999996 - type: map_at_100 value: 59.536 - type: map_at_1000 value: 59.575 - type: map_at_3 value: 55.691 - type: map_at_5 value: 57.410000000000004 - type: mrr_at_1 value: 51.666999999999994 - type: mrr_at_10 value: 60.427 - type: mrr_at_100 value: 60.763 - type: mrr_at_1000 value: 60.79900000000001 - type: mrr_at_3 value: 57.556 - type: mrr_at_5 value: 59.089000000000006 - type: ndcg_at_1 value: 51.666999999999994 - type: ndcg_at_10 value: 64.559 - type: ndcg_at_100 value: 66.58 - type: ndcg_at_1000 value: 67.64 - type: ndcg_at_3 value: 58.287 - type: ndcg_at_5 value: 61.001000000000005 - type: precision_at_1 value: 51.666999999999994 - type: precision_at_10 value: 9.067 - type: precision_at_100 value: 1.0170000000000001 - type: precision_at_1000 value: 0.11100000000000002 - type: precision_at_3 value: 23.0 - type: precision_at_5 value: 15.6 - type: recall_at_1 value: 48.983 - type: recall_at_10 value: 80.289 - type: recall_at_100 value: 89.43299999999999 - type: recall_at_1000 value: 97.667 - type: recall_at_3 value: 62.978 - type: recall_at_5 value: 69.872 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.79009900990098 - type: cos_sim_ap value: 94.94115052608419 - type: cos_sim_f1 value: 89.1260162601626 - type: cos_sim_precision value: 90.599173553719 - type: cos_sim_recall value: 87.7 - type: dot_accuracy value: 99.79009900990098 - type: dot_ap value: 94.94115052608419 - type: dot_f1 value: 89.1260162601626 - type: dot_precision value: 90.599173553719 - type: dot_recall value: 87.7 - type: euclidean_accuracy value: 99.79009900990098 - type: euclidean_ap value: 94.94115052608419 - type: euclidean_f1 value: 89.1260162601626 - type: euclidean_precision value: 90.599173553719 - type: euclidean_recall value: 87.7 - type: manhattan_accuracy value: 99.7940594059406 - type: manhattan_ap value: 94.95271414642431 - type: manhattan_f1 value: 89.24508790072387 - type: manhattan_precision value: 92.3982869379015 - type: manhattan_recall value: 86.3 - type: max_accuracy value: 99.7940594059406 - type: max_ap value: 94.95271414642431 - type: max_f1 value: 89.24508790072387 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 68.43866571935851 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 35.16579026551532 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 52.518952473513934 - type: mrr value: 53.292457134368895 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 31.12529588316604 - type: cos_sim_spearman value: 32.31662126895294 - type: dot_pearson value: 31.125303796647056 - type: dot_spearman value: 32.31662126895294 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.219 - type: map_at_10 value: 1.7469999999999999 - type: map_at_100 value: 10.177999999999999 - type: map_at_1000 value: 26.108999999999998 - type: map_at_3 value: 0.64 - type: map_at_5 value: 0.968 - type: mrr_at_1 value: 82.0 - type: mrr_at_10 value: 89.067 - type: mrr_at_100 value: 89.067 - type: mrr_at_1000 value: 89.067 - type: mrr_at_3 value: 88.333 - type: mrr_at_5 value: 88.73299999999999 - type: ndcg_at_1 value: 78.0 - type: ndcg_at_10 value: 71.398 - type: ndcg_at_100 value: 55.574999999999996 - type: ndcg_at_1000 value: 51.771 - type: ndcg_at_3 value: 77.765 - type: ndcg_at_5 value: 73.614 - type: precision_at_1 value: 82.0 - type: precision_at_10 value: 75.4 - type: precision_at_100 value: 58.040000000000006 - type: precision_at_1000 value: 23.516000000000002 - type: precision_at_3 value: 84.0 - type: precision_at_5 value: 78.4 - type: recall_at_1 value: 0.219 - type: recall_at_10 value: 1.958 - type: recall_at_100 value: 13.797999999999998 - type: recall_at_1000 value: 49.881 - type: recall_at_3 value: 0.672 - type: recall_at_5 value: 1.0370000000000001 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 1.8610000000000002 - type: map_at_10 value: 8.705 - type: map_at_100 value: 15.164 - type: map_at_1000 value: 16.78 - type: map_at_3 value: 4.346 - type: map_at_5 value: 6.151 - type: mrr_at_1 value: 22.448999999999998 - type: mrr_at_10 value: 41.556 - type: mrr_at_100 value: 42.484 - type: mrr_at_1000 value: 42.494 - type: mrr_at_3 value: 37.755 - type: mrr_at_5 value: 40.102 - type: ndcg_at_1 value: 21.429000000000002 - type: ndcg_at_10 value: 23.439 - type: ndcg_at_100 value: 36.948 - type: ndcg_at_1000 value: 48.408 - type: ndcg_at_3 value: 22.261 - type: ndcg_at_5 value: 23.085 - type: precision_at_1 value: 22.448999999999998 - type: precision_at_10 value: 21.633 - type: precision_at_100 value: 8.02 - type: precision_at_1000 value: 1.5939999999999999 - type: precision_at_3 value: 23.810000000000002 - type: precision_at_5 value: 24.490000000000002 - type: recall_at_1 value: 1.8610000000000002 - type: recall_at_10 value: 15.876000000000001 - type: recall_at_100 value: 50.300999999999995 - type: recall_at_1000 value: 86.098 - type: recall_at_3 value: 5.892 - type: recall_at_5 value: 9.443 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 70.3264 - type: ap value: 13.249577616243794 - type: f1 value: 53.621518367695685 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 61.57611771363894 - type: f1 value: 61.79797478568639 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 53.38315344479284 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 87.55438993860642 - type: cos_sim_ap value: 77.98702600017738 - type: cos_sim_f1 value: 71.94971653931476 - type: cos_sim_precision value: 67.50693802035153 - type: cos_sim_recall value: 77.01846965699208 - type: dot_accuracy value: 87.55438993860642 - type: dot_ap value: 77.98702925907986 - type: dot_f1 value: 71.94971653931476 - type: dot_precision value: 67.50693802035153 - type: dot_recall value: 77.01846965699208 - type: euclidean_accuracy value: 87.55438993860642 - type: euclidean_ap value: 77.98702951957925 - type: euclidean_f1 value: 71.94971653931476 - type: euclidean_precision value: 67.50693802035153 - type: euclidean_recall value: 77.01846965699208 - type: manhattan_accuracy value: 87.54246885617214 - type: manhattan_ap value: 77.95531413902947 - type: manhattan_f1 value: 71.93605683836589 - type: manhattan_precision value: 69.28152492668622 - type: manhattan_recall value: 74.80211081794195 - type: max_accuracy value: 87.55438993860642 - type: max_ap value: 77.98702951957925 - type: max_f1 value: 71.94971653931476 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 89.47296930182016 - type: cos_sim_ap value: 86.92853616302108 - type: cos_sim_f1 value: 79.35138351681047 - type: cos_sim_precision value: 76.74820143884892 - type: cos_sim_recall value: 82.13735756082538 - type: dot_accuracy value: 89.47296930182016 - type: dot_ap value: 86.92854339601595 - type: dot_f1 value: 79.35138351681047 - type: dot_precision value: 76.74820143884892 - type: dot_recall value: 82.13735756082538 - type: euclidean_accuracy value: 89.47296930182016 - type: euclidean_ap value: 86.92854191061649 - type: euclidean_f1 value: 79.35138351681047 - type: euclidean_precision value: 76.74820143884892 - type: euclidean_recall value: 82.13735756082538 - type: manhattan_accuracy value: 89.47685023479644 - type: manhattan_ap value: 86.90063722679578 - type: manhattan_f1 value: 79.30753865502702 - type: manhattan_precision value: 76.32066068631639 - type: manhattan_recall value: 82.53772713273791 - type: max_accuracy value: 89.47685023479644 - type: max_ap value: 86.92854339601595 - type: max_f1 value: 79.35138351681047 --- # hkunlp/instructor-xl We introduce **Instructor**👨‍🏫, an instruction-finetuned text embedding model that can generate text embeddings tailored to any task (e.g., classification, retrieval, clustering, text evaluation, etc.) and domains (e.g., science, finance, etc.) ***by simply providing the task instruction, without any finetuning***. Instructor👨‍ achieves sota on 70 diverse embedding tasks! The model is easy to use with **our customized** `sentence-transformer` library. For more details, check out [our paper](https://arxiv.org/abs/2212.09741) and [project page](https://instructor-embedding.github.io/)! **************************** **Updates** **************************** * 01/21: We released a new [checkpoint](https://huggingface.co/hkunlp/instructor-xl) trained with hard negatives, which gives better performance. * 12/21: We released our [paper](https://arxiv.org/abs/2212.09741), [code](https://github.com/HKUNLP/instructor-embedding), [checkpoint](https://huggingface.co/hkunlp/instructor-xl) and [project page](https://instructor-embedding.github.io/)! Check them out! ## Quick start <hr /> ## Installation ```bash pip install InstructorEmbedding ``` ## Compute your customized embeddings Then you can use the model like this to calculate domain-specific and task-aware embeddings: ```python from InstructorEmbedding import INSTRUCTOR model = INSTRUCTOR('hkunlp/instructor-xl') sentence = "3D ActionSLAM: wearable person tracking in multi-floor environments" instruction = "Represent the Science title:" embeddings = model.encode([[instruction,sentence]]) print(embeddings) ``` ## Use cases <hr /> ## Calculate embeddings for your customized texts If you want to calculate customized embeddings for specific sentences, you may follow the unified template to write instructions: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represent the `domain` `text_type` for `task_objective`: * `domain` is optional, and it specifies the domain of the text, e.g., science, finance, medicine, etc. * `text_type` is required, and it specifies the encoding unit, e.g., sentence, document, paragraph, etc. * `task_objective` is optional, and it specifies the objective of embedding, e.g., retrieve a document, classify the sentence, etc. ## Calculate Sentence similarities You can further use the model to compute similarities between two groups of sentences, with **customized embeddings**. ```python from sklearn.metrics.pairwise import cosine_similarity sentences_a = [['Represent the Science sentence: ','Parton energy loss in QCD matter'], ['Represent the Financial statement: ','The Federal Reserve on Wednesday raised its benchmark interest rate.']] sentences_b = [['Represent the Science sentence: ','The Chiral Phase Transition in Dissipative Dynamics'], ['Represent the Financial statement: ','The funds rose less than 0.5 per cent on Friday']] embeddings_a = model.encode(sentences_a) embeddings_b = model.encode(sentences_b) similarities = cosine_similarity(embeddings_a,embeddings_b) print(similarities) ``` ## Information Retrieval You can also use **customized embeddings** for information retrieval. ```python import numpy as np from sklearn.metrics.pairwise import cosine_similarity query = [['Represent the Wikipedia question for retrieving supporting documents: ','where is the food stored in a yam plant']] corpus = [['Represent the Wikipedia document for retrieval: ','Capitalism has been dominant in the Western world since the end of feudalism, but most feel[who?] that the term "mixed economies" more precisely describes most contemporary economies, due to their containing both private-owned and state-owned enterprises. In capitalism, prices determine the demand-supply scale. For example, higher demand for certain goods and services lead to higher prices and lower demand for certain goods lead to lower prices.'], ['Represent the Wikipedia document for retrieval: ',"The disparate impact theory is especially controversial under the Fair Housing Act because the Act regulates many activities relating to housing, insurance, and mortgage loans—and some scholars have argued that the theory's use under the Fair Housing Act, combined with extensions of the Community Reinvestment Act, contributed to rise of sub-prime lending and the crash of the U.S. housing market and ensuing global economic recession"], ['Represent the Wikipedia document for retrieval: ','Disparate impact in United States labor law refers to practices in employment, housing, and other areas that adversely affect one group of people of a protected characteristic more than another, even though rules applied by employers or landlords are formally neutral. Although the protected classes vary by statute, most federal civil rights laws protect based on race, color, religion, national origin, and sex as protected traits, and some laws include disability status and other traits as well.']] query_embeddings = model.encode(query) corpus_embeddings = model.encode(corpus) similarities = cosine_similarity(query_embeddings,corpus_embeddings) retrieved_doc_id = np.argmax(similarities) print(retrieved_doc_id) ``` ## Clustering Use **customized embeddings** for clustering texts in groups. ```python import sklearn.cluster sentences = [['Represent the Medicine sentence for clustering: ','Dynamical Scalar Degree of Freedom in Horava-Lifshitz Gravity'], ['Represent the Medicine sentence for clustering: ','Comparison of Atmospheric Neutrino Flux Calculations at Low Energies'], ['Represent the Medicine sentence for clustering: ','Fermion Bags in the Massive Gross-Neveu Model'], ['Represent the Medicine sentence for clustering: ',"QCD corrections to Associated t-tbar-H production at the Tevatron"], ['Represent the Medicine sentence for clustering: ','A New Analysis of the R Measurements: Resonance Parameters of the Higher, Vector States of Charmonium']] embeddings = model.encode(sentences) clustering_model = sklearn.cluster.MiniBatchKMeans(n_clusters=2) clustering_model.fit(embeddings) cluster_assignment = clustering_model.labels_ print(cluster_assignment) ```
dbmdz/bert-base-german-cased
dbmdz
"2023-09-06T22:19:38Z"
79,318
13
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "fill-mask", "de", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: de license: mit --- # 🤗 + 📚 dbmdz German BERT models In this repository the MDZ Digital Library team (dbmdz) at the Bavarian State Library open sources another German BERT models 🎉 # German BERT ## Stats In addition to the recently released [German BERT](https://deepset.ai/german-bert) model by [deepset](https://deepset.ai/) we provide another German-language model. The source data for the model consists of a recent Wikipedia dump, EU Bookshop corpus, Open Subtitles, CommonCrawl, ParaCrawl and News Crawl. This results in a dataset with a size of 16GB and 2,350,234,427 tokens. For sentence splitting, we use [spacy](https://spacy.io/). Our preprocessing steps (sentence piece model for vocab generation) follow those used for training [SciBERT](https://github.com/allenai/scibert). The model is trained with an initial sequence length of 512 subwords and was performed for 1.5M steps. This release includes both cased and uncased models. ## Model weights Currently only PyTorch-[Transformers](https://github.com/huggingface/transformers) compatible weights are available. If you need access to TensorFlow checkpoints, please raise an issue! | Model | Downloads | -------------------------------- | --------------------------------------------------------------------------------------------------------------- | `bert-base-german-dbmdz-cased` | [`config.json`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-cased-config.json) • [`pytorch_model.bin`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-cased-pytorch_model.bin) • [`vocab.txt`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-cased-vocab.txt) | `bert-base-german-dbmdz-uncased` | [`config.json`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-uncased-config.json) • [`pytorch_model.bin`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-uncased-pytorch_model.bin) • [`vocab.txt`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-uncased-vocab.txt) ## Usage With Transformers >= 2.3 our German BERT models can be loaded like: ```python from transformers import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("dbmdz/bert-base-german-cased") model = AutoModel.from_pretrained("dbmdz/bert-base-german-cased") ``` ## Results For results on downstream tasks like NER or PoS tagging, please refer to [this repository](https://github.com/stefan-it/fine-tuned-berts-seq). # Huggingface model hub All models are available on the [Huggingface model hub](https://huggingface.co/dbmdz). # Contact (Bugs, Feedback, Contribution and more) For questions about our BERT models just open an issue [here](https://github.com/dbmdz/berts/issues/new) 🤗 # Acknowledgments Research supported with Cloud TPUs from Google's TensorFlow Research Cloud (TFRC). Thanks for providing access to the TFRC ❤️ Thanks to the generous support from the [Hugging Face](https://huggingface.co/) team, it is possible to download both cased and uncased models from their S3 storage 🤗
Kevinger/Hub-Report-1705947362
Kevinger
"2024-01-22T18:50:24Z"
79,099
0
transformers
[ "transformers", "tensorboard", "safetensors", "mpnet", "text-classification", "generated_from_trainer", "base_model:sentence-transformers/all-mpnet-base-v2", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-classification
"2024-01-22T18:16:06Z"
--- license: apache-2.0 base_model: sentence-transformers/all-mpnet-base-v2 tags: - generated_from_trainer metrics: - f1 - accuracy model-index: - name: Hub-Report-1705947362 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. --> # Hub-Report-1705947362 This model is a fine-tuned version of [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) on the None dataset. It achieves the following results on the evaluation set: - Loss: 0.1734 - F1: 0.7779 - Roc Auc: 0.8689 - Accuracy: 0.7658 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 8 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 13 ### Training results | Training Loss | Epoch | Step | Validation Loss | F1 | Roc Auc | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:------:|:-------:|:--------:| | No log | 1.0 | 297 | 0.2953 | 0.0397 | 0.5100 | 0.0203 | | 0.3539 | 2.0 | 594 | 0.2267 | 0.5719 | 0.7107 | 0.4329 | | 0.3539 | 3.0 | 891 | 0.1932 | 0.7410 | 0.8216 | 0.6608 | | 0.2053 | 4.0 | 1188 | 0.1851 | 0.7363 | 0.8289 | 0.6823 | | 0.2053 | 5.0 | 1485 | 0.1759 | 0.7659 | 0.8560 | 0.7392 | | 0.1532 | 6.0 | 1782 | 0.1725 | 0.7756 | 0.8670 | 0.7633 | | 0.1178 | 7.0 | 2079 | 0.1734 | 0.7779 | 0.8689 | 0.7658 | | 0.1178 | 8.0 | 2376 | 0.1802 | 0.7587 | 0.8580 | 0.7481 | | 0.0964 | 9.0 | 2673 | 0.1828 | 0.7669 | 0.8649 | 0.7595 | | 0.0964 | 10.0 | 2970 | 0.1835 | 0.7625 | 0.8617 | 0.7532 | | 0.083 | 11.0 | 3267 | 0.1849 | 0.7681 | 0.8646 | 0.7595 | | 0.0723 | 12.0 | 3564 | 0.1886 | 0.7604 | 0.8603 | 0.7519 | | 0.0723 | 13.0 | 3861 | 0.1901 | 0.7606 | 0.8599 | 0.7494 | ### Framework versions - Transformers 4.35.2 - Pytorch 2.1.0+cu121 - Datasets 2.16.1 - Tokenizers 0.15.0
wajidlinux99/gibberish-text-detector
wajidlinux99
"2023-01-16T12:15:52Z"
79,001
3
transformers
[ "transformers", "pytorch", "distilbert", "text-classification", "text", "nlp", "correction", "en", "autotrain_compatible", "endpoints_compatible", "region:us" ]
text-classification
"2023-01-16T11:46:09Z"
--- language: - en pipeline_tag: text-classification tags: - text - nlp - correction --- # Model Trained Using AutoNLP - Problem type: Multi-class Classification - Model ID: 492513457 - CO2 Emissions (in grams): 5.527544460835904 ## Validation Metrics - Loss: 0.07609463483095169 - Accuracy: 0.9735624586913417 - Macro F1: 0.9736173135739408 - Micro F1: 0.9735624586913417 - Weighted F1: 0.9736173135739408 - Macro Precision: 0.9737771415197378 - Micro Precision: 0.9735624586913417 - Weighted Precision: 0.9737771415197378 - Macro Recall: 0.9735624586913417 - Micro Recall: 0.9735624586913417 - Weighted Recall: 0.9735624586913417 ## Usage You can use CURL to access this model: ``` $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Is this text really worth it?"}' https://api-inference.huggingface.co/models/wajidlinux99/gibberish-text-detector ``` Or Python API: ``` from transformers import AutoModelForSequenceClassification, AutoTokenizer model = AutoModelForSequenceClassification.from_pretrained("wajidlinux99/gibberish-text-detector", use_auth_token=True) tokenizer = AutoTokenizer.from_pretrained("wajidlinux99/gibberish-text-detector", use_auth_token=True) inputs = tokenizer("Is this text really worth it?", return_tensors="pt") outputs = model(**inputs) ``` # Original Repository ***madhurjindal/autonlp-Gibberish-Detector-492513457
climatebert/distilroberta-base-climate-detector
climatebert
"2023-06-20T18:52:03Z"
78,627
9
transformers
[ "transformers", "pytorch", "safetensors", "roberta", "text-classification", "en", "dataset:climatebert/climate_detection", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- license: apache-2.0 datasets: - climatebert/climate_detection language: - en metrics: - accuracy --- # Model Card for distilroberta-base-climate-detector ## Model Description This is the fine-tuned ClimateBERT language model with a classification head for detecting climate-related paragraphs. Using the [climatebert/distilroberta-base-climate-f](https://huggingface.co/climatebert/distilroberta-base-climate-f) language model as starting point, the distilroberta-base-climate-detector model is fine-tuned on our [climatebert/climate_detection](https://huggingface.co/climatebert/climate_detection) dataset. *Note: This model is trained on paragraphs. It may not perform well on sentences.* ## Citation Information ```bibtex @techreport{bingler2023cheaptalk, title={How Cheap Talk in Climate Disclosures Relates to Climate Initiatives, Corporate Emissions, and Reputation Risk}, author={Bingler, Julia and Kraus, Mathias and Leippold, Markus and Webersinke, Nicolas}, type={Working paper}, institution={Available at SSRN 3998435}, year={2023} } ``` ## How to Get Started With the Model You can use the model with a pipeline for text classification: ```python from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline from transformers.pipelines.pt_utils import KeyDataset import datasets from tqdm.auto import tqdm dataset_name = "climatebert/climate_detection" model_name = "climatebert/distilroberta-base-climate-detector" # If you want to use your own data, simply load them as 🤗 Datasets dataset, see https://huggingface.co/docs/datasets/loading dataset = datasets.load_dataset(dataset_name, split="test") model = AutoModelForSequenceClassification.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name, max_len=512) pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0) # See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline for out in tqdm(pipe(KeyDataset(dataset, "text"), padding=True, truncation=True)): print(out) ```
prompthero/openjourney-v4
prompthero
"2023-05-15T22:41:59Z"
78,598
1,196
diffusers
[ "diffusers", "safetensors", "stable-diffusion", "text-to-image", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2022-12-11T17:37:55Z"
--- license: creativeml-openrail-m tags: - stable-diffusion - text-to-image pinned: true --- # <u>Openjourney v4</u> ## Trained on +124k Midjourney v4 images, by [PromptHero](https://prompthero.com/?utm_source=huggingface&utm_medium=referral) Trained on Stable Diffusion v1.5 using +124000 images, 12400 steps, 4 epochs +32 training hours. 💡 [Openjourney-v4 prompts](https://prompthero.com/openjourney-prompts?version=4) Pss... "mdjrny-v4 style" is not necessary anymore (yay!) 🎓 **Want to learn how to train Openjourney? 👉🏼 __[Join our course](https://prompthero.com/academy/dreambooth-stable-diffusion-train-fine-tune-course?utm_source=huggingface&utm_medium=referral)__ 🔥** <img src="https://s3.us-east-1.amazonaws.com/prompthero-newsletter/Group-66.png" alt="openjourney-v4" width="50%"> # Openjourney Links - [Lora version](https://huggingface.co/prompthero/openjourney-lora) - [Openjourney Dreambooth](https://huggingface.co/prompthero/openjourney)
facebook/wav2vec2-xlsr-53-espeak-cv-ft
facebook
"2021-12-10T17:18:39Z"
78,187
20
transformers
[ "transformers", "pytorch", "wav2vec2", "automatic-speech-recognition", "speech", "audio", "phoneme-recognition", "dataset:common_voice", "arxiv:2109.11680", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-03-02T23:29:05Z"
--- language: multi-lingual datasets: - common_voice tags: - speech - audio - automatic-speech-recognition - phoneme-recognition widget: - example_title: Librispeech sample 1 src: https://cdn-media.huggingface.co/speech_samples/sample1.flac - example_title: Librispeech sample 2 src: https://cdn-media.huggingface.co/speech_samples/sample2.flac license: apache-2.0 --- # Wav2Vec2-Large-XLSR-53 finetuned on multi-lingual Common Voice This checkpoint leverages the pretrained checkpoint [wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) and is fine-tuned on [CommonVoice](https://huggingface.co/datasets/common_voice) to recognize phonetic labels in multiple languages. When using the model make sure that your speech input is sampled at 16kHz. Note that the model outputs a string of phonetic labels. A dictionary mapping phonetic labels to words has to be used to map the phonetic output labels to output words. [Paper: Simple and Effective Zero-shot Cross-lingual Phoneme Recognition](https://arxiv.org/abs/2109.11680) Authors: Qiantong Xu, Alexei Baevski, Michael Auli **Abstract** Recent progress in self-training, self-supervised pretraining and unsupervised learning enabled well performing speech recognition systems without any labeled data. However, in many cases there is labeled data available for related languages which is not utilized by these methods. This paper extends previous work on zero-shot cross-lingual transfer learning by fine-tuning a multilingually pretrained wav2vec 2.0 model to transcribe unseen languages. This is done by mapping phonemes of the training languages to the target language using articulatory features. Experiments show that this simple method significantly outperforms prior work which introduced task-specific architectures and used only part of a monolingually pretrained model. The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20. # Usage To transcribe audio files the model can be used as a standalone acoustic model as follows: ```python from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC from datasets import load_dataset import torch # load model and processor processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft") model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft") # load dummy dataset and read soundfiles ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation") # tokenize input_values = processor(ds[0]["audio"]["array"], return_tensors="pt").input_values # retrieve logits with torch.no_grad(): logits = model(input_values).logits # take argmax and decode predicted_ids = torch.argmax(logits, dim=-1) transcription = processor.batch_decode(predicted_ids) # => should give ['m ɪ s t ɚ k w ɪ l t ɚ ɪ z ð ɪ ɐ p ɑː s əl l ʌ v ð ə m ɪ d əl k l æ s ɪ z æ n d w iː aʊ ɡ l æ d t ə w ɛ l k ə m h ɪ z ɡ ɑː s p ə'] ```
Falconsai/text_summarization
Falconsai
"2024-02-17T07:55:14Z"
77,962
111
transformers
[ "transformers", "pytorch", "coreml", "onnx", "safetensors", "t5", "text2text-generation", "summarization", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
summarization
"2023-10-21T00:53:53Z"
--- license: apache-2.0 language: - en pipeline_tag: summarization widget: - text: >- Hugging Face: Revolutionizing Natural Language Processing Introduction In the rapidly evolving field of Natural Language Processing (NLP), Hugging Face has emerged as a prominent and innovative force. This article will explore the story and significance of Hugging Face, a company that has made remarkable contributions to NLP and AI as a whole. From its inception to its role in democratizing AI, Hugging Face has left an indelible mark on the industry. The Birth of Hugging Face Hugging Face was founded in 2016 by Clément Delangue, Julien Chaumond, and Thomas Wolf. The name Hugging Face was chosen to reflect the company's mission of making AI models more accessible and friendly to humans, much like a comforting hug. Initially, they began as a chatbot company but later shifted their focus to NLP, driven by their belief in the transformative potential of this technology. Transformative Innovations Hugging Face is best known for its open-source contributions, particularly the Transformers library. This library has become the de facto standard for NLP and enables researchers, developers, and organizations to easily access and utilize state-of-the-art pre-trained language models, such as BERT, GPT-3, and more. These models have countless applications, from chatbots and virtual assistants to language translation and sentiment analysis. example_title: Summarization Example 1 --- # Model Card: Fine-Tuned T5 Small for Text Summarization ## Model Description The **Fine-Tuned T5 Small** is a variant of the T5 transformer model, designed for the task of text summarization. It is adapted and fine-tuned to generate concise and coherent summaries of input text. The model, named "t5-small," is pre-trained on a diverse corpus of text data, enabling it to capture essential information and generate meaningful summaries. Fine-tuning is conducted with careful attention to hyperparameter settings, including batch size and learning rate, to ensure optimal performance for text summarization. During the fine-tuning process, a batch size of 8 is chosen for efficient computation and learning. Additionally, a learning rate of 2e-5 is selected to balance convergence speed and model optimization. This approach guarantees not only rapid learning but also continuous refinement during training. The fine-tuning dataset consists of a variety of documents and their corresponding human-generated summaries. This diverse dataset allows the model to learn the art of creating summaries that capture the most important information while maintaining coherence and fluency. The goal of this meticulous training process is to equip the model with the ability to generate high-quality text summaries, making it valuable for a wide range of applications involving document summarization and content condensation. ## Intended Uses & Limitations ### Intended Uses - **Text Summarization**: The primary intended use of this model is to generate concise and coherent text summaries. It is well-suited for applications that involve summarizing lengthy documents, news articles, and textual content. ### How to Use To use this model for text summarization, you can follow these steps: ```python from transformers import pipeline summarizer = pipeline("summarization", model="Falconsai/text_summarization") ARTICLE = """ Hugging Face: Revolutionizing Natural Language Processing Introduction In the rapidly evolving field of Natural Language Processing (NLP), Hugging Face has emerged as a prominent and innovative force. This article will explore the story and significance of Hugging Face, a company that has made remarkable contributions to NLP and AI as a whole. From its inception to its role in democratizing AI, Hugging Face has left an indelible mark on the industry. The Birth of Hugging Face Hugging Face was founded in 2016 by Clément Delangue, Julien Chaumond, and Thomas Wolf. The name "Hugging Face" was chosen to reflect the company's mission of making AI models more accessible and friendly to humans, much like a comforting hug. Initially, they began as a chatbot company but later shifted their focus to NLP, driven by their belief in the transformative potential of this technology. Transformative Innovations Hugging Face is best known for its open-source contributions, particularly the "Transformers" library. This library has become the de facto standard for NLP and enables researchers, developers, and organizations to easily access and utilize state-of-the-art pre-trained language models, such as BERT, GPT-3, and more. These models have countless applications, from chatbots and virtual assistants to language translation and sentiment analysis. Key Contributions: 1. **Transformers Library:** The Transformers library provides a unified interface for more than 50 pre-trained models, simplifying the development of NLP applications. It allows users to fine-tune these models for specific tasks, making it accessible to a wider audience. 2. **Model Hub:** Hugging Face's Model Hub is a treasure trove of pre-trained models, making it simple for anyone to access, experiment with, and fine-tune models. Researchers and developers around the world can collaborate and share their models through this platform. 3. **Hugging Face Transformers Community:** Hugging Face has fostered a vibrant online community where developers, researchers, and AI enthusiasts can share their knowledge, code, and insights. This collaborative spirit has accelerated the growth of NLP. Democratizing AI Hugging Face's most significant impact has been the democratization of AI and NLP. Their commitment to open-source development has made powerful AI models accessible to individuals, startups, and established organizations. This approach contrasts with the traditional proprietary AI model market, which often limits access to those with substantial resources. By providing open-source models and tools, Hugging Face has empowered a diverse array of users to innovate and create their own NLP applications. This shift has fostered inclusivity, allowing a broader range of voices to contribute to AI research and development. Industry Adoption The success and impact of Hugging Face are evident in its widespread adoption. Numerous companies and institutions, from startups to tech giants, leverage Hugging Face's technology for their AI applications. This includes industries as varied as healthcare, finance, and entertainment, showcasing the versatility of NLP and Hugging Face's contributions. Future Directions Hugging Face's journey is far from over. As of my last knowledge update in September 2021, the company was actively pursuing research into ethical AI, bias reduction in models, and more. Given their track record of innovation and commitment to the AI community, it is likely that they will continue to lead in ethical AI development and promote responsible use of NLP technologies. Conclusion Hugging Face's story is one of transformation, collaboration, and empowerment. Their open-source contributions have reshaped the NLP landscape and democratized access to AI. As they continue to push the boundaries of AI research, we can expect Hugging Face to remain at the forefront of innovation, contributing to a more inclusive and ethical AI future. Their journey reminds us that the power of open-source collaboration can lead to groundbreaking advancements in technology and bring AI within the reach of many. """ print(summarizer(ARTICLE, max_length=1000, min_length=30, do_sample=False)) >>> [{'summary_text': 'Hugging Face has emerged as a prominent and innovative force in NLP . From its inception to its role in democratizing AI, the company has left an indelible mark on the industry . The name "Hugging Face" was chosen to reflect the company\'s mission of making AI models more accessible and friendly to humans .'}] ``` Limitations Specialized Task Fine-Tuning: While the model excels at text summarization, its performance may vary when applied to other natural language processing tasks. Users interested in employing this model for different tasks should explore fine-tuned versions available in the model hub for optimal results. Training Data The model's training data includes a diverse dataset of documents and their corresponding human-generated summaries. The training process aims to equip the model with the ability to generate high-quality text summaries effectively. Training Stats - Evaluation Loss: 0.012345678901234567 - Evaluation Rouge Score: 0.95 (F1) - Evaluation Runtime: 2.3456 - Evaluation Samples per Second: 1234.56 - Evaluation Steps per Second: 45.678 Responsible Usage It is essential to use this model responsibly and ethically, adhering to content guidelines and applicable regulations when implementing it in real-world applications, particularly those involving potentially sensitive content. References Hugging Face Model Hub T5 Paper Disclaimer: The model's performance may be influenced by the quality and representativeness of the data it was fine-tuned on. Users are encouraged to assess the model's suitability for their specific applications and datasets.
Qwen/Qwen1.5-7B-Chat
Qwen
"2024-04-05T10:54:00Z"
77,853
107
transformers
[ "transformers", "safetensors", "qwen2", "text-generation", "chat", "conversational", "en", "license:other", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2024-01-30T17:20:37Z"
--- license: other license_name: tongyi-qianwen license_link: >- https://huggingface.co/Qwen/Qwen1.5-7B-Chat/blob/main/LICENSE language: - en pipeline_tag: text-generation tags: - chat --- # Qwen1.5-7B-Chat ## Introduction Qwen1.5 is the beta version of Qwen2, a transformer-based decoder-only language model pretrained on a large amount of data. In comparison with the previous released Qwen, the improvements include: * 8 model sizes, including 0.5B, 1.8B, 4B, 7B, 14B, 32B and 72B dense models, and an MoE model of 14B with 2.7B activated; * Significant performance improvement in human preference for chat models; * Multilingual support of both base and chat models; * Stable support of 32K context length for models of all sizes * No need of `trust_remote_code`. For more details, please refer to our [blog post](https://qwenlm.github.io/blog/qwen1.5/) and [GitHub repo](https://github.com/QwenLM/Qwen1.5). <br> ## Model Details Qwen1.5 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, mixture of sliding window attention and full attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes. For the beta version, temporarily we did not include GQA (except for 32B) and the mixture of SWA and full attention. ## Training details We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization. ## Requirements The code of Qwen1.5 has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`, or you might encounter the following error: ``` KeyError: 'qwen2' ``` ## Quickstart Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents. ```python from transformers import AutoModelForCausalLM, AutoTokenizer device = "cuda" # the device to load the model onto model = AutoModelForCausalLM.from_pretrained( "Qwen/Qwen1.5-7B-Chat", torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen1.5-7B-Chat") prompt = "Give me a short introduction to large language model." messages = [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) model_inputs = tokenizer([text], return_tensors="pt").to(device) generated_ids = model.generate( model_inputs.input_ids, max_new_tokens=512 ) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] ``` For quantized models, we advise you to use the GPTQ, AWQ, and GGUF correspondents, namely `Qwen1.5-7B-Chat-GPTQ-Int4`, `Qwen1.5-7B-Chat-GPTQ-Int8`, `Qwen1.5-7B-Chat-AWQ`, and `Qwen1.5-7B-Chat-GGUF`. ## Tips * If you encounter code switching or other bad cases, we advise you to use our provided hyper-parameters in `generation_config.json`. ## Citation If you find our work helpful, feel free to give us a cite. ``` @article{qwen, title={Qwen Technical Report}, author={Jinze Bai and Shuai Bai and Yunfei Chu and Zeyu Cui and Kai Dang and Xiaodong Deng and Yang Fan and Wenbin Ge and Yu Han and Fei Huang and Binyuan Hui and Luo Ji and Mei Li and Junyang Lin and Runji Lin and Dayiheng Liu and Gao Liu and Chengqiang Lu and Keming Lu and Jianxin Ma and Rui Men and Xingzhang Ren and Xuancheng Ren and Chuanqi Tan and Sinan Tan and Jianhong Tu and Peng Wang and Shijie Wang and Wei Wang and Shengguang Wu and Benfeng Xu and Jin Xu and An Yang and Hao Yang and Jian Yang and Shusheng Yang and Yang Yao and Bowen Yu and Hongyi Yuan and Zheng Yuan and Jianwei Zhang and Xingxuan Zhang and Yichang Zhang and Zhenru Zhang and Chang Zhou and Jingren Zhou and Xiaohuan Zhou and Tianhang Zhu}, journal={arXiv preprint arXiv:2309.16609}, year={2023} } ```
google/canine-c
google
"2022-08-08T13:44:46Z"
77,779
13
transformers
[ "transformers", "pytorch", "canine", "feature-extraction", "multilingual", "af", "sq", "ar", "an", "hy", "ast", "az", "ba", "eu", "bar", "be", "bn", "inc", "bs", "br", "bg", "my", "ca", "ceb", "ce", "zh", "cv", "hr", "cs", "da", "nl", "en", "et", "fi", "fr", "gl", "ka", "de", "el", "gu", "ht", "he", "hi", "hu", "is", "io", "id", "ga", "it", "ja", "jv", "kn", "kk", "ky", "ko", "la", "lv", "lt", "roa", "nds", "lm", "mk", "mg", "ms", "ml", "mr", "mn", "min", "ne", "new", "nb", "nn", "oc", "fa", "pms", "pl", "pt", "pa", "ro", "ru", "sco", "sr", "scn", "sk", "sl", "aze", "es", "su", "sw", "sv", "tl", "tg", "th", "ta", "tt", "te", "tr", "uk", "ud", "uz", "vi", "vo", "war", "cy", "fry", "pnb", "yo", "dataset:bookcorpus", "dataset:wikipedia", "arxiv:2103.06874", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: - multilingual - af - sq - ar - an - hy - ast - az - ba - eu - bar - be - bn - inc - bs - br - bg - my - ca - ceb - ce - zh - cv - hr - cs - da - nl - en - et - fi - fr - gl - ka - de - el - gu - ht - he - hi - hu - is - io - id - ga - it - ja - jv - kn - kk - ky - ko - la - lv - lt - roa - nds - lm - mk - mg - ms - ml - mr - mn - min - ne - new - nb - nn - oc - fa - pms - pl - pt - pa - ro - ru - sco - sr - hr - scn - sk - sl - aze - es - su - sw - sv - tl - tg - th - ta - tt - te - tr - uk - ud - uz - vi - vo - war - cy - fry - pnb - yo license: apache-2.0 datasets: - bookcorpus - wikipedia --- # CANINE-c (CANINE pre-trained with autoregressive character loss) Pretrained CANINE model on 104 languages using a masked language modeling (MLM) objective. It was introduced in the paper [CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representation](https://arxiv.org/abs/2103.06874) and first released in [this repository](https://github.com/google-research/language/tree/master/language/canine). What's special about CANINE is that it doesn't require an explicit tokenizer (such as WordPiece or SentencePiece) as other models like BERT and RoBERTa. Instead, it directly operates at a character level: each character is turned into its [Unicode code point](https://en.wikipedia.org/wiki/Code_point#:~:text=For%20Unicode%2C%20the%20particular%20sequence,forming%20a%20self%2Dsynchronizing%20code.). This means that input processing is trivial and can typically be accomplished as: ``` input_ids = [ord(char) for char in text] ``` The ord() function is part of Python, and turns each character into its Unicode code point. Disclaimer: The team releasing CANINE did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description CANINE is a transformers model pretrained on a large corpus of multilingual data in a self-supervised fashion, similar to BERT. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was pretrained with two objectives: * Masked language modeling (MLM): one randomly masks part of the inputs, which the model needs to predict. This model (CANINE-c) is trained with an autoregressive character loss. One masks several character spans within each sequence, which the model then autoregressively predicts. * Next sentence prediction (NSP): the model concatenates two sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not. This way, the model learns an inner representation of multiple languages that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the CANINE model as inputs. ## Intended uses & limitations You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?filter=canine) to look for fine-tuned versions on a task that interests you. Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at models like GPT2. ### How to use Here is how to use this model: ```python from transformers import CanineTokenizer, CanineModel model = CanineModel.from_pretrained('google/canine-c') tokenizer = CanineTokenizer.from_pretrained('google/canine-c') inputs = ["Life is like a box of chocolates.", "You never know what you gonna get."] encoding = tokenizer(inputs, padding="longest", truncation=True, return_tensors="pt") outputs = model(**encoding) # forward pass pooled_output = outputs.pooler_output sequence_output = outputs.last_hidden_state ``` ## Training data The CANINE model was pretrained on on the multilingual Wikipedia data of [mBERT](https://github.com/google-research/bert/blob/master/multilingual.md), which includes 104 languages. ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2103-06874, author = {Jonathan H. Clark and Dan Garrette and Iulia Turc and John Wieting}, title = {{CANINE:} Pre-training an Efficient Tokenization-Free Encoder for Language Representation}, journal = {CoRR}, volume = {abs/2103.06874}, year = {2021}, url = {https://arxiv.org/abs/2103.06874}, archivePrefix = {arXiv}, eprint = {2103.06874}, timestamp = {Tue, 16 Mar 2021 11:26:59 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-2103-06874.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
persiannlp/mt5-small-parsinlu-opus-translation_fa_en
persiannlp
"2021-09-23T16:20:36Z"
77,667
1
transformers
[ "transformers", "pytorch", "mt5", "text2text-generation", "machine-translation", "persian", "farsi", "fa", "multilingual", "dataset:parsinlu", "license:cc-by-nc-sa-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2022-03-02T23:29:05Z"
--- language: - fa - multilingual thumbnail: https://upload.wikimedia.org/wikipedia/commons/a/a2/Farsi.svg tags: - machine-translation - mt5 - persian - farsi license: cc-by-nc-sa-4.0 datasets: - parsinlu metrics: - sacrebleu --- # Machine Translation (ترجمه‌ی ماشینی) This is an mT5-based model for machine translation (Persian -> English). Here is an example of how you can run this model: ```python from transformers import MT5ForConditionalGeneration, MT5Tokenizer model_size = "small" model_name = f"persiannlp/mt5-{model_size}-parsinlu-opus-translation_fa_en" tokenizer = MT5Tokenizer.from_pretrained(model_name) model = MT5ForConditionalGeneration.from_pretrained(model_name) def run_model(input_string, **generator_args): input_ids = tokenizer.encode(input_string, return_tensors="pt") res = model.generate(input_ids, **generator_args) output = tokenizer.batch_decode(res, skip_special_tokens=True) print(output) return output run_model("ستایش خدای را که پروردگار جهانیان است.") run_model("در هاید پارک کرنر بر گلدانی ایستاده موعظه می‌کند؛") run_model("وی از تمامی بلاگرها، سازمان‌ها و افرادی که از وی پشتیبانی کرده‌اند، تشکر کرد.") run_model("مشابه سال ۲۰۰۱، تولید آمونیاک بی آب در ایالات متحده در سال ۲۰۰۰ تقریباً ۱۷،۴۰۰،۰۰۰ تن (معادل بدون آب) با مصرف ظاهری ۲۲،۰۰۰،۰۰۰ تن و حدود ۴۶۰۰۰۰۰ با واردات خالص مواجه شد. ") run_model("می خواهم دکترای علوم کامپیوتر راجع به شبکه های اجتماعی را دنبال کنم، چالش حل نشده در شبکه های اجتماعی چیست؟") ``` For more details, visit this page: https://github.com/persiannlp/parsinlu/
nomic-ai/nomic-embed-text-v1
nomic-ai
"2024-04-02T19:00:56Z"
77,422
346
sentence-transformers
[ "sentence-transformers", "pytorch", "onnx", "safetensors", "nomic_bert", "feature-extraction", "sentence-similarity", "mteb", "transformers", "transformers.js", "custom_code", "en", "arxiv:2402.01613", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2024-01-31T20:26:50Z"
--- library_name: sentence-transformers pipeline_tag: sentence-similarity tags: - feature-extraction - sentence-similarity - mteb - transformers - transformers.js model-index: - name: epoch_0_model results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 76.8507462686567 - type: ap value: 40.592189159090495 - type: f1 value: 71.01634655512476 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 91.51892500000001 - type: ap value: 88.50346762975335 - type: f1 value: 91.50342077459624 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 47.364 - type: f1 value: 46.72708080922794 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 25.178 - type: map_at_10 value: 40.244 - type: map_at_100 value: 41.321999999999996 - type: map_at_1000 value: 41.331 - type: map_at_3 value: 35.016999999999996 - type: map_at_5 value: 37.99 - type: mrr_at_1 value: 25.605 - type: mrr_at_10 value: 40.422000000000004 - type: mrr_at_100 value: 41.507 - type: mrr_at_1000 value: 41.516 - type: mrr_at_3 value: 35.23 - type: mrr_at_5 value: 38.15 - type: ndcg_at_1 value: 25.178 - type: ndcg_at_10 value: 49.258 - type: ndcg_at_100 value: 53.776 - type: ndcg_at_1000 value: 53.995000000000005 - type: ndcg_at_3 value: 38.429 - type: ndcg_at_5 value: 43.803 - type: precision_at_1 value: 25.178 - type: precision_at_10 value: 7.831 - type: precision_at_100 value: 0.979 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 16.121 - type: precision_at_5 value: 12.29 - type: recall_at_1 value: 25.178 - type: recall_at_10 value: 78.307 - type: recall_at_100 value: 97.866 - type: recall_at_1000 value: 99.57300000000001 - type: recall_at_3 value: 48.364000000000004 - type: recall_at_5 value: 61.451 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 45.93034494751465 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 36.64579480054327 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 60.601310529222054 - type: mrr value: 75.04484896451656 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 88.57797718095814 - type: cos_sim_spearman value: 86.47064499110101 - type: euclidean_pearson value: 87.4559602783142 - type: euclidean_spearman value: 86.47064499110101 - type: manhattan_pearson value: 87.7232764230245 - type: manhattan_spearman value: 86.91222131777742 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 84.5422077922078 - type: f1 value: 84.47657456950589 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 38.48953561974464 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 32.75995857510105 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 30.008000000000003 - type: map_at_10 value: 39.51 - type: map_at_100 value: 40.841 - type: map_at_1000 value: 40.973 - type: map_at_3 value: 36.248999999999995 - type: map_at_5 value: 38.096999999999994 - type: mrr_at_1 value: 36.481 - type: mrr_at_10 value: 44.818000000000005 - type: mrr_at_100 value: 45.64 - type: mrr_at_1000 value: 45.687 - type: mrr_at_3 value: 42.036 - type: mrr_at_5 value: 43.782 - type: ndcg_at_1 value: 36.481 - type: ndcg_at_10 value: 45.152 - type: ndcg_at_100 value: 50.449 - type: ndcg_at_1000 value: 52.76499999999999 - type: ndcg_at_3 value: 40.161 - type: ndcg_at_5 value: 42.577999999999996 - type: precision_at_1 value: 36.481 - type: precision_at_10 value: 8.369 - type: precision_at_100 value: 1.373 - type: precision_at_1000 value: 0.186 - type: precision_at_3 value: 18.693 - type: precision_at_5 value: 13.533999999999999 - type: recall_at_1 value: 30.008000000000003 - type: recall_at_10 value: 56.108999999999995 - type: recall_at_100 value: 78.55499999999999 - type: recall_at_1000 value: 93.659 - type: recall_at_3 value: 41.754999999999995 - type: recall_at_5 value: 48.296 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 30.262 - type: map_at_10 value: 40.139 - type: map_at_100 value: 41.394 - type: map_at_1000 value: 41.526 - type: map_at_3 value: 37.155 - type: map_at_5 value: 38.785 - type: mrr_at_1 value: 38.153 - type: mrr_at_10 value: 46.369 - type: mrr_at_100 value: 47.072 - type: mrr_at_1000 value: 47.111999999999995 - type: mrr_at_3 value: 44.268 - type: mrr_at_5 value: 45.389 - type: ndcg_at_1 value: 38.153 - type: ndcg_at_10 value: 45.925 - type: ndcg_at_100 value: 50.394000000000005 - type: ndcg_at_1000 value: 52.37500000000001 - type: ndcg_at_3 value: 41.754000000000005 - type: ndcg_at_5 value: 43.574 - type: precision_at_1 value: 38.153 - type: precision_at_10 value: 8.796 - type: precision_at_100 value: 1.432 - type: precision_at_1000 value: 0.189 - type: precision_at_3 value: 20.318 - type: precision_at_5 value: 14.395 - type: recall_at_1 value: 30.262 - type: recall_at_10 value: 55.72200000000001 - type: recall_at_100 value: 74.97500000000001 - type: recall_at_1000 value: 87.342 - type: recall_at_3 value: 43.129 - type: recall_at_5 value: 48.336 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 39.951 - type: map_at_10 value: 51.248000000000005 - type: map_at_100 value: 52.188 - type: map_at_1000 value: 52.247 - type: map_at_3 value: 48.211 - type: map_at_5 value: 49.797000000000004 - type: mrr_at_1 value: 45.329 - type: mrr_at_10 value: 54.749 - type: mrr_at_100 value: 55.367999999999995 - type: mrr_at_1000 value: 55.400000000000006 - type: mrr_at_3 value: 52.382 - type: mrr_at_5 value: 53.649 - type: ndcg_at_1 value: 45.329 - type: ndcg_at_10 value: 56.847 - type: ndcg_at_100 value: 60.738 - type: ndcg_at_1000 value: 61.976 - type: ndcg_at_3 value: 51.59 - type: ndcg_at_5 value: 53.915 - type: precision_at_1 value: 45.329 - type: precision_at_10 value: 8.959 - type: precision_at_100 value: 1.187 - type: precision_at_1000 value: 0.134 - type: precision_at_3 value: 22.612 - type: precision_at_5 value: 15.273 - type: recall_at_1 value: 39.951 - type: recall_at_10 value: 70.053 - type: recall_at_100 value: 86.996 - type: recall_at_1000 value: 95.707 - type: recall_at_3 value: 56.032000000000004 - type: recall_at_5 value: 61.629999999999995 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.566 - type: map_at_10 value: 33.207 - type: map_at_100 value: 34.166000000000004 - type: map_at_1000 value: 34.245 - type: map_at_3 value: 30.94 - type: map_at_5 value: 32.01 - type: mrr_at_1 value: 27.345000000000002 - type: mrr_at_10 value: 35.193000000000005 - type: mrr_at_100 value: 35.965 - type: mrr_at_1000 value: 36.028999999999996 - type: mrr_at_3 value: 32.806000000000004 - type: mrr_at_5 value: 34.021 - type: ndcg_at_1 value: 27.345000000000002 - type: ndcg_at_10 value: 37.891999999999996 - type: ndcg_at_100 value: 42.664 - type: ndcg_at_1000 value: 44.757000000000005 - type: ndcg_at_3 value: 33.123000000000005 - type: ndcg_at_5 value: 35.035 - type: precision_at_1 value: 27.345000000000002 - type: precision_at_10 value: 5.763 - type: precision_at_100 value: 0.859 - type: precision_at_1000 value: 0.108 - type: precision_at_3 value: 13.71 - type: precision_at_5 value: 9.401 - type: recall_at_1 value: 25.566 - type: recall_at_10 value: 50.563 - type: recall_at_100 value: 72.86399999999999 - type: recall_at_1000 value: 88.68599999999999 - type: recall_at_3 value: 37.43 - type: recall_at_5 value: 41.894999999999996 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 16.663 - type: map_at_10 value: 23.552 - type: map_at_100 value: 24.538 - type: map_at_1000 value: 24.661 - type: map_at_3 value: 21.085 - type: map_at_5 value: 22.391 - type: mrr_at_1 value: 20.025000000000002 - type: mrr_at_10 value: 27.643 - type: mrr_at_100 value: 28.499999999999996 - type: mrr_at_1000 value: 28.582 - type: mrr_at_3 value: 25.083 - type: mrr_at_5 value: 26.544 - type: ndcg_at_1 value: 20.025000000000002 - type: ndcg_at_10 value: 28.272000000000002 - type: ndcg_at_100 value: 33.353 - type: ndcg_at_1000 value: 36.454 - type: ndcg_at_3 value: 23.579 - type: ndcg_at_5 value: 25.685000000000002 - type: precision_at_1 value: 20.025000000000002 - type: precision_at_10 value: 5.187 - type: precision_at_100 value: 0.897 - type: precision_at_1000 value: 0.13 - type: precision_at_3 value: 10.987 - type: precision_at_5 value: 8.06 - type: recall_at_1 value: 16.663 - type: recall_at_10 value: 38.808 - type: recall_at_100 value: 61.305 - type: recall_at_1000 value: 83.571 - type: recall_at_3 value: 25.907999999999998 - type: recall_at_5 value: 31.214 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.695999999999998 - type: map_at_10 value: 37.018 - type: map_at_100 value: 38.263000000000005 - type: map_at_1000 value: 38.371 - type: map_at_3 value: 34.226 - type: map_at_5 value: 35.809999999999995 - type: mrr_at_1 value: 32.916000000000004 - type: mrr_at_10 value: 42.067 - type: mrr_at_100 value: 42.925000000000004 - type: mrr_at_1000 value: 42.978 - type: mrr_at_3 value: 39.637 - type: mrr_at_5 value: 41.134 - type: ndcg_at_1 value: 32.916000000000004 - type: ndcg_at_10 value: 42.539 - type: ndcg_at_100 value: 47.873 - type: ndcg_at_1000 value: 50.08200000000001 - type: ndcg_at_3 value: 37.852999999999994 - type: ndcg_at_5 value: 40.201 - type: precision_at_1 value: 32.916000000000004 - type: precision_at_10 value: 7.5840000000000005 - type: precision_at_100 value: 1.199 - type: precision_at_1000 value: 0.155 - type: precision_at_3 value: 17.485 - type: precision_at_5 value: 12.512 - type: recall_at_1 value: 27.695999999999998 - type: recall_at_10 value: 53.638 - type: recall_at_100 value: 76.116 - type: recall_at_1000 value: 91.069 - type: recall_at_3 value: 41.13 - type: recall_at_5 value: 46.872 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.108 - type: map_at_10 value: 33.372 - type: map_at_100 value: 34.656 - type: map_at_1000 value: 34.768 - type: map_at_3 value: 30.830999999999996 - type: map_at_5 value: 32.204 - type: mrr_at_1 value: 29.110000000000003 - type: mrr_at_10 value: 37.979 - type: mrr_at_100 value: 38.933 - type: mrr_at_1000 value: 38.988 - type: mrr_at_3 value: 35.731 - type: mrr_at_5 value: 36.963 - type: ndcg_at_1 value: 29.110000000000003 - type: ndcg_at_10 value: 38.635000000000005 - type: ndcg_at_100 value: 44.324999999999996 - type: ndcg_at_1000 value: 46.747 - type: ndcg_at_3 value: 34.37 - type: ndcg_at_5 value: 36.228 - type: precision_at_1 value: 29.110000000000003 - type: precision_at_10 value: 6.963 - type: precision_at_100 value: 1.146 - type: precision_at_1000 value: 0.152 - type: precision_at_3 value: 16.400000000000002 - type: precision_at_5 value: 11.552999999999999 - type: recall_at_1 value: 24.108 - type: recall_at_10 value: 49.597 - type: recall_at_100 value: 73.88900000000001 - type: recall_at_1000 value: 90.62400000000001 - type: recall_at_3 value: 37.662 - type: recall_at_5 value: 42.565 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 25.00791666666667 - type: map_at_10 value: 33.287749999999996 - type: map_at_100 value: 34.41141666666667 - type: map_at_1000 value: 34.52583333333333 - type: map_at_3 value: 30.734416666666668 - type: map_at_5 value: 32.137166666666666 - type: mrr_at_1 value: 29.305666666666664 - type: mrr_at_10 value: 37.22966666666666 - type: mrr_at_100 value: 38.066583333333334 - type: mrr_at_1000 value: 38.12616666666667 - type: mrr_at_3 value: 34.92275 - type: mrr_at_5 value: 36.23333333333334 - type: ndcg_at_1 value: 29.305666666666664 - type: ndcg_at_10 value: 38.25533333333333 - type: ndcg_at_100 value: 43.25266666666666 - type: ndcg_at_1000 value: 45.63583333333334 - type: ndcg_at_3 value: 33.777166666666666 - type: ndcg_at_5 value: 35.85 - type: precision_at_1 value: 29.305666666666664 - type: precision_at_10 value: 6.596416666666667 - type: precision_at_100 value: 1.0784166666666668 - type: precision_at_1000 value: 0.14666666666666664 - type: precision_at_3 value: 15.31075 - type: precision_at_5 value: 10.830916666666667 - type: recall_at_1 value: 25.00791666666667 - type: recall_at_10 value: 49.10933333333333 - type: recall_at_100 value: 71.09216666666667 - type: recall_at_1000 value: 87.77725000000001 - type: recall_at_3 value: 36.660916666666665 - type: recall_at_5 value: 41.94149999999999 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 23.521 - type: map_at_10 value: 30.043 - type: map_at_100 value: 30.936000000000003 - type: map_at_1000 value: 31.022 - type: map_at_3 value: 27.926000000000002 - type: map_at_5 value: 29.076999999999998 - type: mrr_at_1 value: 26.227 - type: mrr_at_10 value: 32.822 - type: mrr_at_100 value: 33.61 - type: mrr_at_1000 value: 33.672000000000004 - type: mrr_at_3 value: 30.776999999999997 - type: mrr_at_5 value: 31.866 - type: ndcg_at_1 value: 26.227 - type: ndcg_at_10 value: 34.041 - type: ndcg_at_100 value: 38.394 - type: ndcg_at_1000 value: 40.732 - type: ndcg_at_3 value: 30.037999999999997 - type: ndcg_at_5 value: 31.845000000000002 - type: precision_at_1 value: 26.227 - type: precision_at_10 value: 5.244999999999999 - type: precision_at_100 value: 0.808 - type: precision_at_1000 value: 0.107 - type: precision_at_3 value: 12.679000000000002 - type: precision_at_5 value: 8.773 - type: recall_at_1 value: 23.521 - type: recall_at_10 value: 43.633 - type: recall_at_100 value: 63.126000000000005 - type: recall_at_1000 value: 80.765 - type: recall_at_3 value: 32.614 - type: recall_at_5 value: 37.15 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 16.236 - type: map_at_10 value: 22.898 - type: map_at_100 value: 23.878 - type: map_at_1000 value: 24.009 - type: map_at_3 value: 20.87 - type: map_at_5 value: 22.025 - type: mrr_at_1 value: 19.339000000000002 - type: mrr_at_10 value: 26.382 - type: mrr_at_100 value: 27.245 - type: mrr_at_1000 value: 27.33 - type: mrr_at_3 value: 24.386 - type: mrr_at_5 value: 25.496000000000002 - type: ndcg_at_1 value: 19.339000000000002 - type: ndcg_at_10 value: 27.139999999999997 - type: ndcg_at_100 value: 31.944 - type: ndcg_at_1000 value: 35.077999999999996 - type: ndcg_at_3 value: 23.424 - type: ndcg_at_5 value: 25.188 - type: precision_at_1 value: 19.339000000000002 - type: precision_at_10 value: 4.8309999999999995 - type: precision_at_100 value: 0.845 - type: precision_at_1000 value: 0.128 - type: precision_at_3 value: 10.874 - type: precision_at_5 value: 7.825 - type: recall_at_1 value: 16.236 - type: recall_at_10 value: 36.513 - type: recall_at_100 value: 57.999 - type: recall_at_1000 value: 80.512 - type: recall_at_3 value: 26.179999999999996 - type: recall_at_5 value: 30.712 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 24.11 - type: map_at_10 value: 31.566 - type: map_at_100 value: 32.647 - type: map_at_1000 value: 32.753 - type: map_at_3 value: 29.24 - type: map_at_5 value: 30.564999999999998 - type: mrr_at_1 value: 28.265 - type: mrr_at_10 value: 35.504000000000005 - type: mrr_at_100 value: 36.436 - type: mrr_at_1000 value: 36.503 - type: mrr_at_3 value: 33.349000000000004 - type: mrr_at_5 value: 34.622 - type: ndcg_at_1 value: 28.265 - type: ndcg_at_10 value: 36.192 - type: ndcg_at_100 value: 41.388000000000005 - type: ndcg_at_1000 value: 43.948 - type: ndcg_at_3 value: 31.959 - type: ndcg_at_5 value: 33.998 - type: precision_at_1 value: 28.265 - type: precision_at_10 value: 5.989 - type: precision_at_100 value: 0.9650000000000001 - type: precision_at_1000 value: 0.13 - type: precision_at_3 value: 14.335 - type: precision_at_5 value: 10.112 - type: recall_at_1 value: 24.11 - type: recall_at_10 value: 46.418 - type: recall_at_100 value: 69.314 - type: recall_at_1000 value: 87.397 - type: recall_at_3 value: 34.724 - type: recall_at_5 value: 39.925 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 22.091 - type: map_at_10 value: 29.948999999999998 - type: map_at_100 value: 31.502000000000002 - type: map_at_1000 value: 31.713 - type: map_at_3 value: 27.464 - type: map_at_5 value: 28.968 - type: mrr_at_1 value: 26.482 - type: mrr_at_10 value: 34.009 - type: mrr_at_100 value: 35.081 - type: mrr_at_1000 value: 35.138000000000005 - type: mrr_at_3 value: 31.785000000000004 - type: mrr_at_5 value: 33.178999999999995 - type: ndcg_at_1 value: 26.482 - type: ndcg_at_10 value: 35.008 - type: ndcg_at_100 value: 41.272999999999996 - type: ndcg_at_1000 value: 43.972 - type: ndcg_at_3 value: 30.804 - type: ndcg_at_5 value: 33.046 - type: precision_at_1 value: 26.482 - type: precision_at_10 value: 6.462 - type: precision_at_100 value: 1.431 - type: precision_at_1000 value: 0.22899999999999998 - type: precision_at_3 value: 14.360999999999999 - type: precision_at_5 value: 10.474 - type: recall_at_1 value: 22.091 - type: recall_at_10 value: 45.125 - type: recall_at_100 value: 72.313 - type: recall_at_1000 value: 89.503 - type: recall_at_3 value: 33.158 - type: recall_at_5 value: 39.086999999999996 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 19.883 - type: map_at_10 value: 26.951000000000004 - type: map_at_100 value: 27.927999999999997 - type: map_at_1000 value: 28.022000000000002 - type: map_at_3 value: 24.616 - type: map_at_5 value: 25.917 - type: mrr_at_1 value: 21.996 - type: mrr_at_10 value: 29.221000000000004 - type: mrr_at_100 value: 30.024 - type: mrr_at_1000 value: 30.095 - type: mrr_at_3 value: 26.833000000000002 - type: mrr_at_5 value: 28.155 - type: ndcg_at_1 value: 21.996 - type: ndcg_at_10 value: 31.421 - type: ndcg_at_100 value: 36.237 - type: ndcg_at_1000 value: 38.744 - type: ndcg_at_3 value: 26.671 - type: ndcg_at_5 value: 28.907 - type: precision_at_1 value: 21.996 - type: precision_at_10 value: 5.009 - type: precision_at_100 value: 0.799 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 11.275 - type: precision_at_5 value: 8.059 - type: recall_at_1 value: 19.883 - type: recall_at_10 value: 43.132999999999996 - type: recall_at_100 value: 65.654 - type: recall_at_1000 value: 84.492 - type: recall_at_3 value: 30.209000000000003 - type: recall_at_5 value: 35.616 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 17.756 - type: map_at_10 value: 30.378 - type: map_at_100 value: 32.537 - type: map_at_1000 value: 32.717 - type: map_at_3 value: 25.599 - type: map_at_5 value: 28.372999999999998 - type: mrr_at_1 value: 41.303 - type: mrr_at_10 value: 53.483999999999995 - type: mrr_at_100 value: 54.106 - type: mrr_at_1000 value: 54.127 - type: mrr_at_3 value: 50.315 - type: mrr_at_5 value: 52.396 - type: ndcg_at_1 value: 41.303 - type: ndcg_at_10 value: 40.503 - type: ndcg_at_100 value: 47.821000000000005 - type: ndcg_at_1000 value: 50.788 - type: ndcg_at_3 value: 34.364 - type: ndcg_at_5 value: 36.818 - type: precision_at_1 value: 41.303 - type: precision_at_10 value: 12.463000000000001 - type: precision_at_100 value: 2.037 - type: precision_at_1000 value: 0.26 - type: precision_at_3 value: 25.798 - type: precision_at_5 value: 19.896 - type: recall_at_1 value: 17.756 - type: recall_at_10 value: 46.102 - type: recall_at_100 value: 70.819 - type: recall_at_1000 value: 87.21799999999999 - type: recall_at_3 value: 30.646 - type: recall_at_5 value: 38.022 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 9.033 - type: map_at_10 value: 20.584 - type: map_at_100 value: 29.518 - type: map_at_1000 value: 31.186000000000003 - type: map_at_3 value: 14.468 - type: map_at_5 value: 17.177 - type: mrr_at_1 value: 69.75 - type: mrr_at_10 value: 77.025 - type: mrr_at_100 value: 77.36699999999999 - type: mrr_at_1000 value: 77.373 - type: mrr_at_3 value: 75.583 - type: mrr_at_5 value: 76.396 - type: ndcg_at_1 value: 58.5 - type: ndcg_at_10 value: 45.033 - type: ndcg_at_100 value: 49.071 - type: ndcg_at_1000 value: 56.056 - type: ndcg_at_3 value: 49.936 - type: ndcg_at_5 value: 47.471999999999994 - type: precision_at_1 value: 69.75 - type: precision_at_10 value: 35.775 - type: precision_at_100 value: 11.594999999999999 - type: precision_at_1000 value: 2.062 - type: precision_at_3 value: 52.5 - type: precision_at_5 value: 45.300000000000004 - type: recall_at_1 value: 9.033 - type: recall_at_10 value: 26.596999999999998 - type: recall_at_100 value: 54.607000000000006 - type: recall_at_1000 value: 76.961 - type: recall_at_3 value: 15.754999999999999 - type: recall_at_5 value: 20.033 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 48.345000000000006 - type: f1 value: 43.4514918068706 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 71.29100000000001 - type: map_at_10 value: 81.059 - type: map_at_100 value: 81.341 - type: map_at_1000 value: 81.355 - type: map_at_3 value: 79.74799999999999 - type: map_at_5 value: 80.612 - type: mrr_at_1 value: 76.40299999999999 - type: mrr_at_10 value: 84.615 - type: mrr_at_100 value: 84.745 - type: mrr_at_1000 value: 84.748 - type: mrr_at_3 value: 83.776 - type: mrr_at_5 value: 84.343 - type: ndcg_at_1 value: 76.40299999999999 - type: ndcg_at_10 value: 84.981 - type: ndcg_at_100 value: 86.00999999999999 - type: ndcg_at_1000 value: 86.252 - type: ndcg_at_3 value: 82.97 - type: ndcg_at_5 value: 84.152 - type: precision_at_1 value: 76.40299999999999 - type: precision_at_10 value: 10.446 - type: precision_at_100 value: 1.1199999999999999 - type: precision_at_1000 value: 0.116 - type: precision_at_3 value: 32.147999999999996 - type: precision_at_5 value: 20.135 - type: recall_at_1 value: 71.29100000000001 - type: recall_at_10 value: 93.232 - type: recall_at_100 value: 97.363 - type: recall_at_1000 value: 98.905 - type: recall_at_3 value: 87.893 - type: recall_at_5 value: 90.804 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 18.667 - type: map_at_10 value: 30.853 - type: map_at_100 value: 32.494 - type: map_at_1000 value: 32.677 - type: map_at_3 value: 26.91 - type: map_at_5 value: 29.099000000000004 - type: mrr_at_1 value: 37.191 - type: mrr_at_10 value: 46.171 - type: mrr_at_100 value: 47.056 - type: mrr_at_1000 value: 47.099000000000004 - type: mrr_at_3 value: 44.059 - type: mrr_at_5 value: 45.147 - type: ndcg_at_1 value: 37.191 - type: ndcg_at_10 value: 38.437 - type: ndcg_at_100 value: 44.62 - type: ndcg_at_1000 value: 47.795 - type: ndcg_at_3 value: 35.003 - type: ndcg_at_5 value: 36.006 - type: precision_at_1 value: 37.191 - type: precision_at_10 value: 10.586 - type: precision_at_100 value: 1.688 - type: precision_at_1000 value: 0.22699999999999998 - type: precision_at_3 value: 23.302 - type: precision_at_5 value: 17.006 - type: recall_at_1 value: 18.667 - type: recall_at_10 value: 45.367000000000004 - type: recall_at_100 value: 68.207 - type: recall_at_1000 value: 87.072 - type: recall_at_3 value: 32.129000000000005 - type: recall_at_5 value: 37.719 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 39.494 - type: map_at_10 value: 66.223 - type: map_at_100 value: 67.062 - type: map_at_1000 value: 67.11500000000001 - type: map_at_3 value: 62.867 - type: map_at_5 value: 64.994 - type: mrr_at_1 value: 78.987 - type: mrr_at_10 value: 84.585 - type: mrr_at_100 value: 84.773 - type: mrr_at_1000 value: 84.77900000000001 - type: mrr_at_3 value: 83.592 - type: mrr_at_5 value: 84.235 - type: ndcg_at_1 value: 78.987 - type: ndcg_at_10 value: 73.64 - type: ndcg_at_100 value: 76.519 - type: ndcg_at_1000 value: 77.51 - type: ndcg_at_3 value: 68.893 - type: ndcg_at_5 value: 71.585 - type: precision_at_1 value: 78.987 - type: precision_at_10 value: 15.529000000000002 - type: precision_at_100 value: 1.7770000000000001 - type: precision_at_1000 value: 0.191 - type: precision_at_3 value: 44.808 - type: precision_at_5 value: 29.006999999999998 - type: recall_at_1 value: 39.494 - type: recall_at_10 value: 77.643 - type: recall_at_100 value: 88.825 - type: recall_at_1000 value: 95.321 - type: recall_at_3 value: 67.211 - type: recall_at_5 value: 72.519 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 85.55959999999999 - type: ap value: 80.7246500384617 - type: f1 value: 85.52336485065454 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 23.631 - type: map_at_10 value: 36.264 - type: map_at_100 value: 37.428 - type: map_at_1000 value: 37.472 - type: map_at_3 value: 32.537 - type: map_at_5 value: 34.746 - type: mrr_at_1 value: 24.312 - type: mrr_at_10 value: 36.858000000000004 - type: mrr_at_100 value: 37.966 - type: mrr_at_1000 value: 38.004 - type: mrr_at_3 value: 33.188 - type: mrr_at_5 value: 35.367 - type: ndcg_at_1 value: 24.312 - type: ndcg_at_10 value: 43.126999999999995 - type: ndcg_at_100 value: 48.642 - type: ndcg_at_1000 value: 49.741 - type: ndcg_at_3 value: 35.589 - type: ndcg_at_5 value: 39.515 - type: precision_at_1 value: 24.312 - type: precision_at_10 value: 6.699 - type: precision_at_100 value: 0.9450000000000001 - type: precision_at_1000 value: 0.104 - type: precision_at_3 value: 15.153 - type: precision_at_5 value: 11.065999999999999 - type: recall_at_1 value: 23.631 - type: recall_at_10 value: 64.145 - type: recall_at_100 value: 89.41 - type: recall_at_1000 value: 97.83500000000001 - type: recall_at_3 value: 43.769000000000005 - type: recall_at_5 value: 53.169 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 93.4108527131783 - type: f1 value: 93.1415880261038 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 77.24806201550388 - type: f1 value: 60.531916308197175 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 73.71553463349024 - type: f1 value: 71.70753174900791 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 77.79757901815736 - type: f1 value: 77.83719850433258 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 33.74193296622113 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 30.64257594108566 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 30.811018518883625 - type: mrr value: 31.910376577445003 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 5.409 - type: map_at_10 value: 13.093 - type: map_at_100 value: 16.256999999999998 - type: map_at_1000 value: 17.617 - type: map_at_3 value: 9.555 - type: map_at_5 value: 11.428 - type: mrr_at_1 value: 45.201 - type: mrr_at_10 value: 54.179 - type: mrr_at_100 value: 54.812000000000005 - type: mrr_at_1000 value: 54.840999999999994 - type: mrr_at_3 value: 51.909000000000006 - type: mrr_at_5 value: 53.519000000000005 - type: ndcg_at_1 value: 43.189 - type: ndcg_at_10 value: 35.028 - type: ndcg_at_100 value: 31.226 - type: ndcg_at_1000 value: 39.678000000000004 - type: ndcg_at_3 value: 40.596 - type: ndcg_at_5 value: 38.75 - type: precision_at_1 value: 44.582 - type: precision_at_10 value: 25.974999999999998 - type: precision_at_100 value: 7.793 - type: precision_at_1000 value: 2.036 - type: precision_at_3 value: 38.493 - type: precision_at_5 value: 33.994 - type: recall_at_1 value: 5.409 - type: recall_at_10 value: 16.875999999999998 - type: recall_at_100 value: 30.316 - type: recall_at_1000 value: 60.891 - type: recall_at_3 value: 10.688 - type: recall_at_5 value: 13.832 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 36.375 - type: map_at_10 value: 51.991 - type: map_at_100 value: 52.91400000000001 - type: map_at_1000 value: 52.93600000000001 - type: map_at_3 value: 48.014 - type: map_at_5 value: 50.381 - type: mrr_at_1 value: 40.759 - type: mrr_at_10 value: 54.617000000000004 - type: mrr_at_100 value: 55.301 - type: mrr_at_1000 value: 55.315000000000005 - type: mrr_at_3 value: 51.516 - type: mrr_at_5 value: 53.435 - type: ndcg_at_1 value: 40.759 - type: ndcg_at_10 value: 59.384 - type: ndcg_at_100 value: 63.157 - type: ndcg_at_1000 value: 63.654999999999994 - type: ndcg_at_3 value: 52.114000000000004 - type: ndcg_at_5 value: 55.986000000000004 - type: precision_at_1 value: 40.759 - type: precision_at_10 value: 9.411999999999999 - type: precision_at_100 value: 1.153 - type: precision_at_1000 value: 0.12 - type: precision_at_3 value: 23.329 - type: precision_at_5 value: 16.256999999999998 - type: recall_at_1 value: 36.375 - type: recall_at_10 value: 79.053 - type: recall_at_100 value: 95.167 - type: recall_at_1000 value: 98.82 - type: recall_at_3 value: 60.475 - type: recall_at_5 value: 69.327 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 70.256 - type: map_at_10 value: 83.8 - type: map_at_100 value: 84.425 - type: map_at_1000 value: 84.444 - type: map_at_3 value: 80.906 - type: map_at_5 value: 82.717 - type: mrr_at_1 value: 80.97999999999999 - type: mrr_at_10 value: 87.161 - type: mrr_at_100 value: 87.262 - type: mrr_at_1000 value: 87.263 - type: mrr_at_3 value: 86.175 - type: mrr_at_5 value: 86.848 - type: ndcg_at_1 value: 80.97999999999999 - type: ndcg_at_10 value: 87.697 - type: ndcg_at_100 value: 88.959 - type: ndcg_at_1000 value: 89.09899999999999 - type: ndcg_at_3 value: 84.83800000000001 - type: ndcg_at_5 value: 86.401 - type: precision_at_1 value: 80.97999999999999 - type: precision_at_10 value: 13.261000000000001 - type: precision_at_100 value: 1.5150000000000001 - type: precision_at_1000 value: 0.156 - type: precision_at_3 value: 37.01 - type: precision_at_5 value: 24.298000000000002 - type: recall_at_1 value: 70.256 - type: recall_at_10 value: 94.935 - type: recall_at_100 value: 99.274 - type: recall_at_1000 value: 99.928 - type: recall_at_3 value: 86.602 - type: recall_at_5 value: 91.133 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 56.322692497613104 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 61.895813503775074 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 4.338 - type: map_at_10 value: 10.767 - type: map_at_100 value: 12.537999999999998 - type: map_at_1000 value: 12.803999999999998 - type: map_at_3 value: 7.788 - type: map_at_5 value: 9.302000000000001 - type: mrr_at_1 value: 21.4 - type: mrr_at_10 value: 31.637999999999998 - type: mrr_at_100 value: 32.688 - type: mrr_at_1000 value: 32.756 - type: mrr_at_3 value: 28.433000000000003 - type: mrr_at_5 value: 30.178 - type: ndcg_at_1 value: 21.4 - type: ndcg_at_10 value: 18.293 - type: ndcg_at_100 value: 25.274 - type: ndcg_at_1000 value: 30.284 - type: ndcg_at_3 value: 17.391000000000002 - type: ndcg_at_5 value: 15.146999999999998 - type: precision_at_1 value: 21.4 - type: precision_at_10 value: 9.48 - type: precision_at_100 value: 1.949 - type: precision_at_1000 value: 0.316 - type: precision_at_3 value: 16.167 - type: precision_at_5 value: 13.22 - type: recall_at_1 value: 4.338 - type: recall_at_10 value: 19.213 - type: recall_at_100 value: 39.562999999999995 - type: recall_at_1000 value: 64.08 - type: recall_at_3 value: 9.828000000000001 - type: recall_at_5 value: 13.383000000000001 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 82.42568163642142 - type: cos_sim_spearman value: 78.5797159641342 - type: euclidean_pearson value: 80.22151260811604 - type: euclidean_spearman value: 78.5797151953878 - type: manhattan_pearson value: 80.21224215864788 - type: manhattan_spearman value: 78.55641478381344 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 85.44020710812569 - type: cos_sim_spearman value: 78.91631735081286 - type: euclidean_pearson value: 81.64188964182102 - type: euclidean_spearman value: 78.91633286881678 - type: manhattan_pearson value: 81.69294748512496 - type: manhattan_spearman value: 78.93438558002656 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 84.27165426412311 - type: cos_sim_spearman value: 85.40429140249618 - type: euclidean_pearson value: 84.7509580724893 - type: euclidean_spearman value: 85.40429140249618 - type: manhattan_pearson value: 84.76488289321308 - type: manhattan_spearman value: 85.4256793698708 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 83.138851760732 - type: cos_sim_spearman value: 81.64101363896586 - type: euclidean_pearson value: 82.55165038934942 - type: euclidean_spearman value: 81.64105257080502 - type: manhattan_pearson value: 82.52802949883335 - type: manhattan_spearman value: 81.61255430718158 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 86.0654695484029 - type: cos_sim_spearman value: 87.20408521902229 - type: euclidean_pearson value: 86.8110651362115 - type: euclidean_spearman value: 87.20408521902229 - type: manhattan_pearson value: 86.77984656478691 - type: manhattan_spearman value: 87.1719947099227 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 83.77823915496512 - type: cos_sim_spearman value: 85.43566325729779 - type: euclidean_pearson value: 84.5396956658821 - type: euclidean_spearman value: 85.43566325729779 - type: manhattan_pearson value: 84.5665398848169 - type: manhattan_spearman value: 85.44375870303232 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 87.20030208471798 - type: cos_sim_spearman value: 87.20485505076539 - type: euclidean_pearson value: 88.10588324368722 - type: euclidean_spearman value: 87.20485505076539 - type: manhattan_pearson value: 87.92324770415183 - type: manhattan_spearman value: 87.0571314561877 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 63.06093161604453 - type: cos_sim_spearman value: 64.2163140357722 - type: euclidean_pearson value: 65.27589680994006 - type: euclidean_spearman value: 64.2163140357722 - type: manhattan_pearson value: 65.45904383711101 - type: manhattan_spearman value: 64.55404716679305 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 84.32976164578706 - type: cos_sim_spearman value: 85.54302197678368 - type: euclidean_pearson value: 85.26307149193056 - type: euclidean_spearman value: 85.54302197678368 - type: manhattan_pearson value: 85.26647282029371 - type: manhattan_spearman value: 85.5316135265568 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 81.44675968318754 - type: mrr value: 94.92741826075158 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 56.34400000000001 - type: map_at_10 value: 65.927 - type: map_at_100 value: 66.431 - type: map_at_1000 value: 66.461 - type: map_at_3 value: 63.529 - type: map_at_5 value: 64.818 - type: mrr_at_1 value: 59.333000000000006 - type: mrr_at_10 value: 67.54599999999999 - type: mrr_at_100 value: 67.892 - type: mrr_at_1000 value: 67.917 - type: mrr_at_3 value: 65.778 - type: mrr_at_5 value: 66.794 - type: ndcg_at_1 value: 59.333000000000006 - type: ndcg_at_10 value: 70.5 - type: ndcg_at_100 value: 72.688 - type: ndcg_at_1000 value: 73.483 - type: ndcg_at_3 value: 66.338 - type: ndcg_at_5 value: 68.265 - type: precision_at_1 value: 59.333000000000006 - type: precision_at_10 value: 9.3 - type: precision_at_100 value: 1.053 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 25.889 - type: precision_at_5 value: 16.866999999999997 - type: recall_at_1 value: 56.34400000000001 - type: recall_at_10 value: 82.789 - type: recall_at_100 value: 92.767 - type: recall_at_1000 value: 99 - type: recall_at_3 value: 71.64399999999999 - type: recall_at_5 value: 76.322 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.75742574257426 - type: cos_sim_ap value: 93.52081548447406 - type: cos_sim_f1 value: 87.33850129198966 - type: cos_sim_precision value: 90.37433155080214 - type: cos_sim_recall value: 84.5 - type: dot_accuracy value: 99.75742574257426 - type: dot_ap value: 93.52081548447406 - type: dot_f1 value: 87.33850129198966 - type: dot_precision value: 90.37433155080214 - type: dot_recall value: 84.5 - type: euclidean_accuracy value: 99.75742574257426 - type: euclidean_ap value: 93.52081548447406 - type: euclidean_f1 value: 87.33850129198966 - type: euclidean_precision value: 90.37433155080214 - type: euclidean_recall value: 84.5 - type: manhattan_accuracy value: 99.75841584158415 - type: manhattan_ap value: 93.4975678585854 - type: manhattan_f1 value: 87.26708074534162 - type: manhattan_precision value: 90.45064377682404 - type: manhattan_recall value: 84.3 - type: max_accuracy value: 99.75841584158415 - type: max_ap value: 93.52081548447406 - type: max_f1 value: 87.33850129198966 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 64.31437036686651 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 33.25569319007206 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 49.90474939720706 - type: mrr value: 50.568115503777264 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 29.866828641244712 - type: cos_sim_spearman value: 30.077555055873866 - type: dot_pearson value: 29.866832988572266 - type: dot_spearman value: 30.077555055873866 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.232 - type: map_at_10 value: 2.094 - type: map_at_100 value: 11.971 - type: map_at_1000 value: 28.158 - type: map_at_3 value: 0.688 - type: map_at_5 value: 1.114 - type: mrr_at_1 value: 88 - type: mrr_at_10 value: 93.4 - type: mrr_at_100 value: 93.4 - type: mrr_at_1000 value: 93.4 - type: mrr_at_3 value: 93 - type: mrr_at_5 value: 93.4 - type: ndcg_at_1 value: 84 - type: ndcg_at_10 value: 79.923 - type: ndcg_at_100 value: 61.17 - type: ndcg_at_1000 value: 53.03 - type: ndcg_at_3 value: 84.592 - type: ndcg_at_5 value: 82.821 - type: precision_at_1 value: 88 - type: precision_at_10 value: 85 - type: precision_at_100 value: 63.019999999999996 - type: precision_at_1000 value: 23.554 - type: precision_at_3 value: 89.333 - type: precision_at_5 value: 87.2 - type: recall_at_1 value: 0.232 - type: recall_at_10 value: 2.255 - type: recall_at_100 value: 14.823 - type: recall_at_1000 value: 49.456 - type: recall_at_3 value: 0.718 - type: recall_at_5 value: 1.175 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 2.547 - type: map_at_10 value: 11.375 - type: map_at_100 value: 18.194 - type: map_at_1000 value: 19.749 - type: map_at_3 value: 5.825 - type: map_at_5 value: 8.581 - type: mrr_at_1 value: 32.653 - type: mrr_at_10 value: 51.32 - type: mrr_at_100 value: 51.747 - type: mrr_at_1000 value: 51.747 - type: mrr_at_3 value: 47.278999999999996 - type: mrr_at_5 value: 48.605 - type: ndcg_at_1 value: 29.592000000000002 - type: ndcg_at_10 value: 28.151 - type: ndcg_at_100 value: 39.438 - type: ndcg_at_1000 value: 50.769 - type: ndcg_at_3 value: 30.758999999999997 - type: ndcg_at_5 value: 30.366 - type: precision_at_1 value: 32.653 - type: precision_at_10 value: 25.714 - type: precision_at_100 value: 8.041 - type: precision_at_1000 value: 1.555 - type: precision_at_3 value: 33.333 - type: precision_at_5 value: 31.837 - type: recall_at_1 value: 2.547 - type: recall_at_10 value: 18.19 - type: recall_at_100 value: 49.538 - type: recall_at_1000 value: 83.86 - type: recall_at_3 value: 7.329 - type: recall_at_5 value: 11.532 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 71.4952 - type: ap value: 14.793362635531409 - type: f1 value: 55.204635551516915 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 61.5365025466893 - type: f1 value: 61.81742556334845 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 49.05531070301185 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 86.51725576682364 - type: cos_sim_ap value: 75.2292304265163 - type: cos_sim_f1 value: 69.54022988505749 - type: cos_sim_precision value: 63.65629110039457 - type: cos_sim_recall value: 76.62269129287598 - type: dot_accuracy value: 86.51725576682364 - type: dot_ap value: 75.22922386081054 - type: dot_f1 value: 69.54022988505749 - type: dot_precision value: 63.65629110039457 - type: dot_recall value: 76.62269129287598 - type: euclidean_accuracy value: 86.51725576682364 - type: euclidean_ap value: 75.22925730473472 - type: euclidean_f1 value: 69.54022988505749 - type: euclidean_precision value: 63.65629110039457 - type: euclidean_recall value: 76.62269129287598 - type: manhattan_accuracy value: 86.52321630804077 - type: manhattan_ap value: 75.20608115037336 - type: manhattan_f1 value: 69.60000000000001 - type: manhattan_precision value: 64.37219730941705 - type: manhattan_recall value: 75.75197889182058 - type: max_accuracy value: 86.52321630804077 - type: max_ap value: 75.22925730473472 - type: max_f1 value: 69.60000000000001 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 89.34877944657896 - type: cos_sim_ap value: 86.71257569277373 - type: cos_sim_f1 value: 79.10386355986088 - type: cos_sim_precision value: 76.91468470434214 - type: cos_sim_recall value: 81.4213119802895 - type: dot_accuracy value: 89.34877944657896 - type: dot_ap value: 86.71257133133368 - type: dot_f1 value: 79.10386355986088 - type: dot_precision value: 76.91468470434214 - type: dot_recall value: 81.4213119802895 - type: euclidean_accuracy value: 89.34877944657896 - type: euclidean_ap value: 86.71257651501476 - type: euclidean_f1 value: 79.10386355986088 - type: euclidean_precision value: 76.91468470434214 - type: euclidean_recall value: 81.4213119802895 - type: manhattan_accuracy value: 89.35848177901967 - type: manhattan_ap value: 86.69330615469126 - type: manhattan_f1 value: 79.13867741453949 - type: manhattan_precision value: 76.78881807647741 - type: manhattan_recall value: 81.63689559593472 - type: max_accuracy value: 89.35848177901967 - type: max_ap value: 86.71257651501476 - type: max_f1 value: 79.13867741453949 license: apache-2.0 language: - en --- # nomic-embed-text-v1: A Reproducible Long Context (8192) Text Embedder `nomic-embed-text-v1` is 8192 context length text encoder that surpasses OpenAI text-embedding-ada-002 and text-embedding-3-small performance on short and long context tasks. | Name | SeqLen | MTEB | LoCo | Jina Long Context | Open Weights | Open Training Code | Open Data | | :-------------------------------:| :----- | :-------- | :------: | :---------------: | :-----------: | :----------------: | :---------- | | nomic-embed-text-v1 | 8192 | **62.39** |**85.53** | 54.16 | ✅ | ✅ | ✅ | | jina-embeddings-v2-base-en | 8192 | 60.39 | 85.45 | 51.90 | ✅ | ❌ | ❌ | | text-embedding-3-small | 8191 | 62.26 | 82.40 | **58.20** | ❌ | ❌ | ❌ | | text-embedding-ada-002 | 8191 | 60.99 | 52.7 | 55.25 | ❌ | ❌ | ❌ | ## Hosted Inference API The easiest way to get started with Nomic Embed is through the Nomic Embedding API. Generating embeddings with the `nomic` Python client is as easy as ```python from nomic import embed output = embed.text( texts=['Nomic Embedding API', '#keepAIOpen'], model='nomic-embed-text-v1', task_type='search_document' ) print(output) ``` For more information, see the [API reference](https://docs.nomic.ai/reference/endpoints/nomic-embed-text) ## Data Visualization Click the Nomic Atlas map below to visualize a 5M sample of our contrastive pretraining data! [![image/webp](https://cdn-uploads.huggingface.co/production/uploads/607997c83a565c15675055b3/pjhJhuNyRfPagRd_c_iUz.webp)](https://atlas.nomic.ai/map/nomic-text-embed-v1-5m-sample) ## Training Details We train our embedder using a multi-stage training pipeline. Starting from a long-context [BERT model](https://huggingface.co/nomic-ai/nomic-bert-2048), the first unsupervised contrastive stage trains on a dataset generated from weakly related text pairs, such as question-answer pairs from forums like StackExchange and Quora, title-body pairs from Amazon reviews, and summarizations from news articles. In the second finetuning stage, higher quality labeled datasets such as search queries and answers from web searches are leveraged. Data curation and hard-example mining is crucial in this stage. For more details, see the Nomic Embed [Technical Report](https://static.nomic.ai/reports/2024_Nomic_Embed_Text_Technical_Report.pdf) and corresponding [blog post](https://blog.nomic.ai/posts/nomic-embed-text-v1). Training data to train the models is released in its entirety. For more details, see the `contrastors` [repository](https://github.com/nomic-ai/contrastors) ## Usage Note `nomic-embed-text` requires prefixes! We support the prefixes `[search_query, search_document, classification, clustering]`. For retrieval applications, you should prepend `search_document` for all your documents and `search_query` for your queries. ### Sentence Transformers ```python from sentence_transformers import SentenceTransformer model = SentenceTransformer("nomic-ai/nomic-embed-text-v1", trust_remote_code=True) sentences = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?'] embeddings = model.encode(sentences) print(embeddings) ``` ### Transformers ```python import torch import torch.nn.functional as F from transformers import AutoTokenizer, AutoModel def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) sentences = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?'] tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased') model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1', trust_remote_code=True) model.eval() encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') with torch.no_grad(): model_output = model(**encoded_input) embeddings = mean_pooling(model_output, encoded_input['attention_mask']) embeddings = F.normalize(embeddings, p=2, dim=1) print(embeddings) ``` The model natively supports scaling of the sequence length past 2048 tokens. To do so, ```diff - tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased') + tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased', model_max_length=8192) - model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1', trust_remote_code=True) + model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1', trust_remote_code=True, rotary_scaling_factor=2) ``` ### Transformers.js ```js import { pipeline } from '@xenova/transformers'; // Create a feature extraction pipeline const extractor = await pipeline('feature-extraction', 'nomic-ai/nomic-embed-text-v1', { quantized: false, // Comment out this line to use the quantized version }); // Compute sentence embeddings const texts = ['search_query: What is TSNE?', 'search_query: Who is Laurens van der Maaten?']; const embeddings = await extractor(texts, { pooling: 'mean', normalize: true }); console.log(embeddings); ``` # Join the Nomic Community - Nomic: [https://nomic.ai](https://nomic.ai) - Discord: [https://discord.gg/myY5YDR8z8](https://discord.gg/myY5YDR8z8) - Twitter: [https://twitter.com/nomic_ai](https://twitter.com/nomic_ai) # Citation If you find the model, dataset, or training code useful, please cite our work ```bibtex @misc{nussbaum2024nomic, title={Nomic Embed: Training a Reproducible Long Context Text Embedder}, author={Zach Nussbaum and John X. Morris and Brandon Duderstadt and Andriy Mulyar}, year={2024}, eprint={2402.01613}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
skt/kobert-base-v1
skt
"2021-07-01T07:16:05Z"
76,901
19
transformers
[ "transformers", "pytorch", "bert", "feature-extraction", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
Please refer here. https://github.com/SKTBrain/KoBERT
SG161222/RealVisXL_V3.0
SG161222
"2024-04-12T15:37:24Z"
76,350
60
diffusers
[ "diffusers", "safetensors", "license:openrail++", "endpoints_compatible", "has_space", "diffusers:StableDiffusionXLPipeline", "region:us" ]
null
"2023-12-16T03:14:39Z"
--- license: openrail++ --- <b>This model is available on <a href="https://www.mage.space/">Mage.Space</a> (main sponsor)</b><br> <b>You can support me directly on Boosty - https://boosty.to/sg_161222</b><br> <b>It's important! Read it!</b><br> The model is still in the training phase. This is not the final version and may contain artifacts and perform poorly in some cases.<br> The model is aimed at photorealism. Can produce sfw and nsfw images of decent quality.<br> CivitAI Page: https://civitai.com/models/139562/realvisxl-v30-turbo<br> <b>Recommended Negative Prompt:</b><br> (worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth<br> <b>or another negative prompt</b><br> <b>Recommended Generation Parameters:</b><br> Sampling Steps: 15-30<br> Sampling Method: DPM++ SDE Karras<br> <b>Recommended Hires Fix Parameters:</b><br> Hires steps: 10+<br> Upscaler: 4x-UltraSharp upscaler / or another<br> Denoising strength: 0.1 - 0.5<br> Upscale by: 1.1-2.0<br>
HuggingFaceH4/tiny-random-LlamaForCausalLM
HuggingFaceH4
"2023-04-19T21:39:04Z"
76,115
2
transformers
[ "transformers", "pytorch", "llama", "text-generation", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-04-17T07:42:23Z"
--- duplicated_from: HuggingFaceM4/tiny-random-LlamaForCausalLM ---
dbmdz/bert-base-german-uncased
dbmdz
"2023-09-06T22:19:33Z"
76,067
17
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "fill-mask", "de", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: de license: mit --- # 🤗 + 📚 dbmdz German BERT models In this repository the MDZ Digital Library team (dbmdz) at the Bavarian State Library open sources another German BERT models 🎉 # German BERT ## Stats In addition to the recently released [German BERT](https://deepset.ai/german-bert) model by [deepset](https://deepset.ai/) we provide another German-language model. The source data for the model consists of a recent Wikipedia dump, EU Bookshop corpus, Open Subtitles, CommonCrawl, ParaCrawl and News Crawl. This results in a dataset with a size of 16GB and 2,350,234,427 tokens. For sentence splitting, we use [spacy](https://spacy.io/). Our preprocessing steps (sentence piece model for vocab generation) follow those used for training [SciBERT](https://github.com/allenai/scibert). The model is trained with an initial sequence length of 512 subwords and was performed for 1.5M steps. This release includes both cased and uncased models. ## Model weights Currently only PyTorch-[Transformers](https://github.com/huggingface/transformers) compatible weights are available. If you need access to TensorFlow checkpoints, please raise an issue! | Model | Downloads | -------------------------------- | --------------------------------------------------------------------------------------------------------------- | `bert-base-german-dbmdz-cased` | [`config.json`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-cased-config.json) • [`pytorch_model.bin`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-cased-pytorch_model.bin) • [`vocab.txt`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-cased-vocab.txt) | `bert-base-german-dbmdz-uncased` | [`config.json`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-uncased-config.json) • [`pytorch_model.bin`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-uncased-pytorch_model.bin) • [`vocab.txt`](https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-german-dbmdz-uncased-vocab.txt) ## Usage With Transformers >= 2.3 our German BERT models can be loaded like: ```python from transformers import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("dbmdz/bert-base-german-cased") model = AutoModel.from_pretrained("dbmdz/bert-base-german-cased") ``` ## Results For results on downstream tasks like NER or PoS tagging, please refer to [this repository](https://github.com/stefan-it/fine-tuned-berts-seq). # Huggingface model hub All models are available on the [Huggingface model hub](https://huggingface.co/dbmdz). # Contact (Bugs, Feedback, Contribution and more) For questions about our BERT models just open an issue [here](https://github.com/dbmdz/berts/issues/new) 🤗 # Acknowledgments Research supported with Cloud TPUs from Google's TensorFlow Research Cloud (TFRC). Thanks for providing access to the TFRC ❤️ Thanks to the generous support from the [Hugging Face](https://huggingface.co/) team, it is possible to download both cased and uncased models from their S3 storage 🤗
Intel/dynamic_tinybert
Intel
"2024-03-22T12:43:19Z"
75,714
37
transformers
[ "transformers", "pytorch", "bert", "question-answering", "en", "dataset:squad", "arxiv:2111.09645", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
question-answering
"2022-03-02T23:29:04Z"
--- tags: - question-answering - bert license: apache-2.0 datasets: - squad language: - en model-index: - name: dynamic-tinybert results: - task: type: question-answering name: question-answering metrics: - type: f1 value: 88.71 --- ## Model Details: Dynamic-TinyBERT: Boost TinyBERT's Inference Efficiency by Dynamic Sequence Length Dynamic-TinyBERT has been fine-tuned for the NLP task of question answering, trained on the SQuAD 1.1 dataset. [Guskin et al. (2021)](https://neurips2021-nlp.github.io/papers/16/CameraReady/Dynamic_TinyBERT_NLSP2021_camera_ready.pdf) note: > Dynamic-TinyBERT is a TinyBERT model that utilizes sequence-length reduction and Hyperparameter Optimization for enhanced inference efficiency per any computational budget. Dynamic-TinyBERT is trained only once, performing on-par with BERT and achieving an accuracy-speedup trade-off superior to any other efficient approaches (up to 3.3x with <1% loss-drop). | Model Detail | Description | | ----------- | ----------- | | Model Authors - Company | Intel | | Model Card Authors | Intel in collaboration with Hugging Face | | Date | November 22, 2021 | | Version | 1 | | Type | NLP - Question Answering | | Architecture | "For our Dynamic-TinyBERT model we use the architecture of TinyBERT6L: a small BERT model with 6 layers, a hidden size of 768, a feed forward size of 3072 and 12 heads." [Guskin et al. (2021)](https://gyuwankim.github.io/publication/dynamic-tinybert/poster.pdf) | | Paper or Other Resources | [Paper](https://neurips2021-nlp.github.io/papers/16/CameraReady/Dynamic_TinyBERT_NLSP2021_camera_ready.pdf); [Poster](https://gyuwankim.github.io/publication/dynamic-tinybert/poster.pdf); [GitHub Repo](https://github.com/IntelLabs/Model-Compression-Research-Package) | | License | Apache 2.0 | | Questions or Comments | [Community Tab](https://huggingface.co/Intel/dynamic_tinybert/discussions) and [Intel Developers Discord](https://discord.gg/rv2Gp55UJQ)| | Intended Use | Description | | ----------- | ----------- | | Primary intended uses | You can use the model for the NLP task of question answering: given a corpus of text, you can ask it a question about that text, and it will find the answer in the text. | | Primary intended users | Anyone doing question answering | | Out-of-scope uses | The model should not be used to intentionally create hostile or alienating environments for people.| ### How to use Here is how to import this model in Python: <details> <summary> Click to expand </summary> ```python import torch from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("Intel/dynamic_tinybert") model = AutoModelForQuestionAnswering.from_pretrained("Intel/dynamic_tinybert") context = "remember the number 123456, I'll ask you later." question = "What is the number I told you?" # Tokenize the context and question tokens = tokenizer.encode_plus(question, context, return_tensors="pt", truncation=True) # Get the input IDs and attention mask input_ids = tokens["input_ids"] attention_mask = tokens["attention_mask"] # Perform question answering outputs = model(input_ids, attention_mask=attention_mask) start_scores = outputs.start_logits end_scores = outputs.end_logits # Find the start and end positions of the answer answer_start = torch.argmax(start_scores) answer_end = torch.argmax(end_scores) + 1 answer = tokenizer.convert_tokens_to_string(tokenizer.convert_ids_to_tokens(input_ids[0][answer_start:answer_end])) # Print the answer print("Answer:", answer) ``` </details> | Factors | Description | | ----------- | ----------- | | Groups | Many Wikipedia articles with question and answer labels are contained in the training data | | Instrumentation | - | | Environment | Training was completed on a Titan GPU. | | Card Prompts | Model deployment on alternate hardware and software will change model performance | | Metrics | Description | | ----------- | ----------- | | Model performance measures | F1 | | Decision thresholds | - | | Approaches to uncertainty and variability | - | | Training and Evaluation Data | Description | | ----------- | ----------- | | Datasets | SQuAD1.1: "Stanford Question Answering Dataset (SQuAD) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable." (https://huggingface.co/datasets/squad)| | Motivation | To build an efficient and accurate model for the question answering task. | | Preprocessing | "We start with a pre-trained general-TinyBERT student, which was trained to learn the general knowledge of BERT using the general-distillation method presented by TinyBERT. We perform transformer distillation from a fine- tuned BERT teacher to the student, following the same training steps used in the original TinyBERT: (1) intermediate-layer distillation (ID) — learning the knowledge residing in the hidden states and attentions matrices, and (2) prediction-layer distillation (PD) — fitting the predictions of the teacher." ([Guskin et al., 2021](https://neurips2021-nlp.github.io/papers/16/CameraReady/Dynamic_TinyBERT_NLSP2021_camera_ready.pdf))| Model Performance Analysis: | Model | Max F1 (full model) | Best Speedup within BERT-1% | |------------------|---------------------|-----------------------------| | Dynamic-TinyBERT | 88.71 | 3.3x | | Ethical Considerations | Description | | ----------- | ----------- | | Data | The training data come from Wikipedia articles | | Human life | The model is not intended to inform decisions central to human life or flourishing. It is an aggregated set of labelled Wikipedia articles. | | Mitigations | No additional risk mitigation strategies were considered during model development. | | Risks and harms | Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al., 2021](https://aclanthology.org/2021.acl-long.330.pdf), and [Bender et al., 2021](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. Beyond this, the extent of the risks involved by using the model remain unknown.| | Use cases | - | | Caveats and Recommendations | | ----------- | | Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. There are no additional caveats or recommendations for this model. | ### BibTeX entry and citation info ```bibtex @misc{https://doi.org/10.48550/arxiv.2111.09645, doi = {10.48550/ARXIV.2111.09645}, url = {https://arxiv.org/abs/2111.09645}, author = {Guskin, Shira and Wasserblat, Moshe and Ding, Ke and Kim, Gyuwan}, keywords = {Computation and Language (cs.CL), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Dynamic-TinyBERT: Boost TinyBERT's Inference Efficiency by Dynamic Sequence Length}, publisher = {arXiv}, year = {2021}, ```
avsolatorio/GIST-Embedding-v0
avsolatorio
"2024-02-28T00:31:27Z"
75,593
10
sentence-transformers
[ "sentence-transformers", "pytorch", "safetensors", "bert", "feature-extraction", "mteb", "sentence-similarity", "en", "arxiv:2402.16829", "arxiv:2212.09741", "license:mit", "model-index", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2024-01-31T16:41:20Z"
--- language: - en library_name: sentence-transformers license: mit pipeline_tag: sentence-similarity tags: - feature-extraction - mteb - sentence-similarity - sentence-transformers model-index: - name: GIST-Embedding-v0 results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 75.95522388059702 - type: ap value: 38.940434354439276 - type: f1 value: 69.88686275888114 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 93.51357499999999 - type: ap value: 90.30414241486682 - type: f1 value: 93.50552829047328 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 50.446000000000005 - type: f1 value: 49.76432659699279 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 38.265 - type: map_at_10 value: 54.236 - type: map_at_100 value: 54.81399999999999 - type: map_at_1000 value: 54.81700000000001 - type: map_at_3 value: 49.881 - type: map_at_5 value: 52.431000000000004 - type: mrr_at_1 value: 38.265 - type: mrr_at_10 value: 54.152 - type: mrr_at_100 value: 54.730000000000004 - type: mrr_at_1000 value: 54.733 - type: mrr_at_3 value: 49.644 - type: mrr_at_5 value: 52.32599999999999 - type: ndcg_at_1 value: 38.265 - type: ndcg_at_10 value: 62.62 - type: ndcg_at_100 value: 64.96600000000001 - type: ndcg_at_1000 value: 65.035 - type: ndcg_at_3 value: 53.691 - type: ndcg_at_5 value: 58.303000000000004 - type: precision_at_1 value: 38.265 - type: precision_at_10 value: 8.919 - type: precision_at_100 value: 0.991 - type: precision_at_1000 value: 0.1 - type: precision_at_3 value: 21.573999999999998 - type: precision_at_5 value: 15.192 - type: recall_at_1 value: 38.265 - type: recall_at_10 value: 89.189 - type: recall_at_100 value: 99.14699999999999 - type: recall_at_1000 value: 99.644 - type: recall_at_3 value: 64.723 - type: recall_at_5 value: 75.96000000000001 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 48.287087887491744 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 42.74244928943812 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 62.68814324295771 - type: mrr value: 75.46266983247591 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_pearson value: 90.45240209600391 - type: cos_sim_spearman value: 87.95079919934645 - type: euclidean_pearson value: 88.93438602492702 - type: euclidean_spearman value: 88.28152962682988 - type: manhattan_pearson value: 88.92193964325268 - type: manhattan_spearman value: 88.21466063329498 - task: type: BitextMining dataset: type: mteb/bucc-bitext-mining name: MTEB BUCC (de-en) config: de-en split: test revision: d51519689f32196a32af33b075a01d0e7c51e252 metrics: - type: accuracy value: 15.605427974947808 - type: f1 value: 14.989877233698866 - type: precision value: 14.77906814441261 - type: recall value: 15.605427974947808 - task: type: BitextMining dataset: type: mteb/bucc-bitext-mining name: MTEB BUCC (fr-en) config: fr-en split: test revision: d51519689f32196a32af33b075a01d0e7c51e252 metrics: - type: accuracy value: 33.38102575390711 - type: f1 value: 32.41704114719127 - type: precision value: 32.057363829835964 - type: recall value: 33.38102575390711 - task: type: BitextMining dataset: type: mteb/bucc-bitext-mining name: MTEB BUCC (ru-en) config: ru-en split: test revision: d51519689f32196a32af33b075a01d0e7c51e252 metrics: - type: accuracy value: 0.1939729823346034 - type: f1 value: 0.17832215223820772 - type: precision value: 0.17639155671715423 - type: recall value: 0.1939729823346034 - task: type: BitextMining dataset: type: mteb/bucc-bitext-mining name: MTEB BUCC (zh-en) config: zh-en split: test revision: d51519689f32196a32af33b075a01d0e7c51e252 metrics: - type: accuracy value: 3.0542390731964195 - type: f1 value: 2.762857644374232 - type: precision value: 2.6505178163945935 - type: recall value: 3.0542390731964195 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 87.29545454545453 - type: f1 value: 87.26415991342238 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 39.035319537839484 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 36.667313307057285 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 33.979 - type: map_at_10 value: 46.275 - type: map_at_100 value: 47.975 - type: map_at_1000 value: 48.089 - type: map_at_3 value: 42.507 - type: map_at_5 value: 44.504 - type: mrr_at_1 value: 42.346000000000004 - type: mrr_at_10 value: 53.013 - type: mrr_at_100 value: 53.717000000000006 - type: mrr_at_1000 value: 53.749 - type: mrr_at_3 value: 50.405 - type: mrr_at_5 value: 51.915 - type: ndcg_at_1 value: 42.346000000000004 - type: ndcg_at_10 value: 53.179 - type: ndcg_at_100 value: 58.458 - type: ndcg_at_1000 value: 60.057 - type: ndcg_at_3 value: 48.076 - type: ndcg_at_5 value: 50.283 - type: precision_at_1 value: 42.346000000000004 - type: precision_at_10 value: 10.386 - type: precision_at_100 value: 1.635 - type: precision_at_1000 value: 0.20600000000000002 - type: precision_at_3 value: 23.413999999999998 - type: precision_at_5 value: 16.624 - type: recall_at_1 value: 33.979 - type: recall_at_10 value: 65.553 - type: recall_at_100 value: 87.18599999999999 - type: recall_at_1000 value: 97.25200000000001 - type: recall_at_3 value: 50.068999999999996 - type: recall_at_5 value: 56.882 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 31.529 - type: map_at_10 value: 42.219 - type: map_at_100 value: 43.408 - type: map_at_1000 value: 43.544 - type: map_at_3 value: 39.178000000000004 - type: map_at_5 value: 40.87 - type: mrr_at_1 value: 39.873 - type: mrr_at_10 value: 48.25 - type: mrr_at_100 value: 48.867 - type: mrr_at_1000 value: 48.908 - type: mrr_at_3 value: 46.03 - type: mrr_at_5 value: 47.355000000000004 - type: ndcg_at_1 value: 39.873 - type: ndcg_at_10 value: 47.933 - type: ndcg_at_100 value: 52.156000000000006 - type: ndcg_at_1000 value: 54.238 - type: ndcg_at_3 value: 43.791999999999994 - type: ndcg_at_5 value: 45.678999999999995 - type: precision_at_1 value: 39.873 - type: precision_at_10 value: 9.032 - type: precision_at_100 value: 1.419 - type: precision_at_1000 value: 0.192 - type: precision_at_3 value: 21.231 - type: precision_at_5 value: 14.981 - type: recall_at_1 value: 31.529 - type: recall_at_10 value: 57.925000000000004 - type: recall_at_100 value: 75.89 - type: recall_at_1000 value: 89.007 - type: recall_at_3 value: 45.363 - type: recall_at_5 value: 50.973 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 41.289 - type: map_at_10 value: 54.494 - type: map_at_100 value: 55.494 - type: map_at_1000 value: 55.545 - type: map_at_3 value: 51.20099999999999 - type: map_at_5 value: 53.147 - type: mrr_at_1 value: 47.335 - type: mrr_at_10 value: 57.772 - type: mrr_at_100 value: 58.428000000000004 - type: mrr_at_1000 value: 58.453 - type: mrr_at_3 value: 55.434000000000005 - type: mrr_at_5 value: 56.8 - type: ndcg_at_1 value: 47.335 - type: ndcg_at_10 value: 60.382999999999996 - type: ndcg_at_100 value: 64.294 - type: ndcg_at_1000 value: 65.211 - type: ndcg_at_3 value: 55.098 - type: ndcg_at_5 value: 57.776 - type: precision_at_1 value: 47.335 - type: precision_at_10 value: 9.724 - type: precision_at_100 value: 1.26 - type: precision_at_1000 value: 0.13699999999999998 - type: precision_at_3 value: 24.786 - type: precision_at_5 value: 16.977999999999998 - type: recall_at_1 value: 41.289 - type: recall_at_10 value: 74.36399999999999 - type: recall_at_100 value: 91.19800000000001 - type: recall_at_1000 value: 97.508 - type: recall_at_3 value: 60.285 - type: recall_at_5 value: 66.814 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.816999999999997 - type: map_at_10 value: 37.856 - type: map_at_100 value: 38.824 - type: map_at_1000 value: 38.902 - type: map_at_3 value: 34.982 - type: map_at_5 value: 36.831 - type: mrr_at_1 value: 31.073 - type: mrr_at_10 value: 39.985 - type: mrr_at_100 value: 40.802 - type: mrr_at_1000 value: 40.861999999999995 - type: mrr_at_3 value: 37.419999999999995 - type: mrr_at_5 value: 39.104 - type: ndcg_at_1 value: 31.073 - type: ndcg_at_10 value: 42.958 - type: ndcg_at_100 value: 47.671 - type: ndcg_at_1000 value: 49.633 - type: ndcg_at_3 value: 37.602000000000004 - type: ndcg_at_5 value: 40.688 - type: precision_at_1 value: 31.073 - type: precision_at_10 value: 6.531000000000001 - type: precision_at_100 value: 0.932 - type: precision_at_1000 value: 0.11399999999999999 - type: precision_at_3 value: 15.857 - type: precision_at_5 value: 11.209 - type: recall_at_1 value: 28.816999999999997 - type: recall_at_10 value: 56.538999999999994 - type: recall_at_100 value: 78.17699999999999 - type: recall_at_1000 value: 92.92200000000001 - type: recall_at_3 value: 42.294 - type: recall_at_5 value: 49.842999999999996 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 18.397 - type: map_at_10 value: 27.256999999999998 - type: map_at_100 value: 28.541 - type: map_at_1000 value: 28.658 - type: map_at_3 value: 24.565 - type: map_at_5 value: 26.211000000000002 - type: mrr_at_1 value: 22.761 - type: mrr_at_10 value: 32.248 - type: mrr_at_100 value: 33.171 - type: mrr_at_1000 value: 33.227000000000004 - type: mrr_at_3 value: 29.498 - type: mrr_at_5 value: 31.246000000000002 - type: ndcg_at_1 value: 22.761 - type: ndcg_at_10 value: 32.879999999999995 - type: ndcg_at_100 value: 38.913 - type: ndcg_at_1000 value: 41.504999999999995 - type: ndcg_at_3 value: 27.988000000000003 - type: ndcg_at_5 value: 30.548 - type: precision_at_1 value: 22.761 - type: precision_at_10 value: 6.045 - type: precision_at_100 value: 1.044 - type: precision_at_1000 value: 0.13999999999999999 - type: precision_at_3 value: 13.433 - type: precision_at_5 value: 9.925 - type: recall_at_1 value: 18.397 - type: recall_at_10 value: 45.14 - type: recall_at_100 value: 71.758 - type: recall_at_1000 value: 89.854 - type: recall_at_3 value: 31.942999999999998 - type: recall_at_5 value: 38.249 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 30.604 - type: map_at_10 value: 42.132 - type: map_at_100 value: 43.419000000000004 - type: map_at_1000 value: 43.527 - type: map_at_3 value: 38.614 - type: map_at_5 value: 40.705000000000005 - type: mrr_at_1 value: 37.824999999999996 - type: mrr_at_10 value: 47.696 - type: mrr_at_100 value: 48.483 - type: mrr_at_1000 value: 48.53 - type: mrr_at_3 value: 45.123999999999995 - type: mrr_at_5 value: 46.635 - type: ndcg_at_1 value: 37.824999999999996 - type: ndcg_at_10 value: 48.421 - type: ndcg_at_100 value: 53.568000000000005 - type: ndcg_at_1000 value: 55.574999999999996 - type: ndcg_at_3 value: 42.89 - type: ndcg_at_5 value: 45.683 - type: precision_at_1 value: 37.824999999999996 - type: precision_at_10 value: 8.758000000000001 - type: precision_at_100 value: 1.319 - type: precision_at_1000 value: 0.168 - type: precision_at_3 value: 20.244 - type: precision_at_5 value: 14.533 - type: recall_at_1 value: 30.604 - type: recall_at_10 value: 61.605 - type: recall_at_100 value: 82.787 - type: recall_at_1000 value: 95.78 - type: recall_at_3 value: 46.303 - type: recall_at_5 value: 53.351000000000006 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.262999999999998 - type: map_at_10 value: 36.858999999999995 - type: map_at_100 value: 38.241 - type: map_at_1000 value: 38.346999999999994 - type: map_at_3 value: 33.171 - type: map_at_5 value: 35.371 - type: mrr_at_1 value: 32.42 - type: mrr_at_10 value: 42.361 - type: mrr_at_100 value: 43.219 - type: mrr_at_1000 value: 43.271 - type: mrr_at_3 value: 39.593 - type: mrr_at_5 value: 41.248000000000005 - type: ndcg_at_1 value: 32.42 - type: ndcg_at_10 value: 43.081 - type: ndcg_at_100 value: 48.837 - type: ndcg_at_1000 value: 50.954 - type: ndcg_at_3 value: 37.413000000000004 - type: ndcg_at_5 value: 40.239000000000004 - type: precision_at_1 value: 32.42 - type: precision_at_10 value: 8.071 - type: precision_at_100 value: 1.272 - type: precision_at_1000 value: 0.163 - type: precision_at_3 value: 17.922 - type: precision_at_5 value: 13.311 - type: recall_at_1 value: 26.262999999999998 - type: recall_at_10 value: 56.062999999999995 - type: recall_at_100 value: 80.636 - type: recall_at_1000 value: 94.707 - type: recall_at_3 value: 40.425 - type: recall_at_5 value: 47.663 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.86616666666667 - type: map_at_10 value: 37.584999999999994 - type: map_at_100 value: 38.80291666666667 - type: map_at_1000 value: 38.91358333333333 - type: map_at_3 value: 34.498 - type: map_at_5 value: 36.269999999999996 - type: mrr_at_1 value: 33.07566666666667 - type: mrr_at_10 value: 41.92366666666666 - type: mrr_at_100 value: 42.73516666666667 - type: mrr_at_1000 value: 42.785666666666664 - type: mrr_at_3 value: 39.39075 - type: mrr_at_5 value: 40.89133333333334 - type: ndcg_at_1 value: 33.07566666666667 - type: ndcg_at_10 value: 43.19875 - type: ndcg_at_100 value: 48.32083333333334 - type: ndcg_at_1000 value: 50.418000000000006 - type: ndcg_at_3 value: 38.10308333333333 - type: ndcg_at_5 value: 40.5985 - type: precision_at_1 value: 33.07566666666667 - type: precision_at_10 value: 7.581916666666666 - type: precision_at_100 value: 1.1975 - type: precision_at_1000 value: 0.15699999999999997 - type: precision_at_3 value: 17.49075 - type: precision_at_5 value: 12.5135 - type: recall_at_1 value: 27.86616666666667 - type: recall_at_10 value: 55.449749999999995 - type: recall_at_100 value: 77.92516666666666 - type: recall_at_1000 value: 92.31358333333333 - type: recall_at_3 value: 41.324416666666664 - type: recall_at_5 value: 47.72533333333333 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.648 - type: map_at_10 value: 33.155 - type: map_at_100 value: 34.149 - type: map_at_1000 value: 34.239000000000004 - type: map_at_3 value: 30.959999999999997 - type: map_at_5 value: 32.172 - type: mrr_at_1 value: 30.061 - type: mrr_at_10 value: 36.229 - type: mrr_at_100 value: 37.088 - type: mrr_at_1000 value: 37.15 - type: mrr_at_3 value: 34.254 - type: mrr_at_5 value: 35.297 - type: ndcg_at_1 value: 30.061 - type: ndcg_at_10 value: 37.247 - type: ndcg_at_100 value: 42.093 - type: ndcg_at_1000 value: 44.45 - type: ndcg_at_3 value: 33.211 - type: ndcg_at_5 value: 35.083999999999996 - type: precision_at_1 value: 30.061 - type: precision_at_10 value: 5.7059999999999995 - type: precision_at_100 value: 0.8880000000000001 - type: precision_at_1000 value: 0.116 - type: precision_at_3 value: 13.957 - type: precision_at_5 value: 9.663 - type: recall_at_1 value: 26.648 - type: recall_at_10 value: 46.85 - type: recall_at_100 value: 68.87 - type: recall_at_1000 value: 86.508 - type: recall_at_3 value: 35.756 - type: recall_at_5 value: 40.376 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 19.058 - type: map_at_10 value: 26.722 - type: map_at_100 value: 27.863 - type: map_at_1000 value: 27.988000000000003 - type: map_at_3 value: 24.258 - type: map_at_5 value: 25.531 - type: mrr_at_1 value: 23.09 - type: mrr_at_10 value: 30.711 - type: mrr_at_100 value: 31.628 - type: mrr_at_1000 value: 31.702 - type: mrr_at_3 value: 28.418 - type: mrr_at_5 value: 29.685 - type: ndcg_at_1 value: 23.09 - type: ndcg_at_10 value: 31.643 - type: ndcg_at_100 value: 37.047999999999995 - type: ndcg_at_1000 value: 39.896 - type: ndcg_at_3 value: 27.189999999999998 - type: ndcg_at_5 value: 29.112 - type: precision_at_1 value: 23.09 - type: precision_at_10 value: 5.743 - type: precision_at_100 value: 1 - type: precision_at_1000 value: 0.14300000000000002 - type: precision_at_3 value: 12.790000000000001 - type: precision_at_5 value: 9.195 - type: recall_at_1 value: 19.058 - type: recall_at_10 value: 42.527 - type: recall_at_100 value: 66.833 - type: recall_at_1000 value: 87.008 - type: recall_at_3 value: 29.876 - type: recall_at_5 value: 34.922 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.066999999999997 - type: map_at_10 value: 37.543 - type: map_at_100 value: 38.725 - type: map_at_1000 value: 38.815 - type: map_at_3 value: 34.488 - type: map_at_5 value: 36.222 - type: mrr_at_1 value: 33.116 - type: mrr_at_10 value: 41.743 - type: mrr_at_100 value: 42.628 - type: mrr_at_1000 value: 42.675999999999995 - type: mrr_at_3 value: 39.241 - type: mrr_at_5 value: 40.622 - type: ndcg_at_1 value: 33.116 - type: ndcg_at_10 value: 43.089 - type: ndcg_at_100 value: 48.61 - type: ndcg_at_1000 value: 50.585 - type: ndcg_at_3 value: 37.816 - type: ndcg_at_5 value: 40.256 - type: precision_at_1 value: 33.116 - type: precision_at_10 value: 7.313 - type: precision_at_100 value: 1.1320000000000001 - type: precision_at_1000 value: 0.14200000000000002 - type: precision_at_3 value: 17.102 - type: precision_at_5 value: 12.09 - type: recall_at_1 value: 28.066999999999997 - type: recall_at_10 value: 55.684 - type: recall_at_100 value: 80.092 - type: recall_at_1000 value: 93.605 - type: recall_at_3 value: 41.277 - type: recall_at_5 value: 47.46 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 27.094 - type: map_at_10 value: 35.939 - type: map_at_100 value: 37.552 - type: map_at_1000 value: 37.771 - type: map_at_3 value: 32.414 - type: map_at_5 value: 34.505 - type: mrr_at_1 value: 32.609 - type: mrr_at_10 value: 40.521 - type: mrr_at_100 value: 41.479 - type: mrr_at_1000 value: 41.524 - type: mrr_at_3 value: 37.451 - type: mrr_at_5 value: 39.387 - type: ndcg_at_1 value: 32.609 - type: ndcg_at_10 value: 41.83 - type: ndcg_at_100 value: 47.763 - type: ndcg_at_1000 value: 50.102999999999994 - type: ndcg_at_3 value: 36.14 - type: ndcg_at_5 value: 39.153999999999996 - type: precision_at_1 value: 32.609 - type: precision_at_10 value: 7.925 - type: precision_at_100 value: 1.591 - type: precision_at_1000 value: 0.246 - type: precision_at_3 value: 16.337 - type: precision_at_5 value: 12.411 - type: recall_at_1 value: 27.094 - type: recall_at_10 value: 53.32900000000001 - type: recall_at_100 value: 79.52 - type: recall_at_1000 value: 93.958 - type: recall_at_3 value: 37.773 - type: recall_at_5 value: 45.321 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 22.649 - type: map_at_10 value: 30.569000000000003 - type: map_at_100 value: 31.444 - type: map_at_1000 value: 31.538 - type: map_at_3 value: 27.638 - type: map_at_5 value: 29.171000000000003 - type: mrr_at_1 value: 24.399 - type: mrr_at_10 value: 32.555 - type: mrr_at_100 value: 33.312000000000005 - type: mrr_at_1000 value: 33.376 - type: mrr_at_3 value: 29.820999999999998 - type: mrr_at_5 value: 31.402 - type: ndcg_at_1 value: 24.399 - type: ndcg_at_10 value: 35.741 - type: ndcg_at_100 value: 40.439 - type: ndcg_at_1000 value: 42.809000000000005 - type: ndcg_at_3 value: 30.020999999999997 - type: ndcg_at_5 value: 32.68 - type: precision_at_1 value: 24.399 - type: precision_at_10 value: 5.749 - type: precision_at_100 value: 0.878 - type: precision_at_1000 value: 0.117 - type: precision_at_3 value: 12.815999999999999 - type: precision_at_5 value: 9.242 - type: recall_at_1 value: 22.649 - type: recall_at_10 value: 49.818 - type: recall_at_100 value: 72.155 - type: recall_at_1000 value: 89.654 - type: recall_at_3 value: 34.528999999999996 - type: recall_at_5 value: 40.849999999999994 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 13.587 - type: map_at_10 value: 23.021 - type: map_at_100 value: 25.095 - type: map_at_1000 value: 25.295 - type: map_at_3 value: 19.463 - type: map_at_5 value: 21.389 - type: mrr_at_1 value: 29.576999999999998 - type: mrr_at_10 value: 41.44 - type: mrr_at_100 value: 42.497 - type: mrr_at_1000 value: 42.529 - type: mrr_at_3 value: 38.284 - type: mrr_at_5 value: 40.249 - type: ndcg_at_1 value: 29.576999999999998 - type: ndcg_at_10 value: 31.491000000000003 - type: ndcg_at_100 value: 39.352 - type: ndcg_at_1000 value: 42.703 - type: ndcg_at_3 value: 26.284999999999997 - type: ndcg_at_5 value: 28.218 - type: precision_at_1 value: 29.576999999999998 - type: precision_at_10 value: 9.713 - type: precision_at_100 value: 1.8079999999999998 - type: precision_at_1000 value: 0.243 - type: precision_at_3 value: 19.608999999999998 - type: precision_at_5 value: 14.957999999999998 - type: recall_at_1 value: 13.587 - type: recall_at_10 value: 37.001 - type: recall_at_100 value: 63.617999999999995 - type: recall_at_1000 value: 82.207 - type: recall_at_3 value: 24.273 - type: recall_at_5 value: 29.813000000000002 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 9.98 - type: map_at_10 value: 20.447000000000003 - type: map_at_100 value: 29.032999999999998 - type: map_at_1000 value: 30.8 - type: map_at_3 value: 15.126999999999999 - type: map_at_5 value: 17.327 - type: mrr_at_1 value: 71.25 - type: mrr_at_10 value: 78.014 - type: mrr_at_100 value: 78.303 - type: mrr_at_1000 value: 78.309 - type: mrr_at_3 value: 76.375 - type: mrr_at_5 value: 77.58699999999999 - type: ndcg_at_1 value: 57.99999999999999 - type: ndcg_at_10 value: 41.705 - type: ndcg_at_100 value: 47.466 - type: ndcg_at_1000 value: 55.186 - type: ndcg_at_3 value: 47.089999999999996 - type: ndcg_at_5 value: 43.974000000000004 - type: precision_at_1 value: 71.25 - type: precision_at_10 value: 32.65 - type: precision_at_100 value: 10.89 - type: precision_at_1000 value: 2.197 - type: precision_at_3 value: 50.5 - type: precision_at_5 value: 42.199999999999996 - type: recall_at_1 value: 9.98 - type: recall_at_10 value: 25.144 - type: recall_at_100 value: 53.754999999999995 - type: recall_at_1000 value: 78.56400000000001 - type: recall_at_3 value: 15.964 - type: recall_at_5 value: 19.186 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 54.67999999999999 - type: f1 value: 49.48247525503583 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 74.798 - type: map_at_10 value: 82.933 - type: map_at_100 value: 83.157 - type: map_at_1000 value: 83.173 - type: map_at_3 value: 81.80199999999999 - type: map_at_5 value: 82.55 - type: mrr_at_1 value: 80.573 - type: mrr_at_10 value: 87.615 - type: mrr_at_100 value: 87.69 - type: mrr_at_1000 value: 87.69200000000001 - type: mrr_at_3 value: 86.86399999999999 - type: mrr_at_5 value: 87.386 - type: ndcg_at_1 value: 80.573 - type: ndcg_at_10 value: 86.64500000000001 - type: ndcg_at_100 value: 87.407 - type: ndcg_at_1000 value: 87.68299999999999 - type: ndcg_at_3 value: 84.879 - type: ndcg_at_5 value: 85.921 - type: precision_at_1 value: 80.573 - type: precision_at_10 value: 10.348 - type: precision_at_100 value: 1.093 - type: precision_at_1000 value: 0.11399999999999999 - type: precision_at_3 value: 32.268 - type: precision_at_5 value: 20.084 - type: recall_at_1 value: 74.798 - type: recall_at_10 value: 93.45400000000001 - type: recall_at_100 value: 96.42500000000001 - type: recall_at_1000 value: 98.158 - type: recall_at_3 value: 88.634 - type: recall_at_5 value: 91.295 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 20.567 - type: map_at_10 value: 32.967999999999996 - type: map_at_100 value: 35.108 - type: map_at_1000 value: 35.272999999999996 - type: map_at_3 value: 28.701999999999998 - type: map_at_5 value: 31.114000000000004 - type: mrr_at_1 value: 40.432 - type: mrr_at_10 value: 48.956 - type: mrr_at_100 value: 49.832 - type: mrr_at_1000 value: 49.87 - type: mrr_at_3 value: 46.759 - type: mrr_at_5 value: 47.886 - type: ndcg_at_1 value: 40.432 - type: ndcg_at_10 value: 40.644000000000005 - type: ndcg_at_100 value: 48.252 - type: ndcg_at_1000 value: 51.099000000000004 - type: ndcg_at_3 value: 36.992000000000004 - type: ndcg_at_5 value: 38.077 - type: precision_at_1 value: 40.432 - type: precision_at_10 value: 11.296000000000001 - type: precision_at_100 value: 1.9009999999999998 - type: precision_at_1000 value: 0.241 - type: precision_at_3 value: 24.537 - type: precision_at_5 value: 17.963 - type: recall_at_1 value: 20.567 - type: recall_at_10 value: 47.052 - type: recall_at_100 value: 75.21600000000001 - type: recall_at_1000 value: 92.285 - type: recall_at_3 value: 33.488 - type: recall_at_5 value: 39.334 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 38.196999999999996 - type: map_at_10 value: 60.697 - type: map_at_100 value: 61.624 - type: map_at_1000 value: 61.692 - type: map_at_3 value: 57.421 - type: map_at_5 value: 59.455000000000005 - type: mrr_at_1 value: 76.39399999999999 - type: mrr_at_10 value: 82.504 - type: mrr_at_100 value: 82.71300000000001 - type: mrr_at_1000 value: 82.721 - type: mrr_at_3 value: 81.494 - type: mrr_at_5 value: 82.137 - type: ndcg_at_1 value: 76.39399999999999 - type: ndcg_at_10 value: 68.92200000000001 - type: ndcg_at_100 value: 72.13199999999999 - type: ndcg_at_1000 value: 73.392 - type: ndcg_at_3 value: 64.226 - type: ndcg_at_5 value: 66.815 - type: precision_at_1 value: 76.39399999999999 - type: precision_at_10 value: 14.442 - type: precision_at_100 value: 1.694 - type: precision_at_1000 value: 0.186 - type: precision_at_3 value: 41.211 - type: precision_at_5 value: 26.766000000000002 - type: recall_at_1 value: 38.196999999999996 - type: recall_at_10 value: 72.208 - type: recall_at_100 value: 84.71300000000001 - type: recall_at_1000 value: 92.971 - type: recall_at_3 value: 61.816 - type: recall_at_5 value: 66.914 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 89.6556 - type: ap value: 85.27600392682054 - type: f1 value: 89.63353655386406 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 21.482 - type: map_at_10 value: 33.701 - type: map_at_100 value: 34.861 - type: map_at_1000 value: 34.914 - type: map_at_3 value: 29.793999999999997 - type: map_at_5 value: 32.072 - type: mrr_at_1 value: 22.163 - type: mrr_at_10 value: 34.371 - type: mrr_at_100 value: 35.471000000000004 - type: mrr_at_1000 value: 35.518 - type: mrr_at_3 value: 30.554 - type: mrr_at_5 value: 32.799 - type: ndcg_at_1 value: 22.163 - type: ndcg_at_10 value: 40.643 - type: ndcg_at_100 value: 46.239999999999995 - type: ndcg_at_1000 value: 47.526 - type: ndcg_at_3 value: 32.714999999999996 - type: ndcg_at_5 value: 36.791000000000004 - type: precision_at_1 value: 22.163 - type: precision_at_10 value: 6.4799999999999995 - type: precision_at_100 value: 0.928 - type: precision_at_1000 value: 0.104 - type: precision_at_3 value: 14.002 - type: precision_at_5 value: 10.453 - type: recall_at_1 value: 21.482 - type: recall_at_10 value: 61.953 - type: recall_at_100 value: 87.86500000000001 - type: recall_at_1000 value: 97.636 - type: recall_at_3 value: 40.441 - type: recall_at_5 value: 50.27 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 95.3032375740994 - type: f1 value: 95.01515022686607 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 78.10077519379846 - type: f1 value: 58.240739725625644 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 76.0053799596503 - type: f1 value: 74.11733965804146 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 79.64021519838602 - type: f1 value: 79.8513960091438 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 33.92425767945184 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 32.249612382060754 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 32.35584955492918 - type: mrr value: 33.545865224584674 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 6.978 - type: map_at_10 value: 14.749 - type: map_at_100 value: 19.192 - type: map_at_1000 value: 20.815 - type: map_at_3 value: 10.927000000000001 - type: map_at_5 value: 12.726 - type: mrr_at_1 value: 49.536 - type: mrr_at_10 value: 57.806999999999995 - type: mrr_at_100 value: 58.373 - type: mrr_at_1000 value: 58.407 - type: mrr_at_3 value: 55.779 - type: mrr_at_5 value: 57.095 - type: ndcg_at_1 value: 46.749 - type: ndcg_at_10 value: 37.644 - type: ndcg_at_100 value: 35.559000000000005 - type: ndcg_at_1000 value: 44.375 - type: ndcg_at_3 value: 43.354 - type: ndcg_at_5 value: 41.022999999999996 - type: precision_at_1 value: 48.607 - type: precision_at_10 value: 28.08 - type: precision_at_100 value: 9.155000000000001 - type: precision_at_1000 value: 2.2270000000000003 - type: precision_at_3 value: 40.764 - type: precision_at_5 value: 35.728 - type: recall_at_1 value: 6.978 - type: recall_at_10 value: 17.828 - type: recall_at_100 value: 36.010999999999996 - type: recall_at_1000 value: 68.34700000000001 - type: recall_at_3 value: 11.645999999999999 - type: recall_at_5 value: 14.427000000000001 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 30.219 - type: map_at_10 value: 45.633 - type: map_at_100 value: 46.752 - type: map_at_1000 value: 46.778999999999996 - type: map_at_3 value: 41.392 - type: map_at_5 value: 43.778 - type: mrr_at_1 value: 34.327999999999996 - type: mrr_at_10 value: 48.256 - type: mrr_at_100 value: 49.076 - type: mrr_at_1000 value: 49.092999999999996 - type: mrr_at_3 value: 44.786 - type: mrr_at_5 value: 46.766000000000005 - type: ndcg_at_1 value: 34.299 - type: ndcg_at_10 value: 53.434000000000005 - type: ndcg_at_100 value: 58.03 - type: ndcg_at_1000 value: 58.633 - type: ndcg_at_3 value: 45.433 - type: ndcg_at_5 value: 49.379 - type: precision_at_1 value: 34.299 - type: precision_at_10 value: 8.911 - type: precision_at_100 value: 1.145 - type: precision_at_1000 value: 0.12 - type: precision_at_3 value: 20.896 - type: precision_at_5 value: 14.832 - type: recall_at_1 value: 30.219 - type: recall_at_10 value: 74.59400000000001 - type: recall_at_100 value: 94.392 - type: recall_at_1000 value: 98.832 - type: recall_at_3 value: 53.754000000000005 - type: recall_at_5 value: 62.833000000000006 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 71.139 - type: map_at_10 value: 85.141 - type: map_at_100 value: 85.78099999999999 - type: map_at_1000 value: 85.795 - type: map_at_3 value: 82.139 - type: map_at_5 value: 84.075 - type: mrr_at_1 value: 81.98 - type: mrr_at_10 value: 88.056 - type: mrr_at_100 value: 88.152 - type: mrr_at_1000 value: 88.152 - type: mrr_at_3 value: 87.117 - type: mrr_at_5 value: 87.78099999999999 - type: ndcg_at_1 value: 82.02000000000001 - type: ndcg_at_10 value: 88.807 - type: ndcg_at_100 value: 89.99000000000001 - type: ndcg_at_1000 value: 90.068 - type: ndcg_at_3 value: 85.989 - type: ndcg_at_5 value: 87.627 - type: precision_at_1 value: 82.02000000000001 - type: precision_at_10 value: 13.472999999999999 - type: precision_at_100 value: 1.534 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.553 - type: precision_at_5 value: 24.788 - type: recall_at_1 value: 71.139 - type: recall_at_10 value: 95.707 - type: recall_at_100 value: 99.666 - type: recall_at_1000 value: 99.983 - type: recall_at_3 value: 87.64699999999999 - type: recall_at_5 value: 92.221 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 59.11035509193503 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 62.44241881422526 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 5.122999999999999 - type: map_at_10 value: 14.45 - type: map_at_100 value: 17.108999999999998 - type: map_at_1000 value: 17.517 - type: map_at_3 value: 10.213999999999999 - type: map_at_5 value: 12.278 - type: mrr_at_1 value: 25.3 - type: mrr_at_10 value: 37.791999999999994 - type: mrr_at_100 value: 39.086 - type: mrr_at_1000 value: 39.121 - type: mrr_at_3 value: 34.666999999999994 - type: mrr_at_5 value: 36.472 - type: ndcg_at_1 value: 25.3 - type: ndcg_at_10 value: 23.469 - type: ndcg_at_100 value: 33.324 - type: ndcg_at_1000 value: 39.357 - type: ndcg_at_3 value: 22.478 - type: ndcg_at_5 value: 19.539 - type: precision_at_1 value: 25.3 - type: precision_at_10 value: 12.3 - type: precision_at_100 value: 2.654 - type: precision_at_1000 value: 0.40800000000000003 - type: precision_at_3 value: 21.667 - type: precision_at_5 value: 17.5 - type: recall_at_1 value: 5.122999999999999 - type: recall_at_10 value: 24.937 - type: recall_at_100 value: 53.833 - type: recall_at_1000 value: 82.85 - type: recall_at_3 value: 13.178 - type: recall_at_5 value: 17.747 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_pearson value: 86.76549431206278 - type: cos_sim_spearman value: 81.28563534883214 - type: euclidean_pearson value: 84.17180713818567 - type: euclidean_spearman value: 81.1684082302606 - type: manhattan_pearson value: 84.12189753972959 - type: manhattan_spearman value: 81.1134998997958 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_pearson value: 85.75137587182017 - type: cos_sim_spearman value: 76.155337187325 - type: euclidean_pearson value: 83.54551546726665 - type: euclidean_spearman value: 76.30324990565346 - type: manhattan_pearson value: 83.52192617483797 - type: manhattan_spearman value: 76.30017227216015 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_pearson value: 87.13890050398628 - type: cos_sim_spearman value: 87.84898360302155 - type: euclidean_pearson value: 86.89491809082031 - type: euclidean_spearman value: 87.99935689905651 - type: manhattan_pearson value: 86.86526424376366 - type: manhattan_spearman value: 87.96850732980495 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_pearson value: 86.01978753231558 - type: cos_sim_spearman value: 83.38989083933329 - type: euclidean_pearson value: 85.28405032045376 - type: euclidean_spearman value: 83.51703914276501 - type: manhattan_pearson value: 85.25775133078966 - type: manhattan_spearman value: 83.52815667821727 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_pearson value: 88.28482294437876 - type: cos_sim_spearman value: 89.42976214499576 - type: euclidean_pearson value: 88.72677957272468 - type: euclidean_spearman value: 89.30001736116229 - type: manhattan_pearson value: 88.64119331622562 - type: manhattan_spearman value: 89.21771022634893 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_pearson value: 83.79810159351987 - type: cos_sim_spearman value: 85.34918402034273 - type: euclidean_pearson value: 84.76058606229002 - type: euclidean_spearman value: 85.45159829941214 - type: manhattan_pearson value: 84.73926491888156 - type: manhattan_spearman value: 85.42568221985898 - task: type: STS dataset: type: mteb/sts17-crosslingual-sts name: MTEB STS17 (en-en) config: en-en split: test revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d metrics: - type: cos_sim_pearson value: 88.92796712570272 - type: cos_sim_spearman value: 88.58925922945812 - type: euclidean_pearson value: 88.97231215531797 - type: euclidean_spearman value: 88.27036385068719 - type: manhattan_pearson value: 88.95761469412228 - type: manhattan_spearman value: 88.23980432487681 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (en) config: en split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 66.85679810182282 - type: cos_sim_spearman value: 67.80696709003128 - type: euclidean_pearson value: 68.77524185947989 - type: euclidean_spearman value: 68.032438075422 - type: manhattan_pearson value: 68.60489100404182 - type: manhattan_spearman value: 67.75418889226138 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_pearson value: 86.33287880999367 - type: cos_sim_spearman value: 87.32401087204754 - type: euclidean_pearson value: 87.27961069148029 - type: euclidean_spearman value: 87.3547683085868 - type: manhattan_pearson value: 87.24405442789622 - type: manhattan_spearman value: 87.32896271166672 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 87.71553665286558 - type: mrr value: 96.42436176749902 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 61.094 - type: map_at_10 value: 71.066 - type: map_at_100 value: 71.608 - type: map_at_1000 value: 71.629 - type: map_at_3 value: 68.356 - type: map_at_5 value: 70.15 - type: mrr_at_1 value: 64 - type: mrr_at_10 value: 71.82300000000001 - type: mrr_at_100 value: 72.251 - type: mrr_at_1000 value: 72.269 - type: mrr_at_3 value: 69.833 - type: mrr_at_5 value: 71.11699999999999 - type: ndcg_at_1 value: 64 - type: ndcg_at_10 value: 75.286 - type: ndcg_at_100 value: 77.40700000000001 - type: ndcg_at_1000 value: 77.806 - type: ndcg_at_3 value: 70.903 - type: ndcg_at_5 value: 73.36399999999999 - type: precision_at_1 value: 64 - type: precision_at_10 value: 9.9 - type: precision_at_100 value: 1.093 - type: precision_at_1000 value: 0.11199999999999999 - type: precision_at_3 value: 27.667 - type: precision_at_5 value: 18.333 - type: recall_at_1 value: 61.094 - type: recall_at_10 value: 87.256 - type: recall_at_100 value: 96.5 - type: recall_at_1000 value: 99.333 - type: recall_at_3 value: 75.6 - type: recall_at_5 value: 81.789 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.82871287128712 - type: cos_sim_ap value: 95.9325677692287 - type: cos_sim_f1 value: 91.13924050632912 - type: cos_sim_precision value: 92.3076923076923 - type: cos_sim_recall value: 90 - type: dot_accuracy value: 99.7980198019802 - type: dot_ap value: 94.56107207796 - type: dot_f1 value: 89.41908713692946 - type: dot_precision value: 92.88793103448276 - type: dot_recall value: 86.2 - type: euclidean_accuracy value: 99.82871287128712 - type: euclidean_ap value: 95.94390332507025 - type: euclidean_f1 value: 91.17797042325346 - type: euclidean_precision value: 93.02809573361083 - type: euclidean_recall value: 89.4 - type: manhattan_accuracy value: 99.82871287128712 - type: manhattan_ap value: 95.97587114452257 - type: manhattan_f1 value: 91.25821121778675 - type: manhattan_precision value: 92.23697650663942 - type: manhattan_recall value: 90.3 - type: max_accuracy value: 99.82871287128712 - type: max_ap value: 95.97587114452257 - type: max_f1 value: 91.25821121778675 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 66.13974351708839 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 35.594544722932234 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 54.718738983377726 - type: mrr value: 55.61655154486037 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 30.37028359646597 - type: cos_sim_spearman value: 30.866534307244443 - type: dot_pearson value: 29.89037691541816 - type: dot_spearman value: 29.941267567971718 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.20400000000000001 - type: map_at_10 value: 1.7340000000000002 - type: map_at_100 value: 9.966 - type: map_at_1000 value: 25.119000000000003 - type: map_at_3 value: 0.596 - type: map_at_5 value: 0.941 - type: mrr_at_1 value: 76 - type: mrr_at_10 value: 85.85199999999999 - type: mrr_at_100 value: 85.85199999999999 - type: mrr_at_1000 value: 85.85199999999999 - type: mrr_at_3 value: 84.667 - type: mrr_at_5 value: 85.56700000000001 - type: ndcg_at_1 value: 71 - type: ndcg_at_10 value: 69.60300000000001 - type: ndcg_at_100 value: 54.166000000000004 - type: ndcg_at_1000 value: 51.085 - type: ndcg_at_3 value: 71.95 - type: ndcg_at_5 value: 71.17599999999999 - type: precision_at_1 value: 76 - type: precision_at_10 value: 74.2 - type: precision_at_100 value: 55.96 - type: precision_at_1000 value: 22.584 - type: precision_at_3 value: 77.333 - type: precision_at_5 value: 75.6 - type: recall_at_1 value: 0.20400000000000001 - type: recall_at_10 value: 1.992 - type: recall_at_100 value: 13.706999999999999 - type: recall_at_1000 value: 48.732 - type: recall_at_3 value: 0.635 - type: recall_at_5 value: 1.034 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (sqi-eng) config: sqi-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 8 - type: f1 value: 6.298401229470593 - type: precision value: 5.916991709050532 - type: recall value: 8 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (fry-eng) config: fry-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 17.341040462427745 - type: f1 value: 14.621650026274303 - type: precision value: 13.9250609139035 - type: recall value: 17.341040462427745 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (kur-eng) config: kur-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 8.536585365853659 - type: f1 value: 6.30972482801751 - type: precision value: 5.796517326875398 - type: recall value: 8.536585365853659 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tur-eng) config: tur-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 6.4 - type: f1 value: 4.221126743626743 - type: precision value: 3.822815143403898 - type: recall value: 6.4 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (deu-eng) config: deu-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 19.8 - type: f1 value: 18.13768093781855 - type: precision value: 17.54646004378763 - type: recall value: 19.8 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (nld-eng) config: nld-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 13.700000000000001 - type: f1 value: 12.367662337662336 - type: precision value: 11.934237966189185 - type: recall value: 13.700000000000001 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ron-eng) config: ron-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 14.299999999999999 - type: f1 value: 10.942180289268338 - type: precision value: 10.153968847262192 - type: recall value: 14.299999999999999 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ang-eng) config: ang-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 22.388059701492537 - type: f1 value: 17.00157733660433 - type: precision value: 15.650551589876702 - type: recall value: 22.388059701492537 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ido-eng) config: ido-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 22 - type: f1 value: 17.4576947358322 - type: precision value: 16.261363669827777 - type: recall value: 22 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (jav-eng) config: jav-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 8.292682926829269 - type: f1 value: 5.544048456005624 - type: precision value: 5.009506603002538 - type: recall value: 8.292682926829269 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (isl-eng) config: isl-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.4 - type: f1 value: 4.148897174789229 - type: precision value: 3.862217259449564 - type: recall value: 5.4 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (slv-eng) config: slv-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.5893074119076545 - type: f1 value: 4.375041810373159 - type: precision value: 4.181207113088141 - type: recall value: 5.5893074119076545 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (cym-eng) config: cym-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 8.17391304347826 - type: f1 value: 6.448011891490153 - type: precision value: 5.9719116632160105 - type: recall value: 8.17391304347826 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (kaz-eng) config: kaz-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.8695652173913043 - type: f1 value: 0.582815734989648 - type: precision value: 0.5580885233059146 - type: recall value: 0.8695652173913043 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (est-eng) config: est-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.1 - type: f1 value: 3.5000615825615826 - type: precision value: 3.2073523577994707 - type: recall value: 5.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (heb-eng) config: heb-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.3 - type: f1 value: 0.10109884927372195 - type: precision value: 0.10055127118392897 - type: recall value: 0.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (gla-eng) config: gla-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.8600723763570564 - type: f1 value: 2.8177402725050493 - type: precision value: 2.5662687819699213 - type: recall value: 3.8600723763570564 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (mar-eng) config: mar-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0 - type: f1 value: 0 - type: precision value: 0 - type: recall value: 0 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (lat-eng) config: lat-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 15.299999999999999 - type: f1 value: 11.377964359824292 - type: precision value: 10.361140908892764 - type: recall value: 15.299999999999999 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (bel-eng) config: bel-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.3 - type: f1 value: 0.9600820232399179 - type: precision value: 0.9151648856810397 - type: recall value: 1.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (pms-eng) config: pms-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 14.095238095238095 - type: f1 value: 11.40081541819044 - type: precision value: 10.645867976820359 - type: recall value: 14.095238095238095 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (gle-eng) config: gle-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4 - type: f1 value: 2.3800704501963432 - type: precision value: 2.0919368034607455 - type: recall value: 4 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (pes-eng) config: pes-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.3 - type: f1 value: 0.2002053388090349 - type: precision value: 0.2001027749229188 - type: recall value: 0.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (nob-eng) config: nob-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 11.700000000000001 - type: f1 value: 10.29755634495992 - type: precision value: 9.876637220292393 - type: recall value: 11.700000000000001 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (bul-eng) config: bul-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.7000000000000002 - type: f1 value: 0.985815849620051 - type: precision value: 0.8884689922480621 - type: recall value: 1.7000000000000002 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (cbk-eng) config: cbk-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 17.599999999999998 - type: f1 value: 14.086312656126182 - type: precision value: 13.192360560816125 - type: recall value: 17.599999999999998 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (hun-eng) config: hun-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 6.1 - type: f1 value: 4.683795729173087 - type: precision value: 4.31687579027912 - type: recall value: 6.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (uig-eng) config: uig-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.4 - type: f1 value: 0.20966666666666667 - type: precision value: 0.20500700280112047 - type: recall value: 0.4 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (rus-eng) config: rus-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.6 - type: f1 value: 0.2454665118079752 - type: precision value: 0.2255125167991618 - type: recall value: 0.6 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (spa-eng) config: spa-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 21 - type: f1 value: 18.965901242066018 - type: precision value: 18.381437375171 - type: recall value: 21 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (hye-eng) config: hye-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.5390835579514826 - type: f1 value: 0.4048898457205192 - type: precision value: 0.4046018763809678 - type: recall value: 0.5390835579514826 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tel-eng) config: tel-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.282051282051282 - type: f1 value: 0.5098554872310529 - type: precision value: 0.4715099715099715 - type: recall value: 1.282051282051282 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (afr-eng) config: afr-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 10.7 - type: f1 value: 8.045120643200706 - type: precision value: 7.387598023074453 - type: recall value: 10.7 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (mon-eng) config: mon-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 2.272727272727273 - type: f1 value: 1.44184724004356 - type: precision value: 1.4082306862044767 - type: recall value: 2.272727272727273 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (arz-eng) config: arz-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.20964360587002098 - type: f1 value: 0.001335309591528796 - type: precision value: 0.0006697878781789807 - type: recall value: 0.20964360587002098 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (hrv-eng) config: hrv-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 7.1 - type: f1 value: 5.522254020507502 - type: precision value: 5.081849426723903 - type: recall value: 7.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (nov-eng) config: nov-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 36.57587548638132 - type: f1 value: 30.325515383881147 - type: precision value: 28.59255854392041 - type: recall value: 36.57587548638132 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (gsw-eng) config: gsw-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 16.23931623931624 - type: f1 value: 13.548783761549718 - type: precision value: 13.0472896359184 - type: recall value: 16.23931623931624 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (nds-eng) config: nds-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 16.3 - type: f1 value: 13.3418584934734 - type: precision value: 12.506853047473756 - type: recall value: 16.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ukr-eng) config: ukr-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1 - type: f1 value: 0.7764001197963462 - type: precision value: 0.7551049317943337 - type: recall value: 1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (uzb-eng) config: uzb-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.9719626168224296 - type: f1 value: 3.190729401654313 - type: precision value: 3.001159168296747 - type: recall value: 3.9719626168224296 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (lit-eng) config: lit-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.4000000000000004 - type: f1 value: 2.4847456001574653 - type: precision value: 2.308739271803959 - type: recall value: 3.4000000000000004 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ina-eng) config: ina-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 36.9 - type: f1 value: 31.390407955063697 - type: precision value: 29.631294298308614 - type: recall value: 36.9 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (lfn-eng) config: lfn-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 14.2 - type: f1 value: 12.551591810861895 - type: precision value: 12.100586917562724 - type: recall value: 14.2 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (zsm-eng) config: zsm-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 9.2 - type: f1 value: 7.5561895648211435 - type: precision value: 7.177371101110253 - type: recall value: 9.2 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ita-eng) config: ita-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 21.2 - type: f1 value: 18.498268429117875 - type: precision value: 17.693915156965357 - type: recall value: 21.2 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (cmn-eng) config: cmn-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4.2 - type: f1 value: 2.886572782530936 - type: precision value: 2.5806792595351915 - type: recall value: 4.2 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (lvs-eng) config: lvs-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 6.800000000000001 - type: f1 value: 4.881091920308238 - type: precision value: 4.436731163345769 - type: recall value: 6.800000000000001 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (glg-eng) config: glg-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 22.1 - type: f1 value: 18.493832677140738 - type: precision value: 17.52055858924503 - type: recall value: 22.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ceb-eng) config: ceb-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 6 - type: f1 value: 4.58716840215435 - type: precision value: 4.303119297298687 - type: recall value: 6 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (bre-eng) config: bre-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.5 - type: f1 value: 3.813678559437776 - type: precision value: 3.52375763382276 - type: recall value: 5.5 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ben-eng) config: ben-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.2 - type: f1 value: 0.06701509872241579 - type: precision value: 0.05017452006980803 - type: recall value: 0.2 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (swg-eng) config: swg-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 12.5 - type: f1 value: 9.325396825396826 - type: precision value: 8.681972789115646 - type: recall value: 12.5 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (arq-eng) config: arq-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.43907793633369924 - type: f1 value: 0.26369680618309754 - type: precision value: 0.24710650393580552 - type: recall value: 0.43907793633369924 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (kab-eng) config: kab-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.7000000000000002 - type: f1 value: 1.0240727731562105 - type: precision value: 0.9379457073996874 - type: recall value: 1.7000000000000002 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (fra-eng) config: fra-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 24.6 - type: f1 value: 21.527732683982684 - type: precision value: 20.460911398969852 - type: recall value: 24.6 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (por-eng) config: por-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 23.400000000000002 - type: f1 value: 18.861948871033608 - type: precision value: 17.469730524988158 - type: recall value: 23.400000000000002 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tat-eng) config: tat-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.3 - type: f1 value: 0.8081609699284277 - type: precision value: 0.8041232161030668 - type: recall value: 1.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (oci-eng) config: oci-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 14.399999999999999 - type: f1 value: 11.982642360594898 - type: precision value: 11.423911681034546 - type: recall value: 14.399999999999999 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (pol-eng) config: pol-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 8.7 - type: f1 value: 6.565099922088448 - type: precision value: 6.009960806394631 - type: recall value: 8.7 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (war-eng) config: war-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 7.1 - type: f1 value: 5.483244116053285 - type: precision value: 5.08036675810842 - type: recall value: 7.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (aze-eng) config: aze-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4.3999999999999995 - type: f1 value: 3.2643948695904146 - type: precision value: 3.031506651474311 - type: recall value: 4.3999999999999995 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (vie-eng) config: vie-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 7.1 - type: f1 value: 5.2787766765398345 - type: precision value: 4.883891459552525 - type: recall value: 7.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (nno-eng) config: nno-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 8.5 - type: f1 value: 7.022436974789914 - type: precision value: 6.517919923571304 - type: recall value: 8.5 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (cha-eng) config: cha-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 17.51824817518248 - type: f1 value: 14.159211038143834 - type: precision value: 13.419131771033424 - type: recall value: 17.51824817518248 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (mhr-eng) config: mhr-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.3 - type: f1 value: 0.1008802791411487 - type: precision value: 0.10044111373948113 - type: recall value: 0.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (dan-eng) config: dan-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 11.3 - type: f1 value: 10.0642631078894 - type: precision value: 9.714481189937882 - type: recall value: 11.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ell-eng) config: ell-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.7000000000000001 - type: f1 value: 0.5023625310859353 - type: precision value: 0.5011883541295307 - type: recall value: 0.7000000000000001 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (amh-eng) config: amh-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.7857142857142856 - type: f1 value: 0.6731500547238763 - type: precision value: 0.6364087301587301 - type: recall value: 1.7857142857142856 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (pam-eng) config: pam-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 7.000000000000001 - type: f1 value: 4.850226809905071 - type: precision value: 4.3549672188068485 - type: recall value: 7.000000000000001 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (hsb-eng) config: hsb-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.383022774327122 - type: f1 value: 4.080351427081423 - type: precision value: 3.7431771127423294 - type: recall value: 5.383022774327122 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (srp-eng) config: srp-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.9 - type: f1 value: 2.975065835065835 - type: precision value: 2.7082951373488764 - type: recall value: 3.9 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (epo-eng) config: epo-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 13.8 - type: f1 value: 10.976459812917616 - type: precision value: 10.214566903851944 - type: recall value: 13.8 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (kzj-eng) config: kzj-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4.9 - type: f1 value: 3.5998112099809334 - type: precision value: 3.391430386128988 - type: recall value: 4.9 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (awa-eng) config: awa-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 2.1645021645021645 - type: f1 value: 0.28969205674033943 - type: precision value: 0.1648931376979724 - type: recall value: 2.1645021645021645 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (fao-eng) config: fao-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 9.541984732824428 - type: f1 value: 8.129327179123026 - type: precision value: 7.860730567672363 - type: recall value: 9.541984732824428 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (mal-eng) config: mal-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.5822416302765648 - type: f1 value: 0.3960292169899156 - type: precision value: 0.36794436357755134 - type: recall value: 0.5822416302765648 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ile-eng) config: ile-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 25.900000000000002 - type: f1 value: 20.98162273769728 - type: precision value: 19.591031936732236 - type: recall value: 25.900000000000002 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (bos-eng) config: bos-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 9.322033898305085 - type: f1 value: 7.1764632211739166 - type: precision value: 6.547619047619047 - type: recall value: 9.322033898305085 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (cor-eng) config: cor-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4.3999999999999995 - type: f1 value: 3.0484795026022216 - type: precision value: 2.8132647991077686 - type: recall value: 4.3999999999999995 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (cat-eng) config: cat-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 18.8 - type: f1 value: 15.52276497119774 - type: precision value: 14.63296284434154 - type: recall value: 18.8 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (eus-eng) config: eus-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 10 - type: f1 value: 7.351901305737391 - type: precision value: 6.759061952118555 - type: recall value: 10 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (yue-eng) config: yue-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.1 - type: f1 value: 2.1527437641723353 - type: precision value: 2.0008336640383417 - type: recall value: 3.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (swe-eng) config: swe-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 10.6 - type: f1 value: 8.471815215313617 - type: precision value: 7.942319409218233 - type: recall value: 10.6 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (dtp-eng) config: dtp-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4.3 - type: f1 value: 2.7338036427188244 - type: precision value: 2.5492261384839052 - type: recall value: 4.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (kat-eng) config: kat-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.40214477211796246 - type: f1 value: 0.28150134048257375 - type: precision value: 0.2751516861859743 - type: recall value: 0.40214477211796246 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (jpn-eng) config: jpn-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3 - type: f1 value: 1.5834901411814404 - type: precision value: 1.3894010894944848 - type: recall value: 3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (csb-eng) config: csb-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 7.905138339920949 - type: f1 value: 6.6397047981096735 - type: precision value: 6.32664437012263 - type: recall value: 7.905138339920949 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (xho-eng) config: xho-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.5211267605633805 - type: f1 value: 2.173419196807775 - type: precision value: 2.14388897487489 - type: recall value: 3.5211267605633805 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (orv-eng) config: orv-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.23952095808383234 - type: f1 value: 0.001262128032547595 - type: precision value: 0.0006327654461278806 - type: recall value: 0.23952095808383234 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ind-eng) config: ind-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 10.4 - type: f1 value: 8.370422351826372 - type: precision value: 7.943809523809523 - type: recall value: 10.4 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tuk-eng) config: tuk-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.41871921182266 - type: f1 value: 3.4763895108722696 - type: precision value: 3.1331846246882176 - type: recall value: 5.41871921182266 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (max-eng) config: max-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 9.15492957746479 - type: f1 value: 7.267458920187794 - type: precision value: 6.893803787858966 - type: recall value: 9.15492957746479 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (swh-eng) config: swh-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 9.487179487179487 - type: f1 value: 6.902767160316073 - type: precision value: 6.450346503818517 - type: recall value: 9.487179487179487 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (hin-eng) config: hin-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.1 - type: f1 value: 0.0002042900919305414 - type: precision value: 0.00010224948875255625 - type: recall value: 0.1 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (dsb-eng) config: dsb-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 5.010438413361169 - type: f1 value: 3.8116647214505277 - type: precision value: 3.5454644309619634 - type: recall value: 5.010438413361169 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ber-eng) config: ber-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 6.2 - type: f1 value: 5.213158915433869 - type: precision value: 5.080398110661268 - type: recall value: 6.2 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tam-eng) config: tam-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.9771986970684038 - type: f1 value: 0.5061388123277374 - type: precision value: 0.43431053203040165 - type: recall value: 0.9771986970684038 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (slk-eng) config: slk-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 7.3 - type: f1 value: 5.6313180921027755 - type: precision value: 5.303887400540395 - type: recall value: 7.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tgl-eng) config: tgl-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.5999999999999996 - type: f1 value: 3.2180089485458607 - type: precision value: 3.1006756756756753 - type: recall value: 3.5999999999999996 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ast-eng) config: ast-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 22.04724409448819 - type: f1 value: 17.92525934258218 - type: precision value: 16.48251629836593 - type: recall value: 22.04724409448819 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (mkd-eng) config: mkd-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.5 - type: f1 value: 0.1543743186232414 - type: precision value: 0.13554933572174951 - type: recall value: 0.5 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (khm-eng) config: khm-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.8310249307479225 - type: f1 value: 0.5102255597841558 - type: precision value: 0.4859595744731704 - type: recall value: 0.8310249307479225 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ces-eng) config: ces-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 6.9 - type: f1 value: 4.7258390633390635 - type: precision value: 4.288366570275279 - type: recall value: 6.9 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tzl-eng) config: tzl-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 17.307692307692307 - type: f1 value: 14.763313609467454 - type: precision value: 14.129273504273504 - type: recall value: 17.307692307692307 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (urd-eng) config: urd-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.3 - type: f1 value: 0.0022196828248667185 - type: precision value: 0.0011148527298850575 - type: recall value: 0.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (ara-eng) config: ara-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.3 - type: f1 value: 0.3 - type: precision value: 0.3 - type: recall value: 0.3 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (kor-eng) config: kor-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.6 - type: f1 value: 0.500206611570248 - type: precision value: 0.5001034126163392 - type: recall value: 0.6 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (yid-eng) config: yid-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 0.4716981132075472 - type: f1 value: 0.2953377695417789 - type: precision value: 0.2754210459668228 - type: recall value: 0.4716981132075472 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (fin-eng) config: fin-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 4.3999999999999995 - type: f1 value: 3.6228414442700156 - type: precision value: 3.4318238993710692 - type: recall value: 4.3999999999999995 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (tha-eng) config: tha-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 1.2773722627737227 - type: f1 value: 1.0043318098096732 - type: precision value: 0.9735777358593729 - type: recall value: 1.2773722627737227 - task: type: BitextMining dataset: type: mteb/tatoeba-bitext-mining name: MTEB Tatoeba (wuu-eng) config: wuu-eng split: test revision: 9080400076fbadbb4c4dcb136ff4eddc40b42553 metrics: - type: accuracy value: 3.9 - type: f1 value: 2.6164533097276226 - type: precision value: 2.3558186153594085 - type: recall value: 3.9 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 1.5779999999999998 - type: map_at_10 value: 8.339 - type: map_at_100 value: 14.601 - type: map_at_1000 value: 16.104 - type: map_at_3 value: 4.06 - type: map_at_5 value: 6.049 - type: mrr_at_1 value: 18.367 - type: mrr_at_10 value: 35.178 - type: mrr_at_100 value: 36.464999999999996 - type: mrr_at_1000 value: 36.464999999999996 - type: mrr_at_3 value: 29.932 - type: mrr_at_5 value: 34.32 - type: ndcg_at_1 value: 16.326999999999998 - type: ndcg_at_10 value: 20.578 - type: ndcg_at_100 value: 34.285 - type: ndcg_at_1000 value: 45.853 - type: ndcg_at_3 value: 19.869999999999997 - type: ndcg_at_5 value: 22.081999999999997 - type: precision_at_1 value: 18.367 - type: precision_at_10 value: 19.796 - type: precision_at_100 value: 7.714 - type: precision_at_1000 value: 1.547 - type: precision_at_3 value: 23.128999999999998 - type: precision_at_5 value: 24.898 - type: recall_at_1 value: 1.5779999999999998 - type: recall_at_10 value: 14.801 - type: recall_at_100 value: 48.516999999999996 - type: recall_at_1000 value: 83.30300000000001 - type: recall_at_3 value: 5.267 - type: recall_at_5 value: 9.415999999999999 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 72.4186 - type: ap value: 14.536282543597242 - type: f1 value: 55.47661372005608 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 59.318053197509904 - type: f1 value: 59.68272481532353 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 52.155753554312 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 86.99409906419503 - type: cos_sim_ap value: 76.91824322304332 - type: cos_sim_f1 value: 70.97865694950546 - type: cos_sim_precision value: 70.03081664098613 - type: cos_sim_recall value: 71.95250659630607 - type: dot_accuracy value: 85.37879239434942 - type: dot_ap value: 71.86454698478344 - type: dot_f1 value: 66.48115355426259 - type: dot_precision value: 63.84839650145773 - type: dot_recall value: 69.34036939313984 - type: euclidean_accuracy value: 87.00005960541218 - type: euclidean_ap value: 76.9165913835565 - type: euclidean_f1 value: 71.23741557283039 - type: euclidean_precision value: 68.89327088982007 - type: euclidean_recall value: 73.7467018469657 - type: manhattan_accuracy value: 87.06562555880075 - type: manhattan_ap value: 76.85445703747546 - type: manhattan_f1 value: 70.95560571858539 - type: manhattan_precision value: 67.61472275334609 - type: manhattan_recall value: 74.64379947229551 - type: max_accuracy value: 87.06562555880075 - type: max_ap value: 76.91824322304332 - type: max_f1 value: 71.23741557283039 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 88.93934101758063 - type: cos_sim_ap value: 86.1071528049007 - type: cos_sim_f1 value: 78.21588263552714 - type: cos_sim_precision value: 75.20073900376609 - type: cos_sim_recall value: 81.48290729904527 - type: dot_accuracy value: 88.2504754142896 - type: dot_ap value: 84.19709379723844 - type: dot_f1 value: 76.92307692307693 - type: dot_precision value: 71.81969949916528 - type: dot_recall value: 82.80720665229443 - type: euclidean_accuracy value: 88.97232894787906 - type: euclidean_ap value: 86.02763993294909 - type: euclidean_f1 value: 78.18372741427383 - type: euclidean_precision value: 73.79861918107868 - type: euclidean_recall value: 83.12288266091777 - type: manhattan_accuracy value: 88.86948422400745 - type: manhattan_ap value: 86.0009157821563 - type: manhattan_f1 value: 78.10668017659404 - type: manhattan_precision value: 73.68564795848695 - type: manhattan_recall value: 83.09208500153989 - type: max_accuracy value: 88.97232894787906 - type: max_ap value: 86.1071528049007 - type: max_f1 value: 78.21588263552714 --- <h1 align="center">GIST Embedding v0</h1> *GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning* The model is fine-tuned on top of the [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) using the [MEDI dataset](https://github.com/xlang-ai/instructor-embedding.git) augmented with mined triplets from the [MTEB Classification](https://huggingface.co/mteb) training dataset (excluding data from the Amazon Polarity Classification task). The model does not require any instruction for generating embeddings. This means that queries for retrieval tasks can be directly encoded without crafting instructions. Technical paper: [GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning](https://arxiv.org/abs/2402.16829) # Data The dataset used is a compilation of the MEDI and MTEB Classification training datasets. Third-party datasets may be subject to additional terms and conditions under their associated licenses. A HuggingFace Dataset version of the compiled dataset, and the specific revision used to train the model, is available: - Dataset: [avsolatorio/medi-data-mteb_avs_triplets](https://huggingface.co/datasets/avsolatorio/medi-data-mteb_avs_triplets) - Revision: 238a0499b6e6b690cc64ea56fde8461daa8341bb The dataset contains a `task_type` key, which can be used to select only the mteb classification tasks (prefixed with `mteb_`). The **MEDI Dataset** is published in the following paper: [One Embedder, Any Task: Instruction-Finetuned Text Embeddings](https://arxiv.org/abs/2212.09741). The MTEB Benchmark results of the GIST embedding model, compared with the base model, suggest that the fine-tuning dataset has perturbed the model considerably, which resulted in significant improvements in certain tasks while adversely degrading performance in some. The retrieval performance for the TRECCOVID task is of note. The fine-tuning dataset does not contain significant knowledge about COVID-19, which could have caused the observed performance degradation. We found some evidence, detailed in the paper, that thematic coverage of the fine-tuning data can affect downstream performance. # Usage The model can be easily loaded using the Sentence Transformers library. ```Python import torch.nn.functional as F from sentence_transformers import SentenceTransformer revision = None # Replace with the specific revision to ensure reproducibility if the model is updated. model = SentenceTransformer("avsolatorio/GIST-Embedding-v0", revision=revision) texts = [ "Illustration of the REaLTabFormer model. The left block shows the non-relational tabular data model using GPT-2 with a causal LM head. In contrast, the right block shows how a relational dataset's child table is modeled using a sequence-to-sequence (Seq2Seq) model. The Seq2Seq model uses the observations in the parent table to condition the generation of the observations in the child table. The trained GPT-2 model on the parent table, with weights frozen, is also used as the encoder in the Seq2Seq model.", "Predicting human mobility holds significant practical value, with applications ranging from enhancing disaster risk planning to simulating epidemic spread. In this paper, we present the GeoFormer, a decoder-only transformer model adapted from the GPT architecture to forecast human mobility.", "As the economies of Southeast Asia continue adopting digital technologies, policy makers increasingly ask how to prepare the workforce for emerging labor demands. However, little is known about the skills that workers need to adapt to these changes" ] # Compute embeddings embeddings = model.encode(texts, convert_to_tensor=True) # Compute cosine-similarity for each pair of sentences scores = F.cosine_similarity(embeddings.unsqueeze(1), embeddings.unsqueeze(0), dim=-1) print(scores.cpu().numpy()) ``` # Training Parameters Below are the training parameters used to fine-tune the model: ``` Epochs = 80 Warmup ratio = 0.1 Learning rate = 5e-6 Batch size = 32 Checkpoint step = 103500 Contrastive loss temperature = 0.01 ``` # Evaluation The model was evaluated using the [MTEB Evaluation](https://huggingface.co/mteb) suite. # Citation Please cite our work if you use GISTEmbed or the datasets we published in your projects or research. 🤗 ``` @article{solatorio2024gistembed, title={GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning}, author={Aivin V. Solatorio}, journal={arXiv preprint arXiv:2402.16829}, year={2024}, URL={https://arxiv.org/abs/2402.16829} eprint={2402.16829}, archivePrefix={arXiv}, primaryClass={cs.LG} } ``` # Acknowledgements This work is supported by the "KCP IV - Exploring Data Use in the Development Economics Literature using Large Language Models (AI and LLMs)" project funded by the [Knowledge for Change Program (KCP)](https://www.worldbank.org/en/programs/knowledge-for-change) of the World Bank - RA-P503405-RESE-TF0C3444. The findings, interpretations, and conclusions expressed in this material are entirely those of the authors. They do not necessarily represent the views of the International Bank for Reconstruction and Development/World Bank and its affiliated organizations, or those of the Executive Directors of the World Bank or the governments they represent.
microsoft/trocr-large-stage1
microsoft
"2023-03-31T18:38:51Z"
75,587
16
transformers
[ "transformers", "pytorch", "vision-encoder-decoder", "trocr", "image-to-text", "arxiv:2109.10282", "endpoints_compatible", "has_space", "region:us" ]
image-to-text
"2022-03-02T23:29:05Z"
--- tags: - trocr - image-to-text --- # TrOCR (large-sized model, pre-trained only) TrOCR pre-trained only model. It was introduced in the paper [TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models](https://arxiv.org/abs/2109.10282) by Li et al. and first released in [this repository](https://github.com/microsoft/unilm/tree/master/trocr). Disclaimer: The team releasing TrOCR did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description The TrOCR model is an encoder-decoder model, consisting of an image Transformer as encoder, and a text Transformer as decoder. The image encoder was initialized from the weights of BEiT, while the text decoder was initialized from the weights of RoBERTa. 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. Next, the Transformer text decoder autoregressively generates tokens. ## Intended uses & limitations You can use the raw model for optical character recognition (OCR) on single text-line images. See the [model hub](https://huggingface.co/models?search=microsoft/trocr) 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 TrOCRProcessor, VisionEncoderDecoderModel from PIL import Image import requests # load image from the IAM database url = 'https://fki.tic.heia-fr.ch/static/img/a01-122-02-00.jpg' image = Image.open(requests.get(url, stream=True).raw).convert("RGB") processor = TrOCRProcessor.from_pretrained('microsoft/trocr-large-stage1') model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-stage1') # training pixel_values = processor(image, return_tensors="pt").pixel_values # Batch size 1 decoder_input_ids = torch.tensor([[model.config.decoder.decoder_start_token_id]]) outputs = model(pixel_values=pixel_values, decoder_input_ids=decoder_input_ids) ``` ### BibTeX entry and citation info ```bibtex @misc{li2021trocr, title={TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models}, author={Minghao Li and Tengchao Lv and Lei Cui and Yijuan Lu and Dinei Florencio and Cha Zhang and Zhoujun Li and Furu Wei}, year={2021}, eprint={2109.10282}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
google/mt5-large
google
"2023-01-24T16:37:29Z"
75,487
68
transformers
[ "transformers", "pytorch", "tf", "jax", "mt5", "text2text-generation", "multilingual", "af", "am", "ar", "az", "be", "bg", "bn", "ca", "ceb", "co", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fil", "fr", "fy", "ga", "gd", "gl", "gu", "ha", "haw", "hi", "hmn", "ht", "hu", "hy", "ig", "is", "it", "iw", "ja", "jv", "ka", "kk", "km", "kn", "ko", "ku", "ky", "la", "lb", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "ne", "nl", "no", "ny", "pa", "pl", "ps", "pt", "ro", "ru", "sd", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "tr", "uk", "und", "ur", "uz", "vi", "xh", "yi", "yo", "zh", "zu", "dataset:mc4", "arxiv:2010.11934", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text2text-generation
"2022-03-02T23:29:05Z"
--- language: - multilingual - af - am - ar - az - be - bg - bn - ca - ceb - co - cs - cy - da - de - el - en - eo - es - et - eu - fa - fi - fil - fr - fy - ga - gd - gl - gu - ha - haw - hi - hmn - ht - hu - hy - ig - is - it - iw - ja - jv - ka - kk - km - kn - ko - ku - ky - la - lb - lo - lt - lv - mg - mi - mk - ml - mn - mr - ms - mt - my - ne - nl - no - ny - pa - pl - ps - pt - ro - ru - sd - si - sk - sl - sm - sn - so - sq - sr - st - su - sv - sw - ta - te - tg - th - tr - uk - und - ur - uz - vi - xh - yi - yo - zh - zu datasets: - mc4 license: apache-2.0 --- [Google's mT5](https://github.com/google-research/multilingual-t5) mT5 is pretrained on the [mC4](https://www.tensorflow.org/datasets/catalog/c4#c4multilingual) corpus, covering 101 languages: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bulgarian, Burmese, Catalan, Cebuano, Chichewa, Chinese, Corsican, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish, Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Sotho, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, West Frisian, Xhosa, Yiddish, Yoruba, Zulu. **Note**: mT5 was only pre-trained on mC4 excluding any supervised training. Therefore, this model has to be fine-tuned before it is useable on a downstream task. Pretraining Dataset: [mC4](https://www.tensorflow.org/datasets/catalog/c4#c4multilingual) Other Community Checkpoints: [here](https://huggingface.co/models?search=mt5) Paper: [mT5: A massively multilingual pre-trained text-to-text transformer](https://arxiv.org/abs/2010.11934) Authors: *Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, Colin Raffel* ## Abstract The recent "Text-to-Text Transfer Transformer" (T5) leveraged a unified text-to-text format and scale to attain state-of-the-art results on a wide variety of English-language NLP tasks. In this paper, we introduce mT5, a multilingual variant of T5 that was pre-trained on a new Common Crawl-based dataset covering 101 languages. We describe the design and modified training of mT5 and demonstrate its state-of-the-art performance on many multilingual benchmarks. All of the code and model checkpoints used in this work are publicly available.
mosaicml/mpt-7b
mosaicml
"2024-03-05T20:23:57Z"
75,420
1,142
transformers
[ "transformers", "pytorch", "mpt", "text-generation", "Composer", "MosaicML", "llm-foundry", "StreamingDatasets", "custom_code", "dataset:mc4", "dataset:c4", "dataset:togethercomputer/RedPajama-Data-1T", "dataset:bigcode/the-stack", "dataset:allenai/s2orc", "arxiv:2108.12409", "arxiv:2302.13971", "arxiv:2205.14135", "arxiv:2010.04245", "arxiv:1909.08053", "arxiv:2302.06675", "license:apache-2.0", "autotrain_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-05-05T00:48:02Z"
--- license: apache-2.0 tags: - Composer - MosaicML - llm-foundry - StreamingDatasets datasets: - mc4 - c4 - togethercomputer/RedPajama-Data-1T - bigcode/the-stack - allenai/s2orc inference: false --- # MPT-7B MPT-7B is a decoder-style transformer pretrained from scratch on 1T tokens of English text and code. This model was trained by [MosaicML](https://www.mosaicml.com). MPT-7B is part of the family of MosaicPretrainedTransformer (MPT) models, which use a modified transformer architecture optimized for efficient training and inference. These architectural changes include performance-optimized layer implementations and the elimination of context length limits by replacing positional embeddings with Attention with Linear Biases ([ALiBi](https://arxiv.org/abs/2108.12409)). Thanks to these modifications, MPT models can be trained with high throughput efficiency and stable convergence. MPT models can also be served efficiently with both standard HuggingFace pipelines and NVIDIA's [FasterTransformer](https://github.com/NVIDIA/FasterTransformer). This model uses the MosaicML LLM codebase, which can be found in the [llm-foundry repository](https://github.com/mosaicml/llm-foundry). It was trained by MosaicML’s NLP team on the [MosaicML platform](https://www.mosaicml.com/training) for LLM pretraining, finetuning, and inference. ### How is this model different? MPT-7B is * **Licensed for the possibility of commercial use** (unlike [LLaMA](https://arxiv.org/abs/2302.13971)). * **Trained on a large amount of data** (1T tokens like [LLaMA](https://arxiv.org/abs/2302.13971) vs. 300B for [Pythia](https://github.com/EleutherAI/pythia), 300B for [OpenLLaMA](https://github.com/openlm-research/open_llama), and 800B for [StableLM](https://github.com/Stability-AI/StableLM)). * **Prepared to handle extremely long inputs** thanks to [ALiBi](https://arxiv.org/abs/2108.12409) (we finetuned [MPT-7B-StoryWriter-65k+](https://huggingface.co/mosaicml/mpt-7b-storywriter) on up to 65k inputs and can handle up to 84k vs. 2k-4k for other open source models). * **Capable of fast training and inference** (via [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf) and [FasterTransformer](https://github.com/NVIDIA/FasterTransformer)) * **Equipped with highly efficient open-source training code** via the [llm-foundry repository](https://github.com/mosaicml/llm-foundry) ### Models finetuned off MPT-7B: The following models are finetuned on MPT-7B: * [MPT-7B-StoryWriter-65k+](https://huggingface.co/mosaicml/mpt-7b-storywriter): a model designed to read and write fictional stories with super long context lengths. Built by finetuning MPT-7B with a context length of 65k tokens on a filtered fiction subset of the [books3 dataset](https://huggingface.co/datasets/the_pile_books3). At inference time, thanks to [ALiBi](https://arxiv.org/abs/2108.12409), MPT-7B-StoryWriter-65k+ can extrapolate even beyond 65k tokens. We demonstrate generations as long as 80k tokens on a single A100-80GB GPU in our [blogpost](www.mosaicml.com/blog/mpt-7b). * License: Apache 2.0 * [MPT-7B-Instruct](https://huggingface.co/mosaicml/mpt-7b-instruct): a model for short-form instruction following. Built by finetuning MPT-7B on a [dataset](https://huggingface.co/datasets/mosaicml/dolly_hhrlhf) we also release, derived from the [Databricks Dolly-15k](https://huggingface.co/datasets/databricks/databricks-dolly-15k) and the [Anthropic Helpful and Harmless (HH-RLHF)](https://huggingface.co/datasets/Anthropic/hh-rlhf) datasets. * License: Apache 2.0 * [MPT-7B-Chat](https://huggingface.co/mosaicml/mpt-7b-chat): a chatbot-like model for dialogue generation. Built by finetuning MPT-7B on the [ShareGPT-Vicuna](https://huggingface.co/datasets/jeffwan/sharegpt_vicuna), [HC3](https://huggingface.co/datasets/Hello-SimpleAI/HC3), [Alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca), [HH-RLHF](https://huggingface.co/datasets/Anthropic/hh-rlhf), and [Evol-Instruct](https://huggingface.co/datasets/victor123/evol_instruct_70k) datasets. * License: _CC-By-NC-SA-4.0_ ## Model Date May 5, 2023 ## Model License Apache-2.0 ## Documentation * [Blog post: Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs](https://www.mosaicml.com/blog/mpt-7b) * [Codebase (mosaicml/llm-foundry repo)](https://github.com/mosaicml/llm-foundry/) * Questions: Feel free to contact us via the [MosaicML Community Slack](https://mosaicml.me/slack)! ## How to Use This model is best used with the MosaicML [llm-foundry repository](https://github.com/mosaicml/llm-foundry) for training and finetuning. ```python import transformers model = transformers.AutoModelForCausalLM.from_pretrained( 'mosaicml/mpt-7b', trust_remote_code=True ) ``` Note: This model requires that `trust_remote_code=True` be passed to the `from_pretrained` method. This is because we use a custom `MPT` model architecture that is not yet part of the Hugging Face `transformers` package. `MPT` includes options for many training efficiency features such as [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf), [ALiBi](https://arxiv.org/abs/2108.12409), [QK LayerNorm](https://arxiv.org/abs/2010.04245), and more. To use the optimized [triton implementation](https://github.com/openai/triton) of FlashAttention, you can load the model on GPU (`cuda:0`) with `attn_impl='triton'` and with `bfloat16` precision: ```python import torch import transformers name = 'mosaicml/mpt-7b' config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True) config.attn_config['attn_impl'] = 'triton' config.init_device = 'cuda:0' # For fast initialization directly on GPU! model = transformers.AutoModelForCausalLM.from_pretrained( name, config=config, torch_dtype=torch.bfloat16, # Load model weights in bfloat16 trust_remote_code=True ) ``` Although the model was trained with a sequence length of 2048, ALiBi enables users to increase the maximum sequence length during finetuning and/or inference. For example: ```python import transformers name = 'mosaicml/mpt-7b' config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True) config.max_seq_len = 4096 # (input + output) tokens can now be up to 4096 model = transformers.AutoModelForCausalLM.from_pretrained( name, config=config, trust_remote_code=True ) ``` This model was trained with the [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) tokenizer. ```python from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('EleutherAI/gpt-neox-20b') ``` The model can then be used, for example, within a text-generation pipeline. Note: when running Torch modules in lower precision, it is best practice to use the [torch.autocast context manager](https://pytorch.org/docs/stable/amp.html). ```python from transformers import pipeline pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0') with torch.autocast('cuda', dtype=torch.bfloat16): print( pipe('Here is a recipe for vegan banana bread:\n', max_new_tokens=100, do_sample=True, use_cache=True)) ``` ## Model Description The architecture is a modification of a standard decoder-only transformer. The model has been modified from a standard transformer in the following ways: * It uses [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf) * It uses [ALiBi (Attention with Linear Biases)](https://arxiv.org/abs/2108.12409) and does not use positional embeddings * It does not use biases | Hyperparameter | Value | |----------------|-------| |n_parameters | 6.7B | |n_layers | 32 | | n_heads | 32 | | d_model | 4096 | | vocab size | 50432 | | sequence length | 2048 | ## Training Data ### Streaming Datasets Data was formatted using the MosaicML [StreamingDataset](https://github.com/mosaicml/streaming) library to host our data in object storage and efficiently stream it to our compute cluster during training. StreamingDataset obviates the need to download the whole dataset before starting training, and allows instant resumption of training from any point in the dataset. ### Data Mix The model was trained for 1T tokens (with batch size 1760 and sequence length 2048). It was trained on the following data mix: | Data Source | Number of Tokens in Source | Proportion | Effective Number of Tokens | Epochs | |-------------|----------------------------|------------|----------------------------|--------| | mC4 3.1.0 - English | 417.99 B | 0.33 | 330 B | 0.14 | | C4 - English - SemDedup 80% | 100.42 B | 0.299 | 299 B | 2.98 | | RedPajama - CommonCrawl | 878.45 B | 0.1 | 100 B | 0.11 | | The Stack - Selected Languages | 463.78 B | 0.1 | 100 B | 0.22 | | RedPajama - Wikipedia - En | 4.87 B | 0.04 | 40 B | 8.21 | | The Stack - Markdown | 107.07 B | 0.035 | 35 B | 0.33 | | S2ORC | 48.85 B | 0.033 | 33 B | 0.68 | | RedPajama - Books | 26.02 B | 0.03 | 30B | 1.15 | | RedPajama - arXiv | 28.10 B | 0.019 | 19 B | 0.68 | | RedPajama - StackExchange | 20.54 B | 0.014 | 14 B |0.68 | Samples for each batch were selected from one of the datasets with the probability specified above. The examples were shuffled within each dataset, and each example was constructed from as many sequences from that dataset as were necessary to fill the 2048 sequence length. The data was tokenized using the [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) tokenizer. This BPE tokenizer has a number of desirable characteristics, most of which are relevant for tokenizing code: (1) It was trained on a diverse mix of data that includes code (The Pile) (2) It applies consistent space delimitation, unlike the GPT2 tokenizer which tokenizes inconsistently depending on the presence of prefix spaces (3) It contains tokens for repeated space characters, which allows superior compression of text with large amounts of repeated space characters. The model vocabulary size of 50432 was set to be a multiple of 128 (as in [MEGATRON-LM](https://arxiv.org/abs/1909.08053)), model flop utilization (MFU) increased by up to four percentage points. ### Training Configuration This model was trained on 440 A100-40GBs for about 9.5 days using the [MosaicML Platform](https://www.mosaicml.com/platform). The model was trained with sharded data parallelism using [FSDP](https://pytorch.org/docs/stable/fsdp.html) and used the [LION](https://arxiv.org/abs/2302.06675) optimizer. ## Limitations and Biases _The following language is modified from [EleutherAI's GPT-NeoX-20B](https://huggingface.co/EleutherAI/gpt-neox-20b)_ MPT-7B (Base) is **not** intended for deployment without finetuning. It should not be used for human-facing interactions without further guardrails and user consent. MPT-7B can produce factually incorrect output, and should not be relied on to produce factually accurate information. MPT-7B was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs. ## MosaicML Platform If you're interested in [training](https://www.mosaicml.com/training) and [deploying](https://www.mosaicml.com/inference) your own MPT or LLMs on the MosaicML Platform, [sign up here](https://forms.mosaicml.com/demo?utm_source=huggingface&utm_medium=referral&utm_campaign=mpt-7b). ## Disclaimer The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please cosult an attorney before using this model for commercial purposes. ## Citation Please cite this model using the following format: ``` @online{MosaicML2023Introducing, author = {MosaicML NLP Team}, title = {Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs}, year = {2023}, url = {www.mosaicml.com/blog/mpt-7b}, note = {Accessed: 2023-05-05}, urldate = {2023-05-05} } ```
EleutherAI/gpt-neo-1.3B
EleutherAI
"2024-01-31T20:30:21Z"
75,039
235
transformers
[ "transformers", "pytorch", "jax", "rust", "safetensors", "gpt_neo", "text-generation", "text generation", "causal-lm", "en", "dataset:EleutherAI/pile", "license:mit", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-generation
"2022-03-02T23:29:04Z"
--- language: - en tags: - text generation - pytorch - causal-lm license: mit datasets: - EleutherAI/pile --- # GPT-Neo 1.3B ## Model Description GPT-Neo 1.3B is a transformer model designed using EleutherAI's replication of the GPT-3 architecture. GPT-Neo refers to the class of models, while 1.3B represents the number of parameters of this particular pre-trained model. ## Training data GPT-Neo 1.3B was trained on the Pile, a large scale curated dataset created by EleutherAI for the purpose of training this model. ## Training procedure This model was trained on the Pile for 380 billion tokens over 362,000 steps. It was trained as a masked autoregressive language model, using cross-entropy loss. ## Intended Use and Limitations This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks. The model is best at what it was pretrained for however, which is generating texts from a prompt. ### 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='EleutherAI/gpt-neo-1.3B') >>> generator("EleutherAI has", do_sample=True, min_length=50) [{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}] ``` ### Limitations and Biases GPT-Neo was trained as an autoregressive language model. This means that its core functionality is taking a string of text and predicting the next token. While language models are widely used for tasks other than this, there are a lot of unknowns with this work. GPT-Neo was trained on the Pile, a dataset known to contain profanity, lewd, and otherwise abrasive language. Depending on your usecase GPT-Neo may produce socially unacceptable text. See Sections 5 and 6 of the Pile paper for a more detailed analysis of the biases in the Pile. As with all language models, it is hard to predict in advance how GPT-Neo will respond to particular prompts and offensive content may occur without warning. We recommend having a human curate or filter the outputs before releasing them, both to censor undesirable content and to improve the quality of the results. ## Eval results ### Linguistic Reasoning | Model and Size | Pile BPB | Pile PPL | Wikitext PPL | Lambada PPL | Lambada Acc | Winogrande | Hellaswag | | ---------------- | ---------- | ---------- | ------------- | ----------- | ----------- | ---------- | ----------- | | **GPT-Neo 1.3B** | **0.7527** | **6.159** | **13.10** | **7.498** | **57.23%** | **55.01%** | **38.66%** | | GPT-2 1.5B | 1.0468 | ----- | 17.48 | 10.634 | 51.21% | 59.40% | 40.03% | | GPT-Neo 2.7B | 0.7165 | 5.646 | 11.39 | 5.626 | 62.22% | 56.50% | 42.73% | | GPT-3 Ada | 0.9631 | ----- | ----- | 9.954 | 51.60% | 52.90% | 35.93% | ### Physical and Scientific Reasoning | Model and Size | MathQA | PubMedQA | Piqa | | ---------------- | ---------- | ---------- | ----------- | | **GPT-Neo 1.3B** | **24.05%** | **54.40%** | **71.11%** | | GPT-2 1.5B | 23.64% | 58.33% | 70.78% | | GPT-Neo 2.7B | 24.72% | 57.54% | 72.14% | | GPT-3 Ada | 24.29% | 52.80% | 68.88% | ### Down-Stream Applications TBD ### BibTeX entry and citation info To cite this model, please use ```bibtex @software{gpt-neo, author = {Black, Sid and Leo, Gao and Wang, Phil and Leahy, Connor and Biderman, Stella}, title = {{GPT-Neo: Large Scale Autoregressive Language Modeling with Mesh-Tensorflow}}, month = mar, year = 2021, note = {{If you use this software, please cite it using these metadata.}}, publisher = {Zenodo}, version = {1.0}, doi = {10.5281/zenodo.5297715}, url = {https://doi.org/10.5281/zenodo.5297715} } @article{gao2020pile, title={The Pile: An 800GB Dataset of Diverse Text for Language Modeling}, author={Gao, Leo and Biderman, Stella and Black, Sid and Golding, Laurence and Hoppe, Travis and Foster, Charles and Phang, Jason and He, Horace and Thite, Anish and Nabeshima, Noa and others}, journal={arXiv preprint arXiv:2101.00027}, year={2020} } ``` # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_EleutherAI__gpt-neo-1.3B) | Metric | Value | |-----------------------|---------------------------| | Avg. | 29.44 | | ARC (25-shot) | 31.23 | | HellaSwag (10-shot) | 48.47 | | MMLU (5-shot) | 24.82 | | TruthfulQA (0-shot) | 39.63 | | Winogrande (5-shot) | 56.91 | | GSM8K (5-shot) | 0.45 | | DROP (3-shot) | 4.6 |
nomic-ai/gpt4all-falcon
nomic-ai
"2024-02-15T16:16:30Z"
75,007
38
transformers
[ "transformers", "pytorch", "safetensors", "RefinedWebModel", "text-generation", "custom_code", "en", "dataset:nomic-ai/gpt4all-j-prompt-generations", "license:apache-2.0", "autotrain_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-06-02T18:15:37Z"
--- license: apache-2.0 datasets: - nomic-ai/gpt4all-j-prompt-generations language: - en pipeline_tag: text-generation --- # Model Card for GPT4All-Falcon An Apache-2 licensed chatbot trained over a massive curated corpus of assistant interactions including word problems, multi-turn dialogue, code, poems, songs, and stories. ## Model Details ### Model Description <!-- Provide a longer summary of what this model is. --> This model has been finetuned from [Falcon](https://huggingface.co/tiiuae/falcon-7b) - **Developed by:** [Nomic AI](https://home.nomic.ai) - **Model Type:** A finetuned Falcon 7B model on assistant style interaction data - **Language(s) (NLP):** English - **License:** Apache-2 - **Finetuned from model [optional]:** [Falcon](https://huggingface.co/tiiuae/falcon-7b) To download a model with a specific revision run ```python from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("nomic-ai/gpt4all-falcon", trust_remote_code=True) ``` Downloading without specifying `revision` defaults to `main`/`v1.0`. To use it for inference with Cuda, run ```python from transformers import AutoTokenizer, pipeline import transformers import torch tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False) model.to("cuda:0") prompt = "Describe a painting of a falcon in a very detailed way." # Change this to your prompt prompt_template = f"### Instruction: {prompt}\n### Response:" tokens = tokenizer(prompt_template, return_tensors="pt").input_ids.to("cuda:0") output = model.generate(input_ids=tokens, max_new_tokens=256, do_sample=True, temperature=0.8) # Print the generated text print(tokenizer.decode(output[0])) ``` ### Model Sources [optional] <!-- Provide the basic links for the model. --> - **Repository:** [https://github.com/nomic-ai/gpt4all](https://github.com/nomic-ai/gpt4all) - **Base Model Repository:** [https://huggingface.co/tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b) - **Demo [optional]:** [https://gpt4all.io/](https://gpt4all.io/) ### Training Procedure GPT4All is made possible by our compute partner [Paperspace](https://www.paperspace.com/). Trained on a DGX cluster with 8 A100 80GB GPUs for ~12 hours. Using Deepspeed + Accelerate, we use a global batch size of 256 with a learning rate of 2e-5. More information can be found in the repo. ### Results Results on common sense reasoning benchmarks ``` | Model | BoolQ | PIQA | HellaSwag | WinoGrande | ARC-e | ARC-c | OBQA | Avg. | |:--------------------------|:--------:|:--------:|:---------:|:----------:|:--------:|:--------:|:--------:|:--------:| | GPT4All-J 6B v1.0 | 73.4 | 74.8 | 63.4 | 64.7 | 54.9 | 36.0 | 40.2 | 58.2 | | GPT4All-J v1.1-breezy | 74.0 | 75.1 | 63.2 | 63.6 | 55.4 | 34.9 | 38.4 | 57.8 | | GPT4All-J v1.2-jazzy | 74.8 | 74.9 | 63.6 | 63.8 | 56.6 | 35.3 | 41.0 | 58.6 | | GPT4All-J v1.3-groovy | 73.6 | 74.3 | 63.8 | 63.5 | 57.7 | 35.0 | 38.8 | 58.1 | | GPT4All-J Lora 6B | 68.6 | 75.8 | 66.2 | 63.5 | 56.4 | 35.7 | 40.2 | 58.1 | | GPT4All LLaMa Lora 7B | 73.1 | 77.6 | 72.1 | 67.8 | 51.1 | 40.4 | 40.2 | 60.3 | | GPT4All 13B snoozy | **83.3** | 79.2 | 75.0 | **71.3** | 60.9 | 44.2 | 43.4 | 65.3 | | GPT4All Falcon | 77.6 | 79.8 | 74.9 | 70.1 | 67.9 | 43.4 | 42.6 | 65.2 | | Dolly 6B | 68.8 | 77.3 | 67.6 | 63.9 | 62.9 | 38.7 | 41.2 | 60.1 | | Dolly 12B | 56.7 | 75.4 | 71.0 | 62.2 | 64.6 | 38.5 | 40.4 | 58.4 | | Alpaca 7B | 73.9 | 77.2 | 73.9 | 66.1 | 59.8 | 43.3 | 43.4 | 62.4 | | Alpaca Lora 7B | 74.3 | 79.3 | 74.0 | 68.8 | 56.6 | 43.9 | 42.6 | 62.8 | | GPT-J 6.7B | 65.4 | 76.2 | 66.2 | 64.1 | 62.2 | 36.6 | 38.2 | 58.4 | | LLama 7B | 73.1 | 77.4 | 73.0 | 66.9 | 52.5 | 41.4 | 42.4 | 61.0 | | LLama 13B | 68.5 | 79.1 | 76.2 | 70.1 | 60.0 | **44.6** | 42.2 | 63.0 | | Pythia 6.7B | 63.5 | 76.3 | 64.0 | 61.1 | 61.3 | 35.2 | 37.2 | 57.0 | | Pythia 12B | 67.7 | 76.6 | 67.3 | 63.8 | 63.9 | 34.8 | 38 | 58.9 | | Fastchat T5 | 81.5 | 64.6 | 46.3 | 61.8 | 49.3 | 33.3 | 39.4 | 53.7 | | Fastchat Vicuña 7B | 76.6 | 77.2 | 70.7 | 67.3 | 53.5 | 41.2 | 40.8 | 61.0 | | Fastchat Vicuña 13B | 81.5 | 76.8 | 73.3 | 66.7 | 57.4 | 42.7 | 43.6 | 63.1 | | StableVicuña RLHF | 82.3 | 78.6 | 74.1 | 70.9 | 61.0 | 43.5 | **44.4** | 65.0 | | StableLM Tuned | 62.5 | 71.2 | 53.6 | 54.8 | 52.4 | 31.1 | 33.4 | 51.3 | | StableLM Base | 60.1 | 67.4 | 41.2 | 50.1 | 44.9 | 27.0 | 32.0 | 42.2 | | Koala 13B | 76.5 | 77.9 | 72.6 | 68.8 | 54.3 | 41.0 | 42.8 | 62.0 | | Open Assistant Pythia 12B | 67.9 | 78.0 | 68.1 | 65.0 | 64.2 | 40.4 | 43.2 | 61.0 | | Mosaic MPT7B | 74.8 | 79.3 | 76.3 | 68.6 | 70.0 | 42.2 | 42.6 | 64.8 | | Mosaic mpt-instruct | 74.3 | 80.4 | **77.2** | 67.8 | **72.2** | **44.6** | 43.0 | **65.6** | | Mosaic mpt-chat | 77.1 | 78.2 | 74.5 | 67.5 | 69.4 | 43.3 | 44.2 | 64.9 | | Wizard 7B | 78.4 | 77.2 | 69.9 | 66.5 | 56.8 | 40.5 | 42.6 | 61.7 | | Wizard 7B Uncensored | 77.7 | 74.2 | 68.0 | 65.2 | 53.5 | 38.7 | 41.6 | 59.8 | | Wizard 13B Uncensored | 78.4 | 75.5 | 72.1 | 69.5 | 57.5 | 40.4 | 44.0 | 62.5 | | GPT4-x-Vicuna-13b | 81.3 | 75.0 | 75.2 | 65.0 | 58.7 | 43.9 | 43.6 | 62.2 | | Falcon 7b | 73.6 | **80.7** | 76.3 | 67.3 | 71.0 | 43.3 | 44.4 | 65.2 | | text-davinci-003 | 88.1 | 83.8 | 83.4 | 75.8 | 83.9 | 63.9 | 51.0 | 75.7 | ```
MCG-NJU/videomae-base-finetuned-kinetics
MCG-NJU
"2024-03-29T08:01:51Z"
74,837
26
transformers
[ "transformers", "pytorch", "safetensors", "videomae", "video-classification", "vision", "arxiv:2203.12602", "arxiv:2111.06377", "license:cc-by-nc-4.0", "endpoints_compatible", "has_space", "region:us" ]
video-classification
"2022-07-08T15:01:34Z"
--- license: "cc-by-nc-4.0" tags: - vision - video-classification --- # VideoMAE (base-sized model, fine-tuned on Kinetics-400) VideoMAE model pre-trained for 1600 epochs in a self-supervised way and fine-tuned in a supervised way on Kinetics-400. It was introduced in the paper [VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training](https://arxiv.org/abs/2203.12602) by Tong et al. and first released in [this repository](https://github.com/MCG-NJU/VideoMAE). Disclaimer: The team releasing VideoMAE did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description VideoMAE is an extension of [Masked Autoencoders (MAE)](https://arxiv.org/abs/2111.06377) to video. The architecture of the model is very similar to that of a standard Vision Transformer (ViT), with a decoder on top for predicting pixel values for masked patches. Videos are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds fixed sinus/cosinus position embeddings before feeding the sequence to the layers of the Transformer encoder. By pre-training the model, it learns an inner representation of videos that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled videos 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 video. ## Intended uses & limitations You can use the raw model for video classification into one of the 400 possible Kinetics-400 labels. ### How to use Here is how to use this model to classify a video: ```python from transformers import VideoMAEImageProcessor, VideoMAEForVideoClassification import numpy as np import torch video = list(np.random.randn(16, 3, 224, 224)) processor = VideoMAEImageProcessor.from_pretrained("MCG-NJU/videomae-base-finetuned-kinetics") model = VideoMAEForVideoClassification.from_pretrained("MCG-NJU/videomae-base-finetuned-kinetics") inputs = processor(video, return_tensors="pt") with torch.no_grad(): outputs = model(**inputs) logits = outputs.logits predicted_class_idx = logits.argmax(-1).item() print("Predicted class:", model.config.id2label[predicted_class_idx]) ``` For more code examples, we refer to the [documentation](https://huggingface.co/transformers/main/model_doc/videomae.html#). ## Training data (to do, feel free to open a PR) ## Training procedure ### Preprocessing (to do, feel free to open a PR) ### Pretraining (to do, feel free to open a PR) ## Evaluation results This model obtains a top-1 accuracy of 80.9 and a top-5 accuracy of 94.7 on the test set of Kinetics-400. ### BibTeX entry and citation info ```bibtex misc{https://doi.org/10.48550/arxiv.2203.12602, doi = {10.48550/ARXIV.2203.12602}, url = {https://arxiv.org/abs/2203.12602}, author = {Tong, Zhan and Song, Yibing and Wang, Jue and Wang, Limin}, keywords = {Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```
timm/vit_tiny_patch16_224.augreg_in21k
timm
"2023-05-06T00:29:58Z"
74,508
1
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-21k", "arxiv:2106.10270", "arxiv:2010.11929", "license:apache-2.0", "region:us" ]
image-classification
"2022-12-22T07:55:55Z"
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-21k --- # Model card for vit_tiny_patch16_224.augreg_in21k A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k (with additional augmentation and regularization) in JAX by paper authors, ported to PyTorch by Ross Wightman. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 9.7 - GMACs: 1.1 - Activations (M): 4.1 - Image size: 224 x 224 - **Papers:** - How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers: https://arxiv.org/abs/2106.10270 - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 - **Dataset:** ImageNet-21k - **Original:** https://github.com/google-research/vision_transformer ## Model Usage ### Image Classification ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model('vit_tiny_patch16_224.augreg_in21k', pretrained=True) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1 top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5) ``` ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm img = Image.open(urlopen( 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png' )) model = timm.create_model( 'vit_tiny_patch16_224.augreg_in21k', pretrained=True, num_classes=0, # remove classifier nn.Linear ) model = model.eval() # get model specific transforms (normalization, resize) data_config = timm.data.resolve_model_data_config(model) transforms = timm.data.create_transform(**data_config, is_training=False) output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor # or equivalently (without needing to set num_classes=0) output = model.forward_features(transforms(img).unsqueeze(0)) # output is unpooled, a (1, 197, 192) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Model Comparison Explore the dataset and runtime metrics of this model in timm [model results](https://github.com/huggingface/pytorch-image-models/tree/main/results). ## Citation ```bibtex @article{steiner2021augreg, title={How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers}, author={Steiner, Andreas and Kolesnikov, Alexander and and Zhai, Xiaohua and Wightman, Ross and Uszkoreit, Jakob and Beyer, Lucas}, journal={arXiv preprint arXiv:2106.10270}, year={2021} } ``` ```bibtex @article{dosovitskiy2020vit, title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale}, author={Dosovitskiy, Alexey and Beyer, Lucas and Kolesnikov, Alexander and Weissenborn, Dirk and Zhai, Xiaohua and Unterthiner, Thomas and Dehghani, Mostafa and Minderer, Matthias and Heigold, Georg and Gelly, Sylvain and Uszkoreit, Jakob and Houlsby, Neil}, journal={ICLR}, year={2021} } ``` ```bibtex @misc{rw2019timm, author = {Ross Wightman}, title = {PyTorch Image Models}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, doi = {10.5281/zenodo.4414861}, howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} } ```
facebook/seamless-m4t-v2-large
facebook
"2024-01-04T12:48:26Z"
74,069
487
transformers
[ "transformers", "safetensors", "seamless_m4t_v2", "feature-extraction", "audio-to-audio", "text-to-speech", "seamless_communication", "automatic-speech-recognition", "af", "am", "ar", "as", "az", "be", "bn", "bs", "bg", "ca", "cs", "zh", "cy", "da", "de", "el", "en", "et", "fi", "fr", "or", "om", "ga", "gl", "gu", "ha", "he", "hi", "hr", "hu", "hy", "ig", "id", "is", "it", "jv", "ja", "kn", "ka", "kk", "mn", "km", "ky", "ko", "lo", "ln", "lt", "lb", "lg", "lv", "ml", "mr", "mk", "mt", "mi", "my", "nl", "nb", "ne", "ny", "oc", "pa", "ps", "fa", "pl", "pt", "ro", "ru", "sk", "sl", "sn", "sd", "so", "es", "sr", "sv", "sw", "ta", "te", "tg", "tl", "th", "tr", "uk", "ur", "uz", "vi", "wo", "xh", "yo", "ms", "zu", "ary", "arz", "yue", "kea", "arxiv:2312.05187", "license:cc-by-nc-4.0", "has_space", "region:us" ]
automatic-speech-recognition
"2023-11-29T14:37:04Z"
--- license: cc-by-nc-4.0 language: - af - am - ar - as - az - be - bn - bs - bg - ca - cs - zh - cy - da - de - el - en - et - fi - fr - or - om - ga - gl - gu - ha - he - hi - hr - hu - hy - ig - id - is - it - jv - ja - kn - ka - kk - mn - km - ky - ko - lo - ln - lt - lb - lg - lv - ml - mr - mk - mt - mi - my - nl - nb - ne - ny - oc - pa - ps - fa - pl - pt - ro - ru - sk - sl - sn - sd - so - es - sr - sv - sw - ta - te - tg - tl - th - tr - uk - ur - uz - vi - wo - xh - yo - ms - zu - ary - arz - yue - kea metrics: - bleu - wer - chrf inference: False pipeline_tag: automatic-speech-recognition tags: - audio-to-audio - text-to-speech - seamless_communication library_name: transformers widget: - src: https://cdn-media.huggingface.co/speech_samples/sample1.flac example_title: Librispeech sample 1 output: text: going along slushy country roads and speaking to damp audiences in draughty schoolrooms day after day for a fortnight he'll have to put in an appearance at some place of worship on sunday morning and he can come to us immediately afterwards - src: https://cdn-media.huggingface.co/speech_samples/sample2.flac example_title: Librispeech sample 2 output: text: before he had time to answer a much-encumbered vera burst into the room with the question i say can i leave these here these were a small black pig and a lusty specimen of black-red game-cock --- # SeamlessM4T v2 **SeamlessM4T** is our foundational all-in-one **M**assively **M**ultilingual and **M**ultimodal **M**achine **T**ranslation model delivering high-quality translation for speech and text in nearly 100 languages. SeamlessM4T models support the tasks of: - Speech-to-speech translation (S2ST) - Speech-to-text translation (S2TT) - Text-to-speech translation (T2ST) - Text-to-text translation (T2TT) - Automatic speech recognition (ASR). SeamlessM4T models support: - 🎤 101 languages for speech input. - 💬 96 Languages for text input/output. - 🔊 35 languages for speech output. 🌟 We are releasing SeamlessM4T v2, an updated version with our novel *UnitY2* architecture. This new model improves over SeamlessM4T v1 in quality as well as inference speed in speech generation tasks. The v2 version of SeamlessM4T is a multitask adaptation of our novel *UnitY2* architecture. *Unity2* with its hierarchical character-to-unit upsampling and non-autoregressive text-to-unit decoding considerably improves over SeamlessM4T v1 in quality and inference speed. **SeamlessM4T v2 is also supported by 🤗 Transformers, more on it [in the dedicated section below](#transformers-usage).** ![SeamlessM4T architectures](seamlessm4t_arch.svg) ## SeamlessM4T models | Model Name | #params | checkpoint | metrics | | ------------------ | ------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | [SeamlessM4T-Large v2](https://huggingface.co/facebook/seamless-m4t-v2-large) | 2.3B | [checkpoint](https://huggingface.co/facebook/seamless-m4t-v2-large/blob/main/seamlessM4T_v2_large.pt) | [metrics](https://dl.fbaipublicfiles.com/seamless/metrics/seamlessM4T_large_v2.zip) | | [SeamlessM4T-Large (v1)](https://huggingface.co/facebook/seamless-m4t-large) | 2.3B | [checkpoint](https://huggingface.co/facebook/seamless-m4t-large/blob/main/multitask_unity_large.pt) | [metrics](https://dl.fbaipublicfiles.com/seamless/metrics/seamlessM4T_large.zip) | | [SeamlessM4T-Medium (v1)](https://huggingface.co/facebook/seamless-m4t-medium) | 1.2B | [checkpoint](https://huggingface.co/facebook/seamless-m4t-medium/blob/main/multitask_unity_medium.pt) | [metrics](https://dl.fbaipublicfiles.com/seamless/metrics/seamlessM4T_medium.zip) | We provide the extensive evaluation results of seamlessM4T-Large and SeamlessM4T-Medium reported in the paper (as averages) in the `metrics` files above. The evaluation data ids for FLEURS, CoVoST2 and CVSS-C can be found [here](https://dl.fbaipublicfiles.com/seamless/metrics/evaluation_data_ids.zip) ## Evaluating SeamlessM4T models To reproduce our results or to evaluate using the same metrics over your own test sets, please check out the [Evaluation README here](https://github.com/facebookresearch/seamless_communication/tree/main/src/seamless_communication/cli/m4t/evaluate). ## Finetuning SeamlessM4T models Please check out the [Finetuning README here](https://github.com/facebookresearch/seamless_communication/tree/main/src/seamless_communication/cli/m4t/finetune). ## Transformers usage SeamlessM4T is available in the 🤗 Transformers library, requiring minimal dependencies. Steps to get started: 1. First install the 🤗 [Transformers library](https://github.com/huggingface/transformers) from main and [sentencepiece](https://github.com/google/sentencepiece): ``` pip install git+https://github.com/huggingface/transformers.git sentencepiece ``` 2. Run the following Python code to generate speech samples. Here the target language is Russian: ```py from transformers import AutoProcessor, SeamlessM4Tv2Model import torchaudio processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large") model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large") # from text text_inputs = processor(text = "Hello, my dog is cute", src_lang="eng", return_tensors="pt") audio_array_from_text = model.generate(**text_inputs, tgt_lang="rus")[0].cpu().numpy().squeeze() # from audio audio, orig_freq = torchaudio.load("https://www2.cs.uic.edu/~i101/SoundFiles/preamble10.wav") audio = torchaudio.functional.resample(audio, orig_freq=orig_freq, new_freq=16_000) # must be a 16 kHz waveform array audio_inputs = processor(audios=audio, return_tensors="pt") audio_array_from_audio = model.generate(**audio_inputs, tgt_lang="rus")[0].cpu().numpy().squeeze() ``` 3. Listen to the audio samples either in an ipynb notebook: ```py from IPython.display import Audio sample_rate = model.config.sampling_rate Audio(audio_array_from_text, rate=sample_rate) # Audio(audio_array_from_audio, rate=sample_rate) ``` Or save them as a `.wav` file using a third-party library, e.g. `scipy`: ```py import scipy sample_rate = model.config.sampling_rate scipy.io.wavfile.write("out_from_text.wav", rate=sample_rate, data=audio_array_from_text) # scipy.io.wavfile.write("out_from_audio.wav", rate=sample_rate, data=audio_array_from_audio) ``` For more details on using the SeamlessM4T model for inference using the 🤗 Transformers library, refer to the **[SeamlessM4T v2 docs](https://huggingface.co/docs/transformers/main/en/model_doc/seamless_m4t_v2)** or to this **hands-on [Google Colab](https://colab.research.google.com/github/ylacombe/scripts_and_notebooks/blob/main/v2_seamless_m4t_hugging_face.ipynb).** ## Supported Languages: Listed below, are the languages supported by SeamlessM4T-large (v1/v2). The `source` column specifies whether a language is supported as source speech (`Sp`) and/or source text (`Tx`). The `target` column specifies whether a language is supported as target speech (`Sp`) and/or target text (`Tx`). | code | language | script | Source | Target | | ---- | ---------------------- | ---------- | ------ | ------ | | afr | Afrikaans | Latn | Sp, Tx | Tx | | amh | Amharic | Ethi | Sp, Tx | Tx | | arb | Modern Standard Arabic | Arab | Sp, Tx | Sp, Tx | | ary | Moroccan Arabic | Arab | Sp, Tx | Tx | | arz | Egyptian Arabic | Arab | Sp, Tx | Tx | | asm | Assamese | Beng | Sp, Tx | Tx | | ast | Asturian | Latn | Sp | \-- | | azj | North Azerbaijani | Latn | Sp, Tx | Tx | | bel | Belarusian | Cyrl | Sp, Tx | Tx | | ben | Bengali | Beng | Sp, Tx | Sp, Tx | | bos | Bosnian | Latn | Sp, Tx | Tx | | bul | Bulgarian | Cyrl | Sp, Tx | Tx | | cat | Catalan | Latn | Sp, Tx | Sp, Tx | | ceb | Cebuano | Latn | Sp, Tx | Tx | | ces | Czech | Latn | Sp, Tx | Sp, Tx | | ckb | Central Kurdish | Arab | Sp, Tx | Tx | | cmn | Mandarin Chinese | Hans | Sp, Tx | Sp, Tx | | cmn_Hant | Mandarin Chinese | Hant | Sp, Tx | Sp, Tx | | cym | Welsh | Latn | Sp, Tx | Sp, Tx | | dan | Danish | Latn | Sp, Tx | Sp, Tx | | deu | German | Latn | Sp, Tx | Sp, Tx | | ell | Greek | Grek | Sp, Tx | Tx | | eng | English | Latn | Sp, Tx | Sp, Tx | | est | Estonian | Latn | Sp, Tx | Sp, Tx | | eus | Basque | Latn | Sp, Tx | Tx | | fin | Finnish | Latn | Sp, Tx | Sp, Tx | | fra | French | Latn | Sp, Tx | Sp, Tx | | fuv | Nigerian Fulfulde | Latn | Sp, Tx | Tx | | gaz | West Central Oromo | Latn | Sp, Tx | Tx | | gle | Irish | Latn | Sp, Tx | Tx | | glg | Galician | Latn | Sp, Tx | Tx | | guj | Gujarati | Gujr | Sp, Tx | Tx | | heb | Hebrew | Hebr | Sp, Tx | Tx | | hin | Hindi | Deva | Sp, Tx | Sp, Tx | | hrv | Croatian | Latn | Sp, Tx | Tx | | hun | Hungarian | Latn | Sp, Tx | Tx | | hye | Armenian | Armn | Sp, Tx | Tx | | ibo | Igbo | Latn | Sp, Tx | Tx | | ind | Indonesian | Latn | Sp, Tx | Sp, Tx | | isl | Icelandic | Latn | Sp, Tx | Tx | | ita | Italian | Latn | Sp, Tx | Sp, Tx | | jav | Javanese | Latn | Sp, Tx | Tx | | jpn | Japanese | Jpan | Sp, Tx | Sp, Tx | | kam | Kamba | Latn | Sp | \-- | | kan | Kannada | Knda | Sp, Tx | Tx | | kat | Georgian | Geor | Sp, Tx | Tx | | kaz | Kazakh | Cyrl | Sp, Tx | Tx | | kea | Kabuverdianu | Latn | Sp | \-- | | khk | Halh Mongolian | Cyrl | Sp, Tx | Tx | | khm | Khmer | Khmr | Sp, Tx | Tx | | kir | Kyrgyz | Cyrl | Sp, Tx | Tx | | kor | Korean | Kore | Sp, Tx | Sp, Tx | | lao | Lao | Laoo | Sp, Tx | Tx | | lit | Lithuanian | Latn | Sp, Tx | Tx | | ltz | Luxembourgish | Latn | Sp | \-- | | lug | Ganda | Latn | Sp, Tx | Tx | | luo | Luo | Latn | Sp, Tx | Tx | | lvs | Standard Latvian | Latn | Sp, Tx | Tx | | mai | Maithili | Deva | Sp, Tx | Tx | | mal | Malayalam | Mlym | Sp, Tx | Tx | | mar | Marathi | Deva | Sp, Tx | Tx | | mkd | Macedonian | Cyrl | Sp, Tx | Tx | | mlt | Maltese | Latn | Sp, Tx | Sp, Tx | | mni | Meitei | Beng | Sp, Tx | Tx | | mya | Burmese | Mymr | Sp, Tx | Tx | | nld | Dutch | Latn | Sp, Tx | Sp, Tx | | nno | Norwegian Nynorsk | Latn | Sp, Tx | Tx | | nob | Norwegian Bokmål | Latn | Sp, Tx | Tx | | npi | Nepali | Deva | Sp, Tx | Tx | | nya | Nyanja | Latn | Sp, Tx | Tx | | oci | Occitan | Latn | Sp | \-- | | ory | Odia | Orya | Sp, Tx | Tx | | pan | Punjabi | Guru | Sp, Tx | Tx | | pbt | Southern Pashto | Arab | Sp, Tx | Tx | | pes | Western Persian | Arab | Sp, Tx | Sp, Tx | | pol | Polish | Latn | Sp, Tx | Sp, Tx | | por | Portuguese | Latn | Sp, Tx | Sp, Tx | | ron | Romanian | Latn | Sp, Tx | Sp, Tx | | rus | Russian | Cyrl | Sp, Tx | Sp, Tx | | slk | Slovak | Latn | Sp, Tx | Sp, Tx | | slv | Slovenian | Latn | Sp, Tx | Tx | | sna | Shona | Latn | Sp, Tx | Tx | | snd | Sindhi | Arab | Sp, Tx | Tx | | som | Somali | Latn | Sp, Tx | Tx | | spa | Spanish | Latn | Sp, Tx | Sp, Tx | | srp | Serbian | Cyrl | Sp, Tx | Tx | | swe | Swedish | Latn | Sp, Tx | Sp, Tx | | swh | Swahili | Latn | Sp, Tx | Sp, Tx | | tam | Tamil | Taml | Sp, Tx | Tx | | tel | Telugu | Telu | Sp, Tx | Sp, Tx | | tgk | Tajik | Cyrl | Sp, Tx | Tx | | tgl | Tagalog | Latn | Sp, Tx | Sp, Tx | | tha | Thai | Thai | Sp, Tx | Sp, Tx | | tur | Turkish | Latn | Sp, Tx | Sp, Tx | | ukr | Ukrainian | Cyrl | Sp, Tx | Sp, Tx | | urd | Urdu | Arab | Sp, Tx | Sp, Tx | | uzn | Northern Uzbek | Latn | Sp, Tx | Sp, Tx | | vie | Vietnamese | Latn | Sp, Tx | Sp, Tx | | xho | Xhosa | Latn | Sp | \-- | | yor | Yoruba | Latn | Sp, Tx | Tx | | yue | Cantonese | Hant | Sp, Tx | Tx | | zlm | Colloquial Malay | Latn | Sp | \-- | | zsm | Standard Malay | Latn | Tx | Tx | | zul | Zulu | Latn | Sp, Tx | Tx | Note that seamlessM4T-medium supports 200 languages in the text modality, and is based on NLLB-200 (see full list in [asset card](https://github.com/facebookresearch/seamless_communication/blob/main/src/seamless_communication/cards/unity_nllb-200.yaml)) ## Citation For SeamlessM4T v2, please cite : ```bibtex @inproceedings{seamless2023, title="Seamless: Multilingual Expressive and Streaming Speech Translation", author="{Seamless Communication}, Lo{\"i}c Barrault, Yu-An Chung, Mariano Coria Meglioli, David Dale, Ning Dong, Mark Duppenthaler, Paul-Ambroise Duquenne, Brian Ellis, Hady Elsahar, Justin Haaheim, John Hoffman, Min-Jae Hwang, Hirofumi Inaguma, Christopher Klaiber, Ilia Kulikov, Pengwei Li, Daniel Licht, Jean Maillard, Ruslan Mavlyutov, Alice Rakotoarison, Kaushik Ram Sadagopan, Abinesh Ramakrishnan, Tuan Tran, Guillaume Wenzek, Yilin Yang, Ethan Ye, Ivan Evtimov, Pierre Fernandez, Cynthia Gao, Prangthip Hansanti, Elahe Kalbassi, Amanda Kallet, Artyom Kozhevnikov, Gabriel Mejia, Robin San Roman, Christophe Touret, Corinne Wong, Carleigh Wood, Bokai Yu, Pierre Andrews, Can Balioglu, Peng-Jen Chen, Marta R. Costa-juss{\`a}, Maha Elbayad, Hongyu Gong, Francisco Guzm{\'a}n, Kevin Heffernan, Somya Jain, Justine Kao, Ann Lee, Xutai Ma, Alex Mourachko, Benjamin Peloquin, Juan Pino, Sravya Popuri, Christophe Ropers, Safiyyah Saleem, Holger Schwenk, Anna Sun, Paden Tomasello, Changhan Wang, Jeff Wang, Skyler Wang, Mary Williamson", journal={ArXiv}, year={2023} } ``` [//]: # "https://arxiv.org/abs/2312.05187"
sentence-transformers/paraphrase-MiniLM-L12-v2
sentence-transformers
"2024-03-27T12:09:14Z"
73,828
5
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "safetensors", "bert", "feature-extraction", "sentence-similarity", "transformers", "arxiv:1908.10084", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2022-03-02T23:29:05Z"
--- license: apache-2.0 library_name: sentence-transformers tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers pipeline_tag: sentence-similarity --- # sentence-transformers/paraphrase-MiniLM-L12-v2 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/paraphrase-MiniLM-L12-v2') embeddings = model.encode(sentences) print(embeddings) ``` ## Usage (HuggingFace Transformers) Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. ```python from transformers import AutoTokenizer, AutoModel import torch #Mean Pooling - Take attention mask into account for correct averaging def mean_pooling(model_output, attention_mask): token_embeddings = model_output[0] #First element of model_output contains all token embeddings input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float() return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9) # Sentences we want sentence embeddings for sentences = ['This is an example sentence', 'Each sentence is converted'] # Load model from HuggingFace Hub tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/paraphrase-MiniLM-L12-v2') model = AutoModel.from_pretrained('sentence-transformers/paraphrase-MiniLM-L12-v2') # Tokenize sentences encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt') # Compute token embeddings with torch.no_grad(): model_output = model(**encoded_input) # Perform pooling. In this case, max pooling. sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) print("Sentence embeddings:") print(sentence_embeddings) ``` ## Evaluation Results For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/paraphrase-MiniLM-L12-v2) ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ```
hotchpotch/japanese-reranker-cross-encoder-xsmall-v1
hotchpotch
"2024-04-01T02:39:05Z"
73,608
1
sentence-transformers
[ "sentence-transformers", "safetensors", "xlm-roberta", "ja", "dataset:hotchpotch/JQaRA", "dataset:shunk031/JGLUE", "dataset:miracl/miracl", "dataset:castorini/mr-tydi", "dataset:unicamp-dl/mmarco", "license:mit", "region:us" ]
null
"2024-03-28T04:29:26Z"
--- license: mit datasets: - hotchpotch/JQaRA - shunk031/JGLUE - miracl/miracl - castorini/mr-tydi - unicamp-dl/mmarco language: - ja library_name: sentence-transformers --- ## hotchpotch/japanese-reranker-cross-encoder-xsmall-v1 日本語で学習させた Reranker (CrossEncoder) シリーズです。 | モデル名 | layers | hidden_size | | ----------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------- | | [hotchpotch/japanese-reranker-cross-encoder-xsmall-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-xsmall-v1) | 6 | 384 | | [hotchpotch/japanese-reranker-cross-encoder-small-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-small-v1) | 12 | 384 | | [hotchpotch/japanese-reranker-cross-encoder-base-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-base-v1) | 12 | 768 | | [hotchpotch/japanese-reranker-cross-encoder-large-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-large-v1) | 24 | 1024 | | [hotchpotch/japanese-bge-reranker-v2-m3-v1](https://huggingface.co/hotchpotch/japanese-bge-reranker-v2-m3-v1) | 24 | 1024 | Reranker についてや、技術レポート・評価等は以下を参考ください。 - [日本語最高性能のRerankerをリリース / そもそも Reranker とは?](https://secon.dev/entry/2024/04/02/070000-japanese-reranker-release/) - [日本語 Reranker 作成のテクニカルレポート](https://secon.dev/entry/2024/04/02/080000-japanese-reranker-tech-report/) ## 使い方 ### SentenceTransformers ```python from sentence_transformers import CrossEncoder import torch MODEL_NAME = "hotchpotch/japanese-reranker-cross-encoder-xsmall-v1" device = "cuda" if torch.cuda.is_available() else "cpu" model = CrossEncoder(MODEL_NAME, max_length=512, device=device) if device == "cuda": model.model.half() query = "感動的な映画について" passages = [ "深いテーマを持ちながらも、観る人の心を揺さぶる名作。登場人物の心情描写が秀逸で、ラストは涙なしでは見られない。", "重要なメッセージ性は評価できるが、暗い話が続くので気分が落ち込んでしまった。もう少し明るい要素があればよかった。", "どうにもリアリティに欠ける展開が気になった。もっと深みのある人間ドラマが見たかった。", "アクションシーンが楽しすぎる。見ていて飽きない。ストーリーはシンプルだが、それが逆に良い。", ] scores = model.predict([(query, passage) for passage in passages]) ``` ## HuggingFace transformers ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification from torch.nn import Sigmoid MODEL_NAME = "hotchpotch/japanese-reranker-cross-encoder-xsmall-v1" device = "cuda" if torch.cuda.is_available() else "cpu" tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME) model = AutoModelForSequenceClassification.from_pretrained(MODEL_NAME) model.to(device) model.eval() if device == "cuda": model.half() query = "感動的な映画について" passages = [ "深いテーマを持ちながらも、観る人の心を揺さぶる名作。登場人物の心情描写が秀逸で、ラストは涙なしでは見られない。", "重要なメッセージ性は評価できるが、暗い話が続くので気分が落ち込んでしまった。もう少し明るい要素があればよかった。", "どうにもリアリティに欠ける展開が気になった。もっと深みのある人間ドラマが見たかった。", "アクションシーンが楽しすぎる。見ていて飽きない。ストーリーはシンプルだが、それが逆に良い。", ] inputs = tokenizer( [(query, passage) for passage in passages], padding=True, truncation=True, max_length=512, return_tensors="pt", ) inputs = {k: v.to(device) for k, v in inputs.items()} logits = model(**inputs).logits activation = Sigmoid() scores = activation(logits).squeeze().tolist() ``` ## 評価結果 | Model Name | [JQaRA](https://huggingface.co/datasets/hotchpotch/JQaRA) | [JaCWIR](https://huggingface.co/datasets/hotchpotch/JaCWIR) | [MIRACL](https://huggingface.co/datasets/miracl/miracl) | [JSQuAD](https://github.com/yahoojapan/JGLUE) | | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------- | --------------------------------------------- | | [japanese-reranker-cross-encoder-xsmall-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-xsmall-v1) | 0.6136 | 0.9376 | 0.7411 | 0.9602 | | [japanese-reranker-cross-encoder-small-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-small-v1) | 0.6247 | 0.939 | 0.7776 | 0.9604 | | [japanese-reranker-cross-encoder-base-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-base-v1) | 0.6711 | 0.9337 | 0.818 | 0.9708 | | [japanese-reranker-cross-encoder-large-v1](https://huggingface.co/hotchpotch/japanese-reranker-cross-encoder-large-v1) | 0.7099 | 0.9364 | 0.8406 | 0.9773 | | [japanese-bge-reranker-v2-m3-v1](https://huggingface.co/hotchpotch/japanese-bge-reranker-v2-m3-v1) | 0.6918 | 0.9372 | 0.8423 | 0.9624 | | [bge-reranker-v2-m3](https://huggingface.co/BAAI/bge-reranker-v2-m3) | 0.673 | 0.9343 | 0.8374 | 0.9599 | | [bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large) | 0.4718 | 0.7332 | 0.7666 | 0.7081 | | [bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) | 0.2445 | 0.4905 | 0.6792 | 0.5757 | | [cross-encoder-mmarco-mMiniLMv2-L12-H384-v1](https://huggingface.co/corrius/cross-encoder-mmarco-mMiniLMv2-L12-H384-v1) | 0.5588 | 0.9211 | 0.7158 | 0.932 | | [shioriha-large-reranker](https://huggingface.co/cl-nagoya/shioriha-large-reranker) | 0.5775 | 0.8458 | 0.8084 | 0.9262 | | [bge-m3+all](https://huggingface.co/BAAI/bge-m3) | 0.576 | 0.904 | 0.7926 | 0.9226 | | [bge-m3+dense](https://huggingface.co/BAAI/bge-m3) | 0.539 | 0.8642 | 0.7753 | 0.8815 | | [bge-m3+colbert](https://huggingface.co/BAAI/bge-m3) | 0.5656 | 0.9064 | 0.7902 | 0.9297 | | [bge-m3+sparse](https://huggingface.co/BAAI/bge-m3) | 0.5088 | 0.8944 | 0.6941 | 0.9184 | | [JaColBERTv2](https://huggingface.co/bclavie/JaColBERTv2) | 0.5847 | 0.9185 | 0.6861 | 0.9247 | | [multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) | 0.554 | 0.8759 | 0.7722 | 0.8892 | | [multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) | 0.4917 | 0.869 | 0.7025 | 0.8565 | | bm25 | 0.458 | 0.8408 | 0.4387 | 0.9002 | ## ライセンス MIT License
openlm-research/open_llama_3b
openlm-research
"2023-06-16T00:44:10Z"
73,578
142
transformers
[ "transformers", "pytorch", "llama", "text-generation", "dataset:togethercomputer/RedPajama-Data-1T", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-06-07T09:06:48Z"
--- license: apache-2.0 datasets: - togethercomputer/RedPajama-Data-1T --- # OpenLLaMA: An Open Reproduction of LLaMA In this repo, we present a permissively licensed open source reproduction of Meta AI's [LLaMA](https://ai.facebook.com/blog/large-language-model-llama-meta-ai/) large language model. We are releasing a 7B and 3B model trained on 1T tokens, as well as the preview of a 13B model trained on 600B tokens. We provide PyTorch and JAX weights of pre-trained OpenLLaMA models, as well as evaluation results and comparison against the original LLaMA models. Please see the [project homepage of OpenLLaMA](https://github.com/openlm-research/open_llama) for more details. ## Weights Release, License and Usage We release the weights in two formats: an EasyLM format to be use with our [EasyLM framework](https://github.com/young-geng/EasyLM), and a PyTorch format to be used with the [Hugging Face transformers](https://huggingface.co/docs/transformers/index) library. Both our training framework EasyLM and the checkpoint weights are licensed permissively under the Apache 2.0 license. ### Loading the Weights with Hugging Face Transformers Preview checkpoints can be directly loaded from Hugging Face Hub. **Please note that it is advised to avoid using the Hugging Face fast tokenizer for now, as we’ve observed that the auto-converted fast tokenizer sometimes gives incorrect tokenizations.** This can be achieved by directly using the `LlamaTokenizer` class, or passing in the `use_fast=False` option for the `AutoTokenizer` class. See the following example for usage. ```python import torch from transformers import LlamaTokenizer, LlamaForCausalLM model_path = 'openlm-research/open_llama_3b' # model_path = 'openlm-research/open_llama_7b' tokenizer = LlamaTokenizer.from_pretrained(model_path) model = LlamaForCausalLM.from_pretrained( model_path, torch_dtype=torch.float16, device_map='auto', ) prompt = 'Q: What is the largest animal?\nA:' input_ids = tokenizer(prompt, return_tensors="pt").input_ids generation_output = model.generate( input_ids=input_ids, max_new_tokens=32 ) print(tokenizer.decode(generation_output[0])) ``` For more advanced usage, please follow the [transformers LLaMA documentation](https://huggingface.co/docs/transformers/main/model_doc/llama). ### Evaluating with LM-Eval-Harness The model can be evaluated with [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness). However, due to the aforementioned tokenizer issue, we need to avoid using the fast tokenizer to obtain the correct results. This can be achieved by passing in `use_fast=False` to [this part of lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness/blob/4b701e228768052cfae9043dca13e82052ca5eea/lm_eval/models/huggingface.py#LL313C9-L316C10), as shown in the example below: ```python tokenizer = self.AUTO_TOKENIZER_CLASS.from_pretrained( pretrained if tokenizer is None else tokenizer, revision=revision + ("/" + subfolder if subfolder is not None else ""), use_fast=False ) ``` ### Loading the Weights with EasyLM For using the weights in our EasyLM framework, please refer to the [LLaMA documentation of EasyLM](https://github.com/young-geng/EasyLM/blob/main/docs/llama.md). Note that unlike the original LLaMA model, our OpenLLaMA tokenizer and weights are trained completely from scratch so it is no longer needed to obtain the original LLaMA tokenizer and weights. Note that we use BOS (beginning of sentence) token (id=1) during training, so it is best to prepend this token for best performance during few-shot evaluation. ## Dataset and Training We train our models on the [RedPajama](https://www.together.xyz/blog/redpajama) dataset released by [Together](https://www.together.xyz/), which is a reproduction of the LLaMA training dataset containing over 1.2 trillion tokens. We follow the exactly same preprocessing steps and training hyperparameters as the original LLaMA paper, including model architecture, context length, training steps, learning rate schedule, and optimizer. The only difference between our setting and the original one is the dataset used: OpenLLaMA employs the RedPajama dataset rather than the one utilized by the original LLaMA. We train the models on cloud TPU-v4s using [EasyLM](https://github.com/young-geng/EasyLM), a JAX based training pipeline we developed for training and fine-tuning large language models. We employ a combination of normal data parallelism and [fully sharded data parallelism (also know as ZeRO stage 3)](https://engineering.fb.com/2021/07/15/open-source/fsdp/) to balance the training throughput and memory usage. Overall we reach a throughput of over 2200 tokens / second / TPU-v4 chip for our 7B model. ## Evaluation We evaluated OpenLLaMA on a wide range of tasks using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). The LLaMA results are generated by running the original LLaMA model on the same evaluation metrics. We note that our results for the LLaMA model differ slightly from the original LLaMA paper, which we believe is a result of different evaluation protocols. Similar differences have been reported in [this issue of lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness/issues/443). Additionally, we present the results of GPT-J, a 6B parameter model trained on the [Pile](https://pile.eleuther.ai/) dataset by [EleutherAI](https://www.eleuther.ai/). The original LLaMA model was trained for 1 trillion tokens and GPT-J was trained for 500 billion tokens. We present the results in the table below. OpenLLaMA exhibits comparable performance to the original LLaMA and GPT-J across a majority of tasks, and outperforms them in some tasks. | **Task/Metric** | GPT-J 6B | LLaMA 7B | OpenLLaMA 7B | OpenLLaMA 3B | OpenLLaMA 13B 600BT | | ---------------------- | -------- | -------- | ------------ | ------------ | ------------------- | | anli_r1/acc | 0.32 | 0.35 | 0.33 | 0.33 | 0.33 | | anli_r2/acc | 0.34 | 0.34 | 0.36 | 0.32 | 0.35 | | anli_r3/acc | 0.35 | 0.37 | 0.38 | 0.35 | 0.38 | | arc_challenge/acc | 0.34 | 0.39 | 0.37 | 0.34 | 0.39 | | arc_challenge/acc_norm | 0.37 | 0.41 | 0.38 | 0.37 | 0.42 | | arc_easy/acc | 0.67 | 0.68 | 0.72 | 0.69 | 0.74 | | arc_easy/acc_norm | 0.62 | 0.52 | 0.68 | 0.65 | 0.70 | | ddboolq/acc | 0.50 | 0.56 | 0.53 | 0.49 | 0.71 | | hellaswag/acc | 0.36 | 0.36 | 0.63 | 0.43 | 0.54 | | hellaswag/acc_norm | 0.66 | 0.73 | 0.72 | 0.67 | 0.73 | | openbookqa/acc | 0.29 | 0.29 | 0.30 | 0.27 | 0.30 | | openbookqa/acc_norm | 0.38 | 0.41 | 0.40 | 0.40 | 0.41 | | piqa/acc | 0.75 | 0.78 | 0.76 | 0.75 | 0.77 | | piqa/acc_norm | 0.76 | 0.78 | 0.77 | 0.76 | 0.78 | | record/em | 0.88 | 0.91 | 0.89 | 0.88 | 0.90 | | record/f1 | 0.89 | 0.91 | 0.90 | 0.89 | 0.90 | | rte/acc | 0.54 | 0.56 | 0.60 | 0.58 | 0.65 | | truthfulqa_mc/mc1 | 0.20 | 0.21 | 0.23 | 0.22 | 0.22 | | truthfulqa_mc/mc2 | 0.36 | 0.34 | 0.35 | 0.35 | 0.35 | | wic/acc | 0.50 | 0.50 | 0.51 | 0.48 | 0.49 | | winogrande/acc | 0.64 | 0.68 | 0.67 | 0.62 | 0.67 | | Average | 0.51 | 0.53 | 0.55 | 0.52 | 0.56 | We removed the task CB and WSC from our benchmark, as our model performs suspiciously well on these two tasks. We hypothesize that there could be a benchmark data contamination in the training set. ## Contact We would love to get feedback from the community. If you have any questions, please open an issue or contact us. OpenLLaMA is developed by: [Xinyang Geng](https://young-geng.xyz/)* and [Hao Liu](https://www.haoliu.site/)* from Berkeley AI Research. *Equal Contribution ## Acknowledgment We thank the [Google TPU Research Cloud](https://sites.research.google/trc/about/) program for providing part of the computation resources. We’d like to specially thank Jonathan Caton from TPU Research Cloud for helping us organizing compute resources, Rafi Witten from the Google Cloud team and James Bradbury from the Google JAX team for helping us optimizing our training throughput. We’d also want to thank Charlie Snell, Gautier Izacard, Eric Wallace, Lianmin Zheng and our user community for the discussions and feedback. The OpenLLaMA 13B model is trained in collaboration with [Stability AI](https://stability.ai/), and we thank Stability AI for providing the computation resources. We’d like to especially thank David Ha and Shivanshu Purohit for the coordinating the logistics and providing engineering support. ## Reference If you found OpenLLaMA useful in your research or applications, please cite using the following BibTeX: ``` @software{openlm2023openllama, author = {Geng, Xinyang and Liu, Hao}, title = {OpenLLaMA: An Open Reproduction of LLaMA}, month = May, year = 2023, url = {https://github.com/openlm-research/open_llama} } ``` ``` @software{together2023redpajama, author = {Together Computer}, title = {RedPajama-Data: An Open Source Recipe to Reproduce LLaMA training dataset}, month = April, year = 2023, url = {https://github.com/togethercomputer/RedPajama-Data} } ``` ``` @article{touvron2023llama, title={Llama: Open and efficient foundation language models}, author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and others}, journal={arXiv preprint arXiv:2302.13971}, year={2023} } ```
facebook/timesformer-base-finetuned-k400
facebook
"2023-01-02T11:43:07Z"
73,198
22
transformers
[ "transformers", "pytorch", "timesformer", "video-classification", "vision", "arxiv:2102.05095", "license:cc-by-nc-4.0", "endpoints_compatible", "has_space", "region:us" ]
video-classification
"2022-10-07T19:03:04Z"
--- license: "cc-by-nc-4.0" tags: - vision - video-classification --- # TimeSformer (base-sized model, fine-tuned on Kinetics-400) TimeSformer model pre-trained on [Kinetics-400](https://www.deepmind.com/open-source/kinetics). It was introduced in the paper [TimeSformer: Is Space-Time Attention All You Need for Video Understanding?](https://arxiv.org/abs/2102.05095) by Tong et al. and first released in [this repository](https://github.com/facebookresearch/TimeSformer). Disclaimer: The team releasing TimeSformer did not write a model card for this model so this model card has been written by [fcakyon](https://github.com/fcakyon). ## Intended uses & limitations You can use the raw model for video classification into one of the 400 possible Kinetics-400 labels. ### How to use Here is how to use this model to classify a video: ```python from transformers import AutoImageProcessor, TimesformerForVideoClassification import numpy as np import torch video = list(np.random.randn(8, 3, 224, 224)) processor = AutoImageProcessor.from_pretrained("facebook/timesformer-base-finetuned-k400") model = TimesformerForVideoClassification.from_pretrained("facebook/timesformer-base-finetuned-k400") inputs = processor(video, return_tensors="pt") with torch.no_grad(): outputs = model(**inputs) logits = outputs.logits predicted_class_idx = logits.argmax(-1).item() print("Predicted class:", model.config.id2label[predicted_class_idx]) ``` For more code examples, we refer to the [documentation](https://huggingface.co/transformers/main/model_doc/timesformer.html#). ### BibTeX entry and citation info ```bibtex @inproceedings{bertasius2021space, title={Is Space-Time Attention All You Need for Video Understanding?}, author={Bertasius, Gedas and Wang, Heng and Torresani, Lorenzo}, booktitle={International Conference on Machine Learning}, pages={813--824}, year={2021}, organization={PMLR} } ```
playgroundai/playground-v2-1024px-aesthetic
playgroundai
"2024-02-23T15:22:33Z"
73,120
525
diffusers
[ "diffusers", "safetensors", "text-to-image", "playground", "license:other", "endpoints_compatible", "has_space", "diffusers:StableDiffusionXLPipeline", "region:us" ]
text-to-image
"2023-12-05T00:20:41Z"
--- license: other license_name: playground-v2-community license_link: https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/LICENSE.md tags: - text-to-image - playground inference: parameters: guidance_scale: 3.0 --- # Playground v2 – 1024px Aesthetic Model This repository contains a model that generates highly aesthetic images of resolution 1024x1024. You can use the model with Hugging Face 🧨 Diffusers. ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/p0up5GNQgO0vVIiJ672K7.png) **Playground v2** is a diffusion-based text-to-image generative model. The model was trained from scratch by the research team at [Playground](https://playground.com). Images generated by Playground v2 are favored **2.5** times more than those produced by Stable Diffusion XL, according to Playground’s [user study](#user-study). We are thrilled to release [intermediate checkpoints](#intermediate-base-models) at different training stages, including evaluation metrics, to the community. We hope this will encourage further research into foundational models for image generation. Lastly, we introduce a new benchmark, [MJHQ-30K](#mjhq-30k-benchmark), for automatic evaluation of a model’s aesthetic quality. Please see our [blog](https://blog.playgroundai.com/playground-v2/) for more details. ### Model Description - **Developed by:** [Playground](https://playground.com) - **Model type:** Diffusion-based text-to-image generative model - **License:** [Playground v2 Community License](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/LICENSE.md) - **Summary:** This model generates images based on text prompts. It is a Latent Diffusion Model that uses two fixed, pre-trained text encoders ([OpenCLIP-ViT/G](https://github.com/mlfoundations/open_clip) and [CLIP-ViT/L](https://github.com/openai/CLIP/tree/main)). It follows the same architecture as [Stable Diffusion XL](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). ### Using the model with 🧨 Diffusers Install diffusers >= 0.24.0 and some dependencies: ``` pip install transformers accelerate safetensors ``` To use the model, run the following snippet. **Note**: It is recommend to use **`guidance_scale=3.0`**. ```python from diffusers import DiffusionPipeline import torch pipe = DiffusionPipeline.from_pretrained( "playgroundai/playground-v2-1024px-aesthetic", torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False, variant="fp16" ) pipe.to("cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt=prompt, guidance_scale=3.0).images[0] ``` ### Using the model with Automatic1111/ComfyUI In order to use the model with software such as Automatic1111 or ComfyUI you can use [`playground-v2.fp16.safetensors`](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/playground-v2.fp16.safetensors) file. ### User Study ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/8VzBkSYaUU3dt509Co9sk.png) According to user studies conducted by Playground, involving over 2,600 prompts and thousands of users, the images generated by Playground v2 are favored **2.5** times more than those produced by [Stable Diffusion XL](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). We report user preference metrics on [PartiPrompts](https://github.com/google-research/parti), following standard practice, and on an internal prompt dataset curated by the Playground team. The “Internal 1K” prompt dataset is diverse and covers various categories and tasks. During the user study, we give users instructions to evaluate image pairs based on both (1) their aesthetic preference and (2) the image-text alignment. ### MJHQ-30K Benchmark ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/o3Bt62qFsTO9DkeX2yLua.png) | Model | Overall FID | | ------------------------------------- | ----- | | SDXL-1-0-refiner | 9.55 | | [playground-v2-1024px-aesthetic](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic) | **7.07** | We introduce a new benchmark, [MJHQ-30K](https://huggingface.co/datasets/playgroundai/MJHQ-30K), for automatic evaluation of a model’s aesthetic quality. The benchmark computes FID on a high-quality dataset to gauge aesthetic quality. We have curated a high-quality dataset from Midjourney, featuring 10 common categories, with each category containing 3,000 samples. Following common practice, we use aesthetic score and CLIP score to ensure high image quality and high image-text alignment. Furthermore, we take extra care to make the data diverse within each category. For Playground v2, we report both the overall FID and per-category FID. All FID metrics are computed at resolution 1024x1024. Our benchmark results show that our model outperforms SDXL-1-0-refiner in overall FID and all category FIDs, especially in people and fashion categories. This is in line with the results of the user study, which indicates a correlation between human preference and FID score on the MJHQ-30K benchmark. We release this benchmark to the public and encourage the community to adopt it for benchmarking their models’ aesthetic quality. ### Intermediate Base Models | Model | FID | Clip Score | | ---------------------------- | ------ | ---------- | | SDXL-1-0-refiner | 13.04 | 32.62 | | [playground-v2-256px-base](https://huggingface.co/playgroundai/playground-v2-256px-base) | 9.83 | 31.90 | | [playground-v2-512px-base](https://huggingface.co/playgroundai/playground-v2-512px-base) | 9.55 | 32.08 | Apart from [playground-v2-1024px-aesthetic](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic), we release intermediate checkpoints at different training stages to the community in order to foster foundation model research in pixels. Here, we report the FID score and CLIP score on the MSCOCO14 evaluation set for the reference purposes. (Note that our reported numbers may differ from the numbers reported in SDXL’s published results, as our prompt list may be different.) ### How to cite us ``` @misc{playground-v2, url={[https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic)}, title={Playground v2}, author={Li, Daiqing and Kamko, Aleks and Sabet, Ali and Akhgari, Ehsan and Xu, Linmiao and Doshi, Suhail} } ```
tohoku-nlp/bert-base-japanese-char-v2
tohoku-nlp
"2021-09-23T13:45:24Z"
73,015
3
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "ja", "dataset:wikipedia", "license:cc-by-sa-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: ja license: cc-by-sa-4.0 datasets: - wikipedia widget: - text: 東北大学で[MASK]の研究をしています。 --- # BERT base Japanese (character-level tokenization with whole word masking, jawiki-20200831) This is a [BERT](https://github.com/google-research/bert) model pretrained on texts in the Japanese language. This version of the model processes input texts with word-level tokenization based on the Unidic 2.1.2 dictionary (available in [unidic-lite](https://pypi.org/project/unidic-lite/) package), followed by character-level tokenization. Additionally, the model is trained with the whole word masking enabled for the masked language modeling (MLM) objective. The codes for the pretraining are available at [cl-tohoku/bert-japanese](https://github.com/cl-tohoku/bert-japanese/tree/v2.0). ## Model architecture The model architecture is the same as the original BERT base model; 12 layers, 768 dimensions of hidden states, and 12 attention heads. ## Training Data The models are trained on the Japanese version of Wikipedia. The training corpus is generated from the Wikipedia Cirrussearch dump file as of August 31, 2020. The generated corpus files are 4.0GB in total, containing approximately 30M sentences. We used the [MeCab](https://taku910.github.io/mecab/) morphological parser with [mecab-ipadic-NEologd](https://github.com/neologd/mecab-ipadic-neologd) dictionary to split texts into sentences. ## Tokenization The texts are first tokenized by MeCab with the Unidic 2.1.2 dictionary and then split into characters. The vocabulary size is 6144. We used [`fugashi`](https://github.com/polm/fugashi) and [`unidic-lite`](https://github.com/polm/unidic-lite) packages for the tokenization. ## Training The models are trained with the same configuration as the original BERT; 512 tokens per instance, 256 instances per batch, and 1M training steps. For training of the MLM (masked language modeling) objective, we introduced whole word masking in which all of the subword tokens corresponding to a single word (tokenized by MeCab) are masked at once. For training of each model, we used a v3-8 instance of Cloud TPUs provided by [TensorFlow Research Cloud program](https://www.tensorflow.org/tfrc/). The training took about 5 days to finish. ## Licenses The pretrained models are distributed under the terms of the [Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0/). ## Acknowledgments This model is trained with Cloud TPUs provided by [TensorFlow Research Cloud](https://www.tensorflow.org/tfrc/) program.
cointegrated/roberta-large-cola-krishna2020
cointegrated
"2023-06-13T09:38:15Z"
72,975
6
transformers
[ "transformers", "pytorch", "safetensors", "roberta", "text-classification", "arxiv:2010.05700", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
This is a RoBERTa-large classifier trained on the CoLA corpus [Warstadt et al., 2019](https://www.mitpressjournals.org/doi/pdf/10.1162/tacl_a_00290), which contains sentences paired with grammatical acceptability judgments. The model can be used to evaluate fluency of machine-generated English sentences, e.g. for evaluation of text style transfer. The model was trained in the paper [Krishna et al, 2020. Reformulating Unsupervised Style Transfer as Paraphrase Generation](https://arxiv.org/abs/2010.05700), and its original version is available at [their project page](http://style.cs.umass.edu). We converted this model from Fairseq to Transformers format. All credit goes to the authors of the original paper. ## Citation If you found this model useful and refer to it, please cite the original work: ``` @inproceedings{style20, author={Kalpesh Krishna and John Wieting and Mohit Iyyer}, Booktitle = {Empirical Methods in Natural Language Processing}, Year = "2020", Title={Reformulating Unsupervised Style Transfer as Paraphrase Generation}, } ```
vikhyatk/moondream2
vikhyatk
"2024-04-10T03:17:15Z"
72,750
277
transformers
[ "transformers", "safetensors", "gguf", "moondream1", "text-generation", "image-text-to-text", "custom_code", "license:apache-2.0", "autotrain_compatible", "has_space", "region:us" ]
image-text-to-text
"2024-03-04T18:03:06Z"
--- license: apache-2.0 pipeline_tag: image-text-to-text --- moondream2 is a small vision language model designed to run efficiently on edge devices. Check out the [GitHub repository](https://github.com/vikhyat/moondream) for details, or try it out on the [Hugging Face Space](https://huggingface.co/spaces/vikhyatk/moondream2)! **Benchmarks** | Release | VQAv2 | GQA | TextVQA | TallyQA (simple) | TallyQA (full) | | --- | --- | --- | --- | --- | --- | | 2024-03-04 | 74.2 | 58.5 | 36.4 | - | - | | 2024-03-06 | 75.4 | 59.8 | 43.1 | 79.5 | 73.2 | | 2024-03-13 | 76.8 | 60.6 | 46.4 | 79.6 | 73.3 | | **2024-04-02** (latest) | 77.7 | 61.7 | 49.7 | 80.1 | 74.2 | **Usage** ```bash pip install transformers einops ``` ```python from transformers import AutoModelForCausalLM, AutoTokenizer from PIL import Image model_id = "vikhyatk/moondream2" revision = "2024-04-02" model = AutoModelForCausalLM.from_pretrained( model_id, trust_remote_code=True, revision=revision ) tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision) image = Image.open('<IMAGE_PATH>') enc_image = model.encode_image(image) print(model.answer_question(enc_image, "Describe this image.", tokenizer)) ``` The model is updated regularly, so we recommend pinning the model version to a specific release as shown above.
laion/CLIP-ViT-L-14-DataComp.XL-s13B-b90K
laion
"2023-05-16T16:59:39Z"
72,495
99
open_clip
[ "open_clip", "pytorch", "clip", "zero-shot-image-classification", "dataset:mlfoundations/datacomp_pools", "arxiv:2304.14108", "license:mit", "has_space", "region:us" ]
zero-shot-image-classification
"2023-04-26T01:41:18Z"
--- license: mit widget: - src: >- https://huggingface.co/datasets/mishig/sample_images/resolve/main/cat-dog-music.png candidate_labels: playing music, playing sports example_title: Cat & Dog library_name: open_clip datasets: - mlfoundations/datacomp_pools pipeline_tag: zero-shot-image-classification --- # Model card for CLIP ViT-L-14 trained DataComp-1B # Table of Contents 1. [Model Details](#model-details) 2. [Uses](#uses) 3. [Training Details](#training-details) 4. [Evaluation](#evaluation) 5. [Acknowledgements](#acknowledgements) 6. [Citation](#citation) 7. [How To Get Started With the Model](#how-to-get-started-with-the-model) # Model Details ## Model Description A CLIP ViT-L/14 model trained with the DataComp-1B (https://github.com/mlfoundations/datacomp) using OpenCLIP (https://github.com/mlfoundations/open_clip). Model training done on the [stability.ai](https://stability.ai/) cluster. # Uses As per the original [OpenAI CLIP model card](https://github.com/openai/CLIP/blob/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1/model-card.md), this model is intended as a research output for research communities. We hope that this model will enable researchers to better understand and explore zero-shot, arbitrary image classification. We also hope it can be used for interdisciplinary studies of the potential impact of such model. The OpenAI CLIP paper includes a discussion of potential downstream impacts to provide an example for this sort of analysis. Additionally, the DataComp paper (https://arxiv.org/abs/2304.14108) include additional discussion as it relates specifically to the training dataset. ## Direct Use Zero-shot image classification, image and text retrieval, among others. ## Downstream Use Image classification and other image task fine-tuning, linear probe image classification, image generation guiding and conditioning, among others. ## Out-of-Scope Use As per the OpenAI models, **Any** deployed use case of the model - whether commercial or not - is currently out of scope. Non-deployed use cases such as image search in a constrained environment, are also not recommended unless there is thorough in-domain testing of the model with a specific, fixed class taxonomy. This is because our safety assessment demonstrated a high need for task specific testing especially given the variability of CLIP’s performance with different class taxonomies. This makes untested and unconstrained deployment of the model in any use case currently potentially harmful. Certain use cases which would fall under the domain of surveillance and facial recognition are always out-of-scope regardless of performance of the model. This is because the use of artificial intelligence for tasks such as these can be premature currently given the lack of testing norms and checks to ensure its fair use. # Training Details ## Training Data This model was trained with the 1.4 Billion samples of the DataComp-1B dataset (https://arxiv.org/abs/2304.14108). **IMPORTANT NOTE:** The motivation behind dataset creation is to democratize research and experimentation around large-scale multi-modal model training and handling of uncurated, large-scale datasets crawled from publically available internet. Our recommendation is therefore to use the dataset for research purposes. Be aware that this large-scale dataset is uncurated. Keep in mind that the uncurated nature of the dataset means that collected links may lead to strongly discomforting and disturbing content for a human viewer. Therefore, please use the demo links with caution and at your own risk. It is possible to extract a “safe” subset by filtering out samples based on the safety tags (using a customized trained NSFW classifier that we built). While this strongly reduces the chance for encountering potentially harmful content when viewing, we cannot entirely exclude the possibility for harmful content being still present in safe mode, so that the warning holds also there. We think that providing the dataset openly to broad research and other interested communities will allow for transparent investigation of benefits that come along with training large-scale models as well as pitfalls and dangers that may stay unreported or unnoticed when working with closed large datasets that remain restricted to a small community. Providing our dataset openly, we however do not recommend using it for creating ready-to-go industrial products, as the basic research about general properties and safety of such large-scale models, which we would like to encourage with this release, is still in progress. ## Training Procedure Please see https://arxiv.org/abs/2304.14108. # Evaluation Evaluation done on 38 datasets, using the [DataComp repo](https://github.com/mlfoundations/datacomp) and the [LAION CLIP Benchmark](https://github.com/LAION-AI/CLIP_benchmark). ## Testing Data, Factors & Metrics ### Testing Data The testing is performed on a suite of 38 datasets. See our paper for more details (https://arxiv.org/abs/2304.14108). ## Results The model achieves a 79.2% zero-shot top-1 accuracy on ImageNet-1k. See our paper for more details and results (https://arxiv.org/abs/2304.14108). # Acknowledgements Acknowledging [stability.ai](https://stability.ai/) for the compute used to train this model. # Citation **BibTeX:** DataComp ```bibtex @article{datacomp, title={DataComp: In search of the next generation of multimodal datasets}, author={Samir Yitzhak Gadre, Gabriel Ilharco, Alex Fang, Jonathan Hayase, Georgios Smyrnis, Thao Nguyen, Ryan Marten, Mitchell Wortsman, Dhruba Ghosh, Jieyu Zhang, Eyal Orgad, Rahim Entezari, Giannis Daras, Sarah Pratt, Vivek Ramanujan, Yonatan Bitton, Kalyani Marathe, Stephen Mussmann, Richard Vencu, Mehdi Cherti, Ranjay Krishna, Pang Wei Koh, Olga Saukh, Alexander Ratner, Shuran Song, Hannaneh Hajishirzi, Ali Farhadi, Romain Beaumont, Sewoong Oh, Alex Dimakis, Jenia Jitsev, Yair Carmon, Vaishaal Shankar, Ludwig Schmidt}, journal={arXiv preprint arXiv:2304.14108}, year={2023} } ``` OpenAI CLIP paper ``` @inproceedings{Radford2021LearningTV, title={Learning Transferable Visual Models From Natural Language Supervision}, author={Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and Sandhini Agarwal and Girish Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and Ilya Sutskever}, booktitle={ICML}, year={2021} } ``` OpenCLIP software ``` @software{ilharco_gabriel_2021_5143773, author = {Ilharco, Gabriel and Wortsman, Mitchell and Wightman, Ross and Gordon, Cade and Carlini, Nicholas and Taori, Rohan and Dave, Achal and Shankar, Vaishaal and Namkoong, Hongseok and Miller, John and Hajishirzi, Hannaneh and Farhadi, Ali and Schmidt, Ludwig}, title = {OpenCLIP}, month = jul, year = 2021, note = {If you use this software, please cite it as below.}, publisher = {Zenodo}, version = {0.1}, doi = {10.5281/zenodo.5143773}, url = {https://doi.org/10.5281/zenodo.5143773} } ``` # How to Get Started with the Model See https://github.com/mlfoundations/open_clip
TencentGameMate/chinese-wav2vec2-base
TencentGameMate
"2022-06-24T01:53:18Z"
72,154
21
transformers
[ "transformers", "pytorch", "wav2vec2", "pretraining", "license:mit", "endpoints_compatible", "region:us" ]
null
"2022-06-02T06:17:07Z"
--- license: mit --- Pretrained on 10k hours WenetSpeech L subset. More details in [TencentGameMate/chinese_speech_pretrain](https://github.com/TencentGameMate/chinese_speech_pretrain) This model does not have a tokenizer as it was pretrained on audio alone. In order to use this model speech recognition, a tokenizer should be created and the model should be fine-tuned on labeled text data. python package: transformers==4.16.2 ```python import torch import torch.nn.functional as F import soundfile as sf from fairseq import checkpoint_utils from transformers import ( Wav2Vec2FeatureExtractor, Wav2Vec2ForPreTraining, Wav2Vec2Model, ) from transformers.models.wav2vec2.modeling_wav2vec2 import _compute_mask_indices model_path="" wav_path="" mask_prob=0.0 mask_length=10 feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_path) model = Wav2Vec2Model.from_pretrained(model_path) # for pretrain: Wav2Vec2ForPreTraining # model = Wav2Vec2ForPreTraining.from_pretrained(model_path) model = model.to(device) model = model.half() model.eval() wav, sr = sf.read(wav_path) input_values = feature_extractor(wav, return_tensors="pt").input_values input_values = input_values.half() input_values = input_values.to(device) # for Wav2Vec2ForPreTraining # batch_size, raw_sequence_length = input_values.shape # sequence_length = model._get_feat_extract_output_lengths(raw_sequence_length) # mask_time_indices = _compute_mask_indices((batch_size, sequence_length), mask_prob=0.0, mask_length=2) # mask_time_indices = torch.tensor(mask_time_indices, device=input_values.device, dtype=torch.long) with torch.no_grad(): outputs = model(input_values) last_hidden_state = outputs.last_hidden_state # for Wav2Vec2ForPreTraining # outputs = model(input_values, mask_time_indices=mask_time_indices, output_hidden_states=True) # last_hidden_state = outputs.hidden_states[-1] ```
dccuchile/bert-base-spanish-wwm-cased
dccuchile
"2024-01-18T01:47:12Z"
72,148
41
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "masked-lm", "es", "arxiv:1904.09077", "arxiv:1906.01502", "arxiv:1812.10464", "arxiv:1901.07291", "arxiv:1904.02099", "arxiv:1906.01569", "arxiv:1908.11828", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: - es tags: - masked-lm --- # BETO: Spanish BERT BETO is a [BERT model](https://github.com/google-research/bert) trained on a [big Spanish corpus](https://github.com/josecannete/spanish-corpora). BETO is of size similar to a BERT-Base and was trained with the Whole Word Masking technique. Below you find Tensorflow and Pytorch checkpoints for the uncased and cased versions, as well as some results for Spanish benchmarks comparing BETO with [Multilingual BERT](https://github.com/google-research/bert/blob/master/multilingual.md) as well as other (not BERT-based) models. ## Download | | | | | |-|:--------:|:-----:|:----:| |BETO uncased|[tensorflow_weights](https://users.dcc.uchile.cl/~jperez/beto/uncased_2M/tensorflow_weights.tar.gz) | [pytorch_weights](https://users.dcc.uchile.cl/~jperez/beto/uncased_2M/pytorch_weights.tar.gz) | [vocab](./config/uncased_2M/vocab.txt), [config](./config/uncased_2M/config.json) | |BETO cased| [tensorflow_weights](https://users.dcc.uchile.cl/~jperez/beto/cased_2M/tensorflow_weights.tar.gz) | [pytorch_weights](https://users.dcc.uchile.cl/~jperez/beto/cased_2M/pytorch_weights.tar.gz) | [vocab](./config/cased_2M/vocab.txt), [config](./config/cased_2M/config.json) | All models use a vocabulary of about 31k BPE subwords constructed using SentencePiece and were trained for 2M steps. ## Benchmarks The following table shows some BETO results in the Spanish version of every task. We compare BETO (cased and uncased) with the Best Multilingual BERT results that we found in the literature (as of October 2019). The table also shows some alternative methods for the same tasks (not necessarily BERT-based methods). References for all methods can be found [here](#references). |Task | BETO-cased | BETO-uncased | Best Multilingual BERT | Other results | |-------|--------------:|--------------:|--------------------------:|-------------------------------:| |[POS](https://lindat.mff.cuni.cz/repository/xmlui/handle/11234/1-1827) | **98.97** | 98.44 | 97.10 [2] | 98.91 [6], 96.71 [3] | |[NER-C](https://www.kaggle.com/nltkdata/conll-corpora) | [**88.43**](https://github.com/gchaperon/beto-benchmarks/blob/master/conll2002/dev_results_beto-cased_conll2002.txt) | 82.67 | 87.38 [2] | 87.18 [3] | |[MLDoc](https://github.com/facebookresearch/MLDoc) | [95.60](https://github.com/gchaperon/beto-benchmarks/blob/master/MLDoc/dev_results_beto-cased_mldoc.txt) | [**96.12**](https://github.com/gchaperon/beto-benchmarks/blob/master/MLDoc/dev_results_beto-uncased_mldoc.txt) | 95.70 [2] | 88.75 [4] | |[PAWS-X](https://github.com/google-research-datasets/paws/tree/master/pawsx) | 89.05 | 89.55 | 90.70 [8] | |[XNLI](https://github.com/facebookresearch/XNLI) | **82.01** | 80.15 | 78.50 [2] | 80.80 [5], 77.80 [1], 73.15 [4]| ## Example of use For further details on how to use BETO you can visit the [🤗Huggingface Transformers library](https://github.com/huggingface/transformers), starting by the [Quickstart section](https://huggingface.co/transformers/quickstart.html). BETO models can be accessed simply as [`'dccuchile/bert-base-spanish-wwm-cased'`](https://huggingface.co/dccuchile/bert-base-spanish-wwm-cased) and [`'dccuchile/bert-base-spanish-wwm-uncased'`](https://huggingface.co/dccuchile/bert-base-spanish-wwm-uncased) by using the Transformers library. An example on how to download and use the models in this page can be found in [this colab notebook](https://colab.research.google.com/drive/1pYOYsCU59GBOwztkWCw5PTsqBiJbRy4S?usp=sharing). (We will soon add a more detailed step-by-step tutorial in Spanish for newcommers 😉) ## Acknowledgments We thank [Adereso](https://www.adere.so/) for kindly providing support for traininig BETO-uncased, and the [Millennium Institute for Foundational Research on Data](https://imfd.cl/en/) that provided support for training BETO-cased. Also thanks to Google for helping us with the [TensorFlow Research Cloud](https://www.tensorflow.org/tfrc) program. ## Citation [Spanish Pre-Trained BERT Model and Evaluation Data](https://users.dcc.uchile.cl/~jperez/papers/pml4dc2020.pdf) To cite this resource in a publication please use the following: ``` @inproceedings{CaneteCFP2020, title={Spanish Pre-Trained BERT Model and Evaluation Data}, author={Cañete, José and Chaperon, Gabriel and Fuentes, Rodrigo and Ho, Jou-Hui and Kang, Hojin and Pérez, Jorge}, booktitle={PML4DC at ICLR 2020}, year={2020} } ``` ## License Disclaimer The license CC BY 4.0 best describes our intentions for our work. However we are not sure that all the datasets used to train BETO have licenses compatible with CC BY 4.0 (specially for commercial use). Please use at your own discretion and verify that the licenses of the original text resources match your needs. ## References * [1] [Original Multilingual BERT](https://github.com/google-research/bert/blob/master/multilingual.md) * [2] [Multilingual BERT on "Beto, Bentz, Becas: The Surprising Cross-Lingual Effectiveness of BERT"](https://arxiv.org/pdf/1904.09077.pdf) * [3] [Multilingual BERT on "How Multilingual is Multilingual BERT?"](https://arxiv.org/pdf/1906.01502.pdf) * [4] [LASER](https://arxiv.org/abs/1812.10464) * [5] [XLM (MLM+TLM)](https://arxiv.org/pdf/1901.07291.pdf) * [6] [UDPipe on "75 Languages, 1 Model: Parsing Universal Dependencies Universally"](https://arxiv.org/pdf/1904.02099.pdf) * [7] [Multilingual BERT on "Sequence Tagging with Contextual and Non-Contextual Subword Representations: A Multilingual Evaluation"](https://arxiv.org/pdf/1906.01569.pdf) * [8] [Multilingual BERT on "PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification"](https://arxiv.org/abs/1908.11828)