modelId
stringlengths
4
122
author
stringlengths
2
42
last_modified
unknown
downloads
int64
0
74.7M
likes
int64
0
9.67k
library_name
stringlengths
2
84
tags
sequence
pipeline_tag
stringlengths
5
30
createdAt
unknown
card
stringlengths
1
901k
embedding
sequence
TheBloke/LLaMA2-13B-Tiefighter-GPTQ
TheBloke
"2023-10-22T11:01:30Z"
31,435
13
transformers
[ "transformers", "safetensors", "llama", "text-generation", "base_model:KoboldAI/LLaMA2-13B-Tiefighter", "license:llama2", "text-generation-inference", "4-bit", "region:us" ]
text-generation
"2023-10-22T09:22:39Z"
--- base_model: KoboldAI/LLaMA2-13B-Tiefighter inference: false license: llama2 model_creator: KoboldAI model_name: Llama2 13B Tiefighter model_type: llama prompt_template: "### Instruction: \n{prompt}\n### Response:\n" quantized_by: TheBloke --- <!-- 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 --> # Llama2 13B Tiefighter - GPTQ - Model creator: [KoboldAI](https://huggingface.co/KoboldAI) - Original model: [Llama2 13B Tiefighter](https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter) <!-- description start --> ## Description This repo contains GPTQ model files for [KoboldAI's Llama2 13B Tiefighter](https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter). Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them. <!-- description end --> <!-- repositories-available start --> ## Repositories available * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-AWQ) * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GGUF) * [KoboldAI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/KoboldAI/LLaMA2-13B-Tiefighter) <!-- repositories-available end --> <!-- prompt-template start --> ## Prompt template: Alpaca-Tiefighter ``` ### Instruction: {prompt} ### Response: ``` <!-- prompt-template end --> <!-- README_GPTQ.md-compatible clients start --> ## Known compatible clients / servers These GPTQs are known to work in the following inference servers/webuis: - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) - [KobaldAI United](https://github.com/henk717/koboldai) - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui) - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) <!-- README_GPTQ.md-compatible clients end --> <!-- README_GPTQ.md-provided-files start --> ## Provided files, and GPTQ parameters Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements. Each separate quant is in a different branch. See below for instructions on fetching from different branches. Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers. <details> <summary>Explanation of GPTQ parameters</summary> - Bits: The bit size of the quantised model. - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value. - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now. - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy. - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s). - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences. - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit. </details> | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc | | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- | | [main](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. | | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. | | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. | | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. | | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 14.54 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. | | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. | <!-- README_GPTQ.md-provided-files end --> <!-- README_GPTQ.md-download-from-branches start --> ## How to download, including from branches ### In text-generation-webui To download from the `main` branch, enter `TheBloke/LLaMA2-13B-Tiefighter-GPTQ` in the "Download model" box. To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/LLaMA2-13B-Tiefighter-GPTQ:gptq-4bit-32g-actorder_True` ### From the command line I recommend using the `huggingface-hub` Python library: ```shell pip3 install huggingface-hub ``` To download the `main` branch to a folder called `LLaMA2-13B-Tiefighter-GPTQ`: ```shell mkdir LLaMA2-13B-Tiefighter-GPTQ huggingface-cli download TheBloke/LLaMA2-13B-Tiefighter-GPTQ --local-dir LLaMA2-13B-Tiefighter-GPTQ --local-dir-use-symlinks False ``` To download from a different branch, add the `--revision` parameter: ```shell mkdir LLaMA2-13B-Tiefighter-GPTQ huggingface-cli download TheBloke/LLaMA2-13B-Tiefighter-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir LLaMA2-13B-Tiefighter-GPTQ --local-dir-use-symlinks False ``` <details> <summary>More advanced huggingface-cli download usage</summary> If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model. The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`. For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli). To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`: ```shell pip3 install hf_transfer ``` And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`: ```shell mkdir LLaMA2-13B-Tiefighter-GPTQ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/LLaMA2-13B-Tiefighter-GPTQ --local-dir LLaMA2-13B-Tiefighter-GPTQ --local-dir-use-symlinks False ``` Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command. </details> ### With `git` (**not** recommended) To clone a specific branch with `git`, use a command like this: ```shell git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/LLaMA2-13B-Tiefighter-GPTQ ``` Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.) <!-- README_GPTQ.md-download-from-branches end --> <!-- README_GPTQ.md-text-generation-webui start --> ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui) Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui). It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/LLaMA2-13B-Tiefighter-GPTQ`. - To download from a specific branch, enter for example `TheBloke/LLaMA2-13B-Tiefighter-GPTQ:gptq-4bit-32g-actorder_True` - see Provided Files above for the list of branches for each option. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done". 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `LLaMA2-13B-Tiefighter-GPTQ` 7. The model will automatically load, and is now ready for use! 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. - Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`. 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started! <!-- README_GPTQ.md-text-generation-webui end --> <!-- README_GPTQ.md-use-from-tgi start --> ## Serving this model from Text Generation Inference (TGI) It's recommended to 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/LLaMA2-13B-Tiefighter-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096 ``` Example Python code for interfacing with TGI (requires 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'''### Instruction: {prompt} ### Response: ''' 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_GPTQ.md-use-from-tgi end --> <!-- README_GPTQ.md-use-from-python start --> ## How to use this GPTQ model from Python code ### Install the necessary packages Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later. ```shell pip3 install transformers optimum pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7 ``` If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead: ```shell pip3 uninstall -y auto-gptq git clone https://github.com/PanQiWei/AutoGPTQ cd AutoGPTQ git checkout v0.4.2 pip3 install . ``` ### You can then use the following code ```python from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline model_name_or_path = "TheBloke/LLaMA2-13B-Tiefighter-GPTQ" # To use a different branch, change revision # For example: revision="gptq-4bit-32g-actorder_True" model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto", trust_remote_code=False, revision="main") tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) prompt = "Tell me about AI" prompt_template=f'''### Instruction: {prompt} ### Response: ''' print("\n\n*** Generate:") input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda() output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512) print(tokenizer.decode(output[0])) # Inference can also be done using transformers' pipeline print("*** Pipeline:") pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95, top_k=40, repetition_penalty=1.1 ) print(pipe(prompt_template)[0]['generated_text']) ``` <!-- README_GPTQ.md-use-from-python end --> <!-- README_GPTQ.md-compatibility start --> ## Compatibility The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly. [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama and Mistral models in 4-bit. Please see the Provided Files table above for per-file compatibility. For a list of clients/servers, please see "Known compatible clients / servers", above. <!-- README_GPTQ.md-compatibility end --> <!-- footer start --> <!-- 200823 --> ## Discord For further support, and discussions on these models and AI in general, join us at: [TheBloke AI's Discord server](https://discord.gg/theblokeai) ## Thanks, and how to contribute Thanks to the [chirper.ai](https://chirper.ai) team! Thanks to Clay from [gpus.llm-utils.org](llm-utils)! I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training. If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects. Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits. * Patreon: https://patreon.com/TheBlokeAI * Ko-Fi: https://ko-fi.com/TheBlokeAI **Special thanks to**: Aemon Algiz. **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: KoboldAI's Llama2 13B Tiefighter # LLaMA2-13B-Tiefighter Tiefighter is a merged model achieved trough merging two different lora's on top of a well established existing merge. To achieve this the following recipe was used: * We begin with the base model Undi95/Xwin-MLewd-13B-V0.2 which is a well established merged, contrary to the name this model does not have a strong NSFW bias. * Then we applied the PocketDoc/Dans-RetroRodeo-13b lora which is a finetune on the Choose your own Adventure datasets from our Skein model. * After applying this lora we merged the new model with PocketDoc/Dans-RetroRodeo-13b at 5% to weaken the newly introduced adventure bias. * The resulting merge was used as a new basemodel to which we applied Blackroot/Llama-2-13B-Storywriter-LORA and repeated the same trick, this time at 10%. This means this model contains the following ingredients from their upstream models for as far as we can track them: - Undi95/Xwin-MLewd-13B-V0.2 - - Undi95/ReMM-S-Light - Undi95/CreativeEngine - Brouz/Slerpeno - - elinas/chronos-13b-v2 - jondurbin/airoboros-l2-13b-2.1 - NousResearch/Nous-Hermes-Llama2-13b+nRuaif/Kimiko-v2 - CalderaAI/13B-Legerdemain-L2+lemonilia/limarp-llama2-v2 - - KoboldAI/LLAMA2-13B-Holodeck-1 - NousResearch/Nous-Hermes-13b - OpenAssistant/llama2-13b-orca-8k-3319 - ehartford/WizardLM-1.0-Uncensored-Llama2-13b - Henk717/spring-dragon - The-Face-Of-Goonery/Huginn-v3-13b (Contains undisclosed model versions, those we assumed where possible) - - SuperCOT (Undisclosed version) - elinas/chronos-13b-v2 (Version assumed) - NousResearch/Nous-Hermes-Llama2-13b - stabilityai/StableBeluga-13B (Version assumed) - zattio770/120-Days-of-LORA-v2-13B - PygmalionAI/pygmalion-2-13b - Undi95/Storytelling-v1-13B-lora - TokenBender/sakhi_13B_roleplayer_NSFW_chat_adapter - nRuaif/Kimiko-v2-13B - The-Face-Of-Goonery/Huginn-13b-FP16 - - "a lot of different models, like hermes, beluga, airoboros, chronos.. limarp" - lemonilia/LimaRP-Llama2-13B-v3-EXPERIMENT - Xwin-LM/Xwin-LM-13B-V0.2 - PocketDoc/Dans-RetroRodeo-13b - Blackroot/Llama-2-13B-Storywriter-LORA While we could possibly not credit every single lora or model involved in this merged model, we'd like to thank all involved creators upstream for making this awesome model possible! Thanks to you the AI ecosystem is thriving, and without your dedicated tuning efforts models such as this one would not be possible. # Usage This model is meant to be creative, If you let it improvise you get better results than if you drown it in details. ## Story Writing Regular story writing in the traditional way is supported, simply copy paste your story and continue writing. Optionally use an instruction in memory or an authors note to guide the direction of your story. ### Generate a story on demand To generate stories on demand you can use an instruction (tested in the Alpaca format) such as "Write a novel about X, use chapters and dialogue" this will generate a story. The format can vary between generations depending on how the model chooses to begin, either write what you want as shown in the earlier example or write the beginning of the story yourself so the model can follow your style. A few retries can also help if the model gets it wrong. ## Chatbots and persona's This model has been tested with various forms of chatting, testers have found that typically less is more and the model is good at improvising. Don't drown the model in paragraphs of detailed information, instead keep it simple first and see how far you can lean on the models own ability to figure out your character. Copy pasting paragraphs of background information is not suitable for a 13B model such as this one, code formatted characters or an instruction prompt describing who you wish to talk to goes much further. For example, you can put this in memory in regular chat mode: ``` ### Instruction: Generate a conversation between Alice and Henk where they discuss language models. In this conversation Henk is excited to teach Alice about Tiefigther. ### Response: ``` Because the model is a merge of a variety of models, it should support a broad range of instruct formats, or plain chat mode. If you have a particular favourite try it, otherwise we recommend to either use the regular chat mode or Alpaca's format. ## Instruct Prompting This model features various instruct models on a variety of instruction styles, when testing the model we have used Alpaca for our own tests. If you prefer a different format chances are it can work. During instructions we have observed that in some cases the adventure data can leak, it may also be worth experimenting using > as the prefix for a user command to remedy this. But this may result in a stronger fiction bias. Keep in mind that while this model can be used as a factual instruct model, the focus was on fiction. Information provided by the model can be made up. ## Adventuring and Adventure Games This model contains a lora that was trained on the same adventure dataset as the KoboldAI Skein model. Adventuring is best done using an small introduction to the world and your objective while using the > prefix for a user command (KoboldAI's adventure mode). It is possible that the model does not immediately pick up on what you wish to do and does not engage in its Adventure mode behaviour right away. Simply manually correct the output to trim excess dialogue or other undesirable behaviour and continue to submit your actions using the appropriate mode. The model should pick up on this style quickly and will correctly follow this format within 3 turns. ## Discovered something cool and want to engage with us? Join our community at https://koboldai.org/discord !
[ -0.5907734632492065, -0.723989725112915, 0.20050911605358124, 0.18698564171791077, -0.3367980718612671, -0.08802110701799393, 0.046867791563272476, -0.4977894127368927, 0.21387609839439392, 0.3348247706890106, -0.6519425511360168, -0.4559023976325989, -0.37490734457969666, -0.05694066733121872, -0.16658352315425873, 1.0670619010925293, 0.02413107641041279, -0.2343703955411911, -0.043938666582107544, -0.2488124817609787, -0.1927032470703125, -0.47800782322883606, -0.7682512998580933, -0.24919797480106354, 0.4097585678100586, 0.16611248254776, 0.7982867360115051, 0.5496862530708313, 0.21442542970180511, 0.3086469769477844, -0.1149350255727768, -0.04951169341802597, -0.49549171328544617, -0.13833202421665192, 0.12835319340229034, -0.25324660539627075, -0.6482481956481934, 0.11535026133060455, 0.4656371474266052, 0.12518760561943054, -0.3073807656764984, 0.1764969378709793, 0.04965433105826378, 0.7062646746635437, -0.47606873512268066, 0.14561012387275696, -0.24047547578811646, -0.03465349227190018, -0.19005292654037476, 0.24569590389728546, -0.06420744210481644, -0.41596320271492004, 0.0938238874077797, -0.8902343511581421, 0.20295394957065582, -0.03310295566916466, 1.2098034620285034, 0.09808940440416336, -0.6866534948348999, 0.05789295956492424, -0.2675022780895233, 0.6431317329406738, -0.9606626033782959, 0.3659876883029938, 0.5417559742927551, 0.22762461006641388, -0.18777771294116974, -0.8810088038444519, -0.5673964023590088, 0.01990075595676899, -0.13751910626888275, 0.339354008436203, -0.3703921437263489, 0.1158827617764473, 0.4522916078567505, 0.671137809753418, -0.9761161804199219, -0.0752425417304039, -0.226149320602417, -0.1741362065076828, 0.8728272318840027, 0.06390086561441422, 0.32566386461257935, -0.26296061277389526, -0.299110472202301, -0.449223130941391, -0.6205683946609497, 0.07553982734680176, 0.3077987730503082, -0.04777704179286957, -0.6905274987220764, 0.44066962599754333, -0.3532394468784332, 0.5056065320968628, 0.1849505454301834, -0.19700564444065094, 0.3209429383277893, -0.46698227524757385, -0.47659340500831604, -0.3453879952430725, 1.14344322681427, 0.44957348704338074, -0.12932324409484863, 0.24545051157474518, 0.0178475733846426, -0.07209169119596481, -0.08363515883684158, -1.0258820056915283, -0.4223939776420593, 0.5024954676628113, -0.4580136239528656, -0.3520948886871338, 0.03994259238243103, -0.7955493927001953, -0.10337045788764954, -0.06559868156909943, 0.44341880083084106, -0.5396226048469543, -0.37650424242019653, 0.011851366609334946, -0.5023312568664551, 0.5800297260284424, 0.3383885324001312, -0.7137971520423889, 0.3523903787136078, 0.36952048540115356, 0.6547947525978088, 0.08140537142753601, -0.10576418787240982, -0.23140232264995575, 0.10794749110937119, -0.12210910767316818, 0.4540728032588959, -0.11589588969945908, -0.44201260805130005, -0.2963639497756958, 0.31490474939346313, 0.03835475072264671, -0.22260062396526337, 0.5847381353378296, -0.2986478805541992, 0.41784971952438354, -0.557502031326294, -0.5923658609390259, -0.3944515287876129, 0.12660056352615356, -0.6444771885871887, 1.2272676229476929, 0.5256311297416687, -0.8406857252120972, 0.2614569664001465, -0.4071478545665741, -0.22510284185409546, -0.026499953120946884, -0.025766391307115555, -0.6866959929466248, -0.12038858979940414, 0.2560804486274719, 0.30648359656333923, -0.468403697013855, 0.1551961898803711, -0.4038931131362915, -0.32158249616622925, 0.14140816032886505, -0.3978724777698517, 1.2895954847335815, 0.16397428512573242, -0.5079386234283447, -0.07018035650253296, -0.6541023254394531, 0.21197167038917542, 0.4812150299549103, -0.2256767451763153, 0.03806919977068901, -0.2900041341781616, 0.15459443628787994, 0.17416641116142273, 0.12812158465385437, -0.2764776051044464, 0.47099265456199646, -0.15786558389663696, 0.608834981918335, 0.6235540509223938, 0.11132770031690598, 0.20836935937404633, -0.5406529903411865, 0.5552535057067871, 0.021544715389609337, 0.5379049777984619, 0.11326185613870621, -0.7504975199699402, -0.7085980176925659, -0.38428381085395813, 0.35476014018058777, 0.6151329278945923, -0.8363030552864075, 0.47080913186073303, -0.06694884598255157, -0.7699777483940125, -0.2823701798915863, -0.16492165625095367, 0.3506469130516052, 0.2983790338039398, 0.3835929334163666, -0.3674800992012024, -0.4130980968475342, -0.8074763417243958, -0.008968465961515903, -0.49764585494995117, -0.06211996078491211, 0.44325459003448486, 0.7159820795059204, -0.21432596445083618, 0.6318433284759521, -0.5907455682754517, -0.045996010303497314, 0.01829129084944725, 0.03646339103579521, 0.2769226133823395, 0.5962708592414856, 0.8467547297477722, -0.783254086971283, -0.5141087770462036, -0.08399087190628052, -0.6796419620513916, -0.04776561260223389, -0.040552590042352676, -0.4111456274986267, 0.24374234676361084, -0.03419765457510948, -1.0202221870422363, 0.6691547632217407, 0.5052028298377991, -0.6207621097564697, 0.7979395985603333, -0.09593996405601501, 0.2848573327064514, -1.1161977052688599, 0.12991276383399963, 0.11972590535879135, -0.3198715150356293, -0.49007996916770935, 0.1752026528120041, -0.004352923948317766, 0.1585995852947235, -0.3528720438480377, 0.6738578677177429, -0.5086849927902222, 0.03300900384783745, 0.108846515417099, -0.04324289411306381, 0.3574129343032837, 0.5483835339546204, -0.16104447841644287, 0.8418042659759521, 0.45805245637893677, -0.35816773772239685, 0.5494654774665833, 0.4435024559497833, 0.016873424872756004, 0.3567604124546051, -0.8061903715133667, 0.20391257107257843, 0.14146095514297485, 0.42561426758766174, -0.9245897531509399, -0.3837532699108124, 0.5794569253921509, -0.597277820110321, 0.4656403958797455, -0.4286065995693207, -0.42086488008499146, -0.3994002044200897, -0.6118423342704773, 0.33307451009750366, 0.7691605687141418, -0.3839718997478485, 0.382423460483551, 0.3972412943840027, 0.029177064076066017, -0.5847746133804321, -0.6915563941001892, -0.19833724200725555, -0.32795625925064087, -0.5558997988700867, 0.37421715259552, -0.11511365324258804, -0.027862749993801117, -0.048065751791000366, -0.047113992273807526, -0.18027354776859283, -0.047722093760967255, 0.3421314060688019, 0.3988110423088074, -0.18835239112377167, -0.21661514043807983, 0.21359431743621826, 0.06905510276556015, -0.03761313855648041, -0.3438403606414795, 0.3420243561267853, -0.1998990923166275, -0.05098288506269455, -0.3408052325248718, 0.33062344789505005, 0.46887364983558655, -0.010031482204794884, 0.7525621652603149, 0.9139678478240967, -0.33625686168670654, 0.1228853389620781, -0.5045215487480164, -0.09539203345775604, -0.4822256863117218, 0.15827740728855133, -0.24354253709316254, -0.8606266975402832, 0.5377417206764221, 0.3475046455860138, 0.09305338561534882, 0.7697567343711853, 0.4512310028076172, -0.0373467355966568, 0.9271339774131775, 0.3013443052768707, -0.17945268750190735, 0.4771914780139923, -0.5437012314796448, -0.29990383982658386, -0.7606212496757507, -0.13492293655872345, -0.392374187707901, -0.1586788147687912, -0.8314688205718994, -0.5428632497787476, 0.3184686601161957, 0.40168455243110657, -0.7548314929008484, 0.5112809538841248, -0.6798059940338135, 0.21738344430923462, 0.5404330492019653, 0.2681546211242676, 0.14310716092586517, 0.044502221047878265, -0.14927735924720764, 0.056754227727651596, -0.5692756772041321, -0.19819135963916779, 1.0610021352767944, 0.3283156156539917, 0.6077877283096313, 0.275630384683609, 0.5142151117324829, 0.1177988275885582, 0.31398171186447144, -0.4968739449977875, 0.47456055879592896, 0.04812036454677582, -0.701097309589386, -0.24137800931930542, -0.6546631455421448, -0.8249755501747131, 0.19227972626686096, -0.15016500651836395, -0.7951842546463013, 0.43350619077682495, 0.026250282302498817, -0.1653086543083191, 0.27062684297561646, -0.7128990888595581, 0.9672065377235413, -0.084543377161026, -0.4140245318412781, 0.08620146661996841, -0.7695439457893372, 0.4443325996398926, 0.15643750131130219, -0.06192611902952194, -0.20409059524536133, -0.1966070681810379, 0.7846609354019165, -0.7946236729621887, 0.6522864103317261, -0.28794893622398376, -0.06108788400888443, 0.5566832423210144, -0.18012380599975586, 0.5900617837905884, 0.1823049634695053, -0.032682500779628754, 0.37653112411499023, 0.3828414976596832, -0.5292366147041321, -0.45524606108665466, 0.5042760372161865, -0.9330191612243652, -0.4396000802516937, -0.5208243727684021, -0.35229727625846863, -0.01432148925960064, 0.13507647812366486, 0.5658072829246521, 0.4039481282234192, -0.0638563334941864, 0.010045402683317661, 0.627833366394043, -0.2966614365577698, 0.37329286336898804, 0.3144713342189789, -0.2953454852104187, -0.7623011469841003, 0.814037024974823, 0.040895018726587296, 0.2545154392719269, 0.24185711145401, 0.05372563377022743, -0.47066646814346313, -0.3791431188583374, -0.7586395740509033, 0.4339289963245392, -0.5142948031425476, -0.4460829496383667, -0.47406187653541565, -0.30130013823509216, -0.45621705055236816, 0.16091452538967133, -0.2878017723560333, -0.7365853786468506, -0.4194570481777191, 0.018261773511767387, 0.8509072065353394, 0.48126983642578125, -0.09450269490480423, 0.3305697739124298, -0.7725472450256348, 0.2897860109806061, 0.35062718391418457, 0.274262934923172, -0.08231842517852783, -0.6831604242324829, -0.11387323588132858, 0.14505334198474884, -0.6119248270988464, -1.0156289339065552, 0.5405451059341431, 0.228419229388237, 0.40745940804481506, 0.4221765100955963, 0.14000043272972107, 0.802712619304657, -0.1860756129026413, 0.9580305218696594, 0.17363537847995758, -0.9187241792678833, 0.48816120624542236, -0.5728697180747986, 0.22932691872119904, 0.4509675204753876, 0.5690037608146667, -0.3602592349052429, -0.2931952476501465, -0.7467228174209595, -0.676231324672699, 0.5129480361938477, 0.5048261284828186, -0.2202700823545456, 0.15037794411182404, 0.6066874265670776, -0.10430702567100525, 0.1394580453634262, -0.704217255115509, -0.6257191300392151, -0.38666847348213196, -0.16506557166576385, 0.071599081158638, -0.12096016108989716, -0.25322872400283813, -0.5618810057640076, 0.9524955749511719, -0.22515535354614258, 0.7088952660560608, 0.38274335861206055, 0.12859325110912323, -0.02075519971549511, 0.09253991395235062, 0.41277533769607544, 0.5837260484695435, -0.2166314721107483, -0.25756531953811646, 0.1384771764278412, -0.8172947764396667, 0.19893278181552887, 0.47377195954322815, -0.17762483656406403, -0.06913262605667114, 0.2226586937904358, 0.7643771767616272, -0.028584497049450874, -0.3490253686904907, 0.5477120876312256, -0.32978227734565735, -0.3518649935722351, -0.19577142596244812, 0.16981180012226105, 0.2181708812713623, 0.3968333601951599, 0.28041091561317444, -0.274132639169693, 0.29241514205932617, -0.46976184844970703, 0.23884317278862, 0.4712478518486023, -0.25331592559814453, -0.290122389793396, 0.8526024222373962, -0.07397174090147018, 0.20185178518295288, 0.6349316239356995, -0.3095032274723053, -0.46447986364364624, 0.7710903882980347, 0.4137488603591919, 0.796453595161438, -0.19917422533035278, 0.23110629618167877, 0.5711488723754883, 0.18108458817005157, -0.021960023790597916, 0.4681953489780426, -0.05608202889561653, -0.5366462469100952, -0.3585442304611206, -0.5510171055793762, -0.33661502599716187, 0.19667641818523407, -0.8540331125259399, 0.1573641151189804, -0.42485538125038147, -0.402649462223053, -0.15190960466861725, 0.43058475852012634, -0.5767066478729248, 0.2777863144874573, 0.04487898200750351, 0.96239173412323, -0.7223641276359558, 0.9075832962989807, 0.633986234664917, -0.43174663186073303, -0.9962827563285828, -0.1297818124294281, 0.23834733664989471, -0.6086528301239014, 0.06637382507324219, 0.014825385063886642, 0.4113120436668396, 0.06061847135424614, -0.6831588745117188, -0.7590743899345398, 1.4781845808029175, 0.40876495838165283, -0.5021511316299438, -0.09557309001684189, -0.006523186340928078, 0.2693708837032318, -0.0014417702332139015, 0.6610094904899597, 0.6676658391952515, 0.41070374846458435, 0.16690652072429657, -0.9043580293655396, 0.4659413695335388, -0.406035453081131, 0.03850873187184334, 0.20211884379386902, -1.0663214921951294, 0.890423059463501, 0.002349907997995615, -0.11208812892436981, 0.21525123715400696, 0.6191972494125366, 0.5678059458732605, 0.07082198560237885, 0.29745811223983765, 0.8481119871139526, 0.7618504762649536, -0.40566375851631165, 1.1575392484664917, -0.0616050660610199, 0.6799842715263367, 0.7837568521499634, 0.07541819661855698, 0.6446714401245117, 0.238778218626976, -0.6877110600471497, 0.5103405117988586, 0.990859866142273, -0.08831411600112915, 0.29734453558921814, 0.00018344591080676764, -0.35527390241622925, -0.06585527211427689, 0.151923269033432, -0.7468962073326111, 0.10670822113752365, 0.32845789194107056, -0.2346174269914627, 0.1030895784497261, -0.20200029015541077, 0.1799531728029251, -0.6785497069358826, -0.10665270686149597, 0.6534655690193176, 0.25953415036201477, -0.2937384843826294, 0.8969983458518982, -0.08797238022089005, 0.562414288520813, -0.5845128893852234, -0.19613800942897797, -0.4117000102996826, -0.0662623718380928, -0.2557714581489563, -0.7806334495544434, 0.08655434101819992, -0.1582181602716446, -0.11594034731388092, 0.0829378142952919, 0.7445177435874939, -0.2603205144405365, -0.38795238733291626, 0.30910998582839966, 0.4182009994983673, 0.2901979386806488, -0.15346501767635345, -1.0733007192611694, 0.37907442450523376, 0.08109641820192337, -0.6447418928146362, 0.4853523373603821, 0.4435034990310669, 0.18207629024982452, 0.5884791612625122, 0.5615957975387573, -0.08859112858772278, -0.01837870478630066, -0.17323748767375946, 1.0304535627365112, -0.7754350900650024, -0.3526911735534668, -0.7321481704711914, 0.6219035387039185, -0.18979021906852722, -0.4734768867492676, 0.7778498530387878, 0.6175575256347656, 0.6881936192512512, 0.04256590083241463, 0.725963830947876, -0.4201032519340515, 0.20797158777713776, -0.39198553562164307, 0.7862987518310547, -0.6961154937744141, 0.02329062484204769, -0.47914692759513855, -0.7046605944633484, -0.07194430381059647, 0.628629207611084, 0.011734974570572376, 0.27264320850372314, 0.3561122715473175, 0.7883474826812744, 0.022744810208678246, 0.1628260463476181, 0.16789232194423676, 0.2681497633457184, 0.22191977500915527, 0.8782017230987549, 0.637579619884491, -1.0512502193450928, 0.4938623905181885, -0.4155970513820648, -0.3048185110092163, -0.10741320252418518, -0.7557793855667114, -0.8102257251739502, -0.4983789324760437, -0.5767083764076233, -0.6702669262886047, 0.021646255627274513, 0.7951078414916992, 0.8787218928337097, -0.6955592036247253, -0.24634519219398499, -0.03412511199712753, 0.10394252091646194, -0.25318002700805664, -0.3305647671222687, 0.3951633870601654, 0.3166866898536682, -0.6297531127929688, 0.13950666785240173, 0.026343870908021927, 0.3848074972629547, -0.013185429386794567, -0.38187557458877563, -0.2483309805393219, -0.06017615646123886, 0.5759392380714417, 0.582817792892456, -0.5719239115715027, -0.14541012048721313, -0.20075556635856628, -0.11322374641895294, 0.20382505655288696, 0.33008790016174316, -0.6848688125610352, 0.03977562114596367, 0.468167781829834, 0.29466116428375244, 0.851540207862854, 0.08130157738924026, 0.3432784676551819, -0.5186268091201782, 0.1758744865655899, 0.04323691502213478, 0.30434298515319824, 0.05755677819252014, -0.48201417922973633, 0.6963983178138733, 0.4963550567626953, -0.7339675426483154, -0.7302556037902832, -0.14679661393165588, -1.189477562904358, -0.19567537307739258, 1.0344651937484741, -0.23839788138866425, -0.31778430938720703, 0.05322419852018356, -0.2957420349121094, 0.4261622726917267, -0.4932312071323395, 0.1628846973180771, 0.4891549348831177, -0.23858550190925598, -0.447611927986145, -0.7543099522590637, 0.6574916839599609, 0.17806848883628845, -0.9109271168708801, -0.025104882195591927, 0.4862440228462219, 0.43272021412849426, -0.0732855275273323, 0.7582988739013672, -0.22156451642513275, 0.34940582513809204, 0.15812376141548157, 0.0501873716711998, 0.039348844438791275, 0.14482000470161438, -0.42098620533943176, -0.11614853143692017, -0.2740602493286133, 0.02515464276075363 ]
pszemraj/led-large-book-summary
pszemraj
"2023-11-28T19:16:42Z"
31,383
71
transformers
[ "transformers", "pytorch", "safetensors", "led", "text2text-generation", "summarization", "summary", "longformer", "booksum", "long-document", "long-form", "en", "dataset:kmfoda/booksum", "arxiv:2105.08209", "doi:10.57967/hf/0101", "license:apache-2.0", "license:bsd-3-clause", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
summarization
"2022-03-02T23:29:05Z"
--- language: - en license: - apache-2.0 - bsd-3-clause tags: - summarization - led - summary - longformer - booksum - long-document - long-form datasets: - kmfoda/booksum metrics: - rouge widget: - text: large earthquakes along a given fault segment do not occur at random intervals because it takes time to accumulate the strain energy for the rupture. The rates at which tectonic plates move and accumulate strain at their boundaries are approximately uniform. Therefore, in first approximation, one may expect that large ruptures of the same fault segment will occur at approximately constant time intervals. If subsequent main shocks have different amounts of slip across the fault, then the recurrence time may vary, and the basic idea of periodic mainshocks must be modified. For great plate boundary ruptures the length and slip often vary by a factor of 2. Along the southern segment of the San Andreas fault the recurrence interval is 145 years with variations of several decades. The smaller the standard deviation of the average recurrence interval, the more specific could be the long term prediction of a future mainshock. example_title: earthquakes - text: ' A typical feed-forward neural field algorithm. Spatiotemporal coordinates are fed into a neural network that predicts values in the reconstructed domain. Then, this domain is mapped to the sensor domain where sensor measurements are available as supervision. Class and Section Problems Addressed Generalization (Section 2) Inverse problems, ill-posed problems, editability; symmetries. Hybrid Representations (Section 3) Computation & memory efficiency, representation capacity, editability: Forward Maps (Section 4) Inverse problems Network Architecture (Section 5) Spectral bias, integration & derivatives. Manipulating Neural Fields (Section 6) Edit ability, constraints, regularization. Table 2: The five classes of techniques in the neural field toolbox each addresses problems that arise in learning, inference, and control. (Section 3). We can supervise reconstruction via differentiable forward maps that transform Or project our domain (e.g, 3D reconstruction via 2D images; Section 4) With appropriate network architecture choices, we can overcome neural network spectral biases (blurriness) and efficiently compute derivatives and integrals (Section 5). Finally, we can manipulate neural fields to add constraints and regularizations, and to achieve editable representations (Section 6). Collectively, these classes constitute a ''toolbox'' of techniques to help solve problems with neural fields There are three components in a conditional neural field: (1) An encoder or inference function € that outputs the conditioning latent variable 2 given an observation 0 E(0) =2. 2 is typically a low-dimensional vector, and is often referred to aS a latent code Or feature code_ (2) A mapping function 4 between Z and neural field parameters O: Y(z) = O; (3) The neural field itself $. The encoder € finds the most probable z given the observations O: argmaxz P(2/0). The decoder maximizes the inverse conditional probability to find the most probable 0 given Z: arg- max P(Olz). We discuss different encoding schemes with different optimality guarantees (Section 2.1.1), both global and local conditioning (Section 2.1.2), and different mapping functions Y (Section 2.1.3) 2. Generalization Suppose we wish to estimate a plausible 3D surface shape given a partial or noisy point cloud. We need a suitable prior over the sur- face in its reconstruction domain to generalize to the partial observations. A neural network expresses a prior via the function space of its architecture and parameters 0, and generalization is influenced by the inductive bias of this function space (Section 5).' example_title: scientific paper - text: ' the big variety of data coming from diverse sources is one of the key properties of the big data phenomenon. It is, therefore, beneficial to understand how data is generated in various environments and scenarios, before looking at what should be done with this data and how to design the best possible architecture to accomplish this The evolution of IT architectures, described in Chapter 2, means that the data is no longer processed by a few big monolith systems, but rather by a group of services In parallel to the processing layer, the underlying data storage has also changed and became more distributed This, in turn, required a significant paradigm shift as the traditional approach to transactions (ACID) could no longer be supported. On top of this, cloud computing is becoming a major approach with the benefits of reducing costs and providing on-demand scalability but at the same time introducing concerns about privacy, data ownership, etc In the meantime the Internet continues its exponential growth: Every day both structured and unstructured data is published and available for processing: To achieve competitive advantage companies have to relate their corporate resources to external services, e.g. financial markets, weather forecasts, social media, etc While several of the sites provide some sort of API to access the data in a more orderly fashion; countless sources require advanced web mining and Natural Language Processing (NLP) processing techniques: Advances in science push researchers to construct new instruments for observing the universe O conducting experiments to understand even better the laws of physics and other domains. Every year humans have at their disposal new telescopes, space probes, particle accelerators, etc These instruments generate huge streams of data, which need to be stored and analyzed. The constant drive for efficiency in the industry motivates the introduction of new automation techniques and process optimization: This could not be done without analyzing the precise data that describe these processes. As more and more human tasks are automated, machines provide rich data sets, which can be analyzed in real-time to drive efficiency to new levels. Finally, it is now evident that the growth of the Internet of Things is becoming a major source of data. More and more of the devices are equipped with significant computational power and can generate a continuous data stream from their sensors. In the subsequent sections of this chapter, we will look at the domains described above to see what they generate in terms of data sets. We will compare the volumes but will also look at what is characteristic and important from their respective points of view. 3.1 The Internet is undoubtedly the largest database ever created by humans. While several well described; cleaned, and structured data sets have been made available through this medium, most of the resources are of an ambiguous, unstructured, incomplete or even erroneous nature. Still, several examples in the areas such as opinion mining, social media analysis, e-governance, etc, clearly show the potential lying in these resources. Those who can successfully mine and interpret the Internet data can gain unique insight and competitive advantage in their business An important area of data analytics on the edge of corporate IT and the Internet is Web Analytics.' example_title: data science textbook - text: 'Transformer-based models have shown to be very useful for many NLP tasks. However, a major limitation of transformers-based models is its O(n^2)O(n 2) time & memory complexity (where nn is sequence length). Hence, it''s computationally very expensive to apply transformer-based models on long sequences n > 512n>512. Several recent papers, e.g. Longformer, Performer, Reformer, Clustered attention try to remedy this problem by approximating the full attention matrix. You can checkout 🤗''s recent blog post in case you are unfamiliar with these models. BigBird (introduced in paper) is one of such recent models to address this issue. BigBird relies on block sparse attention instead of normal attention (i.e. BERT''s attention) and can handle sequences up to a length of 4096 at a much lower computational cost compared to BERT. It has achieved SOTA on various tasks involving very long sequences such as long documents summarization, question-answering with long contexts. BigBird RoBERTa-like model is now available in 🤗Transformers. The goal of this post is to give the reader an in-depth understanding of big bird implementation & ease one''s life in using BigBird with 🤗Transformers. But, before going into more depth, it is important to remember that the BigBird''s attention is an approximation of BERT''s full attention and therefore does not strive to be better than BERT''s full attention, but rather to be more efficient. It simply allows to apply transformer-based models to much longer sequences since BERT''s quadratic memory requirement quickly becomes unbearable. Simply put, if we would have ∞ compute & ∞ time, BERT''s attention would be preferred over block sparse attention (which we are going to discuss in this post). If you wonder why we need more compute when working with longer sequences, this blog post is just right for you! Some of the main questions one might have when working with standard BERT-like attention include: Do all tokens really have to attend to all other tokens? Why not compute attention only over important tokens? How to decide what tokens are important? How to attend to just a few tokens in a very efficient way? In this blog post, we will try to answer those questions. What tokens should be attended to? We will give a practical example of how attention works by considering the sentence ''BigBird is now available in HuggingFace for extractive question answering''. In BERT-like attention, every word would simply attend to all other tokens. Let''s think about a sensible choice of key tokens that a queried token actually only should attend to by writing some pseudo-code. Will will assume that the token available is queried and build a sensible list of key tokens to attend to. >>> # let''s consider following sentence as an example >>> example = [''BigBird'', ''is'', ''now'', ''available'', ''in'', ''HuggingFace'', ''for'', ''extractive'', ''question'', ''answering''] >>> # further let''s assume, we''re trying to understand the representation of ''available'' i.e. >>> query_token = ''available'' >>> # We will initialize an empty `set` and fill up the tokens of our interest as we proceed in this section. >>> key_tokens = [] # => currently ''available'' token doesn''t have anything to attend Nearby tokens should be important because, in a sentence (sequence of words), the current word is highly dependent on neighboring past & future tokens. This intuition is the idea behind the concept of sliding attention.' example_title: bigbird blog intro - text: 'The majority of available text summarization datasets include short-form source documents that lack long-range causal and temporal dependencies, and often contain strong layout and stylistic biases. While relevant, such datasets will offer limited challenges for future generations of text summarization systems. We address these issues by introducing BookSum, a collection of datasets for long-form narrative summarization. Our dataset covers source documents from the literature domain, such as novels, plays and stories, and includes highly abstractive, human written summaries on three levels of granularity of increasing difficulty: paragraph-, chapter-, and book-level. The domain and structure of our dataset poses a unique set of challenges for summarization systems, which include: processing very long documents, non-trivial causal and temporal dependencies, and rich discourse structures. To facilitate future work, we trained and evaluated multiple extractive and abstractive summarization models as baselines for our dataset.' example_title: BookSum Abstract inference: parameters: max_length: 64 min_length: 8 no_repeat_ngram_size: 3 early_stopping: true repetition_penalty: 3.5 length_penalty: 0.3 encoder_no_repeat_ngram_size: 3 num_beams: 4 model-index: - name: pszemraj/led-large-book-summary results: - task: type: summarization name: Summarization dataset: name: kmfoda/booksum type: kmfoda/booksum config: kmfoda--booksum split: test metrics: - type: rouge value: 31.7308 name: ROUGE-1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNjJmZjMxYTY0OGU3MzNjNmIzNmYyODNlNDg2ZGRhZDAzNTMwMDM5YWMxODc1OTc1ZWE3MzM2OTg1ODFhZDBkNCIsInZlcnNpb24iOjF9.B8BCKgySYVZW910_1zP0LfCpQYJbAe6loyWut76JlgZb2kV1_x9ybqtNESX0ka-lNqhYyXUNDpuS-7pTmsJVDg - type: rouge value: 5.3311 name: ROUGE-2 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYzViMmY4ODFjYTc5ODk5MmRhMDQ3ZDRiYWQwMDg0OTk3ZTA4NDAxYTNiNDgyMmI4NDA3ZDMwYWViOTBkODBjNyIsInZlcnNpb24iOjF9.MOhJLDcgvv93mVFL1igIgIiTAH3b2Xa4gmBObq7RF44Mmu8Kxtd1KP7rOlDVFOrtrsooGPGsyE1GMCQ2kqeMDg - type: rouge value: 16.1465 name: ROUGE-L verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNzNjMzEwMTliZGE3ZmQ4M2UxMDAyMTY3YzJjZmMyMDYyN2YyNDM0N2VhNzI1MDc1YTg4MTRjMmEzNjVkNTk1NCIsInZlcnNpb24iOjF9.XLJ-DVKiYLlbw5E5rWADKbzUzf5fNHhlTCWPCC5dU4NI9Yeh76aR7TPt36ZzLDwTBknnR8KHqlaF8F8YAvBUAg - type: rouge value: 29.0883 name: ROUGE-LSUM verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMTcwNzEwMmE5NjQxZTkzYmQyZDZmNzllYzYyNGI5OTMyNWMwNjdiM2I2YmM5YjdmY2E5OWQ3OTk3ZDA1MTc3YyIsInZlcnNpb24iOjF9.d6rFxjCB6RJNI_pn2DNNSjuZe4rdvj0RatkaTJRp5lP0F_AFfU5Zn9zRWzZJV7V-xMauIc4UhfdoLp9r_-CABA - type: loss value: 4.815707206726074 name: loss verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTMwMTgxMmJkODY3MjkzOWJhMzJhOTIxMWVkODhjZmM0MWUzMWQ1N2JkZjRhOTQxNmU1YWVjYzQ0MDNlZWI3OSIsInZlcnNpb24iOjF9.mkBQHYhYFfDV6F4klXGJ1dSsF-pbCs-6F9zcw6IYznwmXUjtk7m5J4Zt4JAju5LKz4YizvEcUCl_L0WddnfvDA - type: gen_len value: 154.9036 name: gen_len verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMTc0ZmM1ZDM4MDE0MzY3MDM3OWJhNDkzZjJkZDdkMjU5M2JmMDJjYTIxODA1OTllNmY5ZWQzZDlmNWFiYzk4NiIsInZlcnNpb24iOjF9.VQ_O_xSTz870tnM08PJXQOwg9OsNNwI_HVX4S7AuW57_FzGGyRaWSuGE5SWzRS4Tur9YP0QxV4VV0Yoaoi3IAA - task: type: summarization name: Summarization dataset: name: samsum type: samsum config: samsum split: test metrics: - type: rouge value: 33.4484 name: ROUGE-1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTk4Yjg1YTc4YmY0MzBiZDU4ZjFhNzI4MjZkMWU1MzBlOWNlMjQ5ODMzY2YzYzRhYjJkMGUzNmI3ZjdkMzIzZSIsInZlcnNpb24iOjF9.AqS8A1OUiM0IZFBEGirv5F3Novk8lSUYSfPc3bYWLA6t-W7wgup3qA207eGbE5j9CkDWZ7QrSG1U6Z9A0sOqAA - type: rouge value: 10.4249 name: ROUGE-2 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiN2U4NjUyNTFmOGM5OTlhZDMyMTlmM2E4OWI2NGFiMDAyMGJjMzRjNWNlMGEyYWFmNTE5ZWMxM2I0ZGZmNWNmOCIsInZlcnNpb24iOjF9.SgJcHJ4qoRWXFvFiwv1PUutWktvsxQNynVPEv-GtBgxd6WI7o561ONyco5U-5tcyE_1SbSCJzz-L-R-q3cvoDA - type: rouge value: 24.5802 name: ROUGE-L verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZmQ5MDI5MzdiNGE5NDM0MmU5OThmZTBkNjkxMzg5N2IxNGVlODdhZTZhNjg3NzFjYWEyMzA3MTQxNjMyMjRkOCIsInZlcnNpb24iOjF9.Bg5dHqCcJjmxa-xGWNR5lD9g3quX7lKkH0pjiTd2xE5WiPoLLN2c0mYa2GovdW7__WnYwhhHC7es03jmvyZbCw - type: rouge value: 29.8226 name: ROUGE-LSUM verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNGFhOTEwNGM1MmZkNDk2ZjQ1Y2MyNjM3MGI5MGY3MWVkM2I0MjU2NWFiYmEwMjE4MTJlZWIwOGQ2MjQ3YjgzYSIsInZlcnNpb24iOjF9.W_aQKs10oXQdKEczJBGM3iiwJgb-VaXTpyA3sGof5WbhHf9vITAQA-xvynh5LgKtXQ1zjx737hnHgjEsu_Y0Cw - type: loss value: 4.176078796386719 name: loss verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiN2JhODQ5YTZkNDZkZGYyNGU2MzkxMWU5MTEwMGM2YmVjZTA5YzI5NTMxMDNhYjhlOTAxMzFiMDYwYmM0MjEzZCIsInZlcnNpb24iOjF9.OvZrPBOR5jhkoTGBgsInkH7j3_xpacXHDoT7UIXEnyXzadfBO-O-K6fjalLNZw8wSkbjHIFcL_6S_qTTxPsNAQ - type: gen_len value: 65.4005 name: gen_len verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiM2NhYjc3ZjQzNDEwYmMzOTM0ODkyZTJhZWNhNzZhYmEyZTYxMzA2YTYzMWFjOTA5ZjlhYWMzODg3NzY1ZTUwYSIsInZlcnNpb24iOjF9.vk9bgmtQFeRwdY3VXjtrJr_5wUCIeoAkI3kO0cHxhxmJo6RvUnyXiut72FuB-mlLZvqgiNkaZ-u_bh0Z3DjuCw - task: type: summarization name: Summarization dataset: name: billsum type: billsum config: default split: test metrics: - type: rouge value: 40.5843 name: ROUGE-1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTVjMDkyMWZjYTQ0NzgzNGUxZjNiMTg3NjU1MWJlNTQ2MWQ1NjE1MDk1OTU4ZjJiNGQ5ODg3Y2VlMWUyMzllNyIsInZlcnNpb24iOjF9.OhqBcVIuHk7fzmdrsWMvUe1bLeVMZVstZUoZpP7C1vR-3aIDl7r6eBmPrt5w-KcNq5p4teNPBsq7oKzbd5ZgDQ - type: rouge value: 17.3401 name: ROUGE-2 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNGQxYmQzMmE0OTcyNTM5NmMwNjIxNzYxZDcwMDFkYzJkOWY4YWY3NTdhZGRhZDdlMDAxNzcwODQ5OGM3Mzc1MCIsInZlcnNpb24iOjF9.Pksn25EEqvmx757N7Swrd4yXc_xU7-AMN9yNe8lrbBa-l1LoI_2PUASvnjML4f705cfuyMAfb0FkFp5WfER2AA - type: rouge value: 25.1256 name: ROUGE-L verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMjhjYzI5MDBiMjk2NTY3MDNmZTdiOGYwMTRlYjIwZjAwMjdlNTAyYzdhYTJlODQ4MjYzYmQ3MjRlYTA2YzhhZSIsInZlcnNpb24iOjF9.1jPepsweS2bzIqDverQzzhmhFGch7gpoEGFGqQ8zW7K10aUKWFX8lt-uZAmTa1Z5ZhzyXGBzc3dReFPhWRRJBg - type: rouge value: 34.6619 name: ROUGE-LSUM verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiM2VkZDIxNWJjOTA0NzFjOTIwOTdjYjc1M2EyNDVjZjY2ZjY3MjIxNDk3YTc5YWExNzAwN2FhOTc1NjVhYjBkYiIsInZlcnNpb24iOjF9.8opqHSUckPohoSF9jfPTpXDz2AtDwvdMqOdIXx2kE1tkOcbLPbOBfcc8RhRR98y8S26yC6EYFhFnf03CV2ejAQ - type: loss value: 4.792657375335693 name: loss verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYTY5ZTRkMGU3OGVkODMzMDU5OWE1NTM5YjA4NDliZDlmNzc2NzZjNjFmNTA3M2EwY2NmN2E0MWJmZjQ5ZDliMiIsInZlcnNpb24iOjF9.KCKdk8xt2NWcMmYKV3-9eVEsFm9MqGllSMu9QCFJFIQlnyNXllHKdBLouoaGQz8IRYXvZKH8_TLDPIQx-31jAg - type: gen_len value: 163.9394 name: gen_len verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYzdkZDYyZGUzYmFkZmI2NjUwYmQ0MzZjMmIyZjI1YTFiMzM4OThiZjBiMzljOTVkZTgwMjA0NTE5OGM2YmFjMiIsInZlcnNpb24iOjF9.XyMZLUdkUIF32KTJMuv_bJswQCx_Tfg4Fx823cURUixSeoIKps8_a634AreZ3Z8kb7bfE_sFGh3rM9KWsMxlDw - task: type: summarization name: Summarization dataset: name: multi_news type: multi_news config: default split: test metrics: - type: rouge value: 39.0834 name: ROUGE-1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNjYzMmVlMDM4MTNkMTI4MjAyMTU2YTg1ZWQwNTI1MmJlNGUwZmE1NTRmYTljZTQwY2RlMjcxOTgyZGMyYTc0ZiIsInZlcnNpb24iOjF9.6yuSr7UmsFatwqQ-mEO4gmsEtWI05kGB5Ib2pnl05H1OiPT2uUwmqdUytUw8KTx9u1jv9q0cTF1cL-n2kPEJAA - type: rouge value: 11.4043 name: ROUGE-2 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMWI5N2U2ZWI1ODM2MWUwOTIzYTAzNmRhNDA2OWEzZWRjMGEzMjBmY2EwN2YyYzU1NWE0YjIyZDE3MWE0MmMxZCIsInZlcnNpb24iOjF9.wonuxbBl25TzEaHUH_E816nHJ1OSXKfkaq7eJzbLpsfeGwcDklxUSxZxRO7VBiBMaY3Qttf9ywmEIPp40HnpBA - type: rouge value: 19.1813 name: ROUGE-L verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZjU1NDZhN2NkMzZiZGJkODE4NDZiYjViOTZkNGMyNDlkNjBlZmFjYzU1N2IzMjFjYjY1MDU1Zjk2MzA0M2U4NyIsInZlcnNpb24iOjF9.bTCRzv3J9NiCh4aV23tAWGTvrdQCv_RS40zGwC4AJXtGS40cY7tJHYwBf9U9_rCetDBxqfjJpdaUbCAOglxLAA - type: rouge value: 35.1581 name: ROUGE-LSUM verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMDNhNTUyZjE4NjYxYjIzYThmMDM2YWNhM2QwYzY1ODI2ZTE3NmNjMmVhOTAzZjZlOWQwYzc1NzU2NDNjNzIxMyIsInZlcnNpb24iOjF9.cWlSbEBgrMN5D-fV_yL9geNMyMkIItcVO3wehNJPzFi3E0v1-4q8pnX-UgjLzto8X7JLi6as2V_HtZE4-C-CDw - type: loss value: 4.654905319213867 name: loss verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYTc5Nzk0ODhiNWUzNTAxNzk2YzZmMjU2NDliY2UzOTYyYTdmZGEyYjI5NDNhOTE0MGUxOTgxMGVjMmNhM2UyMSIsInZlcnNpb24iOjF9.eBBAebcl3AwkrjR6a8BvoSjDfpw8LWTRFjyIFHVzspvoOKVfnO8_NB_UeR_K127OwXyoZ70Z7X_aKJOe-2kTDA - type: gen_len value: 186.2494 name: gen_len verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOWI2NjVlYjgwYWJiMjcyMDUzMzEwNDNjZTMxMDM0MjAzMzk1ZmIwY2Q1ZDQ2Y2M5NDBlMDEzYzFkNWEyNzJmNiIsInZlcnNpb24iOjF9.iZ1Iy7FuWL4GH7LS5EylVj5eZRC3L2ZsbYQapAkMNzR_VXPoMGvoM69Hp-kU7gW55tmz2V4Qxhvoz9cM8fciBA - task: type: summarization name: Summarization dataset: name: cnn_dailymail type: cnn_dailymail config: 3.0.0 split: test metrics: - type: rouge value: 32.8774 name: ROUGE-1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYWVlNjQzNWU1NTgyNTk2MzdhMDkyM2U3N2UzYzQ3ODJmOTJiMGViZDc0NzNiNDlmZGZmNTQzZmNjYTFjMzJmMCIsInZlcnNpb24iOjF9.qA54KJrGf79XCLnDrAMPp0saErVL_zKicLso9ZX2xxNdCANGExal5PFmmTT7aw7TUdkmUsNhmIRI9cBZ8J_1BA - type: rouge value: 13.3706 name: ROUGE-2 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZDMzZWVjZmQ4ZWI2MWZmMGEzNjJhY2JmZjJhZTYwMTk2OTM2ODhlMmFmYmMxZGUyZWQzMmUxYzA0ZjJiMjcwYiIsInZlcnNpb24iOjF9.03Di-BfbZoWAVqRJc3x37Tn1Ae6vtZWymZL2w1ob8OQ8iOggYwmDmNQwv-bCXjT7fLjXYvh9uTndYsL05nj_Ag - type: rouge value: 20.4365 name: ROUGE-L verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYjI5YzdjZmM0YmZjYTU0OTg3ZTRjZWZkYTU2NzhlZjkwNGE2YmUzYzI1OThjMDUxOTcyNzk3ZTUyNmIzMWYzZCIsInZlcnNpb24iOjF9.LDg9lCKTh74kilxRBpunGSeOXJohaICXWjNf525ck-1h21AtjIQB8U7BTm80eyNRe7yIQpAlgOruCAxRqpTHDw - type: rouge value: 30.4408 name: ROUGE-LSUM verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTZhMGJjMzg0MzQxY2U2ZTIzYTYzOGRhMGEyYjY1ZjQyZjNmNGIwMzFjOWJjNzU2NWQzMzc1Y2IxYWZkZGY5YyIsInZlcnNpb24iOjF9.LkvaIEsw0U-osBR--46f7rsF-s1fcu19Z22DkvwiMwWJj9AnsUwDWNcCecIyi5tziQpUx0PpZEKyXAhCrVx1Bw - type: loss value: 5.3488945960998535 name: loss verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTc4Y2JlZWRlNDRkOTI4ODQyZjBlMjU5NmUyZTZmNzJjYTg0NjM1YzI4NzUzYjhmODBkY2U4NGJiMTlhYTc2ZiIsInZlcnNpb24iOjF9.CB6oO5j3cKJPOelM8pwT2lTenp5bZTkBFC5MPYW_nus-O5F1s4DaY-gdSUK3baTkMXbQ2yqaI_g_QAfNVmqhDQ - type: gen_len value: 181.8326 name: gen_len verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOThmMGNlMGEwYjljMmNiZjdkMjc5NzZhNTYwMzAzOWFkYzA1NzZiNTIyN2IxNDJmOTk4MDliYzY2YjdjNGY4MSIsInZlcnNpb24iOjF9._buvRpxKLuKNNtOmALbFm3-nWCs2NCLh1l8gfVqDmKmv8JqJHQ27cdgZ4mklPLYOUhf6YWjby5_lp3ZGEctkCQ --- # led-large-book-summary <a href="https://colab.research.google.com/gist/pszemraj/3eba944ddc9fc9a4a1bfb21e83b57620/summarization-token-batching.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> This model is a fine-tuned version of [allenai/led-large-16384](https://huggingface.co/allenai/led-large-16384) on the `BookSum` dataset (`kmfoda/booksum`). It aims to generalize well and be useful in summarizing lengthy text for both academic and everyday purposes. - Handles up to 16,384 tokens input - See the Colab demo linked above or try the [demo on Spaces](https://huggingface.co/spaces/pszemraj/summarize-long-text) > **Note:** Due to inference API timeout constraints, outputs may be truncated before the fully summary is returned (try python or the demo) --- ## Basic Usage To improve summary quality, use `encoder_no_repeat_ngram_size=3` when calling the pipeline object. This setting encourages the model to utilize new vocabulary and construct an abstractive summary. Load the model into a pipeline object: ```python import torch from transformers import pipeline hf_name = 'pszemraj/led-large-book-summary' summarizer = pipeline( "summarization", hf_name, device=0 if torch.cuda.is_available() else -1, ) ``` Feed the text into the pipeline object: ```python wall_of_text = "your words here" result = summarizer( wall_of_text, min_length=16, max_length=256, no_repeat_ngram_size=3, encoder_no_repeat_ngram_size=3, repetition_penalty=3.5, num_beams=4, early_stopping=True, ) ``` **Important:** For optimal summary quality, use the global attention mask when decoding, as demonstrated in [this community notebook](https://colab.research.google.com/drive/12INTTR6n64TzS4RrXZxMSXfrOd9Xzamo?usp=sharing), see the definition of `generate_answer(batch)`. If you're facing computing constraints, consider using the base version [`pszemraj/led-base-book-summary`](https://huggingface.co/pszemraj/led-base-book-summary). --- ## Training Information ### Data The model was fine-tuned on the [booksum](https://arxiv.org/abs/2105.08209) dataset. During training, the `chapter`was the input col, while the `summary_text` was the output. ### Procedure Fine-tuning was run on the BookSum dataset across 13+ epochs. Notably, the final four epochs combined the training and validation sets as 'train' to enhance generalization. ### Hyperparameters The training process involved different settings across stages: - **Initial Three Epochs:** Low learning rate (5e-05), batch size of 1, 4 gradient accumulation steps, and a linear learning rate scheduler. - **In-between Epochs:** Learning rate reduced to 4e-05, increased batch size to 2, 16 gradient accumulation steps, and switched to a cosine learning rate scheduler with a 0.05 warmup ratio. - **Final Two Epochs:** Further reduced learning rate (2e-05), batch size reverted to 1, maintained gradient accumulation steps at 16, and continued with a cosine learning rate scheduler, albeit with a lower warmup ratio (0.03). ### Versions - Transformers 4.19.2 - Pytorch 1.11.0+cu113 - Datasets 2.2.2 - Tokenizers 0.12.1 --- ## Simplified Usage with TextSum To streamline the process of using this and other models, I've developed [a Python package utility](https://github.com/pszemraj/textsum) named `textsum`. This package offers simple interfaces for applying summarization models to text documents of arbitrary length. Install TextSum: ```bash pip install textsum ``` Then use it in Python with this model: ```python from textsum.summarize import Summarizer model_name = "pszemraj/led-large-book-summary" summarizer = Summarizer( model_name_or_path=model_name, # you can use any Seq2Seq model on the Hub token_batch_length=4096, # tokens to batch summarize at a time, up to 16384 ) long_string = "This is a long string of text that will be summarized." out_str = summarizer.summarize_string(long_string) print(f"summary: {out_str}") ``` Currently implemented interfaces include a Python API, a Command-Line Interface (CLI), and a demo/web UI. For detailed explanations and documentation, check the [README](https://github.com/pszemraj/textsum) or the [wiki](https://github.com/pszemraj/textsum/wiki) --- ## Related Models Check out these other related models, also trained on the BookSum dataset: - [LED-large continued](https://huggingface.co/pszemraj/led-large-book-summary-continued) - experiment with further fine-tuning - [Long-T5-tglobal-base](https://huggingface.co/pszemraj/long-t5-tglobal-base-16384-book-summary) - [BigBird-Pegasus-Large-K](https://huggingface.co/pszemraj/bigbird-pegasus-large-K-booksum) - [Pegasus-X-Large](https://huggingface.co/pszemraj/pegasus-x-large-book-summary) - [Long-T5-tglobal-XL](https://huggingface.co/pszemraj/long-t5-tglobal-xl-16384-book-summary) There are also other variants on other datasets etc on my hf profile, feel free to try them out :) ---
[ -0.3216034770011902, -0.6684370636940002, 0.19548943638801575, 0.08642269670963287, -0.372469037771225, -0.264313668012619, -0.4416462182998657, -0.29917454719543457, 0.10105719417333603, 0.3542608618736267, -0.46559715270996094, -0.6027402281761169, -0.502252459526062, 0.27075740694999695, -0.30528587102890015, 1.4174301624298096, 0.008870468474924564, -0.15275253355503082, 0.0868322104215622, -0.05827374756336212, -0.33996421098709106, -0.3654080629348755, -0.491088330745697, -0.4809946119785309, 0.568778932094574, 0.2846660614013672, 0.6217310428619385, 0.6516058444976807, 0.675261378288269, 0.257388174533844, -0.43215230107307434, 0.31453654170036316, -0.5308512449264526, -0.10255017876625061, 0.026515448465943336, -0.24496755003929138, -0.7770581245422363, -0.1606043577194214, 0.8843440413475037, 0.6194187998771667, -0.1429537683725357, 0.37389788031578064, 0.18388235569000244, 0.8179703950881958, -0.504094123840332, 0.36304157972335815, -0.21963532269001007, -0.009947537444531918, -0.05523526668548584, -0.02277076430618763, -0.4636889398097992, -0.19425290822982788, 0.2051772028207779, -0.6347141861915588, 0.47159355878829956, 0.14476452767848969, 1.083055853843689, 0.2173394113779068, -0.4455786347389221, -0.4534469544887543, -0.45398640632629395, 0.9944483041763306, -0.8863767385482788, 0.16170984506607056, 0.36379969120025635, 0.04987668991088867, 0.08485283702611923, -0.8312578201293945, -0.5556931495666504, 0.03471292927861214, -0.36937496066093445, 0.46935948729515076, 0.06631737947463989, 0.06902170181274414, 0.4714307487010956, 0.6058026552200317, -0.7340898513793945, -0.10767249763011932, -0.6322456002235413, -0.0032406821846961975, 0.7537075281143188, 0.3231731057167053, -0.08239119499921799, -0.4756951332092285, -0.3490993082523346, -0.2989979088306427, -0.38502779603004456, 0.1106262132525444, 0.2902751863002777, 0.2793867886066437, -0.36089831590652466, 0.5501073002815247, -0.2340751588344574, 0.6932412385940552, 0.03728533536195755, -0.2688332200050354, 0.47087597846984863, -0.4721304178237915, -0.30175063014030457, -0.16809087991714478, 0.8265017867088318, 0.7108207941055298, 0.1734692007303238, 0.03129923716187477, -0.2941649854183197, -0.247222900390625, -0.04491342604160309, -1.2105426788330078, -0.26005494594573975, 0.45544832944869995, -0.5367283821105957, -0.10795226693153381, -0.04444171488285065, -0.764764666557312, -0.28355079889297485, -0.31334659457206726, 0.45465174317359924, -0.5609989166259766, -0.01279312465339899, 0.16649727523326874, -0.415844589471817, 0.3111816942691803, 0.3379383981227875, -1.1200014352798462, 0.20561255514621735, 0.4715612232685089, 1.0228475332260132, 0.022298255935311317, -0.4385222792625427, -0.359719842672348, 0.18798217177391052, -0.2945857644081116, 0.5883897542953491, -0.02535262331366539, -0.42666518688201904, -0.08818768709897995, 0.144807368516922, -0.026746265590190887, -0.40194135904312134, 0.4960687756538391, -0.5429593920707703, 0.3494027554988861, -0.38545045256614685, -0.7599957585334778, -0.23323607444763184, 0.19111470878124237, -0.48131993412971497, 0.885402500629425, 0.07026451081037521, -0.9986191391944885, 0.2245480716228485, -0.4683053195476532, -0.4684031009674072, -0.059807807207107544, -0.004589777905493975, -0.7874470949172974, -0.19380930066108704, 0.3132599890232086, 0.6578998565673828, -0.23524142801761627, 0.2589585781097412, 0.044118430465459824, -0.5529536008834839, -0.011216363869607449, -0.052704717963933945, 1.0345360040664673, 0.14868101477622986, -0.16408276557922363, 0.13428354263305664, -0.7787095308303833, -0.22429493069648743, 0.10672014951705933, -0.4708555042743683, -0.058734726160764694, -0.09451785683631897, 0.2594052255153656, -0.31605562567710876, 0.45042020082473755, -0.38974347710609436, 0.403106153011322, -0.41262781620025635, 0.44503849744796753, 0.6679852604866028, 0.13278934359550476, 0.34492719173431396, -0.6019309759140015, 0.3301875591278076, -0.10318227112293243, 0.10559822618961334, -0.5355926752090454, -0.4511515200138092, -0.8207095861434937, -0.4086490571498871, 0.37287789583206177, 0.5154094696044922, -0.6156994104385376, 0.8118118643760681, -0.4068773686885834, -0.7599316239356995, -0.0736980140209198, -0.016516847535967827, 0.3809874951839447, 0.6052753329277039, 0.5383191704750061, -0.14698119461536407, -0.3440718352794647, -0.7079448103904724, -0.01077608484774828, -0.052084166556596756, -0.20092451572418213, 0.18140265345573425, 0.7236899733543396, -0.3165389895439148, 0.8442749381065369, -0.896965742111206, -0.42788904905319214, -0.295070618391037, 0.1536470651626587, 0.688974142074585, 0.4415506422519684, 0.5588782429695129, -0.6830752491950989, -0.5162822604179382, -0.044057123363018036, -0.8839881420135498, 0.055592961609363556, -0.347947359085083, -0.08153272420167923, 0.2817298471927643, 0.4518311321735382, -0.6982728838920593, 0.268494576215744, 0.30992382764816284, -0.547861635684967, 0.7402150630950928, -0.3591447174549103, 0.07406963407993317, -1.3538471460342407, 0.22063572704792023, 0.0665026307106018, -0.08116596937179565, -0.3567217290401459, 0.08101806789636612, 0.3525424003601074, 0.023232296109199524, -0.09600351005792618, 0.6294911503791809, -0.6131877899169922, 0.15325678884983063, -0.19859690964221954, 0.05093391612172127, 0.0985032469034195, 0.7650625705718994, -0.045201677829027176, 0.7486613988876343, 0.46179431676864624, -0.7314519286155701, 0.4183639585971832, 0.5781478881835938, -0.44177740812301636, 0.09144926071166992, -0.8369434475898743, -0.17345912754535675, -0.16497838497161865, 0.32935628294944763, -0.9188247919082642, -0.37724027037620544, 0.21768341958522797, -0.43070247769355774, 0.44371655583381653, 0.02197074145078659, -0.5919145345687866, -0.32976970076560974, -0.5169273018836975, 0.3673754632472992, 0.7291954159736633, -0.456153005361557, 0.6272457242012024, 0.059408627450466156, -0.3756505846977234, -0.7283060550689697, -0.7202445268630981, -0.010565804317593575, -0.1455291360616684, -0.5057119131088257, 0.46760886907577515, -0.31186193227767944, -0.08626296371221542, -0.16747020184993744, 0.05985056236386299, 0.23028786480426788, -0.20419128239154816, 0.15281695127487183, 0.3562716841697693, -0.0582452118396759, 0.24056780338287354, 0.1992795169353485, -0.0103167574852705, -0.07860113680362701, -0.10739719122648239, 0.5385879874229431, -0.2984268367290497, 0.15481746196746826, -0.43574514985084534, 0.24068421125411987, 0.46395155787467957, -0.1707787960767746, 0.9161675572395325, 0.5490344166755676, -0.3295564651489258, -0.14411906898021698, -0.2646200656890869, -0.10472680628299713, -0.4982717037200928, 0.6133524775505066, -0.13962215185165405, -0.5371956825256348, 0.633373498916626, 0.2898617684841156, 0.39197614789009094, 0.6800200939178467, 0.6421915888786316, -0.0025882720947265625, 0.5927428007125854, 0.5583680272102356, -0.059383574873209, 0.6574178338050842, -0.6664727926254272, -0.041885897517204285, -0.8512264490127563, -0.2770053446292877, -0.3375132083892822, -0.04355114325881004, -0.4009142220020294, -0.2011052668094635, 0.3970104455947876, 0.24753211438655853, -0.4511195719242096, 0.34906044602394104, -0.5500428676605225, 0.3944644331932068, 0.4988017678260803, 0.25311610102653503, 0.37816357612609863, 0.11025574803352356, 0.15824685990810394, 0.165277898311615, -0.5964294075965881, -0.45404696464538574, 1.253178358078003, 0.3641548156738281, 0.7085015773773193, 0.10356776416301727, 0.6720839738845825, 0.36582282185554504, 0.2984720766544342, -0.8372649550437927, 0.4833305776119232, -0.02467062510550022, -0.5534092783927917, -0.46390461921691895, -0.5084643363952637, -0.8491334915161133, 0.25409165024757385, -0.08809022605419159, -0.5061923861503601, 0.16090069711208344, 0.07208359241485596, -0.47445929050445557, 0.1666814088821411, -0.8681445121765137, 0.7647408246994019, -0.042813438922166824, -0.28030064702033997, -0.11136463284492493, -0.7305310368537903, 0.24196390807628632, -0.12635226547718048, 0.11520293354988098, 0.19993747770786285, -0.06406813114881516, 1.0927377939224243, -0.5363001823425293, 0.8365805149078369, 0.0028334090020507574, -0.15735109150409698, 0.2774667739868164, -0.4545567035675049, 0.5153793692588806, -0.03843792900443077, -0.2912715971469879, 0.2485910803079605, -0.03496897220611572, -0.6795892119407654, -0.3858388364315033, 0.4139846861362457, -0.9496039748191833, -0.3748149275779724, -0.6945133209228516, -0.7077258825302124, 0.07415150851011276, 0.38926446437835693, 0.5760540962219238, 0.6701710224151611, -0.05395861342549324, 0.216652974486351, 0.6564297080039978, -0.2868800759315491, 0.728415846824646, 0.31026190519332886, -0.3362732231616974, -0.7433210015296936, 0.7334479093551636, 0.24649494886398315, 0.2042868733406067, 0.36556610465049744, 0.17638981342315674, -0.20585380494594574, -0.6681854128837585, -0.48141950368881226, 0.48749449849128723, -0.7370902299880981, -0.26952144503593445, -0.7282818555831909, -0.3834780752658844, -0.579793393611908, -0.17125600576400757, -0.0976848304271698, -0.2590067982673645, -0.48481324315071106, -0.11683157831430435, 0.6101823449134827, 0.7155957818031311, 0.1272209882736206, 0.6469348073005676, -0.8242547512054443, 0.3744790554046631, 0.27714893221855164, 0.16744017601013184, 0.241988867521286, -0.9140802025794983, -0.7034202814102173, -0.06577829271554947, -0.43828073143959045, -0.7496085166931152, 0.49009424448013306, 0.27532196044921875, 0.04788985848426819, 0.5017845630645752, 0.28109210729599, 0.4305686950683594, -0.5609759092330933, 0.8557993173599243, 0.2742065191268921, -0.738456130027771, 0.35775718092918396, -0.6658621430397034, 0.465775728225708, 0.28951016068458557, 0.314747154712677, -0.4840531349182129, -0.20398278534412384, -0.5006904602050781, -1.0796250104904175, 0.8001052141189575, 0.37327519059181213, -0.03646459802985191, 0.2438032031059265, 0.4123517572879791, 0.1301102191209793, 0.24298787117004395, -0.8272706866264343, -0.4374106824398041, -0.21407994627952576, -0.27995625138282776, -0.3705635070800781, -0.3119877874851227, -0.11693505942821503, -0.45419779419898987, 1.008633017539978, 0.01144644245505333, 0.22359468042850494, 0.36841845512390137, -0.2123430371284485, 0.05865827202796936, 0.12406497448682785, 0.4719941318035126, 0.8141200542449951, -0.5776925086975098, -0.21898454427719116, 0.16839206218719482, -0.6651386618614197, -0.2513207793235779, 0.4309921860694885, -0.34899261593818665, 0.08866049349308014, 0.5960912704467773, 0.8013607263565063, -0.20877216756343842, -0.6045801043510437, 0.4289497435092926, -0.12187016010284424, -0.153596892952919, -0.44221267104148865, 0.008521633222699165, 0.17681457102298737, 0.3133074939250946, 0.6076451539993286, -0.0387503020465374, 0.16744884848594666, -0.4467698037624359, -0.015179694630205631, 0.1391986459493637, 0.0414685495197773, -0.19461122155189514, 0.6250346899032593, 0.2762637436389923, -0.17065472900867462, 0.6088730096817017, -0.3399333357810974, -0.45563992857933044, 0.8063501119613647, 0.39114096760749817, 0.673568606376648, 0.17026224732398987, 0.05975456163287163, 0.6404595971107483, 0.32315385341644287, -0.17847692966461182, 0.07346051186323166, -0.1993439495563507, -0.519699215888977, -0.26097673177719116, -0.8347484469413757, -0.43402016162872314, 0.06241143122315407, -0.7005140781402588, 0.34157460927963257, -0.40249544382095337, -0.06978227198123932, 0.07844991236925125, 0.32136431336402893, -0.42412999272346497, 0.2937695384025574, -0.036130186170339584, 0.9465333819389343, -0.7999457716941833, 0.6415082216262817, 0.563392162322998, -0.673649251461029, -0.6915055513381958, 0.11558718979358673, -0.3868294954299927, -0.46284499764442444, 0.23857976496219635, 0.3523402512073517, 0.0494132824242115, -0.0021857190877199173, -0.4866913855075836, -0.6379633545875549, 1.3750848770141602, 0.12458498775959015, -0.6345704197883606, -0.17947326600551605, -0.1673288196325302, 0.5991182327270508, -0.04032718390226364, 0.3681181073188782, 0.42557889223098755, 0.34069526195526123, -0.007090145722031593, -0.7410571575164795, 0.10427677631378174, -0.4168590307235718, -0.13870678842067719, 0.1152690201997757, -1.106606364250183, 1.1694141626358032, -0.3108315169811249, -0.02726062200963497, 0.44028475880622864, 0.8141125440597534, 0.28911420702934265, 0.4417676627635956, 0.15450964868068695, 0.5955865979194641, 0.9315897822380066, -0.0017924010753631592, 1.1990910768508911, -0.20653055608272552, 0.8660420775413513, 0.9745611548423767, 0.023582182824611664, 0.6837382912635803, 0.2460724264383316, -0.2837246060371399, 0.334907203912735, 0.8602877855300903, -0.3339694142341614, 0.5542073249816895, -0.06414017081260681, -0.10755882412195206, -0.06499464809894562, 0.15113025903701782, -0.7363187074661255, 0.0476093664765358, 0.21697820723056793, -0.4546751379966736, -0.08296908438205719, -0.08832379430532455, 0.06063506379723549, -0.18176232278347015, -0.3573727011680603, 0.6080662608146667, 0.20111292600631714, -0.6504319310188293, 0.851895272731781, 0.14839009940624237, 0.9184601902961731, -0.6438028812408447, 0.159792959690094, -0.28855058550834656, 0.43179628252983093, -0.26612088084220886, -0.5883315205574036, 0.0027555031701922417, 0.04925831779837608, -0.4558278024196625, -0.18202753365039825, 0.32012027502059937, -0.4511159360408783, -0.7438716888427734, 0.16589578986167908, 0.20985127985477448, 0.18765443563461304, 0.03329768776893616, -0.45103123784065247, -0.1370292603969574, 0.10948540270328522, -0.5504525303840637, 0.15822158753871918, 0.43477895855903625, 0.25398552417755127, 0.45115503668785095, 0.4490717649459839, 0.031911373138427734, -0.06789599359035492, -0.12065847218036652, 0.828108012676239, -0.8839083909988403, -0.6727954745292664, -0.8472134470939636, 0.4585658013820648, -0.26256123185157776, -0.531297504901886, 0.8635424971580505, 0.818207323551178, 0.732776403427124, -0.2910934388637543, 0.7525413036346436, -0.12797331809997559, 0.5196931958198547, -0.5650864839553833, 1.0293256044387817, -0.7358583807945251, 0.2341025173664093, -0.3916650414466858, -0.9046132564544678, -0.20449542999267578, 0.5495912432670593, -0.22818012535572052, 0.10732578486204147, 0.7852396965026855, 0.7556948661804199, -0.015141606330871582, 0.06274444609880447, 0.04481448233127594, 0.36885735392570496, 0.24011632800102234, 0.4414074420928955, 0.4861772954463959, -0.8003458976745605, 0.6112580299377441, -0.15849335491657257, -0.4186241030693054, -0.24292419850826263, -0.7102504968643188, -1.1563973426818848, -0.6019772291183472, -0.3846657872200012, -0.43765002489089966, 0.027703603729605675, 0.8024622201919556, 0.5169366598129272, -0.8259297013282776, -0.34477880597114563, -0.014910679310560226, 0.05803690850734711, -0.12104475498199463, -0.20973384380340576, 0.793633759021759, -0.24174049496650696, -0.9060114622116089, -0.1037340760231018, -0.1158546656370163, 0.04164298251271248, 0.12571096420288086, -0.18881048262119293, -0.21163292229175568, -0.01842796616256237, 0.6345882415771484, 0.19032631814479828, -0.4062984585762024, 0.00940026342868805, -0.11917515099048615, -0.07182332128286362, -0.008422479964792728, 0.42134299874305725, -0.5568631887435913, 0.2340892255306244, 0.4902011752128601, 0.6003575921058655, 0.7657102346420288, -0.023828445002436638, 0.30000877380371094, -0.644562304019928, 0.17215310037136078, 0.07096026837825775, 0.5531257390975952, 0.35604384541511536, -0.3752812445163727, 0.5245088934898376, 0.2873833179473877, -0.7491341829299927, -0.7786984443664551, -0.014372819103300571, -1.1806854009628296, -0.4391401708126068, 1.2755556106567383, -0.06567157804965973, -0.3094324469566345, 0.28303447365760803, -0.3717139661312103, 0.5697975754737854, -0.5670484900474548, 0.8520215749740601, 0.7447176575660706, -0.04835550859570503, 0.11517433822154999, -0.2764950692653656, 0.4251023232936859, 0.41946908831596375, -0.6919649243354797, 0.20156581699848175, 0.543732225894928, 0.3146362602710724, 0.29499921202659607, 0.5917535424232483, 0.18538866937160492, 0.25988683104515076, 0.013488741591572762, 0.15023498237133026, -0.1758146733045578, -0.24350601434707642, -0.3554927408695221, 0.11222823709249496, -0.2540965676307678, -0.24362152814865112 ]
NoCrypt/SomethingV2_2
NoCrypt
"2023-05-06T03:13:52Z"
31,340
118
diffusers
[ "diffusers", "stable-diffusion", "text-to-image", "safetensors", "en", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2023-03-08T13:24:01Z"
--- license: creativeml-openrail-m thumbnail: >- https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/thumbnail.webp tags: - stable-diffusion - text-to-image - safetensors - diffusers inference: true language: - en widget: - text: >- masterpiece, masterpiece, masterpiece, best quality, ultra-detailed, 1girl, hatsune miku, blue hair, upper body, looking at viewer, ?, negative space, bioluminescence, bioluminescence, bioluminescence, darkness, wind, butterfly, black background, portrait, ice example_title: example library_name: diffusers --- <center> <img src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/Artboard%201.png"/> <h1 style="font-size:1.6rem;"> <b> SomethingV2.2 </b> </h1> <p> Welcome to SomethingV2.2 - an improved anime latent diffusion model from <a href="https://huggingface.co/NoCrypt/SomethingV2">SomethingV2</a> A lot of things are being discovered lately, such as a way to merge model using mbw automatically, offset noise to get much darker result, and even VAE tuning. This model is intended to use all of those features as the improvements, here's some improvements that have been made: </p> <img src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/Artboard%202.png"/> <h2>Can't trust the numbers? Here's some proof</h2> </center> ![](https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/xyz_grid-0000-3452449180-masterpiece%2C%20best%20quality%2C%20ultra-detailed%2C%202girls%2C%20upper%20body%2C%20looking%20at%20viewer%2C%20_%2C%20negative%20space%2C%20(bioluminescence_1.2)%2C%20dark.png) ![](https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/xyz_grid-0003-72332473-masterpiece%2C%20best%20quality%2C%20hatsune%20miku%2C%20white%20shirt%2C%20darkness%2C%20dark%20background.png) <img style="display:inline;margin:0;padding:0;" src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/00019-1829045217-masterpiece%2C%20best%20quality%2C%20hatsune%20miku%2C%201girl%2C%20white%20shirt%2C%20blue%20necktie%2C%20bare%20shoulders%2C%20very%20detailed%20background%2C%20hands%20on%20ow.png" width="32%"/> <img style="display:inline;margin:0;padding:0;" src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/00018-1769428138-masterpiece%2C%20best%20quality%2C%20hatsune%20miku%2C%201girl%2C%20white%20shirt%2C%20blue%20necktie%2C%20bare%20shoulders%2C%20very%20detailed%20background%2C%20hands%20on%20ow.png" width="32%"/> <img style="display:inline;margin:0;padding:0;" src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/00020-3514023396-masterpiece%2C%20best%20quality%2C%20hatsune%20miku%2C%201girl%2C%20white%20shirt%2C%20blue%20necktie%2C%20bare%20shoulders%2C%20very%20detailed%20background%2C%20cafe%2C%20angry.png" width="32%"/> <details><summary><big><b>Prompts</b></big></summary> ```yaml masterpiece, best quality, ultra-detailed, 2girls, upper body, looking at viewer, ?, negative space, (bioluminescence:1.2), darkness, wind, butterfly, black background, glowing, AND masterpiece, best quality, ultra-detailed, 2girls, hatsune miku, upper body, looking at viewer, ?, negative space, (bioluminescence:1.2), darkness, wind, butterfly, black background, glowing, (blue theme:1.2) AND masterpiece, best quality, ultra-detailed, 2girls, hakurei reimu, (brown hair:1.1), upper body, looking at viewer, ?, negative space, (bioluminescence:1.2), darkness, wind, butterfly, black background, glowing, (red theme:1.2) Negative prompt: EasyNegative Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 3452449180, Size: 816x504, Model: somethingv2_1, Denoising strength: 0.58, Clip skip: 2, ENSD: 31337, Latent Couple: "divisions=1:1,1:2,1:2 positions=0:0,0:0,0:1 weights=0.2,0.8,0.8 end at step=13", Hires upscale: 1.9, Hires steps: 12, Hires upscaler: Latent (nearest-exact) ``` ```yaml masterpiece, best quality, hatsune miku, white shirt, darkness, dark background Negative prompt: EasyNegative Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 72332473, Size: 504x600, Model: somethingv2_1, Denoising strength: 0.58, Clip skip: 2, ENSD: 31337, Hires upscale: 1.85, Hires steps: 12, Hires upscaler: Latent (nearest-exact) ``` ```yaml masterpiece, best quality, hatsune miku, 1girl, white shirt, blue necktie, bare shoulders, very detailed background, hands on own cheeks, open mouth, one eye closed, clenched teeth, smile Negative prompt: EasyNegative, tattoo, (shoulder tattoo:1.0), (number tattoo:1.3), frills Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1829045217, Size: 456x592, Model: SomethingV2_2, Denoising strength: 0.53, Clip skip: 2, ENSD: 31337, Hires upscale: 1.65, Hires steps: 12, Hires upscaler: Latent (nearest-exact), Discard penultimate sigma: True ``` ```yaml masterpiece, best quality, hatsune miku, 1girl, white shirt, blue necktie, bare shoulders, very detailed background, hands on own cheeks, open mouth, eyez closed, clenched teeth, smile, arms behind back, Negative prompt: EasyNegative, tattoo, (shoulder tattoo:1.0), (number tattoo:1.3), frills Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1769428138, Size: 456x592, Model: SomethingV2_2, Denoising strength: 0.53, Clip skip: 2, ENSD: 31337, Hires upscale: 1.65, Hires steps: 12, Hires upscaler: Latent (nearest-exact), Discard penultimate sigma: True ``` ```yaml masterpiece, best quality, hatsune miku, 1girl, white shirt, blue necktie, bare shoulders, very detailed background, cafe, angry, crossed arms, detached sleeves, light particles, Negative prompt: EasyNegative, tattoo, (shoulder tattoo:1.0), (number tattoo:1.3), frills Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 3514023396, Size: 456x592, Model: SomethingV2_2, Denoising strength: 0.53, Clip skip: 2, ENSD: 31337, Hires upscale: 1.65, Hires steps: 12, Hires upscaler: Latent (nearest-exact), Discard penultimate sigma: True ``` </details> ## Non-miku examples <img style="display:inline;margin:0;padding:0;" width="49%" src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/00021-4018636341-masterpiece%2C%20best%20quality%2C%201girl%2C%20aqua%20eyes%2C%20baseball%20cap%2C%20blonde%20hair%2C%20closed%20mouth%2C%20earrings%2C%20green%20background%2C%20hat%2C%20hoop%20earr.png"/> <img style="display:inline;margin:0;padding:0;" width="49%" src="https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/images/00022-1334620477-masterpiece%2C%20best%20quality%2C%20landscape.png"/> <details><summary><big><b>Prompts</b></big></summary> ```yaml masterpiece, best quality, 1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt Negative prompt: EasyNegative Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 4018636341, Size: 440x592, Model: SomethingV2_2, Denoising strength: 0.53, Clip skip: 2, ENSD: 31337, Hires upscale: 1.65, Hires steps: 13, Hires upscaler: Latent (nearest-exact) ``` ```yaml masterpiece, best quality, landscape Negative prompt: EasyNegative Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1334620477, Size: 440x592, Model: SomethingV2_2, Denoising strength: 0.53, Clip skip: 2, ENSD: 31337, Hires upscale: 1.65, Hires steps: 13, Hires upscaler: Latent (nearest-exact) ``` </details> ## Recommended settings - VAE: None (Baked in model, [blessed2](https://huggingface.co/NoCrypt/blessed_vae/blob/main/blessed2.vae.pt)) - Clip Skip: 2 - Sampler: DPM++ 2M Karras - CFG Scale: 7 ± 5 - Recommended Positive Prompt: masterpiece, best quality, negative space, (bioluminescence:1.2), darkness, dark background - Recommended Negative Prompt: [EasyNegative](https://huggingface.co/datasets/gsdf/EasyNegative) - For better results, using hires fix is a must. - Hires upscaler: Latent (any variant, such as nearest-exact) ## Recipe *Due to [SD-Silicon's Terms of use](https://huggingface.co/Xynon/SD-Silicon#terms-of-use). I must specify how the model was made* |Model A | Model B | Interpolation Method | Weight | Name | |---|---|---|---|---| |[dpepmkmp](https://huggingface.co/closertodeath/dpepmkmp/blob/main/dpepmkmp.safetensors)|[silicon29-dark](https://huggingface.co/Xynon/SD-Silicon/blob/main/Silicon29/Silicon29-dark.safetensors)|MBW|Reverse Cosine|[dpepsili](https://huggingface.co/un1xx/model_dump/blob/main/bw-merge-dpepmkmp-Silicon29-dark-0.ckpt)| |[somethingV2_1](https://huggingface.co/NoCrypt/SomethingV2/blob/main/somethingv2_1.safetensors)|[dpepsili](https://huggingface.co/un1xx/model_dump/blob/main/bw-merge-dpepmkmp-Silicon29-dark-0.ckpt)|MBW|Cosine|SomethingV2_2 raw| |SomethingV2_2 raw|[Blessed2 VAE](https://huggingface.co/NoCrypt/blessed_vae/blob/main/blessed2.vae.pt)|Bake VAE|-|**[SomethingV2_2](https://huggingface.co/NoCrypt/SomethingV2_2/blob/main/SomethingV2_2.safetensors)**| ## Why not call it SomethingV4? Since this model was based on SomethingV2 and there's not THAT much of improvements in some condition. Calling it V4 is just not right at the moment 😅 I am NoCrypt
[ -0.756656289100647, -0.7997454404830933, 0.20352530479431152, 0.23199424147605896, -0.48839524388313293, -0.02703247405588627, 0.046485088765621185, -0.5502447485923767, 0.7855554819107056, 0.5593298077583313, -0.7808011770248413, -0.5964083671569824, -0.6334549188613892, 0.12636367976665497, 0.11815736442804337, 0.9804999232292175, 0.2708337903022766, -0.11462564021348953, 0.12730318307876587, 0.07392226159572601, -0.4889245927333832, -0.012531895190477371, -0.4614214301109314, -0.06603767722845078, 0.19621138274669647, 0.42055320739746094, 0.7903203368186951, 0.7045608758926392, 0.37045812606811523, 0.33956286311149597, -0.2733035385608673, 0.08036430180072784, -0.634963870048523, -0.11724439263343811, 0.11751168966293335, -0.6478705406188965, -1.0449752807617188, 0.22175922989845276, 0.569032609462738, 0.27465853095054626, 0.2170315980911255, 0.07373540103435516, -0.017268365249037743, 0.7396689653396606, -0.150018572807312, 0.06483080983161926, 0.08422339707612991, 0.07993724197149277, -0.3874479830265045, 0.05779728293418884, -0.07447770982980728, -0.551188051700592, 0.032089199870824814, -0.8106387853622437, 0.218828484416008, -0.21840468049049377, 1.3322300910949707, 0.05197509750723839, -0.15771935880184174, 0.09943430125713348, -0.3239297866821289, 0.8101653456687927, -0.7655329704284668, 0.12060516327619553, 0.3205292224884033, 0.04754301533102989, -0.17760948836803436, -0.9784718155860901, -0.7402890920639038, -0.01076399628072977, -0.2679980397224426, 0.7115951180458069, -0.29143285751342773, -0.25538989901542664, 0.3851102292537689, 0.7584496736526489, -0.6228334307670593, -0.16772118210792542, -0.278961181640625, -0.23851248621940613, 0.7132325768470764, 0.15873457491397858, 0.7168559432029724, -0.3517199456691742, -0.4525200128555298, -0.3526713252067566, -0.5632617473602295, 0.1638379842042923, 0.19516007602214813, -0.18024136126041412, -0.6406980752944946, 0.5481085181236267, 0.11488482356071472, 0.6456802487373352, 0.24104103446006775, -0.47724631428718567, 0.3749556541442871, -0.5710210204124451, 0.05178320035338402, -0.6035162806510925, 1.156016230583191, 0.7507677674293518, -0.23726560175418854, 0.08982913941144943, 0.06987278908491135, -0.049513086676597595, -0.036705564707517624, -1.2840702533721924, -0.3239200711250305, 0.38078418374061584, -0.6135927438735962, -0.3442497253417969, -0.05402183160185814, -0.7622445225715637, -0.05992764234542847, -0.14910323917865753, 0.46196091175079346, -0.726855993270874, -0.5533261895179749, 0.04702961444854736, -0.29811614751815796, 0.1722581535577774, 0.43384015560150146, -0.3615489900112152, -0.08227347582578659, 0.40315675735473633, 0.9854782819747925, 0.049577049911022186, -0.18981531262397766, -0.014086514711380005, -0.13608239591121674, -0.642874538898468, 0.5767773985862732, -0.060269247740507126, -0.49014607071876526, -0.7066212296485901, 0.3977959454059601, 0.05336473137140274, -0.31888097524642944, 0.6623919010162354, -0.1390015184879303, 0.33050835132598877, -0.44569146633148193, -0.4776286482810974, -0.2906871736049652, -0.03039746917784214, -0.7165688872337341, 0.7050914168357849, 0.5083128809928894, -0.9913769960403442, 0.19585947692394257, -0.5649341344833374, -0.08005692809820175, 0.09729980677366257, 0.049056559801101685, -0.6010586619377136, -0.09630343317985535, -0.009125670418143272, 0.6043928861618042, -0.3315437436103821, -0.2037677764892578, -0.43218302726745605, -0.3538387715816498, 0.33358240127563477, -0.10677478462457657, 1.20680832862854, 0.1971442848443985, -0.6000430583953857, -0.27790847420692444, -0.6980185508728027, -0.1264333575963974, 0.7649781703948975, 0.04545623064041138, -0.21399971842765808, -0.5277716517448425, 0.15392734110355377, 0.35721033811569214, 0.4794330298900604, -0.5972648859024048, 0.2948960065841675, -0.7091869115829468, 0.504401683807373, 0.6239496469497681, 0.19880233705043793, 0.4043315649032593, -0.8445562124252319, 0.6026433706283569, 0.044153641909360886, 0.3381401300430298, -0.29472100734710693, -0.8307110667228699, -0.8434394001960754, -0.6494097113609314, 0.23537838459014893, 0.2985633313655853, -0.5635067224502563, 0.6799238920211792, -0.008491420187056065, -1.0339380502700806, -0.7522308230400085, -0.09185807406902313, 0.7098527550697327, 0.5224251747131348, 0.19809359312057495, -0.7630971670150757, -0.1675143539905548, -0.8890163898468018, 0.3746606707572937, -0.10426601767539978, 0.07652590423822403, 0.2879558503627777, 0.4163726270198822, -0.09092308580875397, 0.7777608036994934, -0.6557449698448181, -0.5743809342384338, -0.1559845209121704, 0.013044287450611591, 0.5262921452522278, 0.6289848685264587, 1.115894079208374, -0.8058693408966064, -0.699194610118866, -0.15381743013858795, -0.6916698813438416, -0.07302112132310867, 0.05638496205210686, -0.522602915763855, 0.0758158266544342, -0.04417916014790535, -0.585756778717041, 0.4111716151237488, 0.4404521882534027, -0.5721832513809204, 0.7140560150146484, -0.31058749556541443, 0.5347533822059631, -1.449432373046875, 0.1865384876728058, 0.19493673741817474, -0.1253289133310318, -0.715981125831604, 0.5668121576309204, -0.04866750165820122, 0.3128404915332794, -0.30615973472595215, 0.6114541292190552, -0.4060019552707672, 0.26751285791397095, -0.3513922393321991, 0.08729226887226105, 0.3399381637573242, 0.5392296314239502, 0.20243431627750397, 0.6189229488372803, 0.8120966553688049, -0.2939756512641907, 0.41779762506484985, 0.54931640625, -0.22367063164710999, 1.0518437623977661, -0.7939544320106506, 0.27308034896850586, -0.23292645812034607, 0.20738743245601654, -1.2354958057403564, -0.2530597150325775, 0.5861257314682007, -0.8864135146141052, 0.3701891005039215, -0.40934401750564575, -0.6277914047241211, -0.5401987433433533, -0.5848797559738159, 0.0010051950812339783, 0.8614540100097656, -0.3693360388278961, 0.5601629018783569, 0.19948092103004456, -0.13237464427947998, -0.4251123368740082, -0.8605336546897888, -0.00149051146581769, -0.26351165771484375, -0.7322190999984741, 0.5461888313293457, -0.34816041588783264, 0.10406576842069626, 0.042218759655952454, 0.2724360227584839, -0.10105527937412262, 0.08313429355621338, 0.46482425928115845, 0.6336783170700073, -0.39140474796295166, -0.45931923389434814, 0.2238001972436905, -0.22740033268928528, -0.06935703009366989, -0.028879433870315552, 0.5302899479866028, -0.18837827444076538, -0.2013523429632187, -0.9558228850364685, 0.1817300170660019, 0.7710443735122681, -0.08509588986635208, 0.5541871190071106, 1.0321582555770874, -0.32432103157043457, 0.3850339949131012, -0.5930434465408325, -0.14772185683250427, -0.4347773790359497, 0.08236116915941238, -0.3976080119609833, -0.6867402195930481, 0.7446995973587036, 0.3937018811702728, 0.23475150763988495, 0.76143479347229, 0.5012124180793762, -0.22720393538475037, 1.0983437299728394, 0.39959830045700073, -0.2409912496805191, 0.4390924274921417, -1.0688756704330444, -0.28324031829833984, -0.8993629217147827, -0.3915908932685852, -0.06054762005805969, -0.5045774579048157, -0.48644569516181946, -0.6723255515098572, 0.4854058623313904, 0.519770085811615, -0.07108980417251587, 0.7296316027641296, -0.5673745274543762, 0.2829700708389282, 0.5122599601745605, 0.47457799315452576, 0.2955178916454315, 0.023596692830324173, 0.06728357076644897, -0.44591307640075684, -0.3741649091243744, -0.21551921963691711, 1.0215983390808105, 0.2951613962650299, 0.2032698541879654, 0.34173208475112915, 0.6642103791236877, 0.03758316859602928, 0.2182263433933258, -0.5186432003974915, 0.5820261240005493, -0.2764248549938202, -0.8135167956352234, 0.02050986886024475, -0.3468456268310547, -0.9064475297927856, 0.22731420397758484, -0.5550921559333801, -0.8195466995239258, 0.26812681555747986, 0.09484464675188065, -0.4201509654521942, 0.2941921055316925, -0.5497449636459351, 0.6579588055610657, 0.15875978767871857, -0.5545542240142822, -0.10768306255340576, -0.839750349521637, 0.4261409044265747, 0.03592792525887489, 0.07619210332632065, -0.11109896004199982, -0.07216951251029968, 0.7712932825088501, -0.6372725963592529, 0.7222444415092468, -0.16222482919692993, -0.21223081648349762, 0.4521602988243103, 0.2128705382347107, 0.4202229976654053, 0.24094785749912262, 0.07047558575868607, 0.2752993404865265, 0.06489010155200958, -0.4270893633365631, -0.44848769903182983, 0.7625085711479187, -0.6878807544708252, -0.24275995790958405, -0.1723657101392746, -0.21365053951740265, 0.2426396757364273, 0.21144892275333405, 0.9455200433731079, 0.723436176776886, 0.026598483324050903, 0.014740772545337677, 0.6192947030067444, -0.1447068303823471, 0.3698371350765228, 0.28567951917648315, -0.08787672966718674, -0.7951364517211914, 1.1250250339508057, 0.17266614735126495, 0.2920115888118744, 0.09039894491434097, 0.30946746468544006, -0.3583618104457855, -0.24078387022018433, -0.796428918838501, 0.7002364993095398, -0.4493974447250366, -0.1953890174627304, -0.7044724822044373, -0.23248079419136047, -0.4470406472682953, -0.13689641654491425, -0.638988196849823, -0.3948420286178589, -0.7128248810768127, 0.3481285870075226, 0.7851129174232483, 0.6201255917549133, -0.3580595552921295, 0.08077456802129745, -0.601321280002594, 0.4564414620399475, 0.20207253098487854, 0.34007662534713745, 0.17334364354610443, -0.8140665292739868, 0.09185349941253662, 0.033015500754117966, -0.36448702216148376, -1.0780941247940063, 0.5160349011421204, -0.041239138692617416, 0.2903994023799896, 0.5601314306259155, -0.08149026334285736, 0.8573051691055298, -0.08660124242305756, 0.8690773844718933, 0.47830328345298767, -0.5348319411277771, 0.5663599371910095, -0.6780257821083069, -0.04829304665327072, 0.4993177354335785, 0.3443448543548584, -0.3737281858921051, -0.43738290667533875, -0.9110109210014343, -0.8036379814147949, 0.8645899891853333, 0.49091124534606934, 0.13282455503940582, 0.16312275826931, 0.6580247282981873, 0.07458171248435974, 0.17729197442531586, -0.772646427154541, -1.133560299873352, -0.3406997621059418, 0.03654898703098297, -0.11606530100107193, -0.13107450306415558, 0.011796473525464535, -0.5682719349861145, 0.7961603403091431, -0.013317026197910309, 0.5658923983573914, 0.26309531927108765, 0.21441908180713654, -0.135717511177063, -0.17755132913589478, 0.39923468232154846, 0.267112672328949, -0.28895440697669983, -0.4258894622325897, -0.036868829280138016, -0.6594794988632202, 0.1739964336156845, 0.1345844268798828, -0.4539642333984375, -0.020212247967720032, 0.249246746301651, 0.7410459518432617, -0.221392422914505, -0.2865632474422455, 0.930975079536438, -0.09948909282684326, -0.30628088116645813, -0.19746392965316772, 0.2931196391582489, 0.16073104739189148, 0.47773438692092896, 0.14995329082012177, 0.08118636161088943, 0.3666589856147766, -0.41486045718193054, 0.1642685979604721, 0.3761194348335266, -0.4331445097923279, -0.4553006589412689, 0.828833818435669, -0.21463188529014587, 0.00016677305393386632, 0.1162838563323021, -0.7291107177734375, -0.4931321442127228, 0.8015802502632141, 0.5593844652175903, 0.5944563150405884, -0.22948715090751648, 0.4234292805194855, 0.9349225759506226, 0.09946408122777939, -0.1061163991689682, 0.4361608922481537, 0.16981002688407898, -0.25385788083076477, -0.38673654198646545, -0.5349282622337341, -0.17479735612869263, 0.4736292362213135, -0.6264045238494873, 0.3953305184841156, -0.6425741910934448, -0.33129748702049255, -0.17312496900558472, 0.2628955841064453, -0.3539775013923645, 0.37785813212394714, -0.04947224259376526, 0.6499091982841492, -0.9545691013336182, 0.5127769112586975, 0.5812673568725586, -0.634310245513916, -0.9148759841918945, -0.06257707625627518, 0.29897740483283997, -0.5810912251472473, 0.17066751420497894, 0.0721188560128212, 0.15067648887634277, 0.1628469079732895, -0.65279221534729, -0.7460353374481201, 1.272368311882019, 0.3547661006450653, -0.3052026331424713, 0.22178637981414795, -0.401416540145874, 0.6450663208961487, -0.227633535861969, 0.6105126142501831, 0.6408001780509949, 0.29007378220558167, 0.38829150795936584, -0.5888254642486572, 0.23041023313999176, -0.7876579761505127, 0.11973889172077179, 0.04993569850921631, -1.1594033241271973, 0.9533787965774536, -0.3081103265285492, -0.2869633734226227, 0.6580492854118347, 0.8133392333984375, 0.5494442582130432, 0.19698265194892883, 0.445961058139801, 0.7417510747909546, 0.31758415699005127, -0.31184616684913635, 0.9464970827102661, -0.25723761320114136, 0.297454833984375, 0.6967364549636841, 0.4552616477012634, 0.5758110284805298, -0.08858205378055573, -0.4298626482486725, 0.599984884262085, 0.7896129488945007, -0.2696506977081299, 0.5410134792327881, 0.03199193626642227, -0.10852795094251633, -0.12020813673734665, -0.3151301145553589, -0.7316657304763794, 0.15002334117889404, 0.21447943150997162, -0.18266122043132782, 0.12216556817293167, 0.1254802793264389, 0.143468976020813, 0.03956973925232887, -0.11430980265140533, 0.6790163516998291, 0.08163861185312271, -0.42439258098602295, 0.617202639579773, 0.10582219064235687, 1.0219610929489136, -0.3362598717212677, -0.09867671877145767, -0.4367533028125763, -0.21651925146579742, -0.16908158361911774, -0.9812414050102234, 0.031487252563238144, -0.13196267187595367, -0.02700585313141346, -0.11819807440042496, 0.5932495594024658, -0.22063206136226654, -0.4707741141319275, 0.28703758120536804, 0.15571294724941254, 0.5158224701881409, 0.047089751809835434, -1.1487882137298584, -0.009612105786800385, 0.08597066253423691, -0.2673224210739136, 0.06399868428707123, 0.3615644872188568, 0.503730297088623, 0.3286702036857605, 0.4466714859008789, 0.3058741092681885, -0.18941670656204224, 0.07443466782569885, 0.8280469179153442, -0.5004303455352783, -0.4381541907787323, -0.7882086038589478, 0.7650809288024902, -0.11909236758947372, -0.5014569759368896, 0.7315241098403931, 0.43651118874549866, 0.662583589553833, -0.12087186425924301, 0.6319823265075684, -0.36892667412757874, 0.48968636989593506, -0.49872344732284546, 0.9946025609970093, -1.091524362564087, -0.09427499026060104, -0.736785352230072, -0.897786557674408, -0.08605538308620453, 0.8885625600814819, 0.25946763157844543, 0.20937928557395935, 0.16979151964187622, 0.9261634349822998, -0.05916778743267059, -0.13945254683494568, 0.06094038859009743, 0.3019515573978424, -0.09356518089771271, 0.8882285356521606, 0.9136846661567688, -0.9139858484268188, 0.1883850395679474, -0.9059114456176758, -0.35544729232788086, -0.3722039461135864, -0.708873450756073, -1.0680676698684692, -0.9320496320724487, -0.7320252656936646, -0.7413722276687622, -0.4270467758178711, 0.7866963744163513, 0.7796703577041626, -0.5853025317192078, 0.04050039127469063, -0.026039639487862587, -0.12500549852848053, -0.2055594027042389, -0.25007277727127075, 0.2726326584815979, 0.5055166482925415, -1.0450655221939087, 0.15773051977157593, 0.40996333956718445, 0.6637945771217346, -0.10915954411029816, -0.27027368545532227, 0.23252305388450623, -0.2253984808921814, 0.36336085200309753, 0.13558000326156616, -0.6659513711929321, 0.18688954412937164, 0.10939386487007141, -0.16390812397003174, 0.21367089450359344, 0.15584607422351837, -0.34435781836509705, 0.4264903962612152, 0.5860923528671265, 0.04823228344321251, 0.6256707906723022, -0.08696573972702026, 0.043358542025089264, -0.5048581957817078, -0.037576932460069656, -0.06674574315547943, 0.4432580769062042, 0.25327998399734497, -0.40473857522010803, 0.5540273785591125, 0.7521681785583496, -0.30910658836364746, -0.6831759810447693, 0.17156408727169037, -1.4123835563659668, -0.3091789186000824, 1.0206165313720703, -0.17600740492343903, -0.448526531457901, 0.20135222375392914, -0.5022700428962708, 0.4041341245174408, -0.23493258655071259, 0.4425964951515198, 0.4507865905761719, 0.01731112226843834, -0.19815601408481598, -0.49208423495292664, 0.30077531933784485, 0.42935118079185486, -0.6763584017753601, -0.23564639687538147, 0.5399630665779114, 0.4481810927391052, 0.5859260559082031, 1.012295126914978, -0.5883497595787048, 0.5217568278312683, -0.034067388623952866, 0.14535735547542572, -0.046102989464998245, -0.10271015763282776, -0.35152900218963623, -0.0797308087348938, 0.0206389632076025, -0.16655126214027405 ]
klue/bert-base
klue
"2023-06-12T12:30:04Z"
31,336
26
transformers
[ "transformers", "pytorch", "safetensors", "bert", "fill-mask", "korean", "klue", "ko", "arxiv:2105.09680", "arxiv:1910.09700", "license:cc-by-sa-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: ko license: cc-by-sa-4.0 tags: - korean - klue mask_token: "[MASK]" widget: - text: 대한민국의 수도는 [MASK] 입니다. --- # KLUE BERT 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) - [Environmental Impact](#environmental-impact) - [Technical Specifications](#technical-specifications) - [Citation Information](#citation-information) - [Model Card Authors](#model-card-authors) ## Model Details **Model Description:** KLUE BERT base is a pre-trained BERT Model on Korean Language. The developers of KLUE BERT base developed the model in the context of the development of the [Korean Language Understanding Evaluation (KLUE) Benchmark](https://arxiv.org/pdf/2105.09680.pdf). - **Developed by:** See [GitHub Repo](https://github.com/facebookresearch/fairseq/tree/main/examples/roberta) for model developers - **Model Type:** Transformer-based language model - **Language(s):** Korean - **License:** cc-by-sa-4.0 - **Parent Model:** See the [BERT base uncased model](https://huggingface.co/bert-base-uncased) for more information about the BERT base model. - **Resources for more information:** - [Research Paper](https://arxiv.org/abs/2105.09680) - [GitHub Repo](https://github.com/KLUE-benchmark/KLUE) ## How to Get Started With the Model ```python from transformers import AutoModel, AutoTokenizer model = AutoModel.from_pretrained("klue/bert-base") tokenizer = AutoTokenizer.from_pretrained("klue/bert-base") ``` ## Uses #### Direct Use The model can be used for tasks including topic classification, semantic textual similarity, natural language inference, named entity recognition, and other tasks outlined in the [KLUE Benchmark](https://github.com/KLUE-benchmark/KLUE). #### Misuse and Out-of-scope Use The model should not be used to intentionally create hostile or alienating environments for people. In addition, 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 Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). The model developers discuss several ethical considerations related to the model in the [paper](https://arxiv.org/pdf/2105.09680.pdf), including: - Bias issues with the publicly available data used in the pretraining corpora (and considerations related to filtering) - PII in the data used in the pretraining corpora (and efforts to pseudonymize the data) For ethical considerations related to the KLUE Benchmark, also see the [paper](https://arxiv.org/pdf/2105.09680.pdf). ## Training #### Training Data The authors use the following pretraining corpora for the model, described in the [associated paper](https://arxiv.org/pdf/2105.09680.pdf): > We gather the following five publicly available Korean corpora from diverse sources to cover a broad set of topics and many different styles. We combine these corpora to build the final pretraining corpus of size approximately 62GB. > > - **MODU:** [Modu Corpus](https://corpus.korean.go.kr) is a collection of Korean corpora distributed by [National Institute of Korean Languages](https://corpus.korean.go.kr/). It includes both formal articles (news and books) and colloquial text (dialogues). > - **CC-100-Kor:** [CC-100](https://data.statmt.org/cc-100/) is the large-scale multilingual web crawled corpora by using CC-Net ([Wenzek et al., 2020](https://www.aclweb.org/anthology/2020.lrec-1.494)). This is used for training XLM-R ([Conneau et al., 2020](https://aclanthology.org/2020.acl-main.747/)). We use the Korean portion from this corpora. > - **NAMUWIKI:** NAMUWIKI is a Korean web-based encyclopedia, similar to Wikipedia, but known to be less formal. Specifically, we download [the dump](http://dump.thewiki.kr) created on March 2nd, 2020. > - **NEWSCRAWL:** NEWSCRAWL consists of 12,800,000 news articles published from 2011 to 2020, collected from a news aggregation platform. > - **PETITION:** Petition is a collection of public petitions posted to the Blue House asking for administrative actions on social issues. We use the articles in the [Blue House National Petition](https://www1.president.go.kr/petitions) published from [August 2017 to March 2019](https://ko-nlp.github.io/Korpora/en-docs/corpuslist/korean_petitions.html). The authors also describe ethical considerations related to the pretraining corpora in the [associated paper](https://arxiv.org/pdf/2105.09680.pdf). #### Training Procedure ##### Preprocessing The authors describe their preprocessing procedure in the [associated paper](https://arxiv.org/pdf/2105.09680.pdf): > We filter noisy text and non-Korean text using the same methods from Section 2.3 (of the paper). Each document in the corpus is split into sentences using C++ implementation (v1.3.1.) of rule-based [Korean Sentence Splitter (KSS)](https://github.com/likejazz/korean-sentence-splitter). For CC-100-Kor and NEWSCRAWL, we keep sentences of length greater than equal to 200 characters, as a heuristics to keep well-formed sentences. We then remove sentences included in our benchmark task datasets, using BM25 as a sentence similarity metric ([reference](https://www.microsoft.com/en-us/research/publication/okapi-at-trec-3/)). ###### Tokenization The authors describe their tokenization procedure in the [associated paper](https://arxiv.org/pdf/2105.09680.pdf): > We design and use a new tokenization method, morpheme-based subword tokenization. When building a vocabulary, we pre-tokenize a raw text into morphemes using a morphological analyzer, and then we apply byte pair encoding (BPE) ([Senrich et al., 2016](https://aclanthology.org/P16-1162/)) to get the final vocabulary. For morpheme segmentation, we use [Mecab-ko](https://bitbucket.org/eunjeon/mecab-ko), MeCab ([Kudo, 2006](https://taku910.github.io/mecab/)) adapted for Korean, and for BPE segmentation, we use the wordpiece tokenizer from [Huggingface Tokenizers library](https://github.com/huggingface/tokenizers). We specify the vocabulary size to 32k. After building the vocabulary, we only use the BPE model during inference, which allows us to tokenize a word sequence by reflecting morphemes without a morphological analyzer. This improves both usability and speed. The training configurations are further described in the [paper](https://arxiv.org/pdf/2105.09680.pdf). ## Evaluation #### Testing Data, Factors and Metrics The model was evaluated on the [KLUE Benchmark](https://github.com/KLUE-benchmark/KLUE). The tasks and metrics from the KLUE Benchmark that were used to evaluate this model are described briefly below. For more information about the KLUE Benchmark, see the [data card](https://huggingface.co/datasets/klue), [Github Repository](https://github.com/KLUE-benchmark/KLUE), and [associated paper](https://arxiv.org/pdf/2105.09680.pdf). - **Task:** Topic Classification (TC) - Yonhap News Agency Topic Classification (YNAT), **Metrics:** Macro F1 score, defined as the mean of topic-wise F1 scores, giving the same importance to each topic. - **Task:** Semantic Textual Similarity (STS), **Metrics:** Pearsons' correlation coefficient (Pearson’ r) and F1 score - **Task:** Natural Language Inference (NLI), **Metrics:** Accuracy - **Task:** Named Entity Recognition (NER), **Metrics:** Entity-level macro F1 (Entity F1) and character-level macro F1 (Char F1) scores - **Task:** Relation Extraction (RE), **Metrics:** Micro F1 score on relation existing cases and area under the precision- recall curve (AUPRC) on all classes - **Task:** Dependency Parsing (DP), **Metrics:** Unlabeled attachment score (UAS) and labeled attachment score (LAS) - **Task:** Machine Reading Comprehension (MRC), **Metrics:** Exact match (EM) and character-level ROUGE-W (ROUGE), which can be viewed as longest common consecutive subsequence (LCCS)-based F1 score. - **Task:** Dialogue State Tracking (DST), **Metrics:** Joint goal accuracy (JGA) and slot micro F1 score (Slot F1) #### Results | Task | TC | STS | | NLI | NER | | RE | | DP | | MRC | | DST | | | :---: |:---: | :---: | :---: |:---:| :---: | :---: |:---:| :---:| :---: |:---: | :---: | :---:| :---: | :---: | | Metric | F1 | Pearsons' r| F1 | ACC | Entity F1 | Char F1 | F1 | AUPRC| UAS | LAS | EM | ROUGE| JGA |Slot F1 | | | 85.73| 90.85 | 82.84 |81.63| 83.97 | 91.39 |66.44| 66.17| 89.96 |88.05 | 62.32 | 68.51| 46.64 | 91.61 | ## 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 based on the [associated paper](https://arxiv.org/pdf/2105.09680.pdf). - **Hardware Type:** TPU v3-8 - **Hours used:** Unknown - **Cloud Provider:** Unknown - **Compute Region:** Unknown - **Carbon Emitted:** Unknown ## Technical Specifications See the [associated paper](https://arxiv.org/pdf/2105.09680.pdf) for details on the modeling architecture (BERT), objective, compute infrastructure, and training details. ## Citation Information ```bibtex @misc{park2021klue, title={KLUE: Korean Language Understanding Evaluation}, author={Sungjoon Park and Jihyung Moon and Sungdong Kim and Won Ik Cho and Jiyoon Han and Jangwon Park and Chisung Song and Junseong Kim and Yongsook Song and Taehwan Oh and Joohong Lee and Juhyun Oh and Sungwon Lyu and Younghoon Jeong and Inkwon Lee and Sangwoo Seo and Dongjun Lee and Hyunwoo Kim and Myeonghwa Lee and Seongbo Jang and Seungwon Do and Sunkyoung Kim and Kyungtae Lim and Jongwon Lee and Kyumin Park and Jamin Shin and Seonghyun Kim and Lucy Park and Alice Oh and Jungwoo Ha and Kyunghyun Cho}, year={2021}, eprint={2105.09680}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.4095904529094696, -0.5573135614395142, 0.26560476422309875, 0.24173259735107422, -0.40703603625297546, -0.1200249120593071, -0.4329753518104553, -0.40537357330322266, 0.1320817470550537, 0.4035889506340027, -0.3960358798503876, -0.6484645009040833, -0.6090046763420105, 0.04333276301622391, 0.02886640466749668, 1.0109822750091553, -0.17033745348453522, 0.14672526717185974, -0.039750710129737854, -0.11065218597650528, -0.35408127307891846, -0.6040186882019043, -0.4062250256538391, -0.25763264298439026, 0.371518075466156, 0.185059055685997, 0.5799669623374939, 0.6625487208366394, 0.2911248207092285, 0.2570442855358124, -0.09408500045537949, -0.13148406147956848, -0.49384036660194397, -0.12363710254430771, -0.011278288438916206, -0.4140462577342987, -0.4474526643753052, 0.2473546266555786, 0.46281617879867554, 0.8070599436759949, 0.17863856256008148, 0.29674601554870605, -0.07500807195901871, 0.7633247971534729, -0.6326099634170532, 0.23052245378494263, -0.522221565246582, 0.012087835930287838, -0.24776799976825714, 0.2331879734992981, -0.4196428954601288, -0.28978419303894043, 0.19218014180660248, -0.6404769420623779, 0.10227018594741821, -0.10689529031515121, 1.3200445175170898, 0.16148494184017181, -0.3775281012058258, -0.4710036516189575, -0.3006626069545746, 0.7592167854309082, -0.845287561416626, 0.7475614547729492, 0.5111086368560791, 0.025057200342416763, -0.10603174567222595, -0.8704599142074585, -0.5363470911979675, -0.40460705757141113, -0.24945387244224548, 0.3381020426750183, 0.09292325377464294, 0.10744202882051468, 0.273492693901062, 0.36907199025154114, -0.6005480885505676, 0.0033277813345193863, -0.474089652299881, -0.33571019768714905, 0.708568274974823, -0.14323121309280396, 0.4018545150756836, -0.6790139675140381, -0.3093104362487793, -0.26253464818000793, -0.433230459690094, 0.20437467098236084, 0.5343303680419922, 0.27694693207740784, -0.12372387200593948, 0.6004220843315125, -0.1009538397192955, 0.3776080906391144, 0.22574208676815033, -0.3849315643310547, 0.6142408847808838, -0.6622716188430786, -0.18340681493282318, 0.020520154386758804, 0.8882585167884827, 0.33266475796699524, 0.18240386247634888, -0.20881977677345276, -0.017362497746944427, 0.12287633866071701, 0.2497449815273285, -0.8153558373451233, -0.4255777597427368, 0.3329080045223236, -0.8582174181938171, -0.16057856380939484, 0.004609434865415096, -0.8020967245101929, 0.01895686239004135, -0.4140632450580597, 0.3301268517971039, -0.5683969259262085, -0.3812435567378998, 0.0649094507098198, -0.03366905078291893, 0.08356036245822906, -0.03734390065073967, -0.526675283908844, 0.19310463964939117, 0.38477036356925964, 0.674896240234375, -0.24913263320922852, -0.3764762580394745, -0.14216837286949158, -0.22569958865642548, -0.21996557712554932, 0.3796495795249939, -0.15851791203022003, -0.36309096217155457, -0.17532043159008026, 0.3546377420425415, -0.3678509593009949, -0.45022332668304443, 0.7227777242660522, -0.45038726925849915, 0.3842731714248657, -0.15400460362434387, -0.8484770655632019, -0.17114263772964478, 0.036247387528419495, -0.5757594704627991, 1.1832842826843262, 0.28509631752967834, -0.7505494952201843, 0.35840392112731934, -0.7783834934234619, -0.29947230219841003, 0.0014423637185245752, -0.00476385373622179, -0.3581840395927429, -0.20432433485984802, 0.14395110309123993, 0.44910234212875366, 0.06171845644712448, 0.424258291721344, -0.14026165008544922, -0.1409984976053238, -0.08314156532287598, -0.09335487335920334, 1.0730310678482056, 0.3594047725200653, -0.3565271198749542, -0.01215328834950924, -0.8228093385696411, 0.22181718051433563, 0.17435148358345032, -0.4796421229839325, -0.35922592878341675, -0.318913996219635, 0.12174000591039658, 0.42823731899261475, 0.4206829071044922, -0.5592947602272034, 0.003235637443140149, -0.5134962201118469, 0.15884695947170258, 0.4808818995952606, -0.19867879152297974, 0.6346654295921326, -0.13784395158290863, 0.5222570300102234, 0.04761655628681183, 0.13979779183864594, -0.28465771675109863, -0.4229663908481598, -0.6178213357925415, -0.34695300459861755, 0.814220130443573, 0.6449259519577026, -0.5554330348968506, 0.684410572052002, -0.37623175978660583, -0.7996847629547119, -0.8948221206665039, -0.004442635457962751, 0.5870734453201294, 0.47350600361824036, 0.412627249956131, -0.08586300164461136, -0.7402388453483582, -0.761552631855011, -0.16149865090847015, -0.15979325771331787, -0.008837020955979824, 0.4277896583080292, 0.6781119108200073, -0.22679521143436432, 0.8108699917793274, -0.4228436350822449, -0.019580483436584473, -0.22262947261333466, 0.1260778307914734, 0.2310604453086853, 0.5055326819419861, 0.574550211429596, -0.9473498463630676, -0.7568700313568115, -0.08581186830997467, -0.6539210677146912, -0.3158018887042999, 0.06872748583555222, -0.13977618515491486, 0.5215476751327515, 0.7999887466430664, -0.7728354334831238, 0.34927552938461304, 0.5992743372917175, -0.4502575695514679, 0.8947228193283081, 0.024942662566900253, 0.07937940955162048, -1.2419993877410889, 0.3183319568634033, -0.17612728476524353, 0.006751954089850187, -0.7695369124412537, 0.11017373949289322, 0.16227585077285767, -0.10430942475795746, -0.4563221335411072, 0.781639814376831, -0.4682023525238037, 0.11962037533521652, -0.3018510639667511, 0.25405508279800415, -0.0498400516808033, 0.6655758619308472, 0.06057974323630333, 0.6041708588600159, 0.2618432939052582, -0.7202072143554688, 0.0037315692752599716, 0.23224689066410065, -0.4057601988315582, 0.241822749376297, -0.5742941498756409, 0.05226501077413559, -0.14913758635520935, 0.2748543620109558, -0.7929925322532654, -0.11480627208948135, 0.43941402435302734, -0.574343204498291, 0.3667563199996948, -0.23234179615974426, -0.4037134349346161, -0.40777602791786194, -0.4094264507293701, 0.2739022374153137, 0.47929319739341736, -0.38054800033569336, 0.5761639475822449, 0.459274023771286, -0.20412985980510712, -0.7526191473007202, -0.4650169014930725, -0.06447169184684753, -0.12461021542549133, -0.6402329206466675, 0.6680930852890015, -0.11932775378227234, -0.12251829355955124, 0.3506675362586975, -0.06166006997227669, -0.028400946408510208, 0.009750076569616795, 0.21949461102485657, 0.36385270953178406, -0.2842506766319275, 0.13591989874839783, -0.028987040743231773, -0.029923787340521812, -0.07105567306280136, -0.16297130286693573, 0.8108615875244141, -0.09840739518404007, -0.08163043111562729, -0.3101711869239807, 0.17488625645637512, 0.5088112950325012, -0.05941466614603996, 0.7011590003967285, 0.811979353427887, -0.3661983907222748, 0.33354756236076355, -0.5622426867485046, -0.12441472709178925, -0.4183683693408966, 0.6878347992897034, -0.3942645490169525, -0.8230742812156677, 0.4574926197528839, -0.030054308474063873, 0.04651296138763428, 0.6054628491401672, 0.5437533855438232, -0.0029944938141852617, 0.7797468304634094, 0.518992006778717, -0.30154287815093994, 0.37727564573287964, -0.22359420359134674, 0.41079312562942505, -0.8292776346206665, -0.21800073981285095, -0.5216304659843445, -0.16312937438488007, -0.8939367532730103, -0.29938367009162903, -0.017522431910037994, 0.4309563934803009, -0.18704324960708618, 0.5743395090103149, -0.3011748194694519, 0.2080020159482956, 0.5188949108123779, -0.12359138578176498, -0.01571148820221424, -0.16265247762203217, -0.29029911756515503, -0.2467993199825287, -0.7317913770675659, -0.676368772983551, 1.170445203781128, 0.46386536955833435, 0.2861216962337494, -0.4157862365245819, 0.7330926656723022, 0.03312735632061958, 0.1386910378932953, -0.6997982859611511, 0.5995728373527527, -0.2798828184604645, -0.6023914813995361, -0.3889240622520447, -0.4855179190635681, -1.1496127843856812, 0.42601820826530457, -0.1024756208062172, -0.7013865113258362, 0.20341354608535767, -0.04715072736144066, -0.16594408452510834, 0.22523783147335052, -0.848393440246582, 1.1397773027420044, -0.16651412844657898, 0.11201268434524536, -0.03378645330667496, -0.7152087688446045, 0.2888946831226349, -0.07633505016565323, 0.19998466968536377, -0.12928783893585205, -0.016485778614878654, 0.8403667211532593, -0.4160565435886383, 0.6563308238983154, -0.341734915971756, 0.05769127607345581, 0.25108668208122253, -0.30406370759010315, 0.3808903098106384, -0.0838712826371193, 0.0024262750521302223, 0.41602271795272827, 0.08040904253721237, -0.38446471095085144, -0.4149955213069916, 0.5053806900978088, -0.8124966621398926, -0.27164390683174133, -0.28576669096946716, -0.6051343679428101, -0.024654226377606392, 0.39051708579063416, 0.5264905095100403, 0.05992123857140541, -0.08949122577905655, 0.23625104129314423, 0.4858487546443939, -0.4751366078853607, 0.27185317873954773, 0.4777385890483856, -0.31101861596107483, -0.5067400336265564, 0.848863422870636, 0.3745603561401367, 0.21608027815818787, 0.16438397765159607, 0.10010404139757156, -0.38130301237106323, -0.393044650554657, -0.3074392080307007, 0.4131736755371094, -0.7075446248054504, 0.00799509696662426, -0.9324811697006226, -0.48651593923568726, -0.6241104006767273, 0.008226078934967518, -0.45109298825263977, -0.38190481066703796, -0.20742185413837433, -0.08088255673646927, 0.025383979082107544, 0.26210474967956543, -0.00310232350602746, 0.2594861090183258, -0.6468653082847595, 0.3784019947052002, -0.026180412620306015, 0.23101769387722015, -0.029288746416568756, -0.6255480051040649, -0.3004313111305237, 0.13011620938777924, -0.21969789266586304, -0.6724525094032288, 0.32690662145614624, -0.03965901955962181, 0.6928342580795288, 0.10898111760616302, 0.07357524335384369, 0.5881025791168213, -0.5113328695297241, 0.9864181280136108, 0.03178953006863594, -0.7857087850570679, 0.49432727694511414, -0.13921120762825012, 0.4909965395927429, 0.6428468823432922, 0.668332040309906, -0.6590210795402527, -0.4453604817390442, -0.8260229229927063, -1.1101146936416626, 0.7954821586608887, 0.28519660234451294, 0.134294793009758, -0.05821187421679497, 0.41036635637283325, 0.10775335878133774, 0.25577375292778015, -0.9716435074806213, -0.5260609984397888, -0.3827786445617676, -0.3030298054218292, 0.050365813076496124, -0.34997424483299255, 0.23187611997127533, -0.3767489492893219, 0.9963701367378235, 0.08290296047925949, 0.35329675674438477, 0.2537086308002472, -0.41570913791656494, 0.1040765792131424, 0.20848971605300903, 0.5653571486473083, 0.5310681462287903, -0.17533153295516968, -0.04836783930659294, 0.20086733996868134, -0.8642857074737549, -0.01118688378483057, 0.3321568965911865, -0.33152875304222107, 0.29184848070144653, 0.256975919008255, 0.8998624682426453, 0.2785291075706482, -0.6913495063781738, 0.43037036061286926, 0.05162743851542473, -0.4531732499599457, -0.18582235276699066, -0.21813257038593292, 0.22713761031627655, 0.0978924110531807, 0.20379477739334106, -0.14633809030056, -0.11643083393573761, -0.3627839684486389, 0.20461194217205048, 0.10466234385967255, -0.1969674676656723, -0.35645389556884766, 0.48885098099708557, 0.0035461869556456804, -0.13207152485847473, 0.52716463804245, -0.5310183763504028, -0.7057311534881592, 0.6306465268135071, 0.46448713541030884, 0.7688442468643188, -0.2710009217262268, 0.3289458751678467, 0.6924892067909241, 0.33683881163597107, -0.053536556661129, 0.3219117224216461, 0.1815430223941803, -0.7474726438522339, -0.5142127275466919, -0.7256091833114624, 0.04286164045333862, 0.5835486650466919, -0.48492032289505005, 0.26094117760658264, -0.1998155564069748, -0.15548627078533173, 0.029308119788765907, 0.33976683020591736, -0.5548983216285706, 0.24351619184017181, 0.0933915451169014, 0.8891193270683289, -0.7368502616882324, 0.7481161952018738, 0.7554455399513245, -0.46935105323791504, -0.8217983841896057, 0.0954844132065773, -0.29977813363075256, -0.5885531306266785, 0.7460954189300537, 0.21906152367591858, 0.3538000285625458, -0.15984269976615906, -0.3703555762767792, -0.9640786647796631, 1.0648032426834106, 0.343235582113266, -0.48172950744628906, -0.0001761725579854101, 0.18277424573898315, 0.6063850522041321, -0.3343605101108551, 0.02002529986202717, 0.5270584225654602, 0.5441293716430664, -0.3290352523326874, -1.0541534423828125, 0.15293164551258087, -0.4414713382720947, -0.017506729811429977, 0.1283879280090332, -0.5759860277175903, 0.9228395223617554, 0.08550451695919037, -0.264988511800766, 0.001180476974695921, 0.587012767791748, 0.3182927370071411, 0.43024778366088867, 0.6732195019721985, 0.6843082308769226, 0.9524344205856323, 0.08279304206371307, 0.9632440209388733, -0.5940290093421936, 0.24104644358158112, 1.162145972251892, -0.04747864976525307, 0.6562385559082031, 0.28327199816703796, -0.2468145340681076, 0.43891751766204834, 0.6672623753547668, -0.17380620539188385, 0.5987151265144348, 0.07264117151498795, 0.028287142515182495, 0.056710634380578995, -0.170497864484787, -0.39823096990585327, 0.44603613018989563, 0.1812751740217209, -0.4838690757751465, -0.15884628891944885, 0.12736506760120392, 0.4116518795490265, 0.016020653769373894, -0.33992648124694824, 0.49862995743751526, 0.12021461874246597, -0.7450483441352844, 0.5177023410797119, 0.09360940009355545, 0.7715438604354858, -0.663317859172821, 0.2669018805027008, -0.004203911405056715, 0.03536904603242874, -0.1671561598777771, -0.5465248823165894, 0.2199363112449646, -0.06780751794576645, -0.36942970752716064, -0.12274254858493805, 0.9850621223449707, -0.5886576175689697, -0.4049836993217468, 0.4199618995189667, 0.5445961356163025, 0.335078626871109, -0.07057972252368927, -0.9140771627426147, -0.07048261910676956, 0.024708138778805733, -0.47323301434516907, 0.5221810936927795, 0.35226449370384216, -0.20193974673748016, 0.45381516218185425, 0.6839839816093445, 0.02432216703891754, 0.2395850569009781, 0.15841032564640045, 0.7122435569763184, -0.48438742756843567, -0.425852507352829, -0.7724387645721436, 0.4072842001914978, -0.2026650309562683, -0.41472694277763367, 0.8605424165725708, 0.7015719413757324, 1.2065438032150269, -0.23836468160152435, 0.8434436917304993, -0.26908060908317566, 0.5429256558418274, -0.44786304235458374, 0.8138912320137024, -0.46642187237739563, -0.14790400862693787, -0.43133604526519775, -0.8151603937149048, -0.014112818986177444, 0.5499705076217651, -0.3052023947238922, 0.1839459091424942, 0.7521476149559021, 0.7381433844566345, 0.0189828984439373, -0.047067079693078995, 0.20604926347732544, 0.28656092286109924, -0.0004662797728087753, 0.29886937141418457, 0.42724230885505676, -0.7220469117164612, 0.724358856678009, -0.518052875995636, 0.003005541395395994, -0.1053316593170166, -0.7898370623588562, -0.8967132568359375, -0.7140017747879028, -0.3822927176952362, -0.3220190405845642, 0.0421285443007946, 1.015803575515747, 0.5640386939048767, -0.8771823048591614, -0.2711162269115448, -0.012826652266085148, -0.007239348255097866, -0.1695839762687683, -0.2692568898200989, 0.7178351283073425, -0.5561537742614746, -0.7246255278587341, 0.23253105580806732, 0.03332073986530304, 0.014817692339420319, -0.03956156596541405, -0.2889830768108368, -0.5350160002708435, -0.12145241349935532, 0.7400524616241455, 0.22115838527679443, -0.6763485074043274, -0.040215831249952316, 0.280058354139328, -0.256012499332428, 0.007867051288485527, 0.5752198696136475, -0.5690829157829285, 0.27557945251464844, 0.4203495383262634, 0.6611307859420776, 0.4988119602203369, -0.1177162230014801, 0.3610524833202362, -0.6190654039382935, 0.11067041754722595, 0.16104194521903992, 0.35554638504981995, 0.19819898903369904, -0.3747781217098236, 0.7328068614006042, 0.4117042124271393, -0.5815628170967102, -0.9097861051559448, 0.0015302932588383555, -0.8547323942184448, -0.4433510899543762, 1.1679563522338867, -0.3720701336860657, -0.3135000765323639, -0.3435533046722412, -0.4038880169391632, 0.4871706962585449, -0.2089272290468216, 0.7598279714584351, 1.0231925249099731, 0.13743360340595245, -0.004685467109084129, -0.7476364374160767, 0.5985583662986755, 0.38618698716163635, -0.697102427482605, 0.014225305989384651, 0.1622002124786377, 0.3715459406375885, 0.34797555208206177, 0.818766176700592, -0.2832167446613312, 0.32255202531814575, -0.04651821777224541, 0.2629745602607727, 0.06662023812532425, -0.07443691045045853, -0.11937478184700012, 0.027924422174692154, -0.3442970812320709, -0.17754274606704712 ]
facebook/musicgen-small
facebook
"2023-11-17T13:56:10Z"
31,255
130
transformers
[ "transformers", "pytorch", "safetensors", "musicgen", "text-to-audio", "arxiv:2306.05284", "license:cc-by-nc-4.0", "endpoints_compatible", "has_space", "region:us" ]
text-to-audio
"2023-06-08T17:28:01Z"
--- inference: true tags: - musicgen license: cc-by-nc-4.0 pipeline_tag: text-to-audio widget: - text: "a funky house with 80s hip hop vibes" example_title: "Prompt 1" - text: "a chill song with influences from lofi, chillstep and downtempo" example_title: "Prompt 2" - text: "a catchy beat for a podcast intro" example_title: "Prompt 3" --- # MusicGen - Small - 300M MusicGen is a text-to-music model capable of genreating high-quality music samples conditioned on text descriptions or audio prompts. It is a single stage auto-regressive Transformer model trained over a 32kHz EnCodec tokenizer with 4 codebooks sampled at 50 Hz. Unlike existing methods, like MusicLM, MusicGen doesn't require a self-supervised semantic representation, and it generates all 4 codebooks in one pass. By introducing a small delay between the codebooks, we show we can predict them in parallel, thus having only 50 auto-regressive steps per second of audio. MusicGen was published in [Simple and Controllable Music Generation](https://arxiv.org/abs/2306.05284) by *Jade Copet, Felix Kreuk, Itai Gat, Tal Remez, David Kant, Gabriel Synnaeve, Yossi Adi, Alexandre Défossez*. Four checkpoints are released: - [**small** (this checkpoint)](https://huggingface.co/facebook/musicgen-small) - [medium](https://huggingface.co/facebook/musicgen-medium) - [large](https://huggingface.co/facebook/musicgen-large) - [melody](https://huggingface.co/facebook/musicgen-melody) ## Example Try out MusicGen yourself! * Audiocraft Colab: <a target="_blank" href="https://colab.research.google.com/drive/1fxGqfg96RBUvGxZ1XXN07s3DthrKUl4-?usp=sharing"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> * Hugging Face Colab: <a target="_blank" href="https://colab.research.google.com/github/sanchit-gandhi/notebooks/blob/main/MusicGen.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a> * Hugging Face Demo: <a target="_blank" href="https://huggingface.co/spaces/facebook/MusicGen"> <img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="Open in HuggingFace"/> </a> ## 🤗 Transformers Usage You can run MusicGen locally with the 🤗 Transformers library from version 4.31.0 onwards. 1. First install the 🤗 [Transformers library](https://github.com/huggingface/transformers) and scipy: ``` pip install --upgrade pip pip install --upgrade transformers scipy ``` 2. Run inference via the `Text-to-Audio` (TTA) pipeline. You can infer the MusicGen model via the TTA pipeline in just a few lines of code! ```python from transformers import pipeline import scipy synthesiser = pipeline("text-to-audio", "facebook/musicgen-small") music = synthesiser("lo-fi music with a soothing melody", forward_params={"do_sample": True}) scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"], data=music["audio"]) ``` 3. Run inference via the Transformers modelling code. You can use the processor + generate code to convert text into a mono 32 kHz audio waveform for more fine-grained control. ```python from transformers import AutoProcessor, MusicgenForConditionalGeneration processor = AutoProcessor.from_pretrained("facebook/musicgen-small") model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small") inputs = processor( text=["80s pop track with bassy drums and synth", "90s rock song with loud guitars and heavy drums"], padding=True, return_tensors="pt", ) audio_values = model.generate(**inputs, max_new_tokens=256) ``` 3. Listen to the audio samples either in an ipynb notebook: ```python from IPython.display import Audio sampling_rate = model.config.audio_encoder.sampling_rate Audio(audio_values[0].numpy(), rate=sampling_rate) ``` Or save them as a `.wav` file using a third-party library, e.g. `scipy`: ```python import scipy sampling_rate = model.config.audio_encoder.sampling_rate scipy.io.wavfile.write("musicgen_out.wav", rate=sampling_rate, data=audio_values[0, 0].numpy()) ``` For more details on using the MusicGen model for inference using the 🤗 Transformers library, refer to the [MusicGen docs](https://huggingface.co/docs/transformers/model_doc/musicgen). ## Audiocraft Usage You can also run MusicGen locally through the original [Audiocraft library]((https://github.com/facebookresearch/audiocraft): 1. First install the [`audiocraft` library](https://github.com/facebookresearch/audiocraft) ``` pip install git+https://github.com/facebookresearch/audiocraft.git ``` 2. Make sure to have [`ffmpeg`](https://ffmpeg.org/download.html) installed: ``` apt-get install ffmpeg ``` 3. Run the following Python code: ```py from audiocraft.models import MusicGen from audiocraft.data.audio import audio_write model = MusicGen.get_pretrained("small") model.set_generation_params(duration=8) # generate 8 seconds. descriptions = ["happy rock", "energetic EDM"] wav = model.generate(descriptions) # generates 2 samples. for idx, one_wav in enumerate(wav): # Will save under {idx}.wav, with loudness normalization at -14 db LUFS. audio_write(f'{idx}', one_wav.cpu(), model.sample_rate, strategy="loudness") ``` ## Model details **Organization developing the model:** The FAIR team of Meta AI. **Model date:** MusicGen was trained between April 2023 and May 2023. **Model version:** This is the version 1 of the model. **Model type:** MusicGen consists of an EnCodec model for audio tokenization, an auto-regressive language model based on the transformer architecture for music modeling. The model comes in different sizes: 300M, 1.5B and 3.3B parameters ; and two variants: a model trained for text-to-music generation task and a model trained for melody-guided music generation. **Paper or resources for more information:** More information can be found in the paper [Simple and Controllable Music Generation](https://arxiv.org/abs/2306.05284). **Citation details:** ``` @misc{copet2023simple, title={Simple and Controllable Music Generation}, author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez}, year={2023}, eprint={2306.05284}, archivePrefix={arXiv}, primaryClass={cs.SD} } ``` **License:** Code is released under MIT, model weights are released under CC-BY-NC 4.0. **Where to send questions or comments about the model:** Questions and comments about MusicGen can be sent via the [Github repository](https://github.com/facebookresearch/audiocraft) of the project, or by opening an issue. ## Intended use **Primary intended use:** The primary use of MusicGen is research on AI-based music generation, including: - Research efforts, such as probing and better understanding the limitations of generative models to further improve the state of science - Generation of music guided by text or melody to understand current abilities of generative AI models by machine learning amateurs **Primary intended users:** The primary intended users of the model are researchers in audio, machine learning and artificial intelligence, as well as amateur seeking to better understand those models. **Out-of-scope use cases:** The model should not be used on downstream applications without further risk evaluation and mitigation. The model should not be used to intentionally create or disseminate music pieces that create hostile or alienating environments for people. This includes generating music that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes. ## Metrics **Models performance measures:** We used the following objective measure to evaluate the model on a standard music benchmark: - Frechet Audio Distance computed on features extracted from a pre-trained audio classifier (VGGish) - Kullback-Leibler Divergence on label distributions extracted from a pre-trained audio classifier (PaSST) - CLAP Score between audio embedding and text embedding extracted from a pre-trained CLAP model Additionally, we run qualitative studies with human participants, evaluating the performance of the model with the following axes: - Overall quality of the music samples; - Text relevance to the provided text input; - Adherence to the melody for melody-guided music generation. More details on performance measures and human studies can be found in the paper. **Decision thresholds:** Not applicable. ## Evaluation datasets The model was evaluated on the [MusicCaps benchmark](https://www.kaggle.com/datasets/googleai/musiccaps) and on an in-domain held-out evaluation set, with no artist overlap with the training set. ## Training datasets The model was trained on licensed data using the following sources: the [Meta Music Initiative Sound Collection](https://www.fb.com/sound), [Shutterstock music collection](https://www.shutterstock.com/music) and the [Pond5 music collection](https://www.pond5.com/). See the paper for more details about the training set and corresponding preprocessing. ## Evaluation results Below are the objective metrics obtained on MusicCaps with the released model. Note that for the publicly released models, we had all the datasets go through a state-of-the-art music source separation method, namely using the open source [Hybrid Transformer for Music Source Separation](https://github.com/facebookresearch/demucs) (HT-Demucs), in order to keep only the instrumental part. This explains the difference in objective metrics with the models used in the paper. | Model | Frechet Audio Distance | KLD | Text Consistency | Chroma Cosine Similarity | |---|---|---|---|---| | **facebook/musicgen-small** | 4.88 | 1.42 | 0.27 | - | | facebook/musicgen-medium | 5.14 | 1.38 | 0.28 | - | | facebook/musicgen-large | 5.48 | 1.37 | 0.28 | - | | facebook/musicgen-melody | 4.93 | 1.41 | 0.27 | 0.44 | More information can be found in the paper [Simple and Controllable Music Generation](https://arxiv.org/abs/2306.05284), in the Results section. ## Limitations and biases **Data:** The data sources used to train the model are created by music professionals and covered by legal agreements with the right holders. The model is trained on 20K hours of data, we believe that scaling the model on larger datasets can further improve the performance of the model. **Mitigations:** Vocals have been removed from the data source using corresponding tags, and then using a state-of-the-art music source separation method, namely using the open source [Hybrid Transformer for Music Source Separation](https://github.com/facebookresearch/demucs) (HT-Demucs). **Limitations:** - The model is not able to generate realistic vocals. - The model has been trained with English descriptions and will not perform as well in other languages. - The model does not perform equally well for all music styles and cultures. - The model sometimes generates end of songs, collapsing to silence. - It is sometimes difficult to assess what types of text descriptions provide the best generations. Prompt engineering may be required to obtain satisfying results. **Biases:** The source of data is potentially lacking diversity and all music cultures are not equally represented in the dataset. The model may not perform equally well on the wide variety of music genres that exists. The generated samples from the model will reflect the biases from the training data. Further work on this model should include methods for balanced and just representations of cultures, for example, by scaling the training data to be both diverse and inclusive. **Risks and harms:** Biases and limitations of the model may lead to generation of samples that may be considered as biased, inappropriate or offensive. We believe that providing the code to reproduce the research and train new models will allow to broaden the application to new and more representative data. **Use cases:** Users must be aware of the biases, limitations and risks of the model. MusicGen is a model developed for artificial intelligence research on controllable music generation. As such, it should not be used for downstream applications without further investigation and mitigation of risks.
[ -0.5603702664375305, -0.6339133381843567, 0.23142491281032562, 0.4797060489654541, 0.011910646222531796, -0.09366811811923981, -0.5206127166748047, -0.28371256589889526, 0.1291215419769287, 0.2350587546825409, -1.0259654521942139, -0.7534341812133789, -0.3377745747566223, 0.13106749951839447, -0.41985780000686646, 1.0161930322647095, 0.2078506052494049, -0.014248419553041458, -0.30937305092811584, 0.15923655033111572, -0.2649097144603729, -0.13176216185092926, -0.629360556602478, -0.4295601546764374, 0.12100361287593842, 0.22875367105007172, 0.22281377017498016, 0.5386911630630493, 0.5369232296943665, 0.3889879286289215, -0.291996568441391, -0.24208572506904602, -0.3771003484725952, 0.07443655282258987, 0.26579999923706055, -0.6495973467826843, -0.5372183322906494, 0.4818839728832245, 0.3387312591075897, 0.22691546380519867, -0.1543119102716446, 0.5802963376045227, -0.03644678741693497, 0.3364942967891693, 0.06347422301769257, 0.25476884841918945, -0.47128891944885254, 0.17581674456596375, -0.09804750233888626, -0.12895481288433075, -0.3672877550125122, -0.3427004814147949, 0.007124921772629023, -0.8081925511360168, 0.35537177324295044, 0.14945334196090698, 0.8751236796379089, 0.36283886432647705, 0.11597751826047897, -0.3571845293045044, -0.6385354995727539, 0.821243405342102, -0.7258633971214294, 0.17786824703216553, 0.46488726139068604, 0.3321066200733185, -0.19036170840263367, -0.8137773275375366, -0.5496469736099243, -0.14932881295681, 0.11973674595355988, 0.39159247279167175, -0.30684563517570496, -0.08518735319375992, 0.49536073207855225, 0.6938768029212952, -0.5412647724151611, -0.43529263138771057, -0.5616595149040222, -0.31174221634864807, 0.8363829255104065, -0.13532765209674835, 0.5853400230407715, -0.5177267789840698, -0.4450993239879608, -0.492255836725235, -0.4925382733345032, 0.31374698877334595, 0.632802426815033, 0.2872006893157959, -0.6155087351799011, 0.4745914340019226, 0.25373950600624084, 0.6304432153701782, 0.5310894846916199, -0.4948670268058777, 0.7156423926353455, -0.44583192467689514, -0.12929832935333252, 0.26523086428642273, 1.2742176055908203, 0.1238904744386673, 0.11075291037559509, 0.161091610789299, -0.2396821230649948, 0.07975020259618759, -0.08338060975074768, -0.8038236498832703, -0.45960715413093567, 0.4669077396392822, -0.7666309475898743, -0.3283279836177826, 0.011387800797820091, -0.7492561340332031, 0.022578008472919464, -0.41371312737464905, 0.8656680583953857, -0.715520441532135, -0.3282260298728943, 0.06913347542285919, -0.5563825964927673, -0.0903540849685669, -0.31602606177330017, -0.734229326248169, -0.08953232318162918, 0.5259299278259277, 0.8414779901504517, -0.057647332549095154, -0.19904452562332153, -0.22485853731632233, -0.08490469306707382, -0.11814700067043304, 0.4318860173225403, -0.21266628801822662, -0.6721909642219543, -0.29025596380233765, 0.11468959599733353, -0.08754297345876694, -0.6891737580299377, 0.6606488227844238, -0.031142331659793854, 0.6094960570335388, 0.048840440809726715, -0.5554375648498535, -0.11630977690219879, -0.30615323781967163, -0.5918278098106384, 0.9069514274597168, 0.3605397343635559, -0.7545863389968872, 0.2970571219921112, -0.755643367767334, -0.42735958099365234, -0.35681504011154175, -0.02356497198343277, -0.6918901801109314, 0.10813149064779282, 0.02679949253797531, 0.2558014392852783, -0.27547487616539, 0.19270895421504974, -0.3389984369277954, -0.606066107749939, 0.26323390007019043, -0.2916609048843384, 1.0157818794250488, 0.5789721608161926, -0.46352699398994446, 0.13265344500541687, -1.0520702600479126, -0.20829501748085022, 0.2761528193950653, -0.5118496417999268, -0.07015537470579147, -0.23921698331832886, 0.5063284635543823, 0.3993065655231476, 0.0654035285115242, -0.7455559968948364, 0.08196883648633957, -0.4918597340583801, 0.6827683448791504, 0.5784849524497986, -0.10993605107069016, 0.5235233902931213, -0.7172589898109436, 0.5204141736030579, -0.24439123272895813, 0.11218509823083878, -0.26426735520362854, -0.4867614507675171, -0.2765881419181824, -0.4295915961265564, 0.5340185761451721, 0.41771233081817627, -0.3198584318161011, 0.7987173795700073, -0.07302448153495789, -0.7138785123825073, -1.035256266593933, 0.1405845433473587, 0.15094615519046783, 0.3536720275878906, 0.43528884649276733, -0.23053638637065887, -0.6590372323989868, -0.7521118521690369, -0.18573898077011108, -0.1927223950624466, -0.46110740303993225, 0.43909913301467896, 0.2527819573879242, -0.368960440158844, 1.0037435293197632, -0.33045288920402527, -0.4847026467323303, -0.24512431025505066, 0.3594422936439514, 0.6126894950866699, 0.8941454887390137, 0.7415827512741089, -0.8017436861991882, -0.2913469076156616, -0.5497081875801086, -0.4690743386745453, -0.5211354494094849, -0.19300787150859833, -0.2006024569272995, -0.2671172618865967, 0.4110603630542755, -0.7053906917572021, -0.022883985191583633, 0.6306775212287903, -0.31785303354263306, 0.32239246368408203, 0.22903189063072205, 0.1809300184249878, -1.120876669883728, 0.08150137215852737, 0.06704191118478775, -0.0649142861366272, -0.49086233973503113, -0.43350955843925476, -0.27405181527137756, -0.12296643108129501, -0.3391994833946228, 0.22563982009887695, -0.12032192200422287, 0.05921773985028267, -0.3771269619464874, 0.11196820437908173, -0.05538950860500336, 0.570433497428894, -0.05508653447031975, 0.5920254588127136, 0.574196457862854, -0.46296024322509766, 0.35150569677352905, 0.31825870275497437, -0.43627575039863586, 0.605283260345459, -0.7156765460968018, -0.029912369325757027, -0.06283050030469894, 0.30286097526550293, -0.9374627470970154, -0.3107861876487732, 0.2782209813594818, -0.8326946496963501, 0.5073837041854858, -0.09395568817853928, -0.5461159944534302, -0.626208484172821, 0.03412599489092827, 0.564933717250824, 0.9935305714607239, -0.5202996134757996, 0.802366316318512, 0.4201309084892273, -0.08802325278520584, 0.07679673284292221, -0.8556980490684509, -0.3340243399143219, -0.49195393919944763, -0.8331431150436401, 0.5954796075820923, -0.30523452162742615, -0.20418211817741394, 0.08288802951574326, -0.1744849979877472, 0.2953909933567047, -0.04069621488451958, 0.5906957983970642, 0.1672111302614212, -0.08368140459060669, 0.2680612802505493, -0.0697520300745964, -0.24164479970932007, 0.3361731171607971, -0.3987589180469513, 0.6508904099464417, -0.13667552173137665, -0.2942497730255127, -0.5938189029693604, 0.07164540886878967, 0.5103143453598022, -0.24028414487838745, 0.05932489037513733, 0.9310479760169983, -0.0851365402340889, -0.252422571182251, -0.27571699023246765, -0.22338339686393738, -0.5367881655693054, 0.16670605540275574, -0.2700998783111572, -0.6181109547615051, 0.3677142858505249, -0.11134525388479233, 0.1431543380022049, 0.9306658506393433, 0.5120190978050232, -0.32566365599632263, 1.1598631143569946, 0.47492876648902893, -0.08919917047023773, 0.7072833180427551, -0.6440542936325073, -0.23013126850128174, -0.598107635974884, -0.33329978585243225, -0.5353423357009888, -0.4713084101676941, -0.7716303467750549, -0.40418073534965515, 0.46699488162994385, -0.2289557158946991, -0.3872315585613251, 0.562874972820282, -0.6901659965515137, -0.002339578466489911, 0.8050256371498108, -0.024420788511633873, 0.04932808876037598, 0.15478426218032837, -0.17358115315437317, 0.06371258944272995, -0.6486815214157104, -0.03305946663022041, 1.037699818611145, 0.5022327899932861, 0.89164799451828, -0.13196530938148499, 0.9415968060493469, 0.2338811159133911, 0.17732658982276917, -0.7177125811576843, 0.2278171181678772, -0.07773496955633163, -0.7825860977172852, -0.10111214965581894, -0.4973466992378235, -0.6281772255897522, -0.030304666608572006, -0.29752668738365173, -0.5236205458641052, 0.19777712225914001, 0.05441534146666527, -0.39916878938674927, 0.18531419336795807, -0.5924805998802185, 0.6856585741043091, -0.1902364045381546, -0.08472643792629242, 0.1872246414422989, -0.549024760723114, 0.4165898263454437, -0.23634137213230133, 0.5712074637413025, -0.39490121603012085, 0.3825952112674713, 0.9244597554206848, -0.2240227311849594, 0.6371970176696777, -0.23083749413490295, -0.12155338376760483, 0.5514130592346191, -0.13134928047657013, 0.21289527416229248, -0.17537319660186768, -0.012040249072015285, 0.21963262557983398, 0.060234684497117996, -0.2355506867170334, -0.3152065873146057, 0.7261570692062378, -0.7581173181533813, -0.4540349245071411, -0.06101305037736893, -0.6887738108634949, -0.1162336990237236, 0.07617172598838806, 0.7867885828018188, 0.3062041997909546, 0.09006066620349884, 0.3507062494754791, 0.5887266397476196, -0.4041043817996979, 0.5529666543006897, 0.16721805930137634, -0.3204936385154724, -0.5717543959617615, 1.0066362619400024, -0.17616257071495056, 0.26895537972450256, 0.04719090461730957, 0.5468040704727173, -0.37479469180107117, -0.09064066410064697, -0.432197242975235, 0.19645196199417114, -0.416841059923172, 0.0030656273011118174, -0.6474254131317139, -0.0328063890337944, -0.3673158288002014, 0.14292499423027039, -0.525107741355896, -0.39393141865730286, -0.3148396909236908, 0.00014305948570836335, 0.5927937030792236, 0.38813573122024536, -0.4523424804210663, 0.2592228353023529, -0.6629987955093384, 0.5276827812194824, 0.10755987465381622, 0.38032180070877075, -0.3139084577560425, -0.8996269106864929, -0.02997385896742344, 0.028263099491596222, -0.21523812413215637, -0.8865625858306885, 0.2748839855194092, 0.16299761831760406, 0.4737789034843445, 0.3979506194591522, -0.05698726698756218, 0.5025558471679688, -0.43082812428474426, 0.8178479075431824, 0.3632028102874756, -0.9717006087303162, 0.80621737241745, -0.5116605758666992, 0.30704817175865173, 0.6083969473838806, 0.1998816728591919, -0.4866308569908142, -0.4204726815223694, -0.8065194487571716, -0.8923982977867126, 0.7702850699424744, 0.4495961666107178, 0.13665325939655304, 0.14129461348056793, 0.06162144988775253, 0.055021319538354874, 0.2927626967430115, -0.8601675629615784, -0.5939256548881531, -0.5945070385932922, -0.4764515459537506, -0.284222811460495, 0.144764706492424, -0.23752890527248383, -0.4987057149410248, 0.9217707514762878, 0.16905388236045837, 0.5282841920852661, 0.33077746629714966, 0.20300649106502533, -0.37939393520355225, 0.12388376891613007, 0.3531740605831146, 0.003071021055802703, -0.3291371166706085, -0.14675460755825043, -0.17276059091091156, -0.49480655789375305, 0.3537062704563141, 0.25709104537963867, -0.4055580198764801, 0.24758097529411316, 0.25444915890693665, 0.8197861313819885, 0.2254408448934555, -0.559760332107544, 0.6065254211425781, -0.15508916974067688, -0.3494490087032318, -0.5712333917617798, 0.33041518926620483, 0.37770766019821167, 0.18445637822151184, 0.30803677439689636, 0.21233439445495605, 0.014755409210920334, -0.43484169244766235, 0.5703197121620178, 0.11109715700149536, -0.7049118280410767, -0.1947464495897293, 1.2016913890838623, -0.10415313392877579, -0.39176231622695923, 0.4024243950843811, -0.04160002991557121, -0.20984163880348206, 0.9010072946548462, 0.714396595954895, 1.146276593208313, -0.1810426115989685, 0.07951953262090683, 0.6043837666511536, 0.1775735318660736, -0.033193692564964294, 0.3975755274295807, -0.1757557988166809, -0.21723364293575287, -0.21630282700061798, -0.9964444637298584, 0.06715983152389526, 0.2539503574371338, -0.5645461082458496, 0.22457893192768097, -0.3501182198524475, -0.41399335861206055, 0.12057046592235565, -0.19243758916854858, -0.639235258102417, 0.20646703243255615, 0.06820227950811386, 1.1172806024551392, -0.9827640652656555, 0.5463229417800903, 0.3481345772743225, -0.6476508378982544, -0.9490683674812317, 0.14910806715488434, 0.27775120735168457, -0.36514395475387573, 0.500617265701294, 0.21872983872890472, 0.13278457522392273, 0.15792761743068695, -0.7922635674476624, -0.9354650378227234, 1.1099122762680054, -0.008293944410979748, -0.6302343010902405, 0.22016949951648712, -0.16338787972927094, 0.6736541390419006, -0.4600778818130493, -0.002664164872840047, 0.740048348903656, 0.7136222124099731, 0.22125732898712158, -0.6254172325134277, -0.07442769408226013, -0.5651730298995972, -0.25897639989852905, -0.10049960762262344, -0.6565073132514954, 1.0859174728393555, -0.04882068186998367, -0.21122987568378448, 0.27793774008750916, 0.6944118142127991, 0.4827517867088318, 0.43980997800827026, 0.8135655522346497, 0.49985960125923157, 0.5774149894714355, -0.5034883618354797, 1.182204008102417, -0.6195203065872192, 0.42717212438583374, 0.8696244359016418, 0.3294830024242401, 0.4213496446609497, 0.35967889428138733, -0.3650101125240326, 0.4089440107345581, 0.8538661599159241, -0.6102625131607056, 0.652847170829773, 0.5884188413619995, -0.16291750967502594, -0.2735497057437897, -0.09390172362327576, -0.5722896456718445, 0.7181906700134277, 0.10872609168291092, -0.7409003973007202, 0.2611790597438812, 0.31068772077560425, -0.04050486907362938, -0.05788452923297882, -0.07964691519737244, 0.6477383971214294, 0.14797618985176086, -0.6960976719856262, 0.41046103835105896, 0.030797390267252922, 0.9223257899284363, -0.4891858398914337, 0.04323232173919678, 0.00475721200928092, -0.009707742370665073, -0.23928745090961456, -0.4469865560531616, -0.028493011370301247, -0.0797543004155159, -0.32342976331710815, -0.23661421239376068, 0.6344586610794067, -0.7712722420692444, -0.5508502125740051, 0.42489615082740784, 0.19405397772789001, 0.05999097600579262, -0.062089405953884125, -0.8228681683540344, 0.07789893448352814, 0.023421138525009155, -0.30611786246299744, 0.04431869089603424, 0.18627525866031647, 0.4382910430431366, 0.4262574315071106, 0.8407291173934937, 0.272695928812027, 0.08112852275371552, 0.1373804658651352, 0.5101091861724854, -0.6344759464263916, -0.5668768286705017, -0.569793164730072, 0.3929257392883301, 0.09744637459516525, -0.1208907812833786, 0.8108417391777039, 0.6168026924133301, 1.0208791494369507, -0.25041884183883667, 0.9831470251083374, -0.33481332659721375, 0.47651979327201843, -0.3682171702384949, 0.8207196593284607, -0.8469787240028381, 0.2540764808654785, -0.5608944296836853, -0.8042060732841492, 0.14459869265556335, 0.5895445346832275, -0.07623489946126938, 0.34423956274986267, 0.18357126414775848, 0.7498083710670471, -0.17535726726055145, 0.15351027250289917, 0.022949816659092903, 0.24861150979995728, 0.20471908152103424, 0.5771576166152954, 0.8118966817855835, -0.5869394540786743, 0.7386541366577148, -0.8324084877967834, -0.09137274324893951, -0.011162642389535904, -0.5443767309188843, -0.7843972444534302, -0.6617695093154907, -0.2979504466056824, -0.5200405716896057, -0.4037961959838867, 1.0887455940246582, 0.5867109298706055, -0.8215333223342896, -0.23535867035388947, 0.07037582993507385, 0.13321833312511444, -0.4208137094974518, -0.3056054711341858, 0.48716434836387634, 0.010275108739733696, -1.1128846406936646, 0.6177735924720764, 0.04069728031754494, 0.3440098166465759, -0.22159406542778015, -0.11983828246593475, -0.06574343889951706, 0.08641994744539261, 0.2847155034542084, 0.13055448234081268, -0.6395003199577332, -0.08764476329088211, 0.00687862653285265, -0.22585394978523254, 0.2068960964679718, 0.6457563042640686, -0.38207775354385376, 0.5120277404785156, 0.8757442831993103, 0.1845628321170807, 0.5847208499908447, 0.18088702857494354, 0.4101046323776245, -0.6993169784545898, -0.04239647090435028, 0.04115569218993187, 0.38088229298591614, 0.25639665126800537, -0.17006151378154755, 0.4254707396030426, 0.623448371887207, -0.5173270106315613, -0.5844343304634094, -0.041122835129499435, -1.0289405584335327, -0.2936760485172272, 1.3345997333526611, 0.0902780145406723, -0.3800960183143616, 0.14584887027740479, -0.3789876699447632, 0.5684551000595093, -0.3299490511417389, 0.650458574295044, 0.37333256006240845, -0.09170777350664139, 0.11792462319135666, -0.6606715321540833, 0.8947079181671143, 0.13559643924236298, -0.4021478593349457, -0.3015744388103485, 0.541918933391571, 0.5042739510536194, 0.5703738927841187, 0.4919772148132324, -0.3836442530155182, 0.495617538690567, 0.2788766920566559, 0.41798803210258484, -0.26065436005592346, -0.19988268613815308, -0.35849258303642273, 0.5087909698486328, -0.47190675139427185, -0.34775444865226746 ]
stabilityai/stable-diffusion-2-1-unclip
stabilityai
"2023-04-12T15:49:10Z"
31,160
221
diffusers
[ "diffusers", "stable-diffusion", "text-to-image", "arxiv:2112.10752", "arxiv:1910.09700", "license:openrail++", "has_space", "diffusers:StableUnCLIPImg2ImgPipeline", "region:us" ]
text-to-image
"2023-03-20T13:11:38Z"
--- license: openrail++ tags: - stable-diffusion - text-to-image pinned: true --- # Stable Diffusion v2-1-unclip Model Card This model card focuses on the model associated with the Stable Diffusion v2-1 model, codebase available [here](https://github.com/Stability-AI/stablediffusion). This `stable-diffusion-2-1-unclip` is a finetuned version of Stable Diffusion 2.1, modified to accept (noisy) CLIP image embedding in addition to the text prompt, and can be used to create image variations (Examples) or can be chained with text-to-image CLIP priors. The amount of noise added to the image embedding can be specified via the noise_level (0 means no noise, 1000 full noise). - Use it with 🧨 [`diffusers`](#examples) ## Model Details - **Developed by:** Robin Rombach, Patrick Esser - **Model type:** Diffusion-based text-to-image generation model - **Language(s):** English - **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/LICENSE-MODEL) - **Model Description:** This is a model that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses a fixed, pretrained text encoder ([OpenCLIP-ViT/H](https://github.com/mlfoundations/open_clip)). - **Resources for more information:** [GitHub Repository](https://github.com/Stability-AI/). - **Cite as:** @InProceedings{Rombach_2022_CVPR, author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn}, title = {High-Resolution Image Synthesis With Latent Diffusion Models}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2022}, pages = {10684-10695} } ## Examples Using the [🤗's Diffusers library](https://github.com/huggingface/diffusers) to run Stable Diffusion UnCLIP 2-1-small in a simple and efficient manner. ```bash pip install diffusers transformers accelerate scipy safetensors ``` Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to DPMSolverMultistepScheduler): ```python from diffusers import DiffusionPipeline from diffusers.utils import load_image import torch pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1-unclip-small", torch_dtype=torch.float16) pipe.to("cuda") # get image url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/stable_unclip/tarsila_do_amaral.png" image = load_image(url) # run image variation image = pipe(image).images[0] ``` ![img](./image.png) # Uses ## Direct Use The model is intended for research purposes only. Possible research areas and tasks include - Safe deployment of models which have the potential to generate harmful content. - Probing and understanding the limitations and biases of generative models. - Generation of artworks and use in design and other artistic processes. - Applications in educational or creative tools. - Research on generative models. Excluded uses are described below. ### Misuse, Malicious Use, and Out-of-Scope Use _Note: This section is originally taken from the [DALLE-MINI model card](https://huggingface.co/dalle-mini/dalle-mini), was used for Stable Diffusion v1, but applies in the same way to Stable Diffusion v2_. The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes. #### Out-of-Scope Use The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model. #### Misuse and Malicious Use Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to: - Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc. - Intentionally promoting or propagating discriminatory content or harmful stereotypes. - Impersonating individuals without their consent. - Sexual content without consent of the people who might see it. - Mis- and disinformation - Representations of egregious violence and gore - Sharing of copyrighted or licensed material in violation of its terms of use. - Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use. ## Limitations and Bias ### Limitations - The model does not achieve perfect photorealism - The model cannot render legible text - The model does not perform well on more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere” - Faces and people in general may not be generated properly. - The model was trained mainly with English captions and will not work as well in other languages. - The autoencoding part of the model is lossy - The model was trained on a subset of the large-scale dataset [LAION-5B](https://laion.ai/blog/laion-5b/), which contains adult, violent and sexual content. To partially mitigate this, we have filtered the dataset using LAION's NFSW detector (see Training section). ### Bias While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. Stable Diffusion was primarily trained on subsets of [LAION-2B(en)](https://laion.ai/blog/laion-5b/), which consists of images that are limited to English descriptions. Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as white and western cultures are often set as the default. Further, the ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts. Stable Diffusion v2 mirrors and exacerbates biases to such a degree that viewer discretion must be advised irrespective of the input or its intent. ## Training **Training Data** The model developers used the following dataset for training the model: - LAION-5B and subsets (details below). The training data is further filtered using LAION's NSFW detector, with a "p_unsafe" score of 0.1 (conservative). For more details, please refer to LAION-5B's [NeurIPS 2022](https://openreview.net/forum?id=M3Y74vmsMcY) paper and reviewer discussions on the topic. ## Environmental Impact **Stable Diffusion v1** **Estimated Emissions** Based on that information, we estimate the following CO2 emissions using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact. - **Hardware Type:** A100 PCIe 40GB - **Hours used:** 200000 - **Cloud Provider:** AWS - **Compute Region:** US-east - **Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid):** 15000 kg CO2 eq. ## Citation @InProceedings{Rombach_2022_CVPR, author = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn}, title = {High-Resolution Image Synthesis With Latent Diffusion Models}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2022}, pages = {10684-10695} } *This model card was written by: Robin Rombach, Patrick Esser and David Ha and is based on the [Stable Diffusion v1](https://github.com/CompVis/stable-diffusion/blob/main/Stable_Diffusion_v1_Model_Card.md) and [DALL-E Mini model card](https://huggingface.co/dalle-mini/dalle-mini).*
[ -0.4399980306625366, -0.7997539639472961, 0.28193041682243347, 0.14592286944389343, -0.24431245028972626, -0.35914936661720276, 0.07794403284788132, -0.43355831503868103, -0.07540367543697357, 0.4183190166950226, -0.3817615807056427, -0.40668952465057373, -0.6301687955856323, -0.1531151682138443, -0.3789138197898865, 0.8689860105514526, -0.03247455880045891, 0.024331049993634224, -0.2286127805709839, -0.01313635241240263, -0.3083435297012329, -0.20164838433265686, -0.8712472915649414, -0.2432226538658142, 0.33726227283477783, 0.09584975242614746, 0.6962090134620667, 0.5113281011581421, 0.453006774187088, 0.2571421265602112, -0.3592490255832672, -0.03661397844552994, -0.5992788076400757, -0.1345924288034439, 0.014903915114700794, -0.17448163032531738, -0.5669589638710022, 0.22019943594932556, 0.6743039488792419, 0.3625948429107666, -0.12228100001811981, 0.063898965716362, 0.1028541550040245, 0.4714706540107727, -0.5365857481956482, -0.1497795581817627, -0.41237735748291016, 0.139150008559227, -0.14208278059959412, 0.2620042562484741, -0.3341163098812103, -0.012444749474525452, 0.0636897087097168, -0.6992434859275818, 0.3641541004180908, -0.29543375968933105, 1.0243570804595947, 0.3985974192619324, -0.2902493178844452, -0.051715657114982605, -0.6814219951629639, 0.627557635307312, -0.6250641942024231, 0.19962549209594727, 0.296051949262619, 0.06648378074169159, -0.14765024185180664, -0.8866701722145081, -0.5941252708435059, -0.01881580427289009, 0.03922300413250923, 0.44037219882011414, -0.36439481377601624, -0.10633131861686707, 0.39231839776039124, 0.14688976109027863, -0.4772365689277649, 0.09612345695495605, -0.5052831172943115, -0.0831754058599472, 0.6517674922943115, 0.13314394652843475, 0.19526463747024536, -0.18074120581150055, -0.47215545177459717, -0.06544708460569382, -0.5581418871879578, 0.029379012063145638, 0.4355849027633667, -0.18667501211166382, -0.5106877088546753, 0.4043542146682739, 0.21253462135791779, 0.43250608444213867, 0.20326055586338043, -0.16506119072437286, 0.2538061738014221, -0.35170242190361023, -0.19261601567268372, -0.41763848066329956, 0.8432826995849609, 0.6530009508132935, -0.13239125907421112, 0.19701679050922394, -0.035261910408735275, 0.09428683668375015, 0.010723120532929897, -1.2280584573745728, -0.4133261442184448, 0.14897900819778442, -0.6155821681022644, -0.5510913729667664, -0.04989779368042946, -1.1239122152328491, -0.2079540193080902, 0.14980663359165192, 0.37476688623428345, -0.20247571170330048, -0.50027996301651, -0.027243809774518013, -0.3900749981403351, 0.13800308108329773, 0.44983842968940735, -0.6137116551399231, 0.22458791732788086, 0.06835278868675232, 1.0471898317337036, -0.3847613036632538, -0.026051167398691177, -0.060801178216934204, 0.09056265652179718, -0.26378414034843445, 0.6150932908058167, -0.35206499695777893, -0.5941890478134155, -0.2751355767250061, 0.32192644476890564, 0.21078082919120789, -0.5259528160095215, 0.5696043372154236, -0.3716784417629242, 0.3341328203678131, -0.01596289500594139, -0.3238156735897064, -0.19930440187454224, -0.11187490820884705, -0.635697603225708, 1.0782235860824585, 0.1415674239397049, -0.8483811616897583, 0.09306877851486206, -0.7002732157707214, -0.23808801174163818, -0.06100635975599289, 0.07166387885808945, -0.6806222796440125, -0.21048414707183838, -0.012388557195663452, 0.34019169211387634, -0.18186068534851074, 0.2804369032382965, -0.33972978591918945, -0.22712749242782593, -0.04444311559200287, -0.635997474193573, 1.0452479124069214, 0.36330434679985046, -0.37334999442100525, -0.013632004149258137, -0.6469983458518982, -0.2745269238948822, 0.4587515592575073, -0.1982031911611557, -0.16068996489048004, -0.13233128190040588, 0.2681436836719513, 0.30337008833885193, 0.12973156571388245, -0.40627521276474, -0.007768905255943537, -0.17027227580547333, 0.590218186378479, 0.718027651309967, 0.26681363582611084, 0.5990331172943115, -0.3334943354129791, 0.5447781085968018, 0.3343374729156494, 0.3242605924606323, -0.1110263466835022, -0.8211209177970886, -0.5397209525108337, -0.29238569736480713, 0.22895987331867218, 0.5075443983078003, -0.5519354939460754, 0.3019718527793884, 0.07621148228645325, -0.6887000203132629, -0.17610736191272736, -0.06379494071006775, 0.22049899399280548, 0.6565086841583252, 0.28308385610580444, -0.3793141841888428, -0.3729866147041321, -0.716722309589386, 0.31187501549720764, -0.07992827892303467, 0.14772143959999084, 0.28952884674072266, 0.7202714085578918, -0.3616759181022644, 0.5807780027389526, -0.6024274230003357, -0.2536439001560211, 0.12141115218400955, 0.11877795308828354, 0.01805981807410717, 0.6635411977767944, 0.7166897058486938, -0.9885378479957581, -0.5894293785095215, -0.3126145899295807, -0.7446531653404236, -0.029476257041096687, 0.0027289874851703644, -0.29656311869621277, 0.37512409687042236, 0.4346933662891388, -0.66776442527771, 0.5904211401939392, 0.6308285593986511, -0.29770150780677795, 0.47441232204437256, -0.40772101283073425, -0.048538148403167725, -1.0123075246810913, 0.19953911006450653, 0.26442283391952515, -0.21344570815563202, -0.5525224804878235, 0.05298273637890816, -0.1509302854537964, -0.25882309675216675, -0.681330680847168, 0.7020017504692078, -0.3764333426952362, 0.3272407650947571, -0.38615113496780396, 0.004655798431485891, 0.1892259567975998, 0.2809236943721771, 0.22266292572021484, 0.6726945638656616, 0.7448927760124207, -0.576767086982727, 0.054210491478443146, 0.22924606502056122, -0.16093240678310394, 0.4628903865814209, -0.8487130403518677, 0.19033855199813843, -0.3388078212738037, 0.327858567237854, -0.8964959383010864, -0.1654326617717743, 0.5264183878898621, -0.3357856571674347, 0.36463120579719543, -0.2786503732204437, -0.42417776584625244, -0.365634948015213, -0.1746342033147812, 0.48722344636917114, 1.0094949007034302, -0.4107183814048767, 0.3821544945240021, 0.5213621258735657, 0.17159676551818848, -0.41530075669288635, -0.7575070261955261, -0.08880461007356644, -0.4094986915588379, -0.7746869921684265, 0.5951075553894043, -0.3021678924560547, -0.1889609694480896, 0.111793652176857, 0.14813712239265442, -0.10716379433870316, 0.04833115264773369, 0.46151041984558105, 0.2610415518283844, 0.11924610286951065, -0.1231352910399437, 0.1798441857099533, -0.21321554481983185, -0.01454711239784956, -0.04922852665185928, 0.3812521696090698, 0.09561396390199661, -0.007357203401625156, -0.6594107151031494, 0.4692845046520233, 0.5930026769638062, 0.018513821065425873, 0.7268774509429932, 0.8617180585861206, -0.5057048201560974, 0.023616641759872437, -0.21931800246238708, -0.18162080645561218, -0.47594308853149414, 0.3764491677284241, -0.12533366680145264, -0.5453590154647827, 0.59185791015625, -0.03141375258564949, -0.018796009942889214, 0.6931430101394653, 0.6881131529808044, -0.20876869559288025, 1.0436129570007324, 0.5433337092399597, 0.3582260310649872, 0.6506956815719604, -0.7305728793144226, -0.06167355552315712, -0.8823521137237549, -0.25216659903526306, -0.22852835059165955, -0.21329456567764282, -0.5117484927177429, -0.6315512657165527, 0.3899938762187958, 0.2838597297668457, -0.24071906507015228, 0.1799333691596985, -0.5887162685394287, 0.31408339738845825, 0.2578740119934082, 0.16791097819805145, 0.0063551245257258415, 0.17383264005184174, 0.08380090445280075, -0.1850874274969101, -0.7157099843025208, -0.5999875664710999, 0.9276925921440125, 0.48605087399482727, 0.8238738775253296, 0.06268192082643509, 0.4635385572910309, 0.44704148173332214, 0.28837481141090393, -0.3938814103603363, 0.5608113408088684, -0.41060760617256165, -0.6314491629600525, -0.1106967180967331, -0.2231781780719757, -0.92070472240448, 0.19327807426452637, -0.2604708671569824, -0.42195606231689453, 0.4676347076892853, 0.17671939730644226, -0.22318895161151886, 0.3541302978992462, -0.6995416283607483, 0.9285412430763245, -0.09464307129383087, -0.7074553966522217, -0.15664756298065186, -0.6337859034538269, 0.29726237058639526, -0.00285273022018373, 0.2455044835805893, -0.12160544842481613, -0.09891331940889359, 0.8836487531661987, -0.35621678829193115, 0.9548696279525757, -0.41839900612831116, 0.038922473788261414, 0.5098009705543518, -0.0974373146891594, 0.4114970862865448, 0.15653371810913086, -0.15787284076213837, 0.5367212891578674, 0.09229490160942078, -0.37166571617126465, -0.2978854775428772, 0.6827973127365112, -0.8989297747612, -0.4694104492664337, -0.4241780936717987, -0.3365733325481415, 0.6006178855895996, 0.24108023941516876, 0.7385793328285217, 0.3321937024593353, -0.23829951882362366, -0.05634414777159691, 0.6628157496452332, -0.2879384160041809, 0.4506619870662689, 0.2870776057243347, -0.2962581217288971, -0.5475659966468811, 0.7187668085098267, 0.2786789834499359, 0.5187942981719971, -0.10723093897104263, 0.26678574085235596, -0.1392260640859604, -0.4953038692474365, -0.5343097448348999, 0.2090015709400177, -0.7544864416122437, -0.1639159619808197, -0.7095365524291992, -0.30240193009376526, -0.40355080366134644, -0.13280698657035828, -0.3920978307723999, -0.28768089413642883, -0.8018907308578491, 0.11416202038526535, 0.24481923878192902, 0.5200467109680176, -0.3584709167480469, 0.3657112121582031, -0.34094709157943726, 0.2938976287841797, 0.12802830338478088, 0.16495072841644287, 0.03468526899814606, -0.7034440040588379, -0.13173675537109375, 0.19676966965198517, -0.6602348685264587, -0.9109789133071899, 0.36848753690719604, 0.09462089836597443, 0.49507519602775574, 0.4757111072540283, -0.0019600135274231434, 0.5991559028625488, -0.37440812587738037, 1.039455533027649, 0.24336449801921844, -0.6670897006988525, 0.5869417190551758, -0.3798781931400299, 0.12384798377752304, 0.24706019461154938, 0.5083050727844238, -0.214802086353302, -0.2666724920272827, -0.8159622550010681, -0.8074451684951782, 0.5433889627456665, 0.3190086781978607, 0.29378607869148254, -0.11746254563331604, 0.6317123174667358, 0.03100757673382759, -0.012380236759781837, -0.9466500878334045, -0.49330589175224304, -0.2973870038986206, 0.15341347455978394, 0.12061610072851181, -0.3646170198917389, -0.16474388539791107, -0.5597089529037476, 0.8743285536766052, 0.0856238603591919, 0.5498867034912109, 0.3457286059856415, 0.12987777590751648, -0.3683452606201172, -0.25480785965919495, 0.5508996248245239, 0.3286551535129547, -0.2104414850473404, 0.0020306650549173355, 0.0006701327511109412, -0.505685567855835, 0.2175925374031067, 0.058068275451660156, -0.7284268736839294, 0.022968808189034462, -0.0417151041328907, 0.7674179673194885, -0.2345867156982422, -0.4619978070259094, 0.646068274974823, -0.0965854600071907, -0.3921073377132416, -0.5163006782531738, 0.12519006431102753, 0.05602767691016197, 0.22329887747764587, 0.04460511356592178, 0.5420525670051575, 0.16718585789203644, -0.37244537472724915, 0.11595352739095688, 0.5896293520927429, -0.3679973781108856, -0.3358911871910095, 1.034778356552124, 0.1503680795431137, -0.3230465352535248, 0.5820490717887878, -0.48660969734191895, -0.25767213106155396, 0.6907133460044861, 0.7339808344841003, 0.7387418150901794, -0.13247820734977722, 0.3868408203125, 0.6903467774391174, 0.2360578328371048, -0.2047506719827652, 0.1300792694091797, 0.22263211011886597, -0.6775171756744385, -0.041754696518182755, -0.376489520072937, -0.0788169577717781, 0.18315701186656952, -0.5057187080383301, 0.5286318063735962, -0.5330082774162292, -0.41873618960380554, -0.020763864740729332, -0.2394118458032608, -0.5331031680107117, 0.05603348836302757, 0.24664084613323212, 0.7497910857200623, -1.0304104089736938, 0.7704167366027832, 0.6470377445220947, -0.5527185797691345, -0.3925923705101013, 0.025746311992406845, -0.07220225781202316, -0.3256402015686035, 0.469987690448761, 0.11413212865591049, -0.004317190032452345, 0.062346816062927246, -0.8489350080490112, -0.8547022938728333, 1.2239205837249756, 0.3530955910682678, -0.27883991599082947, 0.04676749184727669, -0.18864943087100983, 0.5992905497550964, -0.4484366476535797, 0.2682606875896454, 0.2575216293334961, 0.40940791368484497, 0.4040504992008209, -0.445294588804245, 0.11596126854419708, -0.3069107234477997, 0.27105191349983215, -0.04677173122763634, -0.9686543345451355, 0.9245202541351318, -0.3825833201408386, -0.42275482416152954, 0.2951726019382477, 0.5724247694015503, 0.16659565269947052, 0.33910858631134033, 0.41122180223464966, 0.7939981818199158, 0.582240641117096, -0.03485081344842911, 0.9072780013084412, -0.10714909434318542, 0.3879064917564392, 0.8134170770645142, -0.12155993282794952, 0.7392327785491943, 0.4517800211906433, -0.2542717158794403, 0.606966495513916, 0.610659122467041, -0.4130936563014984, 0.7666232585906982, 0.016347479075193405, -0.1868758499622345, -0.08183127641677856, -0.16843831539154053, -0.43811389803886414, 0.15366625785827637, 0.2663773000240326, -0.5134636759757996, -0.1581025868654251, 0.15216323733329773, 0.08342137932777405, -0.19570384919643402, -0.04535709694027901, 0.5310587882995605, 0.060597147792577744, -0.39404159784317017, 0.5813424587249756, 0.2575687766075134, 0.8096492886543274, -0.43552884459495544, -0.21109633147716522, -0.06870969384908676, 0.10091286897659302, -0.26976293325424194, -0.7453703284263611, 0.4921718239784241, -0.048666711896657944, -0.2739361524581909, -0.2137143462896347, 0.7585930228233337, -0.2942878305912018, -0.6334013342857361, 0.40499168634414673, 0.21734942495822906, 0.3364063501358032, 0.12697064876556396, -0.9825247526168823, 0.17587830126285553, -0.026047585532069206, -0.2350529581308365, 0.34241077303886414, 0.07739391177892685, 0.12205112725496292, 0.4301528036594391, 0.5838388204574585, -0.0889817401766777, 0.03922589123249054, -0.1499086171388626, 0.7287567257881165, -0.24745801091194153, -0.30526524782180786, -0.7340475916862488, 0.6942235231399536, -0.09296761453151703, -0.2832862436771393, 0.6404410004615784, 0.6097961664199829, 0.6907826066017151, -0.05005825310945511, 0.7508682012557983, -0.2755178213119507, -0.025911767035722733, -0.3986150026321411, 0.7450315952301025, -0.7391909956932068, 0.15912003815174103, -0.3371167480945587, -0.8297244906425476, -0.11720315366983414, 0.763774573802948, -0.21555495262145996, 0.19736240804195404, 0.41974836587905884, 0.9490149617195129, -0.05785354971885681, -0.18310658633708954, 0.3248481750488281, 0.29744216799736023, 0.391604483127594, 0.2649235129356384, 0.6534406542778015, -0.7277089357376099, 0.36057090759277344, -0.5061585903167725, -0.2776865065097809, 0.05350130796432495, -0.9047189354896545, -0.7938669323921204, -0.6412892937660217, -0.7839969992637634, -0.7034896612167358, -0.09058114141225815, 0.43711400032043457, 0.8772940635681152, -0.4549361765384674, -0.07199285924434662, -0.2512751817703247, 0.019843455404043198, -0.14114531874656677, -0.2707501947879791, 0.36007243394851685, 0.21281377971172333, -0.8244920372962952, -0.02470996603369713, 0.24088074266910553, 0.582541823387146, -0.5015577673912048, -0.2273835390806198, -0.21292157471179962, -0.10104859620332718, 0.49693670868873596, 0.12048552930355072, -0.6302043795585632, -0.0638202428817749, -0.1299150586128235, -0.008281225338578224, 0.14630043506622314, 0.29403308033943176, -0.558484673500061, 0.3389996290206909, 0.4702971577644348, 0.1289847195148468, 0.773255467414856, -0.07239634543657303, 0.10668396204710007, -0.45723211765289307, 0.37151700258255005, 0.07631274312734604, 0.352053701877594, 0.27170467376708984, -0.5420385003089905, 0.44798022508621216, 0.6503235697746277, -0.7026041746139526, -0.7558278441429138, 0.2328905612230301, -1.087388277053833, -0.3027034103870392, 1.2790545225143433, -0.16420312225818634, -0.2894042432308197, 0.043176595121622086, -0.2836166322231293, 0.21729661524295807, -0.35394373536109924, 0.5104604959487915, 0.5185533761978149, -0.1376940906047821, -0.45937982201576233, -0.5444292426109314, 0.4173840284347534, 0.14917542040348053, -0.582836925983429, -0.14660964906215668, 0.570160984992981, 0.6150792837142944, 0.2166651040315628, 0.7995226383209229, -0.35751208662986755, 0.1665760725736618, 0.19078946113586426, 0.051539886742830276, -0.04303719848394394, -0.23501527309417725, -0.45432043075561523, 0.05507393553853035, -0.1973249614238739, 0.01909700036048889 ]
upstage/SOLAR-0-70b-16bit
upstage
"2023-09-13T09:14:02Z"
31,082
233
transformers
[ "transformers", "pytorch", "llama", "text-generation", "upstage", "llama-2", "instruct", "instruction", "en", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-30T01:10:53Z"
--- language: - en tags: - upstage - llama-2 - instruct - instruction pipeline_tag: text-generation --- # Updates Solar, a new bot created by Upstage, is now available on **Poe**. As a top-ranked model on the HuggingFace Open LLM leaderboard, and a fine tune of Llama 2, Solar is a great example of the progress enabled by open source. Try now at https://poe.com/Solar-0-70b # SOLAR-0-70b-16bit model card The model name has been changed from LLaMa-2-70b-instruct-v2 to SOLAR-0-70b-16bit ## Model Details * **Developed by**: [Upstage](https://en.upstage.ai) * **Backbone Model**: [LLaMA-2](https://github.com/facebookresearch/llama/tree/main) * **Language(s)**: English * **Library**: [HuggingFace Transformers](https://github.com/huggingface/transformers) * **License**: Fine-tuned checkpoints is licensed under the Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/)) * **Where to send comments**: Instructions on how to provide feedback or comments on a model can be found by opening an issue in the [Hugging Face community's model repository](https://huggingface.co/upstage/Llama-2-70b-instruct-v2/discussions) * **Contact**: For questions and comments about the model, please email [contact@upstage.ai](mailto:contact@upstage.ai) ## Dataset Details ### Used Datasets - Orca-style dataset - Alpaca-style dataset - No other dataset was used except for the dataset mentioned above - No benchmark test set or the training set are used ### Prompt Template ``` ### System: {System} ### User: {User} ### Assistant: {Assistant} ``` ## Usage - The followings are tested on A100 80GB - Our model can handle up to 10k+ input tokens, thanks to the `rope_scaling` option ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer tokenizer = AutoTokenizer.from_pretrained("upstage/Llama-2-70b-instruct-v2") model = AutoModelForCausalLM.from_pretrained( "upstage/Llama-2-70b-instruct-v2", device_map="auto", torch_dtype=torch.float16, load_in_8bit=True, rope_scaling={"type": "dynamic", "factor": 2} # allows handling of longer inputs ) prompt = "### User:\nThomas is healthy, but he has to go to the hospital. What could be the reasons?\n\n### Assistant:\n" inputs = tokenizer(prompt, return_tensors="pt").to(model.device) del inputs["token_type_ids"] streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) output = model.generate(**inputs, streamer=streamer, use_cache=True, max_new_tokens=float('inf')) output_text = tokenizer.decode(output[0], skip_special_tokens=True) ``` ## Hardware and Software * **Hardware**: We utilized an A100x8 * 4 for training our model * **Training Factors**: We fine-tuned this model using a combination of the [DeepSpeed library](https://github.com/microsoft/DeepSpeed) and the [HuggingFace Trainer](https://huggingface.co/docs/transformers/main_classes/trainer) / [HuggingFace Accelerate](https://huggingface.co/docs/accelerate/index) ## Evaluation Results ### Overview - We conducted a performance evaluation following the tasks being evaluated on the [Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard). We evaluated our model on four benchmark datasets, which include `ARC-Challenge`, `HellaSwag`, `MMLU`, and `TruthfulQA` We used the [lm-evaluation-harness repository](https://github.com/EleutherAI/lm-evaluation-harness), specifically commit [b281b0921b636bc36ad05c0b0b0763bd6dd43463](https://github.com/EleutherAI/lm-evaluation-harness/tree/b281b0921b636bc36ad05c0b0b0763bd6dd43463). - We used [MT-bench](https://github.com/lm-sys/FastChat/tree/main/fastchat/llm_judge), a set of challenging multi-turn open-ended questions, to evaluate the models ### Main Results | Model | H4(Avg) | ARC | HellaSwag | MMLU | TruthfulQA | | MT_Bench | |--------------------------------------------------------------------|----------|----------|----------|------|----------|-|-------------| | **[Llama-2-70b-instruct-v2](https://huggingface.co/upstage/Llama-2-70b-instruct-v2)**(***Ours***, ***Open LLM Leaderboard***) | **73** | **71.1** | **87.9** | **70.6** | **62.2** | | **7.44063** | | [Llama-2-70b-instruct](https://huggingface.co/upstage/Llama-2-70b-instruct) (Ours, Open LLM Leaderboard) | 72.3 | 70.9 | 87.5 | 69.8 | 61 | | 7.24375 | | [llama-65b-instruct](https://huggingface.co/upstage/llama-65b-instruct) (Ours, Open LLM Leaderboard) | 69.4 | 67.6 | 86.5 | 64.9 | 58.8 | | | | Llama-2-70b-hf | 67.3 | 67.3 | 87.3 | 69.8 | 44.9 | | | | [llama-30b-instruct-2048](https://huggingface.co/upstage/llama-30b-instruct-2048) (Ours, Open LLM Leaderboard) | 67.0 | 64.9 | 84.9 | 61.9 | 56.3 | | | | [llama-30b-instruct](https://huggingface.co/upstage/llama-30b-instruct) (Ours, Open LLM Leaderboard) | 65.2 | 62.5 | 86.2 | 59.4 | 52.8 | | | | llama-65b | 64.2 | 63.5 | 86.1 | 63.9 | 43.4 | | | | falcon-40b-instruct | 63.4 | 61.6 | 84.3 | 55.4 | 52.5 | | | ### Scripts for H4 Score Reproduction - Prepare evaluation environments: ``` # clone the repository git clone https://github.com/EleutherAI/lm-evaluation-harness.git # check out the specific commit git checkout b281b0921b636bc36ad05c0b0b0763bd6dd43463 # change to the repository directory cd lm-evaluation-harness ``` ## Contact Us ### About Upstage - [Upstage](https://en.upstage.ai) is a company specialized in Large Language Models (LLMs) and AI. We will help you build private LLMs and related applications. If you have a dataset to build domain specific LLMs or make LLM applications, please contact us at ► [click here to contact](https://www.upstage.ai/private-llm?utm_source=huggingface&utm_medium=link&utm_campaign=privatellm) - As of August 1st, our 70B model has reached the top spot in openLLM rankings, marking itself as the current leading performer globally.
[ -0.3542400896549225, -0.5888550877571106, 0.3383934199810028, 0.3994196951389313, -0.4122300148010254, 0.1369759738445282, -0.17391528189182281, -0.5386595129966736, 0.41570186614990234, 0.18792325258255005, -0.6659128665924072, -0.578259289264679, -0.7331864833831787, 0.03577439859509468, -0.34949666261672974, 1.0678797960281372, -0.2683769762516022, -0.18599748611450195, -0.13876855373382568, -0.29404938220977783, -0.33709394931793213, -0.4860653579235077, -0.6408460736274719, -0.5366247296333313, 0.27882710099220276, 0.39908549189567566, 0.6740322709083557, 0.4464506208896637, 0.5945408344268799, 0.38071489334106445, -0.3858529329299927, 0.21499347686767578, -0.43931129574775696, -0.08305790275335312, 0.2461501806974411, -0.4433974325656891, -0.8616383075714111, -0.011670180596411228, 0.7425053715705872, 0.2617836594581604, -0.41415131092071533, 0.4939364790916443, 0.07847411185503006, 0.7190050482749939, -0.2920183539390564, 0.17409823834896088, -0.49633103609085083, 0.07593762129545212, -0.25347116589546204, 0.04567119479179382, -0.042815614491701126, -0.33767634630203247, -0.16736723482608795, -0.5538153052330017, -0.12128834426403046, 0.014892274513840675, 1.2063335180282593, 0.3867102563381195, -0.08074620366096497, -0.10463595390319824, -0.40489864349365234, 0.6630115509033203, -0.7684871554374695, 0.3015821874141693, 0.25178584456443787, 0.20733362436294556, -0.12238620221614838, -0.7609215378761292, -0.618235170841217, -0.3047184646129608, -0.013270705007016659, 0.2013520449399948, -0.41126498579978943, -0.16146832704544067, 0.26609450578689575, 0.5627898573875427, -0.32945334911346436, 0.3702363073825836, -0.3239624500274658, -0.17135825753211975, 0.9393325448036194, 0.28638705611228943, 0.2392624020576477, -0.25514569878578186, -0.5958313345909119, -0.2837907373905182, -0.796558678150177, 0.48494836688041687, 0.29998892545700073, 0.050947416573762894, -0.5555207133293152, 0.7345514893531799, -0.145411416888237, 0.4712909162044525, 0.27308523654937744, -0.15513662993907928, 0.5399606227874756, -0.43141621351242065, -0.4234740436077118, -0.1457672268152237, 0.9008156061172485, 0.5682904124259949, 0.07424232363700867, 0.2500632107257843, -0.3096271753311157, 0.06332468241453171, -0.1060093492269516, -0.997509241104126, -0.0034442998003214598, 0.3300073742866516, -0.3802017569541931, -0.4292205274105072, -0.1394282728433609, -0.7061479091644287, -0.3889371454715729, -0.024859093129634857, 0.3351535201072693, -0.26382747292518616, -0.31409934163093567, 0.19500231742858887, 0.08350050449371338, 0.3521721661090851, 0.5347669720649719, -0.5586657524108887, 0.2574646770954132, 0.43076464533805847, 0.9339157938957214, -0.1241360604763031, -0.3733268976211548, -0.2725147008895874, -0.2614157199859619, -0.09942369163036346, 0.6601238250732422, -0.24476468563079834, -0.41523268818855286, -0.296545147895813, 0.15124350786209106, -0.3115959167480469, -0.5507869124412537, 0.6376816034317017, -0.32096758484840393, 0.2071499526500702, -0.2565773129463196, -0.5746921300888062, -0.157347172498703, 0.2468085139989853, -0.419562965631485, 1.4029765129089355, 0.21506863832473755, -0.7065394520759583, 0.09418566524982452, -0.6998918056488037, -0.02128118835389614, -0.18664413690567017, -0.032466672360897064, -0.7398257851600647, -0.12364743649959564, 0.28349027037620544, 0.6228631138801575, -0.4313521385192871, 0.18201160430908203, -0.28071707487106323, -0.48149532079696655, 0.19889800250530243, -0.0584171861410141, 0.9098812937736511, 0.08129458129405975, -0.5087899565696716, 0.3818172514438629, -0.890771210193634, -0.09167420119047165, 0.6510288119316101, -0.37151649594306946, 0.0955594927072525, -0.2527799606323242, -0.11181887984275818, 0.19810155034065247, 0.2957010567188263, -0.6967218518257141, 0.3674134314060211, -0.34134000539779663, 0.4376693069934845, 1.0440495014190674, -0.1672676056623459, 0.2895868718624115, -0.5667695999145508, 0.5574743151664734, -0.033978432416915894, 0.39589083194732666, 0.05906146019697189, -0.7613427042961121, -0.9797009825706482, -0.4206624925136566, 0.16053169965744019, 0.5829000473022461, -0.32059237360954285, 0.5921496748924255, -0.14349709451198578, -0.8054605722427368, -0.8518140912055969, 0.23960815370082855, 0.5518452525138855, 0.5315611958503723, 0.3805016279220581, -0.579585075378418, -0.5306403636932373, -0.8398714065551758, 0.09817332029342651, -0.1597602516412735, -0.033058296889066696, 0.47509145736694336, 0.7806227207183838, -0.4983155429363251, 0.5885725021362305, -0.49172070622444153, -0.3629772663116455, -0.3456171751022339, -0.2104000747203827, 0.5853437185287476, 0.4529784619808197, 0.6981526017189026, -0.48832136392593384, -0.4096454083919525, -0.10074179619550705, -0.836437463760376, -0.031008299440145493, 0.07834267616271973, -0.23555155098438263, 0.3454074561595917, 0.12149902433156967, -1.0285601615905762, 0.5785205960273743, 0.6584654450416565, -0.4913656413555145, 0.7145066857337952, -0.1569538116455078, 0.09485634416341782, -1.1122969388961792, 0.16579493880271912, -0.07903708517551422, -0.07230160385370255, -0.40617576241493225, 0.14541085064411163, 0.008527792990207672, 0.041343022137880325, -0.556615948677063, 0.7957427501678467, -0.40882837772369385, -0.18913626670837402, -0.04215051606297493, 0.22261126339435577, 0.08320270478725433, 0.6877431273460388, -0.19902417063713074, 0.7511106133460999, 0.5790461301803589, -0.44612064957618713, 0.4177699387073517, 0.42162925004959106, -0.4880982041358948, 0.5016115307807922, -0.8561935424804688, 0.281188040971756, 0.1389116495847702, 0.4199081063270569, -1.0567009449005127, -0.36519888043403625, 0.41606152057647705, -0.49561965465545654, 0.41551849246025085, 0.13249483704566956, -0.5239710807800293, -0.74004065990448, -0.6399455666542053, 0.27067995071411133, 0.7195852994918823, -0.6731705069541931, 0.28661373257637024, 0.4455183446407318, 0.13235940039157867, -0.7079135179519653, -0.5975567698478699, -0.14164632558822632, -0.3226424753665924, -0.8276833295822144, 0.45629221200942993, -0.3297267556190491, -0.2269143909215927, -0.1191597506403923, -0.1953037828207016, 0.1584930717945099, 0.19664764404296875, 0.38418087363243103, 0.4286099672317505, -0.07144887000322342, -0.17259085178375244, -0.1321878880262375, -0.02255992963910103, -0.06368982791900635, 0.18599726259708405, 0.6113640666007996, -0.40860071778297424, -0.3333759605884552, -0.7781405448913574, -0.13894379138946533, 0.6414291262626648, -0.12960833311080933, 0.6901465058326721, 0.5804033875465393, -0.2963058650493622, 0.028512489050626755, -0.5947005152702332, -0.051783449947834015, -0.49725547432899475, 0.26923704147338867, -0.3181542754173279, -0.9464164972305298, 0.8274545073509216, 0.1207994595170021, 0.19955864548683167, 0.6412338614463806, 0.814284086227417, -0.09341955184936523, 0.8847440481185913, 0.5706776976585388, -0.15476886928081512, 0.4048493802547455, -0.6213953495025635, -0.18081745505332947, -1.1849877834320068, -0.4044250547885895, -0.36968451738357544, -0.40251898765563965, -0.6146929264068604, -0.5799412131309509, 0.442058265209198, 0.23208393156528473, -0.5596435070037842, 0.5277779698371887, -0.6998236775398254, 0.17711344361305237, 0.31368646025657654, 0.26471149921417236, 0.2545245587825775, -0.07718591392040253, -0.3040345013141632, 0.07271455228328705, -0.5698832869529724, -0.3327975869178772, 1.1771153211593628, 0.5777576565742493, 0.6674742102622986, 0.023566940799355507, 0.7011500000953674, 0.19484923779964447, 0.5473417639732361, -0.5022059679031372, 0.7286932468414307, 0.21894998848438263, -0.5461620688438416, -0.17511515319347382, -0.28625792264938354, -0.9134450554847717, 0.40935900807380676, -0.0689537525177002, -0.9943891167640686, 0.02533172070980072, 0.041538361459970474, -0.41374537348747253, 0.49991393089294434, -0.49395284056663513, 0.7008997201919556, -0.3497110903263092, -0.4335006773471832, -0.07862112671136856, -0.7202566862106323, 0.6026941537857056, -0.0695229172706604, 0.16949503123760223, -0.3559531569480896, -0.078382708132267, 0.8732404708862305, -0.7270686030387878, 0.8940486311912537, -0.22535863518714905, -0.12984375655651093, 0.4243927597999573, -0.049669940024614334, 0.7075302004814148, -0.014266564510762691, -0.3596499562263489, 0.43126019835472107, -0.22928574681282043, -0.30388450622558594, -0.3787938952445984, 0.7713639140129089, -1.0812081098556519, -0.6036847829818726, -0.4472144842147827, -0.3513043224811554, 0.03735180199146271, 0.017452504485845566, 0.28012263774871826, 0.14000117778778076, 0.020228255540132523, 0.1117778867483139, 0.43972721695899963, -0.40611469745635986, 0.550115704536438, 0.3976406455039978, -0.389875203371048, -0.5373528599739075, 0.6999024748802185, 0.004721947014331818, 0.21039268374443054, 0.14040414988994598, 0.1570899337530136, -0.3993643522262573, -0.43842437863349915, -0.804301381111145, 0.4663486182689667, -0.5476183295249939, -0.4790635108947754, -0.5784446001052856, -0.3212813138961792, -0.23127542436122894, -0.04879045858979225, -0.6000881195068359, -0.47478219866752625, -0.4118625521659851, -0.2705865204334259, 0.6027142405509949, 0.8127851486206055, -0.06132930889725685, 0.3593331575393677, -0.5669856071472168, 0.16174472868442535, 0.12012629956007004, 0.38666221499443054, 0.04248761013150215, -0.9596623778343201, -0.10652173310518265, -0.04059083014726639, -0.5487850904464722, -0.883701741695404, 0.44278833270072937, 0.12189443409442902, 0.47544756531715393, 0.07443930953741074, -0.22656124830245972, 0.8804637789726257, -0.26546886563301086, 0.8374205231666565, 0.3121459484100342, -0.8461287021636963, 0.5934717059135437, -0.27390462160110474, 0.19083499908447266, 0.40473663806915283, 0.43281927704811096, -0.310926616191864, -0.28043898940086365, -0.7184451818466187, -0.8858662247657776, 0.7913685441017151, 0.4862549602985382, -0.05615992471575737, 0.31783854961395264, 0.4359232187271118, -0.05731159448623657, 0.32117557525634766, -0.9006414413452148, -0.48563021421432495, -0.007631829474121332, 0.04741360992193222, -0.16003486514091492, -0.25758060812950134, -0.06452080607414246, -0.711031436920166, 0.7157155275344849, 0.03425518050789833, 0.4353983998298645, 0.3388751745223999, -0.04698636382818222, -0.4065389335155487, 0.020237592980265617, 0.6164500713348389, 0.572208046913147, -0.3605603277683258, -0.4198390245437622, 0.36541852355003357, -0.4289358854293823, 0.13865090906620026, 0.3943983018398285, -0.20483709871768951, -0.14958234131336212, 0.31938907504081726, 1.004712462425232, 0.516124963760376, -0.5218437314033508, 0.6106733083724976, -0.1235986202955246, -0.15368372201919556, -0.37873440980911255, 0.021637020632624626, 0.2664596736431122, 0.4155493974685669, 0.20236536860466003, 0.025748277083039284, -0.2529085874557495, -0.4783920645713806, 0.14771373569965363, 0.47511833906173706, -0.25170060992240906, -0.5132757425308228, 0.9777251482009888, 0.2099667340517044, -0.3404301106929779, 0.5880756378173828, -0.0988519936800003, -0.5775982141494751, 0.8155229091644287, 0.35008901357650757, 0.8102430701255798, -0.3917080760002136, 0.11248407512903214, 0.5244913697242737, 0.31289777159690857, -0.021495917811989784, 0.4116258919239044, -0.09017190337181091, -0.6234608292579651, -0.24053120613098145, -1.0562330484390259, -0.3923589587211609, 0.08739960193634033, -0.5008031725883484, 0.42032670974731445, -0.38199013471603394, -0.23877178132534027, -0.12029340863227844, 0.3471686542034149, -0.8588759303092957, -0.003118103137239814, 0.22748450934886932, 1.1140308380126953, -0.5651492476463318, 0.8637186884880066, 0.6759127974510193, -0.5580962896347046, -0.8901890516281128, -0.38278886675834656, 0.14936788380146027, -1.318326711654663, 0.4661777913570404, 0.31996986269950867, -0.065028615295887, -0.008159779943525791, -0.6553909778594971, -1.0163477659225464, 1.5893614292144775, 0.33379167318344116, -0.6445082426071167, 0.08161621540784836, 0.050014253705739975, 0.6432775259017944, -0.39824944734573364, 0.6820448040962219, 0.5281906127929688, 0.5786943435668945, 0.11671420931816101, -1.2373417615890503, 0.3338282108306885, -0.39280855655670166, -0.13519562780857086, 0.08129404485225677, -1.2279281616210938, 1.010757327079773, -0.5141624808311462, -0.14478789269924164, 0.37364131212234497, 0.6310958862304688, 0.7557607889175415, 0.48932525515556335, 0.49770718812942505, 0.9926565885543823, 0.8019351363182068, -0.0646779015660286, 1.341314435005188, -0.21317394077777863, 0.58751380443573, 0.7873526811599731, -0.3322013318538666, 0.7476496696472168, 0.1916959136724472, -0.47765251994132996, 0.6764780282974243, 0.9374167919158936, 0.0247062835842371, 0.20615419745445251, 0.3688736855983734, -0.04187608137726784, -0.11064432561397552, -0.09176754206418991, -0.5890291929244995, 0.46527111530303955, 0.16297504305839539, -0.291677325963974, -0.12904712557792664, -0.16869500279426575, 0.3048539161682129, -0.20194406807422638, -0.274919718503952, 0.5086950063705444, 0.2243121713399887, -0.5192036032676697, 0.9043679237365723, -0.04904097318649292, 0.9314344525337219, -0.6057380437850952, 0.08577534556388855, -0.5053603053092957, 0.30000436305999756, -0.28514307737350464, -0.7547101974487305, 0.006933585740625858, 0.1168198511004448, 0.1240076944231987, -0.2643384635448456, 0.6625428199768066, -0.12215840816497803, -0.540802538394928, 0.6316691637039185, 0.5073921084403992, 0.3830607533454895, -0.00018908256606664509, -1.1454328298568726, 0.431985080242157, 0.04550681635737419, -0.7763680815696716, 0.5744066834449768, 0.11312397569417953, -0.025011681020259857, 0.8715325593948364, 0.6513442993164062, -0.0336860790848732, 0.03195451572537422, 0.031642623245716095, 1.2448465824127197, -0.7118788361549377, -0.1558362990617752, -0.9065543413162231, 0.6266740560531616, -0.09466735273599625, -0.5645074248313904, 0.8887113928794861, 0.5526890158653259, 0.8165366649627686, 0.18574991822242737, 0.33157461881637573, -0.19010807573795319, 0.3940274715423584, -0.29046911001205444, 0.815034806728363, -0.9635578989982605, 0.3249460756778717, -0.28200483322143555, -0.8614115118980408, -0.06160515919327736, 0.4103199243545532, -0.0571671761572361, 0.1100442036986351, 0.4771745800971985, 0.8371084928512573, 0.07546177506446838, -0.061716143041849136, 0.06933943927288055, 0.41141343116760254, 0.1905720978975296, 0.7952204346656799, 0.9591984748840332, -0.6739327311515808, 0.4408246874809265, -0.5566274523735046, -0.3571741282939911, -0.2575569152832031, -0.7266668081283569, -0.8240653872489929, -0.4250519275665283, -0.23408396542072296, -0.38965365290641785, -0.0966610312461853, 0.999432384967804, 0.6156793236732483, -0.6156871318817139, -0.46773532032966614, 0.12750795483589172, 0.23068684339523315, -0.09471054375171661, -0.2551003694534302, 0.518376886844635, 0.0682377740740776, -0.7885830998420715, 0.4480675160884857, 0.20808474719524384, 0.08600623160600662, -0.25974327325820923, -0.3040276765823364, -0.30907297134399414, -0.029403621330857277, 0.6718446016311646, 0.34465491771698, -0.7164296507835388, -0.3251972496509552, 0.08423396199941635, -0.1039845272898674, 0.28330445289611816, 0.32199594378471375, -0.6338381171226501, 0.15597674250602722, 0.34073662757873535, 0.4119427502155304, 0.7315946817398071, 0.0856122076511383, 0.11410846561193466, -0.5935556292533875, 0.22107170522212982, 0.06771405786275864, 0.548720121383667, 0.40376895666122437, -0.4027789831161499, 0.8284764885902405, 0.39441701769828796, -0.7480872273445129, -1.1545441150665283, -0.05553922802209854, -1.1615195274353027, -0.03812030702829361, 1.1487977504730225, -0.18606063723564148, -0.5074801445007324, 0.4345439374446869, -0.24812054634094238, 0.21150167286396027, -0.48261263966560364, 0.7215599417686462, 0.5043119192123413, -0.4559035301208496, -0.07814718037843704, -0.5293181538581848, 0.3961464464664459, 0.5022423267364502, -0.8799758553504944, -0.18409226834774017, 0.29696357250213623, 0.34555235505104065, 0.12706327438354492, 0.9646995067596436, -0.11118875443935394, 0.2041221708059311, -0.29480019211769104, 0.2103615552186966, -0.16327258944511414, -0.14823022484779358, -0.40881243348121643, -0.019747352227568626, -0.10212474316358566, -0.25201278924942017 ]
laion/CLIP-ViT-g-14-laion2B-s34B-b88K
laion
"2023-04-18T17:34:59Z"
31,028
6
open_clip
[ "open_clip", "zero-shot-image-classification", "clip", "license:mit", "has_space", "region:us" ]
zero-shot-image-classification
"2023-03-06T00:43:13Z"
--- tags: - zero-shot-image-classification - clip library_tag: open_clip license: mit pipeline_tag: zero-shot-image-classification --- # Model card for CLIP-ViT-g-14-laion2B-s34B-b88K
[ -0.16964565217494965, 0.025285223498940468, 0.5783823728561401, 0.39070749282836914, -1.017866849899292, 0.240657240152359, 0.7922760248184204, 0.38463279604911804, 0.6626735329627991, 0.5008804202079773, -0.8711045384407043, -0.38746243715286255, -0.49115821719169617, -0.08759323507547379, -0.31490710377693176, 0.5664058923721313, 0.04880113527178764, 0.45420536398887634, -0.08078324794769287, -0.13854382932186127, -0.6374982595443726, -0.3951732814311981, -0.43416115641593933, -0.1932147890329361, -0.1238994225859642, 0.42350977659225464, 0.9070345759391785, 0.8444610238075256, 0.5935150980949402, 0.40311580896377563, -0.48291274905204773, 0.15388129651546478, -0.458466112613678, -0.5986815690994263, -0.10685495287179947, -0.6531049609184265, -1.2329086065292358, -0.05861074849963188, 0.7567195892333984, -0.37424662709236145, -0.26826292276382446, 0.5185441374778748, 0.09774654358625412, -0.12791340053081512, -0.4254307150840759, 0.3142382800579071, -0.6438374519348145, 0.11606071889400482, -0.32315465807914734, -0.22474248707294464, -0.12509594857692719, -0.3008864223957062, 0.0835115909576416, -0.8455880880355835, 0.28543537855148315, -0.45208048820495605, 1.6106458902359009, 0.173185795545578, -0.1479489952325821, -0.08539891988039017, -0.6295422315597534, 0.8753265738487244, -0.5877419710159302, 0.45361822843551636, 0.24631133675575256, 0.162535160779953, -0.1966395527124405, -0.6183674931526184, 0.17527209222316742, -0.03220950439572334, 0.037951450794935226, 0.4441477358341217, -0.11466018110513687, 0.03465408459305763, 0.7197801470756531, 0.3450043797492981, -0.3573414981365204, -0.4214944839477539, -1.1555671691894531, 0.02430492639541626, 0.4902682900428772, 0.4051089882850647, 0.6295396089553833, -0.4955253303050995, -0.8927980065345764, 0.08905915170907974, -0.6009741425514221, -0.38805314898490906, 0.5644105672836304, -0.32927149534225464, -0.6347294449806213, 0.45984241366386414, 0.2912745177745819, 0.40718764066696167, 0.0896373838186264, -0.3925023674964905, -0.033560000360012054, -0.20190313458442688, -0.4955098330974579, -0.27982744574546814, 0.2657337784767151, 0.8831802010536194, -0.11614406853914261, 0.5290230512619019, -0.01571357063949108, -0.21879519522190094, 0.28567132353782654, -1.2896653413772583, -0.35388389229774475, -0.5021563172340393, -0.7464548945426941, -0.36738818883895874, 0.9498616456985474, -0.8937610983848572, 0.3198946416378021, 0.11491899937391281, 0.6811925172805786, 0.018667908385396004, -0.11285687983036041, -0.09041166305541992, -0.6422221064567566, 0.2872171401977539, 0.2670549750328064, -0.7344855666160583, 0.27661702036857605, 0.47037991881370544, 0.8003129959106445, 0.31077244877815247, 0.050459153950214386, -0.03360825031995773, 0.7343037724494934, -0.5764967203140259, 0.3767767548561096, -0.268238365650177, -1.197406530380249, 0.2847730815410614, 0.7888899445533752, -0.24976442754268646, -0.6440709233283997, 1.3548177480697632, -0.3716720938682556, -0.28907403349876404, -1.0287480354309082, -0.3406897485256195, -0.30959197878837585, 0.20344498753547668, -0.6872459650039673, 1.3819516897201538, -0.10560474544763565, -0.8684702515602112, 0.2589370608329773, -0.3480179011821747, -0.01723499782383442, 0.6205238699913025, -0.3020462393760681, -0.3631444573402405, 0.2295781522989273, -0.013654469512403011, 0.3095756471157074, 0.020258883014321327, 0.07450953871011734, -0.5717160105705261, -0.709445595741272, -0.12308921664953232, -0.2351798713207245, 0.8058165907859802, 0.23122645914554596, 0.5277814269065857, 0.19951282441616058, -0.2898285686969757, 0.0626235231757164, 0.4212118685245514, 0.12234243005514145, -0.2628232538700104, -0.4726817309856415, -0.28466126322746277, 0.17216596007347107, 0.17661689221858978, -0.5824214816093445, 0.28967905044555664, 0.4516492486000061, 0.7947053909301758, 1.0048576593399048, 0.12912403047084808, -0.10101043432950974, -0.4883856773376465, 0.9085412621498108, -0.3368988633155823, 0.6974281668663025, 0.42264458537101746, -0.5797494053840637, -0.6622554063796997, -0.2813032567501068, -0.14850103855133057, 0.8560894727706909, -0.42220357060432434, 0.1968669891357422, 0.3467339873313904, -0.49645090103149414, 0.018574995920062065, -0.23631024360656738, 0.09564880281686783, 0.13565263152122498, 0.393684059381485, -0.2438230812549591, -0.6976363062858582, -0.9345775246620178, -0.06585362553596497, -0.3623645007610321, -0.02027706801891327, 0.8673518300056458, 0.7709765434265137, -0.6141980886459351, 0.5045088529586792, -1.2962491512298584, -0.6067880392074585, -0.492649108171463, -0.2669059932231903, 0.21547995507717133, -0.0017540050903335214, 1.0656065940856934, -0.7213948369026184, -0.2703423798084259, -0.3483505845069885, -0.592488169670105, 0.03814767673611641, 0.2912072539329529, -0.16459360718727112, -0.4282451272010803, 0.5935729742050171, -0.792404294013977, 0.92076575756073, 0.1416664570569992, -0.09638840705156326, 0.5093356966972351, -0.5504878759384155, 0.3785976469516754, -1.1578328609466553, -0.13230419158935547, -0.12670616805553436, -0.2807027995586395, -0.37489601969718933, -0.38754090666770935, 0.06802279502153397, -0.029999222606420517, -0.7196842432022095, 0.5411960482597351, -0.5015062689781189, 0.04333152994513512, -0.3946937918663025, -0.02595432661473751, 0.23237021267414093, 0.03211124613881111, -0.1776876002550125, 0.8605560064315796, 0.2567308843135834, -0.4235946238040924, 0.4835396707057953, 0.8349327445030212, -0.04604813829064369, 0.4060012400150299, -0.678705096244812, -0.1056310310959816, -0.5713493227958679, 0.035194214433431625, -0.44735246896743774, -0.6624835729598999, 0.4800432622432709, -0.19674654304981232, 0.22761617600917816, -0.96161949634552, 0.09454475343227386, -0.7783066630363464, -0.34757402539253235, 0.9110738039016724, 0.3490005135536194, -0.6365559697151184, 0.730718731880188, 0.2689959406852722, -0.025156622752547264, -0.5130378007888794, -0.8693456649780273, -0.4561775028705597, -0.26027706265449524, -0.38753488659858704, 0.7373524904251099, -0.17793326079845428, 0.1411871463060379, -0.0478251576423645, -0.6821538209915161, -0.5301990509033203, -0.23739494383335114, 0.5586575269699097, 0.608228862285614, -0.1174272820353508, -0.4101701080799103, -0.20610664784908295, -0.4196462035179138, 0.22430622577667236, 0.19336387515068054, 0.4408542215824127, -0.23506414890289307, 0.14194031059741974, -0.25148239731788635, 0.5170405507087708, 0.7751024961471558, -0.39004185795783997, 0.5092906355857849, 0.8819977045059204, -0.7119448781013489, -0.2695596516132355, -0.28304699063301086, -0.02847065031528473, -0.5731525421142578, 0.7091907858848572, -0.5200044512748718, -0.3354646861553192, 0.7095259428024292, 0.22662505507469177, -0.8078030943870544, 0.6257496476173401, 0.5972928404808044, 0.3562256991863251, 0.8112635016441345, 0.6847683191299438, 0.01806684397161007, 0.7544418573379517, -0.667835533618927, 0.5356753468513489, -0.7116103768348694, -0.4575050473213196, 0.048417627811431885, 0.440665066242218, -0.17813651263713837, -0.8281895518302917, 0.3050158619880676, 0.6259542107582092, 0.008383247070014477, 0.6501283645629883, -0.37612253427505493, 0.7883315682411194, 0.5499803423881531, 0.1026037409901619, -0.26301687955856323, -0.5513180494308472, -0.08020477741956711, 0.14395692944526672, -0.6656643748283386, -0.35769954323768616, 1.0694061517715454, 0.5287304520606995, 1.0413938760757446, 0.11203567683696747, 0.5991835594177246, 0.138910710811615, 0.037159837782382965, -0.533454418182373, 0.7445644736289978, -0.7676425576210022, -0.7295032143592834, 0.2571716904640198, 0.23101122677326202, -0.2888612151145935, 0.05946612358093262, 0.14052271842956543, -0.9385592341423035, 0.09506521373987198, 0.4327356517314911, -0.5512348413467407, 0.6042304635047913, -0.5223801732063293, 1.3948537111282349, -0.20279303193092346, 0.02285674586892128, -0.1066010594367981, -0.08724300563335419, 0.7228454947471619, 0.6026341319084167, -0.28584861755371094, -0.2882567048072815, 0.44544717669487, 1.2479668855667114, -0.9759625196456909, 0.08938031643629074, -0.2913329601287842, 0.3124602735042572, 0.983847439289093, -0.3194458782672882, 0.6233882904052734, 1.0176231861114502, 0.3191090524196625, -0.3391367495059967, 0.4803639352321625, -0.23354244232177734, -0.472215861082077, 0.574004590511322, -0.5470876693725586, -0.4057227671146393, -0.37379175424575806, 0.09700930118560791, 0.23204609751701355, -0.32707643508911133, 1.3595846891403198, 0.9015542268753052, -0.1743251234292984, 0.10032035410404205, 0.6375506520271301, 0.12635484337806702, 0.5820820927619934, 0.14888359606266022, -0.35109248757362366, -0.9513643980026245, 1.06350839138031, 0.14356616139411926, 0.23853789269924164, 0.11642781645059586, 0.46891671419143677, -0.11277266591787338, -0.0010502083459869027, -0.5446411371231079, 0.20381410419940948, -0.42527756094932556, -0.568996012210846, -0.4659719169139862, -0.7869385480880737, -0.09618617594242096, -0.2813878655433655, -0.8377164006233215, 0.2230137586593628, -0.8011589050292969, -0.34490150213241577, 0.5023460984230042, 0.6089411973953247, -0.5773712992668152, 1.2550227642059326, -0.9815525412559509, 0.444304496049881, 0.6906603574752808, 0.5199210047721863, -0.09754306077957153, -0.9245668649673462, -0.036760199815034866, -0.35380294919013977, -0.8321393132209778, -1.0145392417907715, 0.3460098206996918, 0.01634960249066353, 0.5432266592979431, 0.7353673577308655, -0.311840683221817, 0.9667254090309143, -0.5061303377151489, 1.072946548461914, 0.3208467364311218, -1.3548901081085205, 0.241013765335083, -0.6244222521781921, 0.12017570436000824, 0.2822251617908478, 0.5510597229003906, -0.8196836113929749, 0.4634607136249542, -0.9929199814796448, -0.6413059234619141, 0.35474893450737, -0.18797649443149567, 0.03540188819169998, 0.2748428285121918, 0.5052382349967957, 0.047835491597652435, 0.07523468881845474, -0.8475115895271301, -0.4419659972190857, -0.5033591985702515, -0.06305443495512009, 0.6529759764671326, -1.1955944299697876, 0.08760583400726318, -0.44745922088623047, 0.9714687466621399, -0.07708556205034256, 0.8117877840995789, 0.284160852432251, -0.07467705011367798, 0.11170462518930435, -0.01925504580140114, 1.0930812358856201, 0.4944407045841217, -0.8677161335945129, -0.20126250386238098, 0.12686333060264587, -0.7327424883842468, -0.047996945679187775, 0.28235864639282227, -0.666719913482666, 0.36001649498939514, 0.29025810956954956, 1.0103651285171509, 0.16649015247821808, 0.07906990498304367, 1.2542780637741089, -0.005216453690081835, -0.1974799782037735, -0.5442051291465759, -0.15740060806274414, -0.08578961342573166, 0.11687036603689194, 0.10244561731815338, -0.059419482946395874, 0.2818808853626251, -0.4289420247077942, 0.5839109420776367, 0.8914421200752258, -0.8801218867301941, -0.6103330254554749, 0.8597589135169983, 0.3350110948085785, -0.8985291719436646, 0.3208581507205963, -0.5167505145072937, -0.9731613993644714, 0.7510859370231628, 0.6140546798706055, 1.2003755569458008, -0.5939570665359497, 0.3694338798522949, 0.693116307258606, 0.14973680675029755, -0.45148965716362, 0.9609877467155457, 0.32949814200401306, -0.5982116460800171, -0.0062721422873437405, -0.2551712095737457, -0.41751617193222046, 0.2347072809934616, -1.6295298337936401, 0.6716595888137817, -0.7547265887260437, -0.563841700553894, -0.2987663149833679, -0.002023603767156601, -0.6236473917961121, 0.37504687905311584, 0.2915722727775574, 1.3994331359863281, -1.0449062585830688, 0.9220214486122131, 0.42562174797058105, -0.11866889894008636, -0.8874149918556213, -0.37520313262939453, 0.0706762969493866, -0.7751300930976868, 0.22042247653007507, 0.18475833535194397, 0.038561541587114334, -0.8932481408119202, -0.7784115672111511, -1.2471860647201538, 1.1721056699752808, 0.14247357845306396, -0.1488950550556183, 0.20923273265361786, -0.5070587396621704, 0.020615767687559128, -0.45638832449913025, 0.44529539346694946, 0.42763757705688477, 0.2376771867275238, 0.2928352355957031, -0.9260866045951843, -0.38042551279067993, -0.15674662590026855, 0.021452339366078377, 0.41398027539253235, -1.5519529581069946, 0.7537742257118225, -0.22332750260829926, -0.011671028099954128, 0.7820780873298645, 0.5967340469360352, 0.14644794166088104, 0.021324405446648598, -0.18244874477386475, 0.5433431267738342, 0.5377723574638367, 0.05284998565912247, 0.1337769478559494, 0.12085401266813278, 0.5765074491500854, 1.040364146232605, -0.46670079231262207, 0.5068560242652893, 0.5200796723365784, 0.02283032424747944, 0.5504979491233826, 0.47286877036094666, -1.0812474489212036, 0.43064767122268677, 0.22337467968463898, -0.04515000060200691, -0.432394802570343, -0.13638392090797424, -0.835016667842865, 0.511440098285675, 0.3244374096393585, -0.8270941376686096, -0.16680561006069183, -0.524785041809082, 0.2924770712852478, -0.1412229984998703, -0.7308940887451172, 0.16043610870838165, 0.34432104229927063, -0.02311602234840393, -0.15506400167942047, 0.2638464868068695, 0.2292705476284027, -0.901483416557312, -0.28194940090179443, 0.02383076213300228, 0.543457567691803, -0.015514739789068699, -0.4996032118797302, 0.42415016889572144, -0.3459145128726959, -0.5653296113014221, -0.2501395344734192, 0.6955441236495972, -0.34161505103111267, -0.8074272871017456, 0.6775199174880981, -0.24964193999767303, 0.28010067343711853, 0.3923933804035187, -0.712883472442627, 0.6209561228752136, 0.17419561743736267, 0.4070768654346466, 0.07382215559482574, -0.09623102098703384, 0.09070426225662231, 0.7527589201927185, -0.12631355226039886, -0.19976486265659332, 0.5146331191062927, -0.5243448615074158, 0.6559301018714905, -0.7446607947349548, -0.7828803658485413, -0.8448805212974548, 0.37170347571372986, -0.3998778164386749, -1.0530349016189575, 0.6703518629074097, 1.1526495218276978, 0.6065067052841187, -0.717315673828125, 0.460001677274704, 0.26190057396888733, 0.33167722821235657, -0.20728693902492523, 0.6335535049438477, -0.5272105932235718, -0.2951884865760803, -0.4240759313106537, -0.7923645377159119, -0.02135109342634678, 0.7717507481575012, 0.02087116241455078, -0.3636764883995056, 0.5398169755935669, 0.8390213251113892, -0.1457042545080185, 0.4338724911212921, 0.3997068405151367, 0.13912980258464813, 0.2910914421081543, 0.3590331971645355, 0.5813071131706238, -1.1053568124771118, 0.5267858505249023, 0.10164724290370941, -0.2848176658153534, -0.6531966328620911, -1.2120014429092407, -1.122214913368225, -0.11022631078958511, -0.5581463575363159, -0.47005578875541687, 0.018470199778676033, 0.9157418012619019, 1.2569836378097534, -0.47629624605178833, -0.4327181279659271, 0.5560547709465027, 0.47106194496154785, 0.1370021402835846, -0.21211645007133484, 0.5220933556556702, 0.6141663193702698, -0.06016855686903, 0.3713259994983673, 0.3025898039340973, 0.7855756878852844, 0.4624004065990448, -0.22782830893993378, 0.1618986874818802, 0.5107004642486572, 0.25794002413749695, 0.5778981447219849, -0.7721286416053772, -0.49205949902534485, -0.05224180966615677, 0.3099619746208191, 0.1294298619031906, 0.9319849014282227, -0.0730016827583313, -0.5683503746986389, 0.2953011989593506, 0.04799768328666687, 0.772735595703125, 0.40818920731544495, 0.6781625747680664, -0.48647403717041016, 0.5133816599845886, -0.20070113241672516, 0.4900927245616913, -0.37369558215141296, 0.18005743622779846, 0.4099494516849518, 0.6925287842750549, -0.6652998328208923, -1.1312247514724731, 0.12164141237735748, -1.6578786373138428, 0.22896745800971985, 1.2031620740890503, -0.138607457280159, -0.46650591492652893, 0.4855079650878906, -0.6320386528968811, -0.21123604476451874, -0.371845006942749, 0.035597652196884155, 0.6119124293327332, 0.02300652489066124, -0.5711503028869629, -0.7804085612297058, 0.8154590725898743, -0.18174470961093903, -0.6355909109115601, -0.3416903018951416, -0.4177219867706299, 0.5354918837547302, 0.07508548349142075, 0.4887174963951111, -0.1340792328119278, 0.3877035677433014, 0.17050306499004364, 0.30437904596328735, -0.16785849630832672, -0.618498682975769, -0.06188208982348442, -0.1641063690185547, -0.27310019731521606, -0.9863362908363342 ]
timm/vit_small_patch16_224.augreg_in21k
timm
"2023-05-06T00:28:07Z"
30,927
0
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:53:43Z"
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-21k --- # Model card for vit_small_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): 30.1 - GMACs: 4.3 - Activations (M): 8.3 - 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_small_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_small_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, 384) 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}} } ```
[ -0.5402008295059204, -0.404428094625473, -0.01515899132937193, 0.06049978733062744, -0.36170491576194763, -0.35394901037216187, -0.3269968032836914, -0.5018479824066162, 0.19008614122867584, 0.3045324981212616, -0.530405580997467, -0.4720965027809143, -0.631457507610321, 0.027154890820384026, -0.1554189920425415, 0.9988948106765747, -0.1438322365283966, 0.05446719378232956, -0.2293826937675476, -0.4488199055194855, -0.32594427466392517, -0.24081052839756012, -0.6483914852142334, -0.445242702960968, 0.4064466655254364, 0.16543066501617432, 0.5922064781188965, 0.6648228764533997, 0.8061636090278625, 0.46286994218826294, -0.10968566685914993, 0.1855710744857788, -0.32457447052001953, -0.21828590333461761, 0.2914049029350281, -0.6518362164497375, -0.367736279964447, 0.2353999763727188, 0.7363245487213135, 0.4084990918636322, 0.12861943244934082, 0.377478688955307, 0.13905403017997742, 0.4882557988166809, -0.3448293209075928, 0.2239532321691513, -0.5289737582206726, 0.25274649262428284, -0.03551065921783447, -0.03076702542603016, -0.3226200342178345, -0.32547786831855774, 0.22713585197925568, -0.5169879794120789, 0.6319202184677124, -0.01558234728872776, 1.4011898040771484, 0.2922450006008148, 0.039175547659397125, 0.22293727099895477, -0.425769567489624, 0.7700941562652588, -0.6098074316978455, 0.4026024341583252, 0.17080175876617432, 0.19548411667346954, 0.054644178599119186, -1.072405457496643, -0.6737905144691467, -0.16556313633918762, -0.25412753224372864, 0.08836302906274796, -0.315553218126297, 0.2556537091732025, 0.5033406019210815, 0.6320238709449768, -0.5247260928153992, 0.007988981902599335, -0.5962774157524109, -0.2955487370491028, 0.5916802287101746, -0.01372044812887907, 0.2167232483625412, -0.1877000778913498, -0.5803954005241394, -0.6242573857307434, -0.3213590979576111, 0.28771117329597473, 0.3143560290336609, 0.07230391353368759, -0.5131639838218689, 0.6027630567550659, 0.04553515464067459, 0.709920346736908, 0.23331347107887268, -0.2163255214691162, 0.6814571022987366, -0.13742229342460632, -0.3821622133255005, -0.294913649559021, 1.123904824256897, 0.488334059715271, 0.37798407673835754, -0.004128823522478342, -0.20036733150482178, -0.12776625156402588, 0.05005159229040146, -1.1168707609176636, -0.42669790983200073, 0.0768015906214714, -0.48785752058029175, -0.38755035400390625, 0.33362701535224915, -0.6718583703041077, -0.14371061325073242, -0.12616842985153198, 0.801285445690155, -0.42985212802886963, -0.14628192782402039, 0.07884557545185089, -0.17677102982997894, 0.46944132447242737, 0.2790733277797699, -0.6072208285331726, 0.1018371656537056, 0.2182575911283493, 1.0633106231689453, 0.04070417210459709, -0.4880215525627136, -0.294107586145401, -0.44381192326545715, -0.3191728889942169, 0.5350554585456848, -0.04880603775382042, -0.12321312725543976, -0.17094334959983826, 0.4153648912906647, -0.2683444917201996, -0.5776022672653198, 0.3410687744617462, -0.21021541953086853, 0.3774634301662445, 0.1533982753753662, -0.19731692969799042, -0.4284839630126953, 0.2649837136268616, -0.4313110411167145, 1.2465367317199707, 0.3266032934188843, -0.9142112135887146, 0.4003465175628662, -0.4577997028827667, -0.07482632994651794, -0.14268682897090912, -0.001259315526112914, -1.1416903734207153, 0.07983555644750595, 0.3383371829986572, 0.594876229763031, -0.22606231272220612, -0.034510500729084015, -0.44152721762657166, -0.35711368918418884, 0.36515796184539795, -0.2727537155151367, 0.9111229181289673, 0.02497841604053974, -0.3100156784057617, 0.28545355796813965, -0.598314106464386, 0.08601612597703934, 0.43371355533599854, -0.25886228680610657, 0.00001998365405597724, -0.6508370041847229, 0.15463216602802277, 0.22254905104637146, 0.24989111721515656, -0.6601873636245728, 0.4147472381591797, -0.36272451281547546, 0.4324701726436615, 0.6620257496833801, -0.0851069763302803, 0.40119248628616333, -0.3596656322479248, 0.32283908128738403, 0.2335791140794754, 0.3974943459033966, -0.12888550758361816, -0.6824593544006348, -1.0753546953201294, -0.478878915309906, 0.3673994541168213, 0.43244799971580505, -0.6919705867767334, 0.5561650991439819, -0.37114638090133667, -0.7698082327842712, -0.6233204007148743, 0.04831920936703682, 0.4514629542827606, 0.5193412899971008, 0.5291385054588318, -0.5600868463516235, -0.5683096051216125, -0.9869046211242676, -0.14987125992774963, -0.06674841791391373, -0.019515953958034515, 0.25278419256210327, 0.6713830232620239, -0.29795849323272705, 0.8650381565093994, -0.48367246985435486, -0.36065977811813354, -0.21527904272079468, 0.08010753244161606, 0.35483041405677795, 0.7515213489532471, 0.6894490718841553, -0.6457052826881409, -0.45023491978645325, -0.15353728830814362, -0.8538698554039001, 0.12755711376667023, -0.0384240560233593, -0.15187373757362366, 0.13967469334602356, 0.20722292363643646, -0.7176220417022705, 0.7986065745353699, 0.19916008412837982, -0.3455321192741394, 0.40881824493408203, -0.2618517279624939, 0.06232660263776779, -1.1947345733642578, -0.00664410600438714, 0.3827221989631653, -0.26898491382598877, -0.4675154983997345, -0.002763476688414812, 0.11425367742776871, -0.062003396451473236, -0.40847229957580566, 0.6018115282058716, -0.5270877480506897, -0.0840035006403923, -0.06608816981315613, -0.31619012355804443, 0.07592876255512238, 0.7236884236335754, -0.04376944899559021, 0.5550124049186707, 0.708855926990509, -0.47876179218292236, 0.625745415687561, 0.5419425368309021, -0.21595174074172974, 0.48605477809906006, -0.732806921005249, 0.14773695170879364, -0.02446805126965046, 0.21267324686050415, -1.003368616104126, -0.2482171356678009, 0.3895834684371948, -0.7534727454185486, 0.6486656069755554, -0.5599097013473511, -0.4577005207538605, -0.6491985321044922, -0.417105495929718, 0.43022850155830383, 0.7808640599250793, -0.8140674829483032, 0.6108894348144531, 0.10002782195806503, 0.34165501594543457, -0.5591592788696289, -1.0018833875656128, -0.2065614014863968, -0.3975125253200531, -0.7267585396766663, 0.46599021553993225, 0.07153196632862091, 0.13891927897930145, 0.07261400669813156, -0.047425780445337296, 0.0080040218308568, -0.2458319365978241, 0.4506593346595764, 0.39282873272895813, -0.2112235724925995, -0.0541808158159256, -0.36232131719589233, -0.2070595622062683, -0.011001435108482838, -0.35318422317504883, 0.5320894718170166, -0.3385511338710785, -0.21761617064476013, -0.783331573009491, -0.28082364797592163, 0.4563795030117035, -0.2919693887233734, 0.7631204128265381, 1.2047041654586792, -0.481433242559433, 0.050603482872247696, -0.5752412676811218, -0.4353756010532379, -0.5018811225891113, 0.4585496485233307, -0.3071758449077606, -0.45783090591430664, 0.7638349533081055, 0.18206727504730225, 0.07598301023244858, 0.8079991936683655, 0.4656148850917816, 0.033611323684453964, 0.8748512864112854, 0.705960750579834, 0.20313416421413422, 0.9029609560966492, -1.004063606262207, -0.09071334451436996, -0.9569104909896851, -0.381173312664032, -0.2621757984161377, -0.5530224442481995, -0.7438802719116211, -0.5286229848861694, 0.4457777142524719, 0.08805671334266663, -0.27972641587257385, 0.5370152592658997, -0.9100644588470459, 0.16137290000915527, 0.7367414832115173, 0.4985480308532715, -0.08936676383018494, 0.439732164144516, -0.19342845678329468, -0.08989560604095459, -0.7968196868896484, -0.09126751124858856, 1.1004891395568848, 0.4726942777633667, 0.8392151594161987, -0.2737872898578644, 0.7084147334098816, -0.24157392978668213, 0.31086060404777527, -0.8233100175857544, 0.553888738155365, 0.004005760885775089, -0.4050242006778717, -0.11398060619831085, -0.4213905334472656, -1.0803743600845337, 0.24031135439872742, -0.3422504663467407, -0.8470418453216553, 0.3865378201007843, 0.20447131991386414, -0.2289077788591385, 0.6779953241348267, -0.8953987956047058, 0.9900989532470703, -0.05161266401410103, -0.511848509311676, 0.10188791155815125, -0.7090321183204651, 0.21600420773029327, 0.2362063080072403, -0.33390456438064575, 0.1520138680934906, 0.242540642619133, 1.0388572216033936, -0.6306651830673218, 0.8756434917449951, -0.39423665404319763, 0.3649364411830902, 0.49363818764686584, -0.2349441647529602, 0.4120296835899353, 0.05528958514332771, 0.20068304240703583, 0.3223106265068054, -0.0001086032425519079, -0.3687290847301483, -0.502980649471283, 0.5201258659362793, -1.071723461151123, -0.38550761342048645, -0.5681089758872986, -0.6028594374656677, 0.11591146886348724, 0.09216981381177902, 0.669899582862854, 0.6206681132316589, 0.3168187141418457, 0.4167967438697815, 0.6548095345497131, -0.3367515504360199, 0.43036338686943054, 0.0021622965577989817, -0.19156058132648468, -0.5830355286598206, 0.9792802929878235, 0.21486569941043854, 0.14839307963848114, 0.1551804542541504, 0.24734152853488922, -0.34795084595680237, -0.4925203025341034, -0.3623502850532532, 0.4407895505428314, -0.7127158641815186, -0.5084153413772583, -0.5873297452926636, -0.5349656939506531, -0.32934996485710144, 0.02792644314467907, -0.42622190713882446, -0.35194557905197144, -0.3833836019039154, 0.13619284331798553, 0.8750419616699219, 0.5233367681503296, -0.17373022437095642, 0.5315163135528564, -0.579777717590332, 0.21481731534004211, 0.30654430389404297, 0.4943634271621704, -0.19331830739974976, -1.0377991199493408, -0.38361474871635437, 0.03670799359679222, -0.5298428535461426, -0.7403863668441772, 0.4861700236797333, 0.22347624599933624, 0.4296819567680359, 0.36320748925209045, -0.2435658723115921, 0.9067832231521606, -0.0710505023598671, 0.6065109372138977, 0.33860719203948975, -0.5302703380584717, 0.49960923194885254, -0.10811449587345123, 0.11813655495643616, 0.18132250010967255, 0.12822698056697845, -0.31851181387901306, -0.07829403132200241, -1.1280404329299927, -0.776214599609375, 0.7963655591011047, 0.24310819804668427, 0.0543350987136364, 0.47440147399902344, 0.6053664088249207, -0.08741676062345505, 0.07342402637004852, -0.9203100800514221, -0.29456740617752075, -0.3610207736492157, -0.35438936948776245, -0.10789249837398529, -0.01680006831884384, -0.04163777083158493, -0.807528018951416, 0.6463557481765747, -0.10885622352361679, 0.8510298728942871, 0.45503178238868713, -0.2143389880657196, -0.15194326639175415, -0.41511812806129456, 0.3627224266529083, 0.24695228040218353, -0.2880142629146576, 0.06916258484125137, 0.288631796836853, -0.7399566769599915, -0.04522306099534035, 0.3433869183063507, -0.10917863994836807, 0.044454172253608704, 0.4877637028694153, 1.0920166969299316, -0.12553757429122925, -0.02434159442782402, 0.5696433186531067, -0.10922911018133163, -0.3935838043689728, -0.30729424953460693, 0.08024116605520248, -0.25186124444007874, 0.38977810740470886, 0.31659188866615295, 0.4261685609817505, -0.13895611464977264, -0.1342163234949112, 0.15525288879871368, 0.5304799675941467, -0.5591112375259399, -0.3779296875, 0.6830078363418579, -0.20974348485469818, -0.0944664403796196, 0.802061140537262, -0.06951066851615906, -0.5374341607093811, 0.8848846554756165, 0.32261183857917786, 1.0051418542861938, -0.07307630777359009, -0.04356426000595093, 0.7909365296363831, 0.3867197334766388, -0.05402934178709984, 0.15544657409191132, 0.14214350283145905, -0.789730966091156, -0.1034156084060669, -0.657001256942749, 0.02682892605662346, 0.33295688033103943, -0.5569252371788025, 0.4225623607635498, -0.5483332872390747, -0.3848220109939575, 0.05469227582216263, 0.2646055817604065, -1.0477294921875, 0.30008813738822937, 0.006002494134008884, 0.7526628971099854, -0.8349695801734924, 0.6436768770217896, 0.878148078918457, -0.7190658450126648, -0.9847787618637085, -0.16351278126239777, -0.16565477848052979, -0.9442652463912964, 0.45457223057746887, 0.44901955127716064, 0.171111062169075, 0.2544881999492645, -0.821881890296936, -0.6280285716056824, 1.313239336013794, 0.36092835664749146, -0.14080815017223358, 0.13576236367225647, -0.06824415177106857, 0.39688241481781006, -0.28209760785102844, 0.4770668148994446, 0.16583925485610962, 0.4009828269481659, 0.21724919974803925, -0.7088107466697693, 0.07619854062795639, -0.3168296813964844, 0.1941331923007965, 0.1904449164867401, -0.8405497670173645, 0.9830657839775085, -0.4411265552043915, -0.08504236489534378, 0.22931960225105286, 0.6686185002326965, 0.10959625989198685, 0.07749729603528976, 0.5407058596611023, 0.9039234519004822, 0.41036057472229004, -0.463084876537323, 0.9441144466400146, -0.14446738362312317, 0.7524250745773315, 0.504254162311554, 0.52340167760849, 0.4599386751651764, 0.49645838141441345, -0.32794472575187683, 0.33238276839256287, 1.0582529306411743, -0.6111605763435364, 0.2909325659275055, 0.10484331101179123, 0.0815277099609375, -0.2374553233385086, 0.032268378883600235, -0.49221909046173096, 0.5283893942832947, 0.19764696061611176, -0.5889385938644409, -0.0793384537100792, 0.1853647530078888, -0.15235206484794617, -0.37838828563690186, -0.20094874501228333, 0.620021402835846, 0.030494090169668198, -0.4291781187057495, 0.8574188351631165, 0.016125965863466263, 0.811245322227478, -0.40757834911346436, -0.009205391630530357, -0.24792683124542236, 0.46187281608581543, -0.395162433385849, -0.8009913563728333, 0.16929170489311218, -0.24166610836982727, -0.06602271646261215, 0.04734223335981369, 0.7186657190322876, -0.41260236501693726, -0.582394003868103, 0.0904160812497139, 0.32658591866493225, 0.3153720200061798, -0.045593053102493286, -1.0397378206253052, -0.021667353808879852, 0.0069687278009951115, -0.585995078086853, 0.20634189248085022, 0.41789737343788147, 0.017713939771056175, 0.6873331665992737, 0.6986982226371765, -0.06295516341924667, 0.22596555948257446, -0.11949258297681808, 0.9303622245788574, -0.4300546944141388, -0.39533767104148865, -0.7901473045349121, 0.6422319412231445, -0.09814528375864029, -0.611416220664978, 0.7123297452926636, 0.6331669688224792, 0.9384779334068298, -0.15111736953258514, 0.4552670121192932, -0.16374428570270538, 0.0335426852107048, -0.36244964599609375, 0.5868979692459106, -0.7486430406570435, -0.0960492491722107, -0.28634893894195557, -0.9199594855308533, -0.4050116240978241, 0.9752449989318848, -0.404518187046051, 0.4727424681186676, 0.5479836463928223, 1.0006479024887085, -0.33862611651420593, -0.40286925435066223, 0.15707600116729736, 0.20110543072223663, 0.14310257136821747, 0.3986562192440033, 0.6313512921333313, -0.9005375504493713, 0.523485541343689, -0.6234248876571655, -0.17989863455295563, -0.3004671037197113, -0.4834026098251343, -1.0695905685424805, -0.8273929953575134, -0.5795645713806152, -0.7044457197189331, -0.2331998199224472, 0.8502373695373535, 0.957161545753479, -0.5674734711647034, -0.0720432922244072, -0.15214450657367706, 0.032867077738046646, -0.31996825337409973, -0.2461397796869278, 0.5459909439086914, -0.13115349411964417, -0.8068434596061707, -0.3482125699520111, -0.008358522318303585, 0.5302864909172058, -0.1847333461046219, -0.1586538553237915, -0.1195022463798523, -0.3393966257572174, 0.21916159987449646, 0.3232540786266327, -0.7176617383956909, -0.2677190601825714, -0.10235469043254852, -0.05158757045865059, 0.4963656961917877, 0.4002687335014343, -0.7375935912132263, 0.5590363144874573, 0.5793511271476746, 0.33849871158599854, 0.8805097937583923, -0.20686952769756317, 0.10370200127363205, -0.8760559558868408, 0.6306095719337463, -0.03420276939868927, 0.5609487295150757, 0.5455935597419739, -0.26117634773254395, 0.5887877345085144, 0.614581286907196, -0.4738781452178955, -0.8866366744041443, -0.020092327147722244, -1.0903563499450684, 0.15535342693328857, 0.9755191802978516, -0.22832222282886505, -0.5122107863426208, 0.40089577436447144, -0.22233591973781586, 0.7192898392677307, -0.08040642738342285, 0.49750062823295593, 0.19377373158931732, 0.06631676852703094, -0.6414070725440979, -0.4902915954589844, 0.5327180027961731, 0.12283159047365189, -0.544035792350769, -0.39719662070274353, 0.06542844325304031, 0.5468119978904724, 0.3786916732788086, 0.3017061948776245, -0.1477055549621582, 0.16822688281536102, 0.056239377707242966, 0.541743814945221, -0.3608618378639221, -0.1551186740398407, -0.42035728693008423, -0.1703481525182724, -0.05461471900343895, -0.6395308971405029 ]
trl-internal-testing/tiny-random-GPTNeoXForCausalLM
trl-internal-testing
"2022-12-20T10:35:26Z"
30,812
0
transformers
[ "transformers", "pytorch", "gpt_neox", "text-generation", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
"2022-12-20T10:35:15Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
aubmindlab/bert-base-arabertv02
aubmindlab
"2023-03-17T15:49:17Z"
30,731
21
transformers
[ "transformers", "pytorch", "tf", "jax", "tensorboard", "safetensors", "bert", "fill-mask", "ar", "arxiv:2003.00104", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: ar datasets: - wikipedia - Osian - 1.5B-Arabic-Corpus - oscar-arabic-unshuffled - Assafir(private) widget: - text: " عاصمة لبنان هي [MASK] ." --- # AraBERT v1 & v2 : Pre-training BERT for Arabic Language Understanding <img src="https://raw.githubusercontent.com/aub-mind/arabert/master/arabert_logo.png" width="100" align="left"/> **AraBERT** is an Arabic pretrained language model based on [Google's BERT architechture](https://github.com/google-research/bert). AraBERT uses the same BERT-Base config. More details are available in the [AraBERT Paper](https://arxiv.org/abs/2003.00104) and in the [AraBERT Meetup](https://github.com/WissamAntoun/pydata_khobar_meetup) There are two versions of the model, AraBERTv0.1 and AraBERTv1, with the difference being that AraBERTv1 uses pre-segmented text where prefixes and suffixes were split using the [Farasa Segmenter](http://alt.qcri.org/farasa/segmenter.html). We evaluate AraBERT models on different downstream tasks and compare them to [mBERT]((https://github.com/google-research/bert/blob/master/multilingual.md)), and other state of the art models (*To the extent of our knowledge*). The Tasks were Sentiment Analysis on 6 different datasets ([HARD](https://github.com/elnagara/HARD-Arabic-Dataset), [ASTD-Balanced](https://www.aclweb.org/anthology/D15-1299), [ArsenTD-Lev](https://staff.aub.edu.lb/~we07/Publications/ArSentD-LEV_Sentiment_Corpus.pdf), [LABR](https://github.com/mohamedadaly/LABR)), Named Entity Recognition with the [ANERcorp](http://curtis.ml.cmu.edu/w/courses/index.php/ANERcorp), and Arabic Question Answering on [Arabic-SQuAD and ARCD](https://github.com/husseinmozannar/SOQAL) # AraBERTv2 ## What's New! AraBERT now comes in 4 new variants to replace the old v1 versions: More Detail in the AraBERT folder and in the [README](https://github.com/aub-mind/arabert/blob/master/AraBERT/README.md) and in the [AraBERT Paper](https://arxiv.org/abs/2003.00104v2) Model | HuggingFace Model Name | Size (MB/Params)| Pre-Segmentation | DataSet (Sentences/Size/nWords) | ---|:---:|:---:|:---:|:---: AraBERTv0.2-base | [bert-base-arabertv02](https://huggingface.co/aubmindlab/bert-base-arabertv02) | 543MB / 136M | No | 200M / 77GB / 8.6B | AraBERTv0.2-large| [bert-large-arabertv02](https://huggingface.co/aubmindlab/bert-large-arabertv02) | 1.38G 371M | No | 200M / 77GB / 8.6B | AraBERTv2-base| [bert-base-arabertv2](https://huggingface.co/aubmindlab/bert-base-arabertv2) | 543MB 136M | Yes | 200M / 77GB / 8.6B | AraBERTv2-large| [bert-large-arabertv2](https://huggingface.co/aubmindlab/bert-large-arabertv2) | 1.38G 371M | Yes | 200M / 77GB / 8.6B | AraBERTv0.2-Twitter-base| [bert-base-arabertv02-twitter](https://huggingface.co/aubmindlab/bert-base-arabertv02-twitter) | 543MB / 136M | No | Same as v02 + 60M Multi-Dialect Tweets| AraBERTv0.2-Twitter-large| [bert-large-arabertv02-twitter](https://huggingface.co/aubmindlab/bert-large-arabertv02-twitter) | 1.38G / 371M | No | Same as v02 + 60M Multi-Dialect Tweets| AraBERTv0.1-base| [bert-base-arabertv01](https://huggingface.co/aubmindlab/bert-base-arabertv01) | 543MB 136M | No | 77M / 23GB / 2.7B | AraBERTv1-base| [bert-base-arabert](https://huggingface.co/aubmindlab/bert-base-arabert) | 543MB 136M | Yes | 77M / 23GB / 2.7B | All models are available in the `HuggingFace` model page under the [aubmindlab](https://huggingface.co/aubmindlab/) name. Checkpoints are available in PyTorch, TF2 and TF1 formats. ## Better Pre-Processing and New Vocab We identified an issue with AraBERTv1's wordpiece vocabulary. The issue came from punctuations and numbers that were still attached to words when learned the wordpiece vocab. We now insert a space between numbers and characters and around punctuation characters. The new vocabulary was learned using the `BertWordpieceTokenizer` from the `tokenizers` library, and should now support the Fast tokenizer implementation from the `transformers` library. **P.S.**: All the old BERT codes should work with the new BERT, just change the model name and check the new preprocessing function **Please read the section on how to use the [preprocessing function](#Preprocessing)** ## Bigger Dataset and More Compute We used ~3.5 times more data, and trained for longer. For Dataset Sources see the [Dataset Section](#Dataset) Model | Hardware | num of examples with seq len (128 / 512) |128 (Batch Size/ Num of Steps) | 512 (Batch Size/ Num of Steps) | Total Steps | Total Time (in Days) | ---|:---:|:---:|:---:|:---:|:---:|:---: AraBERTv0.2-base | TPUv3-8 | 420M / 207M | 2560 / 1M | 384/ 2M | 3M | - AraBERTv0.2-large | TPUv3-128 | 420M / 207M | 13440 / 250K | 2056 / 300K | 550K | 7 AraBERTv2-base | TPUv3-8 | 420M / 207M | 2560 / 1M | 384/ 2M | 3M | - AraBERTv2-large | TPUv3-128 | 520M / 245M | 13440 / 250K | 2056 / 300K | 550K | 7 AraBERT-base (v1/v0.1) | TPUv2-8 | - |512 / 900K | 128 / 300K| 1.2M | 4 # Dataset The pretraining data used for the new AraBERT model is also used for Arabic **GPT2 and ELECTRA**. The dataset consists of 77GB or 200,095,961 lines or 8,655,948,860 words or 82,232,988,358 chars (before applying Farasa Segmentation) For the new dataset we added the unshuffled OSCAR corpus, after we thoroughly filter it, to the previous dataset used in AraBERTv1 but with out the websites that we previously crawled: - OSCAR unshuffled and filtered. - [Arabic Wikipedia dump](https://archive.org/details/arwiki-20190201) from 2020/09/01 - [The 1.5B words Arabic Corpus](https://www.semanticscholar.org/paper/1.5-billion-words-Arabic-Corpus-El-Khair/f3eeef4afb81223df96575adadf808fe7fe440b4) - [The OSIAN Corpus](https://www.aclweb.org/anthology/W19-4619) - Assafir news articles. Huge thank you for Assafir for providing us the data # Preprocessing It is recommended to apply our preprocessing function before training/testing on any dataset. **Install the arabert python package to segment text for AraBERT v1 & v2 or to clean your data `pip install arabert`** ```python from arabert.preprocess import ArabertPreprocessor model_name="aubmindlab/bert-large-arabertv02" arabert_prep = ArabertPreprocessor(model_name=model_name) text = "ولن نبالغ إذا قلنا: إن هاتف أو كمبيوتر المكتب في زمننا هذا ضروري" arabert_prep.preprocess(text) >>> output: ولن نبالغ إذا قلنا : إن هاتف أو كمبيوتر المكتب في زمننا هذا ضروري ``` # TensorFlow 1.x models The TF1.x model are available in the HuggingFace models repo. You can download them as follows: - via git-lfs: clone all the models in a repo ```bash curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash sudo apt-get install git-lfs git lfs install git clone https://huggingface.co/aubmindlab/MODEL_NAME tar -C ./MODEL_NAME -zxvf /content/MODEL_NAME/tf1_model.tar.gz ``` where `MODEL_NAME` is any model under the `aubmindlab` name - via `wget`: - Go to the tf1_model.tar.gz file on huggingface.co/models/aubmindlab/MODEL_NAME. - copy the `oid sha256` - then run `wget https://cdn-lfs.huggingface.co/aubmindlab/aragpt2-base/INSERT_THE_SHA_HERE` (ex: for `aragpt2-base`: `wget https://cdn-lfs.huggingface.co/aubmindlab/aragpt2-base/3766fc03d7c2593ff2fb991d275e96b81b0ecb2098b71ff315611d052ce65248`) # If you used this model please cite us as : Google Scholar has our Bibtex wrong (missing name), use this instead ``` @inproceedings{antoun2020arabert, title={AraBERT: Transformer-based Model for Arabic Language Understanding}, author={Antoun, Wissam and Baly, Fady and Hajj, Hazem}, booktitle={LREC 2020 Workshop Language Resources and Evaluation Conference 11--16 May 2020}, pages={9} } ``` # Acknowledgments Thanks to TensorFlow Research Cloud (TFRC) for the free access to Cloud TPUs, couldn't have done it without this program, and to the [AUB MIND Lab](https://sites.aub.edu.lb/mindlab/) Members for the continuous support. Also thanks to [Yakshof](https://www.yakshof.com/#/) and Assafir for data and storage access. Another thanks for Habib Rahal (https://www.behance.net/rahalhabib), for putting a face to AraBERT. # Contacts **Wissam Antoun**: [Linkedin](https://www.linkedin.com/in/wissam-antoun-622142b4/) | [Twitter](https://twitter.com/wissam_antoun) | [Github](https://github.com/WissamAntoun) | <wfa07@mail.aub.edu> | <wissam.antoun@gmail.com> **Fady Baly**: [Linkedin](https://www.linkedin.com/in/fadybaly/) | [Twitter](https://twitter.com/fadybaly) | [Github](https://github.com/fadybaly) | <fgb06@mail.aub.edu> | <baly.fady@gmail.com>
[ -0.7123727798461914, -0.7203470468521118, 0.2938476502895355, 0.12618117034435272, -0.3482263386249542, -0.04463736712932587, -0.17535561323165894, -0.6088381409645081, 0.28015977144241333, 0.27346178889274597, -0.5755909085273743, -0.6705960035324097, -0.8044031858444214, 0.021670904010534286, -0.515815258026123, 1.24503755569458, -0.33636465668678284, 0.006299876607954502, 0.02814098633825779, -0.4774705767631531, -0.023987166583538055, -0.4408116042613983, -0.6009209156036377, -0.36176398396492004, 0.4134446084499359, 0.2911298871040344, 0.8770658373832703, 0.470076322555542, 0.3916274607181549, 0.3937534987926483, -0.23346611857414246, 0.06418515741825104, -0.17444874346256256, -0.19707271456718445, 0.20862360298633575, -0.18314491212368011, -0.4733556807041168, -0.11608481407165527, 0.6858320236206055, 0.49532127380371094, 0.0007811590330675244, 0.1100761741399765, -0.10589416325092316, 0.8268261551856995, -0.3037843704223633, -0.05221351981163025, -0.1400844156742096, -0.0785241425037384, -0.21205708384513855, 0.38183891773223877, -0.0022185184061527252, -0.42104479670524597, 0.3730071187019348, -0.4714328646659851, 0.11844909936189651, -0.026338959112763405, 1.3307502269744873, 0.2778867483139038, -0.18875226378440857, -0.3737792670726776, -0.3697516918182373, 0.8392597436904907, -0.8310553431510925, 0.5926263928413391, 0.34054630994796753, 0.009045986458659172, -0.060197144746780396, -0.8238379955291748, -0.7898034453392029, -0.22592607140541077, -0.08188752084970474, -0.004718424286693335, -0.3434005677700043, -0.06276659667491913, 0.07436337321996689, 0.4285688102245331, -0.5400908589363098, -0.09333286434412003, -0.49463987350463867, -0.3748006224632263, 0.6246910095214844, -0.33449190855026245, 0.3710418939590454, -0.18614669144153595, -0.42178580164909363, -0.524904727935791, -0.4729394316673279, 0.1652797907590866, 0.30872851610183716, 0.02482825145125389, -0.6237043142318726, 0.34420856833457947, 0.0108938692137599, 0.41162794828414917, 0.06149417161941528, -0.15873265266418457, 0.6395379900932312, -0.27587732672691345, -0.11201107501983643, 0.07983516901731491, 0.905022144317627, 0.13489285111427307, 0.3213592767715454, -0.012094438076019287, -0.0846439078450203, -0.03257159888744354, 0.012703136540949345, -1.1102614402770996, -0.34317877888679504, 0.44028034806251526, -0.48107683658599854, -0.23358024656772614, 0.039690930396318436, -0.6173059344291687, -0.13572072982788086, -0.1088574007153511, 0.4715593457221985, -0.9538565874099731, -0.3599064350128174, 0.10948535054922104, -0.24971437454223633, 0.44119369983673096, 0.40747326612472534, -0.5753050446510315, 0.30262529850006104, 0.5219910740852356, 0.9746570587158203, -0.024111343547701836, -0.27596431970596313, -0.12697924673557281, -0.3267417252063751, -0.18249720335006714, 0.5933032035827637, -0.3119467794895172, -0.3809581398963928, -0.05854092538356781, -0.061274584382772446, 0.07000869512557983, -0.5002347826957703, 0.7062973976135254, -0.5780476331710815, 0.38163304328918457, -0.4482654631137848, -0.5963663458824158, -0.4655102491378784, 0.19531208276748657, -0.5869080424308777, 1.164182186126709, 0.38199952244758606, -0.827575147151947, 0.13535673916339874, -0.8336746692657471, -0.36534345149993896, -0.1934167444705963, -0.031832024455070496, -0.6772284507751465, -0.16522939503192902, 0.4282909631729126, 0.24357277154922485, -0.1218593418598175, -0.06534616649150848, -0.05331841856241226, -0.1447286307811737, 0.3651004731655121, -0.08467724919319153, 0.9661899209022522, 0.2521176040172577, -0.4492177665233612, 0.0660613402724266, -0.722549319267273, 0.05609126761555672, 0.28986912965774536, -0.229035422205925, -0.06106293573975563, -0.08290474116802216, 0.26525160670280457, 0.38439038395881653, 0.3884281814098358, -0.6547744274139404, 0.12430495768785477, -0.5171205997467041, 0.3567473590373993, 0.747251033782959, -0.05814066529273987, 0.3208404779434204, -0.5764690637588501, 0.44863373041152954, 0.34291377663612366, 0.0931568518280983, -0.0027526633348315954, -0.43730059266090393, -1.0737308263778687, -0.38492152094841003, 0.45745640993118286, 0.44328808784484863, -0.7450291514396667, 0.472840815782547, -0.33934375643730164, -0.7697497010231018, -0.7561109662055969, 0.1179756224155426, 0.5339294075965881, 0.4066796898841858, 0.5344264507293701, -0.49880239367485046, -0.5079602003097534, -0.8937691450119019, -0.17074285447597504, -0.2588665187358856, 0.1342267394065857, 0.2833205461502075, 0.7362160682678223, -0.3917323350906372, 0.8469749689102173, -0.44519683718681335, -0.2658359110355377, -0.3009951114654541, 0.13531987369060516, 0.19385755062103271, 0.6247057914733887, 0.8559516072273254, -0.7373246550559998, -0.5217742919921875, -0.07089019566774368, -0.46472102403640747, 0.06124420464038849, 0.12845581769943237, -0.3055869936943054, 0.429649293422699, 0.2976129651069641, -0.71498703956604, 0.39006614685058594, 0.5683484673500061, -0.5434034466743469, 0.5201249122619629, 0.03561064600944519, 0.032631512731313705, -1.117010474205017, 0.10716497898101807, 0.04253454878926277, -0.22193533182144165, -0.5836362838745117, -0.02329845540225506, -0.10573267191648483, 0.16113653779029846, -0.582242488861084, 0.7975438833236694, -0.3726566433906555, 0.16512173414230347, -0.10352501273155212, -0.009663253091275692, 0.04002153128385544, 0.6049129962921143, -0.21753525733947754, 1.0012508630752563, 0.5073177814483643, -0.5832116603851318, 0.11048426479101181, 0.7560882568359375, -0.5368756055831909, -0.029723187908530235, -0.9348426461219788, 0.2614070475101471, -0.2766653001308441, 0.20620927214622498, -1.0238773822784424, -0.22669154405593872, 0.5027121305465698, -0.6788318753242493, 0.44390907883644104, -0.08737681806087494, -0.5234661102294922, -0.2533396780490875, -0.6016420125961304, 0.4029151201248169, 0.8090603947639465, -0.485784113407135, 0.5085477828979492, 0.30643531680107117, -0.31167420744895935, -0.6016180515289307, -0.5755322575569153, -0.2951138913631439, -0.16368432343006134, -0.8167246580123901, 0.6103237867355347, 0.0012972381664440036, -0.19617943465709686, 0.09530040621757507, -0.16074690222740173, -0.08008019626140594, 0.025219161063432693, 0.30880776047706604, 0.2772749662399292, -0.12368033081293106, 0.04542384669184685, 0.08895151317119598, -0.0002999287098646164, 0.08012429624795914, -0.20580795407295227, 0.802062451839447, -0.3573387861251831, -0.10851865261793137, -0.49259153008461, 0.23579031229019165, 0.6122183799743652, -0.5131441354751587, 1.0424411296844482, 1.0638676881790161, -0.3171027898788452, 0.12755824625492096, -0.5828737616539001, -0.17796294391155243, -0.5262250304222107, 0.4691970646381378, -0.17591693997383118, -0.9421625733375549, 0.5265610218048096, 0.03627043217420578, 0.28265032172203064, 0.7544544339179993, 0.5372751951217651, -0.00025604464462958276, 1.0126373767852783, 0.5637753009796143, -0.3373487889766693, 0.6841398477554321, -0.4502360224723816, 0.10727626085281372, -0.8248239159584045, -0.2924289107322693, -0.5202230215072632, -0.3831678628921509, -0.7372925877571106, -0.40319159626960754, 0.4740724265575409, -0.014573629014194012, -0.47675272822380066, 0.27119868993759155, -0.4677276313304901, 0.09152951091527939, 0.5736506581306458, 0.1768171489238739, -0.10341116786003113, 0.2761823236942291, -0.22665806114673615, -0.03836176544427872, -0.47040855884552, -0.5541653037071228, 0.9961219429969788, 0.43341535329818726, 0.361420214176178, 0.2452748566865921, 0.7321639657020569, 0.35024482011795044, 0.3493584990501404, -0.6426268815994263, 0.5060282945632935, -0.025656800717115402, -0.717402994632721, -0.189485564827919, -0.22143051028251648, -0.8551058769226074, 0.196679949760437, -0.1031356006860733, -0.8364502191543579, 0.0229946281760931, 0.005271122790873051, -0.3540586233139038, 0.2904049754142761, -0.6105127334594727, 0.8685422539710999, -0.2047276347875595, -0.3336731195449829, -0.18969540297985077, -0.8514273762702942, 0.11874408274888992, 0.00505193741992116, 0.21506744623184204, -0.2731704115867615, 0.04955307021737099, 1.2233047485351562, -0.8963677287101746, 0.5152817964553833, -0.31679755449295044, -0.00027593481354415417, 0.4740138649940491, -0.1256476491689682, 0.45282483100891113, -0.21851883828639984, -0.21418540179729462, 0.4700910747051239, 0.17463195323944092, -0.49906671047210693, -0.23764373362064362, 0.6460785865783691, -1.2896803617477417, -0.3672809302806854, -0.6602559685707092, -0.35120564699172974, -0.0036563409958034754, 0.2115948647260666, 0.31975632905960083, 0.40584492683410645, -0.2073684185743332, 0.06103580445051193, 0.4098851978778839, -0.3788478374481201, 0.40739706158638, 0.2148374319076538, -0.27008017897605896, -0.48107093572616577, 0.7191473841667175, 0.023400401696562767, 0.019516093656420708, 0.22014839947223663, 0.007643904071301222, -0.37772732973098755, -0.49096035957336426, -0.48828595876693726, 0.5194528102874756, -0.6282296776771545, -0.18728502094745636, -0.7481780648231506, -0.28508177399635315, -0.44972047209739685, -0.054521843791007996, -0.4068412184715271, -0.47601985931396484, -0.34361812472343445, 0.012750505469739437, 0.8042090535163879, 0.6091316938400269, -0.06496584415435791, 0.583332896232605, -0.8522555828094482, 0.16268235445022583, -0.07515521347522736, 0.19009210169315338, 0.010589593090116978, -0.8404140472412109, -0.2562052011489868, 0.19650478661060333, -0.6232633590698242, -0.8542094230651855, 0.5605012774467468, 0.23806309700012207, 0.10635653138160706, 0.5043052434921265, -0.12235469371080399, 0.7129412293434143, -0.6145151257514954, 0.8160302042961121, 0.11618589609861374, -0.9885294437408447, 0.42682865262031555, -0.14721982181072235, 0.3493623435497284, 0.6207955479621887, 0.6657270789146423, -0.6789840459823608, -0.07585592567920685, -0.6925684809684753, -0.9457547664642334, 0.8140376210212708, 0.47135061025619507, 0.0816231369972229, 0.019224530085921288, 0.4024033546447754, 0.14025461673736572, 0.23733451962471008, -0.5342196226119995, -0.6312087178230286, -0.2459527850151062, -0.3811245858669281, -0.009363594464957714, -0.31417927145957947, 0.00704260403290391, -0.5892927050590515, 1.0434622764587402, 0.23887068033218384, 0.6222568154335022, 0.4754626750946045, -0.16697387397289276, 0.014103385619819164, 0.18419283628463745, 0.4987756609916687, 0.546868085861206, -0.21778996288776398, -0.23111625015735626, 0.18252383172512054, -0.6255675554275513, -0.031033283099532127, 0.5919306874275208, -0.1657397747039795, 0.2633060812950134, 0.3509508967399597, 0.8098415732383728, 0.03372358903288841, -0.6665586233139038, 0.5472111105918884, -0.024393312633037567, -0.3184848427772522, -0.6132470369338989, 0.012304320931434631, 0.045322418212890625, 0.28620290756225586, 0.36325064301490784, 0.0794958844780922, 0.01228143647313118, -0.3830987513065338, 0.2049180418252945, 0.4440828859806061, -0.26164719462394714, -0.4990515410900116, 0.631108283996582, 0.025148559361696243, -0.18183138966560364, 0.7873269319534302, -0.22970245778560638, -0.9107098579406738, 0.6319147944450378, 0.3387373089790344, 0.7108659744262695, -0.20532000064849854, 0.18187573552131653, 0.5009268522262573, 0.13286127150058746, 0.17540611326694489, 0.5095956325531006, -0.049842093139886856, -0.8896329998970032, -0.28269580006599426, -0.8645023703575134, -0.2697320878505707, 0.23231542110443115, -0.5169687271118164, 0.19565655291080475, -0.5931064486503601, -0.24934235215187073, 0.2588796615600586, 0.2631787359714508, -0.854418158531189, 0.2167283594608307, 0.21236637234687805, 0.9285086989402771, -0.6907201409339905, 0.7729352712631226, 1.0223932266235352, -0.4659474194049835, -0.8268693685531616, -0.14427709579467773, 0.012807901948690414, -0.9848235249519348, 0.3440776467323303, 0.29509857296943665, 0.0380157046020031, 0.04091982915997505, -0.7254669666290283, -1.0280165672302246, 1.0769189596176147, 0.08072097599506378, -0.3349894881248474, -0.025564510375261307, 0.18822792172431946, 0.48137131333351135, -0.007171835750341415, 0.3270907998085022, 0.5930740833282471, 0.5735388994216919, 0.15702739357948303, -0.7500613927841187, 0.15819504857063293, -0.41221338510513306, -0.16782870888710022, 0.4702582359313965, -0.9389975070953369, 0.9616074562072754, -0.22854956984519958, -0.17242199182510376, 0.28954583406448364, 0.8329201340675354, 0.2192663997411728, 0.03496953845024109, 0.47094541788101196, 0.7776310443878174, 0.6893768906593323, -0.20673081278800964, 1.0815224647521973, -0.4271995723247528, 0.4049275517463684, 0.6834139823913574, 0.032930612564086914, 0.7252172827720642, 0.48260870575904846, -0.4815000891685486, 0.8231143951416016, 0.61545729637146, 0.06310077011585236, 0.47701844573020935, -0.045631520450115204, -0.3647081255912781, -0.04829713702201843, -0.15021510422229767, -0.62129145860672, 0.5341589450836182, 0.30247762799263, -0.41322702169418335, -0.21918931603431702, -0.14770399034023285, 0.589948296546936, -0.30344265699386597, -0.07860361784696579, 0.5978628396987915, 0.12372937798500061, -0.6010345220565796, 0.774837076663971, 0.37140265107154846, 0.6951084733009338, -0.6584035158157349, 0.09419750422239304, -0.11649181693792343, 0.359030544757843, -0.1739792376756668, -0.5784808397293091, 0.19126790761947632, 0.09103807061910629, 0.021151162683963776, -0.11732599139213562, 0.6997914910316467, -0.39922335743904114, -0.6317878365516663, 0.18991360068321228, 0.5842761397361755, 0.3758547902107239, -0.10823909193277359, -0.9879122972488403, 0.3318588435649872, 0.1921984851360321, -0.4150720536708832, 0.20550720393657684, 0.2821910083293915, 0.04072387143969536, 0.48669254779815674, 0.6663602590560913, -0.05514667555689812, -0.030281957238912582, -0.06329058855772018, 1.077401876449585, -0.6606159210205078, -0.28953802585601807, -1.0117119550704956, 0.5471529960632324, -0.03824198246002197, -0.5501424670219421, 0.7375771403312683, 0.5482335686683655, 1.005763053894043, 0.023741386830806732, 0.7644156217575073, -0.3129894435405731, 0.5145981907844543, -0.3083798587322235, 0.8403770923614502, -0.8072593808174133, -0.15465417504310608, -0.33184337615966797, -0.6959472894668579, -0.07413166016340256, 0.8328723311424255, -0.3209758698940277, 0.3176702558994293, 0.555755078792572, 0.7111318707466125, -0.03696570172905922, -0.09327087551355362, -0.15895086526870728, 0.3878939151763916, 0.3480871915817261, 0.47011351585388184, 0.5590095520019531, -0.803295373916626, 0.38496771454811096, -0.4363459348678589, -0.10965556651353836, -0.2792006731033325, -0.5909774899482727, -0.8511892557144165, -0.6359924077987671, -0.4040553867816925, -0.5407576560974121, 0.07985435426235199, 1.276112675666809, 0.60737544298172, -0.8749881982803345, -0.054878465831279755, 0.01060215663164854, 0.03480018302798271, 0.02591574937105179, -0.23654015362262726, 0.6290600299835205, -0.014112027361989021, -0.7688986659049988, 0.032593149691820145, -0.030125031247735023, 0.39933452010154724, 0.11254233121871948, -0.27434009313583374, -0.3448048532009125, 0.029927918687462807, 0.5214194655418396, 0.43106207251548767, -0.6496915221214294, -0.3262040615081787, -0.029939845204353333, 0.04131903126835823, 0.34463948011398315, 0.23591719567775726, -0.7001738548278809, 0.05315466597676277, 0.27813345193862915, 0.6119709014892578, 0.7542740702629089, 0.09657980501651764, 0.2036566436290741, -0.6457698941230774, 0.3607035279273987, 0.22371801733970642, 0.46216654777526855, 0.4959893822669983, -0.048420846462249756, 0.3970201909542084, -0.013667069375514984, -0.5464586615562439, -0.5977990627288818, 0.09884195029735565, -1.061354637145996, -0.14871981739997864, 1.1160255670547485, -0.12127600610256195, -0.3291788399219513, 0.19160036742687225, -0.32964038848876953, 0.5599509477615356, -0.528444230556488, 0.7172775864601135, 0.9309082627296448, -0.00326563254930079, -0.061549849808216095, -0.4036957323551178, 0.6387900114059448, 0.7400037050247192, -0.7107478976249695, -0.43924421072006226, 0.35626688599586487, 0.44646430015563965, 0.2429155856370926, 0.5803937315940857, -0.18884600698947906, 0.23448064923286438, -0.22747854888439178, 0.2601960599422455, -0.005690612830221653, -0.10457824170589447, -0.1637430042028427, -0.17664112150669098, 0.0378861203789711, -0.34796342253685 ]
danbrown/Lyriel-v1-5
danbrown
"2023-04-30T16:52:53Z"
30,651
1
diffusers
[ "diffusers", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
null
"2023-04-30T16:29:17Z"
Not official! This are diffusers weights for https://civitai.com/models/22922/lyriel Based on Stable Diffusion v1.5
[ -0.19061298668384552, -0.29265734553337097, 0.4615340232849121, 0.6402313709259033, -0.06957289576530457, -0.14849166572093964, 0.30045169591903687, -0.32596418261528015, 0.7342626452445984, 0.021956076845526695, -0.6239341497421265, 0.07384929060935974, -0.3355512320995331, -0.1917884647846222, -0.4771288335323334, 0.7084715366363525, -0.01920894905924797, 0.8460782766342163, 0.08192184567451477, -0.34963274002075195, 0.21539539098739624, 0.18612439930438995, -0.8389378786087036, -0.3203282356262207, 1.4796642065048218, 0.2995242476463318, 0.5164898633956909, 0.049508657306432724, 0.6025254726409912, 0.2725997567176819, -0.25841960310935974, -0.5213125944137573, -0.5779414176940918, -0.3808106482028961, 0.13887277245521545, -0.302298367023468, -0.6622574925422668, 0.09043043851852417, 0.6994144916534424, 0.29770970344543457, -0.5730834007263184, 0.6684055924415588, -0.08114517480134964, 0.5819256901741028, -0.9531173706054688, -0.1860082447528839, -0.013376880437135696, 0.11975829303264618, -0.45675793290138245, 0.05967801809310913, -0.30930131673812866, -0.3405532240867615, -0.02898065187036991, -0.6054044365882874, 0.5730961561203003, -0.2866518199443817, 1.3845303058624268, 0.20928122103214264, -0.28342702984809875, -0.4665294885635376, -0.7297406196594238, 0.547766923904419, -0.6071741580963135, 0.7438796162605286, -0.13774706423282623, 0.5340292453765869, -0.4136548340320587, -1.0622804164886475, -0.340230792760849, 0.08320894837379456, -0.0029566818848252296, 0.23851613700389862, -0.40780898928642273, -0.19461491703987122, 0.19145749509334564, 0.5502209663391113, -0.13229817152023315, -0.012138735502958298, -1.170474648475647, 0.25281164050102234, 0.5904869437217712, -0.3071301579475403, 0.20538659393787384, 0.5338457226753235, -0.778279721736908, 0.3818604350090027, -0.6451261639595032, 0.0038148469757288694, 0.10657484829425812, -0.020933447405695915, -0.771481454372406, 0.818731963634491, -0.2185933142900467, 0.6078240871429443, 1.0935834646224976, -0.11217357218265533, 0.44366222620010376, -0.18257565796375275, -0.4922078251838684, 0.24041295051574707, 0.5823366045951843, 0.4687991738319397, 0.28270643949508667, -0.3565702736377716, 0.22217482328414917, -0.6673316359519958, 0.28856411576271057, -1.2755508422851562, -0.4322504997253418, 0.24858184158802032, -0.6005297303199768, -0.9326143860816956, 0.668027400970459, -0.345365434885025, -0.45175275206565857, 0.38695913553237915, 0.6786893010139465, 0.36322134733200073, -0.6801965832710266, -0.17691214382648468, -0.34246301651000977, 0.19046401977539062, 0.6854930520057678, -0.5803444981575012, 0.35091227293014526, 0.14152464270591736, 0.7528142929077148, 0.24028602242469788, 0.3002888858318329, -0.14789752662181854, 0.0778418481349945, -0.04159094765782356, 0.6399404406547546, -0.10568475723266602, -0.5257458686828613, -0.010416933335363865, 0.9116571545600891, 0.06993190944194794, -0.4735647141933441, 1.3340632915496826, -1.097224235534668, 0.19480887055397034, -0.7556646466255188, -0.6639348268508911, -0.01620900072157383, -0.13656584918498993, -1.0394508838653564, 1.0267612934112549, 0.44805341958999634, -1.2098143100738525, 0.7513449192047119, -0.5048742294311523, 0.007902122102677822, 0.39119917154312134, 0.08781784027814865, -0.3709436058998108, 0.5313546657562256, -0.68928062915802, 0.08437386900186539, 0.01878003589808941, -0.2770916819572449, -0.39212939143180847, -0.47140416502952576, 0.3263099789619446, -0.4134606420993805, 0.9238024353981018, 0.5130772590637207, -0.07494708895683289, 0.3574865162372589, -0.8373209238052368, 0.16826415061950684, -0.0009758552769199014, -0.5243198275566101, -0.0035725864581763744, -0.16144311428070068, -0.09998538345098495, 0.18089812994003296, 0.5571115016937256, -0.5230802297592163, 0.1693767011165619, 0.4320370554924011, 0.02123924344778061, 0.510114312171936, 0.30990344285964966, 0.4470861852169037, -0.5284143686294556, 0.9640042185783386, -0.14482073485851288, 0.22076009213924408, 0.6609204411506653, -0.818435788154602, -0.9076929092407227, -0.585117757320404, 0.6739459037780762, 0.17781472206115723, -0.4299085736274719, 0.3850124478340149, -0.19478030502796173, -1.1321685314178467, -0.5944894552230835, -0.03331230208277702, 0.04862336814403534, 0.3024826645851135, -0.09938071668148041, -0.028075534850358963, -0.39738035202026367, -0.9208104014396667, -0.12869682908058167, 0.05919107049703598, -0.011027379892766476, -0.5085644125938416, 0.4975871443748474, 0.11797349154949188, 0.7616464495658875, -0.4691420793533325, -0.29729047417640686, -0.1274126172065735, 0.2268458902835846, 0.4297398626804352, 0.5058012008666992, 1.0200003385543823, -0.8560536503791809, -0.785805344581604, -0.1635737270116806, -0.33468353748321533, -0.3477097153663635, 0.15317341685295105, -0.36689096689224243, -0.5228378176689148, 0.5365173816680908, -0.7236059308052063, 0.4195387065410614, 1.0597355365753174, -0.47285982966423035, 0.24594588577747345, -0.49967873096466064, -0.06278134882450104, -0.9334704279899597, 0.03349107503890991, 0.5150592923164368, -0.5553328990936279, -0.8392239212989807, 0.24160084128379822, 0.48705023527145386, 0.8860647082328796, -1.0260968208312988, 0.7403958439826965, -0.931627631187439, 0.38864654302597046, -0.2311941683292389, -0.3504040837287903, -0.03004114329814911, 0.13027597963809967, -0.1572462022304535, 0.8743903636932373, 0.5788700580596924, -0.6900122761726379, 0.4969117343425751, -0.15163426101207733, -0.18014873564243317, 0.5816118121147156, -0.9636034369468689, -0.4304015040397644, -0.09000367671251297, 0.4373210668563843, -0.7837048172950745, -0.4663585424423218, 0.7466470003128052, -0.34388235211372375, 0.03395528346300125, -0.40483012795448303, -0.041320864111185074, -0.48365628719329834, -0.4972432553768158, 0.6123906970024109, 0.41790342330932617, -0.5608774423599243, 0.4207168221473694, 0.16059136390686035, 0.08367623388767242, -0.17187422513961792, -1.041703462600708, -0.6050798296928406, -0.3432799279689789, -0.5622267127037048, 0.4425359070301056, -0.11542996764183044, -0.9184572100639343, -0.07691743224859238, -0.4192453920841217, -0.6488515734672546, -0.43939435482025146, 0.5056727528572083, -0.2840741276741028, -0.1313435435295105, -0.17661069333553314, 0.23235715925693512, 0.14203901588916779, 0.16080492734909058, 0.0522257499396801, 0.20770469307899475, -0.031654153019189835, -0.1639818698167801, -0.7498666644096375, -0.18516364693641663, 0.5359953045845032, 0.24698667228221893, 1.2153773307800293, 0.8308011889457703, -0.6061861515045166, 0.2178490310907364, -0.9766806364059448, 0.2566656172275543, -0.5928929448127747, -0.18629154562950134, -0.5162186026573181, -0.3424569070339203, 0.6752668619155884, 0.016140412539243698, -0.30253511667251587, 0.9881502985954285, 0.7009817957878113, 0.0898439958691597, 1.0260578393936157, 0.4872165322303772, 0.3731628656387329, 0.4587245583534241, -0.5354516506195068, -0.10401690751314163, -0.8455470204353333, -0.4103579819202423, -0.39521917700767517, -0.7202192544937134, -0.38224169611930847, -0.9175771474838257, 0.29527905583381653, 0.6460781693458557, -0.16609978675842285, 0.13610097765922546, -0.4397084414958954, 0.6221747398376465, 0.525669276714325, 0.07961582392454147, 0.39326146245002747, -0.0314895361661911, 0.2925989329814911, 0.007350225932896137, -0.638375461101532, -0.2792637348175049, 0.6160440444946289, 0.3666682839393616, 1.0986307859420776, 0.338971883058548, 0.5399125814437866, 0.4411342144012451, 0.6783506274223328, -0.5813966989517212, 0.18351635336875916, 0.20640398561954498, -1.1344307661056519, -0.024740003049373627, -0.4469425082206726, -1.0051333904266357, 0.3617400825023651, -0.29107141494750977, -0.38568204641342163, 0.5516274571418762, -0.1020975112915039, -0.07170615345239639, 0.3588486611843109, -0.600100576877594, 0.7978979349136353, -0.4580169916152954, -0.37346702814102173, -0.0631200298666954, -0.12767855823040009, 0.4594421982765198, 0.23469766974449158, 0.2877151370048523, -0.019526058807969093, -0.10462909936904907, 0.4134097099304199, -0.9240949749946594, 0.4453374445438385, -0.703230082988739, -0.3456255793571472, 0.2985464930534363, -0.11749430000782013, 0.5703504681587219, 0.41086655855178833, -0.6214630007743835, -0.08762311935424805, 0.2623600959777832, -0.6434483528137207, -0.20736905932426453, 1.0467056035995483, -0.5278452038764954, 0.10376366972923279, -0.9155303239822388, 0.3305326998233795, 0.6610862612724304, 0.29619455337524414, 0.8132685422897339, 0.6287325024604797, -0.7430711388587952, -0.09749410301446915, 0.9307721853256226, 0.5100184082984924, 0.45452880859375, 0.7428885698318481, -0.35560616850852966, -0.5128889083862305, 0.7052509188652039, 0.21124321222305298, 0.3218623399734497, 0.4954518973827362, 0.21329081058502197, -0.05766305327415466, -0.5419340133666992, -0.7201278209686279, 0.4376203119754791, -0.4248391389846802, 0.030952589586377144, -0.3414897620677948, -0.41973012685775757, -0.19957511126995087, -0.3187731206417084, -0.32257798314094543, -0.692666232585907, -0.5383478999137878, -0.12688350677490234, 0.5745593309402466, 1.356733798980713, 0.10603492707014084, 0.7829573750495911, -0.5486912131309509, 0.07741702347993851, 0.24053122103214264, 0.6360535025596619, -0.3987600803375244, -0.7478386759757996, -0.5127078890800476, 0.22343233227729797, -0.4440208673477173, -0.9457216262817383, 0.22635512053966522, 0.1973857581615448, 0.5501235723495483, 1.315004825592041, -0.27021417021751404, 0.8510190844535828, -0.5079850554466248, 0.9051499366760254, 0.509108304977417, -0.5407021641731262, 0.06252793967723846, -0.36795318126678467, 0.4810860753059387, 0.6342198252677917, 0.4901126027107239, -0.12225322425365448, -0.1942574679851532, -0.9582107067108154, -0.5979467034339905, 0.5014894604682922, 0.41290199756622314, 0.04425438493490219, 0.2731850743293762, 0.7330771088600159, 0.2717534005641937, 0.34202179312705994, -1.0225390195846558, -0.6531779170036316, 0.2660585641860962, -0.4664125144481659, 0.2590065002441406, -0.48870426416397095, -0.22451351583003998, -0.6869953274726868, 0.7365913391113281, -0.04999919608235359, 0.10387563705444336, 0.36324799060821533, -0.006188514176756144, -0.5580090284347534, -0.1117745190858841, 1.0556540489196777, 1.0136040449142456, -0.7645451426506042, -0.08079222589731216, 0.2457704246044159, -0.6997023224830627, 0.03770912438631058, 0.13035990297794342, -0.19037963449954987, 0.20595785975456238, 0.04703144356608391, 0.47780826687812805, 0.5036966800689697, -0.24625051021575928, 0.7218320369720459, -0.6635981202125549, -0.14823780953884125, -1.2490233182907104, 0.13427487015724182, 0.00957615114748478, 0.5548334717750549, 0.41435879468917847, 0.10590715706348419, 0.3950602114200592, -0.20668968558311462, -0.17043712735176086, 0.7050884366035461, -0.6762984395027161, -0.9295846819877625, 1.1282695531845093, 0.42867618799209595, -0.21371008455753326, 0.04979066923260689, -0.7636322975158691, 0.24640241265296936, 0.28464576601982117, 0.20964591205120087, 1.021828532218933, -0.4307607114315033, 0.49914446473121643, 0.44552308320999146, -0.04603901505470276, -0.5167452096939087, 0.7409387230873108, -0.04644722864031792, -0.41184762120246887, -0.020107608288526535, -0.8014894127845764, -0.3063049018383026, -0.31856831908226013, -0.9996561408042908, 0.6885492205619812, -0.5819517970085144, -0.44242414832115173, -0.3274911642074585, -0.07572159916162491, -0.44690901041030884, 0.5530359745025635, 0.19063866138458252, 1.6734724044799805, -0.5812839865684509, 1.2465574741363525, 0.6179267168045044, -0.4513682425022125, -0.711238443851471, -0.006227960344403982, -0.2886924147605896, -0.4381631314754486, 0.48495879769325256, -0.18200930953025818, -0.07307565957307816, -0.17096148431301117, -0.652952253818512, -1.257513165473938, 1.4659295082092285, -0.026066483929753304, -0.5016783475875854, -0.595322847366333, -0.3599892556667328, 0.6156167984008789, -0.2667999565601349, 0.5646385550498962, -0.024587053805589676, 0.8528268933296204, 0.4141547679901123, -1.0049388408660889, -0.27428877353668213, -0.712928831577301, -0.09630735218524933, 0.32652348279953003, -1.2624154090881348, 0.9741358160972595, 0.15583863854408264, 0.055047981441020966, 0.8402274250984192, 0.8962488770484924, 0.3683251142501831, 0.35093972086906433, 0.47375503182411194, 0.8230009078979492, 0.7946877479553223, -0.28029945492744446, 1.3072762489318848, -0.3961615264415741, 0.31595680117607117, 0.9809050559997559, -0.4429963529109955, 0.7473435401916504, 0.6543807983398438, -0.21736322343349457, 0.9216282963752747, 0.6465800404548645, -0.2626497447490692, 0.4886806607246399, 0.42915207147598267, -0.634752631187439, 0.20016920566558838, 0.02701718732714653, -0.8202716708183289, 0.0631856918334961, 0.23027262091636658, -0.6592661142349243, -0.09496588259935379, -0.4996638894081116, 0.27247655391693115, -0.6528404951095581, -0.5300547480583191, 0.3496520519256592, 0.010782807134091854, -0.4500091075897217, 0.5687072277069092, 0.17000441253185272, 0.6651119589805603, -1.0181114673614502, 0.06432021409273148, 0.3654676675796509, 0.500018835067749, -0.40226754546165466, -0.4279594421386719, -0.05335007235407829, -0.053058236837387085, -0.3351626694202423, -0.2942933738231659, 0.7516000866889954, -0.3997630178928375, -1.4459422826766968, 0.08405575156211853, 0.2934308648109436, 0.12488280236721039, 0.15016993880271912, -0.5830454230308533, 0.18034727871418, -0.14961323142051697, -0.39474740624427795, 0.050923895090818405, 0.11097162961959839, 0.24801339209079742, 0.4812823235988617, 0.07688829302787781, 0.638968288898468, 0.5941317081451416, 0.41654109954833984, 0.6319150924682617, -0.41464290022850037, -0.35093313455581665, -0.1735057830810547, 0.8868461847305298, -0.3720613420009613, -0.5438326001167297, 1.0878143310546875, 0.8660245537757874, 0.5642669796943665, -0.3583768904209137, 0.5328962206840515, -0.5284612774848938, 0.37680119276046753, -0.6099708676338196, 1.0462194681167603, -0.7209274172782898, 0.006277171429246664, -0.09074808657169342, -1.2069412469863892, -0.10502788424491882, 0.639788806438446, 0.405740886926651, 0.4899880588054657, 0.33235880732536316, 0.5748956799507141, -0.21122223138809204, 0.012973730452358723, -0.11333216726779938, 0.6775379180908203, 0.27573519945144653, -0.40445107221603394, 0.4810671806335449, -0.7232065200805664, 0.1738009750843048, -0.39837533235549927, -0.6003004312515259, -0.09025390446186066, -0.8221234679222107, -0.8946505188941956, -0.307998925447464, -0.6895162463188171, -0.5360644459724426, 0.09927648305892944, 0.7066208124160767, 1.064217209815979, -0.7346283197402954, -0.12675383687019348, -0.43395429849624634, -0.11675246804952621, 0.005415220744907856, -0.34005987644195557, -0.07156691700220108, 0.5090904831886292, -0.8789893388748169, 0.6726443767547607, -0.23520731925964355, 0.6211962103843689, -0.6222829818725586, 0.015089631080627441, -0.2576565742492676, 0.2594766318798065, 0.04997725784778595, 0.45742106437683105, -0.6395817399024963, -0.21784313023090363, -0.26415470242500305, -0.10055513679981232, -0.13667824864387512, 0.4691290855407715, -0.7146868705749512, -0.1725051999092102, 1.0387415885925293, -0.7096261382102966, 0.46071749925613403, 0.3142393231391907, 0.4125669598579407, -0.7569687962532043, 0.3516213595867157, -0.18410645425319672, 0.6135656833648682, -0.053712148219347, -0.1339699774980545, 0.43878674507141113, 0.15336281061172485, -0.7608121633529663, -0.7688885927200317, 0.08743348717689514, -1.6392894983291626, 0.1642865687608719, 1.0324779748916626, 0.08077432960271835, -0.5210887789726257, 0.5832799673080444, -0.6841573715209961, 0.026401326060295105, -0.2788804769515991, 0.43974560499191284, 0.6705883741378784, 0.028130417689681053, -0.3450804054737091, -0.5850088000297546, 0.5580747723579407, -0.021239276975393295, -0.3218773901462555, -0.5451672673225403, 0.11339481174945831, 0.5795465707778931, 0.6451425552368164, 0.47298651933670044, -0.2570022642612457, 0.2685851454734802, -0.08351036161184311, 0.16883215308189392, 0.3606598675251007, -0.16681434214115143, -0.28992345929145813, 0.020807234570384026, 0.28201648592948914, -0.0805293545126915 ]
saattrupdan/wav2vec2-xls-r-300m-ftspeech
saattrupdan
"2023-09-11T13:27:55Z"
30,600
0
transformers
[ "transformers", "pytorch", "safetensors", "wav2vec2", "automatic-speech-recognition", "da", "dataset:ftspeech", "base_model:facebook/wav2vec2-xls-r-300m", "license:other", "model-index", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
"2022-03-04T14:53:05Z"
--- language: - da license: other datasets: - ftspeech metrics: - wer tasks: - automatic-speech-recognition base_model: facebook/wav2vec2-xls-r-300m model-index: - name: wav2vec2-xls-r-300m-ftspeech results: - task: type: automatic-speech-recognition dataset: name: Danish Common Voice 8.0 type: mozilla-foundation/common_voice_8_0 args: da metrics: - type: wer value: 17.91 - task: type: automatic-speech-recognition dataset: name: Alvenir ASR test dataset type: Alvenir/alvenir_asr_da_eval metrics: - type: wer value: 13.84 --- # XLS-R-300m-FTSpeech ## Model description This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the [FTSpeech dataset](https://ftspeech.github.io/), being a dataset of 1,800 hours of transcribed speeches from the Danish parliament. ## Performance The model achieves the following WER scores (lower is better): | **Dataset** | **WER without LM** | **WER with 5-gram LM** | | :---: | ---: | ---: | | [Danish part of Common Voice 8.0](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/viewer/da/train) | 20.48 | 17.91 | | [Alvenir test set](https://huggingface.co/datasets/Alvenir/alvenir_asr_da_eval) | 15.46 | 13.84 | ## License The use of this model needs to adhere to [this license from the Danish Parliament](https://www.ft.dk/da/aktuelt/tv-fra-folketinget/deling-og-rettigheder).
[ -0.4766838252544403, -0.5762230753898621, 0.10029392689466476, 0.41140446066856384, -0.4047868549823761, -0.07713937014341354, -0.4049381911754608, -0.28426361083984375, 0.1126704290509224, 0.6229292154312134, -0.6391620635986328, -0.5235913991928101, -0.6403921246528625, 0.1346302628517151, -0.4132680296897888, 0.67266446352005, 0.1473543494939804, 0.5349176526069641, -0.1814097762107849, -0.32224783301353455, -0.20350557565689087, -0.5494767427444458, -0.6659020781517029, -0.3460066318511963, 0.4516569972038269, 0.6042300462722778, 0.5308297872543335, 0.5494886636734009, 0.1956058293581009, 0.26260319352149963, -0.611536979675293, -0.11800822615623474, -0.7612569332122803, -0.21016471087932587, -0.13935421407222748, -0.16865825653076172, -0.7410834431648254, 0.06650195270776749, 0.7861299514770508, 0.5189433693885803, -0.7254642248153687, 0.35146379470825195, 0.2401597499847412, 0.6867604851722717, -0.07170018553733826, 0.28077295422554016, -0.40492337942123413, -0.2943948805332184, -0.060986340045928955, 0.26301681995391846, -0.38104310631752014, -0.12543125450611115, 0.030589960515499115, -0.45688867568969727, 0.22496336698532104, 0.06096168980002403, 0.9441535472869873, 0.13749666512012482, -0.36530545353889465, -0.09329725056886673, -0.7054876089096069, 0.8168767094612122, -0.8679875135421753, 0.9038563370704651, 0.5438766479492188, 0.5245226621627808, -0.026298535987734795, -0.8612885475158691, -0.5725092887878418, -0.23021329939365387, 0.1395588368177414, 0.14965833723545074, -0.47853925824165344, 0.04812360182404518, 0.39505746960639954, 0.3611684739589691, -0.7054979801177979, -0.08051342517137527, -0.9789714217185974, -0.17433862388134003, 0.9091355204582214, 0.02592463791370392, 0.09992322325706482, -0.1764884889125824, -0.26721489429473877, -0.4170131981372833, -0.2121783345937729, 0.22820405662059784, 0.3941021263599396, 0.6517589092254639, -0.6290230751037598, 0.665087103843689, -0.3336693346500397, 0.5613850951194763, 0.26326900720596313, 0.06604143977165222, 0.5041990876197815, -0.14550094306468964, -0.09018007665872574, 0.164828360080719, 0.8488180637359619, 0.369017630815506, 0.32224252820014954, 0.31740227341651917, -0.4264901578426361, -0.00008103736763587222, 0.24162833392620087, -0.9384617209434509, -0.2931147813796997, 0.1263720989227295, -0.7089576125144958, 0.06634858250617981, 0.11623500287532806, -0.41480752825737, 0.10927171260118484, -0.7264363765716553, 0.6039556264877319, -0.47575661540031433, -0.5094351768493652, 0.2276671677827835, 0.006803708616644144, 0.18219952285289764, 0.14621242880821228, -0.4894988536834717, 0.634465754032135, 0.5390048623085022, 0.7800262570381165, -0.0683412253856659, -0.014525368809700012, -0.6320720911026001, -0.29664304852485657, -0.3325287699699402, 0.6778055429458618, -0.2565792500972748, -0.7839552164077759, -0.22933845221996307, 0.17214807868003845, -0.055397599935531616, -0.5595822930335999, 0.7888635396957397, -0.24426405131816864, 0.42426228523254395, -0.3965299725532532, -0.9220997095108032, -0.2648215591907501, -0.20812851190567017, -0.9263172745704651, 1.2148329019546509, 0.3053130805492401, -0.4322413206100464, 0.33224159479141235, -0.7487180233001709, -0.24498394131660461, -0.04871407151222229, -0.0750901848077774, -0.5203272700309753, 0.07917533069849014, -0.05754399672150612, 0.571267306804657, -0.16737225651741028, 0.2600722312927246, -0.3624562919139862, -0.3898341953754425, -0.005609343759715557, -0.3319246470928192, 0.682617723941803, 0.47202908992767334, -0.14142444729804993, 0.16659176349639893, -1.1714116334915161, 0.09279873222112656, -0.02140834927558899, -0.6002429723739624, 0.13809609413146973, -0.01118459552526474, 0.7701849937438965, 0.43941524624824524, 0.1466093808412552, -0.7317866086959839, -0.1581033170223236, -0.4147276282310486, 0.06376798450946808, 0.5964322090148926, -0.2141198217868805, 0.09926825016736984, -0.517056941986084, 0.6827330589294434, -0.16671590507030487, 0.19854527711868286, 0.45627087354660034, -0.41457483172416687, -0.41420701146125793, -0.564617931842804, 0.4775735139846802, 0.6050540804862976, -0.22204576432704926, 0.5558998584747314, -0.3181900680065155, -0.6919807195663452, -0.614506185054779, 0.07473485171794891, 0.41015881299972534, 0.4392530620098114, 0.3897930383682251, -0.27322855591773987, -0.5840112566947937, -1.27225923538208, -0.324413001537323, -0.03644333779811859, -0.19384215772151947, 0.6155933737754822, 0.4148947298526764, -0.05255239084362984, 0.804412305355072, -0.21734118461608887, -0.06634818017482758, -0.41202810406684875, 0.12567678093910217, 0.49785640835762024, 0.3422762453556061, 0.5656710863113403, -0.983697235584259, -0.7807689905166626, -0.2318965047597885, -0.23380376398563385, -0.27814075350761414, 0.2557310163974762, 0.19858449697494507, 0.28697142004966736, 0.485732764005661, -0.4146631956100464, 0.6010916233062744, 0.7300300598144531, -0.6851696372032166, 0.5946246385574341, 0.11518137156963348, 0.20607630908489227, -1.398608684539795, 0.27211904525756836, -0.02468348667025566, -0.48917073011398315, -0.4249587953090668, -0.31362441182136536, 0.07133669406175613, -0.04102702811360359, -0.8159692287445068, 0.7049646377563477, -0.3675937056541443, 0.06211550161242485, -0.2838749885559082, -0.1284056007862091, -0.10252280533313751, 0.3789701759815216, -0.01731138490140438, 0.9746589064598083, 0.4873984456062317, -0.48726192116737366, 0.2894566059112549, 0.6741327047348022, -0.705879271030426, 0.5957090854644775, -0.9264499545097351, 0.13228526711463928, 0.10833533853292465, 0.2853758633136749, -0.9166481494903564, -0.33226969838142395, -0.02664894051849842, -0.695833683013916, 0.49524831771850586, 0.07372763752937317, -0.4078330099582672, -0.42127537727355957, -0.08807239681482315, 0.25084763765335083, 0.6580857634544373, -0.47133946418762207, 0.6378811001777649, 0.32134830951690674, -0.48266083002090454, -0.42179661989212036, -0.5320876240730286, -0.009486719034612179, -0.13084815442562103, -0.6745854020118713, 0.2101583629846573, -0.14224618673324585, -0.2200535237789154, 0.0781191736459732, -0.3589380085468292, -0.04085245355963707, -0.24748624861240387, 0.4098668694496155, 0.11134997010231018, -0.2652992904186249, -0.2717510163784027, -0.03112439252436161, 0.006582908798009157, -0.007492886856198311, 0.288723886013031, 0.5310341119766235, -0.07457340508699417, -0.1657898724079132, -0.8518432974815369, 0.6654950976371765, 0.6262410283088684, 0.1388578861951828, 0.8418030738830566, 0.6267731189727783, -0.4815307557582855, -0.21948958933353424, -0.6900634765625, -0.13814593851566315, -0.49485042691230774, 0.5799949169158936, -0.4635099470615387, -0.9943057894706726, 0.6027065515518188, 0.09957262873649597, -0.17881789803504944, 0.7569308876991272, 0.48247793316841125, 0.017016535624861717, 1.1359915733337402, 0.49406352639198303, -0.19868242740631104, 0.41955748200416565, -0.21319079399108887, -0.10036670416593552, -0.6637179255485535, -0.2922874391078949, -0.6692866086959839, -0.16151577234268188, -0.5715828537940979, -0.3123674690723419, 0.26143762469291687, 0.2834615409374237, -0.39378684759140015, 0.45634326338768005, -0.477046400308609, 0.310749351978302, 0.5189204812049866, 0.06463343650102615, -0.15497399866580963, 0.17839156091213226, -0.4512072801589966, -0.026620900258421898, -0.6487575769424438, -0.6972196698188782, 0.997100293636322, 0.4715549647808075, 0.7255813479423523, 0.1840224266052246, 0.4478224515914917, 0.3497971296310425, 0.12335402518510818, -0.588611364364624, 0.5776180624961853, -0.5374816060066223, -0.7414699196815491, -0.20491378009319305, -0.465275377035141, -0.7009890079498291, 0.037968747317790985, 0.007057605776935816, -0.8693546056747437, 0.0541955828666687, 0.23078133165836334, -0.322361022233963, 0.1944075971841812, -0.4609754681587219, 0.712824821472168, -0.004697948228567839, -0.14262071251869202, -0.3893221914768219, -0.67403644323349, -0.0456124022603035, 0.06286550313234329, 0.27397164702415466, -0.20996257662773132, 0.3580149710178375, 1.0697840452194214, -0.437470406293869, 0.6973064541816711, -0.45875483751296997, -0.14488746225833893, 0.3818137049674988, -0.22218021750450134, 0.5148218274116516, -0.25488197803497314, -0.3826620876789093, 0.46414220333099365, 0.2531821131706238, -0.19806894659996033, -0.11460792273283005, 0.668344259262085, -0.8671184778213501, -0.29484909772872925, -0.34011220932006836, -0.39349666237831116, -0.24704401195049286, 0.08042724430561066, 0.47403982281684875, 0.4994491636753082, -0.6526870131492615, 0.5720725655555725, 0.5027072429656982, -0.34170493483543396, 0.21614380180835724, 0.8043208718299866, -0.2519749402999878, -0.8218240141868591, 0.6570379734039307, 0.18100406229496002, 0.3881292939186096, 0.0934772938489914, 0.15490412712097168, -0.7682782411575317, -0.19531653821468353, -0.20123952627182007, 0.28947266936302185, -0.5208936929702759, -0.018932996317744255, -0.6893020272254944, -0.41822725534439087, -0.5723308324813843, 0.1983354240655899, -0.6167851686477661, -0.5906896591186523, -0.6523219347000122, -0.33127132058143616, 0.6774190664291382, 0.8881307244300842, -0.6809669137001038, 0.40858325362205505, -0.7348320484161377, 0.6621356010437012, 0.22811082005500793, 0.6593665480613708, -0.30093449354171753, -1.0386505126953125, -0.24312010407447815, 0.24247224628925323, -0.17754817008972168, -0.8013637661933899, 0.4725123643875122, 0.28671789169311523, 0.5187583565711975, 0.25314396619796753, -0.15097194910049438, 0.6093661189079285, -0.7350766062736511, 1.0156223773956299, 0.19584865868091583, -0.9336033463478088, 0.27824389934539795, -0.6403812170028687, 0.22762097418308258, 0.6290856003761292, 0.09127741307020187, -0.6046678423881531, -0.10376954823732376, -0.6057464480400085, -1.1323243379592896, 1.0462274551391602, 0.30130723118782043, 0.1606619656085968, 0.12486137449741364, 0.4169459342956543, 0.12236054241657257, 0.18651066720485687, -0.47199195623397827, -0.37049683928489685, -0.2518416941165924, -0.3322032690048218, -0.4009835124015808, -0.543487012386322, 0.021690228953957558, -0.6271097660064697, 1.0811675786972046, 0.19005253911018372, 0.2905367910861969, 0.18920820951461792, 0.23681208491325378, -0.42357397079467773, 0.3525615334510803, 0.8994197249412537, 0.5550169944763184, -0.5052236318588257, -0.28803160786628723, 0.1906084418296814, -0.5862056612968445, -0.0367744117975235, 0.3469921946525574, 0.2984692454338074, 0.18251043558120728, 0.17833492159843445, 1.2193470001220703, 0.16844381392002106, -0.5572720170021057, 0.5063275098800659, -0.24787770211696625, -0.6339821815490723, -0.6203486323356628, 0.1213918924331665, 0.5066184997558594, 0.3221953213214874, 0.4114290177822113, -0.15963490307331085, 0.093302883207798, -0.0630781501531601, 0.5978266000747681, 0.2782815396785736, -0.6946531534194946, -0.4183817207813263, 1.0467822551727295, -0.008589931763708591, -0.5174051523208618, 0.3694762885570526, -0.10793663561344147, -0.40510424971580505, 0.5999835133552551, 0.538780927658081, 0.911992073059082, -0.6505537629127502, 0.02157585322856903, 0.473662406206131, 0.11888151615858078, -0.44857317209243774, 1.1274745464324951, 0.07246124744415283, -0.4617557227611542, -0.4375232458114624, -1.0407030582427979, -0.23986242711544037, 0.5035225749015808, -1.3220328092575073, 0.3459238111972809, -0.1344321221113205, -0.23383255302906036, 0.20631475746631622, -0.027936039492487907, -0.8412544131278992, 0.41066887974739075, 0.25984907150268555, 1.3885301351547241, -0.8890480399131775, 0.8518157005310059, 0.5737629532814026, -0.013397502712905407, -1.2877894639968872, -0.30404865741729736, 0.17361217737197876, -0.6687671542167664, 0.4310576021671295, 0.21352462470531464, -0.1492781639099121, 0.01284183282405138, -0.8722372651100159, -0.8892509341239929, 0.9562356472015381, 0.3385620415210724, -1.3232085704803467, 0.49915632605552673, 0.12978218495845795, 0.4695366322994232, -0.35879868268966675, -0.14687207341194153, 0.37278684973716736, 0.47684434056282043, 0.1655593067407608, -1.5321719646453857, -0.20740000903606415, -0.4489293098449707, -0.19830945134162903, -0.06728268414735794, -0.9262381196022034, 1.0662652254104614, 0.05119497701525688, -0.07589882612228394, 0.3115774095058441, 0.6449585556983948, 0.27638018131256104, 0.3436373174190521, 0.7920131087303162, 0.7365804314613342, 0.5379106402397156, 0.1619240641593933, 0.9401893019676208, -0.267147421836853, 0.4745892286300659, 1.3556568622589111, -0.5253951549530029, 1.0479456186294556, 0.40836307406425476, -0.2544177770614624, 0.3423297703266144, 0.5536064505577087, -0.04294966533780098, 0.5974488258361816, 0.3171526789665222, -0.1969563215970993, -0.3838796317577362, -0.018976286053657532, -0.4723345637321472, 0.6190632581710815, 0.3753919005393982, -0.2287408858537674, 0.11592787504196167, -0.14078369736671448, -0.04076823219656944, 0.21056915819644928, -0.22574464976787567, 0.9369542598724365, 0.2762520909309387, -0.27478960156440735, 0.7262938022613525, -0.03980141505599022, 0.45941224694252014, -0.5118143558502197, -0.08323915302753448, 0.0928647369146347, 0.17051316797733307, 0.03702688589692116, -0.558525800704956, 0.2833220958709717, 0.14627709984779358, -0.39394503831863403, -0.18960584700107574, 0.4780455231666565, -0.5944018959999084, -0.7862125635147095, 0.5648807883262634, 0.42987826466560364, 0.2769930362701416, -0.047820307314395905, -0.9432549476623535, 0.15865598618984222, 0.19127336144447327, -0.6499877572059631, -0.014474253170192242, 0.16620062291622162, 0.1215103268623352, 0.48897770047187805, 0.5857521295547485, 0.31944984197616577, -0.19258037209510803, 0.2912655174732208, 0.7906697988510132, -0.7960764169692993, -0.7087700366973877, -0.6469611525535583, 0.6150687336921692, -0.18024681508541107, -0.23316307365894318, 0.6083388328552246, 0.9490752220153809, 0.6597246527671814, -0.02481105737388134, 0.8408885598182678, 0.021711813285946846, 1.2094148397445679, -0.3108357787132263, 1.1208851337432861, -0.9227182269096375, -0.07810939103364944, -0.2860431969165802, -0.8852195143699646, 0.011993907392024994, 0.7927066087722778, 0.17125199735164642, 0.08903563767671585, 0.2681335210800171, 0.9572650790214539, -0.3718213737010956, 0.15516416728496552, 0.43609410524368286, 0.6421728730201721, 0.05746699869632721, -0.02250172384083271, 0.6009343862533569, -0.44912347197532654, 0.3907614052295685, -0.21532072126865387, -0.18374159932136536, -0.06700978428125381, -0.768336832523346, -0.9755757451057434, -0.6633434891700745, -0.36473557353019714, -0.5561047196388245, -0.030957847833633423, 1.1534432172775269, 0.8406282663345337, -1.1427639722824097, -0.509221076965332, 0.34813937544822693, -0.49213409423828125, -0.2215530425310135, -0.22879192233085632, 0.5106006264686584, 0.438886433839798, -0.5444877743721008, 0.7114933133125305, -0.07843390107154846, 0.09443282335996628, 0.12164115905761719, -0.2850764989852905, -0.2877920866012573, 0.479129821062088, 0.37258732318878174, 0.20289389789104462, -0.7745572328567505, -0.4363109767436981, 0.0918375626206398, -0.042263213545084, 0.015144390054047108, 0.33172735571861267, -0.29961884021759033, 0.23799555003643036, 0.2909017503261566, -0.06909315288066864, 0.5684260129928589, 0.20070280134677887, 0.5234208703041077, -0.8549070358276367, 0.18284569680690765, 0.21329595148563385, 0.3926759660243988, 0.37415388226509094, -0.24910494685173035, 0.4143899083137512, 0.048946812748909, -0.632624089717865, -0.9860039353370667, -0.0947495847940445, -1.4313009977340698, -0.16083069145679474, 1.459861159324646, 0.1563757061958313, -0.19161461293697357, 0.1082356721162796, -0.42184528708457947, 0.5605962872505188, -0.8048051595687866, 0.5424231290817261, 0.8863335251808167, 0.03243253007531166, 0.08322694897651672, -0.7235952615737915, 0.5949256420135498, 0.24292941391468048, -0.33803996443748474, 0.0138486847281456, 0.6152534484863281, 0.800515353679657, -0.17301824688911438, 0.7107753157615662, -0.2419571578502655, 0.4432491958141327, -0.14054502546787262, 0.39127323031425476, -0.04367506876587868, -0.2240869402885437, -0.47833481431007385, 0.08859219402074814, -0.13906116783618927, -0.30873551964759827 ]
flair/ner-english-large
flair
"2021-05-08T15:36:27Z"
30,591
32
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/).
[ -0.4284263849258423, -0.5138545036315918, 0.2946503162384033, 0.04025144875049591, -0.062116894870996475, -0.1256384551525116, -0.3037372827529907, -0.4695102572441101, 0.4541691541671753, 0.3293403089046478, -0.4507482647895813, -0.5796376466751099, -0.4947960376739502, 0.33000481128692627, -0.1894778460264206, 1.0946606397628784, 0.026463737711310387, 0.20950482785701752, -0.011345825158059597, -0.007464274298399687, -0.32045677304267883, -0.5849592685699463, -0.8680165410041809, -0.2829185724258423, 0.6965159177780151, 0.3020978271961212, 0.4568697214126587, 0.693396270275116, 0.3742460012435913, 0.28119298815727234, -0.14338652789592743, 0.08624587208032608, -0.2590567171573639, -0.1914428323507309, -0.1342715620994568, -0.3474099934101105, -0.7131941318511963, 0.05699831619858742, 0.7336506843566895, 0.36687999963760376, 0.1505018025636673, 0.024183403700590134, -0.021788189187645912, 0.22861625254154205, -0.2833269536495209, 0.2802852988243103, -0.6776997447013855, -0.22444716095924377, -0.15803974866867065, -0.05592828243970871, -0.5326800346374512, -0.24315324425697327, 0.23223955929279327, -0.5519318580627441, 0.16633999347686768, 0.290816992521286, 1.4456093311309814, 0.1356000453233719, -0.4646027088165283, -0.1326877623796463, -0.5970842838287354, 1.0051616430282593, -0.9878261685371399, 0.42273005843162537, 0.2867746651172638, -0.07895944267511368, 0.023693721741437912, -0.7575814127922058, -0.6491528153419495, -0.20501269400119781, -0.09483928978443146, 0.1809689849615097, -0.18613164126873016, -0.129765123128891, 0.36090198159217834, 0.07408072799444199, -0.7328830361366272, 0.12144085019826889, -0.3497786521911621, -0.253734290599823, 0.743679404258728, 0.17928935587406158, 0.11933867633342743, -0.2585000991821289, -0.49331602454185486, -0.0978761613368988, -0.38691040873527527, -0.06218934804201126, 0.22860416769981384, 0.43347278237342834, -0.24835966527462006, 0.40661531686782837, 0.08471494168043137, 0.7337482571601868, 0.14757923781871796, -0.23267561197280884, 0.6283928751945496, -0.04450758174061775, -0.19380484521389008, 0.03730156272649765, 0.9350341558456421, 0.3096955716609955, 0.21687212586402893, -0.09882674366235733, -0.19638200104236603, 0.005859426222741604, -0.11878183484077454, -0.9110802412033081, -0.25766104459762573, 0.2602267265319824, -0.28403526544570923, -0.27145329117774963, 0.10002639889717102, -0.702339768409729, -0.06978676468133926, -0.17729927599430084, 0.6953733563423157, -0.6702737212181091, -0.17070002853870392, -0.039022646844387054, -0.21524010598659515, 0.4223259389400482, 0.21956944465637207, -0.817097008228302, 0.07725614309310913, 0.4222404956817627, 0.7045701742172241, 0.1565684676170349, -0.5029841661453247, -0.327085942029953, -0.12178368121385574, -0.2564065158367157, 0.6725046634674072, -0.41466712951660156, -0.16521112620830536, -0.0970308855175972, 0.22563648223876953, -0.3623284101486206, -0.21960055828094482, 0.5070844888687134, -0.6414613723754883, 0.36444997787475586, -0.19387651979923248, -0.8649387359619141, -0.4290611147880554, 0.2841247618198395, -0.651454508304596, 0.9816538095474243, 0.14795148372650146, -1.0667916536331177, 0.403203547000885, -0.43583881855010986, -0.3586283326148987, 0.014585857279598713, -0.027422713115811348, -0.5568296313285828, -0.1542532742023468, 0.12722551822662354, 0.7013638615608215, -0.2071942836046219, 0.20567931234836578, -0.23533795773983002, -0.13235177099704742, 0.16872476041316986, -0.01960390992462635, 0.7703980803489685, 0.1260153353214264, -0.3928366005420685, 0.04932370409369469, -0.9153561592102051, -0.027713393792510033, 0.27888163924217224, -0.4010747969150543, -0.13824285566806793, -0.053718358278274536, 0.2697977125644684, 0.2897047698497772, 0.26499587297439575, -0.4684169590473175, 0.3890361487865448, -0.49787962436676025, 0.46021178364753723, 0.5350974798202515, 0.029130298644304276, 0.5177667737007141, -0.4446004033088684, 0.43322333693504333, 0.05869795009493828, -0.20353327691555023, -0.08308883756399155, -0.5849689841270447, -0.7606627941131592, -0.26329830288887024, 0.5196728706359863, 0.6107811331748962, -0.5625819563865662, 0.7297675609588623, -0.3699864149093628, -0.7917935848236084, -0.31564730405807495, -0.2679024934768677, 0.1881975680589676, 0.6869440078735352, 0.591797947883606, 0.020321963354945183, -0.8054428696632385, -0.7901414036750793, -0.0911010280251503, 0.019260667264461517, 0.21501445770263672, 0.25265583395957947, 1.0001872777938843, -0.3803316354751587, 0.8473219871520996, -0.45465075969696045, -0.36433523893356323, -0.4906173348426819, 0.13837188482284546, 0.5189194083213806, 0.6103154420852661, 0.473924845457077, -0.6528688073158264, -0.7149842977523804, -0.056747063994407654, -0.4732942283153534, 0.22410964965820312, -0.23807118833065033, -0.004464648198336363, 0.4820338785648346, 0.4300747811794281, -0.4956539273262024, 0.4589897394180298, 0.3513646423816681, -0.49557381868362427, 0.5662072896957397, -0.07002388685941696, -0.17309296131134033, -1.4339680671691895, 0.2784756124019623, 0.1752414107322693, -0.24907217919826508, -0.5293238162994385, -0.24643614888191223, 0.27349501848220825, 0.12324748933315277, -0.37249863147735596, 0.8374167680740356, -0.5035879015922546, 0.20042961835861206, -0.13274644315242767, 0.04831286519765854, 0.12793013453483582, 0.3488204777240753, 0.3597480058670044, 0.4781701862812042, 0.6423751711845398, -0.6039344072341919, 0.21223095059394836, 0.3871387541294098, -0.3253566324710846, 0.21061889827251434, -0.4944078028202057, -0.04589661955833435, -0.06750311702489853, 0.2570650279521942, -0.8763377070426941, -0.26486828923225403, 0.0972374975681305, -0.6021937727928162, 0.7428678870201111, -0.042315032333135605, -0.3143889307975769, -0.5274273157119751, -0.2624627351760864, 0.10875679552555084, 0.5074284076690674, -0.48877790570259094, 0.640720784664154, 0.13449378311634064, 0.14703553915023804, -0.8120383024215698, -0.6617159247398376, -0.0902303159236908, -0.24887396395206451, -0.6334125399589539, 0.6503015756607056, -0.10608433187007904, 0.06429096311330795, 0.09754446148872375, -0.02300630509853363, -0.0008770948625169694, 0.07456694543361664, 0.1346629112958908, 0.4943796694278717, -0.24472776055335999, 0.03756100684404373, -0.29079297184944153, -0.038510482758283615, 0.028514830395579338, -0.22931233048439026, 0.7868396639823914, -0.06646706163883209, 0.20804819464683533, -0.5246264934539795, 0.11863771826028824, 0.41983169317245483, -0.31600889563560486, 1.0803625583648682, 0.9109949469566345, -0.581305742263794, -0.224725142121315, -0.5006089210510254, -0.2344832867383957, -0.3913848400115967, 0.7104132175445557, -0.3637811243534088, -0.61384516954422, 0.5984299778938293, 0.19690237939357758, 0.19144712388515472, 0.8926894664764404, 0.3413749039173126, 0.06732382625341415, 1.1530368328094482, 0.6336663365364075, -0.17601126432418823, 0.44822973012924194, -0.7570963501930237, 0.17460733652114868, -0.9856339693069458, -0.24496318399906158, -0.5382590889930725, -0.21690893173217773, -0.6597567200660706, -0.17666275799274445, 0.13402779400348663, 0.24800729751586914, -0.6108294725418091, 0.6242451071739197, -0.5730403065681458, 0.24856148660182953, 0.5087735056877136, -0.0026880220975726843, -0.06387210637331009, -0.2154846042394638, -0.3048821985721588, -0.22932352125644684, -0.7167634963989258, -0.5592399835586548, 1.1012574434280396, 0.41131553053855896, 0.7783119082450867, -0.09009554237127304, 0.9501867294311523, -0.24068021774291992, 0.37709686160087585, -0.885086178779602, 0.47372156381607056, -0.07774657756090164, -0.7990619540214539, -0.11169452220201492, -0.394580215215683, -1.010703682899475, 0.028645863756537437, -0.4377841055393219, -0.8845158219337463, 0.18254345655441284, 0.030559493228793144, -0.4985623359680176, 0.5729460716247559, -0.4495662748813629, 0.9915592670440674, -0.17195691168308258, -0.3713443875312805, 0.22106993198394775, -0.7384799718856812, 0.1290641874074936, -0.06720525771379471, 0.2793269455432892, -0.08625544607639313, -0.0004049922281410545, 1.0922198295593262, -0.3209056854248047, 0.7422582507133484, -0.03039758838713169, 0.12810486555099487, 0.051928844302892685, -0.09555169939994812, 0.5751646757125854, 0.09225492924451828, -0.31130751967430115, 0.13338112831115723, -0.06866953521966934, -0.1899358034133911, -0.09433986246585846, 0.8441601395606995, -0.948196530342102, -0.3803272843360901, -0.8233115077018738, -0.3741500973701477, 0.07599712163209915, 0.39514681696891785, 0.8350046277046204, 0.644147515296936, -0.0790664553642273, 0.10753985494375229, 0.5763726234436035, -0.2632894515991211, 0.7304031848907471, 0.3397379219532013, -0.4350444972515106, -0.6217588186264038, 0.8071861863136292, 0.28896886110305786, 0.04349355027079582, 0.5360756516456604, 0.12433860450983047, -0.4064798653125763, -0.3673712909221649, -0.2542569637298584, 0.5546770095825195, -0.625802755355835, -0.5406556129455566, -0.842540979385376, -0.46319931745529175, -0.7485564351081848, -0.259914368391037, -0.32750189304351807, -0.2701345980167389, -0.7602030634880066, 0.015928074717521667, 0.419921338558197, 0.7802299857139587, -0.04862669110298157, 0.2769210934638977, -0.663577139377594, -0.15068426728248596, 0.06952531635761261, 0.06655196845531464, 0.014524789527058601, -1.0233840942382812, -0.4385616183280945, -0.16626417636871338, -0.4568130671977997, -1.0024089813232422, 0.9919580817222595, 0.24270576238632202, 0.4469882547855377, 0.38277578353881836, 0.0022267079912126064, 0.5697712302207947, -0.5699056386947632, 0.8453999757766724, 0.12467285245656967, -0.8611085414886475, 0.500880777835846, -0.18995237350463867, 0.16704420745372772, 0.16109417378902435, 0.7605265974998474, -0.4006710648536682, -0.1449286788702011, -0.8558085560798645, -1.0669561624526978, 0.7984310984611511, -0.06322012096643448, 0.10801146179437637, -0.30244410037994385, 0.2928943634033203, -0.15699928998947144, -0.04145015403628349, -1.0995330810546875, -0.5562531352043152, -0.11993034183979034, -0.14791643619537354, -0.30121049284935, -0.20484553277492523, 0.2189556211233139, -0.4419066905975342, 1.271874189376831, 0.02051595039665699, 0.5090354681015015, 0.46900343894958496, -0.041842542588710785, -0.01605948992073536, 0.223226398229599, 0.5255869030952454, 0.46005842089653015, -0.4817703068256378, -0.06931444257497787, 0.3520127832889557, -0.3219534158706665, -0.205133318901062, 0.31984278559684753, -0.05426112189888954, 0.2515409588813782, 0.4634886384010315, 0.8614835739135742, 0.29096290469169617, -0.1439623385667801, 0.5252357125282288, 0.04425795376300812, -0.3081863224506378, -0.691760241985321, -0.08943065255880356, 0.17487332224845886, 0.18783187866210938, 0.4330897629261017, 0.1701669991016388, -0.09913744032382965, -0.46802860498428345, 0.06090012192726135, 0.5186874866485596, -0.34609514474868774, -0.45327186584472656, 1.0677794218063354, -0.0014327769167721272, -0.215671569108963, 0.5002142190933228, -0.4851377010345459, -0.8427960872650146, 0.7363806366920471, 0.7874484062194824, 0.7691446542739868, -0.2620168626308441, -0.05250207334756851, 0.9353229403495789, 0.3051093816757202, -0.1667916625738144, 0.5092612504959106, 0.5060831308364868, -0.870914876461029, -0.36915186047554016, -0.8526982665061951, -0.06675402075052261, 0.34128689765930176, -0.6327661275863647, 0.6958444714546204, -0.3784659504890442, -0.3686172068119049, 0.40649107098579407, 0.32730722427368164, -0.9516859650611877, 0.29101625084877014, 0.3812152147293091, 1.2398734092712402, -0.8332020044326782, 1.0157866477966309, 0.902712881565094, -0.6382582187652588, -1.2741975784301758, -0.08633645623922348, -0.14549900591373444, -0.6659535765647888, 0.7663947939872742, 0.5225802659988403, 0.3309105634689331, 0.3751477301120758, -0.5971240401268005, -1.2515782117843628, 1.2847542762756348, -0.03741387277841568, -0.577873706817627, -0.24406616389751434, -0.3341253995895386, 0.2935729920864105, -0.44432222843170166, 0.5505877137184143, 0.37187230587005615, 0.5144959688186646, 0.03244328498840332, -0.948992133140564, 0.0010125543922185898, -0.1539154052734375, -0.06171269342303276, 0.27545860409736633, -0.6723321080207825, 1.191738247871399, -0.3097836971282959, -0.13924264907836914, 0.3201444149017334, 0.7507404088973999, 0.04783862456679344, 0.22073698043823242, 0.222577303647995, 0.8655375242233276, 0.7298315763473511, -0.21189497411251068, 0.9501951932907104, -0.39303332567214966, 0.7697944045066833, 1.0837900638580322, -0.277993381023407, 1.001656174659729, 0.30696260929107666, -0.14293305575847626, 0.6834812164306641, 0.635707437992096, -0.1664360761642456, 0.47352322936058044, 0.16910991072654724, -0.08874254673719406, -0.22242198884487152, 0.08350079506635666, -0.5473117828369141, 0.5066807270050049, 0.3369227945804596, -0.591372013092041, -0.04917206987738609, -0.020021794363856316, 0.47502049803733826, -0.17691965401172638, -0.4526189863681793, 0.6993554830551147, 0.004785322584211826, -0.5331249833106995, 0.6989986300468445, 0.0738169401884079, 1.0008078813552856, -0.5095279812812805, 0.06109325587749481, -0.05761443078517914, 0.26302769780158997, -0.3672475218772888, -0.5568394660949707, 0.13051190972328186, -0.1264474093914032, -0.1936083883047104, 0.04309893772006035, 0.5657601356506348, -0.5031177401542664, -0.509089469909668, 0.35424739122390747, 0.34246575832366943, 0.2133341133594513, -0.022036729380488396, -0.699757993221283, -0.13958388566970825, 0.08951245993375778, -0.5346875786781311, 0.17983131110668182, 0.25893524289131165, 0.08107932657003403, 0.4260481595993042, 0.49209731817245483, 0.08617593348026276, 0.008368468843400478, -0.18733276426792145, 0.8169201612472534, -0.938799262046814, -0.33547496795654297, -0.9204249382019043, 0.536700963973999, -0.08594569563865662, -0.440875381231308, 0.7422994375228882, 0.905243992805481, 0.8789201974868774, -0.09978445619344711, 0.7473693490028381, -0.37441858649253845, 0.6674317121505737, -0.31096792221069336, 0.8149641156196594, -0.6497535109519958, 0.07872427999973297, -0.2508735656738281, -0.9518664479255676, -0.4135482609272003, 0.8033743500709534, -0.4547744393348694, 0.10486916452646255, 0.7685560584068298, 0.8170616626739502, 0.004121473059058189, -0.16015182435512543, 0.2894754111766815, 0.44744452834129333, 0.1300448775291443, 0.568475067615509, 0.6239171028137207, -0.6687344908714294, 0.4126753807067871, -0.6019958853721619, -0.14459306001663208, -0.28716135025024414, -0.9702498316764832, -0.9926312565803528, -0.7121203541755676, -0.5204675793647766, -0.705189049243927, -0.3638370633125305, 1.29542875289917, 0.675189733505249, -0.9019599556922913, -0.06322944909334183, 0.03747495636343956, -0.11116482317447662, -0.03785074129700661, -0.2988801896572113, 0.5576934218406677, -0.2675309479236603, -0.8265084624290466, 0.21668949723243713, -0.14899685978889465, 0.16601289808750153, 0.17612770199775696, -0.08795442432165146, -0.5755600333213806, 0.02383984439074993, 0.3863831162452698, 0.30549514293670654, -0.7431983947753906, -0.28458064794540405, 0.2496950477361679, -0.3345525562763214, 0.12144119292497635, 0.1386864334344864, -0.7253007292747498, 0.1595681756734848, 0.33400389552116394, 0.3122715353965759, 0.5461304783821106, -0.2289533019065857, 0.1574103981256485, -0.6886007785797119, -0.04910040274262428, 0.3811225891113281, 0.7069995999336243, 0.2971462607383728, -0.326933354139328, 0.4454134702682495, 0.2890957295894623, -0.872967541217804, -0.6925916075706482, -0.12456649541854858, -1.1415361166000366, -0.18183785676956177, 1.2610230445861816, -0.17155009508132935, -0.41162991523742676, 0.08507107198238373, -0.21971380710601807, 0.5253187417984009, -0.45306968688964844, 0.31565022468566895, 0.4814484715461731, -0.10429497808218002, -0.015028994530439377, -0.5332204699516296, 0.5813426375389099, 0.2629646360874176, -0.570139467716217, -0.26716288924217224, 0.25825414061546326, 0.6529748439788818, 0.32500433921813965, 0.467006653547287, 0.11843979358673096, 0.1780369132757187, -0.055996447801589966, 0.4704051911830902, 0.0794248953461647, -0.1200365200638771, -0.4493795335292816, -0.21842461824417114, 0.0009498868021182716, -0.18397532403469086 ]
hkunlp/instructor-base
hkunlp
"2023-01-21T06:31:16Z"
30,535
80
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", "text-generation-inference", "region:us" ]
sentence-similarity
"2022-12-20T05:59:40Z"
--- 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_base_results results: - task: type: Classification dataset: type: mteb/amazon_counterfactual name: MTEB AmazonCounterfactualClassification (en) config: en split: test revision: e8379541af4e31359cca9fbcf4b00f2671dba205 metrics: - type: accuracy value: 86.2089552238806 - type: ap value: 55.76273850794966 - type: f1 value: 81.26104211414781 - task: type: Classification dataset: type: mteb/amazon_polarity name: MTEB AmazonPolarityClassification config: default split: test revision: e2d317d38cd51312af73b3d32a06d1a08b442046 metrics: - type: accuracy value: 88.35995000000001 - type: ap value: 84.18839957309655 - type: f1 value: 88.317619250081 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (en) config: en split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 44.64 - type: f1 value: 42.48663956478136 - task: type: Retrieval dataset: type: arguana name: MTEB ArguAna config: default split: test revision: None metrics: - type: map_at_1 value: 27.383000000000003 - type: map_at_10 value: 43.024 - type: map_at_100 value: 44.023 - type: map_at_1000 value: 44.025999999999996 - type: map_at_3 value: 37.684 - type: map_at_5 value: 40.884 - type: mrr_at_1 value: 28.094 - type: mrr_at_10 value: 43.315 - type: mrr_at_100 value: 44.313 - type: mrr_at_1000 value: 44.317 - type: mrr_at_3 value: 37.862 - type: mrr_at_5 value: 41.155 - type: ndcg_at_1 value: 27.383000000000003 - type: ndcg_at_10 value: 52.032000000000004 - type: ndcg_at_100 value: 56.19499999999999 - type: ndcg_at_1000 value: 56.272 - type: ndcg_at_3 value: 41.166000000000004 - type: ndcg_at_5 value: 46.92 - type: precision_at_1 value: 27.383000000000003 - type: precision_at_10 value: 8.087 - type: precision_at_100 value: 0.989 - type: precision_at_1000 value: 0.099 - type: precision_at_3 value: 17.093 - type: precision_at_5 value: 13.044 - type: recall_at_1 value: 27.383000000000003 - type: recall_at_10 value: 80.868 - type: recall_at_100 value: 98.86200000000001 - type: recall_at_1000 value: 99.431 - type: recall_at_3 value: 51.28 - type: recall_at_5 value: 65.22 - task: type: Clustering dataset: type: mteb/arxiv-clustering-p2p name: MTEB ArxivClusteringP2P config: default split: test revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d metrics: - type: v_measure value: 39.68441054431849 - task: type: Clustering dataset: type: mteb/arxiv-clustering-s2s name: MTEB ArxivClusteringS2S config: default split: test revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53 metrics: - type: v_measure value: 29.188539728343844 - task: type: Reranking dataset: type: mteb/askubuntudupquestions-reranking name: MTEB AskUbuntuDupQuestions config: default split: test revision: 2000358ca161889fa9c082cb41daa8dcfb161a54 metrics: - type: map value: 63.173362687519784 - type: mrr value: 76.18860748362133 - task: type: STS dataset: type: mteb/biosses-sts name: MTEB BIOSSES config: default split: test revision: d3fb88f8f02e40887cd149695127462bbcf29b4a metrics: - type: cos_sim_spearman value: 82.30789953771232 - task: type: Classification dataset: type: mteb/banking77 name: MTEB Banking77Classification config: default split: test revision: 0fd18e25b25c072e09e0d92ab615fda904d66300 metrics: - type: accuracy value: 77.03571428571428 - type: f1 value: 75.87384305045917 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-p2p name: MTEB BiorxivClusteringP2P config: default split: test revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40 metrics: - type: v_measure value: 32.98041170516364 - task: type: Clustering dataset: type: mteb/biorxiv-clustering-s2s name: MTEB BiorxivClusteringS2S config: default split: test revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908 metrics: - type: v_measure value: 25.71652988451154 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackAndroidRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 33.739999999999995 - type: map_at_10 value: 46.197 - type: map_at_100 value: 47.814 - type: map_at_1000 value: 47.934 - type: map_at_3 value: 43.091 - type: map_at_5 value: 44.81 - type: mrr_at_1 value: 41.059 - type: mrr_at_10 value: 52.292 - type: mrr_at_100 value: 52.978 - type: mrr_at_1000 value: 53.015 - type: mrr_at_3 value: 49.976 - type: mrr_at_5 value: 51.449999999999996 - type: ndcg_at_1 value: 41.059 - type: ndcg_at_10 value: 52.608 - type: ndcg_at_100 value: 57.965 - type: ndcg_at_1000 value: 59.775999999999996 - type: ndcg_at_3 value: 48.473 - type: ndcg_at_5 value: 50.407999999999994 - type: precision_at_1 value: 41.059 - type: precision_at_10 value: 9.943 - type: precision_at_100 value: 1.6070000000000002 - type: precision_at_1000 value: 0.20500000000000002 - type: precision_at_3 value: 23.413999999999998 - type: precision_at_5 value: 16.481 - type: recall_at_1 value: 33.739999999999995 - type: recall_at_10 value: 63.888999999999996 - type: recall_at_100 value: 85.832 - type: recall_at_1000 value: 97.475 - type: recall_at_3 value: 51.953 - type: recall_at_5 value: 57.498000000000005 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackEnglishRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 31.169999999999998 - type: map_at_10 value: 41.455 - type: map_at_100 value: 42.716 - type: map_at_1000 value: 42.847 - type: map_at_3 value: 38.568999999999996 - type: map_at_5 value: 40.099000000000004 - type: mrr_at_1 value: 39.427 - type: mrr_at_10 value: 47.818 - type: mrr_at_100 value: 48.519 - type: mrr_at_1000 value: 48.558 - type: mrr_at_3 value: 45.86 - type: mrr_at_5 value: 46.936 - type: ndcg_at_1 value: 39.427 - type: ndcg_at_10 value: 47.181 - type: ndcg_at_100 value: 51.737 - type: ndcg_at_1000 value: 53.74 - type: ndcg_at_3 value: 43.261 - type: ndcg_at_5 value: 44.891 - type: precision_at_1 value: 39.427 - type: precision_at_10 value: 8.847 - type: precision_at_100 value: 1.425 - type: precision_at_1000 value: 0.189 - type: precision_at_3 value: 20.785999999999998 - type: precision_at_5 value: 14.560999999999998 - type: recall_at_1 value: 31.169999999999998 - type: recall_at_10 value: 56.971000000000004 - type: recall_at_100 value: 76.31400000000001 - type: recall_at_1000 value: 88.93900000000001 - type: recall_at_3 value: 45.208 - type: recall_at_5 value: 49.923 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGamingRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 39.682 - type: map_at_10 value: 52.766000000000005 - type: map_at_100 value: 53.84100000000001 - type: map_at_1000 value: 53.898 - type: map_at_3 value: 49.291000000000004 - type: map_at_5 value: 51.365 - type: mrr_at_1 value: 45.266 - type: mrr_at_10 value: 56.093 - type: mrr_at_100 value: 56.763 - type: mrr_at_1000 value: 56.793000000000006 - type: mrr_at_3 value: 53.668000000000006 - type: mrr_at_5 value: 55.1 - type: ndcg_at_1 value: 45.266 - type: ndcg_at_10 value: 58.836 - type: ndcg_at_100 value: 62.863 - type: ndcg_at_1000 value: 63.912 - type: ndcg_at_3 value: 53.19199999999999 - type: ndcg_at_5 value: 56.125 - type: precision_at_1 value: 45.266 - type: precision_at_10 value: 9.492 - type: precision_at_100 value: 1.236 - type: precision_at_1000 value: 0.13699999999999998 - type: precision_at_3 value: 23.762 - type: precision_at_5 value: 16.414 - type: recall_at_1 value: 39.682 - type: recall_at_10 value: 73.233 - type: recall_at_100 value: 90.335 - type: recall_at_1000 value: 97.452 - type: recall_at_3 value: 58.562000000000005 - type: recall_at_5 value: 65.569 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackGisRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.743 - type: map_at_10 value: 34.016000000000005 - type: map_at_100 value: 35.028999999999996 - type: map_at_1000 value: 35.113 - type: map_at_3 value: 31.763 - type: map_at_5 value: 33.013999999999996 - type: mrr_at_1 value: 28.927000000000003 - type: mrr_at_10 value: 36.32 - type: mrr_at_100 value: 37.221 - type: mrr_at_1000 value: 37.281 - type: mrr_at_3 value: 34.105000000000004 - type: mrr_at_5 value: 35.371 - type: ndcg_at_1 value: 28.927000000000003 - type: ndcg_at_10 value: 38.474000000000004 - type: ndcg_at_100 value: 43.580000000000005 - type: ndcg_at_1000 value: 45.64 - type: ndcg_at_3 value: 34.035 - type: ndcg_at_5 value: 36.186 - type: precision_at_1 value: 28.927000000000003 - type: precision_at_10 value: 5.74 - type: precision_at_100 value: 0.8710000000000001 - type: precision_at_1000 value: 0.108 - type: precision_at_3 value: 14.124 - type: precision_at_5 value: 9.74 - type: recall_at_1 value: 26.743 - type: recall_at_10 value: 49.955 - type: recall_at_100 value: 73.904 - type: recall_at_1000 value: 89.133 - type: recall_at_3 value: 38.072 - type: recall_at_5 value: 43.266 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackMathematicaRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 16.928 - type: map_at_10 value: 23.549 - type: map_at_100 value: 24.887 - type: map_at_1000 value: 25.018 - type: map_at_3 value: 21.002000000000002 - type: map_at_5 value: 22.256 - type: mrr_at_1 value: 21.02 - type: mrr_at_10 value: 27.898 - type: mrr_at_100 value: 29.018 - type: mrr_at_1000 value: 29.099999999999998 - type: mrr_at_3 value: 25.456 - type: mrr_at_5 value: 26.625 - type: ndcg_at_1 value: 21.02 - type: ndcg_at_10 value: 28.277 - type: ndcg_at_100 value: 34.54 - type: ndcg_at_1000 value: 37.719 - type: ndcg_at_3 value: 23.707 - type: ndcg_at_5 value: 25.482 - type: precision_at_1 value: 21.02 - type: precision_at_10 value: 5.361 - type: precision_at_100 value: 0.9809999999999999 - type: precision_at_1000 value: 0.13899999999999998 - type: precision_at_3 value: 11.401 - type: precision_at_5 value: 8.209 - type: recall_at_1 value: 16.928 - type: recall_at_10 value: 38.601 - type: recall_at_100 value: 65.759 - type: recall_at_1000 value: 88.543 - type: recall_at_3 value: 25.556 - type: recall_at_5 value: 30.447000000000003 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackPhysicsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 28.549000000000003 - type: map_at_10 value: 38.426 - type: map_at_100 value: 39.845000000000006 - type: map_at_1000 value: 39.956 - type: map_at_3 value: 35.372 - type: map_at_5 value: 37.204 - type: mrr_at_1 value: 35.034 - type: mrr_at_10 value: 44.041000000000004 - type: mrr_at_100 value: 44.95 - type: mrr_at_1000 value: 44.997 - type: mrr_at_3 value: 41.498000000000005 - type: mrr_at_5 value: 43.077 - type: ndcg_at_1 value: 35.034 - type: ndcg_at_10 value: 44.218 - type: ndcg_at_100 value: 49.958000000000006 - type: ndcg_at_1000 value: 52.019000000000005 - type: ndcg_at_3 value: 39.34 - type: ndcg_at_5 value: 41.892 - type: precision_at_1 value: 35.034 - type: precision_at_10 value: 7.911 - type: precision_at_100 value: 1.26 - type: precision_at_1000 value: 0.16 - type: precision_at_3 value: 18.511 - type: precision_at_5 value: 13.205 - type: recall_at_1 value: 28.549000000000003 - type: recall_at_10 value: 56.035999999999994 - type: recall_at_100 value: 79.701 - type: recall_at_1000 value: 93.149 - type: recall_at_3 value: 42.275 - type: recall_at_5 value: 49.097 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackProgrammersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 29.391000000000002 - type: map_at_10 value: 39.48 - type: map_at_100 value: 40.727000000000004 - type: map_at_1000 value: 40.835 - type: map_at_3 value: 36.234 - type: map_at_5 value: 37.877 - type: mrr_at_1 value: 35.959 - type: mrr_at_10 value: 44.726 - type: mrr_at_100 value: 45.531 - type: mrr_at_1000 value: 45.582 - type: mrr_at_3 value: 42.047000000000004 - type: mrr_at_5 value: 43.611 - type: ndcg_at_1 value: 35.959 - type: ndcg_at_10 value: 45.303 - type: ndcg_at_100 value: 50.683 - type: ndcg_at_1000 value: 52.818 - type: ndcg_at_3 value: 39.987 - type: ndcg_at_5 value: 42.243 - type: precision_at_1 value: 35.959 - type: precision_at_10 value: 8.241999999999999 - type: precision_at_100 value: 1.274 - type: precision_at_1000 value: 0.163 - type: precision_at_3 value: 18.836 - type: precision_at_5 value: 13.196 - type: recall_at_1 value: 29.391000000000002 - type: recall_at_10 value: 57.364000000000004 - type: recall_at_100 value: 80.683 - type: recall_at_1000 value: 94.918 - type: recall_at_3 value: 42.263 - type: recall_at_5 value: 48.634 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.791749999999997 - type: map_at_10 value: 35.75541666666667 - type: map_at_100 value: 37.00791666666667 - type: map_at_1000 value: 37.12408333333333 - type: map_at_3 value: 33.02966666666667 - type: map_at_5 value: 34.56866666666667 - type: mrr_at_1 value: 31.744333333333337 - type: mrr_at_10 value: 39.9925 - type: mrr_at_100 value: 40.86458333333333 - type: mrr_at_1000 value: 40.92175000000001 - type: mrr_at_3 value: 37.68183333333334 - type: mrr_at_5 value: 39.028499999999994 - type: ndcg_at_1 value: 31.744333333333337 - type: ndcg_at_10 value: 40.95008333333334 - type: ndcg_at_100 value: 46.25966666666667 - type: ndcg_at_1000 value: 48.535333333333334 - type: ndcg_at_3 value: 36.43333333333333 - type: ndcg_at_5 value: 38.602333333333334 - type: precision_at_1 value: 31.744333333333337 - type: precision_at_10 value: 7.135166666666666 - type: precision_at_100 value: 1.1535833333333334 - type: precision_at_1000 value: 0.15391666666666665 - type: precision_at_3 value: 16.713 - type: precision_at_5 value: 11.828416666666666 - type: recall_at_1 value: 26.791749999999997 - type: recall_at_10 value: 51.98625 - type: recall_at_100 value: 75.30358333333334 - type: recall_at_1000 value: 91.05433333333333 - type: recall_at_3 value: 39.39583333333333 - type: recall_at_5 value: 45.05925 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackStatsRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 22.219 - type: map_at_10 value: 29.162 - type: map_at_100 value: 30.049999999999997 - type: map_at_1000 value: 30.144 - type: map_at_3 value: 27.204 - type: map_at_5 value: 28.351 - type: mrr_at_1 value: 25.153 - type: mrr_at_10 value: 31.814999999999998 - type: mrr_at_100 value: 32.573 - type: mrr_at_1000 value: 32.645 - type: mrr_at_3 value: 29.934 - type: mrr_at_5 value: 30.946 - type: ndcg_at_1 value: 25.153 - type: ndcg_at_10 value: 33.099000000000004 - type: ndcg_at_100 value: 37.768 - type: ndcg_at_1000 value: 40.331 - type: ndcg_at_3 value: 29.473 - type: ndcg_at_5 value: 31.206 - type: precision_at_1 value: 25.153 - type: precision_at_10 value: 5.183999999999999 - type: precision_at_100 value: 0.8170000000000001 - type: precision_at_1000 value: 0.11100000000000002 - type: precision_at_3 value: 12.831999999999999 - type: precision_at_5 value: 8.895999999999999 - type: recall_at_1 value: 22.219 - type: recall_at_10 value: 42.637 - type: recall_at_100 value: 64.704 - type: recall_at_1000 value: 83.963 - type: recall_at_3 value: 32.444 - type: recall_at_5 value: 36.802 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackTexRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 17.427999999999997 - type: map_at_10 value: 24.029 - type: map_at_100 value: 25.119999999999997 - type: map_at_1000 value: 25.257 - type: map_at_3 value: 22.016 - type: map_at_5 value: 23.143 - type: mrr_at_1 value: 21.129 - type: mrr_at_10 value: 27.750000000000004 - type: mrr_at_100 value: 28.666999999999998 - type: mrr_at_1000 value: 28.754999999999995 - type: mrr_at_3 value: 25.849 - type: mrr_at_5 value: 26.939999999999998 - type: ndcg_at_1 value: 21.129 - type: ndcg_at_10 value: 28.203 - type: ndcg_at_100 value: 33.44 - type: ndcg_at_1000 value: 36.61 - type: ndcg_at_3 value: 24.648999999999997 - type: ndcg_at_5 value: 26.316 - type: precision_at_1 value: 21.129 - type: precision_at_10 value: 5.055 - type: precision_at_100 value: 0.909 - type: precision_at_1000 value: 0.13699999999999998 - type: precision_at_3 value: 11.666 - type: precision_at_5 value: 8.3 - type: recall_at_1 value: 17.427999999999997 - type: recall_at_10 value: 36.923 - type: recall_at_100 value: 60.606 - type: recall_at_1000 value: 83.19 - type: recall_at_3 value: 26.845000000000002 - type: recall_at_5 value: 31.247000000000003 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackUnixRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 26.457000000000004 - type: map_at_10 value: 35.228 - type: map_at_100 value: 36.475 - type: map_at_1000 value: 36.585 - type: map_at_3 value: 32.444 - type: map_at_5 value: 34.046 - type: mrr_at_1 value: 30.784 - type: mrr_at_10 value: 39.133 - type: mrr_at_100 value: 40.11 - type: mrr_at_1000 value: 40.169 - type: mrr_at_3 value: 36.692 - type: mrr_at_5 value: 38.17 - type: ndcg_at_1 value: 30.784 - type: ndcg_at_10 value: 40.358 - type: ndcg_at_100 value: 46.119 - type: ndcg_at_1000 value: 48.428 - type: ndcg_at_3 value: 35.504000000000005 - type: ndcg_at_5 value: 37.864 - type: precision_at_1 value: 30.784 - type: precision_at_10 value: 6.800000000000001 - type: precision_at_100 value: 1.083 - type: precision_at_1000 value: 0.13899999999999998 - type: precision_at_3 value: 15.920000000000002 - type: precision_at_5 value: 11.437 - type: recall_at_1 value: 26.457000000000004 - type: recall_at_10 value: 51.845 - type: recall_at_100 value: 77.046 - type: recall_at_1000 value: 92.892 - type: recall_at_3 value: 38.89 - type: recall_at_5 value: 44.688 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWebmastersRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 29.378999999999998 - type: map_at_10 value: 37.373 - type: map_at_100 value: 39.107 - type: map_at_1000 value: 39.317 - type: map_at_3 value: 34.563 - type: map_at_5 value: 36.173 - type: mrr_at_1 value: 35.178 - type: mrr_at_10 value: 42.44 - type: mrr_at_100 value: 43.434 - type: mrr_at_1000 value: 43.482 - type: mrr_at_3 value: 39.987 - type: mrr_at_5 value: 41.370000000000005 - type: ndcg_at_1 value: 35.178 - type: ndcg_at_10 value: 42.82 - type: ndcg_at_100 value: 48.935 - type: ndcg_at_1000 value: 51.28 - type: ndcg_at_3 value: 38.562999999999995 - type: ndcg_at_5 value: 40.687 - type: precision_at_1 value: 35.178 - type: precision_at_10 value: 7.945 - type: precision_at_100 value: 1.524 - type: precision_at_1000 value: 0.242 - type: precision_at_3 value: 17.721 - type: precision_at_5 value: 12.925 - type: recall_at_1 value: 29.378999999999998 - type: recall_at_10 value: 52.141999999999996 - type: recall_at_100 value: 79.49000000000001 - type: recall_at_1000 value: 93.782 - type: recall_at_3 value: 39.579 - type: recall_at_5 value: 45.462 - task: type: Retrieval dataset: type: BeIR/cqadupstack name: MTEB CQADupstackWordpressRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 19.814999999999998 - type: map_at_10 value: 27.383999999999997 - type: map_at_100 value: 28.483999999999998 - type: map_at_1000 value: 28.585 - type: map_at_3 value: 24.807000000000002 - type: map_at_5 value: 26.485999999999997 - type: mrr_at_1 value: 21.996 - type: mrr_at_10 value: 29.584 - type: mrr_at_100 value: 30.611 - type: mrr_at_1000 value: 30.684 - type: mrr_at_3 value: 27.11 - type: mrr_at_5 value: 28.746 - type: ndcg_at_1 value: 21.996 - type: ndcg_at_10 value: 32.024 - type: ndcg_at_100 value: 37.528 - type: ndcg_at_1000 value: 40.150999999999996 - type: ndcg_at_3 value: 27.016000000000002 - type: ndcg_at_5 value: 29.927999999999997 - type: precision_at_1 value: 21.996 - type: precision_at_10 value: 5.102 - type: precision_at_100 value: 0.856 - type: precision_at_1000 value: 0.117 - type: precision_at_3 value: 11.583 - type: precision_at_5 value: 8.577 - type: recall_at_1 value: 19.814999999999998 - type: recall_at_10 value: 44.239 - type: recall_at_100 value: 69.269 - type: recall_at_1000 value: 89.216 - type: recall_at_3 value: 31.102999999999998 - type: recall_at_5 value: 38.078 - task: type: Retrieval dataset: type: climate-fever name: MTEB ClimateFEVER config: default split: test revision: None metrics: - type: map_at_1 value: 11.349 - type: map_at_10 value: 19.436 - type: map_at_100 value: 21.282999999999998 - type: map_at_1000 value: 21.479 - type: map_at_3 value: 15.841 - type: map_at_5 value: 17.558 - type: mrr_at_1 value: 25.863000000000003 - type: mrr_at_10 value: 37.218 - type: mrr_at_100 value: 38.198 - type: mrr_at_1000 value: 38.236 - type: mrr_at_3 value: 33.409 - type: mrr_at_5 value: 35.602000000000004 - type: ndcg_at_1 value: 25.863000000000003 - type: ndcg_at_10 value: 27.953 - type: ndcg_at_100 value: 35.327 - type: ndcg_at_1000 value: 38.708999999999996 - type: ndcg_at_3 value: 21.985 - type: ndcg_at_5 value: 23.957 - type: precision_at_1 value: 25.863000000000003 - type: precision_at_10 value: 8.99 - type: precision_at_100 value: 1.6889999999999998 - type: precision_at_1000 value: 0.232 - type: precision_at_3 value: 16.308 - type: precision_at_5 value: 12.912 - type: recall_at_1 value: 11.349 - type: recall_at_10 value: 34.581 - type: recall_at_100 value: 60.178 - type: recall_at_1000 value: 78.88199999999999 - type: recall_at_3 value: 20.041999999999998 - type: recall_at_5 value: 25.458 - task: type: Retrieval dataset: type: dbpedia-entity name: MTEB DBPedia config: default split: test revision: None metrics: - type: map_at_1 value: 7.893 - type: map_at_10 value: 15.457 - type: map_at_100 value: 20.905 - type: map_at_1000 value: 22.116 - type: map_at_3 value: 11.593 - type: map_at_5 value: 13.134 - type: mrr_at_1 value: 57.49999999999999 - type: mrr_at_10 value: 65.467 - type: mrr_at_100 value: 66.022 - type: mrr_at_1000 value: 66.039 - type: mrr_at_3 value: 63.458000000000006 - type: mrr_at_5 value: 64.546 - type: ndcg_at_1 value: 45.875 - type: ndcg_at_10 value: 33.344 - type: ndcg_at_100 value: 36.849 - type: ndcg_at_1000 value: 44.03 - type: ndcg_at_3 value: 37.504 - type: ndcg_at_5 value: 34.892 - type: precision_at_1 value: 57.49999999999999 - type: precision_at_10 value: 25.95 - type: precision_at_100 value: 7.89 - type: precision_at_1000 value: 1.669 - type: precision_at_3 value: 40.333000000000006 - type: precision_at_5 value: 33.050000000000004 - type: recall_at_1 value: 7.893 - type: recall_at_10 value: 20.724999999999998 - type: recall_at_100 value: 42.516 - type: recall_at_1000 value: 65.822 - type: recall_at_3 value: 12.615000000000002 - type: recall_at_5 value: 15.482000000000001 - task: type: Classification dataset: type: mteb/emotion name: MTEB EmotionClassification config: default split: test revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37 metrics: - type: accuracy value: 51.760000000000005 - type: f1 value: 45.51690565701713 - task: type: Retrieval dataset: type: fever name: MTEB FEVER config: default split: test revision: None metrics: - type: map_at_1 value: 53.882 - type: map_at_10 value: 65.902 - type: map_at_100 value: 66.33 - type: map_at_1000 value: 66.348 - type: map_at_3 value: 63.75999999999999 - type: map_at_5 value: 65.181 - type: mrr_at_1 value: 58.041 - type: mrr_at_10 value: 70.133 - type: mrr_at_100 value: 70.463 - type: mrr_at_1000 value: 70.47 - type: mrr_at_3 value: 68.164 - type: mrr_at_5 value: 69.465 - type: ndcg_at_1 value: 58.041 - type: ndcg_at_10 value: 71.84700000000001 - type: ndcg_at_100 value: 73.699 - type: ndcg_at_1000 value: 74.06700000000001 - type: ndcg_at_3 value: 67.855 - type: ndcg_at_5 value: 70.203 - type: precision_at_1 value: 58.041 - type: precision_at_10 value: 9.427000000000001 - type: precision_at_100 value: 1.049 - type: precision_at_1000 value: 0.11 - type: precision_at_3 value: 27.278000000000002 - type: precision_at_5 value: 17.693 - type: recall_at_1 value: 53.882 - type: recall_at_10 value: 85.99 - type: recall_at_100 value: 94.09100000000001 - type: recall_at_1000 value: 96.612 - type: recall_at_3 value: 75.25 - type: recall_at_5 value: 80.997 - task: type: Retrieval dataset: type: fiqa name: MTEB FiQA2018 config: default split: test revision: None metrics: - type: map_at_1 value: 19.165 - type: map_at_10 value: 31.845000000000002 - type: map_at_100 value: 33.678999999999995 - type: map_at_1000 value: 33.878 - type: map_at_3 value: 27.881 - type: map_at_5 value: 30.049999999999997 - type: mrr_at_1 value: 38.272 - type: mrr_at_10 value: 47.04 - type: mrr_at_100 value: 47.923 - type: mrr_at_1000 value: 47.973 - type: mrr_at_3 value: 44.985 - type: mrr_at_5 value: 46.150000000000006 - type: ndcg_at_1 value: 38.272 - type: ndcg_at_10 value: 39.177 - type: ndcg_at_100 value: 45.995000000000005 - type: ndcg_at_1000 value: 49.312 - type: ndcg_at_3 value: 36.135 - type: ndcg_at_5 value: 36.936 - type: precision_at_1 value: 38.272 - type: precision_at_10 value: 10.926 - type: precision_at_100 value: 1.809 - type: precision_at_1000 value: 0.23700000000000002 - type: precision_at_3 value: 24.331 - type: precision_at_5 value: 17.747 - type: recall_at_1 value: 19.165 - type: recall_at_10 value: 45.103 - type: recall_at_100 value: 70.295 - type: recall_at_1000 value: 90.592 - type: recall_at_3 value: 32.832 - type: recall_at_5 value: 37.905 - task: type: Retrieval dataset: type: hotpotqa name: MTEB HotpotQA config: default split: test revision: None metrics: - type: map_at_1 value: 32.397 - type: map_at_10 value: 44.83 - type: map_at_100 value: 45.716 - type: map_at_1000 value: 45.797 - type: map_at_3 value: 41.955999999999996 - type: map_at_5 value: 43.736999999999995 - type: mrr_at_1 value: 64.794 - type: mrr_at_10 value: 71.866 - type: mrr_at_100 value: 72.22 - type: mrr_at_1000 value: 72.238 - type: mrr_at_3 value: 70.416 - type: mrr_at_5 value: 71.304 - type: ndcg_at_1 value: 64.794 - type: ndcg_at_10 value: 54.186 - type: ndcg_at_100 value: 57.623000000000005 - type: ndcg_at_1000 value: 59.302 - type: ndcg_at_3 value: 49.703 - type: ndcg_at_5 value: 52.154999999999994 - type: precision_at_1 value: 64.794 - type: precision_at_10 value: 11.219 - type: precision_at_100 value: 1.394 - type: precision_at_1000 value: 0.16199999999999998 - type: precision_at_3 value: 30.767 - type: precision_at_5 value: 20.397000000000002 - type: recall_at_1 value: 32.397 - type: recall_at_10 value: 56.096999999999994 - type: recall_at_100 value: 69.696 - type: recall_at_1000 value: 80.88499999999999 - type: recall_at_3 value: 46.150999999999996 - type: recall_at_5 value: 50.993 - task: type: Classification dataset: type: mteb/imdb name: MTEB ImdbClassification config: default split: test revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7 metrics: - type: accuracy value: 81.1744 - type: ap value: 75.44973697032414 - type: f1 value: 81.09901117955782 - task: type: Retrieval dataset: type: msmarco name: MTEB MSMARCO config: default split: dev revision: None metrics: - type: map_at_1 value: 19.519000000000002 - type: map_at_10 value: 31.025000000000002 - type: map_at_100 value: 32.275999999999996 - type: map_at_1000 value: 32.329 - type: map_at_3 value: 27.132 - type: map_at_5 value: 29.415999999999997 - type: mrr_at_1 value: 20.115 - type: mrr_at_10 value: 31.569000000000003 - type: mrr_at_100 value: 32.768 - type: mrr_at_1000 value: 32.816 - type: mrr_at_3 value: 27.748 - type: mrr_at_5 value: 29.956 - type: ndcg_at_1 value: 20.115 - type: ndcg_at_10 value: 37.756 - type: ndcg_at_100 value: 43.858000000000004 - type: ndcg_at_1000 value: 45.199 - type: ndcg_at_3 value: 29.818 - type: ndcg_at_5 value: 33.875 - type: precision_at_1 value: 20.115 - type: precision_at_10 value: 6.122 - type: precision_at_100 value: 0.919 - type: precision_at_1000 value: 0.10300000000000001 - type: precision_at_3 value: 12.794 - type: precision_at_5 value: 9.731 - type: recall_at_1 value: 19.519000000000002 - type: recall_at_10 value: 58.62500000000001 - type: recall_at_100 value: 86.99 - type: recall_at_1000 value: 97.268 - type: recall_at_3 value: 37.002 - type: recall_at_5 value: 46.778 - task: type: Classification dataset: type: mteb/mtop_domain name: MTEB MTOPDomainClassification (en) config: en split: test revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf metrics: - type: accuracy value: 93.71865025079799 - type: f1 value: 93.38906173610519 - task: type: Classification dataset: type: mteb/mtop_intent name: MTEB MTOPIntentClassification (en) config: en split: test revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba metrics: - type: accuracy value: 70.2576379388965 - type: f1 value: 49.20405830249464 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (en) config: en split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 67.48486886348351 - type: f1 value: 64.92199176095157 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (en) config: en split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 72.59246805648958 - type: f1 value: 72.1222026389164 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-p2p name: MTEB MedrxivClusteringP2P config: default split: test revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73 metrics: - type: v_measure value: 30.887642595096825 - task: type: Clustering dataset: type: mteb/medrxiv-clustering-s2s name: MTEB MedrxivClusteringS2S config: default split: test revision: 35191c8c0dca72d8ff3efcd72aa802307d469663 metrics: - type: v_measure value: 28.3764418784054 - task: type: Reranking dataset: type: mteb/mind_small name: MTEB MindSmallReranking config: default split: test revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69 metrics: - type: map value: 31.81544126336991 - type: mrr value: 32.82666576268031 - task: type: Retrieval dataset: type: nfcorpus name: MTEB NFCorpus config: default split: test revision: None metrics: - type: map_at_1 value: 5.185 - type: map_at_10 value: 11.158 - type: map_at_100 value: 14.041 - type: map_at_1000 value: 15.360999999999999 - type: map_at_3 value: 8.417 - type: map_at_5 value: 9.378 - type: mrr_at_1 value: 44.582 - type: mrr_at_10 value: 53.083999999999996 - type: mrr_at_100 value: 53.787 - type: mrr_at_1000 value: 53.824000000000005 - type: mrr_at_3 value: 51.187000000000005 - type: mrr_at_5 value: 52.379 - type: ndcg_at_1 value: 42.57 - type: ndcg_at_10 value: 31.593 - type: ndcg_at_100 value: 29.093999999999998 - type: ndcg_at_1000 value: 37.909 - type: ndcg_at_3 value: 37.083 - type: ndcg_at_5 value: 34.397 - type: precision_at_1 value: 43.963 - type: precision_at_10 value: 23.498 - type: precision_at_100 value: 7.6160000000000005 - type: precision_at_1000 value: 2.032 - type: precision_at_3 value: 34.572 - type: precision_at_5 value: 29.412 - type: recall_at_1 value: 5.185 - type: recall_at_10 value: 15.234 - type: recall_at_100 value: 29.49 - type: recall_at_1000 value: 62.273999999999994 - type: recall_at_3 value: 9.55 - type: recall_at_5 value: 11.103 - task: type: Retrieval dataset: type: nq name: MTEB NQ config: default split: test revision: None metrics: - type: map_at_1 value: 23.803 - type: map_at_10 value: 38.183 - type: map_at_100 value: 39.421 - type: map_at_1000 value: 39.464 - type: map_at_3 value: 33.835 - type: map_at_5 value: 36.327 - type: mrr_at_1 value: 26.68 - type: mrr_at_10 value: 40.439 - type: mrr_at_100 value: 41.415 - type: mrr_at_1000 value: 41.443999999999996 - type: mrr_at_3 value: 36.612 - type: mrr_at_5 value: 38.877 - type: ndcg_at_1 value: 26.68 - type: ndcg_at_10 value: 45.882 - type: ndcg_at_100 value: 51.227999999999994 - type: ndcg_at_1000 value: 52.207 - type: ndcg_at_3 value: 37.511 - type: ndcg_at_5 value: 41.749 - type: precision_at_1 value: 26.68 - type: precision_at_10 value: 7.9750000000000005 - type: precision_at_100 value: 1.0959999999999999 - type: precision_at_1000 value: 0.11900000000000001 - type: precision_at_3 value: 17.449 - type: precision_at_5 value: 12.897 - type: recall_at_1 value: 23.803 - type: recall_at_10 value: 67.152 - type: recall_at_100 value: 90.522 - type: recall_at_1000 value: 97.743 - type: recall_at_3 value: 45.338 - type: recall_at_5 value: 55.106 - task: type: Retrieval dataset: type: quora name: MTEB QuoraRetrieval config: default split: test revision: None metrics: - type: map_at_1 value: 70.473 - type: map_at_10 value: 84.452 - type: map_at_100 value: 85.101 - type: map_at_1000 value: 85.115 - type: map_at_3 value: 81.435 - type: map_at_5 value: 83.338 - type: mrr_at_1 value: 81.19 - type: mrr_at_10 value: 87.324 - type: mrr_at_100 value: 87.434 - type: mrr_at_1000 value: 87.435 - type: mrr_at_3 value: 86.31 - type: mrr_at_5 value: 87.002 - type: ndcg_at_1 value: 81.21000000000001 - type: ndcg_at_10 value: 88.19 - type: ndcg_at_100 value: 89.44 - type: ndcg_at_1000 value: 89.526 - type: ndcg_at_3 value: 85.237 - type: ndcg_at_5 value: 86.892 - type: precision_at_1 value: 81.21000000000001 - type: precision_at_10 value: 13.417000000000002 - type: precision_at_100 value: 1.537 - type: precision_at_1000 value: 0.157 - type: precision_at_3 value: 37.31 - type: precision_at_5 value: 24.59 - type: recall_at_1 value: 70.473 - type: recall_at_10 value: 95.367 - type: recall_at_100 value: 99.616 - type: recall_at_1000 value: 99.996 - type: recall_at_3 value: 86.936 - type: recall_at_5 value: 91.557 - task: type: Clustering dataset: type: mteb/reddit-clustering name: MTEB RedditClustering config: default split: test revision: 24640382cdbf8abc73003fb0fa6d111a705499eb metrics: - type: v_measure value: 59.25776525253911 - task: type: Clustering dataset: type: mteb/reddit-clustering-p2p name: MTEB RedditClusteringP2P config: default split: test revision: 282350215ef01743dc01b456c7f5241fa8937f16 metrics: - type: v_measure value: 63.22135271663078 - task: type: Retrieval dataset: type: scidocs name: MTEB SCIDOCS config: default split: test revision: None metrics: - type: map_at_1 value: 4.003 - type: map_at_10 value: 10.062999999999999 - type: map_at_100 value: 11.854000000000001 - type: map_at_1000 value: 12.145999999999999 - type: map_at_3 value: 7.242 - type: map_at_5 value: 8.652999999999999 - type: mrr_at_1 value: 19.7 - type: mrr_at_10 value: 29.721999999999998 - type: mrr_at_100 value: 30.867 - type: mrr_at_1000 value: 30.944 - type: mrr_at_3 value: 26.683 - type: mrr_at_5 value: 28.498 - type: ndcg_at_1 value: 19.7 - type: ndcg_at_10 value: 17.095 - type: ndcg_at_100 value: 24.375 - type: ndcg_at_1000 value: 29.831000000000003 - type: ndcg_at_3 value: 16.305 - type: ndcg_at_5 value: 14.291 - type: precision_at_1 value: 19.7 - type: precision_at_10 value: 8.799999999999999 - type: precision_at_100 value: 1.9349999999999998 - type: precision_at_1000 value: 0.32399999999999995 - type: precision_at_3 value: 15.2 - type: precision_at_5 value: 12.540000000000001 - type: recall_at_1 value: 4.003 - type: recall_at_10 value: 17.877000000000002 - type: recall_at_100 value: 39.217 - type: recall_at_1000 value: 65.862 - type: recall_at_3 value: 9.242 - type: recall_at_5 value: 12.715000000000002 - task: type: STS dataset: type: mteb/sickr-sts name: MTEB SICK-R config: default split: test revision: a6ea5a8cab320b040a23452cc28066d9beae2cee metrics: - type: cos_sim_spearman value: 80.25888668589654 - task: type: STS dataset: type: mteb/sts12-sts name: MTEB STS12 config: default split: test revision: a0d554a64d88156834ff5ae9920b964011b16384 metrics: - type: cos_sim_spearman value: 77.02037527837669 - task: type: STS dataset: type: mteb/sts13-sts name: MTEB STS13 config: default split: test revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca metrics: - type: cos_sim_spearman value: 86.58432681008449 - task: type: STS dataset: type: mteb/sts14-sts name: MTEB STS14 config: default split: test revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375 metrics: - type: cos_sim_spearman value: 81.31697756099051 - task: type: STS dataset: type: mteb/sts15-sts name: MTEB STS15 config: default split: test revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3 metrics: - type: cos_sim_spearman value: 88.18867599667057 - task: type: STS dataset: type: mteb/sts16-sts name: MTEB STS16 config: default split: test revision: 4d8694f8f0e0100860b497b999b3dbed754a0513 metrics: - type: cos_sim_spearman value: 84.87853941747623 - 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: 89.46479925383916 - 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: 66.45272113649146 - task: type: STS dataset: type: mteb/stsbenchmark-sts name: MTEB STSBenchmark config: default split: test revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831 metrics: - type: cos_sim_spearman value: 86.43357313527851 - task: type: Reranking dataset: type: mteb/scidocs-reranking name: MTEB SciDocsRR config: default split: test revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab metrics: - type: map value: 78.82761687254882 - type: mrr value: 93.46223674655047 - task: type: Retrieval dataset: type: scifact name: MTEB SciFact config: default split: test revision: None metrics: - type: map_at_1 value: 44.583 - type: map_at_10 value: 52.978 - type: map_at_100 value: 53.803 - type: map_at_1000 value: 53.839999999999996 - type: map_at_3 value: 50.03300000000001 - type: map_at_5 value: 51.939 - type: mrr_at_1 value: 47.0 - type: mrr_at_10 value: 54.730000000000004 - type: mrr_at_100 value: 55.31399999999999 - type: mrr_at_1000 value: 55.346 - type: mrr_at_3 value: 52.0 - type: mrr_at_5 value: 53.783 - type: ndcg_at_1 value: 47.0 - type: ndcg_at_10 value: 57.82899999999999 - type: ndcg_at_100 value: 61.49400000000001 - type: ndcg_at_1000 value: 62.676 - type: ndcg_at_3 value: 52.373000000000005 - type: ndcg_at_5 value: 55.481 - type: precision_at_1 value: 47.0 - type: precision_at_10 value: 7.867 - type: precision_at_100 value: 0.997 - type: precision_at_1000 value: 0.11 - type: precision_at_3 value: 20.556 - type: precision_at_5 value: 14.066999999999998 - type: recall_at_1 value: 44.583 - type: recall_at_10 value: 71.172 - type: recall_at_100 value: 87.7 - type: recall_at_1000 value: 97.333 - type: recall_at_3 value: 56.511 - type: recall_at_5 value: 64.206 - task: type: PairClassification dataset: type: mteb/sprintduplicatequestions-pairclassification name: MTEB SprintDuplicateQuestions config: default split: test revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46 metrics: - type: cos_sim_accuracy value: 99.66237623762376 - type: cos_sim_ap value: 90.35465126226322 - type: cos_sim_f1 value: 82.44575936883628 - type: cos_sim_precision value: 81.32295719844358 - type: cos_sim_recall value: 83.6 - type: dot_accuracy value: 99.66237623762376 - type: dot_ap value: 90.35464287920453 - type: dot_f1 value: 82.44575936883628 - type: dot_precision value: 81.32295719844358 - type: dot_recall value: 83.6 - type: euclidean_accuracy value: 99.66237623762376 - type: euclidean_ap value: 90.3546512622632 - type: euclidean_f1 value: 82.44575936883628 - type: euclidean_precision value: 81.32295719844358 - type: euclidean_recall value: 83.6 - type: manhattan_accuracy value: 99.65940594059406 - type: manhattan_ap value: 90.29220174849843 - type: manhattan_f1 value: 82.4987605354487 - type: manhattan_precision value: 81.80924287118977 - type: manhattan_recall value: 83.2 - type: max_accuracy value: 99.66237623762376 - type: max_ap value: 90.35465126226322 - type: max_f1 value: 82.4987605354487 - task: type: Clustering dataset: type: mteb/stackexchange-clustering name: MTEB StackExchangeClustering config: default split: test revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259 metrics: - type: v_measure value: 65.0394225901397 - task: type: Clustering dataset: type: mteb/stackexchange-clustering-p2p name: MTEB StackExchangeClusteringP2P config: default split: test revision: 815ca46b2622cec33ccafc3735d572c266efdb44 metrics: - type: v_measure value: 35.27954189859326 - task: type: Reranking dataset: type: mteb/stackoverflowdupquestions-reranking name: MTEB StackOverflowDupQuestions config: default split: test revision: e185fbe320c72810689fc5848eb6114e1ef5ec69 metrics: - type: map value: 50.99055979974896 - type: mrr value: 51.82745257193787 - task: type: Summarization dataset: type: mteb/summeval name: MTEB SummEval config: default split: test revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c metrics: - type: cos_sim_pearson value: 30.21655465344237 - type: cos_sim_spearman value: 29.853205339630172 - type: dot_pearson value: 30.216540628083564 - type: dot_spearman value: 29.868978894753027 - task: type: Retrieval dataset: type: trec-covid name: MTEB TRECCOVID config: default split: test revision: None metrics: - type: map_at_1 value: 0.2 - type: map_at_10 value: 1.398 - type: map_at_100 value: 7.406 - type: map_at_1000 value: 18.401 - type: map_at_3 value: 0.479 - type: map_at_5 value: 0.772 - type: mrr_at_1 value: 70.0 - type: mrr_at_10 value: 79.25999999999999 - type: mrr_at_100 value: 79.25999999999999 - type: mrr_at_1000 value: 79.25999999999999 - type: mrr_at_3 value: 77.333 - type: mrr_at_5 value: 78.133 - type: ndcg_at_1 value: 63.0 - type: ndcg_at_10 value: 58.548 - type: ndcg_at_100 value: 45.216 - type: ndcg_at_1000 value: 41.149 - type: ndcg_at_3 value: 60.641999999999996 - type: ndcg_at_5 value: 61.135 - type: precision_at_1 value: 70.0 - type: precision_at_10 value: 64.0 - type: precision_at_100 value: 46.92 - type: precision_at_1000 value: 18.642 - type: precision_at_3 value: 64.667 - type: precision_at_5 value: 66.4 - type: recall_at_1 value: 0.2 - type: recall_at_10 value: 1.6729999999999998 - type: recall_at_100 value: 10.856 - type: recall_at_1000 value: 38.964999999999996 - type: recall_at_3 value: 0.504 - type: recall_at_5 value: 0.852 - task: type: Retrieval dataset: type: webis-touche2020 name: MTEB Touche2020 config: default split: test revision: None metrics: - type: map_at_1 value: 1.6629999999999998 - type: map_at_10 value: 8.601 - type: map_at_100 value: 14.354 - type: map_at_1000 value: 15.927 - type: map_at_3 value: 4.1930000000000005 - type: map_at_5 value: 5.655 - type: mrr_at_1 value: 18.367 - type: mrr_at_10 value: 34.466 - type: mrr_at_100 value: 35.235 - type: mrr_at_1000 value: 35.27 - type: mrr_at_3 value: 28.571 - type: mrr_at_5 value: 31.531 - type: ndcg_at_1 value: 14.285999999999998 - type: ndcg_at_10 value: 20.374 - type: ndcg_at_100 value: 33.532000000000004 - type: ndcg_at_1000 value: 45.561 - type: ndcg_at_3 value: 18.442 - type: ndcg_at_5 value: 18.076 - type: precision_at_1 value: 18.367 - type: precision_at_10 value: 20.204 - type: precision_at_100 value: 7.489999999999999 - type: precision_at_1000 value: 1.5630000000000002 - type: precision_at_3 value: 21.769 - type: precision_at_5 value: 20.408 - type: recall_at_1 value: 1.6629999999999998 - type: recall_at_10 value: 15.549 - type: recall_at_100 value: 47.497 - type: recall_at_1000 value: 84.524 - type: recall_at_3 value: 5.289 - type: recall_at_5 value: 8.035 - task: type: Classification dataset: type: mteb/toxic_conversations_50k name: MTEB ToxicConversationsClassification config: default split: test revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c metrics: - type: accuracy value: 71.8194 - type: ap value: 14.447702451658554 - type: f1 value: 55.13659412856185 - task: type: Classification dataset: type: mteb/tweet_sentiment_extraction name: MTEB TweetSentimentExtractionClassification config: default split: test revision: d604517c81ca91fe16a244d1248fc021f9ecee7a metrics: - type: accuracy value: 63.310696095076416 - type: f1 value: 63.360434851097814 - task: type: Clustering dataset: type: mteb/twentynewsgroups-clustering name: MTEB TwentyNewsgroupsClustering config: default split: test revision: 6125ec4e24fa026cec8a478383ee943acfbd5449 metrics: - type: v_measure value: 51.30677907335145 - task: type: PairClassification dataset: type: mteb/twittersemeval2015-pairclassification name: MTEB TwitterSemEval2015 config: default split: test revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1 metrics: - type: cos_sim_accuracy value: 86.12386004649221 - type: cos_sim_ap value: 73.99096426215495 - type: cos_sim_f1 value: 68.18416968442834 - type: cos_sim_precision value: 66.86960933536275 - type: cos_sim_recall value: 69.55145118733509 - type: dot_accuracy value: 86.12386004649221 - type: dot_ap value: 73.99096813038672 - type: dot_f1 value: 68.18416968442834 - type: dot_precision value: 66.86960933536275 - type: dot_recall value: 69.55145118733509 - type: euclidean_accuracy value: 86.12386004649221 - type: euclidean_ap value: 73.99095984980165 - type: euclidean_f1 value: 68.18416968442834 - type: euclidean_precision value: 66.86960933536275 - type: euclidean_recall value: 69.55145118733509 - type: manhattan_accuracy value: 86.09405734040651 - type: manhattan_ap value: 73.96825745608601 - type: manhattan_f1 value: 68.13888179729383 - type: manhattan_precision value: 65.99901088031652 - type: manhattan_recall value: 70.42216358839049 - type: max_accuracy value: 86.12386004649221 - type: max_ap value: 73.99096813038672 - type: max_f1 value: 68.18416968442834 - task: type: PairClassification dataset: type: mteb/twitterurlcorpus-pairclassification name: MTEB TwitterURLCorpus config: default split: test revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf metrics: - type: cos_sim_accuracy value: 88.99367407924865 - type: cos_sim_ap value: 86.19720829843081 - type: cos_sim_f1 value: 78.39889075384951 - type: cos_sim_precision value: 74.5110278818144 - type: cos_sim_recall value: 82.71481367416075 - type: dot_accuracy value: 88.99367407924865 - type: dot_ap value: 86.19718471454047 - type: dot_f1 value: 78.39889075384951 - type: dot_precision value: 74.5110278818144 - type: dot_recall value: 82.71481367416075 - type: euclidean_accuracy value: 88.99367407924865 - type: euclidean_ap value: 86.1972021422436 - type: euclidean_f1 value: 78.39889075384951 - type: euclidean_precision value: 74.5110278818144 - type: euclidean_recall value: 82.71481367416075 - type: manhattan_accuracy value: 88.95680521597392 - type: manhattan_ap value: 86.16659921351506 - type: manhattan_f1 value: 78.39125971550081 - type: manhattan_precision value: 74.82502799552073 - type: manhattan_recall value: 82.31444410224823 - type: max_accuracy value: 88.99367407924865 - type: max_ap value: 86.19720829843081 - type: max_f1 value: 78.39889075384951 --- # hkunlp/instructor-base 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-base) 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-base) 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-base') 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) ```
[ -0.1787722408771515, -0.9908362627029419, 0.4457332491874695, 0.017752524465322495, -0.02500063180923462, -0.18477077782154083, -0.22552864253520966, -0.0932064801454544, 0.2442314475774765, 0.2615513801574707, -0.22925984859466553, -0.7781511545181274, -0.4412953853607178, -0.01962350495159626, -0.28467944264411926, 1.019719123840332, -0.06590815633535385, 0.1684374213218689, -0.5548341870307922, -0.12529923021793365, -0.3100099563598633, -0.5257008075714111, -0.14785271883010864, -0.32589274644851685, 0.330960214138031, 0.23396016657352448, 0.5351659655570984, 0.7016468644142151, 0.36917373538017273, 0.3081548511981964, -0.04788924381136894, -0.12092907726764679, -0.3558596968650818, -0.21290408074855804, -0.1293213665485382, -0.5652490258216858, -0.20805762708187103, -0.022142767906188965, 0.6728882789611816, 0.7351136803627014, -0.07178884744644165, 0.07207579165697098, 0.2538701891899109, 0.340422123670578, -0.5259488821029663, 0.263519287109375, -0.33880895376205444, 0.12340694665908813, -0.013571084477007389, 0.011562990956008434, -0.19351531565189362, -0.28615447878837585, 0.2299341857433319, -0.6841465830802917, 0.14622196555137634, 0.19761498272418976, 0.9164578318595886, 0.3732369542121887, -0.4455002248287201, -0.4807242751121521, -0.05722632631659508, 1.0174616575241089, -0.7543315291404724, 0.36015743017196655, 0.3993452489376068, -0.1152932196855545, -0.28853797912597656, -0.840316116809845, -0.6315497756004333, -0.23044168949127197, -0.3059822916984558, 0.14369730651378632, -0.05823187902569771, -0.004041658714413643, 0.242213636636734, 0.4595348834991455, -0.6231364011764526, 0.03652720898389816, -0.3977079689502716, -0.17282754182815552, 0.44780683517456055, 0.2521904706954956, 0.442150741815567, -0.44943147897720337, -0.3553939461708069, -0.28895890712738037, -0.3918607831001282, 0.1684751808643341, 0.28440821170806885, 0.16012097895145416, -0.3691761791706085, 0.804352879524231, -0.010810837149620056, 0.4769996702671051, 0.029713595286011696, -0.237837553024292, 0.4855208992958069, -0.3391767740249634, -0.13807737827301025, 0.06152542680501938, 0.7805160880088806, 0.41551050543785095, -0.13147284090518951, 0.007799712475389242, 0.06937949359416962, 0.1732349544763565, 0.04762302711606026, -0.6309496760368347, -0.29883626103401184, 0.2255750149488449, -0.5704245567321777, -0.3474794328212738, 0.10736572742462158, -0.7707344889640808, -0.14095184206962585, -0.10093353688716888, 0.6713005304336548, -0.5468817353248596, 0.07236683368682861, 0.1837696135044098, -0.3352549970149994, -0.029444443061947823, 0.018453188240528107, -0.7769758105278015, 0.37942197918891907, 0.6697883605957031, 0.8018773198127747, -0.1409081667661667, -0.43244877457618713, -0.1122048944234848, 0.12370003759860992, 0.1007370799779892, 0.44973325729370117, -0.6525670886039734, -0.14299696683883667, 0.09819069504737854, 0.11597896367311478, -0.18671993911266327, -0.3258579671382904, 0.2435455471277237, -0.0962979719042778, 0.47707313299179077, -0.04551645368337631, -0.942638635635376, -0.46860235929489136, 0.25545868277549744, -0.4703792631626129, 1.1031591892242432, 0.20127928256988525, -0.9238802194595337, 0.007337385322898626, -0.7784472107887268, -0.398499995470047, -0.2696434259414673, -0.23275184631347656, -0.40896663069725037, -0.23711904883384705, 0.023132283240556717, 0.6873623728752136, -0.030882446095347404, 0.1353687196969986, -0.323641836643219, -0.3598378002643585, 0.2874336242675781, 0.08074392378330231, 0.9296750426292419, 0.13292919099330902, -0.4097326397895813, 0.030525514855980873, -0.5769661068916321, -0.13483993709087372, 0.09108594805002213, -0.4867742359638214, -0.49026399850845337, 0.04099516198039055, 0.17511098086833954, -0.176607146859169, 0.4781341254711151, -0.5721145272254944, 0.3275492191314697, -0.2970665991306305, 0.6540351510047913, 0.6417298316955566, 0.12443380802869797, 0.47619369626045227, -0.3608160614967346, 0.32301416993141174, 0.060281820595264435, -0.02504502795636654, -0.1371263861656189, -0.5911886096000671, -0.6262490749359131, -0.293504923582077, 0.31692561507225037, 0.5895384550094604, -0.49526718258857727, 0.6364627480506897, -0.10574480146169662, -0.6441819667816162, -0.5287208557128906, -0.0310077928006649, 0.37231630086898804, 0.2859228253364563, 0.6299560070037842, -0.11915581673383713, -0.6132692098617554, -0.6617791056632996, -0.32111844420433044, 0.06846602261066437, 0.20967547595500946, 0.32966092228889465, 0.7954874038696289, -0.48233234882354736, 0.7398515343666077, -0.9224455952644348, -0.29860156774520874, -0.21250875294208527, -0.1525905430316925, 0.2416067123413086, 0.7838321924209595, 0.7020777463912964, -0.7484855651855469, -0.6141022443771362, -0.10310351848602295, -0.6265956163406372, 0.22505266964435577, -0.10895752161741257, -0.10638733208179474, -0.00787412654608488, 0.4920679032802582, -0.5479397773742676, 0.3653041422367096, 0.3429817855358124, -0.3989420235157013, 0.4981432557106018, -0.2659849524497986, 0.03428678214550018, -1.349302887916565, -0.02024414949119091, 0.18826322257518768, -0.10595903545618057, -0.49243736267089844, 0.2295331507921219, -0.10813160240650177, 0.02509196288883686, -0.33361220359802246, 0.5435829162597656, -0.29245057702064514, 0.15481099486351013, -0.0001034425658872351, 0.21735107898712158, -0.12600195407867432, 0.6122337579727173, -0.13204267621040344, 0.4253143072128296, 0.6280943751335144, -0.6780301928520203, 0.3392173647880554, 0.5453487634658813, -0.37501218914985657, 0.26054367423057556, -0.5429366827011108, -0.06138639524579048, 0.02886871062219143, 0.29238060116767883, -0.6528599858283997, -0.16469034552574158, 0.36061301827430725, -0.40301018953323364, 0.15087534487247467, 0.06566262245178223, -0.427680641412735, -0.363771915435791, -0.5249925851821899, 0.26709815859794617, 0.586979329586029, -0.40056803822517395, 0.19343039393424988, 0.5562344789505005, -0.0003076688153669238, -0.7308512330055237, -0.6702432632446289, -0.1572643667459488, -0.31335362792015076, -0.27627891302108765, 0.5527119636535645, -0.1938631534576416, -0.0663132518529892, 0.4553605020046234, 0.06083200126886368, -0.2110801786184311, 0.17946383357048035, 0.3270528316497803, 0.2065247744321823, -0.18619504570960999, 0.1335521638393402, 0.20437650382518768, 0.03738148882985115, -0.020331665873527527, -0.30578064918518066, 0.6218527555465698, -0.26211076974868774, -0.23489512503147125, -0.46140316128730774, 0.3907771110534668, 0.20929796993732452, 0.09342151135206223, 0.656109094619751, 0.8066807985305786, -0.5698226094245911, 0.0639525055885315, -0.3226398527622223, -0.23640044033527374, -0.4730878174304962, 0.6825589537620544, -0.20492543280124664, -1.0461480617523193, 0.2573311924934387, 0.033029813319444656, 0.08426189422607422, 0.6386608481407166, 0.5670543313026428, -0.13891905546188354, 0.7614493370056152, 0.7455855011940002, -0.13715295493602753, 0.5594495534896851, -0.5440453290939331, 0.2834620773792267, -0.7464845180511475, -0.42922085523605347, -0.49652785062789917, -0.36679607629776, -0.7760887145996094, -0.5170563459396362, 0.14048397541046143, 0.28540441393852234, -0.2604982256889343, 0.5731371641159058, -0.5512624382972717, 0.26892563700675964, 0.6339926719665527, 0.15780454874038696, -0.05087932199239731, 0.179280087351799, -0.3246416747570038, -0.13953037559986115, -0.7881784439086914, -0.5417878031730652, 1.1457464694976807, 0.3628341853618622, 0.7409597635269165, -0.2018474042415619, 0.9583919048309326, 0.25100478529930115, 0.0460793636739254, -0.7270286679267883, 0.521863579750061, -0.36216720938682556, -0.4291631877422333, -0.14427801966667175, -0.4303724467754364, -1.0225908756256104, 0.2824818193912506, -0.4123252332210541, -0.7735059857368469, 0.15287281572818756, -0.016747165471315384, -0.2615596652030945, 0.44520100951194763, -0.49489107728004456, 1.0241422653198242, -0.09760043770074844, -0.1735813319683075, -0.4738315939903259, -0.3911341726779938, 0.037407148629426956, 0.09299301356077194, 0.26077505946159363, -0.049645308405160904, -0.058853548020124435, 0.9926920533180237, -0.3203178346157074, 0.9491510391235352, -0.16645704209804535, 0.2850648760795593, 0.3914368450641632, -0.32144781947135925, 0.14800433814525604, -0.02740437537431717, -0.051184557378292084, 0.10174532979726791, 0.34220847487449646, -0.5200374126434326, -0.4755948483943939, 0.8851802945137024, -0.9091017246246338, -0.4089379906654358, -0.4250252842903137, -0.6911694407463074, 0.266520619392395, 0.22952786087989807, 0.2681061327457428, 0.3085384964942932, -0.27837076783180237, 0.395092636346817, 0.3567328453063965, -0.42235085368156433, 0.27695217728614807, 0.1582147479057312, -0.08915750682353973, -0.4894193410873413, 1.076947569847107, 0.12020322680473328, -0.06700730323791504, 0.5132465362548828, 0.2933770716190338, -0.23179557919502258, -0.24012382328510284, -0.09934460371732712, 0.3499961495399475, -0.6292691230773926, -0.1369580328464508, -0.9806962013244629, -0.17345143854618073, -0.6900371313095093, -0.36435937881469727, -0.15004022419452667, -0.6138778924942017, -0.5625815391540527, -0.11678072065114975, 0.3521627187728882, 0.9109083414077759, -0.16979187726974487, 0.20529355108737946, -0.6590691804885864, 0.1874207705259323, 0.009708315134048462, 0.01594517193734646, 0.08729938417673111, -0.28630468249320984, -0.638841450214386, 0.13011600077152252, -0.5565825700759888, -0.7900866866111755, 0.32178887724876404, 0.19125236570835114, 0.8502421975135803, 0.4587497413158417, 0.10259131342172623, 0.6696386337280273, -0.5878199338912964, 0.9763998985290527, 0.3324824869632721, -0.9042781591415405, 0.4788612723350525, 0.026704085990786552, -0.15555566549301147, 0.35129693150520325, 0.6876270174980164, -0.507530689239502, -0.47262611985206604, -0.7065396904945374, -0.8989694714546204, 0.4625503718852997, 0.14383776485919952, 0.3160453140735626, -0.1625063121318817, 0.47380977869033813, 0.20838497579097748, 0.18574903905391693, -0.9437108039855957, -0.5414756536483765, -0.3716453015804291, -0.6291927099227905, -0.05931917205452919, -0.11713526397943497, -0.02550903707742691, -0.48253822326660156, 0.600257158279419, 0.06322599202394485, 0.4791351854801178, 0.28182852268218994, -0.3388558328151703, 0.21802981197834015, 0.2594631016254425, 0.4740713834762573, 0.3215862512588501, -0.21406999230384827, 0.23073416948318481, 0.348541259765625, -0.6295533180236816, 0.10694927722215652, 0.1136004775762558, -0.08929941058158875, 0.10346757620573044, 0.3671487271785736, 0.6176354289054871, 0.41702499985694885, -0.5845105051994324, 0.5734034180641174, 0.205765962600708, -0.26589784026145935, -0.37642189860343933, 0.2316637486219406, 0.06004338711500168, 0.4219149053096771, 0.27305305004119873, -0.012991456314921379, 0.16074487566947937, -0.7092851996421814, 0.2084815502166748, 0.14357677102088928, -0.44288370013237, -0.3459576666355133, 0.5736418962478638, 0.005312785971909761, -0.18621982634067535, 0.43445885181427, -0.23928844928741455, -0.8178607821464539, 0.7021200060844421, 0.8235096335411072, 0.6545242667198181, -0.01863551139831543, 0.20125022530555725, 0.63443922996521, 0.16694766283035278, -0.11465997993946075, 0.32461756467819214, 0.06393779069185257, -0.6486220955848694, -0.04340121150016785, -0.5559176802635193, -0.2600531280040741, 0.0016480349004268646, -0.730606198310852, 0.1462888866662979, -0.4662119448184967, -0.13797999918460846, -0.10863949358463287, 0.17901834845542908, -0.7440394759178162, 0.07803451269865036, -0.09326447546482086, 0.734083354473114, -0.8827494978904724, 0.7837047576904297, 1.0987541675567627, -0.4726788103580475, -0.5499188899993896, 0.06457000225782394, -0.15498191118240356, -0.6222745180130005, 0.460575133562088, 0.4279738962650299, 0.3926580548286438, 0.08686621487140656, -0.5508620738983154, -0.7482947707176208, 1.31510329246521, 0.07806266099214554, -0.358234167098999, -0.11680459976196289, 0.14227408170700073, 0.4403722882270813, -0.5843279361724854, 0.08113224059343338, 0.36283525824546814, 0.4520656168460846, -0.53142911195755, -0.5856145620346069, 0.365471214056015, -0.2628127336502075, -0.17110005021095276, -0.17496713995933533, -0.590520441532135, 1.0441114902496338, -0.3313409984111786, -0.039293188601732254, 0.1827174723148346, 0.6227490901947021, 0.14286844432353973, 0.482611745595932, 0.4946008622646332, 0.8890631794929504, 0.8801828622817993, -0.019788581877946854, 1.1016147136688232, -0.45766812562942505, 0.6623758673667908, 0.8120442628860474, 0.16266120970249176, 0.9623575210571289, 0.35502153635025024, -0.3614628314971924, 0.8322737216949463, 0.7386374473571777, -0.41543179750442505, 0.6714399456977844, 0.2331707775592804, -0.03050275705754757, -0.049130115658044815, -0.10225646197795868, -0.6936654448509216, 0.2773222029209137, 0.390038400888443, -0.3118155300617218, 0.03215938061475754, 0.19072593748569489, 0.08405644446611404, 0.06921420991420746, -0.146293506026268, 0.6146955490112305, 0.29049569368362427, -0.2699316740036011, 0.35964205861091614, 0.155596524477005, 0.9216455817222595, -0.4060613214969635, -0.0879603922367096, 0.055664949119091034, 0.25753504037857056, -0.4192403554916382, -0.750061571598053, 0.0941416546702385, -0.07689647376537323, -0.1970723569393158, 0.009937603957951069, 0.567241907119751, -0.6495186686515808, -0.336349219083786, 0.3965684473514557, 0.27898621559143066, 0.3689197301864624, 0.1440008133649826, -0.8784870505332947, -0.15168455243110657, 0.147163987159729, -0.21984663605690002, 0.3503440320491791, 0.25127002596855164, 0.16467902064323425, 0.42492711544036865, 0.6702201962471008, -0.1166166216135025, 0.1395757645368576, -0.11113173514604568, 0.8526427149772644, -0.8327751159667969, -0.6660744547843933, -0.7256606817245483, 0.46332165598869324, -0.0490872785449028, -0.21930734813213348, 0.7328664660453796, 0.8262966275215149, 0.9973628520965576, -0.18559449911117554, 0.7898369431495667, -0.21742554008960724, 0.29496845602989197, -0.46449708938598633, 0.862385630607605, -0.8260073661804199, -0.09544655680656433, -0.3776947557926178, -0.9047412872314453, -0.17384152114391327, 1.0030276775360107, -0.24296775460243225, -0.09242849051952362, 0.8289757370948792, 0.7331838607788086, -0.11171792447566986, -0.1404057741165161, 0.14539381861686707, 0.3183392882347107, 0.1590425968170166, 0.4968538284301758, 0.6433496475219727, -0.6410612463951111, 0.5797829627990723, -0.5418421030044556, -0.04915158823132515, -0.44977226853370667, -0.6271640062332153, -0.9716667532920837, -0.7532134652137756, -0.5530709624290466, -0.3889792561531067, 0.01498107984662056, 0.9673914313316345, 0.4429132044315338, -0.9384809136390686, -0.26418545842170715, 0.04563792049884796, 0.28426393866539, -0.33171042799949646, -0.3042924404144287, 0.6215951442718506, -0.2664400041103363, -0.7180058360099792, 0.2347661703824997, -0.07337210327386856, 0.15156365931034088, -0.10719077289104462, -0.16057364642620087, -0.4621174931526184, -0.10256575047969818, 0.5050475001335144, 0.033486440777778625, -0.7928526997566223, -0.32453593611717224, -0.04272055625915527, -0.3424476981163025, 0.02445010282099247, 0.60102778673172, -0.4732166826725006, 0.1212296113371849, 0.5522879362106323, 0.6830310225486755, 0.47250044345855713, -0.23756340146064758, 0.3072507679462433, -0.5626396536827087, 0.16245774924755096, 0.10321295261383057, 0.5155664086341858, 0.18223778903484344, -0.4077887535095215, 0.5112911462783813, 0.3588409721851349, -0.5301184058189392, -0.8217851519584656, -0.11034809052944183, -0.9978180527687073, -0.4630850553512573, 0.8229491710662842, -0.50554358959198, -0.3258278965950012, -0.020539045333862305, -0.22839324176311493, 0.48946404457092285, -0.4095253050327301, 0.7356542944908142, 0.6025168299674988, 0.0005356965120881796, 0.07081552594900131, -0.4817834496498108, 0.283502459526062, 0.5403839349746704, -0.6211592555046082, -0.42079809308052063, 0.24783973395824432, 0.5286209583282471, 0.3265637457370758, 0.31837525963783264, 0.056200478225946426, 0.18204237520694733, 0.18848168849945068, 0.0702054500579834, -0.0853205993771553, -0.005768402013927698, -0.16056638956069946, 0.12050216645002365, -0.4031250476837158, -0.3333514630794525 ]
salti/bert-base-multilingual-cased-finetuned-squad
salti
"2023-11-21T11:08:02Z"
30,507
13
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "bert", "question-answering", "multilingual", "dataset:squad", "dataset:arcd", "dataset:xquad", "autotrain_compatible", "endpoints_compatible", "region:us" ]
question-answering
"2022-03-02T23:29:05Z"
--- language: - multilingual datasets: - squad - arcd - xquad --- # Multilingual BERT fine-tuned on SQuADv1.1 [**WandB run link**](https://wandb.ai/salti/mBERT_QA/runs/wkqzhrp2) **GPU**: Tesla P100-PCIE-16GB ## Training Arguments ```python max_seq_length = 512 doc_stride = 256 max_answer_length = 64 bacth_size = 16 gradient_accumulation_steps = 2 learning_rate = 5e-5 weight_decay = 3e-7 num_train_epochs = 3 warmup_ratio = 0.1 fp16 = True fp16_opt_level = "O1" seed = 0 ``` ## Results | EM | F1 | | :----: | :----: | | 81.731 | 89.009 | ## Zero-shot performance ### on ARCD | EM | F1 | | :----: | :----: | | 20.655 | 48.051 | ### on XQuAD | Language | EM | F1 | | :--------: | :----: | :----: | | Arabic | 42.185 | 57.803 | | English | 73.529 | 85.01 | | German | 55.882 | 72.555 | | Greek | 45.21 | 62.207 | | Spanish | 58.067 | 76.406 | | Hindi | 40.588 | 55.29 | | Russian | 55.126 | 71.617 | | Thai | 26.891 | 39.965 | | Turkish | 34.874 | 51.138 | | Vietnamese | 47.983 | 68.125 | | Chinese | 47.395 | 58.928 |
[ -0.7529582381248474, -0.6011516451835632, 0.09525015205144882, 0.7760600447654724, -0.3589155673980713, 0.5937052965164185, -0.5251461863517761, -0.3301195800304413, 0.13219782710075378, -0.006853066850453615, -0.9598209857940674, -0.6517722606658936, -0.5297310948371887, -0.06235192343592644, 0.04971713572740555, 1.3182778358459473, -0.14629998803138733, 0.46355685591697693, 0.18448197841644287, -0.15380078554153442, -0.337428480386734, -0.5647404193878174, -0.9499559998512268, -0.42068812251091003, 0.43339380621910095, 0.5436902046203613, 0.7281045317649841, 0.1807807832956314, 0.5627254247665405, 0.3029157221317291, 0.09596367925405502, 0.09856674820184708, -0.608289361000061, 0.10481154173612595, 0.38907620310783386, 0.04992145672440529, -0.4265590310096741, -0.5171926617622375, 0.7423127889633179, 0.06221359968185425, -0.13027852773666382, 0.038409020751714706, -0.14605024456977844, 0.805495023727417, -0.30430376529693604, 0.4597688913345337, -0.5090482234954834, -0.0998016819357872, 0.024898195639252663, 0.11817734688520432, -0.3555178642272949, -0.022684287279844284, 0.2571927011013031, -0.9358078241348267, 0.4865410625934601, -0.25010284781455994, 1.632340908050537, 0.29517611861228943, -0.2048945128917694, 0.033295273780822754, -0.552144467830658, 0.9842731952667236, -0.792721688747406, 0.39061856269836426, 0.405721515417099, 0.49325621128082275, 0.0485370047390461, -0.397348016500473, -0.4317517578601837, 0.14253050088882446, 0.17734718322753906, 0.5068986415863037, -0.29395031929016113, -0.046309273689985275, 0.1193314641714096, -0.06402601301670074, -0.5646582841873169, 0.28316718339920044, -0.7079552412033081, -0.44705748558044434, 1.1291204690933228, -0.1824912130832672, 0.1722967028617859, 0.022559940814971924, -0.3620426654815674, -0.4758705496788025, -0.5933375954627991, 0.354099303483963, 0.5660615563392639, 0.5526332259178162, -0.6169469952583313, 0.2588547468185425, -0.2298397421836853, 0.5759284496307373, 0.08886709809303284, 0.12681794166564941, 0.5617713928222656, -0.41622549295425415, -0.10468590259552002, 0.1977495700120926, 1.111261248588562, 0.27401119470596313, 0.30903390049934387, -0.14533095061779022, -0.1005157008767128, -0.32142210006713867, 0.4350310266017914, -0.9150545597076416, -0.6963106989860535, 0.4643208384513855, -0.22089123725891113, -0.045340120792388916, 0.11095515638589859, -0.7009614109992981, 0.08388460427522659, 0.21606892347335815, 0.5190092921257019, -1.1905299425125122, -0.3237130641937256, -0.23881830275058746, -0.29047152400016785, 0.9957049489021301, 0.4464740753173828, -1.322669267654419, -0.04378136247396469, 0.33180320262908936, 0.7362937331199646, -0.09252865612506866, -0.43871667981147766, -0.18632659316062927, 0.08940569311380386, -0.20938880741596222, 0.9381753206253052, -0.0338205061852932, -0.4488738775253296, 0.12633198499679565, 0.10946176201105118, -0.013020015321671963, -0.13598276674747467, 0.5345720052719116, -0.37565135955810547, 0.06663805991411209, -0.8658904433250427, -0.297624409198761, -0.26435980200767517, 0.13682253658771515, -0.7305364608764648, 1.4932641983032227, 0.26592570543289185, -0.6275519728660583, 0.7207295894622803, -0.6628870368003845, -0.8315448760986328, 0.25757095217704773, -0.10485623776912689, -0.7507240772247314, -0.2679804563522339, 0.6499864459037781, 0.6521602272987366, 0.21827451884746552, 0.042107779532670975, -0.07548883557319641, -0.3436335325241089, -0.1268562227487564, -0.34490615129470825, 1.042449712753296, 0.19354696571826935, -0.571345865726471, 0.26909852027893066, -0.9261281490325928, 0.4346880614757538, 0.031226160004734993, -0.5134665966033936, 0.2599935829639435, 0.3624401390552521, 0.43273770809173584, 0.18261423707008362, 0.4720156490802765, -0.7199903726577759, 0.10629341751337051, -0.062480490654706955, 0.6146814227104187, 0.9536277651786804, -0.249899223446846, 0.08561231195926666, -0.3988175392150879, 0.385026752948761, 0.10653820633888245, 0.07267924398183823, 0.01853378489613533, -0.9229387044906616, -0.9085777997970581, -0.8994648456573486, -0.08863870799541473, 0.897299587726593, -1.1244585514068604, 0.6250810027122498, -0.12894722819328308, -0.8434995412826538, -0.7967838048934937, 0.1580846756696701, 0.40458402037620544, 0.2523340582847595, 0.7332459092140198, 0.030227379873394966, -0.8577303886413574, -1.2605241537094116, 0.18757517635822296, -0.5309820175170898, 0.17267675697803497, 0.40251362323760986, 0.7371245622634888, -0.0377163402736187, 0.7825770378112793, -0.24953129887580872, -0.10890454798936844, -0.6530591249465942, 0.08662458509206772, 0.18388043344020844, 0.7422935366630554, 0.9629656672477722, -0.510802149772644, -0.6982547640800476, 0.18223729729652405, -0.7677847743034363, 0.11491427570581436, -0.13650357723236084, -0.17450755834579468, 0.5036495923995972, 0.2836643159389496, -0.35735824704170227, 0.3016923666000366, 0.6462891101837158, -0.2558147609233856, 0.679291307926178, -0.6229578852653503, 0.25822532176971436, -1.200015902519226, -0.2262742817401886, 0.08416751772165298, -0.19706331193447113, -0.34185272455215454, -0.032721634954214096, 0.22250773012638092, 0.1898099184036255, -0.8804811835289001, 0.4141903519630432, -0.3875998854637146, 0.189499631524086, 0.18795548379421234, -0.13174273073673248, -0.13024644553661346, 0.7037151455879211, 0.1103314757347107, 1.3289357423782349, 0.8693243265151978, -0.6557847261428833, 0.5584671497344971, 0.41425102949142456, -0.5591048002243042, 0.2813620865345001, -1.0126391649246216, -0.22541289031505585, -0.07938075065612793, 0.16854415833950043, -1.5521888732910156, -0.28901347517967224, -0.07708262652158737, -0.7599617838859558, 0.4784175455570221, -0.0043549793772399426, -0.7813164591789246, -0.332673579454422, -0.36530888080596924, 0.526639997959137, 0.7305139899253845, -0.6020415425300598, -0.040033578872680664, 0.31579649448394775, -0.06462983042001724, -0.6193477511405945, -0.7375508546829224, -0.21303999423980713, 0.0037927855737507343, -0.9020354747772217, 0.41283726692199707, -0.07252687960863113, 0.032058343291282654, -0.3814917206764221, 0.0644361674785614, -0.619398295879364, 0.08403055369853973, 0.05085768178105354, 0.5397781133651733, -0.41672372817993164, 0.07805517315864563, 0.10826754570007324, 0.27259719371795654, -0.0771918073296547, 0.22419564425945282, 0.6929987072944641, -0.6481785774230957, -0.05534011125564575, -0.41467103362083435, 0.5690253376960754, 0.4864168167114258, -0.3586520552635193, 0.8691372871398926, 1.420594334602356, -0.11596940457820892, 0.05710595101118088, -0.44350552558898926, -0.05572623759508133, -0.5326660871505737, 0.8599452376365662, -0.3737173080444336, -0.9285659790039062, 1.0206141471862793, 0.4648512005805969, 0.3418184518814087, 0.9015585780143738, 0.7542651295661926, -0.5876468420028687, 1.4201399087905884, 0.4867635667324066, -0.2963411509990692, 0.46471738815307617, -0.5524613857269287, -0.1436159610748291, -0.7510364055633545, -0.4831382632255554, -0.5846990942955017, -0.458727091550827, -1.0022125244140625, -0.21195295453071594, 0.4148327708244324, -0.039831265807151794, -0.7336424589157104, 0.6596410274505615, -0.6976340413093567, 0.6264775991439819, 0.7679057717323303, 0.3938455283641815, -0.2924575209617615, 0.14628085494041443, -0.2013339400291443, -0.4341854155063629, -1.1407458782196045, -0.21983785927295685, 1.286373496055603, 0.13595928251743317, 0.6604955792427063, 0.40503376722335815, 0.878473162651062, 0.20658032596111298, -0.0373881570994854, -0.541318953037262, 0.5168635845184326, -0.28611910343170166, -1.078534722328186, -0.4621026813983917, -0.2216615080833435, -1.1632130146026611, 0.17786818742752075, -0.2444942444562912, -0.9035979509353638, -0.04691522195935249, 0.07527874410152435, -0.5017340779304504, 0.4734804034233093, -1.0923001766204834, 1.1698893308639526, -0.43240708112716675, -0.29926812648773193, -0.22527356445789337, -0.7694067358970642, 0.437013179063797, 0.04455215856432915, 0.08512371778488159, -0.4026808440685272, 0.02636263146996498, 0.9090848565101624, -0.4937976896762848, 0.6805078983306885, -0.22418366372585297, -0.03378361091017723, 0.09883395582437515, -0.3192049264907837, 0.22027219831943512, 0.37782901525497437, 0.006071302108466625, 0.5027223229408264, 0.27823418378829956, -1.0661646127700806, -0.09962856769561768, 0.8175507187843323, -1.563916563987732, -0.42695361375808716, -0.878843367099762, -0.759455680847168, -0.27374839782714844, 0.15773947536945343, 0.6275238990783691, 0.163068488240242, -0.3473217189311981, 0.29735875129699707, 0.8583104014396667, -0.4552888572216034, 0.8756338953971863, 0.7098835110664368, 0.023050662130117416, -0.4691404402256012, 1.078197717666626, -0.08961699903011322, 0.17641939222812653, 0.2764680087566376, -0.36389824748039246, -0.24302110075950623, -0.3670811653137207, -0.7588942050933838, 0.16282862424850464, -0.3630751371383667, -0.20854267477989197, -0.13999664783477783, -0.4828939735889435, -0.5802786946296692, -0.290866881608963, -0.6432375311851501, -0.39230939745903015, -0.525270402431488, 0.06551739573478699, 0.5858749747276306, 0.5659043788909912, -0.010269192047417164, 0.6208187937736511, -0.8587368130683899, 0.3059881329536438, 0.22111211717128754, 0.3395954370498657, -0.38704821467399597, -0.7112753987312317, -0.6013056039810181, 0.1463213562965393, -0.5600460171699524, -0.9129936695098877, 0.6216668486595154, 0.4273158311843872, 0.9640577435493469, 0.37891191244125366, -0.04464356601238251, 1.0381598472595215, -0.8055541515350342, 1.0757019519805908, 0.08664341270923615, -0.9622323513031006, 0.810257077217102, -0.46901530027389526, 0.5593564510345459, 0.7759052515029907, 0.4122346043586731, -0.2244722992181778, -0.5208778381347656, -0.7287019491195679, -1.2484054565429688, 1.2375892400741577, 0.5168851613998413, 0.02182779647409916, -0.2775401473045349, -0.044764503836631775, 0.05201439559459686, 0.07342564314603806, -0.6274844408035278, -0.6253678798675537, -0.49067041277885437, 0.013232056051492691, -0.19389401376247406, -0.00871292408555746, 0.05084998905658722, -0.8935971260070801, 1.2410849332809448, 0.10713706165552139, 0.6405153870582581, 0.35847485065460205, -0.12693539261817932, 0.12482234090566635, 0.14676466584205627, 1.1584875583648682, 0.841761589050293, -0.6602928042411804, -0.34293025732040405, 0.21590150892734528, -0.675067663192749, 0.07244141399860382, 0.17604680359363556, -0.04604935273528099, 0.4344416558742523, 0.4595084488391876, 0.8903721570968628, 0.2845110595226288, -0.8269445300102234, 0.39053693413734436, -0.13551944494247437, -0.41033393144607544, -0.41792190074920654, -0.007093404419720173, -0.32623791694641113, 0.4360383152961731, 0.6349447965621948, 0.1592700332403183, -0.5017972588539124, -0.2867450416088104, 0.20858755707740784, 0.7898168563842773, -0.5659187436103821, -0.37223467230796814, 0.8169299364089966, 0.429828405380249, -0.07578025013208389, 0.8726792931556702, -0.1711113303899765, -0.8363903760910034, 1.0084805488586426, 0.4575120806694031, 1.055366039276123, -0.395916610956192, 0.34462684392929077, 0.8029469847679138, 0.7974036931991577, 0.1369895190000534, 0.8642939925193787, -0.04190993681550026, -0.9586021900177002, -0.47448959946632385, -0.2361663579940796, -0.5142704248428345, 0.06343156099319458, -1.0143457651138306, 0.21499331295490265, -0.4042993485927582, -0.16565077006816864, 0.18469488620758057, 0.10407751053571701, -0.8400722742080688, 0.09242448210716248, 0.16846707463264465, 0.9835220575332642, -0.6336184144020081, 1.485230565071106, 0.9690774083137512, -0.5688483715057373, -0.7227998375892639, -0.4335887134075165, -0.35071539878845215, -1.4167418479919434, 0.7179310917854309, -0.06014520302414894, 0.3421292006969452, 0.17555373907089233, -0.7060158848762512, -0.876930832862854, 1.1700865030288696, 0.4294361174106598, -0.4285986125469208, 0.21547572314739227, -0.07377350330352783, 0.4911990761756897, -0.016074679791927338, 0.4240604043006897, 0.586020290851593, 0.6552930474281311, -0.04411589354276657, -1.1722356081008911, -0.4566535949707031, -0.47553640604019165, -0.07953879982233047, 0.2877529561519623, -1.100044846534729, 1.0556809902191162, -0.45027396082878113, 0.31959259510040283, -0.21510910987854004, 0.7460302710533142, 0.23419800400733948, -0.14175042510032654, 0.1768336296081543, 0.633865475654602, 0.6356542706489563, -0.6288801431655884, 0.958580493927002, -0.6561011672019958, 0.5793648958206177, 0.9922166466712952, -0.00786878727376461, 1.089924693107605, 0.519118070602417, -0.6013705134391785, 0.6255139708518982, 0.9136303067207336, -0.28448647260665894, 0.7094818949699402, -0.21815046668052673, -0.3885563910007477, -0.3778223395347595, 0.43338796496391296, -0.684980571269989, 0.3679429888725281, 0.24829335510730743, -0.06686554104089737, -0.3536016643047333, -0.06195662170648575, 0.2837415039539337, -0.3314819931983948, -0.33181360363960266, 0.803376317024231, -0.562375009059906, -0.7232528328895569, 1.0223766565322876, 0.11189322173595428, 0.7859416604042053, -1.1158099174499512, 0.1861433982849121, -0.2629901170730591, 0.3123275935649872, -0.0791662409901619, -1.0419527292251587, 0.14137402176856995, 0.08878926187753677, -0.4461572468280792, -0.46599045395851135, 0.3872205317020416, -0.5389128923416138, -0.8396849632263184, 0.1414700150489807, 0.5293256640434265, 0.28939709067344666, -0.02512398548424244, -0.9269296526908875, 0.20920129120349884, 0.33826956152915955, -0.0659981220960617, 0.43779104948043823, 0.3622259795665741, 0.1328602135181427, 0.7554863095283508, 0.41335445642471313, 0.1009744182229042, 0.5156924724578857, -0.10490153729915619, 0.8180674910545349, -0.6986417770385742, -0.4885987937450409, -0.9552232027053833, 0.3946411609649658, -0.13608995079994202, -0.7777060866355896, 0.8904173970222473, 0.9688594937324524, 0.989181399345398, -0.28027310967445374, 1.0021047592163086, -0.10133577883243561, 0.07387363165616989, -0.3117593824863434, 1.102027177810669, -0.5185144543647766, 0.03950715810060501, -0.28789380192756653, -0.6068954467773438, -0.15225887298583984, 1.1128969192504883, 0.016504334285855293, -0.03918716311454773, 0.6288008689880371, 0.4628579020500183, 0.24124819040298462, -0.20359326899051666, 0.22769688069820404, 0.09384407103061676, 0.38655591011047363, 1.0411015748977661, 0.38909849524497986, -0.8314929008483887, 0.9738571047782898, -0.554909348487854, -0.015069977380335331, -0.07411985099315643, -0.7541263103485107, -1.0870702266693115, -0.7029078006744385, -0.626948893070221, -0.39865967631340027, 0.18870997428894043, 1.0969557762145996, 0.9368956685066223, -1.1837632656097412, -0.5870693325996399, 0.15080223977565765, 0.11555304378271103, -0.4162936806678772, -0.26099008321762085, 0.35695481300354004, -0.6395649909973145, -0.7991265058517456, 0.2881842255592346, -0.011169256642460823, 0.0826149433851242, -0.30770647525787354, -0.4088408350944519, -0.6161589622497559, -0.1052827388048172, 0.6880759596824646, 0.5949045419692993, -0.9764464497566223, -0.3593186140060425, -0.05256384238600731, -0.12761569023132324, 0.44202348589897156, 0.23228436708450317, -0.9418051838874817, 0.6962870359420776, 0.5080001950263977, 0.5064904093742371, 0.6012409329414368, -0.2907310128211975, 0.5401484966278076, -1.2210513353347778, 0.5347210764884949, 0.29045888781547546, 0.4137091040611267, 0.24528297781944275, 0.004879518877714872, 0.25327152013778687, 0.1469058245420456, -0.6461895704269409, -0.8145765662193298, -0.22724947333335876, -1.5719695091247559, -0.1377330720424652, 1.3129490613937378, -0.14619623124599457, -0.2189367264509201, -0.04844252020120621, -0.3506668508052826, 0.31335949897766113, -0.9685475826263428, 0.7232293486595154, 1.3666144609451294, -0.168710395693779, -0.09309493005275726, -0.5812368988990784, 0.5569390654563904, 0.5400387644767761, -0.9261465072631836, -0.5153728723526001, 0.38120540976524353, 0.09825300425291061, -0.21521343290805817, 0.3990965187549591, 0.26497241854667664, 0.7403252720832825, -0.0756368562579155, 0.395282119512558, 0.09707682579755783, 0.059719815850257874, 0.02392459660768509, -0.31165948510169983, -0.2574670612812042, -0.7987318634986877 ]
jonatasgrosman/wav2vec2-large-xlsr-53-polish
jonatasgrosman
"2022-12-14T01:57:56Z"
30,430
2
transformers
[ "transformers", "pytorch", "jax", "wav2vec2", "automatic-speech-recognition", "audio", "hf-asr-leaderboard", "mozilla-foundation/common_voice_6_0", "pl", "robust-speech-event", "speech", "xlsr-fine-tuning-week", "dataset:common_voice", "dataset:mozilla-foundation/common_voice_6_0", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-03-02T23:29:05Z"
--- language: pl license: apache-2.0 datasets: - common_voice - mozilla-foundation/common_voice_6_0 metrics: - wer - cer tags: - audio - automatic-speech-recognition - hf-asr-leaderboard - mozilla-foundation/common_voice_6_0 - pl - robust-speech-event - speech - xlsr-fine-tuning-week model-index: - name: XLSR Wav2Vec2 Polish by Jonatas Grosman results: - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Common Voice pl type: common_voice args: pl metrics: - name: Test WER type: wer value: 14.21 - name: Test CER type: cer value: 3.49 - name: Test WER (+LM) type: wer value: 10.98 - name: Test CER (+LM) type: cer value: 2.93 - task: name: Automatic Speech Recognition type: automatic-speech-recognition dataset: name: Robust Speech Event - Dev Data type: speech-recognition-community-v2/dev_data args: pl metrics: - name: Dev WER type: wer value: 33.18 - name: Dev CER type: cer value: 15.92 - name: Dev WER (+LM) type: wer value: 29.31 - name: Dev CER (+LM) type: cer value: 15.17 --- # Fine-tuned XLSR-53 large model for speech recognition in Polish Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Polish using the train and validation splits of [Common Voice 6.1](https://huggingface.co/datasets/common_voice). When using this model, make sure that your speech input is sampled at 16kHz. This model has been fine-tuned thanks to the GPU credits generously given by the [OVHcloud](https://www.ovhcloud.com/en/public-cloud/ai-training/) :) The script used for training can be found here: https://github.com/jonatasgrosman/wav2vec2-sprint ## Usage The model can be used directly (without a language model) as follows... Using the [HuggingSound](https://github.com/jonatasgrosman/huggingsound) library: ```python from huggingsound import SpeechRecognitionModel model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-polish") audio_paths = ["/path/to/file.mp3", "/path/to/another_file.wav"] transcriptions = model.transcribe(audio_paths) ``` Writing your own inference script: ```python import torch import librosa from datasets import load_dataset from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor LANG_ID = "pl" MODEL_ID = "jonatasgrosman/wav2vec2-large-xlsr-53-polish" SAMPLES = 5 test_dataset = load_dataset("common_voice", LANG_ID, split=f"test[:{SAMPLES}]") processor = Wav2Vec2Processor.from_pretrained(MODEL_ID) model = Wav2Vec2ForCTC.from_pretrained(MODEL_ID) # Preprocessing the datasets. # We need to read the audio files as arrays def speech_file_to_array_fn(batch): speech_array, sampling_rate = librosa.load(batch["path"], sr=16_000) batch["speech"] = speech_array batch["sentence"] = batch["sentence"].upper() return batch test_dataset = test_dataset.map(speech_file_to_array_fn) inputs = processor(test_dataset["speech"], sampling_rate=16_000, return_tensors="pt", padding=True) with torch.no_grad(): logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits predicted_ids = torch.argmax(logits, dim=-1) predicted_sentences = processor.batch_decode(predicted_ids) for i, predicted_sentence in enumerate(predicted_sentences): print("-" * 100) print("Reference:", test_dataset[i]["sentence"]) print("Prediction:", predicted_sentence) ``` | Reference | Prediction | | ------------- | ------------- | | """CZY DRZWI BYŁY ZAMKNIĘTE?""" | PRZY DRZWI BYŁY ZAMKNIĘTE | | GDZIEŻ TU POWÓD DO WYRZUTÓW? | WGDZIEŻ TO POM DO WYRYDÓ | | """O TEM JEDNAK NIE BYŁO MOWY.""" | O TEM JEDNAK NIE BYŁO MOWY | | LUBIĘ GO. | LUBIĄ GO | | — TO MI NIE POMAGA. | TO MNIE NIE POMAGA | | WCIĄŻ LUDZIE WYSIADAJĄ PRZED ZAMKIEM, Z MIASTA, Z PRAGI. | WCIĄŻ LUDZIE WYSIADAJĄ PRZED ZAMKIEM Z MIASTA Z PRAGI | | ALE ON WCALE INACZEJ NIE MYŚLAŁ. | ONY MONITCENIE PONACZUŁA NA MASU | | A WY, CO TAK STOICIE? | A WY CO TAK STOICIE | | A TEN PRZYRZĄD DO CZEGO SŁUŻY? | A TEN PRZYRZĄD DO CZEGO SŁUŻY | | NA JUTRZEJSZYM KOLOKWIUM BĘDZIE PIĘĆ PYTAŃ OTWARTYCH I TEST WIELOKROTNEGO WYBORU. | NAJUTRZEJSZYM KOLOKWIUM BĘDZIE PIĘĆ PYTAŃ OTWARTYCH I TEST WIELOKROTNEGO WYBORU | ## Evaluation 1. To evaluate on `mozilla-foundation/common_voice_6_0` with split `test` ```bash python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-polish --dataset mozilla-foundation/common_voice_6_0 --config pl --split test ``` 2. To evaluate on `speech-recognition-community-v2/dev_data` ```bash python eval.py --model_id jonatasgrosman/wav2vec2-large-xlsr-53-polish --dataset speech-recognition-community-v2/dev_data --config pl --split validation --chunk_length_s 5.0 --stride_length_s 1.0 ``` ## Citation If you want to cite this model you can use this: ```bibtex @misc{grosman2021xlsr53-large-polish, title={Fine-tuned {XLSR}-53 large model for speech recognition in {P}olish}, author={Grosman, Jonatas}, howpublished={\url{https://huggingface.co/jonatasgrosman/wav2vec2-large-xlsr-53-polish}}, year={2021} } ```
[ -0.3914262354373932, -0.6434342861175537, 0.2906116247177124, 0.2508482038974762, -0.2852323353290558, -0.19373655319213867, -0.44192227721214294, -0.5766429305076599, 0.26026812195777893, 0.24157945811748505, -0.7524644732475281, -0.5708364844322205, -0.4345714747905731, 0.038671933114528656, -0.21891368925571442, 0.9489805698394775, 0.11296433210372925, 0.324431449174881, 0.009602225385606289, -0.17401283979415894, -0.22546328604221344, -0.508947491645813, -0.5320973992347717, -0.3094753623008728, 0.3546443283557892, 0.2790980637073517, 0.2741648852825165, 0.2646050751209259, 0.34959107637405396, 0.4044385552406311, -0.2357335090637207, 0.14105525612831116, -0.2117834836244583, 0.032419007271528244, 0.1369202435016632, -0.42964038252830505, -0.3631626069545746, 0.05338812246918678, 0.6890396475791931, 0.5079182982444763, -0.25886157155036926, 0.3430013060569763, -0.07849613577127457, 0.3750612735748291, -0.36102786660194397, 0.15570731461048126, -0.5039681196212769, -0.0729537233710289, -0.19590148329734802, 0.15097984671592712, -0.4218568801879883, -0.21657516062259674, 0.152482271194458, -0.5264090895652771, 0.16131208837032318, -0.06411924958229065, 0.9188295602798462, 0.09649297595024109, 0.025250518694519997, -0.35477301478385925, -0.6394394040107727, 0.9743792414665222, -1.001993179321289, 0.37832170724868774, 0.430713027715683, 0.08344803005456924, -0.18061359226703644, -0.847528338432312, -0.6574896574020386, -0.2161618322134018, 0.08537497371435165, 0.25350221991539, -0.4187227189540863, -0.06318558752536774, 0.3705880641937256, 0.10605299472808838, -0.6658061742782593, 0.05711419880390167, -0.7227557301521301, -0.4403344988822937, 0.6931662559509277, -0.01625155285000801, 0.23096370697021484, -0.061342883855104446, -0.15198685228824615, -0.4319513738155365, -0.22203603386878967, 0.27774813771247864, 0.47304150462150574, 0.5197775959968567, -0.45575132966041565, 0.5216497182846069, -0.1945042461156845, 0.7020231485366821, 0.09335621446371078, -0.36067020893096924, 0.9870976209640503, -0.3110482692718506, -0.2980023920536041, 0.24398855865001678, 1.1108996868133545, 0.17835278809070587, 0.2827335298061371, -0.0015796980587765574, -0.010734292678534985, 0.27020224928855896, -0.23604416847229004, -0.6802524924278259, -0.2185743898153305, 0.322847843170166, -0.26767265796661377, -0.13823910057544708, 0.015250755473971367, -0.6099920868873596, 0.0879402831196785, -0.1657489836215973, 0.6082724928855896, -0.5739684104919434, -0.20434032380580902, 0.3247336447238922, -0.228598952293396, 0.031086048111319542, -0.029394064098596573, -0.8792372941970825, 0.2350730150938034, 0.40851539373397827, 0.795166015625, 0.19321414828300476, -0.42281273007392883, -0.5709874629974365, -0.2517198622226715, -0.26181769371032715, 0.5256987810134888, -0.2975623905658722, -0.18277116119861603, -0.2071244865655899, 0.08803307265043259, -0.2926296889781952, -0.5048270225524902, 0.7710737586021423, -0.08515742421150208, 0.5347573757171631, -0.09696183353662491, -0.5176903605461121, -0.16416874527931213, -0.1958053708076477, -0.45406174659729004, 1.1166502237319946, 0.016179068014025688, -0.8226910829544067, 0.11784220486879349, -0.5173612833023071, -0.3935646116733551, -0.17639106512069702, 0.024447118863463402, -0.4860353469848633, -0.06846082210540771, 0.17770470678806305, 0.44482001662254333, -0.13780184090137482, 0.10812262445688248, -0.40884295105934143, -0.30103886127471924, 0.4227139949798584, -0.23652870953083038, 1.1649476289749146, 0.25374704599380493, -0.3600836396217346, 0.13575536012649536, -0.9141337871551514, 0.2959092855453491, 0.04256032407283783, -0.4730212986469269, -0.11579733341932297, -0.07041764259338379, 0.2878226041793823, 0.34537768363952637, 0.180079385638237, -0.7861718535423279, -0.02353552356362343, -0.7144754528999329, 0.7430270910263062, 0.5627912282943726, -0.15708687901496887, 0.19730274379253387, -0.24863451719284058, 0.28986939787864685, -0.0659276694059372, -0.01193998008966446, 0.14576666057109833, -0.47111859917640686, -0.6891764998435974, -0.3121846318244934, 0.39772987365722656, 0.5909864902496338, -0.4265028238296509, 0.8031585216522217, -0.14600664377212524, -0.8508490324020386, -0.784774124622345, -0.03953041881322861, 0.3694739043712616, 0.5584325194358826, 0.444132924079895, 0.05052798613905907, -0.8923044204711914, -0.8944730758666992, -0.03201359882950783, -0.2603015601634979, -0.13380450010299683, 0.3381805121898651, 0.6028656959533691, -0.22079075872898102, 0.7400413155555725, -0.37966981530189514, -0.272249698638916, -0.36871179938316345, 0.08591023087501526, 0.50935298204422, 0.6608109474182129, 0.47779953479766846, -0.7268363237380981, -0.40142205357551575, -0.26891449093818665, -0.47325214743614197, -0.170515775680542, 0.0006840155692771077, -0.08094824850559235, 0.3033897876739502, 0.3350430428981781, -0.7668293118476868, 0.11352285742759705, 0.5116438865661621, -0.49752798676490784, 0.6759266257286072, -0.09883836656808853, -0.07802714407444, -1.0242215394973755, 0.13011671602725983, 0.016651064157485962, -0.11318343132734299, -0.6453428268432617, -0.2184656709432602, -0.15391941368579865, 0.10535521060228348, -0.5585067272186279, 0.4754003584384918, -0.3673115372657776, -0.09556805342435837, 0.09539920836687088, 0.30679595470428467, -0.11657161265611649, 0.5671786665916443, 0.06876572221517563, 0.7068877220153809, 0.6954373121261597, -0.4602483808994293, 0.5192985534667969, 0.4798800051212311, -0.7223118543624878, 0.09075064212083817, -0.8239974975585938, 0.24621279537677765, 0.1736275851726532, 0.1555655151605606, -1.0457359552383423, -0.1036238893866539, 0.39201128482818604, -0.8174118399620056, 0.16327492892742157, 0.13370344042778015, -0.5081984996795654, -0.5339915156364441, -0.15875649452209473, 0.04814871773123741, 0.7053887248039246, -0.439826101064682, 0.5345116853713989, 0.4027669131755829, -0.23770484328269958, -0.6858174800872803, -0.9719089865684509, -0.23317401111125946, -0.2110830843448639, -0.810096025466919, 0.237551748752594, -0.27212414145469666, -0.23720026016235352, -0.13725188374519348, -0.12959720194339752, -0.031646065413951874, -0.03507627919316292, 0.2887522578239441, 0.40135231614112854, -0.2888779044151306, 0.025053909048438072, -0.23537476360797882, 0.02623267099261284, 0.06496995687484741, -0.013297398574650288, 0.7922122478485107, -0.23560398817062378, -0.026180274784564972, -0.6189998388290405, 0.18040330708026886, 0.5935772657394409, -0.320017009973526, 0.5676297545433044, 0.9207279086112976, -0.2880103290081024, -0.03538869321346283, -0.5131722092628479, -0.07136040925979614, -0.44970738887786865, 0.6219205856323242, -0.24132591485977173, -0.6987994313240051, 0.6085067987442017, 0.2896133065223694, -0.037760794162750244, 0.5795391798019409, 0.5975815653800964, -0.18412703275680542, 0.993807315826416, 0.32208186388015747, -0.22785241901874542, 0.5677793025970459, -0.5102013945579529, 0.028638863936066628, -0.839833676815033, -0.35838574171066284, -0.706874668598175, -0.21339288353919983, -0.3739785850048065, -0.33966493606567383, 0.16087593138217926, 0.06336265057325363, -0.2509016990661621, 0.3327973484992981, -0.5487474203109741, 0.2158762365579605, 0.6111117601394653, 0.1889047771692276, -0.15227694809436798, 0.16383887827396393, -0.25984203815460205, -0.04212098568677902, -0.593198835849762, -0.3853895664215088, 0.9429525136947632, 0.38483527302742004, 0.616849422454834, -0.07365040481090546, 0.6659944653511047, -0.020399676635861397, -0.2950204908847809, -0.8701467514038086, 0.6280580759048462, -0.27154162526130676, -0.5632613301277161, -0.4661106467247009, -0.3691064715385437, -0.7711691856384277, 0.2786902189254761, -0.28703442215919495, -0.9796832203865051, 0.2592361271381378, -0.06061185523867607, -0.48803266882896423, 0.13362571597099304, -0.6313042640686035, 0.8578188419342041, -0.007825633510947227, -0.18928110599517822, -0.18245255947113037, -0.6707701683044434, 0.19327010214328766, 0.08882943540811539, 0.1653154343366623, -0.20043063163757324, 0.2615756690502167, 1.3251419067382812, -0.3651421368122101, 0.7170448899269104, -0.26478832960128784, 0.13270272314548492, 0.4123134911060333, -0.3263581693172455, 0.4458673298358917, -0.34148454666137695, -0.326238751411438, 0.308625191450119, 0.18143679201602936, -0.1182718425989151, -0.2797713279724121, 0.6122983694076538, -0.965733528137207, -0.25411152839660645, -0.4584563672542572, -0.5229030847549438, -0.20297519862651825, 0.23707224428653717, 0.7406160831451416, 0.6271268129348755, -0.18293006718158722, 0.4446659982204437, 0.5154739022254944, -0.23014242947101593, 0.4904298782348633, 0.5394271612167358, -0.01697453297674656, -0.5985007882118225, 0.636612594127655, 0.291935533285141, 0.2443247139453888, 0.07684250921010971, 0.30415040254592896, -0.4207804799079895, -0.5674773454666138, -0.23291440308094025, 0.3413432240486145, -0.6682178378105164, -0.10079770535230637, -0.6543042659759521, -0.2213495522737503, -0.716485321521759, 0.15941648185253143, -0.333967924118042, -0.43653857707977295, -0.4281553626060486, -0.1996767222881317, 0.43365705013275146, 0.4265935719013214, -0.29929283261299133, 0.25850775837898254, -0.5087999701499939, 0.32370370626449585, 0.03366754949092865, 0.06915613263845444, -0.16224125027656555, -0.8096616268157959, -0.3499099910259247, 0.25141146779060364, -0.09793879836797714, -0.749300479888916, 0.6172294616699219, 0.202254056930542, 0.5508384704589844, 0.1918630301952362, 0.10683682560920715, 0.7245732545852661, -0.4894038736820221, 0.8688986897468567, 0.31772857904434204, -1.108259677886963, 0.6651260852813721, -0.2209581434726715, 0.25667181611061096, 0.48160097002983093, 0.14542587101459503, -0.5410675406455994, -0.45120418071746826, -0.6995242238044739, -0.8948780298233032, 1.0321284532546997, 0.22503231465816498, 0.13787409663200378, 0.03346335142850876, 0.15291735529899597, -0.16356442868709564, 0.03516038507223129, -0.7264861464500427, -0.5191643238067627, -0.1363249272108078, -0.3393397331237793, -0.3052789866924286, -0.26909172534942627, -0.14611460268497467, -0.502306342124939, 1.0088075399398804, 0.22184912860393524, 0.3677089214324951, 0.4262402653694153, 0.04479796439409256, -0.05223510041832924, 0.28557130694389343, 0.7774233818054199, 0.4083050787448883, -0.3936038017272949, -0.09306900948286057, 0.2749548852443695, -0.7386407852172852, 0.1368899792432785, 0.05651656538248062, -0.13932503759860992, 0.32684966921806335, 0.5215845108032227, 1.228821873664856, 0.19398188591003418, -0.6383922100067139, 0.4983934164047241, -0.03974128141999245, -0.5044843554496765, -0.685843288898468, 0.15934042632579803, 0.29187074303627014, 0.31276243925094604, 0.36191326379776, 0.19380904734134674, 0.01651749573647976, -0.4617789387702942, 0.13786108791828156, 0.31803855299949646, -0.30804404616355896, -0.21680575609207153, 0.5287737846374512, 0.032161466777324677, -0.32428938150405884, 0.6198205947875977, -0.008180145174264908, -0.5245160460472107, 0.7875016927719116, 0.6746222376823425, 0.7821822166442871, -0.3377000689506531, -0.03836328163743019, 0.661890983581543, 0.2173454314470291, -0.31731143593788147, 0.5263485908508301, 0.05869462341070175, -0.8228047490119934, -0.20926618576049805, -0.6192328333854675, -0.1358678787946701, 0.33738088607788086, -0.9208292961120605, 0.3223917782306671, -0.33301007747650146, -0.3049130439758301, 0.3348696231842041, 0.2172640562057495, -0.5332762598991394, 0.2785043716430664, 0.38465359807014465, 1.0675121545791626, -0.9807180166244507, 1.1100947856903076, 0.4552294611930847, -0.3887927234172821, -1.132064938545227, -0.17393572628498077, -0.22378572821617126, -0.7085667848587036, 0.6309181451797485, 0.12856613099575043, -0.21499942243099213, -0.07326922565698624, -0.6129494309425354, -0.9745465517044067, 1.0405352115631104, 0.4778146743774414, -0.8835546374320984, 0.02597307786345482, -0.2228628396987915, 0.538599967956543, -0.33868417143821716, 0.19928790628910065, 0.5670056939125061, 0.5411204099655151, 0.07710212469100952, -1.0660456418991089, -0.06865661591291428, -0.39278656244277954, -0.2969585359096527, -0.12546074390411377, -0.5480796098709106, 1.161885380744934, -0.38344165682792664, -0.13140246272087097, 0.23456312716007233, 0.6221781373023987, 0.38787218928337097, 0.2784302532672882, 0.5192543268203735, 0.532812237739563, 0.9645091891288757, -0.09460791200399399, 0.7703211903572083, -0.14276966452598572, 0.5296370983123779, 1.2311475276947021, -0.13625526428222656, 1.2475682497024536, 0.41819360852241516, -0.41972678899765015, 0.5839240550994873, 0.5239434242248535, -0.42851510643959045, 0.6867258548736572, 0.049953196197748184, -0.20095078647136688, -0.2728289067745209, 0.16711430251598358, -0.5544606447219849, 0.7248319387435913, 0.2534883916378021, -0.43709108233451843, 0.16273672878742218, 0.20220300555229187, 0.13235148787498474, -0.14259716868400574, -0.22062383592128754, 0.6048036813735962, 0.07591591030359268, -0.5416679978370667, 0.8485835194587708, -0.008897317573428154, 0.8678157329559326, -0.7645670175552368, 0.2181282788515091, 0.23320232331752777, 0.29813507199287415, -0.3285863399505615, -0.6710492968559265, 0.16586986184120178, 0.0644783228635788, -0.32136812806129456, 0.11976175010204315, 0.4458307921886444, -0.6277169585227966, -0.7171546816825867, 0.5584243535995483, 0.16186437010765076, 0.43901923298835754, 0.07586032897233963, -0.8082848191261292, 0.24196822941303253, 0.29599645733833313, -0.46028807759284973, 0.19951477646827698, 0.23823559284210205, 0.3303943872451782, 0.5488923192024231, 0.6570320129394531, 0.3493519723415375, 0.03109775297343731, 0.044460367411375046, 0.6593708395957947, -0.5558480620384216, -0.5954510569572449, -0.844656229019165, 0.48208752274513245, -0.04500323906540871, -0.4183238744735718, 0.7524006962776184, 0.6591435670852661, 0.8166242837905884, -0.12280948460102081, 0.9013910293579102, -0.15871521830558777, 0.7975381016731262, -0.5573639869689941, 0.7821657061576843, -0.4326142966747284, 0.00881995353847742, -0.28445926308631897, -0.5723187923431396, -0.13410694897174835, 0.9405421018600464, -0.46594691276550293, -0.025014786049723625, 0.4974517822265625, 0.8597493767738342, 0.022642945870757103, -0.11582154780626297, 0.313020795583725, 0.5517287850379944, 0.02097201906144619, 0.7095837593078613, 0.491635262966156, -0.6532198190689087, 0.7049680948257446, -0.5299388766288757, -0.021911760792136192, -0.12959551811218262, -0.5429788827896118, -0.7929791212081909, -0.7303718328475952, -0.4424611032009125, -0.5996048450469971, -0.15416671335697174, 1.1718472242355347, 0.7095673084259033, -0.9544348120689392, -0.3577530086040497, 0.2004890888929367, -0.15164542198181152, -0.3014821708202362, -0.2050141841173172, 0.5383363962173462, -0.05590245500206947, -0.7741078734397888, 0.46408119797706604, -0.1780356913805008, 0.15160928666591644, 0.03320815786719322, -0.21835832297801971, -0.2334265261888504, 0.012795603834092617, 0.34135597944259644, 0.252743124961853, -0.9151139259338379, -0.13270895183086395, -0.0174676813185215, -0.27173489332199097, 0.20637072622776031, 0.21685226261615753, -0.6456736922264099, 0.28600212931632996, 0.6115285158157349, 0.003998328000307083, 0.6183310151100159, -0.25457480549812317, 0.30824145674705505, -0.5140186548233032, 0.46233266592025757, 0.28763529658317566, 0.6323563456535339, 0.3504636883735657, -0.24057696759700775, 0.3841799199581146, 0.2132434844970703, -0.4979724586009979, -1.057108759880066, -0.1747843474149704, -1.2884647846221924, -0.23262585699558258, 1.1950570344924927, -0.26839151978492737, -0.2545452117919922, 0.11809107661247253, -0.393686980009079, 0.5396752953529358, -0.49093225598335266, 0.45541539788246155, 0.76124507188797, -0.16754449903964996, -0.008353832177817822, -0.6476558446884155, 0.4520551264286041, 0.2946286201477051, -0.4404352903366089, 0.23707909882068634, 0.3857240080833435, 0.6414986848831177, 0.3663242757320404, 0.7328521013259888, -0.03411056846380234, 0.34021106362342834, 0.20709604024887085, 0.3551273047924042, -0.15644966065883636, -0.07432529330253601, -0.5989310145378113, 0.023831645026803017, -0.17907248437404633, -0.5341112017631531 ]
sb3/ppo-CartPole-v1
sb3
"2022-10-11T15:05:29Z"
30,284
1
stable-baselines3
[ "stable-baselines3", "CartPole-v1", "deep-reinforcement-learning", "reinforcement-learning", "model-index", "has_space", "region:us" ]
reinforcement-learning
"2022-05-19T22:36:14Z"
--- library_name: stable-baselines3 tags: - CartPole-v1 - deep-reinforcement-learning - reinforcement-learning - stable-baselines3 model-index: - name: PPO results: - metrics: - type: mean_reward value: 500.00 +/- 0.00 name: mean_reward task: type: reinforcement-learning name: reinforcement-learning dataset: name: CartPole-v1 type: CartPole-v1 --- # **PPO** Agent playing **CartPole-v1** This is a trained model of a **PPO** agent playing **CartPole-v1** using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3) and the [RL Zoo](https://github.com/DLR-RM/rl-baselines3-zoo). The RL Zoo is a training framework for Stable Baselines3 reinforcement learning agents, with hyperparameter optimization and pre-trained agents included. ## Usage (with SB3 RL Zoo) RL Zoo: https://github.com/DLR-RM/rl-baselines3-zoo<br/> SB3: https://github.com/DLR-RM/stable-baselines3<br/> SB3 Contrib: https://github.com/Stable-Baselines-Team/stable-baselines3-contrib ``` # Download model and save it into the logs/ folder python -m rl_zoo3.load_from_hub --algo ppo --env CartPole-v1 -orga sb3 -f logs/ python enjoy.py --algo ppo --env CartPole-v1 -f logs/ ``` ## Training (with the RL Zoo) ``` python train.py --algo ppo --env CartPole-v1 -f logs/ # Upload the model and generate video (when possible) python -m rl_zoo3.push_to_hub --algo ppo --env CartPole-v1 -f logs/ -orga sb3 ``` ## Hyperparameters ```python OrderedDict([('batch_size', 256), ('clip_range', 'lin_0.2'), ('ent_coef', 0.0), ('gae_lambda', 0.8), ('gamma', 0.98), ('learning_rate', 'lin_0.001'), ('n_envs', 8), ('n_epochs', 20), ('n_steps', 32), ('n_timesteps', 100000.0), ('policy', 'MlpPolicy'), ('normalize', False)]) ```
[ -0.42814651131629944, -0.48814865946769714, 0.12687870860099792, 0.15404090285301208, -0.36255115270614624, -0.061788540333509445, 0.025023575872182846, -0.2670314311981201, 0.017908334732055664, 0.47110047936439514, -0.6286177039146423, -0.6913154125213623, -0.5548828840255737, -0.07703571766614914, 0.20101548731327057, 1.2780938148498535, 0.15227392315864563, 0.1996089518070221, -0.1223578080534935, -0.11340531706809998, -0.3195886015892029, -0.6071248054504395, -0.8774192929267883, -0.7639999389648438, 0.2742789089679718, 0.43423765897750854, 0.846836268901825, 0.5183302164077759, 0.32883763313293457, 0.3656959533691406, -0.223737895488739, -0.02403709478676319, -0.5564382672309875, -0.21389979124069214, -0.08862725645303726, -0.2477656453847885, -0.9414956569671631, 0.1434631645679474, 0.43582430481910706, 0.09816791117191315, -0.28399941325187683, 0.2021300047636032, -0.06724502891302109, 0.4099477231502533, -0.7061824798583984, 0.6027351021766663, -0.450155645608902, 0.37784096598625183, 0.09404405206441879, -0.13140028715133667, -0.35716450214385986, -0.19415085017681122, 0.24500921368598938, -1.2348911762237549, 0.14635910093784332, -0.18687964975833893, 1.603064775466919, -0.16547200083732605, -0.3568981885910034, -0.1777755320072174, -0.633739173412323, 1.0148241519927979, -0.8629465103149414, 0.07941791415214539, 0.6950735449790955, 0.5846042037010193, -0.09352882951498032, -0.826777994632721, -0.3845529556274414, -0.44277745485305786, -0.06809761375188828, 0.3590303361415863, -0.02462603896856308, 0.2189469039440155, 0.3015404939651489, 0.13325300812721252, -0.6496206521987915, 0.08635706454515457, -0.3897733986377716, -0.3459210693836212, 0.6147667169570923, 0.3520679473876953, -0.1837729960680008, -0.06934916228055954, -0.5694788694381714, -0.4070018231868744, -0.3617132604122162, 0.39585602283477783, 0.3969867527484894, 0.3324228823184967, -0.23270030319690704, 0.5804178714752197, -0.4845999479293823, 0.610704243183136, -0.026837870478630066, -0.492209255695343, 0.47427985072135925, -0.12409818917512894, -0.2933647930622101, -0.1584695428609848, 0.8120956420898438, 0.5642228126525879, 0.15529900789260864, 0.297912061214447, -0.4820336401462555, -0.28361743688583374, 0.1958235800266266, -0.6225698590278625, -0.3729782998561859, 0.2751947343349457, -0.15550336241722107, -0.5051916837692261, 0.17697976529598236, -0.8598483204841614, 0.12276748567819595, -0.14094661176204681, 0.6168258190155029, -0.6996387839317322, -0.0593629889190197, 0.1638050377368927, 0.05306636169552803, 0.6019368171691895, 0.43994641304016113, -0.8285183310508728, 0.4206652343273163, 0.7166189551353455, 0.8735011219978333, 0.3223739266395569, -0.8835066556930542, -0.48046061396598816, 0.385498583316803, -0.2935885787010193, 0.821119487285614, -0.0008669406524859369, -0.27821364998817444, 0.29743698239326477, 0.036332450807094574, -0.1247241348028183, -0.40482842922210693, 0.5407615900039673, -0.6442177295684814, 0.13040059804916382, -0.13765855133533478, -0.4979300796985626, -0.404204785823822, 0.6310984492301941, -0.6629205942153931, 1.095563292503357, 0.21082422137260437, -0.7501868605613708, 0.482750803232193, -0.586730420589447, -0.22014351189136505, 0.12447726726531982, 0.010732108727097511, -1.0876755714416504, -0.3619265854358673, 0.09459883719682693, 0.18017075955867767, -0.13893520832061768, 0.06987006962299347, -0.42714542150497437, -0.3114657402038574, 0.054370082914829254, 0.04695244878530502, 1.0087686777114868, 0.1662590652704239, -0.2416181117296219, 0.21202020347118378, -0.7448745965957642, 0.14670248329639435, 0.4550113379955292, -0.5982539653778076, 0.16116665303707123, 0.01821674033999443, 0.0947200357913971, 0.34080278873443604, 0.3694820702075958, -0.2927417457103729, 0.4093591272830963, -0.224884033203125, 0.4646272659301758, 0.6563171148300171, 0.12978790700435638, 0.1541023850440979, -0.6654040813446045, 0.5848495960235596, 0.06275926530361176, 0.5725054144859314, 0.31591370701789856, -0.5527045130729675, -0.5799024701118469, -0.29431167244911194, -0.08204255998134613, 0.5835532546043396, -0.659593939781189, 0.7157833576202393, 0.03849562630057335, -0.707119882106781, -0.07054311037063599, -0.1846524178981781, 0.4784788191318512, 0.6265228986740112, 0.4525173008441925, -0.00945739820599556, -0.5143674612045288, -0.8584548234939575, 0.2050269991159439, -0.4149133265018463, -0.05904530733823776, 0.3040493428707123, 0.9469912648200989, 0.037346869707107544, 0.7307510375976562, -0.4658319056034088, -0.48659348487854004, -0.32155609130859375, 0.15490533411502838, 0.43339353799819946, 0.7193641662597656, 0.8322962522506714, -0.36863794922828674, -0.3937007486820221, -0.05719436705112457, -0.9930175542831421, 0.2895198166370392, 0.12170971184968948, -0.13059036433696747, -0.05752411112189293, 0.07341793924570084, -1.0720981359481812, 0.3881223499774933, 0.26144522428512573, -0.3001737594604492, 0.8557847738265991, -0.49900737404823303, 0.15487739443778992, -0.7349914312362671, 0.14664021134376526, -0.09561020135879517, -0.11783698201179504, -0.47416436672210693, 0.18512068688869476, -0.10424965620040894, -0.3603985011577606, -0.9728959202766418, 0.3156045377254486, -0.5006048679351807, -0.34132444858551025, -0.0977044478058815, 0.11337780207395554, 0.12864264845848083, 0.6817925572395325, -0.007153166923671961, 0.7809658646583557, 1.1123076677322388, -0.8195480108261108, 0.39563608169555664, 0.44873207807540894, -0.0894954577088356, 0.23606452345848083, -0.7862851023674011, 0.313361257314682, 0.0007525520632043481, 0.45932167768478394, -0.7946434617042542, -0.3172387182712555, 0.5699135661125183, -0.43281134963035583, 0.11320312321186066, -0.4289555251598358, -0.32261568307876587, -0.4767080843448639, -0.5261787176132202, 0.5349768400192261, 0.4238109588623047, -0.3403385281562805, 0.37542054057121277, 0.4830388128757477, 0.3412112593650818, -0.8778824210166931, -0.3139423131942749, -0.24136285483837128, -0.3651101291179657, -0.4102858304977417, 0.25781747698783875, 0.16877637803554535, -0.013519486412405968, -0.1075974553823471, 0.013720361515879631, -0.2753981351852417, 0.07271694391965866, 0.07271148264408112, 0.2510727643966675, -0.24404063820838928, -0.1228703111410141, -0.39140743017196655, -0.2054072618484497, 0.09945522248744965, -0.43960291147232056, 0.7283012866973877, -0.3833283483982086, 0.016692789271473885, -0.7489871978759766, -0.016835667192935944, 0.6514880657196045, -0.23921681940555573, 0.8485583662986755, 0.5270994901657104, -0.5312215089797974, -0.2041361778974533, -0.04023733735084534, -0.1778547167778015, -0.5011241436004639, 0.40188276767730713, -0.5100705623626709, -0.3136397898197174, 0.730932354927063, 0.1482645720243454, 0.11159390211105347, 0.6248320937156677, 0.3461116850376129, -0.03660740330815315, 1.1311873197555542, 0.44863519072532654, -0.10509370267391205, 0.5359446406364441, -0.9736387729644775, -0.40980806946754456, -0.6814967393875122, -0.4659848213195801, -0.6509497165679932, -0.0005991735379211605, -0.39389798045158386, -0.2557949423789978, 0.2560076415538788, 0.46628934144973755, -0.5969580411911011, 0.6234107613563538, -0.48748934268951416, 0.41942447423934937, 0.45029160380363464, 0.20239005982875824, 0.07678654044866562, 0.012106545269489288, -0.2987581193447113, 0.11458885669708252, -0.9180782437324524, -0.7477277517318726, 1.2139097452163696, 0.3742935359477997, 0.7702826261520386, -0.022349288687109947, 0.6153944730758667, 0.21214915812015533, 0.2526911795139313, -0.8052126169204712, 0.7579561471939087, 0.054375942796468735, -0.6777700781822205, -0.41694924235343933, -0.15212002396583557, -1.1501890420913696, 0.43524622917175293, -0.360314279794693, -0.7872047424316406, -0.1439189910888672, 0.3859286308288574, -0.19469024240970612, 0.37660911679267883, -0.2297312468290329, 1.0116889476776123, -0.20113499462604523, -0.46445441246032715, -0.2362329065799713, -0.47973254323005676, 0.4026927053928375, 0.1872844696044922, -0.0168264452368021, -0.26421788334846497, -0.12374752759933472, 0.8458211421966553, -0.910736620426178, 0.4483904540538788, -0.5738479495048523, 0.35007062554359436, 0.7893384099006653, -0.09276701509952545, 0.731452465057373, 0.5373444557189941, -0.1337190419435501, 0.3561081886291504, -0.2641671299934387, -0.8600766062736511, -0.25824299454689026, 0.6473255753517151, -1.4695104360580444, -0.5105515122413635, -0.7998455166816711, -0.448324054479599, -0.03992442041635513, 0.1779351383447647, 0.5193703770637512, 0.2755078673362732, -0.04371372610330582, 0.09575440734624863, 0.4582619369029999, -0.09809188544750214, 0.49090316891670227, 0.6953790187835693, -0.20999310910701752, -0.7686263918876648, 0.6031749844551086, 0.05820124223828316, 0.07031501829624176, 0.29383939504623413, 0.141069233417511, -0.3849821388721466, -0.8545855283737183, -0.2789382338523865, 0.3999052047729492, -0.6229527592658997, -0.3489132821559906, -0.3951384723186493, -0.32729560136795044, -0.4966416358947754, -0.12259833514690399, -0.6119136214256287, -0.2490684688091278, -0.49906784296035767, -0.2089829444885254, 0.4380495250225067, 0.629151463508606, -0.2569264769554138, 0.5720458626747131, -0.5630771517753601, 0.003979419358074665, 0.5425928235054016, 0.13138481974601746, -0.16302275657653809, -0.6510201692581177, -0.4616314768791199, -0.06140932813286781, -0.6669907569885254, -1.097003698348999, 0.6289783120155334, 0.11023182421922684, 0.8525457382202148, 0.5580126047134399, -0.10566218197345734, 0.7628333568572998, -0.2657237946987152, 0.8916456699371338, 0.16163939237594604, -0.8178755640983582, 0.7504613399505615, -0.49671265482902527, 0.1981971561908722, 0.6384319067001343, 0.606343150138855, 0.011821874417364597, -0.30934780836105347, -0.6834797859191895, -0.9137841463088989, 1.1946266889572144, 0.45097270607948303, -0.2658469080924988, 0.07537683099508286, 0.40017667412757874, -0.1688028872013092, 0.08808396756649017, -1.0410771369934082, -0.27139127254486084, -0.5658053755760193, 0.38025030493736267, -0.3387191593647003, 0.09979754686355591, -0.29508543014526367, -0.30550286173820496, 1.0829944610595703, -0.1316937506198883, 0.4398023784160614, 0.39895203709602356, -0.2423495054244995, -0.37788471579551697, -0.21033862233161926, 0.8445255756378174, 0.8223248720169067, -0.8074928522109985, -0.13594883680343628, 0.2655547857284546, -0.5423003435134888, 0.3685801029205322, 0.1967150866985321, -0.09210236370563507, 0.09529335796833038, 0.47037094831466675, 0.8018386960029602, 0.26869142055511475, -0.38465332984924316, 0.637671172618866, 0.04051822051405907, -0.5458751320838928, -0.5759397745132446, -0.049504268914461136, -0.2092638909816742, 0.15105539560317993, 0.4673355519771576, -0.10304584354162216, -0.15251129865646362, -0.45094409584999084, 0.3250526189804077, 0.4375878870487213, -0.46350836753845215, -0.5000200271606445, 0.8588324189186096, 0.03234514221549034, -0.5623828172683716, 0.6505658030509949, -0.2822756767272949, -0.49100401997566223, 1.1282744407653809, 0.5133914351463318, 0.8854173421859741, -0.15669997036457062, 0.38523945212364197, 0.8548082113265991, 0.28835779428482056, -0.050774771720170975, 0.2466209977865219, 0.19058017432689667, -0.7013444304466248, -0.1668194830417633, -0.41654419898986816, -0.5583664178848267, 0.7303200960159302, -0.8673275113105774, 0.49246764183044434, -0.6803039312362671, -0.49899303913116455, 0.05665932595729828, 0.47997716069221497, -0.7582412362098694, 0.12311920523643494, 0.07936839759349823, 1.0220859050750732, -0.9630946516990662, 1.2489992380142212, 1.1705775260925293, -0.5627414584159851, -0.8502036929130554, -0.12968823313713074, -0.08630985766649246, -0.6921069622039795, 0.6003732681274414, -0.0032570946495980024, 0.1379469484090805, -0.007981649599969387, -0.5801575779914856, -0.9761558771133423, 1.5566136837005615, 0.2018539011478424, -0.38180702924728394, 0.1434401422739029, 0.14207828044891357, 0.6105204820632935, -0.4384399950504303, 0.5156263113021851, 0.15290889143943787, 0.41349339485168457, 0.06711228936910629, -0.7261443734169006, -0.14534777402877808, 0.05278210714459419, -0.05365413427352905, -0.051205895841121674, -1.0719789266586304, 1.605434775352478, -0.1479930281639099, 0.1935027688741684, 0.10218416154384613, 0.7567765116691589, 0.8834534287452698, 0.421795129776001, 0.5844525694847107, 0.6814077496528625, 0.4261534512042999, 0.06822866946458817, 0.8525998592376709, -0.5246070623397827, 1.1265681982040405, 1.033825397491455, -0.39585986733436584, 0.6091079115867615, 0.19638079404830933, -0.34767311811447144, 0.3728083670139313, 0.6806074976921082, -0.19266930222511292, 0.7031895518302917, 0.09358786046504974, -0.25448763370513916, -0.23319204151630402, 0.2909336984157562, -0.564373791217804, 0.4065185487270355, 0.1198086366057396, -0.07091499865055084, -0.5250330567359924, -0.07383681833744049, 0.036420177668333054, -0.1966048628091812, -0.4556431770324707, 0.694439709186554, -0.2795058488845825, -0.7565350532531738, 0.9568482637405396, -0.04808870330452919, 0.27519747614860535, -0.8781907558441162, -0.17387467622756958, -0.3592633306980133, 0.35869166254997253, -0.060332685708999634, -0.7104931473731995, -0.04473293200135231, -0.20660722255706787, 0.15195171535015106, 0.10868770629167557, 0.7205085158348083, -0.104436494410038, -0.2699595093727112, 0.6371710896492004, 0.3109014630317688, 0.335452675819397, 0.2992200553417206, -1.1986243724822998, -0.16238820552825928, -0.207700714468956, -0.6528477668762207, 0.4655309319496155, 0.29413118958473206, 0.09148252755403519, 0.8115295767784119, 0.47803086042404175, -0.10977835208177567, -0.0025893650017678738, -0.15436197817325592, 1.0007579326629639, -0.6901763081550598, -0.5584365725517273, -0.5468481779098511, 0.5529913902282715, 0.024465195834636688, -0.817380964756012, 0.7111123204231262, 1.0236680507659912, 0.9298746585845947, -0.46285754442214966, 0.5265348553657532, -0.019210144877433777, -0.08266957849264145, -0.5048151612281799, 0.7279521822929382, -0.34375086426734924, -0.025247041136026382, -0.20348331332206726, -0.872408390045166, -0.05361124128103256, 0.8539490103721619, -0.16469450294971466, -0.09188135713338852, 0.4810526371002197, 0.8969283103942871, -0.04801025614142418, -0.2640417516231537, 0.4714410901069641, 0.30637404322624207, 0.28533846139907837, 0.8815104365348816, 0.9337230324745178, -0.7326500415802002, 0.9203159213066101, -0.6822394728660583, -0.24212588369846344, -0.4222683906555176, -0.7691594958305359, -0.8488914966583252, -0.1807728111743927, -0.5431156158447266, -0.5103803873062134, 0.3671700954437256, 0.8380366563796997, 1.0923476219177246, -0.9233854413032532, -0.6603479981422424, -0.3435176610946655, 0.08651268482208252, -0.6854207515716553, -0.2818675637245178, 0.22720442712306976, -0.34918075799942017, -0.745011568069458, 0.35011354088783264, -0.07625166326761246, 0.21971933543682098, -0.11537106335163116, -0.5202854871749878, -0.6511995196342468, -0.05619751662015915, 0.45672607421875, 0.5786187648773193, -0.49624618887901306, -0.44630566239356995, -0.45688122510910034, -0.299450159072876, 0.3583381175994873, 0.5455004572868347, -0.812640368938446, 0.04886645823717117, 0.44081106781959534, -0.1973603218793869, 1.0202031135559082, 0.03737799823284149, 0.30671826004981995, -0.48722657561302185, 0.47823745012283325, 0.44107142090797424, 0.3582048714160919, -0.0758724957704544, -0.16121183335781097, 0.5126245617866516, 0.4099491536617279, -0.891381561756134, -0.7009594440460205, 0.034387290477752686, -1.1833727359771729, -0.31057900190353394, 0.8740220069885254, -0.6502253413200378, -0.34412363171577454, -0.01429842785000801, -0.19242611527442932, 0.4254588186740875, -0.5218386650085449, 0.6271892189979553, 0.4788960814476013, -0.24038536846637726, 0.05163666605949402, -0.7607340812683105, 0.6340144872665405, 0.2605946362018585, -0.9290797114372253, -0.38619908690452576, 0.38391485810279846, 0.403543084859848, 0.12858064472675323, 0.5802789926528931, -0.09408584237098694, 0.4190717041492462, 0.2381943166255951, 0.16368116438388824, -0.29406803846359253, -0.42363062500953674, -0.6192449331283569, 0.452743798494339, 0.11497662216424942, -0.42425158619880676 ]
Helsinki-NLP/opus-mt-uk-ru
Helsinki-NLP
"2023-08-16T12:08:17Z"
30,269
0
transformers
[ "transformers", "pytorch", "tf", "marian", "text2text-generation", "translation", "uk", "ru", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
translation
"2022-03-02T23:29:04Z"
--- language: - uk - ru tags: - translation license: apache-2.0 --- ### ukr-rus * source group: Ukrainian * target group: Russian * OPUS readme: [ukr-rus](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/ukr-rus/README.md) * model: transformer-align * source language(s): ukr * target language(s): rus * model: transformer-align * pre-processing: normalization + SentencePiece (spm32k,spm32k) * download original weights: [opus-2020-06-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/ukr-rus/opus-2020-06-17.zip) * test set translations: [opus-2020-06-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ukr-rus/opus-2020-06-17.test.txt) * test set scores: [opus-2020-06-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ukr-rus/opus-2020-06-17.eval.txt) ## Benchmarks | testset | BLEU | chr-F | |-----------------------|-------|-------| | Tatoeba-test.ukr.rus | 69.2 | 0.826 | ### System Info: - hf_name: ukr-rus - source_languages: ukr - target_languages: rus - opus_readme_url: https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/ukr-rus/README.md - original_repo: Tatoeba-Challenge - tags: ['translation'] - languages: ['uk', 'ru'] - src_constituents: {'ukr'} - tgt_constituents: {'rus'} - src_multilingual: False - tgt_multilingual: False - prepro: normalization + SentencePiece (spm32k,spm32k) - url_model: https://object.pouta.csc.fi/Tatoeba-MT-models/ukr-rus/opus-2020-06-17.zip - url_test_set: https://object.pouta.csc.fi/Tatoeba-MT-models/ukr-rus/opus-2020-06-17.test.txt - src_alpha3: ukr - tgt_alpha3: rus - short_pair: uk-ru - chrF2_score: 0.826 - bleu: 69.2 - brevity_penalty: 0.992 - ref_len: 60387.0 - src_name: Ukrainian - tgt_name: Russian - train_date: 2020-06-17 - src_alpha2: uk - tgt_alpha2: ru - prefer_old: False - long_pair: ukr-rus - helsinki_git_sha: 480fcbe0ee1bf4774bcbe6226ad9f58e63f6c535 - transformers_git_sha: 2207e5d8cb224e954a7cba69fa4ac2309e9ff30b - port_machine: brutasse - port_time: 2020-08-21-14:41
[ -0.30543550848960876, -0.4711906909942627, 0.3441216051578522, 0.2825363278388977, -0.4843151867389679, -0.12051394581794739, -0.3127990961074829, -0.3757234513759613, 0.17154911160469055, 0.161342054605484, -0.7015759944915771, -0.8366407155990601, -0.5175767540931702, 0.3375753164291382, -0.02878074161708355, 1.0317412614822388, -0.051555145531892776, 0.31352508068084717, 0.3322640061378479, -0.4911293089389801, -0.49194207787513733, -0.28339341282844543, -0.4932156205177307, -0.25003063678741455, 0.4467814862728119, 0.46267110109329224, 0.47649696469306946, 0.4593564569950104, 0.7579429149627686, 0.3814036250114441, -0.38255083560943604, 0.08778796344995499, -0.1552864909172058, -0.04745574668049812, -0.10901259630918503, -0.5587051510810852, -0.6239548921585083, -0.3061872720718384, 0.977166473865509, 0.43198293447494507, -0.028229886665940285, 0.5175120234489441, -0.2192973494529724, 0.7282921075820923, -0.14600183069705963, -0.037540897727012634, -0.551537036895752, -0.0603996105492115, -0.43651893734931946, -0.24445731937885284, -0.5266546010971069, -0.22905988991260529, 0.13245455920696259, -0.6182690262794495, 0.15496274828910828, 0.1504429280757904, 1.7307063341140747, -0.009064859710633755, -0.3577915132045746, -0.15421314537525177, -0.3993380069732666, 0.9803063273429871, -0.8813391923904419, 0.5336198806762695, 0.4688470959663391, 0.04790079966187477, -0.04214690253138542, -0.4787340760231018, -0.30564582347869873, 0.0672508031129837, -0.46108418703079224, 0.3516627550125122, -0.23065897822380066, -0.2647867202758789, 0.21925941109657288, 0.5240424275398254, -0.8278728723526001, 0.043398380279541016, -0.5336703062057495, -0.32936716079711914, 0.4715074896812439, 0.14430055022239685, 0.252719521522522, -0.6926259398460388, -0.4045109748840332, -0.42109522223472595, -0.4066493511199951, 0.30369362235069275, 0.5385395884513855, 0.4340285658836365, -0.5884867906570435, 0.6896357536315918, -0.23527003824710846, 0.5804501175880432, 0.18396593630313873, -0.2546904683113098, 0.6886693239212036, -0.7506698966026306, -0.08244889974594116, -0.23547451198101044, 1.3171257972717285, 0.2334606945514679, -0.09302520006895065, 0.03460170328617096, -0.2160130739212036, -0.042115580290555954, -0.07768602669239044, -0.9208962917327881, 0.14225846529006958, 0.28902512788772583, -0.3511861264705658, -0.23274970054626465, 0.10769326239824295, -0.9217246174812317, 0.18574663996696472, 0.06450040638446808, 0.5683831572532654, -0.8877087831497192, -0.20277699828147888, 0.3642701208591461, -0.038248155266046524, 0.3936542272567749, -0.08700072020292282, -0.577164351940155, 0.19906528294086456, 0.39187854528427124, 0.94704669713974, 0.0102689815685153, -0.44557005167007446, -0.4211215674877167, 0.04374892637133598, -0.07160865515470505, 0.711848258972168, -0.2713254690170288, -0.38359183073043823, -0.1818569302558899, 0.4856913983821869, 0.026886889711022377, -0.13235679268836975, 0.9211032390594482, -0.25598445534706116, 0.5413935780525208, -0.43060165643692017, -0.39942240715026855, -0.2517007291316986, 0.2817351520061493, -0.6789034008979797, 1.3277432918548584, 0.22704795002937317, -0.9973188042640686, 0.45450061559677124, -0.7531802654266357, -0.3302961587905884, -0.02612815797328949, 0.13680098950862885, -0.8193276524543762, -0.012938753701746464, 0.18804050981998444, 0.42219477891921997, -0.39749106764793396, 0.49101290106773376, -0.033713240176439285, -0.16031470894813538, 0.1498224437236786, -0.20480658113956451, 1.194152593612671, 0.23347726464271545, -0.4814361035823822, 0.13467219471931458, -0.8526633977890015, 0.02118699438869953, 0.2036818265914917, -0.5352532863616943, -0.1630357801914215, -0.04423067346215248, 0.3076587915420532, 0.18220728635787964, 0.22942408919334412, -0.6799083948135376, 0.344160795211792, -0.5860128998756409, 0.25905895233154297, 0.8515905737876892, -0.05832044407725334, 0.30511826276779175, -0.4851168096065521, 0.5197574496269226, 0.25709348917007446, 0.13305410742759705, 0.17205753922462463, -0.5191074013710022, -0.7930783629417419, -0.21718108654022217, 0.6226600408554077, 0.7288780212402344, -0.5966802835464478, 0.7971248626708984, -0.790960431098938, -0.8629289269447327, -0.8409105539321899, -0.19084393978118896, 0.6451506018638611, 0.32848745584487915, 0.5326903462409973, -0.29199838638305664, -0.6349822878837585, -1.0929813385009766, -0.22719158232212067, -0.2660568952560425, 0.05070618540048599, 0.16126935184001923, 0.866502583026886, 0.0463671050965786, 0.5789862871170044, -0.4368336498737335, -0.5688558220863342, -0.20725202560424805, 0.23172631859779358, 0.33624517917633057, 0.7335084676742554, 0.598976194858551, -0.8581072092056274, -0.7151259779930115, 0.16714565455913544, -0.5415574312210083, -0.12590347230434418, -0.05468573421239853, -0.22685575485229492, 0.47854727506637573, -0.05548814684152603, -0.588464617729187, 0.28213757276535034, 0.5610641837120056, -0.9285055994987488, 0.5960023999214172, -0.1607266366481781, 0.4647119343280792, -1.6194437742233276, 0.3063320517539978, -0.1028895303606987, -0.2188398838043213, -0.3799859881401062, -0.0016301771393045783, 0.1896008402109146, 0.1438426971435547, -0.5503848195075989, 0.6825529932975769, -0.8097014427185059, -0.06942645460367203, 0.5295076966285706, 0.24908708035945892, -0.018771914765238762, 0.6498326659202576, -0.2324528992176056, 1.0259732007980347, 0.6955283284187317, -0.2441382259130478, 0.09079033881425858, 0.5719935297966003, -0.4989112913608551, 0.4366726577281952, -0.624203085899353, -0.20465914905071259, 0.2653563618659973, -0.08333593606948853, -0.9630541205406189, -0.20870353281497955, 0.12523947656154633, -0.8188170194625854, 0.33593985438346863, -0.21106579899787903, -0.5964434742927551, -0.19465681910514832, -0.4568544328212738, 0.4248795211315155, 0.6391457319259644, -0.17604075372219086, 0.8046497702598572, 0.09505563974380493, -0.026728933677077293, -0.825067937374115, -0.9590275287628174, -0.09775873273611069, -0.22981171309947968, -0.6888559460639954, 0.4905734956264496, -0.21574600040912628, -0.021167607977986336, 0.22883367538452148, -0.09091070294380188, -0.06771688163280487, -0.0204048790037632, 0.035179778933525085, 0.26952701807022095, -0.3237634599208832, 0.013577996753156185, -0.19299066066741943, -0.16194294393062592, -0.29485616087913513, -0.10261820256710052, 0.8676212430000305, -0.534738302230835, -0.22224119305610657, -0.8450154662132263, 0.16573216021060944, 0.6240072846412659, -0.5038929581642151, 1.0509964227676392, 0.7519957423210144, -0.1812645047903061, 0.1808442771434784, -0.6614460945129395, 0.04472434148192406, -0.45457151532173157, 0.3117386996746063, -0.6196821331977844, -0.732396125793457, 1.0229666233062744, 0.2869343161582947, 0.13832725584506989, 0.9397042989730835, 0.574625551700592, 0.12448478490114212, 0.688140332698822, 0.34027740359306335, 0.019764112308621407, 0.5684854388237, -0.657831609249115, -0.14759689569473267, -0.9111496806144714, -0.32160496711730957, -0.831020176410675, -0.2802563011646271, -0.917770266532898, -0.1975381225347519, 0.19596752524375916, -0.04796754941344261, -0.01953846961259842, 0.7649538516998291, -0.6005382537841797, 0.3668391704559326, 0.5968671441078186, 0.11837847530841827, 0.2760768234729767, -0.05518922582268715, -0.5680806636810303, -0.1847580522298813, -0.45043838024139404, -0.486968457698822, 1.3011146783828735, 0.155101016163826, 0.34086745977401733, 0.4652897119522095, 0.637932538986206, 0.019992785528302193, 0.159507617354393, -0.800418496131897, 0.6967780590057373, -0.10281223058700562, -0.9733721613883972, -0.3859463930130005, -0.43379950523376465, -1.078150987625122, 0.2043859362602234, -0.25093895196914673, -0.7529585957527161, 0.04697427898645401, -0.1665981560945511, -0.08757618069648743, 0.7276389598846436, -0.7123708724975586, 0.974746584892273, 0.04722230136394501, -0.3587178587913513, 0.109907366335392, -0.7674596905708313, 0.16808262467384338, -0.06849160045385361, 0.24031132459640503, -0.10521228611469269, -0.11648083478212357, 0.9369428157806396, -0.3053339719772339, 0.561109185218811, -0.059061311185359955, 0.05717751756310463, 0.09239447116851807, 0.11414752155542374, 0.5670858025550842, -0.1482335925102234, -0.2605389356613159, 0.22537556290626526, 0.10460612177848816, -0.6107770204544067, -0.19809378683567047, 0.6248190402984619, -0.8497421741485596, -0.4639844596385956, -0.7030195593833923, -0.6982458829879761, 0.053704649209976196, 0.5158510208129883, 0.5630791783332825, 0.7942514419555664, -0.09298897534608841, 0.7422803640365601, 0.5727900266647339, -0.2028527855873108, 0.610094428062439, 0.7190753817558289, -0.07374556362628937, -0.7678829431533813, 0.6202235221862793, 0.3185398280620575, 0.2991226613521576, 0.6127650737762451, 0.18615257740020752, -0.21957466006278992, -1.0307154655456543, -0.45429369807243347, 0.4716947376728058, -0.47648295760154724, -0.4819931387901306, -0.581339418888092, 0.023716989904642105, -0.4890989661216736, 0.10212376713752747, -0.2969677448272705, -0.40590187907218933, -0.18976213037967682, -0.29440364241600037, 0.5696943998336792, 0.4960859417915344, -0.10655294358730316, 0.3919936418533325, -0.9075096845626831, 0.24427369236946106, -0.17976422607898712, 0.5932179689407349, -0.3798964023590088, -0.9474434852600098, -0.32999393343925476, -0.15555018186569214, -0.3952372670173645, -1.185502052307129, 0.5716570615768433, -0.07467851042747498, 0.35110801458358765, 0.14353016018867493, 0.024983275681734085, 0.8017165064811707, -0.5245447754859924, 1.006085991859436, -0.032262325286865234, -0.9816070199012756, 0.603431761264801, -0.5177490711212158, 0.5121286511421204, 0.8072402477264404, 0.3554345965385437, -0.4517928659915924, -0.6322497129440308, -0.8440320491790771, -0.8661057353019714, 0.9744691252708435, 0.5562739372253418, -0.22244291007518768, 0.0580967478454113, 0.11780649423599243, -0.002008091425523162, -0.3012077510356903, -1.241711139678955, -0.49919602274894714, 0.1844024509191513, -0.5561447143554688, 0.07889185845851898, -0.4586588144302368, -0.1296687126159668, -0.35133954882621765, 1.2333390712738037, 0.20509418845176697, 0.09168364852666855, 0.6208664178848267, -0.22088702023029327, -0.12817597389221191, 0.5552934408187866, 0.7587883472442627, 0.593632161617279, -0.4222371280193329, -0.21231701970100403, 0.4424207806587219, -0.6451712250709534, 0.15133292973041534, 0.16090881824493408, -0.47835037112236023, 0.2762835621833801, 0.4701789915561676, 0.8222789168357849, 0.28013598918914795, -0.4875432550907135, 0.5596742630004883, -0.13813430070877075, -0.52740079164505, -0.43721112608909607, -0.36510229110717773, 0.23429805040359497, 0.14470183849334717, 0.4368321895599365, 0.01847105845808983, -0.00971637200564146, -0.2977297604084015, 0.15630802512168884, 0.30834251642227173, -0.34812700748443604, -0.5768774747848511, 0.47851333022117615, -0.016722220927476883, -0.528789222240448, 0.23892830312252045, -0.3777848184108734, -0.4531288743019104, 0.5574589371681213, 0.3871162235736847, 1.0612069368362427, -0.3629108965396881, -0.0662568211555481, 0.7949536442756653, 0.6156337857246399, 0.008636916987597942, 0.6310172080993652, 0.26963794231414795, -0.5544095635414124, -0.3543802797794342, -0.979269802570343, 0.1087936982512474, 0.34419628977775574, -0.8803442120552063, 0.47531381249427795, 0.01530526764690876, -0.3756333589553833, 0.08213454484939575, 0.4221978783607483, -0.623958945274353, 0.08301208168268204, -0.47779083251953125, 0.970270037651062, -0.9198494553565979, 0.7802560925483704, 0.8447856903076172, -0.7099905610084534, -1.1305938959121704, -0.15499316155910492, -0.2005491405725479, -0.47550201416015625, 0.5529623627662659, 0.06116754934191704, 0.00839846022427082, -0.0566035732626915, -0.2500310242176056, -0.9910768270492554, 1.36582350730896, 0.34421226382255554, -0.47918346524238586, -0.11710523068904877, 0.01644081063568592, 0.5054742097854614, 0.011328291147947311, 0.1861029416322708, 0.3848603665828705, 0.8367069959640503, -0.16540199518203735, -1.1601841449737549, 0.19187821447849274, -0.5150707364082336, -0.20596864819526672, 0.5516787767410278, -0.9556053280830383, 0.8322432637214661, 0.10482966899871826, -0.34011557698249817, 0.20577627420425415, 0.5632989406585693, 0.31155920028686523, -0.07236436009407043, 0.4670790135860443, 1.042512059211731, 0.46965140104293823, -0.5315342545509338, 0.9544960856437683, -0.2615998685359955, 0.6150972843170166, 0.9317898750305176, 0.24743162095546722, 0.9529949426651001, 0.6362578868865967, -0.3977508842945099, 0.7205782532691956, 0.6590157747268677, -0.25187501311302185, 0.43264609575271606, -0.08607183396816254, -0.03518137335777283, -0.17803636193275452, -0.11190693080425262, -0.5099490880966187, 0.5926889777183533, 0.054896753281354904, -0.16186878085136414, -0.04782167077064514, -0.34956327080726624, 0.431276798248291, 0.07942555844783783, -0.08241195976734161, 0.7776328325271606, -0.2654692530632019, -0.7352882623672485, 0.6865234375, -0.001087869401089847, 0.8029741644859314, -0.8594380617141724, 0.11157796531915665, -0.2214062511920929, 0.24794802069664001, -0.0670422911643982, -0.7666928768157959, 0.35902759432792664, 0.2487737536430359, -0.26503613591194153, -0.19856876134872437, 0.31292960047721863, -0.5670902132987976, -0.9146711826324463, 0.4771850109100342, 0.46531206369400024, 0.27225884795188904, 0.43569520115852356, -0.7771381139755249, -0.05484854802489281, 0.18293362855911255, -0.7570873498916626, 0.1049833595752716, 0.8026284575462341, 0.20543129742145538, 0.6751266121864319, 0.670595109462738, 0.3376343846321106, 0.047683894634246826, -0.07199382781982422, 0.708873987197876, -0.9740602970123291, -0.43487435579299927, -0.9611342549324036, 0.8020504117012024, -0.11586472392082214, -0.6899592876434326, 0.7023237943649292, 0.9177987575531006, 0.9277676939964294, -0.06021136790513992, 0.3871091902256012, -0.2891617715358734, 0.5075295567512512, -0.7014894485473633, 0.8993299007415771, -1.0220649242401123, -0.06571363657712936, -0.2514294385910034, -0.7160927653312683, -0.3490165174007416, 0.3093560039997101, -0.21694345772266388, -0.029657376930117607, 1.1219669580459595, 0.9007323384284973, -0.08115547150373459, -0.4239124655723572, 0.10590395331382751, 0.47083765268325806, 0.21196629106998444, 0.779373824596405, 0.34642964601516724, -0.9412403702735901, 0.88103848695755, -0.4205647110939026, 0.09546232968568802, 0.022981027141213417, -0.9573343396186829, -0.9136219024658203, -0.8092566132545471, -0.10918069630861282, -0.403955340385437, -0.1980041116476059, 0.9816058874130249, 0.4848438799381256, -1.0712356567382812, -0.38661473989486694, 0.037617918103933334, 0.049693573266267776, -0.20551249384880066, -0.27253806591033936, 0.7125337719917297, -0.13440310955047607, -0.9614871740341187, 0.19996051490306854, -0.0017901534447446465, 0.21221064031124115, 0.05294215679168701, -0.09024890512228012, -0.8181950449943542, -0.08268222957849503, 0.23702773451805115, -0.005685428157448769, -1.0427790880203247, -0.20936837792396545, 0.20040477812290192, -0.2693065404891968, 0.33292874693870544, 0.04971875995397568, -0.3522498905658722, 0.21533165872097015, 0.7772049307823181, 0.31833940744400024, 0.5783291459083557, -0.027791401371359825, 0.26987534761428833, -0.8098575472831726, 0.41728413105010986, 0.20176923274993896, 0.7000000476837158, 0.49459806084632874, -0.16960464417934418, 0.7945831418037415, 0.3688775300979614, -0.39948365092277527, -1.1444674730300903, -0.03287441283464432, -1.4011963605880737, -0.06349492818117142, 1.100814938545227, -0.21032707393169403, -0.3638632893562317, 0.23092439770698547, -0.23483633995056152, 0.4883284270763397, -0.5150129795074463, 0.6028304100036621, 1.08992600440979, 0.49185556173324585, 0.17858582735061646, -0.5402612686157227, 0.4261917173862457, 0.6346598863601685, -0.8680111765861511, -0.10962231457233429, 0.36245638132095337, 0.5297772288322449, 0.49519747495651245, 0.6351150870323181, -0.37777262926101685, 0.1889982521533966, -0.11822759360074997, 0.3550080955028534, -0.1590573638677597, -0.1459534615278244, -0.3867976665496826, 0.0848829597234726, -0.1467239409685135, -0.1976255625486374 ]
cardiffnlp/twitter-xlm-roberta-base
cardiffnlp
"2023-08-31T01:52:58Z"
30,201
11
transformers
[ "transformers", "pytorch", "tf", "xlm-roberta", "fill-mask", "multilingual", "arxiv:2104.12250", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: multilingual widget: - text: "🤗🤗🤗<mask>" - text: "🔥The goal of life is <mask> . 🔥" - text: "Il segreto della vita è l’<mask> . ❤️" - text: "Hasta <mask> 👋!" --- # Twitter-XLM-Roberta-base This is a XLM-Roberta-base model trained on ~198M multilingual tweets, described and evaluated in the [reference paper](https://arxiv.org/abs/2104.12250). To evaluate this and other LMs on Twitter-specific data, please refer to the [main repository](https://github.com/cardiffnlp/xlm-t). A usage example is provided below. ## Computing tweet similarity ```python def preprocess(text): new_text = [] for t in text.split(" "): t = '@user' if t.startswith('@') and len(t) > 1 else t t = 'http' if t.startswith('http') else t new_text.append(t) return " ".join(new_text) def get_embedding(text): text = preprocess(text) encoded_input = tokenizer(text, return_tensors='pt') features = model(**encoded_input) features = features[0].detach().numpy() features_mean = np.mean(features[0], axis=0) return features_mean query = "Acabo de pedir pollo frito 🐣" #spanish tweets = ["We had a great time! ⚽️", # english "We hebben een geweldige tijd gehad! ⛩", # dutch "Nous avons passé un bon moment! 🎥", # french "Ci siamo divertiti! 🍝"] # italian d = defaultdict(int) for tweet in tweets: sim = 1-cosine(get_embedding(query),get_embedding(tweet)) d[tweet] = sim print('Most similar to: ',query) print('----------------------------------------') for idx,x in enumerate(sorted(d.items(), key=lambda x:x[1], reverse=True)): print(idx+1,x[0]) ``` ``` Most similar to: Acabo de pedir pollo frito 🐣 ---------------------------------------- 1 Ci siamo divertiti! 🍝 2 Nous avons passé un bon moment! 🎥 3 We had a great time! ⚽️ 4 We hebben een geweldige tijd gehad! ⛩ ``` ### BibTeX entry and citation info Please cite the [reference paper](https://aclanthology.org/2022.lrec-1.27/) if you use this model. ```bibtex @inproceedings{barbieri-etal-2022-xlm, title = "{XLM}-{T}: Multilingual Language Models in {T}witter for Sentiment Analysis and Beyond", author = "Barbieri, Francesco and Espinosa Anke, Luis and Camacho-Collados, Jose", booktitle = "Proceedings of the Thirteenth Language Resources and Evaluation Conference", month = jun, year = "2022", address = "Marseille, France", publisher = "European Language Resources Association", url = "https://aclanthology.org/2022.lrec-1.27", pages = "258--266", abstract = "Language models are ubiquitous in current NLP, and their multilingual capacity has recently attracted considerable attention. However, current analyses have almost exclusively focused on (multilingual variants of) standard benchmarks, and have relied on clean pre-training and task-specific corpora as multilingual signals. In this paper, we introduce XLM-T, a model to train and evaluate multilingual language models in Twitter. In this paper we provide: (1) a new strong multilingual baseline consisting of an XLM-R (Conneau et al. 2020) model pre-trained on millions of tweets in over thirty languages, alongside starter code to subsequently fine-tune on a target task; and (2) a set of unified sentiment analysis Twitter datasets in eight different languages and a XLM-T model trained on this dataset.", }
[ -0.22367830574512482, -0.5306717753410339, 0.3982607424259186, 0.4312281608581543, -0.3611156642436981, 0.2724863290786743, -0.454649418592453, -0.24413909018039703, 0.4273530840873718, 0.04091447591781616, -0.5935893654823303, -0.9966480135917664, -0.6783035397529602, 0.23008352518081665, -0.29427775740623474, 0.7461371421813965, -0.17440015077590942, 0.24163535237312317, 0.24721698462963104, -0.482601135969162, 0.08443720638751984, -0.6546341180801392, -0.6376034021377563, -0.28874146938323975, 0.6277399659156799, 0.07218654453754425, 0.4154956340789795, 0.18080845475196838, 0.2723161280155182, 0.3639606833457947, 0.09680992364883423, 0.2723456621170044, -0.5629420876502991, -0.0807102769613266, -0.10197225958108902, -0.3961927890777588, -0.4420766234397888, -0.005199325270950794, 0.6226455569267273, 0.6522067189216614, 0.09255556017160416, 0.24909266829490662, 0.14882910251617432, 0.4141872823238373, -0.3282685875892639, 0.1859291046857834, -0.5822763442993164, 0.029806697741150856, -0.07021588832139969, -0.1515178233385086, -0.19383704662322998, -0.607367753982544, -0.07109197974205017, -0.35001465678215027, -0.01865803450345993, -0.03902701288461685, 1.1066275835037231, -0.13062907755374908, -0.3614676296710968, -0.1762845367193222, -0.4270511865615845, 1.1894733905792236, -0.752775251865387, 0.5563952922821045, 0.18992699682712555, 0.05252708122134209, 0.12093457579612732, -0.51946622133255, -0.5543599128723145, -0.18636837601661682, 0.11490152031183243, 0.19782254099845886, -0.2575143575668335, -0.35298773646354675, 0.0990351215004921, -0.03388554975390434, -0.6230463981628418, -0.20421202480793, -0.24986331164836884, 0.03278180584311485, 0.32906103134155273, -0.04652436077594757, 0.36634886264801025, -0.17406615614891052, -0.2468039095401764, -0.07275701314210892, -0.3756246566772461, -0.13787993788719177, 0.051545772701501846, 0.5752817988395691, -0.5077874064445496, 0.5496384501457214, 0.11677618324756622, 0.308441698551178, -0.20948663353919983, 0.009860179387032986, 0.736285924911499, -0.32903367280960083, -0.1955680400133133, -0.38330987095832825, 1.182261347770691, 0.6312458515167236, 0.5775730609893799, -0.2769835591316223, -0.23734216392040253, -0.11677014082670212, -0.16939735412597656, -0.7751504182815552, -0.0041229622438549995, 0.3405255675315857, -0.46625152230262756, -0.24016305804252625, 0.282056599855423, -0.4501643180847168, 0.014057576656341553, -0.1228243038058281, 0.6149515509605408, -0.709585964679718, -0.5331822633743286, -0.018618565052747726, -0.06986956298351288, 0.05286300554871559, 0.03317863866686821, -0.5169152021408081, 0.17172636091709137, 0.6894932985305786, 1.1724759340286255, 0.04742731153964996, -0.5629557371139526, -0.26145070791244507, 0.12443473190069199, -0.503878116607666, 0.6214061379432678, -0.4273208677768707, -0.33300939202308655, 0.22039522230625153, 0.07989411056041718, -0.23278144001960754, -0.3894602060317993, 0.4472658634185791, -0.35799404978752136, 0.2441282570362091, -0.4159797132015228, -0.5677491426467896, -0.1233970895409584, 0.475224107503891, -0.629478931427002, 0.9650837779045105, 0.17930927872657776, -0.8297330141067505, 0.2786751389503479, -0.7141868472099304, -0.2837492525577545, -0.1737959235906601, -0.029072249308228493, -0.3521520793437958, -0.07818108797073364, 0.24615684151649475, 0.5825795531272888, -0.23247914016246796, 0.02271970361471176, -0.6024963855743408, -0.1425449252128601, 0.28165897727012634, 0.014611470513045788, 1.1055543422698975, 0.22897347807884216, -0.2056668996810913, 0.01482886727899313, -0.5056039094924927, 0.1607472151517868, 0.28309366106987, -0.17100295424461365, -0.36063817143440247, -0.24874548614025116, 0.2717651128768921, 0.4141197204589844, 0.34018510580062866, -0.776324987411499, 0.05905111879110336, -0.3402121961116791, 0.5565783977508545, 0.48604822158813477, -0.030960826203227043, 0.41915977001190186, -0.5005931854248047, 0.3338016867637634, 0.14338228106498718, 0.03140813112258911, -0.007350962143391371, -0.38086336851119995, -0.44905874133110046, -0.1669340431690216, 0.23990336060523987, 0.6131582856178284, -0.715010404586792, 0.28874731063842773, -0.5947284698486328, -0.5541388988494873, -0.5426872372627258, 0.14548522233963013, 0.3385286033153534, 0.20762254297733307, 0.3720792233943939, 0.15393181145191193, -0.8151519894599915, -0.7438371181488037, -0.38001635670661926, -0.1633726805448532, 0.12224885821342468, 0.37737390398979187, 0.5842449069023132, -0.31313347816467285, 0.6622165441513062, -0.32167932391166687, -0.24555785953998566, -0.5527787208557129, 0.019000018015503883, 0.46321266889572144, 0.4899403154850006, 1.0204076766967773, -0.7279549241065979, -1.018755316734314, 0.03360963612794876, -0.8306689858436584, -0.07826920598745346, 0.22587735950946808, -0.19434256851673126, 0.5153430104255676, 0.32075151801109314, -0.6276406049728394, 0.09293651580810547, 0.581063985824585, -0.21935425698757172, 0.10219550132751465, 0.003149535274133086, 0.38066595792770386, -1.6006404161453247, -0.02722104825079441, 0.3140104413032532, -0.22750824689865112, -0.6356015205383301, -0.0955362617969513, 0.20875105261802673, 0.2075631320476532, -0.4580399692058563, 0.7499293088912964, -0.3197549879550934, 0.20485883951187134, 0.05726422369480133, 0.13244271278381348, -0.09113920480012894, 0.4426303505897522, -0.02929496020078659, 0.4658223092556, 0.6847839951515198, -0.27031320333480835, 0.26630985736846924, 0.19586029648780823, -0.30909213423728943, 0.4496281147003174, -0.5803267359733582, 0.08351095765829086, 0.04545554891228676, 0.036464542150497437, -0.9709056615829468, 0.11227083206176758, 0.27866336703300476, -0.7314522862434387, 0.27572324872016907, -0.27423930168151855, -0.7708608508110046, -0.38237157464027405, -0.6334220170974731, 0.31110650300979614, 0.39593297243118286, -0.4654601812362671, 0.6520431637763977, 0.3223765194416046, -0.007721148896962404, -0.6641077995300293, -0.9282563328742981, 0.2540660500526428, -0.3164154291152954, -0.7328037619590759, 0.3033602237701416, -0.06749693304300308, -0.32131993770599365, 0.08452802151441574, 0.10658742487430573, -0.05606162175536156, -0.07870624959468842, 0.06493192166090012, 0.12444780021905899, -0.1835910975933075, 0.06994152069091797, -0.1846359670162201, 0.10988792777061462, -0.11872325092554092, -0.4842560589313507, 0.7910677194595337, -0.21269898116588593, -0.0030026149470359087, -0.42266422510147095, 0.4859156310558319, 0.34233126044273376, 0.01823361963033676, 1.01304030418396, 1.0165061950683594, -0.5664370656013489, -0.06325631588697433, -0.5766207575798035, -0.05990325286984444, -0.4196409583091736, 0.6736574172973633, -0.5463237762451172, -0.7421143054962158, 0.8479222655296326, 0.33334749937057495, 0.1089286357164383, 0.550142765045166, 0.6511882543563843, -0.092367984354496, 0.9719928503036499, 0.5836759805679321, -0.28765061497688293, 0.5553327202796936, -0.71145099401474, 0.15930461883544922, -0.5389106273651123, -0.1979367882013321, -0.6582735180854797, -0.11971555650234222, -0.8747617602348328, -0.4430865943431854, 0.06198687106370926, -0.1585182398557663, -0.45515069365501404, 0.44500163197517395, -0.05111255496740341, 0.23063716292381287, 0.4741457998752594, 0.16239099204540253, -0.03290913999080658, 0.06735295802354813, -0.2879903018474579, -0.2246769517660141, -0.6217880249023438, -0.5244447588920593, 1.0800604820251465, 0.2274470031261444, 0.6751554608345032, 0.28638195991516113, 0.9766710996627808, 0.05290331318974495, 0.43918219208717346, -0.6198468804359436, 0.5151582360267639, -0.44306647777557373, -0.40384846925735474, -0.1241672933101654, -0.6959791779518127, -0.9339048266410828, 0.19680024683475494, -0.10368657857179642, -0.8101938366889954, -0.06872386485338211, -0.16746336221694946, -0.15670029819011688, 0.6686803698539734, -0.7089040279388428, 0.7548320889472961, -0.2291996031999588, -0.2977457642555237, -0.11979619413614273, -0.25685372948646545, 0.08042122423648834, -0.11948948353528976, 0.4201115071773529, -0.17903997004032135, -0.42754191160202026, 0.8441677093505859, -0.324604868888855, 0.7080137133598328, -0.14814285933971405, 0.007307946681976318, 0.03518003597855568, 0.15064860880374908, 0.1722562611103058, 0.05114484205842018, -0.3422054946422577, 0.38892728090286255, 0.11491282284259796, -0.48666733503341675, -0.29772526025772095, 1.0347037315368652, -1.0750925540924072, -0.3488014042377472, -0.42137616872787476, -0.5052390098571777, -0.23191000521183014, 0.31179237365722656, 0.40050116181373596, 0.46261343359947205, -0.23276738822460175, 0.30034393072128296, 0.13328225910663605, -0.33893734216690063, 0.6185126900672913, 0.38633453845977783, -0.25062987208366394, -0.5348379015922546, 0.8367649912834167, 0.32487308979034424, 0.027480313554406166, 0.7231639623641968, 0.18514734506607056, -0.42340102791786194, -0.41934558749198914, -0.10638527572154999, 0.533297061920166, -0.6389316916465759, -0.21422232687473297, -0.9916849732398987, -0.17306502163410187, -0.5929011702537537, 0.02240847423672676, -0.35570287704467773, -0.5150710940361023, -0.2580559551715851, -0.20693804323673248, 0.26627275347709656, 0.8312894105911255, -0.2910176217556, 0.01580730266869068, -0.8302731513977051, 0.21292220056056976, -0.06990876793861389, 0.35073918104171753, 0.1001514196395874, -0.6619999408721924, -0.5457860827445984, 0.22158010303974152, -0.27671343088150024, -0.8875664472579956, 0.7646356225013733, 0.3741489350795746, 0.6193417310714722, 0.23716618120670319, -0.05131305381655693, 0.5714426636695862, -0.48343050479888916, 0.7518225908279419, 0.2936493456363678, -0.8101692199707031, 0.3743000328540802, -0.4027548134326935, 0.32523447275161743, 0.3173092305660248, 0.6450279355049133, -0.6498590707778931, -0.563482940196991, -0.5724340081214905, -0.9307600855827332, 0.8305766582489014, 0.3084236979484558, 0.4574708044528961, -0.3216504454612732, 0.0748317688703537, 0.03165971115231514, 0.16537298262119293, -1.0046664476394653, -0.5393871068954468, -0.28451409935951233, -0.35966700315475464, -0.2886461317539215, -0.22822748124599457, -0.07929784804582596, -0.2327258437871933, 0.7465647459030151, 0.08307776600122452, 0.5308104753494263, -0.014571764506399632, -0.28930357098579407, -0.24243278801441193, 0.1350274384021759, 0.580020010471344, 0.7962666749954224, -0.6138592958450317, 0.016507841646671295, 0.35976213216781616, -0.27188652753829956, -0.1501055508852005, 0.13767555356025696, 0.055294327437877655, 0.35897713899612427, 0.4823766350746155, 0.5963319540023804, 0.20341557264328003, -0.21902622282505035, 0.5138978362083435, -0.2266351282596588, -0.37603023648262024, -0.42458009719848633, -0.34981152415275574, 0.2957589626312256, 0.28921937942504883, 0.7532622218132019, 0.023527976125478745, -0.20347167551517487, -0.6613584160804749, 0.1777399778366089, 0.4349500238895416, -0.5141178965568542, -0.5664094686508179, 0.5249980688095093, 0.021333731710910797, -0.3940805494785309, 0.2666487991809845, -0.32836195826530457, -0.868739902973175, 0.541073739528656, 0.37939611077308655, 1.14641535282135, -0.1627008020877838, 0.19316424429416656, 0.7446370124816895, 0.35692575573921204, -0.009250580333173275, 0.7156298160552979, 0.24182701110839844, -1.0587544441223145, -0.2938326895236969, -0.6068153977394104, -0.1900751143693924, 0.15331321954727173, -0.5665501356124878, 0.2853269875049591, -0.22551603615283966, -0.33722636103630066, 0.06556100398302078, 0.18606573343276978, -0.8103495240211487, 0.1062416285276413, 0.1651739627122879, 0.9587783217430115, -0.8595022559165955, 0.9755919575691223, 0.9229866862297058, -0.4456132650375366, -0.806019127368927, 0.07824159413576126, -0.07461506873369217, -0.7330894470214844, 0.7132427096366882, 0.25606173276901245, 0.05820094048976898, -0.05844004452228546, -0.4826081097126007, -0.757231593132019, 0.968406081199646, 0.4137672781944275, -0.39175379276275635, 0.0929948017001152, 0.26520389318466187, 0.6025258898735046, -0.6146742105484009, 0.5276711583137512, 0.3007873296737671, 0.3088858127593994, 0.007423205301165581, -0.9369434714317322, 0.05283230543136597, -0.40371090173721313, 0.044850971549749374, 0.05964042618870735, -0.7729371786117554, 1.072021245956421, -0.2985984683036804, -0.06223263964056969, 0.11457722634077072, 0.5403706431388855, 0.24717652797698975, 0.23681752383708954, 0.4353109300136566, 0.55917888879776, 0.4441744089126587, -0.24970324337482452, 1.0534359216690063, -0.6038337349891663, 0.8118183016777039, 0.9139378666877747, -0.06618356704711914, 0.9047472476959229, 0.44405242800712585, -0.2420903593301773, 0.45532605051994324, 0.641412079334259, 0.12650533020496368, 0.5177780389785767, -0.19861529767513275, -0.015557846985757351, -0.23884624242782593, -0.08512283116579056, -0.4074559211730957, 0.16583958268165588, 0.27939385175704956, -0.4634804427623749, -0.3841959536075592, -0.01948426477611065, 0.27836671471595764, 0.06110670790076256, -0.2679049074649811, 0.62357497215271, 0.3972667157649994, -0.44119685888290405, 0.7321929335594177, 0.05073830857872963, 0.8208543062210083, -0.4703949987888336, 0.23704791069030762, -0.31206321716308594, 0.3045581877231598, -0.18091385066509247, -0.9165657162666321, 0.2005835473537445, 0.14760327339172363, 0.026006409898400307, -0.3053911626338959, 0.24902479350566864, -0.5497342348098755, -0.7279699444770813, 0.8697302341461182, 0.6917701959609985, 0.0698474869132042, -0.0235898494720459, -1.1913213729858398, 0.15300986170768738, 0.21881359815597534, -0.5313858389854431, 0.09970904141664505, 0.724032998085022, 0.023331603035330772, 0.7319759130477905, 0.3691367208957672, 0.2294636070728302, 0.05852446332573891, 0.6119695901870728, 0.8330729603767395, -0.8149769902229309, -0.37968823313713074, -1.0598851442337036, 0.3616231083869934, -0.06912540644407272, -0.13639841973781586, 0.8244496583938599, 0.7812871932983398, 0.8618901968002319, -0.052064064890146255, 0.9883112907409668, -0.18635998666286469, 0.7708113193511963, -0.15140476822853088, 0.6730301380157471, -0.9070326089859009, 0.1301974207162857, -0.39999181032180786, -0.9469594359397888, -0.3550044894218445, 0.6504027843475342, -0.40794479846954346, 0.5082119703292847, 0.726864755153656, 0.8360798954963684, -0.1711893528699875, -0.32003307342529297, 0.4670569598674774, 0.5790961384773254, 0.2479756474494934, 0.6562734842300415, 0.6553254723548889, -0.5236409306526184, 0.7986519932746887, -0.5573057532310486, -0.08595332503318787, -0.17520809173583984, -0.738724410533905, -1.1971145868301392, -0.8367636203765869, -0.3352370262145996, -0.6747079491615295, 0.09038341045379639, 1.4219180345535278, 0.5166930556297302, -1.103577971458435, -0.5116221308708191, 0.2518514394760132, 0.03996662795543671, 0.018392225727438927, -0.19339749217033386, 0.5469422936439514, -0.35273441672325134, -1.017682433128357, -0.12753508985042572, 0.1387491077184677, 0.09424315392971039, 0.09826327115297318, -0.15509556233882904, -0.47605660557746887, 0.1261756271123886, 0.6007969975471497, -0.058527957648038864, -0.6470080018043518, -0.2634328007698059, 0.25968679785728455, -0.43714362382888794, 0.14638230204582214, 0.25037887692451477, -0.34442809224128723, 0.10044607520103455, 0.4783312976360321, 0.13119404017925262, 0.5218448638916016, -0.12437957525253296, 0.4699960947036743, -0.6649645566940308, 0.1924067884683609, 0.1972942352294922, 0.7190496325492859, 0.6236056089401245, 0.06121215969324112, 0.537199854850769, 0.1289372593164444, -0.25053730607032776, -0.9014979600906372, -0.16804639995098114, -1.1985752582550049, -0.21319209039211273, 1.3871556520462036, -0.28734090924263, -0.32084307074546814, 0.09053749591112137, -0.09067396819591522, 0.5019530653953552, -0.6852405071258545, 0.7715407013893127, 0.6008512377738953, 0.19967947900295258, -0.31194689869880676, -0.39151713252067566, 0.3293512761592865, 0.18822769820690155, -0.42213860154151917, -0.3188886046409607, -0.13035368919372559, 0.563933253288269, 0.1304444819688797, 0.5637035965919495, -0.03190230578184128, 0.18966448307037354, -0.26681169867515564, 0.1639522761106491, 0.05296913906931877, 0.13503055274486542, -0.1502559930086136, 0.120770663022995, -0.0822107270359993, -0.1970725953578949 ]
thenlper/gte-large-zh
thenlper
"2023-11-29T14:19:08Z"
30,151
13
sentence-transformers
[ "sentence-transformers", "pytorch", "safetensors", "bert", "mteb", "sentence-similarity", "Sentence Transformers", "en", "arxiv:2308.03281", "license:mit", "model-index", "endpoints_compatible", "has_space", "region:us" ]
sentence-similarity
"2023-11-07T07:51:20Z"
--- tags: - mteb - sentence-similarity - sentence-transformers - Sentence Transformers model-index: - name: gte-large-zh results: - task: type: STS dataset: type: C-MTEB/AFQMC name: MTEB AFQMC config: default split: validation revision: None metrics: - type: cos_sim_pearson value: 48.94131905219026 - type: cos_sim_spearman value: 54.58261199731436 - type: euclidean_pearson value: 52.73929210805982 - type: euclidean_spearman value: 54.582632097533676 - type: manhattan_pearson value: 52.73123295724949 - type: manhattan_spearman value: 54.572941830465794 - task: type: STS dataset: type: C-MTEB/ATEC name: MTEB ATEC config: default split: test revision: None metrics: - type: cos_sim_pearson value: 47.292931669579005 - type: cos_sim_spearman value: 54.601019783506466 - type: euclidean_pearson value: 54.61393532658173 - type: euclidean_spearman value: 54.60101865708542 - type: manhattan_pearson value: 54.59369555606305 - type: manhattan_spearman value: 54.601098593646036 - task: type: Classification dataset: type: mteb/amazon_reviews_multi name: MTEB AmazonReviewsClassification (zh) config: zh split: test revision: 1399c76144fd37290681b995c656ef9b2e06e26d metrics: - type: accuracy value: 47.233999999999995 - type: f1 value: 45.68998446563349 - task: type: STS dataset: type: C-MTEB/BQ name: MTEB BQ config: default split: test revision: None metrics: - type: cos_sim_pearson value: 62.55033151404683 - type: cos_sim_spearman value: 64.40573802644984 - type: euclidean_pearson value: 62.93453281081951 - type: euclidean_spearman value: 64.40574149035828 - type: manhattan_pearson value: 62.839969210895816 - type: manhattan_spearman value: 64.30837945045283 - task: type: Clustering dataset: type: C-MTEB/CLSClusteringP2P name: MTEB CLSClusteringP2P config: default split: test revision: None metrics: - type: v_measure value: 42.098169316685045 - task: type: Clustering dataset: type: C-MTEB/CLSClusteringS2S name: MTEB CLSClusteringS2S config: default split: test revision: None metrics: - type: v_measure value: 38.90716707051822 - task: type: Reranking dataset: type: C-MTEB/CMedQAv1-reranking name: MTEB CMedQAv1 config: default split: test revision: None metrics: - type: map value: 86.09191911031553 - type: mrr value: 88.6747619047619 - task: type: Reranking dataset: type: C-MTEB/CMedQAv2-reranking name: MTEB CMedQAv2 config: default split: test revision: None metrics: - type: map value: 86.45781885502122 - type: mrr value: 89.01591269841269 - task: type: Retrieval dataset: type: C-MTEB/CmedqaRetrieval name: MTEB CmedqaRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 24.215 - type: map_at_10 value: 36.498000000000005 - type: map_at_100 value: 38.409 - type: map_at_1000 value: 38.524 - type: map_at_3 value: 32.428000000000004 - type: map_at_5 value: 34.664 - type: mrr_at_1 value: 36.834 - type: mrr_at_10 value: 45.196 - type: mrr_at_100 value: 46.214 - type: mrr_at_1000 value: 46.259 - type: mrr_at_3 value: 42.631 - type: mrr_at_5 value: 44.044 - type: ndcg_at_1 value: 36.834 - type: ndcg_at_10 value: 43.146 - type: ndcg_at_100 value: 50.632999999999996 - type: ndcg_at_1000 value: 52.608999999999995 - type: ndcg_at_3 value: 37.851 - type: ndcg_at_5 value: 40.005 - type: precision_at_1 value: 36.834 - type: precision_at_10 value: 9.647 - type: precision_at_100 value: 1.574 - type: precision_at_1000 value: 0.183 - type: precision_at_3 value: 21.48 - type: precision_at_5 value: 15.649 - type: recall_at_1 value: 24.215 - type: recall_at_10 value: 54.079 - type: recall_at_100 value: 84.943 - type: recall_at_1000 value: 98.098 - type: recall_at_3 value: 38.117000000000004 - type: recall_at_5 value: 44.775999999999996 - task: type: PairClassification dataset: type: C-MTEB/CMNLI name: MTEB Cmnli config: default split: validation revision: None metrics: - type: cos_sim_accuracy value: 82.51352976548407 - type: cos_sim_ap value: 89.49905141462749 - type: cos_sim_f1 value: 83.89334489486234 - type: cos_sim_precision value: 78.19761567993534 - type: cos_sim_recall value: 90.48398410100538 - type: dot_accuracy value: 82.51352976548407 - type: dot_ap value: 89.49108293121158 - type: dot_f1 value: 83.89334489486234 - type: dot_precision value: 78.19761567993534 - type: dot_recall value: 90.48398410100538 - type: euclidean_accuracy value: 82.51352976548407 - type: euclidean_ap value: 89.49904709975154 - type: euclidean_f1 value: 83.89334489486234 - type: euclidean_precision value: 78.19761567993534 - type: euclidean_recall value: 90.48398410100538 - type: manhattan_accuracy value: 82.48947684906794 - type: manhattan_ap value: 89.49231995962901 - type: manhattan_f1 value: 83.84681215233205 - type: manhattan_precision value: 77.28258726089528 - type: manhattan_recall value: 91.62964694879588 - type: max_accuracy value: 82.51352976548407 - type: max_ap value: 89.49905141462749 - type: max_f1 value: 83.89334489486234 - task: type: Retrieval dataset: type: C-MTEB/CovidRetrieval name: MTEB CovidRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 78.583 - type: map_at_10 value: 85.613 - type: map_at_100 value: 85.777 - type: map_at_1000 value: 85.77900000000001 - type: map_at_3 value: 84.58 - type: map_at_5 value: 85.22800000000001 - type: mrr_at_1 value: 78.925 - type: mrr_at_10 value: 85.667 - type: mrr_at_100 value: 85.822 - type: mrr_at_1000 value: 85.824 - type: mrr_at_3 value: 84.651 - type: mrr_at_5 value: 85.299 - type: ndcg_at_1 value: 78.925 - type: ndcg_at_10 value: 88.405 - type: ndcg_at_100 value: 89.02799999999999 - type: ndcg_at_1000 value: 89.093 - type: ndcg_at_3 value: 86.393 - type: ndcg_at_5 value: 87.5 - type: precision_at_1 value: 78.925 - type: precision_at_10 value: 9.789 - type: precision_at_100 value: 1.005 - type: precision_at_1000 value: 0.101 - type: precision_at_3 value: 30.769000000000002 - type: precision_at_5 value: 19.031000000000002 - type: recall_at_1 value: 78.583 - type: recall_at_10 value: 96.891 - type: recall_at_100 value: 99.473 - type: recall_at_1000 value: 100.0 - type: recall_at_3 value: 91.438 - type: recall_at_5 value: 94.152 - task: type: Retrieval dataset: type: C-MTEB/DuRetrieval name: MTEB DuRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 25.604 - type: map_at_10 value: 77.171 - type: map_at_100 value: 80.033 - type: map_at_1000 value: 80.099 - type: map_at_3 value: 54.364000000000004 - type: map_at_5 value: 68.024 - type: mrr_at_1 value: 89.85 - type: mrr_at_10 value: 93.009 - type: mrr_at_100 value: 93.065 - type: mrr_at_1000 value: 93.068 - type: mrr_at_3 value: 92.72500000000001 - type: mrr_at_5 value: 92.915 - type: ndcg_at_1 value: 89.85 - type: ndcg_at_10 value: 85.038 - type: ndcg_at_100 value: 88.247 - type: ndcg_at_1000 value: 88.837 - type: ndcg_at_3 value: 85.20299999999999 - type: ndcg_at_5 value: 83.47 - type: precision_at_1 value: 89.85 - type: precision_at_10 value: 40.275 - type: precision_at_100 value: 4.709 - type: precision_at_1000 value: 0.486 - type: precision_at_3 value: 76.36699999999999 - type: precision_at_5 value: 63.75999999999999 - type: recall_at_1 value: 25.604 - type: recall_at_10 value: 85.423 - type: recall_at_100 value: 95.695 - type: recall_at_1000 value: 98.669 - type: recall_at_3 value: 56.737 - type: recall_at_5 value: 72.646 - task: type: Retrieval dataset: type: C-MTEB/EcomRetrieval name: MTEB EcomRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 51.800000000000004 - type: map_at_10 value: 62.17 - type: map_at_100 value: 62.649 - type: map_at_1000 value: 62.663000000000004 - type: map_at_3 value: 59.699999999999996 - type: map_at_5 value: 61.23499999999999 - type: mrr_at_1 value: 51.800000000000004 - type: mrr_at_10 value: 62.17 - type: mrr_at_100 value: 62.649 - type: mrr_at_1000 value: 62.663000000000004 - type: mrr_at_3 value: 59.699999999999996 - type: mrr_at_5 value: 61.23499999999999 - type: ndcg_at_1 value: 51.800000000000004 - type: ndcg_at_10 value: 67.246 - type: ndcg_at_100 value: 69.58 - type: ndcg_at_1000 value: 69.925 - type: ndcg_at_3 value: 62.197 - type: ndcg_at_5 value: 64.981 - type: precision_at_1 value: 51.800000000000004 - type: precision_at_10 value: 8.32 - type: precision_at_100 value: 0.941 - type: precision_at_1000 value: 0.097 - type: precision_at_3 value: 23.133 - type: precision_at_5 value: 15.24 - type: recall_at_1 value: 51.800000000000004 - type: recall_at_10 value: 83.2 - type: recall_at_100 value: 94.1 - type: recall_at_1000 value: 96.8 - type: recall_at_3 value: 69.39999999999999 - type: recall_at_5 value: 76.2 - task: type: Classification dataset: type: C-MTEB/IFlyTek-classification name: MTEB IFlyTek config: default split: validation revision: None metrics: - type: accuracy value: 49.60369372835706 - type: f1 value: 38.24016248875209 - task: type: Classification dataset: type: C-MTEB/JDReview-classification name: MTEB JDReview config: default split: test revision: None metrics: - type: accuracy value: 86.71669793621012 - type: ap value: 55.75807094995178 - type: f1 value: 81.59033162805417 - task: type: STS dataset: type: C-MTEB/LCQMC name: MTEB LCQMC config: default split: test revision: None metrics: - type: cos_sim_pearson value: 69.50947272908907 - type: cos_sim_spearman value: 74.40054474949213 - type: euclidean_pearson value: 73.53007373987617 - type: euclidean_spearman value: 74.40054474732082 - type: manhattan_pearson value: 73.51396571849736 - type: manhattan_spearman value: 74.38395696630835 - task: type: Reranking dataset: type: C-MTEB/Mmarco-reranking name: MTEB MMarcoReranking config: default split: dev revision: None metrics: - type: map value: 31.188333827724108 - type: mrr value: 29.84801587301587 - task: type: Retrieval dataset: type: C-MTEB/MMarcoRetrieval name: MTEB MMarcoRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 64.685 - type: map_at_10 value: 73.803 - type: map_at_100 value: 74.153 - type: map_at_1000 value: 74.167 - type: map_at_3 value: 71.98 - type: map_at_5 value: 73.21600000000001 - type: mrr_at_1 value: 66.891 - type: mrr_at_10 value: 74.48700000000001 - type: mrr_at_100 value: 74.788 - type: mrr_at_1000 value: 74.801 - type: mrr_at_3 value: 72.918 - type: mrr_at_5 value: 73.965 - type: ndcg_at_1 value: 66.891 - type: ndcg_at_10 value: 77.534 - type: ndcg_at_100 value: 79.106 - type: ndcg_at_1000 value: 79.494 - type: ndcg_at_3 value: 74.13499999999999 - type: ndcg_at_5 value: 76.20700000000001 - type: precision_at_1 value: 66.891 - type: precision_at_10 value: 9.375 - type: precision_at_100 value: 1.0170000000000001 - type: precision_at_1000 value: 0.105 - type: precision_at_3 value: 27.932000000000002 - type: precision_at_5 value: 17.86 - type: recall_at_1 value: 64.685 - type: recall_at_10 value: 88.298 - type: recall_at_100 value: 95.426 - type: recall_at_1000 value: 98.48700000000001 - type: recall_at_3 value: 79.44200000000001 - type: recall_at_5 value: 84.358 - task: type: Classification dataset: type: mteb/amazon_massive_intent name: MTEB MassiveIntentClassification (zh-CN) config: zh-CN split: test revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7 metrics: - type: accuracy value: 73.30531271015468 - type: f1 value: 70.88091430578575 - task: type: Classification dataset: type: mteb/amazon_massive_scenario name: MTEB MassiveScenarioClassification (zh-CN) config: zh-CN split: test revision: 7d571f92784cd94a019292a1f45445077d0ef634 metrics: - type: accuracy value: 75.7128446536651 - type: f1 value: 75.06125593532262 - task: type: Retrieval dataset: type: C-MTEB/MedicalRetrieval name: MTEB MedicalRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 52.7 - type: map_at_10 value: 59.532 - type: map_at_100 value: 60.085 - type: map_at_1000 value: 60.126000000000005 - type: map_at_3 value: 57.767 - type: map_at_5 value: 58.952000000000005 - type: mrr_at_1 value: 52.900000000000006 - type: mrr_at_10 value: 59.648999999999994 - type: mrr_at_100 value: 60.20100000000001 - type: mrr_at_1000 value: 60.242 - type: mrr_at_3 value: 57.882999999999996 - type: mrr_at_5 value: 59.068 - type: ndcg_at_1 value: 52.7 - type: ndcg_at_10 value: 62.883 - type: ndcg_at_100 value: 65.714 - type: ndcg_at_1000 value: 66.932 - type: ndcg_at_3 value: 59.34700000000001 - type: ndcg_at_5 value: 61.486 - type: precision_at_1 value: 52.7 - type: precision_at_10 value: 7.340000000000001 - type: precision_at_100 value: 0.8699999999999999 - type: precision_at_1000 value: 0.097 - type: precision_at_3 value: 21.3 - type: precision_at_5 value: 13.819999999999999 - type: recall_at_1 value: 52.7 - type: recall_at_10 value: 73.4 - type: recall_at_100 value: 87.0 - type: recall_at_1000 value: 96.8 - type: recall_at_3 value: 63.9 - type: recall_at_5 value: 69.1 - task: type: Classification dataset: type: C-MTEB/MultilingualSentiment-classification name: MTEB MultilingualSentiment config: default split: validation revision: None metrics: - type: accuracy value: 76.47666666666667 - type: f1 value: 76.4808576632057 - task: type: PairClassification dataset: type: C-MTEB/OCNLI name: MTEB Ocnli config: default split: validation revision: None metrics: - type: cos_sim_accuracy value: 77.58527341635084 - type: cos_sim_ap value: 79.32131557636497 - type: cos_sim_f1 value: 80.51948051948052 - type: cos_sim_precision value: 71.7948717948718 - type: cos_sim_recall value: 91.65786694825766 - type: dot_accuracy value: 77.58527341635084 - type: dot_ap value: 79.32131557636497 - type: dot_f1 value: 80.51948051948052 - type: dot_precision value: 71.7948717948718 - type: dot_recall value: 91.65786694825766 - type: euclidean_accuracy value: 77.58527341635084 - type: euclidean_ap value: 79.32131557636497 - type: euclidean_f1 value: 80.51948051948052 - type: euclidean_precision value: 71.7948717948718 - type: euclidean_recall value: 91.65786694825766 - type: manhattan_accuracy value: 77.15213860314023 - type: manhattan_ap value: 79.26178519246496 - type: manhattan_f1 value: 80.22028453418999 - type: manhattan_precision value: 70.94155844155844 - type: manhattan_recall value: 92.29144667370645 - type: max_accuracy value: 77.58527341635084 - type: max_ap value: 79.32131557636497 - type: max_f1 value: 80.51948051948052 - task: type: Classification dataset: type: C-MTEB/OnlineShopping-classification name: MTEB OnlineShopping config: default split: test revision: None metrics: - type: accuracy value: 92.68 - type: ap value: 90.78652757815115 - type: f1 value: 92.67153098230253 - task: type: STS dataset: type: C-MTEB/PAWSX name: MTEB PAWSX config: default split: test revision: None metrics: - type: cos_sim_pearson value: 35.301730226895955 - type: cos_sim_spearman value: 38.54612530948101 - type: euclidean_pearson value: 39.02831131230217 - type: euclidean_spearman value: 38.54612530948101 - type: manhattan_pearson value: 39.04765584936325 - type: manhattan_spearman value: 38.54455759013173 - task: type: STS dataset: type: C-MTEB/QBQTC name: MTEB QBQTC config: default split: test revision: None metrics: - type: cos_sim_pearson value: 32.27907454729754 - type: cos_sim_spearman value: 33.35945567162729 - type: euclidean_pearson value: 31.997628193815725 - type: euclidean_spearman value: 33.3592386340529 - type: manhattan_pearson value: 31.97117833750544 - type: manhattan_spearman value: 33.30857326127779 - task: type: STS dataset: type: mteb/sts22-crosslingual-sts name: MTEB STS22 (zh) config: zh split: test revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80 metrics: - type: cos_sim_pearson value: 62.53712784446981 - type: cos_sim_spearman value: 62.975074386224286 - type: euclidean_pearson value: 61.791207731290854 - type: euclidean_spearman value: 62.975073716988064 - type: manhattan_pearson value: 62.63850653150875 - type: manhattan_spearman value: 63.56640346497343 - task: type: STS dataset: type: C-MTEB/STSB name: MTEB STSB config: default split: test revision: None metrics: - type: cos_sim_pearson value: 79.52067424748047 - type: cos_sim_spearman value: 79.68425102631514 - type: euclidean_pearson value: 79.27553959329275 - type: euclidean_spearman value: 79.68450427089856 - type: manhattan_pearson value: 79.21584650471131 - type: manhattan_spearman value: 79.6419242840243 - task: type: Reranking dataset: type: C-MTEB/T2Reranking name: MTEB T2Reranking config: default split: dev revision: None metrics: - type: map value: 65.8563449629786 - type: mrr value: 75.82550832339254 - task: type: Retrieval dataset: type: C-MTEB/T2Retrieval name: MTEB T2Retrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 27.889999999999997 - type: map_at_10 value: 72.878 - type: map_at_100 value: 76.737 - type: map_at_1000 value: 76.836 - type: map_at_3 value: 52.738 - type: map_at_5 value: 63.726000000000006 - type: mrr_at_1 value: 89.35600000000001 - type: mrr_at_10 value: 92.622 - type: mrr_at_100 value: 92.692 - type: mrr_at_1000 value: 92.694 - type: mrr_at_3 value: 92.13799999999999 - type: mrr_at_5 value: 92.452 - type: ndcg_at_1 value: 89.35600000000001 - type: ndcg_at_10 value: 81.932 - type: ndcg_at_100 value: 86.351 - type: ndcg_at_1000 value: 87.221 - type: ndcg_at_3 value: 84.29100000000001 - type: ndcg_at_5 value: 82.279 - type: precision_at_1 value: 89.35600000000001 - type: precision_at_10 value: 39.511 - type: precision_at_100 value: 4.901 - type: precision_at_1000 value: 0.513 - type: precision_at_3 value: 72.62100000000001 - type: precision_at_5 value: 59.918000000000006 - type: recall_at_1 value: 27.889999999999997 - type: recall_at_10 value: 80.636 - type: recall_at_100 value: 94.333 - type: recall_at_1000 value: 98.39099999999999 - type: recall_at_3 value: 54.797 - type: recall_at_5 value: 67.824 - task: type: Classification dataset: type: C-MTEB/TNews-classification name: MTEB TNews config: default split: validation revision: None metrics: - type: accuracy value: 51.979000000000006 - type: f1 value: 50.35658238894168 - task: type: Clustering dataset: type: C-MTEB/ThuNewsClusteringP2P name: MTEB ThuNewsClusteringP2P config: default split: test revision: None metrics: - type: v_measure value: 68.36477832710159 - task: type: Clustering dataset: type: C-MTEB/ThuNewsClusteringS2S name: MTEB ThuNewsClusteringS2S config: default split: test revision: None metrics: - type: v_measure value: 62.92080622759053 - task: type: Retrieval dataset: type: C-MTEB/VideoRetrieval name: MTEB VideoRetrieval config: default split: dev revision: None metrics: - type: map_at_1 value: 59.3 - type: map_at_10 value: 69.299 - type: map_at_100 value: 69.669 - type: map_at_1000 value: 69.682 - type: map_at_3 value: 67.583 - type: map_at_5 value: 68.57799999999999 - type: mrr_at_1 value: 59.3 - type: mrr_at_10 value: 69.299 - type: mrr_at_100 value: 69.669 - type: mrr_at_1000 value: 69.682 - type: mrr_at_3 value: 67.583 - type: mrr_at_5 value: 68.57799999999999 - type: ndcg_at_1 value: 59.3 - type: ndcg_at_10 value: 73.699 - type: ndcg_at_100 value: 75.626 - type: ndcg_at_1000 value: 75.949 - type: ndcg_at_3 value: 70.18900000000001 - type: ndcg_at_5 value: 71.992 - type: precision_at_1 value: 59.3 - type: precision_at_10 value: 8.73 - type: precision_at_100 value: 0.9650000000000001 - type: precision_at_1000 value: 0.099 - type: precision_at_3 value: 25.900000000000002 - type: precision_at_5 value: 16.42 - type: recall_at_1 value: 59.3 - type: recall_at_10 value: 87.3 - type: recall_at_100 value: 96.5 - type: recall_at_1000 value: 99.0 - type: recall_at_3 value: 77.7 - type: recall_at_5 value: 82.1 - task: type: Classification dataset: type: C-MTEB/waimai-classification name: MTEB Waimai config: default split: test revision: None metrics: - type: accuracy value: 88.36999999999999 - type: ap value: 73.29590829222836 - type: f1 value: 86.74250506247606 language: - en license: mit --- # gte-large-zh General Text Embeddings (GTE) model. [Towards General Text Embeddings with Multi-stage Contrastive Learning](https://arxiv.org/abs/2308.03281) The GTE models are trained by Alibaba DAMO Academy. They are mainly based on the BERT framework and currently offer different sizes of models for both Chinese and English Languages. The GTE models are trained on a large-scale corpus of relevance text pairs, covering a wide range of domains and scenarios. This enables the GTE models to be applied to various downstream tasks of text embeddings, including **information retrieval**, **semantic textual similarity**, **text reranking**, etc. ## Model List | Models | Language | Max Sequence Length | Dimension | Model Size | |:-----: | :-----: |:-----: |:-----: |:-----: | |[GTE-large-zh](https://huggingface.co/thenlper/gte-large-zh) | Chinese | 512 | 1024 | 0.67GB | |[GTE-base-zh](https://huggingface.co/thenlper/gte-base-zh) | Chinese | 512 | 512 | 0.21GB | |[GTE-small-zh](https://huggingface.co/thenlper/gte-small-zh) | Chinese | 512 | 512 | 0.10GB | |[GTE-large](https://huggingface.co/thenlper/gte-large) | English | 512 | 1024 | 0.67GB | |[GTE-base](https://huggingface.co/thenlper/gte-base) | English | 512 | 512 | 0.21GB | |[GTE-small](https://huggingface.co/thenlper/gte-small) | English | 512 | 384 | 0.10GB | ## Metrics We compared the performance of the GTE models with other popular text embedding models on the MTEB (CMTEB for Chinese language) benchmark. For more detailed comparison results, please refer to the [MTEB leaderboard](https://huggingface.co/spaces/mteb/leaderboard). - Evaluation results on CMTEB | Model | Model Size (GB) | Embedding Dimensions | Sequence Length | Average (35 datasets) | Classification (9 datasets) | Clustering (4 datasets) | Pair Classification (2 datasets) | Reranking (4 datasets) | Retrieval (8 datasets) | STS (8 datasets) | | ------------------- | -------------- | -------------------- | ---------------- | --------------------- | ------------------------------------ | ------------------------------ | --------------------------------------- | ------------------------------ | ---------------------------- | ------------------------ | | **gte-large-zh** | 0.65 | 1024 | 512 | **66.72** | 71.34 | 53.07 | 81.14 | 67.42 | 72.49 | 57.82 | | gte-base-zh | 0.20 | 768 | 512 | 65.92 | 71.26 | 53.86 | 80.44 | 67.00 | 71.71 | 55.96 | | stella-large-zh-v2 | 0.65 | 1024 | 1024 | 65.13 | 69.05 | 49.16 | 82.68 | 66.41 | 70.14 | 58.66 | | stella-large-zh | 0.65 | 1024 | 1024 | 64.54 | 67.62 | 48.65 | 78.72 | 65.98 | 71.02 | 58.3 | | bge-large-zh-v1.5 | 1.3 | 1024 | 512 | 64.53 | 69.13 | 48.99 | 81.6 | 65.84 | 70.46 | 56.25 | | stella-base-zh-v2 | 0.21 | 768 | 1024 | 64.36 | 68.29 | 49.4 | 79.96 | 66.1 | 70.08 | 56.92 | | stella-base-zh | 0.21 | 768 | 1024 | 64.16 | 67.77 | 48.7 | 76.09 | 66.95 | 71.07 | 56.54 | | piccolo-large-zh | 0.65 | 1024 | 512 | 64.11 | 67.03 | 47.04 | 78.38 | 65.98 | 70.93 | 58.02 | | piccolo-base-zh | 0.2 | 768 | 512 | 63.66 | 66.98 | 47.12 | 76.61 | 66.68 | 71.2 | 55.9 | | gte-small-zh | 0.1 | 512 | 512 | 60.04 | 64.35 | 48.95 | 69.99 | 66.21 | 65.50 | 49.72 | | bge-small-zh-v1.5 | 0.1 | 512 | 512 | 57.82 | 63.96 | 44.18 | 70.4 | 60.92 | 61.77 | 49.1 | | m3e-base | 0.41 | 768 | 512 | 57.79 | 67.52 | 47.68 | 63.99 | 59.54| 56.91 | 50.47 | |text-embedding-ada-002(openai) | - | 1536| 8192 | 53.02 | 64.31 | 45.68 | 69.56 | 54.28 | 52.0 | 43.35 | ## Usage Code example ```python import torch.nn.functional as F from torch import Tensor from transformers import AutoTokenizer, AutoModel input_texts = [ "中国的首都是哪里", "你喜欢去哪里旅游", "北京", "今天中午吃什么" ] tokenizer = AutoTokenizer.from_pretrained("thenlper/gte-large-zh") model = AutoModel.from_pretrained("thenlper/gte-large-zh") # Tokenize the input texts batch_dict = tokenizer(input_texts, max_length=512, padding=True, truncation=True, return_tensors='pt') outputs = model(**batch_dict) embeddings = outputs.last_hidden_state[:, 0] # (Optionally) normalize embeddings embeddings = F.normalize(embeddings, p=2, dim=1) scores = (embeddings[:1] @ embeddings[1:].T) * 100 print(scores.tolist()) ``` Use with sentence-transformers: ```python from sentence_transformers import SentenceTransformer from sentence_transformers.util import cos_sim sentences = ['That is a happy person', 'That is a very happy person'] model = SentenceTransformer('thenlper/gte-large-zh') embeddings = model.encode(sentences) print(cos_sim(embeddings[0], embeddings[1])) ``` ### Limitation This model exclusively caters to Chinese texts, and any lengthy texts will be truncated to a maximum of 512 tokens. ### Citation If you find our paper or models helpful, please consider citing them as follows: ``` @misc{li2023general, title={Towards General Text Embeddings with Multi-stage Contrastive Learning}, author={Zehan Li and Xin Zhang and Yanzhao Zhang and Dingkun Long and Pengjun Xie and Meishan Zhang}, year={2023}, eprint={2308.03281}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.6063283085823059, -0.5944315791130066, 0.27815234661102295, 0.14695347845554352, -0.19929608702659607, 0.005396037828177214, -0.3468301594257355, -0.3544370234012604, 0.5548291802406311, 0.07380621880292892, -0.5363647937774658, -0.7465073466300964, -0.7203314900398254, 0.02852579392492771, -0.060194771736860275, 0.8936744928359985, -0.03214307501912117, -0.07894442975521088, 0.29923930764198303, -0.10448761284351349, -0.35568633675575256, -0.3067147433757782, -0.7391335368156433, -0.16454286873340607, 0.5108171105384827, 0.2086007297039032, 0.9587383270263672, 0.7230968475341797, 0.4106791615486145, 0.3849464952945709, -0.13340209424495697, 0.10556342452764511, -0.33187049627304077, -0.30305081605911255, 0.18542003631591797, -0.3094346821308136, -0.3858559727668762, -0.11804439127445221, 0.491061270236969, 0.4206833839416504, 0.032184768468141556, 0.0328034833073616, 0.33384039998054504, 0.5141960978507996, -0.3912215828895569, 0.16844387352466583, -0.18456131219863892, 0.22578682005405426, -0.06911250203847885, -0.02581006847321987, -0.31877902150154114, -0.44420185685157776, 0.22918261587619781, -0.6109001636505127, 0.24577437341213226, 0.04873902350664139, 1.5703693628311157, -0.015232359059154987, -0.3129099905490875, -0.4014148414134979, -0.434972882270813, 0.9234963655471802, -0.9950657486915588, 0.36231425404548645, 0.21493148803710938, -0.08726651221513748, -0.12404075264930725, -0.8045977354049683, -0.6806707382202148, -0.18133115768432617, -0.515936553478241, 0.3762800991535187, -0.16970482468605042, -0.13262797892093658, 0.2626723051071167, 0.603258490562439, -0.7440119981765747, 0.16815440356731415, -0.2517765462398529, -0.19166338443756104, 0.5841383934020996, 0.08451531827449799, 0.6399978399276733, -0.523492157459259, -0.595806896686554, -0.29660844802856445, -0.4373687207698822, 0.14982075989246368, 0.23073820769786835, 0.0801330953836441, -0.42022213339805603, 0.5668845772743225, 0.08683928102254868, 0.46137353777885437, 0.13281959295272827, -0.0001006885213428177, 0.6669423580169678, -0.49431610107421875, -0.43457379937171936, -0.20465844869613647, 1.1349393129348755, 0.4907911717891693, 0.11885636299848557, -0.11532899737358093, -0.15808053314685822, -0.0408928208053112, -0.2274235039949417, -1.0955476760864258, -0.2568725049495697, 0.3254181146621704, -0.6489389538764954, -0.19065316021442413, 0.3116929233074188, -0.9554166197776794, 0.03809983283281326, -0.10968492925167084, 0.7578704357147217, -0.6672025322914124, -0.3001118004322052, 0.06140818074345589, -0.21886149048805237, 0.41338101029396057, 0.01641295850276947, -1.115011215209961, 0.059221334755420685, 0.34025275707244873, 0.9889150857925415, 0.014412134885787964, -0.3541381359100342, -0.008645167574286461, 0.2490965574979782, -0.40268751978874207, 0.4796370267868042, -0.3055990934371948, -0.31319406628608704, 0.038785580545663834, 0.34003034234046936, -0.37990128993988037, -0.3167346715927124, 0.7185088396072388, -0.3203085660934448, 0.3884507417678833, -0.33536580204963684, -0.6004367470741272, -0.23949816823005676, 0.29392340779304504, -0.7880119681358337, 1.2472726106643677, 0.07747973501682281, -1.0142508745193481, 0.41771215200424194, -0.6157988905906677, -0.2439265251159668, -0.34970733523368835, -0.10740353167057037, -0.6940451860427856, -0.11561879515647888, 0.5278934836387634, 0.6935052871704102, -0.4006793200969696, 0.17384536564350128, -0.03924194350838661, -0.4448625147342682, -0.10315084457397461, -0.3844653069972992, 1.1653083562850952, 0.20516501367092133, -0.751498281955719, 0.2756319046020508, -0.7405651211738586, 0.18992455303668976, 0.40388157963752747, -0.23818784952163696, -0.18021011352539062, -0.14672230184078217, 0.059539854526519775, 0.39664262533187866, 0.30232396721839905, -0.4604184627532959, 0.23888641595840454, -0.40812960267066956, 0.8908122181892395, 0.8987598419189453, 0.05715848132967949, 0.182285338640213, -0.490477055311203, 0.20051851868629456, 0.26350137591362, 0.15969140827655792, -0.23728340864181519, -0.4892774224281311, -0.9721247553825378, -0.5975009202957153, 0.44723814725875854, 0.6183422207832336, -0.740203857421875, 0.9460691213607788, -0.28481024503707886, -0.5874766707420349, -0.43922343850135803, -0.0358274020254612, 0.2533339262008667, 0.17011992633342743, 0.4940531849861145, 0.007117444183677435, -0.4608859121799469, -1.1000957489013672, 0.04228312894701958, -0.05125535652041435, -0.03598303347826004, 0.31864237785339355, 0.8438198566436768, -0.2809133529663086, 0.7585639357566833, -0.6964398622512817, -0.3791530430316925, -0.2924901843070984, 0.00047518988139927387, 0.5609717965126038, 0.603607177734375, 0.7682114243507385, -0.7926619648933411, -0.8452004790306091, 0.06497322022914886, -0.9004518985748291, 0.37798622250556946, -0.1815887987613678, -0.17306673526763916, 0.19968953728675842, 0.3886314630508423, -0.7852552533149719, 0.5074923038482666, 0.6780062317848206, -0.5423809289932251, 0.6345338225364685, -0.5213931202888489, 0.260752409696579, -1.2742968797683716, 0.16143187880516052, 0.10831522941589355, -0.039441321045160294, -0.6212118864059448, 0.013571923598647118, 0.23760169744491577, 0.07823605090379715, -0.3250916600227356, 0.5953139066696167, -0.798805832862854, 0.1440320909023285, 0.1376434564590454, 0.39406275749206543, -0.03873846307396889, 0.8777633905410767, -0.049612730741500854, 0.9839276671409607, 0.652247965335846, -0.7213322520256042, 0.24373388290405273, 0.329559862613678, -0.7247155904769897, 0.2741813659667969, -0.7367364764213562, -0.10389698296785355, -0.024279337376356125, 0.16055546700954437, -1.2221994400024414, -0.14998899400234222, 0.2603625953197479, -0.5679430365562439, 0.45285364985466003, 0.21216708421707153, -0.6341909170150757, -0.9050418734550476, -0.7060918211936951, 0.14133989810943604, 0.4615967869758606, -0.639476478099823, 0.4411427974700928, 0.0021678470075130463, -0.006268315948545933, -0.8084164261817932, -0.8768354654312134, -0.04115896299481392, -0.15976975858211517, -0.8909262418746948, 0.6525960564613342, -0.21351781487464905, 0.17717862129211426, 0.2831002473831177, 0.063727967441082, 0.0777880847454071, 0.014548634178936481, -0.02014663629233837, 0.5552501678466797, -0.42337295413017273, -0.015351229347288609, -0.07407184690237045, -0.14127418398857117, -0.11798353493213654, -0.07713574171066284, 0.8982683420181274, -0.04704698920249939, -0.18264923989772797, -0.6662497520446777, 0.113771952688694, 0.5877347588539124, -0.36446166038513184, 1.08617103099823, 0.9546203017234802, -0.4493056833744049, -0.011416694149374962, -0.4368845522403717, -0.1796487420797348, -0.5417841672897339, 0.6028298139572144, -0.5181283950805664, -0.8733643889427185, 0.7840682864189148, 0.2759162187576294, 0.2570067346096039, 0.9526802897453308, 0.6955016851425171, -0.06374487280845642, 1.1550577878952026, 0.5034740567207336, -0.35507020354270935, 0.46355026960372925, -0.7758750319480896, 0.20920835435390472, -0.9153231382369995, -0.3221898376941681, -0.44905421137809753, -0.45123109221458435, -0.7425839304924011, -0.4266541600227356, 0.16740550100803375, 0.1172325611114502, -0.5498233437538147, 0.44510704278945923, -0.6364635825157166, 0.2888897657394409, 0.5951024889945984, 0.28701305389404297, 0.017930762842297554, -0.011831765994429588, -0.3487486243247986, -0.1668139398097992, -0.5979623198509216, -0.41467925906181335, 1.014281988143921, 0.40496307611465454, 0.5158331394195557, 0.1724320948123932, 0.6299020648002625, 0.18767239153385162, 0.22524237632751465, -0.7226790189743042, 0.4471721351146698, -0.273887038230896, -0.8703759908676147, -0.4086073935031891, -0.4516781270503998, -1.057117223739624, 0.5019251704216003, -0.31854957342147827, -0.9955416321754456, 0.17977045476436615, -0.11738455295562744, -0.5066232085227966, 0.7289634346961975, -0.7706395983695984, 0.996496319770813, -0.15743276476860046, -0.49393171072006226, 0.02427523024380207, -0.598063051700592, 0.4160659909248352, 0.2848908007144928, 0.19593004882335663, 0.03350627422332764, -0.007813524454832077, 0.8911859393119812, -0.4191678464412689, 0.6735897064208984, -0.1504143625497818, -0.11928214877843857, 0.41428568959236145, -0.23325946927070618, 0.8630537390708923, -0.01157868281006813, -0.07706163823604584, -0.08768688887357712, -0.20803871750831604, -0.44679707288742065, -0.45244720578193665, 0.9583357572555542, -1.1484534740447998, -0.8390232920646667, -0.5916682481765747, -0.2464970201253891, -0.013875968754291534, 0.3275192975997925, 0.6806144118309021, 0.5002048015594482, -0.10871005058288574, 0.5001864433288574, 0.8149890303611755, -0.5459581613540649, 0.850597083568573, 0.04738161712884903, -0.11885645985603333, -0.6437669396400452, 0.9186855554580688, 0.28378400206565857, 0.3668931722640991, 0.4194260239601135, 0.1727689653635025, -0.36297670006752014, -0.39037978649139404, -0.4574282169342041, 0.46003618836402893, -0.44924312829971313, -0.18267123401165009, -0.7091496586799622, -0.5377275943756104, -0.4938179552555084, -0.2547818720340729, -0.2264138162136078, -0.2494182288646698, -0.4460624158382416, -0.23048409819602966, 0.21844898164272308, 0.6864212155342102, -0.003082429524511099, 0.23729896545410156, -0.8322899341583252, 0.2893332242965698, 0.20202389359474182, 0.3533268868923187, 0.3125821053981781, -0.6235281229019165, -0.35298842191696167, -0.05774076282978058, -0.39302539825439453, -0.9713030457496643, 0.6575502753257751, 0.02854427509009838, 0.654087483882904, 0.528818666934967, -0.14461113512516022, 0.7893328666687012, -0.5086819529533386, 1.0300238132476807, 0.48220184445381165, -1.0220941305160522, 0.38576436042785645, -0.34896987676620483, 0.13370901346206665, 0.39076879620552063, 0.515234649181366, -0.6825741529464722, -0.26123490929603577, -0.7613527774810791, -1.038801908493042, 0.8685254454612732, 0.419146329164505, 0.18546254932880402, -0.020310357213020325, 0.15857771039009094, -0.1530858874320984, 0.14843253791332245, -1.1053351163864136, -0.9408455491065979, -0.2265089750289917, -0.2604154050350189, -0.21453726291656494, -0.3177717328071594, 0.11281020194292068, -0.3750472366809845, 0.8555972576141357, 0.2112916111946106, 0.6942126750946045, 0.3848388195037842, -0.12706713378429413, 0.05180491879582405, 0.22864599525928497, 0.6832146048545837, 0.5595585703849792, -0.30745595693588257, -0.1124807819724083, 0.2320418506860733, -0.587316632270813, 0.14539691805839539, 0.005766086746007204, -0.3241625428199768, 0.1313309371471405, 0.405161052942276, 0.800560474395752, 0.27586817741394043, -0.1499556601047516, 0.6205437183380127, 0.09855819493532181, -0.42895060777664185, -0.346772700548172, -0.005287285894155502, 0.29562482237815857, 0.21884141862392426, 0.4525816738605499, -0.13329172134399414, -0.0702747330069542, -0.7449752688407898, 0.18179550766944885, 0.3510230481624603, -0.44627881050109863, -0.2549148201942444, 0.8370341658592224, 0.11086031049489975, -0.04146525263786316, 0.5996835827827454, -0.15950284898281097, -0.7688528299331665, 0.9753774404525757, 0.6768115758895874, 0.8378339409828186, -0.3976956307888031, 0.27054157853126526, 1.0722728967666626, 0.45681923627853394, -0.12272091209888458, 0.1951410174369812, 0.38570377230644226, -0.6228920221328735, -0.18412090837955475, -0.4248634874820709, 0.023069843649864197, 0.37788280844688416, -0.589971661567688, 0.4582594037055969, -0.44854843616485596, -0.26478469371795654, -0.05548327416181564, 0.3345494866371155, -0.7622630000114441, 0.3863276243209839, 0.1385030895471573, 0.9830871820449829, -0.8065025806427002, 0.941899299621582, 0.46139153838157654, -0.6788959503173828, -1.0088286399841309, -0.06133507564663887, -0.22855615615844727, -0.8362775444984436, 0.6392807960510254, 0.37316378951072693, 0.24773697555065155, 0.09935003519058228, -0.34519341588020325, -1.0704628229141235, 1.4921637773513794, 0.03607852756977081, -0.6607301235198975, -0.2479892075061798, -0.004935256205499172, 0.50862717628479, -0.12409994006156921, 0.5766244530677795, 0.5597651600837708, 0.6811520457267761, -0.08395849168300629, -0.7671273946762085, 0.2881920337677002, -0.3605200946331024, 0.004984607920050621, 0.3045896589756012, -1.270219087600708, 1.2963993549346924, -0.27225998044013977, -0.21820421516895294, 0.13129708170890808, 0.9471318125724792, 0.22300195693969727, -0.019842268899083138, 0.45052996277809143, 0.7534328699111938, 0.7928479909896851, -0.3427390456199646, 1.0205507278442383, -0.31818535923957825, 0.7141305208206177, 0.8063375353813171, 0.23409691452980042, 0.8336877822875977, 0.28289559483528137, -0.40113377571105957, 0.6641695499420166, 0.8672263026237488, -0.33450081944465637, 0.5034264326095581, 0.13359613716602325, -0.05165106803178787, -0.12901484966278076, 0.2861364185810089, -0.7186726331710815, 0.1207810789346695, 0.33421972393989563, -0.687142014503479, -0.031391311436891556, -0.1333814114332199, 0.34005314111709595, -0.16635753214359283, -0.386373907327652, 0.4265204071998596, 0.05722733587026596, -0.4587825536727905, 0.6563523411750793, 0.09118196368217468, 0.9910948276519775, -0.6789796352386475, 0.2952207326889038, -0.13073866069316864, 0.23073598742485046, -0.3540928065776825, -1.0431662797927856, -0.03413796424865723, -0.17138983309268951, -0.22347798943519592, 0.19571101665496826, 0.420011967420578, -0.33794280886650085, -0.45928943157196045, 0.5555385947227478, 0.35225242376327515, -0.11648757755756378, 0.23460467159748077, -1.001261830329895, -0.13684089481830597, 0.33446672558784485, -0.7915006279945374, 0.2944309115409851, 0.598076343536377, 0.18252012133598328, 0.5817283987998962, 0.5188018679618835, -0.09640046954154968, 0.22975808382034302, -0.0873369351029396, 0.9658113121986389, -1.0436277389526367, -0.5540676116943359, -1.0960773229599, 0.5131593942642212, -0.20331287384033203, -0.4592690169811249, 0.9942298531532288, 0.7532132863998413, 0.5831038355827332, -0.2232481688261032, 0.7680780291557312, -0.34205979108810425, 0.30303093791007996, -0.5791279673576355, 0.8015026450157166, -0.8072189688682556, -0.11742844432592392, -0.3793782591819763, -1.0718498229980469, -0.35946163535118103, 0.7812572717666626, -0.3608035445213318, 0.2915121018886566, 0.8507779240608215, 0.7510689496994019, 0.08084272593259811, 0.04165111854672432, 0.24331775307655334, 0.477495402097702, 0.40156131982803345, 0.9094681739807129, 0.6483364105224609, -0.792900562286377, 0.7358496785163879, -0.4528743028640747, 0.036932364106178284, -0.3313561677932739, -0.7536948323249817, -1.0846736431121826, -0.578739583492279, -0.38637426495552063, -0.35044991970062256, -0.16442754864692688, 1.026275873184204, 0.619585394859314, -0.8532284498214722, -0.07983227074146271, 0.034613821655511856, 0.08665616065263748, -0.18652451038360596, -0.2495405375957489, 1.0621699094772339, -0.22261719405651093, -1.1207904815673828, -0.03689534217119217, 0.048554014414548874, 0.3085953891277313, -0.049703072756528854, -0.1470133662223816, -0.36146655678749084, 0.12388333678245544, 0.5529707670211792, 0.20599764585494995, -0.6836209893226624, -0.4550498127937317, -0.003944460302591324, -0.4957653284072876, 0.3281201124191284, 0.3280387222766876, -0.3188518285751343, 0.16589020192623138, 0.4881647527217865, 0.44714269042015076, 0.6120161414146423, -0.1276402771472931, 0.17778627574443817, -0.5495299696922302, 0.13782405853271484, -0.09184981137514114, 0.4853605329990387, 0.11741895228624344, -0.35715314745903015, 0.7067903876304626, 0.21903252601623535, -0.6486642956733704, -0.6961609125137329, -0.27705055475234985, -1.1439776420593262, -0.4104764461517334, 1.1603285074234009, -0.34248989820480347, -0.40779271721839905, 0.21519941091537476, -0.3111006021499634, 0.36414554715156555, -0.46601060032844543, 0.5844641327857971, 1.0209674835205078, 0.15993079543113708, -0.12202045321464539, -0.8359918594360352, 0.5042733550071716, 0.3589514493942261, -0.8515795469284058, -0.042916715145111084, 0.05177773907780647, 0.28152647614479065, 0.35149407386779785, 0.4549015462398529, -0.16419637203216553, 0.0956081822514534, 0.10113991796970367, 0.12416229397058487, 0.06628165394067764, -0.06566314399242401, 0.11457046866416931, 0.21750298142433167, -0.15552613139152527, -0.3587632477283478 ]
codellama/CodeLlama-34b-hf
codellama
"2023-10-27T18:08:08Z"
30,085
138
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "llama-2", "code", "arxiv:2308.12950", "license:llama2", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-08-24T16:34:39Z"
--- 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 base 34B version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom. | | Base Model | Python | Instruct | | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) | | 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) | | 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) | ## Model Use To use this model, please make sure to install transformers from `main` until the next version is released: ```bash pip install git+https://github.com/huggingface/transformers.git@main accelerate ``` Model capabilities: - [x] Code completion. - [ ] Infilling. - [ ] Instructions / chat. - [ ] Python specialist. ```python from transformers import AutoTokenizer import transformers import torch model = "codellama/CodeLlama-34b-hf" tokenizer = AutoTokenizer.from_pretrained(model) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) sequences = pipeline( 'import socket\n\ndef ping_exponential_backoff(host: str):', do_sample=True, top_k=10, temperature=0.1, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id, max_length=200, ) for seq in sequences: print(f"Result: {seq['generated_text']}") ``` ## 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 base version of the 34B parameters model.** **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture. **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950). ## Intended Use **Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications. **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants. ## Hardware and Software **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster. **Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program. ## Training Data All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details). ## Evaluation Results See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper. ## Ethical Considerations and Limitations Code Llama and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-use-guide](https://ai.meta.com/llama/responsible-use-guide).
[ -0.3615090250968933, -0.6699114441871643, 0.25372737646102905, 0.5499200224876404, -0.24319861829280853, 0.1406346559524536, -0.07787167280912399, -0.6145463585853577, 0.2643362879753113, 0.47666510939598083, -0.40064388513565063, -0.5729076862335205, -0.6114401817321777, 0.28914931416511536, -0.4963274598121643, 1.1927965879440308, -0.04790234938263893, -0.3851656913757324, -0.22427022457122803, 0.03576516732573509, -0.23072661459445953, -0.5794150233268738, -0.23735670745372772, -0.4450850486755371, 0.263467401266098, 0.34234142303466797, 0.6892168521881104, 0.6155451536178589, 0.5335853099822998, 0.36345335841178894, -0.26453688740730286, 0.026816751807928085, -0.367585688829422, -0.34228044748306274, 0.2657954692840576, -0.5838586688041687, -0.7572622895240784, -0.028345003724098206, 0.3661365211009979, 0.30324363708496094, -0.2849234342575073, 0.46195971965789795, -0.18069292604923248, 0.478035032749176, -0.33228394389152527, 0.24236340820789337, -0.6823137998580933, -0.054202061146497726, 0.0416731983423233, -0.11595702171325684, -0.20767702162265778, -0.5008969306945801, -0.08844875544309616, -0.46042025089263916, -0.03264111280441284, -0.026466023176908493, 1.1908704042434692, 0.514259934425354, -0.29622700810432434, -0.23088130354881287, -0.32720398902893066, 0.8139092922210693, -0.9926295876502991, 0.03710625693202019, 0.33320385217666626, -0.07405737787485123, -0.14349408447742462, -0.8992570042610168, -0.7589680552482605, -0.3314444422721863, -0.14440949261188507, -0.0057504745200276375, -0.48293089866638184, 0.07145442068576813, 0.4204576313495636, 0.48217085003852844, -0.49482154846191406, 0.12055492401123047, -0.48479679226875305, -0.2211594432592392, 0.9201700091362, 0.1410229504108429, 0.41827133297920227, -0.3256523907184601, -0.3735118806362152, -0.0704745203256607, -0.8071520328521729, 0.0679626315832138, 0.4647180140018463, -0.1361359804868698, -0.7903078198432922, 0.7142818570137024, -0.21334156394004822, 0.5919355154037476, 0.1042351946234703, -0.5009849667549133, 0.5617088079452515, -0.293948769569397, -0.34670576453208923, -0.17797957360744476, 0.9825354218482971, 0.5303189158439636, 0.35958874225616455, 0.05476999282836914, -0.20113110542297363, 0.25241076946258545, 0.07969677448272705, -0.8833383321762085, -0.17206501960754395, 0.3570452630519867, -0.6288101673126221, -0.6899117827415466, -0.24137942492961884, -0.8271522521972656, -0.052110400050878525, 0.010721668601036072, 0.1594071388244629, -0.20252618193626404, -0.4606209993362427, 0.21776676177978516, 0.051438961178064346, 0.4882800877094269, 0.06310523301362991, -0.9059928059577942, 0.052695244550704956, 0.45927461981773376, 0.8147203326225281, 0.0502624474465847, -0.5314052700996399, 0.006459825672209263, -0.1340785175561905, -0.27788737416267395, 0.6564183831214905, -0.4356149733066559, -0.49164360761642456, -0.17566588521003723, 0.12322729825973511, -0.06985348463058472, -0.4817263185977936, 0.19479522109031677, -0.37208160758018494, 0.002126215258613229, 0.1355796903371811, -0.31472471356391907, -0.41896286606788635, 0.013655546121299267, -0.550263524055481, 1.196686029434204, 0.2836853265762329, -0.7725943922996521, -0.034029390662908554, -0.5783084630966187, -0.35401973128318787, -0.2669951319694519, -0.026280604302883148, -0.7124538421630859, -0.07791692763566971, 0.22594355046749115, 0.5327739119529724, -0.39473679661750793, 0.3948327302932739, -0.15411344170570374, -0.4101584851741791, 0.21880248188972473, -0.19400185346603394, 1.0925440788269043, 0.35992687940597534, -0.5181813836097717, 0.22399790585041046, -0.8632733225822449, -0.09478199481964111, 0.5327456593513489, -0.4593004584312439, 0.18989288806915283, -0.13287250697612762, 0.008081015199422836, 0.005275791510939598, 0.513462245464325, -0.3437216281890869, 0.5043826699256897, -0.4407545328140259, 0.8061381578445435, 0.6871485114097595, -0.0129391523078084, 0.3809329867362976, -0.5863444805145264, 0.7250635027885437, -0.11063000559806824, 0.22988837957382202, -0.3174825608730316, -0.7860320806503296, -1.0525410175323486, -0.286874920129776, 0.009886222891509533, 0.7257563471794128, -0.49556228518486023, 0.6564609408378601, -0.024267716333270073, -0.8183868527412415, -0.511732280254364, 0.17148856818675995, 0.4706895351409912, 0.34991157054901123, 0.36142635345458984, -0.12932142615318298, -0.8092876672744751, -0.8153839111328125, 0.10732262581586838, -0.478733092546463, 0.12913362681865692, 0.2555609941482544, 0.8683747053146362, -0.6377939581871033, 0.8350231051445007, -0.4504668414592743, -0.010141651146113873, -0.3569525182247162, -0.22885364294052124, 0.5602530837059021, 0.6087076663970947, 0.7366668581962585, -0.5630082488059998, -0.3167945444583893, 0.022276746109128, -0.8896527886390686, -0.12572655081748962, -0.23950797319412231, -0.060412079095840454, 0.36545148491859436, 0.3307186961174011, -0.7047824859619141, 0.5302700400352478, 0.8548092246055603, -0.2610805332660675, 0.6283278465270996, -0.15950915217399597, -0.09544825553894043, -1.0821876525878906, 0.23909953236579895, -0.17801056802272797, -0.05149155482649803, -0.5170236229896545, 0.35034608840942383, 0.07222491502761841, 0.07290878146886826, -0.5600504279136658, 0.3810318112373352, -0.4180826246738434, -0.009872373193502426, -0.1226315125823021, -0.18484827876091003, -0.001828842330724001, 0.7456125617027283, -0.04236634075641632, 0.9633506536483765, 0.5799041390419006, -0.6158623695373535, 0.40393391251564026, 0.3131523132324219, -0.32130682468414307, 0.18993665277957916, -1.0099499225616455, 0.35558491945266724, 0.12029159069061279, 0.35290178656578064, -0.8677341341972351, -0.2153588831424713, 0.35008957982063293, -0.5315104126930237, 0.10582049190998077, -0.05008783936500549, -0.4929197430610657, -0.5384973883628845, -0.24785861372947693, 0.47585856914520264, 0.8894938826560974, -0.6078183650970459, 0.4072589874267578, 0.422251433134079, 0.14923760294914246, -0.738217830657959, -0.7250397801399231, 0.08831264078617096, -0.4623435139656067, -0.7357473969459534, 0.45453932881355286, -0.29640087485313416, -0.14781485497951508, -0.19255459308624268, 0.1031045988202095, 0.01067571621388197, 0.2896632254123688, 0.4493284225463867, 0.4236789047718048, -0.12961995601654053, -0.208092600107193, -0.04453662037849426, -0.1528751254081726, 0.07580436021089554, 0.09701547026634216, 0.8078244924545288, -0.44215089082717896, -0.2542420029640198, -0.6224307417869568, 0.16387403011322021, 0.5720886588096619, -0.26370862126350403, 0.618561863899231, 0.45083731412887573, -0.3696434497833252, -0.006829090416431427, -0.6649616956710815, 0.047114670276641846, -0.5776005387306213, 0.32753822207450867, -0.27025729417800903, -0.8306676745414734, 0.7229089736938477, 0.11235091090202332, 0.21091218292713165, 0.5587522983551025, 0.8030236959457397, 0.07485412806272507, 0.7713637948036194, 0.9277980923652649, -0.41349440813064575, 0.40237435698509216, -0.620576024055481, 0.08426538854837418, -0.8155145645141602, -0.41968032717704773, -0.5858179330825806, -0.045525554567575455, -0.6919443011283875, -0.4858473539352417, 0.3134140372276306, 0.2052975594997406, -0.5402282476425171, 0.730584979057312, -0.8610456585884094, 0.41925862431526184, 0.4416656196117401, 0.04953718185424805, 0.34645918011665344, 0.03619910776615143, -0.0596487931907177, 0.3001791536808014, -0.5027507543563843, -0.6883018612861633, 1.2560557126998901, 0.4985544979572296, 0.8495715260505676, -0.06979241222143173, 0.9067752957344055, 0.030291080474853516, 0.3749268352985382, -0.6110212802886963, 0.5971786379814148, 0.28783223032951355, -0.5145984292030334, -0.0275706984102726, -0.26609963178634644, -0.9292447566986084, 0.15314975380897522, 0.06915978342294693, -0.8718477487564087, 0.07718836516141891, 0.011031382717192173, -0.25338852405548096, 0.3810097575187683, -0.706998348236084, 0.66343754529953, -0.19374686479568481, 0.003953646868467331, -0.13050343096256256, -0.5563401579856873, 0.5762524604797363, -0.047264084219932556, 0.17496179044246674, -0.16695629060268402, -0.16306297481060028, 0.7045398354530334, -0.5450308322906494, 1.0735023021697998, 0.1051686555147171, -0.37069469690322876, 0.6314115524291992, -0.05204236879944801, 0.5069360733032227, 0.05646683648228645, -0.23533722758293152, 0.67702317237854, 0.0008108107722364366, -0.27141425013542175, -0.08222229778766632, 0.6459737420082092, -1.107345700263977, -0.7601527571678162, -0.43820470571517944, -0.4370992183685303, 0.303555965423584, 0.1665256917476654, 0.48732298612594604, 0.06360006332397461, 0.15541692078113556, 0.11991570889949799, 0.430303692817688, -0.663345217704773, 0.6896815896034241, 0.3288692235946655, -0.2825371026992798, -0.49845802783966064, 0.8536567091941833, -0.14906826615333557, 0.24722492694854736, 0.2395741492509842, 0.03531336039304733, -0.1392461359500885, -0.4425845742225647, -0.48107290267944336, 0.4843514859676361, -0.6332423686981201, -0.5718355774879456, -0.6859761476516724, -0.4305324852466583, -0.3674209713935852, -0.31048551201820374, -0.33886924386024475, -0.2664252519607544, -0.6995933055877686, -0.15221118927001953, 0.8083138465881348, 0.7538971900939941, 0.01525039877742529, 0.4922679364681244, -0.6383547186851501, 0.41552212834358215, 0.13405054807662964, 0.390843003988266, 0.04879910126328468, -0.541290819644928, -0.1087476909160614, -0.023583145812153816, -0.5451816320419312, -0.9574990272521973, 0.6232413053512573, 0.14934027194976807, 0.6075739860534668, 0.13899224996566772, -0.007719067856669426, 0.6928339600563049, -0.4229331612586975, 0.9170801639556885, 0.34685084223747253, -1.165088176727295, 0.6468465924263, -0.2577754259109497, 0.09190399199724197, 0.07964226603507996, 0.2977098226547241, -0.4628404676914215, -0.32393333315849304, -0.7288385629653931, -0.8156008124351501, 0.6497938632965088, 0.2591472864151001, 0.28779178857803345, 0.01496384758502245, 0.429542601108551, -0.09306399524211884, 0.25482651591300964, -1.0990257263183594, -0.40082088112831116, -0.37309324741363525, -0.2594393193721771, -0.059564851224422455, -0.24175956845283508, -0.04613621532917023, -0.3104439675807953, 0.4814207851886749, -0.16638799011707306, 0.660794198513031, 0.207882359623909, -0.20463111996650696, -0.26169446110725403, 0.0034957905299961567, 0.6681251525878906, 0.6058820486068726, -0.04857853800058365, -0.14850065112113953, 0.4425787925720215, -0.5635009407997131, 0.24145326018333435, -0.05111384764313698, -0.0813056081533432, -0.2380567491054535, 0.5473577380180359, 0.6652500033378601, 0.08450623601675034, -0.7651003003120422, 0.5294573307037354, 0.1019902229309082, -0.2973906099796295, -0.5148694515228271, 0.25762900710105896, 0.3326057195663452, 0.3432925045490265, 0.2958254814147949, -0.014947211369872093, -0.12771891057491302, -0.35638460516929626, 0.0785960927605629, 0.359759122133255, 0.1581999659538269, -0.3466329872608185, 0.9528428912162781, 0.1389279067516327, -0.34939587116241455, 0.5345335006713867, 0.03189763426780701, -0.6069654822349548, 1.2396070957183838, 0.699411153793335, 0.7821663022041321, -0.19927090406417847, 0.14218181371688843, 0.5112082958221436, 0.5917835235595703, 0.04703754186630249, 0.4167975187301636, 0.04791949689388275, -0.560663104057312, -0.31690844893455505, -0.8300182223320007, -0.33212700486183167, 0.0780370831489563, -0.4387555718421936, 0.34759271144866943, -0.6395816802978516, -0.08290037512779236, -0.34167730808258057, 0.11375724524259567, -0.707382082939148, 0.004439113195985556, 0.0835433229804039, 0.969311535358429, -0.6865801215171814, 0.9179262518882751, 0.5493930578231812, -0.6924999952316284, -0.9457706212997437, -0.22191697359085083, -0.09256380051374435, -1.2279881238937378, 0.526530921459198, 0.2955021858215332, 0.08173263072967529, 0.13211438059806824, -0.9071691632270813, -1.1277241706848145, 1.3409881591796875, 0.4466124475002289, -0.5128037333488464, -0.03269914910197258, 0.18120643496513367, 0.5491249561309814, -0.38537949323654175, 0.5463472604751587, 0.6364167928695679, 0.40195348858833313, -0.09751866012811661, -1.2100305557250977, 0.32031235098838806, -0.4103982746601105, 0.1708589345216751, -0.2353874295949936, -1.116452932357788, 1.107839822769165, -0.5665213465690613, -0.14380759000778198, 0.4078340530395508, 0.7379087209701538, 0.5488675236701965, 0.18170051276683807, 0.3749103546142578, 0.5764036178588867, 0.6616419553756714, -0.024343183264136314, 1.1026345491409302, -0.4984489679336548, 0.5584415793418884, 0.5227744579315186, -0.09273181110620499, 0.74592125415802, 0.3862743377685547, -0.5523379445075989, 0.7829287052154541, 0.7974238991737366, -0.22444723546504974, 0.25607556104660034, 0.3205854296684265, -0.06977539509534836, -0.030545108020305634, -0.007211524061858654, -0.7823083996772766, 0.4266654849052429, 0.3342173993587494, -0.3877240717411041, 0.057824961841106415, -0.22486340999603271, 0.29512807726860046, -0.20612598955631256, -0.02459707483649254, 0.6334988474845886, 0.20801907777786255, -0.5192081332206726, 1.1940476894378662, 0.1291239708662033, 1.006508469581604, -0.4700658321380615, -0.11063149571418762, -0.4041697680950165, 0.05839378014206886, -0.5471024513244629, -0.5424893498420715, 0.20717079937458038, 0.2493903636932373, 0.001967636402696371, -0.09753108024597168, 0.5115792155265808, -0.09190985560417175, -0.5274180769920349, 0.3774428367614746, 0.18438485264778137, 0.3092389702796936, 0.19646170735359192, -0.7612077593803406, 0.45152541995048523, 0.19123929738998413, -0.47974148392677307, 0.28134220838546753, 0.1122201606631279, 0.15353724360466003, 0.9309521317481995, 0.7574335932731628, -0.13698147237300873, 0.20017963647842407, -0.2032145857810974, 1.1343586444854736, -0.7209879755973816, -0.3726207911968231, -0.8509362936019897, 0.6995247006416321, 0.20727083086967468, -0.4968861937522888, 0.6174055337905884, 0.37477466464042664, 0.8496158123016357, -0.10225992649793625, 0.8009031414985657, -0.24290744960308075, 0.07318476587533951, -0.4261006712913513, 0.7111825346946716, -0.7123092412948608, 0.3873542249202728, -0.5278522372245789, -0.9097920656204224, -0.26005780696868896, 0.9232650995254517, -0.06061222776770592, 0.1301199048757553, 0.5422419309616089, 1.0151269435882568, 0.25918182730674744, -0.09037481993436813, 0.16761162877082825, 0.2169390767812729, 0.4178883135318756, 0.8717650175094604, 0.9255452752113342, -0.6822893023490906, 0.7166480422019958, -0.6211368441581726, -0.2844911515712738, -0.30997270345687866, -1.032997965812683, -1.0081095695495605, -0.5246726274490356, -0.348715215921402, -0.43449386954307556, -0.25227683782577515, 0.9499137997627258, 0.6530200839042664, -0.6241589784622192, -0.5076239109039307, -0.18191353976726532, 0.39817607402801514, -0.10384003818035126, -0.22448012232780457, 0.3300218880176544, -0.16865381598472595, -0.8400174379348755, 0.27961212396621704, -0.027754612267017365, 0.16027633845806122, -0.30976468324661255, -0.26095840334892273, -0.18655967712402344, 0.011102816089987755, 0.45406481623649597, 0.3760787546634674, -0.8453613519668579, -0.23266464471817017, 0.11439094692468643, -0.21001015603542328, 0.14755047857761383, 0.3967839479446411, -0.6576778292655945, 0.003481966909021139, 0.39138826727867126, 0.4191168546676636, 0.41874992847442627, -0.24817827343940735, 0.24969546496868134, -0.40738534927368164, 0.4328058958053589, -0.01302928663790226, 0.5022814273834229, 0.11738798767328262, -0.5965965390205383, 0.6508079171180725, 0.3284439742565155, -0.7299561500549316, -0.9177460670471191, 0.1286676675081253, -1.0858911275863647, -0.18312914669513702, 1.299659013748169, -0.17117474973201752, -0.3330298960208893, 0.16820669174194336, -0.3685876727104187, 0.31822556257247925, -0.3931748867034912, 0.7340127229690552, 0.2942447364330292, -0.12492913007736206, -0.19633039832115173, -0.38829609751701355, 0.28555426001548767, 0.30539992451667786, -0.9677231907844543, -0.16012665629386902, 0.31220000982284546, 0.4329659640789032, 0.19090165197849274, 0.761243999004364, -0.07583402842283249, 0.2020593136548996, 0.07402974367141724, 0.43167930841445923, -0.07037797570228577, -0.17329621315002441, -0.34769317507743835, -0.0740249752998352, -0.09366314858198166, -0.06729505956172943 ]
lllyasviel/sd-controlnet-canny
lllyasviel
"2023-05-01T19:33:49Z"
30,008
111
diffusers
[ "diffusers", "art", "controlnet", "stable-diffusion", "image-to-image", "arxiv:2302.05543", "base_model:runwayml/stable-diffusion-v1-5", "license:openrail", "has_space", "diffusers:ControlNetModel", "region:us" ]
image-to-image
"2023-02-24T06:55:23Z"
--- license: openrail base_model: runwayml/stable-diffusion-v1-5 tags: - art - controlnet - stable-diffusion - image-to-image widget: - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/canny-edge.jpg prompt: Girl with Pearl Earring --- # Controlnet - *Canny Version* ControlNet is a neural network structure to control diffusion models by adding extra conditions. This checkpoint corresponds to the ControlNet conditioned on **Canny edges**. It can be used in combination with [Stable Diffusion](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/text2img). ![img](./sd.png) ## Model Details - **Developed by:** Lvmin Zhang, Maneesh Agrawala - **Model type:** Diffusion-based text-to-image generation model - **Language(s):** English - **License:** [The CreativeML OpenRAIL M license](https://huggingface.co/spaces/CompVis/stable-diffusion-license) is an [Open RAIL M license](https://www.licenses.ai/blog/2022/8/18/naming-convention-of-responsible-ai-licenses), adapted from the work that [BigScience](https://bigscience.huggingface.co/) and [the RAIL Initiative](https://www.licenses.ai/) are jointly carrying in the area of responsible AI licensing. See also [the article about the BLOOM Open RAIL license](https://bigscience.huggingface.co/blog/the-bigscience-rail-license) on which our license is based. - **Resources for more information:** [GitHub Repository](https://github.com/lllyasviel/ControlNet), [Paper](https://arxiv.org/abs/2302.05543). - **Cite as:** @misc{zhang2023adding, title={Adding Conditional Control to Text-to-Image Diffusion Models}, author={Lvmin Zhang and Maneesh Agrawala}, year={2023}, eprint={2302.05543}, archivePrefix={arXiv}, primaryClass={cs.CV} } ## Introduction Controlnet was proposed in [*Adding Conditional Control to Text-to-Image Diffusion Models*](https://arxiv.org/abs/2302.05543) by Lvmin Zhang, Maneesh Agrawala. The abstract reads as follows: *We present a neural network structure, ControlNet, to control pretrained large diffusion models to support additional input conditions. The ControlNet learns task-specific conditions in an end-to-end way, and the learning is robust even when the training dataset is small (< 50k). Moreover, training a ControlNet is as fast as fine-tuning a diffusion model, and the model can be trained on a personal devices. Alternatively, if powerful computation clusters are available, the model can scale to large amounts (millions to billions) of data. We report that large diffusion models like Stable Diffusion can be augmented with ControlNets to enable conditional inputs like edge maps, segmentation maps, keypoints, etc. This may enrich the methods to control large diffusion models and further facilitate related applications.* ## Released Checkpoints The authors released 8 different checkpoints, each trained with [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) on a different type of conditioning: | Model Name | Control Image Overview| Control Image Example | Generated Image Example | |---|---|---|---| |[lllyasviel/sd-controlnet-canny](https://huggingface.co/lllyasviel/sd-controlnet-canny)<br/> *Trained with canny edge detection* | A monochrome image with white edges on a black background.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_bird_canny.png"><img width="64" style="margin:0;padding:0;" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_bird_canny.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_canny_1.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_canny_1.png"/></a>| |[lllyasviel/sd-controlnet-depth](https://huggingface.co/lllyasviel/sd-controlnet-depth)<br/> *Trained with Midas depth estimation* |A grayscale image with black representing deep areas and white representing shallow areas.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_vermeer_depth.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_vermeer_depth.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_depth_2.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_depth_2.png"/></a>| |[lllyasviel/sd-controlnet-hed](https://huggingface.co/lllyasviel/sd-controlnet-hed)<br/> *Trained with HED edge detection (soft edge)* |A monochrome image with white soft edges on a black background.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_bird_hed.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_bird_hed.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_hed_1.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_bird_hed_1.png"/></a> | |[lllyasviel/sd-controlnet-mlsd](https://huggingface.co/lllyasviel/sd-controlnet-mlsd)<br/> *Trained with M-LSD line detection* |A monochrome image composed only of white straight lines on a black background.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_room_mlsd.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_room_mlsd.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_mlsd_0.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_mlsd_0.png"/></a>| |[lllyasviel/sd-controlnet-normal](https://huggingface.co/lllyasviel/sd-controlnet-normal)<br/> *Trained with normal map* |A [normal mapped](https://en.wikipedia.org/wiki/Normal_mapping) image.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_human_normal.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_human_normal.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_normal_1.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_normal_1.png"/></a>| |[lllyasviel/sd-controlnet_openpose](https://huggingface.co/lllyasviel/sd-controlnet-openpose)<br/> *Trained with OpenPose bone image* |A [OpenPose bone](https://github.com/CMU-Perceptual-Computing-Lab/openpose) image.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_human_openpose.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_human_openpose.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_openpose_0.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_human_openpose_0.png"/></a>| |[lllyasviel/sd-controlnet_scribble](https://huggingface.co/lllyasviel/sd-controlnet-scribble)<br/> *Trained with human scribbles* |A hand-drawn monochrome image with white outlines on a black background.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_vermeer_scribble.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_vermeer_scribble.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_scribble_0.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_vermeer_scribble_0.png"/></a> | |[lllyasviel/sd-controlnet_seg](https://huggingface.co/lllyasviel/sd-controlnet-seg)<br/>*Trained with semantic segmentation* |An [ADE20K](https://groups.csail.mit.edu/vision/datasets/ADE20K/)'s segmentation protocol image.|<a href="https://huggingface.co/takuma104/controlnet_dev/blob/main/gen_compare/control_images/converted/control_room_seg.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/control_images/converted/control_room_seg.png"/></a>|<a href="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_seg_1.png"><img width="64" src="https://huggingface.co/takuma104/controlnet_dev/resolve/main/gen_compare/output_images/diffusers/output_room_seg_1.png"/></a> | ## Example It is recommended to use the checkpoint with [Stable Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) as the checkpoint has been trained on it. Experimentally, the checkpoint can be used with other diffusion models such as dreamboothed stable diffusion. **Note**: If you want to process an image to create the auxiliary conditioning, external dependencies are required as shown below: 1. Install opencv ```sh $ pip install opencv-contrib-python ``` 2. Let's install `diffusers` and related packages: ``` $ pip install diffusers transformers accelerate ``` 3. Run code: ```python import cv2 from PIL import Image from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler import torch import numpy as np from diffusers.utils import load_image image = load_image("https://huggingface.co/lllyasviel/sd-controlnet-hed/resolve/main/images/bird.png") image = np.array(image) low_threshold = 100 high_threshold = 200 image = cv2.Canny(image, low_threshold, high_threshold) image = image[:, :, None] image = np.concatenate([image, image, image], axis=2) image = Image.fromarray(image) controlnet = ControlNetModel.from_pretrained( "lllyasviel/sd-controlnet-canny", torch_dtype=torch.float16 ) pipe = StableDiffusionControlNetPipeline.from_pretrained( "runwayml/stable-diffusion-v1-5", controlnet=controlnet, safety_checker=None, torch_dtype=torch.float16 ) pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config) # Remove if you do not have xformers installed # see https://huggingface.co/docs/diffusers/v0.13.0/en/optimization/xformers#installing-xformers # for installation instructions pipe.enable_xformers_memory_efficient_attention() pipe.enable_model_cpu_offload() image = pipe("bird", image, num_inference_steps=20).images[0] image.save('images/bird_canny_out.png') ``` ![bird](./images/bird.png) ![bird_canny](./images/bird_canny.png) ![bird_canny_out](./images/bird_canny_out.png) ### Training The canny edge model was trained on 3M edge-image, caption pairs. The model was trained for 600 GPU-hours with Nvidia A100 80G using Stable Diffusion 1.5 as a base model. ### Blog post For more information, please also have a look at the [official ControlNet Blog Post](https://huggingface.co/blog/controlnet).
[ -0.5775049924850464, -0.5232040286064148, -0.06575716286897659, 0.437509685754776, -0.29782670736312866, -0.3026345670223236, -0.09142936766147614, -0.6472591161727905, 0.8630432486534119, 0.1641952246427536, -0.5632219910621643, -0.4447465240955353, -0.7151807546615601, -0.0414787232875824, -0.01412113755941391, 0.6153329014778137, -0.11075034737586975, -0.10927145928144455, 0.23868006467819214, -0.11557625979185104, -0.09271043539047241, -0.11035505682229996, -1.2731420993804932, -0.4970840513706207, 0.59357088804245, 0.044272489845752716, 0.6556520462036133, 0.814372181892395, 0.5307682752609253, 0.4050552546977997, -0.3400108516216278, 0.2713458240032196, -0.21964357793331146, -0.16667862236499786, 0.13425597548484802, -0.12320271879434586, -0.7579514980316162, 0.07541463524103165, 0.5646880865097046, 0.33670979738235474, 0.17572814226150513, -0.20979519188404083, 0.0881066843867302, 0.6903809905052185, -0.5002888441085815, -0.02549860067665577, -0.11022936552762985, 0.4190506339073181, -0.20322319865226746, -0.09428270906209946, -0.08351316303014755, -0.296956330537796, 0.10676300525665283, -0.856700599193573, -0.3023417294025421, -0.06796909123659134, 1.4332221746444702, 0.06449629366397858, -0.31949302554130554, -0.05917326360940933, -0.13426488637924194, 0.5844362378120422, -0.7833355069160461, 0.11772359907627106, 0.24548569321632385, 0.22346241772174835, -0.23001384735107422, -0.8016484975814819, -0.5344789028167725, -0.18130138516426086, -0.10942672938108444, 0.4701967239379883, -0.46221303939819336, 0.06038481369614601, 0.18125711381435394, 0.2031150609254837, -0.35780632495880127, 0.240268275141716, -0.34997665882110596, -0.41141921281814575, 0.6848350167274475, -0.04898529499769211, 0.6928033828735352, -0.10427648574113846, -0.5225834846496582, -0.32072561979293823, -0.33378657698631287, 0.44072088599205017, 0.32853126525878906, 0.0615549236536026, -0.7263739705085754, 0.4393303692340851, -0.11312299966812134, 0.8912187814712524, 0.36897560954093933, -0.24618087708950043, 0.49605032801628113, -0.2594074606895447, -0.23014898598194122, -0.3341217041015625, 1.1340214014053345, 0.6516482830047607, 0.2875549793243408, 0.03273569792509079, -0.1590169221162796, -0.12162746489048004, 0.03654412925243378, -0.888364851474762, -0.152150958776474, 0.08511721342802048, -0.7325647473335266, -0.39838141202926636, -0.1022789254784584, -0.7065593004226685, -0.2883969247341156, -0.19946038722991943, 0.3236376643180847, -0.690414547920227, -0.6154147982597351, 0.2674703598022461, -0.5047731399536133, 0.5056858062744141, 0.5250412821769714, -0.33437055349349976, 0.21898512542247772, 0.13079538941383362, 1.0534580945968628, -0.2133530229330063, -0.2501457631587982, -0.20880171656608582, -0.1152288094162941, -0.3459116220474243, 0.5153027176856995, -0.046492334455251694, -0.08837094902992249, -0.19640977680683136, 0.3001824915409088, -0.04804098233580589, -0.33410197496414185, 0.25485095381736755, -0.17033173143863678, 0.057620517909526825, -0.057303935289382935, -0.18812669813632965, -0.3178773522377014, 0.3115391731262207, -0.588228702545166, 0.5738103985786438, 0.18366697430610657, -1.0645709037780762, 0.32686692476272583, -0.6734560132026672, -0.2864629626274109, -0.24030974507331848, 0.021059438586235046, -0.6195905208587646, -0.5632483959197998, -0.0020076027140021324, 0.7234266996383667, -0.06059647724032402, -0.1289808601140976, -0.6048456430435181, -0.03789946436882019, 0.26461926102638245, -0.10426363348960876, 1.2044352293014526, 0.16400974988937378, -0.6007352471351624, 0.21407076716423035, -0.7837565541267395, 0.09124487638473511, 0.2592940330505371, -0.37100693583488464, -0.15044929087162018, -0.15901659429073334, 0.1272665560245514, 0.6720681190490723, 0.3049229383468628, -0.7056569457054138, 0.11058225482702255, -0.315440833568573, 0.40490514039993286, 0.5411694049835205, 0.10213218629360199, 0.5406389236450195, -0.6492684483528137, 0.40824514627456665, 0.25273457169532776, 0.3928876519203186, 0.20274116098880768, -0.4095599949359894, -0.8420426845550537, -0.5383832454681396, -0.040553782135248184, 0.6118177175521851, -0.8034159541130066, 0.8383104205131531, -0.050917547196149826, -0.5757452845573425, -0.3164219856262207, 0.04403846710920334, 0.48639115691185, 0.5791822671890259, 0.330956369638443, -0.5041090250015259, -0.39344000816345215, -1.01664400100708, 0.1363784223794937, 0.20036984980106354, -0.004948244895786047, 0.3032841086387634, 0.5623652338981628, -0.05565330758690834, 0.6212931871414185, -0.1413581222295761, -0.4465674161911011, -0.028264526277780533, -0.14704149961471558, 0.20684513449668884, 0.99132239818573, 0.7646819949150085, -0.9319639205932617, -0.5154264569282532, 0.1284867227077484, -0.9711448550224304, -0.001512611866928637, -0.1874547302722931, -0.4169551432132721, 0.07437076419591904, 0.5138084292411804, -0.48839864134788513, 0.8777024149894714, 0.43175607919692993, -0.4733583927154541, 0.4564380347728729, -0.3091578185558319, 0.20900258421897888, -1.0403435230255127, 0.32788926362991333, 0.43672671914100647, -0.19842574000358582, -0.5643404126167297, 0.10566040873527527, 0.1230771467089653, 0.12774276733398438, -0.6461279988288879, 0.6344386339187622, -0.6244468688964844, -0.049535661935806274, -0.1821807473897934, 0.0019906973466277122, -0.04009862244129181, 0.6479407548904419, 0.15067148208618164, 0.49013808369636536, 0.8174800276756287, -0.3961640000343323, 0.38804003596305847, 0.3939000070095062, -0.0805341899394989, 0.8913597464561462, -0.9050964713096619, 0.02542177028954029, -0.002052934840321541, 0.4692845642566681, -0.7914878129959106, -0.26461514830589294, 0.5451508164405823, -0.5452900528907776, 0.6531045436859131, -0.09448767453432083, -0.17888714373111725, -0.516522228717804, -0.573028564453125, 0.04845673590898514, 0.39359819889068604, -0.47316819429397583, 0.43449127674102783, 0.1952289640903473, 0.24654953181743622, -0.6646472811698914, -1.069510817527771, 0.04504082351922989, -0.14825434982776642, -0.8421071767807007, 0.3483196496963501, -0.031971320509910583, 0.016865437850356102, 0.16523563861846924, 0.11006057262420654, -0.2129533439874649, 0.13246379792690277, 0.5903642773628235, 0.13923312723636627, -0.3196145296096802, -0.14662829041481018, 0.00577207887545228, -0.08424282819032669, -0.19801290333271027, -0.4670458734035492, 0.4241863489151001, -0.09980364888906479, -0.20700503885746002, -0.9993237257003784, 0.2709485590457916, 0.5415356755256653, -0.18035365641117096, 0.7072323560714722, 0.6931284070014954, -0.4063869118690491, -0.0358414426445961, -0.3383321166038513, -0.0942656621336937, -0.49128401279449463, -0.17047922313213348, -0.23951081931591034, -0.8345152139663696, 0.7063149809837341, 0.06918010115623474, -0.13210494816303253, 0.550535261631012, 0.22230792045593262, -0.20595839619636536, 0.8370054960250854, 0.39635801315307617, -0.12798111140727997, 0.6840655207633972, -0.7741466760635376, -0.17547641694545746, -0.9808937907218933, -0.3116951286792755, -0.26929596066474915, -0.8810626864433289, -0.3930337131023407, -0.28145310282707214, 0.3599877655506134, 0.29135367274284363, -0.6447643637657166, 0.46397456526756287, -0.6600297689437866, 0.13064037263393402, 0.4088098108768463, 0.6555033326148987, -0.22758451104164124, -0.09970102459192276, -0.3572961091995239, 0.1910509616136551, -0.6232202649116516, -0.21873603761196136, 0.7143850922584534, 0.45683553814888, 0.5086233019828796, -0.03424285724759102, 0.5699924826622009, 0.09667734056711197, 0.10519399493932724, -0.6718292236328125, 0.5264609456062317, -0.09455525130033493, -0.5820181965827942, -0.41104641556739807, -0.3515212833881378, -1.198082685470581, 0.1971939504146576, -0.5622907280921936, -0.7340213060379028, 0.4182806611061096, 0.14438611268997192, -0.1705431193113327, 0.6729068756103516, -0.6915138363838196, 0.6215994358062744, 0.00027245492674410343, -0.4791797697544098, 0.17076319456100464, -0.9131361842155457, 0.17352493107318878, 0.27950814366340637, -0.2550232708454132, 0.07133343815803528, -0.1880490779876709, 0.8430007100105286, -0.8265683054924011, 0.9275586605072021, -0.4729711413383484, 0.12035062909126282, 0.36429643630981445, 0.07360006868839264, 0.38147252798080444, -0.25457969307899475, -0.18284516036510468, 0.05412646010518074, -0.0909220278263092, -0.5668987035751343, -0.37990641593933105, 0.5573526620864868, -0.8770304322242737, -0.16010668873786926, -0.22335386276245117, -0.2858929932117462, 0.16006989777088165, 0.3468843996524811, 0.5476444363594055, 0.4754739999771118, 0.2755039930343628, 0.30073797702789307, 0.5320312976837158, -0.4143139123916626, 0.5619032382965088, -0.007363711483776569, 0.0690641850233078, -0.5462015867233276, 0.7276326417922974, 0.23196183145046234, 0.17248286306858063, 0.3298869729042053, 0.24344132840633392, -0.1885676234960556, -0.5034244656562805, -0.3289303779602051, 0.428251713514328, -0.5554311871528625, -0.5283072590827942, -0.6090312600135803, -0.5000085234642029, -0.3484823405742645, -0.4732497036457062, -0.25483590364456177, -0.25317931175231934, -0.6822400093078613, 0.12207350879907608, 0.6439228653907776, 0.5725297331809998, -0.39071789383888245, 0.6492002606391907, -0.16765590012073517, 0.3098970651626587, 0.3422687351703644, 0.3270244896411896, 0.09693632274866104, -0.338517963886261, 0.25396281480789185, 0.23174555599689484, -0.30412670969963074, -0.8840769529342651, 0.4384895861148834, 0.11769450455904007, 0.45608124136924744, 0.4536159634590149, -0.2896808981895447, 0.5641165971755981, -0.10710368305444717, 0.43842238187789917, 0.7444621920585632, -0.6792203783988953, 0.5289472937583923, -0.4665762484073639, 0.355670303106308, 0.4150397479534149, 0.5423805117607117, -0.5138776302337646, -0.2396014928817749, -0.5608115792274475, -0.569434642791748, 0.5710363388061523, -0.004925624933093786, -0.21315553784370422, 0.2622007131576538, 0.6514536738395691, -0.3489801287651062, -0.01675669103860855, -0.8018932342529297, -0.45377618074417114, -0.3322925865650177, -0.11286325752735138, 0.07034534960985184, 0.15478099882602692, -0.030201224610209465, -0.5304856896400452, 0.6719279289245605, -0.1985497623682022, 0.5824612379074097, 0.501734733581543, 0.17103593051433563, -0.20562949776649475, -0.36742326617240906, 0.7484937906265259, 0.41681748628616333, 0.04904746636748314, -0.11371662467718124, -0.06663783639669418, -0.533994197845459, 0.24419820308685303, -0.10449707508087158, -0.3636583089828491, -0.22253236174583435, 0.3798278570175171, 0.8672732710838318, -0.08585168421268463, 0.029742833226919174, 0.9543790221214294, -0.04346967488527298, -0.7727250456809998, -0.14510157704353333, 0.05890199542045593, 0.20718127489089966, 0.49209579825401306, 0.15656033158302307, 0.3536186218261719, 0.07601074874401093, -0.051090024411678314, 0.33740711212158203, 0.4721294939517975, -0.5041853189468384, -0.16757027804851532, 0.5090001225471497, -0.05805465951561928, -0.20431655645370483, 0.27092790603637695, -0.4568656384944916, -0.7530922889709473, 0.9744645953178406, 0.5208587646484375, 0.6788950562477112, -0.07407370954751968, 0.35526931285858154, 0.6547256112098694, 0.333282470703125, 0.21774636209011078, 0.3948216736316681, 0.09159115701913834, -0.6545811891555786, -0.36742568016052246, -0.3746943771839142, 0.06637594848871231, 0.33812105655670166, -0.4534305930137634, 0.3202771246433258, -0.959135115146637, -0.30119970440864563, 0.02893424965441227, 0.1913079023361206, -0.6379023790359497, 0.4145217537879944, 0.009384161792695522, 1.27803373336792, -0.776678204536438, 0.7202114462852478, 0.7024202346801758, -0.48419710993766785, -1.2121034860610962, -0.13907082378864288, 0.1439943164587021, -0.8060277104377747, 0.7426583170890808, 0.022002246230840683, -0.1397370845079422, -0.08953476697206497, -0.9339893460273743, -0.5858390927314758, 1.3154449462890625, 0.07222484052181244, -0.23413987457752228, 0.14406704902648926, -0.5208811163902283, 0.428478479385376, -0.44196128845214844, 0.37175965309143066, 0.19744561612606049, 0.5823180079460144, 0.2238822877407074, -0.7854976058006287, 0.28707629442214966, -0.5917289853096008, 0.17606499791145325, 0.19987598061561584, -1.0253055095672607, 0.8996743559837341, 0.24573266506195068, -0.09842496365308762, 0.041223760694265366, 0.6427534222602844, 0.16043218970298767, 0.15998728573322296, 0.7481219172477722, 0.7200501561164856, 0.3291742205619812, -0.09616867452859879, 0.8423164486885071, -0.057427212595939636, 0.08748453855514526, 0.630972683429718, 0.30502286553382874, 0.5843917727470398, 0.3789413571357727, 0.06731261312961578, 0.35698699951171875, 0.782451868057251, 0.043965961784124374, 0.28942447900772095, 0.5787712335586548, 0.008489452302455902, -0.0753234252333641, 0.007613806519657373, -0.3254161775112152, 0.38651135563850403, 0.3263324201107025, -0.21118859946727753, -0.18252815306186676, 0.3832332491874695, 0.15029409527778625, 0.014439284801483154, -0.3794424831867218, 0.6604197025299072, -0.13241828978061676, -0.402888685464859, 0.8314327001571655, -0.12682540714740753, 1.2738416194915771, -0.6275560855865479, 0.014241284690797329, -0.31800055503845215, -0.06479495763778687, -0.39328131079673767, -0.9371808767318726, 0.19212719798088074, -0.2329973578453064, 0.32296180725097656, -0.2356603443622589, 0.9511951208114624, -0.2424388825893402, -0.12824904918670654, 0.6077967286109924, 0.17991074919700623, 0.34206831455230713, 0.2697198688983917, -1.1743253469467163, 0.22162465751171112, 0.07037993520498276, -0.4520290195941925, 0.13006137311458588, 0.5017789006233215, 0.08409466594457626, 0.7057548761367798, 0.4108540713787079, 0.6605914831161499, 0.2757270038127899, -0.3969111740589142, 1.0050833225250244, -0.2538470923900604, -0.3356679677963257, -0.4373612403869629, 0.6248601078987122, -0.5637272000312805, -0.5145182609558105, 0.49099835753440857, 0.2776262164115906, 0.7711318135261536, 0.0028255339711904526, 0.6151592135429382, -0.3558103144168854, 0.2775565981864929, -0.4810563027858734, 1.0732725858688354, -0.9874245524406433, -0.42775553464889526, -0.20583385229110718, -0.47028034925460815, -0.5068781971931458, 0.9783894419670105, -0.1956530660390854, 0.1470707654953003, 0.4344278872013092, 0.94998699426651, -0.3146522641181946, -0.44428667426109314, 0.08426323533058167, 0.058011170476675034, 0.14248070120811462, 0.7948113679885864, 0.6346532702445984, -0.6148808598518372, 0.15549400448799133, -0.5394176244735718, -0.5026721358299255, -0.2793320417404175, -0.914799153804779, -0.8652325868606567, -0.7285969853401184, -0.4893554449081421, -0.5650191307067871, -0.1834050416946411, 0.8602708578109741, 1.2178329229354858, -0.6295546293258667, -0.3247166872024536, -0.1497098058462143, 0.0921555757522583, -0.1859133243560791, -0.17476679384708405, 0.36913958191871643, 0.11939195543527603, -0.4180375933647156, 0.011674306355416775, 0.34126919507980347, 0.5966724157333374, 0.0037275098729878664, -0.40005069971084595, -0.5709898471832275, -0.29415807127952576, 0.2644251585006714, 0.6345252990722656, -0.4453474283218384, -0.29227280616760254, -0.04577861726284027, -0.3340733051300049, 0.10017053782939911, 0.3853495419025421, -0.17599517107009888, 0.297072172164917, 0.5955629944801331, 0.6156691908836365, 0.6358400583267212, -0.22284039855003357, 0.017361020669341087, -0.498821884393692, 0.504568874835968, 0.02648513950407505, 0.33196812868118286, 0.2182552069425583, -0.31002378463745117, 0.5174881219863892, 0.3406525254249573, -0.556283175945282, -0.39607954025268555, -0.033102601766586304, -1.4590020179748535, -0.26161280274391174, 0.8773587942123413, -0.4157557487487793, -0.7045726180076599, 0.25322186946868896, -0.4776557385921478, 0.44221052527427673, -0.2878977358341217, 0.07107460498809814, 0.2656078636646271, -0.03255108743906021, -0.24769434332847595, -0.412016361951828, 0.5651658177375793, 0.2132648378610611, -0.7891977429389954, -0.7067150473594666, 0.5150325298309326, 0.19476817548274994, 0.4754641652107239, 0.7524860501289368, -0.09726903587579727, 0.2732963263988495, -0.059115033596754074, 0.3330657184123993, -0.19902336597442627, -0.17191147804260254, -0.5442973375320435, -0.056917011737823486, -0.18999533355236053, -0.458442747592926 ]
shi-labs/oneformer_ade20k_swin_large
shi-labs
"2023-01-19T14:36:03Z"
29,810
7
transformers
[ "transformers", "pytorch", "oneformer", "vision", "image-segmentation", "universal-image-segmentation", "dataset:scene_parse_150", "arxiv:2211.06220", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
image-segmentation
"2022-11-15T19:00:56Z"
--- license: mit tags: - vision - image-segmentation - universal-image-segmentation datasets: - scene_parse_150 widget: - src: https://praeclarumjj3.github.io/files/ade20k.jpeg example_title: House - src: https://praeclarumjj3.github.io/files/demo_2.jpg example_title: Airplane - src: https://praeclarumjj3.github.io/files/coco.jpeg example_title: Person --- # OneFormer OneFormer model trained on the ADE20k dataset (large-sized version, Swin backbone). It was introduced in the paper [OneFormer: One Transformer to Rule Universal Image Segmentation](https://arxiv.org/abs/2211.06220) by Jain et al. and first released in [this repository](https://github.com/SHI-Labs/OneFormer). ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/oneformer_teaser.png) ## Model description OneFormer is the first multi-task universal image segmentation framework. It needs to be trained only once with a single universal architecture, a single model, and on a single dataset, to outperform existing specialized models across semantic, instance, and panoptic segmentation tasks. OneFormer uses a task token to condition the model on the task in focus, making the architecture task-guided for training, and task-dynamic for inference, all with a single model. ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/oneformer_architecture.png) ## Intended uses & limitations You can use this particular checkpoint for semantic, instance and panoptic segmentation. See the [model hub](https://huggingface.co/models?search=oneformer) to look for other fine-tuned versions on a different dataset. ### How to use Here is how to use this model: ```python from transformers import OneFormerProcessor, OneFormerForUniversalSegmentation from PIL import Image import requests url = "https://huggingface.co/datasets/shi-labs/oneformer_demo/blob/main/ade20k.jpeg" image = Image.open(requests.get(url, stream=True).raw) # Loading a single model for all three tasks processor = OneFormerProcessor.from_pretrained("shi-labs/oneformer_ade20k_swin_large") model = OneFormerForUniversalSegmentation.from_pretrained("shi-labs/oneformer_ade20k_swin_large") # Semantic Segmentation semantic_inputs = processor(images=image, task_inputs=["semantic"], return_tensors="pt") semantic_outputs = model(**semantic_inputs) # pass through image_processor for postprocessing predicted_semantic_map = processor.post_process_semantic_segmentation(outputs, target_sizes=[image.size[::-1]])[0] # Instance Segmentation instance_inputs = processor(images=image, task_inputs=["instance"], return_tensors="pt") instance_outputs = model(**instance_inputs) # pass through image_processor for postprocessing predicted_instance_map = processor.post_process_instance_segmentation(outputs, target_sizes=[image.size[::-1]])[0]["segmentation"] # Panoptic Segmentation panoptic_inputs = processor(images=image, task_inputs=["panoptic"], return_tensors="pt") panoptic_outputs = model(**panoptic_inputs) # pass through image_processor for postprocessing predicted_semantic_map = processor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]["segmentation"] ``` For more examples, please refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/oneformer). ### Citation ```bibtex @article{jain2022oneformer, title={{OneFormer: One Transformer to Rule Universal Image Segmentation}}, author={Jitesh Jain and Jiachen Li and MangTik Chiu and Ali Hassani and Nikita Orlov and Humphrey Shi}, journal={arXiv}, year={2022} } ```
[ -0.6639650464057922, -0.7634779810905457, 0.3390183448791504, 0.13947704434394836, -0.29145655035972595, -0.6395962834358215, 0.28841927647590637, -0.26777783036231995, 0.04069308936595917, 0.686930775642395, -1.0322462320327759, -0.6119535565376282, -0.626740038394928, -0.25303709506988525, -0.38381680846214294, 0.7639694213867188, -0.03605371341109276, 0.283712774515152, -0.2711679935455322, -0.46484285593032837, 0.03090151771903038, -0.3028471767902374, -0.6315963268280029, -0.23412244021892548, 0.19377057254314423, 0.15764771401882172, 0.5437480807304382, 0.7318046689033508, 0.6520542502403259, 0.3936808109283447, -0.1226155087351799, -0.25610193610191345, -0.19419409334659576, -0.17352159321308136, 0.14166860282421112, -0.3436204493045807, -0.3552727997303009, 0.13675808906555176, 0.7768158316612244, 0.6890739798545837, 0.1017678901553154, 0.34179773926734924, -0.3711548149585724, 0.6566720604896545, -0.5661436319351196, -0.06517443805932999, -0.329489529132843, 0.3440966308116913, -0.2273980975151062, 0.29663386940956116, -0.11150835454463959, -0.2970832288265228, 0.26269760727882385, -0.8561508059501648, 0.4347872734069824, -0.3086218237876892, 1.2902445793151855, 0.5218810439109802, -0.1574602872133255, 0.09778426587581635, -0.4331270456314087, 0.6407496929168701, -0.7312358021736145, 0.27596843242645264, 0.22817352414131165, 0.4781193137168884, 0.1913454383611679, -1.0235986709594727, -0.6270811557769775, 0.10338278859853745, -0.16757506132125854, 0.103986956179142, -0.4248660206794739, 0.04819762706756592, 0.3712301552295685, 0.2530190944671631, -0.5738763809204102, 0.11028559505939484, -0.7449697256088257, -0.10130679607391357, 0.4209030866622925, 0.04846693202853203, 0.2610597014427185, -0.2862376570701599, -0.7314134240150452, -0.34190279245376587, -0.33661553263664246, 0.32388409972190857, 0.1423249989748001, -0.08800220489501953, -0.18010658025741577, 0.22979401051998138, 0.10005049407482147, 0.7395832538604736, 0.4198462963104248, -0.3114570379257202, 0.2270178645849228, -0.04047473520040512, -0.27991244196891785, -0.006521613337099552, 0.919020414352417, 0.13432154059410095, 0.034366101026535034, 0.07565978914499283, -0.008821908384561539, 0.20699281990528107, 0.4408639371395111, -1.076852798461914, -0.2252267301082611, 0.16424454748630524, -0.47707900404930115, -0.2739138603210449, 0.44779837131500244, -0.6419112086296082, -0.05437149479985237, -0.03228703886270523, 0.6297580003738403, -0.6192859411239624, -0.18310770392417908, 0.05686308071017265, -0.17246083915233612, 0.6252942085266113, 0.1920662671327591, -0.6528591513633728, 0.5515350103378296, 0.4652957618236542, 0.7663344740867615, -0.163758784532547, -0.5221953392028809, -0.06397277861833572, -0.29242339730262756, -0.2712339162826538, 0.9887387156486511, -0.23318630456924438, -0.12118694931268692, -0.3638276755809784, 0.3544104993343353, -0.504719614982605, -0.5454608798027039, 0.6139819622039795, -0.4618682563304901, 0.5440049171447754, -0.0818721354007721, -0.4537101686000824, -0.6939232349395752, 0.21477001905441284, -0.6478886604309082, 0.7550824880599976, 0.4455491304397583, -0.8347342610359192, 0.5004593133926392, -1.0168062448501587, -0.2608221769332886, 0.007455349899828434, -0.27195456624031067, -0.8178609013557434, -0.25330251455307007, 0.37171223759651184, 0.37360838055610657, -0.12719492614269257, -0.06612908840179443, -0.26254406571388245, -0.03189142420887947, -0.07911374419927597, -0.25675076246261597, 1.0197465419769287, 0.04744137078523636, -0.31353044509887695, 0.5255557298660278, -0.786044180393219, 0.07666150480508804, 0.5471736788749695, 0.09550479799509048, 0.12338744103908539, -0.33907991647720337, 0.34601694345474243, 0.4307123124599457, 0.04220232740044594, -0.89761883020401, 0.2757178544998169, -0.31871968507766724, 0.5086045265197754, 0.6223352551460266, 0.12878474593162537, 0.5680545568466187, -0.2279086858034134, 0.5660257339477539, 0.272131085395813, 0.5110202431678772, -0.48560693860054016, -0.2744729816913605, -0.7532436847686768, -0.47319960594177246, 0.19350239634513855, 0.5217658281326294, -0.09979718923568726, 0.5501079559326172, -0.04604984447360039, -0.6944316625595093, -0.6425568461418152, -0.133474662899971, 0.2586141526699066, 0.6931585669517517, 0.3985691964626312, -0.4384021759033203, -0.7363786101341248, -1.0934830904006958, 0.5244229435920715, 0.18024985492229462, 0.03836941719055176, 0.04120689257979393, 0.5381700396537781, -0.37656229734420776, 1.0095609426498413, -0.6064267158508301, -0.3561215400695801, -0.21902668476104736, -0.010867546312510967, 0.14484338462352753, 0.8575275540351868, 0.7143190503120422, -0.8924531936645508, -0.25993743538856506, -0.3612237870693207, -0.8321372866630554, 0.2829277813434601, -0.11343874782323837, -0.3302483558654785, 0.2570492625236511, 0.23498183488845825, -0.5591402053833008, 0.6836144924163818, 0.34390634298324585, -0.42306649684906006, 0.7801980376243591, -0.07802749425172806, 0.11752354353666306, -0.9467970132827759, 0.14372539520263672, 0.21609094738960266, -0.17723867297172546, -0.5278899669647217, 0.009716101922094822, -0.017635837197303772, -0.2465633749961853, -0.5076716542243958, 0.5620353817939758, -0.15961556136608124, 0.031004196032881737, -0.19142509996891022, -0.2902582287788391, 0.14984889328479767, 0.7539288997650146, 0.033299002796411514, 0.4928770065307617, 1.0785892009735107, -0.6294006109237671, 0.16950616240501404, 0.7574834823608398, -0.3268972337245941, 0.45120176672935486, -1.0302324295043945, 0.044205084443092346, -0.36902475357055664, 0.24996620416641235, -1.136042594909668, -0.24373331665992737, 0.3054550588130951, -0.20201869308948517, 0.3394753336906433, -0.24278181791305542, -0.17597617208957672, -0.5273222327232361, -0.21505104005336761, 0.43867817521095276, 0.36216646432876587, -0.7294741868972778, 0.6031262874603271, 0.47918498516082764, 0.0869993343949318, -0.20362935960292816, -0.7128769755363464, -0.4836311340332031, -0.1232878714799881, -1.1502444744110107, 0.469605416059494, 0.16950666904449463, 0.09979791939258575, 0.13434851169586182, -0.5763174295425415, -0.3392520546913147, -0.18040426075458527, 0.5417042970657349, 0.5547516345977783, -0.3525068163871765, -0.26747187972068787, 0.0030701332725584507, -0.3519737720489502, 0.09189718216657639, -0.2569415867328644, 0.49610182642936707, -0.1625608652830124, -0.47723332047462463, -0.697950541973114, 0.29025939106941223, 0.7076308727264404, -0.3936687409877777, 0.4999562203884125, 0.9924793839454651, -0.4691520929336548, 0.14558742940425873, -0.7309685945510864, -0.22168312966823578, -0.428824245929718, 0.473341703414917, -0.5173179507255554, -0.5041363835334778, 0.6906984448432922, -0.054883260279893875, 0.15826576948165894, 0.8917835354804993, 0.07921196520328522, 0.23359300196170807, 1.3061293363571167, 0.6757420301437378, 0.1498868763446808, 0.7643842697143555, -0.8605642318725586, -0.14448736608028412, -0.8560157418251038, -0.22416572272777557, -0.23652078211307526, -0.2790987491607666, -0.34437084197998047, -0.325918972492218, 0.6755877733230591, 0.3063838481903076, -0.4551186263561249, 0.5163083076477051, -0.8361546397209167, 0.27309492230415344, 0.6276931166648865, 0.32134363055229187, -0.18693013489246368, 0.0929454043507576, -0.3348836600780487, 0.09829461574554443, -0.9941558241844177, -0.6074854135513306, 0.7058703303337097, 0.487766295671463, 0.8562025427818298, -0.5635693669319153, 0.42724451422691345, -0.29678288102149963, 0.04344897344708443, -0.7940665483474731, 0.5367241501808167, -0.44642502069473267, -0.5766708850860596, -0.3244466185569763, -0.06493522226810455, -1.0119985342025757, 0.33928847312927246, -0.2039182186126709, -0.9444368481636047, 0.28722989559173584, -0.0033683613874018192, -0.48242101073265076, 0.5830481052398682, -0.6636099219322205, 1.558284878730774, -0.1781209409236908, -0.2519642114639282, 0.07285905629396439, -0.8319728970527649, 0.2160513699054718, 0.18635718524456024, -0.18450212478637695, -0.06660822033882141, 0.3452359735965729, 1.236197829246521, -0.5324644446372986, 0.704782247543335, -0.348672091960907, 0.2719436585903168, 0.44325482845306396, -0.021894551813602448, 0.20090438425540924, -0.08567026257514954, -0.05885724350810051, 0.29436764121055603, 0.5380667448043823, -0.5605736970901489, -0.32709571719169617, 0.4464055299758911, -0.9227070808410645, -0.41029271483421326, -0.20365390181541443, -0.3421284556388855, 0.17130641639232635, 0.2516876757144928, 0.8109983205795288, 0.6411631107330322, -0.40104690194129944, 0.013905911706387997, 0.5515761971473694, 0.010913093574345112, 0.3051482141017914, 0.14534293115139008, -0.13943904638290405, -0.3781158924102783, 0.45193102955818176, 0.01655188389122486, 0.0868641808629036, 0.25639837980270386, 0.29134494066238403, -0.27566832304000854, -0.11618129163980484, -0.7501932382583618, 0.205447718501091, -0.7761983275413513, -0.22911357879638672, -0.8270378708839417, -0.3890239894390106, -0.6174002885818481, -0.23135444521903992, -0.8529362082481384, -0.5055646896362305, -0.1658492386341095, 0.213145449757576, 0.21941153705120087, 0.6511592268943787, 0.06697037816047668, 0.462024450302124, -0.7346487641334534, 0.31953972578048706, 0.39885541796684265, 0.3257363736629486, -0.18226517736911774, -0.6361950635910034, 0.054560281336307526, -0.17415133118629456, -0.5845661759376526, -0.8453168869018555, 0.21534846723079681, 0.052977412939071655, 0.8338137269020081, 0.7697513699531555, -0.40189388394355774, 0.7834041118621826, -0.2604053020477295, 0.6205177307128906, 0.34023693203926086, -0.8169150948524475, 0.6864532232284546, 0.08754494786262512, 0.7095506191253662, 0.4847787022590637, 0.6326573491096497, -0.4808698892593384, 0.21536073088645935, -0.6707159280776978, -0.9336251020431519, 1.0508382320404053, -0.059646785259246826, -0.2459714412689209, 0.2830432653427124, 0.1957113891839981, 0.3636232316493988, -0.09460867196321487, -0.4956726133823395, -0.5584726333618164, -0.5445624589920044, -0.04151607304811478, 0.26387426257133484, -0.03457998111844063, -0.19132013618946075, -0.563850462436676, 0.7259970903396606, 0.012685713358223438, 0.4229499399662018, 0.5509430766105652, -0.14288339018821716, -0.42177915573120117, 0.06159280985593796, 0.4180297255516052, 0.7820818424224854, -0.12274838238954544, -0.13632576167583466, 0.08622930198907852, -0.49585607647895813, -0.09587712585926056, 0.4751007556915283, -0.3605564534664154, -0.0979253351688385, 0.37021684646606445, 1.2697464227676392, 0.09144535660743713, -0.3031895160675049, 0.44806331396102905, 0.03276093304157257, -0.5495126247406006, -0.36495542526245117, 0.0037473621778190136, -0.20961685478687286, 0.2067905217409134, 0.4932505786418915, 0.4868074953556061, 0.03574211895465851, -0.1141907274723053, 0.297054260969162, 0.4419194757938385, -0.553719162940979, -0.3696954846382141, 0.7403801679611206, -0.18266183137893677, -0.04675779491662979, 0.5694010853767395, -0.417915403842926, -0.9168804287910461, 0.8680983185768127, 0.5494861006736755, 0.9691156148910522, -0.0967116728425026, 0.20147240161895752, 0.8166274428367615, 0.13039322197437286, -0.042934440076351166, -0.09993341565132141, -0.0077397990971803665, -0.7285873889923096, -0.2847973704338074, -0.7471511363983154, -0.18522237241268158, 0.14771658182144165, -0.602436363697052, 0.17807215452194214, -0.4236864149570465, -0.12441504746675491, 0.41618651151657104, -0.05213173106312752, -0.8789206743240356, 0.1522485911846161, 0.249161496758461, 0.9171856641769409, -0.6358737945556641, 0.5182670950889587, 1.3075299263000488, -0.4100498855113983, -0.7438284754753113, -0.33785709738731384, 0.017702030017971992, -0.7724233865737915, 0.43462058901786804, 0.3958142399787903, 0.20211604237556458, -0.003893549321219325, -0.7591632008552551, -0.813972532749176, 1.1220730543136597, 0.07906384766101837, -0.25804394483566284, -0.08886191248893738, -0.07008765637874603, 0.1611793041229248, -0.6119412183761597, 0.26105210185050964, 0.40516194701194763, 0.5812002420425415, 0.44519323110580444, -0.6930105686187744, 0.2516692280769348, -0.24075926840305328, -0.0776258260011673, 0.2987174987792969, -0.4335325360298157, 1.0214263200759888, -0.3978882431983948, -0.3422633409500122, 0.12899143993854523, 0.4022429585456848, 0.188186377286911, 0.1262839287519455, 0.9056689143180847, 0.8770800828933716, 0.39332452416419983, -0.046878837049007416, 0.8652931451797485, -0.27940818667411804, 0.45493587851524353, 0.7875497937202454, 0.1908680945634842, 0.3992259204387665, 0.35455453395843506, -0.3418404161930084, 0.5842896699905396, 0.4649040997028351, -0.43839138746261597, 0.3529418706893921, 0.012091096490621567, -0.0029601729474961758, -0.3741663992404938, 0.15795938670635223, -0.31778496503829956, 0.855300784111023, 0.12276216596364975, -0.2855765223503113, -0.5238969922065735, 0.3021714985370636, -0.07432754337787628, -0.18954700231552124, -0.36137765645980835, 0.7537165284156799, -0.281546026468277, -0.5757514238357544, 0.5968526005744934, 0.07987236231565475, 0.8857591152191162, -0.9003714323043823, -0.03742383047938347, 0.06602372974157333, 0.24307648837566376, -0.3339901268482208, -0.5874140858650208, 0.34944772720336914, -0.3504256308078766, -0.26868337392807007, -0.019350584596395493, 0.8826547265052795, -0.2834601104259491, -0.79776531457901, 0.07050621509552002, 0.36263030767440796, 0.14854641258716583, -0.4792034924030304, -0.9660769104957581, 0.1400931477546692, -0.1450766623020172, -0.6078606247901917, 0.08909498155117035, 0.14988522231578827, 0.05122799798846245, 0.5356456637382507, 0.4930228292942047, -0.2559834122657776, 0.1703452616930008, -0.02763613499701023, 1.0772700309753418, -0.593071460723877, -0.47482630610466003, -0.5686889290809631, 0.4952831566333771, 0.010091717354953289, -0.6374430060386658, 0.6212093234062195, 0.6620437502861023, 0.9819539785385132, -0.19956602156162262, 0.5871198773384094, -0.34526780247688293, 0.18083995580673218, -0.13407938182353973, 0.576707661151886, -0.5617847442626953, -0.3214440643787384, -0.26662716269493103, -0.7113838195800781, -0.1599237620830536, 1.0708562135696411, -0.4285261034965515, 0.07340523600578308, 0.6635627746582031, 0.9633846282958984, -0.3605886995792389, 0.07630249112844467, 0.165949746966362, 0.013383638113737106, 0.02231566235423088, 0.3031178116798401, 0.2845625877380371, -0.8605596423149109, 0.4949623644351959, -0.8490284085273743, -0.3110126554965973, 0.21342253684997559, -0.39807796478271484, -0.5896217823028564, -0.6804144382476807, -0.5634145736694336, -0.2995133101940155, -0.19523409008979797, 0.9524503946304321, 1.3607507944107056, -0.9504323601722717, -0.13537059724330902, -0.22410549223423004, 0.023885032162070274, -0.420587420463562, -0.2876396179199219, 0.4950445592403412, -0.2682196795940399, -0.7573896050453186, 0.13928163051605225, 0.25113263726234436, 0.09986618906259537, -0.26306092739105225, -0.058857887983322144, -0.3907190263271332, -0.287966787815094, 0.4979412257671356, 0.434541791677475, -0.5385547876358032, 0.0779595747590065, 0.06526787579059601, -0.08223766833543777, 0.4030115306377411, 0.6527650952339172, -0.722760021686554, 0.412401020526886, 0.3220656216144562, 0.3641180992126465, 0.957537829875946, 0.13770738244056702, 0.0956338420510292, -0.4242839813232422, 0.3014441132545471, 0.18745481967926025, 0.47466301918029785, 0.3107024133205414, -0.2577175199985504, 0.4561610817909241, 0.22770416736602783, -0.6087939143180847, -0.37295910716056824, 0.1783241480588913, -1.3294801712036133, -0.3820928931236267, 0.9065447449684143, -0.24253138899803162, -0.5951296091079712, 0.3079257905483246, -0.37038135528564453, 0.5146945714950562, -0.10891953855752945, 0.423846960067749, 0.16051186621189117, -0.2506554424762726, -0.2758668065071106, -0.10125507414340973, 0.22500476241111755, 0.23573008179664612, -0.7717429995536804, -0.4858057200908661, 0.2546406686306, 0.6115314960479736, 0.49550285935401917, 0.5457378029823303, -0.4173743724822998, 0.3709580600261688, 0.38202017545700073, 0.4595550298690796, -0.3433310091495514, -0.04106364771723747, -0.36463186144828796, 0.3238563537597656, -0.4249098002910614, -0.6570199131965637 ]
BM-K/KoSimCSE-roberta
BM-K
"2023-03-24T00:48:01Z"
29,763
4
transformers
[ "transformers", "pytorch", "safetensors", "roberta", "feature-extraction", "korean", "ko", "endpoints_compatible", "region:us" ]
feature-extraction
"2022-04-05T13:59:27Z"
--- language: ko tags: - korean --- https://github.com/BM-K/Sentence-Embedding-is-all-you-need # Korean-Sentence-Embedding 🍭 Korean sentence embedding repository. You can download the pre-trained models and inference right away, also it provides environments where individuals can train models. ## Quick tour ```python import torch from transformers import AutoModel, AutoTokenizer def cal_score(a, b): if len(a.shape) == 1: a = a.unsqueeze(0) if len(b.shape) == 1: b = b.unsqueeze(0) a_norm = a / a.norm(dim=1)[:, None] b_norm = b / b.norm(dim=1)[:, None] return torch.mm(a_norm, b_norm.transpose(0, 1)) * 100 model = AutoModel.from_pretrained('BM-K/KoSimCSE-roberta') tokenizer = AutoTokenizer.from_pretrained('BM-K/KoSimCSE-roberta') sentences = ['치타가 들판을 가로 질러 먹이를 쫓는다.', '치타 한 마리가 먹이 뒤에서 달리고 있다.', '원숭이 한 마리가 드럼을 연주한다.'] inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt") embeddings, _ = model(**inputs, return_dict=False) score01 = cal_score(embeddings[0][0], embeddings[1][0]) score02 = cal_score(embeddings[0][0], embeddings[2][0]) ``` ## Performance - Semantic Textual Similarity test set results <br> | Model | AVG | Cosine Pearson | Cosine Spearman | Euclidean Pearson | Euclidean Spearman | Manhattan Pearson | Manhattan Spearman | Dot Pearson | Dot Spearman | |------------------------|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| | KoSBERT<sup>†</sup><sub>SKT</sub> | 77.40 | 78.81 | 78.47 | 77.68 | 77.78 | 77.71 | 77.83 | 75.75 | 75.22 | | KoSBERT | 80.39 | 82.13 | 82.25 | 80.67 | 80.75 | 80.69 | 80.78 | 77.96 | 77.90 | | KoSRoBERTa | 81.64 | 81.20 | 82.20 | 81.79 | 82.34 | 81.59 | 82.20 | 80.62 | 81.25 | | | | | | | | | | | | KoSentenceBART | 77.14 | 79.71 | 78.74 | 78.42 | 78.02 | 78.40 | 78.00 | 74.24 | 72.15 | | KoSentenceT5 | 77.83 | 80.87 | 79.74 | 80.24 | 79.36 | 80.19 | 79.27 | 72.81 | 70.17 | | | | | | | | | | | | KoSimCSE-BERT<sup>†</sup><sub>SKT</sub> | 81.32 | 82.12 | 82.56 | 81.84 | 81.63 | 81.99 | 81.74 | 79.55 | 79.19 | | KoSimCSE-BERT | 83.37 | 83.22 | 83.58 | 83.24 | 83.60 | 83.15 | 83.54 | 83.13 | 83.49 | | KoSimCSE-RoBERTa | 83.65 | 83.60 | 83.77 | 83.54 | 83.76 | 83.55 | 83.77 | 83.55 | 83.64 | | | | | | | | | | | | | KoSimCSE-BERT-multitask | 85.71 | 85.29 | 86.02 | 85.63 | 86.01 | 85.57 | 85.97 | 85.26 | 85.93 | | KoSimCSE-RoBERTa-multitask | 85.77 | 85.08 | 86.12 | 85.84 | 86.12 | 85.83 | 86.12 | 85.03 | 85.99 |
[ -0.3048855662345886, -0.680774986743927, 0.5130178332328796, 0.3249411880970001, -0.3963349163532257, 0.07602129131555557, -0.30000704526901245, 0.026234257966279984, 0.36359742283821106, 0.41140440106391907, -0.7319150567054749, -0.8121997714042664, -0.6954377293586731, 0.09295979887247086, 0.07794124633073807, 0.7723686099052429, -0.2202906459569931, 0.12547244131565094, 0.10805810242891312, -0.14533770084381104, -0.625205934047699, -0.18133330345153809, -0.34649625420570374, -0.34095320105552673, 0.12249455600976944, 0.5577601194381714, 0.746686577796936, 0.37842094898223877, 0.29418766498565674, 0.4758615493774414, 0.06779465079307556, 0.0015884311869740486, -0.1695777028799057, 0.22997251152992249, 0.08990244567394257, -0.5870749354362488, -0.34370434284210205, 0.017398105934262276, 0.4941340684890747, 0.4875846207141876, 0.010716495104134083, 0.15308736264705658, 0.08076199144124985, 0.7643227577209473, -0.44558870792388916, 0.18785828351974487, -0.3026389181613922, 0.34249478578567505, 0.05927308276295662, -0.22632001340389252, -0.4205411970615387, -0.5078976154327393, 0.17539085447788239, -0.720598042011261, 0.014870114624500275, 0.05576977878808975, 1.5249923467636108, 0.26886188983917236, -0.69478839635849, -0.5149428248405457, -0.35415640473365784, 1.0427525043487549, -0.9296777248382568, 0.46856987476348877, 0.31065893173217773, 0.1601836234331131, -0.17629295587539673, -0.7952096462249756, -0.5605539083480835, -0.04276150092482567, -0.37941429018974304, 0.6480481624603271, 0.0030258921906352043, 0.05591597035527229, 0.29482027888298035, 0.36698710918426514, -0.7931506037712097, -0.23870989680290222, -0.36044996976852417, -0.2244011014699936, 0.7347438931465149, 0.18707865476608276, 0.5141076445579529, -0.7590798735618591, -0.5427757501602173, -0.27564138174057007, -0.12663094699382782, 0.10951969772577286, 0.36990970373153687, 0.08428248018026352, -0.1212238222360611, 0.8572170734405518, -0.2974512279033661, 0.4502631723880768, 0.23530156910419464, -0.11289555579423904, 0.7735565304756165, -0.5271594524383545, -0.4149356782436371, 0.1067095622420311, 1.0179473161697388, 0.523047685623169, 0.25455939769744873, -0.0321664959192276, -0.07949577271938324, 0.1353263407945633, 0.020764673128724098, -0.8965052366256714, -0.6574597358703613, 0.3157522976398468, -0.4306018352508545, -0.2045171707868576, 0.30785757303237915, -0.83717280626297, 0.17664887011051178, -0.3635746240615845, 0.9282370805740356, -0.5465229153633118, -0.23163995146751404, 0.23606042563915253, -0.2380588799715042, 0.2919543385505676, -0.030287370085716248, -0.6680259108543396, 0.17593662440776825, 0.25696295499801636, 0.9213482737541199, 0.06939104199409485, -0.2557785212993622, 0.039018239825963974, -0.03778020665049553, -0.46764659881591797, 0.5293057560920715, -0.0053706117905676365, -0.3534356355667114, 0.0011465626303106546, 0.3391669988632202, -0.44553351402282715, -0.1333356499671936, 0.6664026379585266, -0.19882062077522278, 0.4480908513069153, -0.23720882833003998, -0.9224939346313477, -0.22736039757728577, 0.33126285672187805, -0.6015515327453613, 1.5207818746566772, 0.1634364128112793, -1.0094338655471802, 0.5120605230331421, -0.7100656628608704, -0.25779399275779724, -0.07632188498973846, 0.014684761874377728, -0.7734161615371704, -0.008266574703156948, 0.4409037232398987, 0.8212611079216003, 0.23972199857234955, 0.1179594025015831, -0.2708194851875305, -0.3595896065235138, -0.0020662136375904083, -0.1692580282688141, 1.0730929374694824, 0.23734861612319946, -0.4422256052494049, 0.18097524344921112, -1.0868027210235596, 0.5634527206420898, 0.24042890965938568, -0.29325637221336365, -0.3957524597644806, -0.5439663529396057, 0.006717047654092312, 0.4665958881378174, 0.20075012743473053, -0.6399235725402832, 0.16262191534042358, -0.6779345273971558, 0.4990057945251465, 0.8347411155700684, 0.23342947661876678, 0.5068473219871521, -0.3723834455013275, 0.6328905820846558, 0.1615469753742218, 0.051657628268003464, -0.11433662474155426, -0.4570486843585968, -0.6122414469718933, -0.6311754584312439, 0.41072705388069153, 0.7530953288078308, -0.8642821907997131, 0.9766114354133606, -0.28945818543434143, -0.6630995273590088, -0.8065925240516663, 0.04208476096391678, 0.28595560789108276, 0.34568190574645996, 0.283693790435791, 0.2748532295227051, -0.8447639346122742, -0.9923455119132996, -0.3905913829803467, 0.1187572330236435, 0.06599144637584686, 0.5608274936676025, 0.9679058194160461, -0.024631639942526817, 0.9653972387313843, -0.9026933908462524, -0.2637692987918854, -0.4336996376514435, -0.10802893340587616, 0.6891478896141052, 0.6178532838821411, 0.6888715028762817, -0.7597472071647644, -1.2444401979446411, -0.0467812716960907, -0.8643155694007874, -0.14043894410133362, -0.032561834901571274, -0.23664012551307678, 0.3210546672344208, 0.5082988142967224, -0.9535500407218933, 0.896519660949707, 0.6513575911521912, -0.8905459046363831, 1.0007253885269165, -0.38233816623687744, 0.38854312896728516, -1.7186312675476074, 0.07305958122015, -0.2800503075122833, -0.37052348256111145, -0.6293608546257019, -0.031478751450777054, 0.1600969284772873, 0.01761755160987377, -0.2916702628135681, 0.7743761539459229, -0.5313555002212524, 0.10824523121118546, -0.06172572821378708, 0.17240804433822632, 0.11073978245258331, 0.7108254432678223, -0.010263577103614807, 0.756807804107666, 0.5430544018745422, -0.546205461025238, 0.29382532835006714, 0.3490036725997925, -0.7211986780166626, 0.3940224051475525, -0.7207350730895996, -0.07273560017347336, 0.1545257270336151, 0.3736236095428467, -1.5854133367538452, -0.2999885082244873, 0.5203861594200134, -0.7386808395385742, 0.06942854076623917, -0.24182093143463135, -0.6405258178710938, -0.7124432921409607, -0.6096505522727966, 0.14995114505290985, 0.5726028084754944, -0.406131386756897, 0.4855479300022125, 0.08493299037218094, -0.22708271443843842, -0.6608510613441467, -0.7507063746452332, -0.27760645747184753, -0.25471821427345276, -0.6589100360870361, 0.48906370997428894, -0.0799635797739029, 0.009728852659463882, 0.30258408188819885, -0.17104455828666687, -0.12329269200563431, 0.07336605340242386, 0.20029035210609436, 0.5081807971000671, -0.37582454085350037, 0.025022555142641068, 0.1931711584329605, -0.2640969753265381, -0.06072436273097992, -0.17073769867420197, 0.8922606706619263, -0.09798160195350647, -0.2658608555793762, -0.7562773823738098, 0.13258711993694305, 0.4819515645503998, 0.11718852818012238, 0.9274360537528992, 0.9006866216659546, -0.38492533564567566, -0.025569207966327667, -0.4332655966281891, -0.0988762304186821, -0.5518674254417419, 0.5018648505210876, -0.7107751369476318, -0.946058988571167, 0.8225311040878296, -0.1196238175034523, -0.177747905254364, 0.8337494134902954, 0.6251011490821838, -0.20740164816379547, 1.253151774406433, 0.3100516200065613, 0.09576377272605896, 0.3163661062717438, -0.6396089196205139, 0.30901670455932617, -0.8707430362701416, -0.3354605436325073, -0.43113550543785095, -0.37654581665992737, -0.7570297718048096, 0.01868930272758007, 0.22429297864437103, 0.24384979903697968, -0.5907732248306274, 0.5130038857460022, -0.7379717230796814, 0.525951087474823, 0.6079522967338562, 0.35204237699508667, -0.03589830547571182, -0.2935734689235687, -0.6843715310096741, -0.36183640360832214, -0.7957927584648132, -0.3577248156070709, 1.2513577938079834, 0.21628804504871368, 0.6423923373222351, 0.022747961804270744, 0.8240429759025574, 0.2291051745414734, -0.140630304813385, -0.7889288067817688, 0.4737461507320404, 0.0008913715719245374, -0.5981166958808899, -0.36570820212364197, -0.4703966975212097, -1.01544988155365, 0.4815897047519684, -0.19596299529075623, -1.0116477012634277, -0.03080928884446621, -0.1720559448003769, -0.4914899468421936, 0.38679009675979614, -0.8148006200790405, 1.0969550609588623, 0.043191660195589066, -0.07113185524940491, 0.09100719541311264, -0.6868929266929626, 0.3025968670845032, 0.19208508729934692, 0.11614001542329788, -0.010981590487062931, 0.00550819281488657, 0.8626376390457153, -0.6746562719345093, 0.6089327335357666, -0.32272934913635254, 0.20651637017726898, 0.3249562680721283, 0.055777374655008316, 0.631726086139679, 0.2704664170742035, 0.1492435336112976, -0.2238854467868805, 0.15148644149303436, -0.5311611890792847, -0.599717378616333, 0.9785752892494202, -1.047627329826355, -0.43773189187049866, -0.8002991676330566, -0.5619728565216064, 0.04731397703289986, 0.5062709450721741, 0.5945183634757996, 0.23275087773799896, 0.10376600921154022, 0.4571584165096283, 0.6630470156669617, -0.33924323320388794, 0.6173328757286072, 0.24688580632209778, -0.22108106315135956, -0.8342719674110413, 0.6766327023506165, 0.21130207180976868, 0.23078259825706482, 0.20952612161636353, 0.5103271007537842, -0.6853713989257812, -0.19502191245555878, -0.30833980441093445, 0.21124184131622314, -0.720964252948761, -0.2310306876897812, -0.7565086483955383, -0.4067455530166626, -0.769534707069397, -0.364705353975296, -0.4586139917373657, -0.603642463684082, -0.11852312833070755, -0.3684975802898407, 0.30010443925857544, 0.687709391117096, -0.035850878804922104, 0.41341662406921387, -0.7037224173545837, 0.1838950663805008, 0.02458878792822361, 0.19268782436847687, -0.01680981181561947, -0.7143860459327698, -0.16157396137714386, -0.06432894617319107, -0.31015586853027344, -1.0478826761245728, 0.6329730749130249, 0.06483656167984009, 0.4991706907749176, 0.37721535563468933, 0.11028263717889786, 0.8435875773429871, -0.3574751317501068, 0.9928605556488037, 0.15153728425502777, -1.046841025352478, 0.6009204983711243, -0.24491336941719055, 0.4484787881374359, 0.5762655735015869, 0.49023133516311646, -0.6727867722511292, -0.23404039442539215, -0.9303523302078247, -1.1038089990615845, 1.0641289949417114, 0.5312979221343994, 0.08615189790725708, 0.08745129406452179, 0.2551485002040863, -0.09652610868215561, 0.23687008023262024, -0.9494977593421936, -0.5822837948799133, -0.5895239114761353, -0.5295253992080688, 0.013123346492648125, -0.14320379495620728, 0.22549325227737427, -0.515462338924408, 0.9763118624687195, 0.15376946330070496, 0.4099383056163788, 0.3799171447753906, -0.3515869975090027, 0.25237131118774414, 0.12441885471343994, 0.7602707147598267, 0.6541497707366943, -0.26460176706314087, -0.09723587334156036, 0.3292950689792633, -0.6454910635948181, 0.2649744153022766, -0.12078332155942917, -0.2522623538970947, 0.3120758533477783, 0.35199132561683655, 0.7065197825431824, 0.5458788871765137, -0.4053442180156708, 0.6270869970321655, 0.16548174619674683, -0.5945912599563599, -0.5906374454498291, -0.24828557670116425, 0.10610859096050262, 0.3170979917049408, 0.21854963898658752, -0.05528257414698601, -0.22529804706573486, -0.4757685661315918, 0.34465450048446655, 0.16126713156700134, -0.568564236164093, -0.21322162449359894, 0.5466139912605286, -0.1586763560771942, -0.27853691577911377, 0.7324119806289673, -0.30507808923721313, -1.0762648582458496, 0.7810641527175903, 0.6005091071128845, 0.8367589712142944, -0.48756328225135803, 0.3369482159614563, 0.9360969066619873, 0.13840317726135254, -0.20105965435504913, 0.6077191829681396, 0.2338065654039383, -0.7739716172218323, -0.23503316938877106, -0.5012388825416565, 0.17130261659622192, 0.2529086172580719, -0.7106149196624756, 0.22673295438289642, -0.2707538902759552, -0.23279187083244324, -0.15165145695209503, 0.4251777231693268, -0.7237613797187805, 0.3113487660884857, -0.35776376724243164, 0.924595296382904, -1.086153507232666, 0.885558009147644, 0.8010149002075195, -0.535179078578949, -0.9879530668258667, -0.24356824159622192, -0.10350735485553741, -0.8880513310432434, 0.6264221668243408, 0.20458592474460602, 0.460736483335495, 0.09247604757547379, -0.3819929361343384, -1.0464365482330322, 1.4615341424942017, -0.03829559311270714, -0.3206382095813751, 0.11846195161342621, 0.19572655856609344, 0.4532824754714966, -0.16035062074661255, 0.5628690719604492, 0.399377703666687, 0.6323867440223694, 0.05992470309138298, -0.816478967666626, 0.3053252100944519, -0.3143899738788605, -0.0933622494339943, 0.24851424992084503, -0.8459389209747314, 1.1714240312576294, -0.0132577084004879, 0.05330634117126465, 0.1502542346715927, 0.6449092626571655, 0.2515110969543457, 0.25602176785469055, 0.5533226132392883, 0.895211935043335, 0.7893421649932861, -0.1728506088256836, 0.8945231437683105, -0.36578622460365295, 0.805071234703064, 1.113978624343872, 0.11042751371860504, 0.7171468138694763, 0.2884891927242279, -0.33446788787841797, 0.5120471715927124, 0.7409052848815918, -0.1310078501701355, 0.6892637014389038, 0.18364477157592773, -0.08822519332170486, -0.3965085744857788, 0.3674945831298828, -0.34888631105422974, 0.501602828502655, 0.2269112467765808, -0.3769594728946686, -0.12236430495977402, 0.09386136382818222, 0.4175282418727875, 0.10731912404298782, -0.14927347004413605, 0.7173540592193604, 0.0014530622866004705, -0.6385278105735779, 0.2751612365245819, -0.016071274876594543, 0.6989246606826782, -0.7364446520805359, 0.08378095924854279, 0.038649048656225204, 0.46112391352653503, -0.19411592185497284, -0.9725835919380188, 0.17573106288909912, -0.21571564674377441, -0.1113986074924469, 0.012720726430416107, 0.8845045566558838, -0.48685377836227417, -0.6712808012962341, 0.25665536522865295, 0.49194779992103577, 0.11885885894298553, -0.013125128112733364, -1.1452072858810425, -0.18519067764282227, 0.10049781948328018, -0.7139501571655273, 0.30627739429473877, 0.5374487638473511, 0.10378916561603546, 0.7836928367614746, 0.6462439298629761, 0.04481756314635277, 0.3623722195625305, -0.010281861759722233, 0.7645936012268066, -0.7768197059631348, -0.8013261556625366, -1.0916533470153809, 0.44770753383636475, -0.32034167647361755, -0.6102048754692078, 1.0319995880126953, 0.8609752655029297, 0.7524376511573792, -0.310467928647995, 0.841214656829834, -0.28657767176628113, 0.384050577878952, -0.5896432399749756, 1.1459240913391113, -0.6767563223838806, -0.30126866698265076, -0.31342869997024536, -0.9171794652938843, -0.26620015501976013, 1.0091809034347534, -0.23028531670570374, 0.12742717564105988, 0.961315929889679, 0.7729637622833252, -0.08556637167930603, -0.0012081308523193002, 0.2262665033340454, 0.6017943620681763, 0.23082402348518372, 0.6469597220420837, 0.5802058577537537, -0.8690266013145447, 0.7122321724891663, -0.5591461062431335, 0.008685054257512093, -0.1881490796804428, -0.8332167267799377, -1.080370306968689, -0.7094405889511108, -0.3415038287639618, -0.46072936058044434, -0.1084667220711708, 1.3570036888122559, 0.5440185070037842, -0.8559718728065491, -0.05801196023821831, -0.09470289200544357, 0.08923023194074631, -0.24752533435821533, -0.3273192346096039, 1.0404974222183228, -0.4114222228527069, -0.8605149984359741, 0.12516459822654724, -0.055325642228126526, 0.04462428763508797, 0.09422310441732407, -0.24193188548088074, -0.6953969597816467, 0.22379620373249054, 0.5324867367744446, -0.007361512631177902, -0.9264658093452454, -0.502167820930481, 0.001962117152288556, -0.3396885395050049, 0.07258250564336777, 0.24083830416202545, -0.5568293929100037, 0.41843992471694946, 0.6940590739250183, 0.49535080790519714, 0.5371783971786499, -0.033225443214178085, 0.3027041256427765, -0.665156364440918, 0.1985238492488861, 0.14737464487552643, 0.3955281972885132, -0.058484677225351334, -0.3140868544578552, 0.7106987833976746, 0.49536868929862976, -0.6996327638626099, -0.945176899433136, -0.300547331571579, -1.204410433769226, -0.3768833875656128, 1.051455020904541, -0.4945703148841858, -0.33436575531959534, -0.12091152369976044, -0.44971731305122375, 0.3261733949184418, -0.4146753251552582, 0.6720666289329529, 1.1608549356460571, 0.1396075189113617, -0.012970484793186188, -0.7436087727546692, 0.5814972519874573, 0.41577818989753723, -0.6155638098716736, -0.3100876212120056, -0.1293761134147644, 0.4854687452316284, -0.08658815920352936, 0.7409672737121582, -0.01751532219350338, 0.30714792013168335, 0.22560273110866547, -0.024296598508954048, -0.028702445328235626, -0.09456472843885422, 0.040813516825437546, -0.004184679128229618, -0.578014612197876, -0.657463788986206 ]
pszemraj/grammar-synthesis-small
pszemraj
"2023-04-28T01:45:36Z"
29,712
4
transformers
[ "transformers", "pytorch", "onnx", "safetensors", "t5", "text2text-generation", "grammar", "spelling", "punctuation", "error-correction", "grammar synthesis", "FLAN", "dataset:jfleg", "arxiv:2107.06751", "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-07-09T23:00:37Z"
--- 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" - "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-small (beta) This model is a fine-tuned version of [google/t5-small-lm-adapt](https://huggingface.co/google/t5-small-lm-adapt) for grammar correction on an expanded version of the [JFLEG](https://paperswithcode.com/dataset/jfleg) dataset. usage in Python (after `pip install transformers`): ```python from transformers import pipeline corrector = pipeline( 'text2text-generation', 'pszemraj/grammar-synthesis-small', ) raw_text = 'i can has cheezburger' results = corrector(raw_text) print(results) ``` Check out a simple demo in [Google Colab here](https://colab.research.google.com/gist/pszemraj/06fac5b608889e258229a659cc53485f/demo-for-grammar-synthesis-small.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 :) ## 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)._ ## Training and evaluation data More information needed 😉 ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0004 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - distributed_type: multi-GPU - gradient_accumulation_steps: 32 - total_train_batch_size: 512 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - lr_scheduler_warmup_ratio: 0.03 - num_epochs: 4 ### Training results ### Framework versions - Transformers 4.20.1 - Pytorch 1.11.0+cu113 - Datasets 2.3.2 - Tokenizers 0.12.1
[ -0.23930372297763824, -1.1296873092651367, 0.35972127318382263, 0.2566191554069519, -0.2111884504556656, -0.13045819103717804, -0.27254053950309753, -0.2773274779319763, -0.002675828756764531, 0.2477003037929535, -0.7011573910713196, -0.35961833596229553, -0.4211081862449646, 0.2668538987636566, -0.32324934005737305, 0.965808629989624, -0.01683591865003109, 0.12617744505405426, 0.08738497644662857, 0.07572151720523834, -0.4535815715789795, -0.5638343095779419, -0.8815203905105591, -0.2567142844200134, 0.4030161201953888, 0.26726365089416504, 0.6509511470794678, 0.6463441848754883, 0.6873486638069153, 0.315650075674057, -0.31277310848236084, 0.12395045906305313, -0.33200526237487793, -0.07624399662017822, -0.20668575167655945, -0.4574424922466278, -0.4784894287586212, 0.15588410198688507, 0.6237877607345581, 0.7090552449226379, -0.10958332568407059, 0.12154189497232437, -0.06751047074794769, 0.6810250282287598, -0.3847416937351227, 0.1570259928703308, -0.46864011883735657, 0.34458160400390625, -0.22410713136196136, -0.012826855294406414, -0.5275229215621948, -0.3118477761745453, -0.0572601743042469, -0.6599463820457458, 0.22382380068302155, 0.049509402364492416, 1.0605922937393188, 0.3675267696380615, -0.25371143221855164, -0.35449427366256714, -0.7030404210090637, 0.6160107254981995, -0.6900191307067871, 0.11728142946958542, 0.4089360535144806, 0.11154155433177948, -0.5018583536148071, -0.9624062180519104, -0.5759678483009338, -0.08723833411931992, -0.26026651263237, 0.2890090346336365, -0.3287920653820038, 0.21955451369285583, 0.5864259600639343, 0.3753106892108917, -0.5439757108688354, -0.10938158631324768, -0.482960969209671, -0.22672109305858612, 0.3113260269165039, 0.046928443014621735, 0.40384960174560547, -0.11574841290712357, -0.1836014986038208, -0.057626280933618546, -0.5850305557250977, 0.4405459761619568, 0.29850029945373535, 0.4820648729801178, 0.0049750166945159435, 0.6806681752204895, -0.10089760273694992, 0.6026281118392944, 0.198867067694664, -0.08429070562124252, 0.1610148847103119, -0.4241656959056854, -0.31423887610435486, -0.2724188268184662, 0.7232474684715271, 0.3250260651111603, 0.38234543800354004, 0.0016447232337668538, 0.11872389167547226, 0.3588380813598633, 0.19397440552711487, -0.7837867736816406, -0.2794041037559509, 0.1537633240222931, -0.24281470477581024, -0.32515403628349304, -0.1545565277338028, -0.45731621980667114, 0.001291748252697289, -0.08908238261938095, 0.37905386090278625, -0.6395187973976135, 0.11939218640327454, 0.4403161108493805, -0.30470138788223267, -0.004537674598395824, 0.2245391309261322, -0.7094419002532959, 0.17549408972263336, 0.41822728514671326, 0.7014307379722595, 0.519309401512146, -0.2774248421192169, -0.5031239986419678, -0.13176275789737701, -0.5385106205940247, 0.8334119319915771, -0.493252158164978, -0.25787535309791565, -0.10269132256507874, 0.2838956117630005, -0.1514788419008255, -0.4352802336215973, 0.6935139894485474, -0.10550324618816376, 0.7123408317565918, -0.21854698657989502, -0.6011832356452942, -0.15513399243354797, 0.13668645918369293, -0.30400174856185913, 1.189792275428772, -0.10593143850564957, -0.48920732736587524, 0.27663686871528625, -0.6239507794380188, -0.3613468110561371, -0.12029683589935303, 0.16931606829166412, -0.48182493448257446, 0.09123225510120392, 0.06157810240983963, 0.20236030220985413, -0.026980219408869743, 0.2631470263004303, -0.2879498302936554, -0.29604679346084595, 0.2752948999404907, -0.20226815342903137, 0.8384571075439453, 0.011328834109008312, -0.32235297560691833, 0.037005506455898285, -0.8014109134674072, 0.250002384185791, 0.18545293807983398, -0.4280882775783539, -0.30223387479782104, 0.06748146563768387, -0.2517458498477936, 0.35692882537841797, -0.03215167671442032, -0.4635080397129059, 0.34332790970802307, -0.637186586856842, 0.5918077826499939, 0.6234566569328308, -0.07808417081832886, 0.42691516876220703, -0.42511266469955444, 0.2753342092037201, -0.18996185064315796, 0.3041945695877075, -0.17686238884925842, -0.3999679982662201, -0.9229041337966919, -0.4178577661514282, 0.29726555943489075, 0.6202859878540039, -0.5149295926094055, 0.6488243341445923, 0.11155205965042114, -0.5621252059936523, -0.5071640014648438, 0.14270654320716858, 0.6597281694412231, 0.5427385568618774, 0.3586059510707855, -0.3473334014415741, -0.6595683693885803, -0.7120869755744934, -0.3416510820388794, -0.35654616355895996, 0.1195099800825119, -0.10577023029327393, 0.6188587546348572, -0.035387806594371796, 0.8894411325454712, -0.39889034628868103, -0.15444737672805786, -0.05356325954198837, 0.02863330952823162, 0.17686207592487335, 0.43542343378067017, 0.4562016725540161, -0.4708700180053711, -0.3576476573944092, -0.31344932317733765, -0.8477234840393066, -0.1856786161661148, -0.03940869867801666, -0.3482024073600769, 0.14492936432361603, 0.5827623605728149, -0.7724831700325012, 0.355194091796875, 0.19647042453289032, -0.4826207756996155, 0.4634858965873718, -0.0721258670091629, -0.09791029244661331, -0.9580455422401428, 0.1250661462545395, -0.015308725647628307, -0.30242791771888733, -0.6958411335945129, 0.23265649378299713, -0.03438451141119003, -0.1600707620382309, -0.5071741342544556, 0.5096195340156555, -0.28712430596351624, 0.2900804579257965, -0.13484932482242584, 0.2097577005624771, 0.008946646004915237, 0.5124950408935547, -0.18753653764724731, 0.800525963306427, 0.37201300263404846, -0.49444064497947693, 0.3272211253643036, 0.25638964772224426, -0.016490546986460686, 0.3968924283981323, -0.6635120511054993, 0.16279686987400055, -0.1595136821269989, 0.3703102767467499, -0.8938549160957336, -0.22274184226989746, 0.7693555355072021, -0.4284481108188629, 0.07458864152431488, -0.01868068054318428, -0.4725082814693451, -0.4910593330860138, -0.4293115735054016, 0.07503096014261246, 0.5416795015335083, -0.36900654435157776, 0.35287249088287354, 0.059399478137493134, -0.23584173619747162, -0.5455817580223083, -0.5920947790145874, 0.0113271689042449, -0.14345170557498932, -0.6667428612709045, 0.26354464888572693, -0.3169863224029541, -0.36358851194381714, 0.12990696728229523, -0.15999017655849457, 0.04516671597957611, 0.06664274632930756, 0.1741843819618225, 0.26058429479599, -0.12942519783973694, 0.34151560068130493, -0.07581627368927002, -0.19180265069007874, -0.15867863595485687, -0.05974974110722542, 0.6306641697883606, -0.4085460305213928, -0.13463817536830902, -0.4489399790763855, 0.22215086221694946, 0.37202876806259155, -0.007877279072999954, 0.524209201335907, 0.5281485915184021, -0.4611826539039612, -0.20128066837787628, -0.31536582112312317, -0.2650671899318695, -0.45907673239707947, 0.30298978090286255, -0.259255051612854, -0.6784647703170776, 0.48532015085220337, -0.08267968147993088, 0.008881527930498123, 0.5952179431915283, 0.41810324788093567, -0.4015355706214905, 0.9204391241073608, 0.5285858511924744, 0.16131125390529633, 0.6713718175888062, -0.07313288003206253, 0.4567149579524994, -0.6361106038093567, -0.0040729413740336895, -0.5096972584724426, -0.17596666514873505, -0.6153407096862793, -0.16597357392311096, 0.1378067582845688, 0.37823784351348877, -0.3191913664340973, 0.4132460057735443, -0.468691885471344, 0.46893808245658875, 0.5223461985588074, 0.13996949791908264, 0.22355172038078308, 0.048801373690366745, 0.03135325387120247, -0.0829959362745285, -0.6543291211128235, -0.630598247051239, 0.8686885833740234, 0.2536000907421112, 0.6280436515808105, -0.04349682107567787, 0.4179759919643402, 0.16398003697395325, 0.024399327114224434, -0.859793484210968, 0.6811960339546204, -0.3569844961166382, -0.77420574426651, -0.24362397193908691, -0.2259279489517212, -0.8150505423545837, 0.2479531466960907, -0.2155420035123825, -0.6854974031448364, -0.01972026377916336, 0.20048269629478455, -0.42410534620285034, 0.21092107892036438, -0.9152447581291199, 0.9480792880058289, -0.13015498220920563, -0.40719377994537354, -0.0660075768828392, -0.7399258613586426, 0.19805867969989777, 0.027618715539574623, 0.08272425085306168, -0.21998034417629242, 0.1562550961971283, 0.606199324131012, -0.7010931968688965, 1.0218660831451416, -0.04599223658442497, 0.1697484701871872, 0.3621143400669098, -0.09209733456373215, 0.4636005461215973, -0.13360381126403809, 0.10043700784444809, -0.036878474056720734, 0.059085190296173096, -0.3669421374797821, -0.4757978022098541, 0.21969886124134064, -0.7271121144294739, -0.6115137338638306, -0.6200686097145081, -0.43359532952308655, 0.009069759398698807, 0.23998337984085083, 0.2880103290081024, 0.41557130217552185, -0.19214041531085968, 0.3401804268360138, 0.36452487111091614, -0.18071188032627106, 0.5818049907684326, 0.5134066343307495, -0.3263576030731201, -0.3281765580177307, 0.5175227522850037, 0.12414468824863434, 0.2161504030227661, 0.16494321823120117, 0.2520642578601837, -0.08184890449047089, -0.1428595781326294, -0.4660758078098297, 0.39210984110832214, -0.6425972580909729, -0.17344588041305542, -0.4719809293746948, -0.3472951352596283, -0.3953733742237091, -0.25336602330207825, -0.45376718044281006, -0.5466406941413879, -0.27991777658462524, -0.0536973811686039, 0.271437406539917, 0.3570233881473541, 0.014893481507897377, 0.5844793915748596, -0.502821683883667, 0.20914864540100098, 0.14249789714813232, 0.185276061296463, -0.46498480439186096, -0.503153920173645, -0.02773869037628174, 0.11341408640146255, -0.43305492401123047, -0.7224536538124084, 0.29529839754104614, 0.3916475176811218, 0.3319323658943176, 0.21012024581432343, -0.12997160851955414, 0.9450100064277649, -0.48204246163368225, 0.8692861199378967, 0.187811940908432, -0.969018280506134, 0.746985137462616, -0.1872425079345703, 0.1749529242515564, 0.47085046768188477, 0.16686715185642242, -0.7663041353225708, -0.5366617441177368, -0.6367658972740173, -0.9324976801872253, 0.7974135279655457, 0.3719017803668976, 0.2023329734802246, -0.07284889370203018, 0.5741932988166809, -0.023935779929161072, 0.2041066586971283, -0.887548565864563, -0.17918138206005096, -0.11798259615898132, -0.1796753704547882, 0.04359017312526703, -0.1983063668012619, -0.2327599674463272, -0.36314210295677185, 1.0389556884765625, -0.03453880548477173, 0.29357823729515076, 0.2767638862133026, -0.1350020319223404, -0.17389561235904694, 0.45127347111701965, 0.6036376953125, 0.4894672632217407, -0.2820570766925812, 0.10950861871242523, 0.09919004887342453, -0.3075692355632782, 0.15838506817817688, 0.14399243891239166, -0.29457664489746094, 0.10065560787916183, 0.33385810256004333, 0.7119048237800598, -0.020954372361302376, -0.5643767714500427, 0.39432573318481445, -0.06510463356971741, -0.08765018731355667, -0.5240333080291748, 0.09792352467775345, -0.07758428901433945, 0.3115287721157074, 0.09859111160039902, 0.3102431893348694, -0.0433105044066906, -0.877399742603302, -0.0058685606345534325, 0.27993640303611755, -0.16299311816692352, -0.42912203073501587, 0.4529028534889221, 0.10956190526485443, -0.5371797680854797, 0.5612737536430359, -0.4743388295173645, -0.45846039056777954, 0.5611172318458557, 0.711089551448822, 0.7098490595817566, -0.19460541009902954, 0.2672496438026428, 0.4781866669654846, 0.31315889954566956, -0.2734000086784363, 0.2614343762397766, 0.20446884632110596, -0.7858615517616272, -0.29710572957992554, -0.5449152588844299, -0.3439870774745941, 0.1156194657087326, -0.4661012887954712, 0.5607448220252991, -0.6406902074813843, -0.4645182192325592, 0.1634804606437683, -0.11615220457315445, -0.5064879655838013, 0.21026606857776642, -0.018800366669893265, 0.7233024835586548, -0.9012683629989624, 0.6365997195243835, 0.8323453664779663, -0.6654176115989685, -0.8052094578742981, -0.053590115159749985, 0.06505730003118515, -0.7241712212562561, 0.39154353737831116, 0.012778425589203835, -0.11965569853782654, -0.18047620356082916, -0.6000382304191589, -0.6563349962234497, 0.7751357555389404, 0.379143089056015, -0.5357940196990967, -0.36583638191223145, 0.06366518884897232, 0.8340256214141846, -0.11393121629953384, 0.31156447529792786, 0.43532535433769226, 0.3691871762275696, 0.011239740066230297, -0.8964213728904724, 0.1353236883878708, -0.49596381187438965, 0.06617195159196854, 0.08534669131040573, -0.7985329031944275, 0.938739538192749, -0.018423425033688545, -0.2354901283979416, 0.19175787270069122, 0.2821098864078522, 0.15355755388736725, 0.2999211847782135, 0.3787243962287903, 0.5569445490837097, 0.8381129503250122, -0.27948662638664246, 0.8310912251472473, -0.3550211787223816, 0.584191083908081, 0.9750120043754578, -0.010655763559043407, 0.6875383853912354, 0.5731234550476074, -0.24036140739917755, 0.425143837928772, 0.707316517829895, -0.10453639179468155, 0.5301769375801086, 0.028976159170269966, -0.1195288747549057, -0.20471617579460144, -0.02928941510617733, -0.43805766105651855, 0.4416954219341278, 0.2219185084104538, -0.4596782326698303, -0.18979977071285248, 0.014569113962352276, 0.5001789331436157, -0.05159546062350273, -0.07332543283700943, 0.7294265031814575, -0.003567205974832177, -0.641215443611145, 0.4617827832698822, 0.22489582002162933, 0.6023561358451843, -0.6211132407188416, 0.12482444196939468, -0.2975118160247803, 0.40119031071662903, -0.15331314504146576, -0.5865175127983093, 0.4281497001647949, 0.12588751316070557, -0.19262546300888062, -0.3065323829650879, 0.9077172875404358, -0.3917809724807739, -0.5311294198036194, 0.28662702441215515, 0.4837525188922882, 0.16663973033428192, -0.028338871896266937, -0.5491440892219543, -0.03238525614142418, -0.039686381816864014, -0.23116865754127502, -0.057074062526226044, 0.3515073359012604, 0.04961870238184929, 0.5251410603523254, 0.6510984301567078, 0.17858773469924927, 0.11913853883743286, -0.027762042358517647, 0.7610257267951965, -0.6603579521179199, -0.3182258903980255, -0.966550886631012, 0.6212965250015259, -0.1212509274482727, -0.48055848479270935, 0.5538869500160217, 0.5170689821243286, 1.0578076839447021, -0.15768496692180634, 0.7653194665908813, -0.29043370485305786, 0.2746899425983429, -0.509445309638977, 0.2677311599254608, -0.5724343657493591, 0.04322307929396629, -0.2704666256904602, -0.6839801073074341, -0.46990451216697693, 0.8656195998191833, -0.462211936712265, -0.09826991707086563, 0.9364622235298157, 0.9084151387214661, 0.024220777675509453, 0.04584004357457161, 0.21890026330947876, 0.31495189666748047, 0.30402979254722595, 0.4510919749736786, 0.901720404624939, -0.6105868816375732, 0.7301442623138428, -0.33767855167388916, -0.10919976234436035, -0.21018461883068085, -0.5561354160308838, -0.8241921067237854, -0.47320377826690674, -0.46718159317970276, -0.5231751203536987, 0.3417935073375702, 1.084405541419983, 0.5104700326919556, -0.6431555151939392, -0.0677599236369133, -0.1870182901620865, -0.09021811187267303, -0.34553730487823486, -0.22691643238067627, 0.22411438822746277, -0.5562942028045654, -0.7952805161476135, 0.24599303305149078, 0.2772224247455597, -0.023550303652882576, 0.24750562012195587, 0.1490073949098587, -0.2398921549320221, 0.1565084159374237, 0.6649108529090881, 0.3057125508785248, -0.8112168908119202, -0.7238078117370605, 0.15600793063640594, -0.30463865399360657, 0.20690560340881348, 0.5835431814193726, -0.4145863652229309, 0.5055670738220215, 0.42987504601478577, 0.27909085154533386, 0.48251160979270935, 0.03437340259552002, 0.2283080369234085, -0.7483154535293579, 0.24974362552165985, 0.0705338716506958, 0.4552954435348511, 0.2707690894603729, -0.1872759908437729, 0.6951807141304016, 0.6774401664733887, -0.47352373600006104, -0.7940932512283325, 0.18335597217082977, -0.9480162858963013, -0.3280735909938812, 1.0605748891830444, -0.11253869533538818, -0.36145246028900146, 0.15454354882240295, -0.5476338267326355, 0.5362905859947205, -0.30363619327545166, 0.8377665281295776, 1.0164319276809692, -0.17348967492580414, -0.04630093649029732, -0.406494677066803, 0.45367002487182617, 0.5720268487930298, -0.7941941618919373, -0.11608374118804932, 0.5465209484100342, 0.5242429375648499, 0.17740361392498016, 0.7652279734611511, -0.15301606059074402, 0.16853414475917816, 0.09742244333028793, 0.2557823956012726, -0.05046321824193001, -0.24829883873462677, -0.31391316652297974, 0.16642944514751434, -0.07789772003889084, -0.3524104356765747 ]
kssteven/ibert-roberta-base
kssteven
"2021-11-22T10:09:32Z"
29,604
0
transformers
[ "transformers", "pytorch", "ibert", "fill-mask", "arxiv:1907.11692", "arxiv:2101.01321", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
# I-BERT base model This model, `ibert-roberta-base`, is an integer-only quantized version of [RoBERTa](https://arxiv.org/abs/1907.11692), and was introduced in [this paper](https://arxiv.org/abs/2101.01321). I-BERT stores all parameters with INT8 representation, and carries out the entire inference using integer-only arithmetic. In particular, I-BERT replaces all floating point operations in the Transformer architectures (e.g., MatMul, GELU, Softmax, and LayerNorm) with closely approximating integer operations. This can result in upto 4x inference speed up as compared to floating point counterpart when tested on an Nvidia T4 GPU. The best model parameters searched via quantization-aware finetuning can be then exported (e.g., to TensorRT) for integer-only deployment of the model. ## Finetuning Procedure Finetuning of I-BERT consists of 3 stages: (1) Full-precision finetuning from the pretrained model on a down-stream task, (2) model quantization, and (3) integer-only finetuning (i.e., quantization-aware training) of the quantized model. ### Full-precision finetuning Full-precision finetuning of I-BERT is similar to RoBERTa finetuning. For instance, you can run the following command to finetune on the [MRPC](https://www.microsoft.com/en-us/download/details.aspx?id=52398) text classification task. ``` python examples/text-classification/run_glue.py \ --model_name_or_path kssteven/ibert-roberta-base \ --task_name MRPC \ --do_eval \ --do_train \ --evaluation_strategy epoch \ --max_seq_length 128 \ --per_device_train_batch_size 32 \ --save_steps 115 \ --learning_rate 2e-5 \ --num_train_epochs 10 \ --output_dir $OUTPUT_DIR ``` ### Model Quantization Once you are done with full-precision finetuning, open up `config.json` in your checkpoint directory and set the `quantize` attribute as `true`. ``` { "_name_or_path": "kssteven/ibert-roberta-base", "architectures": [ "IBertForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "eos_token_id": 2, "finetuning_task": "mrpc", "force_dequant": "none", "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-05, "max_position_embeddings": 514, "model_type": "ibert", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 1, "position_embedding_type": "absolute", "quant_mode": true, "tokenizer_class": "RobertaTokenizer", "transformers_version": "4.4.0.dev0", "type_vocab_size": 1, "vocab_size": 50265 } ``` Then, your model will automatically run as the integer-only mode when you load the checkpoint. Also, make sure to delete `optimizer.pt`, `scheduler.pt` and `trainer_state.json` in the same directory. Otherwise, HF will not reset the optimizer, scheduler, or trainer state for the following integer-only finetuning. ### Integer-only finetuning (Quantization-aware training) Finally, you will be able to run integer-only finetuning simply by loading the checkpoint file you modified. Note that the only difference in the example command below is `model_name_or_path`. ``` python examples/text-classification/run_glue.py \ --model_name_or_path $CHECKPOINT_DIR --task_name MRPC \ --do_eval \ --do_train \ --evaluation_strategy epoch \ --max_seq_length 128 \ --per_device_train_batch_size 32 \ --save_steps 115 \ --learning_rate 1e-6 \ --num_train_epochs 10 \ --output_dir $OUTPUT_DIR ``` ## Citation info If you use I-BERT, please cite [our papaer](https://arxiv.org/abs/2101.01321). ``` @article{kim2021bert, title={I-BERT: Integer-only BERT Quantization}, author={Kim, Sehoon and Gholami, Amir and Yao, Zhewei and Mahoney, Michael W and Keutzer, Kurt}, journal={arXiv preprint arXiv:2101.01321}, year={2021} } ```
[ -0.6600548028945923, -0.5903849601745605, 0.35718125104904175, 0.23220771551132202, -0.2646937072277069, -0.32024869322776794, -0.3248400390148163, -0.1712425947189331, -0.190146341919899, 0.3358762264251709, -0.6897308230400085, -0.4619435966014862, -0.6387125849723816, -0.13007283210754395, -0.04740345850586891, 1.222678780555725, 0.04869403690099716, 0.4037189781665802, -0.16662020981311798, -0.03691915050148964, -0.16454967856407166, -0.5543147921562195, -0.8759040236473083, -0.26905834674835205, 0.27739834785461426, 0.1967695951461792, 0.33263394236564636, 0.48997846245765686, 0.6341875195503235, 0.35931849479675293, -0.3393399715423584, -0.2682581841945648, -0.3260798752307892, -0.2593792974948883, -0.04338640719652176, -0.5431020259857178, -0.5191653370857239, -0.0834028422832489, 0.9081125259399414, 0.4061774015426636, 0.002989096799865365, 0.25858885049819946, 0.04380489140748978, 0.6930180788040161, -0.6876481771469116, 0.2978753447532654, -0.44234615564346313, 0.05418745055794716, -0.11166929453611374, 0.22186440229415894, -0.45662569999694824, -0.4383740723133087, 0.24373002350330353, -0.5479447245597839, 0.3791860044002533, -0.36297038197517395, 1.098067045211792, 0.5506376028060913, -0.534892737865448, -0.13432295620441437, -0.48440268635749817, 0.9083035588264465, -1.1094982624053955, 0.20690834522247314, 0.2576655149459839, 0.08933646231889725, -0.07430409640073776, -0.8577224612236023, -0.5025603771209717, -0.18458925187587738, 0.16737209260463715, 0.18135496973991394, 0.021808071061968803, 0.43604835867881775, 0.6857945919036865, 0.5475351214408875, -0.5859090089797974, 0.1051870584487915, -0.618895947933197, -0.3328878879547119, 0.24109847843647003, 0.19985076785087585, -0.07619869709014893, -0.2505917251110077, -0.5561948418617249, -0.41139495372772217, -0.31464236974716187, 0.49968305230140686, 0.068919837474823, 0.17497840523719788, -0.16886141896247864, 0.34910738468170166, -0.449391633272171, 0.668124258518219, 0.2286234050989151, -0.21064642071723938, 0.35276469588279724, -0.042954809963703156, -0.3367329239845276, 0.11119440943002701, 0.9898583292961121, 0.03923792019486427, -0.027604877948760986, 0.20841287076473236, -0.15841428935527802, -0.06754070520401001, 0.21621669828891754, -1.2547831535339355, -0.27289310097694397, 0.4636681079864502, -0.32523030042648315, -0.3650543987751007, 0.07305264472961426, -0.47384729981422424, 0.22678308188915253, -0.28552451729774475, 0.9037664532661438, -0.9829286336898804, 0.16512952744960785, -0.058959029614925385, -0.0642072930932045, 0.21285957098007202, 0.4253655970096588, -0.8666175603866577, 0.13101722300052643, 0.6207867860794067, 0.908855140209198, 0.3110869526863098, -0.29551932215690613, -0.36356061697006226, -0.10397481173276901, -0.30996450781822205, 0.45756810903549194, 0.012242709286510944, -0.1522427797317505, -0.19521601498126984, 0.16751502454280853, -0.21787866950035095, -0.5270550847053528, 0.456498384475708, -0.478977233171463, 0.28490498661994934, -0.2243284434080124, -0.6342005133628845, -0.5327794551849365, 0.23916657269001007, -0.5180274844169617, 0.9860507845878601, 0.14003710448741913, -0.5247111916542053, 0.28168559074401855, -0.6273176074028015, -0.2094571739435196, -0.07187196612358093, 0.033563125878572464, -0.8635558485984802, -0.05200456455349922, 0.0823584571480751, 0.31509631872177124, -0.18481487035751343, 0.34857177734375, -0.43914687633514404, -0.5232813954353333, 0.165197491645813, -0.38781479001045227, 1.2515603303909302, 0.2712861895561218, -0.6457220911979675, 0.006907035131007433, -0.7708200812339783, 0.309940367937088, -0.14419490098953247, -0.7096213698387146, 0.17411285638809204, -0.24336133897304535, -0.21188169717788696, 0.25697052478790283, 0.6182275414466858, -0.44295379519462585, 0.3280888497829437, -0.19696864485740662, 0.55744868516922, 0.876676082611084, 0.16309043765068054, 0.46372097730636597, -0.6621259450912476, 0.2809523344039917, 0.23046791553497314, 0.19528451561927795, -0.09178391844034195, -0.5343481302261353, -1.148317813873291, -0.5189149379730225, 0.663398802280426, 0.7653259634971619, -0.49457263946533203, 0.82755047082901, -0.30928531289100647, -0.6537958979606628, -0.47775062918663025, -0.17241866886615753, 0.5169073343276978, 0.45774224400520325, 0.28993844985961914, -0.3125714361667633, -0.3778572678565979, -0.8649078607559204, 0.09558418393135071, -0.08004222810268402, -0.09359556436538696, 0.18851888179779053, 0.7095385789871216, -0.0881410613656044, 0.6764435768127441, -0.41625770926475525, -0.484424352645874, 0.16170677542686462, 0.45822596549987793, 0.5268082618713379, 1.0164010524749756, 0.5216208696365356, -0.34991541504859924, -0.5621080994606018, -0.3647978901863098, -0.8155783414840698, 0.2738051414489746, -0.334712952375412, -0.23278336226940155, 0.23789916932582855, 0.24515369534492493, -0.5741140246391296, 0.39536386728286743, 0.25802671909332275, -0.15182453393936157, 0.48402491211891174, -0.19574721157550812, 0.28445518016815186, -0.881365180015564, 0.06360643357038498, 0.012127242051064968, -0.2076519876718521, -0.37871068716049194, 0.18138642609119415, 0.25058281421661377, -0.11360614746809006, -0.5201005935668945, 0.306008517742157, -0.14747269451618195, 0.08221118897199631, 0.10232501477003098, -0.4168996214866638, 0.03385944664478302, 1.0150054693222046, -0.032045889645814896, 0.7354806661605835, 0.6213365197181702, -0.6455962061882019, -0.09048387408256531, 0.30595511198043823, -0.5143787860870361, 0.40357711911201477, -0.6174125671386719, 0.17774973809719086, -0.04932691156864166, 0.35199910402297974, -0.8904373049736023, -0.18723534047603607, 0.3616578280925751, -0.6986061334609985, 0.34625351428985596, -0.5671863555908203, -0.5611782670021057, -0.19398483633995056, -0.21990732848644257, 0.3139289319515228, 0.7719099521636963, -0.32734668254852295, 0.4847777783870697, -0.0173567496240139, -0.1195557489991188, -0.3708847165107727, -0.6066928505897522, -0.22340942919254303, -0.2582785487174988, -0.7351352572441101, 0.41438987851142883, -0.3781474828720093, 0.0039914813823997974, -0.2605075240135193, -0.04313188046216965, -0.4540056884288788, 0.08908471465110779, 0.18685239553451538, 0.3770963251590729, -0.22030536830425262, 0.14813660085201263, 0.22691401839256287, -0.14489410817623138, 0.10953228175640106, -0.3698159456253052, 0.6473618149757385, -0.4890899062156677, -0.05485411733388901, -0.6252219676971436, 0.09268396347761154, 0.6368148326873779, -0.2665446996688843, 0.8988652229309082, 0.9782794713973999, -0.5554638504981995, 0.175755113363266, -0.4274109899997711, -0.3637763559818268, -0.5110791921615601, 0.3504818379878998, -0.330856055021286, -0.5264237523078918, 0.5612797737121582, -0.0064660790376365185, 0.18332310020923615, 0.7258749008178711, 0.6456987261772156, -0.3138510584831238, 0.9514232873916626, 0.18307659029960632, 0.25129109621047974, 0.8572354316711426, -0.9606063365936279, -0.11303603649139404, -1.060842752456665, 0.0015721864765509963, -0.3414277732372284, -0.36061891913414, -0.3069741427898407, -0.3139025866985321, 0.6432729363441467, 0.4732215404510498, -0.821621298789978, 0.17423461377620697, -0.6916506886482239, 0.15450286865234375, 0.9990999698638916, 0.5018502473831177, -0.04155033454298973, -0.17684805393218994, -0.10026425868272781, -0.1328832507133484, -0.697413444519043, -0.38750091195106506, 1.0827226638793945, 0.22402459383010864, 0.49340713024139404, -0.04248829185962677, 0.9600109457969666, 0.028641050681471825, 0.059595901519060135, -0.8220831155776978, 0.5315190553665161, -0.25422847270965576, -0.9955278038978577, -0.28894323110580444, -0.4692583978176117, -0.5040934681892395, 0.3337635099887848, -0.26321205496788025, -0.71921306848526, 0.45895808935165405, 0.18399196863174438, -0.5761071443557739, 0.3536536991596222, -0.6730749011039734, 0.9903501272201538, -0.11094935983419418, -0.1988820880651474, -0.2562548518180847, -0.7373250126838684, 0.4998575747013092, -0.07098668813705444, 0.11247304826974869, -0.29529500007629395, 0.21432583034038544, 1.0332536697387695, -0.7679301500320435, 0.8590407371520996, -0.43872255086898804, 0.2595134675502777, 0.5279089212417603, 0.05737779289484024, 0.5713038444519043, 0.059966567903757095, -0.1010681763291359, 0.4983753263950348, 0.22200274467468262, -0.4220174252986908, -0.1785544753074646, 0.6784765124320984, -0.9942322969436646, -0.2619788646697998, -0.6214748024940491, -0.6188924908638, 0.08909416943788528, 0.4021773040294647, 0.6017332077026367, 0.6391247510910034, 0.2193187177181244, 0.4229657053947449, 0.8372305035591125, 0.01879945397377014, 0.5489614009857178, 0.4419921338558197, 0.18605445325374603, -0.7751070857048035, 1.108109474182129, 0.24763330817222595, 0.45615047216415405, 0.36010831594467163, 0.099192775785923, -0.008751153945922852, -0.4864678978919983, -0.46823835372924805, 0.04877219721674919, -0.7554197907447815, -0.3930036723613739, -0.5576914548873901, -0.351382851600647, -0.5195695161819458, -0.1619899719953537, -0.5017043352127075, -0.6802542209625244, -0.5799373388290405, 0.26460525393486023, 0.5593557357788086, 0.19859370589256287, -0.4291022717952728, 0.5913792848587036, -0.8996137380599976, 0.2593178153038025, 0.3390505909919739, 0.20690669119358063, 0.07580581307411194, -0.7324939966201782, -0.38867950439453125, 0.3953280746936798, -0.5848730206489563, -0.4580008089542389, 0.21933411061763763, 0.42266932129859924, 0.27443602681159973, 0.38966691493988037, 0.1724245548248291, 0.7629938721656799, -0.35879892110824585, 0.7401095032691956, 0.0559106320142746, -1.026082992553711, 0.4256221055984497, -0.45221948623657227, 0.3391605019569397, 0.7059141993522644, 0.4314471185207367, -0.2099267989397049, -0.19932234287261963, -0.7404603362083435, -0.9692848920822144, 0.8935664892196655, 0.21666696667671204, -0.2863484025001526, 0.07250231504440308, 0.28514188528060913, -0.2405431717634201, 0.15771950781345367, -0.9183260202407837, -0.19916029274463654, -0.20865249633789062, -0.16898682713508606, 0.2590475082397461, -0.07791214436292648, -0.18224355578422546, -0.40123528242111206, 0.9740009903907776, -0.10890186578035355, 0.6000152826309204, 0.40862607955932617, -0.20406456291675568, -0.13789211213588715, 0.010234656743705273, 0.38312971591949463, 0.5303000211715698, -0.5245206356048584, -0.42166662216186523, 0.340890109539032, -0.45915487408638, 0.07961903512477875, 0.22445927560329437, -0.3096309304237366, -0.0695318654179573, 0.30259817838668823, 0.8186479210853577, 0.34420719742774963, -0.41605344414711, 0.48452314734458923, 0.006633239798247814, -0.3706406056880951, -0.6130033135414124, 0.13848784565925598, -0.13266006112098694, 0.38861483335494995, 0.3512648046016693, 0.3368072211742401, 0.13498970866203308, -0.32244765758514404, 0.17804299294948578, 0.3591528832912445, -0.5827621221542358, -0.09219842404127121, 0.8573116064071655, -0.02120094932615757, -0.13543178141117096, 0.9381474256515503, -0.2422923445701599, -0.5064880847930908, 0.9487020373344421, 0.28375759720802307, 0.9060783982276917, 0.0666121244430542, -0.059359267354011536, 0.7556151151657104, 0.15018291771411896, 0.04346753656864166, 0.346416175365448, -0.07531838864088058, -0.522752046585083, -0.3898569941520691, -0.7163637280464172, -0.3459430932998657, -0.08855246007442474, -1.0663316249847412, 0.3944397568702698, -0.8900046944618225, -0.2857753038406372, 0.12947148084640503, 0.07369976490736008, -0.7617459297180176, 0.4504197835922241, 0.19918303191661835, 0.7882888913154602, -0.5100169777870178, 1.029424786567688, 0.5425700545310974, -0.5803496837615967, -0.5961204171180725, -0.2727072536945343, -0.11441293358802795, -0.8148380517959595, 0.469123512506485, 0.14696216583251953, 0.5142520666122437, 0.3259241282939911, -0.6442731618881226, -0.8787662386894226, 1.3531639575958252, 0.15060731768608093, -0.5825246572494507, -0.22744251787662506, -0.025033481419086456, 0.2603093087673187, 0.06946014612913132, 0.23705796897411346, 0.4304400682449341, 0.3219115436077118, 0.19457487761974335, -0.8543052077293396, 0.03357455134391785, -0.10613289475440979, -0.12170638889074326, 0.4049418866634369, -0.9188541173934937, 1.4791744947433472, -0.32064589858055115, 0.2333541214466095, 0.4207848310470581, 0.6004171371459961, 0.6023993492126465, -0.051373135298490524, 0.4986798167228699, 1.0112577676773071, 0.6248401403427124, -0.36732369661331177, 0.7619143128395081, -0.6265525817871094, 0.8903255462646484, 0.8696565628051758, 0.36392709612846375, 0.8214771151542664, 0.28771358728408813, -0.44694316387176514, 0.621961772441864, 0.8878530859947205, -0.16398105025291443, 0.7229819893836975, 0.01900731958448887, -0.45916709303855896, -0.3933296203613281, 0.20905551314353943, -0.5353333353996277, 0.062265217304229736, 0.36268338561058044, -0.24550622701644897, -0.12972810864448547, 0.007543879561126232, 0.15878473222255707, -0.6979989409446716, -0.29440444707870483, 0.8852303624153137, 0.009717034175992012, -0.6091631650924683, 0.8855713605880737, -0.112077996134758, 0.6521504521369934, -0.8672595620155334, -0.13006235659122467, 0.1040622666478157, 0.4636659622192383, -0.07110945880413055, -0.5369524359703064, 0.01685256138443947, -0.37096109986305237, -0.36458897590637207, -0.03495034575462341, 0.21504369378089905, -0.34748223423957825, -0.5877003073692322, -0.14255106449127197, -0.16196447610855103, 0.2217465341091156, -0.3180833160877228, -0.7864930629730225, -0.08679800480604172, 0.2773028016090393, -0.12432007491588593, 0.38057294487953186, 0.5659600496292114, 0.15564237534999847, 0.5054882764816284, 0.7446137070655823, -0.31916674971580505, 0.29576706886291504, -0.3017086386680603, 0.8469188809394836, -0.7536282539367676, -0.49187687039375305, -0.652072548866272, 0.9473092555999756, 0.2435627579689026, -0.6060022711753845, 0.2734379470348358, 0.5985687375068665, 0.7927924990653992, -0.10962200909852982, 0.7906160950660706, -0.4752558469772339, 0.23444460332393646, -0.5478907227516174, 0.6439017057418823, -0.3668656647205353, 0.033640529960393906, -0.14300009608268738, -0.7902095913887024, 0.02960437536239624, 0.9184170961380005, -0.2712000012397766, 0.03001411445438862, 0.5737552046775818, 0.4428410232067108, 0.04760628193616867, -0.19347095489501953, 0.011480634100735188, 0.47104936838150024, 0.4972999095916748, 0.776156485080719, 0.4797791540622711, -0.7884243130683899, 0.6510019898414612, -0.7378926277160645, -0.44034695625305176, -0.1651669144630432, -0.6655962467193604, -0.7550720572471619, -0.5637380480766296, -0.361022412776947, -0.46882331371307373, -0.11496280878782272, 0.9344594478607178, 0.7101269960403442, -0.8526251316070557, -0.11276444792747498, -0.2323193997144699, -0.14045646786689758, -0.1720835417509079, -0.293973445892334, 0.23000375926494598, -0.5783064961433411, -0.9758357405662537, -0.0008928445167839527, -0.1969030499458313, 0.3112940788269043, -0.1637563705444336, 0.03473431617021561, -0.28402504324913025, -0.24703015387058258, 0.25013643503189087, 0.20741090178489685, -0.6325064301490784, -0.203909769654274, -0.1589861363172531, -0.11233469098806381, 0.22636975347995758, 0.2839672267436981, -0.8277469277381897, 0.4945555031299591, 0.4583246111869812, 0.16125380992889404, 0.8728383779525757, -0.2893770635128021, 0.49430182576179504, -0.4496017098426819, 0.3273509740829468, 0.3994859457015991, 0.5434757471084595, 0.003195306286215782, -0.27990344166755676, 0.46245354413986206, 0.18329930305480957, -0.8084815144538879, -0.6660977602005005, -0.23694820702075958, -1.0440850257873535, -0.09101109951734543, 0.8665148615837097, -0.4079626798629761, -0.240012526512146, 0.36476102471351624, -0.28843954205513, 0.36986345052719116, -0.47359758615493774, 0.7814735770225525, 0.6364845037460327, -0.06930501759052277, 0.1823866367340088, -0.4682924747467041, 0.42955413460731506, 0.2869490385055542, -0.4797268807888031, -0.4056060016155243, 0.20408684015274048, 0.5004621148109436, 0.21018590033054352, 0.44479647278785706, -0.025191402062773705, 0.5339940786361694, 0.06621785461902618, 0.4150802791118622, 0.08783917874097824, -0.11100652068853378, -0.3753892183303833, -0.25053417682647705, -0.06923184543848038, -0.46990519762039185 ]
timm/cait_m36_384.fb_dist_in1k
timm
"2023-04-13T01:40:32Z"
29,526
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2103.17239", "license:apache-2.0", "region:us" ]
image-classification
"2023-04-13T01:37:00Z"
--- tags: - image-classification - timm library_tag: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for cait_m36_384.fb_dist_in1k A CaiT (Class-Attention in Image Transformers) image classification model. Pretrained on ImageNet-1k with distillation by paper authors. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 271.2 - GMACs: 173.1 - Activations (M): 734.8 - Image size: 384 x 384 - **Papers:** - Going deeper with Image Transformers: https://arxiv.org/abs/2103.17239 - **Dataset:** ImageNet-1k - **Original:** https://github.com/facebookresearch/deit ## 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('cait_m36_384.fb_dist_in1k', 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( 'cait_m36_384.fb_dist_in1k', 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, 577, 768) shaped tensor output = model.forward_head(output, pre_logits=True) # output is a (1, num_features) shaped tensor ``` ## Citation ```bibtex @InProceedings{Touvron_2021_ICCV, author = {Touvron, Hugo and Cord, Matthieu and Sablayrolles, Alexandre and Synnaeve, Gabriel and J'egou, Herv'e}, title = {Going Deeper With Image Transformers}, booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)}, month = {October}, year = {2021}, pages = {32-42} } ```
[ -0.5380374193191528, -0.38200125098228455, 0.040681056678295135, 0.2768196165561676, -0.41062673926353455, -0.3243170976638794, -0.13139823079109192, -0.26895081996917725, 0.2034178078174591, 0.33244842290878296, -0.6174395680427551, -0.6006470322608948, -0.7894330620765686, -0.13783778250217438, -0.3086709976196289, 1.0958044528961182, -0.04586383327841759, -0.009889998473227024, -0.12473871558904648, -0.31619328260421753, -0.3231043815612793, -0.29731467366218567, -0.8890783190727234, -0.3140440285205841, 0.3878430426120758, 0.2402057945728302, 0.5661712288856506, 0.55912184715271, 0.713920533657074, 0.4638572335243225, -0.06258905678987503, -0.00260994303971529, -0.4517901837825775, -0.37647926807403564, 0.26358550786972046, -0.5664163827896118, -0.4607243239879608, 0.23425844311714172, 0.8126232028007507, 0.4294314384460449, 0.1521587371826172, 0.40477046370506287, 0.2646215260028839, 0.5228858590126038, -0.26533085107803345, 0.22113579511642456, -0.43919941782951355, 0.29167434573173523, -0.21603365242481232, 0.0814802274107933, -0.33617526292800903, -0.29954031109809875, 0.28788766264915466, -0.4982044994831085, 0.5190091729164124, -0.059345412999391556, 1.2987385988235474, 0.3496994376182556, -0.0971624106168747, 0.06557177752256393, -0.28202950954437256, 0.8044416904449463, -0.7168809771537781, 0.41589584946632385, 0.27388796210289, 0.10953770577907562, -0.08299019932746887, -1.0624170303344727, -0.609900712966919, -0.12498190253973007, -0.23980200290679932, 0.05073246732354164, -0.18406260013580322, 0.06139048933982849, 0.41328608989715576, 0.42533794045448303, -0.4878033995628357, 0.017316719517111778, -0.6248654723167419, -0.20065008103847504, 0.5444303154945374, 0.023646805435419083, 0.19685189425945282, -0.11265062540769577, -0.5992435812950134, -0.5555514097213745, -0.21648280322551727, 0.3250865340232849, 0.38548219203948975, 0.10931042581796646, -0.6380545496940613, 0.4613381028175354, 0.08855549991130829, 0.3526158630847931, 0.34080758690834045, -0.27214643359184265, 0.6118263006210327, 0.0974203571677208, -0.49643582105636597, -0.05224631726741791, 0.9346593618392944, 0.23841160535812378, 0.23901207745075226, 0.07759159803390503, -0.06326700001955032, -0.25772055983543396, -0.0392940491437912, -1.1437797546386719, -0.35924991965293884, 0.18979346752166748, -0.5996019840240479, -0.4549155831336975, 0.2922947406768799, -0.5348948836326599, -0.02547498047351837, -0.06042802706360817, 0.7407909631729126, -0.4538116753101349, -0.3210410475730896, 0.16854727268218994, -0.05994796007871628, 0.5300763845443726, 0.05368076637387276, -0.6355574131011963, 0.20271365344524384, 0.28585994243621826, 1.076007604598999, 0.03520902246236801, -0.3955138325691223, -0.23502027988433838, -0.2441142350435257, -0.23427675664424896, 0.5940937399864197, -0.06708882004022598, -0.22662034630775452, -0.25751304626464844, 0.42360803484916687, -0.21077316999435425, -0.49215373396873474, 0.484367311000824, -0.27275004982948303, 0.276048868894577, 0.0815795361995697, -0.20920330286026, -0.426154226064682, 0.32402119040489197, -0.4556950628757477, 1.139694094657898, 0.36619502305984497, -0.9697375893592834, 0.34541741013526917, -0.594829261302948, -0.1900080293416977, -0.17619583010673523, -0.0013769879005849361, -1.0968245267868042, -0.13788633048534393, 0.2585127353668213, 0.7583392262458801, -0.17776523530483246, 0.09034115821123123, -0.5185232758522034, -0.24584127962589264, 0.34000954031944275, -0.24100425839424133, 1.0177764892578125, 0.11888650059700012, -0.34380361437797546, 0.1646905243396759, -0.597916305065155, 0.09052002429962158, 0.4192170202732086, -0.26232168078422546, 0.005490949843078852, -0.6786931157112122, 0.14326849579811096, 0.23516297340393066, 0.10082312673330307, -0.6035515069961548, 0.3341924846172333, -0.20268365740776062, 0.30281832814216614, 0.7272382378578186, -0.09440959244966507, 0.34087231755256653, -0.3819136917591095, 0.34231287240982056, 0.3523866832256317, 0.33768895268440247, -0.03780156746506691, -0.513961136341095, -0.9415044784545898, -0.5315163135528564, 0.35648050904273987, 0.36942246556282043, -0.4379938840866089, 0.46475034952163696, -0.20110748708248138, -0.7909455895423889, -0.49378111958503723, 0.03541188687086105, 0.48972076177597046, 0.5892820954322815, 0.4295530915260315, -0.6019580960273743, -0.5243530869483948, -0.9620018601417542, 0.0055057150311768055, 0.023899322375655174, 0.09292490780353546, 0.20524999499320984, 0.6866766214370728, -0.32896050810813904, 0.6148350238800049, -0.5415363311767578, -0.43509986996650696, -0.11464634537696838, 0.10936557501554489, 0.4202301800251007, 0.8948597311973572, 0.8015585541725159, -0.7506871819496155, -0.5501072406768799, -0.26936569809913635, -0.7956576347351074, 0.24078966677188873, -0.17705444991588593, -0.3832007348537445, 0.1843593418598175, 0.1911098062992096, -0.617447018623352, 0.7691032290458679, 0.15104247629642487, -0.33642542362213135, 0.5092673897743225, -0.1052139475941658, 0.15404093265533447, -1.132482886314392, 0.09121982753276825, 0.35149499773979187, -0.0768444687128067, -0.5085141062736511, -0.12601128220558167, 0.04796386882662773, 0.008880525827407837, -0.604375958442688, 0.6621909737586975, -0.5162895917892456, -0.030590761452913284, -0.07244694977998734, -0.3484566807746887, 0.02199597656726837, 0.8748864531517029, 0.04810137674212456, 0.27453291416168213, 0.8392676115036011, -0.6037217974662781, 0.4807508885860443, 0.6701810956001282, -0.20900018513202667, 0.5082307457923889, -0.6365249156951904, 0.2015855312347412, -0.09746881574392319, 0.22028683125972748, -1.1600555181503296, -0.26771825551986694, 0.3116452395915985, -0.6623983979225159, 0.7727375626564026, -0.500016450881958, -0.35853835940361023, -0.5156314373016357, -0.42923834919929504, 0.5793235898017883, 0.6789644956588745, -0.7446328997612, 0.3595111668109894, 0.1338297575712204, 0.17840257287025452, -0.7298417091369629, -0.9335641860961914, -0.2505122125148773, -0.34966862201690674, -0.8274971842765808, 0.4305645227432251, 0.008479791693389416, 0.12187860906124115, 0.11409769207239151, -0.10747389495372772, -0.08755729347467422, -0.1744171380996704, 0.409172922372818, 0.3621920943260193, -0.3194517493247986, -0.019874736666679382, -0.1904502809047699, -0.14293880760669708, 0.07582812756299973, -0.27599045634269714, 0.5786712765693665, -0.3385501503944397, -0.26668378710746765, -0.8257815837860107, -0.08247605711221695, 0.4467758238315582, -0.15280763804912567, 0.7311047315597534, 1.204138994216919, -0.46536412835121155, 0.06242670118808746, -0.4894208312034607, -0.3156821131706238, -0.5237226486206055, 0.532813310623169, -0.4581781327724457, -0.3734937906265259, 0.7993353009223938, 0.15354806184768677, 0.11254233121871948, 0.7335543036460876, 0.4105261564254761, -0.032042246311903, 0.9856213331222534, 0.7174467444419861, 0.14417748153209686, 0.7274565696716309, -1.0600851774215698, -0.14296430349349976, -0.9336917400360107, -0.5379757285118103, -0.3523424565792084, -0.5920230150222778, -0.634312093257904, -0.27981626987457275, 0.35781335830688477, 0.0691763162612915, -0.48655107617378235, 0.4292115867137909, -0.7743952870368958, 0.10315187275409698, 0.6691477298736572, 0.5493948459625244, -0.2795763611793518, 0.19898363947868347, -0.24801237881183624, 0.03906818851828575, -0.6470291614532471, -0.20164893567562103, 0.9760755896568298, 0.5460947751998901, 0.8450517654418945, -0.12949256598949432, 0.6630728840827942, -0.19359062612056732, 0.3541714549064636, -0.7039675712585449, 0.5199841260910034, -0.11600989103317261, -0.5178225040435791, -0.18376964330673218, -0.22730247676372528, -1.0733166933059692, 0.06607061624526978, -0.2654809057712555, -0.6621024012565613, 0.2847590744495392, 0.1407841295003891, -0.24406245350837708, 0.6905640959739685, -0.7268010973930359, 0.9815047383308411, -0.18619213998317719, -0.46710801124572754, 0.1009979173541069, -0.6815527081489563, 0.3645804822444916, 0.0913376733660698, -0.2523350417613983, 0.018730929121375084, 0.29696181416511536, 1.1436283588409424, -0.4963372051715851, 0.941612958908081, -0.3768664002418518, 0.2631138861179352, 0.5202656984329224, -0.08848262578248978, 0.28128278255462646, 0.043702609837055206, 0.03902749717235565, 0.2866724729537964, 0.08750180155038834, -0.5165792107582092, -0.4750012755393982, 0.5864202976226807, -0.9906911253929138, -0.5364353060722351, -0.4511866271495819, -0.5239877104759216, 0.08658992499113083, 0.13904738426208496, 0.6545713543891907, 0.7342384457588196, 0.1858106106519699, 0.41798728704452515, 0.7168869972229004, -0.30984577536582947, 0.4609663784503937, -0.1715504676103592, -0.11542803794145584, -0.3530840575695038, 0.7872698307037354, 0.12357078492641449, 0.15678943693637848, 0.18531250953674316, 0.19882459938526154, -0.42736631631851196, -0.47367140650749207, -0.32228896021842957, 0.4092431366443634, -0.7216473817825317, -0.469168484210968, -0.6727473735809326, -0.5874056816101074, -0.6485877633094788, -0.12085717171430588, -0.4007839858531952, -0.33498117327690125, -0.5351610779762268, 0.10100265592336655, 0.5862203240394592, 0.5363149642944336, -0.21611712872982025, 0.5907484292984009, -0.682648241519928, 0.14626987278461456, 0.2642662525177002, 0.5622404217720032, -0.021032346412539482, -1.160056710243225, -0.2893206477165222, -0.04420735687017441, -0.6109983325004578, -0.7567265033721924, 0.6118701696395874, 0.1892484873533249, 0.6080451011657715, 0.5730602741241455, -0.2004849910736084, 0.926638662815094, 0.03768320754170418, 0.4851313531398773, 0.3432561755180359, -0.6412741541862488, 0.5181981325149536, -0.11205119639635086, 0.2331264317035675, 0.0980326309800148, 0.4548438787460327, -0.3181229829788208, -0.0785340741276741, -1.0273444652557373, -0.7003790140151978, 0.8690876960754395, 0.2580171823501587, 0.11800461262464523, 0.324678510427475, 0.6696253418922424, 0.02541188895702362, -0.013150953687727451, -0.906980574131012, -0.40443742275238037, -0.43591442704200745, -0.3232114017009735, -0.016975615173578262, -0.042863741517066956, 0.09941475093364716, -0.6559802293777466, 0.8454203009605408, -0.10868918895721436, 0.7790444493293762, 0.3859790563583374, -0.1341734379529953, -0.08761066943407059, -0.35409972071647644, 0.3847111165523529, 0.17975085973739624, -0.3165591359138489, 0.02138468623161316, 0.27976733446121216, -0.7176631689071655, -0.008874098770320415, 0.1790269911289215, 0.14008331298828125, -0.08622252941131592, 0.44793951511383057, 0.8635843992233276, -0.007614030968397856, 0.0917891189455986, 0.47849035263061523, -0.19591030478477478, -0.3731309771537781, -0.41616204380989075, 0.10546911507844925, -0.13445574045181274, 0.4723583161830902, 0.34719887375831604, 0.3093256652355194, -0.027461685240268707, -0.3096853792667389, 0.2580946385860443, 0.6123175621032715, -0.5553988218307495, -0.39254626631736755, 0.6498534083366394, -0.18265753984451294, -0.10989715903997421, 0.8878771066665649, -0.0012866959441453218, -0.5195273160934448, 1.118485450744629, 0.4717499315738678, 1.0453007221221924, -0.1052723228931427, 0.004055737517774105, 0.854607105255127, 0.173709437251091, -0.004450641106814146, 0.09489480406045914, 0.10275012254714966, -0.7474678158760071, -0.005624306853860617, -0.6615132093429565, 0.051693547517061234, 0.4410080015659332, -0.5650246739387512, 0.522836446762085, -0.6096723675727844, -0.29601991176605225, 0.10296283662319183, 0.3329358994960785, -1.037375569343567, 0.31439825892448425, 0.08909884095191956, 0.8701958656311035, -0.7473340034484863, 0.7506736516952515, 0.7910584211349487, -0.6486161947250366, -1.021597981452942, -0.20630452036857605, -0.07405843585729599, -0.9123230576515198, 0.6754111647605896, 0.48155921697616577, 0.10119015723466873, 0.2600444257259369, -1.003122091293335, -0.7365524768829346, 1.3680377006530762, 0.39398324489593506, -0.09357830882072449, 0.1551836133003235, 0.04649161174893379, 0.2651977241039276, -0.4221964478492737, 0.4615689516067505, 0.2978912591934204, 0.4517001211643219, 0.3150085508823395, -0.6896461248397827, 0.15078243613243103, -0.3048061728477478, -0.042762912809848785, 0.19640465080738068, -0.9358759522438049, 0.9770487546920776, -0.5953986644744873, -0.18634763360023499, 0.14439746737480164, 0.7765548229217529, 0.16275854408740997, 0.13077808916568756, 0.5717685222625732, 0.7869287133216858, 0.4180862605571747, -0.20481015741825104, 0.7982748746871948, 0.10215111821889877, 0.6568257212638855, 0.5403026938438416, 0.40369144082069397, 0.3964466452598572, 0.37823742628097534, -0.20611153542995453, 0.46461185812950134, 1.0842256546020508, -0.4560996890068054, 0.44962888956069946, 0.15641887485980988, 0.019025765359401703, -0.16658426821231842, 0.12340272217988968, -0.47160694003105164, 0.5359903573989868, 0.24335438013076782, -0.4847679138183594, -0.1482282131910324, 0.11781968921422958, -0.04077786207199097, -0.37362590432167053, -0.2896745204925537, 0.5655924081802368, 0.05805213376879692, -0.4362941086292267, 0.7542017698287964, -0.07295701652765274, 0.835850179195404, -0.37322503328323364, -0.07729532569646835, -0.2997077405452728, 0.38741597533226013, -0.36997511982917786, -0.8823965191841125, 0.2450992316007614, -0.28371354937553406, -0.010289046913385391, 0.01226260606199503, 0.7531975507736206, -0.3715263605117798, -0.5532082915306091, 0.1250760555267334, 0.16246385872364044, 0.5261231064796448, -0.004640914965420961, -1.124886393547058, -0.05223313346505165, 0.1373959183692932, -0.6369139552116394, 0.268498957157135, 0.42709678411483765, 0.006124590523540974, 0.7249084115028381, 0.6698789000511169, -0.2629240155220032, 0.21057967841625214, -0.27711158990859985, 0.891912043094635, -0.4961998164653778, -0.38488826155662537, -0.8071534037590027, 0.6755543351173401, -0.010443229228258133, -0.6381672024726868, 0.43309417366981506, 0.5988990068435669, 0.9888687133789062, -0.16259202361106873, 0.522167980670929, -0.2097414880990982, -0.015777532011270523, -0.36429649591445923, 0.731640100479126, -0.651506245136261, -0.13645637035369873, -0.31180399656295776, -0.8645004034042358, -0.38448378443717957, 0.7680978775024414, -0.24710142612457275, 0.4200945198535919, 0.5686044096946716, 0.9221481680870056, -0.4374149739742279, -0.31665536761283875, 0.26236072182655334, 0.222596675157547, 0.22266210615634918, 0.4214077889919281, 0.5035426020622253, -0.8501767516136169, 0.5640515685081482, -0.6392155885696411, -0.21330884099006653, -0.21056470274925232, -0.662371814250946, -1.0924397706985474, -0.924551248550415, -0.6314480900764465, -0.6068053841590881, -0.3481820225715637, 0.8437867164611816, 1.0252408981323242, -0.6508063673973083, -0.008068302646279335, 0.14543798565864563, 0.03465097397565842, -0.18231894075870514, -0.23995430767536163, 0.7517982125282288, -0.2311447560787201, -0.8678728342056274, -0.4850977957248688, -0.09539777785539627, 0.5632043480873108, -0.1471356749534607, -0.20593643188476562, -0.2823195457458496, -0.1886148452758789, 0.2937391996383667, 0.3254441022872925, -0.4961579144001007, -0.27627816796302795, -0.07690227031707764, -0.155476376414299, 0.3836348056793213, 0.3572315573692322, -0.6582350134849548, 0.21480728685855865, 0.4552081823348999, 0.3954276442527771, 0.9820455312728882, -0.2541459798812866, -0.039457522332668304, -0.8722494840621948, 0.5535138845443726, -0.022103235125541687, 0.5249179601669312, 0.37886670231819153, -0.4507908523082733, 0.5752845406532288, 0.3583478629589081, -0.5252259373664856, -0.8585964441299438, -0.05379778891801834, -1.1692332029342651, -0.004183386918157339, 0.9238521456718445, -0.3081287443637848, -0.5609468221664429, 0.31465044617652893, -0.22274835407733917, 0.7607844471931458, -0.07309278845787048, 0.5855627059936523, 0.26830220222473145, -0.1632044017314911, -0.4841558337211609, -0.35124674439430237, 0.4667818546295166, 0.17257340252399445, -0.5707603693008423, -0.5674713253974915, -0.08282444626092911, 0.6348150372505188, 0.2979332506656647, 0.39689433574676514, -0.2471579909324646, 0.15616720914840698, 0.06888913363218307, 0.50041264295578, -0.2583714425563812, -0.08566093444824219, -0.26957109570503235, -0.11884163320064545, -0.14987775683403015, -0.6081214547157288 ]
tugstugi/bert-large-mongolian-uncased
tugstugi
"2021-05-20T08:19:28Z"
29,474
5
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "mongolian", "uncased", "mn", "arxiv:1810.04805", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: "mn" tags: - bert - mongolian - uncased --- # BERT-LARGE-MONGOLIAN-UNCASED [Link to Official Mongolian-BERT repo](https://github.com/tugstugi/mongolian-bert) ## Model description This repository contains pre-trained Mongolian [BERT](https://arxiv.org/abs/1810.04805) models trained by [tugstugi](https://github.com/tugstugi), [enod](https://github.com/enod) and [sharavsambuu](https://github.com/sharavsambuu). Special thanks to [nabar](https://github.com/nabar) who provided 5x TPUs. This repository is based on the following open source projects: [google-research/bert](https://github.com/google-research/bert/), [huggingface/pytorch-pretrained-BERT](https://github.com/huggingface/pytorch-pretrained-BERT) and [yoheikikuta/bert-japanese](https://github.com/yoheikikuta/bert-japanese). #### How to use ```python from transformers import pipeline, AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained('tugstugi/bert-large-mongolian-uncased', use_fast=False) model = AutoModelForMaskedLM.from_pretrained('tugstugi/bert-large-mongolian-uncased') ## declare task ## pipe = pipeline(task="fill-mask", model=model, tokenizer=tokenizer) ## example ## input_ = 'Монгол улсын [MASK] Улаанбаатар хотоос ярьж байна.' output_ = pipe(input_) for i in range(len(output_)): print(output_[i]) ## output ## # {'sequence': 'монгол улсын нийслэл улаанбаатар хотоос ярьж байна.', 'score': 0.7867621183395386, 'token': 849, 'token_str': 'нийслэл'} # {'sequence': 'монгол улсын ерөнхийлөгч улаанбаатар хотоос ярьж байна.', 'score': 0.14303277432918549, 'token': 244, 'token_str': 'ерөнхийлөгч'} # {'sequence': 'монгол улсын ерөнхийлөгчийг улаанбаатар хотоос ярьж байна.', 'score': 0.011642335914075375, 'token': 8373, 'token_str': 'ерөнхийлөгчийг'} # {'sequence': 'монгол улсын иргэд улаанбаатар хотоос ярьж байна.', 'score': 0.006592822726815939, 'token': 247, 'token_str': 'иргэд'} # {'sequence': 'монгол улсын нийслэлийг улаанбаатар хотоос ярьж байна.', 'score': 0.006165097933262587, 'token': 15501, 'token_str': 'нийслэлийг'} ``` ## Training data Mongolian Wikipedia and the 700 million word Mongolian news data set [[Pretraining Procedure](https://github.com/tugstugi/mongolian-bert#pre-training)] ### BibTeX entry and citation info ```bibtex @misc{mongolian-bert, author = {Tuguldur, Erdene-Ochir and Gunchinish, Sharavsambuu and Bataa, Enkhbold}, title = {BERT Pretrained Models on Mongolian Datasets}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/tugstugi/mongolian-bert/}} } ```
[ -0.42071765661239624, -0.46932631731033325, -0.05850648134946823, 0.2630133628845215, -0.5807185173034668, 0.025286531075835228, -0.3439996838569641, -0.13477499783039093, 0.36273321509361267, 0.11054045706987381, -0.6599090099334717, -0.6663621068000793, -0.7020230293273926, -0.03198143094778061, -0.35245662927627563, 1.1870735883712769, -0.04604105278849602, 0.323198527097702, 0.22696194052696228, -0.1555851399898529, -0.09529126435518265, -0.5258294343948364, -0.20512628555297852, -0.40651676058769226, 0.5271089673042297, 0.16879703104496002, 0.4028138518333435, 0.5119353532791138, 0.47012466192245483, 0.4085429012775421, -0.046539049595594406, -0.25046584010124207, -0.37143805623054504, -0.13190340995788574, 0.4521275460720062, -0.28489798307418823, -0.3689691126346588, -0.13398583233356476, 0.9342555403709412, 0.6120699644088745, -0.23081500828266144, 0.34615638852119446, -0.08206460624933243, 0.6195595264434814, -0.3476817011833191, 0.06927701085805893, -0.41674938797950745, 0.11796586215496063, -0.3935628831386566, 0.21765907108783722, -0.17222139239311218, -0.43580952286720276, 0.3159562349319458, -0.6300370693206787, 0.16843730211257935, -0.050579994916915894, 1.4797272682189941, 0.06699848920106888, -0.07019000500440598, -0.14026981592178345, -0.38792410492897034, 0.9065777659416199, -1.1728590726852417, 0.3324994742870331, 0.3618558645248413, 0.07582516223192215, -0.15900109708309174, -0.911449134349823, -0.7051971554756165, -0.1285007894039154, -0.27402856945991516, 0.2551578879356384, -0.11799737811088562, -0.0973551869392395, 0.4342482089996338, 0.41579675674438477, -0.8739228844642639, 0.17391224205493927, -0.5837730169296265, -0.42498260736465454, 0.635199785232544, -0.1555500328540802, 0.13779374957084656, -0.48429006338119507, -0.2863229513168335, -0.5845357179641724, -0.4123510420322418, 0.3097192049026489, 0.7418516874313354, 0.14706569910049438, -0.3538379371166229, 0.7331966757774353, -0.24573585391044617, 0.7293309569358826, 0.20277361571788788, -0.08960533142089844, 0.7227189540863037, -0.1613420844078064, -0.34988850355148315, -0.0005925834411755204, 1.1230701208114624, 0.025505920872092247, 0.10945302993059158, 0.10919168591499329, -0.17034414410591125, -0.3754761815071106, -0.030035197734832764, -0.8776321411132812, -0.3448556959629059, 0.1873999685049057, -0.5357643961906433, -0.11582602560520172, 0.35294678807258606, -0.7862704992294312, 0.1787097007036209, -0.202261820435524, 0.9234663248062134, -0.7425143718719482, -0.21355804800987244, 0.06956139951944351, -0.04348019137978554, 0.6208505034446716, -0.07884781807661057, -0.8845825791358948, -0.06652235984802246, 0.3232387900352478, 0.7814314961433411, 0.3021391034126282, -0.37488025426864624, -0.16354764997959137, -0.15545989573001862, -0.21691814064979553, 0.5642063021659851, -0.1308005154132843, -0.21736878156661987, 0.06915552914142609, 0.2638293206691742, -0.15605692565441132, -0.2903865873813629, 0.3780810534954071, -0.4168807566165924, 0.5113188028335571, -0.18259838223457336, -0.5933783650398254, -0.20130224525928497, 0.11414657533168793, -0.5563070774078369, 1.1033241748809814, 0.06387269496917725, -0.9667859077453613, 0.5015547871589661, -0.7449572682380676, -0.5018901824951172, -0.05826924741268158, 0.2731296420097351, -0.8139515519142151, -0.23510126769542694, 0.23939795792102814, 0.5686882138252258, -0.029599150642752647, 0.25419551134109497, -0.32676318287849426, -0.38852253556251526, 0.2344338744878769, -0.057123709470033646, 1.1603468656539917, 0.2585453689098358, -0.3942076563835144, 0.30373239517211914, -1.027665138244629, 0.4073491394519806, 0.22860826551914215, -0.5037760138511658, 0.05403278395533562, -0.21656973659992218, -0.09022792428731918, 0.0466504842042923, 0.42964568734169006, -0.5183351635932922, 0.28261998295783997, -0.5742747783660889, 0.514011025428772, 0.9316443800926208, -0.347664475440979, 0.2193828523159027, -0.35152745246887207, 0.32949891686439514, 0.02655941992998123, 0.03143610805273056, -0.21614548563957214, -0.34962359070777893, -1.003903865814209, -0.4595355987548828, 0.743991494178772, 0.6192615032196045, -0.7067763209342957, 1.1466692686080933, -0.27024829387664795, -0.9077454805374146, -0.7116670608520508, -0.10325488448143005, 0.3128115236759186, 0.3904035985469818, 0.3836260735988617, -0.44596347212791443, -0.8889449238777161, -0.8135005235671997, -0.027511999011039734, -0.2587585747241974, -0.1549745500087738, 0.15566673874855042, 0.8422551155090332, -0.2293565571308136, 0.6473503708839417, -0.46664053201675415, -0.18645402789115906, -0.13058607280254364, 0.40117591619491577, 0.7838247418403625, 0.9219704866409302, 0.47939640283584595, -0.39268749952316284, -0.6174859404563904, -0.06800723075866699, -0.6425608396530151, 0.031220002099871635, -0.0210791677236557, -0.28312957286834717, 0.4193831980228424, 0.12667153775691986, -0.6317075490951538, 0.37508201599121094, 0.48869481682777405, -0.2196034938097, 0.8744430541992188, -0.3338512182235718, 0.14266954362392426, -1.1515424251556396, 0.5471594333648682, -0.25567781925201416, 0.13386093080043793, -0.6144375205039978, -0.16256491839885712, 0.05396837368607521, 0.08525209128856659, -0.4369114637374878, 0.5361511707305908, -0.4028635323047638, -0.12439022958278656, 0.35391420125961304, -0.3283615708351135, -0.2914273738861084, 0.7945695519447327, 0.14618951082229614, 0.5309551954269409, 0.7207667827606201, -0.4197295606136322, 0.4245198965072632, 0.27696478366851807, -0.757519006729126, -0.007832823321223259, -0.93732750415802, 0.021964462473988533, 0.06317420303821564, 0.19482825696468353, -1.0420358180999756, -0.5516542792320251, 0.47329217195510864, -0.8815287947654724, 0.5175295472145081, -0.17650188505649567, -0.6763345003128052, -0.7487658262252808, -0.4391201138496399, 0.19623889029026031, 0.8797372579574585, -0.42689278721809387, 0.2717626690864563, 0.07258220762014389, -0.0019709807820618153, -0.9551696181297302, -0.7980605363845825, -0.3938461244106293, -0.2042924016714096, -0.7174261808395386, 0.37124159932136536, -0.22674380242824554, 0.3112584054470062, -0.04613855853676796, -0.10096047818660736, -0.3254038393497467, -0.05506407096982002, -0.08851251751184464, 0.46155866980552673, -0.29383277893066406, 0.11235342174768448, -0.16182205080986023, 0.07291360199451447, 0.08164815604686737, -0.34928882122039795, 0.8113423585891724, -0.17949815094470978, -0.3324877619743347, -0.5762784481048584, 0.14269337058067322, 0.3847915828227997, -0.229962557554245, 0.8899492025375366, 1.3330762386322021, -0.346958190202713, 0.2398289442062378, -0.41421687602996826, -0.19643230736255646, -0.5098801851272583, 0.3682047724723816, -0.16910937428474426, -0.8102105259895325, 0.796033501625061, 0.27728044986724854, 0.04726359248161316, 0.6880245208740234, 0.5848027467727661, -0.3855551481246948, 0.9206688404083252, 0.15901757776737213, -0.017096010968089104, 0.5862458348274231, -0.7608519792556763, 0.09564230591058731, -0.756790041923523, -0.42530322074890137, -0.517650306224823, -0.3054758608341217, -0.6673514246940613, -0.18185868859291077, 0.23432256281375885, 0.146857351064682, -0.6941647529602051, 0.39132797718048096, -0.5892572402954102, 0.16092675924301147, 0.8711726665496826, 0.18053974211215973, -0.39758744835853577, 0.10396786034107208, -0.513727605342865, -0.06086862459778786, -0.7808080315589905, -0.278315931558609, 1.2780239582061768, 0.19538603723049164, 0.822784423828125, 0.09562665224075317, 0.7106019854545593, 0.14010758697986603, 0.0768190324306488, -0.725568413734436, 0.46513932943344116, -0.1408381313085556, -0.877690315246582, -0.5509814620018005, -0.31346961855888367, -1.2281849384307861, 0.08804420381784439, -0.3638100028038025, -0.7895510196685791, -0.12044764310121536, 0.09720632433891296, -0.26818665862083435, 0.38245803117752075, -0.7932912707328796, 0.9713846445083618, -0.2420702576637268, -0.24274086952209473, 0.06107644364237785, -1.0647271871566772, 0.42491617798805237, -0.10626289248466492, -0.05485855042934418, 0.010403810068964958, 0.42263564467430115, 1.1268285512924194, -0.7187725305557251, 0.8590335845947266, -0.24312591552734375, 0.08665221929550171, 0.3708711862564087, -0.33092865347862244, 0.5232318043708801, -0.08141914010047913, 0.07421290129423141, 0.4536188542842865, -0.03308303654193878, -0.6619380712509155, -0.14583531022071838, 0.5705960988998413, -1.0910289287567139, -0.588044285774231, -0.7633841633796692, -0.3712480366230011, 0.26593759655952454, 0.5198345184326172, 0.673386812210083, 0.4893394112586975, 0.03176530450582504, 0.529992938041687, 0.618224024772644, -0.46188485622406006, 0.5945040583610535, 0.3668007254600525, 0.1352262943983078, -0.7065510749816895, 0.7797626256942749, 0.261555939912796, 0.08573093265295029, 0.34396061301231384, 0.1746867448091507, -0.46133285760879517, -0.5830379724502563, -0.39776334166526794, 0.3756145238876343, -0.5997381806373596, -0.27205413579940796, -0.48262444138526917, -0.5073302984237671, -0.7503232359886169, -0.03441772237420082, -0.24666768312454224, -0.380594402551651, -0.3681509792804718, 0.09781036525964737, 0.5175492763519287, 0.4989105761051178, -0.5478916764259338, 0.3398515582084656, -0.8873430490493774, 0.2338716685771942, 0.45844483375549316, 0.4186387360095978, 0.06638050079345703, -0.8150100111961365, -0.5272599458694458, 0.049336183816194534, -0.3885825574398041, -0.7929292917251587, 0.6375664472579956, 0.06798902899026871, 0.7797004580497742, 0.4883408844470978, -0.07146231085062027, 0.9404361248016357, -0.4611913561820984, 0.9360832571983337, 0.4003637135028839, -1.1410496234893799, 0.6508952975273132, -0.4031720757484436, 0.4755350947380066, 0.2247747927904129, 0.5536013841629028, -0.4765615165233612, -0.17881670594215393, -0.7801052331924438, -1.0319770574569702, 1.106618881225586, 0.28589364886283875, 0.08267966657876968, 0.18167294561862946, 0.00003111005207756534, 0.1909346580505371, 0.21706901490688324, -0.9752534031867981, -0.595902144908905, -0.6436255574226379, -0.3076329827308655, 0.029730631038546562, -0.20305708050727844, -0.06877195835113525, -0.6921799182891846, 0.9878780245780945, 0.11832144856452942, 0.6962700486183167, 0.3739881217479706, -0.251600980758667, -0.059483788907527924, 0.07208968698978424, 0.6837608218193054, 0.536851704120636, -0.46299776434898376, -0.33793091773986816, 0.23141230642795563, -0.6800270676612854, 0.052768461406230927, 0.4934002757072449, -0.21449807286262512, 0.23281264305114746, 0.6296331882476807, 1.0310280323028564, 0.20241384208202362, -0.4878688156604767, 0.4584692120552063, 0.18384484946727753, -0.4721372425556183, -0.6037493348121643, -0.11234590411186218, 0.02062491700053215, 0.10997458547353745, 0.6746575236320496, -0.15653084218502045, -0.1358422487974167, -0.36756646633148193, 0.18392470479011536, 0.3651123642921448, -0.18232126533985138, -0.5199548006057739, 0.5987512469291687, -0.028108948841691017, -0.13360589742660522, 0.664185106754303, -0.1383432149887085, -0.7146068215370178, 0.823463499546051, 0.34533360600471497, 0.7720531821250916, -0.20112305879592896, 0.1399366706609726, 1.0067332983016968, 0.21953384578227997, -0.05272722989320755, 0.33070605993270874, -0.05740045756101608, -0.7075077295303345, -0.42918235063552856, -0.7132574915885925, -0.039652567356824875, 0.5318591594696045, -0.8160161972045898, 0.39825063943862915, -0.3738936483860016, -0.20668983459472656, 0.15476006269454956, 0.3185792863368988, -0.6595657467842102, 0.2234376072883606, 0.2340351790189743, 0.7261338829994202, -0.6615402698516846, 1.0205280780792236, 0.8222032189369202, -0.31907668709754944, -0.8696319460868835, -0.19492588937282562, -0.45586976408958435, -1.010244607925415, 0.8865475058555603, 0.17861385643482208, 0.4569860100746155, 0.11656329035758972, -0.6993729472160339, -1.1830693483352661, 1.2241525650024414, 0.1484905183315277, -0.40682145953178406, 0.04126077890396118, -0.14731071889400482, 0.4627207815647125, 0.0013977157650515437, 0.3115253746509552, 0.3864406645298004, 0.709636926651001, 0.29366347193717957, -0.9613283276557922, 0.01757652685046196, -0.3032308518886566, -0.21452836692333221, 0.3725714385509491, -0.8221074938774109, 1.0563254356384277, -0.325009822845459, -0.0903797596693039, 0.4037659764289856, 0.6860792636871338, 0.4275950789451599, 0.01880912482738495, 0.45330023765563965, 0.7870375514030457, 0.6720027923583984, -0.4169119596481323, 0.6614000201225281, -0.20834772288799286, 0.6670635938644409, 0.7265926599502563, 0.13709768652915955, 0.6287389397621155, 0.39390289783477783, -0.5457969903945923, 0.8562853336334229, 0.9339274764060974, -0.47933152318000793, 0.8611405491828918, 0.39727526903152466, 0.011767267249524593, -0.1794564574956894, 0.29845237731933594, -0.6244820952415466, 0.5047504305839539, 0.2764546573162079, -0.3318483531475067, -0.0019536092877388, -0.23930193483829498, 0.22883440554141998, -0.3643241822719574, -0.1299695074558258, 0.5535897612571716, -0.23640549182891846, -0.7422576546669006, 1.0569732189178467, -0.1336795687675476, 0.8800646662712097, -1.0760138034820557, 0.14315006136894226, -0.06631872802972794, 0.0043626087717711926, -0.06074406951665878, -0.7651233077049255, 0.02686794102191925, 0.08349635452032089, -0.02681470476090908, -0.0532231330871582, 0.5420447587966919, -0.43883001804351807, -0.6340200304985046, 0.09200605750083923, 0.2729080319404602, 0.34745922684669495, 0.4926338791847229, -0.9080008864402771, -0.23969730734825134, 0.2633169889450073, -0.6660251617431641, 0.19224253296852112, 0.5287853479385376, 0.31592410802841187, 0.5264787077903748, 1.0104906558990479, 0.08664125949144363, 0.28978002071380615, -0.16247478127479553, 0.9235754013061523, -0.7758830785751343, -0.3716614842414856, -0.8089386820793152, 0.7904127240180969, -0.04467184469103813, -0.5793308615684509, 0.5894182324409485, 0.4800414443016052, 1.0543842315673828, -0.3893359303474426, 0.6684391498565674, -0.5037116408348083, 0.39186787605285645, -0.6928609013557434, 0.9641209840774536, -0.6891776919364929, -0.3022942543029785, -0.15961392223834991, -0.6714266538619995, -0.3605363368988037, 0.9147692322731018, -0.11904997378587723, 0.17935711145401, 0.6208610534667969, 0.5361467003822327, 0.26924818754196167, -0.41181766986846924, 0.10151777416467667, 0.45521241426467896, 0.14067642390727997, 0.6644623875617981, 0.6374764442443848, -0.5914161801338196, 0.7357428073883057, -0.5582582354545593, 0.09874078631401062, -0.3176320791244507, -0.8808910250663757, -1.0237255096435547, -0.6829081773757935, -0.22621946036815643, -0.36038145422935486, -0.1352933943271637, 1.0520236492156982, 0.9874704480171204, -0.9821957945823669, -0.20689818263053894, 0.07516608387231827, 0.10074545443058014, -0.21378391981124878, -0.2603372037410736, 0.6858285069465637, -0.23760731518268585, -0.8595537543296814, -0.0622917041182518, -0.2983984351158142, 0.515987753868103, -0.09945330023765564, -0.2667473554611206, -0.5982865691184998, -0.07658718526363373, 0.2737528681755066, 0.4676787555217743, -0.8824329972267151, -0.3418731093406677, 0.13652610778808594, -0.01990494877099991, 0.14009734988212585, 0.2342197299003601, -0.7039655447006226, 0.47363126277923584, 0.651405930519104, 0.26104360818862915, 0.6938571333885193, -0.21296460926532745, 0.40057671070098877, -0.8204202651977539, 0.39214545488357544, 0.08996400982141495, 0.5945799946784973, 0.2994232177734375, -0.14882449805736542, 0.5455062985420227, 0.4271364212036133, -0.6385416388511658, -0.9601936340332031, -0.3091704547405243, -1.0247912406921387, -0.13644511997699738, 0.9908308386802673, -0.48834434151649475, -0.32264959812164307, 0.3590778708457947, -0.07460584491491318, 0.7060425877571106, -0.45877891778945923, 0.8758891224861145, 1.0756312608718872, 0.2156725376844406, 0.1285039782524109, -0.3080563545227051, 0.4383803904056549, 0.4794040322303772, -0.6074691414833069, -0.2928113043308258, 0.0913383737206459, 0.2937648594379425, 0.31908196210861206, 0.34282732009887695, 0.0287775881588459, 0.28719574213027954, -0.12543831765651703, 0.4472982585430145, 0.06858113408088684, 0.10636570304632187, -0.27549096941947937, -0.37669333815574646, -0.23183314502239227, -0.5078578591346741 ]
tugstugi/bert-base-mongolian-cased
tugstugi
"2021-05-20T08:12:07Z"
29,185
0
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "mongolian", "cased", "mn", "arxiv:1810.04805", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: "mn" tags: - bert - mongolian - cased --- # BERT-BASE-MONGOLIAN-CASED [Link to Official Mongolian-BERT repo](https://github.com/tugstugi/mongolian-bert) ## Model description This repository contains pre-trained Mongolian [BERT](https://arxiv.org/abs/1810.04805) models trained by [tugstugi](https://github.com/tugstugi), [enod](https://github.com/enod) and [sharavsambuu](https://github.com/sharavsambuu). Special thanks to [nabar](https://github.com/nabar) who provided 5x TPUs. This repository is based on the following open source projects: [google-research/bert](https://github.com/google-research/bert/), [huggingface/pytorch-pretrained-BERT](https://github.com/huggingface/pytorch-pretrained-BERT) and [yoheikikuta/bert-japanese](https://github.com/yoheikikuta/bert-japanese). #### How to use ```python from transformers import pipeline, AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained('tugstugi/bert-base-mongolian-cased', use_fast=False) model = AutoModelForMaskedLM.from_pretrained('tugstugi/bert-base-mongolian-cased') ## declare task ## pipe = pipeline(task="fill-mask", model=model, tokenizer=tokenizer) ## example ## input_ = '[MASK] хот Монгол улсын нийслэл.' output_ = pipe(input_) for i in range(len(output_)): print(output_[i]) ## output ## # {'sequence': 'Улаанбаатар хот Монгол улсын нийслэл.', 'score': 0.826970100402832, 'token': 281, 'token_str': 'Улаанбаатар'} # {'sequence': 'Нийслэл хот Монгол улсын нийслэл.', 'score': 0.06551621109247208, 'token': 4059, 'token_str': 'Нийслэл'} # {'sequence': 'Эрдэнэт хот Монгол улсын нийслэл.', 'score': 0.0264141745865345, 'token': 2229, 'token_str': 'Эрдэнэт'} # {'sequence': 'Дархан хот Монгол улсын нийслэл.', 'score': 0.017083868384361267, 'token': 1646, 'token_str': 'Дархан'} # {'sequence': 'УБ хот Монгол улсын нийслэл.', 'score': 0.010854342952370644, 'token': 7389, 'token_str': 'УБ'} ``` ## Training data Mongolian Wikipedia and the 700 million word Mongolian news data set [[Pretraining Procedure](https://github.com/tugstugi/mongolian-bert#pre-training)] ### BibTeX entry and citation info ```bibtex @misc{mongolian-bert, author = {Tuguldur, Erdene-Ochir and Gunchinish, Sharavsambuu and Bataa, Enkhbold}, title = {BERT Pretrained Models on Mongolian Datasets}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/tugstugi/mongolian-bert/}} } ```
[ -0.36877501010894775, -0.5028308629989624, -0.06967475265264511, 0.2682863175868988, -0.5352075695991516, 0.007607548031955957, -0.30728867650032043, -0.059583693742752075, 0.3453946113586426, 0.1085110679268837, -0.6756322383880615, -0.6950976848602295, -0.6643747091293335, -0.06531330198049545, -0.36192744970321655, 1.2488621473312378, -0.03217523917555809, 0.36745214462280273, 0.22412347793579102, -0.20609723031520844, -0.0833764523267746, -0.6170240044593811, -0.22429214417934418, -0.3759627342224121, 0.4885908365249634, 0.21800564229488373, 0.3399099111557007, 0.5247842073440552, 0.485587477684021, 0.3910957872867584, -0.023615362122654915, -0.28152891993522644, -0.37042665481567383, -0.13778603076934814, 0.4239318072795868, -0.34920746088027954, -0.4185032248497009, -0.09988994896411896, 0.8251922130584717, 0.6438308358192444, -0.3102378845214844, 0.355135977268219, -0.13082516193389893, 0.5899046063423157, -0.3361838161945343, 0.07727029174566269, -0.45068925619125366, 0.09585554897785187, -0.38851192593574524, 0.22118313610553741, -0.20097516477108002, -0.400439977645874, 0.34419843554496765, -0.6483368873596191, 0.2592099905014038, -0.04034186527132988, 1.5221655368804932, 0.07825557887554169, -0.028580600395798683, -0.1851576864719391, -0.3245698809623718, 0.8853821158409119, -1.1311476230621338, 0.2993851900100708, 0.4081052243709564, 0.06254516541957855, -0.12573197484016418, -0.9223556518554688, -0.6649888157844543, -0.09248074889183044, -0.3170146644115448, 0.2574969530105591, -0.0968361496925354, -0.08433578908443451, 0.4384307265281677, 0.38927897810935974, -0.8683965802192688, 0.05091249197721481, -0.606094479560852, -0.4533487856388092, 0.5866154432296753, -0.17358878254890442, 0.15645864605903625, -0.5506790280342102, -0.2689037621021271, -0.5768717527389526, -0.4119531810283661, 0.31501245498657227, 0.7335084676742554, 0.21827135980129242, -0.3341503143310547, 0.6749973297119141, -0.28160858154296875, 0.749748170375824, 0.28121864795684814, -0.055420082062482834, 0.7113440632820129, -0.20303627848625183, -0.35391849279403687, 0.04128115251660347, 1.0526262521743774, 0.03622967377305031, 0.11266589909791946, 0.07085589319467545, -0.09714581817388535, -0.34471815824508667, 0.002845615381374955, -0.8470644950866699, -0.40695151686668396, 0.1927751749753952, -0.5996179580688477, -0.14559808373451233, 0.30646365880966187, -0.7643841505050659, 0.2072487473487854, -0.16900469362735748, 0.8948807716369629, -0.7668783068656921, -0.2560771405696869, 0.061216797679662704, -0.07154052704572678, 0.6946618556976318, -0.14038720726966858, -0.9260318279266357, -0.029124155640602112, 0.31968584656715393, 0.7732246518135071, 0.25079047679901123, -0.3685585558414459, -0.20723959803581238, -0.20527808368206024, -0.21159183979034424, 0.5541380643844604, -0.0822267234325409, -0.2769622802734375, 0.0323658250272274, 0.2355305254459381, -0.14638651907444, -0.33420106768608093, 0.4669601619243622, -0.41440609097480774, 0.511065661907196, -0.25595733523368835, -0.55112224817276, -0.19412975013256073, 0.13533340394496918, -0.5328418016433716, 1.125797152519226, 0.14024941623210907, -0.9347679018974304, 0.5238173007965088, -0.7246906161308289, -0.5313315987586975, -0.028908491134643555, 0.29279404878616333, -0.8058175444602966, -0.24344970285892487, 0.2580926716327667, 0.546217143535614, 0.037266578525304794, 0.2741890847682953, -0.2836509048938751, -0.33433279395103455, 0.07645037770271301, -0.002817641943693161, 1.2162789106369019, 0.28275439143180847, -0.358751118183136, 0.24189598858356476, -0.9864539504051208, 0.41476669907569885, 0.20863297581672668, -0.5161163806915283, -0.015714185312390327, -0.12699981033802032, -0.09405983239412308, -0.019717857241630554, 0.40060463547706604, -0.4979904294013977, 0.30263736844062805, -0.5305345058441162, 0.46784842014312744, 0.8845387697219849, -0.3721453845500946, 0.2142297625541687, -0.38837069272994995, 0.3470057547092438, 0.10028058290481567, 0.04382616654038429, -0.2219705432653427, -0.3533117175102234, -1.1018404960632324, -0.4424540400505066, 0.7461199164390564, 0.6785485148429871, -0.6861158609390259, 1.0809016227722168, -0.31638240814208984, -0.87271648645401, -0.728498101234436, -0.1366347372531891, 0.32048946619033813, 0.4626822769641876, 0.4367372393608093, -0.45858511328697205, -0.9114443063735962, -0.8582731485366821, -0.09509844332933426, -0.3504764437675476, -0.058937184512615204, 0.22581401467323303, 0.7988213300704956, -0.20238371193408966, 0.7181683778762817, -0.41412168741226196, -0.20481573045253754, -0.1624281257390976, 0.418905109167099, 0.7729856967926025, 0.9191735982894897, 0.5332209467887878, -0.41973674297332764, -0.6725229620933533, -0.0546085499227047, -0.632186770439148, -0.027482228353619576, -0.04677123203873634, -0.30382296442985535, 0.42851316928863525, 0.14399179816246033, -0.6071886420249939, 0.3650561571121216, 0.4428222179412842, -0.2472994476556778, 0.8579856157302856, -0.26783233880996704, 0.15654249489307404, -1.1637529134750366, 0.48681625723838806, -0.27866068482398987, 0.10476205497980118, -0.6633966565132141, -0.1724095642566681, 0.030701935291290283, 0.13177767395973206, -0.45409971475601196, 0.49939271807670593, -0.39303842186927795, -0.0984286218881607, 0.4038788676261902, -0.4186609387397766, -0.30490660667419434, 0.8005638718605042, 0.14746689796447754, 0.5561753511428833, 0.7739547491073608, -0.4185897707939148, 0.4144139587879181, 0.28141626715660095, -0.702210009098053, 0.06528731435537338, -0.9178252220153809, 0.03432854637503624, 0.0756392851471901, 0.16455179452896118, -0.9863881468772888, -0.49944210052490234, 0.4754044711589813, -0.8512749671936035, 0.4516771137714386, -0.27626854181289673, -0.6297065615653992, -0.6969113349914551, -0.39116477966308594, 0.19884833693504333, 0.8685541749000549, -0.4277536869049072, 0.3300521969795227, 0.06689458340406418, -0.019833937287330627, -0.9441289305686951, -0.7965091466903687, -0.3568108379840851, -0.22154587507247925, -0.6815126538276672, 0.451891154050827, -0.20495079457759857, 0.2424960732460022, 0.006636844016611576, -0.12942974269390106, -0.36156177520751953, -0.056248780339956284, -0.1313578337430954, 0.4447823762893677, -0.3080315589904785, 0.06315390765666962, -0.141375333070755, 0.09746722131967545, 0.05838467553257942, -0.3120364248752594, 0.8056305050849915, -0.2460748702287674, -0.31159424781799316, -0.4882042706012726, 0.16477809846401215, 0.352132648229599, -0.17092883586883545, 0.8243443965911865, 1.2530889511108398, -0.3340965211391449, 0.21118351817131042, -0.416404128074646, -0.20997731387615204, -0.504669189453125, 0.407722145318985, -0.25319644808769226, -0.7517674565315247, 0.7912408113479614, 0.27859726548194885, 0.04977153241634369, 0.6743898391723633, 0.6121615171432495, -0.38093626499176025, 0.8980733156204224, 0.1963324099779129, -0.08439021557569504, 0.5971301794052124, -0.7613856196403503, 0.08008701354265213, -0.7237458229064941, -0.3769841492176056, -0.5150561332702637, -0.23948241770267487, -0.706670880317688, -0.13751983642578125, 0.22562676668167114, 0.1676878035068512, -0.6297397613525391, 0.45350515842437744, -0.5709528923034668, 0.16513264179229736, 0.8716728091239929, 0.163596972823143, -0.3822089433670044, 0.1678389608860016, -0.5742520689964294, -0.047892916947603226, -0.8293900489807129, -0.2819189131259918, 1.306098461151123, 0.13469640910625458, 0.7872748970985413, 0.07734541594982147, 0.7722114324569702, 0.18643797934055328, 0.14839564263820648, -0.7159291505813599, 0.48085200786590576, -0.14656485617160797, -0.8924946188926697, -0.4742090106010437, -0.30416569113731384, -1.1746203899383545, 0.12968608736991882, -0.27654916048049927, -0.7353002429008484, -0.0742931216955185, 0.08381787687540054, -0.27819010615348816, 0.3181542456150055, -0.8530009388923645, 0.9710726737976074, -0.2616620659828186, -0.19882701337337494, 0.04206836223602295, -1.0370538234710693, 0.41232967376708984, -0.029871219769120216, -0.052268560975790024, -0.012462625280022621, 0.4677022695541382, 1.1161378622055054, -0.7464044690132141, 0.8335767388343811, -0.25323787331581116, 0.17138391733169556, 0.377672016620636, -0.3098978102207184, 0.4448138177394867, -0.10863073915243149, 0.0167581494897604, 0.4743695557117462, 0.045626360923051834, -0.6686069965362549, -0.10330121964216232, 0.5970534086227417, -1.0948879718780518, -0.6131317615509033, -0.7753940224647522, -0.3802556097507477, 0.22495517134666443, 0.508423924446106, 0.6439080834388733, 0.44769567251205444, 0.005903583951294422, 0.4513292908668518, 0.5886499881744385, -0.3776026666164398, 0.5850709676742554, 0.3929262161254883, 0.1361732929944992, -0.6380299925804138, 0.8161057829856873, 0.25810277462005615, 0.06666450202465057, 0.2766006290912628, 0.1484430432319641, -0.36773574352264404, -0.5531278252601624, -0.4196854531764984, 0.3588486909866333, -0.6157199740409851, -0.2725999057292938, -0.47623133659362793, -0.5139166712760925, -0.7100623846054077, 0.01447980385273695, -0.22938431799411774, -0.36137235164642334, -0.3954526484012604, 0.06916582584381104, 0.48878905177116394, 0.41873183846473694, -0.5259125828742981, 0.34754031896591187, -0.8345861434936523, 0.26977959275245667, 0.4777084290981293, 0.38992658257484436, -0.03241828829050064, -0.8106694221496582, -0.5050665736198425, 0.047537341713905334, -0.37992897629737854, -0.8141059875488281, 0.6742773652076721, 0.15658515691757202, 0.843123733997345, 0.3834022879600525, -0.07071460038423538, 0.9681302905082703, -0.4879518449306488, 0.9381995797157288, 0.3288784921169281, -1.1845961809158325, 0.7224327325820923, -0.37213557958602905, 0.40954726934432983, 0.2392953634262085, 0.5404237508773804, -0.5027780532836914, -0.1564912497997284, -0.804094672203064, -1.0427336692810059, 1.1648540496826172, 0.27584272623062134, 0.07079093903303146, 0.16565702855587006, 0.07195521146059036, 0.19487264752388, 0.18109317123889923, -0.9679691195487976, -0.6300948262214661, -0.7117677927017212, -0.3586794435977936, 0.13242964446544647, -0.1913861781358719, -0.0718880370259285, -0.7012931108474731, 1.000341773033142, 0.08208466321229935, 0.6950362324714661, 0.4328327775001526, -0.28879401087760925, -0.028688469901680946, 0.03902291879057884, 0.6376615166664124, 0.47833752632141113, -0.4531390070915222, -0.3556649088859558, 0.25949907302856445, -0.6994507312774658, 0.05575886741280556, 0.4690159261226654, -0.22303099930286407, 0.2586458921432495, 0.5998228788375854, 1.0221519470214844, 0.0865263044834137, -0.4375850260257721, 0.42783990502357483, 0.12812022864818573, -0.4938795268535614, -0.5240259170532227, -0.08711902052164078, 0.013418667018413544, 0.07571512460708618, 0.7228224873542786, -0.11512260884046555, -0.10651455074548721, -0.3729318380355835, 0.20581354200839996, 0.34892916679382324, -0.20527933537960052, -0.5055606961250305, 0.5477695465087891, -0.007352220360189676, -0.15575844049453735, 0.682590663433075, -0.15265929698944092, -0.7486681938171387, 0.8737741112709045, 0.2810952961444855, 0.7935478091239929, -0.14980825781822205, 0.16100919246673584, 0.9516780972480774, 0.22172333300113678, -0.05210777372121811, 0.4117473363876343, -0.08629065006971359, -0.7777754664421082, -0.40790432691574097, -0.7253322601318359, -0.05667465552687645, 0.4845110774040222, -0.8321579694747925, 0.40246546268463135, -0.3355269134044647, -0.2507558763027191, 0.10796117782592773, 0.29809802770614624, -0.6585650444030762, 0.21687357127666473, 0.22167062759399414, 0.6958943605422974, -0.6328948140144348, 1.0724716186523438, 0.8609252572059631, -0.3058350682258606, -0.8735654354095459, -0.17564266920089722, -0.47284480929374695, -0.9585607051849365, 0.9515856504440308, 0.15977169573307037, 0.438656747341156, 0.18076103925704956, -0.6934236884117126, -1.1507036685943604, 1.1983228921890259, 0.140737846493721, -0.4088643789291382, 0.0273735448718071, -0.1557721644639969, 0.461078017950058, -0.003282706020399928, 0.3184095025062561, 0.45562100410461426, 0.6872642040252686, 0.18909287452697754, -0.9476277232170105, -0.07339701056480408, -0.3082408905029297, -0.21862497925758362, 0.26694217324256897, -0.8022522926330566, 1.0630184412002563, -0.3266785442829132, -0.12167934328317642, 0.37597572803497314, 0.6719521880149841, 0.4489361345767975, -0.03153986856341362, 0.4938981831073761, 0.8090070486068726, 0.6517149209976196, -0.46816325187683105, 0.6751748919487, -0.2719457149505615, 0.7038695812225342, 0.7249323725700378, 0.12291821092367172, 0.5867611765861511, 0.45039495825767517, -0.5501935482025146, 0.8977339267730713, 0.9618074297904968, -0.45769935846328735, 0.923119068145752, 0.3766213059425354, 0.00827393215149641, -0.19773559272289276, 0.2904037535190582, -0.5826494693756104, 0.49567800760269165, 0.2988605797290802, -0.29757070541381836, -0.052160050719976425, -0.2927974462509155, 0.2500455975532532, -0.3698630928993225, -0.11740932613611221, 0.5374099612236023, -0.2796272933483124, -0.7502954602241516, 1.01939857006073, -0.09091652184724808, 0.9524036645889282, -1.0835399627685547, 0.12936392426490784, -0.11818911880254745, 0.008289366960525513, -0.059311218559741974, -0.6453949213027954, 0.08613614737987518, 0.053857773542404175, -0.10996835678815842, -0.1276915818452835, 0.5480899810791016, -0.44338834285736084, -0.6523982286453247, 0.09382317960262299, 0.3813580572605133, 0.3299933969974518, 0.5292107462882996, -0.9471529722213745, -0.2256685346364975, 0.26805832982063293, -0.662286102771759, 0.19641008973121643, 0.46209201216697693, 0.26694032549858093, 0.5201643705368042, 1.0362563133239746, 0.12275294959545135, 0.33323508501052856, -0.17025865614414215, 0.9104616045951843, -0.7761020660400391, -0.3217003047466278, -0.8432129621505737, 0.7175481915473938, -0.04490598291158676, -0.6116718053817749, 0.5686641335487366, 0.47555044293403625, 1.0773301124572754, -0.3816356956958771, 0.7514926791191101, -0.5967526435852051, 0.41015973687171936, -0.63373202085495, 0.9702730178833008, -0.6663820147514343, -0.2649683356285095, -0.08337429165840149, -0.5977473258972168, -0.3137867748737335, 0.9703900218009949, -0.1158219650387764, 0.16430389881134033, 0.6497701406478882, 0.6214843988418579, 0.22393043339252472, -0.4475965201854706, 0.08251111209392548, 0.43811672925949097, 0.17382663488388062, 0.6233972311019897, 0.5925070643424988, -0.6352316737174988, 0.7435227036476135, -0.5713120102882385, 0.10127371549606323, -0.29592564702033997, -0.8865854144096375, -0.9570443034172058, -0.6894047260284424, -0.24210700392723083, -0.3389122784137726, -0.04942696541547775, 1.00101637840271, 1.0441758632659912, -1.0496529340744019, -0.2771695852279663, 0.0018350870814174414, 0.14918352663516998, -0.22668224573135376, -0.2841581404209137, 0.6642175316810608, -0.3184790015220642, -0.8774545192718506, -0.06980688869953156, -0.31531184911727905, 0.4295136332511902, -0.09223750233650208, -0.2637907862663269, -0.6075705289840698, -0.11408086866140366, 0.30321019887924194, 0.4443264603614807, -0.9154623746871948, -0.32752150297164917, 0.18542908132076263, -0.1109430193901062, 0.16734609007835388, 0.25663816928863525, -0.7833773493766785, 0.47653767466545105, 0.6429222822189331, 0.23650313913822174, 0.6897489428520203, -0.18184849619865417, 0.4307239353656769, -0.8179245591163635, 0.3625625669956207, 0.06462857127189636, 0.5956348776817322, 0.35499802231788635, -0.13271689414978027, 0.5613026022911072, 0.5036253929138184, -0.6001685261726379, -0.9452491998672485, -0.3038955330848694, -1.025488018989563, -0.11200819909572601, 1.031510829925537, -0.517107367515564, -0.3219350278377533, 0.29520589113235474, -0.1318231076002121, 0.6611263751983643, -0.46017730236053467, 0.851621687412262, 1.1111551523208618, 0.16588258743286133, 0.14929243922233582, -0.28542718291282654, 0.48949190974235535, 0.5479040741920471, -0.5925152897834778, -0.3149188160896301, 0.07460194826126099, 0.35005056858062744, 0.30051955580711365, 0.397356778383255, 0.03212004899978638, 0.29108017683029175, -0.14046156406402588, 0.483110636472702, 0.10508332401514053, 0.11933489888906479, -0.25216296315193176, -0.36425668001174927, -0.3012479841709137, -0.5084726214408875 ]
Yntec/Toonify2
Yntec
"2023-08-10T14:06:21Z"
29,103
3
diffusers
[ "diffusers", "anime", "comic", "art", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "BetterThanNothing", "en", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2023-08-10T13:46:20Z"
--- license: creativeml-openrail-m language: - en library_name: diffusers pipeline_tag: text-to-image tags: - anime - comic - art - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers - BetterThanNothing --- # Toonify Preview and prompt: ![Sample](https://cdn-uploads.huggingface.co/production/uploads/63239b8370edc53f51cd5d42/JDxweoQGlpRmcLZuRLIns.png) ![Sample](https://cdn-uploads.huggingface.co/production/uploads/63239b8370edc53f51cd5d42/XfGlgXedKBdmta899YCWn.png) sitting elementary girl, Pretty CUTE, gorgeous hair, DETAILED EYES, Futuristic city of tokyo japan, Magazine ad, iconic, 1943, sharp focus, 4k. (Sweaty). visible comic art by ROSSDRAWS and Clay Mann and kyoani Original page: https://civitai.com/models/36281
[ -0.7708714008331299, -0.8401418924331665, 0.7455901503562927, 0.2028440535068512, -0.3115999400615692, -0.0476033017039299, 0.13381105661392212, -0.45916926860809326, 1.3024715185165405, 0.5812309980392456, -1.0373069047927856, -0.5749642848968506, -0.6187644004821777, 0.34038934111595154, -0.2629748582839966, 0.9546480774879456, 0.271684467792511, 0.07981923967599869, 0.026685571298003197, 0.07219883054494858, -0.5031697154045105, 0.13035336136817932, -0.5030323266983032, 0.024853529408574104, 0.09214980900287628, 1.0016047954559326, 0.730600118637085, 0.21796377003192902, 0.05202304944396019, 0.3514655828475952, 0.13698868453502655, -0.10449361801147461, -0.6746363043785095, -0.11754462867975235, -0.2529944181442261, -0.6274676322937012, -0.685715913772583, 0.2834709882736206, 0.689420759677887, 0.6428401470184326, 0.14071117341518402, 0.020466020330786705, -0.05871157720685005, 0.5167032480239868, -0.1729118376970291, -0.19286797940731049, 0.2783142030239105, -0.0850253477692604, -0.3024541735649109, 0.07430966198444366, -0.057269323617219925, -0.39802902936935425, -0.1915355920791626, -1.3949220180511475, 0.4614454209804535, 0.04935505986213684, 1.3298105001449585, 0.17888061702251434, -0.4533839523792267, 0.06457235664129257, -0.050886839628219604, 0.6294844150543213, -0.18937210738658905, 0.461025595664978, 0.4255904257297516, 0.3152625560760498, -0.30618739128112793, -0.8922883868217468, -0.5863401889801025, 0.07731335610151291, 0.21881861984729767, 0.6774885058403015, -0.27156704664230347, -0.49027809500694275, 0.5679288506507874, 0.4355425238609314, -0.7288124561309814, -0.3814365267753601, -0.4781345725059509, 0.2481621503829956, 0.5907525420188904, -0.18326956033706665, 0.9421497583389282, -0.25532788038253784, -0.4480731189250946, -0.37578579783439636, -0.47704610228538513, -0.004960138350725174, 0.5099039673805237, 0.06496716290712357, -0.5096387267112732, 0.6895329356193542, 0.04761757701635361, 0.1845417618751526, 0.34258899092674255, 0.200607031583786, 0.3728092610836029, 0.0360788069665432, 0.045877471566200256, -0.1408102959394455, 0.8003584146499634, 0.9005420207977295, 0.23694540560245514, 0.21899153292179108, 0.25488707423210144, 0.19330009818077087, 0.27806007862091064, -1.13533616065979, -0.44462859630584717, 0.20200614631175995, -0.44610825181007385, -0.2109163999557495, 0.013246973976492882, -1.525846242904663, -0.34766533970832825, 0.23783566057682037, 0.1331366002559662, -0.26108798384666443, -0.5102306604385376, 0.08560499548912048, -0.28880631923675537, -0.3190176486968994, 0.34070032835006714, -0.7893359661102295, -0.1539580374956131, 0.23274244368076324, 0.6020229458808899, 0.3448076546192169, -0.13386660814285278, 0.08004025369882584, -0.02843494713306427, -0.75993812084198, 1.0875343084335327, -0.32052281498908997, -0.7207191586494446, -0.36877018213272095, 0.330483615398407, 0.1791246086359024, -0.3414001762866974, 0.8885343670845032, -0.14848022162914276, 0.048625677824020386, -0.05779723823070526, -0.12386263161897659, 0.05554456636309624, 0.17866283655166626, -1.0872564315795898, 0.8807681798934937, 0.30278462171554565, -0.8174535632133484, 0.46426886320114136, -0.8614230155944824, -0.10498276352882385, 0.09151894599199295, 0.049050334841012955, -0.511293888092041, 0.2965430021286011, 0.4854191541671753, 0.333079069852829, 0.032022625207901, -0.12720242142677307, -0.8358748555183411, -0.2793319821357727, 0.4878043830394745, -0.11066757887601852, 1.0252031087875366, 0.4379200041294098, -0.09474516659975052, 0.005141340661793947, -1.0716968774795532, -0.056512508541345596, 1.0067229270935059, 0.12869639694690704, -0.12673957645893097, -0.6914922595024109, 0.15045005083084106, 0.5388025641441345, 0.5233498215675354, -0.5326877236366272, 0.2303929477930069, -0.11876431107521057, 0.496010959148407, 0.5820761322975159, 0.05241529643535614, 0.24151408672332764, -0.3312216103076935, 0.9401267766952515, -0.4203524887561798, 0.4375728368759155, -0.31313320994377136, -0.5446441769599915, -0.8463760614395142, -0.45660728216171265, -0.37007424235343933, 0.06696461886167526, -0.6759840250015259, 0.3384876251220703, 0.0427875854074955, -0.7474656701087952, -0.690772533416748, -0.2218395471572876, -0.06527560204267502, 0.4427584111690521, 0.15582311153411865, -0.2532024085521698, -0.4890064001083374, -0.758358895778656, 0.31444770097732544, -0.3220456838607788, -0.08346865326166153, 0.3213254511356354, 0.3724062442779541, -0.1689574122428894, 0.569191575050354, -0.703325629234314, -0.08840246498584747, -0.47380584478378296, -0.2550440728664398, 0.6553724408149719, 0.4133910834789276, 0.6251664161682129, -0.9004465341567993, -0.3887957036495209, -0.6606757640838623, -0.6417543292045593, -0.29232099652290344, 0.3016147315502167, -0.46881285309791565, -0.6406100392341614, 0.8157534599304199, -0.6427971124649048, 0.33010631799697876, 0.35861408710479736, -0.8000454902648926, 0.7945915460586548, -0.17422759532928467, 0.5150893330574036, -1.5095046758651733, 0.24437691271305084, 0.25696250796318054, -0.643561601638794, -0.2817264497280121, 0.9954063892364502, -0.14661888778209686, -1.0099998712539673, -0.5249373316764832, 0.5588834881782532, -0.4746878147125244, 0.13561338186264038, -0.2819078862667084, 0.27301275730133057, 0.921623706817627, 0.32398566603660583, 0.08653479814529419, 1.1952866315841675, 0.6699596643447876, -0.34455248713493347, 0.3681177496910095, 0.8412495255470276, -0.14977510273456573, 0.8414908647537231, -1.221352219581604, 0.23966144025325775, -0.2958402931690216, 0.47661292552948, -1.3934170007705688, -0.6037225127220154, 0.7146906852722168, -0.6429064869880676, 0.192430779337883, 0.040780868381261826, -0.8908407688140869, -0.5197845697402954, -0.6622369885444641, 0.5761313438415527, 0.39556941390037537, -0.6538009643554688, 0.15519167482852936, 0.3894493877887726, -0.07168076187372208, -0.14545902609825134, -0.6850032806396484, 0.1049102395772934, -0.5159203410148621, -0.3987174928188324, 0.2304704338312149, -0.43045535683631897, 0.04172326251864433, -0.40294143557548523, 0.31463396549224854, -0.3689866364002228, -0.1326422095298767, 0.47610557079315186, 0.6909587383270264, -0.45974236726760864, -0.19950416684150696, -0.24294766783714294, -0.10224250704050064, 0.015282992273569107, 0.2507516145706177, 0.5568288564682007, -0.420023649930954, -0.4591122567653656, -0.9422045946121216, 0.493927001953125, 0.8058183789253235, 0.30553439259529114, 0.26595839858055115, 0.49163269996643066, -0.11991991102695465, 0.1468222737312317, -0.43483924865722656, -0.4657549560070038, -0.5032510161399841, 0.20940172672271729, -0.3112603425979614, -0.4516775608062744, 0.6299932599067688, -0.1917598694562912, -0.32259422540664673, 0.913129448890686, 0.09208158403635025, -0.2582760155200958, 1.0517568588256836, 0.8447973132133484, -0.064908467233181, 0.4311465919017792, -0.6826050281524658, 0.00951185543090105, -0.6824557781219482, -0.1092652827501297, -0.4613444209098816, -0.37156760692596436, -0.7599214315414429, -0.1934102177619934, 0.1298046112060547, 0.3960959315299988, -0.2017572969198227, 0.814972996711731, -0.42468512058258057, 0.6684764623641968, 0.19520363211631775, 0.5292381048202515, 0.19529221951961517, -0.14742036163806915, 0.16663876175880432, -0.362356036901474, -0.4575802683830261, -0.321209192276001, 1.0311506986618042, 0.4143785536289215, 0.4040474593639374, 0.35387948155403137, 0.8133004903793335, -0.49298951029777527, -0.2011043131351471, -0.7132770419120789, 1.0142490863800049, -0.31312763690948486, -1.1057372093200684, -0.2473561316728592, 0.03851737827062607, -1.011541485786438, -0.31252169609069824, -0.5133380889892578, -0.770232081413269, 0.5273321270942688, -0.14657096564769745, -0.45372000336647034, -0.12945637106895447, -0.7753498554229736, 0.8487662672996521, 0.2918926179409027, -0.621182382106781, -0.06975854188203812, -0.588331401348114, 0.21760299801826477, 0.1323224902153015, 0.17141133546829224, -0.4038761556148529, -0.1384105235338211, 0.6509646773338318, -0.47834548354148865, 0.8115354776382446, 0.3908246159553528, -0.06918270885944366, 0.2872050702571869, -0.2551037669181824, 0.21829722821712494, 0.6761073470115662, 0.10350042581558228, 0.15739741921424866, -0.2938118875026703, -0.5039669275283813, -0.7140881419181824, 0.7978565096855164, -0.8547970652580261, -0.37378990650177, -0.1832484006881714, -0.25103527307510376, -0.04948390647768974, 0.41573724150657654, 0.9676121473312378, 0.6762951016426086, -0.23117628693580627, -0.03974561393260956, 0.7265276312828064, -0.0052292137406766415, 0.5632603168487549, 0.08984657377004623, -0.627092719078064, -0.3224254250526428, 1.0329664945602417, -0.21268442273139954, 0.15290559828281403, 0.06342693418264389, 0.5735083818435669, -0.712801992893219, 0.09497803449630737, -0.44099318981170654, 0.47425511479377747, -0.7805269360542297, 0.13898421823978424, -0.2563643753528595, -0.08252685517072678, -0.5467532277107239, -0.38517189025878906, -0.5882251262664795, -0.4803657531738281, -1.0695886611938477, 0.18266218900680542, 0.5972574353218079, 0.8003057837486267, 0.12098915129899979, 0.21879732608795166, -0.4976738691329956, 0.7192692756652832, 0.4504172205924988, 0.3948470652103424, -0.20834267139434814, -0.4496082067489624, 0.2567027807235718, -0.4712885320186615, -0.6281948685646057, -0.6948702931404114, 0.4670369029045105, 0.11840016394853592, 0.4217635989189148, 0.7622787356376648, 0.22046059370040894, 0.8770567178726196, -0.3285450041294098, 0.7488168478012085, 0.7181587219238281, -0.5558478236198425, 0.722291886806488, -0.7199143767356873, 0.3884803056716919, 0.9796783328056335, 0.23170854151248932, -0.28270667791366577, -0.5686572790145874, -1.2365477085113525, -0.9109436273574829, 0.4374729096889496, 0.12667904794216156, 0.4562387764453888, 0.012489621527493, -0.0978894978761673, -0.00171276752371341, 0.2806686460971832, -0.7092382907867432, -0.5621668100357056, -0.8906457424163818, 0.05661904439330101, -0.28323715925216675, -0.35957959294319153, 0.018786204978823662, -0.3128361105918884, 0.47047728300094604, -0.19436965882778168, 0.4086396396160126, 0.30112531781196594, 0.12271476536989212, -0.0890326201915741, 0.3302612602710724, 0.6043316125869751, 1.0690997838974, -0.27975204586982727, -0.2513529658317566, -0.20352637767791748, -0.8502153158187866, 0.06634855270385742, -0.08176857233047485, -0.04629811272025108, 0.3262605369091034, 0.2832737863063812, 1.1274218559265137, 0.4931246042251587, -0.8236536979675293, 0.6647775769233704, -0.13210347294807434, 0.37569862604141235, -0.3974092900753021, 0.2449793964624405, -0.08546062558889389, 0.4664738178253174, 0.3720497190952301, -0.04991612583398819, 0.5530051589012146, -0.8198332190513611, 0.15764373540878296, 0.0557888001203537, -0.3913904130458832, -0.47429358959198, 0.8998296856880188, 0.0032525521237403154, -0.1552114635705948, 0.4202396273612976, -0.22316692769527435, -0.63857102394104, 0.8618662357330322, 1.0274790525436401, 0.8937185406684875, -0.17733050882816315, 0.36748018860816956, 0.667238175868988, -0.4324541985988617, 0.12213901430368423, 0.5864437818527222, 0.2774559259414673, -0.4507027864456177, 0.09736908227205276, -0.29442113637924194, -0.37361952662467957, 0.3681226968765259, -0.6795569658279419, 0.8796650767326355, -0.9511892795562744, -0.225189208984375, -0.07800576090812683, 0.29895347356796265, -0.35307472944259644, 0.5606706142425537, -0.08390102535486221, 1.0957512855529785, -1.2289656400680542, 0.3615263104438782, 0.9788861274719238, -0.6353166699409485, -1.0791840553283691, 0.4308803677558899, 0.14525121450424194, -0.8644924759864807, 0.3622535765171051, 0.5912696719169617, 0.10426244884729385, 0.3530704379081726, -0.7464302778244019, -0.5227100253105164, 0.6483691930770874, 0.25991004705429077, -0.6156144142150879, 0.21454796195030212, -0.3891497850418091, 0.35695427656173706, -0.1595916450023651, 0.48207366466522217, 0.4709189534187317, 0.3067929446697235, 0.5791465044021606, -0.6449862718582153, -0.3654381036758423, -1.0056980848312378, -0.16588859260082245, -0.06983141601085663, -0.9513580203056335, 0.8171781301498413, -0.3967714309692383, -0.1289244294166565, 0.4421900510787964, 0.972349226474762, 0.9205616116523743, 0.45965835452079773, 0.6514843702316284, 0.6215117573738098, 0.2760496437549591, 0.13187476992607117, 1.1935688257217407, -0.21447747945785522, 0.06902044266462326, 0.8838377594947815, 0.18341147899627686, 0.6677563190460205, 0.25473129749298096, -0.5342851281166077, 0.2869833707809448, 0.9959274530410767, -0.19868776202201843, 0.5219066143035889, -0.30550119280815125, -0.029115010052919388, -0.08731493353843689, -0.8394324779510498, -0.42450711131095886, 0.20315128564834595, -0.007652261760085821, 0.21545833349227905, -0.3332354724407196, 0.2200571894645691, -0.07835423201322556, 0.47902151942253113, -0.6929916143417358, 0.4424475431442261, 0.3410554528236389, -0.17294082045555115, 0.4044243097305298, -0.30053550004959106, 0.48446786403656006, -0.46196937561035156, -0.2971774935722351, -0.055870622396469116, -0.2664127051830292, -0.3356371223926544, -1.1756620407104492, 0.07929136604070663, -0.11034180968999863, -0.313018798828125, -0.3769371807575226, 0.7912949919700623, -0.00024424344883300364, -0.8851266503334045, 0.11309756338596344, -0.26398512721061707, 0.5620027184486389, 0.1602533459663391, -1.0347509384155273, 0.07125973701477051, -0.18425457179546356, 0.0791456326842308, -0.007927640341222286, 0.4690212309360504, -0.08052961528301239, 0.49761849641799927, 0.4599339962005615, 0.23714599013328552, -0.19005927443504333, 0.65777987241745, 0.7227715253829956, -0.2573622763156891, -1.2676446437835693, -0.8113781809806824, 0.5674643516540527, -0.2434273213148117, -0.797389805316925, 0.9747047424316406, 0.5312801003456116, 0.3922067880630493, -0.31303465366363525, 0.09949066489934921, 0.22238275408744812, 0.6315553188323975, -0.6979170441627502, 1.157394528388977, -1.0782634019851685, -0.4041937291622162, -0.6464716196060181, -0.9431444406509399, -0.10163375735282898, 0.6076597571372986, 0.007597981486469507, 0.24979911744594574, 0.7418044805526733, 0.6021798253059387, -0.18703070282936096, 0.07405659556388855, 0.23791034519672394, -0.06299515813589096, -0.13116177916526794, 0.3244950771331787, 0.9840183854103088, -0.6119695901870728, -0.001759187551215291, -0.26227331161499023, 0.06766052544116974, -0.6433690786361694, -0.8477674722671509, -1.1598776578903198, -0.7314336895942688, -0.44699931144714355, -0.5317820906639099, -0.4461136758327484, 0.9308303594589233, 1.0013909339904785, -0.8242678642272949, 0.05588836595416069, -0.12447164207696915, -0.13471834361553192, 0.2880887985229492, -0.17865221202373505, 0.4017701745033264, 0.6210533976554871, -1.038805365562439, 0.6300995349884033, -0.10293695330619812, 0.8042115569114685, -0.17688724398612976, 0.22894352674484253, -0.148404061794281, -0.26440364122390747, -0.01309121586382389, 0.5415558815002441, -0.3253520131111145, 0.045151419937610626, -0.12090903520584106, -0.10261847823858261, 0.35620585083961487, 0.6396106481552124, -0.40190207958221436, 0.3597047030925751, 0.6460502743721008, 0.15434187650680542, 0.2873487174510956, 0.37447890639305115, 0.2678771913051605, -0.7534348964691162, 0.7458340525627136, 0.03626692295074463, 0.5328280925750732, 0.6019238233566284, -0.6799092292785645, 0.29006847739219666, 0.46354401111602783, -0.3763868808746338, -0.7242523431777954, 0.09546849876642227, -0.9254505634307861, -0.35123252868652344, 0.6432333588600159, 0.20838171243667603, -0.4432891011238098, -0.11953729391098022, -0.4338848888874054, 0.389949768781662, -0.5934004187583923, 0.46209418773651123, 0.8568918108940125, 0.24922636151313782, -0.5578548312187195, -0.8864546418190002, -0.013765759766101837, 0.17215290665626526, -0.7847633361816406, -0.4959380328655243, 0.432271271944046, 0.3526846170425415, 0.6173713207244873, 0.620795726776123, -0.055692337453365326, 0.3775162100791931, 0.298225998878479, 0.1737009435892105, -0.031135201454162598, -0.7150221467018127, -0.2901560366153717, -0.1044822409749031, 0.03523529693484306, -0.5812623500823975 ]
xlnet-large-cased
null
"2023-01-24T14:50:34Z"
29,064
23
transformers
[ "transformers", "pytorch", "tf", "xlnet", "text-generation", "en", "dataset:bookcorpus", "dataset:wikipedia", "arxiv:1906.08237", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
text-generation
"2022-03-02T23:29:04Z"
--- language: en license: mit datasets: - bookcorpus - wikipedia --- # XLNet (large-sized model) XLNet model pre-trained on English language. It was introduced in the paper [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237) by Yang et al. and first released in [this repository](https://github.com/zihangdai/xlnet/). Disclaimer: The team releasing XLNet did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description XLNet is a new unsupervised language representation learning method based on a novel generalized permutation language modeling objective. Additionally, XLNet employs Transformer-XL as the backbone model, exhibiting excellent performance for language tasks involving long context. Overall, XLNet achieves state-of-the-art (SOTA) results on various downstream language tasks including question answering, natural language inference, sentiment analysis, and document ranking. ## Intended uses & limitations The model is mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?search=xlnet) 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. ## Usage Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import XLNetTokenizer, XLNetModel tokenizer = XLNetTokenizer.from_pretrained('xlnet-large-cased') model = XLNetModel.from_pretrained('xlnet-large-cased') inputs = tokenizer("Hello, my dog is cute", return_tensors="pt") outputs = model(**inputs) last_hidden_states = outputs.last_hidden_state ``` ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-1906-08237, author = {Zhilin Yang and Zihang Dai and Yiming Yang and Jaime G. Carbonell and Ruslan Salakhutdinov and Quoc V. Le}, title = {XLNet: Generalized Autoregressive Pretraining for Language Understanding}, journal = {CoRR}, volume = {abs/1906.08237}, year = {2019}, url = {http://arxiv.org/abs/1906.08237}, eprinttype = {arXiv}, eprint = {1906.08237}, timestamp = {Mon, 24 Jun 2019 17:28:45 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-1906-08237.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.4016047716140747, -0.7091763019561768, 0.2886923849582672, 0.07772452384233475, -0.13692913949489594, -0.15782667696475983, -0.29822176694869995, -0.4471968710422516, 0.31547680497169495, 0.3709326982498169, -0.3622795045375824, -0.357677161693573, -0.6031262278556824, 0.08725039660930634, -0.48064154386520386, 1.0555073022842407, -0.12048335373401642, -0.17848940193653107, 0.09889820218086243, -0.20958968997001648, -0.04524095356464386, -0.8415285348892212, -0.9038439393043518, -0.4029007852077484, 0.632286787033081, 0.024177514016628265, 0.4680595099925995, 0.6100160479545593, 0.19267497956752777, 0.4449841380119324, -0.30643174052238464, -0.01690169796347618, -0.36078283190727234, -0.1935226023197174, 0.03678159415721893, -0.4083978235721588, -0.6162941455841064, 0.12060258537530899, 0.722403347492218, 0.7909938097000122, 0.02652624063193798, 0.19374577701091766, 0.19408074021339417, 0.4467654228210449, -0.45251715183258057, 0.15502160787582397, -0.368466317653656, 0.2141246348619461, -0.1671827882528305, 0.12021571397781372, -0.2912966310977936, -0.04706863313913345, 0.2154589146375656, -0.3958502411842346, 0.15608152747154236, 0.22503662109375, 1.1493797302246094, -0.13085977733135223, -0.40771955251693726, -0.0518731027841568, -0.43373942375183105, 0.7771214246749878, -0.7469593286514282, 0.39897891879081726, 0.2524063289165497, 0.08107487112283707, 0.1544482558965683, -1.0817854404449463, -0.6914657354354858, -0.3570176064968109, -0.27493345737457275, 0.1965380162000656, -0.37873485684394836, 0.08162518590688705, 0.36730286478996277, 0.4178694188594818, -0.8015750646591187, 0.1891014277935028, -0.2955564856529236, -0.1482953578233719, 0.5854136347770691, -0.022532129660248756, 0.24735690653324127, -0.3432873785495758, -0.2267075479030609, -0.2849673330783844, -0.41576212644577026, 0.243832528591156, 0.5025932788848877, 0.29198697209358215, -0.27163270115852356, 0.4615746736526489, -0.1334695816040039, 0.6456742882728577, 0.13815325498580933, 0.2502199113368988, 0.556151270866394, -0.29763567447662354, -0.34358036518096924, -0.003436036640778184, 1.2293466329574585, -0.04707520827651024, 0.19220803678035736, -0.07609684020280838, -0.2571847438812256, -0.2434764951467514, 0.1574123650789261, -0.8639058470726013, -0.17661404609680176, 0.2816593050956726, -0.53316730260849, -0.27063778042793274, 0.10502701997756958, -0.3889397382736206, 0.023460546508431435, -0.426156610250473, 0.540239155292511, -0.35466375946998596, -0.508111298084259, -0.09984687715768814, 0.1313915252685547, 0.0964612141251564, -0.01084196288138628, -0.6835765838623047, 0.1948741376399994, 0.5318986773490906, 0.9530330896377563, -0.08479437232017517, -0.3837949335575104, -0.35052287578582764, -0.44306325912475586, -0.37595030665397644, 0.5581297874450684, -0.28899142146110535, 0.12302340567111969, -0.003104790346696973, 0.28517189621925354, -0.08153220266103745, -0.3512014150619507, 0.2644239664077759, -0.48732760548591614, 0.24982430040836334, 0.014383054338395596, -0.4233115017414093, -0.23399566113948822, 0.15289032459259033, -0.6903456449508667, 0.9606641530990601, 0.097615547478199, -0.9319034814834595, 0.09222288429737091, -0.698948323726654, -0.16450998187065125, -0.12654606997966766, -0.06359674781560898, -0.6179777979850769, -0.06455617398023605, 0.044247355312108994, 0.60750812292099, -0.09240984171628952, 0.2985658645629883, -0.2503802478313446, -0.10410435497760773, 0.22289970517158508, -0.15139538049697876, 1.0870344638824463, 0.3737894594669342, -0.4449586570262909, 0.18949894607067108, -0.6979050636291504, 0.14634397625923157, 0.15441304445266724, -0.19911715388298035, -0.261414498090744, -0.24638529121875763, 0.28202149271965027, 0.26470455527305603, 0.2567497491836548, -0.49409547448158264, 0.10260670632123947, -0.5497483015060425, 0.6109760403633118, 0.5078732967376709, -0.39028435945510864, 0.4023667573928833, -0.07047625631093979, 0.406975120306015, 0.22746549546718597, 0.06921856105327606, -0.23285067081451416, -0.2560187578201294, -0.8090445399284363, 0.03949327766895294, 0.6077711582183838, 0.52994704246521, -0.6176720261573792, 0.6491031646728516, -0.2245120257139206, -0.4110592007637024, -0.32168176770210266, 0.1047341600060463, 0.6179589033126831, 0.31253165006637573, 0.38586530089378357, -0.2507757842540741, -0.6969836950302124, -0.8515633344650269, -0.03162302076816559, -0.04104578495025635, 0.04810751602053642, 0.25215384364128113, 0.6167028546333313, -0.30911797285079956, 0.8146092891693115, -0.3952479660511017, -0.19937588274478912, -0.6491413116455078, 0.4323327839374542, 0.39983615279197693, 0.46170279383659363, 0.5885400176048279, -0.7073494791984558, -0.6558660268783569, 0.14470383524894714, -0.6654765605926514, -0.05548154562711716, 0.07952512055635452, -0.10897044092416763, 0.5966374278068542, 0.6423940062522888, -0.46297338604927063, 0.42183414101600647, 0.7553970813751221, -0.45113587379455566, 0.5871409773826599, -0.1349877417087555, -0.15365280210971832, -1.369276762008667, 0.3297337293624878, 0.06234832480549812, -0.41373029351234436, -0.5640468001365662, 0.007582152262330055, 0.10636299103498459, -0.11437591165304184, -0.2294117510318756, 0.681783139705658, -0.6768339276313782, 0.08165130764245987, -0.29237475991249084, 0.21792387962341309, -0.042685821652412415, 0.5583673715591431, 0.1814681887626648, 0.6057332158088684, 0.5643903613090515, -0.4563756585121155, 0.49580368399620056, 0.24568894505500793, -0.27699577808380127, 0.29330071806907654, -0.8740653395652771, 0.19597959518432617, -0.09923738241195679, 0.21391139924526215, -0.7643284201622009, 0.017807967960834503, 0.08101363480091095, -0.5207304358482361, 0.5402642488479614, -0.1418720930814743, -0.3958051800727844, -0.5782261490821838, -0.01933436281979084, 0.27275440096855164, 0.4680768549442291, -0.44689008593559265, 0.6131258606910706, 0.23393721878528595, -0.17213132977485657, -0.827776312828064, -0.7812923789024353, 0.16667185723781586, 0.07585727423429489, -0.5733514428138733, 0.3891275227069855, -0.11467671394348145, -0.02055533044040203, 0.11759109795093536, 0.030586376786231995, -0.18341302871704102, -0.2015421837568283, 0.07235649228096008, 0.0969422236084938, -0.42854568362236023, 0.08485879004001617, -0.19464217126369476, -0.2314000129699707, 0.011576713062822819, -0.42757800221443176, 0.6540519595146179, -0.18141187727451324, -0.0018019321141764522, -0.4324266016483307, 0.49501094222068787, 0.2732272148132324, -0.21373780071735382, 0.833594799041748, 0.7566922307014465, -0.27925240993499756, -0.18581657111644745, -0.577600359916687, -0.24894382059574127, -0.45394524931907654, 0.8003286719322205, -0.2722114324569702, -0.9687020778656006, 0.5072546005249023, 0.17309768497943878, 0.016342511400580406, 0.5086721181869507, 0.38797661662101746, 0.051797494292259216, 0.9719611406326294, 0.7869200110435486, -0.17016635835170746, 0.5708649158477783, -0.5837842226028442, 0.32428649067878723, -0.9625686407089233, 0.039294857531785965, -0.5053211450576782, -0.2117389440536499, -0.6582834720611572, -0.07827509939670563, 0.0682937428355217, 0.06355415284633636, -0.47180211544036865, 0.5983814597129822, -0.46960118412971497, 0.09208179265260696, 0.684779703617096, 0.10125534981489182, -0.012778151780366898, -0.004957725293934345, -0.4617316722869873, 0.20224565267562866, -0.643920361995697, -0.2583865523338318, 1.0969617366790771, 0.31711870431900024, 0.50392746925354, -0.05289995297789574, 0.5413485169410706, -0.03205593675374985, 0.06089014559984207, -0.6753105521202087, 0.4545971751213074, -0.26297301054000854, -0.6507812738418579, -0.379954993724823, -0.738973081111908, -1.2076470851898193, 0.039877261966466904, -0.2619555592536926, -0.8807916641235352, 0.09015978872776031, 0.22930815815925598, -0.3614600598812103, 0.4431704878807068, -0.7474439740180969, 0.8706387877464294, -0.3111626207828522, -0.3766232132911682, 0.055122166872024536, -0.5875740051269531, 0.09780361503362656, -0.09609255939722061, -0.06452004611492157, 0.32739272713661194, 0.22921566665172577, 0.8026766777038574, -0.6011432409286499, 0.8732181191444397, -0.10101915150880814, 0.1077563539147377, 0.19863949716091156, -0.1656298041343689, 0.5586345195770264, -0.10673096776008606, -0.005510400515049696, 0.4529896378517151, 0.007732156664133072, -0.26995953917503357, -0.4711877107620239, 0.5560715794563293, -1.1514822244644165, -0.4651126563549042, -0.4930547773838043, -0.4482101798057556, -0.0257108211517334, 0.38149723410606384, 0.5080287456512451, 0.6790880560874939, -0.05638917163014412, 0.3197886645793915, 0.6613598465919495, -0.4950026273727417, 0.6109475493431091, 0.3469826877117157, -0.3415912687778473, -0.4293243885040283, 0.60127854347229, 0.41298291087150574, 0.15140457451343536, 0.6262308955192566, 0.22170859575271606, -0.37863248586654663, -0.5338882207870483, -0.1308208703994751, 0.32301148772239685, -0.4953404664993286, -0.23077881336212158, -0.973090648651123, -0.7043605446815491, -0.6228787899017334, 0.10008307546377182, -0.47560155391693115, -0.2812093496322632, -0.24803876876831055, -0.07657282054424286, 0.35984915494918823, 0.7443545460700989, -0.21036390960216522, 0.43927955627441406, -0.5275073647499084, 0.18188762664794922, 0.42663007974624634, 0.3418464958667755, 0.07640741020441055, -0.7085704207420349, -0.3712528645992279, 0.0303290244191885, -0.33155807852745056, -0.5554036498069763, 0.5259267687797546, 0.11011407524347305, 0.6004306077957153, 0.47136935591697693, -0.010181787423789501, 0.4988689124584198, -0.47996291518211365, 0.6245672702789307, 0.434439480304718, -0.898373007774353, 0.4614977240562439, -0.15854008495807648, 0.3324943780899048, 0.17047646641731262, 0.5149486064910889, -0.6737315654754639, -0.16676534712314606, -0.6551017761230469, -1.0755503177642822, 0.8953771591186523, 0.18733449280261993, 0.36305829882621765, 0.11743264645338058, 0.42144402861595154, -0.14246229827404022, 0.18899881839752197, -1.080662727355957, -0.5673381686210632, -0.4618799090385437, -0.28915339708328247, -0.21936678886413574, -0.4874260425567627, 0.1312422752380371, -0.34034234285354614, 0.6900969743728638, -0.11059104651212692, 0.7004412412643433, 0.3015800714492798, -0.20488789677619934, 0.1701584756374359, 0.10572732239961624, 0.5021514296531677, 0.6367276906967163, -0.1782594621181488, 0.08095429092645645, 0.10087373107671738, -0.6527276039123535, -0.06579985469579697, 0.4240510165691376, -0.09604199230670929, 0.0019822644535452127, 0.44852620363235474, 1.1106234788894653, -0.032966747879981995, -0.13992249965667725, 0.6397605538368225, -0.006715244613587856, -0.45861321687698364, -0.6103330850601196, 0.008067910559475422, 0.12440508604049683, 0.28391966223716736, 0.3853704035282135, -0.06720717996358871, 0.019744301214814186, -0.4341603219509125, 0.12892034649848938, 0.34405517578125, -0.5394971966743469, -0.4085986912250519, 0.5806633830070496, 0.026699170470237732, -0.14541810750961304, 0.6443859934806824, -0.2719980776309967, -0.6326099634170532, 0.5908188223838806, 0.5680586099624634, 0.9572694897651672, -0.18510441482067108, 0.10364317148923874, 0.6641598343849182, 0.32179367542266846, -0.06576470285654068, 0.09928026050329208, 0.06126454100012779, -0.8585526347160339, -0.6058314442634583, -0.6922047138214111, -0.09349325299263, 0.49475419521331787, -0.4692402184009552, 0.17566464841365814, -0.30365481972694397, -0.34575697779655457, 0.038309428840875626, 0.31977781653404236, -0.6432973146438599, 0.2867441177368164, 0.21358808875083923, 0.9727362394332886, -0.6649360656738281, 0.8128974437713623, 0.8759482502937317, -0.4755021035671234, -1.149465560913086, -0.19632235169410706, -0.1720668226480484, -0.7025887966156006, 0.9088699817657471, 0.19776922464370728, 0.15688274800777435, 0.11818008124828339, -0.6434061527252197, -0.9398753643035889, 1.0198338031768799, 0.2591615319252014, -0.7639115452766418, -0.0595075823366642, 0.2275761514902115, 0.3799777925014496, -0.2864011526107788, 0.706503689289093, 0.20609021186828613, 0.468440443277359, 0.015219107270240784, -0.9871190786361694, 0.11495284736156464, -0.5252174139022827, 0.17281919717788696, 0.04641019180417061, -0.762198269367218, 1.1271353960037231, -0.0009195130551233888, 0.06571148335933685, 0.09104619175195694, 0.7197543382644653, 0.028869526460766792, 0.062029894441366196, 0.5234284996986389, 0.6953886151313782, 0.6488685011863708, -0.2448352724313736, 0.9842787981033325, -0.1908024251461029, 0.5209218263626099, 0.866996169090271, 0.03463997691869736, 0.7679290771484375, 0.18039570748806, -0.17078378796577454, 0.5732378363609314, 0.4902767539024353, 0.020410913974046707, 0.29628363251686096, 0.21962818503379822, 0.1183900460600853, -0.2345285266637802, 0.26018404960632324, -0.3998318314552307, 0.5278313159942627, 0.09696492552757263, -0.6405162811279297, -0.08758912235498428, 0.050945598632097244, 0.48453888297080994, -0.20279349386692047, -0.3480646312236786, 0.6343768239021301, 0.23514233529567719, -0.6037083268165588, 0.6796696186065674, -0.07994941622018814, 0.7717791795730591, -0.7544423341751099, 0.11988259851932526, -0.3771416246891022, 0.2840966582298279, -0.14095380902290344, -0.6189945936203003, 0.2490728199481964, -0.08102443069219589, -0.2589469850063324, -0.18968430161476135, 0.4053933620452881, -0.3263947665691376, -0.6510646939277649, 0.4586305618286133, 0.30630335211753845, 0.13460427522659302, -0.18001008033752441, -0.9105433225631714, 0.0554424449801445, -0.024487460032105446, -0.6975637674331665, 0.333906352519989, 0.6296672821044922, 0.061367522925138474, 0.5279915928840637, 0.5178481340408325, 0.22311566770076752, -0.0984320417046547, -0.035824667662382126, 0.7695813775062561, -0.7377578020095825, -0.5720487833023071, -0.6707829833030701, 0.5011157393455505, -0.24829256534576416, -0.4585135281085968, 0.5634661912918091, 0.4432404041290283, 0.7912535071372986, 0.139535054564476, 0.9213430881500244, -0.29903319478034973, 0.5273191332817078, -0.5125311613082886, 1.0369675159454346, -0.7534629702568054, -0.12708652019500732, -0.30758512020111084, -0.8739683032035828, -0.33032211661338806, 0.8122802376747131, -0.37159988284111023, 0.4957091808319092, 0.9485633969306946, 0.7970775961875916, -0.20861415565013885, -0.22155418992042542, 0.44288456439971924, 0.7175567150115967, 0.10267119854688644, 0.4300910532474518, 0.581121027469635, -0.5210578441619873, 0.6923829913139343, -0.2956484258174896, -0.316328227519989, -0.18955843150615692, -0.979486346244812, -1.0969632863998413, -0.8192871809005737, -0.4012439250946045, -0.4443719983100891, 0.09801207482814789, 0.9930511116981506, 1.0043137073516846, -0.9557629823684692, -0.25270405411720276, -0.1995430290699005, -0.13673938810825348, -0.2341272383928299, -0.26049792766571045, 0.6739686727523804, -0.4864689111709595, -0.7073217630386353, -0.13504260778427124, 0.03489161282777786, -0.003451444674283266, -0.23474743962287903, 0.06905337423086166, -0.18778860569000244, -0.045379381626844406, 0.6415171027183533, 0.34494826197624207, -0.40790265798568726, -0.19687104225158691, 0.13665258884429932, -0.17472344636917114, 0.05293070524930954, 0.5198782086372375, -0.6271925568580627, 0.16045507788658142, 0.41496163606643677, 0.47958695888519287, 0.5953609943389893, -0.30605584383010864, 0.5167263746261597, -0.6395020484924316, 0.2537946105003357, -0.0672389566898346, 0.5540785789489746, 0.3156810700893402, -0.3310580253601074, 0.33830976486206055, 0.14855261147022247, -0.6999284625053406, -0.5934030413627625, 0.06348021328449249, -0.9566837549209595, -0.27936863899230957, 1.2625478506088257, -0.3298550248146057, -0.4322356879711151, -0.11170320212841034, -0.13284994661808014, 0.3607252538204193, -0.2832389771938324, 0.6135749816894531, 0.4483901858329773, 0.09994138032197952, -0.48847654461860657, -0.5777230262756348, 0.2937696874141693, 0.20288413763046265, -0.6300908923149109, -0.050737351179122925, 0.12198241055011749, 0.285784512758255, 0.32050952315330505, 0.4464157819747925, 0.009141442365944386, 0.008363425731658936, -0.11411961168050766, 0.38366711139678955, -0.2049569934606552, -0.15057620406150818, -0.0766967386007309, 0.005707197356969118, -0.13998404145240784, -0.033813320100307465 ]
EleutherAI/pythia-160m
EleutherAI
"2023-07-09T15:52:09Z"
29,038
13
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", "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>
[ -0.34216684103012085, -0.7910346388816833, 0.33678138256073, 0.05768144503235817, -0.22844237089157104, -0.21172262728214264, -0.2514711320400238, -0.4417478144168854, 0.21056987345218658, 0.1573035717010498, -0.3509381413459778, -0.2911337912082672, -0.4300036132335663, -0.06043983995914459, -0.47652140259742737, 1.1538469791412354, -0.14202839136123657, -0.13398921489715576, 0.11884228885173798, -0.0708378478884697, -0.04236351698637009, -0.5383989810943604, -0.4347268342971802, -0.3819258511066437, 0.6495329141616821, 0.16651369631290436, 0.878173291683197, 0.5868490934371948, 0.1544622778892517, 0.2965843379497528, -0.3512730002403259, -0.061888668686151505, -0.175298810005188, -0.1027611568570137, 0.006355661433190107, -0.25548821687698364, -0.7171594500541687, 0.006172071676701307, 0.7015478014945984, 0.6824519634246826, -0.19721727073192596, 0.255375474691391, 0.003085451666265726, 0.3362244665622711, -0.5360015630722046, 0.010509409010410309, -0.3242427408695221, -0.19900290668010712, -0.08727110922336578, 0.1454731523990631, -0.38592326641082764, -0.3071889579296112, 0.46801599860191345, -0.6673669815063477, 0.2551271617412567, 0.1033974289894104, 1.2396278381347656, -0.1300118863582611, -0.43038707971572876, -0.0648135244846344, -0.7165259718894958, 0.7059080600738525, -0.7207075357437134, 0.3506280183792114, 0.2724178731441498, 0.15439145267009735, -0.02499615214765072, -0.9181379079818726, -0.5301049947738647, -0.2248939722776413, -0.1168934553861618, -0.034191813319921494, -0.6195967197418213, 0.03193045035004616, 0.4994032382965088, 0.6268129944801331, -0.8445331454277039, -0.05585995316505432, -0.3739899694919586, -0.361257940530777, 0.3590404987335205, 0.07526828348636627, 0.4616778492927551, -0.30321937799453735, 0.0016195500502362847, -0.3774062395095825, -0.6623427867889404, -0.23507262766361237, 0.5658249258995056, 0.07089105248451233, -0.36612942814826965, 0.5129826068878174, -0.3797607421875, 0.5929358005523682, -0.08820480108261108, 0.25271010398864746, 0.4345899820327759, -0.21566876769065857, -0.5152139663696289, -0.10761036723852158, 0.9578576683998108, 0.11705898493528366, 0.21866509318351746, -0.030690034851431847, -0.05902928486466408, 0.044340915977954865, 0.05788931995630264, -1.1405235528945923, -0.7928611040115356, 0.24125999212265015, -0.3989127278327942, -0.39920350909233093, -0.14507021009922028, -0.9405955076217651, -0.16952604055404663, -0.19004875421524048, 0.5856228470802307, -0.5068681240081787, -0.7266573905944824, -0.12620791792869568, 0.020551852881908417, 0.2266385704278946, 0.36316603422164917, -0.957315981388092, 0.4152661859989166, 0.453464537858963, 1.0373177528381348, 0.21161966025829315, -0.5852706432342529, -0.18010078370571136, -0.24920018017292023, -0.12494422495365143, 0.3504732847213745, -0.11740343272686005, -0.19387662410736084, -0.11765902489423752, 0.19144459068775177, -0.12873125076293945, -0.34119847416877747, 0.4118116796016693, -0.4078816771507263, 0.26555943489074707, -0.25352200865745544, -0.43879973888397217, -0.3643832206726074, 0.10412874072790146, -0.6315257549285889, 0.8619194626808167, 0.23729625344276428, -0.9776760935783386, 0.23220175504684448, -0.22023817896842957, -0.05884644761681557, -0.029302412644028664, 0.19892357289791107, -0.7046627402305603, 0.02404904179275036, 0.3444236218929291, 0.05268952250480652, -0.39223596453666687, 0.21489578485488892, -0.24778974056243896, -0.44907647371292114, 0.1921549141407013, -0.5438998937606812, 0.9274588823318481, 0.2014809250831604, -0.6517629623413086, 0.288167804479599, -0.5686090588569641, 0.22659291326999664, 0.25537386536598206, -0.3992285430431366, 0.07098954170942307, -0.20610830187797546, 0.4059068560600281, 0.1987968236207962, 0.1901421993970871, -0.3716249465942383, 0.27353379130363464, -0.4975350499153137, 0.7518882155418396, 0.7405553460121155, -0.06588345766067505, 0.4870758354663849, -0.43474140763282776, 0.48442012071609497, 0.014867464080452919, 0.21217316389083862, -0.06444357335567474, -0.6449602842330933, -1.002395510673523, -0.2864820659160614, 0.38340115547180176, 0.30075734853744507, -0.48053810000419617, 0.4273591935634613, -0.26392027735710144, -0.8699843883514404, -0.194233238697052, -0.07229075580835342, 0.40940022468566895, 0.294353723526001, 0.4261467158794403, -0.1580074578523636, -0.5475567579269409, -0.8925129771232605, -0.23524165153503418, -0.42525067925453186, 0.1245875433087349, 0.20403243601322174, 0.9451387524604797, -0.14049383997917175, 0.5755576491355896, -0.34537750482559204, 0.2593333125114441, -0.3663635551929474, 0.16530904173851013, 0.4466664493083954, 0.5973259806632996, 0.3916619122028351, -0.5648783445358276, -0.40227416157722473, 0.013597100973129272, -0.5794717073440552, 0.10556499660015106, 0.04284006357192993, -0.316183477640152, 0.31464651226997375, 0.08447769284248352, -0.9932616949081421, 0.4610540270805359, 0.6541091203689575, -0.5438767075538635, 0.7975892424583435, -0.34607183933258057, -0.004133498761802912, -1.0755995512008667, 0.27452507615089417, 0.1435876190662384, -0.23243513703346252, -0.6023746728897095, 0.07466597110033035, 0.20106075704097748, -0.23461636900901794, -0.4224473536014557, 0.5859765410423279, -0.5547335743904114, -0.1542905569076538, -0.21691152453422546, 0.044621482491493225, -0.028664516285061836, 0.6415825486183167, 0.149440199136734, 0.5731863975524902, 0.8079551458358765, -0.7684850096702576, 0.4302167296409607, 0.19033122062683105, -0.2829129695892334, 0.3633771538734436, -0.9132847785949707, 0.1526191085577011, 0.08498214185237885, 0.4193895757198334, -0.6039291620254517, -0.3694107234477997, 0.5240206718444824, -0.5808378458023071, 0.152638778090477, -0.4381433427333832, -0.534878671169281, -0.4206039309501648, -0.1622360646724701, 0.6304495930671692, 0.7785809636116028, -0.5930993556976318, 0.7005233764648438, 0.05226675048470497, 0.12155934423208237, -0.36565250158309937, -0.5703588724136353, -0.22568467259407043, -0.5401337742805481, -0.6930007934570312, 0.40281203389167786, 0.1671634465456009, -0.17912612855434418, 0.0297851525247097, 0.029128890484571457, 0.10732529312372208, -0.059802234172821045, 0.3329853117465973, 0.3387373983860016, -0.05139515548944473, 0.019808439537882805, -0.15334363281726837, -0.1491786688566208, -0.007798206526786089, -0.5155032277107239, 0.9688663482666016, -0.3142806589603424, -0.19605356454849243, -0.8416805863380432, -0.0030707863625139, 0.8980210423469543, -0.4165917932987213, 0.9205703139305115, 0.6252272129058838, -0.7093794941902161, 0.15896475315093994, -0.3725653290748596, -0.30316162109375, -0.44305822253227234, 0.6831361055374146, -0.26138779520988464, -0.35052838921546936, 0.6124881505966187, 0.2736019790172577, 0.2739356458187103, 0.5745444893836975, 0.7329787015914917, 0.22027097642421722, 1.2314672470092773, 0.46307173371315, -0.17626425623893738, 0.6615114212036133, -0.5379341244697571, 0.2523486912250519, -1.114691972732544, -0.19168643653392792, -0.5188178420066833, -0.26033833622932434, -0.9493488669395447, -0.2866308391094208, 0.3372015357017517, 0.2085246741771698, -0.7560158371925354, 0.5589707493782043, -0.5526421070098877, 0.048970647156238556, 0.642839789390564, 0.24836385250091553, 0.1725049763917923, 0.21599161624908447, 0.0794837549328804, -0.07996868342161179, -0.6848723292350769, -0.34925395250320435, 1.263777732849121, 0.4995574653148651, 0.6109294295310974, 0.2941468060016632, 0.730090856552124, -0.156993567943573, 0.25134435296058655, -0.7173013091087341, 0.4182138442993164, 0.3589218854904175, -0.7184801697731018, -0.21228179335594177, -0.7885635495185852, -0.9780958294868469, 0.4965367615222931, 0.07317957282066345, -1.106296181678772, 0.22067764401435852, 0.19869884848594666, -0.37331974506378174, 0.48398664593696594, -0.645653247833252, 1.0143073797225952, -0.253365695476532, -0.4850633442401886, -0.3439437448978424, -0.29277509450912476, 0.22807948291301727, 0.36713990569114685, 0.134481281042099, 0.10780928283929825, 0.2585415244102478, 1.0114108324050903, -0.7063930034637451, 0.6415982842445374, -0.13253778219223022, 0.14821329712867737, 0.346340149641037, 0.27685683965682983, 0.6707168817520142, 0.15431934595108032, 0.11342871934175491, -0.0424717478454113, 0.15182551741600037, -0.5928670763969421, -0.3720296323299408, 0.9322537779808044, -1.1345746517181396, -0.36546415090560913, -0.798367440700531, -0.5987278819084167, 0.10923964530229568, 0.19640116393566132, 0.43479570746421814, 0.655484139919281, -0.0399654246866703, 0.032485805451869965, 0.5968604683876038, -0.5089726448059082, 0.37269875407218933, 0.2129245400428772, -0.4812832474708557, -0.5340553522109985, 1.0210038423538208, 0.0470128171145916, 0.3369118273258209, -0.006185201928019524, 0.21822163462638855, -0.3847467005252838, -0.46510449051856995, -0.6200211048126221, 0.5522180795669556, -0.7125815153121948, 0.007220039144158363, -0.7216777205467224, -0.031963467597961426, -0.44656264781951904, 0.1074020266532898, -0.41403353214263916, -0.35224446654319763, -0.24164512753486633, -0.009941283613443375, 0.5796763896942139, 0.4792111814022064, 0.12091154605150223, 0.3486546277999878, -0.5264010429382324, -0.049008917063474655, 0.22650796175003052, 0.09601898491382599, 0.12607616186141968, -0.9437032341957092, -0.12401043623685837, 0.1565321534872055, -0.4276438355445862, -1.1422195434570312, 0.5260880589485168, -0.040286365896463394, 0.36434251070022583, 0.0748036727309227, -0.25392526388168335, 0.6100160479545593, -0.07020185887813568, 0.6746809482574463, 0.15021897852420807, -1.0344233512878418, 0.5434901118278503, -0.5042226314544678, 0.31803062558174133, 0.3522851765155792, 0.3646540939807892, -0.7487697601318359, -0.07320299744606018, -1.0095877647399902, -1.1000021696090698, 0.7548169493675232, 0.4723759889602661, 0.1908196061849594, 0.12551374733448029, 0.41261914372444153, -0.47548073530197144, 0.14526855945587158, -1.0471991300582886, -0.2679917812347412, -0.25318846106529236, -0.09302176535129547, 0.15265583992004395, -0.030577370896935463, 0.05466476082801819, -0.5698530077934265, 1.038062572479248, 0.04180767387151718, 0.3446143567562103, 0.2785167396068573, -0.4027351140975952, -0.10871639847755432, -0.06132575124502182, 0.15954537689685822, 0.7845836877822876, -0.12519046664237976, 0.04325564578175545, 0.23304606974124908, -0.5479439496994019, 0.029290439561009407, 0.1502171903848648, -0.3852044641971588, -0.062408916652202606, 0.19629108905792236, 0.8688682317733765, 0.16327817738056183, -0.42454445362091064, 0.2539966404438019, -0.06285997480154037, -0.07983218133449554, -0.2915092706680298, -0.19529367983341217, 0.208272784948349, 0.17783984541893005, -0.010553527623414993, -0.19758985936641693, -0.01618177443742752, -0.8877969980239868, 0.05032758414745331, 0.21652881801128387, -0.1651550680398941, -0.40999412536621094, 0.5883287787437439, 0.02726038731634617, -0.20087385177612305, 1.16733717918396, -0.23951219022274017, -0.6721075773239136, 0.7950414419174194, 0.48340824246406555, 0.728084921836853, -0.19552011787891388, 0.3510652482509613, 0.8898695111274719, 0.33045876026153564, -0.19950738549232483, 0.09172697365283966, 0.10606759041547775, -0.5222620964050293, -0.11265293508768082, -0.8180031776428223, -0.23247475922107697, 0.2471657246351242, -0.6112939715385437, 0.44806477427482605, -0.6355915069580078, -0.08767504245042801, -0.05403991788625717, 0.24209904670715332, -0.5878360867500305, 0.31625375151634216, 0.14438320696353912, 0.7192261815071106, -0.9353904724121094, 0.8311083316802979, 0.6582332849502563, -0.7432939410209656, -1.1199170351028442, 0.03495638445019722, 0.004885834641754627, -0.46520647406578064, 0.1299956738948822, 0.20680944621562958, 0.22081679105758667, 0.17118239402770996, -0.30253201723098755, -0.881741464138031, 1.328180193901062, 0.2559168040752411, -0.6658307909965515, -0.2588465213775635, -0.11419323831796646, 0.5535045862197876, 0.05395785719156265, 0.7107469439506531, 0.7073120474815369, 0.42303764820098877, 0.07199376076459885, -1.0667020082473755, 0.3555445671081543, -0.34153464436531067, -0.07740967720746994, 0.24666288495063782, -0.7053857445716858, 1.3194525241851807, -0.07562020421028137, -0.014439407736063004, 0.4521503150463104, 0.5945513248443604, 0.401222288608551, -0.11912994831800461, 0.358799010515213, 0.791038990020752, 0.884464681148529, -0.3867117464542389, 1.261427879333496, -0.32822316884994507, 0.7859172821044922, 0.8338841199874878, 0.21829268336296082, 0.5252041220664978, 0.41799598932266235, -0.38212770223617554, 0.5330721735954285, 0.8678180575370789, -0.08604111522436142, 0.17148084938526154, 0.2635742723941803, -0.30811807513237, -0.2821681499481201, 0.0985817015171051, -0.6116675138473511, 0.18406535685062408, 0.15542952716350555, -0.5855357050895691, -0.2009030431509018, -0.3376518487930298, 0.35968950390815735, -0.4290093183517456, -0.25172197818756104, 0.28167903423309326, 0.10260964184999466, -0.6519672274589539, 0.6364772319793701, 0.28269097208976746, 0.5774329900741577, -0.46528738737106323, 0.1880347728729248, -0.1406887173652649, 0.3187362849712372, -0.3620035648345947, -0.41689106822013855, 0.0738162249326706, 0.0015420864801853895, 0.08201701939105988, 0.10669833421707153, 0.4188796877861023, -0.1499539613723755, -0.5794966220855713, 0.20626336336135864, 0.5036560893058777, 0.2684893310070038, -0.4557497799396515, -0.7161527276039124, 0.11959204822778702, -0.17214733362197876, -0.5461286902427673, 0.4424334466457367, 0.2844730615615845, -0.12388713657855988, 0.5926898121833801, 0.6367008686065674, 0.047826703637838364, 0.012439927086234093, 0.1535710096359253, 0.9936065077781677, -0.4608670175075531, -0.48077157139778137, -0.9297916889190674, 0.48149552941322327, 0.02669278346002102, -0.6840242743492126, 0.881580114364624, 0.5757267475128174, 0.7007054090499878, 0.27345508337020874, 0.6063345670700073, -0.4355279207229614, -0.04101879522204399, -0.2773990035057068, 0.6701771020889282, -0.5104026198387146, 0.020220620557665825, -0.507664144039154, -1.1613413095474243, -0.055864118039608, 0.9409577250480652, -0.5322006940841675, 0.43174251914024353, 0.795738935470581, 0.8199372291564941, -0.09558454155921936, 0.08559609949588776, 0.05842311680316925, 0.29341936111450195, 0.5214208960533142, 0.9644263982772827, 0.9096794724464417, -0.714111328125, 0.5940937399864197, -0.5055330395698547, -0.2616436779499054, -0.16224433481693268, -0.4794785678386688, -0.8401414752006531, -0.46636801958084106, -0.4962224066257477, -0.7648701667785645, 0.00048233280540443957, 0.8825163841247559, 0.7779774069786072, -0.619749903678894, -0.1758711040019989, -0.5355179905891418, 0.03199639916419983, -0.2477792203426361, -0.23585623502731323, 0.4275522828102112, 0.13619209825992584, -0.9751333594322205, -0.034425489604473114, -0.1560390442609787, 0.11530115455389023, -0.44318264722824097, -0.33357977867126465, -0.19437333941459656, -0.11501377075910568, 0.03938790783286095, 0.3177032172679901, -0.509226381778717, -0.24069905281066895, 0.029456546530127525, 0.04620220884680748, -0.006864808965474367, 0.7298979163169861, -0.565977931022644, 0.12654486298561096, 0.6301468014717102, 0.12480826675891876, 0.8264625668525696, -0.2768772840499878, 0.4239451289176941, -0.2624918818473816, 0.3439663052558899, 0.276224285364151, 0.6634252071380615, 0.34212997555732727, -0.25009989738464355, 0.15056443214416504, 0.4143680930137634, -0.7519553303718567, -0.8757854104042053, 0.34517768025398254, -0.7054610848426819, -0.09225378185510635, 1.2789205312728882, -0.2759518325328827, -0.4121018648147583, 0.05148717388510704, -0.21208761632442474, 0.5294619798660278, -0.2959432005882263, 0.6618313789367676, 0.6489918828010559, 0.07249666005373001, -0.20848466455936432, -0.654208242893219, 0.35846641659736633, 0.6973006129264832, -0.8225230574607849, 0.3441424071788788, 0.5823369026184082, 0.6189821362495422, 0.23082853853702545, 0.5628410577774048, -0.2915155589580536, 0.6231011152267456, 0.07978416234254837, 0.08436965197324753, 0.038962166756391525, -0.4858585298061371, -0.45329782366752625, -0.12118085473775864, 0.23724770545959473, 0.026903696358203888 ]
nghuyong/ernie-1.0-base-zh
nghuyong
"2022-09-10T09:37:26Z"
28,963
15
transformers
[ "transformers", "pytorch", "ernie", "fill-mask", "zh", "arxiv:1904.09223", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: zh --- # ERNIE-1.0 ## Introduction ERNIE (Enhanced Representation through kNowledge IntEgration) is proposed by Baidu in 2019, which is designed to learn language representation enhanced by knowledge masking strategies i.e. entity-level masking and phrase-level masking. Experimental results show that ERNIE achieve state-of-the-art results on five Chinese natural language processing tasks including natural language inference, semantic similarity, named entity recognition, sentiment analysis and question answering. More detail: https://arxiv.org/abs/1904.09223 ## Released Model Info This released pytorch model is converted from the officially released PaddlePaddle ERNIE model and a series of experiments have been conducted to check the accuracy of the conversion. - Official PaddlePaddle ERNIE repo: https://github.com/PaddlePaddle/ERNIE - Pytorch Conversion repo: https://github.com/nghuyong/ERNIE-Pytorch ## How to use ```Python from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nghuyong/ernie-1.0-base-zh") model = AutoModel.from_pretrained("nghuyong/ernie-1.0-base-zh") ``` ## Citation ```bibtex @article{sun2019ernie, title={Ernie: Enhanced representation through knowledge integration}, author={Sun, Yu and Wang, Shuohuan and Li, Yukun and Feng, Shikun and Chen, Xuyi and Zhang, Han and Tian, Xin and Zhu, Danxiang and Tian, Hao and Wu, Hua}, journal={arXiv preprint arXiv:1904.09223}, year={2019} } ```
[ -0.455387681722641, -0.570175051689148, -0.07225071638822556, 0.27326592803001404, -0.2802835702896118, -0.14211881160736084, -0.48395270109176636, -0.6220901608467102, 0.31716790795326233, 0.26722046732902527, -0.3376889228820801, -0.450114369392395, -0.6589361429214478, -0.14771509170532227, -0.4008200466632843, 1.2525593042373657, 0.0671171247959137, 0.0045660557225346565, -0.019386254251003265, -0.05261510610580444, -0.15889625251293182, -0.3910365402698517, -0.5040541291236877, -0.3633861541748047, 0.3262207508087158, 0.20549364387989044, 0.42448690533638, 0.6225247979164124, 0.5311062335968018, 0.2929155230522156, 0.06906335055828094, 0.015023884363472462, -0.3299022912979126, -0.19122719764709473, 0.18905973434448242, -0.2726218104362488, -0.6834794282913208, 0.286941260099411, 0.528392493724823, 0.578555166721344, -0.0668763518333435, 0.15797574818134308, 0.16209976375102997, 0.3405837416648865, -0.5495321154594421, 0.5041638016700745, -0.6801967620849609, 0.04885050281882286, -0.0422847680747509, 0.0901501327753067, -0.41997894644737244, -0.30796483159065247, 0.4416675567626953, -0.6869994401931763, 0.06857268512248993, -0.15622363984584808, 1.1027129888534546, 0.025619788095355034, -0.41515809297561646, -0.49812158942222595, -0.5827624201774597, 1.0054502487182617, -0.9403167366981506, 0.18917299807071686, 0.24098598957061768, 0.4332861006259918, 0.0012527460930868983, -0.9871771335601807, -0.7289750576019287, -0.6185961365699768, -0.36252865195274353, 0.23706671595573425, 0.0973288044333458, 0.5673026442527771, 0.30534827709198, 0.5750784873962402, -0.41951674222946167, -0.26242080330848694, -0.693609893321991, -0.4251481890678406, 0.829865038394928, -0.24429450929164886, 0.22882427275180817, -0.6498275399208069, -0.5790292620658875, -0.3323957324028015, -0.29790550470352173, 0.3038661777973175, 0.41747409105300903, 0.040401387959718704, 0.04766607657074928, 0.29138800501823425, 0.0428483821451664, 0.7734499573707581, 0.14399006962776184, -0.04493425786495209, 0.390094518661499, -0.0258883535861969, -0.1263221949338913, 0.18434375524520874, 0.9547944068908691, 0.10660123080015182, 0.1036422997713089, -0.031625110656023026, -0.4200499355792999, -0.5623738169670105, 0.04817290976643562, -0.6744270920753479, -0.6118718385696411, 0.13814616203308105, -0.6811069846153259, -0.14040476083755493, 0.6845048069953918, -0.6024702787399292, -0.10714571923017502, -0.2899071276187897, 0.8931233882904053, -0.6569944024085999, -0.3654337525367737, -0.13145431876182556, -0.06214187294244766, 0.42714470624923706, 0.24590255320072174, -1.0745999813079834, 0.0922720655798912, 0.6093220710754395, 0.7364626526832581, 0.033886559307575226, -0.3298009932041168, -0.3212704658508301, 0.1776922345161438, -0.17228911817073822, 0.6082977652549744, -0.2253575623035431, -0.06652075052261353, 0.1759955883026123, -0.07827716320753098, -0.2363969385623932, -0.5503084659576416, 0.5045382976531982, -0.42904677987098694, 0.31423306465148926, 0.2305634468793869, -0.5683901906013489, -0.5752498507499695, 0.1211865097284317, -0.6156646013259888, 1.0235600471496582, 0.230230450630188, -0.424050509929657, 0.1886340230703354, -0.717095136642456, -0.32029667496681213, -0.1989336758852005, 0.17479605972766876, -0.32722023129463196, -0.09447671473026276, 0.3036513328552246, 0.3318946063518524, -0.13719487190246582, 0.37835559248924255, -0.11923734843730927, -0.3528234660625458, 0.1238093450665474, -0.3972841203212738, 1.120718240737915, 0.26378488540649414, -0.3594752252101898, 0.2627406716346741, -0.8711733818054199, 0.001794826821424067, -0.2340516448020935, -0.3007779121398926, -0.056709058582782745, -0.132182314991951, 0.1435377597808838, 0.0879916176199913, 0.6878955364227295, -0.42430081963539124, 0.35682934522628784, -0.5942860841751099, 0.39909300208091736, 0.6835674047470093, -0.2334439903497696, 0.5754827857017517, -0.2906111478805542, 0.3046943247318268, 0.10419706255197525, 0.2856517434120178, -0.43673622608184814, -0.6875645518302917, -1.0362043380737305, -0.1893174797296524, 0.562664270401001, 0.671967625617981, -0.7380664944648743, 0.8987815380096436, -0.020407119765877724, -0.6922481656074524, -0.6586205959320068, 0.07040995359420776, 0.16261009871959686, 0.6064029335975647, 0.6044405102729797, -0.29942137002944946, -0.6857214570045471, -0.8887541890144348, -0.28888580203056335, -0.46241551637649536, -0.33045461773872375, 0.23185527324676514, 0.37075093388557434, -0.24298729002475739, 0.7840901613235474, -0.13392974436283112, -0.41144421696662903, -0.22826828062534332, 0.6346872448921204, 0.6178575158119202, 0.8201760053634644, 0.6398564577102661, -0.3428579270839691, -0.6602121591567993, 0.0775216743350029, -0.5709637403488159, -0.060375701636075974, -0.280207097530365, -0.34877249598503113, 0.3438059985637665, 0.3459171950817108, -0.6689490675926208, 0.7459751963615417, 0.5416494607925415, 0.0401557981967926, 0.4381531774997711, -0.2170044183731079, 0.060208000242710114, -0.9120302200317383, 0.11031531542539597, -0.29938700795173645, 0.048095110803842545, -0.4149240553379059, -0.19456219673156738, 0.16790123283863068, 0.05435963720083237, -0.106266088783741, 0.4156290888786316, -0.5752118825912476, 0.1118125468492508, -0.08574190735816956, 0.23603291809558868, -0.22793017327785492, 0.5480448007583618, -0.2602163851261139, 0.6764302849769592, 0.796829879283905, -0.7673985958099365, 0.9106650948524475, 0.26847606897354126, -0.2494375854730606, 0.06275710463523865, -0.8797236084938049, 0.2873845398426056, -0.01204458437860012, 0.14964884519577026, -1.113774299621582, -0.19261153042316437, 0.6370739936828613, -0.7886427640914917, 0.5641569495201111, -0.13306298851966858, -0.3122590184211731, -0.3272591829299927, -0.6340904831886292, 0.2706311345100403, 0.7671653628349304, -0.7904457449913025, 0.9516497850418091, 0.31633615493774414, 0.2503305673599243, -0.5839169025421143, -0.7771905660629272, -0.09625186026096344, -0.04147060588002205, -0.9218490719795227, 0.6793643236160278, -0.03527000918984413, 0.12514173984527588, 0.15162745118141174, -0.03865502402186394, -0.18107309937477112, -0.232896625995636, -0.31579768657684326, 0.3102535903453827, -0.48023727536201477, 0.4040156304836273, 0.03886415809392929, -0.3119811713695526, 0.16447584331035614, -0.46541649103164673, 0.5352824330329895, 0.11114097386598587, -0.16788513958454132, -0.7261017560958862, -0.019019879400730133, 0.3757733702659607, -0.3762741982936859, 0.8089509010314941, 1.0344457626342773, -0.35558846592903137, -0.12498518824577332, -0.43950381875038147, -0.345962256193161, -0.4985162317752838, 0.44685155153274536, 0.012983734719455242, -0.33285319805145264, 0.6530770063400269, 0.2562497854232788, 0.2712969481945038, 0.780118465423584, 0.25827112793922424, -0.001938356552273035, 1.01715087890625, 0.3253217339515686, -0.15387365221977234, 0.9313700795173645, -0.4859890341758728, 0.5172836780548096, -1.0456597805023193, -0.15666435658931732, -0.41306063532829285, -0.4266917407512665, -0.8978070020675659, -0.3628169000148773, 0.32365429401397705, 0.3045772314071655, -0.1300738900899887, 0.543301522731781, -0.6795397996902466, 0.08731907606124878, 1.0117746591567993, 0.130614772439003, -0.019468531012535095, 0.1299925148487091, 0.07115965336561203, 0.07228923588991165, -0.7266877293586731, -0.5495708584785461, 1.3058161735534668, 0.1634521633386612, 0.7811266779899597, 0.0761876106262207, 0.8764495253562927, -0.00851545948535204, 0.39577358961105347, -0.915585994720459, 0.5603890419006348, -0.06956502795219421, -0.8395328521728516, -0.37357568740844727, -0.27772772312164307, -1.050743818283081, 0.13744103908538818, -0.20506662130355835, -0.9249192476272583, -0.07149706780910492, 0.29840442538261414, -0.3386206328868866, 0.33389294147491455, -0.9243453741073608, 0.8706575036048889, -0.333846777677536, -0.30474576354026794, -0.2887532114982605, -0.6379131078720093, 0.3510335683822632, 0.39875954389572144, -0.1497487872838974, 0.0520164892077446, 0.19398432970046997, 1.0457720756530762, -0.23914320766925812, 0.6779371500015259, -0.3748467266559601, 0.013835773803293705, 0.6949188709259033, -0.04806441813707352, 0.4593272805213928, 0.29005834460258484, -0.05309860035777092, 0.37303629517555237, 0.04837847873568535, -0.4036684036254883, -0.7050269246101379, 0.6782846450805664, -1.0310052633285522, -0.7186501026153564, -0.7051534056663513, -0.5919531583786011, 0.14325308799743652, 0.18069596588611603, 0.10104763507843018, 0.4404979348182678, 0.16697059571743011, 0.260071337223053, 0.4032639265060425, -0.35302382707595825, 0.46096381545066833, 0.20999489724636078, -0.3133264183998108, -0.6688916087150574, 0.9746268391609192, 0.3238062858581543, 0.07638472318649292, 0.3940507769584656, 0.08907066285610199, -0.16777531802654266, -0.4423513114452362, -0.20025166869163513, 0.33276671171188354, -0.7982901930809021, -0.1427588313817978, -0.4654400944709778, -0.5313051342964172, -0.7077566385269165, 0.1666494458913803, -0.14955605566501617, -0.6548007726669312, -0.5288887023925781, -0.009662855416536331, 0.36012229323387146, 0.8728936314582825, -0.4547120928764343, 0.360128790140152, -0.8321731090545654, 0.08752986043691635, 0.5845355987548828, 0.22553090751171112, 0.1748085916042328, -0.7397940754890442, -0.4068581759929657, 0.12894198298454285, -0.5436351299285889, -0.9316067099571228, 0.4270060658454895, 0.2585032880306244, 1.018204927444458, 0.6215899586677551, 0.06478006392717361, 0.8660143613815308, -0.11308906972408295, 0.9434607028961182, 0.011607245542109013, -1.0498019456863403, 0.5621649622917175, -0.19299417734146118, -0.12032998353242874, 0.2663823068141937, 0.18978893756866455, -0.6057177782058716, -0.13707928359508514, -0.8042073845863342, -1.1570132970809937, 1.0767422914505005, 0.16924099624156952, 0.3341423571109772, 0.06682455539703369, 0.26110783219337463, 0.15743541717529297, 0.2709208130836487, -0.8168542385101318, -0.37599754333496094, -0.4900055229663849, -0.4679162800312042, 0.00385963823646307, -0.33864742517471313, 0.19005560874938965, -0.710664689540863, 0.9479209184646606, 0.1291315257549286, 0.7975112795829773, 0.3425517678260803, -0.3917856514453888, 0.06147657707333565, -0.20841200649738312, 0.5634634494781494, 0.528584897518158, -0.4559089243412018, 0.10470203310251236, 0.012022330425679684, -0.5397623181343079, -0.5409443974494934, 0.5157584547996521, -0.058894455432891846, 0.2851357161998749, 0.7384111285209656, 0.8021271228790283, 0.17439524829387665, -0.28835010528564453, 0.2943044602870941, 0.1699969321489334, -0.03758767992258072, -0.5173125267028809, 0.3806944787502289, -0.15832729637622833, 0.06967917829751968, 0.6268585920333862, 0.0055956463329494, 0.11209046095609665, -0.4646787941455841, 0.13277418911457062, 0.28611019253730774, -0.4012925922870636, -0.45411577820777893, 0.5591588020324707, 0.46646976470947266, -0.28550484776496887, 0.8158494830131531, -0.3360481858253479, -0.723162829875946, 0.8237664699554443, 0.3382677435874939, 0.8967776298522949, -0.3451062738895416, 0.08611387759447098, 0.9594054818153381, 0.377434104681015, 0.2672116160392761, 0.03674403950572014, -0.4478563964366913, -0.6890612840652466, -0.07651010900735855, -0.2077978253364563, -0.25452935695648193, 0.04649447277188301, -0.7049182653427124, 0.3272944390773773, -0.549136757850647, -0.002847264986485243, -0.2597270905971527, 0.11126528680324554, -0.5024216175079346, -0.15370339155197144, 0.11362821608781815, 0.856762707233429, -0.3336309790611267, 0.8255124688148499, 0.9006036520004272, -0.6618037223815918, -0.9209032654762268, 0.275190532207489, -0.265349805355072, -0.9214811325073242, 0.7613251209259033, 0.33224862813949585, 0.3146040737628937, 0.26637542247772217, -0.7958657741546631, -0.9367462992668152, 1.2857961654663086, 0.25647005438804626, -0.37338823080062866, 0.21822604537010193, -0.03159331902861595, 0.36461928486824036, -0.305814266204834, 0.6635664105415344, 0.5071181654930115, 0.5994834303855896, 0.060051511973142624, -1.0970594882965088, -0.37566718459129333, -0.22733256220817566, -0.053778644651174545, 0.08154163509607315, -0.6908033490180969, 1.3367407321929932, -0.061347343027591705, -0.11588133871555328, 0.21887807548046112, 0.9358729124069214, 0.15623685717582703, 0.2532569468021393, 0.34362441301345825, 0.19845029711723328, 0.8707380890846252, -0.27608540654182434, 0.8466491103172302, -0.7332879304885864, 0.8579578399658203, 0.6428579092025757, 0.19137254357337952, 0.5337240695953369, 0.6127223968505859, -0.2937242090702057, 0.7397406697273254, 0.38529619574546814, -0.004246520344167948, 0.5960751175880432, 0.0592324435710907, -0.26638832688331604, -0.20644129812717438, 0.13775362074375153, -0.5093713998794556, 0.4602102041244507, 0.32841211557388306, -0.45774850249290466, -0.1259811520576477, -0.15290307998657227, 0.04425358027219772, -0.24126403033733368, -0.26361826062202454, 0.6279458999633789, -0.13937406241893768, -0.7632735967636108, 0.665494441986084, -0.019101230427622795, 0.9272682070732117, -0.7718633413314819, -0.41164785623550415, -0.21935179829597473, 0.2469370812177658, -0.21328900754451752, -0.6231693029403687, 0.046745579689741135, -0.39203399419784546, 0.1513555496931076, -0.031235037371516228, 0.8161618113517761, -0.6187267303466797, -0.5302554368972778, 0.22246459126472473, 0.03880869224667549, 0.18680034577846527, 0.28145095705986023, -0.7160688042640686, -0.16882963478565216, 0.14285998046398163, -0.5951098203659058, -0.06840170174837112, 0.6002829670906067, 0.27004802227020264, 0.4671543836593628, 0.5685303807258606, -0.024634040892124176, 0.359960675239563, -0.3048185408115387, 0.7042149305343628, -0.7192790508270264, -0.4634169340133667, -0.5752184987068176, 0.7004715204238892, -0.29095906019210815, -0.5519619584083557, 0.7290183901786804, 0.2950468957424164, 1.1410619020462036, -0.1774778962135315, 0.6999553442001343, -0.5082996487617493, 0.35211607813835144, -0.5692111849784851, 0.9695721864700317, -0.34072551131248474, 0.23932769894599915, -0.042260944843292236, -0.7447916269302368, -0.2842424511909485, 1.4378777742385864, -0.4584573209285736, 0.43413257598876953, 0.7552383542060852, 0.771840512752533, 0.027662891894578934, -0.21800528466701508, 0.3225744068622589, 0.404880166053772, 0.5738121271133423, 0.7227720022201538, 0.7052487730979919, -0.9010533094406128, 0.620783269405365, -0.5889852643013, -0.2089441865682602, -0.3971833884716034, -0.8074384331703186, -1.1852065324783325, -0.674737811088562, -0.29377055168151855, -0.26189732551574707, -0.16776980459690094, 1.3460441827774048, 0.7902123928070068, -1.0901850461959839, -0.3137447237968445, -0.12157774716615677, 0.20236465334892273, -0.27618101239204407, -0.27985742688179016, 0.5742321610450745, -0.5651635527610779, -0.8859525918960571, -0.05875803530216217, 0.01846873201429844, -0.1143198013305664, -0.401113897562027, -0.2857222855091095, -0.28427937626838684, -0.10712453722953796, 0.3954879343509674, 0.12711113691329956, -0.7419901490211487, -0.394979864358902, -0.03760422021150589, -0.05469880998134613, 0.25898629426956177, 0.6916692852973938, -0.9685811996459961, 0.6676149964332581, 0.6385016441345215, 0.38149529695510864, 0.389972060918808, -0.2602370083332062, 0.4275309443473816, -0.5026514530181885, 0.38945862650871277, 0.27183571457862854, 0.2818683683872223, 0.24645347893238068, -0.17308712005615234, 0.2978343963623047, 0.33775341510772705, -0.5971574783325195, -0.6590108275413513, -0.01600007526576519, -0.8828703761100769, 0.09629790484905243, 1.023524522781372, -0.2903558313846588, -0.4813883304595947, 0.03292376548051834, -0.5890687704086304, 0.6971456408500671, -0.6005710363388062, 1.0813881158828735, 0.7503569722175598, -0.0956178531050682, -0.30012282729148865, -0.5967977643013, 0.4097740054130554, 0.23771463334560394, -0.5114246010780334, -0.18472743034362793, 0.07614666223526001, -0.02162817306816578, 0.3752742409706116, 0.1962871104478836, -0.002842339687049389, 0.43021607398986816, -0.12920323014259338, 0.45140087604522705, -0.28609803318977356, -0.08445259928703308, -0.22273950278759003, -0.26277053356170654, 0.06414085626602173, -0.40800943970680237 ]
Habana/gpt2
Habana
"2023-11-30T22:24:44Z"
28,956
0
null
[ "optimum_habana", "license:apache-2.0", "region:us" ]
null
"2022-05-24T12:41:41Z"
--- license: apache-2.0 --- [Optimum Habana](https://github.com/huggingface/optimum-habana) is the interface between the Hugging Face Transformers and Diffusers libraries and Habana's Gaudi processor (HPU). It provides a set of tools enabling easy and fast model loading, training and inference on single- and multi-HPU settings for different downstream tasks. Learn more about how to take advantage of the power of Habana HPUs to train and deploy Transformers and Diffusers models at [hf.co/hardware/habana](https://huggingface.co/hardware/habana). ## GPT2 model HPU configuration This model only contains the `GaudiConfig` file for running the [GPT2](https://huggingface.co/gpt2) model on Habana's Gaudi processors (HPU). **This model contains no model weights, only a GaudiConfig.** This enables to specify: - `use_fused_adam`: whether to use Habana's custom AdamW implementation - `use_fused_clip_norm`: whether to use Habana's fused gradient norm clipping operator - `use_torch_autocast`: whether to use PyTorch's autocast mixed precision ## Usage The model is instantiated the same way as in the Transformers library. The only difference is that there are a few new training arguments specific to HPUs. [Here](https://github.com/huggingface/optimum-habana/blob/main/examples/language-modeling/run_clm.py) is a causal language modeling example script to pre-train/fine-tune a model. You can run it with GPT2 with the following command: ```bash python run_clm.py \ --model_name_or_path gpt2 \ --dataset_name wikitext \ --dataset_config_name wikitext-2-raw-v1 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --do_train \ --do_eval \ --output_dir /tmp/test-clm \ --gaudi_config_name Habana/gpt2 \ --use_habana \ --use_lazy_mode \ --throughput_warmup_steps 2 ``` Check the [documentation](https://huggingface.co/docs/optimum/habana/index) out for more advanced usage and examples.
[ -0.6923772692680359, -0.8895149827003479, 0.3266445994377136, 0.22174756228923798, -0.20903843641281128, -0.13531149923801422, -0.10694893449544907, -0.43768686056137085, 0.08732346445322037, 0.2701779305934906, -0.4158329367637634, -0.038330987095832825, -0.4402019679546356, -0.27494966983795166, -0.3384133577346802, 1.1304272413253784, -0.1838216483592987, -0.215277761220932, -0.16649261116981506, -0.14278188347816467, -0.3987484872341156, -0.411184698343277, -1.0370256900787354, -0.47961753606796265, 0.27051621675491333, 0.07788874953985214, 1.0300204753875732, 0.47062379121780396, 0.3526141941547394, 0.38439151644706726, -0.12762804329395294, -0.010979186743497849, -0.3643234074115753, -0.17091591656208038, -0.02180563285946846, -0.3323318660259247, -0.4285728633403778, 0.23758122324943542, 0.548089325428009, 0.1627984493970871, -0.21487870812416077, 0.35353827476501465, 0.1235082671046257, 0.4109555780887604, -0.5018061995506287, -0.05664106830954552, -0.19501172006130219, 0.12900368869304657, -0.19392021000385284, -0.23717600107192993, -0.18165133893489838, -0.2787216901779175, 0.08179643750190735, -0.5751772522926331, 0.21653975546360016, 0.08400322496891022, 1.3741068840026855, 0.798208475112915, -0.5920641422271729, 0.21738313138484955, -0.8081164956092834, 0.6795945763587952, -0.44393378496170044, 0.3401419222354889, 0.3617291748523712, 0.6172301173210144, -0.20218297839164734, -0.8738983273506165, -0.392426073551178, -0.020181387662887573, -0.21400782465934753, 0.23761211335659027, -0.49750131368637085, 0.3372076153755188, 0.3938561677932739, 0.6934049129486084, -0.6073368787765503, 0.005719461012631655, -0.43785184621810913, -0.31425854563713074, 0.37176501750946045, -0.022092152386903763, 0.23875686526298523, -0.3322032392024994, -0.3949960172176361, -0.13458679616451263, -0.41532254219055176, -0.1462833136320114, 0.38372543454170227, -0.18492746353149414, -0.45218992233276367, 0.27135351300239563, 0.043630506843328476, 0.8720486760139465, 0.00621112622320652, -0.05778457596898079, 0.3810374140739441, -0.07781632244586945, -0.5514848232269287, -0.346908301115036, 0.7647698521614075, 0.017314665019512177, 0.09560335427522659, 0.016215410083532333, -0.2714003920555115, 0.178580641746521, 0.5955604910850525, -0.7418037056922913, -0.5003607869148254, 0.3413226902484894, -0.5008461475372314, -0.5085673928260803, -0.40537866950035095, -0.7715121507644653, 0.1205403283238411, -0.4014543890953064, 0.8477619886398315, -0.17531414330005646, -0.24695108830928802, -0.15032005310058594, -0.27782291173934937, 0.34921422600746155, 0.23433144390583038, -0.8393354415893555, 0.4979696273803711, 0.44356024265289307, 1.0322411060333252, -0.1687197983264923, -0.2359675019979477, -0.333072304725647, -0.06117503345012665, 0.004936359357088804, 0.5451580882072449, -0.03354841098189354, -0.2720887362957001, -0.0599319264292717, 0.14739477634429932, -0.16303841769695282, -0.4985300898551941, 0.8834415674209595, -0.4505534768104553, 0.5496302843093872, 0.23609548807144165, -0.3487185537815094, -0.32379668951034546, -0.18414653837680817, -0.632723331451416, 1.5222020149230957, 0.5421300530433655, -0.6823452711105347, 0.1520153284072876, -0.6398731470108032, -0.5156344175338745, -0.10414532572031021, -0.0459568127989769, -0.6789905428886414, 0.14281673729419708, -0.027189861983060837, 0.3132224380970001, -0.3880178928375244, 0.2945493161678314, -0.19424156844615936, -0.3217506408691406, -0.1542050540447235, -0.34443920850753784, 1.1860370635986328, 0.46860677003860474, -0.5213472247123718, 0.3933427929878235, -0.6423457860946655, -0.18230071663856506, 0.23533622920513153, -0.4432373046875, -0.1761476993560791, -0.18608100712299347, 0.3472391366958618, 0.2869285047054291, 0.18426838517189026, -0.34824296832084656, 0.060708269476890564, -0.0024239779449999332, 0.701958417892456, 0.7992393374443054, -0.174466073513031, 0.3082425892353058, -0.4236483871936798, 0.5718839168548584, -0.4219363331794739, 0.7638556957244873, 0.28303539752960205, -0.7851917147636414, -1.0484929084777832, -0.4022909104824066, -0.0861639678478241, 0.48256850242614746, -0.40266498923301697, 0.49001970887184143, 0.22219917178153992, -0.5960987210273743, -0.7287547588348389, 0.0006150348344817758, 0.24408946931362152, 0.6853435635566711, 0.44900304079055786, -0.23993510007858276, -0.7332672476768494, -1.0368744134902954, 0.0012610186822712421, -0.09811104834079742, -0.004096444696187973, 0.4981153905391693, 0.4611925184726715, -0.34092217683792114, 0.8847915530204773, -0.46293896436691284, -0.3574083745479584, -0.0011541900457814336, 0.054016921669244766, 0.617531955242157, 0.4944346249103546, 0.6880801320075989, -0.8267443180084229, -0.5076981782913208, -0.06713530421257019, -0.7489164471626282, -0.13367624580860138, 0.0008896368672139943, -0.6330679059028625, 0.20658059418201447, 0.28294679522514343, -0.8005967736244202, 0.36037150025367737, 0.7900282740592957, -0.2884945869445801, 0.7168232202529907, -0.3735117018222809, -0.059420786798000336, -1.0530115365982056, 0.2784024178981781, -0.08215722441673279, -0.5001329183578491, -0.5859560370445251, 0.15135982632637024, 0.00770586496219039, -0.09277438372373581, -0.44077542424201965, 0.7221152782440186, -0.3100309371948242, 0.0007541522500105202, -0.35120517015457153, -0.27913448214530945, 0.07707491517066956, 0.6191941499710083, -0.05739622190594673, 0.8831356763839722, 0.6722232103347778, -0.6060382127761841, 0.3975789248943329, 0.32721146941185, -0.29979249835014343, 0.23821470141410828, -1.0128512382507324, 0.19035449624061584, 0.10351496189832687, 0.1835929900407791, -0.8108775615692139, -0.45363742113113403, 0.15358570218086243, -0.439420610666275, 0.371389240026474, -0.2591170072555542, -0.2648563086986542, -0.6250614523887634, -0.05941511318087578, 0.3285224139690399, 1.1290920972824097, -0.963718056678772, 0.7487472295761108, 0.7923569083213806, 0.1589956134557724, -0.4927574098110199, -0.545915424823761, -0.17161351442337036, -0.5798215270042419, -0.6679637432098389, 0.6272230744361877, 0.021113082766532898, 0.031491417437791824, -0.08661053329706192, 0.06706489622592926, -0.12017568945884705, 0.1893966943025589, 0.338708758354187, 0.4412148892879486, 0.17279581725597382, -0.15384209156036377, 0.100650355219841, -0.26531025767326355, 0.1675974428653717, -0.4306817650794983, 0.736994206905365, -0.21143782138824463, 0.09809356927871704, -0.4077104926109314, 0.025960905477404594, 0.46807730197906494, -0.07554912567138672, 0.5433005094528198, 1.0985872745513916, -0.4087468385696411, -0.11883754283189774, -0.6413685083389282, -0.12519100308418274, -0.5778424739837646, 0.08962056040763855, -0.3286075294017792, -0.6982665657997131, 0.48716485500335693, 0.0630762055516243, 0.06564299762248993, 0.5512706637382507, 0.8987301588058472, -0.12859678268432617, 0.9808797836303711, 0.7495017051696777, -0.3344394862651825, 0.7056841850280762, -0.3690882921218872, 0.045961763709783554, -0.9622145295143127, 0.013447881676256657, -0.6280889511108398, -0.10340020060539246, -0.4565468430519104, -0.35494107007980347, 0.6669867038726807, 0.11265527456998825, -0.47615018486976624, 0.5523620843887329, -0.759389340877533, 0.29459095001220703, 0.8621756434440613, 0.11802484095096588, 0.0423722080886364, 0.0951358824968338, -0.10108460485935211, 0.39073294401168823, -0.7739344835281372, -0.28338623046875, 0.8339375853538513, 0.49025100469589233, 0.6820208430290222, 0.049208905547857285, 0.542184591293335, 0.08374164253473282, 0.15521951019763947, -0.7478561997413635, 0.27693456411361694, 0.1102423369884491, -0.8236925601959229, -0.11571240425109863, -0.37529051303863525, -0.8334559798240662, 0.27705439925193787, -0.002988212276250124, -0.551419198513031, 0.249024897813797, 0.40047773718833923, -0.28563550114631653, 0.15444836020469666, -0.6329584121704102, 1.0397822856903076, -0.11982839554548264, -0.5544924736022949, -0.276520699262619, -0.6068739891052246, 0.24857570230960846, -0.04892810806632042, 0.06972434371709824, 0.006755325943231583, 0.19987119734287262, 0.8942360877990723, -0.5396584868431091, 0.6481586694717407, -0.40451234579086304, 0.053939420729875565, 0.39452508091926575, -0.06790883839130402, 0.49942919611930847, -0.05183494836091995, -0.020552000030875206, 0.26513728499412537, -0.17932014167308807, -0.3907327353954315, -0.29535359144210815, 0.6278955936431885, -1.191974401473999, -0.39691781997680664, -0.328819215297699, -0.4627247750759125, 0.043747302144765854, 0.22172369062900543, 0.47590672969818115, 0.30084219574928284, -0.21804438531398773, -0.22449156641960144, 0.43743976950645447, -0.2424992024898529, 0.3240678310394287, 0.08996933698654175, -0.25841188430786133, -0.3728891909122467, 0.7522053122520447, -0.2940464913845062, 0.269201397895813, 0.0959063395857811, 0.45226022601127625, -0.2481362372636795, -0.3816567063331604, -0.5327239632606506, 0.19903895258903503, -0.5796486735343933, -0.1798069030046463, -0.6934130191802979, -0.08445283770561218, -0.33041396737098694, -0.14513380825519562, -0.4058683216571808, -0.40056276321411133, -0.08334214240312576, 0.08216685801744461, 0.5904233455657959, 0.2867659032344818, -0.2723434567451477, 0.6086716055870056, -0.4379273056983948, 0.451188862323761, 0.2731090784072876, 0.13544543087482452, -0.10114307701587677, -0.7687034606933594, -0.31367722153663635, -0.20783299207687378, -0.2892230749130249, -0.760494589805603, 0.4689802825450897, 0.39172106981277466, 0.6516990065574646, 0.3062913119792938, -0.26296111941337585, 0.5806344747543335, -0.41119709610939026, 0.5187986493110657, -0.05030686780810356, -0.7601057291030884, 0.6193180084228516, -0.4704744517803192, 0.15956878662109375, 0.5754995346069336, 0.6857450008392334, -0.41592490673065186, -0.16442972421646118, -0.6812365055084229, -0.8806037306785583, 0.6928096413612366, 0.26377564668655396, 0.009673459455370903, 0.15949799120426178, 0.29280948638916016, -0.08267740160226822, 0.09932425618171692, -0.6011829376220703, -0.2644805610179901, -0.23520049452781677, 0.001923787291161716, -0.09829327464103699, -0.07555967569351196, -0.36063599586486816, -0.5862379670143127, 1.027811884880066, -0.02348446473479271, 0.5981165170669556, 0.1635584533214569, -0.13682477176189423, -0.19662925601005554, -0.30967065691947937, 0.005534282885491848, 0.24402014911174774, -0.4510563313961029, -0.03357831761240959, 0.023757552728056908, -0.4881545305252075, -0.0017920003738254309, 0.10184244066476822, -0.35131025314331055, 0.08748169243335724, 0.05070526897907257, 1.136296272277832, -0.011104820296168327, -0.23677587509155273, 0.36385589838027954, -0.15554413199424744, -0.07658807933330536, -0.5621353387832642, 0.22231319546699524, -0.02177060954272747, 0.1377052664756775, 0.0036492845974862576, 0.15016686916351318, 0.27594369649887085, -0.36576876044273376, 0.12296118587255478, 0.3984393775463104, -0.12259634584188461, -0.14252008497714996, 0.9594292044639587, 0.2588980495929718, -0.21106764674186707, 0.9132740497589111, -0.03987399861216545, -0.578095555305481, 0.6380638480186462, 0.5274000763893127, 1.0126092433929443, -0.34747371077537537, 0.12189289927482605, 0.49256569147109985, 0.21698389947414398, 0.13033291697502136, 0.23025211691856384, -0.27588072419166565, -0.6568065285682678, -0.442807137966156, -1.025818943977356, -0.40421411395072937, 0.018263859674334526, -0.732549250125885, 0.5535966753959656, -0.3287055194377899, -0.33099982142448425, 0.06665892153978348, -0.15469799935817719, -0.8361653089523315, 0.09147082269191742, -0.03795725852251053, 0.930666446685791, -0.9493462443351746, 1.16431725025177, 0.7088677287101746, -0.3329923450946808, -0.8384155035018921, -0.4543308615684509, 0.13497665524482727, -0.7778428196907043, 0.22446563839912415, 0.04805057495832443, 0.016944823786616325, 0.11472895741462708, -0.23559345304965973, -0.8161208033561707, 1.0255533456802368, 0.2954797148704529, -0.2393786609172821, -0.056096188724040985, -0.12090223282575607, 0.41810956597328186, -0.008878864347934723, 0.5670333504676819, 0.9750377535820007, 0.6301247477531433, -0.033530961722135544, -1.065919041633606, 0.13158801198005676, -0.4525696337223053, -0.15726563334465027, 0.33077746629714966, -0.7679557204246521, 0.9634223580360413, -0.05018971860408783, -0.01772010512650013, 0.048776429146528244, 0.5443551540374756, 0.04518842697143555, 0.006351888179779053, 0.5766333937644958, 0.7547038793563843, 0.8103718757629395, -0.2596009075641632, 1.3331217765808105, -0.38061076402664185, 0.7378734350204468, 0.8198594450950623, 0.1501142531633377, 0.46984612941741943, 0.43932676315307617, -0.43326127529144287, 0.34155941009521484, 0.9064956307411194, -0.16792012751102448, 0.5611140727996826, 0.0014561312273144722, -0.30755963921546936, -0.05265194922685623, 0.03207353875041008, -0.3415132761001587, 0.4285699129104614, 0.21541419625282288, -0.27033835649490356, -0.0946088433265686, 0.08129268884658813, 0.32310914993286133, -0.5795055627822876, -0.022417938336730003, 0.5703767538070679, 0.09693622589111328, -0.7975746989250183, 1.0423821210861206, 0.04777498543262482, 0.8382172584533691, -0.6613783836364746, 0.18434511125087738, -0.23200476169586182, 0.32307732105255127, -0.34495145082473755, -0.3398750126361847, 0.5275364518165588, -0.1210496723651886, -0.0006347327143885195, 0.04628456383943558, 0.8606742024421692, -0.26267752051353455, -0.16520781815052032, 0.46801048517227173, 0.2296523004770279, 0.41426974534988403, -0.04865293204784393, -0.8332064151763916, 0.210160031914711, 0.023336496204137802, -0.5011298060417175, 0.2944139838218689, -0.2247035950422287, 0.007317045703530312, 0.48050656914711, 0.6385290026664734, 0.01694863848388195, 0.09255346655845642, 0.19459596276283264, 0.8399708271026611, -0.3577756881713867, -0.5681570768356323, -0.5894547700881958, 0.3848159611225128, -0.17357967793941498, -0.5297747254371643, 0.7982996702194214, 0.5463736653327942, 0.8307136297225952, -0.1327364444732666, 0.7890468239784241, -0.38297897577285767, 0.11003386974334717, -0.36081579327583313, 0.5952804088592529, -0.6456573605537415, -0.22160005569458008, -0.3016725480556488, -1.1776983737945557, -0.07875216752290726, 0.9541086554527283, -0.04289978742599487, 0.14092810451984406, 0.608203649520874, 0.9092557430267334, -0.3132847249507904, 0.06019765883684158, 0.06069238856434822, 0.2925284802913666, 0.40669748187065125, 0.5525429844856262, 0.607867956161499, -0.45548248291015625, 0.25891193747520447, -0.6414837837219238, -0.7046331167221069, -0.19447334110736847, -0.7338852286338806, -0.7304373383522034, -0.4650065302848816, -0.3276669979095459, -0.424583375453949, 0.13268519937992096, 0.6693421602249146, 0.8969656825065613, -0.4428909420967102, -0.43558675050735474, -0.2877236604690552, -0.23296362161636353, -0.2268601506948471, -0.2525292634963989, 0.541735053062439, -0.3994203209877014, -0.9790425896644592, 0.5015366077423096, 0.016654914245009422, -0.014000716619193554, -0.3602312207221985, -0.21977736055850983, -0.12246761471033096, -0.044438716024160385, 0.5099375247955322, 0.4189308285713196, -0.22245775163173676, -0.2816585600376129, -0.33942267298698425, 0.08113282173871994, -0.012736767530441284, 0.5589665174484253, -0.8808104395866394, 0.21416345238685608, 0.6901246905326843, 0.4522426426410675, 0.9109323620796204, -0.1813383400440216, 0.5139098763465881, -0.5417401790618896, 0.35917574167251587, -0.005947376135736704, 0.5819613933563232, 0.10405097901821136, -0.4341218173503876, 0.7612913846969604, 0.1109614446759224, -1.0034953355789185, -0.6859176158905029, 0.10691968351602554, -1.1439317464828491, -0.19934900104999542, 1.100719690322876, 0.08447100222110748, -0.41498392820358276, -0.08423765748739243, -0.2776097357273102, 0.5267474055290222, -0.23357842862606049, 0.68241286277771, 0.3724815547466278, -0.3318996727466583, 0.16412733495235443, -0.86863112449646, 0.7267195582389832, 0.6179847121238708, -0.7657909393310547, -0.1188083291053772, 0.431371808052063, 0.2505190074443817, 0.18185165524482727, 0.6142536997795105, -0.3563866913318634, 0.2910388112068176, -0.08324649184942245, 0.2372167408466339, -0.22303970158100128, -0.42813992500305176, -0.4887795150279999, -0.0886293426156044, -0.041001684963703156, -0.14241167902946472 ]
facebook/mask2former-swin-base-coco-panoptic
facebook
"2023-09-06T19:14:44Z"
28,863
9
transformers
[ "transformers", "pytorch", "safetensors", "mask2former", "vision", "image-segmentation", "dataset:coco", "arxiv:2112.01527", "arxiv:2107.06278", "license:other", "endpoints_compatible", "has_space", "region:us" ]
image-segmentation
"2023-01-02T16:06:26Z"
--- license: other tags: - vision - image-segmentation datasets: - coco widget: - src: http://images.cocodataset.org/val2017/000000039769.jpg example_title: Cats - src: http://images.cocodataset.org/val2017/000000039770.jpg example_title: Castle --- # Mask2Former Mask2Former model trained on COCO panoptic segmentation (base-sized version, Swin backbone). It was introduced in the paper [Masked-attention Mask Transformer for Universal Image Segmentation ](https://arxiv.org/abs/2112.01527) and first released in [this repository](https://github.com/facebookresearch/Mask2Former/). Disclaimer: The team releasing Mask2Former did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description Mask2Former addresses instance, semantic and panoptic segmentation with the same paradigm: by predicting a set of masks and corresponding labels. Hence, all 3 tasks are treated as if they were instance segmentation. Mask2Former outperforms the previous SOTA, [MaskFormer](https://arxiv.org/abs/2107.06278) both in terms of performance an efficiency by (i) replacing the pixel decoder with a more advanced multi-scale deformable attention Transformer, (ii) adopting a Transformer decoder with masked attention to boost performance without without introducing additional computation and (iii) improving training efficiency by calculating the loss on subsampled points instead of whole masks. ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/mask2former_architecture.png) ## Intended uses & limitations You can use this particular checkpoint for panoptic segmentation. See the [model hub](https://huggingface.co/models?search=mask2former) to look for other fine-tuned versions on a task that interests you. ### How to use Here is how to use this model: ```python import requests import torch from PIL import Image from transformers import AutoImageProcessor, Mask2FormerForUniversalSegmentation # load Mask2Former fine-tuned on COCO panoptic segmentation processor = AutoImageProcessor.from_pretrained("facebook/mask2former-swin-base-coco-panoptic") model = Mask2FormerForUniversalSegmentation.from_pretrained("facebook/mask2former-swin-base-coco-panoptic") url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = Image.open(requests.get(url, stream=True).raw) inputs = processor(images=image, return_tensors="pt") with torch.no_grad(): outputs = model(**inputs) # model predicts class_queries_logits of shape `(batch_size, num_queries)` # and masks_queries_logits of shape `(batch_size, num_queries, height, width)` class_queries_logits = outputs.class_queries_logits masks_queries_logits = outputs.masks_queries_logits # you can pass them to processor for postprocessing result = processor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0] # we refer to the demo notebooks for visualization (see "Resources" section in the Mask2Former docs) predicted_panoptic_map = result["segmentation"] ``` For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/mask2former).
[ -0.6427034139633179, -0.6211832761764526, 0.16759426891803741, 0.4529503583908081, -0.3068729639053345, -0.13227634131908417, 0.12208352982997894, -0.7956141233444214, 0.25204867124557495, 0.6624840497970581, -0.6622132658958435, -0.2627987861633301, -0.8441863059997559, -0.33393439650535583, -0.11924099177122116, 0.9002217054367065, -0.06888626515865326, 0.029625970870256424, -0.27402356266975403, 0.060520149767398834, -0.21629510819911957, -0.22269165515899658, -0.7211817502975464, -0.3266579806804657, 0.15175746381282806, 0.35984447598457336, 0.43699178099632263, 0.571111798286438, 0.5824981927871704, 0.2520435154438019, -0.0904851108789444, -0.032351136207580566, -0.4330401122570038, -0.2184656262397766, 0.09607657045125961, -0.6100635528564453, -0.3264172077178955, 0.1633577048778534, 0.4138585925102234, 0.3651157319545746, 0.18323659896850586, 0.33604905009269714, -0.03536896035075188, 0.6041944622993469, -0.6444364786148071, 0.3802029490470886, -0.3746219277381897, 0.30835670232772827, -0.20323742926120758, 0.3386555314064026, -0.24982978403568268, -0.233063206076622, 0.21280038356781006, -0.48725977540016174, 0.49110153317451477, -0.16014364361763, 0.9999507069587708, 0.18897177278995514, -0.08222933858633041, -0.14359761774539948, -0.42837923765182495, 0.5510609149932861, -0.35736265778541565, 0.224130317568779, 0.4766506552696228, 0.7583211064338684, 0.25591129064559937, -1.1399695873260498, -0.43570518493652344, 0.29086050391197205, -0.03445319086313248, 0.20703914761543274, -0.2638702988624573, 0.04560957849025726, 0.34950658679008484, 0.3384588956832886, -0.5733696818351746, -0.025470487773418427, -0.8943526744842529, -0.3683180510997772, 0.6547353863716125, -0.18381282687187195, 0.31282708048820496, -0.26009947061538696, -0.6043425798416138, -0.3214263916015625, -0.24239972233772278, 0.5182083249092102, 0.07559534162282944, -0.29669952392578125, -0.27411410212516785, 0.5897667407989502, -0.06409426778554916, 0.7101757526397705, 0.3844449818134308, -0.16165435314178467, 0.14449599385261536, 0.08621767908334732, -0.3858489990234375, -0.04508213698863983, 0.6270551681518555, 0.5152913331985474, 0.17562848329544067, 0.08937853574752808, -0.06929440796375275, 0.21804605424404144, 0.14302974939346313, -1.135879635810852, -0.6461672782897949, 0.06846428662538528, -0.22458519041538239, -0.31565505266189575, 0.3867955505847931, -0.9311540722846985, -0.04978346452116966, -0.10929024964570999, 0.3700147569179535, -0.3302932381629944, -0.09928786009550095, 0.08339313417673111, -0.2508716583251953, 0.5632382035255432, 0.3202654719352722, -0.9047305583953857, 0.3739796578884125, 0.5382325649261475, 1.032668948173523, 0.009414346888661385, -0.006249178200960159, -0.20233391225337982, -0.0556894950568676, -0.30747517943382263, 0.9180963635444641, -0.5145938992500305, -0.06933587044477463, -0.2832379639148712, 0.3418578803539276, -0.359514981508255, -0.6149625182151794, 0.33804357051849365, -0.501114547252655, 0.46150514483451843, -0.37210461497306824, -0.16168661415576935, -0.5862809419631958, 0.1194869801402092, -0.5391404628753662, 1.1409705877304077, 0.4993889331817627, -0.6417933702468872, 0.18617995083332062, -0.684673547744751, -0.1739639937877655, -0.10389026999473572, -0.02098146453499794, -0.8226485252380371, -0.14454661309719086, 0.48520633578300476, 0.3631819486618042, -0.23725394904613495, -0.012245955877006054, -0.3265513777732849, -0.12775510549545288, 0.032779425382614136, 0.12729771435260773, 0.964836597442627, 0.08193895220756531, -0.7280539274215698, 0.19784019887447357, -0.3554304838180542, -0.005615520756691694, 0.33222874999046326, 0.15225283801555634, 0.2339322715997696, -0.4795692563056946, 0.40462201833724976, 0.6432105898857117, 0.04337767884135246, -0.529893159866333, 0.18194857239723206, -0.3255253732204437, 0.6495727896690369, 0.5344889760017395, 0.039990052580833435, 0.4532276391983032, -0.1659640073776245, 0.514567494392395, 0.12499065697193146, 0.5302849411964417, -0.01721571758389473, -0.7508583068847656, -0.9481087327003479, -0.4326670467853546, -0.018112963065505028, 0.39914068579673767, -0.4060284197330475, 0.3696553409099579, 0.16518431901931763, -0.7287567853927612, -0.3221348226070404, -0.04196154698729515, 0.363842248916626, 0.6494271159172058, 0.33060669898986816, -0.6644551157951355, -0.8087868094444275, -1.032666802406311, 0.2651459872722626, 0.18456527590751648, -0.07089748978614807, 0.3552863597869873, 0.5122479796409607, -0.572232186794281, 1.0686330795288086, -0.6632041931152344, -0.3878183364868164, -0.29158228635787964, -0.07224468886852264, -0.1070796400308609, 0.5081662535667419, 0.9049867987632751, -0.7562969326972961, -0.5116299986839294, -0.3199474811553955, -0.7170005440711975, -0.05599969998002052, 0.1987602710723877, -0.340754896402359, 0.21292316913604736, 0.24249504506587982, -0.5797297358512878, 0.5615026354789734, 0.4006480574607849, -0.30267229676246643, 0.6770045757293701, 0.166478231549263, -0.12688779830932617, -0.8226168751716614, 0.2556467652320862, 0.1158454492688179, -0.38245564699172974, -0.47256386280059814, 0.07324150949716568, 0.12968982756137848, -0.3214603662490845, -0.5809313654899597, 0.4855770766735077, -0.5687259435653687, -0.38985541462898254, -0.37201932072639465, -0.1855364739894867, 0.3325549364089966, 0.6568629145622253, 0.34137648344039917, 0.45630180835723877, 0.9256216287612915, -0.45351165533065796, 0.3846961259841919, 0.3248944878578186, -0.36614954471588135, 0.3692440092563629, -0.9056045413017273, 0.2648497521877289, -0.18643130362033844, 0.6426210403442383, -1.0938295125961304, -0.6205533146858215, 0.5930213332176208, -0.33982717990875244, 0.29887843132019043, -0.14885777235031128, -0.16357889771461487, -0.8332259654998779, -0.5377775430679321, 0.6345011591911316, 0.5981020331382751, -0.681726336479187, 0.21888959407806396, 0.5345394015312195, 0.10993584990501404, -0.3824758529663086, -0.920534610748291, -0.18190820515155792, -0.1463320553302765, -0.8898230791091919, 0.42782413959503174, 0.03055722266435623, 0.088450126349926, -0.13902093470096588, -0.2547070384025574, -0.06671001762151718, -0.4218355715274811, 0.405077189207077, 0.33602845668792725, -0.13870491087436676, -0.5155178904533386, 0.14041569828987122, -0.23769408464431763, 0.17625264823436737, -0.39956048130989075, 0.713871955871582, -0.21283885836601257, -0.10288367420434952, -0.6813899874687195, 0.05252886563539505, 0.622212827205658, -0.38915133476257324, 0.4312596321105957, 1.0682741403579712, -0.725002110004425, 0.012226399034261703, -0.8588475584983826, -0.43480634689331055, -0.4645525813102722, 0.3368466794490814, -0.35006773471832275, -0.6850056052207947, 0.7100675106048584, 0.1517670601606369, -0.03669670224189758, 0.6616613864898682, 0.5319457054138184, 0.10302188992500305, 1.0116534233093262, 0.6500654220581055, 0.2754983603954315, 0.5691877007484436, -0.9241442084312439, 0.15952593088150024, -1.1976689100265503, -0.7331110835075378, -0.062333088368177414, -0.46437424421310425, -0.21506743133068085, -0.9052905440330505, 0.6083298325538635, 0.5950179100036621, -0.1498529464006424, 0.6008931398391724, -0.9583382606506348, 0.3264249861240387, 0.484095960855484, 0.28099238872528076, -0.38649260997772217, 0.23811326920986176, 0.0891263335943222, 0.009633496403694153, -0.6568454504013062, -0.37151283025741577, 0.6943771839141846, 0.5803940296173096, 0.46185705065727234, -0.24916823208332062, 0.299335241317749, -0.09219984710216522, 0.07425078004598618, -0.7344849705696106, 0.4382934868335724, 0.056959133595228195, -0.5685889720916748, -0.06646091490983963, 0.06947004795074463, -0.7645605802536011, 0.33730196952819824, 0.029929086565971375, -1.1880885362625122, 0.525127112865448, 0.14803679287433624, -0.33702147006988525, 0.32851290702819824, -0.6820322275161743, 1.032113790512085, -0.14044950902462006, -0.3936595618724823, 0.14346587657928467, -0.9258549809455872, 0.5749208927154541, 0.1416052281856537, -0.18928414583206177, -0.12315665930509567, 0.25634780526161194, 1.2029134035110474, -0.49915799498558044, 0.9627395868301392, -0.37818872928619385, 0.28751230239868164, 0.6614583730697632, -0.12537652254104614, 0.3123035430908203, 0.29946279525756836, 0.08493155986070633, 0.37657544016838074, 0.14641714096069336, -0.5244041085243225, -0.557253360748291, 0.4956887662410736, -0.9389673471450806, -0.3869267404079437, -0.3691455125808716, -0.2928119897842407, 0.1282147467136383, 0.13663938641548157, 0.8582212924957275, 0.30447569489479065, 0.07936414331197739, -0.02501075156033039, 0.569805920124054, -0.0353102833032608, 0.47558361291885376, -0.0681307390332222, -0.2734251022338867, -0.6068650484085083, 0.6161194443702698, 0.06818266957998276, 0.20412711799144745, 0.29100674390792847, 0.2630624771118164, -0.47411081194877625, 0.05983714014291763, -0.5798550844192505, 0.40534064173698425, -0.5778401494026184, -0.41336292028427124, -0.8914064764976501, -0.5024138689041138, -0.8487075567245483, -0.4099489152431488, -0.5843935608863831, -0.529570996761322, -0.3373098373413086, -0.0014513225760310888, 0.3198743760585785, 0.4221574664115906, -0.2615257501602173, 0.5219625234603882, -0.23983633518218994, 0.23221860826015472, 0.576953649520874, 0.20473109185695648, -0.17568860948085785, -0.4036289155483246, 0.02674790471792221, 0.06847408413887024, -0.6089900135993958, -0.8644095063209534, 0.34396544098854065, 0.11497018486261368, 0.2928147315979004, 0.7200564742088318, -0.19493623077869415, 0.7192933559417725, 0.0056852311827242374, 0.7168406844139099, 0.5076775550842285, -0.8534048199653625, 0.7713363766670227, -0.010693386197090149, 0.2354143112897873, 0.29344862699508667, 0.2040126770734787, -0.5515999794006348, -0.06862271577119827, -0.6051956415176392, -0.9059045910835266, 1.1652805805206299, 0.150942862033844, -0.1730310171842575, 0.2717862129211426, 0.44487372040748596, 0.1273151934146881, 0.024216510355472565, -0.775600016117096, -0.18862242996692657, -0.6165801286697388, 0.19624872505664825, -0.09155023097991943, -0.554047703742981, -0.08619850873947144, -0.5437362790107727, 0.6108141541481018, -0.05290834233164787, 0.6604794859886169, 0.4110666811466217, -0.22337602078914642, -0.26825231313705444, -0.4785502254962921, 0.6284310817718506, 0.6005403399467468, -0.22494065761566162, 0.1945316344499588, -0.02863905392587185, -0.5954822301864624, -0.178793802857399, 0.18385151028633118, -0.20633913576602936, -0.15228693187236786, 0.3670388162136078, 1.120422601699829, -0.005846981890499592, -0.27540454268455505, 0.5849995017051697, 0.15058046579360962, -0.30172815918922424, -0.3766099512577057, 0.12519964575767517, -0.035623110830783844, 0.2690252661705017, 0.1454126089811325, 0.4013809859752655, 0.2611410319805145, -0.30803975462913513, 0.21600139141082764, 0.29689452052116394, -0.5281658172607422, -0.44495028257369995, 0.8516073822975159, -0.11565802246332169, -0.23656028509140015, 0.5817917585372925, -0.14919976890087128, -1.0010490417480469, 1.0100979804992676, 0.6847261786460876, 0.7737010717391968, -0.37281298637390137, 0.38963979482650757, 0.7021209597587585, 0.23425866663455963, -0.018064452335238457, -0.046507447957992554, -0.2223677933216095, -0.3971913158893585, -0.023804988712072372, -0.6792978644371033, -0.09085594117641449, 0.17295952141284943, -0.6116510629653931, 0.3851486146450043, -0.6485450863838196, -0.08685282617807388, 0.12738193571567535, 0.13432861864566803, -0.8123493790626526, 0.4215106964111328, 0.23155924677848816, 0.835950493812561, -0.8502238392829895, 0.6541292667388916, 0.8620750308036804, -0.2931492030620575, -0.7131256461143494, -0.2407536804676056, 0.06343358010053635, -1.003597378730774, 0.2763984203338623, 0.7866346836090088, 0.03045121766626835, -0.23201023042201996, -0.48887312412261963, -0.8165058493614197, 1.265779972076416, 0.31508421897888184, -0.44653937220573425, 0.004531858488917351, 0.34235480427742004, 0.2971232533454895, -0.5189620852470398, 0.5763024091720581, 0.5416815280914307, 0.511978030204773, 0.5964776277542114, -0.6656786203384399, 0.09366027265787125, -0.3395080864429474, 0.2479250580072403, -0.10438887774944305, -0.8467302918434143, 0.809903085231781, -0.3998413383960724, -0.06798235327005386, -0.12071742117404938, 0.618018388748169, 0.23863859474658966, 0.5478144884109497, 0.5033339262008667, 0.6323602199554443, 0.5301879048347473, -0.11542877554893494, 0.9028404355049133, -0.0985669493675232, 0.5926973819732666, 0.643081545829773, 0.1369224339723587, 0.3937510848045349, 0.3276185393333435, 0.02298959158360958, 0.4439031481742859, 1.0698813199996948, -0.31660541892051697, 0.5463850498199463, 0.09549565613269806, 0.0020062492694705725, -0.12531664967536926, 0.07650843262672424, -0.5370360612869263, 0.7370117902755737, 0.26276615262031555, -0.41586923599243164, -0.23188422620296478, 0.31975650787353516, 0.07264865934848785, -0.42271897196769714, -0.1919836699962616, 0.5721606612205505, 0.027520569041371346, -0.7373176217079163, 0.6856920123100281, 0.3103686273097992, 0.634201169013977, -0.4387461841106415, 0.1026802584528923, -0.19994716346263885, 0.20305736362934113, -0.4090503454208374, -0.655161440372467, 0.6693931221961975, -0.21635255217552185, -0.192064106464386, 0.07424315065145493, 0.7548028230667114, -0.32646483182907104, -0.8448576927185059, 0.24995268881320953, -0.06385010480880737, 0.33542826771736145, -0.279990553855896, -0.8992454409599304, 0.4404592514038086, 0.002210200298577547, -0.43759533762931824, 0.18598531186580658, -0.05202363803982735, -0.17909514904022217, 0.39894673228263855, 0.4920373558998108, -0.3857770264148712, 0.09626418352127075, -0.15829409658908844, 0.9747552275657654, -0.262378990650177, -0.5697529911994934, -0.58762526512146, 0.4803904891014099, -0.20732787251472473, -0.29015427827835083, 0.4936995804309845, 0.9224942326545715, 0.8659545183181763, -0.2422589212656021, 0.5482295155525208, -0.2214733362197876, -0.05663524195551872, -0.2708100974559784, 0.5543121099472046, -0.4024045765399933, -0.15116122364997864, -0.329486221075058, -1.2349172830581665, -0.39146971702575684, 1.044376015663147, -0.5545079112052917, 0.15113301575183868, 0.4884192645549774, 0.9615208506584167, -0.46805161237716675, -0.06748253852128983, 0.00017144021694548428, -0.0955476462841034, 0.3773428499698639, 0.5634568333625793, 0.25045666098594666, -0.6882365345954895, 0.34102094173431396, -0.8719454407691956, -0.6056438684463501, -0.391292542219162, -0.26923757791519165, -0.9021305441856384, -0.7391875982284546, -0.5195876955986023, -0.4160587787628174, -0.043572474271059036, 0.44959840178489685, 1.3736274242401123, -0.7665563225746155, -0.15685871243476868, -0.2605939507484436, -0.022508932277560234, -0.26429709792137146, -0.3324354290962219, 0.6463661789894104, 0.007144217845052481, -0.8816713094711304, -0.05895519629120827, 0.3392452001571655, 0.006554740946739912, -0.13067984580993652, -0.09241798520088196, 0.07836604863405228, -0.02723160944879055, 0.7112410068511963, 0.4518786668777466, -0.7902061343193054, -0.24645112454891205, -0.01746361143887043, -0.0380561463534832, 0.24659816920757294, 0.7423557043075562, -0.6095057129859924, 0.5513564944267273, 0.3491573929786682, 0.2295927256345749, 1.1501885652542114, 0.033667467534542084, 0.06724350899457932, -0.4745109975337982, 0.3070080876350403, 0.20395828783512115, 0.37311989068984985, 0.38752150535583496, -0.5439034104347229, 0.46863865852355957, 0.4198782742023468, -0.5039429068565369, -0.613799512386322, 0.27901142835617065, -1.4675990343093872, -0.12520037591457367, 1.089592695236206, -0.19438812136650085, -0.5653045773506165, 0.29279813170433044, -0.5426639318466187, 0.4606982469558716, -0.07162311673164368, 0.8641524314880371, 0.2095605731010437, -0.4140532910823822, -0.5217408537864685, -0.11505599319934845, 0.4785866141319275, 0.12284710258245468, -0.7258566617965698, -0.35222387313842773, 0.3198803663253784, 0.6654107570648193, 0.2377161979675293, 0.5584443211555481, -0.3921080231666565, 0.4474322199821472, 0.10941150784492493, 0.24135176837444305, -0.2508978843688965, -0.324128657579422, -0.0805359035730362, 0.23951973021030426, -0.34444284439086914, -0.5555275082588196 ]
airesearch/wangchanberta-base-att-spm-uncased
airesearch
"2023-03-19T02:31:42Z"
28,800
24
transformers
[ "transformers", "pytorch", "safetensors", "camembert", "fill-mask", "th", "arxiv:1907.11692", "arxiv:1801.06146", "arxiv:1808.06226", "arxiv:2101.09635", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: th widget: - text: "ผู้ใช้งานท่าอากาศยานนานาชาติ<mask>มีกว่าสามล้านคน<pad>" --- # WangchanBERTa base model: `wangchanberta-base-att-spm-uncased` <br> Pretrained RoBERTa BASE model on assorted Thai texts (78.5 GB). The script and documentation can be found at [this repository](https://github.com/vistec-AI/thai2transformers). <br> ## Model description <br> The architecture of the pretrained model is based on RoBERTa [[Liu et al., 2019]](https://arxiv.org/abs/1907.11692). <br> ## Intended uses & limitations <br> You can use the pretrained model for masked language modeling (i.e. predicting a mask token in the input text). In addition, we also provide finetuned models for multiclass/multilabel text classification and token classification task. <br> **Multiclass text classification** - `wisesight_sentiment` 4-class text classification task (`positive`, `neutral`, `negative`, and `question`) based on social media posts and tweets. - `wongnai_reivews` Users' review rating classification task (scale is ranging from 1 to 5) - `generated_reviews_enth` : (`review_star` as label) Generated users' review rating classification task (scale is ranging from 1 to 5). **Multilabel text classification** - `prachathai67k` Thai topic classification with 12 labels based on news article corpus from prachathai.com. The detail is described in this [page](https://huggingface.co/datasets/prachathai67k). **Token classification** - `thainer` Named-entity recognition tagging with 13 named-entities as described in this [page](https://huggingface.co/datasets/thainer). - `lst20` : NER NER and POS tagging Named-entity recognition tagging with 10 named-entities and Part-of-Speech tagging with 16 tags as described in this [page](https://huggingface.co/datasets/lst20). <br> ## How to use <br> The getting started notebook of WangchanBERTa model can be found at this [Colab notebook](https://colab.research.google.com/drive/1Kbk6sBspZLwcnOE61adAQo30xxqOQ9ko) <br> ## Training data `wangchanberta-base-att-spm-uncased` model was pretrained on assorted Thai text dataset. The total size of uncompressed text is 78.5GB. ### Preprocessing Texts are preprocessed with the following rules: - Replace HTML forms of characters with the actual characters such asnbsp;with a space and \\\\\\\\\\\\\\\\<br /> with a line break [[Howard and Ruder, 2018]](https://arxiv.org/abs/1801.06146). - Remove empty brackets ((), {}, and []) than sometimes come up as a result of text extraction such as from Wikipedia. - Replace line breaks with spaces. - Replace more than one spaces with a single space - Remove more than 3 repetitive characters such as ดีมากกก to ดีมาก [Howard and Ruder, 2018]](https://arxiv.org/abs/1801.06146). - Word-level tokenization using [[Phatthiyaphaibun et al., 2020]](https://zenodo.org/record/4319685#.YA4xEGQzaDU) ’s `newmm` dictionary-based maximal matching tokenizer. - Replace repetitive words; this is done post-tokenization unlike [[Howard and Ruder, 2018]](https://arxiv.org/abs/1801.06146). since there is no delimitation by space in Thai as in English. - Replace spaces with <\\\\\\\\\\\\\\\\_>. The SentencePiece tokenizer combines the spaces with other tokens. Since spaces serve as punctuation in Thai such as sentence boundaries similar to periods in English, combining it with other tokens will omit an important feature for tasks such as word tokenization and sentence breaking. Therefore, we opt to explicitly mark spaces with <\\\\\\\\\\\\\\\\_>. <br> Regarding the vocabulary, we use SentencePiece [[Kudo, 2018]](https://arxiv.org/abs/1808.06226) to train SentencePiece unigram model. The tokenizer has a vocabulary size of 25,000 subwords, trained on 15M sentences sampled from the training set. The length of each sequence is limited up to 416 subword tokens. Regarding the masking procedure, for each sequence, we sampled 15% of the tokens and replace them with<mask>token.Out of the 15%, 80% is replaced with a<mask>token, 10% is left unchanged and 10% is replaced with a random token. <br> **Train/Val/Test splits** After preprocessing and deduplication, we have a training set of 381,034,638 unique, mostly Thai sentences with sequence length of 5 to 300 words (78.5GB). The training set has a total of 16,957,775,412 words as tokenized by dictionary-based maximal matching [[Phatthiyaphaibun et al., 2020]](https://zenodo.org/record/4319685#.YA4xEGQzaDU), 8,680,485,067 subwords as tokenized by SentencePiece tokenizer, and 53,035,823,287 characters. <br> **Pretraining** The model was trained on 8 V100 GPUs for 500,000 steps with the batch size of 4,096 (32 sequences per device with 16 accumulation steps) and a sequence length of 416 tokens. The optimizer we used is Adam with the learning rate of $3e-4$, $\\\\\\\\\\\\\\\\beta_1 = 0.9$, $\\\\\\\\\\\\\\\\beta_2= 0.999$ and $\\\\\\\\\\\\\\\\epsilon = 1e-6$. The learning rate is warmed up for the first 24,000 steps and linearly decayed to zero. The model checkpoint with minimum validation loss will be selected as the best model checkpoint. As of Sun 24 Jan 2021, we release the model from the checkpoint @360,000 steps due to the model pretraining has not yet been completed <br> **BibTeX entry and citation info** ``` @misc{lowphansirikul2021wangchanberta, title={WangchanBERTa: Pretraining transformer-based Thai Language Models}, author={Lalita Lowphansirikul and Charin Polpanumas and Nawat Jantrakulchai and Sarana Nutanong}, year={2021}, eprint={2101.09635}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.3076574206352234, -0.7303515076637268, 0.07053882628679276, 0.3169437050819397, -0.5363839864730835, 0.048612888902425766, -0.26721853017807007, -0.3166825473308563, 0.3718646466732025, 0.41719192266464233, -0.3800552487373352, -0.45270660519599915, -0.5786415934562683, 0.2670306861400604, -0.10162991285324097, 1.0175033807754517, -0.21643564105033875, 0.2568291127681732, 0.36091694235801697, -0.24997133016586304, -0.6663402318954468, -0.5171603560447693, -0.485564261674881, -0.30733346939086914, 0.41398292779922485, 0.4236413240432739, 0.2732471227645874, 0.5843811631202698, 0.4126589000225067, 0.23645587265491486, -0.23961971700191498, 0.13010795414447784, -0.4688079357147217, -0.23628702759742737, 0.13909852504730225, -0.5188950300216675, -0.4341628849506378, 0.09769384562969208, 0.522976815700531, 0.6992488503456116, -0.09979277104139328, 0.09077531844377518, -0.003343360498547554, 0.575011134147644, -0.532363772392273, 0.05580710992217064, -0.4398741126060486, 0.27011623978614807, -0.36384907364845276, -0.13572269678115845, -0.4715035557746887, -0.3442941904067993, 0.13930697739124298, -0.7672069072723389, -0.17015044391155243, 0.11602427065372467, 1.244200587272644, 0.057734500616788864, -0.45326903462409973, -0.2891310155391693, -0.38660261034965515, 0.8798791766166687, -0.6355646252632141, 0.5169597864151001, 0.45189934968948364, 0.10863491892814636, -0.02720874920487404, -0.8584872484207153, -0.8237136006355286, -0.021312732249498367, -0.05046851933002472, 0.2556352913379669, -0.1826166808605194, 0.08264078944921494, 0.20587849617004395, 0.46243956685066223, -0.6978189945220947, 0.16563349962234497, -0.4360458552837372, -0.3270666003227234, 0.35959392786026, -0.1177453100681305, 0.4735729992389679, -0.6222109794616699, -0.6464645266532898, -0.2013809084892273, -0.6959197521209717, 0.09978720545768738, 0.33387696743011475, 0.23707257211208344, -0.10982634127140045, 0.6516153812408447, -0.15606647729873657, 0.4228728711605072, 0.11615954339504242, -0.21301929652690887, 0.5093609094619751, -0.6212674975395203, -0.43007633090019226, 0.04034683108329773, 0.9516167044639587, 0.20192794501781464, 0.3740442395210266, -0.0018410214688628912, -0.11466865986585617, -0.025204749777913094, -0.08583427220582962, -0.9564521908760071, -0.3628225028514862, 0.18671423196792603, -0.4449135959148407, -0.32662034034729004, 0.12048438936471939, -0.748472273349762, -0.13038747012615204, -0.18343351781368256, 0.5011399388313293, -0.8712581396102905, -0.42455360293388367, 0.3080793619155884, -0.010775880888104439, 0.34249189496040344, 0.18098527193069458, -0.5102335810661316, 0.1758769452571869, 0.25047096610069275, 0.9988582134246826, -0.275227814912796, -0.4590393006801605, -0.37630918622016907, -0.15083171427249908, -0.2568323016166687, 0.6382443904876709, -0.16731221973896027, -0.4004274606704712, -0.11830902844667435, 0.22493469715118408, -0.21843136847019196, -0.414457768201828, 0.416567862033844, -0.5748194456100464, 0.6352905035018921, -0.25838494300842285, -0.5981523394584656, -0.37611842155456543, 0.13535809516906738, -0.645469605922699, 1.0512027740478516, 0.070152647793293, -0.9005718231201172, 0.5473856925964355, -0.6779828667640686, -0.43915435671806335, 0.004315090365707874, 0.3024046719074249, -0.6403113007545471, -0.27872776985168457, 0.25952333211898804, 0.481524795293808, -0.08828620612621307, 0.3764247000217438, -0.013489608652889729, -0.34703943133354187, 0.2667200565338135, -0.21688225865364075, 1.221450686454773, 0.4650653898715973, -0.46978020668029785, 0.22257325053215027, -0.7878072261810303, 0.004023511428385973, 0.15389463305473328, -0.5330516695976257, -0.11284861713647842, -0.503564715385437, 0.29277750849723816, 0.30457010865211487, 0.20931151509284973, -0.4821900427341461, 0.25134116411209106, -0.6080542206764221, 0.4530733525753021, 0.7091001868247986, 0.07925073802471161, 0.3792549967765808, -0.3099231421947479, 0.7319424748420715, 0.5377930998802185, 0.024662675336003304, -0.41837412118911743, -0.4258745014667511, -0.9719462394714355, -0.4980790913105011, 0.6601832509040833, 0.6224445104598999, -0.8251277804374695, 0.776395857334137, -0.4389258027076721, -0.7471633553504944, -0.5510250926017761, 0.04514580965042114, 0.4688572287559509, 0.37288135290145874, 0.4642567038536072, -0.5392337441444397, -0.8841321468353271, -0.5411473512649536, -0.17033188045024872, -0.10353405028581619, 0.17386192083358765, 0.011025474406778812, 0.6564421057701111, -0.32959944009780884, 0.9123561382293701, -0.401901513338089, -0.42679911851882935, -0.5308248400688171, 0.12033180147409439, -0.033347487449645996, 0.5497802495956421, 0.40755313634872437, -0.6350874304771423, -0.646795392036438, -0.06586463749408722, -0.6221972107887268, -0.07836312800645828, 0.004069897346198559, -0.02019869163632393, 0.44946151971817017, 0.56877601146698, -0.7556639909744263, 0.31601935625076294, 0.3274511396884918, -0.19554157555103302, 0.6206271648406982, -0.13345123827457428, 0.07356765866279602, -1.4171935319900513, 0.24183547496795654, -0.022105833515524864, -0.20973843336105347, -0.6624798774719238, 0.13365782797336578, 0.02430526353418827, -0.3218832015991211, -0.5525308847427368, 0.5576334595680237, -0.6311105489730835, 0.34441709518432617, -0.209873229265213, 0.25204935669898987, -0.07182221859693527, 0.840541660785675, 0.022681530565023422, 0.8754152655601501, 0.4484516978263855, -0.6119862198829651, 0.15930531919002533, 0.18752600252628326, -0.44073763489723206, 0.2928621470928192, -0.7848049402236938, 0.13432662189006805, 0.050800129771232605, 0.43620938062667847, -1.043188452720642, -0.14628030359745026, 0.4142989218235016, -0.494035005569458, 0.3180314302444458, 0.18337754905223846, -0.7867794036865234, -0.3026154339313507, -0.5817910432815552, 0.4429681897163391, 0.5335075855255127, -0.36663195490837097, 0.40344491600990295, 0.43225330114364624, 0.023740284144878387, -0.5496528744697571, -0.7098913788795471, 0.019425638020038605, -0.41520074009895325, -0.36735597252845764, 0.2543988823890686, -0.03614098206162453, 0.12331987917423248, -0.2060161530971527, 0.16094081103801727, -0.09912610054016113, -0.029183125123381615, 0.10719691216945648, 0.17004463076591492, -0.1468120962381363, 0.1342015266418457, -0.15065237879753113, -0.19512474536895752, -0.3260721266269684, -0.40648984909057617, 0.9371219873428345, -0.105315200984478, -0.05063123628497124, -0.7825107574462891, -0.0014807538827881217, 0.45650041103363037, -0.33666542172431946, 0.769270658493042, 0.7987644076347351, -0.46491143107414246, 0.1407434046268463, -0.5281896591186523, -0.10638650506734848, -0.43654367327690125, 0.6079016923904419, -0.4691312611103058, -0.6624804139137268, 0.4860815703868866, 0.021907387301325798, -0.2656649649143219, 0.5339813828468323, 0.5267809629440308, 0.19590505957603455, 0.8120198845863342, 0.6856624484062195, -0.3448679745197296, 0.5390028357505798, -0.3185550570487976, 0.42755329608917236, -0.7582809329032898, -0.24034778773784637, -0.2850935161113739, -0.05734667181968689, -0.7287972569465637, -0.41550716757774353, 0.1163850650191307, 0.29960986971855164, -0.2561812102794647, 0.7792271971702576, -0.5702518820762634, 0.19996410608291626, 0.4442908763885498, 0.07762225717306137, 0.22928333282470703, -0.04737887158989906, -0.22980917990207672, -0.27849647402763367, -0.7497435808181763, -0.515516996383667, 1.1863290071487427, 0.480948805809021, 0.5523309707641602, -0.10075113922357559, 0.5396765470504761, 0.006648065522313118, -0.021556904539465904, -0.6283959150314331, 0.6137442588806152, 0.06525618582963943, -0.47816723585128784, -0.22691509127616882, -0.4234236478805542, -1.0367987155914307, 0.2089143991470337, 0.0050776368007063866, -0.6480919718742371, 0.051692429929971695, -0.10854316502809525, -0.2254088819026947, 0.3705081343650818, -0.8537799119949341, 0.8811549544334412, -0.0739981085062027, 0.010113018564879894, -0.07066958397626877, -0.6868410706520081, 0.5224440097808838, -0.1910676509141922, -0.0013907060492783785, 0.17998118698596954, 0.08697213232517242, 1.0620168447494507, -0.7045210003852844, 0.771145224571228, -0.26977163553237915, 0.020582960918545723, 0.1995488405227661, -0.16566185653209686, 0.33765655755996704, -0.17453151941299438, 0.21604673564434052, 0.2321006953716278, 0.11449440568685532, -0.3875257074832916, -0.3007175326347351, 0.42010828852653503, -0.9473437666893005, -0.2467336356639862, -0.6990211009979248, -0.21607613563537598, 0.024202261120080948, 0.5487177968025208, 0.6583142876625061, 0.12146422266960144, -0.03462575376033783, 0.14986176788806915, 0.7251346707344055, -0.4908347725868225, 0.28750598430633545, 0.3643132150173187, -0.3839406371116638, -0.5828998684883118, 0.9967465996742249, 0.3976404070854187, 0.09524012356996536, 0.40345263481140137, 0.18707920610904694, -0.22264014184474945, -0.3248978555202484, -0.3235325217247009, 0.4499082565307617, -0.6980056762695312, -0.25139281153678894, -0.9132152199745178, -0.39115241169929504, -0.511253297328949, 0.10996481776237488, -0.38688090443611145, -0.45874977111816406, -0.435677170753479, -0.22040565311908722, 0.3101310133934021, 0.5351651310920715, 0.15649741888046265, 0.53179532289505, -0.3321499824523926, 0.09190934151411057, 0.0808907151222229, 0.17735597491264343, 0.1126534566283226, -0.8433175683021545, -0.30780646204948425, 0.02811313234269619, -0.37298062443733215, -0.7792714834213257, 0.41702404618263245, 0.01206292025744915, 0.1799963116645813, 0.4107045531272888, -0.08148633688688278, 0.9420068264007568, -0.5604999661445618, 1.0339930057525635, 0.3480013608932495, -1.008162021636963, 0.597565770149231, -0.13418525457382202, 0.38519933819770813, 0.5034176111221313, 0.5275149345397949, -0.7625609040260315, -0.2810720205307007, -0.6322081685066223, -0.8753654956817627, 0.6689802408218384, 0.14784669876098633, 0.04421933740377426, 0.10894817858934402, 0.20001555979251862, 0.07347111403942108, 0.24889183044433594, -1.0359182357788086, -0.27578580379486084, -0.5145590901374817, -0.20768669247627258, -0.01897219382226467, -0.34909045696258545, 0.26066428422927856, -0.5152857303619385, 0.9143880605697632, 0.12217716127634048, 0.40664544701576233, 0.1368235945701599, -0.5033001899719238, 0.08464149385690689, 0.12455715239048004, 0.8885673880577087, 0.4811328947544098, -0.05648257955908775, -0.008542144671082497, 0.2903389036655426, -0.6849826574325562, 0.1369323581457138, 0.16103778779506683, -0.17401231825351715, 0.14351016283035278, 0.39594516158103943, 0.9083757400512695, 0.28726261854171753, -0.7010602355003357, 0.7033454775810242, 0.009586178697645664, -0.14642414450645447, -0.46317338943481445, -0.16637256741523743, 0.008920579217374325, -0.21110355854034424, 0.28880932927131653, -0.03169943764805794, -0.2075081169605255, -0.5110113620758057, 0.2810092568397522, 0.1453387439250946, -0.43507635593414307, -0.541995108127594, 0.7918018698692322, 0.027934854850172997, -0.33344772458076477, 0.46775299310684204, -0.3666848838329315, -0.7785686254501343, 0.181715190410614, 0.4263010323047638, 0.8072419762611389, -0.261292427778244, 0.135197252035141, 0.5285274386405945, 0.19685311615467072, 0.04528653994202614, 0.09603746980428696, 0.02378409169614315, -0.636763334274292, -0.2541585862636566, -0.6835981011390686, -0.000057418383221374825, 0.3420093059539795, -0.3320198953151703, 0.5387119650840759, -0.5063173770904541, 0.024341734126210213, -0.0862056091427803, 0.43901315331459045, -0.5881774425506592, 0.25218212604522705, -0.38274234533309937, 1.0024230480194092, -0.6787575483322144, 0.954291045665741, 0.5421504974365234, -0.9408830404281616, -1.0260268449783325, 0.13723303377628326, -0.11169091612100601, -0.8725007772445679, 0.8152360916137695, 0.42139893770217896, 0.03211498260498047, 0.031761616468429565, -0.3829839527606964, -0.6347184777259827, 1.152601957321167, 0.17557568848133087, -0.3138715326786041, -0.2312915176153183, 0.20958855748176575, 0.6084075570106506, -0.09493307769298553, 0.24300473928451538, 0.3906291723251343, 0.3657163381576538, -0.11018276959657669, -1.0274713039398193, 0.13584782183170319, -0.42768847942352295, 0.08349653333425522, -0.18036161363124847, -0.8316570520401001, 0.8989766836166382, 0.08449042588472366, -0.34712061285972595, 0.29011186957359314, 0.6291623115539551, 0.338135689496994, 0.016101188957691193, 0.5302300453186035, 0.7312286496162415, 0.8369225263595581, -0.04606682062149048, 0.7746988534927368, -0.4296300411224365, 0.3349008858203888, 0.6271018385887146, -0.12175106257200241, 0.7459810376167297, 0.4900277853012085, -0.2659814953804016, 0.5784254670143127, 0.8567132949829102, 0.09695205092430115, 0.5759616494178772, 0.20898954570293427, -0.077891506254673, 0.16619017720222473, -0.0797785222530365, -0.32966136932373047, 0.5187947154045105, -0.051690492779016495, -0.1949181705713272, 0.06395423412322998, 0.5144860148429871, 0.5002983212471008, -0.11580773442983627, -0.011295704171061516, 0.7566763162612915, 0.12753477692604065, -0.7244753837585449, 0.6428228616714478, 0.2524276077747345, 1.0301499366760254, -0.6909498572349548, 0.26085928082466125, -0.2693977653980255, 0.1997998207807541, -0.1025262102484703, -0.3806215226650238, -0.002246980322524905, 0.01977919228374958, -0.0272993054240942, -0.3023751974105835, 0.6630850434303284, -0.5016676187515259, -0.4148908257484436, 0.14931043982505798, 0.31194472312927246, 0.2583354115486145, -0.03859999030828476, -0.6302483081817627, 0.04095720872282982, 0.015113778412342072, -0.40352392196655273, 0.2599979341030121, 0.6133992671966553, -0.0034790050704032183, 0.654036283493042, 0.5821202993392944, 0.35355615615844727, 0.16669198870658875, -0.06951798498630524, 0.7922123670578003, -0.6492642164230347, -0.69219571352005, -0.7350864410400391, 0.5052132606506348, -0.0887662023305893, -0.5895044803619385, 0.966709315776825, 0.7171552181243896, 0.9914741516113281, -0.06981348991394043, 0.6111668348312378, 0.07289951294660568, 0.553453803062439, -0.5826942920684814, 0.8405075669288635, -0.5975009202957153, 0.16068603098392487, -0.4933653473854065, -0.7410580515861511, -0.335812509059906, 0.670906662940979, -0.19847780466079712, 0.21825432777404785, 0.7812185287475586, 0.7247839570045471, -0.1109786257147789, -0.10198958218097687, 0.12073786556720734, 0.1764352172613144, 0.38683775067329407, 0.5641353726387024, 0.5219838619232178, -0.8009541034698486, 0.672764003276825, -0.2216266244649887, -0.07357563823461533, -0.23717130720615387, -0.5580503344535828, -0.9280171394348145, -0.9056486487388611, -0.3567779064178467, -0.34422942996025085, -0.04137696325778961, 0.8889760375022888, 0.6465943455696106, -0.8041378855705261, -0.26204943656921387, -0.25023600459098816, -0.05854807794094086, -0.07994037866592407, -0.30002081394195557, 0.6441299915313721, -0.33229926228523254, -0.7201613187789917, 0.02722063660621643, 0.2202863246202469, 0.10336575657129288, -0.37145698070526123, -0.2117059975862503, -0.6247043609619141, -0.038820531219244, 0.6039083003997803, 0.21335642039775848, -0.7091989517211914, -0.28808021545410156, 0.28725963830947876, -0.2575031518936157, 0.2154228389263153, 0.6420376300811768, -0.6433629989624023, 0.5034447312355042, 0.31128206849098206, 0.5864304900169373, 0.5833514332771301, -0.21912576258182526, 0.417592853307724, -0.7670413851737976, 0.3768206536769867, 0.11495959013700485, 0.367277055978775, 0.43291619420051575, -0.0772673636674881, 0.43269461393356323, 0.6694501042366028, -0.5410143136978149, -1.1051241159439087, 0.10012393444776535, -0.9380751848220825, -0.29670628905296326, 1.1118587255477905, -0.23657463490962982, -0.3002161383628845, -0.028054775670170784, -0.4159497618675232, 0.6041791439056396, -0.05928497761487961, 0.6908310651779175, 0.9591604471206665, 0.21839550137519836, -0.2921208143234253, -0.3507629930973053, 0.6006750464439392, 0.5748617053031921, -0.6732720136642456, -0.15472619235515594, 0.10331667959690094, 0.50971519947052, 0.22996874153614044, 0.9777222275733948, -0.10095187276601791, 0.2848883867263794, -0.22462275624275208, 0.0762324333190918, 0.08224969357252121, -0.17372427880764008, -0.4440469443798065, -0.005821045953780413, -0.030566727742552757, -0.3975691795349121 ]
tugstugi/bert-base-mongolian-uncased
tugstugi
"2021-05-20T08:13:09Z"
28,768
1
transformers
[ "transformers", "pytorch", "tf", "jax", "bert", "fill-mask", "mongolian", "uncased", "mn", "arxiv:1810.04805", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: "mn" tags: - bert - mongolian - uncased --- # BERT-BASE-MONGOLIAN-UNCASED [Link to Official Mongolian-BERT repo](https://github.com/tugstugi/mongolian-bert) ## Model description This repository contains pre-trained Mongolian [BERT](https://arxiv.org/abs/1810.04805) models trained by [tugstugi](https://github.com/tugstugi), [enod](https://github.com/enod) and [sharavsambuu](https://github.com/sharavsambuu). Special thanks to [nabar](https://github.com/nabar) who provided 5x TPUs. This repository is based on the following open source projects: [google-research/bert](https://github.com/google-research/bert/), [huggingface/pytorch-pretrained-BERT](https://github.com/huggingface/pytorch-pretrained-BERT) and [yoheikikuta/bert-japanese](https://github.com/yoheikikuta/bert-japanese). #### How to use ```python from transformers import pipeline, AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained('tugstugi/bert-base-mongolian-uncased', use_fast=False) model = AutoModelForMaskedLM.from_pretrained('tugstugi/bert-base-mongolian-uncased') ## declare task ## pipe = pipeline(task="fill-mask", model=model, tokenizer=tokenizer) ## example ## input_ = 'Миний [MASK] хоол идэх нь тун чухал.' output_ = pipe(input_) for i in range(len(output_)): print(output_[i]) ## output ## #{'sequence': 'миний хувьд хоол идэх нь тун чухал.', 'score': 0.7889143824577332, 'token': 126, 'token_str': 'хувьд'} #{'sequence': 'миний бодлоор хоол идэх нь тун чухал.', 'score': 0.18616807460784912, 'token': 6106, 'token_str': 'бодлоор'} #{'sequence': 'миний зүгээс хоол идэх нь тун чухал.', 'score': 0.004825591575354338, 'token': 761, 'token_str': 'зүгээс'} #{'sequence': 'миний биед хоол идэх нь тун чухал.', 'score': 0.0015743684489279985, 'token': 3010, 'token_str': 'биед'} #{'sequence': 'миний тухайд хоол идэх нь тун чухал.', 'score': 0.0014919431414455175, 'token': 1712, 'token_str': 'тухайд'} ``` ## Training data Mongolian Wikipedia and the 700 million word Mongolian news data set [[Pretraining Procedure](https://github.com/tugstugi/mongolian-bert#pre-training)] ### BibTeX entry and citation info ```bibtex @misc{mongolian-bert, author = {Tuguldur, Erdene-Ochir and Gunchinish, Sharavsambuu and Bataa, Enkhbold}, title = {BERT Pretrained Models on Mongolian Datasets}, year = {2019}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/tugstugi/mongolian-bert/}} } ```
[ -0.3417356014251709, -0.4532266855239868, -0.06027095392346382, 0.2810840904712677, -0.5444862246513367, 0.0019008312374353409, -0.33865806460380554, -0.09969715029001236, 0.328164279460907, 0.12058979272842407, -0.665851354598999, -0.6789939999580383, -0.6455969214439392, -0.05977576971054077, -0.3238164782524109, 1.2100954055786133, -0.029543016105890274, 0.3934706747531891, 0.21904416382312775, -0.19035440683364868, -0.10926983505487442, -0.5525897145271301, -0.17241226136684418, -0.40383997559547424, 0.5039196610450745, 0.22068993747234344, 0.37376439571380615, 0.5198524594306946, 0.47854867577552795, 0.3902944028377533, -0.02548665553331375, -0.2679319381713867, -0.3584478795528412, -0.15163585543632507, 0.4003761410713196, -0.2980477213859558, -0.3789178431034088, -0.11288568377494812, 0.9071012735366821, 0.6716641783714294, -0.23147983849048615, 0.3524596393108368, -0.08934890478849411, 0.5656776428222656, -0.3527107238769531, 0.06793706864118576, -0.4414985477924347, 0.08326806873083115, -0.3362448811531067, 0.242770254611969, -0.19682466983795166, -0.4416476786136627, 0.3401285409927368, -0.6488134860992432, 0.1862361580133438, -0.06548183411359787, 1.483385443687439, 0.05741678923368454, -0.04613730311393738, -0.13248051702976227, -0.3173794150352478, 0.9073206782341003, -1.1430150270462036, 0.30979058146476746, 0.39038825035095215, 0.06510501354932785, -0.142151340842247, -0.8920519948005676, -0.6545812487602234, -0.12888605892658234, -0.34300893545150757, 0.23558053374290466, -0.07885176688432693, -0.07802465558052063, 0.36021360754966736, 0.38844168186187744, -0.8534347414970398, 0.06911197304725647, -0.6071922779083252, -0.4419708549976349, 0.604175865650177, -0.15210984647274017, 0.16429434716701508, -0.5532323122024536, -0.2948775589466095, -0.6055805683135986, -0.41405826807022095, 0.353117972612381, 0.7292084097862244, 0.22605513036251068, -0.34233683347702026, 0.729069173336029, -0.27162718772888184, 0.7288886308670044, 0.2368316799402237, -0.013191302306950092, 0.7062666416168213, -0.1877371221780777, -0.33914974331855774, 0.015024160966277122, 1.098384141921997, 0.0745326355099678, 0.08370201289653778, 0.038942135870456696, -0.14209164679050446, -0.33443692326545715, -0.023030804470181465, -0.817573606967926, -0.43278586864471436, 0.20148047804832458, -0.5710290670394897, -0.19293323159217834, 0.36095255613327026, -0.7715017199516296, 0.13765384256839752, -0.13349689543247223, 0.9313099384307861, -0.7709476351737976, -0.27092045545578003, 0.0427195243537426, -0.06978528946638107, 0.6355661153793335, -0.149180069565773, -0.9320897459983826, -0.04761814698576927, 0.2969702184200287, 0.7472619414329529, 0.25849953293800354, -0.41280725598335266, -0.16169776022434235, -0.20914071798324585, -0.2051529586315155, 0.5143207311630249, -0.15235154330730438, -0.28424927592277527, 0.010119187645614147, 0.24099287390708923, -0.13256461918354034, -0.30814629793167114, 0.4247320890426636, -0.3912212550640106, 0.5215885639190674, -0.20323790609836578, -0.5396928787231445, -0.20258574187755585, 0.12322911620140076, -0.5264263153076172, 1.182494878768921, 0.1524883657693863, -0.9641856551170349, 0.4665401875972748, -0.7215381860733032, -0.49550890922546387, -0.07326400279998779, 0.3194889724254608, -0.7614186406135559, -0.2351236492395401, 0.27322372794151306, 0.5147591829299927, 0.004574258346110582, 0.2652774751186371, -0.29390355944633484, -0.37362805008888245, 0.14320318400859833, -0.02029004879295826, 1.2392637729644775, 0.235310360789299, -0.3774434030056, 0.29317614436149597, -1.0091270208358765, 0.44969987869262695, 0.17711851000785828, -0.5123923420906067, 0.008075178600847721, -0.19822852313518524, -0.05455944314599037, -0.034831732511520386, 0.4099380671977997, -0.52376788854599, 0.2829491198062897, -0.568005383014679, 0.4951336085796356, 0.9085293412208557, -0.3582113981246948, 0.29594528675079346, -0.3786531984806061, 0.31910911202430725, 0.06131555885076523, 0.034292854368686676, -0.1972140222787857, -0.35214778780937195, -1.0519315004348755, -0.4342429041862488, 0.7370697259902954, 0.6836891174316406, -0.7080534100532532, 1.1380032300949097, -0.28979265689849854, -0.9152225255966187, -0.7299425005912781, -0.14622937142848969, 0.31164562702178955, 0.4620611369609833, 0.4336923360824585, -0.44792914390563965, -0.9528862833976746, -0.8000866174697876, -0.06875625252723694, -0.33242249488830566, -0.08523273468017578, 0.20335911214351654, 0.8249791264533997, -0.2296288162469864, 0.6807869672775269, -0.40881139039993286, -0.16760921478271484, -0.1267290860414505, 0.41654330492019653, 0.7626201510429382, 0.9926103353500366, 0.5216296315193176, -0.3885643482208252, -0.6166833639144897, -0.08700119704008102, -0.6733129620552063, -0.0324486643075943, -0.009731970727443695, -0.31972184777259827, 0.38542792201042175, 0.0741010308265686, -0.6447156071662903, 0.35964876413345337, 0.4231569766998291, -0.24549096822738647, 0.8647875189781189, -0.28903883695602417, 0.14470206201076508, -1.15092933177948, 0.5077300071716309, -0.35188382863998413, 0.13743476569652557, -0.6559718251228333, -0.1636916995048523, 0.08261000365018845, 0.10963771492242813, -0.4173750579357147, 0.5335933566093445, -0.4134349226951599, -0.08725591003894806, 0.3776477873325348, -0.38920414447784424, -0.27412521839141846, 0.8021665215492249, 0.15062059462070465, 0.4920605421066284, 0.8077084422111511, -0.4273662865161896, 0.4469166696071625, 0.3304010331630707, -0.7102983593940735, 0.004634033422917128, -0.9134535193443298, 0.03895414248108864, 0.07293187081813812, 0.16237588226795197, -1.0457817316055298, -0.5125809907913208, 0.49377191066741943, -0.8875573873519897, 0.4509376287460327, -0.21815696358680725, -0.6306291818618774, -0.6683099269866943, -0.4346151649951935, 0.2403476983308792, 0.8467627167701721, -0.420150488615036, 0.2914312779903412, 0.09050831943750381, 0.008443500846624374, -0.9797317385673523, -0.80319744348526, -0.39468321204185486, -0.20702287554740906, -0.6781495213508606, 0.37404289841651917, -0.18462583422660828, 0.2904341220855713, 0.017060071229934692, -0.12589053809642792, -0.3173496425151825, -0.030306994915008545, -0.09440132230520248, 0.48558974266052246, -0.3319287598133087, 0.05920601263642311, -0.14871767163276672, 0.08594328910112381, 0.06705775111913681, -0.3864644467830658, 0.7983706593513489, -0.23163847625255585, -0.27090978622436523, -0.48458003997802734, 0.18089455366134644, 0.3556808829307556, -0.19485121965408325, 0.8498061895370483, 1.2746493816375732, -0.3765486180782318, 0.23677998781204224, -0.40062183141708374, -0.2387908548116684, -0.49995705485343933, 0.38336092233657837, -0.19014737010002136, -0.7296730875968933, 0.8082192540168762, 0.32863566279411316, 0.01984472945332527, 0.6893271207809448, 0.5812675356864929, -0.4121508300304413, 0.9051212668418884, 0.18668232858181, -0.040018897503614426, 0.5991170406341553, -0.7419847846031189, 0.06157374382019043, -0.7332254648208618, -0.42648497223854065, -0.4948504865169525, -0.2639210820198059, -0.6824743747711182, -0.1553552895784378, 0.23450474441051483, 0.19092468917369843, -0.6528649926185608, 0.4570431113243103, -0.6174501180648804, 0.17998118698596954, 0.8850629329681396, 0.20423105359077454, -0.41655004024505615, 0.1375417709350586, -0.580623209476471, -0.0715370699763298, -0.7779139876365662, -0.2704249620437622, 1.3091527223587036, 0.18623888492584229, 0.821926474571228, 0.10125824809074402, 0.7458288669586182, 0.18552552163600922, 0.11745542287826538, -0.6797204613685608, 0.484676718711853, -0.12965162098407745, -0.9028469920158386, -0.5121340155601501, -0.2987707853317261, -1.1850910186767578, 0.1261133998632431, -0.3422984778881073, -0.7671255469322205, -0.057070840150117874, 0.06705440580844879, -0.2849229574203491, 0.34173983335494995, -0.821778416633606, 0.9728615880012512, -0.27731752395629883, -0.21160519123077393, 0.10030082613229752, -1.0717904567718506, 0.41791144013404846, -0.03253478184342384, -0.09019516408443451, -0.011997740715742111, 0.46305766701698303, 1.1228400468826294, -0.7226142287254333, 0.8870113492012024, -0.2504575550556183, 0.1810358762741089, 0.3754921853542328, -0.2931719124317169, 0.457334041595459, -0.09687008708715439, 0.047634873539209366, 0.46433213353157043, 0.03576447442173958, -0.6730798482894897, -0.13978888094425201, 0.5775086879730225, -1.1097533702850342, -0.5484724640846252, -0.769703209400177, -0.41731300950050354, 0.20104801654815674, 0.5424548387527466, 0.6731299161911011, 0.4721399247646332, 0.007701575756072998, 0.46946218609809875, 0.6070239543914795, -0.3871067464351654, 0.5638003945350647, 0.39088261127471924, 0.12122683972120285, -0.7291343212127686, 0.7675367593765259, 0.22251905500888824, 0.03249041363596916, 0.36027517914772034, 0.15427865087985992, -0.4479319453239441, -0.5574266314506531, -0.42350247502326965, 0.357023686170578, -0.664685070514679, -0.30815714597702026, -0.4656525254249573, -0.5085867047309875, -0.760370135307312, 0.016985660418868065, -0.21099302172660828, -0.446568101644516, -0.4142313599586487, 0.06634171307086945, 0.4673921465873718, 0.48274150490760803, -0.5781269669532776, 0.3722422122955322, -0.872836172580719, 0.24525727331638336, 0.42495450377464294, 0.4044652581214905, 0.017985638231039047, -0.8443844318389893, -0.5203027129173279, 0.06277618557214737, -0.34382930397987366, -0.840032160282135, 0.630109429359436, 0.11879132688045502, 0.8553715944290161, 0.4004707634449005, -0.07405515015125275, 0.9408187866210938, -0.4649600684642792, 0.9404950737953186, 0.3556835651397705, -1.1734161376953125, 0.6912800073623657, -0.39195889234542847, 0.4162870943546295, 0.23648449778556824, 0.5156421661376953, -0.4687936007976532, -0.14739583432674408, -0.7805653214454651, -1.0452244281768799, 1.1536086797714233, 0.3267885148525238, 0.07642816007137299, 0.1709141731262207, 0.019023040309548378, 0.23245000839233398, 0.20094315707683563, -1.0117868185043335, -0.6442268490791321, -0.7398249506950378, -0.37175416946411133, 0.06852343678474426, -0.1965111643075943, -0.08754107356071472, -0.7062811851501465, 0.9750365614891052, 0.1320633739233017, 0.7178634405136108, 0.3987317681312561, -0.30977755784988403, -0.05399207025766373, 0.04243145138025284, 0.6585317254066467, 0.4916954040527344, -0.5071254968643188, -0.308320015668869, 0.2513812482357025, -0.6789915561676025, 0.08847422897815704, 0.47455698251724243, -0.1776750385761261, 0.25901973247528076, 0.6278730034828186, 0.9988752603530884, 0.15543103218078613, -0.44431495666503906, 0.40673279762268066, 0.1955360770225525, -0.45427244901657104, -0.5259051322937012, -0.10600984841585159, -0.0010281942086294293, 0.10371927917003632, 0.700756847858429, -0.09301800280809402, -0.11931183189153671, -0.3745758533477783, 0.22935210168361664, 0.32961079478263855, -0.2098974883556366, -0.5213211178779602, 0.608722984790802, -0.01693897880613804, -0.11633343994617462, 0.6717764139175415, -0.10245179384946823, -0.7494247555732727, 0.8196180462837219, 0.3205617666244507, 0.7991884350776672, -0.15930840373039246, 0.14816845953464508, 0.9939406514167786, 0.24197208881378174, -0.03705638274550438, 0.39441755414009094, -0.10063841193914413, -0.781305730342865, -0.3185320198535919, -0.7020155191421509, -0.06618260592222214, 0.4658724367618561, -0.8436692357063293, 0.3674069941043854, -0.3883137106895447, -0.23185443878173828, 0.12659597396850586, 0.281735360622406, -0.6428192853927612, 0.22820746898651123, 0.2434496432542801, 0.7096095085144043, -0.6734676361083984, 1.0393301248550415, 0.8902761340141296, -0.34433576464653015, -0.8841539621353149, -0.22765226662158966, -0.49352404475212097, -0.9972639679908752, 0.9160261154174805, 0.1594838798046112, 0.421671062707901, 0.13076916337013245, -0.7018879652023315, -1.147870421409607, 1.203572392463684, 0.15399286150932312, -0.35799071192741394, -0.022455696016550064, -0.1213778480887413, 0.4681098163127899, -0.03188497573137283, 0.3753015398979187, 0.4626586139202118, 0.6942054033279419, 0.1958409994840622, -0.9312945008277893, -0.06301270425319672, -0.3354194760322571, -0.21260662376880646, 0.27240467071533203, -0.7807185649871826, 1.0794870853424072, -0.3334319293498993, -0.09165564924478531, 0.424787312746048, 0.693638265132904, 0.4238556921482086, -0.027713105082511902, 0.4484668970108032, 0.7851940989494324, 0.6940521001815796, -0.46570008993148804, 0.630177915096283, -0.2057192474603653, 0.7070345878601074, 0.7413027286529541, 0.14334243535995483, 0.582349956035614, 0.39580291509628296, -0.5177662968635559, 0.9198365807533264, 0.9829586148262024, -0.47548410296440125, 0.9312307238578796, 0.3554620146751404, 0.008064180612564087, -0.18184763193130493, 0.31056275963783264, -0.6149285435676575, 0.5257714986801147, 0.2838183045387268, -0.3379870355129242, -0.0682917982339859, -0.26004812121391296, 0.23620110750198364, -0.35607168078422546, -0.12067806720733643, 0.5091866850852966, -0.2954399883747101, -0.7356771230697632, 1.0668102502822876, -0.08792290091514587, 0.914995014667511, -1.0907038450241089, 0.11651560664176941, -0.09098325669765472, 0.016840117052197456, -0.05695602670311928, -0.7592934370040894, 0.02879541553556919, 0.06137702614068985, -0.09738389402627945, -0.09899526834487915, 0.5854827761650085, -0.47983500361442566, -0.6642478704452515, 0.10723412036895752, 0.3458861708641052, 0.35634055733680725, 0.5160402655601501, -0.9293339252471924, -0.23208507895469666, 0.2728404700756073, -0.6281718015670776, 0.17211303114891052, 0.48412024974823, 0.2902827262878418, 0.5162414908409119, 0.9965193867683411, 0.09692506492137909, 0.34577685594558716, -0.20504117012023926, 0.9222534894943237, -0.8021876811981201, -0.34635040163993835, -0.8397015333175659, 0.7803685069084167, -0.014702494256198406, -0.6019992232322693, 0.58219975233078, 0.483237087726593, 1.024741291999817, -0.4194751977920532, 0.7400508522987366, -0.5706820487976074, 0.40789324045181274, -0.640155553817749, 1.0071258544921875, -0.6804802417755127, -0.24752558767795563, -0.10392507910728455, -0.6304481625556946, -0.34394893050193787, 0.9596168994903564, -0.08546462655067444, 0.17044112086296082, 0.6305680871009827, 0.6037706136703491, 0.22052687406539917, -0.44143521785736084, 0.11302778124809265, 0.4136594235897064, 0.13672195374965668, 0.6554318070411682, 0.6349828243255615, -0.6649702787399292, 0.7265273928642273, -0.5825890898704529, 0.12265967577695847, -0.2983408272266388, -0.8873627781867981, -1.002863883972168, -0.699948787689209, -0.21446682512760162, -0.38959333300590515, -0.06873128563165665, 1.0321377515792847, 1.0005207061767578, -1.0917242765426636, -0.24133050441741943, 0.04426119104027748, 0.1623670905828476, -0.21904610097408295, -0.28427737951278687, 0.6868258118629456, -0.2757475972175598, -0.8640840649604797, -0.02554112672805786, -0.3450593650341034, 0.4771359860897064, -0.09463988989591599, -0.2652992308139801, -0.5950464010238647, -0.11307128518819809, 0.24511277675628662, 0.445477694272995, -0.9024415016174316, -0.33472007513046265, 0.18750616908073425, -0.076423779129982, 0.1659964770078659, 0.24713079631328583, -0.7602980732917786, 0.49944061040878296, 0.6904776096343994, 0.2469377964735031, 0.609940767288208, -0.17742709815502167, 0.4222285747528076, -0.8737313747406006, 0.37767404317855835, 0.1385255753993988, 0.6066028475761414, 0.367493212223053, -0.11897753924131393, 0.5430676937103271, 0.46935147047042847, -0.6025926470756531, -1.0181502103805542, -0.30982375144958496, -1.0253667831420898, -0.10445964336395264, 1.0017510652542114, -0.5069643259048462, -0.30992281436920166, 0.3003912568092346, -0.11460639536380768, 0.680031418800354, -0.4506516754627228, 0.8585433959960938, 1.1033629179000854, 0.19007627665996552, 0.07763567566871643, -0.2328713983297348, 0.4270887076854706, 0.5501421689987183, -0.5324639678001404, -0.29647377133369446, 0.04792264476418495, 0.37346309423446655, 0.30579251050949097, 0.3754836618900299, 0.02436346746981144, 0.30237695574760437, -0.07008954137563705, 0.46519047021865845, 0.06286457180976868, 0.09662564843893051, -0.2474830597639084, -0.37982821464538574, -0.2781243920326233, -0.5518097281455994 ]
facebook/mask2former-swin-large-cityscapes-semantic
facebook
"2023-09-07T15:38:57Z"
28,719
6
transformers
[ "transformers", "pytorch", "safetensors", "mask2former", "vision", "image-segmentation", "dataset:coco", "arxiv:2112.01527", "arxiv:2107.06278", "license:other", "endpoints_compatible", "has_space", "region:us" ]
image-segmentation
"2023-01-05T00:18:47Z"
--- license: other tags: - vision - image-segmentation datasets: - coco widget: - src: http://images.cocodataset.org/val2017/000000039769.jpg example_title: Cats - src: http://images.cocodataset.org/val2017/000000039770.jpg example_title: Castle --- # Mask2Former Mask2Former model trained on Cityscapes semantic segmentation (large-sized version, Swin backbone). It was introduced in the paper [Masked-attention Mask Transformer for Universal Image Segmentation ](https://arxiv.org/abs/2112.01527) and first released in [this repository](https://github.com/facebookresearch/Mask2Former/). Disclaimer: The team releasing Mask2Former did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description Mask2Former addresses instance, semantic and panoptic segmentation with the same paradigm: by predicting a set of masks and corresponding labels. Hence, all 3 tasks are treated as if they were instance segmentation. Mask2Former outperforms the previous SOTA, [MaskFormer](https://arxiv.org/abs/2107.06278) both in terms of performance an efficiency by (i) replacing the pixel decoder with a more advanced multi-scale deformable attention Transformer, (ii) adopting a Transformer decoder with masked attention to boost performance without without introducing additional computation and (iii) improving training efficiency by calculating the loss on subsampled points instead of whole masks. ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/mask2former_architecture.png) ## Intended uses & limitations You can use this particular checkpoint for panoptic segmentation. See the [model hub](https://huggingface.co/models?search=mask2former) to look for other fine-tuned versions on a task that interests you. ### How to use Here is how to use this model: ```python import requests import torch from PIL import Image from transformers import AutoImageProcessor, Mask2FormerForUniversalSegmentation # load Mask2Former fine-tuned on Cityscapes semantic segmentation processor = AutoImageProcessor.from_pretrained("facebook/mask2former-swin-large-cityscapes-semantic") model = Mask2FormerForUniversalSegmentation.from_pretrained("facebook/mask2former-swin-large-cityscapes-semantic") url = "http://images.cocodataset.org/val2017/000000039769.jpg" image = Image.open(requests.get(url, stream=True).raw) inputs = processor(images=image, return_tensors="pt") with torch.no_grad(): outputs = model(**inputs) # model predicts class_queries_logits of shape `(batch_size, num_queries)` # and masks_queries_logits of shape `(batch_size, num_queries, height, width)` class_queries_logits = outputs.class_queries_logits masks_queries_logits = outputs.masks_queries_logits # you can pass them to processor for postprocessing predicted_semantic_map = processor.post_process_semantic_segmentation(outputs, target_sizes=[image.size[::-1]])[0] # we refer to the demo notebooks for visualization (see "Resources" section in the Mask2Former docs) ``` For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/mask2former).
[ -0.5415353178977966, -0.6217957139015198, 0.43353819847106934, 0.27609437704086304, -0.20666144788265228, -0.21302276849746704, 0.11305826157331467, -0.78160160779953, 0.14604486525058746, 0.6725967526435852, -0.7126734256744385, -0.4815633296966553, -0.7513834834098816, -0.27762749791145325, -0.13182853162288666, 0.8097745776176453, -0.08948561549186707, 0.07894397526979446, -0.39144590497016907, -0.02861597016453743, -0.328730970621109, -0.18265853822231293, -0.8025093674659729, -0.34817540645599365, 0.1593320220708847, 0.2129060924053192, 0.449711412191391, 0.6054708957672119, 0.5673497915267944, 0.310837984085083, -0.11841490864753723, -0.01839330792427063, -0.408390611410141, -0.26718488335609436, -0.04794016852974892, -0.39625781774520874, -0.18856281042099, 0.07831335812807083, 0.5472288727760315, 0.45744603872299194, 0.1122409924864769, 0.33347436785697937, -0.15228469669818878, 0.6163316369056702, -0.5696156024932861, 0.34404802322387695, -0.3996996283531189, 0.1508179008960724, -0.14662884175777435, 0.4025246798992157, -0.12344162166118622, -0.19068053364753723, 0.3092547357082367, -0.5540159940719604, 0.3936932682991028, -0.10775057971477509, 1.0710991621017456, 0.3657228648662567, -0.19530656933784485, -0.07539920508861542, -0.4662732183933258, 0.6854290962219238, -0.3176008462905884, 0.2704976797103882, 0.41975831985473633, 0.7348034381866455, 0.11300724744796753, -1.0560996532440186, -0.51090008020401, 0.3158602714538574, -0.1616717278957367, 0.16412515938282013, -0.33660784363746643, 0.06471448391675949, 0.42279568314552307, 0.25076913833618164, -0.6431334614753723, -0.010282261297106743, -0.8242067098617554, -0.4150717556476593, 0.5916762351989746, -0.07861503958702087, 0.22071543335914612, -0.40987008810043335, -0.6983450055122375, -0.35241401195526123, -0.2530086636543274, 0.47419190406799316, -0.02300691045820713, -0.2608353793621063, -0.20235535502433777, 0.4110453426837921, -0.2352750301361084, 0.7097019553184509, 0.2780883312225342, -0.20275628566741943, 0.2792039215564728, 0.02159821428358555, -0.3479357361793518, -0.06902245432138443, 0.6480442881584167, 0.4833882749080658, 0.05258184298872948, 0.02926461398601532, -0.1354476809501648, 0.2180703580379486, 0.1107620820403099, -1.1826610565185547, -0.6808187365531921, 0.3150056302547455, -0.28014010190963745, -0.3025943636894226, 0.1972750872373581, -0.7782592177391052, -0.07469890266656876, -0.20959535241127014, 0.5018789172172546, -0.3223282992839813, -0.1007547453045845, 0.20272521674633026, -0.3524177074432373, 0.5262810587882996, 0.43702149391174316, -0.9130825400352478, 0.33957192301750183, 0.509585976600647, 0.9351384043693542, -0.10583314299583435, -0.05995319038629532, -0.13465380668640137, 0.07119860500097275, -0.25108927488327026, 1.0263570547103882, -0.43678680062294006, -0.03779372572898865, -0.3253583312034607, 0.2924670875072479, -0.22612935304641724, -0.7284794449806213, 0.39231187105178833, -0.4844819903373718, 0.4167235791683197, -0.19734349846839905, -0.18278858065605164, -0.6046356558799744, 0.1828514039516449, -0.5689698457717896, 1.3656983375549316, 0.48717671632766724, -0.5805279612541199, 0.19340112805366516, -0.7598282694816589, -0.07186002284288406, -0.03692568838596344, -0.048544567078351974, -0.7884995937347412, -0.1621018648147583, 0.4257446229457855, 0.3896559774875641, -0.14970296621322632, 0.12881848216056824, -0.21656858921051025, -0.13250529766082764, -0.015790462493896484, 0.2599247992038727, 0.9985491633415222, 0.09700839221477509, -0.6651147603988647, 0.32700422406196594, -0.5401292443275452, 0.00804077833890915, 0.3272814154624939, 0.14169621467590332, 0.007324553094804287, -0.3751557469367981, 0.42137062549591064, 0.6849414110183716, 0.10430064797401428, -0.720526933670044, 0.0011138140689581633, -0.40965208411216736, 0.5921984910964966, 0.5555212497711182, -0.0397007130086422, 0.5524170994758606, -0.21543419361114502, 0.28300145268440247, 0.16577968001365662, 0.39298442006111145, -0.0001809953391784802, -0.6596794128417969, -0.8170573711395264, -0.5086817741394043, -0.022061701864004135, 0.4057038426399231, -0.5202559232711792, 0.37975096702575684, 0.05405939742922783, -0.8419058918952942, -0.44864213466644287, -0.16807925701141357, 0.32402724027633667, 0.6680958867073059, 0.3532707393169403, -0.49384835362434387, -0.8087984323501587, -1.0420268774032593, 0.24209412932395935, 0.16623549163341522, -0.17949508130550385, 0.3142971694469452, 0.64781254529953, -0.5573583841323853, 1.1094145774841309, -0.7019028663635254, -0.3455111086368561, -0.14102743566036224, -0.1474888026714325, -0.10660883784294128, 0.6117237210273743, 0.7900320887565613, -0.8187352418899536, -0.2505860924720764, -0.47337672114372253, -0.6523105502128601, -0.000779088179115206, 0.17067965865135193, -0.45356181263923645, 0.2504045367240906, 0.27415379881858826, -0.6598490476608276, 0.5167070031166077, 0.46560582518577576, -0.4516066908836365, 0.6024767160415649, 0.1654679775238037, -0.10115780681371689, -0.9657244086265564, 0.15682005882263184, 0.136173814535141, -0.4222605526447296, -0.5900170207023621, 0.12793023884296417, 0.005658269859850407, -0.40223428606987, -0.5394822359085083, 0.6253677606582642, -0.3399542570114136, -0.3857966959476471, -0.2896439731121063, -0.08643082529306412, 0.33307597041130066, 0.6784840226173401, 0.48342832922935486, 0.34440121054649353, 0.7366818785667419, -0.4418967068195343, 0.42901912331581116, 0.47030922770500183, -0.4632975459098816, 0.3300938010215759, -0.8727724552154541, 0.2519240081310272, -0.19666564464569092, 0.6518824696540833, -1.142450213432312, -0.5672623515129089, 0.4439503252506256, -0.3288160264492035, 0.1152898296713829, -0.12971626222133636, -0.4288029074668884, -0.6972643733024597, -0.46197566390037537, 0.6064749360084534, 0.569320023059845, -0.6941596269607544, 0.35964149236679077, 0.5421412587165833, 0.21260513365268707, -0.13838709890842438, -0.9284226894378662, -0.18577547371387482, -0.13610249757766724, -1.0506478548049927, 0.457509309053421, 0.01934126950800419, 0.014827528037130833, -0.06019245460629463, -0.09438740462064743, -0.10561523586511612, -0.2146323174238205, 0.41596734523773193, 0.396403044462204, 0.007192114368081093, -0.32338234782218933, -0.03904970735311508, -0.3925953209400177, 0.2209109663963318, -0.5409847497940063, 0.5987796783447266, -0.14452406764030457, -0.11337032914161682, -0.6278023719787598, 0.09122566878795624, 0.5109082460403442, -0.35720208287239075, 0.43394437432289124, 1.1368801593780518, -0.7392897605895996, 0.02333606220781803, -0.8042265772819519, -0.4220433235168457, -0.4639865756034851, 0.46349215507507324, -0.36890968680381775, -0.9081419706344604, 0.6223148703575134, 0.02168108895421028, -0.06393871456384659, 0.7918904423713684, 0.577783465385437, 0.025992214679718018, 0.9602086544036865, 0.6655640006065369, 0.3865315616130829, 0.5040453672409058, -0.7723621726036072, 0.059562601149082184, -1.0620479583740234, -0.7465000152587891, -0.1588873416185379, -0.47122257947921753, -0.4652928411960602, -0.8564789891242981, 0.629843533039093, 0.32548627257347107, -0.25753703713417053, 0.5209420919418335, -1.004595398902893, 0.33535993099212646, 0.5684122443199158, 0.2169867902994156, -0.27282485365867615, 0.27662137150764465, 0.19389693439006805, -0.035841021686792374, -0.6627112627029419, -0.3133832812309265, 0.5950407981872559, 0.6291775107383728, 0.4551997482776642, -0.17425483465194702, 0.4274205267429352, -0.1918233036994934, -0.1548999845981598, -0.7757537364959717, 0.4626753330230713, -0.026788566261529922, -0.6075525879859924, -0.26237815618515015, -0.04517816752195358, -0.7918161153793335, 0.34977787733078003, -0.08442787826061249, -1.0911349058151245, 0.5517392158508301, -0.020388323813676834, -0.44160768389701843, 0.37034863233566284, -0.6771285533905029, 1.160582423210144, 0.050221122801303864, -0.2727934420108795, 0.027742471545934677, -0.8547269701957703, 0.40833425521850586, 0.07616766542196274, -0.0947219729423523, -0.2620619237422943, 0.1771588921546936, 1.162514328956604, -0.433292955160141, 0.8569739460945129, -0.36655744910240173, 0.23756007850170135, 0.5001856088638306, -0.14865818619728088, 0.3275214731693268, 0.04074052721261978, 0.14449584484100342, 0.5566737055778503, 0.2829136252403259, -0.5472482442855835, -0.5673848390579224, 0.4421974718570709, -0.9784430861473083, -0.28247106075286865, -0.2917480170726776, -0.45974645018577576, 0.13428020477294922, 0.1220446527004242, 0.6360694169998169, 0.46548330783843994, 0.1462835967540741, -0.0642387792468071, 0.6552895307540894, -0.038265470415353775, 0.47850802540779114, 0.0916912630200386, -0.2616845369338989, -0.5963788032531738, 0.6835458278656006, 0.032948706299066544, 0.20011325180530548, 0.2805841863155365, 0.31076833605766296, -0.4403879940509796, -0.10556462407112122, -0.6058794856071472, 0.27079838514328003, -0.5646629333496094, -0.3584713339805603, -0.824665367603302, -0.4418170750141144, -0.7580090761184692, -0.3514634072780609, -0.5145316123962402, -0.577239990234375, -0.1691589653491974, 0.07707291096448898, 0.4523875415325165, 0.6171566247940063, -0.2277119755744934, 0.38209906220436096, -0.35439881682395935, 0.2989687919616699, 0.5079337954521179, 0.17465302348136902, -0.22784475982189178, -0.41396811604499817, -0.1081245020031929, -0.05804680287837982, -0.3674589693546295, -0.6882638931274414, 0.2522503137588501, -0.08196648955345154, 0.23259584605693817, 0.47498103976249695, -0.15184788405895233, 0.6928930282592773, -0.1265765130519867, 0.7265469431877136, 0.3585245907306671, -0.7226887345314026, 0.7885568737983704, -0.18858370184898376, 0.4551889896392822, 0.3733924925327301, 0.15816569328308105, -0.5257644653320312, -0.1395966112613678, -0.6276343464851379, -0.8883025646209717, 1.181846022605896, 0.23165680468082428, -0.17131756246089935, 0.1926138997077942, 0.449400395154953, -0.03059576079249382, 0.009781510569155216, -0.7009775042533875, -0.2530811131000519, -0.48351532220840454, 0.032781824469566345, 0.06528856605291367, -0.6286126375198364, -0.11185029149055481, -0.5383242964744568, 0.5941908955574036, 0.029423819854855537, 0.5365852117538452, 0.4956526756286621, -0.13730138540267944, -0.13685542345046997, -0.3778904676437378, 0.575524091720581, 0.550361692905426, -0.26160165667533875, 0.17475786805152893, 0.13000670075416565, -0.6430557370185852, -0.1657848358154297, 0.28438979387283325, -0.3505118489265442, -0.0583055205643177, 0.3164501190185547, 1.053704023361206, 0.06604497134685516, -0.3154802918434143, 0.5980847477912903, 0.17491109669208527, -0.39978837966918945, -0.4663311243057251, -0.012584262527525425, -0.056604545563459396, 0.4338253140449524, 0.16329394280910492, 0.3903968334197998, 0.3587597608566284, -0.31158024072647095, 0.19105322659015656, 0.2651156187057495, -0.5907079577445984, -0.27776026725769043, 0.7479560971260071, -0.03208658844232559, -0.052367329597473145, 0.5249778032302856, -0.2973604202270508, -0.9147779941558838, 0.910298764705658, 0.6468548774719238, 0.8775243163108826, -0.22064553201198578, 0.18527618050575256, 0.8080658912658691, 0.2152511030435562, 0.06552468240261078, -0.025073615834116936, -0.1880887895822525, -0.49055179953575134, -0.281173974275589, -0.8140999674797058, -0.08479437232017517, 0.10065890103578568, -0.5245606899261475, 0.3150726854801178, -0.5774002075195312, -0.041913826018571854, 0.05504439026117325, 0.2266302853822708, -0.7709207534790039, 0.4726015627384186, 0.31471410393714905, 0.97416752576828, -0.7710855603218079, 0.6699498295783997, 0.9848547577857971, -0.2261638194322586, -0.782774031162262, -0.27913179993629456, 0.10080324858427048, -0.949129581451416, 0.4529128968715668, 0.6550417542457581, -0.0748688280582428, -0.11930588632822037, -0.5210584998130798, -0.9341515898704529, 1.314772129058838, 0.1933298259973526, -0.40399038791656494, -0.06094491109251976, 0.2696739435195923, 0.27051347494125366, -0.46807312965393066, 0.49351176619529724, 0.5688183903694153, 0.5234651565551758, 0.6335060000419617, -0.701339602470398, 0.2164766937494278, -0.18451061844825745, 0.31281015276908875, -0.00011323289072606713, -0.7949650287628174, 0.7509763240814209, -0.30667218565940857, -0.08920001983642578, 0.0320252850651741, 0.5883045196533203, 0.25648191571235657, 0.4409085512161255, 0.6260929107666016, 0.8599258661270142, 0.5540664196014404, -0.26662853360176086, 0.9388233423233032, -0.020638372749090195, 0.5279417634010315, 0.7523783445358276, 0.25115513801574707, 0.6076894402503967, 0.2195681482553482, -0.013414258137345314, 0.6173596978187561, 0.9828138947486877, -0.38084906339645386, 0.6024520993232727, 0.10185517370700836, -0.01446491852402687, -0.2462797909975052, -0.0365523099899292, -0.28741130232810974, 0.8186447024345398, 0.1058603823184967, -0.19932110607624054, -0.3395247757434845, 0.21957087516784668, 0.05524731054902077, -0.3440113067626953, -0.2723058760166168, 0.814567506313324, -0.08168832957744598, -0.5486405491828918, 0.5316559076309204, 0.303047776222229, 0.5955151319503784, -0.531834602355957, -0.02285962738096714, -0.021577958017587662, 0.15113654732704163, -0.45815688371658325, -0.8009512424468994, 0.6695315837860107, -0.27435752749443054, -0.31914034485816956, -0.0652184933423996, 0.8905549049377441, -0.47086605429649353, -0.7151907086372375, 0.2528265714645386, -0.07541168481111526, 0.39144596457481384, -0.3505316376686096, -0.8653606176376343, 0.3596070408821106, 0.007245742715895176, -0.2981874942779541, 0.16562755405902863, 0.13648585975170135, -0.1784985065460205, 0.35213717818260193, 0.6205095648765564, -0.35353517532348633, -0.0833764523267746, -0.0866202786564827, 0.9859612584114075, -0.42552921175956726, -0.49538618326187134, -0.6730115413665771, 0.5989752411842346, -0.2309093475341797, -0.20201998949050903, 0.5537309646606445, 0.9646764993667603, 0.9204014539718628, -0.09685221314430237, 0.43077996373176575, -0.0877235010266304, 0.1848616898059845, -0.36845773458480835, 0.5789074897766113, -0.42276033759117126, -0.17899790406227112, -0.24098356068134308, -1.1081559658050537, -0.32230469584465027, 0.9176759719848633, -0.5541506409645081, 0.07979660481214523, 0.5251559019088745, 0.9615421295166016, -0.2315102368593216, -0.21110624074935913, 0.10282193124294281, -0.049248602241277695, 0.26449674367904663, 0.61576247215271, 0.3733005225658417, -0.6871793270111084, 0.4598653018474579, -0.7677388787269592, -0.5131070017814636, -0.23394286632537842, -0.3056139051914215, -0.9121208786964417, -0.7871305346488953, -0.4805835783481598, -0.4862200617790222, -0.10023493319749832, 0.5185619592666626, 1.335046410560608, -0.7911359071731567, -0.0569412037730217, -0.0976371169090271, 0.010472872294485569, -0.0291652362793684, -0.31053391098976135, 0.6830962896347046, -0.05454269051551819, -0.8689523935317993, -0.10477227717638016, 0.4143673777580261, 0.023446915671229362, -0.23370517790317535, 0.004574189428240061, 0.06827174127101898, -0.12655511498451233, 0.7758164405822754, 0.19565396010875702, -0.7945495843887329, -0.3160930573940277, -0.13542622327804565, -0.182683527469635, 0.16240057349205017, 0.5320258140563965, -0.8161063194274902, 0.5606960654258728, 0.32281291484832764, 0.28968456387519836, 1.1108587980270386, -0.06656459718942642, 0.04150046780705452, -0.51650470495224, 0.37854287028312683, 0.1065497174859047, 0.3517686426639557, 0.4598102271556854, -0.4901990294456482, 0.518657922744751, 0.4298085570335388, -0.5607969760894775, -0.3821188509464264, 0.3168342411518097, -1.3401250839233398, -0.18883585929870605, 1.1393471956253052, -0.04078400880098343, -0.6434058547019958, 0.1844361126422882, -0.45871347188949585, 0.3123527467250824, -0.18987339735031128, 0.7403160929679871, 0.23731589317321777, -0.28428030014038086, -0.3126733899116516, -0.34949612617492676, 0.6283978223800659, 0.08044157922267914, -0.7038268446922302, -0.38981813192367554, 0.497911274433136, 0.5954787731170654, 0.31923532485961914, 0.6107736825942993, -0.37231147289276123, 0.42439568042755127, 0.1302834004163742, 0.321455717086792, -0.22010241448879242, -0.21445530652999878, -0.21249175071716309, 0.12593229115009308, -0.33414226770401, -0.515607476234436 ]
ml6team/keyphrase-extraction-kbir-inspec
ml6team
"2023-05-06T08:46:52Z"
28,714
82
transformers
[ "transformers", "pytorch", "roberta", "token-classification", "keyphrase-extraction", "en", "dataset:midas/inspec", "arxiv:2112.08547", "license:mit", "model-index", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
token-classification
"2022-03-29T13:14:21Z"
--- language: en license: mit tags: - keyphrase-extraction datasets: - midas/inspec metrics: - seqeval widget: - text: "Keyphrase extraction is a technique in text analysis where you extract the important keyphrases from a document. Thanks to these keyphrases humans can understand the content of a text very quickly and easily without reading it completely. Keyphrase extraction was first done primarily by human annotators, who read the text in detail and then wrote down the most important keyphrases. The disadvantage is that if you work with a lot of documents, this process can take a lot of time. Here is where Artificial Intelligence comes in. Currently, classical machine learning methods, that use statistical and linguistic features, are widely used for the extraction process. Now with deep learning, it is possible to capture the semantic meaning of a text even better than these classical methods. Classical methods look at the frequency, occurrence and order of words in the text, whereas these neural approaches can capture long-term semantic dependencies and context of words in a text." example_title: "Example 1" - text: "In this work, we explore how to learn task specific language models aimed towards learning rich representation of keyphrases from text documents. We experiment with different masking strategies for pre-training transformer language models (LMs) in discriminative as well as generative settings. In the discriminative setting, we introduce a new pre-training objective - Keyphrase Boundary Infilling with Replacement (KBIR), showing large gains in performance (up to 9.26 points in F1) over SOTA, when LM pre-trained using KBIR is fine-tuned for the task of keyphrase extraction. In the generative setting, we introduce a new pre-training setup for BART - KeyBART, that reproduces the keyphrases related to the input text in the CatSeq format, instead of the denoised original input. This also led to gains in performance (up to 4.33 points inF1@M) over SOTA for keyphrase generation. Additionally, we also fine-tune the pre-trained language models on named entity recognition(NER), question answering (QA), relation extraction (RE), abstractive summarization and achieve comparable performance with that of the SOTA, showing that learning rich representation of keyphrases is indeed beneficial for many other fundamental NLP tasks." example_title: "Example 2" model-index: - name: DeDeckerThomas/keyphrase-extraction-kbir-inspec results: - task: type: keyphrase-extraction name: Keyphrase Extraction dataset: type: midas/inspec name: inspec metrics: - type: F1 (Seqeval) value: 0.588 name: F1 (Seqeval) - type: F1@M value: 0.564 name: F1@M --- # 🔑 Keyphrase Extraction Model: KBIR-inspec Keyphrase extraction is a technique in text analysis where you extract the important keyphrases from a document. Thanks to these keyphrases humans can understand the content of a text very quickly and easily without reading it completely. Keyphrase extraction was first done primarily by human annotators, who read the text in detail and then wrote down the most important keyphrases. The disadvantage is that if you work with a lot of documents, this process can take a lot of time ⏳. Here is where Artificial Intelligence 🤖 comes in. Currently, classical machine learning methods, that use statistical and linguistic features, are widely used for the extraction process. Now with deep learning, it is possible to capture the semantic meaning of a text even better than these classical methods. Classical methods look at the frequency, occurrence and order of words in the text, whereas these neural approaches can capture long-term semantic dependencies and context of words in a text. ## 📓 Model Description This model uses [KBIR](https://huggingface.co/bloomberg/KBIR) as its base model and fine-tunes it on the [Inspec dataset](https://huggingface.co/datasets/midas/inspec). KBIR or Keyphrase Boundary Infilling with Replacement is a pre-trained model which utilizes a multi-task learning setup for optimizing a combined loss of Masked Language Modeling (MLM), Keyphrase Boundary Infilling (KBI) and Keyphrase Replacement Classification (KRC). You can find more information about the architecture in this [paper](https://arxiv.org/abs/2112.08547). Keyphrase extraction models are transformer models fine-tuned as a token classification problem where each word in the document is classified as being part of a keyphrase or not. | Label | Description | | ----- | ------------------------------- | | B-KEY | At the beginning of a keyphrase | | I-KEY | Inside a keyphrase | | O | Outside a keyphrase | Kulkarni, Mayank, Debanjan Mahata, Ravneet Arora, and Rajarshi Bhowmik. "Learning Rich Representation of Keyphrases from Text." arXiv preprint arXiv:2112.08547 (2021). Sahrawat, Dhruva, Debanjan Mahata, Haimin Zhang, Mayank Kulkarni, Agniv Sharma, Rakesh Gosangi, Amanda Stent, Yaman Kumar, Rajiv Ratn Shah, and Roger Zimmermann. "Keyphrase extraction as sequence labeling using contextualized embeddings." In European Conference on Information Retrieval, pp. 328-335. Springer, Cham, 2020. ## ✋ Intended Uses & Limitations ### 🛑 Limitations * This keyphrase extraction model is very domain-specific and will perform very well on abstracts of scientific papers. It's not recommended to use this model for other domains, but you are free to test it out. * Only works for English documents. ### ❓ How To Use ```python from transformers import ( TokenClassificationPipeline, AutoModelForTokenClassification, AutoTokenizer, ) from transformers.pipelines import AggregationStrategy import numpy as np # Define keyphrase extraction pipeline class KeyphraseExtractionPipeline(TokenClassificationPipeline): def __init__(self, model, *args, **kwargs): super().__init__( model=AutoModelForTokenClassification.from_pretrained(model), tokenizer=AutoTokenizer.from_pretrained(model), *args, **kwargs ) def postprocess(self, all_outputs): results = super().postprocess( all_outputs=all_outputs, aggregation_strategy=AggregationStrategy.SIMPLE, ) return np.unique([result.get("word").strip() for result in results]) ``` ```python # Load pipeline model_name = "ml6team/keyphrase-extraction-kbir-inspec" extractor = KeyphraseExtractionPipeline(model=model_name) ``` ```python # Inference text = """ Keyphrase extraction is a technique in text analysis where you extract the important keyphrases from a document. Thanks to these keyphrases humans can understand the content of a text very quickly and easily without reading it completely. Keyphrase extraction was first done primarily by human annotators, who read the text in detail and then wrote down the most important keyphrases. The disadvantage is that if you work with a lot of documents, this process can take a lot of time. Here is where Artificial Intelligence comes in. Currently, classical machine learning methods, that use statistical and linguistic features, are widely used for the extraction process. Now with deep learning, it is possible to capture the semantic meaning of a text even better than these classical methods. Classical methods look at the frequency, occurrence and order of words in the text, whereas these neural approaches can capture long-term semantic dependencies and context of words in a text. """.replace("\n", " ") keyphrases = extractor(text) print(keyphrases) ``` ``` # Output ['Artificial Intelligence' 'Keyphrase extraction' 'deep learning' 'linguistic features' 'machine learning' 'semantic meaning' 'text analysis'] ``` ## 📚 Training Dataset [Inspec](https://huggingface.co/datasets/midas/inspec) is a keyphrase extraction/generation dataset consisting of 2000 English scientific papers from the scientific domains of Computers and Control and Information Technology published between 1998 to 2002. The keyphrases are annotated by professional indexers or editors. You can find more information in the [paper](https://dl.acm.org/doi/10.3115/1119355.1119383). ## 👷‍♂️ Training Procedure ### Training Parameters | Parameter | Value | | --------- | ------| | Learning Rate | 1e-4 | | Epochs | 50 | | Early Stopping Patience | 3 | ### Preprocessing The documents in the dataset are already preprocessed into list of words with the corresponding labels. The only thing that must be done is tokenization and the realignment of the labels so that they correspond with the right subword tokens. ```python from datasets import load_dataset from transformers import AutoTokenizer # Labels label_list = ["B", "I", "O"] lbl2idx = {"B": 0, "I": 1, "O": 2} idx2label = {0: "B", 1: "I", 2: "O"} # Tokenizer tokenizer = AutoTokenizer.from_pretrained("bloomberg/KBIR", add_prefix_space=True) max_length = 512 # Dataset parameters dataset_full_name = "midas/inspec" dataset_subset = "raw" dataset_document_column = "document" dataset_biotags_column = "doc_bio_tags" def preprocess_fuction(all_samples_per_split): tokenized_samples = tokenizer.batch_encode_plus( all_samples_per_split[dataset_document_column], padding="max_length", truncation=True, is_split_into_words=True, max_length=max_length, ) total_adjusted_labels = [] for k in range(0, len(tokenized_samples["input_ids"])): prev_wid = -1 word_ids_list = tokenized_samples.word_ids(batch_index=k) existing_label_ids = all_samples_per_split[dataset_biotags_column][k] i = -1 adjusted_label_ids = [] for wid in word_ids_list: if wid is None: adjusted_label_ids.append(lbl2idx["O"]) elif wid != prev_wid: i = i + 1 adjusted_label_ids.append(lbl2idx[existing_label_ids[i]]) prev_wid = wid else: adjusted_label_ids.append( lbl2idx[ f"{'I' if existing_label_ids[i] == 'B' else existing_label_ids[i]}" ] ) total_adjusted_labels.append(adjusted_label_ids) tokenized_samples["labels"] = total_adjusted_labels return tokenized_samples # Load dataset dataset = load_dataset(dataset_full_name, dataset_subset) # Preprocess dataset tokenized_dataset = dataset.map(preprocess_fuction, batched=True) ``` ### Postprocessing (Without Pipeline Function) If you do not use the pipeline function, you must filter out the B and I labeled tokens. Each B and I will then be merged into a keyphrase. Finally, you need to strip the keyphrases to make sure all unnecessary spaces have been removed. ```python # Define post_process functions def concat_tokens_by_tag(keyphrases): keyphrase_tokens = [] for id, label in keyphrases: if label == "B": keyphrase_tokens.append([id]) elif label == "I": if len(keyphrase_tokens) > 0: keyphrase_tokens[len(keyphrase_tokens) - 1].append(id) return keyphrase_tokens def extract_keyphrases(example, predictions, tokenizer, index=0): keyphrases_list = [ (id, idx2label[label]) for id, label in zip( np.array(example["input_ids"]).squeeze().tolist(), predictions[index] ) if idx2label[label] in ["B", "I"] ] processed_keyphrases = concat_tokens_by_tag(keyphrases_list) extracted_kps = tokenizer.batch_decode( processed_keyphrases, skip_special_tokens=True, clean_up_tokenization_spaces=True, ) return np.unique([kp.strip() for kp in extracted_kps]) ``` ## 📝 Evaluation Results Traditional evaluation methods are the precision, recall and F1-score @k,m where k is the number that stands for the first k predicted keyphrases and m for the average amount of predicted keyphrases. The model achieves the following results on the Inspec test set: | Dataset | P@5 | R@5 | F1@5 | P@10 | R@10 | F1@10 | P@M | R@M | F1@M | |:-----------------:|:----:|:----:|:----:|:----:|:----:|:-----:|:----:|:----:|:----:| | Inspec Test Set | 0.53 | 0.47 | 0.46 | 0.36 | 0.58 | 0.41 | 0.58 | 0.60 | 0.56 | ## 🚨 Issues Please feel free to start discussions in the Community Tab.
[ -0.13500462472438812, -0.6916205883026123, 0.2727787494659424, 0.06103690713644028, -0.4337180554866791, 0.2038486897945404, -0.17822566628456116, -0.2469719648361206, 0.07944101095199585, 0.2910485565662384, -0.35190054774284363, -0.5918396711349487, -0.858539879322052, 0.37091806530952454, -0.3201334476470947, 0.9325792193412781, 0.04470609128475189, 0.04469204321503639, -0.02253645658493042, -0.05951286852359772, -0.19218599796295166, -0.5556291341781616, -0.33791258931159973, -0.3624444007873535, 0.13323308527469635, 0.38908740878105164, 0.43549248576164246, 0.7875947952270508, 0.7311961054801941, 0.3892134130001068, -0.28564128279685974, 0.0678911805152893, -0.17932407557964325, 0.16686508059501648, -0.05599948391318321, -0.3934774398803711, -0.15373356640338898, 0.20019255578517914, 0.5361523032188416, 0.46476781368255615, 0.22426030039787292, 0.1022055372595787, 0.08083499222993851, 0.6215351819992065, -0.47772616147994995, 0.2878578305244446, -0.784166693687439, -0.02319425903260708, -0.34517842531204224, -0.11547116190195084, -0.12682072818279266, -0.2767263352870941, 0.19416123628616333, -0.44653332233428955, 0.11096400767564774, -0.031248126178979874, 1.0629425048828125, 0.132812038064003, -0.22447562217712402, -0.6554505825042725, -0.3331588804721832, 0.6256691217422485, -1.1102230548858643, 0.2197662889957428, 0.33186084032058716, -0.06847883015871048, -0.23908992111682892, -1.1428946256637573, -0.8482986688613892, -0.12536311149597168, -0.18255490064620972, 0.18904173374176025, 0.1728263646364212, 0.08699814230203629, 0.22685204446315765, 0.374132364988327, -0.582366943359375, 0.030128542333841324, -0.637636661529541, -0.2865655720233917, 0.6092968583106995, 0.03843759000301361, 0.23762720823287964, -0.5144508481025696, -0.1846587061882019, -0.4238315224647522, -0.29083332419395447, 0.22278830409049988, -0.01758010871708393, 0.32551541924476624, 0.06784597784280777, 0.5256351232528687, -0.19698698818683624, 0.36561107635498047, 0.044145334511995316, -0.3283008337020874, 0.5565361380577087, -0.5851078033447266, -0.3329484760761261, 0.28460440039634705, 1.0787782669067383, 0.13465343415737152, 0.11012064665555954, -0.31872788071632385, -0.0685744434595108, 0.05081263557076454, -0.03446408733725548, -0.9852070808410645, -0.24341616034507751, 0.43601369857788086, -0.6892558336257935, -0.3909628391265869, 0.14705385267734528, -0.9081256985664368, -0.13128459453582764, -0.08934948593378067, 0.6422169208526611, -0.6820492744445801, 0.14936676621437073, -0.14550189673900604, -0.5618248581886292, 0.3138234317302704, -0.1675078123807907, -0.7440980672836304, 0.10146117955446243, 0.6484957337379456, 1.0215046405792236, -0.1585453897714615, -0.24773374199867249, -0.29577577114105225, 0.02633131481707096, -0.10321405529975891, 0.5526221394538879, -0.5962713956832886, -0.4823472499847412, -0.34355005621910095, 0.16991709172725677, -0.2784087657928467, -0.517961323261261, 0.5466066598892212, -0.5424936413764954, 0.2856038808822632, -0.05969642847776413, -0.8828543424606323, -0.18894195556640625, 0.08492154628038406, -0.391078919172287, 0.9758458733558655, 0.08183509111404419, -0.742091953754425, 0.28208646178245544, -0.8347499966621399, -0.6099860668182373, 0.2518540620803833, -0.038330040872097015, -0.5093716382980347, -0.09855744242668152, 0.334525465965271, 0.5652247667312622, -0.20154500007629395, 0.15168726444244385, -0.19149842858314514, -0.3199527859687805, 0.5189419984817505, -0.13340769708156586, 0.9761786460876465, 0.4430885910987854, -0.6556954979896545, -0.1284172236919403, -0.7425645589828491, 0.18319864571094513, 0.02626749314367771, -0.4917609393596649, -0.27684858441352844, -0.06462612003087997, 0.14400243759155273, 0.32144632935523987, 0.22241638600826263, -0.626105785369873, 0.3451286256313324, -0.7329288125038147, 0.836089015007019, 0.7662187218666077, 0.21496744453907013, 0.510101318359375, -0.034611206501722336, 0.37680670619010925, -0.02283496968448162, -0.06621666252613068, -0.2181105762720108, -0.46240031719207764, -0.4205874800682068, -0.48462551832199097, 0.633388102054596, 0.7365843653678894, -0.421076238155365, 0.7470378875732422, -0.4193308353424072, -0.6559760570526123, -0.6088120341300964, 0.19122479856014252, 0.38251617550849915, 0.5435521602630615, 0.4577800929546356, -0.2569463551044464, -0.5096941590309143, -0.6716645956039429, -0.3206256031990051, 0.054213546216487885, 0.07280294597148895, 0.1505557894706726, 0.8512812256813049, -0.36817240715026855, 0.8861268162727356, -0.5528689026832581, -0.37981319427490234, -0.3111511766910553, 0.3080904483795166, 0.517151415348053, 0.5579925775527954, 0.23016704618930817, -0.9237321615219116, -0.7160720825195312, -0.08548770099878311, -0.6715704798698425, -0.07970272749662399, -0.161408931016922, -0.06706219166517258, 0.04319067671895027, 0.828372597694397, -0.5701548457145691, 0.3205588459968567, 0.07264124602079391, -0.232198566198349, 0.3383045792579651, -0.26252809166908264, 0.02052304893732071, -1.3438801765441895, 0.3762863278388977, -0.19795776903629303, 0.1828673630952835, -0.5766345858573914, 0.08696029335260391, 0.2005188912153244, -0.17433181405067444, -0.3240646719932556, 0.6198705434799194, -0.535132110118866, 0.2545611262321472, -0.22895179688930511, 0.06034770607948303, -0.016677260398864746, 0.5012891888618469, -0.10512088239192963, 0.6828482747077942, 0.3368974030017853, -0.7022298574447632, 0.2048536241054535, 0.436764657497406, -0.31176620721817017, 0.1342533528804779, -0.672452449798584, 0.0873483195900917, -0.18730299174785614, 0.19656488299369812, -1.2513957023620605, -0.12107966840267181, 0.3984324336051941, -0.6961168050765991, 0.336944043636322, 0.16243411600589752, -0.5775688290596008, -0.45556730031967163, -0.37539589405059814, 0.09710939973592758, 0.576766312122345, -0.21558120846748352, 0.4337770342826843, 0.42621374130249023, -0.19329819083213806, -0.4141853153705597, -0.7179696559906006, 0.1263381391763687, -0.18018865585327148, -0.310773640871048, 0.6183373332023621, -0.014915638603270054, -0.12307540327310562, 0.03736595809459686, -0.07985726743936539, -0.17299120128154755, 0.20276673138141632, 0.26600268483161926, 0.09286613762378693, 0.11552437394857407, 0.17934004962444305, 0.09809523075819016, -0.2130468785762787, -0.07761994749307632, -0.25458163022994995, 0.5143523812294006, -0.03733595833182335, 0.14860469102859497, -0.572799026966095, 0.4234527349472046, 0.8197177648544312, -0.4270128905773163, 0.6614099740982056, 0.6120921969413757, -0.3074084520339966, 0.3028937578201294, -0.2710723876953125, -0.22609372437000275, -0.48710957169532776, 0.5330007672309875, -0.27640244364738464, -0.5090317130088806, 0.3293344974517822, -0.06773768365383148, 0.17585809528827667, 0.7837448716163635, 0.5611387491226196, -0.24584068357944489, 0.9049423933029175, 0.4367961287498474, -0.3910979926586151, 0.35371825098991394, -0.6085650324821472, 0.45041966438293457, -0.7577406167984009, -0.3635769784450531, -0.739918053150177, -0.4252941310405731, -0.6611786484718323, -0.2121565341949463, 0.3617471158504486, 0.12577517330646515, 0.017001524567604065, 0.32793790102005005, -0.7226154208183289, 0.10658851265907288, 0.6931051015853882, 0.04017072543501854, -0.04394013434648514, 0.09016615897417068, -0.4023614823818207, -0.07752686738967896, -0.5935502052307129, -0.42886096239089966, 1.1735950708389282, 0.1840374618768692, 0.3859371244907379, -0.2662276327610016, 0.8063368797302246, 0.3352605104446411, 0.2085314393043518, -0.7792576551437378, 0.5373112559318542, -0.22386714816093445, -0.5826151967048645, -0.3701668977737427, -0.17588527500629425, -1.0401051044464111, 0.3022935092449188, -0.29921960830688477, -0.7552077174186707, 0.2516956031322479, -0.10233622044324875, -0.37378761172294617, 0.12646928429603577, -0.6089054346084595, 0.9588819742202759, -0.260215163230896, -0.023175448179244995, -0.13351497054100037, -1.0451098680496216, 0.08540092408657074, -0.19418881833553314, 0.3233472406864166, 0.044167112559080124, -0.000380457378923893, 1.1580133438110352, -0.7857890129089355, 0.5148389935493469, -0.10087250918149948, 0.3227121829986572, 0.2562094032764435, -0.3757675886154175, 0.6023620963096619, -0.3997083902359009, -0.17564480006694794, 0.1019768938422203, 0.14982011914253235, -0.2094087451696396, -0.3712237775325775, 0.40279287099838257, -0.6985239386558533, -0.1683877408504486, -0.5191765427589417, -0.35078656673431396, 0.039128270000219345, 0.41329655051231384, 0.7174878120422363, 0.2865109145641327, 0.06268208473920822, 0.4126168191432953, 0.5965999364852905, -0.2313862144947052, 0.740949273109436, 0.17319054901599884, 0.20702823996543884, -0.8079684376716614, 0.8436661958694458, 0.34522950649261475, -0.004888164345175028, 0.6353399753570557, 0.3805674612522125, -0.4385802745819092, -0.49849021434783936, -0.04625953361392021, 0.2444188892841339, -0.6180641055107117, -0.2589293122291565, -1.0711658000946045, -0.40735357999801636, -0.9314438104629517, -0.12096953392028809, -0.050186172127723694, -0.44397202134132385, -0.3510788083076477, -0.05771305412054062, 0.48575684428215027, 0.2924875020980835, -0.1862465739250183, 0.6096041798591614, -1.002722978591919, 0.4423941671848297, 0.1313512921333313, -0.21422535181045532, -0.010894878767430782, -0.6099726557731628, -0.33804020285606384, 0.04091465100646019, -0.3545405864715576, -1.1110204458236694, 0.6810765862464905, 0.45647215843200684, 0.5734847784042358, 0.4175805151462555, 0.013002966530621052, 0.6764000058174133, -0.3144305944442749, 0.7977572679519653, -0.11497524380683899, -0.9583448767662048, 0.49979886412620544, 0.12407193332910538, 0.41590943932533264, 0.7671682834625244, 0.5079261660575867, -0.6873695254325867, -0.43800851702690125, -0.7557175159454346, -1.271141529083252, 0.6093331575393677, 0.3172943592071533, -0.09627125412225723, -0.0778564065694809, 0.5177657604217529, 0.03614756464958191, 0.35281118750572205, -0.6071223020553589, -0.42152395844459534, -0.20435862243175507, -0.48247694969177246, -0.18781031668186188, -0.26536551117897034, 0.2579343318939209, -0.5375954508781433, 0.9548869729042053, 0.041580650955438614, 0.38752564787864685, 0.48573291301727295, -0.44919368624687195, 0.3236164450645447, 0.2784815728664398, 0.4350963830947876, 0.34815776348114014, -0.273273229598999, 0.009101499803364277, 0.053467314690351486, -0.8047506213188171, 0.03415261209011078, 0.3196623921394348, -0.2282353639602661, 0.10409733653068542, 0.4927031993865967, 0.5377102494239807, 0.055057063698768616, -0.6722741723060608, 0.4777095317840576, 0.016566086560487747, -0.3594285249710083, -0.11219203472137451, -0.14929577708244324, -0.042299214750528336, 0.27326157689094543, 0.6680620908737183, -0.10831493139266968, 0.21295160055160522, -0.560977041721344, 0.36876580119132996, 0.5481802225112915, -0.1730780303478241, -0.10833500325679779, 0.7265573740005493, -0.018235165625810623, -0.415648877620697, 0.847306489944458, -0.11974503099918365, -0.9045841097831726, 0.6971313953399658, 0.4303601384162903, 1.1073039770126343, 0.005236903205513954, 0.12119501829147339, 0.4289325773715973, 0.36389413475990295, 0.14391760528087616, 0.2550496459007263, -0.32980260252952576, -0.5497385859489441, -0.07556410878896713, -0.762931227684021, -0.05837063491344452, 0.3027323782444, -0.2556914985179901, -0.09558776766061783, -0.4092094898223877, -0.1915198415517807, 0.21159802377223969, 0.3513863682746887, -0.5711350440979004, 0.2921259105205536, -0.06201285496354103, 0.810903012752533, -0.9177202582359314, 0.77302485704422, 0.5227296352386475, -0.5064035058021545, -0.7286573648452759, 0.027667047455906868, -0.2854916453361511, -0.6181641817092896, 0.8146316409111023, 0.40086132287979126, 0.39817559719085693, 0.08058653026819229, -0.5880245566368103, -0.9535424709320068, 1.0906248092651367, -0.1585940569639206, -0.3896584212779999, -0.20390546321868896, 0.20487485826015472, 0.5336447358131409, -0.17365995049476624, 0.08741090446710587, 0.5496769547462463, 0.6425498723983765, -0.069226935505867, -0.6229910254478455, 0.16004453599452972, -0.4243011176586151, -0.032116420567035675, 0.09273475408554077, -0.46808913350105286, 0.8158140778541565, 0.03694324195384979, -0.08527843654155731, 0.14927999675273895, 0.7467783689498901, 0.14245295524597168, 0.2835635244846344, 0.2385031282901764, 0.6217753887176514, 0.8846924901008606, 0.13596002757549286, 0.7752997279167175, -0.47982633113861084, 0.27373409271240234, 0.8986929655075073, 0.02602527104318142, 0.7621189951896667, 0.6093199849128723, -0.16180403530597687, 0.37290138006210327, 0.7743450999259949, -0.23796862363815308, 0.832279622554779, 0.030412742868065834, -0.043343812227249146, 0.17151740193367004, 0.2734377980232239, -0.49149876832962036, 0.5074513554573059, 0.47193196415901184, -0.7863121032714844, -0.1767812967300415, 0.08534186333417892, 0.1530430018901825, -0.2082986980676651, -0.15753549337387085, 0.8416315913200378, 0.11196465790271759, -0.6478301882743835, 0.5131909847259521, 0.21642263233661652, 0.7875570058822632, -0.5974805951118469, 0.10354575514793396, -0.06143307313323021, 0.3904311954975128, -0.1238960325717926, -0.4467675983905792, 0.16760119795799255, -0.21281594038009644, -0.17831799387931824, -0.21248218417167664, 0.6472171545028687, -0.45663222670555115, -0.6360114812850952, 0.08837034553289413, 0.1738729476928711, 0.35947203636169434, -0.1490255892276764, -0.9865537285804749, -0.18088319897651672, 0.04389101266860962, -0.29753416776657104, 0.18137907981872559, 0.35164088010787964, 0.1585523784160614, 0.38325148820877075, 0.72435462474823, 0.18139813840389252, 0.15995092689990997, -0.4688068628311157, 0.708119809627533, -0.69829261302948, -0.5693091750144958, -1.1481730937957764, 0.39321649074554443, -0.31950002908706665, -0.377777636051178, 0.7658701539039612, 0.722527801990509, 0.6128533482551575, -0.13145530223846436, 0.9252094030380249, -0.2522098422050476, 0.4099310040473938, -0.44589823484420776, 0.8516858220100403, -0.5145983695983887, -0.12990888953208923, -0.47875532507896423, -0.7248529195785522, -0.24484477937221527, 0.6824342608451843, -0.12150830030441284, -0.16780295968055725, 0.7340990304946899, 0.9209215044975281, 0.08420566469430923, -0.20378145575523376, -0.11058833450078964, 0.36568984389305115, 0.4290367066860199, 0.3314359188079834, 0.18427006900310516, -0.7860334515571594, 0.5054253339767456, -0.471375435590744, -0.2431975156068802, -0.35672715306282043, -0.7598508596420288, -0.6247036457061768, -0.784552812576294, -0.2960242033004761, -0.43263959884643555, 0.05547008290886879, 0.9582036137580872, 0.38396865129470825, -0.7729042172431946, -0.1244191974401474, -0.1369018703699112, 0.17905502021312714, -0.3319261372089386, -0.32475951313972473, 0.7073730230331421, -0.4778410494327545, -0.6247242093086243, 0.32559746503829956, 0.19294092059135437, 0.0756770446896553, 0.17345908284187317, 0.0801481306552887, -0.6181483864784241, 0.0676625594496727, 0.5516935586929321, 0.44614553451538086, -0.47071993350982666, 0.09885329753160477, 0.07748993486166, -0.2896934151649475, 0.18067137897014618, 0.5718996524810791, -0.6676424145698547, 0.42669373750686646, 0.822206974029541, 0.7788323163986206, 0.5395927429199219, -0.07634905725717545, 0.3722999393939972, -0.33788958191871643, 0.055183857679367065, 0.0921625941991806, 0.23333866894245148, 0.1667613834142685, -0.425783634185791, 0.42338478565216064, 0.5806500315666199, -0.5610882043838501, -0.8080902099609375, -0.23891416192054749, -0.8388757109642029, -0.5770546793937683, 0.9767300486564636, 0.014679836109280586, -0.49988508224487305, -0.051296666264534, -0.24278303980827332, 0.5381948947906494, -0.28682655096054077, 0.8069201707839966, 0.6749988794326782, 0.041961126029491425, 0.23512019217014313, -0.18530702590942383, 0.516712486743927, 0.3170550763607025, -0.5358571410179138, -0.19754110276699066, 0.0895354300737381, 0.40191495418548584, 0.2912633419036865, 0.7368783950805664, -0.2041919082403183, 0.008627430535852909, -0.16255323588848114, 0.05853652581572533, 0.0068972851149737835, 0.069874107837677, -0.35875189304351807, 0.3679877817630768, -0.32910144329071045, -0.48110777139663696 ]
osiria/bert-tweet-italian-uncased-sentiment
osiria
"2023-06-20T22:31:17Z"
28,677
1
transformers
[ "transformers", "pytorch", "safetensors", "bert", "text-classification", "it", "arxiv:1810.04805", "license:apache-2.0", "endpoints_compatible", "region:us" ]
text-classification
"2023-05-29T17:27:11Z"
--- license: apache-2.0 language: - it widget: - text: "una fantastica giornata di #calcio! grande prestazione del mister e della squadra" example_title: "Example 1" - text: "il governo dovrebbe fare politica, non soltanto propaganda! #vergogna" example_title: "Example 2" - text: "che serata da sogno sul #redcarpet! grazie a tutti gli attori e registi del cinema italiano #oscar #awards" example_title: "Example 3" --- -------------------------------------------------------------------------------------------------- <body> <span class="vertical-text" style="background-color:lightgreen;border-radius: 3px;padding: 3px;"> </span> <br> <span class="vertical-text" style="background-color:orange;border-radius: 3px;padding: 3px;">    Task: Sentiment Analysis</span> <br> <span class="vertical-text" style="background-color:lightblue;border-radius: 3px;padding: 3px;">    Model: BERT-TWEET</span> <br> <span class="vertical-text" style="background-color:tomato;border-radius: 3px;padding: 3px;">    Lang: IT</span> <br> <span class="vertical-text" style="background-color:lightgrey;border-radius: 3px;padding: 3px;">  </span> <br> <span class="vertical-text" style="background-color:#CF9FFF;border-radius: 3px;padding: 3px;"> </span> </body> -------------------------------------------------------------------------------------------------- <h3>Model description</h3> This is a <b>BERT</b> <b>[1]</b> uncased model for the <b>Italian</b> language, fine-tuned for <b>Sentiment Analysis</b> (<b>positive</b> and <b>negative</b> classes only) on the [SENTIPOLC-16](https://www.evalita.it/campaigns/evalita-2016/tasks-challenge/sentipolc/) dataset, using <b>BERT-TWEET-ITALIAN</b> ([bert-tweet-base-italian-uncased](https://huggingface.co/osiria/bert-tweet-base-italian-uncased)) as a pre-trained model. <h3>Training and Performances</h3> The model is trained to perform binary sentiment classification (<b>positive</b> vs <b>negative</b>) and it's meant to be used primarily on tweets or other social media posts. It has been fine-tuned for Sentiment Analysis, using the SENTIPOLC-16 dataset, for 3 epochs with a constant learning rate of 1e-5 and exploiting class weighting to compensate for the class imbalance. Instances having both positive and negative sentiment have been excluded, resulting in 4154 training instances and 1050 test instances The performances on the test set are reported in the following table: | Accuracy | Recall | Precision | F1 | | ------ | ------ | ------ | ------ | | 83.67 | 83.15 | 80.48 | 81.49 | The Recall, Precision and F1 metrics are averaged over the two classes <h3>Quick usage</h3> ```python from transformers import BertTokenizerFast, BertForSequenceClassification tokenizer = BertTokenizerFast.from_pretrained("osiria/bert-tweet-italian-uncased-sentiment") model = BertForSequenceClassification.from_pretrained("osiria/bert-tweet-italian-uncased-sentiment") from transformers import pipeline classifier = pipeline("text-classification", model = model, tokenizer = tokenizer) classifier("una fantastica giornata di #calcio! grande prestazione del mister e della squadra") # [{'label': 'POSITIVE', 'score': 0.9883694648742676}] ``` <h3>References</h3> [1] https://arxiv.org/abs/1810.04805 <h3>Limitations</h3> This model was trained on tweets, so it's mainly suitable for general-purpose social media text processing, involving short texts written in a social network style. It might show limitations when it comes to longer and more structured text, or domain-specific text. <h3>License</h3> The model is released under <b>Apache-2.0</b> license
[ -0.4454132914543152, -0.770294189453125, 0.15919829905033112, 0.6413735747337341, -0.42414993047714233, 0.1895148903131485, -0.3626505434513092, -0.5405954718589783, 0.39723753929138184, -0.14507678151130676, -0.8482549786567688, -0.8471101522445679, -0.8380966782569885, -0.06304309517145157, -0.21724767982959747, 1.2127623558044434, -0.0008068213355727494, 0.13662686944007874, 0.3520468771457672, -0.03067396767437458, -0.22258038818836212, -0.43704214692115784, -0.6910972595214844, -0.10615866631269455, 0.46706536412239075, 0.24284103512763977, 0.5835713744163513, -0.032504644244909286, 0.4691828489303589, 0.3072052597999573, -0.14902061223983765, 0.24053609371185303, -0.38361600041389465, -0.16514316201210022, 0.03674393519759178, -0.2738945484161377, -0.5641538500785828, 0.05278859660029411, 0.5991761088371277, 0.5285860896110535, 0.272604376077652, 0.11417379230260849, 0.4110245406627655, 0.6067165732383728, -0.4537108242511749, 0.01727886311709881, -0.634244978427887, 0.07897262275218964, -0.1433846354484558, -0.02525193803012371, -0.26120543479919434, -0.8934242725372314, 0.15876488387584686, -0.3350372314453125, 0.1273391842842102, -0.12485551089048386, 1.4645514488220215, -0.10592687129974365, -0.1305353194475174, -0.19408491253852844, -0.46941134333610535, 1.0592880249023438, -1.002995252609253, 0.2616850733757019, 0.13269753754138947, -0.015068739652633667, 0.1873495727777481, -0.43537190556526184, -0.7754694223403931, 0.14967259764671326, -0.07018046826124191, 0.519572913646698, -0.4266798198223114, -0.22889326512813568, -0.09914633631706238, 0.11755010485649109, -0.47491830587387085, -0.07648275792598724, -0.29615411162376404, 0.03486606106162071, 0.6017023921012878, 0.00890869926661253, 0.3115653097629547, -0.4308236241340637, -0.3946950137615204, -0.07292910665273666, -0.11765310913324356, 0.39387351274490356, 0.24924610555171967, 0.57289719581604, -0.5560943484306335, 0.6296646595001221, -0.06071615219116211, 0.37129247188568115, 0.2589091360569, -0.17921634018421173, 0.7940482497215271, -0.316270112991333, -0.25289884209632874, -0.27189087867736816, 1.1741538047790527, 0.7480731010437012, 0.45468029379844666, -0.022977838292717934, -0.22531931102275848, 0.17701733112335205, 0.2383074164390564, -0.8129028081893921, 0.0893159732222557, 0.21251967549324036, -0.6558231115341187, -0.6157771348953247, 0.17985795438289642, -0.9047038555145264, 0.07245763391256332, -0.022075528278946877, 0.647229015827179, -0.6405042409896851, -0.34893497824668884, 0.16191063821315765, -0.30672919750213623, 0.2674860954284668, 0.30728405714035034, -0.6636607646942139, 0.16104790568351746, 0.463933527469635, 0.8817058205604553, -0.1273428201675415, -0.20716004073619843, 0.14806783199310303, -0.1972782462835312, -0.2845757007598877, 0.6863811016082764, -0.36974257230758667, -0.3600505590438843, 0.2520323097705841, 0.05433624982833862, -0.44340136647224426, -0.016033539548516273, 0.7166129946708679, -0.2629730999469757, 0.47738537192344666, -0.5181557536125183, -0.4917100965976715, -0.04811793938279152, 0.5663373470306396, -0.3720601499080658, 1.3481736183166504, 0.0605931393802166, -1.2605880498886108, 0.4393911063671112, -0.6578367352485657, -0.5580504536628723, -0.3387465178966522, 0.11906815320253372, -0.6576771140098572, 0.054652899503707886, 0.42384517192840576, 0.8760097622871399, 0.041379254311323166, -0.1294322907924652, -0.5620680451393127, -0.2522358298301697, 0.2266620546579361, -0.2980691194534302, 1.1063567399978638, 0.15979020297527313, -0.672682523727417, -0.12194981426000595, -0.6980916857719421, 0.1421697586774826, 0.24367550015449524, -0.47437936067581177, -0.21297746896743774, 0.00899647269397974, 0.17811663448810577, 0.40513402223587036, 0.43744611740112305, -0.8179984092712402, 0.03217680752277374, -0.6333822011947632, 0.2742060422897339, 0.830575168132782, 0.008588151074945927, 0.4115086495876312, -0.4624675512313843, 0.27349382638931274, 0.19080370664596558, 0.34413355588912964, 0.4678499698638916, -0.3718830943107605, -0.9376693367958069, -0.2794099748134613, 0.2019730508327484, 0.6331853270530701, -0.7686285376548767, 1.0123320817947388, -0.4794573187828064, -0.604559063911438, -0.5574952960014343, -0.032471638172864914, 0.1379951387643814, 0.46049752831459045, 0.3989897668361664, -0.035613395273685455, -0.664785623550415, -0.8071063756942749, -0.11354362219572067, -0.3049609661102295, 0.24426573514938354, 0.21863830089569092, 0.7564050555229187, -0.20340906083583832, 1.0428111553192139, -0.4592466354370117, -0.39214327931404114, -0.6406603455543518, 0.17926084995269775, 0.41937607526779175, 0.5331222414970398, 0.8427113890647888, -0.6291149258613586, -0.7460700869560242, -0.11824281513690948, -0.849683403968811, -0.1304289847612381, -0.007678462658077478, -0.27823320031166077, 0.5445552468299866, 0.1781388223171234, -0.7375967502593994, 0.5848924517631531, 0.5280748605728149, -0.4254562258720398, 0.5362687110900879, 0.2183573991060257, 0.09880024939775467, -1.5348650217056274, 0.06817245483398438, 0.41307520866394043, -0.010868468321859837, -0.604929506778717, -0.35844042897224426, -0.03290225565433502, 0.11679146438837051, -0.539960503578186, 0.4044915735721588, -0.13080070912837982, 0.19337649643421173, 0.019774360582232475, 0.036682792007923126, 0.12761327624320984, 0.6420283913612366, 0.1685318499803543, 0.6482052206993103, 0.4695177674293518, -0.33992043137550354, 0.0259091816842556, 0.20488595962524414, -0.42210596799850464, 0.6139292120933533, -0.8067147135734558, -0.20196892321109772, -0.04715980589389801, 0.193653404712677, -1.286765694618225, 0.05170431360602379, 0.36957383155822754, -0.9497280716896057, 0.12849700450897217, 0.3586883246898651, -0.8106381297111511, -0.7213013768196106, -0.8419661521911621, -0.16326092183589935, 0.5525469779968262, -0.523966908454895, 0.5916811227798462, 0.03454179689288139, 0.05063443258404732, -0.7589704990386963, -0.9009637832641602, -0.31221574544906616, -0.23355041444301605, -0.9113357663154602, 0.2912481725215912, -0.18734724819660187, -0.013584798201918602, 0.07516372948884964, 0.021276598796248436, -0.05825958773493767, 0.06833586096763611, 0.2149197906255722, 0.37366366386413574, -0.09556322544813156, 0.2383708953857422, 0.05122383311390877, 0.4004824161529541, 0.021632183343172073, 0.09160157293081284, 0.8731808066368103, -0.3052894175052643, 0.04452710971236229, -0.8584786057472229, 0.2869577407836914, 0.5611299276351929, -0.07810413092374802, 1.2611161470413208, 0.9353495240211487, -0.3606288433074951, -0.21805904805660248, -0.645422637462616, -0.0721440315246582, -0.5011635422706604, 0.2580238878726959, -0.31696829199790955, -0.7644633054733276, 0.7070429921150208, 0.31617891788482666, 0.019399968907237053, 0.6231423020362854, 0.6615551710128784, -0.634379506111145, 1.1946686506271362, 0.5634782910346985, -0.4417511224746704, 0.6992330551147461, -0.5408450365066528, 0.33361226320266724, -0.6231582164764404, -0.3559209108352661, -0.6811513900756836, -0.47250786423683167, -0.658881664276123, -0.08283624798059464, 0.33636489510536194, -0.0826801061630249, -0.5332725048065186, 0.3699730336666107, -0.5790982842445374, 0.07268726825714111, 0.5700738430023193, 0.5125247240066528, -0.11072874069213867, 0.10848558694124222, -0.23504780232906342, -0.16089953482151031, -0.5399721264839172, -0.5239786505699158, 0.9015557169914246, 0.6149912476539612, 0.6661242842674255, 0.10415966063737869, 0.8302997350692749, 0.19724754989147186, 0.1846688985824585, -0.7477249503135681, 0.6661795973777771, -0.2784282863140106, -0.8170853853225708, -0.10860271006822586, -0.3351089358329773, -0.8543215990066528, 0.15245923399925232, -0.47340846061706543, -0.8011451959609985, 0.1527150273323059, -0.08561963587999344, -0.3500336706638336, 0.5686829090118408, -0.7291373610496521, 0.8224478363990784, -0.12258604913949966, -0.2737754285335541, -0.03386414051055908, -0.7167718410491943, 0.012572833336889744, 0.18572606146335602, 0.32012027502059937, -0.10813109576702118, -0.02523728832602501, 0.9052850604057312, -0.5809037685394287, 1.2834444046020508, -0.2786654531955719, 0.06803259253501892, 0.3241254389286041, -0.19193926453590393, 0.4173666834831238, -0.27420979738235474, -0.157134011387825, 0.09223809093236923, -0.3182573914527893, -0.40748900175094604, -0.23931936919689178, 0.6322917938232422, -1.2407900094985962, -0.2895275354385376, -0.5555844306945801, -0.23835992813110352, -0.32109779119491577, 0.22175192832946777, 0.5130079388618469, 0.16246937215328217, -0.2157914936542511, 0.35733193159103394, 0.6095854640007019, -0.2773844301700592, 0.8376225233078003, 0.26465824246406555, 0.10963809490203857, -0.49171894788742065, 0.7157555222511292, 0.17814935743808746, 0.08818764984607697, 0.3977116644382477, 0.1021309643983841, -0.33194246888160706, -0.3807975649833679, -0.14471577107906342, 0.39332643151283264, -0.5815038084983826, -0.3756418228149414, -0.8014934062957764, -0.29598233103752136, -0.6432207226753235, -0.4402705430984497, -0.3607924282550812, -0.4077223837375641, -0.689679741859436, -0.4067150354385376, 0.3612825274467468, 0.44957002997398376, -0.16875208914279938, 0.5098056197166443, -0.5515713691711426, 0.07578282803297043, 0.16367408633232117, 0.25774601101875305, 0.153507262468338, -0.5599823594093323, -0.2550911009311676, 0.19901934266090393, -0.5762678384780884, -0.9575766921043396, 0.5882091522216797, -0.01393718458712101, 0.3348710238933563, 0.46970483660697937, 0.04641130939126015, 0.745457649230957, -0.32636210322380066, 1.0035086870193481, 0.5558350086212158, -1.1629812717437744, 0.8394613862037659, -0.47504737973213196, 0.19007755815982819, 0.6820166110992432, 0.6393164396286011, -0.3218246400356293, -0.6115968227386475, -0.6233701109886169, -0.9255279302597046, 0.748853325843811, 0.4104371666908264, 0.3416857421398163, -0.2917787432670593, -0.016486406326293945, -0.2120925784111023, 0.20212969183921814, -1.239517331123352, -0.24910102784633636, -0.4849768579006195, -0.588729739189148, 0.10605177283287048, -0.11971352994441986, 0.1781536340713501, -0.5757134556770325, 0.8970163464546204, 0.12517815828323364, 0.6728268265724182, 0.17226478457450867, -0.013102901168167591, -0.0625317245721817, 0.24364611506462097, 0.4785219132900238, 0.4578061103820801, -0.41294097900390625, -0.17275963723659515, 0.29834747314453125, -0.3093501329421997, -0.19658242166042328, 0.12005656212568283, -0.2278304547071457, 0.23632335662841797, 0.5629857182502747, 0.8923224210739136, 0.09169844537973404, -0.26102086901664734, 0.8339689373970032, 0.09368830919265747, -0.5867802500724792, -0.5429447293281555, -0.15039703249931335, -0.043239325284957886, 0.38202694058418274, 0.5396701693534851, 0.10571394115686417, -0.07346482574939728, -0.6048244833946228, -0.051791008561849594, 0.5974341630935669, -0.43036049604415894, -0.3688339591026306, 0.4725790023803711, 0.20978310704231262, 0.06827624142169952, 0.31256720423698425, -0.08298928290605545, -0.9922369718551636, 0.49715086817741394, 0.36417442560195923, 0.8246622681617737, -0.06195949763059616, 0.464375764131546, 0.5035493969917297, 0.458335280418396, -0.006362097337841988, 0.5137536525726318, -0.0013307358603924513, -1.0918763875961304, -0.1801072061061859, -0.7415698170661926, 0.003626461373642087, 0.025954175740480423, -0.6875719428062439, 0.23998835682868958, -0.6472629308700562, -0.6399742960929871, 0.09802032262086868, 0.28381311893463135, -0.7307584285736084, 0.6801387071609497, 0.020895956084132195, 0.9737721085548401, -1.1411337852478027, 0.7263625860214233, 0.6321914196014404, -0.6298809051513672, -1.1032180786132812, 0.1798255443572998, -0.13741622865200043, -0.8941436409950256, 0.874789834022522, 0.2547987401485443, -0.15943029522895813, -0.14561107754707336, -0.7952674627304077, -0.6291419267654419, 1.071701169013977, -0.1636299043893814, -0.20737889409065247, -0.18296241760253906, 0.2520199120044708, 0.799484133720398, -0.3061515986919403, 0.3693075180053711, 0.3890298902988434, 0.46994999051094055, 0.11880762130022049, -0.9243736863136292, -0.08254958689212799, -0.5157973170280457, 0.2199227511882782, -0.020134268328547478, -1.0728375911712646, 0.8671414256095886, 0.2367430031299591, -0.07406169176101685, 0.04399537295103073, 0.6727705001831055, 0.14654460549354553, 0.14662709832191467, 0.5130501985549927, 0.8705217242240906, 0.3731856942176819, -0.4126325249671936, 1.078439712524414, -0.14264807105064392, 0.6591894626617432, 0.6732688546180725, 0.06916676461696625, 1.0713776350021362, 0.3399025499820709, -0.22339044511318207, 0.7782109975814819, 0.7025381922721863, -0.024495314806699753, 0.686378002166748, -0.19444312155246735, -0.2639859616756439, -0.0796336755156517, -0.11940675973892212, -0.39129969477653503, 0.34784436225891113, 0.32350361347198486, -0.5603924989700317, -0.07057845592498779, 0.08255400508642197, 0.5716872215270996, -0.03153163939714432, -0.47428107261657715, 0.8106537461280823, -0.061997245997190475, -0.5508015155792236, 0.5990750193595886, 0.005232076160609722, 1.164823055267334, -0.4945617914199829, 0.5553858876228333, -0.18905343115329742, 0.29805901646614075, -0.29275578260421753, -1.0358012914657593, 0.3369643986225128, 0.19731272757053375, -0.18825234472751617, -0.3016371726989746, 0.6442351341247559, -0.09439107775688171, -0.9075804948806763, 0.6091143488883972, 0.3848987817764282, -0.17648376524448395, 0.2587572932243347, -1.1183520555496216, 0.36591920256614685, 0.24388839304447174, -0.6390949487686157, -0.08740831911563873, 0.6590906381607056, 0.3905557692050934, 0.49071890115737915, 0.4167957305908203, 0.15070290863513947, 0.1883571892976761, 0.1700681746006012, 1.170175313949585, -0.5115211009979248, -0.42798343300819397, -1.0097872018814087, 0.8196536898612976, -0.4500958025455475, -0.2835383713245392, 0.913289487361908, 0.4600011110305786, 0.8306780457496643, -0.13092775642871857, 0.9199630618095398, -0.3940194249153137, 0.9180295467376709, -0.3058302104473114, 0.8040826916694641, -0.8609757423400879, -0.08644314855337143, -0.5670453310012817, -0.7540717720985413, -0.43632715940475464, 1.1195474863052368, -0.5698319673538208, 0.38797691464424133, 0.7634175419807434, 0.7920175790786743, 0.13412292301654816, -0.03700874745845795, -0.11776991933584213, 0.4719880521297455, 0.16189263761043549, 0.7056788206100464, 0.6663884520530701, -0.4889959990978241, 0.5815736055374146, -0.5514547228813171, -0.19415421783924103, -0.1949630230665207, -0.6589794158935547, -1.4324991703033447, -0.5906614065170288, -0.22809626162052155, -0.5795499682426453, 0.0908588245511055, 1.1674307584762573, 0.7812695503234863, -0.854548454284668, -0.2030036747455597, -0.05165696144104004, -0.14000751078128815, 0.004597408697009087, -0.35858818888664246, 0.5254992246627808, -0.4787411689758301, -0.9123658537864685, -0.1220451295375824, -0.11681370437145233, 0.21878376603126526, 0.07403751462697983, 0.07258348912000656, -0.4232500195503235, 0.25114595890045166, 0.6939413547515869, -0.031858041882514954, -0.4887198805809021, -0.44474953413009644, 0.050322841852903366, -0.36384403705596924, 0.14716097712516785, 0.14897751808166504, -0.3284744322299957, 0.05853690579533577, 0.5819797515869141, 0.45045706629753113, 0.5385313630104065, 0.1781236082315445, 0.09034353494644165, -0.9771863222122192, 0.0837305560708046, 0.39962872862815857, 0.3303748667240143, 0.22009575366973877, -0.1814797967672348, 0.4194886088371277, 0.2856588065624237, -0.29189333319664, -0.6978769898414612, -0.23618462681770325, -1.3188443183898926, -0.44662004709243774, 1.1129305362701416, 0.011759151704609394, -0.1938246637582779, 0.28766706585884094, -0.16013312339782715, 0.36543065309524536, -0.8574942350387573, 0.818088948726654, 0.8728575110435486, -0.019751572981476784, -0.1312808394432068, -0.384409099817276, 0.31738120317459106, 0.5747471451759338, -0.799740731716156, -0.5752955675125122, 0.26637768745422363, 0.3962222635746002, 0.15765395760536194, 0.711325466632843, -0.014407780021429062, 0.16623526811599731, -0.439001202583313, 0.24837033450603485, 0.30959808826446533, -0.16068163514137268, 0.01231612078845501, 0.326838880777359, -0.2448379397392273, -0.4858933985233307 ]
McGill-NLP/roberta-large-faithcritic
McGill-NLP
"2022-07-31T06:29:51Z"
28,622
1
transformers
[ "transformers", "pytorch", "roberta", "text-classification", "dataset:McGill-NLP/FaithDial", "arxiv:2204.10757", "license:mit", "model-index", "endpoints_compatible", "region:us" ]
text-classification
"2022-07-29T13:54:45Z"
--- license: mit datasets: - McGill-NLP/FaithDial widget: - text: "A cardigan is a type of knitted garment (sweater) that has an open front. </s></s> The old version is the regular one, knitted garment that has open front and buttons!" model-index: - name: roberta-large-faithcritic results: - task: type: text-classification name: Faithfulness Critic dataset: name: 'FaithCritic' type: McGill-NLP/FaithDial metrics: - name: Accuracy type: accuracy value: 86.51 - task: type: text-classification name: Faithfulness Critic dataset: name: 'MNLI' type: multi_nli metrics: - name: Accuracy type: accuracy value: 74.720 - task: type: text-classification name: Faithfulness Critic dataset: name: 'BEGIN' type: begin metrics: - name: Accuracy type: accuracy value: 71.56 --- ## Overview **Model Description:** roberta-large-faithcritic is the [RoBERTa large model](https://huggingface.co/roberta-large) fine-tuned on FaithCritic, a derivative of the [FaithDial](https://huggingface.co/datasets/McGill-NLP/FaithDial) dataset. The objective is to predict whether an utterance is faithful or not, given the source knowledge. The hyperparameters are provided in [hparams.yml](https://huggingface.co/McGill-NLP/roberta-large-faithcritic/blob/main/hparams.yaml). To know more about how to train a critic model, visit [our repo](https://github.com/McGill-NLP/FaithDial). ## Usage ```python from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("McGill-NLP/roberta-large-faithcritic") model = AutoModel.from_pretrained("McGill-NLP/roberta-large-faithcritic") knowledge = "A cardigan is a type of knitted garment (sweater) that has an open front." response = "The old version is the regular one, knitted garment that has open front and buttons!" input = tokenizer(knowledge, response) output = model(**input) ``` ## Citation Information ```bibtex @article{dziri2022faithdial, title={FaithDial: A Faithful Benchmark for Information-Seeking Dialogue}, author={Dziri, Nouha and Kamalloo, Ehsan and Milton, Sivan and Zaiane, Osmar and Yu, Mo and Ponti, Edoardo and Reddy, Siva}, journal={arXiv preprint, arXiv:2204.10757}, year={2022}, url={https://arxiv.org/abs/2204.10757} } ```
[ -0.1585162878036499, -0.7399990558624268, 0.6225734353065491, 0.20320631563663483, -0.23620924353599548, -0.225037083029747, -0.4546390175819397, -0.35279208421707153, 0.08222261816263199, 0.28328391909599304, -0.6861678957939148, -0.5548937320709229, -0.7104097008705139, 0.23577485978603363, -0.32184770703315735, 1.1015443801879883, -0.020766187459230423, 0.4389945864677429, -0.07455269992351532, -0.37579548358917236, -0.0010798965813592076, -0.5858319997787476, -0.5587214827537537, -0.17793719470500946, 0.4255076050758362, -0.030957411974668503, 0.7701555490493774, 0.4605686664581299, 0.5452751517295837, 0.3905142545700073, -0.22426795959472656, 0.13129912316799164, -0.433391809463501, 0.21805809438228607, -0.28624486923217773, -0.6124635934829712, -0.39148229360580444, 0.43346625566482544, 0.6521002650260925, 0.3351093530654907, -0.059370577335357666, 0.5044704079627991, 0.01845560409128666, 0.17731218039989471, -0.33136144280433655, 0.436125248670578, -0.9660469889640808, -0.18099132180213928, -0.18106891214847565, -0.3155128061771393, -0.5162363052368164, -0.5897423028945923, 0.30930542945861816, -0.5903399586677551, 0.2886839509010315, 0.22767320275306702, 1.1372069120407104, 0.2860804498195648, -0.19656939804553986, -0.42298659682273865, -0.5121482014656067, 1.211796760559082, -0.9708009958267212, 0.5707386136054993, 0.6722717881202698, 0.0009467616910114884, -0.26330509781837463, -0.6271932721138, -0.8000667095184326, -0.21249863505363464, 0.0633866935968399, 0.3029698431491852, -0.12826047837734222, -0.042983658611774445, 0.3698882758617401, 0.5404818058013916, -0.5332292318344116, -0.27665209770202637, -0.23155033588409424, -0.3025350272655487, 0.21731366217136383, 0.12305598706007004, 0.05846702679991722, -0.4219014048576355, -0.4369812607765198, -0.32047033309936523, -0.22539393603801727, -0.06488672643899918, 0.24775747954845428, 0.09126588702201843, -0.3085486888885498, 0.6324928402900696, -0.11511094868183136, 0.6492102742195129, 0.07201134413480759, -0.3265801668167114, 0.45857036113739014, -0.5188333988189697, -0.19515082240104675, -0.4316205680370331, 1.1279960870742798, 0.2705581784248352, 0.3908222019672394, 0.11626201122999191, 0.0157338734716177, 0.08875654637813568, 0.3320274353027344, -0.9041492342948914, -0.1939782351255417, 0.15646541118621826, -0.5823004245758057, -0.41950592398643494, 0.07464494556188583, -0.6072962880134583, 0.11539984494447708, -0.44851696491241455, 0.27921774983406067, -0.6753013134002686, -0.21063463389873505, -0.03937995433807373, -0.10129943490028381, 0.09425556659698486, 0.3073171079158783, -0.5752073526382446, 0.11628419905900955, 0.3909693658351898, 0.8879697322845459, -0.035090621560811996, -0.3665074408054352, -0.5488438010215759, -0.11609737575054169, -0.1852717399597168, 0.43269309401512146, -0.605002760887146, -0.17871256172657013, 0.11442489176988602, 0.1765241026878357, -0.1297929286956787, -0.2972280979156494, 0.9969975352287292, -0.6153395771980286, 0.4426026940345764, -0.24352529644966125, -0.6545425057411194, -0.2676357924938202, 0.2994723916053772, -0.5714458227157593, 0.9311406016349792, 0.36524534225463867, -0.9772611856460571, 0.31367096304893494, -0.5047702789306641, -0.08709552139043808, 0.0002790129219647497, -0.3107782304286957, -0.6834651231765747, 0.23900701105594635, -0.10181031376123428, 0.18854892253875732, -0.4341266453266144, 0.3662415146827698, -0.663210928440094, -0.16460278630256653, 0.6839746832847595, -0.723732590675354, 0.8813916444778442, 0.18725097179412842, -0.42540621757507324, 0.007176211569458246, -0.8329392075538635, 0.3959670662879944, 0.04132435470819473, -0.32792049646377563, -0.2594025433063507, -0.006916913203895092, 0.3946879506111145, 0.2076188176870346, 0.25083616375923157, -0.7155134677886963, 0.2508139908313751, -0.3767392337322235, 0.5545682907104492, 0.7563962936401367, -0.05226350203156471, 0.03711003437638283, -0.3672866225242615, 0.42524248361587524, 0.1302454024553299, 0.5471186637878418, 0.14551196992397308, -0.6725813150405884, -0.8074457049369812, -0.27858832478523254, 0.562661349773407, 0.3682112991809845, -0.6981264352798462, 0.5161453485488892, -0.17579840123653412, -0.302944153547287, -0.7697794437408447, -0.04652675986289978, 0.679955780506134, 0.3567184507846832, 0.6604668498039246, -0.4557175636291504, -0.6187489628791809, -0.8460323810577393, -0.38768553733825684, -0.6459860801696777, 0.2346155047416687, 0.3675745129585266, 0.6246333122253418, -0.39851483702659607, 0.7161880135536194, -0.40228068828582764, -0.41668421030044556, 0.001060273963958025, 0.460178017616272, 0.5545834302902222, 0.48116862773895264, 0.3906954824924469, -0.960610032081604, -0.47769972681999207, -0.21981579065322876, -0.6829210519790649, 0.08507096022367477, -0.058994732797145844, -0.02041500248014927, 0.30930399894714355, 0.1009749174118042, -0.8048850893974304, 0.7065383791923523, 0.719601035118103, -0.34585198760032654, 0.7787351012229919, 0.11262008547782898, 0.19884927570819855, -1.3729584217071533, 0.04692608863115311, 0.0957576334476471, -0.07541752606630325, -0.4990733861923218, 0.1630077362060547, 0.08272639662027359, 0.2317540943622589, -0.24400119483470917, 0.5648584365844727, -0.35350465774536133, 0.1183258444070816, -0.23706555366516113, -0.1491689383983612, 0.05708938464522362, 0.5586358904838562, 0.22040750086307526, 0.9923139214515686, 0.31862086057662964, -0.45851069688796997, 0.15728794038295746, 0.8804534077644348, -0.4246854782104492, 0.33613041043281555, -0.8141931891441345, 0.09209433197975159, 0.2222101241350174, 0.3763042986392975, -0.6954615712165833, -0.2739267647266388, 0.3021434545516968, -0.9233366250991821, 0.14858292043209076, -0.5150521993637085, -0.5616251826286316, -0.4687540829181671, 0.07342763990163803, 0.8373136520385742, 0.43969565629959106, -0.39948347210884094, 0.7762035131454468, 0.11518436670303345, -0.09957899153232574, -0.4137519896030426, -0.6091664433479309, -0.08420706540346146, -0.07497958093881607, -0.5163262486457825, 0.2587365210056305, -0.579989492893219, -0.23278768360614777, -0.03265470638871193, 0.0275805052369833, -0.2535305321216583, -0.08792665600776672, 0.3228590190410614, 0.41342106461524963, -0.2406303882598877, 0.11362263560295105, -0.2949902415275574, 0.02704608626663685, 0.2435978800058365, -0.5455403327941895, 0.8671122789382935, -0.35723480582237244, -0.33487725257873535, -0.8382874727249146, 0.2590835392475128, 0.7074785232543945, -0.41751182079315186, 0.9699999690055847, 0.828117847442627, -0.03271498531103134, 0.02102437987923622, -0.8605871200561523, -0.16088785231113434, -0.47848132252693176, 0.30347174406051636, -0.390016108751297, -0.6521919369697571, 0.48530101776123047, 0.18887870013713837, -0.10741762816905975, 0.6357151865959167, 0.7052096128463745, 0.1782221645116806, 1.0255744457244873, 0.3134334087371826, -0.25704172253608704, 0.4243287742137909, -0.35270750522613525, 0.017515618354082108, -1.102097988128662, -0.029256552457809448, -0.7227505445480347, 0.20736968517303467, -0.793039083480835, -0.5863491892814636, 0.30177628993988037, 0.05546489357948303, -0.16775384545326233, 0.40403619408607483, -0.4700908958911896, 0.010876595042645931, 0.7008956670761108, 0.11240795999765396, 0.18693624436855316, 0.03535332530736923, -0.4249759018421173, -0.28342583775520325, -0.6045027375221252, -0.38446342945098877, 1.2540796995162964, 0.4717966914176941, 0.7320660352706909, 0.256916880607605, 0.6347131729125977, 0.020746685564517975, 0.3201885521411896, -0.9979880452156067, 0.30282875895500183, 0.02495979703962803, -0.7475091218948364, -0.17074966430664062, -0.8571740984916687, -0.5999975204467773, -0.035389494150877, -0.24577604234218597, -0.4941588044166565, 0.3700541853904724, -0.024695225059986115, -0.19424888491630554, 0.18210865557193756, -0.18290655314922333, 0.46370816230773926, -0.10723301768302917, -0.3650168478488922, -0.10691290348768234, -0.3735242486000061, -0.03017711080610752, -0.06305865943431854, 0.16493387520313263, 0.21022950112819672, 0.4489808678627014, 0.6381729245185852, -0.13995468616485596, 0.8801622986793518, 0.019722824916243553, 0.01603848859667778, 0.22753329575061798, 0.13656853139400482, 0.7233413457870483, 0.30826514959335327, -0.3092074692249298, 0.3908390700817108, 0.003403077833354473, -0.33317816257476807, -0.49953827261924744, 0.5539072751998901, -0.9013895988464355, -0.5411672592163086, -0.8345437049865723, -0.5945488810539246, -0.20090210437774658, 0.35211285948753357, 0.5647490620613098, 0.7567249536514282, -0.27208608388900757, 0.5137403607368469, 0.9336823225021362, -0.1940481960773468, 0.11379826068878174, 0.7651712894439697, -0.12294183671474457, -0.6802880764007568, 0.6016169786453247, -0.003465567482635379, 0.33229780197143555, 0.09188779443502426, 0.26239120960235596, -0.3540419638156891, -0.6783096194267273, -0.3325181007385254, 0.41073301434516907, -0.5245097875595093, -0.2552322745323181, -0.7589108943939209, -0.5399712324142456, -0.4276917278766632, 0.5314779281616211, -0.35417890548706055, -0.16049814224243164, -0.4452208876609802, 0.1217542290687561, 0.4080459475517273, 0.6330828070640564, 0.16431978344917297, 0.04696497321128845, -0.6538700461387634, 0.26878494024276733, 0.01592089794576168, 0.3929659128189087, -0.09548038989305496, -1.063199520111084, -0.22897537052631378, 0.3691540062427521, -0.3693314492702484, -0.6779013276100159, 0.3800506889820099, 0.2908001244068146, 0.5106737613677979, 0.5236350893974304, 0.2575710117816925, 0.6528564691543579, -0.48144134879112244, 0.6548650860786438, 0.29851439595222473, -1.002888798713684, 0.4150959551334381, -0.5930391550064087, 0.37315449118614197, 0.8375729918479919, 0.6382450461387634, -0.38843291997909546, -0.7241263389587402, -0.8501390218734741, -0.6174003481864929, 0.44641050696372986, 0.6351573467254639, 0.05095406249165535, -0.4051932692527771, 0.38928091526031494, -0.04644041135907173, 0.2944887578487396, -0.9445700645446777, -0.11186687648296356, -0.45553913712501526, -0.518002450466156, 0.0642857775092125, -0.2691311836242676, -0.4963730573654175, -0.4158071279525757, 0.9053340554237366, -0.3134450614452362, 0.5762674808502197, 0.5897818803787231, -0.13402993977069855, -0.20698268711566925, 0.1755910962820053, 0.7178404927253723, 0.8051488399505615, -0.2928295433521271, -0.20777136087417603, 0.07377433776855469, -0.603409469127655, -0.22140683233737946, 0.010297268629074097, -0.3342926800251007, 0.32627254724502563, 0.5206615328788757, 1.0018179416656494, 0.19547884166240692, -0.22852349281311035, 0.8059613108634949, -0.3127994239330292, -0.4600442051887512, -0.9701626300811768, -0.04572010040283203, -0.24205778539180756, 0.2960336208343506, 0.4635453224182129, 0.33521783351898193, 0.14415860176086426, -0.8157939314842224, 0.19647009670734406, 0.5099272131919861, -0.6928361654281616, -0.473579078912735, 0.6710771918296814, -0.06711866706609726, -0.32734668254852295, 0.6959581971168518, -0.1882464736700058, -0.9822438359260559, 0.27917978167533875, 0.5516541600227356, 0.9456362724304199, -0.08072563260793686, 0.32701417803764343, 0.6437740325927734, 0.11639413237571716, -0.1806822568178177, 0.3678303360939026, 0.07495808601379395, -0.7865431904792786, -0.38758257031440735, -1.1364266872406006, -0.2495967000722885, 0.3177240490913391, -1.156564712524414, -0.14935386180877686, -0.445675790309906, -0.6723825335502625, -0.05188431218266487, 0.19631023705005646, -0.8573530316352844, 0.38323158025741577, -0.31515949964523315, 0.9368301630020142, -0.565722644329071, 1.014570951461792, 0.3863304555416107, -0.646980881690979, -1.0090110301971436, 0.34524646401405334, 0.00581618957221508, -0.7581015229225159, 0.707525908946991, 0.11799516528844833, 0.0061296201311051846, -0.12364427000284195, -0.5527104139328003, -1.038428783416748, 0.9159626364707947, -0.1702219843864441, -0.7583053708076477, -0.05832706019282341, 0.03795039281249046, 0.6385543942451477, -0.44461485743522644, 0.584637463092804, 0.13751856982707977, 0.6426499485969543, -0.012975075282156467, -0.9801318645477295, -0.026685817167162895, -0.47722917795181274, 0.005968342535197735, 0.03771773725748062, -1.0050532817840576, 1.0643441677093506, 0.04900926724076271, -0.026735570281744003, 0.7866882085800171, 0.8636664748191833, 0.2547326385974884, 0.15847226977348328, 0.5111932158470154, 0.6643842458724976, 0.6548287272453308, -0.227752223610878, 0.9581686854362488, -0.5474446415901184, 0.569981575012207, 1.2374653816223145, -0.03638308122754097, 0.9480208158493042, 0.4814608693122864, -0.12019380927085876, 0.8788508772850037, 0.3055865168571472, -0.44828999042510986, 0.31943395733833313, 0.07815562188625336, -0.08682317286729813, -0.2862398624420166, -0.13764993846416473, -0.4850415885448456, 0.6988719701766968, 0.1589716374874115, -0.7779597043991089, 0.38300812244415283, -0.24853137135505676, -0.023241642862558365, 0.0914495587348938, 0.01932595670223236, 0.7881565093994141, 0.14845380187034607, -0.8668649792671204, 0.9453606009483337, -0.14437508583068848, 0.3947196900844574, -0.7568299174308777, -0.04641374945640564, 0.04459109157323837, 0.2845655679702759, -0.019821539521217346, -0.49548059701919556, -0.008204773999750614, -0.14514198899269104, -0.4890732765197754, 0.06822985410690308, 0.2655932903289795, -0.42361244559288025, -0.5741839408874512, 0.5453435182571411, 0.15747149288654327, 0.10892461985349655, 0.03198089450597763, -0.955532968044281, 0.2032463252544403, 0.1714431196451187, -0.375625342130661, 0.15648247301578522, 0.44304609298706055, 0.05311714485287666, 0.7026692032814026, 0.9933699369430542, 0.3269466161727905, -0.11944735050201416, 0.3580256700515747, 0.9455907344818115, -0.7208502888679504, -0.31788748502731323, -0.5649643540382385, 0.28546661138534546, -0.2708223760128021, -0.7642488479614258, 0.937541663646698, 0.5321426391601562, 0.7595871090888977, 0.02774904854595661, 0.7346214652061462, -0.009168945252895355, 0.7039432525634766, -0.6143409609794617, 0.7702756524085999, -0.4414617121219635, -0.005099485628306866, -0.4194994866847992, -1.1448924541473389, 0.201139435172081, 0.8656637072563171, -0.2266070693731308, 0.15799160301685333, 0.8166835308074951, 0.8165146708488464, -0.16745701432228088, 0.16364112496376038, 0.17007383704185486, 0.7800284624099731, 0.08332231640815735, 0.18400245904922485, 0.831894040107727, -0.6992430686950684, 0.4456344246864319, 0.04254193603992462, -0.409690260887146, -0.2138507217168808, -0.5867059230804443, -1.067720651626587, -0.7829992771148682, -0.13352979719638824, -0.9624772071838379, 0.056062713265419006, 1.050319790840149, 0.7073257565498352, -0.8807469010353088, -0.13992100954055786, -0.13718444108963013, -0.4186318516731262, -0.15364286303520203, -0.25021782517433167, 0.1900254786014557, -0.3244282901287079, -0.7215688228607178, 0.4048025906085968, -0.04406113550066948, 0.0022773018572479486, -0.37126585841178894, -0.1130731999874115, -0.24454833567142487, 0.37409305572509766, 0.3478923738002777, 0.0875869020819664, -1.0178718566894531, -0.3540116548538208, 0.03848162293434143, -0.12176725268363953, 0.016536833718419075, 0.5478097200393677, -0.4607543349266052, 0.2972452640533447, 0.1864202469587326, 0.3239060044288635, 0.6764212846755981, 0.22151480615139008, 0.7164024114608765, -0.35301917791366577, 0.12594980001449585, 0.3089829385280609, 0.43404075503349304, 0.2735431492328644, -0.2518484592437744, 0.4256759583950043, 0.3472866117954254, -0.7508893013000488, -0.759125292301178, 0.5472075343132019, -1.08225417137146, -0.12489251792430878, 1.3511385917663574, -0.43463200330734253, -0.40347108244895935, -0.1953880339860916, 0.03688540309667587, 0.3156241178512573, -0.5263409614562988, 0.9508979320526123, 0.8004801869392395, 0.5680874586105347, -0.05264516547322273, -0.48476243019104004, 0.6927710175514221, 0.5652872920036316, -0.31304851174354553, -0.07368059456348419, 0.25673621892929077, 0.5544275641441345, 0.43394216895103455, 0.4122307598590851, -0.23188872635364532, 0.3615100681781769, -0.21271716058254242, -0.03566829115152359, -0.003935417626053095, -0.46672776341438293, -0.05173758044838905, -0.049501851201057434, 0.13679803907871246, 0.26038822531700134 ]
mnaylor/mega-base-wikitext
mnaylor
"2023-06-28T20:32:48Z"
28,601
0
transformers
[ "transformers", "pytorch", "safetensors", "mega", "fill-mask", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2023-02-21T20:56:10Z"
--- license: apache-2.0 language: - en library_name: transformers --- # Mega Masked LM on wikitext-103 This is the location on the Hugging Face hub for the Mega MLM checkpoint. I trained this model on the `wikitext-103` dataset using standard BERT-style masked LM pretraining using the [original Mega repository](https://github.com/facebookresearch/mega) and uploaded the weights initially to hf.co/mnaylor/mega-wikitext-103. When the implementation of Mega into Hugging Face's `transformers` is finished, the weights here are designed to be used with `MegaForMaskedLM` and are compatible with the other (encoder-based) `MegaFor*` model classes. This model uses the RoBERTa base tokenizer since the Mega paper does not implement a specific tokenizer aside from the character-level tokenizer used to illustrate long-sequence performance.
[ -0.7054863572120667, -0.4169926643371582, 0.24323640763759613, 0.45094671845436096, -0.05616091564297676, 0.018907340243458748, 0.13003602623939514, -0.48632702231407166, 0.87739098072052, 0.5214047431945801, -1.141436219215393, -0.1507149189710617, -0.6139242053031921, 0.137184277176857, -0.2210974395275116, 1.3767610788345337, 0.13369229435920715, 0.4202379882335663, -0.2636396586894989, -0.19823682308197021, -0.2263769507408142, -0.8795450925827026, -0.5198370218276978, -0.5688962936401367, 1.0220088958740234, 0.17278413474559784, 0.7884296774864197, 0.2298719882965088, 0.3788032829761505, 0.3280966579914093, -0.30260133743286133, -0.19888705015182495, -0.4342585802078247, -0.48902538418769836, -0.19193798303604126, -0.37660712003707886, -0.9834884405136108, 0.16342702507972717, 0.64701908826828, 0.8492611050605774, 0.16582709550857544, 0.2243698388338089, -0.02930898778140545, 0.5293941497802734, -0.37957149744033813, 0.04784548655152321, -0.5958060026168823, 0.33605971932411194, -0.1589297503232956, 0.19192281365394592, -0.3957737386226654, -0.2505151331424713, 0.14570464193820953, -0.19678743183612823, 0.15367403626441956, 0.0975574404001236, 0.9267802834510803, 0.03499500826001167, -0.5280864834785461, -0.10830845683813095, -0.5026057362556458, 0.630868673324585, -0.28705495595932007, 0.32574865221977234, 0.5059152841567993, 0.5837852954864502, -0.1538695991039276, -0.9084590077400208, -0.5500150918960571, 0.06583695858716965, -0.1953102946281433, -0.10479368269443512, -0.21009677648544312, 0.27507704496383667, 0.513179361820221, 0.40867316722869873, -0.4750668704509735, 0.1371460109949112, -0.5491722226142883, -0.4453243911266327, 0.4082769751548767, 0.041395172476768494, 0.2388538420200348, -0.2913641035556793, -0.7497088313102722, -0.0464935265481472, -0.7013869285583496, 0.021188441663980484, 0.19056423008441925, 0.16780224442481995, -0.23826028406620026, 0.6706003546714783, -0.1501944214105606, 0.5250322222709656, 0.17185431718826294, -0.3040490746498108, 0.732454776763916, 0.10945925861597061, -0.3125990927219391, 0.1824684590101242, 0.5939890146255493, 0.28226324915885925, 0.38741737604141235, -0.005349996965378523, -0.5115557312965393, -0.3946032226085663, 0.2064739167690277, -1.208479404449463, -0.30438223481178284, 0.1854802817106247, -0.5535216927528381, -0.3949010670185089, 0.3451228141784668, -0.386437326669693, -0.12292338907718658, -0.28813105821609497, 1.0861382484436035, -0.2028898298740387, -0.1775999814271927, -0.08838176727294922, -0.1855948120355606, 0.11583878099918365, 0.25237220525741577, -0.8141270279884338, 0.09148778766393661, 0.6291808485984802, 0.7725586295127869, 0.2793694734573364, -0.28500235080718994, -0.505505383014679, 0.22487474977970123, -0.31497713923454285, 0.47916334867477417, -0.08998246490955353, -0.21934814751148224, 0.0592363104224205, 0.3131689429283142, -0.24982015788555145, -0.7052398920059204, 0.42062148451805115, -0.5988948941230774, 0.1983344852924347, -0.4270555078983307, -0.3817496597766876, -0.4102573096752167, 0.4578622579574585, -0.7341972589492798, 1.1867616176605225, 0.22558239102363586, -0.723164975643158, 0.38110285997390747, -0.5901055335998535, -0.18850398063659668, 0.22710320353507996, 0.04501744732260704, -0.57228684425354, 0.3131618797779083, 0.06877145171165466, 0.5057914853096008, 0.39161548018455505, 0.10216515511274338, -0.47490960359573364, -0.4566349983215332, 0.4094018042087555, 0.013179929926991463, 0.8595004677772522, 0.06746859103441238, -0.4106382429599762, 0.28313490748405457, -0.6912637948989868, -0.08917517215013504, 0.05176331847906113, -0.2597806751728058, -0.10217396914958954, -0.3999926447868347, 0.17773419618606567, 0.6188967227935791, 0.3395533561706543, -0.5334203243255615, 0.3835335969924927, 0.18027055263519287, 0.07020199298858643, 1.001692295074463, -0.21560263633728027, 0.09438707679510117, -0.48796412348747253, 0.43841058015823364, 0.11676469445228577, 0.4681447148323059, -0.055985186249017715, -0.582022488117218, -1.1335374116897583, -0.6680287718772888, 0.5134631991386414, 0.28267163038253784, -0.7731478810310364, 0.920272171497345, -0.24772077798843384, -0.5172490477561951, -0.41214829683303833, 0.018276123329997063, 0.1785001903772354, 0.2505933344364166, 0.30494070053100586, -0.35158613324165344, -0.7576379179954529, -1.2541563510894775, 0.19703760743141174, 0.14741817116737366, -0.08252368122339249, 0.16118568181991577, 0.8925331234931946, -0.6504988670349121, 1.008610486984253, -0.2948596179485321, -0.45150113105773926, -0.444379597902298, 0.1872151494026184, 0.3305996060371399, 0.7746548056602478, 0.7925756573677063, -0.7830433249473572, -0.4680017828941345, -0.3833974003791809, -0.5870735049247742, -0.2562246322631836, 0.06493911147117615, -0.4044141173362732, 0.1343916803598404, 0.49626410007476807, -0.8929100632667542, 0.5571924448013306, 0.859955906867981, -0.4163876175880432, 0.6091166734695435, 0.09985289722681046, 0.026766138151288033, -1.2163399457931519, 0.27329832315444946, -0.39219149947166443, -0.7334821224212646, -0.8196817636489868, 0.07128377258777618, 0.1959693729877472, -0.37893763184547424, -0.4479467570781708, 0.32441720366477966, -0.2633122503757477, -0.40841713547706604, -0.4239494800567627, -0.3983071744441986, -0.08054962009191513, 0.6309418082237244, 0.07889898866415024, 0.4709337651729584, 0.6287122368812561, -0.3359375298023224, 0.1315331757068634, 0.15564793348312378, -0.3264033794403076, 0.6848750710487366, -0.7159135937690735, 0.19305573403835297, -0.2592240273952484, 0.7937055230140686, -0.8157115578651428, -0.42557504773139954, 0.42807093262672424, -0.4166560173034668, 0.4752470850944519, -0.31471705436706543, -0.6195108294487, -0.6837868690490723, -0.35501915216445923, 0.4549635946750641, 0.6227330565452576, -0.820766806602478, 0.8206831216812134, 0.13595183193683624, -0.029601426795125008, -0.46058136224746704, -0.6702031493186951, 0.05535441264510155, -0.2726869583129883, -0.5310779809951782, 0.40414270758628845, -0.23090669512748718, 0.10224366188049316, -0.25401386618614197, -0.06502480059862137, 0.05477312579751015, -0.21749097108840942, 0.6333816647529602, 0.18595509231090546, -0.05527030676603317, -0.19150616228580475, -0.2682805061340332, -0.36971163749694824, 0.1192704513669014, -0.1652558147907257, 1.0012658834457397, 0.17538398504257202, -0.25357913970947266, -0.6598550081253052, 0.32694581151008606, 0.7352319955825806, 0.23486949503421783, 1.253288984298706, 1.0799367427825928, -0.820051908493042, -0.06804876774549484, -0.7737679481506348, -0.2936007082462311, -0.5501136183738708, 0.1868751496076584, -0.4657045304775238, -0.8881269693374634, 0.6913872361183167, 0.1934366524219513, -0.1448371559381485, 0.6281692385673523, 0.7399444580078125, -0.29167789220809937, 1.2657712697982788, 0.8152818083763123, -0.3399713337421417, 0.4938124716281891, -0.2964770197868347, 0.014159971848130226, -0.9475168585777283, -0.5245001316070557, -0.5990626811981201, -0.8355752229690552, -0.28143221139907837, -0.5842564105987549, 0.45278680324554443, 0.4995522201061249, -0.41015228629112244, 0.6492829322814941, -0.030747374519705772, 0.37186920642852783, 0.6671499609947205, 0.23286652565002441, 0.06778057664632797, 0.06647126376628876, -0.19785432517528534, -0.24487993121147156, -0.6705823540687561, 0.0009097036090679467, 0.6034363508224487, 0.5775262117385864, 0.6638961434364319, 0.062197234481573105, 0.6898658871650696, 0.041140422224998474, 0.7424625754356384, -0.6502175331115723, 0.6749910116195679, 0.02403853088617325, -1.0422284603118896, 0.30235904455184937, -0.6750203371047974, -0.6114280819892883, 0.29530104994773865, -0.31456029415130615, -0.8424423933029175, 0.08491595089435577, 0.00018702524539548904, 0.045742232352495193, 0.5532749891281128, -0.44957613945007324, 0.88945472240448, -0.015438122674822807, 0.3121960759162903, -0.17346109449863434, -0.45574936270713806, 0.508484959602356, -0.25828197598457336, 0.1438094824552536, -0.11434416472911835, 0.09680069237947464, 0.8626227378845215, -0.9311712384223938, 0.9477130174636841, -0.4399241507053375, -0.02889663353562355, 0.03480864316225052, -0.10588991641998291, 0.6193583607673645, -0.21688254177570343, 0.20823104679584503, 0.45546990633010864, -0.35603052377700806, -0.5271590948104858, -0.4135814905166626, 0.5604036450386047, -0.736508309841156, -0.26856470108032227, -0.46585893630981445, -0.5586975812911987, -0.10821985453367233, 0.17769880592823029, 0.50187087059021, 0.6551629900932312, 0.135949045419693, 0.4538708031177521, 0.6902310252189636, -0.44299671053886414, 0.40621304512023926, 0.3342994153499603, -0.696251630783081, -0.6609348654747009, 0.8055185675621033, 0.177017480134964, 0.5306389331817627, 0.29329609870910645, 0.2660912871360779, -0.17795568704605103, -0.3337506949901581, -0.37852799892425537, 0.16509777307510376, -0.6145209670066833, -0.3860154151916504, -0.912817120552063, -0.6496762037277222, -0.42057016491889954, -0.365914911031723, -0.2885358929634094, -0.4346417188644409, 0.13420259952545166, -0.02924952283501625, 0.4808277189731598, 0.7315575480461121, -0.3181374669075012, 0.5202609300613403, -0.7989299297332764, 0.361848920583725, 0.4650764763355255, 0.28799334168434143, 0.019255783408880234, -0.5645537376403809, -0.42081132531166077, 0.038627635687589645, -0.19453021883964539, -0.5086323618888855, 0.030993686988949776, 0.1189999207854271, 0.5100793838500977, 0.5784434080123901, -0.3032299280166626, 0.870569109916687, -0.36801132559776306, 0.7357034683227539, 0.5589213967323303, -0.7575197219848633, 0.3334929347038269, -0.39017871022224426, 0.32483479380607605, 0.58338463306427, 0.8830259442329407, -0.5448006987571716, -0.16473230719566345, -0.6061273217201233, -0.6970844864845276, 0.5276451110839844, 0.3172972798347473, 0.3395024240016937, 0.1421327143907547, 0.18517658114433289, -0.020777978003025055, 0.35306501388549805, -1.19297456741333, -0.3829788863658905, -0.0015275183832272887, -0.20279845595359802, -0.00467803655192256, -0.45863866806030273, -0.13396373391151428, -0.46641701459884644, 0.7015340924263, -0.2445230334997177, 0.3916208744049072, 0.012167307548224926, -0.3454875349998474, -0.15788663923740387, -0.5264279246330261, 0.48868390917778015, 0.5700605511665344, -0.5403833389282227, -0.1182536706328392, 0.18943405151367188, -0.6530225276947021, -0.27101990580558777, 0.06426770985126495, -0.18941961228847504, 0.12894582748413086, 0.4414309561252594, 0.5872465372085571, 0.7473147511482239, -0.4298591911792755, 0.7291626930236816, 0.06750460714101791, -0.3020038604736328, -0.38445156812667847, -0.059360016137361526, 0.16049931943416595, 0.3411702513694763, 0.7344781160354614, -0.1258370727300644, -0.024418920278549194, -0.665362536907196, 0.4386484920978546, 0.6533195972442627, -0.7238048911094666, -0.38700583577156067, 0.6504247188568115, 0.1707843542098999, -0.20280811190605164, 0.7337213754653931, 0.07108341157436371, -1.0406436920166016, 0.5894120931625366, 0.48437511920928955, 1.0842921733856201, -0.045810211449861526, -0.08223151415586472, 0.5017178654670715, 0.4169839322566986, 0.31838494539260864, 0.12384233623743057, -0.11836759746074677, -0.6525421142578125, -0.5268256068229675, -0.9940782785415649, -0.3221965730190277, 0.19063234329223633, -0.7458537817001343, 0.47392258048057556, -0.6927205324172974, -0.1729908138513565, -0.047165874391794205, 0.00905121210962534, -0.7553844451904297, 0.2501465976238251, 0.33317047357559204, 1.2348978519439697, -0.6737375855445862, 0.9868181347846985, 0.5683479309082031, -0.1670597493648529, -0.644092857837677, -0.12825222313404083, 0.36822783946990967, -1.0955374240875244, 0.6959823966026306, 0.8038421273231506, 0.36600494384765625, -0.1643277406692505, -0.5731403231620789, -0.6974303126335144, 1.2604137659072876, -0.08752982318401337, -0.4100831151008606, 0.02613530121743679, 0.2291768193244934, 0.2274956852197647, -0.4598212242126465, 0.30544549226760864, 0.15890012681484222, 0.39334508776664734, 0.28028708696365356, -1.0199037790298462, -0.2691240608692169, -0.17751938104629517, -0.014229501597583294, 0.1623254120349884, -0.671255350112915, 0.9606859683990479, 0.07864662259817123, 0.19707004725933075, 0.4329576790332794, 0.6674189567565918, 0.36175990104675293, 0.04398636147379875, 0.8164424300193787, 0.9859944581985474, 0.30725106596946716, -0.21111871302127838, 0.8633449077606201, -0.15015898644924164, 0.5922513008117676, 0.8254360556602478, -0.06614857912063599, 0.5919569730758667, 0.33970752358436584, -0.0732942447066307, 0.6767009496688843, 0.7062466144561768, -0.011067057028412819, 0.2915271818637848, 0.21685601770877838, -0.3921830356121063, -0.1371064931154251, -0.2592152953147888, -0.6488136053085327, 0.2696841061115265, 0.24923446774482727, -0.47425365447998047, -0.3162129521369934, 0.11017239838838577, 0.25881487131118774, -0.7379657030105591, -0.7606619596481323, 0.828298032283783, 0.16187117993831635, -0.2297903448343277, 0.35035941004753113, 0.07085993885993958, 1.1078797578811646, -1.0809239149093628, 0.2952737808227539, -0.32766997814178467, 0.18919409811496735, -0.31781914830207825, -0.5644705891609192, 0.29219484329223633, -0.09984511137008667, -0.24978293478488922, -0.46117010712623596, 0.862474262714386, -0.5596827864646912, -0.7570410370826721, 0.32478800415992737, 0.14541581273078918, 0.2546810805797577, -0.16668669879436493, -0.8633002638816833, 0.364613801240921, -0.18719951808452606, -0.44091498851776123, 0.7917048931121826, 0.17527592182159424, 0.14598387479782104, 0.5376860499382019, 0.8377904295921326, -0.2456142008304596, -0.03971465304493904, 0.4240550696849823, 0.9643152952194214, -0.74981689453125, -0.4758915901184082, -0.6842985153198242, 0.6115665435791016, -0.005420655943453312, -0.31632015109062195, 0.8099236488342285, 0.5938565135002136, 0.7602207660675049, -0.17183402180671692, 0.139369398355484, -0.4240759611129761, 0.1725841760635376, -0.5652142763137817, 0.8470749258995056, -0.539696455001831, -0.48828086256980896, -0.6630077362060547, -1.4333456754684448, -0.12063165754079819, 0.768841564655304, 0.3050958812236786, 0.4110995829105377, 0.28279775381088257, 0.9957334995269775, -0.15876321494579315, -0.14069102704524994, 0.30302727222442627, 0.22246940433979034, 0.12593017518520355, 0.5906603932380676, 0.7117791175842285, -0.5362903475761414, 0.22702686488628387, -0.5938838124275208, -0.3763243556022644, -0.4660276472568512, -1.0217256546020508, -1.2581392526626587, -0.5837599635124207, -0.3285159170627594, -0.569947361946106, -0.41692250967025757, 1.0751230716705322, 1.201889157295227, -0.6924933791160583, 0.02539183758199215, 0.3761228919029236, -0.06246292591094971, -0.00042966040200553834, -0.32181864976882935, 0.16733916103839874, -0.005651806015521288, -0.8097888827323914, 0.2029918134212494, 0.2549370527267456, 0.3642615079879761, -0.5562741756439209, -0.17913122475147247, -0.09483282268047333, -0.05850610136985779, 0.8109098076820374, 0.022235268726944923, -0.26316481828689575, -0.6201601028442383, -0.3057399094104767, -0.2477542906999588, -0.14158716797828674, 0.938222348690033, -0.7224017381668091, 0.055275578051805496, 0.48689401149749756, 0.4202518165111542, 0.6210246086120605, -0.006978183053433895, 0.45122992992401123, -0.9405446648597717, 0.3641406297683716, -0.051804203540086746, 0.7154489159584045, 0.2356811761856079, -0.05638960376381874, 0.42386138439178467, 0.5339795351028442, -0.4147059917449951, -0.9125750660896301, 0.11422079801559448, -1.0789825916290283, -0.04426039755344391, 0.8031817674636841, 0.08305823057889938, -0.30895674228668213, 0.16459804773330688, -0.13389599323272705, -0.16425108909606934, 0.12211962789297104, 0.551158607006073, 0.8446927666664124, 0.13258615136146545, -0.32603585720062256, -0.5528489947319031, 0.44076940417289734, 0.37042495608329773, -0.6146955490112305, -0.46515578031539917, 0.21513162553310394, 0.44063523411750793, 0.37373366951942444, 0.483361154794693, -0.3056751787662506, 0.2876231074333191, -0.12354309856891632, 0.29372912645339966, -0.1416805535554886, -0.6405446529388428, -0.31207311153411865, -0.05937732011079788, -0.20299388468265533, -0.05847778543829918 ]
tuner007/pegasus_paraphrase
tuner007
"2021-03-22T21:11:33Z"
28,600
154
transformers
[ "transformers", "pytorch", "pegasus", "text2text-generation", "paraphrasing", "seq2seq", "en", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
text2text-generation
"2022-03-02T23:29:05Z"
--- language: en license: apache-2.0 tags: - pegasus - paraphrasing - seq2seq --- ## Model description [PEGASUS](https://github.com/google-research/pegasus) fine-tuned for paraphrasing ## Model in Action 🚀 ``` import torch from transformers import PegasusForConditionalGeneration, PegasusTokenizer model_name = 'tuner007/pegasus_paraphrase' torch_device = 'cuda' if torch.cuda.is_available() else 'cpu' tokenizer = PegasusTokenizer.from_pretrained(model_name) model = PegasusForConditionalGeneration.from_pretrained(model_name).to(torch_device) def get_response(input_text,num_return_sequences,num_beams): batch = tokenizer([input_text],truncation=True,padding='longest',max_length=60, return_tensors="pt").to(torch_device) translated = model.generate(**batch,max_length=60,num_beams=num_beams, num_return_sequences=num_return_sequences, temperature=1.5) tgt_text = tokenizer.batch_decode(translated, skip_special_tokens=True) return tgt_text ``` #### Example: ``` num_beams = 10 num_return_sequences = 10 context = "The ultimate test of your knowledge is your capacity to convey it to another." get_response(context,num_return_sequences,num_beams) # output: ['The test of your knowledge is your ability to convey it.', 'The ability to convey your knowledge is the ultimate test of your knowledge.', 'The ability to convey your knowledge is the most important test of your knowledge.', 'Your capacity to convey your knowledge is the ultimate test of it.', 'The test of your knowledge is your ability to communicate it.', 'Your capacity to convey your knowledge is the ultimate test of your knowledge.', 'Your capacity to convey your knowledge to another is the ultimate test of your knowledge.', 'Your capacity to convey your knowledge is the most important test of your knowledge.', 'The test of your knowledge is how well you can convey it.', 'Your capacity to convey your knowledge is the ultimate test.'] ``` > Created by [Arpit Rajauria](https://twitter.com/arpit_rajauria) [![Twitter icon](https://cdn0.iconfinder.com/data/icons/shift-logotypes/32/Twitter-32.png)](https://twitter.com/arpit_rajauria)
[ -0.3707813322544098, -0.8063151836395264, 0.18801772594451904, 0.40291455388069153, -0.42323553562164307, -0.2503494918346405, -0.22169053554534912, -0.18367555737495422, 0.16368809342384338, 0.4384698271751404, -0.43473151326179504, -0.44891154766082764, -0.7113066911697388, 0.06239008530974388, -0.5354567170143127, 1.0901048183441162, -0.19400113821029663, -0.09885615110397339, 0.0730496495962143, -0.08691873401403427, -0.5023086667060852, -0.2967086136341095, -0.8773980140686035, -0.41401928663253784, 0.266154944896698, 0.35220810770988464, 0.38772690296173096, 0.525202751159668, 0.5287588834762573, 0.3875083327293396, -0.06682275980710983, 0.18600979447364807, -0.17360861599445343, 0.1232098788022995, -0.20746038854122162, -0.28373196721076965, -0.2543941140174866, -0.1381722390651703, 0.695023238658905, 0.5154341459274292, 0.07975739240646362, 0.6020470261573792, 0.27006012201309204, 0.18137997388839722, -0.4758302867412567, 0.47584789991378784, -0.5675645470619202, -0.16639432311058044, -0.12612558901309967, -0.3139696717262268, -0.26326102018356323, -0.27397269010543823, -0.16314679384231567, -0.8112183213233948, 0.276268869638443, 0.00035713909892365336, 1.301141381263733, 0.29580777883529663, -0.38859254121780396, -0.2111714482307434, -0.4109569787979126, 0.953490674495697, -0.7537776231765747, 0.1767738163471222, 0.3422924280166626, 0.4456949234008789, 0.1510821431875229, -1.3495830297470093, -0.7861690521240234, -0.22481276094913483, -0.1508023738861084, 0.2593558430671692, 0.03404887020587921, -0.10080373287200928, 0.32098808884620667, 0.34779712557792664, -0.3844379186630249, -0.29349496960639954, -0.5875622034072876, -0.2849358916282654, 0.49925243854522705, 0.45124733448028564, 0.32938069105148315, -0.11264745891094208, -0.27780094742774963, -0.28690120577812195, -0.2807956039905548, 0.10004846751689911, 0.08876562863588333, 0.25085708498954773, -0.21957428753376007, 0.6331214904785156, -0.40777838230133057, 0.8126664757728577, 0.27425065636634827, -0.09836920350790024, 0.23640261590480804, -0.37852969765663147, -0.2774547040462494, -0.13914567232131958, 1.066210150718689, 0.2825743854045868, 0.13286839425563812, -0.23011328279972076, -0.05797472968697548, -0.15828250348567963, 0.20950812101364136, -0.7971183657646179, -0.18148133158683777, 0.18632058799266815, -0.34945979714393616, -0.4184643626213074, 0.08605419844388962, -0.9248325824737549, -0.1952010840177536, 0.12484728544950485, 0.8583477139472961, -0.6447417736053467, -0.1450437307357788, 0.18030385673046112, -0.37963393330574036, 0.4020415246486664, -0.10297401249408722, -1.3527203798294067, 0.30893853306770325, 0.6115537285804749, 0.8629649877548218, 0.31544849276542664, -0.7188953161239624, -0.30745843052864075, 0.2407165914773941, -0.17790953814983368, 0.45124951004981995, -0.2997981607913971, -0.24566833674907684, -0.27410373091697693, 0.0006242021336220205, -0.4332715570926666, -0.2588839530944824, 0.8643495440483093, -0.2399693727493286, 0.5172673463821411, -0.5744839906692505, -0.7237306237220764, -0.24519136548042297, -0.024202417582273483, -0.38171085715293884, 0.9823073744773865, 0.20555387437343597, -1.0473047494888306, 0.19273799657821655, -0.9034724235534668, -0.37500786781311035, 0.10978968441486359, -0.27998098731040955, -0.45281463861465454, -0.04124216362833977, 0.2659451961517334, 0.5340754389762878, -0.3837970197200775, 0.014232422225177288, -0.18954433500766754, -0.2785159647464752, 0.33767980337142944, -0.2473609447479248, 0.9791284203529358, 0.24926500022411346, -0.8824464082717896, 0.21972312033176422, -0.5880604386329651, 0.20923131704330444, 0.20759832859039307, -0.29502901434898376, 0.18569883704185486, -0.047919027507305145, 0.07335440069437027, 0.17079129815101624, 0.30268698930740356, -0.4833814203739166, 0.10381554067134857, -0.6063562631607056, 0.6358130574226379, 0.7347707152366638, 0.18063168227672577, 0.21193787455558777, -0.6502060890197754, 0.3207070231437683, 0.02313985861837864, 0.06443772464990616, 0.11165839433670044, -0.5387357473373413, -1.0909652709960938, -0.007600218988955021, -0.025593949481844902, 0.5724625587463379, -0.9076279997825623, 0.4928155243396759, -0.4128798544406891, -0.8510023355484009, -0.5978758335113525, 0.07108897715806961, 0.4648405909538269, 1.017037272453308, 0.47576797008514404, 0.07633163034915924, -0.578452467918396, -0.898698627948761, -0.41102251410484314, -0.3688085973262787, 0.052655111998319626, 0.0011846760753542185, 0.7524347305297852, 0.15474271774291992, 0.39264824986457825, -0.566535234451294, -0.07684323936700821, -0.42234697937965393, 0.13122329115867615, 0.42840567231178284, 0.5948968529701233, 0.5439984798431396, -0.7880359888076782, -0.4569724500179291, 0.019033875316381454, -0.8725070357322693, -0.13096816837787628, -0.1712246984243393, -0.3063237965106964, -0.021665483713150024, 0.1856459379196167, -0.9005736112594604, 0.41347557306289673, 0.09106438606977463, -0.7514625787734985, 0.7645608186721802, -0.10429593175649643, 0.4003840982913971, -1.4149433374404907, 0.2237820327281952, -0.1647351086139679, 0.1938013732433319, -0.5241342782974243, 0.4433242082595825, -0.01569051295518875, 0.19524472951889038, -0.5310725569725037, 0.9857059717178345, -0.3179939389228821, 0.4978305399417877, -0.08434896916151047, -0.02271055430173874, -0.038448818027973175, 0.31829291582107544, -0.1899302899837494, 0.8269720673561096, 0.7821919918060303, -0.868374764919281, 0.9337567687034607, 0.5453429222106934, -0.4045675992965698, 0.31567442417144775, -0.8906781673431396, -0.08337519317865372, 0.06891056150197983, -0.1458815038204193, -1.2464351654052734, -0.34195247292518616, 0.47805678844451904, -0.8268527388572693, 0.06294087320566177, 0.31608766317367554, -0.5841650366783142, -0.6784478425979614, -0.30866625905036926, 0.19024015963077545, 0.6343066096305847, -0.5276893377304077, 0.5334869027137756, 0.019434405490756035, 0.006179594900459051, -0.7635626196861267, -0.9160334467887878, -0.030424319207668304, -0.633897602558136, -0.7543767094612122, 0.5569647550582886, -0.13199393451213837, 0.014430555514991283, -0.34589844942092896, 0.09893182665109634, -0.2704468369483948, 0.058841366320848465, 0.36677125096321106, 0.2950725853443146, -0.24250151216983795, 0.05397319793701172, -0.07299552112817764, 0.060303181409835815, 0.3436657190322876, -0.4599069356918335, 0.6596643924713135, -0.44841504096984863, -0.23432797193527222, -0.617565393447876, 0.010201187804341316, 0.5805807113647461, -0.055792853236198425, 1.0657373666763306, 1.119185447692871, -0.3179478049278259, -0.0014651661040261388, -0.547820508480072, -0.24168558418750763, -0.5293517112731934, 0.4315730631351471, -0.5510753989219666, -0.4575202465057373, 0.7829902768135071, 0.30417439341545105, 0.14119084179401398, 0.8343338370323181, 0.6957404017448425, 0.07236523181200027, 0.8905072212219238, 0.43150267004966736, 0.013497662730515003, 0.24420827627182007, -0.6545078754425049, 0.1297948956489563, -0.763380229473114, -0.33395814895629883, -0.385237455368042, -0.20104746520519257, -0.30941569805145264, -0.14978332817554474, 0.18644341826438904, 0.19168788194656372, -0.5298165082931519, 0.48952701687812805, -0.7128156423568726, 0.1267164945602417, 0.7739421725273132, 0.16981825232505798, 0.05443137511610985, -0.07755325734615326, -0.4455505311489105, -0.1251443773508072, -0.5490471720695496, -0.7995742559432983, 1.1434860229492188, 0.17999692261219025, 0.4797482490539551, 0.09658091515302658, 0.6359139084815979, -0.07163173705339432, 0.1688338965177536, -0.6193217039108276, 0.7972369194030762, 0.10017625987529755, -0.8846534490585327, -0.39268168807029724, -0.4453200399875641, -0.850411057472229, 0.16407543420791626, -0.04504835978150368, -0.8510013222694397, -0.4548035264015198, 0.004096028860658407, -0.4323059916496277, 0.544461727142334, -0.6431519985198975, 0.9789189100265503, -0.16813114285469055, -0.3301866054534912, 0.13546013832092285, -0.5188378095626831, 0.4280198812484741, -0.014314909465610981, -0.0636480301618576, 0.14493432641029358, -0.18180681765079498, 1.2099761962890625, -0.5177237391471863, 0.8169417381286621, 0.022141410037875175, 0.3078436851501465, 0.4274713695049286, -0.2440910041332245, 0.24538004398345947, 0.08357647806406021, -0.23936322331428528, -0.3570139408111572, 0.24741950631141663, -0.6490484476089478, -0.4107508063316345, 0.6211923956871033, -0.9538354277610779, -0.6147323846817017, -0.34234216809272766, -0.3994533121585846, -0.016477074474096298, 0.29434525966644287, 0.8624258637428284, 0.4739505350589752, -0.13922518491744995, 0.04305858910083771, 0.39149680733680725, -0.1946905106306076, 0.5845267176628113, 0.164589524269104, -0.14483968913555145, -0.5174500346183777, 0.9442527890205383, 0.06090991571545601, 0.09656500816345215, 0.4291607141494751, 0.15735085308551788, -0.5579270720481873, -0.39837655425071716, -0.28354522585868835, 0.4575885534286499, -0.8864604234695435, -0.11699432134628296, -0.7351295351982117, -0.3969503343105316, -0.8911692500114441, -0.01013295166194439, -0.1170128807425499, -0.5792315602302551, -0.48102515935897827, -0.16562287509441376, 0.4473198354244232, 0.5184005498886108, -0.08758869767189026, 0.6219374537467957, -0.5949757099151611, 0.41892582178115845, 0.4145224690437317, 0.03178025409579277, 0.044805996119976044, -0.8424502015113831, -0.1509900987148285, 0.08951921761035919, -0.782623827457428, -0.9460841417312622, 0.6499297618865967, 0.11739931255578995, 0.8173706531524658, 0.4235021770000458, 0.09341687709093094, 0.6809587478637695, -0.17868788540363312, 0.9019241333007812, 0.1857757568359375, -1.188633918762207, 0.5353538393974304, -0.22879379987716675, 0.12497308850288391, 0.41359445452690125, 0.2860393226146698, -0.6560593247413635, -0.4911592900753021, -0.9335823655128479, -0.8924627900123596, 0.5575430393218994, 0.459172785282135, 0.3590571880340576, -0.18753765523433685, 0.47899433970451355, -0.018131190910935402, 0.16230639815330505, -0.8341935873031616, -0.6090006232261658, -0.42033591866493225, -0.36567026376724243, -0.015562501735985279, -0.03657304495573044, -0.18765529990196228, -0.6011701822280884, 0.8507499694824219, 0.12481082230806351, 0.5663115978240967, 0.16371594369411469, 0.06823448091745377, 0.1689555048942566, 0.215420201420784, 0.7306017279624939, 0.8341324329376221, -0.2258840799331665, 0.2533228397369385, 0.50176602602005, -0.5885616540908813, 0.08636116981506348, 0.16309480369091034, -0.039643239229917526, 0.18389201164245605, 0.640742301940918, 0.9881681203842163, -0.18361680209636688, -0.2918405532836914, 0.38078242540359497, -0.055055469274520874, -0.3027918338775635, -0.4328673481941223, 0.18845941126346588, 0.24800311028957367, 0.1739288568496704, 0.39021241664886475, -0.08761013299226761, 0.03489743918180466, -0.2452707439661026, 0.2800341248512268, 0.1417265683412552, -0.26038697361946106, -0.2908199727535248, 1.1891121864318848, 0.048776473850011826, -0.194696843624115, 0.5485928058624268, -0.15650784969329834, -0.6868807077407837, 0.8713735342025757, 0.47940099239349365, 0.8049231767654419, -0.13449043035507202, 0.3777752220630646, 0.54934161901474, 0.3097771108150482, -0.16532538831233978, 0.5030652284622192, -0.09413615614175797, -0.4784998893737793, -0.2717151641845703, -0.6610637307167053, -0.18074537813663483, 0.3967939019203186, -0.6547055840492249, 0.35842543840408325, -0.6010275483131409, -0.3180563449859619, 0.2558117210865021, 0.19213378429412842, -0.6596428155899048, 0.4330909848213196, -0.09154161810874939, 1.0103007555007935, -0.79561847448349, 0.7897028923034668, 0.8045715689659119, -0.7081503868103027, -1.2404909133911133, -0.1434778869152069, -0.3747099041938782, -0.8856156468391418, 0.9444476366043091, 0.10736411064863205, 0.284103661775589, 0.2739090025424957, -0.5104519724845886, -0.7279633283615112, 1.1806995868682861, 0.2575945556163788, 0.02120397984981537, -0.16443175077438354, 0.2861611843109131, 0.47360166907310486, -0.28280386328697205, 0.6600062251091003, 0.3871364891529083, 0.6666496396064758, 0.23354969918727875, -0.9124350547790527, 0.34453821182250977, -0.3712885081768036, -0.1442638784646988, 0.06025833263993263, -0.6819926500320435, 1.181532382965088, -0.28983786702156067, -0.08835409581661224, 0.3574540317058563, 0.8973105549812317, 0.38694876432418823, 0.30165934562683105, 0.19981124997138977, 0.6329221129417419, 0.5560961961746216, -0.22805717587471008, 0.947598934173584, -0.4457070231437683, 0.6724674105644226, 0.8910370469093323, 0.3540290892124176, 0.7053816914558411, 0.5574206113815308, 0.03568074107170105, 0.36489352583885193, 0.7015200257301331, -0.09917938709259033, 0.5383481979370117, 0.25506189465522766, -0.3087654709815979, -0.06778659671545029, 0.1527450829744339, -0.6788442134857178, 0.29320815205574036, 0.33675456047058105, -0.5243186950683594, -0.20860163867473602, 0.09070821106433868, 0.18314021825790405, -0.0651511549949646, -0.16950003802776337, 0.37536847591400146, -0.016593124717473984, -0.7710966467857361, 1.0840383768081665, 0.0940198004245758, 0.8186306953430176, -0.5036221742630005, 0.10931206494569778, -0.10182985663414001, 0.32635927200317383, -0.009323709644377232, -0.8844136595726013, 0.3936568796634674, -0.20926591753959656, 0.020779145881533623, -0.1660856306552887, 0.4737693667411804, -0.34471091628074646, -0.7233813405036926, 0.26131540536880493, 0.32992202043533325, 0.413459837436676, -0.16227944195270538, -0.9195045232772827, -0.22321978211402893, 0.08208521455526352, -0.4188704788684845, -0.12299118936061859, 0.4519841969013214, 0.3074071407318115, 0.7804739475250244, 0.34961071610450745, 0.2391529083251953, 0.4489966332912445, -0.10134299844503403, 0.77634197473526, -0.850109875202179, -0.32260963320732117, -1.0716993808746338, 0.3478352725505829, -0.1666923314332962, -0.6369855999946594, 0.8807248473167419, 0.5534159541130066, 0.635337233543396, -0.3037978410720825, 0.8836299180984497, -0.30946436524391174, 0.46488115191459656, -0.4464089870452881, 0.8651075959205627, -0.4408998191356659, 0.08414028584957123, -0.21481718122959137, -0.7109975218772888, 0.0015602095518261194, 0.6768882870674133, -0.4733569920063019, 0.2300868183374405, 0.916049063205719, 0.7280327677726746, -0.04359753057360649, -0.10315566509962082, 0.3582131862640381, 0.3626534640789032, 0.3894892930984497, 0.8856317400932312, 0.8228153586387634, -0.9481922388076782, 0.8681261539459229, -0.7299232482910156, 0.021170254796743393, -0.06832478940486908, -0.5615955591201782, -1.1488317251205444, -1.0744178295135498, -0.39634379744529724, -0.7034159898757935, -0.09627290815114975, 0.6074568033218384, 0.7276272773742676, -0.7813196182250977, -0.2752736508846283, -0.2623339295387268, 0.15438997745513916, -0.3528828024864197, -0.3341280519962311, 0.4962084889411926, -0.41673150658607483, -0.714128851890564, -0.035634297877550125, -0.2066352814435959, 0.31019774079322815, 0.176331028342247, -0.009455233812332153, -0.1859772503376007, 0.1225009560585022, 0.30807459354400635, 0.29078608751296997, -0.7594524621963501, -0.35750171542167664, 0.04761898145079613, -0.3494800329208374, -0.2626616656780243, 0.27145570516586304, -0.5294800996780396, 0.15800884366035461, 0.6064119935035706, 0.41776609420776367, 0.4922230541706085, -0.1346808224916458, 0.3352753221988678, -0.4680042266845703, 0.08278711140155792, 0.21371816098690033, 0.45959365367889404, 0.20565907657146454, -0.46024972200393677, 0.46332815289497375, 0.32851606607437134, -0.5536211729049683, -0.7272233366966248, -0.0187032800167799, -1.014449119567871, -0.24501340091228485, 1.0642205476760864, -0.193122997879982, -0.33450666069984436, 0.03738068416714668, -0.35114040970802307, 0.8521358370780945, -0.21775254607200623, 0.9995480179786682, 0.8782845139503479, -0.07169929891824722, 0.01609726808965206, -0.7087337374687195, 0.4539705216884613, 0.6607582569122314, -0.745012104511261, -0.19715848565101624, -0.047811929136514664, 0.5573238134384155, 0.29461580514907837, 0.5840355753898621, 0.10705647617578506, 0.22004789113998413, 0.09115492552518845, 0.022359952330589294, -0.14298276603221893, 0.11104197800159454, 0.01260130200535059, 0.15392762422561646, -0.09408639371395111, -0.7128559947013855 ]
shibing624/macbert4csc-base-chinese
shibing624
"2023-10-09T03:23:54Z"
28,500
69
transformers
[ "transformers", "pytorch", "onnx", "safetensors", "bert", "fill-mask", "zh", "arxiv:2004.13922", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: - zh tags: - bert - pytorch - zh license: "apache-2.0" --- # MacBERT for Chinese Spelling Correction(macbert4csc) Model 中文拼写纠错模型 `macbert4csc-base-chinese` evaluate SIGHAN2015 test data: - Char Level: precision:0.9372, recall:0.8640, f1:0.8991 - Sentence Level: precision:0.8264, recall:0.7366, f1:0.7789 由于训练使用的数据使用了SIGHAN2015的训练集(复现paper),在SIGHAN2015的测试集上达到SOTA水平。 模型结构,魔改于softmaskedbert: ![arch](arch1.png) ## Usage 本项目开源在中文文本纠错项目:[pycorrector](https://github.com/shibing624/pycorrector),可支持macbert4csc模型,通过如下命令调用: ```python from pycorrector.macbert.macbert_corrector import MacBertCorrector nlp = MacBertCorrector("shibing624/macbert4csc-base-chinese").macbert_correct i = nlp('今天新情很好') print(i) ``` 当然,你也可使用官方的huggingface/transformers调用: *Please use 'Bert' related functions to load this model!* ```python import operator import torch from transformers import BertTokenizer, BertForMaskedLM device = torch.device("cuda" if torch.cuda.is_available() else "cpu") tokenizer = BertTokenizer.from_pretrained("shibing624/macbert4csc-base-chinese") model = BertForMaskedLM.from_pretrained("shibing624/macbert4csc-base-chinese") model.to(device) texts = ["今天新情很好", "你找到你最喜欢的工作,我也很高心。"] with torch.no_grad(): outputs = model(**tokenizer(texts, padding=True, return_tensors='pt').to(device)) def get_errors(corrected_text, origin_text): sub_details = [] for i, ori_char in enumerate(origin_text): if ori_char in [' ', '“', '”', '‘', '’', '琊', '\n', '…', '—', '擤']: # add unk word corrected_text = corrected_text[:i] + ori_char + corrected_text[i:] continue if i >= len(corrected_text): continue if ori_char != corrected_text[i]: if ori_char.lower() == corrected_text[i]: # pass english upper char corrected_text = corrected_text[:i] + ori_char + corrected_text[i + 1:] continue sub_details.append((ori_char, corrected_text[i], i, i + 1)) sub_details = sorted(sub_details, key=operator.itemgetter(2)) return corrected_text, sub_details result = [] for ids, text in zip(outputs.logits, texts): _text = tokenizer.decode(torch.argmax(ids, dim=-1), skip_special_tokens=True).replace(' ', '') corrected_text = _text[:len(text)] corrected_text, details = get_errors(corrected_text, text) print(text, ' => ', corrected_text, details) result.append((corrected_text, details)) print(result) ``` output: ```shell 今天新情很好 => 今天心情很好 [('新', '心', 2, 3)] 你找到你最喜欢的工作,我也很高心。 => 你找到你最喜欢的工作,我也很高兴。 [('心', '兴', 15, 16)] ``` 模型文件组成: ``` macbert4csc-base-chinese ├── config.json ├── added_tokens.json ├── pytorch_model.bin ├── special_tokens_map.json ├── tokenizer_config.json └── vocab.txt ``` ### 训练数据集 #### SIGHAN+Wang271K中文纠错数据集 | 数据集 | 语料 | 下载链接 | 压缩包大小 | | :------- | :--------- | :---------: | :---------: | | **`SIGHAN+Wang271K中文纠错数据集`** | SIGHAN+Wang271K(27万条) | [百度网盘(密码01b9)](https://pan.baidu.com/s/1BV5tr9eONZCI0wERFvr0gQ)| 106M | | **`原始SIGHAN数据集`** | SIGHAN13 14 15 | [官方csc.html](http://nlp.ee.ncu.edu.tw/resource/csc.html)| 339K | | **`原始Wang271K数据集`** | Wang271K | [Automatic-Corpus-Generation dimmywang提供](https://github.com/wdimmy/Automatic-Corpus-Generation/blob/master/corpus/train.sgml)| 93M | SIGHAN+Wang271K中文纠错数据集,数据格式: ```json [ { "id": "B2-4029-3", "original_text": "晚间会听到嗓音,白天的时候大家都不会太在意,但是在睡觉的时候这嗓音成为大家的恶梦。", "wrong_ids": [ 5, 31 ], "correct_text": "晚间会听到噪音,白天的时候大家都不会太在意,但是在睡觉的时候这噪音成为大家的恶梦。" }, ] ``` ```shell macbert4csc ├── config.json ├── pytorch_model.bin ├── special_tokens_map.json ├── tokenizer_config.json └── vocab.txt ``` 如果需要训练macbert4csc,请参考[https://github.com/shibing624/pycorrector/tree/master/pycorrector/macbert](https://github.com/shibing624/pycorrector/tree/master/pycorrector/macbert) ### About MacBERT **MacBERT** is an improved BERT with novel **M**LM **a**s **c**orrection pre-training task, which mitigates the discrepancy of pre-training and fine-tuning. Here is an example of our pre-training task. | task | Example | | -------------- | ----------------- | | **Original Sentence** | we use a language model to predict the probability of the next word. | | **MLM** | we use a language [M] to [M] ##di ##ct the pro [M] ##bility of the next word . | | **Whole word masking** | we use a language [M] to [M] [M] [M] the [M] [M] [M] of the next word . | | **N-gram masking** | we use a [M] [M] to [M] [M] [M] the [M] [M] [M] [M] [M] next word . | | **MLM as correction** | we use a text system to ca ##lc ##ulate the po ##si ##bility of the next word . | Except for the new pre-training task, we also incorporate the following techniques. - Whole Word Masking (WWM) - N-gram masking - Sentence-Order Prediction (SOP) **Note that our MacBERT can be directly replaced with the original BERT as there is no differences in the main neural architecture.** For more technical details, please check our paper: [Revisiting Pre-trained Models for Chinese Natural Language Processing](https://arxiv.org/abs/2004.13922) ## Citation ```latex @software{pycorrector, author = {Xu Ming}, title = {pycorrector: Text Error Correction Tool}, year = {2021}, url = {https://github.com/shibing624/pycorrector}, } ```
[ -0.17739585041999817, -0.6525996923446655, 0.02804131619632244, 0.35463812947273254, -0.2472670078277588, -0.15407706797122955, -0.3731923997402191, -0.3380209505558014, 0.3656899034976959, 0.3585129678249359, -0.5532510876655579, -0.7693575620651245, -0.5678638815879822, 0.3002055585384369, -0.0329168327152729, 1.140773892402649, -0.20390522480010986, 0.10411079972982407, 0.37626343965530396, -0.09313345700502396, -0.23878654837608337, -0.7280886769294739, -0.7155126929283142, -0.12993159890174866, 0.4683467745780945, 0.2566344439983368, 0.5206746459007263, 0.44191616773605347, 0.5133566856384277, 0.342851459980011, -0.10022681206464767, 0.30635520815849304, -0.21276190876960754, -0.37019577622413635, 0.332171767950058, -0.5255882143974304, -0.611673891544342, 0.14230500161647797, 0.6443222761154175, 0.4685208797454834, 0.02423020824790001, 0.1383967101573944, 0.17415747046470642, 0.5636512041091919, -0.5091750621795654, 0.03434136137366295, -0.6703124642372131, 0.047830868512392044, -0.4094436466693878, -0.13988536596298218, -0.32935747504234314, -0.3032231628894806, -0.03239550068974495, -0.642194390296936, 0.32903891801834106, 0.047096896916627884, 1.5243597030639648, 0.00449913227930665, -0.19607490301132202, -0.3708415925502777, -0.2645266354084015, 0.8446882963180542, -1.1385083198547363, 0.06783491373062134, 0.3135334253311157, -0.07885408401489258, -0.29486116766929626, -1.2289865016937256, -0.823573887348175, -0.18846483528614044, -0.3579426407814026, 0.42008960247039795, 0.08906818926334381, 0.1444765329360962, 0.3819475769996643, 0.29265332221984863, -0.47577187418937683, -0.21209771931171417, -0.533009946346283, -0.5507867336273193, 0.5608973503112793, -0.04278472438454628, 0.47171077132225037, -0.40681952238082886, -0.19660906493663788, -0.31656455993652344, -0.3381879925727844, 0.3612411618232727, 0.4013608396053314, 0.2707613408565521, -0.19526921212673187, 0.5348643064498901, -0.001624140772037208, 0.5910097360610962, 0.13099902868270874, -0.24345672130584717, 0.7022899985313416, -0.32474350929260254, -0.38088271021842957, 0.12823134660720825, 1.2537134885787964, 0.2871652841567993, 0.1451537162065506, 0.11133572459220886, -0.2022208273410797, -0.045341018587350845, -0.21845665574073792, -0.6894851326942444, -0.6410860419273376, 0.3415661156177521, -0.5846130847930908, -0.25015565752983093, 0.21469193696975708, -0.4098755717277527, 0.12273480743169785, 0.019415762275457382, 0.6448783278465271, -0.66764897108078, -0.1199125349521637, 0.11068209260702133, -0.18562477827072144, 0.0034022722393274307, -0.0036257831379771233, -0.9645915627479553, -0.018689604476094246, 0.3918750286102295, 0.8234676718711853, 0.16842907667160034, -0.5938255190849304, -0.3898778259754181, -0.05570707470178604, -0.3290086090564728, 0.2620057463645935, -0.031859517097473145, -0.16047342121601105, -0.04137341305613518, 0.30282628536224365, -0.24186910688877106, -0.37873756885528564, 0.7392590641975403, -0.25916120409965515, 0.4748496413230896, -0.38954177498817444, -0.2482059746980667, -0.277194619178772, 0.2529957592487335, -0.5148897171020508, 1.3371038436889648, -0.034026920795440674, -1.186180591583252, 0.24315610527992249, -0.6438462734222412, -0.5797922611236572, -0.12589971721172333, 0.08666941523551941, -0.5172473788261414, -0.29208049178123474, 0.5711687803268433, 0.5668672323226929, 0.13769231736660004, 0.10576662421226501, 0.09532791376113892, -0.35891658067703247, 0.40979692339897156, -0.2643258571624756, 1.2634146213531494, 0.2652583420276642, -0.6143838167190552, 0.3384144604206085, -0.8606220483779907, 0.08696954697370529, 0.14505253732204437, -0.49196934700012207, -0.06770582497119904, -0.17389778792858124, 0.23374557495117188, 0.3193007707595825, 0.5935039520263672, -0.5494490265846252, 0.09304293990135193, -0.7100354433059692, 0.603364884853363, 0.7353561520576477, -0.23357239365577698, 0.19672995805740356, -0.33571895956993103, 0.265485942363739, 0.2008109837770462, 0.1337970644235611, -0.2574014365673065, -0.5505956411361694, -1.116062879562378, -0.32856762409210205, 0.456172913312912, 0.7360922694206238, -0.8476618528366089, 0.765226423740387, -0.14863252639770508, -0.5020855069160461, -0.6455426216125488, 0.05751998350024223, 0.37044644355773926, 0.5290291905403137, 0.5901378989219666, -0.23330987989902496, -0.8311544060707092, -0.6019858121871948, -0.22590325772762299, -0.25784754753112793, 0.03743515908718109, 0.15375611186027527, 0.5548774600028992, -0.46143823862075806, 0.6865753531455994, -0.4989277422428131, -0.4342762231826782, -0.38408127427101135, 0.3219830095767975, 0.5682728290557861, 0.5751161575317383, 0.4811323285102844, -0.5358918905258179, -0.5365843772888184, -0.09143558144569397, -0.6024636626243591, -0.1401955783367157, -0.30396661162376404, -0.37361523509025574, 0.5706198215484619, 0.42456936836242676, -0.399207204580307, 0.38965392112731934, 0.4805758595466614, -0.19436146318912506, 0.8137620091438293, -0.5117917656898499, 0.09749297797679901, -1.2716636657714844, 0.19647124409675598, -0.22678807377815247, 0.07377632707357407, -0.6041250824928284, -0.010089934803545475, 0.3351517915725708, 0.25019341707229614, -0.4298153519630432, 0.40575242042541504, -0.5879523158073425, 0.3933618366718292, -0.08469375222921371, 0.38274186849594116, -0.04606987163424492, 0.6880475282669067, -0.03686618432402611, 0.5837754607200623, 0.5259178280830383, -0.7703436017036438, 0.330803245306015, 0.33834296464920044, -0.24408632516860962, -0.19560909271240234, -0.5690121054649353, -0.07350924611091614, 0.08699528127908707, 0.36895298957824707, -1.1079646348953247, -0.11155756562948227, 0.6091959476470947, -0.781373918056488, 0.21386611461639404, 0.21956026554107666, -0.48999226093292236, -0.6242654323577881, -0.4805412292480469, 0.24617958068847656, 0.43734753131866455, -0.6582289338111877, 0.48062247037887573, 0.024685941636562347, 0.05387784168124199, -0.9973640441894531, -0.9884268641471863, 0.11500436812639236, 0.11842156201601028, -0.7855809926986694, 0.5845710635185242, -0.07359051704406738, 0.1792135089635849, -0.1591477245092392, 0.1267702579498291, 0.08854255080223083, -0.039005666971206665, 0.061818335205316544, 0.5293152928352356, -0.27274858951568604, -0.02057046815752983, -0.10345607995986938, -0.04036158323287964, -0.04885038360953331, -0.21928569674491882, 0.5981769561767578, -0.06617235392332077, -0.06296982616186142, -0.5866325497627258, -0.03513319045305252, 0.33215728402137756, -0.40778103470802307, 0.7830244302749634, 1.0842748880386353, -0.3297652304172516, 0.1842118799686432, -0.5713709592819214, -0.10200555622577667, -0.5307278633117676, 0.4807960093021393, -0.4098058342933655, -0.7035475373268127, 0.5684202909469604, 0.22623562812805176, 0.2797686755657196, 0.8992336392402649, 0.4476584494113922, -0.03434806689620018, 0.9516081809997559, 0.4091164767742157, -0.2632612884044647, 0.4509238600730896, -0.5638811588287354, 0.4645533263683319, -0.8638327121734619, -0.24288110435009003, -0.44420725107192993, -0.27301836013793945, -0.8098591566085815, -0.23121203482151031, 0.09228899329900742, 0.27112138271331787, -0.19451089203357697, 0.470384806394577, -0.8455085754394531, -0.06043410301208496, 0.7282635569572449, 0.1702868491411209, -0.08329860121011734, -0.02330932952463627, -0.5613790154457092, -0.1679621785879135, -0.6209909319877625, -0.5541414618492126, 1.0164213180541992, 0.2616272568702698, 0.4930957853794098, -0.10007455199956894, 0.7604852318763733, -0.17176763713359833, 0.12914343178272247, -0.5763394236564636, 0.6309854984283447, -0.31418055295944214, -0.5474837422370911, -0.2364615648984909, -0.3628741204738617, -0.9813517928123474, 0.24952751398086548, -0.38800564408302307, -0.9016693830490112, 0.07140631973743439, 0.09066297113895416, -0.32977306842803955, 0.48817962408065796, -0.751128077507019, 0.9808809161186218, -0.4113885462284088, -0.17280641198158264, 0.0010882799979299307, -0.8277323842048645, 0.49104073643684387, 0.15928952395915985, 0.1683991253376007, 0.012777645140886307, 0.07121948152780533, 1.0959248542785645, -0.609291672706604, 0.6745648384094238, -0.05064092576503754, -0.041371800005435944, 0.3083030581474304, -0.2658063471317291, 0.563277006149292, -0.13630862534046173, -0.09135754406452179, 0.37631717324256897, 0.18738819658756256, -0.3866758644580841, -0.28987956047058105, 0.6887503862380981, -0.8930007815361023, -0.4887121319770813, -0.7695287466049194, -0.419590026140213, 0.2308758646249771, 0.35961273312568665, 0.8060958385467529, 0.4089716076850891, 0.0780244842171669, -0.002955974778160453, 0.3100566267967224, -0.576017439365387, 0.6299290657043457, 0.2329431176185608, -0.24720919132232666, -0.6812670826911926, 0.9300190210342407, 0.2884441614151001, 0.06236753985285759, 0.4547216594219208, 0.1352667659521103, -0.2814176082611084, -0.42541345953941345, -0.26759299635887146, 0.46415191888809204, -0.7111940383911133, 0.01548958569765091, -0.9756420850753784, -0.4513946771621704, -0.9007720947265625, -0.04715098813176155, -0.045540545135736465, -0.42109763622283936, -0.5392345190048218, 0.054098181426525116, 0.32014864683151245, 0.36568474769592285, -0.14902910590171814, 0.4385540783405304, -0.8308994174003601, 0.3438812494277954, -0.04662713035941124, -0.0338207446038723, 0.005935555789619684, -0.6847671270370483, -0.49449846148490906, 0.19434663653373718, -0.5292090177536011, -0.7054400444030762, 0.7353601455688477, 0.08815543353557587, 0.4194372594356537, 0.43334299325942993, 0.19863639771938324, 0.9092009663581848, -0.4633086621761322, 1.1711639165878296, 0.3579675257205963, -1.1216493844985962, 0.5554371476173401, -0.0005024165147915483, 0.21140938997268677, 0.2946421205997467, 0.2111728936433792, -0.8168403506278992, -0.41683101654052734, -0.7476752996444702, -1.1171410083770752, 1.1222844123840332, 0.34014734625816345, 0.11441975831985474, -0.058569349348545074, 0.24693845212459564, -0.12161574512720108, 0.046607546508312225, -0.9661427140235901, -0.6514220833778381, -0.5257591009140015, -0.4152235984802246, -0.22489474713802338, -0.37925052642822266, 0.05171060934662819, -0.4839150905609131, 1.2006593942642212, 0.10169902443885803, 0.43285924196243286, 0.5416778326034546, -0.19822853803634644, 0.1946844607591629, 0.038802217692136765, 0.7163366079330444, 0.4820236265659332, -0.3225877583026886, 0.13103844225406647, 0.42290106415748596, -0.8508206605911255, -0.1885724812746048, 0.15614521503448486, -0.10001695901155472, 0.39816832542419434, 0.4337279498577118, 0.9045200347900391, 0.021314967423677444, -0.4611508548259735, 0.5114213228225708, -0.09556900709867477, -0.4477221667766571, -0.4282175898551941, -0.053587473928928375, 0.06830380856990814, -0.026875168085098267, 0.4672744870185852, 0.17151427268981934, -0.08301232755184174, -0.49018001556396484, 0.04574750363826752, 0.2653249502182007, -0.14277824759483337, -0.13957279920578003, 0.7859829068183899, 0.02485642582178116, -0.27360522747039795, 0.551718533039093, -0.16278031468391418, -0.9730337858200073, 0.6203221678733826, 0.5617322325706482, 0.7836201786994934, -0.006495153531432152, 0.0990629494190216, 0.844190239906311, 0.5368207097053528, -0.17553792893886566, 0.29189395904541016, 0.07559489458799362, -0.7655029296875, -0.2051289975643158, -0.5222283601760864, 0.03351752832531929, 0.24638709425926208, -0.32265505194664, 0.3519417345523834, -0.6770287752151489, -0.27388840913772583, -0.03785713389515877, 0.31143271923065186, -0.39468201994895935, 0.4563256800174713, -0.029288146644830704, 0.8030716180801392, -0.5627322196960449, 1.027377724647522, 0.6187819242477417, -0.6288663148880005, -1.2543572187423706, 0.2571813762187958, -0.33418387174606323, -0.7863854169845581, 0.9037749171257019, 0.3512103855609894, -0.015442006289958954, 0.019574690610170364, -0.5762026906013489, -0.8068321943283081, 1.1165002584457397, 0.20576320588588715, -0.38672664761543274, 0.03172168508172035, -0.009739736095070839, 0.522530198097229, -0.08027832955121994, 0.5345762968063354, 0.5126215815544128, 0.5235254764556885, 0.037221480160951614, -0.8554349541664124, 0.27551841735839844, -0.38712695240974426, -0.007233901415020227, -0.04436076804995537, -0.6408945918083191, 1.2239775657653809, -0.22634081542491913, -0.32717347145080566, 0.2816742956638336, 0.8702414035797119, 0.21075983345508575, 0.24763502180576324, 0.31386598944664, 0.4326346814632416, 0.907148540019989, -0.2831062078475952, 0.7332732081413269, -0.42503926157951355, 0.42325979471206665, 0.8297315239906311, 0.16715766489505768, 0.8781993389129639, 0.3782601058483124, -0.32472068071365356, 0.609542191028595, 0.9001042246818542, -0.11435966938734055, 0.41124168038368225, 0.1570223718881607, -0.12716977298259735, 0.060830749571323395, 0.25930532813072205, -0.5262900590896606, 0.23423059284687042, 0.19103552401065826, -0.5229440927505493, 0.20329415798187256, -0.042960673570632935, 0.23930881917476654, -0.10760669410228729, -0.20028561353683472, 0.5063055157661438, -0.04192768782377243, -0.6951505541801453, 0.9427869319915771, 0.4492076635360718, 1.3539694547653198, -0.6715739965438843, 0.14234474301338196, -0.04646117985248566, 0.3796027898788452, -0.4177909195423126, -0.4531218111515045, -0.04330756515264511, -0.1293766349554062, -0.0721069797873497, 0.03725577890872955, 0.5979903936386108, -0.5571467876434326, -0.6893405914306641, 0.3268931210041046, -0.06273536384105682, 0.35916584730148315, 0.09381059557199478, -0.9676579236984253, -0.10250874608755112, 0.3689393699169159, -0.19951140880584717, 0.019277071580290794, 0.5225443840026855, 0.14476624131202698, 0.36294084787368774, 0.9033223390579224, 0.26440662145614624, 0.32939329743385315, 0.05785686522722244, 0.6117346882820129, -0.7158629894256592, -0.4914906322956085, -0.9402884840965271, 0.5885822772979736, -0.17543074488639832, -0.5530872344970703, 0.8332192301750183, 0.5903286337852478, 0.9521507024765015, -0.19783145189285278, 0.8486340641975403, -0.2514497935771942, 0.40554699301719666, -0.5614259243011475, 0.9419143199920654, -0.6370217204093933, 0.12193649262189865, -0.5751518607139587, -0.6839150190353394, -0.5127906799316406, 0.914455771446228, -0.2794066071510315, 0.02619083970785141, 0.9706441164016724, 1.0741502046585083, 0.22123007476329803, -0.19088269770145416, 0.21060405671596527, 0.3709716498851776, 0.26168856024742126, 0.6611829996109009, 0.4525825083255768, -0.9621914029121399, 0.8007770776748657, -0.49132758378982544, -0.17976467311382294, -0.31594622135162354, -0.6569933891296387, -0.9949634075164795, -0.8072457313537598, -0.3293722867965698, -0.6280478239059448, -0.11877141147851944, 1.016943335533142, 0.33458590507507324, -0.9712519645690918, -0.21950167417526245, -0.07326708734035492, 0.06441619992256165, -0.45222917199134827, -0.2579888105392456, 0.8435360193252563, -0.539248526096344, -0.8211778402328491, -0.10510211437940598, 0.00855994038283825, 0.0016375364502891898, 0.07315211743116379, -0.25931039452552795, -0.5721367001533508, 0.004252525977790356, 0.3953471779823303, 0.24383589625358582, -0.9738122820854187, -0.0385238341987133, 0.20012861490249634, -0.4689454436302185, 0.16471746563911438, 0.4872327148914337, -0.4874626398086548, 0.4539678692817688, 0.5413489937782288, 0.33116039633750916, 0.5177980065345764, -0.3175062835216522, 0.31446558237075806, -0.6353114247322083, 0.23423612117767334, -0.06434332579374313, 0.5533223152160645, 0.3828730285167694, -0.4782296419143677, 0.4002059996128082, 0.4560614824295044, -0.5691143870353699, -0.6645034551620483, -0.2661669850349426, -1.0486102104187012, -0.3195788264274597, 1.0940988063812256, -0.32533442974090576, -0.407315731048584, 0.05404824763536453, -0.895237922668457, 0.8603759407997131, -0.2479037642478943, 0.7667669653892517, 0.8278601169586182, 0.12000564485788345, -0.060685861855745316, -0.3128288984298706, 0.48103731870651245, 0.6007571816444397, -0.4228399395942688, -0.07435350120067596, 0.11917595565319061, 0.25641530752182007, 0.36933135986328125, 0.7331194877624512, 0.03077220730483532, 0.2253739833831787, -0.07681827992200851, 0.5282688140869141, -0.03951899707317352, 0.20537301898002625, -0.11308544129133224, -0.19329987466335297, -0.10004142671823502, -0.6673378944396973 ]
funnel-transformer/small
funnel-transformer
"2020-12-11T21:40:44Z"
28,414
4
transformers
[ "transformers", "pytorch", "tf", "funnel", "feature-extraction", "en", "dataset:bookcorpus", "dataset:wikipedia", "dataset:gigaword", "arxiv:2006.03236", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: en license: apache-2.0 datasets: - bookcorpus - wikipedia - gigaword --- # Funnel Transformer small model (B4-4-4 with decoder) Pretrained model on English language using a similar objective objective as [ELECTRA](https://huggingface.co/transformers/model_doc/electra.html). It was introduced in [this paper](https://arxiv.org/pdf/2006.03236.pdf) and first released in [this repository](https://github.com/laiguokun/Funnel-Transformer). This model is uncased: it does not make a difference between english and English. Disclaimer: The team releasing Funnel Transformer did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description Funnel Transformer is a transformers model pretrained on a large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, a small language model corrupts the input texts and serves as a generator of inputs for this model, and the pretraining objective is to predict which token is an original and which one has been replaced, a bit like a GAN training. This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the BERT model as inputs. ## Intended uses & limitations You can use the raw model to extract a vector representation of a given text, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?filter=funnel-transformer) to look for fine-tuned versions on a task that interests you. Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2. ### How to use Here is how to use this model to get the features of a given text in PyTorch: ```python from transformers import FunnelTokenizer, FunnelModel tokenizer = FunnelTokenizer.from_pretrained("funnel-transformer/small") model = FunneModel.from_pretrained("funnel-transformer/small") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='pt') output = model(**encoded_input) ``` and in TensorFlow: ```python from transformers import FunnelTokenizer, TFFunnelModel tokenizer = FunnelTokenizer.from_pretrained("funnel-transformer/small") model = TFFunnelModel.from_pretrained("funnel-transformer/small") text = "Replace me by any text you'd like." encoded_input = tokenizer(text, return_tensors='tf') output = model(encoded_input) ``` ## Training data The BERT model was pretrained on: - [BookCorpus](https://yknzhu.wixsite.com/mbweb), a dataset consisting of 11,038 unpublished books, - [English Wikipedia](https://en.wikipedia.org/wiki/English_Wikipedia) (excluding lists, tables and headers), - [Clue Web](https://lemurproject.org/clueweb12/), a dataset of 733,019,372 English web pages, - [GigaWord](https://catalog.ldc.upenn.edu/LDC2011T07), an archive of newswire text data, - [Common Crawl](https://commoncrawl.org/), a dataset of raw web pages. ### BibTeX entry and citation info ```bibtex @misc{dai2020funneltransformer, title={Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing}, author={Zihang Dai and Guokun Lai and Yiming Yang and Quoc V. Le}, year={2020}, eprint={2006.03236}, archivePrefix={arXiv}, primaryClass={cs.LG} } ```
[ -0.4243658483028412, -0.7530507445335388, 0.24420319497585297, 0.17841047048568726, -0.15525467693805695, -0.29283538460731506, -0.2638632655143738, -0.3040892779827118, 0.2563997507095337, 0.3851175010204315, -0.5956375002861023, -0.1660018265247345, -0.6971493363380432, 0.19107875227928162, -0.5458347201347351, 1.2129919528961182, 0.0045863972045481205, 0.05259864404797554, -0.08399580419063568, 0.18531611561775208, -0.19543412327766418, -0.4730350077152252, -0.6121271848678589, -0.540946900844574, 0.6439576148986816, 0.24869965016841888, 0.3767535984516144, 0.387040376663208, 0.4009014070034027, 0.3805348873138428, 0.0051573049277067184, -0.20038741827011108, -0.6476420164108276, -0.21754617989063263, -0.1683405637741089, -0.5388261079788208, -0.2637629508972168, 0.19919513165950775, 0.5329614877700806, 0.6477205753326416, 0.16876305639743805, 0.18740229308605194, 0.3329166769981384, 0.40737491846084595, -0.3490321934223175, 0.19032737612724304, -0.5788754224777222, -0.17901411652565002, -0.36537712812423706, -0.004427087493240833, -0.4701857566833496, -0.30279111862182617, 0.46842095255851746, -0.480403870344162, 0.5720664262771606, -0.020266197621822357, 1.334625482559204, 0.2564452886581421, -0.20960672199726105, -0.3712700605392456, -0.743160605430603, 0.8230339288711548, -0.6056792140007019, 0.47649258375167847, 0.3157135546207428, 0.07389720529317856, -0.07371433079242706, -1.2239596843719482, -0.7902258634567261, 0.027805134654045105, -0.44174355268478394, 0.12592001259326935, -0.4128788411617279, -0.07036537677049637, 0.13182955980300903, 0.384310781955719, -0.5979840755462646, 0.049366652965545654, -0.6496284008026123, -0.3900231719017029, 0.5281745791435242, -0.16846591234207153, 0.2588730454444885, -0.41216719150543213, -0.17902208864688873, -0.35835137963294983, -0.44546088576316833, 0.2737590968608856, 0.4978356659412384, 0.23044362664222717, -0.21253268420696259, 0.5774354934692383, 0.024884462356567383, 0.47973087430000305, 0.26653945446014404, -0.06892242282629013, 0.4748663604259491, -0.24355410039424896, -0.18732991814613342, -0.1250917911529541, 0.9609501361846924, 0.0371384471654892, 0.3646251857280731, -0.16667239367961884, -0.12758098542690277, -0.01594668999314308, 0.3495510518550873, -1.0089495182037354, -0.42864617705345154, 0.28955572843551636, -0.4921366572380066, -0.4102783203125, 0.0926351249217987, -0.6630634069442749, 0.023437533527612686, 0.03162620961666107, 0.522184431552887, -0.5573786497116089, -0.2528435289859772, -0.08604717254638672, -0.2941359281539917, 0.29599764943122864, 0.030749736353754997, -0.9284353852272034, 0.12450166046619415, 0.4566466510295868, 0.7562732100486755, -0.09383805096149445, -0.44844186305999756, -0.2312323898077011, -0.24926327168941498, 0.06335770338773727, 0.844717264175415, -0.34456565976142883, -0.09940478205680847, 0.018697278574109077, 0.38743525743484497, -0.2262856364250183, -0.3782031536102295, 0.6558284163475037, -0.4323868155479431, 0.497504860162735, -0.060805223882198334, -0.5440993309020996, -0.33991703391075134, -0.008947748690843582, -0.7305545210838318, 1.1789060831069946, 0.13475702702999115, -0.8202424049377441, 0.2766575813293457, -0.5222027897834778, -0.48058637976646423, -0.08837348967790604, 0.05915038660168648, -0.5059024691581726, 0.1183629035949707, 0.3010592758655548, 0.4862302541732788, -0.14534428715705872, 0.1466192752122879, -0.1289423555135727, -0.29631468653678894, 0.18589456379413605, -0.36844414472579956, 1.00702965259552, 0.11981892585754395, -0.4118046760559082, 0.06796099245548248, -0.6690881252288818, -0.13512131571769714, 0.2898869514465332, -0.3053485155105591, -0.08581724762916565, 0.002957508899271488, 0.3121497929096222, 0.2644612193107605, 0.24330995976924896, -0.49172741174697876, 0.08054433017969131, -0.6701666116714478, 0.6115248203277588, 0.5899980068206787, -0.09776023030281067, 0.5311821699142456, -0.3716171085834503, 0.36055153608322144, 0.0857350081205368, -0.07247158885002136, -0.18724697828292847, -0.66022127866745, -1.2347346544265747, -0.21094706654548645, 0.6502910852432251, 0.5449209213256836, -0.6591529250144958, 0.6536281704902649, -0.4376114010810852, -0.6710368990898132, -0.8740361332893372, 0.05908928066492081, 0.12111780047416687, 0.5625514388084412, 0.36756137013435364, -0.16587063670158386, -0.5470272898674011, -0.9111448526382446, -0.20439720153808594, -0.04351593926548958, -0.2542371153831482, 0.07732177525758743, 0.6807065010070801, -0.2865864634513855, 0.9540253281593323, -0.41074642539024353, -0.422795832157135, -0.5477026104927063, 0.26229801774024963, 0.24009282886981964, 0.47795575857162476, 0.539853036403656, -0.6634306907653809, -0.47092288732528687, -0.21293005347251892, -0.6260284185409546, -0.08540581166744232, -0.05115433782339096, -0.11185377836227417, 0.18510442972183228, 0.3645474910736084, -0.7101358771324158, 0.4502275288105011, 0.5059844851493835, -0.18771526217460632, 0.35026535391807556, -0.11884626001119614, -0.16376611590385437, -0.9635744094848633, 0.18984346091747284, 0.0729174017906189, -0.1710893213748932, -0.6983169913291931, -0.1458626091480255, 0.06685388088226318, -0.11174599081277847, -0.44325873255729675, 0.6957166194915771, -0.3407604694366455, 0.3483313024044037, -0.2326134890317917, 0.29380181431770325, 0.015102406963706017, 0.6908484697341919, 0.1869167983531952, 0.5690879225730896, 0.4069267809391022, -0.6114333271980286, 0.1966109722852707, 0.3925474286079407, -0.2661672532558441, 0.2807682454586029, -0.777584969997406, 0.1412932127714157, -0.14031636714935303, 0.19959008693695068, -0.9482560753822327, -0.2229912281036377, 0.21083399653434753, -0.618877649307251, 0.2960726022720337, 0.013519713655114174, -0.44996944069862366, -0.6428586840629578, -0.2471640408039093, 0.12898030877113342, 0.7938689589500427, -0.43881502747535706, 0.6397179365158081, 0.23326613008975983, -0.28490355610847473, -0.5069657564163208, -0.6357974410057068, -0.28529229760169983, -0.15225578844547272, -0.7743995189666748, 0.4680427312850952, 0.05392824113368988, 0.18411438167095184, 0.09845981001853943, 0.04746214672923088, -0.04177287220954895, -0.12153168022632599, 0.06313461810350418, 0.06010062247514725, -0.03187264874577522, 0.14106790721416473, 0.009502246975898743, -0.1869971603155136, 0.07868368178606033, -0.233300119638443, 0.7471582293510437, 0.02894403599202633, -0.03861946240067482, -0.5376636981964111, 0.18517909944057465, 0.33863022923469543, -0.18374276161193848, 0.7788156867027283, 1.0593430995941162, -0.4345460534095764, -0.10140151530504227, -0.6103211641311646, -0.5609207153320312, -0.49100807309150696, 0.5292287468910217, -0.42413944005966187, -0.7591457962989807, 0.50895094871521, 0.06953651458024979, 0.025415265932679176, 0.7402527332305908, 0.6414654850959778, -0.3835505247116089, 0.7891905903816223, 0.8162537813186646, -0.02065727859735489, 0.49738338589668274, -0.5033901333808899, 0.41927388310432434, -0.6765192151069641, -0.25069525837898254, -0.6061676144599915, -0.4125046730041504, -0.7175500392913818, -0.22615006566047668, 0.12098012864589691, 0.2607477605342865, -0.15414033830165863, 0.5310906171798706, -0.5298227667808533, 0.08619076013565063, 0.8512422442436218, 0.0635162964463234, 0.11486903578042984, 0.13417936861515045, -0.2098155915737152, -0.2522228956222534, -0.7147533297538757, -0.6342151165008545, 1.1393022537231445, 0.4104664921760559, 0.5805416107177734, -0.10791024565696716, 0.605779230594635, 0.03178337961435318, 0.35491570830345154, -0.7831957936286926, 0.3799687623977661, -0.05645611137151718, -0.8082697987556458, -0.2671225368976593, -0.2341298907995224, -1.1840190887451172, 0.22593246400356293, -0.314998060464859, -0.8402919173240662, 0.15100625157356262, 0.1941138654947281, -0.13424809277057648, 0.2768317759037018, -0.8638633489608765, 0.9907655715942383, -0.19049975275993347, -0.22548002004623413, 0.0438094288110733, -0.5660511255264282, 0.195882648229599, -0.26611804962158203, -0.016146177425980568, 0.2070336788892746, 0.2511836886405945, 0.9144122004508972, -0.6047413945198059, 0.8535842299461365, -0.04124888405203819, -0.020935187116265297, 0.22989901900291443, -0.269572913646698, 0.5777686834335327, -0.19583868980407715, 0.08377240598201752, 0.3938817083835602, -0.17773626744747162, -0.40790095925331116, -0.4921535551548004, 0.5181432962417603, -0.93858802318573, -0.597069501876831, -0.5071143507957458, -0.29790836572647095, 0.0623784065246582, 0.47094324231147766, 0.7703865170478821, 0.2792033851146698, -0.25159531831741333, 0.26579251885414124, 0.5252768993377686, -0.26301440596580505, 0.6724810004234314, 0.22430217266082764, -0.05694156140089035, -0.19249586760997772, 0.8588234782218933, 0.03388968110084534, 0.06548776477575302, 0.441386342048645, 0.11513083428144455, -0.4005780816078186, -0.45660990476608276, -0.27765464782714844, 0.492243230342865, -0.48434197902679443, -0.06826597452163696, -0.975842297077179, -0.5544869303703308, -0.6074937582015991, -0.03394072502851486, -0.30109015107154846, -0.3154993951320648, -0.49293866753578186, -0.013651418499648571, 0.274222731590271, 0.7530251145362854, -0.009279491379857063, 0.5536072850227356, -0.6325907707214355, 0.22492016851902008, 0.3965999484062195, 0.16728004813194275, -0.04074385017156601, -0.6635360717773438, -0.2286422699689865, 0.09808901697397232, -0.5686120986938477, -0.8692274689674377, 0.45622047781944275, 0.11531011760234833, 0.5743931531906128, 0.40176573395729065, -0.0004893702571280301, 0.49276506900787354, -0.688688337802887, 0.8113707304000854, 0.1380278468132019, -0.8342368602752686, 0.5797501802444458, -0.15933920443058014, 0.24026359617710114, 0.3388643264770508, 0.5378156304359436, -0.43889084458351135, -0.44226038455963135, -0.7795354723930359, -0.8260341882705688, 0.8569161295890808, 0.5738508105278015, 0.2824218273162842, 0.08866621553897858, 0.04971585422754288, 0.05447937548160553, 0.21949096024036407, -1.0906140804290771, -0.48099204897880554, -0.40219706296920776, -0.3795478343963623, -0.19697685539722443, -0.28839877247810364, 0.1063690334558487, -0.47296014428138733, 0.8323424458503723, 0.17237430810928345, 0.6055885553359985, 0.18064063787460327, -0.4781828224658966, 0.15197238326072693, 0.22656568884849548, 0.4971466660499573, 0.4004884958267212, -0.2500966191291809, -0.058723628520965576, 0.03138848394155502, -0.8388053178787231, -0.018791256472468376, 0.5199406743049622, -0.33104294538497925, 0.20266714692115784, 0.4053197503089905, 0.9243489503860474, 0.19488807022571564, -0.4460238218307495, 0.6338764429092407, -0.016682220622897148, -0.19071097671985626, -0.39916306734085083, 0.051746103912591934, 0.2062523365020752, 0.19483914971351624, 0.48962071537971497, 0.08887938410043716, 0.023464811965823174, -0.2967948317527771, 0.20643503963947296, 0.2777409851551056, -0.35891789197921753, -0.4432874321937561, 0.7540286779403687, 0.4529911279678345, -0.4641493856906891, 0.7803886532783508, -0.26095452904701233, -0.5679250359535217, 0.33529090881347656, 0.5628001093864441, 0.9068593978881836, -0.11419080942869186, 0.201168492436409, 0.5110592842102051, 0.6268713474273682, 0.05066514387726784, 0.007233726792037487, 0.15501771867275238, -0.8169375658035278, -0.3185022175312042, -0.7835166454315186, 0.053134337067604065, 0.5716550350189209, -0.4415830671787262, 0.503088653087616, -0.15265583992004395, -0.21603643894195557, 0.20281323790550232, 0.03815470263361931, -1.004448652267456, 0.21815937757492065, -0.0007789470837451518, 0.8183480501174927, -0.7729553580284119, 0.8753399848937988, 0.6892917156219482, -0.6575972437858582, -0.82443767786026, 0.040348250418901443, -0.17676329612731934, -0.7271326780319214, 0.6604216694831848, 0.3006090521812439, 0.10452533513307571, 0.2668422758579254, -0.3890942931175232, -0.7995481491088867, 0.9557093381881714, 0.2589764893054962, -0.4518378973007202, -0.352996826171875, 0.21620506048202515, 0.460228830575943, -0.2550071179866791, 0.49516403675079346, 0.5993519425392151, 0.44309863448143005, -0.051075052469968796, -0.9385338425636292, -0.03173331543803215, -0.3898242712020874, 0.009435207583010197, 0.001969529315829277, -0.5599921941757202, 0.9384889602661133, -0.07661397010087967, -0.23924051225185394, 0.05322565138339996, 0.6326662302017212, 0.010631196200847626, -0.0911140888929367, 0.43559345602989197, 0.707504391670227, 0.7810794115066528, -0.4199293553829193, 1.0398128032684326, -0.17094627022743225, 0.5655542612075806, 0.8630566596984863, 0.19969716668128967, 0.8047218918800354, 0.42999693751335144, -0.18641753494739532, 0.7271932363510132, 0.7255258560180664, -0.12855315208435059, 0.6072572469711304, 0.006607048213481903, 0.08702126890420914, 0.05268412083387375, 0.26582077145576477, -0.3686925172805786, 0.5638734102249146, 0.26246723532676697, -0.5308710932731628, -0.19390200078487396, 0.13230769336223602, 0.26216939091682434, -0.2757476568222046, -0.10193364322185516, 0.6642361283302307, 0.03875479847192764, -0.7028087377548218, 0.6497575044631958, 0.029901888221502304, 0.9626128077507019, -0.5932374596595764, 0.19555166363716125, -0.23708292841911316, 0.33575835824012756, -0.13601799309253693, -0.5274432301521301, 0.1480879932641983, 0.018090229481458664, -0.3206828236579895, -0.2771040201187134, 0.7876356244087219, -0.49150392413139343, -0.6831754446029663, 0.19618289172649384, 0.48333150148391724, 0.3268539309501648, -0.11875201761722565, -0.7342408895492554, -0.009197324514389038, 0.10261217504739761, -0.4340401887893677, 0.033929791301488876, 0.35635098814964294, 0.1787259876728058, 0.5532072186470032, 0.5338277220726013, 0.08139023929834366, 0.13116274774074554, -0.008711729198694229, 0.7028552293777466, -0.6505059003829956, -0.5024773478507996, -0.6952897906303406, 0.7849881649017334, -0.24555933475494385, -0.33950695395469666, 0.8185337781906128, 0.5091894865036011, 1.0808913707733154, -0.26126062870025635, 0.8554916977882385, -0.23701448738574982, 0.4852498769760132, -0.31730982661247253, 0.9496062994003296, -0.5611644983291626, -0.08420935273170471, -0.344669908285141, -1.0276737213134766, 0.02210560068488121, 0.8758410811424255, -0.29829907417297363, 0.27014225721359253, 0.9961650371551514, 0.7159550189971924, -0.21339115500450134, -0.02069610171020031, 0.05190613493323326, 0.36380472779273987, 0.20277339220046997, 0.37267887592315674, 0.5428001880645752, -0.7712326645851135, 0.8401156067848206, -0.4145469069480896, -0.1746566891670227, -0.2945815622806549, -0.6993131041526794, -1.148382306098938, -0.7665165066719055, -0.2712118327617645, -0.46408769488334656, -0.29963919520378113, 0.5348809957504272, 0.8246532082557678, -0.8642895817756653, -0.14291951060295105, -0.12023067474365234, 0.026817532256245613, -0.12502256035804749, -0.2996843755245209, 0.3483392894268036, -0.48130157589912415, -1.0949921607971191, -0.008632637560367584, -0.0589507557451725, 0.1756586879491806, -0.3412625193595886, 0.06796341389417648, -0.30528169870376587, 0.061333563178777695, 0.5011938214302063, 0.18213550746440887, -0.7114027142524719, -0.3219738006591797, 0.15611402690410614, -0.16100305318832397, 0.05202793702483177, 0.7702609896659851, -0.7695285081863403, 0.24773383140563965, 0.4657348394393921, 0.5373630523681641, 0.8782321214675903, -0.2877632677555084, 0.5348749756813049, -0.8466411232948303, 0.42963045835494995, 0.14967231452465057, 0.41934487223625183, 0.3947005569934845, -0.2856673300266266, 0.3933187425136566, 0.354591965675354, -0.4874323606491089, -0.6615119576454163, 0.03917733579874039, -0.9191982746124268, -0.18099525570869446, 0.9981580972671509, -0.11136787384748459, -0.26787376403808594, -0.09274797141551971, -0.10587827116250992, 0.41650402545928955, -0.2730019986629486, 0.635642945766449, 0.9174805879592896, 0.04837724193930626, -0.22831736505031586, -0.39755478501319885, 0.6060994863510132, 0.2316615879535675, -0.6962088346481323, -0.3644503951072693, 0.1675874888896942, 0.5642327666282654, 0.33851706981658936, 0.6068415641784668, 0.011607818305492401, -0.0743345245718956, -0.10666520893573761, 0.1772756725549698, 0.21705998480319977, -0.2088540494441986, -0.18057113885879517, 0.08888138085603714, -0.3169896900653839, -0.20455625653266907 ]
digiplay/RealCartoon3D_F16full_v3.1
digiplay
"2023-10-19T03:15:28Z"
28,414
13
diffusers
[ "diffusers", "stable-diffusion", "stable-diffusion-diffusers", "text-to-image", "license:other", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2023-07-04T05:55:37Z"
--- license: other tags: - stable-diffusion - stable-diffusion-diffusers - text-to-image - diffusers inference: true --- Model info : https://civitai.com/models/94809?modelVersionId=109544 Sample image and prompt : ``` 8k uhd RAW, analog photo style of Submarine ,best quality beautiful girl, upper body portrait, best quality, masterpiece, highly detailed, ultra-detailed, high detailed skin, skin details, sharp focus, volumetric fog, 8k uhd, dslr, high quality, film grain,by Irving Penn , ``` ![f1919d05-144e-4d7b-b991-5c02501db8c0.jpeg](https://cdn-uploads.huggingface.co/production/uploads/646c83c871d0c8a6e4455854/VIHwUBlgrQr6RFRfJVhRl.jpeg) ![8f8b522a-19ca-4513-bce6-2de357d9ed53.jpeg](https://cdn-uploads.huggingface.co/production/uploads/646c83c871d0c8a6e4455854/0N7Po818HjsmCM3dkF5m5.jpeg) Original Author's DEMO images : ![](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/d34a6d3a-3c50-4b78-b5ba-67390886b844/width=1024/00049-2496827203.jpeg)
[ -0.7991423606872559, -0.36737892031669617, 0.4025805592536926, 0.08864792436361313, -0.5261009931564331, 0.19926492869853973, 0.5385075211524963, -0.2699348032474518, 0.6427884697914124, 0.6531323194503784, -0.7964980006217957, -0.4022063910961151, -0.3652186095714569, -0.061901532113552094, -0.242218017578125, 0.8391644358634949, 0.1607092320919037, -0.002284354530274868, 0.1319912075996399, 0.10959924757480621, -0.14146903157234192, -0.07860122621059418, -0.3835008442401886, 0.0696454644203186, 0.27301934361457825, 0.4626569151878357, 0.8212537169456482, 0.7789032459259033, 0.4411567151546478, 0.4043215215206146, -0.10958117246627808, 0.17659050226211548, -0.4228179454803467, -0.48840874433517456, 0.10559246689081192, -0.21638049185276031, -0.9422955513000488, 0.1650353968143463, 0.5261244177818298, 0.48055481910705566, 0.14996612071990967, 0.5459420084953308, 0.04295846074819565, 0.9382771253585815, -0.608029305934906, 0.1366749256849289, 0.24277296662330627, -0.16506019234657288, -0.3604056239128113, -0.035130199044942856, -0.25279977917671204, -0.12123682349920273, 0.10821656137704849, -1.035460114479065, 0.1951337605714798, -0.11657480895519257, 1.6825149059295654, -0.03971252962946892, -0.6274887323379517, 0.12225341796875, -0.6261492371559143, 0.19118089973926544, -0.4220121204853058, 0.531669557094574, 0.07874610275030136, 0.5292035937309265, 0.08110146969556808, -0.5938263535499573, -0.4809606075286865, 0.24633944034576416, -0.10156096518039703, 0.4695104956626892, -0.5856051445007324, -0.07003580778837204, 0.40307873487472534, 0.6889982223510742, -1.0133484601974487, -0.04340941086411476, -0.8988301753997803, 0.06445705145597458, 0.9926890730857849, -0.023135801777243614, 0.5342063903808594, -0.18881335854530334, -0.669329047203064, -0.2407432645559311, -0.48144030570983887, 0.5702180862426758, 0.776408314704895, -0.3338514566421509, -0.9750897884368896, 0.435153067111969, -0.537379801273346, 0.5620009303092957, 0.543631911277771, -0.02027393877506256, 0.5173588991165161, -0.19282127916812897, -0.31699037551879883, -0.19377322494983673, 0.5841737389564514, 1.3305929899215698, -0.208597332239151, 0.39796558022499084, 0.0902237817645073, -0.18786901235580444, 0.16822701692581177, -1.2054970264434814, -0.2750991880893707, 0.4451124966144562, -0.765601634979248, -0.43949341773986816, 0.5163130164146423, -1.2274227142333984, 0.013687641359865665, -0.002506295219063759, 0.0970989242196083, -0.08102569729089737, -0.9400715827941895, 0.11813467741012573, -0.0027430583722889423, 0.7358997464179993, 0.24782678484916687, -0.6689857244491577, 0.2855335474014282, 0.20550298690795898, 0.7385867238044739, 0.07083046436309814, 0.215562105178833, -0.041707634925842285, 0.1737053394317627, -0.5789083242416382, 0.903497576713562, -0.08431991189718246, -0.6190206408500671, -0.07039417326450348, 0.33873623609542847, 0.1925051063299179, -0.5098336935043335, 0.8984747529029846, -0.5084579586982727, -0.2633419334888458, -0.5503222942352295, -0.0705389603972435, -0.27642112970352173, 0.23632216453552246, -0.834506094455719, 0.7043312788009644, 0.37396684288978577, -0.8003630638122559, 0.36627650260925293, -0.5330052971839905, 0.31215646862983704, 0.47384199500083923, 0.09733529388904572, -0.5876036286354065, 0.12270794808864594, 0.08461535722017288, 0.33217838406562805, -0.13686420023441315, -0.03174760937690735, -0.750180721282959, -0.2577037811279297, 0.340496301651001, -0.16961178183555603, 1.0704091787338257, 0.5634490847587585, -0.389352411031723, -0.055587660521268845, -0.9863914847373962, -0.05139849707484245, 0.5909281969070435, -0.04452023282647133, -0.09600748866796494, -0.6744988560676575, 0.15210436284542084, 0.45911821722984314, 0.3828471004962921, -0.6579223871231079, 0.14798209071159363, -0.18432466685771942, 0.12797686457633972, 0.7950984239578247, -0.1296110600233078, 0.1845264434814453, -0.7671970129013062, 0.8047696352005005, 0.23030205070972443, 0.6924005746841431, -0.5056154131889343, -0.4008210301399231, -1.1208618879318237, -0.7164638042449951, -0.0003935015120077878, 0.41734579205513, -0.6821156144142151, 0.3986041247844696, 0.01570635661482811, -0.8831186890602112, -0.7994039058685303, -0.30792760848999023, 0.7097256779670715, 0.5558096170425415, 0.07664649933576584, -0.5981576442718506, -0.5450763702392578, -1.6719542741775513, -0.16044777631759644, -0.13772200047969818, -0.14991545677185059, 0.6492556929588318, 0.45040568709373474, 0.17338161170482635, 0.5059412717819214, -0.606292188167572, -0.1872660517692566, -0.2781877815723419, -0.30890634655952454, 0.5442599058151245, 0.37209782004356384, 1.1108920574188232, -1.0810868740081787, -0.7883589267730713, -0.24777022004127502, -0.7546501159667969, -0.15789136290550232, 0.31639593839645386, -0.2975926101207733, 0.16803663969039917, 0.3498130142688751, -0.985930860042572, 0.9219437837600708, 0.6759009957313538, -0.9484791159629822, 0.9976237416267395, -0.570543110370636, 0.7877958416938782, -1.2521339654922485, 0.2336900532245636, 0.5288612842559814, -0.22348064184188843, -0.49334725737571716, 0.8193452954292297, -0.0021610588300973177, -0.03878041356801987, -0.760891854763031, 0.43103307485580444, -0.877525269985199, 0.09309264272451401, -0.09864573925733566, -0.27407756447792053, 0.18096305429935455, 0.41326120495796204, -0.21398861706256866, 0.6573633551597595, 0.5090212821960449, -0.5392785668373108, 0.6097205877304077, 0.22367794811725616, -0.6135977506637573, 0.9754263162612915, -1.1491097211837769, 0.08480008691549301, -0.12799236178398132, 0.2683919072151184, -1.290168285369873, -0.7570639252662659, 0.25263628363609314, -0.6776058673858643, 0.22179573774337769, -0.3854078948497772, -0.4014289379119873, -0.5284990072250366, -0.4503435492515564, 0.6734773516654968, 0.8707875609397888, -0.5419979691505432, 0.5948609113693237, 0.38405904173851013, -0.08443377912044525, -0.2634139060974121, -0.5234832167625427, -0.24634331464767456, -0.560004711151123, -0.7463740110397339, 0.819877564907074, -0.04785735532641411, -0.4389863908290863, -0.27471765875816345, 0.27913227677345276, -0.26759690046310425, -0.23458699882030487, 0.6007435321807861, 0.940294086933136, -0.1163385733962059, -0.6210899353027344, 0.05939238891005516, -0.24996668100357056, 0.08627642691135406, 0.23471395671367645, 0.6165232062339783, -0.5087857842445374, -0.12560327351093292, -1.3224258422851562, 0.40370070934295654, 1.0161948204040527, -0.07607652992010117, 0.3894783854484558, 0.5353875756263733, -0.4006011188030243, 0.30300354957580566, -0.7026795744895935, -0.11399456858634949, -0.5593665242195129, 0.1271270215511322, -0.8150127530097961, -0.4084768295288086, 0.7723363041877747, 0.08082372695207596, -0.3341977894306183, 0.922605574131012, 0.3296615779399872, -0.39607658982276917, 1.391467571258545, 0.7826792001724243, 0.08221626281738281, 0.05012733116745949, -0.9310880303382874, -0.11264082044363022, -0.9260722994804382, -0.6742426753044128, -0.41060176491737366, -0.3649222254753113, -0.8160873055458069, -0.15761131048202515, 0.4510900676250458, 0.0766274556517601, -0.8538379073143005, 0.41825196146965027, -0.48410698771476746, 0.3904344439506531, 0.6039140820503235, 0.4796059727668762, 0.3024846315383911, -0.1372552514076233, -0.36735206842422485, -0.21888673305511475, -0.16231229901313782, -0.3773859739303589, 0.8261803388595581, 0.19158533215522766, 0.4818941652774811, 0.43719780445098877, 0.3991497755050659, 0.007686393801122904, -0.06769673526287079, -0.5074301362037659, 0.6256442666053772, -0.12976641952991486, -1.0465275049209595, 0.33735647797584534, -0.11960463225841522, -0.7237890362739563, 0.29847821593284607, -0.157785564661026, -0.6089639067649841, 0.40259861946105957, 0.30349358916282654, -0.647874653339386, 0.4999375343322754, -0.6493996381759644, 0.5123677253723145, -0.22046475112438202, -0.5059891939163208, 0.193567156791687, -0.5697545409202576, 0.5518777966499329, 0.307101309299469, 0.50130295753479, -0.07705221325159073, -0.06690144538879395, 0.34809863567352295, -0.7947214841842651, 0.6104174256324768, -0.41638413071632385, 0.042589519172906876, 0.05956531688570976, 0.15856902301311493, 0.16358347237110138, 0.5672014355659485, 0.026778873056173325, -0.007621033117175102, -0.06574376672506332, -0.3935015797615051, -0.37149345874786377, 0.8576669096946716, -0.8373790383338928, -0.6124359369277954, -0.7331390976905823, -0.1932201087474823, 0.06335161626338959, 0.18081390857696533, 1.0564697980880737, 0.5693607330322266, -0.2670619487762451, 0.10813098400831223, 0.6854403614997864, -0.1549736112356186, 0.7851681113243103, 0.4331651031970978, -0.2855018973350525, -0.7967914342880249, 0.6083621978759766, 0.10649000108242035, 0.3769705593585968, -0.06376191228628159, -0.12473474442958832, -0.1363237053155899, -0.14672903716564178, -0.7607231736183167, 0.4676743447780609, -0.0524771586060524, -0.22612696886062622, -0.5264668464660645, -0.2835056185722351, -0.3298072814941406, -0.2843875586986542, -0.74294513463974, -0.1356825828552246, -0.5490342378616333, -0.1136731430888176, 0.41206851601600647, 0.5332341194152832, 0.2452814280986786, 0.25400564074516296, -0.5708374381065369, 0.4489153325557709, 0.5099863409996033, 0.31174740195274353, -0.43388423323631287, -1.0011707544326782, 0.357715904712677, 0.18581174314022064, -0.6708846688270569, -0.7659296989440918, 0.8933200836181641, -0.004746626131236553, 0.18346579372882843, 0.47447669506073, 0.12652035057544708, 1.0437180995941162, -0.19018404185771942, 0.935478687286377, 0.4115908145904541, -0.7319054007530212, 0.5846145153045654, -0.7089306116104126, 0.8265111446380615, 0.5609499216079712, 0.49275505542755127, -0.2079957276582718, -0.011173831298947334, -1.0611090660095215, -0.9130599498748779, 0.5329857468605042, 0.07222358137369156, 0.259176641702652, 0.7023065686225891, 0.5357080101966858, 0.04485093057155609, 0.21476192772388458, -0.7490985989570618, -0.6316770911216736, -0.4543069303035736, -0.050759457051754, -0.13422612845897675, -0.44113004207611084, -0.015420428477227688, -0.7561071515083313, 0.8920801877975464, -0.26089245080947876, 0.4505138695240021, 0.4898870289325714, 0.08279146254062653, -0.11980538070201874, -0.07413788139820099, 0.8966326117515564, 0.6763846278190613, -0.5785386562347412, -0.1802041381597519, -0.4795038104057312, -0.4325955808162689, 0.060138821601867676, 0.18991775810718536, -0.5063169598579407, 0.13624192774295807, 0.13992749154567719, 0.9000675082206726, 0.25144246220588684, -0.5382993817329407, 0.8829456567764282, -0.1321910172700882, -0.4196469485759735, -0.655375599861145, -0.11719122529029846, 0.31173306703567505, 0.5384524464607239, 0.6279527544975281, 0.06893734633922577, 0.6611970067024231, -0.6124352216720581, 0.13835659623146057, 0.20727598667144775, -0.49199584126472473, -0.6044777035713196, 0.8635727763175964, -0.1844475418329239, -0.1840045154094696, 0.8456268906593323, -0.19712160527706146, -0.4248466491699219, 0.9553256630897522, 0.5149509906768799, 0.8801372647285461, -0.6685351729393005, 0.6393770575523376, 0.7631734609603882, 0.06254139542579651, 0.28074997663497925, 0.9253869652748108, 0.4385516345500946, -0.5754116177558899, 0.10932991653680801, -0.4575824737548828, -0.20457777380943298, 0.6563106179237366, -1.1518278121948242, 0.5480511784553528, -0.8542978167533875, -0.09999756515026093, 0.24714739620685577, 0.06628767400979996, -0.6731473803520203, 0.5190755724906921, -0.1177828311920166, 1.2416328191757202, -0.7614913582801819, 0.8437129259109497, 0.5310593843460083, -0.7664312124252319, -1.0114136934280396, -0.2596054673194885, 0.3404255509376526, -0.6162987351417542, 0.4835558533668518, 0.5879895687103271, 0.08877409249544144, 0.012239429168403149, -0.7709380984306335, -0.8118022680282593, 1.2826411724090576, 0.7360080480575562, -0.7238368391990662, 0.001565882470458746, -0.3664202094078064, 0.23377682268619537, -0.9184761047363281, 0.44103825092315674, 0.5056429505348206, 0.37517493963241577, 0.2842746376991272, -0.9947710037231445, -0.2673933506011963, -1.0872480869293213, 0.10401035845279694, -0.07518738508224487, -1.3866153955459595, 1.1257179975509644, -0.47319579124450684, 0.08760212361812592, 0.6114615201950073, 0.6270865797996521, 0.56333988904953, 0.2605980336666107, 0.7648197412490845, 0.970140814781189, 0.2033344954252243, -0.33064889907836914, 1.3385494947433472, -0.019059648737311363, 0.1023094579577446, 0.8568365573883057, -0.06489349156618118, 0.6768307089805603, 0.12276588380336761, -0.2879411280155182, 0.8788384199142456, 1.1869994401931763, -0.3499261736869812, 0.8143537044525146, 0.026386581361293793, -0.3700486123561859, -0.024205435067415237, -0.2990591824054718, -0.5026135444641113, 0.7310512065887451, 0.16314318776130676, -0.44817885756492615, 0.0989990159869194, 0.176566943526268, -0.2553164064884186, 0.1828037053346634, -0.4880386292934418, 0.8304847478866577, -0.3501977324485779, -0.47908127307891846, 0.8213863968849182, -0.14409072697162628, 0.7002745866775513, -0.3557271659374237, -0.11063894629478455, -0.4434683620929718, 0.006232907995581627, -0.32859882712364197, -0.6036191582679749, 0.01707381382584572, -0.013270708732306957, -0.23739077150821686, -0.2681769132614136, 0.6660779118537903, -0.044316843152046204, -0.6289608478546143, 0.22690686583518982, -0.20710888504981995, 0.392339289188385, 0.20385894179344177, -1.098679542541504, 0.5028190612792969, -0.14323647320270538, -0.33369579911231995, 0.0012359080137684941, -0.2555572986602783, 0.38746148347854614, 0.7194118499755859, 0.2677059471607208, 0.08944874256849289, 0.05312736704945564, -0.24195998907089233, 0.9516817927360535, -0.4001455008983612, -0.6447169184684753, -0.5989111065864563, 1.0037939548492432, -0.6290653944015503, -0.8497790098190308, 0.6280025243759155, 1.0383301973342896, 1.196703314781189, -0.5378677845001221, 0.7585800886154175, 0.07062329351902008, 0.4270334541797638, -0.6269155740737915, 0.8018515706062317, -0.7689627408981323, -0.21921224892139435, -0.40563568472862244, -0.9099943041801453, -0.010926615446805954, 0.7570063471794128, 0.3077860176563263, 0.2523626387119293, 0.36189591884613037, 0.8479495644569397, -0.08515456318855286, -0.08207885175943375, 0.2612950801849365, 0.06859196722507477, 0.2992170751094818, 0.3798404037952423, 0.5815033316612244, -1.0097315311431885, 0.08635783940553665, -0.7331213355064392, -0.6130373477935791, -0.4080723226070404, -0.8019546866416931, -0.7090899348258972, -0.9382280707359314, -0.5746108293533325, -0.34057196974754333, -0.1594766229391098, 0.7972051501274109, 1.2681037187576294, -0.4897570013999939, -0.371723473072052, 0.24260340631008148, -0.33708634972572327, -0.08659190684556961, -0.26644426584243774, 0.2335250824689865, 0.862791121006012, -1.0927473306655884, 0.19812840223312378, 0.32042068243026733, 0.65354323387146, -0.3770108222961426, 0.003644217737019062, -0.31022679805755615, -0.0040487139485776424, 0.2569485604763031, 0.41877442598342896, -0.7975791096687317, -0.08507474511861801, -0.11579669266939163, -0.10381430387496948, 0.01676599308848381, 0.6326960921287537, -0.27103132009506226, 0.13113540410995483, 0.3699500262737274, 0.16938020288944244, 0.657672107219696, -0.1307300478219986, 0.42829856276512146, -0.1351901888847351, 0.41449764370918274, -0.10930825769901276, 0.4928448498249054, 0.1441829800605774, -0.6681480407714844, 0.5755314826965332, 0.4709630310535431, -0.3730124831199646, -1.1702182292938232, 0.14703412353992462, -1.6267244815826416, -0.149600088596344, 0.8211170434951782, -0.32487165927886963, -0.5882352590560913, 0.19589509069919586, -0.3546602427959442, 0.03340738266706467, -0.25902295112609863, 0.45026135444641113, 0.7088903784751892, 0.3177109658718109, -0.5470253825187683, -0.7180785536766052, 0.4370307922363281, -0.08882293850183487, -0.9344825744628906, -0.4783982038497925, 0.5413182377815247, 0.464453786611557, 0.4343620836734772, 0.5408923625946045, -0.8336349129676819, 0.724653422832489, -0.23850925266742706, 0.4324279725551605, -0.19593560695648193, -0.3116235136985779, -0.15222705900669098, 0.343900203704834, -0.3656582236289978, -0.3228653371334076 ]
lambdalabs/miniSD-diffusers
lambdalabs
"2023-05-16T09:32:11Z"
28,411
3
diffusers
[ "diffusers", "license:creativeml-openrail-m", "endpoints_compatible", "diffusers:StableDiffusionPipeline", "region:us" ]
null
"2022-11-24T12:22:20Z"
--- license: creativeml-openrail-m --- ## Usage ```python from diffusers import StableDiffusionPipeline pipe = StableDiffusionPipeline.from_pretrained("lambdalabs/miniSD-diffusers") pipe = pipe.to("cuda") prompt = "a photograph of an wrinkly old man laughing" image = pipe(prompt, width=256, height=256).images[0] image.save('test.jpg') ``` ## Training details Fine tuned from the stable-diffusion 1.4 checkpoint as follows: - 22,000 steps fine-tuning only the attention layers of the unet, learn rate=1e-5, batch size=256 - 66,000 steps training the full unet, learn rate=5e-5, batch size=552 - GPUs provided by [Lambda GPU Cloud](https://lambdalabs.com/service/gpu-cloud) - Trained on [LAION Improved Aesthetics 6plus](https://huggingface.co/datasets/ChristophSchuhmann/improved_aesthetics_6plus). - Trained using https://github.com/justinpinkney/stable-diffusion, original [checkpoint available here](https://huggingface.co/justinpinkney/miniSD) ## License This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies: - You can't use the model to deliberately produce nor share illegal or harmful outputs or content - The authors claims no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license - You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully) Please read the full license here
[ -0.5459334254264832, -0.5815211534500122, 0.4268989861011505, 0.2623303532600403, -0.40896522998809814, -0.49155333638191223, 0.015334276482462883, -0.1948302537202835, -0.07582640647888184, 0.270836740732193, -0.5378327369689941, -0.34533020853996277, -0.5270105600357056, -0.046997588127851486, -0.1318846493959427, 1.0576109886169434, -0.30927741527557373, 0.2551978528499603, -0.15651723742485046, -0.22492612898349762, -0.0402369350194931, 0.004630410112440586, -1.167724370956421, -0.21766379475593567, 0.5391494035720825, 0.06868360936641693, 0.5190302133560181, 0.3244839012622833, 0.3515123724937439, 0.3365950882434845, -0.4002622663974762, -0.09208798408508301, -0.6420727968215942, -0.2525269687175751, -0.05367356166243553, -0.2458052933216095, -0.5094848275184631, 0.03769432380795479, 0.6327721476554871, 0.29747045040130615, -0.40596580505371094, 0.11873741447925568, 0.3588813841342926, 0.520370602607727, -0.5535836219787598, 0.16093572974205017, -0.2839617431163788, 0.01426008716225624, -0.16745945811271667, 0.061076417565345764, -0.23965582251548767, -0.3002171814441681, 0.11398651450872421, -0.9728374481201172, 0.4521823525428772, -0.25649046897888184, 1.0630754232406616, 0.5152320265769958, -0.19151289761066437, -0.06271331012248993, -0.34343886375427246, 0.6617239713668823, -0.7523810267448425, 0.25421515107154846, 0.2292729616165161, 0.42729559540748596, 0.13120824098587036, -1.1870049238204956, -0.4100459814071655, 0.046992890536785126, 0.10150591284036636, 0.3248343765735626, -0.06757678836584091, 0.052267469465732574, 0.437971830368042, 0.4921722412109375, -0.618320643901825, 0.03636328503489494, -0.7015451788902283, -0.12488776445388794, 0.5309823751449585, 0.30334919691085815, -0.07308021187782288, -0.032993730157613754, -0.6905143857002258, -0.19896851480007172, -0.38001155853271484, 0.09294451773166656, 0.16073821485042572, -0.0930681899189949, -0.6276341080665588, 0.4428858160972595, -0.12174785137176514, 0.38963159918785095, 0.28502610325813293, -0.01831083372235298, 0.6670579314231873, -0.1822763830423355, -0.5497673153877258, -0.16575011610984802, 0.8713251948356628, 0.27265870571136475, -0.15299859642982483, 0.1252206563949585, -0.27857255935668945, -0.003303537843748927, -0.0007594134076498449, -1.1531370878219604, -0.40437597036361694, 0.2975243926048279, -0.3492732644081116, -0.23153311014175415, -0.11585118621587753, -0.8401722311973572, -0.17108862102031708, -0.08646587282419205, 0.47287505865097046, -0.345996618270874, -0.3517906963825226, 0.11430961638689041, -0.4221256375312805, 0.18064475059509277, 0.48494455218315125, -0.6142690181732178, 0.3068687617778778, 0.17293651401996613, 1.1603738069534302, -0.020290201529860497, -0.1542550027370453, -0.3728794753551483, 0.2478402704000473, -0.032600175589323044, 0.640173077583313, 0.07126003503799438, -0.4207836091518402, -0.28338173031806946, 0.3128725588321686, -0.07285210490226746, -0.47532030940055847, 0.8151345252990723, -0.4654756486415863, 0.298027366399765, -0.0631883293390274, -0.4353049397468567, -0.08403940498828888, -0.2140825092792511, -0.474091112613678, 1.0289708375930786, 0.36690759658813477, -0.9882330894470215, 0.37992024421691895, -0.6864697337150574, -0.07111948728561401, 0.1659926027059555, -0.02100527286529541, -0.8635845184326172, -0.08811149001121521, 0.02059350721538067, 0.26906877756118774, 0.12376261502504349, -0.032270029187202454, -0.5063158273696899, -0.10905933380126953, -0.1779307723045349, -0.33003053069114685, 1.3106869459152222, 0.5143918395042419, -0.40353408455848694, 0.22832660377025604, -0.6982691884040833, 0.056511931121349335, 0.12470421940088272, -0.4810250997543335, -0.10319021344184875, -0.4550625681877136, 0.39442378282546997, 0.25192317366600037, 0.17417865991592407, -0.6161056756973267, 0.01618005707859993, -0.19141528010368347, 0.5483917593955994, 1.033530592918396, 0.0913086012005806, 0.5289661884307861, -0.3968901038169861, 0.5245336890220642, 0.42693135142326355, 0.2462698519229889, 0.1816738396883011, -0.8009820580482483, -0.7516430616378784, -0.5936185121536255, 0.00372883677482605, 0.28810766339302063, -0.7445164322853088, 0.33017367124557495, -0.051472268998622894, -0.6288619041442871, -0.4951525032520294, 0.14859668910503387, 0.11336489766836166, 0.7261556386947632, 0.4108979403972626, -0.40475231409072876, -0.3649221360683441, -0.6058166027069092, 0.27001410722732544, 0.26202526688575745, -0.1271062046289444, 0.31543853878974915, 0.592485249042511, -0.3543183505535126, 0.709414005279541, -0.6657675504684448, -0.5228183269500732, 0.16255995631217957, 0.341309130191803, 0.4117264449596405, 0.7569808959960938, 0.7807644009590149, -0.6076706647872925, -0.8079993724822998, -0.233812153339386, -0.6669192314147949, -0.12845651805400848, -0.07915502041578293, -0.4224051535129547, 0.26980873942375183, 0.2623850405216217, -0.8083665370941162, 0.5906233787536621, 0.5768043994903564, -0.3872605562210083, 0.48666155338287354, -0.6207764744758606, -0.23126950860023499, -1.0288540124893188, 0.15887346863746643, 0.23920804262161255, -0.3874530792236328, -0.24123093485832214, 0.07249942421913147, 0.09292635321617126, -0.16773882508277893, -0.785301923751831, 0.7203291058540344, -0.4461408853530884, 0.27120399475097656, -0.1971701830625534, -0.0263757836073637, 0.0292130745947361, 0.40858083963394165, 0.04238232597708702, 0.6057228446006775, 1.0126124620437622, -0.7877911925315857, 0.23594503104686737, 0.32908424735069275, -0.3596871495246887, 0.5656718611717224, -0.8632494211196899, 0.14473441243171692, -0.27868783473968506, 0.25680863857269287, -0.9453234076499939, -0.16752371191978455, 0.4076121151447296, -0.2797909677028656, 0.18320748209953308, -0.21678587794303894, -0.267286479473114, -0.2902235686779022, -0.2664230465888977, 0.3082410395145416, 0.8521918058395386, -0.600384533405304, 0.4552077651023865, 0.24467526376247406, 0.2352607697248459, -0.43317052721977234, -0.8584500551223755, -0.513174295425415, -0.4449501037597656, -0.777577817440033, 0.3603212833404541, -0.32083210349082947, 0.007812689989805222, 0.15795668959617615, 0.06704449653625488, -0.1862064152956009, 0.04904748126864433, 0.40088480710983276, 0.08294147998094559, -0.11426039785146713, -0.47553524374961853, 0.07506198436021805, -0.29284465312957764, 0.012243581935763359, -0.29323068261146545, 0.4391256868839264, -0.17448140680789948, -0.22264228761196136, -0.8361263275146484, 0.05094742029905319, 0.4678889214992523, 0.1444750428199768, 1.063602089881897, 1.011455774307251, -0.39156582951545715, -0.27817457914352417, -0.09488964080810547, -0.17204555869102478, -0.5746573805809021, 0.1934172809123993, -0.27991393208503723, -0.39807379245758057, 0.7896610498428345, 0.22534914314746857, 0.23712608218193054, 0.5586081743240356, 0.6474894881248474, -0.2950041890144348, 1.0119681358337402, 0.5755178332328796, 0.39070165157318115, 0.6550219655036926, -0.9064155220985413, -0.33530789613723755, -1.1609482765197754, -0.26233193278312683, -0.38560107350349426, -0.37394148111343384, -0.339190810918808, -0.36584797501564026, 0.4392145276069641, 0.37596824765205383, -0.7314006090164185, 0.16439148783683777, -0.5008534789085388, 0.2757047414779663, 0.34066322445869446, 0.42206066846847534, 0.047363001853227615, 0.0960162878036499, -0.36914321780204773, -0.04398701712489128, -0.5492709875106812, -0.3807425796985626, 0.8562906980514526, 0.3937823176383972, 1.124832034111023, 0.20261916518211365, 0.6474530696868896, 0.16821186244487762, 0.48084795475006104, -0.5784111618995667, 0.4333506226539612, -0.05669254809617996, -0.5571650862693787, -0.12946414947509766, -0.6780024170875549, -0.9385972619056702, 0.19935397803783417, 0.02081819623708725, -0.45991235971450806, 0.39431795477867126, 0.25498899817466736, -0.33140087127685547, 0.4377157986164093, -0.7645319104194641, 0.9596511125564575, -0.15801236033439636, -0.6964447498321533, -0.058777227997779846, -0.46934059262275696, 0.2518935203552246, 0.03641756251454353, 0.0007600813405588269, 0.00666354363784194, -0.17861086130142212, 0.8476746678352356, -0.5677785277366638, 0.8067562580108643, -0.6965681314468384, 0.10105909407138824, 0.2544378340244293, -0.1786239892244339, 0.30278104543685913, 0.19360221922397614, -0.13766732811927795, 0.24739113450050354, 0.057486552745103836, -0.6017928123474121, -0.20708180963993073, 0.7879003882408142, -1.1840726137161255, -0.35222557187080383, -0.6318082213401794, -0.38072773814201355, 0.3081485629081726, 0.38986125588417053, 0.6076695322990417, 0.2596382796764374, 0.005263193044811487, 0.15065641701221466, 0.6355628967285156, -0.03795754536986351, 0.593373715877533, 0.2583155632019043, -0.21336770057678223, -0.748053789138794, 0.611242413520813, 0.10181379318237305, 0.5747539401054382, -0.24287398159503937, 0.34369102120399475, -0.4182393252849579, -0.5744891166687012, -0.5801011323928833, 0.412540078163147, -0.8134313821792603, -0.17011070251464844, -0.597969114780426, -0.35290637612342834, -0.4691812992095947, -0.2009027600288391, -0.3258201777935028, -0.3470888137817383, -0.8230506777763367, 0.0822182148694992, 0.49540793895721436, 0.5582051873207092, -0.43513643741607666, 0.4936144948005676, -0.4953942596912384, 0.22549161314964294, 0.09985432773828506, 0.4040156900882721, 0.07005545496940613, -0.8706480860710144, -0.3035862147808075, 0.2646898031234741, -0.6656625866889954, -0.6075728535652161, 0.5238732099533081, 0.3667006492614746, 0.8124265670776367, 0.7251095771789551, -0.02639041841030121, 0.7904183864593506, -0.35879069566726685, 0.7793121933937073, 0.37210604548454285, -0.6410638689994812, 0.41227132081985474, -0.36824437975883484, 0.23717206716537476, 0.34423044323921204, 0.6203733086585999, -0.2691318094730377, -0.22074736654758453, -0.8628794550895691, -0.8165594339370728, 0.7397547364234924, 0.2405836135149002, -0.052839476615190506, 0.2296837568283081, 0.48570704460144043, -0.052945367991924286, -0.154730424284935, -0.9133127331733704, -0.27983272075653076, -0.422942191362381, -0.17816169559955597, -0.04288612678647041, 0.14715933799743652, -0.32418692111968994, -0.48307743668556213, 0.9888431429862976, -0.14259353280067444, 0.41925516724586487, 0.4135894775390625, 0.030007710680365562, -0.36506325006484985, -0.129163920879364, 0.48724424839019775, 0.6328831315040588, -0.492948442697525, -0.05697179213166237, -0.046103864908218384, -0.7006315588951111, 0.050934817641973495, 0.05838056281208992, -0.42140263319015503, -0.15770629048347473, -0.3042907118797302, 0.8282761573791504, -0.20839838683605194, -0.16608938574790955, 0.5251103639602661, -0.3945367932319641, -0.3642961382865906, -0.4734042286872864, 0.13639967143535614, 0.2798194885253906, 0.27518317103385925, 0.10230986028909683, 0.5429725646972656, -0.008620054461061954, -0.16573041677474976, 0.17718204855918884, 0.5544425845146179, -0.3361145853996277, -0.26424434781074524, 1.2913604974746704, 0.1493644267320633, 0.021050307899713516, 0.7482803463935852, -0.24392521381378174, -0.14651790261268616, 0.6219130754470825, 0.5360912680625916, 0.9867388010025024, -0.08816449344158173, 0.18724150955677032, 0.5895004868507385, 0.09867992252111435, -0.2469961792230606, 0.31907176971435547, 0.013319834135472775, -0.5772389769554138, -0.12169487029314041, -0.6409338116645813, -0.25425344705581665, 0.05456262081861496, -0.8367493748664856, 0.5401179194450378, -0.7673687934875488, -0.3222135603427887, -0.1269492208957672, -0.0714598074555397, -0.7274433970451355, 0.11876935511827469, 0.32633286714553833, 0.9664014577865601, -0.899176836013794, 0.9860806465148926, 0.7155995965003967, -0.8045133352279663, -0.8072991371154785, -0.32220175862312317, -0.15124359726905823, -0.5812394022941589, 0.5051712989807129, 0.14679287374019623, -0.10789582133293152, 0.15503565967082977, -0.6556641459465027, -0.6739630699157715, 1.4478470087051392, 0.531718373298645, -0.16821350157260895, -0.03790055215358734, -0.12526795268058777, 0.5098025798797607, -0.31575918197631836, 0.5611803531646729, 0.1290311962366104, 0.2108335942029953, 0.36224091053009033, -0.6923401951789856, -0.021597566083073616, -0.150337815284729, 0.05349312722682953, -0.17501841485500336, -0.8401819467544556, 1.3155577182769775, -0.3321591317653656, -0.4285121560096741, 0.32190483808517456, 0.7505314350128174, 0.4803999066352844, 0.28855714201927185, 0.45612838864326477, 1.2082650661468506, 0.7695707082748413, -0.10154061019420624, 1.010450005531311, -0.017811113968491554, 0.8414240479469299, 0.8646137118339539, -0.017440352588891983, 0.7314357757568359, 0.46564728021621704, -0.06102519482374191, 0.6659877300262451, 0.8622465133666992, -0.02522122859954834, 0.9388560652732849, 0.0369882769882679, -0.30751219391822815, 0.07740282267332077, 0.17949515581130981, -0.6349373459815979, -0.32624807953834534, 0.26612651348114014, -0.3925210237503052, -0.34751632809638977, 0.10490033775568008, -0.06001296266913414, -0.5586574673652649, -0.4015253186225891, 0.4825133979320526, 0.2118830382823944, -0.2575574517250061, 0.965622067451477, -0.1661076545715332, 0.8929272890090942, -0.6583029627799988, 0.08276106417179108, -0.1413504034280777, 0.6553024053573608, -0.46328455209732056, -0.8847914934158325, 0.2113872468471527, -0.10459090769290924, 0.08845909684896469, -0.37533876299858093, 0.2895680367946625, -0.2441265881061554, -0.35844892263412476, 0.35783228278160095, 0.18201732635498047, 0.5016825199127197, 0.29436439275741577, -0.9309292435646057, -0.03224250674247742, 0.018750162795186043, -0.450246661901474, 0.3292737305164337, 0.39225393533706665, 0.40191754698753357, 0.7192046046257019, 0.5484403967857361, 0.219339981675148, 0.431969553232193, -0.04321816563606262, 1.0566442012786865, -0.269843727350235, -0.6065490245819092, -0.47821199893951416, 0.9363051056861877, -0.15816381573677063, -0.4959699809551239, 0.8057822585105896, 0.7649825811386108, 0.9897716045379639, -0.1286376416683197, 0.7369826436042786, -0.23596952855587006, 0.2347649335861206, -0.545748233795166, 0.927735447883606, -0.7443069219589233, 0.14926733076572418, -0.21138790249824524, -0.8174498677253723, 0.14036855101585388, 0.996134340763092, -0.14015160501003265, 0.22139647603034973, 0.7296056151390076, 0.8810155391693115, -0.48231616616249084, -0.0396118089556694, 0.05268727242946625, 0.3102397620677948, 0.4318011403083801, 0.5596520304679871, 0.5373421311378479, -0.6945006251335144, 0.43832987546920776, -0.6477501392364502, -0.4392227828502655, 0.19119584560394287, -0.836042582988739, -0.7510783076286316, -0.5037786960601807, -0.5616114735603333, -0.7928056120872498, -0.3832840025424957, 0.5378060936927795, 0.9108689427375793, -0.7189980745315552, -0.18495948612689972, -0.34029704332351685, -0.22228895127773285, -0.20053108036518097, -0.24867688119411469, 0.4987364411354065, -0.055338241159915924, -0.7942911386489868, -0.0162538830190897, -0.20794086158275604, 0.4366016983985901, -0.4724634289741516, -0.47473666071891785, -0.19474901258945465, -0.33345335721969604, 0.11360892653465271, 0.33131924271583557, -0.45251497626304626, -0.001320906332693994, -0.3449042737483978, -0.2530078589916229, 0.3414510190486908, 0.29602470993995667, -0.7085872292518616, 0.30678990483283997, 0.6708928346633911, 0.3808228373527527, 0.9505708813667297, -0.11803185939788818, -0.020499959588050842, -0.5282039046287537, 0.43900978565216064, 0.18281595408916473, 0.6902493834495544, 0.183041512966156, -0.3926992118358612, 0.5280329585075378, 0.5336236953735352, -0.9038480520248413, -0.6593064665794373, -0.11756820976734161, -1.3749922513961792, 0.03169349953532219, 1.1419750452041626, -0.49218472838401794, -0.3842669427394867, -0.08419261872768402, -0.30698361992836, 0.2817632555961609, -0.49512484669685364, 0.5198180079460144, 0.22388286888599396, -0.27809447050094604, -0.3380931615829468, -0.5657340288162231, 0.6180124282836914, 0.13556697964668274, -0.8148983716964722, -0.2013809233903885, 0.5282011032104492, 0.8178219199180603, 0.26904168725013733, 0.8251216411590576, -0.2706359922885895, 0.17038190364837646, 0.06899628788232803, 0.07723546028137207, -0.038792598992586136, 0.05762076377868652, -0.5219434499740601, 0.04074861481785774, -0.11222653090953827, -0.28870683908462524 ]
microsoft/layoutlmv2-large-uncased
microsoft
"2022-09-16T03:40:36Z"
28,171
6
transformers
[ "transformers", "pytorch", "layoutlmv2", "en", "arxiv:2012.14740", "license:cc-by-nc-sa-4.0", "endpoints_compatible", "region:us" ]
null
"2022-03-02T23:29:05Z"
--- language: en license: cc-by-nc-sa-4.0 --- # LayoutLMv2 **Multimodal (text + layout/format + image) pre-training for document AI** ## Introduction LayoutLMv2 is an improved version of LayoutLM with new pre-training tasks to model the interaction among text, layout, and image in a single multi-modal framework. It outperforms strong baselines and achieves new state-of-the-art results on a wide variety of downstream visually-rich document understanding tasks, including , including FUNSD (0.7895 → 0.8420), CORD (0.9493 → 0.9601), SROIE (0.9524 → 0.9781), Kleister-NDA (0.834 → 0.852), RVL-CDIP (0.9443 → 0.9564), and DocVQA (0.7295 → 0.8672). [LayoutLMv2: Multi-modal Pre-training for Visually-Rich Document Understanding](https://arxiv.org/abs/2012.14740) Yang Xu, Yiheng Xu, Tengchao Lv, Lei Cui, Furu Wei, Guoxin Wang, Yijuan Lu, Dinei Florencio, Cha Zhang, Wanxiang Che, Min Zhang, Lidong Zhou, [ACL 2021](#)
[ -0.17193391919136047, -0.6604562401771545, 0.4619865119457245, 0.29731687903404236, -0.3222920298576355, 0.08358106762170792, 0.2686448395252228, -0.05014113336801529, -0.10502301156520844, 0.31878891587257385, -0.7183825373649597, -0.5620675086975098, -0.663845956325531, -0.38745132088661194, -0.038042932748794556, 0.8687283992767334, -0.29831618070602417, 0.4786866009235382, -0.5723091959953308, -0.0467236302793026, -0.6171512603759766, -0.277523398399353, -0.3807675540447235, -0.2807789146900177, 0.4493316411972046, 0.1291651874780655, 0.5293232202529907, 0.464231938123703, 0.6661900877952576, 0.3960040509700775, 0.08799751847982407, 0.39320600032806396, -0.4160650074481964, 0.02316209487617016, 0.2572547197341919, -0.2838139235973358, -0.74132239818573, 0.16582220792770386, 0.7195276021957397, 0.3000734746456146, 0.11991651356220245, -0.03545254096388817, 0.1069328561425209, 0.7837899923324585, -0.7237483859062195, 0.2435552328824997, -0.25192639231681824, 0.19798101484775543, -0.22858941555023193, -0.32789942622184753, -0.6804341077804565, -0.09726104140281677, -0.045437779277563095, -1.2279095649719238, -0.0771118625998497, 0.4395524859428406, 1.0417324304580688, 0.36433151364326477, -0.7863920331001282, -0.22181519865989685, -0.3411935865879059, 0.8343255519866943, -0.41524583101272583, 0.7272216081619263, 0.5097767114639282, 0.1548655778169632, -0.02328328974545002, -1.183627963066101, -0.610526442527771, -0.04831103980541229, -0.3582651913166046, 0.5873931646347046, 0.0746452808380127, 0.2123774290084839, 0.2904188930988312, 0.20453141629695892, -0.9933361411094666, 0.12177721410989761, -0.5358694195747375, -0.4771620035171509, 0.5485346913337708, 0.09416574984788895, 0.5450030565261841, -0.29471614956855774, -0.5742588043212891, -0.3243151903152466, -0.166789710521698, 0.2161599099636078, 0.23844319581985474, -0.44133204221725464, -0.482977032661438, 0.17808862030506134, 0.283989280462265, 0.7437358498573303, -0.13155639171600342, -0.5821239948272705, 0.7184342741966248, -0.6523163914680481, -0.6187223792076111, -0.37302011251449585, 0.8754017949104309, 0.2485160380601883, -0.2762705385684967, 0.21299739181995392, -0.0910419225692749, -0.28325527906417847, 0.3975986838340759, -0.709145188331604, -0.46548745036125183, 0.15291304886341095, -0.8311687707901001, -0.24003489315509796, 0.2364042103290558, -0.5496062636375427, -0.5099495649337769, -0.5853014588356018, 0.47912952303886414, -0.918903112411499, -0.25046461820602417, -0.1608717441558838, -0.2952280640602112, 0.6259218454360962, 1.2145594358444214, -0.6299124360084534, -0.05885433405637741, 0.7206234931945801, 0.8506045937538147, -0.2915634512901306, -0.63515305519104, -0.6607717871665955, 0.17705810070037842, -0.37278732657432556, 0.9605497717857361, -0.38838887214660645, -0.6003865599632263, -0.0740436315536499, -0.02103693038225174, -0.20321227610111237, -0.36269986629486084, 0.7682483792304993, -0.4136122763156891, 0.8264104723930359, -0.1625175029039383, -0.2635476887226105, -0.2127179354429245, 0.47978970408439636, -0.8507533073425293, 1.2151209115982056, 0.3790091574192047, -0.9840524792671204, 0.4613858461380005, -0.7516523003578186, -0.5276595950126648, 0.0768698900938034, -0.3165335953235626, -0.5958051085472107, -0.13475599884986877, 0.13561515510082245, 0.21088743209838867, 0.15182313323020935, -0.10151607543230057, -0.14880520105361938, -0.239227756857872, -0.10822645574808121, -0.3558499217033386, 0.807253897190094, 0.3776266276836395, 0.02634505368769169, 0.6354727745056152, -0.9969857335090637, 0.1561145782470703, 0.1621595323085785, -0.5213162899017334, -0.3987521827220917, -0.3812682330608368, 0.5610595941543579, 0.48177212476730347, 0.42702198028564453, -0.296080082654953, 0.410302996635437, -0.29534339904785156, 0.1184326782822609, 0.7712032198905945, -0.24392740428447723, 0.7739351391792297, -0.3085673749446869, 0.5951492190361023, -0.04512592777609825, 0.30953681468963623, -0.621254563331604, -0.45113036036491394, -0.569696307182312, -0.589668333530426, 0.14968565106391907, 0.7491297721862793, -0.9386968016624451, 0.3732556104660034, -0.11037459969520569, -0.5261310935020447, -0.36011189222335815, 0.15364140272140503, 0.9160449504852295, 0.5090566873550415, 0.2864590585231781, -0.4428837299346924, -0.7261009216308594, -0.7219480872154236, 0.1008247584104538, -0.04280650243163109, 0.012412171810865402, 0.2918551564216614, 0.5589523315429688, -0.3002222776412964, 0.5228968858718872, -0.3658519387245178, -0.5485132336616516, -0.36407336592674255, 0.31585752964019775, -0.17316314578056335, 0.5399684906005859, 0.6816321611404419, -1.1429585218429565, -0.6615613698959351, -0.05246753990650177, -0.8751384019851685, 0.30490002036094666, -0.23236484825611115, -0.34664610028266907, 0.42807382345199585, 0.5043880939483643, -0.6717074513435364, 0.7240238785743713, 0.5291897058486938, -0.4606059193611145, 0.5531829595565796, -0.672241747379303, 0.10088201612234116, -1.4397166967391968, -0.07246885448694229, -0.07254009693861008, -0.14022891223430634, -0.6905995607376099, 0.03809329494833946, 0.5936261415481567, -0.12576214969158173, -0.6659676432609558, 0.7825804948806763, -0.8094498515129089, -0.22028031945228577, -0.21679793298244476, 0.07673071324825287, 0.48935332894325256, 0.5815101265907288, -0.13469235599040985, 0.7500909566879272, 0.47239142656326294, -0.1879991739988327, 0.484375, 0.6733705401420593, -0.4410571753978729, 0.5894001126289368, -0.3839566111564636, 0.2736838459968567, -0.42169782519340515, 0.7150276899337769, -1.3150787353515625, -0.38239020109176636, 0.1954621523618698, -0.5189204216003418, 0.5826675295829773, 0.23192183673381805, -0.522318422794342, -0.47113874554634094, -0.7972241044044495, 0.42121362686157227, 0.4414408206939697, -0.33895325660705566, 0.9261608719825745, 0.11868474632501602, 0.10633193701505661, -0.6114270687103271, -0.671567976474762, -0.1859692484140396, 0.10204751789569855, -0.943108320236206, 0.3662791848182678, -0.14384421706199646, -0.06547938287258148, -0.29834461212158203, -0.06419620662927628, -0.0923912301659584, 0.07870947569608688, 0.4857783913612366, 0.4576408267021179, -0.06354749947786331, 0.021648181602358818, 0.05721405893564224, -0.21295881271362305, -0.17712055146694183, -0.04670272022485733, 0.8759165406227112, -0.00961280707269907, -0.6372877359390259, -0.9139595031738281, 0.24972766637802124, 0.5999904870986938, -0.5789734125137329, 0.5042902231216431, 1.10026216506958, -0.3615453839302063, 0.17419567704200745, -0.389717161655426, 0.3469567894935608, -0.5231295824050903, 0.8257788419723511, -0.45641055703163147, -0.6280146241188049, 0.1809024214744568, -0.060079582035541534, 0.12619636952877045, 0.4535187780857086, 0.545464277267456, -0.3757786452770233, 1.009630560874939, 0.5827146172523499, 0.16908544301986694, 0.7471586465835571, -0.4136418104171753, 0.08108530193567276, -1.0525346994400024, -1.061159610748291, -0.2862392067909241, -0.35058531165122986, -0.24319924414157867, -0.7192252278327942, 0.3325381875038147, 0.23005002737045288, -0.1687646359205246, 0.08497496694326401, -0.40992236137390137, 0.18178077042102814, 0.7359549403190613, -0.11104480177164078, 0.04414888098835945, 0.058206766843795776, -0.1519317626953125, -0.1955040842294693, -0.3838786780834198, -0.41667085886001587, 0.9624471664428711, 0.4589957296848297, 0.9548835754394531, 0.09843925386667252, 0.576657235622406, 0.3718326687812805, 0.07161148637533188, -0.7899911403656006, 0.536304771900177, -0.12459482997655869, -0.32125985622406006, -0.40866079926490784, 0.08083025366067886, -0.9388602375984192, 0.27668073773384094, -0.24133442342281342, -0.5939052700996399, 0.03673693537712097, 0.22370193898677826, -0.1683291345834732, 0.20835986733436584, -0.9853600859642029, 1.0697052478790283, -0.6728580594062805, -0.25811368227005005, -0.06526356935501099, -0.7416305541992188, 0.2700885832309723, -0.05879691243171692, 0.24381834268569946, 0.19389253854751587, 0.015006501227617264, 0.7712113261222839, -0.5899100303649902, 0.416963130235672, -0.3255822956562042, -0.13620135188102722, -0.061780791729688644, 0.027490222826600075, 0.7181905508041382, 0.2244616597890854, 0.08618762344121933, -0.23125649988651276, 0.0032240785658359528, -0.42239150404930115, -0.811164915561676, 0.49913516640663147, -1.095738410949707, -0.38977259397506714, -0.6078603863716125, -0.6228874325752258, 0.09180958569049835, 0.4400477707386017, 0.6097961664199829, 0.6201139688491821, -0.2811461389064789, 0.29431846737861633, 0.830267071723938, -0.3391053378582001, 0.45484620332717896, 0.21157315373420715, -0.3278019428253174, -0.6211028695106506, 0.9693998098373413, -0.08540955185890198, -0.12621964514255524, 0.6633907556533813, -0.14507713913917542, -0.3742592930793762, -0.6068218946456909, -0.4733390808105469, 0.10054197907447815, -0.7619304656982422, -0.10154885798692703, -1.0240767002105713, -0.47920674085617065, -0.6796358823776245, -0.2843223214149475, -0.3790885806083679, -0.18224015831947327, -0.48137935996055603, 0.014831985346972942, -0.16757531464099884, 0.8041659593582153, 0.1678251028060913, 0.3108244240283966, -0.6232323050498962, 0.36893531680107117, 0.41058632731437683, 0.12152126431465149, -0.21889260411262512, -0.7267012000083923, -0.12297918647527695, -0.2190784215927124, -0.6242220401763916, -0.7916862368583679, 0.3586227595806122, 0.10475962609052658, 0.7471861243247986, 0.6311033964157104, -0.38767164945602417, 0.4932451844215393, -0.5481709241867065, 0.8961005210876465, 0.5891386270523071, -0.7666993737220764, 0.7315092086791992, -0.2915303409099579, 0.3324228525161743, 0.2655099630355835, 0.18554572761058807, -0.4844658374786377, 0.21316908299922943, -0.6122315526008606, -0.7737705707550049, 1.1503286361694336, 0.17536599934101105, 0.03729107230901718, 0.6491140723228455, 0.07581465691328049, 0.18227843940258026, 0.20716650784015656, -0.7519602179527283, -0.37040531635284424, -0.835388720035553, -0.29392826557159424, 0.21223311126232147, -0.6185521483421326, -0.08600088208913803, -0.5771324634552002, 0.6488133668899536, -0.04188929870724678, 0.5570484399795532, 0.0010612208861857653, -0.370857834815979, 0.20049232244491577, 0.08599918335676193, 1.2485626935958862, 0.7661907076835632, -0.36772435903549194, 0.10690894722938538, 0.09667214751243591, -0.7839933633804321, 0.12297994643449783, 0.3178136646747589, -0.04061811789870262, 0.06747803837060928, 0.8439345359802246, 1.5391757488250732, -0.03817224130034447, -0.46246570348739624, 0.8288975954055786, -0.19050614535808563, -0.7093737125396729, -0.6055499315261841, -0.011930606327950954, -0.27495622634887695, 0.10830456763505936, 0.2866959571838379, 0.16137897968292236, 0.082882821559906, -0.465856671333313, 0.07612477988004684, 0.4694184958934784, -0.49196702241897583, -0.3517318665981293, 0.7988210320472717, 0.34593191742897034, -0.5419890284538269, 0.41588279604911804, -0.4054730236530304, -0.48003941774368286, 0.6577557325363159, 0.6274771094322205, 0.6435101628303528, -0.18346846103668213, 0.4285919666290283, 0.33334648609161377, 0.18788352608680725, 0.2935086488723755, 0.43808358907699585, -0.09176234155893326, -0.5641070604324341, -0.1573178470134735, -0.5384629368782043, -0.23617753386497498, 0.42268142104148865, -0.46594229340553284, 0.3489193618297577, -0.6474116444587708, 0.24319057166576385, -0.10489989072084427, 0.20524199306964874, -0.7457602024078369, 0.38339173793792725, 0.278075635433197, 1.1846970319747925, -0.5136954188346863, 1.2255996465682983, 1.3615258932113647, -0.3722408413887024, -0.8209404945373535, 0.14747576415538788, 0.37106072902679443, -1.0153098106384277, 0.8753995895385742, 0.37551039457321167, 0.08087825775146484, -0.06926339119672775, -0.4825296401977539, -0.9584168195724487, 1.5398436784744263, -0.10519921034574509, -0.26005443930625916, -0.31785523891448975, -0.12266363203525543, 0.4773416519165039, -0.3040660321712494, 0.5429123044013977, 0.07450557500123978, 0.7012737989425659, 0.2242811769247055, -0.8259714841842651, -0.13911719620227814, -0.7154669165611267, 0.3836272358894348, -0.01453938614577055, -0.9852951169013977, 1.002989649772644, -0.12171883881092072, -0.08546141535043716, 0.17704017460346222, 0.7597553730010986, 0.3517917990684509, 0.6119064092636108, 0.5672951340675354, 0.6072689890861511, 0.9279325008392334, -0.24932008981704712, 1.09647536277771, 0.022603409364819527, 0.11588035523891449, 1.298764705657959, -0.3028683662414551, 0.4555966556072235, 0.3190639615058899, -0.09833713620901108, 0.5999312996864319, 0.783877968788147, -0.0988907665014267, 0.8219164609909058, -0.23845994472503662, 0.1286233812570572, -0.209190234541893, 0.10009700059890747, -0.7205719351768494, 0.49988025426864624, 0.24050791561603546, -0.3377986252307892, -0.08645378053188324, 0.3383443355560303, 0.12801136076450348, 0.007627143990248442, -0.051989734172821045, 0.8542776703834534, -0.245292529463768, -0.45139557123184204, 0.34217530488967896, 0.2642635703086853, 0.7283615469932556, -0.89695805311203, 0.01675315946340561, -0.3186981678009033, 0.057567812502384186, -0.2266182154417038, -0.8509212136268616, -0.11520593613386154, -0.5561842918395996, -0.2520982027053833, -0.4344128668308258, 1.076254963874817, -0.326489120721817, -0.4379129409790039, 0.23899045586585999, 0.39871206879615784, -0.16974076628684998, 0.031013652682304382, -0.8370485305786133, 0.19726930558681488, 0.11095088720321655, -0.3991563320159912, 0.4118785560131073, 0.41859105229377747, -0.24421915411949158, 0.4883935749530792, 0.577811598777771, -0.4101674556732178, 0.1653371900320053, 0.2477424144744873, 0.926123321056366, -0.37382107973098755, -0.6218810081481934, -0.6944161057472229, 0.8170247077941895, -0.4495764374732971, -0.5272307395935059, 0.8110729455947876, 0.9239442944526672, 0.9441373348236084, -0.25573840737342834, 0.9962241053581238, 0.05210866779088974, 0.17404025793075562, -0.7600122690200806, 0.9281253218650818, -1.0797446966171265, -0.19667722284793854, -0.3394966125488281, -0.8941961526870728, -0.24199415743350983, 0.6363120675086975, -0.19026903808116913, 0.08902881294488907, 1.063668966293335, 0.6522256135940552, -0.11319626122713089, -0.3365606665611267, 0.4846114218235016, -0.04725824296474457, 0.5365134477615356, 0.47903671860694885, 0.9251741170883179, -0.6467086672782898, 0.6255954504013062, -0.20616653561592102, -0.24590729176998138, -0.39569151401519775, -0.602799654006958, -1.136171817779541, -0.9038698077201843, -0.1986454278230667, -0.3932011127471924, -0.1547061949968338, 0.7349523901939392, 0.9165501594543457, -0.5332469940185547, 0.2564971446990967, 0.162941575050354, 0.12027082592248917, 0.06529604643583298, -0.14375048875808716, 0.6614763736724854, -0.20350958406925201, -0.6872040629386902, 0.2554943859577179, 0.5589382648468018, 0.3237781822681427, -0.18760550022125244, -0.6105421781539917, -0.3356960713863373, -0.007813791744410992, 0.708950400352478, 0.09600510448217392, -0.818596363067627, 0.04377976432442665, -0.18018557131290436, -0.47800979018211365, 0.32019302248954773, 0.8103828430175781, -0.47801390290260315, 0.5610776543617249, 0.8677955269813538, 0.385433167219162, 0.4747942090034485, 0.10307013243436813, 0.22828204929828644, -0.8596548438072205, 0.7968895435333252, -0.2256399244070053, 0.5296051502227783, 0.29375380277633667, -0.34507498145103455, 0.4340282082557678, 0.41652587056159973, -0.3930450677871704, -0.7451868653297424, 0.28333765268325806, -1.3482791185379028, -0.35028931498527527, 1.2230379581451416, -0.0513220839202404, -0.23385125398635864, -0.07480346411466599, -0.8443884253501892, 0.35883644223213196, -0.3280593454837799, 0.34999096393585205, 0.5627710223197937, -0.000697217124979943, -0.45885559916496277, -0.40480440855026245, 0.6868692636489868, 0.4319934546947479, -1.192123293876648, -0.621254026889801, 0.6413273811340332, -0.08267483115196228, 0.38468363881111145, 1.0382124185562134, -0.044021155685186386, 0.5169677138328552, -0.12930868566036224, 0.17230477929115295, -0.6043854355812073, -0.45946985483169556, -0.05752771347761154, 0.12574942409992218, -0.0793348103761673, -0.3885357677936554 ]
ufal/robeczech-base
ufal
"2023-07-20T08:58:03Z"
28,072
7
transformers
[ "transformers", "pytorch", "tf", "safetensors", "roberta", "fill-mask", "RobeCzech", "Czech", "RoBERTa", "ÚFAL", "cs", "arxiv:2105.11314", "license:cc-by-nc-sa-4.0", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
--- language: cs license: cc-by-nc-sa-4.0 tags: - RobeCzech - Czech - RoBERTa - ÚFAL --- # Model Card for RobeCzech **If you are having issues with the tokenizer, please see https://huggingface.co/ufal/robeczech-base/discussions/4#64b8f6a7f1f8e6ea5860b314.** # Model Details ## Model Description RobeCzech is a monolingual RoBERTa language representation model trained on Czech data. - **Developed by:** Institute of Formal and Applied Linguistics, Charles University, Prague (UFAL) - **Shared by:** Hugging Face and [LINDAT/CLARIAH-CZ](https://hdl.handle.net/11234/1-3691) - **Model type:** Fill-Mask - **Language(s) (NLP):** cs - **License:** cc-by-nc-sa-4.0 - **Model Architecture:** RoBERTa - **Resources for more information:** - [RobeCzech: Czech RoBERTa, a Monolingual Contextualized Language Representation Model](https://doi.org/10.1007/978-3-030-83527-9_17) - [arXiv preprint is also available](https://arxiv.org/abs/2105.11314) # Uses ## Direct Use Fill-Mask tasks. ## Downstream Use Morphological tagging and lemmatization, dependency parsing, named entity recognition, and semantic parsing. # Bias, Risks, and Limitations 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. ## Recommendations Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. # Training Details ## Training Data The model creators note in the [associated paper](https://arxiv.org/pdf/2105.11314.pdf): > We trained RobeCzech on a collection of the following publicly available texts: > - SYN v4, a large corpus of contemporary written Czech, 4,188M tokens; > - Czes, a collection of Czech newspaper and magazine articles, 432M tokens; > - documents with at least 400 tokens from the Czech part of the web corpus.W2C , tokenized with MorphoDiTa, 16M tokens; > - plain texts extracted from Czech Wikipedia dump 20201020 using WikiEx-tractor, tokenized with MorphoDiTa, 123M tokens > All these corpora contain whole documents, even if the SYN v4 is > block-shuffled (blocks with at most 100 words respecting sentence boundaries > are permuted in a document) and in total contain 4,917M tokens. ## Training Procedure ### Preprocessing The texts are tokenized into subwords with a byte-level BPE (BBPE) tokenizer, which was trained on the entire corpus and we limit its vocabulary size to 52,000 items. ### Speeds, Sizes, Times The model creators note in the [associated paper](https://arxiv.org/pdf/2105.11314.pdf): > The training batch size is 8,192 and each training batch consists of sentences > sampled contiguously, even across document boundaries, such that the total > length of each sample is at most 512 tokens (FULL-SENTENCES setting). We use > Adam optimizer with β1 = 0.9 and β2 = 0.98 to minimize the masked > language-modeling objective. ### Software Used The [Fairseq](https://github.com/facebookresearch/fairseq/tree/main/examples/roberta) implementation was used for training. # Evaluation ## Testing Data, Factors & Metrics ### Testing Data The model creators note in the [associated paper](https://arxiv.org/pdf/2105.11314.pdf): > We evaluate RobeCzech in five NLP tasks, three of them leveraging frozen > contextualized word embeddings, two approached with fine-tuning: > - morphological analysis and lemmatization: frozen contextualized word embeddings, > - dependency parsing: frozen contextualized word embeddings, > - named entity recognition: frozen contextualized word embeddings, > - semantic parsing: fine-tuned, > - sentiment analysis: fine-tuned. ## Results | Model | Morphosynt PDT3.5 (POS) (LAS) | Morphosynt UD2.3 (XPOS) (LAS) | NER CNEC1.1 (nested) (flat) | Semant. PTG (Avg) (F1) | |-----------|---------------------------------|--------------------------------|------------------------------|-------------------------| | RobeCzech | 98.50 91.42 | 98.31 93.77 | 87.82 87.47 | 92.36 80.13 | # Environmental Impact - **Hardware Type:** 8 QUADRO P5000 GPU - **Hours used:** 2190 (~3 months) # Citation ``` @InProceedings{10.1007/978-3-030-83527-9_17, author={Straka, Milan and N{\'a}plava, Jakub and Strakov{\'a}, Jana and Samuel, David}, editor={Ek{\v{s}}tein, Kamil and P{\'a}rtl, Franti{\v{s}}ek and Konop{\'i}k, Miloslav}, title={{RobeCzech: Czech RoBERTa, a Monolingual Contextualized Language Representation Model}}, booktitle="Text, Speech, and Dialogue", year="2021", publisher="Springer International Publishing", address="Cham", pages="197--209", isbn="978-3-030-83527-9" } ``` # How to Get Started with the Model Use the code below to get started with the model. <details> <summary> Click to expand </summary> ```python from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ufal/robeczech-base") model = AutoModelForMaskedLM.from_pretrained("ufal/robeczech-base") ``` </details>
[ -0.4439142644405365, -0.6467815637588501, 0.291746586561203, 0.20376020669937134, -0.31735143065452576, -0.28447437286376953, -0.39553651213645935, -0.4469543397426605, 0.09929770231246948, 0.24778954684734344, -0.567147433757782, -0.6840981245040894, -0.6516225337982178, 0.10347585380077362, -0.2773146629333496, 1.0382530689239502, 0.0762534886598587, 0.2544706165790558, -0.031706761568784714, -0.11510217934846878, -0.4240218698978424, -0.7823891043663025, -0.5424112677574158, -0.18506066501140594, 0.35843169689178467, 0.033153243362903595, 0.5208067893981934, 0.47855645418167114, 0.11541055142879486, 0.30514219403266907, -0.357028067111969, -0.06410985440015793, -0.42886775732040405, -0.004986480809748173, -0.07655682414770126, -0.260701984167099, -0.58022141456604, 0.08365868031978607, 0.5720818042755127, 0.8140131235122681, -0.11921945214271545, 0.34945520758628845, 0.1283234804868698, 0.5974295735359192, -0.5259831547737122, 0.10624773055315018, -0.7425239682197571, 0.10694224387407303, -0.33893442153930664, 0.05873827263712883, -0.5932900905609131, 0.1636398732662201, -0.05429504066705704, -0.6197013854980469, 0.19104816019535065, 0.14582419395446777, 1.1126185655593872, 0.13940764963626862, -0.34593480825424194, -0.08990760892629623, -0.46112242341041565, 0.9865830540657043, -0.9528785943984985, 0.534423291683197, 0.25866439938545227, -0.16792084276676178, -0.0767650455236435, -0.7105132341384888, -0.6879246234893799, -0.0696483701467514, -0.14277128875255585, 0.3176845908164978, -0.3558812439441681, -0.003964313305914402, 0.3539363741874695, 0.2744898200035095, -0.6353811621665955, 0.1032208651304245, -0.43533265590667725, -0.33448517322540283, 0.5209006071090698, 0.1611623615026474, 0.38319647312164307, -0.5344789028167725, -0.5626511573791504, -0.15434569120407104, -0.3497020900249481, 0.12570051848888397, 0.3761005401611328, 0.44486069679260254, -0.14382648468017578, 0.5662204623222351, -0.11929407715797424, 0.7567889094352722, 0.1040559634566307, -0.009079600684344769, 0.5348937511444092, -0.527194619178772, -0.2882136404514313, -0.1897597759962082, 1.0119836330413818, 0.2923933267593384, 0.07045510411262512, -0.1627410352230072, -0.13028839230537415, -0.05557814612984657, 0.17065928876399994, -0.8571570515632629, -0.1203138679265976, 0.23771992325782776, -0.6558891534805298, -0.3006288409233093, 0.15285706520080566, -0.8296721577644348, 0.04625503718852997, -0.310137540102005, 0.3850303888320923, -0.5319047570228577, -0.26181769371032715, 0.22358307242393494, -0.057089634239673615, 0.1707913726568222, 0.2130572646856308, -0.830485999584198, 0.44633403420448303, 0.4142155349254608, 0.8705639243125916, -0.3479413092136383, -0.315407395362854, -0.20817755162715912, -0.10798844695091248, -0.330161452293396, 0.6471996903419495, -0.26083478331565857, -0.18222086131572723, -0.041094500571489334, 0.28498899936676025, -0.22476327419281006, -0.22320152819156647, 0.6332414746284485, -0.4765532612800598, 0.6084255576133728, -0.20862126350402832, -0.6235191226005554, -0.13447092473506927, 0.14327548444271088, -0.6027270555496216, 1.2293509244918823, 0.18964646756649017, -1.095109462738037, 0.3868234157562256, -0.6448101997375488, -0.24330338835716248, -0.0038610915653407574, -0.10636723041534424, -0.32197093963623047, -0.11511769145727158, 0.1618545949459076, 0.4256333112716675, -0.1543455421924591, 0.32015591859817505, -0.1618848294019699, -0.20364496111869812, 0.03546734154224396, -0.42892712354660034, 1.2722415924072266, 0.1887199431657791, -0.532904863357544, 0.133843794465065, -0.7829052805900574, -0.003943740390241146, 0.1649421602487564, -0.37317317724227905, -0.2352641075849533, -0.16477729380130768, 0.42945414781570435, 0.4933469891548157, 0.35575926303863525, -0.5765024423599243, 0.06147434562444687, -0.6381885409355164, 0.3428308367729187, 0.8061662316322327, -0.14611421525478363, 0.5373812913894653, -0.12358862906694412, 0.4803743064403534, 0.08663725852966309, 0.21678426861763, -0.08387838304042816, -0.5962465405464172, -0.7390658855438232, -0.3772030174732208, 0.6042412519454956, 0.6795284152030945, -0.4533209502696991, 0.7389057874679565, -0.29989269375801086, -0.4210951030254364, -0.3586931526660919, 0.05606606975197792, 0.3562150001525879, 0.4717513620853424, 0.5495454668998718, -0.3456675708293915, -0.5117384791374207, -0.9286210536956787, -0.14628154039382935, -0.04518984258174896, 0.011260664090514183, 0.18434211611747742, 0.5108511447906494, -0.25676900148391724, 1.0305653810501099, -0.3332875669002533, -0.2913534343242645, -0.16936829686164856, 0.02641361393034458, 0.26921772956848145, 0.6491144299507141, 0.7281750440597534, -0.7230234146118164, -0.5508550405502319, -0.2049243301153183, -0.6829187273979187, -0.014507168903946877, 0.16557900607585907, -0.18462809920310974, 0.5823288559913635, 0.5658692717552185, -0.8060728311538696, 0.4342021346092224, 0.5921024680137634, -0.6120696663856506, 0.5669233798980713, -0.20315618813037872, -0.08953951299190521, -1.3459900617599487, 0.26921066641807556, -0.06891785562038422, -0.2121027708053589, -0.6678717136383057, -0.19950710237026215, -0.06453995406627655, -0.1295834481716156, -0.4398875832557678, 0.8858110904693604, -0.54604172706604, 0.14356382191181183, -0.020118629559874535, 0.31445086002349854, 0.0007094878819771111, 0.680213451385498, -0.009434077888727188, 0.7028765678405762, 0.47200486063957214, -0.5430717468261719, 0.08019477128982544, 0.35433173179626465, -0.3535124957561493, 0.3349056541919708, -0.6593140959739685, -0.023105788975954056, -0.12149544805288315, 0.3359716534614563, -0.8905671834945679, -0.03505117818713188, 0.3853776454925537, -0.5465688109397888, 0.394814670085907, -0.17981339991092682, -0.6538941264152527, -0.19781020283699036, -0.2682425081729889, 0.3115500211715698, 0.4569571912288666, -0.41566282510757446, 0.6748843789100647, 0.4496466815471649, -0.20246224105358124, -0.8476899266242981, -0.7465451955795288, 0.06059611961245537, -0.13617253303527832, -0.7229562997817993, 0.6531111598014832, -0.23270201683044434, -0.19349655508995056, 0.12677255272865295, -0.027049865573644638, 0.06844942271709442, 0.029596509411931038, 0.19385705888271332, 0.42917677760124207, -0.03786168247461319, 0.24635428190231323, 0.002926369197666645, -0.16288335621356964, -0.1195208951830864, -0.37453770637512207, 0.8313779234886169, -0.25276491045951843, -0.04392414540052414, -0.40629661083221436, 0.3548259139060974, 0.4441889226436615, -0.17137965559959412, 1.01291024684906, 0.9147449731826782, -0.4643618166446686, -0.04298516362905502, -0.5296624302864075, -0.14657893776893616, -0.43410298228263855, 0.46801429986953735, -0.21209287643432617, -0.8902202844619751, 0.6442974805831909, 0.19707436859607697, 0.07224933058023453, 0.8594361543655396, 0.6624966859817505, 0.04313971847295761, 0.9473729729652405, 0.7028752565383911, -0.21034108102321625, 0.6345755457878113, -0.38660749793052673, 0.2342577427625656, -0.8397912979125977, -0.181349977850914, -0.4954461455345154, 0.01801162026822567, -0.875440239906311, -0.44415348768234253, 0.09669545292854309, 0.21905270218849182, -0.2520310878753662, 0.4481251835823059, -0.6150680184364319, 0.09296589344739914, 0.5152272582054138, 0.00589792151004076, 0.09244943410158157, 0.06575800478458405, -0.3574139475822449, -0.1397458016872406, -0.9812769293785095, -0.7404597401618958, 0.9825859069824219, 0.423568993806839, 0.3775634169578552, -0.05481449514627457, 0.675668478012085, 0.20329612493515015, 0.07635073363780975, -0.6677895784378052, 0.542428195476532, -0.2478974163532257, -0.8708534240722656, -0.3857969343662262, -0.38957181572914124, -1.0153518915176392, 0.4631372392177582, -0.3923099637031555, -0.9534596800804138, 0.5155191421508789, 0.13121958076953888, -0.2006155550479889, 0.36413854360580444, -0.5570915341377258, 1.2325868606567383, -0.10512486100196838, -0.3907586634159088, -0.12629160284996033, -0.6637912392616272, 0.1891503483057022, 0.0746445506811142, 0.5004639029502869, -0.11716517806053162, -0.0026123630814254284, 0.9439578056335449, -0.4362005591392517, 0.8920761346817017, -0.25246238708496094, 0.04374444857239723, 0.16199445724487305, -0.15990757942199707, 0.4869872033596039, 0.00615130877122283, -0.07661934942007065, 0.5040106773376465, 0.1962663233280182, -0.5359110236167908, -0.2557328939437866, 0.6268750429153442, -0.7931166291236877, -0.38622337579727173, -0.6222871541976929, -0.4145456850528717, -0.15723355114459991, 0.3876076638698578, 0.6230185627937317, 0.4812183976173401, -0.34649598598480225, 0.10772696137428284, 0.7064897418022156, -0.42422571778297424, 0.40939149260520935, 0.3314661979675293, -0.24328213930130005, -0.4339528977870941, 0.7325686812400818, 0.1971568614244461, 0.15470752120018005, 0.14203163981437683, 0.053211748600006104, -0.020088691264390945, -0.4609765410423279, -0.46972545981407166, 0.2807226777076721, -0.8029640913009644, -0.24399058520793915, -0.9877191781997681, -0.2424444556236267, -0.5606511831283569, 0.06024565547704697, -0.4258139431476593, -0.655274510383606, -0.4462417960166931, -0.15748442709445953, 0.23282796144485474, 0.5185884237289429, -0.16715651750564575, 0.15571120381355286, -0.4210554361343384, 0.09705143421888351, 0.09939049184322357, 0.239450603723526, -0.0030656959861516953, -0.6848729848861694, -0.32038530707359314, 0.06171366572380066, -0.16878631711006165, -0.8421006202697754, 0.4637586772441864, -0.036341287195682526, 0.6851018071174622, 0.27979716658592224, 0.06719057261943817, 0.4808337092399597, -0.640090823173523, 1.0254725217819214, 0.18159782886505127, -1.011568546295166, 0.3631698787212372, -0.3655011057853699, 0.24446505308151245, 0.6850907802581787, 0.3502679467201233, -0.562175989151001, -0.3909469544887543, -0.8556756973266602, -1.2178032398223877, 0.852462887763977, 0.3489747643470764, 0.42908596992492676, -0.1728922426700592, 0.2714037597179413, -0.07098822295665741, 0.18946954607963562, -1.087226390838623, -0.4478931725025177, -0.3160806894302368, -0.2592521011829376, -0.0396999828517437, -0.4089790880680084, -0.08301340043544769, -0.46733421087265015, 1.0534600019454956, 0.07745260000228882, 0.5322056412696838, 0.2484416663646698, -0.2710256576538086, 0.07245756685733795, 0.3438533544540405, 0.7070357799530029, 0.5775362849235535, -0.24858684837818146, 0.05286946892738342, 0.3338981866836548, -0.430438756942749, -0.21577686071395874, 0.26607367396354675, -0.33415594696998596, 0.27805644273757935, 0.3449707627296448, 0.9639987349510193, 0.18674983084201813, -0.544136643409729, 0.7231123447418213, -0.13396398723125458, -0.3012861907482147, -0.48290643095970154, -0.1856551319360733, 0.07394466549158096, 0.15716785192489624, 0.33924296498298645, 0.1250269114971161, 0.1871008425951004, -0.47699642181396484, 0.07831577956676483, 0.5599456429481506, -0.5076979398727417, -0.2751495838165283, 0.6410341262817383, 0.016244560480117798, -0.16888746619224548, 0.49153903126716614, -0.3413080871105194, -0.65269935131073, 0.4187905490398407, 0.5770602822303772, 0.756550133228302, -0.05418013036251068, 0.1965516358613968, 0.7276774644851685, 0.4590247869491577, -0.09076348692178726, 0.023342540487647057, -0.0372382327914238, -0.8685010075569153, -0.2755827009677887, -0.8029454946517944, 0.0005247567314654589, 0.10461941361427307, -0.6608712077140808, 0.15243129432201385, -0.27318382263183594, -0.4414299428462982, -0.026407325640320778, 0.0993555560708046, -0.7709669470787048, 0.15414553880691528, 0.05416480451822281, 0.9956898093223572, -0.9298695921897888, 0.7214017510414124, 0.5550395846366882, -0.6204251050949097, -0.6764941811561584, 0.06050107255578041, -0.1326076239347458, -0.4802825450897217, 0.7468559145927429, 0.13453605771064758, -0.0776083692908287, -0.03964126482605934, -0.5919739007949829, -0.9725701808929443, 1.145207166671753, 0.3070211410522461, -0.49060317873954773, -0.09039754420518875, -0.14815586805343628, 0.6448363065719604, -0.38216206431388855, 0.1136331558227539, 0.18770597875118256, 0.4365382194519043, -0.20989397168159485, -0.9433801770210266, 0.1704178899526596, -0.5036249756813049, 0.2067810595035553, -0.07258283346891403, -0.7003491520881653, 0.9855944514274597, 0.05158368498086929, -0.37980931997299194, 0.03188676759600639, 0.6224808692932129, 0.17089229822158813, 0.08011219650506973, 0.518361508846283, 0.6045803427696228, 0.8344858288764954, 0.014751827344298363, 1.0562171936035156, -0.6249077916145325, 0.5678790211677551, 1.050776481628418, 0.09357012063264847, 0.9448211789131165, 0.4443649351596832, -0.17705319821834564, 0.7756869196891785, 0.6559324264526367, -0.10616912692785263, 0.4789625406265259, 0.025311410427093506, -0.20853504538536072, -0.22806228697299957, 0.04351713880896568, -0.3335418403148651, 0.25029051303863525, 0.20308633148670197, -0.510152280330658, 0.04009487107396126, 0.21185161173343658, 0.34584909677505493, -0.013472902588546276, -0.1228191927075386, 0.681923508644104, 0.08803427964448929, -0.4913064241409302, 0.5878061652183533, 0.28772521018981934, 0.8298508524894714, -0.5405628681182861, 0.24972566962242126, -0.08895963430404663, 0.09801293909549713, -0.2117244005203247, -0.40849724411964417, 0.12744158506393433, 0.024429671466350555, -0.363509863615036, -0.2652775049209595, 0.7377443313598633, -0.397489994764328, -0.6780043244361877, 0.5345023274421692, 0.5193209648132324, 0.11923880875110626, 0.1715259850025177, -0.915591299533844, 0.040719397366046906, -0.06444492936134338, -0.5754455327987671, 0.34303018450737, 0.3700372278690338, 0.012620040215551853, 0.40257787704467773, 0.5816158056259155, 0.0637998953461647, 0.10195299983024597, 0.03186550363898277, 0.890421450138092, -0.5476648807525635, -0.3914153277873993, -0.7712048292160034, 0.6582256555557251, -0.2748984694480896, -0.2835865020751953, 0.8908283710479736, 0.7066910862922668, 1.019207239151001, -0.011807944625616074, 0.7749522924423218, -0.1849244385957718, 0.3661753237247467, -0.5498073697090149, 0.6877867579460144, -0.59260094165802, 0.05659164488315582, -0.4774065315723419, -0.928091287612915, -0.25080400705337524, 0.8928679823875427, -0.3508663475513458, 0.2970878481864929, 0.6957296133041382, 0.7440372109413147, -0.058927543461322784, -0.3009721636772156, 0.23324061930179596, 0.3419819474220276, 0.01922459900379181, 0.18345026671886444, 0.45465150475502014, -0.6854754686355591, 0.4466346502304077, -0.24053366482257843, -0.2922976613044739, -0.06035958230495453, -0.8207237720489502, -0.9737601280212402, -0.8226402401924133, -0.32173866033554077, -0.6071740388870239, 0.04088606312870979, 1.069239616394043, 0.7512422800064087, -0.8740310668945312, -0.26640862226486206, -0.10005897283554077, -0.053581856191158295, -0.1838100254535675, -0.2518407702445984, 0.48633530735969543, -0.5357204079627991, -0.6879593729972839, 0.20187117159366608, 0.15265467762947083, -0.046989504247903824, -0.27078646421432495, -0.10831928253173828, -0.36368221044540405, 0.22566324472427368, 0.7312926650047302, 0.09597942233085632, -0.7762871384620667, -0.09651632606983185, 0.11370216310024261, -0.2917691767215729, 0.14785145223140717, 0.4753088653087616, -0.5427097678184509, 0.37426313757896423, 0.414124995470047, 0.31021615862846375, 0.7850672602653503, -0.09905793517827988, 0.3443741202354431, -0.6003916263580322, 0.2931550145149231, 0.15386652946472168, 0.5341554880142212, 0.34217143058776855, -0.3484203815460205, 0.3904547393321991, 0.3296383023262024, -0.4910060465335846, -0.8396964073181152, 0.04786456376314163, -1.101796269416809, -0.5321484208106995, 1.2256934642791748, -0.10384456068277359, -0.3057108223438263, -0.030237693339586258, -0.17066091299057007, 0.3070352375507355, -0.34538406133651733, 0.6852466464042664, 0.9290538430213928, 0.025036517530679703, -0.12261134386062622, -0.7149209380149841, 0.5966066122055054, 0.3667542040348053, -0.7423405051231384, 0.16566166281700134, 0.5124557614326477, 0.5481380820274353, 0.3718791902065277, 0.8825013637542725, -0.30155467987060547, 0.04907359927892685, -0.036216165870428085, 0.3904643654823303, 0.08189956843852997, -0.08696584403514862, -0.3732238709926605, 0.11577697843313217, -0.03837524354457855, 0.08693480491638184 ]
timm/eva02_base_patch14_448.mim_in22k_ft_in22k_in1k
timm
"2023-03-31T05:45:17Z"
28,063
1
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "dataset:imagenet-22k", "arxiv:2303.11331", "arxiv:2303.15389", "license:mit", "region:us" ]
image-classification
"2023-03-31T04:17:36Z"
--- tags: - image-classification - timm library_tag: timm license: mit datasets: - imagenet-1k - imagenet-22k --- # Model card for eva02_base_patch14_448.mim_in22k_ft_in22k_in1k An EVA02 image classification model. Pretrained on ImageNet-22k with masked image modeling (using EVA-CLIP as a MIM teacher) and fine-tuned on ImageNet-22k then on ImageNet-1k by paper authors. EVA-02 models are vision transformers with mean pooling, SwiGLU, Rotary Position Embeddings (ROPE), and extra LN in MLP (for Base & Large). NOTE: `timm` checkpoints are float32 for consistency with other models. Original checkpoints are float16 or bfloat16 in some cases, see originals if that's preferred. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 87.1 - GMACs: 107.1 - Activations (M): 259.1 - Image size: 448 x 448 - **Papers:** - EVA-02: A Visual Representation for Neon Genesis: https://arxiv.org/abs/2303.11331 - EVA-CLIP: Improved Training Techniques for CLIP at Scale: https://arxiv.org/abs/2303.15389 - **Original:** - https://github.com/baaivision/EVA - https://huggingface.co/Yuxin-CV/EVA-02 - **Pretrain Dataset:** ImageNet-22k - **Dataset:** ImageNet-1k ## 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('eva02_base_patch14_448.mim_in22k_ft_in22k_in1k', 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( 'eva02_base_patch14_448.mim_in22k_ft_in22k_in1k', 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, 1025, 768) 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). |model |top1 |top5 |param_count|img_size| |-----------------------------------------------|------|------|-----------|--------| |eva02_large_patch14_448.mim_m38m_ft_in22k_in1k |90.054|99.042|305.08 |448 | |eva02_large_patch14_448.mim_in22k_ft_in22k_in1k|89.946|99.01 |305.08 |448 | |eva_giant_patch14_560.m30m_ft_in22k_in1k |89.792|98.992|1014.45 |560 | |eva02_large_patch14_448.mim_in22k_ft_in1k |89.626|98.954|305.08 |448 | |eva02_large_patch14_448.mim_m38m_ft_in1k |89.57 |98.918|305.08 |448 | |eva_giant_patch14_336.m30m_ft_in22k_in1k |89.56 |98.956|1013.01 |336 | |eva_giant_patch14_336.clip_ft_in1k |89.466|98.82 |1013.01 |336 | |eva_large_patch14_336.in22k_ft_in22k_in1k |89.214|98.854|304.53 |336 | |eva_giant_patch14_224.clip_ft_in1k |88.882|98.678|1012.56 |224 | |eva02_base_patch14_448.mim_in22k_ft_in22k_in1k |88.692|98.722|87.12 |448 | |eva_large_patch14_336.in22k_ft_in1k |88.652|98.722|304.53 |336 | |eva_large_patch14_196.in22k_ft_in22k_in1k |88.592|98.656|304.14 |196 | |eva02_base_patch14_448.mim_in22k_ft_in1k |88.23 |98.564|87.12 |448 | |eva_large_patch14_196.in22k_ft_in1k |87.934|98.504|304.14 |196 | |eva02_small_patch14_336.mim_in22k_ft_in1k |85.74 |97.614|22.13 |336 | |eva02_tiny_patch14_336.mim_in22k_ft_in1k |80.658|95.524|5.76 |336 | ## Citation ```bibtex @article{EVA02, title={EVA-02: A Visual Representation for Neon Genesis}, author={Fang, Yuxin and Sun, Quan and Wang, Xinggang and Huang, Tiejun and Wang, Xinlong and Cao, Yue}, journal={arXiv preprint arXiv:2303.11331}, year={2023} } ``` ```bibtex @article{EVA-CLIP, title={EVA-02: A Visual Representation for Neon Genesis}, author={Sun, Quan and Fang, Yuxin and Wu, Ledell and Wang, Xinlong and Cao, Yue}, journal={arXiv preprint arXiv:2303.15389}, year={2023} } ``` ```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}} } ```
[ -0.6203798055648804, -0.41835275292396545, 0.16923300921916962, 0.11343695968389511, -0.24165794253349304, 0.01871727779507637, -0.11562521010637283, -0.4678290784358978, 0.5449472665786743, 0.38724032044410706, -0.4859919846057892, -0.7227723002433777, -0.6074701547622681, 0.08887224644422531, -0.0602218322455883, 0.878354549407959, -0.10309194028377533, -0.11086985468864441, 0.005878500174731016, -0.3853803873062134, -0.24211958050727844, -0.2501799166202545, -0.6661393642425537, -0.3007587194442749, 0.4488235116004944, 0.2867159843444824, 0.6540539860725403, 0.7160272598266602, 0.5724246501922607, 0.4273698925971985, -0.30503037571907043, 0.06875820457935333, -0.29135265946388245, -0.3403474688529968, 0.38927438855171204, -0.6965106725692749, -0.7275918126106262, 0.033729273825883865, 0.8682427406311035, 0.3908509612083435, 0.08799128979444504, 0.3167586624622345, 0.14114557206630707, 0.5840744376182556, -0.3193874955177307, -0.01164211705327034, -0.28376293182373047, 0.18629728257656097, -0.21289722621440887, -0.12338431924581528, -0.2897397577762604, -0.3408685624599457, 0.07982686161994934, -0.7929173707962036, 0.4449286162853241, 0.08530537784099579, 1.432828664779663, 0.07417285442352295, -0.08335279673337936, 0.18336030840873718, -0.3069264590740204, 0.7936920523643494, -0.8685469627380371, 0.20944078266620636, 0.18998098373413086, 0.10676635801792145, -0.01624014787375927, -0.9307472705841064, -0.6149594187736511, 0.01165003888309002, -0.33763593435287476, 0.2544756233692169, -0.42401424050331116, 0.024852154776453972, 0.44073933362960815, 0.40375930070877075, -0.5535507202148438, 0.06977900862693787, -0.5383307337760925, -0.24896809458732605, 0.6468437910079956, 0.09262292087078094, 0.4659402072429657, -0.46047332882881165, -0.7964284420013428, -0.4727596342563629, -0.6244205832481384, 0.20189808309078217, 0.3902337849140167, -0.08475708216428757, -0.6393970847129822, 0.5212564468383789, 0.08095066249370575, 0.5073212385177612, 0.04681685194373131, -0.19652415812015533, 0.725461483001709, -0.3229959011077881, -0.3302794098854065, -0.19237223267555237, 1.1943702697753906, 0.6869939565658569, 0.09004731476306915, 0.23567838966846466, -0.11500772833824158, -0.3513500690460205, -0.061867233365774155, -1.1860747337341309, -0.23103411495685577, 0.23000411689281464, -0.5976147651672363, -0.2994157671928406, 0.2611335217952728, -1.081850528717041, -0.005200651939958334, -0.032410409301519394, 0.6656062602996826, -0.6034215688705444, -0.3820406198501587, -0.00921669788658619, -0.3045845031738281, 0.2756122350692749, 0.38351204991340637, -0.5886397361755371, 0.22730664908885956, 0.3492989242076874, 1.1596683263778687, 0.12297401577234268, -0.3745037615299225, -0.05206608399748802, -0.14810840785503387, -0.5075187087059021, 0.6177493929862976, -0.13334152102470398, -0.16525565087795258, -0.25218120217323303, 0.3262422978878021, -0.17061778903007507, -0.5509172081947327, 0.22044998407363892, -0.1563204824924469, 0.11962947994470596, -0.1728588193655014, -0.33758342266082764, -0.5128332376480103, 0.2561877965927124, -0.5939063429832458, 1.172302007675171, 0.528549313545227, -0.9217110276222229, 0.35971394181251526, -0.532844603061676, 0.18999150395393372, -0.027718715369701385, 0.0038937698118388653, -0.9113510251045227, -0.16590745747089386, 0.34374940395355225, 0.4310454726219177, -0.2437046319246292, -0.16493411362171173, -0.44612932205200195, -0.30324631929397583, 0.19796372950077057, -0.12555749714374542, 1.030250906944275, 0.14366090297698975, -0.5269193053245544, 0.25831690430641174, -0.7331041693687439, 0.1985209584236145, 0.49109217524528503, -0.17024114727973938, -0.03315747156739235, -0.6144148707389832, 0.12963348627090454, 0.21258637309074402, 0.14551705121994019, -0.4612305164337158, 0.33732685446739197, -0.2004464715719223, 0.42348513007164, 0.8779481053352356, 0.07770799845457077, 0.2784423530101776, -0.4131939113140106, 0.5256168246269226, 0.20444193482398987, 0.2857508659362793, -0.19533288478851318, -0.6733373403549194, -0.9608214497566223, -0.5936479568481445, 0.360490083694458, 0.40133872628211975, -0.5807335376739502, 0.7212439179420471, -0.14525571465492249, -0.7696585059165955, -0.4462791681289673, 0.05671973526477814, 0.6249563694000244, 0.6131076216697693, 0.5079609751701355, -0.5048847198486328, -0.523260772228241, -1.0837843418121338, 0.16952934861183167, -0.1401270031929016, 0.038103941828012466, 0.4586046636104584, 0.8776224851608276, -0.18899716436862946, 0.8366182446479797, -0.6541803479194641, -0.24868693947792053, -0.2898586392402649, 0.08902187645435333, 0.43723928928375244, 0.6635852456092834, 1.059799075126648, -0.4994167983531952, -0.7079518437385559, -0.13609565794467926, -0.856740415096283, -0.04116538166999817, 0.0005755076999776065, -0.29462873935699463, 0.30830350518226624, 0.17837095260620117, -0.7179734706878662, 0.7786779999732971, 0.2743105888366699, -0.6217737197875977, 0.5897713899612427, -0.37188661098480225, 0.30109915137290955, -1.1552677154541016, 0.32153454422950745, 0.21307626366615295, -0.23574475944042206, -0.6424438953399658, 0.028023313730955124, 0.18673104047775269, 0.05931089073419571, -0.6024951338768005, 0.7669779658317566, -0.5626617670059204, -0.08582716435194016, -0.042382776737213135, -0.2157534956932068, 0.1346883773803711, 0.7940182685852051, -0.01695735566318035, 0.749042272567749, 0.7468406558036804, -0.3377160131931305, 0.3292919099330902, 0.3854343593120575, -0.42449644207954407, 0.543486475944519, -0.8145599961280823, 0.06966846436262131, -0.07505831867456436, 0.485082745552063, -0.964205801486969, -0.26797083020210266, 0.41232073307037354, -0.5063306093215942, 0.5292455554008484, -0.45937615633010864, -0.5038607716560364, -0.6437340974807739, -0.6770049333572388, 0.5049436092376709, 0.6874185800552368, -0.6494835019111633, 0.3171434700489044, 0.12287524342536926, 0.10886670649051666, -0.5746858716011047, -0.7225075364112854, -0.2608775198459625, -0.44614535570144653, -0.761524498462677, 0.6088706851005554, 0.03494904562830925, 0.003701734123751521, 0.08212149888277054, 0.030901573598384857, 0.1171068325638771, -0.22513246536254883, 0.47530752420425415, 0.5988583564758301, -0.37022271752357483, -0.323211133480072, -0.2478724867105484, -0.28932490944862366, -0.011961537413299084, -0.03568992763757706, 0.7336389422416687, -0.24696914851665497, -0.30878573656082153, -0.8608927130699158, 0.019698716700077057, 0.7453464865684509, -0.1407664716243744, 0.8038092851638794, 0.9256272315979004, -0.4832149147987366, 0.03233613446354866, -0.5458479523658752, -0.3409222364425659, -0.4978232979774475, 0.4395432472229004, -0.25598669052124023, -0.48098036646842957, 0.9688336849212646, 0.2619524300098419, -0.02851836010813713, 0.9524539113044739, 0.4317737817764282, -0.04890434816479683, 1.150315761566162, 0.38884058594703674, 0.20605817437171936, 0.7488461136817932, -1.1712759733200073, -0.1926359385251999, -1.1697349548339844, -0.6006864309310913, -0.28002268075942993, -0.630693793296814, -0.46397697925567627, -0.5202590227127075, 0.6073984503746033, 0.4295584261417389, -0.4584790766239166, 0.5812093615531921, -0.8058943748474121, 0.14544309675693512, 0.7469872236251831, 0.5380433201789856, -0.21646657586097717, 0.22415125370025635, -0.1857316642999649, -0.0957963615655899, -0.6824052929878235, -0.25138798356056213, 1.197717547416687, 0.5543731451034546, 0.55915766954422, -0.0013713131193071604, 0.6744124293327332, -0.11603336036205292, 0.24305953085422516, -0.4885800778865814, 0.6577034592628479, 0.0684509426355362, -0.6612560749053955, -0.09185420721769333, -0.43989697098731995, -0.9934158325195312, 0.3117262125015259, -0.3866528570652008, -0.9725334048271179, 0.38117048144340515, 0.2731010317802429, -0.39255693554878235, 0.7740457057952881, -0.8616408705711365, 0.8787596225738525, -0.19567041099071503, -0.4860873818397522, -0.042540762573480606, -0.7419818639755249, 0.22125756740570068, 0.26124221086502075, -0.07834595441818237, -0.05616571381688118, 0.1687789261341095, 1.2147518396377563, -0.8491463661193848, 0.7217541933059692, -0.35464897751808167, 0.3210439682006836, 0.6308473944664001, -0.2037467211484909, 0.5904864072799683, 0.15946528315544128, 0.0967538058757782, 0.3491687476634979, 0.038760315626859665, -0.4225574731826782, -0.4143245220184326, 0.5349197387695312, -1.0225228071212769, -0.4623951315879822, -0.5996112823486328, -0.3208490312099457, 0.287299782037735, 0.21224191784858704, 0.7066974639892578, 0.642815351486206, 0.18639779090881348, 0.40544548630714417, 0.5933780670166016, -0.41582509875297546, 0.5051438808441162, 0.013438338413834572, -0.32132628560066223, -0.8017410039901733, 0.9608283638954163, 0.22164486348628998, 0.25220733880996704, 0.07797842472791672, 0.21964925527572632, -0.36469265818595886, -0.4315432608127594, -0.5449904203414917, 0.5036737322807312, -0.6626651883125305, -0.5168662071228027, -0.5390166640281677, -0.4130481779575348, -0.28620949387550354, -0.21080432832241058, -0.4768007695674896, -0.4013064503669739, -0.5494981408119202, 0.08693971484899521, 0.9030198454856873, 0.655340850353241, -0.2551332414150238, 0.3839770555496216, -0.5834380388259888, 0.20238849520683289, 0.14711704850196838, 0.45727765560150146, 0.004442611709237099, -0.820192813873291, -0.08900168538093567, 0.016101552173495293, -0.5187069773674011, -1.1024376153945923, 0.563742458820343, -0.0034195801708847284, 0.4663812518119812, 0.4474692940711975, -0.3682909309864044, 0.9851638078689575, -0.18662232160568237, 0.788527250289917, 0.6740999817848206, -0.69244784116745, 0.6202532649040222, -0.3088754415512085, 0.028953583911061287, 0.24353186786174774, 0.15098673105239868, -0.33378422260284424, -0.17489823698997498, -1.093117594718933, -1.006502628326416, 1.0330901145935059, 0.323337197303772, -0.13191059231758118, 0.30299097299575806, 0.4340778589248657, -0.05759046971797943, -0.1098666563630104, -0.7450211048126221, -0.7165269255638123, -0.3782651424407959, -0.1646602302789688, -0.06089763715863228, -0.1461898535490036, -0.16239042580127716, -0.7393501400947571, 0.6592913269996643, -0.010714062489569187, 0.8293173909187317, 0.32153892517089844, 0.019974360242486, -0.1658012419939041, -0.27688077092170715, 0.5522145628929138, 0.44902533292770386, -0.43728944659233093, -0.03589688241481781, 0.2345641851425171, -0.5943869948387146, -0.002851033816114068, 0.18237756192684174, -0.2532542943954468, 0.07587381452322006, 0.5180825591087341, 1.033467411994934, 0.09940697997808456, -0.18203765153884888, 0.5805699825286865, 0.08752194046974182, -0.4422260820865631, -0.2414277046918869, 0.27283772826194763, -0.13902954757213593, 0.3802791237831116, 0.4433871805667877, 0.30890166759490967, -0.16845202445983887, -0.41033270955085754, 0.17898426949977875, 0.5923616290092468, -0.370562344789505, -0.49088168144226074, 0.7692773342132568, -0.22756463289260864, -0.21123924851417542, 0.6504035592079163, -0.014464121311903, -0.595429539680481, 1.2236337661743164, 0.5871630311012268, 0.8191304802894592, -0.16090132296085358, 0.19583088159561157, 1.0209367275238037, 0.1043967679142952, -0.007700327783823013, 0.26621174812316895, 0.34866878390312195, -0.47979673743247986, 0.12959891557693481, -0.5936906933784485, -0.02223924919962883, 0.5280063152313232, -0.5793474912643433, 0.41059958934783936, -0.6293134689331055, -0.3893135190010071, 0.06287747621536255, 0.20766204595565796, -0.8666039109230042, 0.1792755424976349, 0.0391644611954689, 0.9512922763824463, -0.8658353686332703, 0.6903401017189026, 0.7210225462913513, -0.6293346285820007, -1.0180983543395996, -0.2249014973640442, 0.08152055740356445, -0.913411021232605, 0.4532192051410675, 0.28017091751098633, 0.3146873712539673, 0.09065276384353638, -0.7586895227432251, -0.9683477282524109, 1.6250197887420654, 0.46073681116104126, -0.2616941034793854, 0.21232853829860687, -0.041410040110349655, 0.3927302062511444, -0.31142064929008484, 0.6861839890480042, 0.23304376006126404, 0.5309491157531738, 0.249522864818573, -0.6736714243888855, 0.1975506991147995, -0.4622054994106293, 0.12060991674661636, 0.270155668258667, -1.0659011602401733, 1.028624415397644, -0.343294620513916, -0.13724862039089203, 0.1646309792995453, 0.5490439534187317, 0.5260324478149414, 0.05911965295672417, 0.5352874994277954, 0.8900107145309448, 0.4962199032306671, -0.41690170764923096, 0.8818689584732056, -0.30303531885147095, 0.6809175610542297, 0.4491286277770996, 0.3904299736022949, 0.5807262659072876, 0.4150437116622925, -0.47961172461509705, 0.4956456422805786, 0.9351741671562195, -0.47369322180747986, 0.3639388084411621, 0.0764288604259491, -0.0643867701292038, -0.02939971350133419, 0.04555215314030647, -0.7370354533195496, 0.2740737199783325, 0.31351467967033386, -0.5414366126060486, -0.11890953779220581, -0.10183652490377426, 0.11838889867067337, -0.3907490372657776, -0.2920137047767639, 0.5000869631767273, -0.009131642058491707, -0.545894980430603, 0.7325335741043091, 0.06620065122842789, 0.8219752907752991, -0.5272818207740784, -0.14792323112487793, -0.32188087701797485, 0.23510271310806274, -0.4024578034877777, -1.077595829963684, 0.17411746084690094, -0.011644494719803333, -0.0022928861435502768, -0.004079151898622513, 0.6586591601371765, -0.2268412709236145, -0.6155373454093933, 0.3219364583492279, 0.14464186131954193, 0.2737489640712738, 0.18208099901676178, -1.055978775024414, 0.08677910268306732, 0.05339493975043297, -0.732539713382721, 0.30051904916763306, 0.29113319516181946, 0.15766990184783936, 0.56927490234375, 0.6281645894050598, -0.010840180329978466, 0.3058909475803375, -0.27639520168304443, 0.8610711097717285, -0.5614496469497681, -0.4231007993221283, -0.8465708494186401, 0.7247583270072937, -0.15212123095989227, -0.7041021585464478, 0.7033525705337524, 0.7705400586128235, 0.687251091003418, -0.07358201593160629, 0.478580504655838, -0.29745644330978394, 0.07875052839517593, -0.5337598323822021, 0.84072345495224, -0.8765408396720886, -0.07035945355892181, -0.3485826551914215, -0.942140519618988, -0.3364452123641968, 0.8304073810577393, -0.1795773059129715, 0.3066745400428772, 0.6269027590751648, 1.0284078121185303, -0.17857025563716888, -0.3310096263885498, -0.05965367332100868, 0.2053261399269104, 0.21529637277126312, 0.6073896288871765, 0.5253738760948181, -0.7271807789802551, 0.36139702796936035, -0.730530858039856, -0.1730518937110901, -0.39619171619415283, -0.6040262579917908, -0.962234616279602, -0.7307512760162354, -0.5434545278549194, -0.6881783604621887, -0.2550353407859802, 0.9094187617301941, 0.9916077256202698, -0.7181268334388733, 0.010170305147767067, -0.13187982141971588, 0.1319289356470108, -0.2755899727344513, -0.2630462348461151, 0.8054582476615906, 0.1443030834197998, -0.8359290957450867, -0.14661112427711487, 0.13803091645240784, 0.4825705885887146, 0.04234165698289871, -0.4802170991897583, -0.08499268442392349, -0.1948089450597763, 0.16994450986385345, 0.46078425645828247, -0.83797687292099, -0.3529418110847473, -0.12142175436019897, -0.09340476244688034, 0.5351025462150574, 0.2917402684688568, -0.5961145162582397, 0.35067281126976013, 0.6802207231521606, -0.016491033136844635, 0.8499071002006531, -0.12878888845443726, 0.019769011065363884, -0.7505218386650085, 0.40848401188850403, -0.022936884313821793, 0.6230907440185547, 0.16257166862487793, -0.23762694001197815, 0.6572253704071045, 0.5372976660728455, -0.46496909856796265, -0.9966784119606018, -0.05205429345369339, -1.2854117155075073, -0.13953380286693573, 1.1119965314865112, -0.23259703814983368, -0.5219292640686035, 0.3714267611503601, -0.22165264189243317, 0.4779360890388489, -0.26345503330230713, 0.38227030634880066, 0.2465703934431076, -0.07103107124567032, -0.5722139477729797, -0.542281985282898, 0.44207343459129333, 0.23645129799842834, -0.7878341674804688, -0.38309669494628906, 0.10377180576324463, 0.5361944437026978, 0.5793794393539429, 0.569709062576294, -0.2371722310781479, 0.24004752933979034, 0.14521990716457367, 0.39343777298927307, -0.29169970750808716, -0.24199125170707703, -0.24661025404930115, 0.003654640633612871, -0.17972543835639954, -0.43291541934013367 ]
nickmuchi/finbert-tone-finetuned-finance-topic-classification
nickmuchi
"2023-07-12T16:41:11Z"
27,987
44
transformers
[ "transformers", "pytorch", "tensorboard", "bert", "text-classification", "generated_from_trainer", "twitter-financial-topic-classification", "financial", "stocks", "twitter", "dataset:zeroshot/twitter-financial-news-topic", "model-index", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-12-30T16:22:43Z"
--- tags: - generated_from_trainer - twitter-financial-topic-classification - financial - stocks - twitter datasets: - zeroshot/twitter-financial-news-topic metrics: - accuracy - f1 - precision - recall widget: - text: >- Here are Thursday's biggest analyst calls: Apple, Amazon, Tesla, Palantir, DocuSign, Exxon &amp; more example_title: Analyst Update' - text: >- LIVE: ECB surprises with 50bps hike, ending its negative rate era. President Christine Lagarde is taking questions example_title: Fed | Central Banks - text: >- Goldman Sachs traders countered the industry’s underwriting slump with revenue gains that raced past analysts’ estimates. The trading operation posted a 32% surge in second-quarter revenue that included another banner period for fixed income example_title: Company | Product News - text: >- China Evergrande Group’s onshore bond holders rejected a plan by the distressed developer to further extend a bond payment which was due on Friday. Rebecca Choong Wilkins reports on Bloomberg Television example_title: Treasuries | Corporate Debt - text: >- Investing Club: Morgan Stanley's dividend, buyback pay us for our patience after quarterly missteps example_title: Dividend - text: >- Investing Club: Our takes on Amazon and Apple heading into next week's earnings reports example_title: Earnings - text: >- JUST RELEASED: Oil Price Dynamics Report → Over the past week, oil prices decreased as supply expectations rose and anticipated demand remained unchanged. example_title: Energy | Oil - text: >- Delta Air Lines fell short of profit expectations in the second quarter and said high operating costs will persist through the rest of the year. Bloomberg Opinion's Brooke Sutherland has more on 'Bloomberg Markets' example_title: Financials - text: >- BREAKING: The Indian rupee plummets to a record 80 per US dollar as foreign investors pull out money from the nation's stocks example_title: Currencies - text: >- Twitter and Elon Musk are now in a high stakes/high risk situation, one analyst said. example_title: General News | Opinion - text: >- Copper prices are signaling that investors are bearish on the economy, strategist says example_title: Gold | Metals | Materials - text: >- Johnson & Johnson CFO Joe Wolk says the company is positioned for the long term and the plans for its consumer operations include an IPO. He speaks on 'Bloomberg Markets' example_title: IPO - text: >- Company and Elon Musk are set for a blockbuster courtroom battle over Musk’s attempt to terminate his $44 billion acquisition deal for $TWTR, according to Wedbush analyst Dan Ives. example_title: Legal | Regulation - text: >- Amazon to buy primary health care provider One Medical for roughly $3.9 billion example_title: M&A | Investments - text: >- Barclays Senior Analyst For Equity Research Jason Goldberg: 'Price expectations have changed.'' The global markets business recorded $6.47 billion of revenue in the quarter with rates, commodities and currencies helping drive the fixed-income gains. example_title: Macro - text: >- US stocks push higher in a volatile session. We break it down on The Countdown to The Close example_title: Markets - text: Zelenskyy fires security chiefs over ‘treasonous’ officials example_title: Politics - text: Airbnb co-founder Joe Gebbia is stepping down example_title: Personnel Change - text: French power group EDF requests its shares be suspended example_title: Stock Commentary - text: >- JUST IN: Alibaba shares slide as much as 5.7%, bringing this week's slump to over 15%, after it reportedly faced a data-theft inquiry example_title: Stock Movement model-index: - name: finbert-tone-finetuned-finance-topic-classification results: - task: name: Text Classification type: text-classification dataset: name: twitter-financial-news-topic type: finance metrics: - type: F1 name: F1 value: 0.910647 - type: accuracy name: accuracy value: 0.910615 pipeline_tag: text-classification --- <!-- 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. --> # finbert-tone-finetuned-finance-topic-classification This model is a fine-tuned version of [yiyanghkust/finbert-tone](https://huggingface.co/yiyanghkust/finbert-tone) on [Twitter Financial News Topic](https://huggingface.co/datasets/zeroshot/twitter-financial-news-topic) dataset. It achieves the following results on the evaluation set: - Loss: 0.509021 - Accuracy: 0.910615 - F1: 0.910647 - Precision: 0.911335 - Recall: 0.910615 ## Model description Model determines the financial topic of given tweets over 20 various topics. Given the unbalanced distribution of the class labels, the weights were adjusted to pay attention to the less sampled labels which should increase overall performance.. ## 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: 64 - eval_batch_size: 64 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 20 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall | |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:| | No log | 1.0 | 266 | 0.5152 | 0.8552 | 0.8504 | 0.8508 | 0.8552 | | 0.7618 | 2.0 | 532 | 0.3999 | 0.8790 | 0.8781 | 0.8842 | 0.8790 | | 0.7618 | 3.0 | 798 | 0.3628 | 0.8943 | 0.8940 | 0.8958 | 0.8943 | | 0.16 | 4.0 | 1064 | 0.3776 | 0.8997 | 0.9001 | 0.9025 | 0.8997 | | 0.16 | 5.0 | 1330 | 0.4286 | 0.8999 | 0.9002 | 0.9022 | 0.8999 | | 0.058 | 6.0 | 1596 | 0.4500 | 0.9043 | 0.9042 | 0.9055 | 0.9043 | | 0.058 | 7.0 | 1862 | 0.4689 | 0.9021 | 0.9017 | 0.9026 | 0.9021 | | 0.0267 | 8.0 | 2128 | 0.4918 | 0.9031 | 0.9029 | 0.9039 | 0.9031 | | 0.0267 | 9.0 | 2394 | 0.5030 | 0.9048 | 0.9049 | 0.9060 | 0.9048 | | 0.0177 | 10.0 | 2660 | 0.5052 | 0.9033 | 0.9034 | 0.9044 | 0.9033 | | 0.0177 | 11.0 | 2926 | 0.5265 | 0.9036 | 0.9034 | 0.9055 | 0.9036 | | 0.013 | 12.0 | 3192 | 0.5267 | 0.9041 | 0.9041 | 0.9058 | 0.9041 | | 0.013 | 13.0 | 3458 | 0.5090 | 0.9106 | 0.9106 | 0.9113 | 0.9106 | | 0.0105 | 14.0 | 3724 | 0.5315 | 0.9067 | 0.9067 | 0.9080 | 0.9067 | | 0.0105 | 15.0 | 3990 | 0.5339 | 0.9084 | 0.9084 | 0.9093 | 0.9084 | | 0.0068 | 16.0 | 4256 | 0.5414 | 0.9072 | 0.9074 | 0.9088 | 0.9072 | | 0.0051 | 17.0 | 4522 | 0.5460 | 0.9092 | 0.9091 | 0.9102 | 0.9092 | | 0.0051 | 18.0 | 4788 | 0.5438 | 0.9072 | 0.9073 | 0.9081 | 0.9072 | | 0.0035 | 19.0 | 5054 | 0.5474 | 0.9072 | 0.9073 | 0.9080 | 0.9072 | | 0.0035 | 20.0 | 5320 | 0.5484 | 0.9079 | 0.9080 | 0.9087 | 0.9079 | ### Framework versions - Transformers 4.25.1 - Pytorch 1.13.0+cu116 - Datasets 2.8.0 - Tokenizers 0.13.2
[ -0.7037480473518372, -0.5820875763893127, 0.04966731369495392, 0.006920773070305586, -0.10679899901151657, 0.08208907395601273, -0.0731038823723793, -0.1304192990064621, 0.6496614813804626, 0.4449450373649597, -0.7777915000915527, -0.9126054644584656, -0.6779087781906128, -0.23982051014900208, -0.08329196274280548, 1.0112111568450928, 0.13128025829792023, -0.09842994809150696, 0.047550201416015625, -0.11417616158723831, -0.3630841374397278, -0.2648569941520691, -0.8493834733963013, -0.38268986344337463, 0.16816756129264832, 0.5629942417144775, 0.7588691115379333, 0.7952880859375, 0.494590699672699, 0.3284538984298706, -0.46437597274780273, 0.012069033458828926, -0.3968263268470764, -0.4544561505317688, 0.11565032601356506, -0.6182305216789246, -0.5376386642456055, 0.040646351873874664, 0.4120772182941437, 0.6404001712799072, -0.09751702845096588, 0.6474559307098389, 0.11970339715480804, 0.905275285243988, -0.3870646357536316, 0.24953658878803253, -0.2684227228164673, 0.09879530966281891, -0.2059016078710556, -0.4768991470336914, 0.0011125437449663877, -0.4323476552963257, 0.20042839646339417, -0.5612348318099976, 0.6128501296043396, 0.06129433587193489, 1.6813100576400757, 0.1933673918247223, -0.36733707785606384, -0.09962362051010132, -0.6249533295631409, 0.7978754639625549, -0.6509374976158142, 0.2517904043197632, 0.5986084342002869, 0.11852016299962997, 0.012012199498713017, -0.9072718620300293, -0.6920672655105591, 0.4849860966205597, -0.30275872349739075, 0.36170318722724915, -0.20518901944160461, -0.34748053550720215, 0.46323439478874207, 0.7508493065834045, -0.5976818203926086, -0.12588179111480713, -0.7527685761451721, -0.20172923803329468, 0.7821962833404541, 0.2913265526294708, 0.21460753679275513, -0.5918272137641907, -0.5600191354751587, -0.2807124853134155, -0.3201458156108856, 0.7553588151931763, 0.6061993837356567, 0.25923141837120056, -0.5395205020904541, 0.44195348024368286, -0.10069569200277328, 0.6489335894584656, 0.2724827527999878, -0.29932737350463867, 0.9700967073440552, -0.3402681052684784, -0.31719347834587097, 0.07433556765317917, 0.8249338865280151, 0.724552571773529, -0.016570905223488808, 0.23038636147975922, -0.13962829113006592, -0.198263481259346, 0.18955522775650024, -0.877494215965271, -0.3678944706916809, 0.682338535785675, -0.7508645057678223, -0.5127237439155579, 0.1823180615901947, -0.8449655175209045, 0.09558194130659103, -0.42514923214912415, 0.3333527445793152, -0.3449716866016388, -0.5178873538970947, 0.15114089846611023, -0.3236110210418701, 0.3145679533481598, 0.2952747642993927, -1.2870738506317139, 0.29388514161109924, 0.5116519927978516, 0.8846356272697449, 0.2721480429172516, -0.019289182499051094, 0.045885760337114334, 0.19100452959537506, -0.49128448963165283, 0.9364786148071289, -0.04724740609526634, -0.5485225319862366, -0.2779747545719147, 0.5006631016731262, -0.3425142765045166, -0.35132479667663574, 0.7906615734100342, -0.4141901433467865, 0.3457762598991394, -0.47050806879997253, -0.4347078502178192, -0.29827138781547546, 0.4431970417499542, -0.6443589925765991, 1.3323384523391724, 0.28479817509651184, -1.2180607318878174, 0.6570847034454346, -0.7145950198173523, -0.07591135054826736, -0.05652984604239464, -0.034835588186979294, -0.9433002471923828, -0.36341094970703125, 0.3451104462146759, 0.3580033481121063, -0.3945314288139343, 0.23043151199817657, -0.11211176216602325, -0.4988437294960022, -0.09927546977996826, -0.29714837670326233, 1.2788100242614746, 0.32464268803596497, -0.7854160070419312, 0.15882118046283722, -1.1339235305786133, 0.16151247918605804, 0.27079108357429504, -0.3774901330471039, -0.10776427388191223, -0.3084159791469574, 0.21618717908859253, 0.22183018922805786, 0.4080858826637268, -0.5374605655670166, 0.23050466179847717, -0.4329017102718353, 0.512522280216217, 0.9143784046173096, 0.21333743631839752, 0.3977595567703247, -0.7598084211349487, 0.41283348202705383, 0.3128442168235779, 0.2846371829509735, 0.026678327471017838, -0.4562443494796753, -1.0560716390609741, -0.5081910490989685, 0.14941276609897614, 0.7341353893280029, -0.10304324328899384, 0.8184329867362976, -0.14562177658081055, -0.7670229077339172, -0.502597987651825, -0.02907349355518818, 0.13871367275714874, 0.7425375580787659, 0.36878493428230286, -0.029920829460024834, -0.6063107848167419, -1.1392990350723267, 0.012232047505676746, -0.07577992230653763, 0.2776392102241516, 0.5322214961051941, 0.8294659852981567, -0.3156668543815613, 1.1881017684936523, -0.7700262069702148, -0.5875898599624634, -0.24100050330162048, 0.01908061094582081, 0.7887614369392395, 0.6406227946281433, 1.0036163330078125, -0.991645097732544, -0.6209357976913452, 0.11996650695800781, -0.7639278173446655, 0.28230464458465576, -0.20704980194568634, -0.1344785839319229, -0.03326069191098213, 0.28238633275032043, -0.3715018332004547, 0.853510320186615, 0.5379506349563599, -0.684973418712616, 0.7454114556312561, -0.46307578682899475, 0.3423426151275635, -1.3435262441635132, 0.4181843101978302, 0.04150610417127609, -0.15869523584842682, -0.5624449849128723, -0.30689382553100586, 0.02778901718556881, -0.11135608702898026, -0.28086113929748535, 0.7275028824806213, -0.4418524205684662, 0.12666776776313782, 0.023791253566741943, -0.11746145784854889, -0.004134739749133587, 0.8236802816390991, 0.02727379836142063, 0.9979366064071655, 0.9291599988937378, -0.6722387671470642, 0.3325074017047882, 0.3487573564052582, -0.6109254956245422, 0.5634694695472717, -0.6527516841888428, -0.04494130611419678, -0.23117606341838837, -0.0707126185297966, -1.4269932508468628, -0.3317587673664093, 0.3208450675010681, -0.5996399521827698, 0.32723861932754517, -0.06741897761821747, -0.21680313348770142, -1.0589959621429443, -0.3988109529018402, -0.0711379423737526, 0.4051322638988495, -0.4962649643421173, 0.5409452319145203, 0.2086041271686554, 0.128764346241951, -0.7793674468994141, -0.834786593914032, -0.1652696579694748, -0.3197533190250397, -0.8186048269271851, 0.5468771457672119, -0.08328821510076523, -0.13559678196907043, 0.1048668622970581, -0.2929784059524536, -0.25666218996047974, 0.18099543452262878, 0.3474041223526001, 0.3516901433467865, -0.22559188306331635, -0.13646477460861206, -0.16150766611099243, -0.3599403500556946, -0.06532839685678482, -0.12590469419956207, 0.6744278073310852, -0.3487434387207031, -0.32581543922424316, -0.8832599520683289, -0.13097232580184937, 0.6548256278038025, -0.33901888132095337, 1.128387451171875, 0.7819869518280029, -0.31032514572143555, 0.1285400092601776, -0.5064347982406616, -0.18119201064109802, -0.5066862106323242, 0.2378738969564438, -0.5850411057472229, -0.8234355449676514, 1.0227255821228027, -0.14302022755146027, 0.2605336010456085, 0.9409420490264893, 0.5916290879249573, -0.15279212594032288, 0.9849381446838379, 0.33394941687583923, -0.16070477664470673, 0.3780701756477356, -1.09966242313385, 0.14743556082248688, -0.748791515827179, -0.7639076709747314, -0.6032620072364807, -0.556977391242981, -0.5719912052154541, -0.02178773283958435, 0.28390341997146606, 0.2240852266550064, -0.6957141160964966, 0.2930304706096649, -0.9485731720924377, 0.2884768843650818, 0.9667817950248718, 0.4397059977054596, 0.028124816715717316, 0.016268005594611168, -0.29625633358955383, -0.234266459941864, -0.6282045245170593, -0.6116445064544678, 1.2538621425628662, 0.28610920906066895, 0.44349732995033264, 0.13690856099128723, 0.9879685044288635, 0.2395121306180954, 0.12469310313463211, -0.5486497282981873, 0.16352666914463043, -0.021077048033475876, -1.0993156433105469, -0.29917144775390625, -0.3264067769050598, -1.0364941358566284, 0.31658196449279785, -0.39859917759895325, -1.1223585605621338, 0.6984461545944214, 0.1605139672756195, -0.7439363598823547, 0.7096647620201111, -0.6397812962532043, 1.1116431951522827, -0.2677149772644043, -0.49179917573928833, 0.09566650539636612, -0.7796401977539062, 0.37168192863464355, -0.037543151527643204, 0.359456330537796, -0.33203527331352234, 0.18230703473091125, 0.9582486152648926, -0.7791823148727417, 0.6460403800010681, -0.21126234531402588, 0.1307508796453476, 0.5631784796714783, -0.3200547993183136, 0.6048502922058105, 0.20509472489356995, -0.18567465245723724, -0.11092016845941544, 0.16904939711093903, -0.6132285594940186, -0.318774938583374, 0.9632383584976196, -1.3043038845062256, -0.761538028717041, -0.6084777116775513, -0.4826130270957947, 0.3324548900127411, 0.3688560426235199, 0.6632025241851807, 0.5778088569641113, 0.1079849973320961, 0.20612850785255432, 0.718223512172699, -0.05342857912182808, 0.6507163643836975, 0.2773197293281555, -0.07964257895946503, -0.8904117941856384, 0.9172906279563904, 0.19036778807640076, 0.23001854121685028, 0.18253381550312042, 0.3344324231147766, -0.500889003276825, -0.2653157711029053, -0.3326624929904938, 0.17592643201351166, -0.5044047832489014, -0.24330216646194458, -0.8005701899528503, -0.2660934627056122, -0.8508719205856323, -0.570390522480011, -0.44727152585983276, -0.30239665508270264, -0.5810738205909729, -0.27747642993927, 0.8668766021728516, 0.43733757734298706, -0.11480212956666946, 0.5209539532661438, -0.7294270992279053, 0.21603818237781525, 0.10503367334604263, 0.21660692989826202, 0.017516082152724266, -0.6405420303344727, -0.2314678281545639, 0.019536705687642097, -0.43609222769737244, -0.7228106260299683, 0.8281618356704712, 0.004537924658507109, 0.6035075187683105, 0.7115835547447205, 0.04506751149892807, 1.1600985527038574, 0.019665973260998726, 0.90346759557724, 0.45316892862319946, -0.9297427535057068, 0.6688315868377686, -0.3707337975502014, 0.3016270101070404, 0.8897097110748291, 0.4141366481781006, -0.6016867160797119, -0.33515506982803345, -1.229731559753418, -1.069218635559082, 1.1036789417266846, 0.36079102754592896, 0.08056116104125977, 0.1838621348142624, 0.3660929799079895, -0.4343578815460205, 0.4095982313156128, -1.005131721496582, -1.0897709131240845, -0.37886545062065125, -0.1351623237133026, -0.01913655549287796, -0.1874098926782608, -0.13526427745819092, -0.6868840456008911, 0.695424497127533, 0.26101362705230713, 0.34335702657699585, 0.38584214448928833, 0.3549395799636841, -0.200239360332489, 0.23002614080905914, 0.7613461017608643, 0.8674734830856323, -0.7393335700035095, -0.020430775359272957, 0.05215804651379585, -0.6512242555618286, 0.21768218278884888, 0.05937112867832184, -0.4444589912891388, 0.07434475421905518, 0.4621252119541168, 0.8399365544319153, 0.17160487174987793, 0.0014931580517441034, 0.6373923420906067, 0.13061769306659698, -0.7648626565933228, -0.6574332118034363, 0.08162572979927063, 0.10368737578392029, 0.4458736777305603, 0.6884713768959045, 0.5299569368362427, 0.0072305030189454556, -0.6383224725723267, 0.24297191202640533, 0.2966105341911316, -0.6256452798843384, -0.020801039412617683, 1.2123472690582275, 0.009192838333547115, -0.26156187057495117, 0.6418358683586121, -0.08074358850717545, -0.7672766447067261, 1.1001949310302734, 0.4708905518054962, 0.7500220537185669, -0.2770872414112091, 0.16553175449371338, 1.1988028287887573, 0.39894092082977295, -0.08774235844612122, 0.7120074033737183, 0.13862121105194092, -0.49784353375434875, 0.18492013216018677, -0.6719801425933838, -0.03250497579574585, 0.31207749247550964, -0.9617177844047546, 0.5875553488731384, -0.6460863947868347, -0.6777426600456238, -0.09415814280509949, 0.33985066413879395, -0.728765070438385, 0.6174108386039734, -0.12221169471740723, 1.1501190662384033, -0.9503133893013, 0.6709533929824829, 0.648169994354248, -0.6906538605690002, -1.3838484287261963, -0.3743616044521332, -0.005696624051779509, -0.7327035069465637, 0.7904474139213562, 0.16837963461875916, 0.3343333899974823, 0.2481623888015747, -0.597705066204071, -1.1602474451065063, 1.430655837059021, -0.08868815749883652, -0.6631289720535278, 0.10871049016714096, 0.05522001162171364, 0.4695242941379547, -0.10714863240718842, 0.410770982503891, 0.5878463983535767, 0.6042576432228088, 0.37778785824775696, -0.8255854249000549, 0.03139824792742729, -0.5027469396591187, -0.17631074786186218, 0.36351582407951355, -0.9928825497627258, 1.3141010999679565, -0.3849031627178192, 0.025292785838246346, -0.036165349185466766, 0.6994190216064453, 0.3559984862804413, 0.4031408727169037, 0.4931073486804962, 1.0056580305099487, 1.0865614414215088, -0.45848578214645386, 1.1206625699996948, -0.5910966992378235, 1.0097157955169678, 0.9812355637550354, 0.21836473047733307, 0.6935303211212158, 0.44035735726356506, -0.41281548142433167, 0.4916764795780182, 1.1920620203018188, -0.3894718885421753, 0.6459372639656067, 0.03923192247748375, -0.33977583050727844, -0.30343931913375854, 0.16776730120182037, -0.7076638340950012, 0.13876289129257202, 0.23091459274291992, -0.73415207862854, -0.16505610942840576, -0.15133711695671082, 0.0229803379625082, -0.006352615542709827, -0.548401415348053, 0.499019056558609, -0.2003626823425293, -0.27760815620422363, 0.6732689738273621, -0.041688404977321625, 0.726716160774231, -0.6125661134719849, 0.2140377014875412, -0.11537913978099823, 0.5110670328140259, -0.7110007405281067, -1.0837671756744385, 0.21176600456237793, -0.17700991034507751, -0.29130566120147705, -0.08566369116306305, 0.4304713308811188, -0.25280797481536865, -0.7294062972068787, 0.09521505236625671, 0.1571454405784607, 0.04959651082754135, 0.3393842577934265, -0.9820247292518616, -0.35834431648254395, 0.4044248163700104, -0.709137499332428, -0.048222433775663376, 0.5042104721069336, 0.08825286477804184, 0.5324092507362366, 0.9814466238021851, -0.03474293649196625, 0.07561515271663666, -0.13221439719200134, 1.170846939086914, -0.9117371439933777, -0.6740724444389343, -0.8270246982574463, 0.4718224108219147, -0.26537951827049255, -0.7714076042175293, 0.9657539129257202, 1.0404292345046997, 0.665581226348877, -0.1304360330104828, 0.5891807675361633, -0.3434560298919678, 0.6209495067596436, -0.3422401249408722, 0.8111145496368408, -0.9159659743309021, -0.03303370252251625, -0.3663231134414673, -0.8301883935928345, -0.4641115665435791, 0.9033535718917847, -0.6349336504936218, 0.12893368303775787, 0.5366473197937012, 0.9246427416801453, 0.17130126059055328, 0.07220549136400223, 0.01033185888081789, -0.1267409473657608, 0.1056196391582489, 0.5423538684844971, 0.4443083107471466, -0.7751366496086121, 0.5029963254928589, -0.7944449186325073, 0.022741561755537987, -0.1961062103509903, -0.5691994428634644, -0.9976661801338196, -0.5735856890678406, -0.6837073564529419, -0.5913410186767578, -0.25036436319351196, 1.08710777759552, 0.7717608213424683, -0.7142341732978821, -0.36169520020484924, -0.16936661303043365, 0.03636239096522331, -0.21028682589530945, -0.28465354442596436, 1.0521944761276245, -0.004417950287461281, -0.9396541118621826, -0.2297101765871048, 0.0801997184753418, 0.620809018611908, 0.13249847292900085, -0.01506876852363348, -0.3580898642539978, -0.1729424148797989, 0.2721041738986969, 0.23028424382209778, -0.6382998824119568, -0.18629038333892822, 0.044841229915618896, -0.3615390658378601, 0.4774273931980133, 0.3676905035972595, -0.4082772731781006, 0.4168986678123474, 0.3836790919303894, 0.2560396194458008, 0.9062811732292175, 0.13526810705661774, 0.12030500918626785, -0.5360376834869385, 0.4028635621070862, -0.13907897472381592, 0.335598349571228, 0.0737813413143158, -0.6160966753959656, 0.7223545908927917, 0.5799865126609802, -0.5807580947875977, -0.829155683517456, -0.4515022933483124, -1.312391996383667, -0.09788818657398224, 1.1882208585739136, -0.015313422307372093, -0.725310206413269, -0.03402024880051613, -0.38584133982658386, 0.1917228102684021, -0.5164218544960022, 0.4708123505115509, 0.7815808057785034, -0.12786470353603363, -0.19276651740074158, -0.7323237657546997, 0.5776148438453674, 0.012784968130290508, -0.707299530506134, -0.22046005725860596, 0.20138853788375854, 0.42894983291625977, 0.4676162302494049, 0.6945634484291077, -0.09070688486099243, 0.3182099759578705, 0.2587071359157562, 0.2668917179107666, -0.03548015281558037, 0.0998593270778656, -0.06481011211872101, 0.21319995820522308, -0.049704208970069885, -0.49575749039649963 ]
daryl149/llama-2-7b-chat-hf
daryl149
"2023-07-23T17:12:59Z"
27,983
89
transformers
[ "transformers", "pytorch", "llama", "text-generation", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-18T18:36:56Z"
These are the converted model weights for Llama-2-7B-chat in Huggingface format. Courtesy of [Mirage-Studio.io](https://mirage-studio.io), home of MirageGPT: the private ChatGPT alternative. --- license: other LLAMA 2 COMMUNITY LICENSE AGREEMENT Llama 2 Version Release Date: July 18, 2023 "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 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. ---
[ -0.3670794665813446, -0.5495761632919312, 0.5059583783149719, 0.6587082743644714, -0.5853741765022278, -0.09498313069343567, 0.009892990812659264, -0.8024653196334839, 0.4582900106906891, 0.8132715821266174, -0.5875307321548462, -0.5258802175521851, -0.8413553237915039, 0.249607652425766, -0.40224018692970276, 1.2326661348342896, -0.27358320355415344, -0.5625664591789246, -0.349467396736145, -0.08249548822641373, -0.3762011229991913, -0.4145699441432953, -0.2399984449148178, -0.2590954899787903, 0.5285064578056335, 0.3967929184436798, 0.6966533660888672, 0.5966681241989136, 0.42120084166526794, 0.33253178000450134, -0.2092006504535675, -0.06834078580141068, -0.5715824365615845, -0.1537640541791916, -0.18281669914722443, -0.3909628689289093, -0.8938111066818237, 0.21227560937404633, 0.2146109640598297, 0.2501640319824219, -0.4812932014465332, 0.6145836114883423, -0.07417827844619751, 0.2890699803829193, -0.5042606592178345, 0.30893993377685547, -0.6455196142196655, 0.03359461948275566, -0.2466651350259781, -0.12854887545108795, -0.23980151116847992, -0.2529240548610687, -0.17706197500228882, -1.0177366733551025, -0.25726380944252014, -0.03220434859395027, 1.011189341545105, 0.3917815685272217, -0.43134209513664246, -0.1720394790172577, -0.29642122983932495, 0.7736642360687256, -0.835266649723053, 0.1505315899848938, 0.6239399909973145, 0.4338458478450775, -0.1438579112291336, -0.9806249141693115, -0.7283118367195129, 0.025004474446177483, 0.031187551096081734, 0.28140774369239807, -0.5827220678329468, -0.18541739881038666, 0.24680624902248383, 0.6990313529968262, -0.42260533571243286, 0.14884373545646667, -0.6249788999557495, -0.097340889275074, 0.9869386553764343, 0.0492357574403286, 0.3444695472717285, -0.2788670063018799, -0.6490269899368286, -0.13247539103031158, -0.959568977355957, 0.07996765524148941, 0.5973772406578064, 0.023482833057641983, -0.4949394464492798, 0.819389283657074, -0.18259644508361816, 0.23140422999858856, -0.030565179884433746, -0.6672128438949585, 0.5104214549064636, -0.4787389636039734, -0.3319253921508789, -0.14169925451278687, 0.8681997656822205, 0.7695026993751526, -0.040231406688690186, -0.2476438581943512, -0.24378187954425812, -0.14994916319847107, -0.12116655707359314, -0.6314024329185486, 0.19256480038166046, 0.06010669469833374, -0.635472297668457, -0.3036719858646393, -0.27185121178627014, -0.7545928359031677, -0.43255850672721863, -0.21648409962654114, 0.21761192381381989, 0.3063817024230957, -0.6383746862411499, 0.35406920313835144, -0.22051286697387695, 0.5988932251930237, 0.1779022365808487, -0.6425191164016724, 0.4735749363899231, 0.27055624127388, 0.8274801969528198, 0.14754731953144073, -0.17828312516212463, 0.07666097581386566, 0.48819881677627563, -0.3286365270614624, 0.4627043306827545, -0.2909162938594818, -0.9014050364494324, -0.03964497521519661, 0.3116862177848816, -0.010815207846462727, -0.5441139936447144, 0.4460381269454956, -0.39230501651763916, 0.17093525826931, -0.1269654929637909, -0.1086178719997406, -0.3435911536216736, 0.03121797740459442, -0.46641814708709717, 1.1231745481491089, 0.23890884220600128, -0.5087107419967651, 0.07040266692638397, -0.5840473771095276, -0.35695168375968933, -0.20521700382232666, 0.25128552317619324, -0.30829229950904846, -0.18346653878688812, 0.04990652948617935, 0.2681441307067871, -0.4033094048500061, 0.30024051666259766, -0.40305250883102417, 0.008941984735429287, 0.10646691173315048, -0.19037970900535583, 1.1223353147506714, 0.2386910766363144, -0.6495504379272461, -0.19828259944915771, -0.7218720316886902, -0.4108809530735016, 0.6126968860626221, -0.7122654318809509, 0.03387193754315376, 0.1575680375099182, 0.056892503052949905, 0.2958025336265564, 0.6943596005439758, -0.6325831413269043, 0.4486164152622223, -0.3780885636806488, 0.36726492643356323, 0.7914376258850098, 0.11446686834096909, 0.298075407743454, -0.47767359018325806, 0.7066311240196228, 0.007635523099452257, 0.36197784543037415, 0.020095817744731903, -0.788571834564209, -0.927199125289917, -0.30723491311073303, -0.15922358632087708, 0.7263433337211609, -0.5172169208526611, 0.4046379327774048, -0.3396633565425873, -0.6790810227394104, -0.47594577074050903, 0.3393256664276123, 0.5336691737174988, 0.46364036202430725, 0.4843168556690216, -0.2972736954689026, -0.5896839499473572, -1.0148955583572388, 0.06834197044372559, -0.1823229193687439, -0.022998183965682983, 0.6506296992301941, 0.49271273612976074, -0.5178869962692261, 0.8490868806838989, -0.6143156290054321, -0.550352156162262, -0.13339580595493317, -0.16241461038589478, 0.3886609673500061, 0.33043715357780457, 1.0631803274154663, -0.6309176683425903, -0.5205479860305786, 0.006940610706806183, -0.653652012348175, -0.3874145448207855, -0.027314744889736176, -0.17847463488578796, 0.12753596901893616, 0.36167073249816895, -0.8118875622749329, 0.8147181868553162, 0.7972304224967957, -0.45451703667640686, 0.3369887173175812, -0.1983410269021988, 0.06393133103847504, -1.1339631080627441, 0.02668832242488861, 0.026457462459802628, -0.3092847764492035, -0.4267098009586334, 0.07350575923919678, -0.6422180533409119, -0.022596586495637894, -0.7149637341499329, 0.7512190341949463, -0.21389776468276978, -0.10592453926801682, -0.2197866439819336, 0.35545286536216736, 0.08923874795436859, 0.44699767231941223, -0.18264803290367126, 0.8672475814819336, 0.325797438621521, -0.7962441444396973, 0.18721559643745422, 0.47027069330215454, -0.19998951256275177, 0.5404951572418213, -1.0266073942184448, 0.07557343691587448, -0.06633011251688004, 0.6291195750236511, -0.6971123814582825, -0.1601090282201767, 0.8173997402191162, -0.5889440178871155, 0.005621932912617922, 0.04881175607442856, -0.686712920665741, -0.11305869370698929, -0.38323622941970825, 0.2609708607196808, 0.7839761972427368, -0.6061062216758728, 0.6672459840774536, 0.5246371030807495, 0.005861908663064241, -0.7782559394836426, -0.9888619780540466, -0.015040868893265724, -0.554472029209137, -0.5154906511306763, 0.5571574568748474, -0.13948869705200195, -0.29759618639945984, 0.11699032783508301, 0.10721051692962646, -0.18591022491455078, 0.21616747975349426, 0.567841112613678, -0.162778839468956, 0.006426526699215174, -0.25106680393218994, 0.1944587081670761, -0.1126382052898407, 0.09488093107938766, 0.05289945378899574, 0.5243902206420898, 0.0909452736377716, -0.2716512680053711, -0.44294998049736023, 0.1870778501033783, 0.602814793586731, -0.11097079515457153, 0.6176005005836487, 0.4970141053199768, -0.5976534485816956, 0.32415780425071716, -0.6127167344093323, 0.04740293323993683, -0.519598126411438, 0.22056660056114197, -0.2893597185611725, -0.6022495031356812, 0.8920850157737732, 0.16710443794727325, 0.4368302822113037, 0.92214035987854, 0.769978940486908, 0.022083885967731476, 0.5954300761222839, 0.9160853028297424, -0.015066000632941723, 0.4675680100917816, -0.22869744896888733, 0.06437209248542786, -1.1792678833007812, -0.5815033912658691, -0.40354835987091064, -0.5329859852790833, -0.6189187169075012, -0.5393229722976685, 0.07679060101509094, 0.18624483048915863, -0.5390118956565857, 0.6574287414550781, -0.3173753321170807, 0.42265352606773376, 0.40460672974586487, 0.18589408695697784, 0.4407162666320801, 0.039260219782590866, -0.03846846520900726, 0.07408538460731506, -0.26426929235458374, -0.7346115112304688, 1.1567479372024536, 0.6782052516937256, 0.47278279066085815, 0.5553374886512756, 0.6476483345031738, 0.3137074112892151, 0.3152812123298645, -0.8465341329574585, 0.7003135681152344, 0.02913927659392357, -0.8613815903663635, -0.036253903061151505, -0.2209521383047104, -1.0238944292068481, 0.1812349557876587, 0.05992282181978226, -1.1702945232391357, 0.5562688708305359, -0.21405701339244843, -0.025143424049019814, 0.437568336725235, -0.523727297782898, 0.5122407078742981, -0.09460078179836273, -0.1713467389345169, -0.3894403874874115, -0.6734381914138794, 0.6189223527908325, -0.0742480531334877, 0.20655220746994019, -0.3659363389015198, -0.59048992395401, 1.015044927597046, -0.5950568318367004, 1.5094705820083618, -0.2412697672843933, -0.23464088141918182, 0.632137656211853, -0.053785622119903564, 0.43195977807044983, 0.19654352962970734, 0.024927586317062378, 0.6792954206466675, 0.12908382713794708, -0.16381752490997314, -0.24814444780349731, 0.5349560976028442, -1.2712111473083496, -0.7611595988273621, -0.4576348066329956, -0.460915744304657, 0.4023670554161072, 0.27890101075172424, 0.18737682700157166, -0.03990766778588295, 0.28273093700408936, 0.42442652583122253, 0.37620240449905396, -0.4970847964286804, 0.354403018951416, 0.5291454792022705, -0.4677422046661377, -0.6525707840919495, 0.9445874691009521, 0.11681809276342392, 0.2927251160144806, 0.03652798384428024, 0.09262541681528091, -0.40144917368888855, -0.3807871341705322, -0.31077322363853455, 0.35343673825263977, -1.0033512115478516, -0.49535635113716125, -0.46400436758995056, -0.00017245442722924054, -0.2787094712257385, -0.13643358647823334, -0.22581501305103302, -0.5781235694885254, -0.8824347257614136, -0.15961097180843353, 0.7287790179252625, 0.6797820329666138, -0.2636023759841919, 0.6731784343719482, -0.6020309329032898, 0.35882332921028137, 0.21749281883239746, 0.316862016916275, -0.3345995545387268, -0.8730556964874268, 0.012624026276171207, 0.047003425657749176, -0.5510818958282471, -0.9733130931854248, 0.2650073766708374, 0.1841975897550583, 0.5993108153343201, 0.26456040143966675, -0.03028121218085289, 0.7820074558258057, -0.4909268915653229, 1.039770483970642, 0.4889102876186371, -0.9251928925514221, 0.5318496823310852, -0.4444645643234253, -0.14940476417541504, 0.3817635774612427, 0.5030180811882019, -0.4887756407260895, -0.2879112660884857, -0.9362173080444336, -0.9256162047386169, 0.48702603578567505, 0.15811479091644287, 0.38528603315353394, 0.09266958385705948, 0.5974910855293274, -0.20227976143360138, 0.2841763198375702, -1.297255277633667, -0.445282906293869, -0.2279711365699768, -0.09854453057050705, 0.20721754431724548, -0.32716935873031616, -0.4526124894618988, -0.13104917109012604, 0.7986184358596802, 0.07833144813776016, 0.2719654440879822, 0.06567272543907166, -0.20634648203849792, -0.2259150594472885, 0.14390115439891815, 0.8020243644714355, 0.9279406070709229, -0.10401318222284317, -0.11560776084661484, 0.5777861475944519, -0.8070876002311707, 0.16555967926979065, 0.10963036119937897, -0.06947165727615356, -0.29915669560432434, 0.022251183167099953, 0.5278142094612122, 0.47596195340156555, -0.5298874974250793, 0.5606773495674133, 0.11540859937667847, -0.38827621936798096, -0.362691193819046, -0.12109825015068054, 0.21408282220363617, 0.5881816148757935, 0.3024353086948395, -0.20998866856098175, 0.24158941209316254, -0.39851120114326477, 0.1218879222869873, 0.3093103766441345, -0.043764542788267136, -0.28372713923454285, 0.763780415058136, -0.04091820493340492, -0.025292957201600075, 0.3459329605102539, -0.12647411227226257, -0.27551355957984924, 0.7815935611724854, 0.7638134360313416, 0.6749366521835327, -0.1064869686961174, 0.24317896366119385, 0.3979998528957367, 0.7041574120521545, 0.19285184144973755, 0.1807592511177063, 0.017326336354017258, -0.39992350339889526, -0.3538714349269867, -0.6448286771774292, -0.4911331832408905, 0.015346161089837551, -0.6924062371253967, 0.4329141080379486, -0.7603850364685059, -0.2785591781139374, -0.5853642821311951, 0.1047019511461258, -0.42598289251327515, 0.12413342297077179, 0.31059762835502625, 0.9215196371078491, -0.7987076044082642, 0.5933785438537598, 0.667926013469696, -1.0148570537567139, -0.8237670063972473, -0.24443528056144714, 0.1643146425485611, -1.0328068733215332, 0.627565860748291, -0.03878974914550781, -0.280988484621048, -0.06919892132282257, -0.7523036599159241, -1.119506597518921, 1.6582390069961548, 0.4773384928703308, -0.41278257966041565, 0.11200474202632904, 0.13712652027606964, 0.24174660444259644, -0.21487009525299072, 0.444587379693985, 0.6180353760719299, 0.5227107405662537, 0.36509644985198975, -1.1302800178527832, 0.23625878989696503, -0.006929922848939896, 0.06800252199172974, -0.3994747996330261, -0.9714795351028442, 0.6899147033691406, -0.06824861466884613, -0.26575979590415955, 0.13509874045848846, 0.7392362356185913, 0.7741957902908325, 0.33754023909568787, 0.46496325731277466, 0.7601739168167114, 0.7564600110054016, -0.22375674545764923, 1.1829248666763306, -0.27919140458106995, 0.42357486486434937, 0.8031803965568542, 0.07312130928039551, 1.094451904296875, 0.4663465917110443, -0.5981681942939758, 0.9150670170783997, 1.0094261169433594, 0.064895860850811, 0.5091628432273865, 0.2076038420200348, -0.3212454617023468, -0.023986246436834335, -0.5617693662643433, -0.7935770153999329, 0.2566137909889221, 0.47559621930122375, -0.4275333881378174, -0.1144116073846817, -0.3365747928619385, 0.38167130947113037, -0.18678508698940277, -0.2274385541677475, 0.5777719020843506, 0.4914702773094177, 0.0662367194890976, 0.6513631939888, 0.10200595110654831, 0.7343360781669617, -0.667347252368927, 0.025637639686465263, -0.4212805926799774, -0.15842683613300323, -0.6162426471710205, -0.6529433727264404, 0.2049078643321991, 0.13322798907756805, -0.22264708578586578, -0.22668606042861938, 0.6021114587783813, 0.045327987521886826, -0.5160695314407349, 0.4380134642124176, 0.09614478796720505, 0.464513897895813, 0.48584607243537903, -0.8080360889434814, 0.2819576859474182, -0.18453027307987213, -0.65831458568573, 0.3423760235309601, 0.14995981752872467, 0.139543816447258, 0.7938879132270813, 0.6942003965377808, -0.02781098149716854, 0.17184506356716156, -0.1537483185529709, 1.2328834533691406, -0.5347715616226196, -0.13120737671852112, -0.6630508303642273, 0.8975487351417542, 0.08107275515794754, -0.3230893313884735, 0.6672104001045227, 0.47253870964050293, 0.769146203994751, -0.0746413841843605, 0.6570870876312256, -0.25455665588378906, 0.18140125274658203, -0.5304967761039734, 0.7379093766212463, -0.9567597508430481, 0.2200058102607727, -0.3099208474159241, -1.1940146684646606, -0.19943362474441528, 0.7308611273765564, -0.3119690716266632, 0.07646311819553375, 0.4009218215942383, 0.5078920125961304, 0.04783185198903084, -0.3079991042613983, 0.19663842022418976, 0.19139114022254944, 0.5338683128356934, 0.5540483593940735, 0.6415966749191284, -0.7106530070304871, 0.6178016662597656, -0.3342058062553406, -0.2834536135196686, -0.13338229060173035, -1.0996602773666382, -0.7350274324417114, -0.3477526009082794, -0.41693833470344543, -0.39874038100242615, -0.4569821357727051, 0.8559991717338562, 0.5725848078727722, -0.4764552414417267, -0.43808063864707947, 0.3136144280433655, 0.36890164017677307, 0.11567400395870209, -0.22502286732196808, 0.10494057089090347, 0.06589208543300629, -0.7670697569847107, 0.5934747457504272, 0.22749076783657074, 0.372755765914917, -0.4342133104801178, -0.26105400919914246, -0.24221305549144745, -0.09187403321266174, 0.8401321768760681, 0.5694146752357483, -1.0089075565338135, -0.1969238966703415, -0.1229204460978508, -0.008648316375911236, -0.059120744466781616, 0.2565087676048279, -0.6949825286865234, 0.14633095264434814, 0.4740210175514221, 0.4954337775707245, 0.6283722519874573, 0.031696867197752, 0.10200963914394379, -0.6404340267181396, 0.45310941338539124, 0.09438838064670563, 0.584649384021759, 0.05240447074174881, -0.4310535192489624, 0.6134680509567261, 0.2463226616382599, -0.507286012172699, -0.8342740535736084, 0.13386522233486176, -1.1043972969055176, 0.10408282279968262, 1.3139100074768066, -0.2371605783700943, -0.1861361414194107, 0.13959161937236786, -0.1604393571615219, 0.21553459763526917, -0.2591509521007538, 0.39050135016441345, 0.5487259030342102, -0.08375358581542969, -0.1546149104833603, -0.9709987044334412, 0.2852683961391449, 0.07091327011585236, -0.9989854097366333, -0.08616605401039124, 0.5275876522064209, 0.5154665112495422, 0.3787398338317871, 0.7714643478393555, -0.3680271506309509, 0.19103161990642548, -0.1709231734275818, 0.2950954735279083, 0.10260360687971115, -0.2533222436904907, -0.2033510059118271, -0.24302978813648224, 0.007725744973868132, -0.2342524379491806 ]
codellama/CodeLlama-34b-Instruct-hf
codellama
"2023-10-27T18:12:23Z"
27,828
210
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "llama-2", "code", "arxiv:2308.12950", "license:llama2", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-08-24T16:58:22Z"
--- 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 34B instruct-tuned version in the Hugging Face Transformers format. This model is designed for general code synthesis and understanding. Links to other models can be found in the index at the bottom. | | Base Model | Python | Instruct | | --- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | 7B | [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) | [codellama/CodeLlama-7b-Python-hf](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) | [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) | | 13B | [codellama/CodeLlama-13b-hf](https://huggingface.co/codellama/CodeLlama-13b-hf) | [codellama/CodeLlama-13b-Python-hf](https://huggingface.co/codellama/CodeLlama-13b-Python-hf) | [codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) | | 34B | [codellama/CodeLlama-34b-hf](https://huggingface.co/codellama/CodeLlama-34b-hf) | [codellama/CodeLlama-34b-Python-hf](https://huggingface.co/codellama/CodeLlama-34b-Python-hf) | [codellama/CodeLlama-34b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-34b-Instruct-hf) | ## Model Use To use this model, please make sure to install transformers from `main` until the next version is released: ```bash pip install git+https://github.com/huggingface/transformers.git@main accelerate ``` Model capabilities: - [x] Code completion. - [ ] Infilling. - [x] Instructions / chat. - [ ] Python specialist. ## Model Details *Note: Use of this model is governed by the Meta license. Meta developed and publicly released the Code Llama family of large language models (LLMs). **Model Developers** Meta **Variations** Code Llama comes in three model sizes, and three variants: * Code Llama: base models designed for general code synthesis and understanding * Code Llama - Python: designed specifically for Python * Code Llama - Instruct: for instruction following and safer deployment All variants are available in sizes of 7B, 13B and 34B parameters. **This repository contains the Instruct version of the 34B parameters model.** **Input** Models input text only. **Output** Models generate text only. **Model Architecture** Code Llama is an auto-regressive language model that uses an optimized transformer architecture. **Model Dates** Code Llama and its variants have been trained between January 2023 and July 2023. **Status** This is a static model trained on an offline dataset. Future versions of Code Llama - Instruct will be released as we improve model safety with community feedback. **License** A custom commercial license is available at: [https://ai.meta.com/resources/models-and-libraries/llama-downloads/](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) **Research Paper** More information can be found in the paper "[Code Llama: Open Foundation Models for Code](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/)" or its [arXiv page](https://arxiv.org/abs/2308.12950). ## Intended Use **Intended Use Cases** Code Llama and its variants is intended for commercial and research use in English and relevant programming languages. The base model Code Llama can be adapted for a variety of code synthesis and understanding tasks, Code Llama - Python is designed specifically to handle the Python programming language, and Code Llama - Instruct is intended to be safer to use for code assistant and generation applications. **Out-of-Scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Code Llama and its variants. ## Hardware and Software **Training Factors** We used custom training libraries. The training and fine-tuning of the released models have been performed Meta’s Research Super Cluster. **Carbon Footprint** In aggregate, training all 9 Code Llama models required 400K GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 65.3 tCO2eq, 100% of which were offset by Meta’s sustainability program. ## Training Data All experiments reported here and the released models have been trained and fine-tuned using the same data as Llama 2 with different weights (see Section 2 and Table 1 in the [research paper](https://ai.meta.com/research/publications/code-llama-open-foundation-models-for-code/) for details). ## Evaluation Results See evaluations for the main models and detailed ablations in Section 3 and safety evaluations in Section 4 of the research paper. ## Ethical Considerations and Limitations Code Llama and its variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Code Llama’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate or objectionable responses to user prompts. Therefore, before deploying any applications of Code Llama, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available available at [https://ai.meta.com/llama/responsible-use-guide](https://ai.meta.com/llama/responsible-use-guide).
[ -0.39720603823661804, -0.6398831009864807, 0.3010968863964081, 0.5654376745223999, -0.24250054359436035, 0.1746952086687088, -0.08839228749275208, -0.6549807786941528, 0.24258722364902496, 0.5276452898979187, -0.41190803050994873, -0.576109766960144, -0.5927810072898865, 0.32509979605674744, -0.5115528702735901, 1.2563438415527344, -0.0649288073182106, -0.3196667432785034, -0.2986903190612793, 0.006057793740183115, -0.24185548722743988, -0.645031750202179, -0.17911893129348755, -0.4664095342159271, 0.3309856057167053, 0.2961183190345764, 0.758755624294281, 0.6350840330123901, 0.5148436427116394, 0.32490742206573486, -0.32347944378852844, 0.012599455192685127, -0.3144724667072296, -0.3838220238685608, 0.2388290911912918, -0.6145257353782654, -0.8013235926628113, -0.025660434737801552, 0.35751307010650635, 0.343979150056839, -0.3225225508213043, 0.4503014087677002, -0.1855875700712204, 0.5024040937423706, -0.34076258540153503, 0.21139474213123322, -0.6474367380142212, -0.056223683059215546, 0.03283838927745819, -0.09653335809707642, -0.1106685921549797, -0.5817335844039917, -0.13684023916721344, -0.4444606900215149, -0.09486275911331177, -0.03757315129041672, 1.1378947496414185, 0.5729337334632874, -0.3291832506656647, -0.2516062259674072, -0.30369773507118225, 0.8188600540161133, -1.0050020217895508, 0.022106600925326347, 0.41301605105400085, -0.0507349818944931, -0.1641594022512436, -0.8592543005943298, -0.7647128701210022, -0.3863646388053894, -0.12098623067140579, -0.038161665201187134, -0.48781919479370117, 0.07811994105577469, 0.43551626801490784, 0.542076051235199, -0.4612410366535187, 0.18357379734516144, -0.4431748390197754, -0.23610788583755493, 0.9357154369354248, 0.11943569779396057, 0.44451218843460083, -0.2562294006347656, -0.3458457589149475, -0.02074197307229042, -0.8903909921646118, 0.023747557774186134, 0.5130114555358887, -0.14842060208320618, -0.8086865544319153, 0.7677662372589111, -0.18602004647254944, 0.5942913293838501, 0.04715755581855774, -0.5806146264076233, 0.5406034588813782, -0.3269714415073395, -0.3113451600074768, -0.1627657562494278, 0.9058116674423218, 0.5169237852096558, 0.3889741599559784, 0.041973818093538284, -0.25929543375968933, 0.3326225280761719, 0.1480552852153778, -0.8391568660736084, -0.06254392117261887, 0.3140178918838501, -0.6315773725509644, -0.7028488516807556, -0.29766425490379333, -0.8528730869293213, -0.11597362905740738, -0.06762751936912537, 0.11799143254756927, -0.1806502640247345, -0.41332054138183594, 0.22144661843776703, 0.10758364200592041, 0.47541922330856323, 0.1013922169804573, -0.9015690684318542, 0.050726450979709625, 0.5077478885650635, 0.7708648443222046, 0.035208120942115784, -0.4946989417076111, 0.03603488206863403, -0.13930007815361023, -0.3657255470752716, 0.6862754225730896, -0.4948232173919678, -0.5194409489631653, -0.09502162039279938, 0.09473735094070435, -0.0058356598019599915, -0.5387088656425476, 0.23628996312618256, -0.3838515281677246, -0.027617909014225006, 0.1530001014471054, -0.2929489314556122, -0.46719852089881897, 0.03136492148041725, -0.5812718272209167, 1.1769322156906128, 0.29337722063064575, -0.6736632585525513, -0.04241668060421944, -0.5814975500106812, -0.39352357387542725, -0.26762551069259644, -0.029483895748853683, -0.6786127686500549, -0.04694762080907822, 0.1966635286808014, 0.51595139503479, -0.43249228596687317, 0.4627455472946167, -0.1170019879937172, -0.42284709215164185, 0.22538447380065918, -0.16783413290977478, 1.0197538137435913, 0.36878928542137146, -0.46036654710769653, 0.2309396117925644, -0.9569563269615173, -0.13119636476039886, 0.5037404298782349, -0.5687752962112427, 0.1458730846643448, -0.13675671815872192, -0.01826431415975094, -0.06115465611219406, 0.57118821144104, -0.27404847741127014, 0.5713286995887756, -0.3983382284641266, 0.7689126133918762, 0.6661257147789001, -0.013265443965792656, 0.41096609830856323, -0.6080847978591919, 0.8359244465827942, -0.1885659545660019, 0.1998414695262909, -0.28806981444358826, -0.7728530168533325, -1.041110873222351, -0.3085305094718933, 0.019318513572216034, 0.7282195091247559, -0.5011104941368103, 0.6414703130722046, 0.012343700975179672, -0.784938395023346, -0.5365265011787415, 0.2179160714149475, 0.5634777545928955, 0.2768603563308716, 0.3396247327327728, -0.08417338132858276, -0.823882520198822, -0.8749127388000488, 0.0745670348405838, -0.4422982931137085, 0.09579291939735413, 0.21519382297992706, 0.8787868022918701, -0.6842944025993347, 0.7892927527427673, -0.45500290393829346, -0.000027388703529140912, -0.3753354549407959, -0.28703245520591736, 0.5216913223266602, 0.5543060302734375, 0.775982677936554, -0.5984740853309631, -0.24301226437091827, 0.060970742255449295, -0.8771265745162964, -0.12112955003976822, -0.20917189121246338, -0.04340140521526337, 0.42370492219924927, 0.34197309613227844, -0.6684427261352539, 0.5248367190361023, 0.9340041279792786, -0.21707187592983246, 0.6232564449310303, -0.14783059060573578, -0.16179659962654114, -1.0784512758255005, 0.208182230591774, -0.1506648063659668, -0.0196380615234375, -0.5116798281669617, 0.39415326714515686, 0.09969458729028702, 0.09468057751655579, -0.5310958027839661, 0.3449932336807251, -0.3883153796195984, -0.034224726259708405, -0.1278565675020218, -0.24061919748783112, -0.0417746901512146, 0.7879855632781982, -0.07020748406648636, 1.0408823490142822, 0.5349770188331604, -0.6667305827140808, 0.3190265893936157, 0.34308549761772156, -0.41610682010650635, 0.202891007065773, -0.9732555150985718, 0.37925559282302856, 0.12078557908535004, 0.35380882024765015, -0.7912610173225403, -0.27585166692733765, 0.349386990070343, -0.4559408724308014, 0.11090201139450073, -0.03272320702672005, -0.5128435492515564, -0.4895801246166229, -0.2561473548412323, 0.4587116837501526, 0.8871892690658569, -0.6427972316741943, 0.41513994336128235, 0.4289185702800751, 0.11720222234725952, -0.7442831993103027, -0.7435722947120667, 0.12134901434183121, -0.4919193387031555, -0.636366069316864, 0.4438565671443939, -0.3234322667121887, -0.22057563066482544, -0.17461654543876648, 0.05406927689909935, -0.014282053336501122, 0.3171466886997223, 0.47890833020210266, 0.42899322509765625, -0.12747953832149506, -0.21585699915885925, 0.013618148863315582, -0.10137055069208145, 0.04227723181247711, 0.174458310008049, 0.7874137759208679, -0.42090290784835815, -0.22602254152297974, -0.579658567905426, 0.19099180400371552, 0.6114610433578491, -0.29129064083099365, 0.6059567332267761, 0.378362238407135, -0.3905694782733917, -0.020487815141677856, -0.6660494208335876, 0.15457376837730408, -0.5649036169052124, 0.31135275959968567, -0.2564125061035156, -0.8881019949913025, 0.6816097497940063, 0.07307569682598114, 0.20270119607448578, 0.48813074827194214, 0.8360002636909485, 0.10516668856143951, 0.7636706829071045, 1.0013487339019775, -0.4487344026565552, 0.4171617031097412, -0.5485785007476807, 0.10146979242563248, -0.8383122682571411, -0.4776230752468109, -0.6600587964057922, -0.02498202957212925, -0.721465528011322, -0.465376615524292, 0.3343276083469391, 0.21228653192520142, -0.5235860347747803, 0.7643886208534241, -0.8088806867599487, 0.44805076718330383, 0.45495131611824036, 0.029298193752765656, 0.40509548783302307, 0.036942895501852036, -0.021013714373111725, 0.3142976462841034, -0.4514915645122528, -0.7453158497810364, 1.258711576461792, 0.4670088589191437, 0.8794125318527222, -0.025455597788095474, 0.8775758147239685, 0.07164254039525986, 0.3512043356895447, -0.7177532315254211, 0.6197423338890076, 0.28156423568725586, -0.511565625667572, 0.009091425687074661, -0.22404330968856812, -0.9395987391471863, 0.1486130654811859, 0.06703832745552063, -0.8390658497810364, 0.0699324831366539, -0.03241067752242088, -0.24667654931545258, 0.32021090388298035, -0.678432822227478, 0.613539457321167, -0.22436799108982086, 0.04829378426074982, -0.20099970698356628, -0.5334658622741699, 0.6251199841499329, -0.150868758559227, 0.231661856174469, -0.14594465494155884, -0.21368570625782013, 0.6754908561706543, -0.541175127029419, 1.1091445684432983, 0.14911508560180664, -0.4983784854412079, 0.619246780872345, -0.01629684492945671, 0.4914969801902771, 0.013819192536175251, -0.23796485364437103, 0.7183049321174622, 0.000124558515381068, -0.19347494840621948, -0.12563157081604004, 0.6486696600914001, -1.1015465259552002, -0.7835395932197571, -0.4162731170654297, -0.4892553389072418, 0.2695556581020355, 0.15416313707828522, 0.4056227207183838, 0.04284506291151047, 0.18489594757556915, 0.13988474011421204, 0.4089561104774475, -0.7206671833992004, 0.6458043456077576, 0.3771305978298187, -0.29132306575775146, -0.5014342665672302, 0.8440133929252625, -0.1564277559518814, 0.2192712128162384, 0.2888411283493042, 0.03388954699039459, -0.1286962330341339, -0.48713168501853943, -0.428568571805954, 0.4562864899635315, -0.6570212244987488, -0.587104320526123, -0.6291387677192688, -0.3729493021965027, -0.3401353657245636, -0.3294526934623718, -0.2900022566318512, -0.27164319157600403, -0.6923620104789734, -0.18420633673667908, 0.8048219680786133, 0.834043562412262, 0.05266833305358887, 0.48330968618392944, -0.634493350982666, 0.4755043685436249, 0.11028861999511719, 0.40694037079811096, 0.01798582449555397, -0.501992404460907, -0.13529054820537567, -0.029059989377856255, -0.546902060508728, -0.8990796208381653, 0.6197823286056519, 0.1342003047466278, 0.6509573459625244, 0.13585135340690613, -0.04842669889330864, 0.6993643641471863, -0.45707422494888306, 0.9574316143989563, 0.3416363298892975, -1.137200117111206, 0.6396976113319397, -0.26402419805526733, 0.04492364078760147, 0.10287754982709885, 0.36508744955062866, -0.4329882264137268, -0.2785196304321289, -0.657489001750946, -0.7698374390602112, 0.6275517344474792, 0.1782720386981964, 0.3038310110569, 0.03861420974135399, 0.4634356200695038, -0.015864623710513115, 0.32575634121894836, -1.0948028564453125, -0.3347867727279663, -0.3262834846973419, -0.2489241361618042, -0.09540829062461853, -0.3053363859653473, -0.08864565193653107, -0.2988925576210022, 0.4575023353099823, -0.1933167427778244, 0.5596446394920349, 0.12436609715223312, -0.16501352190971375, -0.273211807012558, 0.05701558291912079, 0.7082095146179199, 0.603495717048645, -0.02628673054277897, -0.15530042350292206, 0.4121895432472229, -0.560408353805542, 0.24135643243789673, -0.12303221225738525, -0.08609934896230698, -0.3233189880847931, 0.5780970454216003, 0.6721243262290955, 0.15140148997306824, -0.8660704493522644, 0.5015749931335449, 0.16340945661067963, -0.2804693877696991, -0.5230001211166382, 0.2854624390602112, 0.3019373118877411, 0.36728769540786743, 0.2586967647075653, 0.03042452037334442, -0.11460243165493011, -0.43980929255485535, -0.007667448837310076, 0.36728522181510925, 0.19068020582199097, -0.35988056659698486, 0.949463427066803, 0.10733383148908615, -0.3806667625904083, 0.49325910210609436, 0.07143617421388626, -0.596163809299469, 1.2142621278762817, 0.7187226414680481, 0.7831972241401672, -0.2103956788778305, 0.12175455689430237, 0.47879859805107117, 0.5716921091079712, -0.0008430417510680854, 0.4397071301937103, 0.011559237726032734, -0.5541996955871582, -0.35404112935066223, -0.9073050618171692, -0.4091721475124359, 0.11261773854494095, -0.48686593770980835, 0.3158074617385864, -0.6560099124908447, -0.04288264364004135, -0.3782667815685272, 0.10075295716524124, -0.654007613658905, -0.00612830463796854, 0.12143480032682419, 0.9823907613754272, -0.6475589275360107, 0.9583398699760437, 0.6048691868782043, -0.7368112206459045, -0.9362784624099731, -0.1892065405845642, -0.06408454477787018, -1.2766271829605103, 0.4865128695964813, 0.27495068311691284, 0.053035516291856766, 0.08308945596218109, -0.9783931374549866, -1.1293020248413086, 1.3236135244369507, 0.49191758036613464, -0.5426676273345947, -0.01076135691255331, 0.20206312835216522, 0.5906753540039062, -0.36385470628738403, 0.40039515495300293, 0.6771562099456787, 0.4467257559299469, -0.11020491272211075, -1.250826120376587, 0.33461281657218933, -0.4062020182609558, 0.22859416902065277, -0.2902512848377228, -1.08371901512146, 1.0731725692749023, -0.575966477394104, -0.1401345133781433, 0.501142680644989, 0.672096312046051, 0.5603535771369934, 0.2050415575504303, 0.3582304120063782, 0.5846867561340332, 0.6773276925086975, 0.02842375636100769, 1.2228623628616333, -0.4681878089904785, 0.41867780685424805, 0.5302691459655762, -0.1219630166888237, 0.7493468523025513, 0.4151134490966797, -0.6151611804962158, 0.7769647836685181, 0.7959777116775513, -0.23220276832580566, 0.29378756880760193, 0.33785417675971985, -0.0724785178899765, -0.03326161578297615, -0.09928888827562332, -0.7769317030906677, 0.410979300737381, 0.33550718426704407, -0.3511140048503876, 0.07465729117393494, -0.22249305248260498, 0.3250783383846283, -0.1215851828455925, -0.07667827606201172, 0.6577941179275513, 0.23903129994869232, -0.5624979138374329, 1.2081495523452759, 0.13678663969039917, 1.0131746530532837, -0.5484544634819031, -0.12156222760677338, -0.46288856863975525, 0.05025084316730499, -0.5879775881767273, -0.5421635508537292, 0.19242103397846222, 0.3131471276283264, 0.008631921373307705, -0.12857897579669952, 0.48317742347717285, -0.06563347578048706, -0.512188196182251, 0.4004999101161957, 0.18101269006729126, 0.2821182906627655, 0.1451217085123062, -0.6742485761642456, 0.4720941483974457, 0.20370817184448242, -0.46661126613616943, 0.3718479871749878, 0.10668492317199707, 0.04856540635228157, 0.9695255756378174, 0.7972165942192078, -0.14278773963451385, 0.17424249649047852, -0.12698093056678772, 1.1719822883605957, -0.720295786857605, -0.34951433539390564, -0.8144590258598328, 0.6566134691238403, 0.3239858150482178, -0.465117871761322, 0.6277366876602173, 0.3615375757217407, 0.847113311290741, -0.13743577897548676, 0.8345092535018921, -0.18978478014469147, 0.07913096994161606, -0.4965105652809143, 0.671863317489624, -0.798552393913269, 0.404134064912796, -0.518272340297699, -0.959028422832489, -0.32156652212142944, 0.8830186724662781, -0.04193459451198578, 0.06812101602554321, 0.5334876179695129, 1.0277574062347412, 0.325778067111969, -0.09809103608131409, 0.21411927044391632, 0.1968110203742981, 0.40075257420539856, 0.8167213797569275, 1.0197817087173462, -0.5976648926734924, 0.7432590126991272, -0.5894999504089355, -0.2540731132030487, -0.295735627412796, -1.0228153467178345, -1.009741187095642, -0.5209751129150391, -0.3485637307167053, -0.38635414838790894, -0.284750759601593, 0.9309375286102295, 0.5796559453010559, -0.6102855801582336, -0.4922681748867035, -0.1523594856262207, 0.4232906401157379, -0.11622153967618942, -0.20871502161026, 0.2902917265892029, -0.1289188116788864, -0.8749938607215881, 0.4159778952598572, -0.03805743157863617, 0.17693594098091125, -0.34538787603378296, -0.2637747526168823, -0.13888803124427795, 0.01633826456964016, 0.4888223707675934, 0.3709988296031952, -0.8631274104118347, -0.20208346843719482, 0.08157681673765182, -0.18913379311561584, 0.1175190657377243, 0.43913906812667847, -0.6524918079376221, -0.07584588974714279, 0.33843690156936646, 0.45901748538017273, 0.3560568392276764, -0.24006405472755432, 0.24276860058307648, -0.39549893140792847, 0.4487916827201843, -0.000852655794005841, 0.5148800611495972, 0.10556235164403915, -0.6192155480384827, 0.7272452116012573, 0.25965186953544617, -0.700054407119751, -0.9360567331314087, 0.16052132844924927, -1.146646499633789, -0.21875354647636414, 1.3476155996322632, -0.10827943682670593, -0.32742395997047424, 0.1968500018119812, -0.3931637108325958, 0.27442190051078796, -0.39919912815093994, 0.734231173992157, 0.3129797577857971, -0.08676218241453171, -0.15778076648712158, -0.4330592155456543, 0.28732097148895264, 0.26681745052337646, -0.9909168481826782, -0.17649124562740326, 0.3851258456707001, 0.39988064765930176, 0.20539911091327667, 0.6987914443016052, -0.1344161331653595, 0.1668422818183899, 0.055556535720825195, 0.46802452206611633, -0.09264156967401505, -0.2348775565624237, -0.405203253030777, -0.06869997084140778, -0.08408372849225998, -0.04622877389192581 ]
uw-madison/yoso-4096
uw-madison
"2022-01-12T13:36:04Z"
27,768
0
transformers
[ "transformers", "pytorch", "yoso", "fill-mask", "arxiv:2111.09714", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
# YOSO YOSO model for masked language modeling (MLM) for sequence length 4096. ## About YOSO The YOSO model was proposed in [You Only Sample (Almost) Once: Linear Cost Self-Attention Via Bernoulli Sampling](https://arxiv.org/abs/2111.09714) by Zhanpeng Zeng, Yunyang Xiong, Sathya N. Ravi, Shailesh Acharya, Glenn Fung, Vikas Singh. The abstract from the paper is the following: Transformer-based models are widely used in natural language processing (NLP). Central to the transformer model is the self-attention mechanism, which captures the interactions of token pairs in the input sequences and depends quadratically on the sequence length. Training such models on longer sequences is expensive. In this paper, we show that a Bernoulli sampling attention mechanism based on Locality Sensitive Hashing (LSH), decreases the quadratic complexity of such models to linear. We bypass the quadratic cost by considering self-attention as a sum of individual tokens associated with Bernoulli random variables that can, in principle, be sampled at once by a single hash (although in practice, this number may be a small constant). This leads to an efficient sampling scheme to estimate self-attention which relies on specific modifications of LSH (to enable deployment on GPU architectures). We evaluate our algorithm on the GLUE benchmark with standard 512 sequence length where we see favorable performance relative to a standard pretrained Transformer. On the Long Range Arena (LRA) benchmark, for evaluating performance on long sequences, our method achieves results consistent with softmax self-attention but with sizable speed-ups and memory savings and often outperforms other efficient self-attention methods. Our code is available at this https URL ## Usage ```python >>> from transformers import pipeline >>> unmasker = pipeline('fill-mask', model='uw-madison/yoso-4096') >>> unmasker("Paris is the [MASK] of France.") [{'score': 0.024274500086903572, 'token': 812, 'token_str': ' capital', 'sequence': 'Paris is the capital of France.'}, {'score': 0.022863076999783516, 'token': 3497, 'token_str': ' Republic', 'sequence': 'Paris is the Republic of France.'}, {'score': 0.01383623294532299, 'token': 1515, 'token_str': ' French', 'sequence': 'Paris is the French of France.'}, {'score': 0.013550693169236183, 'token': 2201, 'token_str': ' Paris', 'sequence': 'Paris is the Paris of France.'}, {'score': 0.011591030284762383, 'token': 270, 'token_str': ' President', 'sequence': 'Paris is the President of France.'}] ```
[ -0.4061288833618164, -0.5664513111114502, 0.4378472566604614, 0.30430683493614197, -0.1822318583726883, -0.12084845453500748, -0.21882887184619904, -0.2953053414821625, 0.3068978488445282, 0.6041030287742615, -0.7330065369606018, -0.4043513238430023, -0.5061087608337402, 0.2125587910413742, -0.2997431755065918, 1.034788966178894, 0.3420165181159973, -0.44098493456840515, 0.1728256791830063, -0.07621032744646072, -0.1869702786207199, -0.28158363699913025, -0.49060118198394775, -0.012890581041574478, 0.589444100856781, 0.2578040063381195, 0.3687676787376404, 0.7074757218360901, 0.5562817454338074, 0.4589470624923706, -0.08877865225076675, 0.05346263572573662, -0.5526016354560852, 0.19713537395000458, -0.06619547307491302, -0.45241427421569824, -0.5562771558761597, 0.027122974395751953, 0.7215733528137207, 0.5517823696136475, 0.14655345678329468, 0.4939122796058655, 0.0065377335995435715, 0.7871647477149963, -0.5148212313652039, 0.1535067856311798, -0.5703136920928955, 0.06875326484441757, -0.16152846813201904, -0.11843859404325485, -0.2565348446369171, 0.025604551658034325, 0.10333903133869171, -0.1486932784318924, 0.6446149349212646, 0.013352305628359318, 0.8025668859481812, 0.5157992243766785, -0.14051274955272675, 0.16062003374099731, -0.6491329669952393, 1.093703031539917, -0.9973905682563782, 0.3288470208644867, 0.3384939432144165, 0.20165322721004486, 0.07523290067911148, -0.7971944212913513, -0.451513409614563, 0.05558031052350998, -0.2616676092147827, 0.24546854197978973, -0.08288240432739258, -0.049713101238012314, 0.6355869174003601, 0.6562992930412292, -0.5781330466270447, -0.12463005632162094, -0.7086262106895447, -0.24318835139274597, 0.7127527594566345, 0.1796891838312149, -0.17710737884044647, -0.4578680694103241, -0.5749250054359436, -0.028813956305384636, -0.4441456198692322, 0.18830016255378723, 0.3754863142967224, 0.3927927315235138, -0.03513897955417633, 0.3533579409122467, -0.5345616340637207, 0.7621036767959595, 0.4871988296508789, -0.22207704186439514, 0.49238672852516174, -0.24263708293437958, -0.3745039999485016, -0.09314683079719543, 1.2683309316635132, 0.21566443145275116, 0.2502349615097046, -0.04717925190925598, -0.32058918476104736, -0.18047814071178436, 0.38830849528312683, -0.9073351621627808, -0.060752902179956436, 0.40027105808258057, -0.24316145479679108, -0.19186268746852875, 0.09483011066913605, -1.0481469631195068, 0.12965258955955505, -0.010266652330756187, 0.5235136151313782, -0.0021598744206130505, 0.02903602458536625, 0.0643240362405777, 0.17909400165081024, 0.2884466052055359, -0.08754263073205948, -0.9995840787887573, 0.2374892383813858, 0.5267980098724365, 0.9693873524665833, -0.23590923845767975, -0.2595864534378052, -0.40344879031181335, -0.21722979843616486, -0.04361048340797424, 0.6405454277992249, -0.004959003999829292, -0.29026296734809875, -0.23623865842819214, 0.20710743963718414, -0.1624373346567154, -0.34463372826576233, 0.4820452928543091, -0.46517640352249146, 0.455511212348938, 0.057217076420784, -0.3505590856075287, -0.011229341849684715, 0.19164855778217316, -0.9236521124839783, 1.1622406244277954, 0.3022076487541199, -0.8193050622940063, -0.05345815792679787, -0.6468791365623474, -0.3760334253311157, -0.008551528677344322, 0.05816444382071495, -0.8788241147994995, -0.016635224223136902, 0.4595485031604767, 0.6147329211235046, -0.2891034483909607, 0.2647380530834198, -0.2171151489019394, -0.6037579774856567, 0.21138213574886322, -0.5143977403640747, 0.9032604098320007, 0.4011479616165161, -0.7320722341537476, 0.2670678198337555, -0.9725462198257446, 0.05447115749120712, 0.28922489285469055, -0.024211542680859566, 0.0425967276096344, -0.38647589087486267, -0.00577144417911768, 0.3727995753288269, 0.18392209708690643, -0.4341587722301483, 0.11972147226333618, -0.7588853240013123, 0.7812817692756653, 0.8660030961036682, 0.05140914395451546, 0.38166144490242004, -0.07046034932136536, 0.6041474938392639, -0.008404690772294998, 0.2852270305156708, -0.6116594076156616, -0.5435649156570435, -0.6925538182258606, -0.45611920952796936, 0.281975120306015, 0.36087748408317566, -0.2391047477722168, 0.6877642869949341, -0.3591957688331604, -0.30973395705223083, -0.9686089754104614, 0.08760961145162582, 0.29027196764945984, 0.8064801692962646, 0.3873046934604645, -0.34887680411338806, -0.4267241656780243, -1.0323072671890259, -0.08728300780057907, 0.13479281961917877, -0.08667359501123428, 0.17794494330883026, 0.46706247329711914, -0.05818247050046921, 1.1675665378570557, -0.5679889917373657, -0.3590776324272156, -0.011362646706402302, 0.046520642936229706, 0.7743529677391052, 0.2967919707298279, 0.46869024634361267, -0.6292896270751953, -0.6688407063484192, -0.32812243700027466, -0.37532976269721985, -0.05575944483280182, -0.03478569537401199, 0.0781305804848671, 0.27339425683021545, 0.3878735601902008, -0.5743502378463745, 0.5802795886993408, 0.41672927141189575, -0.24361427128314972, 0.4590464234352112, -0.23524558544158936, 0.1645270138978958, -1.1461957693099976, 0.23647242784500122, -0.05819759890437126, -0.45235714316368103, -0.7407917380332947, 0.04472685605287552, 0.25608527660369873, -0.004924407694488764, -0.5415723919868469, 0.5841585993766785, -0.5081559419631958, 0.03540734574198723, -0.3089302182197571, 0.10050756484270096, 0.09691318869590759, 1.0628907680511475, 0.049299418926239014, 0.73723965883255, 0.5196685194969177, -0.47512075304985046, 0.5003727078437805, -0.11616212129592896, -0.49767357110977173, 0.5120670199394226, -0.8824781179428101, 0.307925283908844, -0.16596530377864838, -0.05244171619415283, -1.2074745893478394, 0.020792052149772644, 0.40267661213874817, -0.40661680698394775, 0.4542774260044098, -0.13249316811561584, -0.27995309233665466, -0.9109752178192139, -0.4230257570743561, 0.6597378253936768, 0.5849464535713196, -0.5829575657844543, 0.27520304918289185, 0.22915002703666687, 0.04517357423901558, -0.7942647337913513, -0.7713026404380798, -0.1879681944847107, -0.4937932789325714, -0.47704043984413147, 0.22871044278144836, -0.3426002860069275, 0.1961420625448227, -0.09295061230659485, -0.21812492609024048, 0.0890517383813858, -0.05139411613345146, 0.2809284031391144, 0.29049167037010193, -0.16206756234169006, 0.012914893217384815, -0.3617885708808899, -0.40321165323257446, 0.21847182512283325, -0.4023849368095398, 0.6455065608024597, -0.3072303533554077, -0.28308379650115967, -0.5549787878990173, 0.2572610378265381, 0.6138703227043152, -0.43409112095832825, 0.6551640629768372, 0.8081822395324707, -0.2608407437801361, -0.18829533457756042, -0.7199695110321045, -0.20633748173713684, -0.5284579992294312, 0.39538058638572693, -0.5094711184501648, -1.0733306407928467, 0.7422289252281189, 0.21354834735393524, -0.13466285169124603, 0.9367580413818359, 0.7659187316894531, -0.018179859966039658, 0.7562631368637085, 0.4392966032028198, -0.4592892527580261, 0.34989625215530396, -0.5977216958999634, 0.6532978415489197, -0.9190579056739807, -0.16606144607067108, -0.4181315302848816, -0.4076996445655823, -0.7531514763832092, -0.6155178546905518, 0.2967337965965271, -0.15422970056533813, -0.36945468187332153, 0.48063844442367554, -0.7341484427452087, 0.4692334234714508, 0.8342534303665161, 0.08989322185516357, 0.12456581741571426, 0.004562957677990198, 0.16406798362731934, -0.18744643032550812, -0.6896060109138489, 0.06690125912427902, 1.1558451652526855, 0.39776909351348877, 0.889102041721344, -0.18072234094142914, 0.981082022190094, 0.3211698830127716, 0.01372737716883421, -0.8276859521865845, 0.41293296217918396, 0.3087509870529175, -0.6359071731567383, -0.6994953155517578, -0.5759601593017578, -1.0564275979995728, 0.21745453774929047, 0.23427945375442505, -0.7915623188018799, 0.33969658613204956, -0.03650076314806938, -0.666257917881012, 0.32289665937423706, -0.3787974417209625, 0.8951935768127441, -0.07961443811655045, -0.6000365614891052, 0.04578523337841034, -0.8829480409622192, 0.3581816256046295, -0.252006858587265, 0.2107841670513153, -0.13219891488552094, 0.23634512722492218, 0.6501811146736145, -0.32239383459091187, 0.8809223175048828, 0.1980472207069397, -0.2152804285287857, 0.555276095867157, -0.19287416338920593, 0.4890725612640381, 0.04419511929154396, 0.024413295090198517, 0.3703364133834839, -0.2602599263191223, -0.5087345242500305, -0.5015345811843872, 1.0293643474578857, -0.7155749797821045, -0.740504801273346, -0.5169129371643066, -0.6544904112815857, 0.15539678931236267, 0.31691786646842957, 0.5202144384384155, 0.3737632632255554, 0.136296808719635, 0.10885066539049149, 0.7507036328315735, 0.07977378368377686, 0.6835838556289673, 0.3636646270751953, 0.036478713154792786, -0.6560108661651611, 0.8367095589637756, 0.10143919289112091, 0.40380531549453735, 0.43635842204093933, 0.29623207449913025, -0.5161459445953369, -0.05420519784092903, -0.1583283692598343, 0.4256681799888611, -0.5026681423187256, -0.44294974207878113, -0.6993584632873535, -0.5155513882637024, -0.8475956320762634, 0.1467793881893158, -0.6106780767440796, -0.4847062826156616, -0.06269770115613937, -0.06119335815310478, 0.2925371527671814, 0.43365678191185, -0.18960517644882202, 0.12527452409267426, -0.5803670287132263, 0.6814996004104614, 0.6655896306037903, 0.5761323571205139, 0.01917029544711113, -0.9535086154937744, -0.4022589325904846, -0.11409362405538559, -0.16356202960014343, -0.9810852408409119, 0.5891380310058594, 0.016599014401435852, 0.557500422000885, 0.7464577555656433, 0.15268182754516602, 0.8239041566848755, -0.5835872888565063, 0.6053673624992371, 0.150007963180542, -0.8776535391807556, 0.586418867111206, -0.21151795983314514, 0.5385318994522095, 0.39589691162109375, 0.2487441748380661, -0.5430347323417664, -0.46393367648124695, -0.8609912991523743, -0.8794464468955994, 1.011258602142334, 0.383415549993515, 0.1211361214518547, -0.28148630261421204, 0.2555488348007202, -0.2733589708805084, 0.20754876732826233, -1.047501564025879, -0.777751624584198, -0.22059249877929688, -0.292964905500412, -0.17641451954841614, -0.36434343457221985, -0.10506860911846161, -0.3497239649295807, 0.6906912922859192, -0.11013411730527878, 0.4916755259037018, 0.5084912776947021, 0.014097216539084911, -0.2830217778682709, 0.22435811161994934, 0.5794417858123779, 0.41673341393470764, -0.4287799000740051, 0.031829625368118286, 0.1143159419298172, -0.3508930206298828, -0.12021036446094513, 0.09840887039899826, -0.29357144236564636, -0.06741996854543686, 0.3438892364501953, 0.8662895560264587, 0.2977701723575592, -0.453666090965271, 0.5712820887565613, 0.2668132781982422, -0.1940310001373291, -0.15301260352134705, 0.005910583306103945, 0.004101885482668877, 0.4225051999092102, 0.27514028549194336, -0.07853730767965317, 0.41453900933265686, -0.47601982951164246, 0.17566326260566711, 0.3519893288612366, -0.5156844258308411, -0.2632192373275757, 0.8923689723014832, -0.12757527828216553, -0.5142217874526978, 0.5553675889968872, -0.18866108357906342, -0.6822569966316223, 0.7578125, 0.6126165390014648, 1.0496320724487305, -0.6456582546234131, 0.04642116278409958, 0.9384111762046814, 0.38878241181373596, -0.17974227666854858, 0.01557894516736269, -0.31978434324264526, -0.2792634963989258, -0.4967792332172394, -0.683068573474884, 0.09644346684217453, 0.27549484372138977, -0.793615996837616, 0.16873681545257568, -0.21168114244937897, -0.3110855519771576, -0.24176865816116333, 0.12375018000602722, -0.8551508784294128, 0.20683524012565613, 0.1854141354560852, 0.5857338905334473, -0.8483335375785828, 0.7710525989532471, 0.18315118551254272, -0.16022178530693054, -0.5018388032913208, -0.2521880269050598, -0.390302836894989, -0.8634006977081299, 0.3868180215358734, 0.433601975440979, 0.03365066647529602, 0.07001471519470215, -0.562764048576355, -1.2380845546722412, 1.1503390073776245, -0.042996447533369064, -0.9005932211875916, 0.043744996190071106, 0.2726020812988281, 0.6214302778244019, -0.14186492562294006, 0.3253806233406067, 0.6314125061035156, 0.33739662170410156, 0.07908502966165543, -0.8046140074729919, 0.13083778321743011, -0.21584632992744446, -0.13965176045894623, 0.38699403405189514, -1.0357955694198608, 0.9487202167510986, -0.5018190145492554, -0.14159797132015228, 0.057120200246572495, 0.8552982807159424, 0.1368183046579361, 0.2547742426395416, 0.5634368062019348, 0.7790705561637878, 0.6275354027748108, -0.123740553855896, 0.8311680555343628, -0.47667115926742554, 0.9555845260620117, 1.2087279558181763, 0.042723093181848526, 0.5541698932647705, 0.4814305901527405, -0.534824788570404, 0.3868151307106018, 0.3766005337238312, -0.2972920536994934, 0.7369318008422852, 0.21291060745716095, 0.03679567202925682, -0.2494131624698639, 0.3130544424057007, -0.330721378326416, 0.3427381217479706, 0.09047326445579529, -0.3791424632072449, -0.08028661459684372, -0.26108768582344055, -0.15240108966827393, -0.11020912975072861, -0.3067302703857422, 0.527880847454071, 0.19115480780601501, -0.7112994194030762, 0.4818134009838104, -0.016991928219795227, 0.6019638180732727, -0.5282162427902222, 0.12284300476312637, -0.39530259370803833, 0.15336701273918152, -0.028483016416430473, -0.6431414484977722, 0.11009224504232407, -0.08172815293073654, -0.26660600304603577, -0.15695130825042725, 0.6067277193069458, -0.6213110685348511, -0.8067020773887634, 0.06590773910284042, 0.2581968605518341, 0.05596611648797989, -0.32215994596481323, -0.7049234509468079, -0.23345054686069489, -0.028432369232177734, -0.6048295497894287, 0.1706402450799942, 0.3955210745334625, 0.1547103077173233, 0.6056631803512573, 0.5830118656158447, -0.05529871582984924, 0.2532658874988556, 0.18789592385292053, 0.6458933353424072, -1.0289808511734009, -0.7267040610313416, -0.924898087978363, 0.48373788595199585, -0.04936743155121803, -0.154334157705307, 0.7717105746269226, 0.5499631762504578, 0.6613340973854065, -0.2124844193458557, 0.339419960975647, 0.14289113879203796, 0.38971197605133057, -0.21765466034412384, 0.5858460068702698, -0.5462799072265625, 0.10257092118263245, -0.24399840831756592, -1.0211472511291504, -0.21318751573562622, 0.7424381971359253, -0.2603780925273895, 0.20271892845630646, 0.6159719824790955, 0.6393123865127563, -0.08793564885854721, -0.39478376507759094, 0.4524841010570526, 0.3505391776561737, 0.08977217227220535, 0.7875959277153015, 0.47397589683532715, -0.7744476199150085, 0.375203937292099, -0.7740753293037415, -0.025701653212308884, -0.23032145202159882, -0.8262500762939453, -1.1898289918899536, -0.5953670740127563, -0.32675009965896606, -0.23898926377296448, -0.29608649015426636, 0.6004311442375183, 0.7909583449363708, -0.8926529288291931, -0.04412488639354706, 0.21549297869205475, 0.18325933814048767, -0.36840009689331055, -0.3241000175476074, 0.7524305582046509, -0.4820798933506012, -1.2008448839187622, 0.28646519780158997, 0.40881484746932983, -0.10563258826732635, -0.4692622125148773, 0.029497208073735237, -0.07462428510189056, -0.018456095829606056, 0.5924155712127686, 0.26462480425834656, -0.8766191601753235, -0.14455382525920868, 0.2433696687221527, -0.22205610573291779, 0.39174044132232666, 0.5365915298461914, -0.9877805113792419, 0.6088485717773438, 0.4394341707229614, 0.2984934449195862, 0.8009786009788513, 0.08797292411327362, 0.12780360877513885, -0.732212245464325, 0.23262713849544525, 0.10406530648469925, 0.3971756100654602, 0.29712143540382385, -0.5773133635520935, 0.5339820981025696, 0.4124597907066345, -0.7162588834762573, -0.6452205181121826, -0.025792021304368973, -1.1902927160263062, -0.034838028252124786, 0.911345362663269, -0.0871252566576004, -0.5896349549293518, 0.1710107922554016, -0.04235164448618889, 0.23869161307811737, -0.28270861506462097, 1.106471300125122, 0.45676371455192566, 0.1255521923303604, -0.20983287692070007, -0.43744683265686035, 0.3229672908782959, 0.35922813415527344, -0.4058385491371155, -0.1845875084400177, 0.09304793924093246, 0.45311790704727173, 0.44545504450798035, 0.7566609382629395, -0.030465727671980858, 0.18351882696151733, -0.20288899540901184, 0.12287245690822601, -0.07193713635206223, -0.3502015173435211, -0.5612726211547852, 0.15571752190589905, -0.4333159029483795, -0.2625078558921814 ]
sshleifer/tiny-distilroberta-base
sshleifer
"2021-10-22T16:10:44Z"
27,720
2
transformers
[ "transformers", "pytorch", "tf", "jax", "roberta", "fill-mask", "autotrain_compatible", "endpoints_compatible", "region:us" ]
fill-mask
"2022-03-02T23:29:05Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
valhalla/bart-large-finetuned-squadv1
valhalla
"2021-06-14T10:20:35Z"
27,622
4
transformers
[ "transformers", "pytorch", "jax", "bart", "question-answering", "dataset:squad", "arxiv:1910.13461", "autotrain_compatible", "endpoints_compatible", "has_space", "region:us" ]
question-answering
"2022-03-02T23:29:05Z"
--- datasets: - squad --- # BART-LARGE finetuned on SQuADv1 This is bart-large model finetuned on SQuADv1 dataset for question answering task ## Model details BART was propsed in the [paper](https://arxiv.org/abs/1910.13461) **BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension**. BART is a seq2seq model intended for both NLG and NLU tasks. To use BART for question answering tasks, we feed the complete document into the encoder and decoder, and use the top hidden state of the decoder as a representation for each word. This representation is used to classify the token. As given in the paper bart-large achives comparable to ROBERTa on SQuAD. Another notable thing about BART is that it can handle sequences with upto 1024 tokens. | Param | #Value | |---------------------|--------| | encoder layers | 12 | | decoder layers | 12 | | hidden size | 4096 | | num attetion heads | 16 | | on disk size | 1.63GB | ## Model training This model was trained on google colab v100 GPU. You can find the fine-tuning colab here [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1I5cK1M_0dLaf5xoewh6swcm5nAInfwHy?usp=sharing). ## Results The results are actually slightly worse than given in the paper. In the paper the authors mentioned that bart-large achieves 88.8 EM and 94.6 F1 | Metric | #Value | |--------|--------| | EM | 86.8022| | F1 | 92.7342| ## Model in Action 🚀 ```python3 from transformers import BartTokenizer, BartForQuestionAnswering import torch tokenizer = BartTokenizer.from_pretrained('valhalla/bart-large-finetuned-squadv1') model = BartForQuestionAnswering.from_pretrained('valhalla/bart-large-finetuned-squadv1') question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet" encoding = tokenizer(question, text, return_tensors='pt') input_ids = encoding['input_ids'] attention_mask = encoding['attention_mask'] start_scores, end_scores = model(input_ids, attention_mask=attention_mask, output_attentions=False)[:2] all_tokens = tokenizer.convert_ids_to_tokens(input_ids[0]) answer = ' '.join(all_tokens[torch.argmax(start_scores) : torch.argmax(end_scores)+1]) answer = tokenizer.convert_tokens_to_ids(answer.split()) answer = tokenizer.decode(answer) #answer => 'a nice puppet' ``` > Created with ❤️ by Suraj Patil [![Github icon](https://cdn0.iconfinder.com/data/icons/octicons/1024/mark-github-32.png)](https://github.com/patil-suraj/) [![Twitter icon](https://cdn0.iconfinder.com/data/icons/shift-logotypes/32/Twitter-32.png)](https://twitter.com/psuraj28)
[ -0.7149970531463623, -1.033677101135254, 0.227481409907341, 0.07806874811649323, -0.283896803855896, 0.26060566306114197, -0.2993311882019043, -0.34882447123527527, 0.3919154107570648, 0.4532445967197418, -0.7333570122718811, -0.42020556330680847, -0.5248257517814636, 0.2179577350616455, -0.29073983430862427, 1.4175434112548828, 0.1326008290052414, 0.1451960802078247, -0.10680142045021057, -0.10782013088464737, -0.5499889254570007, -0.48817944526672363, -0.9546584486961365, -0.07624628394842148, 0.46886515617370605, 0.3235546946525574, 0.5094072222709656, 0.15385019779205322, 0.6879749298095703, 0.42611250281333923, -0.18784694373607635, 0.14792363345623016, -0.831159234046936, 0.06800705194473267, -0.029084568843245506, -0.5610091686248779, -0.6717894673347473, 0.04586879163980484, 0.7426415085792542, 0.4601854383945465, 0.05302136018872261, 0.6130580902099609, -0.15440116822719574, 0.5153395533561707, -0.22681711614131927, 0.1963992863893509, -0.540712296962738, -0.20371225476264954, 0.1009625568985939, -0.040301043540239334, -0.35417234897613525, -0.5726933479309082, -0.04208218678832054, -0.8620328307151794, 0.3850845396518707, 0.15792319178581238, 1.121222734451294, 0.3265030086040497, -0.23438087105751038, -0.14324535429477692, -0.35180801153182983, 1.024308681488037, -0.7295990586280823, -0.020855136215686798, 0.3933975398540497, 0.2703254818916321, -0.06985388696193695, -0.7654058337211609, -0.7735162377357483, 0.004872830584645271, -0.06865058839321136, 0.2515796422958374, -0.2396010011434555, 0.07523499429225922, 0.45202597975730896, 0.29529404640197754, -0.7685204148292542, -0.040783438831567764, -0.7337947487831116, -0.12492327392101288, 0.7306832075119019, 0.23435308039188385, 0.143845334649086, -0.3564838171005249, -0.48088720440864563, -0.3306099772453308, -0.41125431656837463, 0.2624870836734772, 0.39302191138267517, 0.13215041160583496, -0.2509498596191406, 0.6945052742958069, -0.21106097102165222, 0.5568821430206299, 0.4246632754802704, 0.040448516607284546, 0.5592329502105713, -0.3373158872127533, -0.2335486114025116, -0.0852687731385231, 0.9215503334999084, 0.45491042733192444, 0.37528637051582336, 0.10575404018163681, -0.2268647998571396, -0.03469569981098175, 0.22091758251190186, -0.9131552577018738, -0.21986371278762817, 0.28245607018470764, -0.37626656889915466, -0.30993562936782837, 0.07009147107601166, -0.5989121794700623, -0.027229391038417816, -0.17640230059623718, 0.7813183665275574, -0.628474771976471, -0.20990347862243652, 0.16449619829654694, -0.42644086480140686, 0.2908371388912201, 0.28595659136772156, -0.8150315284729004, 0.2358328402042389, 0.5325300693511963, 0.6033186316490173, 0.13984891772270203, -0.1793830245733261, -0.6537388563156128, -0.08138948678970337, -0.4860835671424866, 0.4369133412837982, -0.282158762216568, -0.13345035910606384, -0.334558367729187, 0.3114710748195648, -0.12076376378536224, -0.4806987941265106, 0.13037918508052826, -0.6917192935943604, 0.4818331301212311, -0.2864246666431427, -0.6745308637619019, -0.3272216022014618, 0.34879037737846375, -0.588685929775238, 1.0408806800842285, 0.3584458827972412, -0.6602030396461487, 0.3652825355529785, -0.7974483966827393, -0.35760411620140076, 0.01844964548945427, 0.13886995613574982, -0.5730500221252441, 0.13022470474243164, 0.3241136372089386, 0.5727310180664062, -0.25671297311782837, 0.43604013323783875, -0.35302790999412537, -0.5146426558494568, 0.4824957549571991, -0.45156562328338623, 1.1093223094940186, 0.1812237650156021, -0.1323731392621994, 0.2291186898946762, -0.7272414565086365, 0.2808680534362793, 0.32119035720825195, -0.4326684772968292, -0.08397860825061798, -0.4186743497848511, 0.1302300989627838, 0.17095768451690674, 0.3593457341194153, -0.5766623020172119, 0.29806822538375854, -0.3691280484199524, 0.4990692138671875, 0.8379071950912476, 0.059814807027578354, 0.22605332732200623, -0.6262568235397339, 0.650821328163147, -0.1799696534872055, 0.1857757270336151, -0.10475966334342957, -0.5945225954055786, -0.6873536109924316, -0.4871194660663605, 0.36130961775779724, 0.38484081625938416, -0.7830755114555359, 0.5673633813858032, -0.295259028673172, -0.4615841805934906, -0.7508243918418884, -0.06425167620182037, 0.42787954211235046, 0.4651567339897156, 0.59033203125, -0.46525251865386963, -0.6968066096305847, -0.9043745994567871, 0.18159745633602142, -0.4238634705543518, -0.23844820261001587, 0.20394986867904663, 0.6912627816200256, -0.07275252789258957, 0.8558910489082336, -0.4647486209869385, -0.04243965074419975, -0.44117772579193115, 0.1600124090909958, 0.43402716517448425, 0.7544708251953125, 0.7189972400665283, -0.5763249397277832, -0.4253070056438446, -0.2259174883365631, -0.6581844687461853, 0.07685298472642899, -0.11737190186977386, -0.12076624482870102, 0.2319466918706894, 0.407608300447464, -0.8954201936721802, 0.29808321595191956, 0.4251381754875183, -0.5177133083343506, 0.7736169695854187, -0.09644247591495514, 0.3442843556404114, -1.183273196220398, 0.3561652600765228, -0.29735803604125977, -0.37286141514778137, -0.6376034021377563, 0.1266343891620636, -0.027314379811286926, 0.05455617606639862, -0.46888667345046997, 0.595655620098114, -0.2855239808559418, 0.003926194738596678, 0.1174667477607727, 0.11654168367385864, 0.15258926153182983, 0.8055273294448853, -0.17904870212078094, 0.7805468440055847, 0.41860905289649963, -0.5354322791099548, 0.5917351245880127, 0.5909278392791748, -0.5973635911941528, 0.38841283321380615, -0.9290541410446167, 0.0775940865278244, -0.15061405301094055, 0.26691070199012756, -1.3386434316635132, -0.3623102307319641, 0.3458099961280823, -0.796127200126648, 0.47814327478408813, -0.046976443380117416, -0.596728503704071, -0.6431993246078491, -0.36023640632629395, 0.6045104265213013, 0.6656621098518372, -0.47600117325782776, 0.036925774067640305, 0.2907239496707916, -0.18358691036701202, -0.6631413102149963, -0.6835520267486572, -0.2221863716840744, -0.3541377782821655, -0.5205369591712952, 0.18727892637252808, -0.40546637773513794, -0.028743721544742584, -0.035959642380476, -0.11000329256057739, -0.1122279092669487, -0.004472770728170872, 0.12456955015659332, 0.5177451372146606, -0.503820538520813, 0.26324328780174255, -0.06979167461395264, -0.03256788104772568, 0.1564411073923111, 0.07836168259382248, 0.8263852000236511, -0.46309611201286316, -0.13551360368728638, -0.5967006683349609, 0.23318539559841156, 0.696613073348999, -0.21838313341140747, 0.7214899659156799, 0.9891920685768127, -0.07889076322317123, 0.13423439860343933, -0.6473004817962646, -0.26146039366722107, -0.5580759644508362, 0.6534585356712341, -0.29809829592704773, -0.8775888085365295, 0.6359501481056213, 0.2180631160736084, 0.13919079303741455, 0.63200843334198, 0.5634766221046448, -0.27392303943634033, 1.0796549320220947, 0.22991953790187836, -0.11296849697828293, 0.6158349514007568, -0.8357237577438354, 0.027303069829940796, -0.9290428757667542, -0.22921527922153473, -0.31326553225517273, -0.5756887197494507, -0.5952940583229065, -0.5864872336387634, 0.30793988704681396, 0.23551136255264282, -0.7278536558151245, 0.3864027261734009, -0.6261985301971436, 0.4281634986400604, 0.7887336015701294, 0.21550343930721283, -0.05788933113217354, -0.0533650778234005, 0.08801034837961197, 0.1820104569196701, -0.7554052472114563, -0.34384220838546753, 1.248852252960205, 0.34165284037590027, 0.7828255891799927, 0.012468714267015457, 0.6957839131355286, -0.008207553066313267, 0.10355795919895172, -0.7684638500213623, 0.7388140559196472, 0.11596455425024033, -1.1948587894439697, -0.643734335899353, -0.3980540335178375, -1.1056525707244873, 0.10117889195680618, -0.2565854489803314, -0.724253237247467, 0.017704300582408905, -0.0053833588026463985, -0.29200202226638794, 0.2704932391643524, -0.8371111154556274, 1.02935791015625, -0.10386821627616882, -0.26747071743011475, -0.25470802187919617, -0.8837161064147949, 0.33679696917533875, 0.12042348831892014, 0.016692955046892166, -0.12697234749794006, 0.15508073568344116, 1.03171968460083, -0.38658878207206726, 0.8231313228607178, -0.10727386176586151, 0.12335728853940964, 0.6547527313232422, -0.12122131884098053, 0.41240590810775757, 0.25606825947761536, -0.048794765025377274, 0.15675872564315796, 0.17572660744190216, -0.6379507184028625, -0.4721065163612366, 0.5417602062225342, -0.9939165115356445, -0.6888474822044373, -0.27649784088134766, -0.6396620273590088, -0.07276520878076553, 0.19786354899406433, 0.4750046133995056, 0.6044223308563232, -0.13534832000732422, 0.44692331552505493, 0.6220926642417908, -0.40786486864089966, 0.5937683582305908, 0.3403083086013794, -0.26032912731170654, -0.5133087038993835, 0.9098201990127563, -0.08919033408164978, 0.4710666537284851, 0.36368435621261597, 0.033058926463127136, -0.31453555822372437, -0.2896430194377899, -0.46687787771224976, 0.376811146736145, -0.5751460194587708, -0.4666827321052551, -0.3521246612071991, -0.3358369767665863, -0.3702225983142853, -0.1493348628282547, -0.38965192437171936, -0.7224277257919312, -0.4319881200790405, -0.13489706814289093, 0.5159692764282227, 0.7196440696716309, 0.03104562498629093, 0.37942346930503845, -0.52970290184021, 0.5499545931816101, 0.3949887156486511, 0.30011969804763794, -0.1335490196943283, -0.6708166003227234, -0.2417357712984085, 0.1805696040391922, -0.44245001673698425, -0.7475079894065857, 0.39720022678375244, 0.008490772917866707, 0.49133771657943726, 0.4706680476665497, 0.16249752044677734, 0.8995111584663391, -0.361808180809021, 0.9136558175086975, 0.5594069361686707, -0.8664751052856445, 0.491006076335907, -0.368755042552948, 0.3384271264076233, 0.45536622405052185, 0.1966709941625595, -0.479324609041214, -0.6464327573776245, -0.7904293537139893, -0.8167046308517456, 1.0467981100082397, 0.2957669794559479, 0.22834712266921997, -0.2723633050918579, 0.12208618968725204, 0.18605676293373108, 0.3220313489437103, -0.8415327668190002, -0.43997108936309814, -0.2653961777687073, -0.1958942711353302, -0.4102991819381714, -0.15448078513145447, -0.1597137749195099, -0.6358712315559387, 0.819939136505127, -0.020404363051056862, 0.625356137752533, 0.14258050918579102, -0.04080749675631523, -0.18356430530548096, 0.17075277864933014, 0.4592953622341156, 0.5976472496986389, -0.3834136128425598, -0.20151440799236298, 0.3552009165287018, -0.4608684480190277, -0.037291236221790314, -0.05514611676335335, 0.024173524230718613, 0.1600581556558609, 0.5100865960121155, 0.9848431348800659, 0.0784599632024765, -0.740180253982544, 0.6033568382263184, -0.08277513086795807, -0.43506330251693726, -0.27782487869262695, 0.21045252680778503, -0.05248294025659561, 0.35244986414909363, 0.383010596036911, 0.2154773324728012, -0.07352621853351593, -0.5922732353210449, 0.01981528103351593, 0.6177166700363159, -0.27911433577537537, -0.3803497850894928, 0.8340823650360107, 0.001365391886793077, -0.269084095954895, 0.6410283446311951, -0.25675761699676514, -0.5366197228431702, 1.0307576656341553, 0.7256950736045837, 0.6376250982284546, -0.15048152208328247, 0.4164935350418091, 0.726047158241272, 0.25913819670677185, 0.07613546401262283, 0.4044841229915619, 0.025680625811219215, -0.4542728066444397, -0.3789607286453247, -0.6693188548088074, -0.1801401823759079, 0.39083150029182434, -0.7800114154815674, 0.2995510399341583, -0.4877995550632477, -0.25571978092193604, 0.009541960433125496, 0.1931348294019699, -0.9729519486427307, 0.28815576434135437, -0.1129985973238945, 0.5803102254867554, -0.5671183466911316, 0.7102049589157104, 0.8291797041893005, -0.48954343795776367, -0.929115891456604, -0.20457512140274048, -0.3694165349006653, -1.1142936944961548, 0.6718200445175171, 0.22815383970737457, 0.2907457947731018, 0.14765295386314392, -0.7570344805717468, -1.0579241514205933, 1.0605905055999756, 0.3932857811450958, -0.4196368157863617, -0.16142088174819946, 0.028227973729372025, 0.7026847004890442, -0.1349872648715973, 0.49891790747642517, 0.3403073847293854, 0.4377809166908264, 0.04352869465947151, -0.9245464205741882, 0.2293199747800827, -0.3286270797252655, -0.20462851226329803, 0.14133138954639435, -0.8596963286399841, 1.023294448852539, -0.46554869413375854, -0.011751075275242329, 0.3165777325630188, 0.3790895640850067, 0.29106035828590393, 0.3757060468196869, 0.44792115688323975, 0.4558456838130951, 0.7641201019287109, -0.07316244393587112, 0.9556377530097961, -0.22280092537403107, 0.6955666542053223, 0.8655810356140137, 0.38488659262657166, 0.736499011516571, 0.5603743195533752, -0.4150427281856537, 0.44927528500556946, 0.5944162011146545, -0.17333504557609558, 0.6434663534164429, 0.3485414683818817, 0.030789021402597427, -0.34149694442749023, 0.27790310978889465, -0.5437122583389282, 0.4317372143268585, 0.2783491611480713, -0.28270894289016724, 0.14646418392658234, 0.017699502408504486, -0.20388564467430115, -0.279684841632843, -0.29543691873550415, 0.7191572189331055, -0.12172846496105194, -0.8577075600624084, 1.0860179662704468, -0.1928146630525589, 0.5553797483444214, -0.5907626152038574, 0.0868045911192894, -0.1607401818037033, 0.10349345952272415, -0.00012331527250353247, -0.8523450493812561, 0.037823475897312164, -0.028857089579105377, -0.10702540725469589, -0.17230798304080963, 0.26977184414863586, -0.3469190001487732, -0.5661019682884216, 0.009819922968745232, 0.39764612913131714, 0.32472243905067444, 0.200445294380188, -0.7253784537315369, -0.12899810075759888, 0.06475337594747543, -0.5180686116218567, 0.1795480102300644, 0.46211346983909607, 0.20001108944416046, 0.6912255883216858, 0.5499703288078308, -0.18038912117481232, 0.16285987198352814, -0.08870015293359756, 0.9563353657722473, -0.6197811365127563, -0.4827882647514343, -0.6729976534843445, 0.5814399123191833, -0.08189316093921661, -0.6395831108093262, 0.5604379773139954, 0.7245457172393799, 0.9536656737327576, -0.4761834740638733, 0.634447455406189, -0.33627909421920776, 0.4306095838546753, -0.41738852858543396, 0.7274473309516907, -0.8175081014633179, 0.19134312868118286, -0.4331497550010681, -0.8099640011787415, -0.176955446600914, 0.828220009803772, -0.2911486029624939, 0.05770190805196762, 0.6753290295600891, 0.7791775465011597, -0.03447020426392555, -0.13533639907836914, 0.2893993556499481, 0.3445751368999481, 0.1639825850725174, 0.7860643267631531, 0.8702543377876282, -0.6967189311981201, 0.8021464347839355, -0.14957816898822784, 0.05827611684799194, -0.35252323746681213, -0.2587091326713562, -1.2696378231048584, -0.725989818572998, -0.32600027322769165, -0.3746512532234192, 0.026457607746124268, 0.9615497589111328, 0.7685934901237488, -0.952949047088623, -0.05143612623214722, -0.09813740104436874, 0.27195560932159424, -0.3176984488964081, -0.30514436960220337, 0.4591066539287567, -0.33260881900787354, -0.8557046055793762, 0.05724888667464256, -0.18457967042922974, 0.0669558197259903, 0.10787038505077362, -0.16744236648082733, -0.2705070972442627, 0.07934753596782684, 0.5938900709152222, 0.1923118680715561, -0.846442699432373, -0.6381290555000305, 0.13281682133674622, -0.1063043549656868, 0.18063822388648987, 0.2547582685947418, -0.9163610339164734, 0.41974470019340515, 0.42542698979377747, 0.37594759464263916, 0.7561306953430176, 0.15189264714717865, 0.27897655963897705, -0.8932155966758728, 0.06860554963350296, 0.3303888142108917, 0.3354184031486511, 0.1993015706539154, -0.17643775045871735, 0.538719892501831, 0.20951034128665924, -0.7609530091285706, -0.8984619379043579, -0.06693148612976074, -1.3244540691375732, -0.3934565782546997, 1.172339677810669, -0.07709356397390366, -0.11301200091838837, 0.03933887556195259, -0.5824686288833618, 0.5203055739402771, -0.47088423371315, 0.8312403559684753, 0.5753247737884521, -0.003718562424182892, 0.09482122212648392, -0.5597634315490723, 0.359759658575058, 0.48773816227912903, -0.5759533643722534, -0.1390092968940735, 0.4187856912612915, 0.5728337168693542, 0.20992593467235565, 0.6172661185264587, 0.11401297897100449, 0.5273316502571106, 0.12437677383422852, 0.10181865096092224, -0.09105413407087326, -0.1086961030960083, -0.16018597781658173, 0.1940605342388153, -0.20250318944454193, -0.6282705068588257 ]
facebook/wav2vec2-large-960h-lv60-self
facebook
"2022-05-23T16:13:42Z"
27,480
95
transformers
[ "transformers", "pytorch", "tf", "jax", "wav2vec2", "automatic-speech-recognition", "speech", "audio", "hf-asr-leaderboard", "en", "dataset:librispeech_asr", "arxiv:2010.11430", "arxiv:2006.11477", "license:apache-2.0", "model-index", "endpoints_compatible", "has_space", "region:us" ]
automatic-speech-recognition
"2022-03-02T23:29:05Z"
--- language: en datasets: - librispeech_asr tags: - speech - audio - automatic-speech-recognition - hf-asr-leaderboard license: apache-2.0 model-index: - name: wav2vec2-large-960h-lv60 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: 1.9 - 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: 3.9 --- # Wav2Vec2-Large-960h-Lv60 + Self-Training [Facebook's Wav2Vec2](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/) The large model pretrained and fine-tuned on 960 hours of Libri-Light and Librispeech on 16kHz sampled speech audio. Model was trained with [Self-Training objective](https://arxiv.org/abs/2010.11430). When using the model make sure that your speech input is also sampled at 16Khz. [Paper](https://arxiv.org/abs/2006.11477) Authors: Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli **Abstract** We show for the first time that learning powerful representations from speech audio alone followed by fine-tuning on transcribed speech can outperform the best semi-supervised methods while being conceptually simpler. wav2vec 2.0 masks the speech input in the latent space and solves a contrastive task defined over a quantization of the latent representations which are jointly learned. Experiments using all labeled data of Librispeech achieve 1.8/3.3 WER on the clean/other test sets. When lowering the amount of labeled data to one hour, wav2vec 2.0 outperforms the previous state of the art on the 100 hour subset while using 100 times less labeled data. Using just ten minutes of labeled data and pre-training on 53k hours of unlabeled data still achieves 4.8/8.2 WER. This demonstrates the feasibility of speech recognition with limited amounts of labeled data. 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-large-960h-lv60-self") model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-large-960h-lv60-self") # 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", padding="longest").input_values # retrieve logits logits = model(input_values).logits # take argmax and decode predicted_ids = torch.argmax(logits, dim=-1) transcription = processor.batch_decode(predicted_ids) ``` ## Evaluation This code snippet shows how to evaluate **facebook/wav2vec2-large-960h-lv60-self** on LibriSpeech's "clean" and "other" test data. ```python from datasets import load_dataset from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor import torch from jiwer import wer librispeech_eval = load_dataset("librispeech_asr", "clean", split="test") model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-large-960h-lv60-self").to("cuda") processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-large-960h-lv60-self") def map_to_pred(batch): inputs = processor(batch["audio"]["array"], return_tensors="pt", padding="longest") input_values = inputs.input_values.to("cuda") attention_mask = inputs.attention_mask.to("cuda") with torch.no_grad(): logits = model(input_values, attention_mask=attention_mask).logits predicted_ids = torch.argmax(logits, dim=-1) transcription = processor.batch_decode(predicted_ids) batch["transcription"] = transcription return batch result = librispeech_eval.map(map_to_pred, remove_columns=["audio"]) print("WER:", wer(result["text"], result["transcription"])) ``` *Result (WER)*: | "clean" | "other" | |---|---| | 1.9 | 3.9 |
[ -0.2369559407234192, -0.6335606575012207, 0.2072151005268097, 0.2189982384443283, -0.14401669800281525, -0.1916401982307434, -0.4820295572280884, -0.5395559668540955, 0.007479522842913866, 0.16333740949630737, -0.6500542163848877, -0.5772554874420166, -0.5546136498451233, -0.35438430309295654, -0.3963516652584076, 0.9299805760383606, 0.25798499584198, 0.06805253028869629, 0.06393209099769592, -0.1430618315935135, -0.3993535041809082, -0.29357287287712097, -0.8489180207252502, -0.41914382576942444, 0.23291683197021484, 0.15555375814437866, 0.1561754196882248, 0.24502965807914734, 0.34317919611930847, 0.3493660092353821, -0.20281493663787842, 0.019810743629932404, -0.6714784502983093, -0.10869545489549637, 0.13420620560646057, -0.3281691372394562, -0.34740760922431946, 0.2638513445854187, 0.581201434135437, 0.39234140515327454, -0.20089417695999146, 0.5737210512161255, 0.11422929167747498, 0.431735634803772, -0.327859103679657, 0.3155894875526428, -0.5853836536407471, -0.1439998596906662, -0.11880239844322205, -0.1024651825428009, -0.5596243143081665, -0.07352841645479202, 0.11391737312078476, -0.5294404625892639, 0.2035873532295227, -0.22713834047317505, 0.851910412311554, 0.28381818532943726, -0.2514631450176239, -0.3888107240200043, -0.9210079312324524, 0.831719160079956, -0.6841384768486023, 0.7411194443702698, 0.491741418838501, 0.2224075347185135, -0.036274977028369904, -1.0985037088394165, -0.42866408824920654, -0.03142879530787468, 0.3040371835231781, 0.49918168783187866, -0.3145427703857422, 0.07780513912439346, 0.38152140378952026, 0.30113428831100464, -0.6329748034477234, 0.10530403256416321, -0.8754831552505493, -0.5089492797851562, 0.7735957503318787, -0.34571242332458496, 0.0011427932186052203, -0.05043073743581772, -0.37022727727890015, -0.5163330435752869, -0.21414990723133087, 0.47140562534332275, 0.3277045786380768, 0.13306424021720886, -0.41642987728118896, 0.3990462124347687, 0.031774748116731644, 0.6118025183677673, 0.12597545981407166, -0.39255088567733765, 0.7021756172180176, -0.19114935398101807, -0.15241385996341705, 0.4476690888404846, 0.923939049243927, 0.1345587521791458, 0.14322078227996826, 0.1260053664445877, -0.1773374378681183, 0.1732703149318695, -0.17715242505073547, -0.7186322212219238, -0.5314748287200928, 0.4605308771133423, -0.4168317914009094, 0.07925932854413986, 0.10731159895658493, -0.24121201038360596, -0.0259272288531065, -0.24466173350811005, 1.0366673469543457, -0.5011972784996033, -0.278954416513443, 0.17572177946567535, -0.24533651769161224, 0.19014038145542145, -0.1143537163734436, -0.8532050848007202, 0.167904794216156, 0.4427160620689392, 0.8135675191879272, 0.12587551772594452, -0.08397243916988373, -0.5709694623947144, -0.024879077449440956, -0.21530714631080627, 0.49485883116722107, -0.014803780242800713, -0.5162553787231445, -0.2871822416782379, -0.1006699725985527, 0.07477013766765594, -0.6082509756088257, 0.7430256009101868, -0.35356682538986206, 0.2532222270965576, -0.07712023705244064, -0.6736341118812561, -0.24506531655788422, -0.5516446232795715, -0.564413845539093, 1.2011781930923462, 0.14344707131385803, -0.6318404674530029, 0.22535236179828644, -0.3952300250530243, -0.6193141341209412, -0.32279446721076965, -0.08162718266248703, -0.6276254057884216, 0.0897824764251709, 0.25531005859375, 0.48521122336387634, -0.12934668362140656, 0.007653174921870232, -0.1810983121395111, -0.6023604869842529, 0.3992380201816559, -0.5395283699035645, 1.0702375173568726, 0.2947353422641754, -0.568668007850647, 0.16067886352539062, -0.8912652134895325, 0.1897278130054474, 0.07074299454689026, -0.467335969209671, 0.13823069632053375, -0.19460545480251312, 0.3317335546016693, 0.28939372301101685, 0.1800564080476761, -0.5952056050300598, -0.20805302262306213, -0.7313502430915833, 0.6253718733787537, 0.7292689085006714, -0.12189566344022751, 0.3307968080043793, -0.33090242743492126, -0.01009583380073309, -0.2679339647293091, 0.032697513699531555, 0.08619706332683563, -0.40847858786582947, -0.6517233848571777, -0.43506085872650146, 0.33294522762298584, 0.46585315465927124, -0.21365860104560852, 0.6879390478134155, -0.10019345581531525, -0.8685691356658936, -1.0223541259765625, 0.04991885647177696, 0.34779682755470276, 0.518380880355835, 0.7183759212493896, -0.22994619607925415, -0.750912070274353, -0.7913157939910889, -0.11143987625837326, -0.08037614077329636, -0.19466173648834229, 0.335013210773468, 0.2383756935596466, -0.35169732570648193, 0.6463400721549988, -0.226841539144516, -0.5189456343650818, -0.22190198302268982, 0.15309052169322968, 0.6265259385108948, 0.6699779629707336, 0.2663278877735138, -0.599753737449646, -0.29260241985321045, -0.3770521879196167, -0.5355650186538696, -0.12354989349842072, -0.1100352331995964, -0.020096665248274803, 0.16100114583969116, 0.44861698150634766, -0.46436816453933716, 0.35902294516563416, 0.5496923923492432, -0.08869669586420059, 0.38389256596565247, -0.10471762716770172, 0.0014069565804675221, -0.9515570402145386, 0.006605389062315226, -0.06281526386737823, -0.2778117060661316, -0.4732353389263153, -0.6106441020965576, -0.08856605738401413, -0.06101547181606293, -0.53170245885849, 0.37475287914276123, -0.47794947028160095, -0.292870432138443, -0.1913089156150818, 0.20639628171920776, -0.15534788370132446, 0.533346951007843, 0.04849909991025925, 0.6641704440116882, 0.6206004619598389, -0.5741015076637268, 0.6059818267822266, 0.21273131668567657, -0.592803955078125, 0.024496762081980705, -0.8836029171943665, 0.464459627866745, 0.13967588543891907, 0.345287948846817, -1.1601418256759644, -0.07141438126564026, -0.04744163528084755, -0.9150580167770386, 0.3348788022994995, 0.026717541739344597, -0.37508413195610046, -0.4694041311740875, -0.09517158567905426, 0.44952285289764404, 0.9402878880500793, -0.688867449760437, 0.551214873790741, 0.44697830080986023, 0.18356499075889587, -0.4440598785877228, -0.9657573103904724, -0.4857678711414337, -0.04373355209827423, -0.6966721415519714, 0.36876383423805237, -0.020263660699129105, 0.048655301332473755, -0.15372295677661896, -0.5034387111663818, 0.19303452968597412, -0.13922259211540222, 0.5309871435165405, 0.20172087848186493, -0.07259515672922134, 0.2096269577741623, -0.10770948976278305, -0.2525482773780823, 0.21822620928287506, -0.5381677150726318, 0.7251238226890564, -0.148633673787117, -0.21934100985527039, -0.9641678929328918, -0.05575011670589447, 0.1907186061143875, -0.36610040068626404, 0.3876931071281433, 1.1459708213806152, -0.3520315885543823, -0.23439833521842957, -0.6151952743530273, -0.3107280433177948, -0.5455881953239441, 0.7087183594703674, -0.2674925625324249, -0.6787375211715698, 0.32227376103401184, 0.05143230780959129, 0.07158952206373215, 0.6712114214897156, 0.7417313456535339, -0.45071521401405334, 0.8389993906021118, 0.24090997874736786, -0.04005417600274086, 0.522130012512207, -0.8816229104995728, 0.059170156717300415, -0.7757704257965088, -0.4339352548122406, -0.32671862840652466, -0.4229647219181061, -0.5114744901657104, -0.5080960392951965, 0.4896669387817383, -0.018537919968366623, -0.15577571094036102, 0.35885947942733765, -0.7374527454376221, 0.16535891592502594, 0.705948531627655, 0.3433893024921417, -0.14480724930763245, 0.20417922735214233, 0.05472974479198456, -0.05290237441658974, -0.5358169674873352, -0.12630179524421692, 1.2264976501464844, 0.4859831929206848, 0.7794272303581238, -0.16859588027000427, 0.8183757662773132, 0.199343740940094, -0.2972007989883423, -0.8682964444160461, 0.44809257984161377, -0.12556986510753632, -0.6897210478782654, -0.3034241199493408, -0.28480449318885803, -0.8297025561332703, 0.12200504541397095, -0.34881719946861267, -0.7679363489151001, 0.11170081049203873, 0.038911350071430206, -0.3516577482223511, 0.15160579979419708, -0.7380707859992981, 0.6554409861564636, -0.24448946118354797, -0.31819242238998413, -0.3310486674308777, -0.6878220438957214, 0.07300484925508499, 0.048480208963155746, 0.22899694740772247, -0.1698569655418396, 0.44272488355636597, 1.3664779663085938, -0.1280987560749054, 0.5326186418533325, -0.4049220681190491, -0.01705574057996273, 0.6913298964500427, -0.2166220247745514, 0.3248956501483917, 0.031136952340602875, -0.17023736238479614, 0.29250961542129517, 0.13462446630001068, -0.3002451956272125, -0.3748258352279663, 0.6427018046379089, -1.0529435873031616, -0.301133394241333, -0.21533901989459991, -0.4532431960105896, -0.2595677971839905, 0.10249090194702148, 0.8089902997016907, 0.8069158792495728, -0.022089868783950806, 0.4797990024089813, 0.6960269808769226, -0.05868549644947052, 0.4841662645339966, 0.11211198568344116, -0.09592882543802261, -0.46981051564216614, 0.926720380783081, 0.27316805720329285, 0.2453220933675766, 0.10434221476316452, 0.23358522355556488, -0.6104736328125, -0.44877880811691284, -0.014763716608285904, 0.24289198219776154, -0.7033949494361877, -0.07939447462558746, -0.6591206192970276, -0.4033205509185791, -0.7192544341087341, 0.13530179858207703, -0.736272394657135, -0.41988539695739746, -0.44491857290267944, -0.08707433938980103, 0.31899455189704895, 0.5365350842475891, -0.47151628136634827, 0.3785403370857239, -0.5709458589553833, 0.5083077549934387, 0.3906208872795105, -0.04155970364809036, -0.13614606857299805, -1.0680559873580933, -0.3724966049194336, 0.2357558310031891, -0.03673268109560013, -0.8713934421539307, 0.14926010370254517, 0.23858493566513062, 0.4852945804595947, 0.32923227548599243, -0.05612607300281525, 0.6470677256584167, -0.2863609492778778, 0.6774198412895203, 0.2822633981704712, -1.0690537691116333, 0.6814107894897461, -0.10787581652402878, 0.2156718671321869, 0.4766354560852051, 0.19291561841964722, -0.34327781200408936, -0.07858937978744507, -0.7131587862968445, -0.9810421466827393, 0.8849713206291199, 0.3715226948261261, 0.01543529611080885, 0.40703117847442627, 0.2984125316143036, -0.11557254940271378, -0.06627915799617767, -0.7329305410385132, -0.4756079316139221, -0.3980003297328949, -0.3346744477748871, -0.33136847615242004, -0.2540556490421295, -0.0551224984228611, -0.5480183362960815, 0.9852648973464966, 0.3319096267223358, 0.570667028427124, 0.46182334423065186, -0.1477309614419937, 0.0864163264632225, 0.11099360883235931, 0.3452867269515991, 0.3112610876560211, -0.31278637051582336, 0.1498711109161377, 0.31754741072654724, -0.5869210958480835, 0.21019811928272247, 0.22970619797706604, 0.16195647418498993, 0.04280673712491989, 0.7005754113197327, 1.1286238431930542, 0.013280745595693588, -0.39741864800453186, 0.5384736657142639, 0.005846027750521898, -0.2963087558746338, -0.5806913375854492, 0.22118684649467468, 0.4347052276134491, 0.3958587050437927, 0.4104747176170349, -0.03360793739557266, 0.13078944385051727, -0.40815579891204834, 0.3455832004547119, 0.24911046028137207, -0.5268155336380005, -0.27586597204208374, 0.9226987957954407, 0.066543348133564, -0.26168984174728394, 0.6668771505355835, -0.030657712370157242, -0.29589924216270447, 0.6319094300270081, 0.6358610391616821, 0.7793071866035461, -0.36585015058517456, -0.22218795120716095, 0.5960210561752319, 0.23420296609401703, -0.025545720010995865, 0.4486590623855591, -0.2387867271900177, -0.44998520612716675, -0.28381478786468506, -0.6278213262557983, 0.06839141249656677, 0.253018856048584, -0.7869914174079895, 0.32150977849960327, -0.4186423420906067, -0.4074600040912628, 0.25251150131225586, 0.17495116591453552, -0.7743818759918213, 0.4049191474914551, 0.26829448342323303, 0.6947965025901794, -0.828046977519989, 1.0372178554534912, 0.3208186626434326, -0.3184988796710968, -1.274832010269165, -0.1487945169210434, -0.09705567359924316, -0.776342511177063, 0.6076642870903015, 0.3756536841392517, -0.4194730520248413, 0.23517630994319916, -0.5670517086982727, -0.8545045852661133, 1.0844509601593018, 0.31606629490852356, -0.7908021807670593, 0.16102230548858643, -0.12097568064928055, 0.4807482063770294, -0.08309055119752884, 0.1630541831254959, 0.7257300019264221, 0.43106040358543396, 0.06937640905380249, -0.9867934584617615, -0.13732615113258362, -0.11668527871370316, -0.28174424171447754, -0.26695266366004944, -0.6669142246246338, 0.9408111572265625, -0.39394280314445496, -0.29985320568084717, -0.09404999762773514, 1.0326778888702393, 0.24993275105953217, 0.3077338635921478, 0.6171071529388428, 0.5212244987487793, 0.9035064578056335, -0.20466968417167664, 0.7310277819633484, -0.0387907549738884, 0.5590287446975708, 1.1590217351913452, 0.1083715409040451, 0.8585113883018494, 0.27303770184516907, -0.36562058329582214, 0.36358076333999634, 0.5728011727333069, -0.17638231813907623, 0.7190525531768799, 0.2037634253501892, -0.23945669829845428, -0.21881093084812164, 0.05987982451915741, -0.6719318628311157, 0.9001923203468323, 0.2509218752384186, -0.16871440410614014, 0.295684278011322, 0.1795293241739273, -0.13281342387199402, -0.11080732941627502, -0.15726116299629211, 0.7539284825325012, 0.20979894697666168, -0.26503685116767883, 0.9198512434959412, -0.01669245958328247, 0.7908811569213867, -0.634688675403595, 0.1212502270936966, 0.2270926833152771, 0.3012712597846985, -0.4041910171508789, -0.6250607967376709, 0.07076051831245422, -0.2649497389793396, -0.17766517400741577, 0.05552055686712265, 0.6404668092727661, -0.6704332232475281, -0.4803328514099121, 0.6227083206176758, 0.08199073374271393, 0.25237175822257996, -0.05535316839814186, -0.6585330367088318, 0.3139333724975586, 0.26491326093673706, -0.4180903732776642, -0.04730488732457161, 0.09107851982116699, 0.4125833511352539, 0.31038859486579895, 0.7364159226417542, 0.17162783443927765, 0.17125146090984344, 0.025709310546517372, 0.6008753180503845, -0.5647653937339783, -0.5727370977401733, -0.6064769625663757, 0.3638860881328583, 0.07180571556091309, -0.17952583730220795, 0.5790533423423767, 0.7666515111923218, 1.0143628120422363, 0.014359772205352783, 0.7001463770866394, 0.029678549617528915, 0.654029905796051, -0.7074227929115295, 0.8189303874969482, -0.6304366588592529, 0.11121822893619537, -0.16320116817951202, -0.8345974087715149, 0.09124527871608734, 0.9279505014419556, -0.13699489831924438, 0.3772493600845337, 0.4822731018066406, 0.8240991234779358, -0.0884256437420845, -0.021663183346390724, 0.18355655670166016, 0.392433762550354, 0.3259560167789459, 0.7451125979423523, 0.5604521036148071, -0.8118120431900024, 0.7581772804260254, -0.5854313373565674, -0.19747786223888397, -0.06988202780485153, -0.22918912768363953, -0.8997343182563782, -0.7943084239959717, -0.2789706289768219, -0.6432417631149292, -0.06616073101758957, 1.0186007022857666, 0.8377012014389038, -0.8024241328239441, -0.35818779468536377, 0.28210994601249695, -0.1791270524263382, -0.37735095620155334, -0.18567758798599243, 0.7498773336410522, 0.012327614240348339, -0.8167235851287842, 0.7597963213920593, -0.03732352703809738, 0.12554682791233063, -0.031929463148117065, -0.16755688190460205, -0.2728571891784668, -0.04581921175122261, 0.3663475811481476, 0.24619780480861664, -0.6625545024871826, -0.24102076888084412, -0.16148802638053894, -0.1581430584192276, 0.1661471277475357, 0.3875485360622406, -0.729512631893158, 0.6120762825012207, 0.5423052906990051, 0.29994550347328186, 1.0423325300216675, -0.2378053218126297, 0.07215052843093872, -0.6618752479553223, 0.45722854137420654, 0.25064951181411743, 0.31664514541625977, 0.28640803694725037, -0.22715097665786743, 0.2766458988189697, 0.3075440526008606, -0.6429458260536194, -0.7578198909759521, -0.0750136524438858, -1.3251399993896484, -0.18212734162807465, 1.2802743911743164, 0.05286264792084694, -0.2512299716472626, 0.16385646164417267, -0.3796077072620392, 0.9531168341636658, -0.45310431718826294, 0.4647071063518524, 0.35752803087234497, -0.19523191452026367, 0.12084133177995682, -0.573979914188385, 0.5558621287345886, 0.4646361768245697, -0.3608197867870331, -0.10737251490354538, 0.3882215917110443, 0.5457847118377686, 0.09383782744407654, 0.9202461242675781, -0.12801475822925568, 0.4117994010448456, 0.22986678779125214, 0.2699570655822754, -0.28509587049484253, -0.2976761758327484, -0.4991047978401184, 0.08083826303482056, -0.12898753583431244, -0.5358321666717529 ]
Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static
Intel
"2023-06-27T08:21:13Z"
27,383
3
transformers
[ "transformers", "pytorch", "onnx", "distilbert", "text-classification", "text-classfication", "int8", "neural-compressor", "Intel® Neural Compressor", "PostTrainingStatic", "en", "dataset:sst2", "license:apache-2.0", "model-index", "endpoints_compatible", "region:us" ]
text-classification
"2022-03-29T05:04:36Z"
--- language: en license: apache-2.0 tags: - text-classfication - int8 - neural-compressor - Intel® Neural Compressor - PostTrainingStatic datasets: - sst2 model-index: - name: distilbert-base-uncased-finetuned-sst-2-english-int8-static results: - task: type: sentiment-classification name: Sentiment Classification dataset: type: sst2 name: Stanford Sentiment Treebank metrics: - type: accuracy value: 90.37 name: accuracy config: accuracy verified: false --- ## Model Details: INT8 DistilBERT base uncased finetuned SST-2 This model is a fine-tuned DistilBERT model for the downstream task of sentiment classification, training on the [SST-2 dataset](https://huggingface.co/datasets/sst2) and quantized to INT8 (post-training static quantization) from the original FP32 model ([distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english)). The same model is provided in two different formats: PyTorch and ONNX. | Model Detail | Description | | ----------- | ----------- | | Model Authors - Company | Intel | | Date | March 29, 2022 for PyTorch model & February 3, 2023 for ONNX model | | Version | 1 | | Type | NLP DistilBERT (INT8) - Sentiment Classification (+/-) | | Paper or Other Resources | [https://github.com/huggingface/optimum-intel](https://github.com/huggingface/optimum-intel) | | License | Apache 2.0 | | Questions or Comments | [Community Tab](https://huggingface.co/Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static/discussions) and [Intel Developers Discord](https://discord.gg/rv2Gp55UJQ) | | Intended Use | Description | | ----------- | ----------- | | Primary intended uses | Inference for sentiment classification (classifying whether a statement is positive or negative) | | Primary intended users | Anyone | | Out-of-scope uses | This model is already fine-tuned and quantized to INT8. It is not suitable for further fine-tuning in this form. To fine-tune your own model, you can start with [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english). The model should not be used to intentionally create hostile or alienating environments for people. | #### Load the PyTorch model with Optimum Intel ```python from optimum.intel.neural_compressor import INCModelForSequenceClassification model_id = "Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static" int8_model = INCModelForSequenceClassification.from_pretrained(model_id) ``` #### Load the ONNX model with Optimum: ```python from optimum.onnxruntime import ORTModelForSequenceClassification model_id = "Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static" int8_model = ORTModelForSequenceClassification.from_pretrained(model_id) ``` | Factors | Description | | ----------- | ----------- | | Groups | Movie reviewers from the internet | | Instrumentation | Text movie single-sentence reviews taken from 4 authors. More information can be found in the original paper by [Pang and Lee (2005)](https://arxiv.org/abs/cs/0506075) | | Environment | - | | Card Prompts | Model deployment on alternate hardware and software can change model performance | | Metrics | Description | | ----------- | ----------- | | Model performance measures | Accuracy | | Decision thresholds | - | | Approaches to uncertainty and variability | - | | | PyTorch INT8 | ONNX INT8 | FP32 | |---|---|---|---| | **Accuracy (eval-accuracy)** |0.9037|0.9071|0.9106| | **Model Size (MB)** |65|89|255| | Training and Evaluation Data | Description | | ----------- | ----------- | | Datasets | The dataset can be found here: [datasets/sst2](https://huggingface.co/datasets/sst2). There dataset has a total of 215,154 unique phrases, annotated by 3 human judges. | | Motivation | Dataset was chosen to showcase the benefits of quantization on an NLP classification task with the [Optimum Intel](https://github.com/huggingface/optimum-intel) and [Intel® Neural Compressor](https://github.com/intel/neural-compressor) | | Preprocessing | The calibration dataloader is the train dataloader. The default calibration sampling size 100 isn't divisible exactly by batch size 8, so the real sampling size is 104.| | Quantitative Analyses | Description | | ----------- | ----------- | | Unitary results | The model was only evaluated on accuracy. There is no available comparison between evaluation factors. | | Intersectional results | There is no available comparison between the intersection of evaluated factors. | | Ethical Considerations | Description | | ----------- | ----------- | | Data | The data that make up the model are movie reviews from authors on the internet. | | Human life | The model is not intended to inform decisions central to human life or flourishing. It is an aggregated set of movie reviews from the internet. | | Mitigations | No additional risk mitigation strategies were considered during model development. | | Risks and harms | The data are biased toward the particular reviewers' opinions and the judges (labelers) of the data. 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 ``` @misc{distilbert-base-uncased-finetuned-sst-2-english-int8-static author = {Xin He, Yu Wenz}, title = {distilbert-base-uncased-finetuned-sst-2-english-int8-static}, year = {2022}, url = {https://huggingface.co/Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static}, } ```
[ -0.31155577301979065, -0.6221598386764526, 0.23012180626392365, 0.13350887596607208, -0.3113391399383545, -0.08106886595487595, -0.28986406326293945, -0.2837601900100708, -0.06984856724739075, 0.15291918814182281, -0.4210805892944336, -0.3394544720649719, -0.6884667873382568, -0.19089080393314362, -0.18415120244026184, 1.2340071201324463, 0.11754780262708664, 0.273148775100708, -0.17661942541599274, 0.023029964417219162, -0.1441580355167389, -0.7187139391899109, -0.5717791318893433, -0.270656943321228, 0.0536259263753891, 0.16279998421669006, 0.6210464239120483, 0.4400997459888458, 0.6778877973556519, 0.30748435854911804, -0.3559291660785675, -0.24054484069347382, -0.3718239367008209, -0.07813996821641922, 0.02446626126766205, -0.300184041261673, -0.5675268173217773, 0.06335210800170898, 0.6329827308654785, 0.6777768135070801, -0.27075865864753723, 0.4835392236709595, 0.18898262083530426, 0.7052103877067566, -0.5359388589859009, 0.1576131284236908, -0.41457968950271606, 0.13267503678798676, 0.021607885137200356, 0.2483690232038498, -0.3270235061645508, -0.3218058943748474, 0.11133437603712082, -0.42017894983291626, 0.11741602420806885, -0.05133064091205597, 0.9283156991004944, 0.511572539806366, -0.3517974317073822, 0.15131127834320068, -0.7936921715736389, 0.7886214256286621, -0.8178303837776184, 0.4119908809661865, 0.22622346878051758, 0.11049536615610123, 0.17654842138290405, -0.8306830525398254, -0.6123934388160706, -0.1444459855556488, 0.018441442400217056, 0.40534472465515137, -0.5055229663848877, 0.32883092761039734, 0.5510356426239014, 0.5411377549171448, -0.5333774089813232, 0.057689305394887924, -0.6560293436050415, -0.28287675976753235, 0.5923328995704651, 0.046834494918584824, 0.14640507102012634, -0.41002753376960754, -0.5889503359794617, -0.1358378827571869, -0.3916018307209015, 0.3614596724510193, 0.46734941005706787, 0.1344933807849884, -0.2552877962589264, 0.5354331135749817, -0.3095564842224121, 0.5057032704353333, 0.14861635863780975, 0.03224765881896019, 0.424648642539978, -0.3740331530570984, -0.34882694482803345, 0.11309190839529037, 0.9555419087409973, 0.6457738876342773, 0.24229785799980164, -0.002814465668052435, -0.26869967579841614, 0.3831557035446167, 0.1182425245642662, -0.9747873544692993, -0.2954552471637726, 0.25923264026641846, -0.49785181879997253, -0.36144712567329407, 0.10045070201158524, -0.5544048547744751, -0.12156619876623154, -0.3809010982513428, 0.4268903434276581, -0.40589430928230286, -0.5003506541252136, 0.04955045506358147, -0.2802536189556122, 0.03174085170030594, 0.06669023633003235, -0.6399107575416565, 0.3182275593280792, 0.4947066605091095, 0.8592068552970886, -0.13767534494400024, -0.0707811564207077, -0.018733153119683266, -0.36142340302467346, -0.16685855388641357, 0.5400611162185669, -0.14700143039226532, -0.07966379821300507, -0.1282273679971695, -0.1562763899564743, 0.09614001959562302, -0.3829663395881653, 0.6954601407051086, -0.35190269351005554, 0.3480953574180603, -0.06761227548122406, -0.49576088786125183, -0.18992333114147186, 0.24606336653232574, -0.6339814066886902, 1.0741016864776611, 0.3019219636917114, -0.8520970344543457, 0.11562813818454742, -0.5987818241119385, -0.14492328464984894, -0.20407037436962128, -0.06805311888456345, -0.3757902681827545, 0.19347405433654785, -0.14477379620075226, 0.3910788893699646, -0.42966219782829285, 0.5201309323310852, -0.259650856256485, -0.38615015149116516, 0.2501099407672882, -0.5896114706993103, 1.1514650583267212, 0.3803195357322693, -0.39694949984550476, -0.08059000223875046, -0.7740041613578796, 0.12280876934528351, 0.03964831307530403, -0.33613812923431396, -0.11664785444736481, -0.1497723013162613, 0.15580372512340546, 0.4823359549045563, 0.3316422700881958, -0.6578072905540466, -0.018480492755770683, -0.5872231721878052, 0.5504938960075378, 0.7380788922309875, -0.09736528247594833, 0.42807236313819885, -0.1948549747467041, 0.5088779330253601, 0.2648056447505951, 0.4964727461338043, 0.24011345207691193, -0.4422863721847534, -0.8863251209259033, -0.05977009981870651, 0.5051740407943726, 0.6748765707015991, -0.5964713096618652, 0.455503910779953, -0.21672417223453522, -0.4759275019168854, -0.5134047269821167, -0.13835690915584564, 0.5914531350135803, 0.5328801870346069, 0.3592433035373688, -0.29889488220214844, -0.6665787696838379, -1.0766901969909668, -0.06498481333255768, -0.35882124304771423, -0.029433799907565117, -0.02748226560652256, 0.23829185962677002, -0.027307093143463135, 0.8153241276741028, -0.5076054334640503, -0.12454511970281601, -0.170011967420578, -0.04446360841393471, 0.32726922631263733, 0.5632632374763489, 0.3885037899017334, -0.7075943946838379, -0.5146536231040955, -0.23625755310058594, -0.8056859970092773, 0.1703753024339676, 0.25374728441238403, -0.14859497547149658, 0.32460856437683105, 0.500755786895752, -0.6554779410362244, 0.5194255709648132, 0.4578767418861389, -0.38304316997528076, 0.535639762878418, 0.04433904588222504, -0.05892326310276985, -1.2802479267120361, 0.05384928733110428, 0.3120832145214081, -0.016822611913084984, -0.6665239930152893, -0.119761161506176, -0.09244661033153534, -0.03443385660648346, -0.6347787976264954, 0.48700883984565735, -0.2080649435520172, 0.12250351160764694, -0.061169762164354324, -0.11810964345932007, 0.0949331521987915, 0.7639293670654297, -0.10601916909217834, 0.5734414458274841, 0.4512389600276947, -0.49830541014671326, 0.33208945393562317, 0.18440110981464386, -0.4874129295349121, 0.43804049491882324, -0.9147619605064392, -0.045681118965148926, -0.14460386335849762, 0.07408159226179123, -0.9560169577598572, 0.05689297243952751, 0.22388969361782074, -0.6721808314323425, 0.2708384096622467, -0.22000642120838165, -0.5087203979492188, -0.2714126706123352, -0.349347859621048, 0.24109205603599548, 0.7919857501983643, -0.20552757382392883, 0.5859013795852661, 0.40915796160697937, -0.13499990105628967, -0.5506538152694702, -1.006393551826477, -0.4089890122413635, -0.2955750823020935, -0.6249879002571106, 0.5060833096504211, -0.17609910666942596, -0.4305517077445984, -0.08073124289512634, -0.13192974030971527, -0.173429936170578, 0.06870659440755844, 0.3878106474876404, 0.570449948310852, -0.2213001847267151, 0.18573881685733795, 0.11895828694105148, -0.13133099675178528, 0.14799785614013672, -0.275038480758667, 0.3749229609966278, -0.3259868025779724, 0.11191747337579727, -0.5770792365074158, 0.2575155198574066, 0.44334372878074646, -0.05767529085278511, 0.6038601994514465, 0.8049329519271851, -0.5176982879638672, 0.1214917004108429, -0.48839622735977173, -0.4736102819442749, -0.4858028292655945, 0.6245723366737366, -0.19585290551185608, -0.7497127652168274, 0.47078999876976013, 0.050777945667505264, -0.08017950505018234, 0.8362881541252136, 0.5258938074111938, -0.13226884603500366, 1.1674305200576782, 0.7298640608787537, -0.04921124503016472, 0.6312942504882812, -0.5149263143539429, 0.2876932621002197, -0.9829867482185364, -0.11040617525577545, -0.3532636761665344, -0.3870380222797394, -0.8165718913078308, -0.11586567759513855, 0.32676205039024353, 0.3114423155784607, -0.7021549940109253, 0.09336262941360474, -0.7960754036903381, 0.37486639618873596, 0.6873619556427002, 0.13431820273399353, 0.15091584622859955, 0.2453756481409073, -0.27336111664772034, -0.14810313284397125, -0.8231761455535889, -0.5037554502487183, 1.080114483833313, 0.4476271867752075, 0.5857877135276794, 0.15489311516284943, 0.3337433338165283, 0.2738886773586273, -0.027595851570367813, -0.6141409277915955, 0.4076784551143646, -0.44143885374069214, -0.7739657163619995, -0.12590032815933228, -0.40864574909210205, -0.5823900699615479, 0.03447359800338745, -0.033315159380435944, -0.881783127784729, 0.3650400936603546, 0.1645285040140152, -0.7542858719825745, 0.2928137481212616, -1.0367462635040283, 0.9932922720909119, -0.3268648684024811, -0.32988297939300537, -0.020586738362908363, -0.7953077554702759, 0.36830422282218933, 0.21336494386196136, -0.021659551188349724, -0.19199013710021973, 0.19841037690639496, 0.9119643568992615, -0.45027437806129456, 0.8694201111793518, -0.3299373984336853, 0.4288267195224762, 0.44315648078918457, -0.06489627808332443, 0.34343773126602173, 0.025808122009038925, -0.2787594199180603, 0.4361206591129303, 0.21683762967586517, -0.13390786945819855, -0.4543416500091553, 0.7419959306716919, -1.156356692314148, -0.3189089000225067, -0.7137382626533508, -0.3780423700809479, -0.11062142252922058, 0.019660279154777527, 0.5233771204948425, 0.4480920732021332, -0.0620197132229805, 0.29441800713539124, 0.62474524974823, -0.1865057498216629, 0.4103545844554901, 0.4108440577983856, -0.11505348980426788, -0.4612624943256378, 0.9166166186332703, 0.31764256954193115, 0.3821667432785034, 0.15253610908985138, 0.3286142945289612, -0.4118523895740509, -0.3714198172092438, -0.4060923755168915, -0.022372279316186905, -0.8021109104156494, -0.38080307841300964, -0.6898273229598999, -0.46043258905410767, -0.46927857398986816, 0.2673768699169159, -0.48584118485450745, -0.7228735685348511, -0.4031951129436493, -0.32142195105552673, 0.6188709139823914, 0.5177499055862427, -0.07632498443126678, 0.406707227230072, -0.3425012230873108, 0.12364907562732697, 0.10152497887611389, 0.4799553155899048, -0.013176378794014454, -0.933146595954895, -0.26474812626838684, 0.2598845660686493, -0.5217111706733704, -0.6559399962425232, 0.22215959429740906, 0.24356375634670258, 0.4316955804824829, 0.2904338240623474, 0.29156145453453064, 0.3996821641921997, -0.19933725893497467, 0.8922717571258545, 0.2881145477294922, -0.8213005065917969, 0.5274821519851685, -0.13472725450992584, 0.4261816143989563, 0.7081635594367981, 0.6163085103034973, -0.440033495426178, -0.1703166663646698, -0.8111071586608887, -1.0702184438705444, 0.9725269079208374, 0.22599264979362488, 0.13758648931980133, 0.14700427651405334, 0.22215738892555237, -0.20090430974960327, 0.3437420427799225, -0.8779565691947937, -0.3811592757701874, -0.39382827281951904, -0.3805997967720032, 0.09259596467018127, -0.36514905095100403, 0.04336077719926834, -0.5883448123931885, 0.8354416489601135, 0.14678199589252472, 0.5779764652252197, 0.21145066618919373, -0.0679519772529602, 0.07073991000652313, 0.06524387001991272, 0.33957919478416443, 0.3936164677143097, -0.43241870403289795, 0.11723165214061737, 0.11651785671710968, -0.5972836017608643, 0.037363190203905106, 0.2752511203289032, -0.4498206079006195, -0.0369504876434803, 0.004503175150603056, 1.1843438148498535, -0.02835281379520893, -0.46726706624031067, 0.47250980138778687, -0.1950102150440216, -0.18143022060394287, -0.5109790563583374, -0.040764544159173965, -0.042059220373630524, 0.3503408133983612, 0.20152220129966736, 0.39901816844940186, 0.3196960687637329, -0.3948306441307068, 0.02987024560570717, 0.27177631855010986, -0.5946592688560486, -0.31259748339653015, 0.6068294048309326, 0.0825890451669693, -0.2952601909637451, 0.8085997104644775, -0.41261881589889526, -0.6209776997566223, 0.6442162990570068, 0.33200135827064514, 0.861170768737793, -0.18605618178844452, 0.15356668829917908, 0.6705501675605774, 0.43961301445961, -0.15316461026668549, 0.39216896891593933, 0.19455525279045105, -0.7533387541770935, -0.3099181652069092, -0.7885594367980957, -0.13961069285869598, 0.0427141971886158, -0.793935239315033, 0.26514872908592224, -0.6759615540504456, -0.5113744735717773, 0.1768307089805603, 0.06929397583007812, -0.7992316484451294, 0.32563087344169617, 0.1451779156923294, 0.6707601547241211, -0.8523051142692566, 0.8117133378982544, 0.6336404085159302, -0.7743096351623535, -0.972091019153595, -0.16643472015857697, 0.006110289599746466, -0.4001696705818176, 0.5400450825691223, 0.12785325944423676, 0.1724066436290741, 0.1604982316493988, -0.35305479168891907, -0.9270398020744324, 1.0653940439224243, 0.5653067827224731, -0.5799423456192017, -0.018259067088365555, 0.1253611147403717, 0.648084282875061, -0.14359116554260254, 0.6845000386238098, 0.5891996026039124, 0.2901177406311035, -0.032585494220256805, -0.8917276859283447, -0.01502345222979784, -0.6186751127243042, 0.05337994918227196, 0.02731051668524742, -0.8732702136039734, 1.1098049879074097, -0.05946674570441246, -0.06410007178783417, -0.1837800294160843, 0.5288863182067871, 0.17488066852092743, 0.16287869215011597, 0.3923295736312866, 0.6886614561080933, 0.6000934839248657, -0.3070814311504364, 1.108734130859375, -0.47216248512268066, 0.5056222677230835, 1.104124903678894, -0.01062489952892065, 0.9983706474304199, 0.4860967695713043, -0.550506055355072, 0.5122623443603516, 0.7489270567893982, -0.02784709446132183, 0.4976884126663208, 0.12129612267017365, -0.18325379490852356, -0.06608855724334717, -0.2564350664615631, -0.43171241879463196, 0.41347068548202515, 0.12530890107154846, -0.4915768802165985, 0.1640375405550003, 0.04203163459897041, 0.03763144835829735, -0.1452295333147049, -0.2581177055835724, 0.7246577143669128, 0.15445615351200104, -0.6981966495513916, 0.7044026851654053, 0.1866929531097412, 0.894964337348938, -0.5407771468162537, 0.19946065545082092, -0.2543388307094574, 0.3631705641746521, -0.25127604603767395, -0.6301158666610718, 0.39988765120506287, 0.07532079517841339, -0.5158432722091675, -0.12265049666166306, 0.5954442024230957, -0.37801265716552734, -0.8689400553703308, 0.2000707983970642, 0.2579183578491211, 0.21966922283172607, -0.28436046838760376, -0.9304133057594299, 0.16587577760219574, 0.18861423432826996, -0.3451443910598755, 0.22552365064620972, 0.24780280888080597, 0.021017268300056458, 0.4006088674068451, 0.46313998103141785, -0.028066318482160568, 0.08090667426586151, 0.02354711852967739, 0.7859562635421753, -0.48374325037002563, -0.4730575382709503, -0.8952201008796692, 0.8042708039283752, -0.1483498215675354, -0.517444372177124, 0.6767522096633911, 0.6695312261581421, 1.0190269947052002, -0.06302456557750702, 0.9095798134803772, -0.12343872338533401, 0.34588712453842163, -0.4150950610637665, 0.7107645273208618, -0.5845195055007935, 0.07819193601608276, -0.24601814150810242, -0.9299518465995789, -0.09682656824588776, 0.7765328884124756, -0.25610700249671936, 0.2848104238510132, 0.7400711178779602, 0.7615485191345215, -0.11375926434993744, -0.0441572330892086, 0.20840169489383698, 0.46283847093582153, -0.05090828612446785, 0.5063735246658325, 0.7153957486152649, -0.8091779947280884, 0.48410019278526306, -0.6086735725402832, -0.25665774941444397, -0.15093496441841125, -0.715039074420929, -0.7174792885780334, -0.5855105519294739, -0.5788781046867371, -0.551688551902771, 0.0017098115058615804, 1.105271339416504, 0.66240394115448, -0.7775956988334656, -0.26114195585250854, -0.08838067203760147, -0.07096090912818909, -0.20284625887870789, -0.25202110409736633, 0.32539546489715576, 0.04104413464665413, -0.697006344795227, 0.014491155743598938, 0.07621290534734726, 0.12280729413032532, -0.5041683912277222, -0.21733325719833374, -0.22779063880443573, -0.02213735692203045, 0.5592973828315735, 0.03109034150838852, -0.7348859310150146, 0.06881450116634369, 0.10170367360115051, -0.07562702894210815, 0.042873281985521317, 0.40415942668914795, -0.5637059807777405, 0.47209638357162476, 0.5561183094978333, 0.3656109869480133, 0.41886457800865173, -0.11546285450458527, 0.33366355299949646, -0.7753480672836304, 0.34931111335754395, 0.3449081778526306, 0.44931718707084656, 0.3943803608417511, -0.5616516470909119, 0.45592278242111206, 0.25307920575141907, -0.5962726473808289, -0.9116613268852234, -0.06302248686552048, -1.0677874088287354, -0.13131672143936157, 1.3009368181228638, -0.08320031315088272, -0.24587589502334595, 0.2024490386247635, -0.16034336388111115, 0.5224169492721558, -0.4684278964996338, 0.6463727355003357, 0.7636327147483826, 0.06959192454814911, -0.07313869893550873, -0.6845946907997131, 0.5584156513214111, 0.4428265392780304, -0.551135241985321, -0.11854030191898346, 0.40885597467422485, 0.3022012710571289, 0.15663476288318634, 0.5478237867355347, -0.08266978710889816, 0.2799026668071747, 0.027843764051795006, 0.41910895705223083, -0.10488424450159073, -0.2739659249782562, -0.46218356490135193, -0.06812181323766708, 0.15462930500507355, -0.18198072910308838 ]
ckiplab/albert-tiny-chinese-ws
ckiplab
"2022-05-10T03:28:12Z"
27,296
2
transformers
[ "transformers", "pytorch", "albert", "token-classification", "zh", "license:gpl-3.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: - zh thumbnail: https://ckip.iis.sinica.edu.tw/files/ckip_logo.png tags: - pytorch - token-classification - albert - zh license: gpl-3.0 --- # CKIP ALBERT Tiny Chinese This project provides traditional Chinese transformers models (including ALBERT, BERT, GPT2) and NLP tools (including word segmentation, part-of-speech tagging, named entity recognition). 這個專案提供了繁體中文的 transformers 模型(包含 ALBERT、BERT、GPT2)及自然語言處理工具(包含斷詞、詞性標記、實體辨識)。 ## Homepage - https://github.com/ckiplab/ckip-transformers ## Contributers - [Mu Yang](https://muyang.pro) at [CKIP](https://ckip.iis.sinica.edu.tw) (Author & Maintainer) ## Usage Please use BertTokenizerFast as tokenizer instead of AutoTokenizer. 請使用 BertTokenizerFast 而非 AutoTokenizer。 ``` from transformers import ( BertTokenizerFast, AutoModel, ) tokenizer = BertTokenizerFast.from_pretrained('bert-base-chinese') model = AutoModel.from_pretrained('ckiplab/albert-tiny-chinese-ws') ``` For full usage and more information, please refer to https://github.com/ckiplab/ckip-transformers. 有關完整使用方法及其他資訊,請參見 https://github.com/ckiplab/ckip-transformers 。
[ -0.3479917347431183, -0.2660326361656189, 0.07547429203987122, 0.7500585317611694, -0.3474053740501404, 0.06385860592126846, -0.22954826056957245, -0.3166537880897522, 0.027532055974006653, 0.33758679032325745, -0.37999963760375977, -0.24693071842193604, -0.5399678349494934, 0.10746605694293976, -0.20637989044189453, 0.8557183742523193, -0.17165270447731018, 0.3080693483352661, 0.39645013213157654, 0.07053098827600479, -0.2495417445898056, -0.2339630126953125, -0.8427988290786743, -0.6009601354598999, 0.015264295972883701, 0.4431077837944031, 0.7784343957901001, 0.4807879328727722, 0.5500198006629944, 0.32671818137168884, -0.004549531731754541, -0.08704357594251633, -0.09725938737392426, -0.45117104053497314, 0.011181586422026157, -0.6276454329490662, -0.377551406621933, -0.26119479537010193, 0.7320824265480042, 0.5060306191444397, 0.01807260513305664, 0.11296828836202621, 0.2370600551366806, 0.33739709854125977, -0.3167027235031128, 0.4293496310710907, -0.5972425937652588, 0.32330411672592163, -0.218185693025589, -0.05256931111216545, -0.36541318893432617, -0.20173686742782593, 0.11024867743253708, -0.6953350901603699, 0.35909977555274963, 0.02931581810116768, 1.33029305934906, 0.07625053822994232, -0.31296855211257935, -0.26550811529159546, -0.7181959748268127, 1.1290199756622314, -0.8909216523170471, 0.38823753595352173, 0.37699127197265625, 0.312051385641098, 0.014664771966636181, -1.1509008407592773, -0.729152262210846, -0.18110497295856476, -0.4030812680721283, 0.2482622265815735, 0.07367133349180222, -0.03282349929213524, 0.4259531795978546, 0.29849135875701904, -0.6509284377098083, 0.31906887888908386, -0.4369533360004425, -0.43441444635391235, 0.6050140261650085, 0.056345827877521515, 0.501740038394928, -0.524936854839325, -0.45447319746017456, -0.34769096970558167, -0.6514600515365601, 0.23835240304470062, 0.22724564373493195, 0.15604107081890106, -0.595700740814209, 0.6583715677261353, -0.0644901841878891, 0.2696870267391205, 0.14982090890407562, -0.10758670419454575, 0.37746909260749817, -0.375422865152359, -0.014432426542043686, -0.1316842883825302, 1.0955531597137451, 0.21982593834400177, 0.010910666547715664, 0.14125719666481018, -0.3689570426940918, -0.34837284684181213, -0.30533888936042786, -0.885345458984375, -0.7381542921066284, 0.2025136947631836, -0.8664087653160095, -0.2249443084001541, 0.1085483655333519, -0.7169908285140991, 0.2725768983364105, -0.21723538637161255, 0.4046405553817749, -0.6806166768074036, -0.5452619791030884, -0.05704311281442642, -0.3713180124759674, 0.7050742506980896, 0.1357642561197281, -1.315555214881897, 0.006259842775762081, 0.6447020173072815, 0.8721114993095398, 0.2245628833770752, -0.17393021285533905, 0.10427400469779968, 0.4012688994407654, -0.25942495465278625, 0.5982462763786316, -0.11320050060749054, -0.7017455697059631, 0.124962218105793, 0.07283210754394531, 0.04088212549686432, -0.4839560389518738, 0.8089337944984436, -0.3010824918746948, 0.34367892146110535, -0.13762551546096802, -0.20182324945926666, 0.027705788612365723, 0.09146755933761597, -0.520614743232727, 1.1348987817764282, 0.135408416390419, -0.9247906804084778, 0.23838327825069427, -0.9584604501724243, -0.5440195798873901, 0.35568347573280334, -0.15540598332881927, -0.4880102276802063, -0.10152830183506012, 0.22723343968391418, 0.29919442534446716, -0.13722637295722961, 0.07418262958526611, -0.11537730693817139, -0.23470257222652435, -0.014658014290034771, -0.44331642985343933, 1.290507435798645, 0.342178612947464, -0.20188988745212555, 0.1959211379289627, -0.7438216805458069, 0.1326344907283783, 0.3648351728916168, -0.1966470628976822, -0.37020063400268555, 0.12233440577983856, 0.5512340664863586, 0.18124613165855408, 0.5400298833847046, -0.6137450933456421, 0.5648669600486755, -0.6425041556358337, 0.7985514402389526, 0.8128864169120789, -0.24780912697315216, 0.3540847599506378, -0.21387703716754913, 0.005030415020883083, 0.021916456520557404, 0.37482163310050964, -0.03607190027832985, -0.5571755170822144, -1.193917155265808, -0.40440893173217773, 0.5280234217643738, 0.6977749466896057, -1.264859914779663, 0.7599945068359375, -0.3238506019115448, -0.7127842307090759, -0.4541463553905487, -0.0011826356640085578, 0.008535410277545452, 0.10256603360176086, 0.5019403696060181, -0.26337742805480957, -0.5985076427459717, -1.102698802947998, 0.09000924229621887, -0.6513981223106384, -0.7036182284355164, -0.027963468804955482, 0.6819049715995789, -0.48167872428894043, 1.0407747030258179, -0.5818858742713928, -0.37591391801834106, -0.28900718688964844, 0.6039618849754333, 0.32371100783348083, 0.9066445827484131, 0.6088264584541321, -1.0396671295166016, -0.820990264415741, -0.17074626684188843, -0.344544380903244, -0.02249017544090748, -0.2885720431804657, -0.09661578387022018, -0.07522887736558914, 0.07543949782848358, -0.705623209476471, 0.21504248678684235, 0.3623064458370209, -0.006947527173906565, 0.8708598017692566, -0.07129722088575363, -0.3228807747364044, -1.2898783683776855, 0.13779228925704956, -0.1685262769460678, -0.04474429786205292, -0.38193467259407043, -0.045911580324172974, 0.2277960628271103, -0.10023048520088196, -0.6253047585487366, 0.6485944390296936, -0.3737935721874237, 0.3558741807937622, -0.25761792063713074, -0.08029811084270477, -0.1817592829465866, 0.5725454092025757, 0.3563655614852905, 0.7446385025978088, 0.5692523717880249, -0.7074341177940369, 0.41009655594825745, 0.7549158930778503, -0.28663042187690735, -0.07006417959928513, -0.995720624923706, -0.0594196543097496, 0.3945828378200531, 0.052279677242040634, -0.9004794955253601, -0.09573002904653549, 0.6310908198356628, -0.7481895089149475, 0.6750330328941345, 0.025931602343916893, -1.0474750995635986, -0.5558446645736694, -0.5615795850753784, 0.40377265214920044, 0.672283947467804, -0.7091086506843567, 0.4536516070365906, 0.2633436918258667, -0.23417437076568604, -0.4382987320423126, -0.8309640288352966, -0.04426072537899017, 0.1900607943534851, -0.6113929748535156, 0.6090274453163147, -0.2832092344760895, 0.2514799237251282, 0.027993207797408104, 0.12517103552818298, -0.4349919259548187, -0.11330356448888779, -0.16408248245716095, 0.42701783776283264, -0.19798338413238525, -0.041372716426849365, 0.2430211901664734, -0.3592716157436371, 0.11120199412107468, 0.05038962885737419, 0.6416073441505432, -0.05138528719544411, -0.3148263096809387, -0.6892829537391663, 0.29169946908950806, 0.19110369682312012, -0.1928161084651947, 0.40178945660591125, 1.1212271451950073, -0.29390808939933777, -0.20125488936901093, -0.3086085617542267, -0.2408566176891327, -0.5911685228347778, 0.5583016872406006, -0.471743106842041, -0.9272897243499756, 0.2927343547344208, -0.13877855241298676, 0.17485734820365906, 0.8239295482635498, 0.7035353183746338, -0.07794371992349625, 1.3980942964553833, 1.0274232625961304, -0.47506120800971985, 0.4679306447505951, -0.48482057452201843, 0.44226303696632385, -1.0139563083648682, 0.3019302785396576, -0.6828258633613586, 0.054902948439121246, -0.9274407029151917, -0.3104480803012848, 0.03962794691324234, 0.20555220544338226, -0.31326428055763245, 0.7262148261070251, -0.8050475120544434, -0.010067179799079895, 0.7531872987747192, -0.407135009765625, -0.021546214818954468, -0.17284569144248962, -0.2283950001001358, -0.13408340513706207, -0.7600182890892029, -0.7568503022193909, 0.7587834000587463, 0.6571909785270691, 0.7564815878868103, 0.04899924248456955, 0.5203169584274292, -0.002217363566160202, 0.5340108871459961, -0.884758710861206, 0.5979090332984924, -0.10415731370449066, -0.8000031113624573, -0.3197300136089325, -0.2950638234615326, -0.9074186086654663, 0.3137209117412567, -0.05524875968694687, -0.9957571625709534, 0.21699391305446625, 0.10359689593315125, -0.2736309766769409, 0.36751338839530945, -0.5277421474456787, 0.8496631383895874, -0.4223729372024536, 0.055219341069459915, -0.08167959749698639, -0.7103548049926758, 0.494662344455719, -0.07793514430522919, 0.012279538437724113, -0.08254805207252502, -0.025765249505639076, 0.8789723515510559, -0.27820175886154175, 0.8668947219848633, -0.06802773475646973, 0.015217198990285397, 0.3699682056903839, -0.22038845717906952, 0.36805832386016846, 0.3393006920814514, 0.15195640921592712, 0.6677417159080505, 0.34266403317451477, -0.3713768422603607, -0.2443777620792389, 0.5538545846939087, -0.9216936826705933, -0.453765332698822, -0.6349751353263855, -0.20093435049057007, 0.15891656279563904, 0.6034980416297913, 0.5516033172607422, -0.07678594440221786, 0.045289941132068634, 0.2668904662132263, 0.23614829778671265, -0.38868242502212524, 0.686859667301178, 0.6475470066070557, -0.08003833889961243, -0.4178107976913452, 1.0359793901443481, 0.1109519898891449, 0.09260378032922745, 0.6363821029663086, 0.05695689097046852, -0.15955448150634766, -0.46644970774650574, -0.41373786330223083, 0.5067731142044067, -0.3359595835208893, -0.07153206318616867, -0.3634149432182312, -0.521577000617981, -0.6249881982803345, 0.14281626045703888, -0.4663074314594269, -0.449280321598053, -0.35814380645751953, 0.10216031223535538, -0.39481547474861145, 0.1115475594997406, -0.3990049958229065, 0.538710355758667, -1.1543503999710083, 0.5624778270721436, 0.2413540929555893, 0.18774719536304474, 0.07817640155553818, -0.28985461592674255, -0.6763805150985718, 0.10139292478561401, -0.9421842098236084, -0.6473992466926575, 0.6184948086738586, 0.04082022234797478, 0.5770711898803711, 0.6941338181495667, 0.27667614817619324, 0.5669578909873962, -0.7016989588737488, 1.1821287870407104, 0.4319951832294464, -1.1864973306655884, 0.4386006295681, -0.1260390430688858, 0.3302055895328522, 0.3077452480792999, 0.4800598621368408, -0.8566545844078064, -0.34851765632629395, -0.5546218156814575, -1.1607873439788818, 0.7676212191581726, 0.4306739866733551, 0.27948302030563354, 0.041446492075920105, -0.08274621516466141, -0.08116579800844193, 0.19262056052684784, -1.063793659210205, -0.556448221206665, -0.3651446998119354, -0.35841104388237, 0.22212596237659454, -0.45360419154167175, -0.009858929552137852, -0.2803482413291931, 1.1447752714157104, -0.05372645705938339, 0.8629456162452698, 0.38750767707824707, 0.036511100828647614, -0.19183675944805145, 0.1087392196059227, 0.47229138016700745, 0.5042544007301331, -0.20576249063014984, -0.25083962082862854, 0.10020311176776886, -0.6056435108184814, -0.23564523458480835, 0.3731517493724823, -0.4851093590259552, 0.43424808979034424, 0.5802996754646301, 0.6409950852394104, 0.12031220644712448, -0.45246386528015137, 0.6290842890739441, -0.3098823130130768, -0.17702212929725647, -1.0200475454330444, -0.054441001266241074, 0.013873846270143986, 0.09186772257089615, 0.5887972116470337, -0.08605504781007767, 0.15111508965492249, -0.16247811913490295, 0.14430513978004456, 0.42291831970214844, -0.5456226468086243, -0.5498663783073425, 0.7931862473487854, 0.457809716463089, -0.3828074336051941, 0.8222535848617554, -0.1740984320640564, -0.8536201119422913, 0.6510310769081116, 0.4373563826084137, 0.991234540939331, -0.2572598457336426, 0.06334429979324341, 0.668888509273529, 0.6155967116355896, 0.015712318941950798, 0.1621096134185791, -0.3125925660133362, -0.9279378652572632, -0.4925249218940735, -0.43445852398872375, -0.5004668235778809, 0.35071101784706116, -0.5147647261619568, 0.655522346496582, -0.46210625767707825, -0.07696408033370972, 0.004028117749840021, 0.002508457051590085, -0.6087409853935242, 0.06425643712282181, 0.11906406283378601, 1.1873819828033447, -0.7043940424919128, 1.2343885898590088, 0.6001970171928406, -0.5745234489440918, -0.9194944500923157, 0.19396501779556274, -0.3012344539165497, -0.749994158744812, 1.0176514387130737, 0.3500915467739105, 0.34606173634529114, 0.07410323619842529, -0.7645602822303772, -0.8049314618110657, 1.0910643339157104, -0.19583258032798767, -0.42146655917167664, -0.0848618745803833, 0.3651532232761383, 0.4479599893093109, -0.04125387221574783, 0.5063676238059998, 0.14715400338172913, 0.658453106880188, -0.2366296350955963, -1.2035504579544067, -0.25908467173576355, -0.26023903489112854, 0.13814708590507507, 0.2296469509601593, -1.018690586090088, 0.7933518886566162, 0.016263248398900032, -0.3692187964916229, 0.5151088833808899, 1.030266523361206, -0.03432292491197586, 0.25319138169288635, 0.582802951335907, 0.44141486287117004, -0.007176018785685301, -0.2335275560617447, 0.6003732681274414, -0.5531880855560303, 0.8824484348297119, 0.883874773979187, 0.030518027022480965, 0.7783396244049072, 0.45938146114349365, -0.5424675345420837, 0.5128567814826965, 0.7497219443321228, -0.557253360748291, 0.6661683917045593, -0.046575963497161865, -0.1191473975777626, -0.07965173572301865, 0.06587733328342438, -0.5300930738449097, 0.24170316755771637, 0.3513718545436859, -0.28565117716789246, -0.04788839444518089, -0.1049729734659195, -0.04294721782207489, -0.42723745107650757, -0.14306403696537018, 0.540016770362854, 0.268960177898407, -0.17297473549842834, 0.49645012617111206, 0.3880420923233032, 1.0750375986099243, -1.0916417837142944, -0.3122202754020691, 0.2507276237010956, 0.20625247061252594, -0.1141192838549614, -0.6189765334129333, 0.20884884893894196, -0.32959407567977905, -0.17135080695152283, -0.14589549601078033, 0.798602283000946, -0.3461097478866577, -0.5927513241767883, 0.3524686098098755, 0.09456494450569153, 0.11552216112613678, 0.35942399501800537, -1.1816508769989014, -0.3164755702018738, 0.36593103408813477, -0.4923129081726074, 0.21531632542610168, 0.24995741248130798, 0.11949672549962997, 0.7199313044548035, 0.8680835962295532, 0.1922599822282791, -0.1989343762397766, -0.11245545744895935, 0.8724267482757568, -0.5834157466888428, -0.612355649471283, -0.7500194907188416, 0.7657034397125244, -0.283605694770813, -0.338893860578537, 0.8247032761573792, 0.7609178423881531, 1.263289213180542, -0.3526674211025238, 0.9617790579795837, -0.45246726274490356, 0.8049333095550537, -0.15485644340515137, 0.8750548958778381, -0.5716331601142883, -0.05793605372309685, -0.2981560230255127, -0.8289885520935059, -0.25019723176956177, 0.8642070889472961, -0.19179897010326385, -0.14872635900974274, 0.7764678001403809, 0.7014194130897522, -0.03442113474011421, -0.17991334199905396, 0.1979207843542099, 0.25489410758018494, 0.6728584170341492, 0.43752577900886536, 0.6182549595832825, -0.5888784527778625, 0.7558722496032715, -0.7705152630805969, -0.19177356362342834, -0.16488882899284363, -0.6625991463661194, -0.7014358043670654, -0.5601341128349304, -0.3323962688446045, -0.07622809708118439, -0.41624706983566284, 0.9082884788513184, 0.7605890035629272, -1.0807212591171265, -0.39494502544403076, 0.09232498705387115, 0.18089263141155243, -0.37874719500541687, -0.36323490738868713, 0.6522175669670105, -0.3241170048713684, -1.213028073310852, 0.04652973636984825, 0.14948758482933044, 0.11210846155881882, -0.29872769117355347, 0.007251400034874678, -0.18142367899417877, -0.20494915544986725, 0.42026838660240173, 0.536922037601471, -0.6733636856079102, -0.4406543970108032, -0.14174525439739227, -0.244729682803154, 0.08469690382480621, 0.6437371969223022, -0.20279262959957123, 0.3399260640144348, 0.6068251132965088, 0.2591507136821747, 0.3262281119823456, -0.2766786515712738, 0.5657079219818115, -0.5652443766593933, 0.39942577481269836, 0.39166340231895447, 0.5833162069320679, 0.33905017375946045, -0.18580865859985352, 0.531818151473999, 0.5035399794578552, -0.7509976029396057, -0.7023453116416931, 0.3549172878265381, -1.0266749858856201, -0.19840697944164276, 0.9654716849327087, -0.1729217916727066, -0.22323888540267944, -0.0328204408288002, -0.5826174020767212, 0.5949912071228027, -0.32838746905326843, 0.6394112706184387, 0.777869462966919, -0.09213517606258392, -0.0703565925359726, -0.60660719871521, 0.41862159967422485, 0.4286305606365204, -0.3310471773147583, -0.3609675168991089, -0.0412612222135067, 0.14725267887115479, 0.6807523369789124, 0.4723789393901825, -0.04139076918363571, 0.07602428644895554, -0.07366020977497101, 0.5532943606376648, 0.03382636606693268, 0.18910731375217438, 0.03436195105314255, -0.18357612192630768, 0.11275213956832886, -0.4818330705165863 ]
TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ
TheBloke
"2023-09-27T13:00:46Z"
27,253
22
transformers
[ "transformers", "safetensors", "llama", "text-generation", "dataset:shahules786/orca-chat", "dataset:rombodawg/MegaCodeTraining112k", "dataset:theblackcat102/evol-codealpaca-v1", "dataset:nickrosh/Evol-Instruct-Code-80k-v1", "base_model:OpenAssistant/llama2-13b-orca-v2-8k-3166", "license:other", "text-generation-inference", "4-bit", "region:us" ]
text-generation
"2023-08-02T11:32:29Z"
--- license: other datasets: - shahules786/orca-chat - rombodawg/MegaCodeTraining112k - theblackcat102/evol-codealpaca-v1 - nickrosh/Evol-Instruct-Code-80k-v1 model_name: Llama2 13B Orca v2 8K inference: false model_creator: OpenAssistant model_link: https://huggingface.co/OpenAssistant/llama2-13b-orca-v2-8k-3166 model_type: llama quantized_by: TheBloke base_model: OpenAssistant/llama2-13b-orca-v2-8k-3166 --- <!-- 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 --> # Llama2 13B Orca v2 8K - GPTQ - Model creator: [OpenAssistant](https://huggingface.co/OpenAssistant) - Original model: [Llama2 13B Orca v2 8K](https://huggingface.co/OpenAssistant/llama2-13b-orca-v2-8k-3166) ## Description This repo contains GPTQ model files for [OpenAssistant's Llama2 13B Orca v2 8K](https://huggingface.co/OpenAssistant/llama2-13b-orca-v2-8k-3166). Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them. ## Repositories available * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ) * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GGML) * [OpenAssistant's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/OpenAssistant/llama2-13b-orca-v2-8k-3166) ## Prompt template: OpenAssistant ``` <|prompter|>{prompt}<|endoftext|><|assistant|> ``` ## Provided files and GPTQ parameters Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements. Each separate quant is in a different branch. See below for instructions on fetching from different branches. All GPTQ files are made with AutoGPTQ. <details> <summary>Explanation of GPTQ parameters</summary> - Bits: The bit size of the quantised model. - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value. - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size. - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy. - GPTQ dataset: The dataset used for quantisation. The dataset used for quantisation can affect the quantisation accuracy. The dataset used for quantisation is not the same as the dataset used to train the model. - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only affects the quantisation accuracy on longer inference sequences. - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit. </details> | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc | | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- | | [main](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. | | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. | | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. | | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. | | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. | | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. | ## How to download from branches - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ:gptq-4bit-32g-actorder_True` - With Git, you can clone a branch with: ``` git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ ``` - In Python Transformers code, the branch is the `revision` parameter; see below. ## 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 know how to make a manual install. 1. Click the **Model tab**. 2. Under **Download custom model or LoRA**, enter `TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ`. - To download from a specific branch, enter for example `TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ:gptq-4bit-32g-actorder_True` - see Provided Files above for the list of branches for each option. 3. Click **Download**. 4. The model will start downloading. Once it's finished it will say "Done" 5. In the top left, click the refresh icon next to **Model**. 6. In the **Model** dropdown, choose the model you just downloaded: `OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ` 7. The model will automatically load, and is now ready for use! 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right. * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`. 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started! ## How to use this GPTQ model from Python code First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed: ``` pip3 install auto-gptq ``` If you have problems installing AutoGPTQ, please build from source instead: ``` pip3 uninstall -y auto-gptq git clone https://github.com/PanQiWei/AutoGPTQ cd AutoGPTQ pip3 install . ``` Then try the following example code: ```python from transformers import AutoTokenizer, pipeline, logging from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig model_name_or_path = "TheBloke/OpenAssistant-Llama2-13B-Orca-v2-8K-3166-GPTQ" use_triton = False tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) model = AutoGPTQForCausalLM.from_quantized(model_name_or_path, use_safetensors=True, trust_remote_code=False, device="cuda:0", use_triton=use_triton, quantize_config=None) """ # To download from a specific branch, use the revision parameter, as in this example: # Note that `revision` requires AutoGPTQ 0.3.1 or later! model = AutoGPTQForCausalLM.from_quantized(model_name_or_path, revision="gptq-4bit-32g-actorder_True", use_safetensors=True, trust_remote_code=False, device="cuda:0", quantize_config=None) """ prompt = "Tell me about AI" prompt_template=f'''<|prompter|>{prompt}<|endoftext|><|assistant|> ''' print("\n\n*** Generate:") input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda() output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512) print(tokenizer.decode(output[0])) # Inference can also be done using transformers' pipeline # Prevent printing spurious transformers error when using pipeline with AutoGPTQ logging.set_verbosity(logging.CRITICAL) print("*** Pipeline:") pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=512, temperature=0.7, top_p=0.95, repetition_penalty=1.15 ) print(pipe(prompt_template)[0]['generated_text']) ``` ## Compatibility The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork. ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility. <!-- 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! 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**: Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper Wikieł, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter Thank you to all my generous patrons and donaters! And thank you again to a16z for their generous grant. <!-- footer end --> # Original model card: OpenAssistant's Llama2 13B Orca v2 8K - wandb: [jlhr5cf2](https://wandb.ai/open-assistant/supervised-finetuning/runs/jlhr5cf2) - sampling-report: [2023-07-31_OpenAssistant_llama2-13b-orca-v2-8k-3166_sampling_llama2_prompt.json](https://open-assistant.github.io/oasst-model-eval/?f=https%3A%2F%2Fraw.githubusercontent.com%2FOpen-Assistant%2Foasst-model-eval%2Fmain%2Fsampling_reports%2Foasst-pretrained%2F2023-07-31_OpenAssistant_llama2-13b-orca-v2-8k-3166_sampling_llama2_prompt.json) ## Model Configuration ``` llama2-13b-orca-v2-8k: rng_seed: 0xe1291f21 show_dataset_stats: true random_offset_probability: 0.0 use_custom_sampler: true sort_by_length: false dtype: fp16 log_dir: /mnt/data/ikka/data_cache/llama2_13b_orcav2_logs output_dir: /mnt/data/ikka/data_cache/llama2_13b_orcav2 learning_rate: 1e-5 model_name: conceptofmind/LLongMA-2-13b deepspeed_config: configs/zero_config_pretrain.json weight_decay: 0.000001 max_length: 8192 warmup_steps: 100 peft_model: false use_flash_attention: true gradient_checkpointing: true gradient_accumulation_steps: 4 per_device_train_batch_size: 2 per_device_eval_batch_size: 1 residual_dropout: 0.0 eval_steps: 200 save_steps: 200 num_train_epochs: 1 save_total_limit: 4 superhot: false superhot_config: type: linear scaling_factor: 2 datasets: - orca-chat: # shahules786/orca-chat data_files: orca-chat-gpt4-8k.json max_val_set: 5000 val_split: 0.1 - evol-codealpaca-v1: # theblackcat102/evol-codealpaca-v1 fill_min_length: 20000 val_split: 0.1 - megacode: # rombodawg/MegaCodeTraining112k fill_min_length: 24000 val_split: 0.1 max_val_set: 1000 - evol_instruct_code: # nickrosh/Evol-Instruct-Code-80k-v1 fill_min_length: 24000 val_split: 0.1 max_val_set: 1000 ```
[ -0.4676085114479065, -0.8994664549827576, 0.13260243833065033, 0.08947103470563889, -0.28410598635673523, -0.15816305577754974, 0.15899893641471863, -0.5841556191444397, 0.29785382747650146, 0.3653228282928467, -0.5310996770858765, -0.6096039414405823, -0.3266527056694031, -0.09245820343494415, -0.2547668218612671, 0.9658751487731934, 0.08057542145252228, -0.2051904797554016, 0.09100279211997986, -0.28404584527015686, -0.23053978383541107, -0.36852794885635376, -0.9233160018920898, -0.14950989186763763, 0.34129205346107483, 0.1340257078409195, 0.7973989844322205, 0.6182897686958313, 0.18692025542259216, 0.3047146201133728, -0.14482279121875763, -0.02101239562034607, -0.5354825258255005, -0.0621957927942276, 0.08778516948223114, -0.22795768082141876, -0.76494961977005, 0.04497966915369034, 0.43274742364883423, 0.1416679173707962, -0.39306044578552246, 0.2720957398414612, 0.030742330476641655, 0.5931580066680908, -0.4748534858226776, 0.29552486538887024, -0.2623060941696167, -0.015364130958914757, -0.30304038524627686, 0.18668495118618011, 0.0008861655369400978, -0.5964356660842896, 0.08626284450292587, -0.8288707733154297, 0.06422222405672073, 0.07730431109666824, 1.144709825515747, 0.1759267896413803, -0.4621714651584625, -0.014413630589842796, -0.28969189524650574, 0.5578957796096802, -1.0009281635284424, 0.2218979150056839, 0.27021661400794983, 0.15386264026165009, -0.295152485370636, -0.8456080555915833, -0.5361264944076538, -0.047756969928741455, -0.07434049993753433, 0.30022725462913513, -0.34006059169769287, 0.05578668415546417, 0.4757111668586731, 0.7316127419471741, -0.8394961357116699, -0.12429166585206985, -0.3321918547153473, -0.08067428320646286, 0.8443438410758972, 0.24317795038223267, 0.41654646396636963, -0.26102226972579956, -0.2992517352104187, -0.4658192992210388, -0.7591922879219055, 0.22287029027938843, 0.4765971004962921, 0.06412634253501892, -0.6341801285743713, 0.45742011070251465, -0.2891339659690857, 0.4857931435108185, 0.15551000833511353, -0.09818734973669052, 0.30638521909713745, -0.5478502511978149, -0.5028649568557739, -0.2739168107509613, 1.1952917575836182, 0.15812982618808746, -0.31224942207336426, 0.3473568260669708, -0.008717494085431099, -0.1272556483745575, -0.030441807582974434, -1.0106152296066284, -0.4612852931022644, 0.5968130230903625, -0.5420345067977905, -0.19104404747486115, -0.026229066774249077, -0.8702989816665649, -0.09214114397764206, -0.00887349620461464, 0.3793902099132538, -0.5942385792732239, -0.36221471428871155, 0.2017853558063507, -0.16877178847789764, 0.5692195892333984, 0.34178635478019714, -0.7638584971427917, 0.47779667377471924, 0.26808711886405945, 0.7284002304077148, 0.13951143622398376, -0.07137152552604675, -0.33683452010154724, -0.07368713617324829, -0.07995054870843887, 0.5201407670974731, -0.13050100207328796, -0.447243869304657, -0.30198216438293457, 0.2607426047325134, -0.12905900180339813, -0.20352664589881897, 0.6642261743545532, -0.30634623765945435, 0.28035712242126465, -0.5526310205459595, -0.32423874735832214, -0.4413317143917084, -0.04711608588695526, -0.6517069935798645, 1.2166873216629028, 0.48588669300079346, -0.849621057510376, 0.16917136311531067, -0.7483855485916138, -0.14509248733520508, 0.024937832728028297, -0.03211922571063042, -0.6052794456481934, -0.2032260149717331, 0.2168387770652771, 0.21798767149448395, -0.3054584562778473, 0.05999709293246269, -0.3707490861415863, -0.1224122941493988, 0.021557610481977463, -0.2555994689464569, 1.4821697473526, 0.33991125226020813, -0.3947444558143616, 0.04362030327320099, -0.5985093712806702, 0.09571963548660278, 0.556540310382843, -0.18827573955059052, -0.04205336794257164, -0.2941412925720215, 0.062331411987543106, 0.043900590389966965, 0.2673981189727783, -0.5170106887817383, 0.5065709948539734, -0.25717607140541077, 0.8469539880752563, 0.5917249321937561, -0.031330060213804245, 0.23255090415477753, -0.35992661118507385, 0.5652074813842773, -0.0018528385553508997, 0.5680001974105835, 0.12277846783399582, -0.7533099055290222, -0.6031450629234314, -0.2691566050052643, 0.47362929582595825, 0.47234541177749634, -0.6292613744735718, 0.40862515568733215, -0.06902110576629639, -0.7406079173088074, -0.4555947184562683, -0.1648063063621521, 0.3435259759426117, 0.41387948393821716, 0.3817758560180664, -0.6248593330383301, -0.36276358366012573, -0.670276939868927, 0.18704386055469513, -0.3840045928955078, 0.06805896013975143, 0.5629932284355164, 0.84173983335495, -0.07894599437713623, 0.7334268689155579, -0.7018212676048279, -0.2355734407901764, 0.008980398997664452, 0.043231673538684845, 0.27980855107307434, 0.6065916419029236, 0.8036072254180908, -0.6973913908004761, -0.5150700211524963, -0.11090707778930664, -0.7391627430915833, -0.055456433445215225, 0.04921973496675491, -0.47366392612457275, 0.2865167558193207, 0.11938399076461792, -1.0742827653884888, 0.690432608127594, 0.48421457409858704, -0.5626912713050842, 0.7643516063690186, -0.30121058225631714, 0.07205627858638763, -0.9716962575912476, 0.21069848537445068, 0.09095921367406845, -0.2859800457954407, -0.40820908546447754, 0.3849150836467743, -0.040601085871458054, 0.10900473594665527, -0.45696157217025757, 0.618945837020874, -0.5302203893661499, 0.022536952048540115, 0.22213369607925415, 0.0006984468782320619, 0.22888626158237457, 0.5186009407043457, -0.1550002545118332, 0.7768853306770325, 0.5185927748680115, -0.3893662691116333, 0.5604011416435242, 0.5860717296600342, -0.10830238461494446, 0.30581995844841003, -0.84869784116745, 0.24949270486831665, 0.066128671169281, 0.4651370942592621, -0.9690539836883545, -0.3399897813796997, 0.6662000417709351, -0.4744902551174164, 0.44541865587234497, -0.288291335105896, -0.3044523000717163, -0.4160705804824829, -0.6116243004798889, 0.45452606678009033, 0.612388014793396, -0.4337349832057953, 0.5947546362876892, 0.49703675508499146, -0.06547416001558304, -0.4785531759262085, -0.6364877223968506, -0.1796644628047943, -0.2755301296710968, -0.7086718678474426, 0.5091447234153748, -0.09566142410039902, -0.05384799465537071, 0.03656706586480141, 0.03301046043634415, 0.07766811549663544, -0.1175537034869194, 0.36095890402793884, 0.34174177050590515, -0.24682164192199707, -0.305049866437912, 0.18390674889087677, 0.053804971277713776, 0.037613000720739365, -0.28939422965049744, 0.5032116770744324, -0.2871916592121124, -0.08123637735843658, -0.2603563964366913, 0.18638969957828522, 0.45823419094085693, -0.13294661045074463, 0.7529208660125732, 0.6711770296096802, -0.27306896448135376, 0.09193629026412964, -0.37780991196632385, -0.0543769933283329, -0.46097975969314575, 0.024059202522039413, -0.2269774079322815, -0.6010382771492004, 0.6289530992507935, 0.43201977014541626, 0.2099982500076294, 0.7667478322982788, 0.4822310507297516, 0.09164459258317947, 0.8088090419769287, 0.404514342546463, -0.16956596076488495, 0.44433364272117615, -0.6880555152893066, -0.11382471770048141, -0.8981636762619019, -0.3488484025001526, -0.4773649275302887, -0.18532007932662964, -0.7029966115951538, -0.30186575651168823, 0.3805365264415741, 0.17126180231571198, -0.7637375593185425, 0.7131130695343018, -0.7002488374710083, 0.09379830211400986, 0.6585441827774048, 0.36564895510673523, 0.22906915843486786, -0.039403799921274185, -0.09504197537899017, 0.21641215682029724, -0.6042866706848145, -0.3161151111125946, 1.091897964477539, 0.38308510184288025, 0.698194146156311, 0.27885961532592773, 0.45106634497642517, 0.13040375709533691, 0.17961297929286957, -0.4739200472831726, 0.5208425521850586, 0.033971045166254044, -0.6039373278617859, -0.3636971414089203, -0.5705311298370361, -1.0044903755187988, 0.09802486002445221, -0.059889547526836395, -0.7981429100036621, 0.5085731744766235, 0.04050368815660477, -0.5973230004310608, 0.29349008202552795, -0.6947754621505737, 1.049808144569397, -0.09476850181818008, -0.32148197293281555, 0.15126711130142212, -0.7447936534881592, 0.4389667212963104, 0.190068319439888, -0.09200935065746307, -0.10253431648015976, -0.14704397320747375, 0.7488014698028564, -0.9194093942642212, 0.6657786965370178, -0.2061854749917984, -0.06893470883369446, 0.600278377532959, -0.075503408908844, 0.5695198178291321, 0.20263639092445374, -0.029886441305279732, 0.4738616943359375, 0.3514859676361084, -0.4409894347190857, -0.28881511092185974, 0.5607778429985046, -0.9232271313667297, -0.4242858588695526, -0.4867517054080963, -0.38118332624435425, 0.1870088279247284, 0.04834885895252228, 0.5063136219978333, 0.38039302825927734, -0.05405823513865471, -0.07028727978467941, 0.7065438032150269, -0.4377741515636444, 0.4194848835468292, 0.27851244807243347, -0.2864408791065216, -0.5822030305862427, 0.8202741742134094, 0.12692677974700928, 0.2020699381828308, 0.165514275431633, 0.03949926048517227, -0.5002715587615967, -0.5419678688049316, -0.7018998861312866, 0.3724396824836731, -0.4098540246486664, -0.4341832101345062, -0.6772342324256897, -0.4205392301082611, -0.47942349314689636, 0.3425944447517395, -0.3108976185321808, -0.5571150779724121, -0.5087162256240845, 0.049570564180612564, 0.836724042892456, 0.46430453658103943, -0.17511019110679626, 0.28605911135673523, -0.622447669506073, 0.3080970048904419, 0.3289359509944916, 0.16809819638729095, 0.0684400126338005, -0.7303093075752258, -0.009617830626666546, 0.19722256064414978, -0.7444221377372742, -0.919699490070343, 0.7756494283676147, 0.13590680062770844, 0.33053058385849, 0.39328911900520325, 0.19596539437770844, 0.7848259210586548, -0.11806754767894745, 0.9397653341293335, 0.038806308060884476, -0.9539805054664612, 0.4841614067554474, -0.5578380823135376, 0.1902601569890976, 0.3756024241447449, 0.5088973045349121, -0.1987036168575287, -0.23613335192203522, -0.74212646484375, -0.8175941109657288, 0.5976067185401917, 0.4601714015007019, -0.1052762046456337, 0.17778365314006805, 0.5460654497146606, 0.05777934938669205, 0.14166103303432465, -0.7948792576789856, -0.6022127270698547, -0.41640642285346985, -0.032976407557725906, 0.22873713076114655, -0.06144509091973305, -0.15949518978595734, -0.5117917060852051, 0.9580404162406921, -0.09925976395606995, 0.7194239497184753, 0.36003509163856506, 0.15280628204345703, -0.14317932724952698, 0.06736904382705688, 0.4149158298969269, 0.5073476433753967, -0.37053388357162476, -0.32744795083999634, 0.1108611449599266, -0.8511375188827515, -0.016118768602609634, 0.42717406153678894, -0.2649972140789032, -0.21697385609149933, -0.014130598865449429, 0.6560643911361694, -0.2601316273212433, -0.32929423451423645, 0.3696444630622864, -0.2600202262401581, -0.32363638281822205, -0.29286661744117737, 0.16686393320560455, 0.2109544277191162, 0.3880934715270996, 0.2713642716407776, -0.1805715560913086, 0.31967663764953613, -0.6415817737579346, -0.062017232179641724, 0.5252808332443237, -0.12625017762184143, -0.33131304383277893, 0.9210106730461121, -0.058109939098358154, 0.08334006369113922, 0.7285527586936951, -0.3484019339084625, -0.37766629457473755, 0.8352876901626587, 0.3149626553058624, 0.7881317138671875, -0.2530004382133484, 0.20809802412986755, 0.5856279730796814, 0.15957632660865784, -0.08027812838554382, 0.5455196499824524, 0.13279476761817932, -0.5224481225013733, -0.28686222434043884, -0.6073676943778992, -0.35268014669418335, 0.35974687337875366, -0.7430434226989746, 0.21290171146392822, -0.5267302989959717, -0.37189874053001404, -0.07017407566308975, 0.33703622221946716, -0.49931657314300537, 0.15162111818790436, -0.005371526814997196, 1.0174016952514648, -0.6799198985099792, 0.829646110534668, 0.5049776434898376, -0.5722835063934326, -1.0079981088638306, -0.3231462836265564, 0.07039831578731537, -0.6044793725013733, 0.24997161328792572, -0.1061108186841011, 0.31306642293930054, 0.04665060341358185, -0.7645847201347351, -0.8507091999053955, 1.422914743423462, 0.4070281982421875, -0.4757354259490967, -0.15779386460781097, -0.012288667261600494, 0.33055803179740906, -0.2556575536727905, 0.7628671526908875, 0.6351382732391357, 0.35886791348457336, 0.19691021740436554, -0.9052092432975769, 0.5302625298500061, -0.3127024471759796, 0.009539119899272919, 0.22352266311645508, -1.1105761528015137, 1.122083306312561, -0.08296459168195724, -0.1440865397453308, 0.39332571625709534, 0.619005560874939, 0.3697502613067627, 0.032371584326028824, 0.26773491501808167, 0.8596831560134888, 0.7099654674530029, -0.36395180225372314, 1.073433756828308, -0.1909959763288498, 0.6230645179748535, 0.7738925218582153, -0.0030168015509843826, 0.7351916432380676, 0.11435461789369583, -0.6191295981407166, 0.6011359095573425, 1.009672999382019, -0.14282050728797913, 0.38044679164886475, 0.03883941471576691, -0.30559542775154114, 0.0051382784731686115, 0.02200213633477688, -0.7427077293395996, 0.12716616690158844, 0.38168713450431824, -0.30555322766304016, -0.0722007229924202, -0.26991817355155945, -0.005539262667298317, -0.6108898520469666, -0.2244434505701065, 0.4867918789386749, 0.3392030596733093, -0.22563225030899048, 0.8650892376899719, -0.006940366234630346, 0.5165565609931946, -0.5319316983222961, -0.17487648129463196, -0.406581848859787, -0.13333825767040253, -0.3963061571121216, -0.6886295080184937, 0.1864805817604065, -0.24400976300239563, 0.008825192227959633, -0.02851509116590023, 0.6408848166465759, -0.1901973932981491, -0.21397429704666138, 0.2619638741016388, 0.40686044096946716, 0.39198029041290283, -0.18341906368732452, -1.1090087890625, 0.2590351104736328, 0.05973134934902191, -0.6088711023330688, 0.48754650354385376, 0.3855521082878113, 0.11019513756036758, 0.6895819902420044, 0.5988713502883911, -0.01680600456893444, -0.0061202081851661205, -0.25576430559158325, 1.015203833580017, -0.7297276854515076, -0.2006760537624359, -0.7775998115539551, 0.4979359805583954, -0.07132803648710251, -0.44564348459243774, 0.7695460915565491, 0.6263105869293213, 0.7586334943771362, -0.008766821585595608, 0.6009003520011902, -0.5447542071342468, 0.18009556829929352, -0.39319321513175964, 0.827795147895813, -0.6404374241828918, 0.20380344986915588, -0.3538370728492737, -0.8070881366729736, 0.02940654754638672, 0.6586641669273376, -0.23290368914604187, 0.2854665219783783, 0.5094033479690552, 0.8972777724266052, -0.06453388929367065, 0.20639480650424957, 0.10588392615318298, 0.483542799949646, 0.13825459778308868, 0.9203917384147644, 0.5688511729240417, -0.997938334941864, 0.5642441511154175, -0.2850971817970276, -0.2391815185546875, -0.05869269371032715, -0.8750625252723694, -0.7629662752151489, -0.3463928699493408, -0.5715511441230774, -0.7279196381568909, 0.028443755581974983, 0.8543199300765991, 0.7650123834609985, -0.6999624371528625, -0.31623297929763794, -0.17308463156223297, 0.06965149194002151, -0.23984162509441376, -0.2927839756011963, 0.48284849524497986, 0.3092121481895447, -0.7439553737640381, 0.07678944617509842, 0.05996566638350487, 0.2952879071235657, -0.17806275188922882, -0.19709156453609467, -0.21516482532024384, 0.005592235364019871, 0.5123703479766846, 0.788077712059021, -0.5393432378768921, -0.02704494446516037, -0.18624719977378845, -0.1226547360420227, 0.34476494789123535, 0.21481893956661224, -0.7463498711585999, -0.01622524857521057, 0.5112826228141785, 0.08561748266220093, 0.783257007598877, 0.1204039603471756, 0.32355955243110657, -0.19930025935173035, 0.03366812318563461, 0.05036225914955139, 0.41364777088165283, 0.010555563494563103, -0.535178542137146, 0.7283565402030945, 0.3162386417388916, -0.6728720664978027, -0.6709831357002258, -0.168512225151062, -1.2520166635513306, -0.13707609474658966, 1.0369031429290771, -0.31358954310417175, -0.48472321033477783, -0.07881742715835571, -0.35732659697532654, 0.25880518555641174, -0.7517150044441223, 0.43810221552848816, 0.3141591548919678, -0.21184293925762177, -0.24583880603313446, -0.744956910610199, 0.550166666507721, 0.15817533433437347, -0.9598308801651001, -0.05966804549098015, 0.3857296407222748, 0.370089590549469, 0.08120453357696533, 0.7558547258377075, -0.3113403022289276, 0.32525140047073364, 0.13248777389526367, 0.10034500807523727, -0.13240496814250946, 0.13868755102157593, -0.3736990988254547, 0.028279585763812065, -0.27702075242996216, -0.04824022203683853 ]
cmarkea/distilcamembert-base-sentiment
cmarkea
"2023-08-01T10:04:44Z"
27,237
30
transformers
[ "transformers", "pytorch", "tf", "onnx", "safetensors", "camembert", "text-classification", "fr", "dataset:amazon_reviews_multi", "dataset:allocine", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-03-02T23:29:05Z"
--- language: fr license: mit datasets: - amazon_reviews_multi - allocine widget: - text: "Je pensais lire un livre nul, mais finalement je l'ai trouvé super !" - text: "Cette banque est très bien, mais elle n'offre pas les services de paiements sans contact." - text: "Cette banque est très bien et elle offre en plus les services de paiements sans contact." --- DistilCamemBERT-Sentiment ========================= We present DistilCamemBERT-Sentiment, which is [DistilCamemBERT](https://huggingface.co/cmarkea/distilcamembert-base) fine-tuned for the sentiment analysis task for the French language. This model is built using two datasets: [Amazon Reviews](https://huggingface.co/datasets/amazon_reviews_multi) and [Allociné.fr](https://huggingface.co/datasets/allocine) to minimize the bias. Indeed, Amazon reviews are similar in messages and relatively shorts, contrary to Allociné critics, who are long and rich texts. This modelization is close to [tblard/tf-allocine](https://huggingface.co/tblard/tf-allocine) based on [CamemBERT](https://huggingface.co/camembert-base) model. The problem of the modelizations based on CamemBERT is at the scaling moment, for the production phase, for example. Indeed, inference cost can be a technological issue. To counteract this effect, we propose this modelization which **divides the inference time by two** with the same consumption power thanks to [DistilCamemBERT](https://huggingface.co/cmarkea/distilcamembert-base). Dataset ------- The dataset comprises 204,993 reviews for training and 4,999 reviews for the test from Amazon, and 235,516 and 4,729 critics from [Allocine website](https://www.allocine.fr/). The dataset is labeled into five categories: * 1 star: represents a terrible appreciation, * 2 stars: bad appreciation, * 3 stars: neutral appreciation, * 4 stars: good appreciation, * 5 stars: excellent appreciation. Evaluation results ------------------ In addition of accuracy (called here *exact accuracy*) in order to be robust to +/-1 star estimation errors, we will take the following definition as a performance measure: $$\mathrm{top\!-\!2\; acc}=\frac{1}{|\mathcal{O}|}\sum_{i\in\mathcal{O}}\sum_{0\leq l < 2}\mathbb{1}(\hat{f}_{i,l}=y_i)$$ where \\(\hat{f}_l\\) is the l-th largest predicted label, \\(y\\) the true label, \\(\mathcal{O}\\) is the test set of the observations and \\(\mathbb{1}\\) is the indicator function. | **class** | **exact accuracy (%)** | **top-2 acc (%)** | **support** | | :---------: | :--------------------: | :---------------: | :---------: | | **global** | 61.01 | 88.80 | 9,698 | | **1 star** | 87.21 | 77.17 | 1,905 | | **2 stars** | 79.19 | 84.75 | 1,935 | | **3 stars** | 77.85 | 78.98 | 1,974 | | **4 stars** | 78.61 | 90.22 | 1,952 | | **5 stars** | 85.96 | 82.92 | 1,932 | Benchmark --------- This model is compared to 3 reference models (see below). As each model doesn't have the exact definition of targets, we detail the performance measure used for each. An **AMD Ryzen 5 4500U @ 2.3GHz with 6 cores** was used for the mean inference time measure. #### bert-base-multilingual-uncased-sentiment [nlptown/bert-base-multilingual-uncased-sentiment](https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment) is based on BERT model in the multilingual and uncased version. This sentiment analyzer is trained on Amazon reviews, similar to our model. Hence the targets and their definitions are the same. | **model** | **time (ms)** | **exact accuracy (%)** | **top-2 acc (%)** | | :-------: | :-----------: | :--------------------: | :---------------: | | [cmarkea/distilcamembert-base-sentiment](https://huggingface.co/cmarkea/distilcamembert-base-sentiment) | **95.56** | **61.01** | **88.80** | | [nlptown/bert-base-multilingual-uncased-sentiment](https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment) | 187.70 | 54.41 | 82.82 | #### tf-allociné and barthez-sentiment-classification [tblard/tf-allocine](https://huggingface.co/tblard/tf-allocine) based on [CamemBERT](https://huggingface.co/camembert-base) model and [moussaKam/barthez-sentiment-classification](https://huggingface.co/moussaKam/barthez-sentiment-classification) based on [BARThez](https://huggingface.co/moussaKam/barthez) use the same bi-class definition between them. To bring this back to a two-class problem, we will only consider the *"1 star"* and *"2 stars"* labels for the *negative* sentiments and *"4 stars"* and *"5 stars"* for *positive* sentiments. We exclude the *"3 stars"* which can be interpreted as a *neutral* class. In this context, the problem of +/-1 star estimation errors disappears. Then we use only the classical accuracy definition. | **model** | **time (ms)** | **exact accuracy (%)** | | :-------: | :-----------: | :--------------------: | | [cmarkea/distilcamembert-base-sentiment](https://huggingface.co/cmarkea/distilcamembert-base-sentiment) | **95.56** | **97.52** | | [tblard/tf-allocine](https://huggingface.co/tblard/tf-allocine) | 329.74 | 95.69 | | [moussaKam/barthez-sentiment-classification](https://huggingface.co/moussaKam/barthez-sentiment-classification) | 197.95 | 94.29 | How to use DistilCamemBERT-Sentiment ------------------------------------ ```python from transformers import pipeline analyzer = pipeline( task='text-classification', model="cmarkea/distilcamembert-base-sentiment", tokenizer="cmarkea/distilcamembert-base-sentiment" ) result = analyzer( "J'aime me promener en forêt même si ça me donne mal aux pieds.", return_all_scores=True ) result [{'label': '1 star', 'score': 0.047529436647892}, {'label': '2 stars', 'score': 0.14150355756282806}, {'label': '3 stars', 'score': 0.3586442470550537}, {'label': '4 stars', 'score': 0.3181498646736145}, {'label': '5 stars', 'score': 0.13417290151119232}] ``` ### Optimum + ONNX ```python from optimum.onnxruntime import ORTModelForSequenceClassification from transformers import AutoTokenizer, pipeline HUB_MODEL = "cmarkea/distilcamembert-base-sentiment" tokenizer = AutoTokenizer.from_pretrained(HUB_MODEL) model = ORTModelForSequenceClassification.from_pretrained(HUB_MODEL) onnx_qa = pipeline("text-classification", model=model, tokenizer=tokenizer) # Quantized onnx model quantized_model = ORTModelForSequenceClassification.from_pretrained( HUB_MODEL, file_name="model_quantized.onnx" ) ``` Citation -------- ```bibtex @inproceedings{delestre:hal-03674695, TITLE = {{DistilCamemBERT : une distillation du mod{\`e}le fran{\c c}ais CamemBERT}}, AUTHOR = {Delestre, Cyrile and Amar, Abibatou}, URL = {https://hal.archives-ouvertes.fr/hal-03674695}, BOOKTITLE = {{CAp (Conf{\'e}rence sur l'Apprentissage automatique)}}, ADDRESS = {Vannes, France}, YEAR = {2022}, MONTH = Jul, KEYWORDS = {NLP ; Transformers ; CamemBERT ; Distillation}, PDF = {https://hal.archives-ouvertes.fr/hal-03674695/file/cap2022.pdf}, HAL_ID = {hal-03674695}, HAL_VERSION = {v1}, } ```
[ -0.49483832716941833, -0.6557495594024658, 0.30755990743637085, 0.3243144750595093, -0.2885321378707886, 0.02814147062599659, -0.26890233159065247, -0.35721755027770996, 0.23495861887931824, 0.18051253259181976, -0.50495445728302, -0.6257593631744385, -0.7691531777381897, -0.044672686606645584, 0.00819853600114584, 1.3344249725341797, 0.13759738206863403, 0.25779277086257935, 0.18563774228096008, -0.3182052671909332, -0.1633787602186203, -0.7089685797691345, -0.45673078298568726, -0.2346857190132141, 0.49852436780929565, 0.19610758125782013, 0.6528730392456055, 0.2686697542667389, 0.5642886757850647, 0.3143552243709564, -0.16363318264484406, -0.008739004842936993, -0.34758460521698, 0.05056484043598175, 0.05422234907746315, -0.48057469725608826, -0.810370922088623, 0.2555319368839264, 0.4328254163265228, 0.6359415650367737, 0.05193621292710304, 0.4035671055316925, 0.3698873519897461, 0.8194159269332886, -0.5503997206687927, 0.3206217885017395, -0.44472256302833557, -0.06741161644458771, 0.007157395593822002, 0.014906718395650387, -0.326808899641037, -0.47638651728630066, 0.08735442906618118, -0.3714374601840973, 0.2908455431461334, 0.10350669920444489, 1.1409623622894287, 0.36846330761909485, -0.1912880539894104, -0.18965314328670502, -0.6725237965583801, 1.175174593925476, -0.9938670992851257, 0.2739731967449188, 0.13499459624290466, 0.21042080223560333, 0.22013208270072937, -0.5516562461853027, -0.6300095319747925, 0.019652342423796654, -0.15838760137557983, 0.637925922870636, -0.43361490964889526, -0.08719087392091751, 0.2590247094631195, 0.6132251620292664, -0.4570367634296417, -0.04795091971755028, -0.2377651035785675, -0.07055121660232544, 0.768802285194397, 0.01157340593636036, -0.25850722193717957, -0.38763192296028137, -0.5962018370628357, -0.3963669240474701, -0.11587441712617874, 0.21926456689834595, 0.31769269704818726, 0.38048192858695984, -0.14617055654525757, 0.5350254774093628, -0.10444725304841995, 0.5155028700828552, 0.2920418381690979, -0.2004687786102295, 0.7317519783973694, -0.3421957492828369, -0.3628992438316345, 0.0531635507941246, 1.0779621601104736, 0.6237924098968506, 0.20909613370895386, 0.2404770851135254, -0.3774389326572418, 0.34583234786987305, 0.003923519980162382, -0.7820979356765747, -0.31494179368019104, 0.3236837685108185, -0.5841799974441528, -0.5029999613761902, 0.15000763535499573, -0.9322043657302856, -0.07505857944488525, -0.2149118185043335, 0.5024668574333191, -0.38659533858299255, -0.2934132218360901, -0.06978210061788559, -0.24506062269210815, 0.11974656581878662, -0.01657192036509514, -0.5982134938240051, 0.12275523692369461, 0.4677715599536896, 0.7536768913269043, -0.027508696541190147, -0.18272769451141357, -0.18076759576797485, -0.4884171783924103, -0.2755403220653534, 0.686147153377533, -0.18833988904953003, -0.32270053029060364, -0.18827763199806213, 0.009825502522289753, 0.017287027090787888, -0.40393003821372986, 0.8316390514373779, -0.37345728278160095, 0.4438581168651581, -0.3926486074924469, -0.6921682953834534, -0.4399948716163635, 0.5185428261756897, -0.6638950109481812, 1.2445536851882935, 0.2583842873573303, -0.8757708072662354, 0.3568669557571411, -0.6404149532318115, -0.10943371802568436, -0.34709492325782776, 0.2936338484287262, -0.6277640461921692, 0.06787600368261337, 0.24810606241226196, 0.6247093081474304, -0.4653944671154022, 0.19541814923286438, -0.3228311836719513, -0.1401025950908661, 0.3182632625102997, -0.5839784741401672, 1.1798155307769775, 0.2903473377227783, -0.5143386125564575, -0.12055015563964844, -0.9186975359916687, 0.1941595822572708, 0.14763139188289642, -0.383755087852478, -0.27146172523498535, -0.12666025757789612, 0.20317412912845612, 0.13042066991329193, 0.27695709466934204, -0.6361584067344666, 0.05342099443078041, -0.4094680845737457, 0.27571752667427063, 0.6658242344856262, 0.08341871201992035, 0.3013947308063507, -0.39772218465805054, 0.43158572912216187, 0.1330910176038742, 0.4293130934238434, 0.12897689640522003, -0.49805009365081787, -0.8889919519424438, -0.3985123634338379, 0.5041142106056213, 0.7877264022827148, -0.42083388566970825, 0.8695555329322815, -0.36506161093711853, -0.7574908137321472, -0.41414833068847656, 0.028892187401652336, 0.4742228090763092, 0.532573401927948, 0.525703489780426, -0.2692486643791199, -0.45076456665992737, -0.9247863292694092, -0.21527472138404846, -0.4058744013309479, 0.1246919110417366, 0.0789090096950531, 0.34437325596809387, -0.22674089670181274, 0.8343799114227295, -0.701885461807251, -0.3165798783302307, -0.2511512041091919, 0.18822117149829865, 0.6459780335426331, 0.3537941873073578, 0.8308219909667969, -0.6279440522193909, -0.8322372436523438, -0.1827652007341385, -0.7916218042373657, -0.08877196907997131, 0.12268488109111786, -0.16746972501277924, 0.38931745290756226, 0.034477729350328445, -0.5286950469017029, 0.29857248067855835, 0.5769423842430115, -0.3653794229030609, 0.7191592454910278, 0.07958361506462097, 0.18597553670406342, -1.2295091152191162, 0.024145957082509995, 0.26970383524894714, -0.049658387899398804, -0.5993001461029053, -0.18169669806957245, -0.048007719218730927, 0.19761966168880463, -0.3508247435092926, 0.46691229939460754, -0.2743794918060303, 0.1802370250225067, -0.00630102027207613, 0.0946810394525528, 0.25752416253089905, 0.9250758290290833, -0.03198573738336563, 0.408403605222702, 0.5764756202697754, -0.38309600949287415, 0.48102375864982605, 0.210195854306221, -0.35344457626342773, 0.7668580412864685, -0.594389796257019, -0.17203059792518616, -0.08117394149303436, 0.2518993616104126, -1.2060704231262207, 0.12769894301891327, 0.46812525391578674, -0.7234582901000977, 0.33901333808898926, 0.013710521161556244, -0.45625588297843933, -0.32636258006095886, -0.5017436742782593, 0.12607961893081665, 0.6774723529815674, -0.5001933574676514, 0.5632123351097107, 0.17417939007282257, -0.12156619876623154, -0.9235007166862488, -0.812004804611206, -0.36418330669403076, -0.3220953047275543, -0.4643121063709259, 0.13080428540706635, -0.21403221786022186, -0.4238620698451996, 0.02333664707839489, -0.07707992196083069, -0.14911550283432007, -0.1282276213169098, 0.15434665977954865, 0.6269082427024841, -0.14185695350170135, 0.1848500669002533, -0.020396634936332703, -0.18552660942077637, 0.07901608943939209, -0.1393766701221466, 0.47262030839920044, -0.4127528965473175, 0.012753082439303398, -0.4612762928009033, 0.09665308892726898, 0.6254608631134033, -0.1070069745182991, 0.6875312328338623, 0.652004599571228, -0.09120047092437744, -0.09995448589324951, -0.6408606767654419, -0.2725313603878021, -0.4380917549133301, 0.38448020815849304, -0.29342782497406006, -0.4399159550666809, 0.5375403165817261, 0.23509888350963593, 0.278286337852478, 0.8991108536720276, 0.5802100896835327, -0.24056650698184967, 1.0551882982254028, 0.2129538506269455, -0.31108495593070984, 0.33006101846694946, -0.7186276912689209, 0.330813467502594, -0.6664342880249023, -0.14420488476753235, -0.5186803936958313, -0.5372110605239868, -0.7469043731689453, -0.19587929546833038, 0.3466739356517792, 0.22740663588047028, -0.414247989654541, 0.3035852909088135, -0.7836259007453918, 0.05516962707042694, 0.615663468837738, 0.10598257929086685, 0.2376633584499359, 0.15311194956302643, -0.20700806379318237, -0.16816440224647522, -0.7420731782913208, -0.49193814396858215, 1.1390610933303833, 0.4922821521759033, 0.6255350112915039, 0.0007598853553645313, 0.5487184524536133, 0.4013248682022095, 0.40197017788887024, -1.0279980897903442, 0.4456914961338043, -0.26856884360313416, -0.860364556312561, -0.11742287129163742, -0.42009177803993225, -0.6987786293029785, 0.378275603055954, -0.21142731606960297, -0.4969581663608551, 0.46987229585647583, 0.23673968017101288, -0.3624250888824463, 0.4883221983909607, -0.5605145692825317, 0.8876148462295532, -0.38641172647476196, -0.40699154138565063, -0.025074394419789314, -0.6212283968925476, 0.3018795847892761, -0.09215621650218964, 0.3976357579231262, -0.33623480796813965, 0.16895835101604462, 0.7667734026908875, -0.4876731038093567, 0.8422670960426331, -0.35400277376174927, 0.0655866265296936, 0.5510850548744202, -0.013534138910472393, 0.45230981707572937, -0.12306980788707733, -0.2966330647468567, 0.5273209810256958, 0.09619886428117752, -0.41703593730926514, -0.49701106548309326, 0.7039077877998352, -0.8849680423736572, -0.2869868874549866, -0.8725510835647583, -0.2873431444168091, -0.20375104248523712, -0.0024098437279462814, 0.5962618589401245, 0.5003073811531067, -0.18665021657943726, 0.24084119498729706, 0.46197745203971863, -0.11585942655801773, 0.477329283952713, 0.35880225896835327, -0.1311364620923996, -0.4600153863430023, 0.9408069252967834, 0.07946997135877609, 0.26993128657341003, 0.402810275554657, 0.37391889095306396, -0.5681082010269165, -0.17152270674705505, -0.4484882950782776, 0.2605815529823303, -0.7991189956665039, -0.3894522786140442, -0.6746227741241455, -0.2682070732116699, -0.35675469040870667, -0.006765114143490791, -0.5672580003738403, -0.6958848237991333, -0.31393471360206604, -0.20031458139419556, 0.4690839648246765, 0.3567916750907898, -0.22317185997962952, 0.3192480504512787, -0.7823306322097778, -0.11137469857931137, 0.26808419823646545, 0.2554144859313965, -0.00657030800357461, -0.6618115901947021, -0.1900215595960617, 0.12049015611410141, -0.6415897607803345, -0.8796768188476562, 0.6082964539527893, 0.22197605669498444, 0.44517725706100464, 0.5267553329467773, 0.23576337099075317, 0.3624477684497833, -0.13356329500675201, 1.023041009902954, 0.4065634310245514, -0.9095593690872192, 0.35629400610923767, -0.1624590903520584, 0.14255592226982117, 0.6232322454452515, 0.6677298545837402, -0.3388851284980774, -0.30230921506881714, -0.6958433985710144, -0.8214414119720459, 0.7243790626525879, 0.280995637178421, -0.08416082710027695, 0.07100175321102142, 0.1801941841840744, 0.045709338039159775, 0.31178751587867737, -0.8950397372245789, -0.650343656539917, -0.5219826698303223, -0.41099491715431213, -0.4005352854728699, -0.32619181275367737, -0.05384350195527077, -0.46338197588920593, 1.0343266725540161, 0.09353793412446976, 0.4425874948501587, 0.22829540073871613, 0.0783686563372612, 0.06353149563074112, 0.3521602153778076, 0.18982411921024323, 0.551834762096405, -0.49796608090400696, 0.03547174483537674, 0.2601511478424072, -0.4596571624279022, 0.18376468122005463, 0.13475044071674347, -0.11580067127943039, 0.17075705528259277, 0.3983277976512909, 0.9417523741722107, 0.056000854820013046, -0.474923312664032, 0.46880435943603516, 0.0397229939699173, -0.3244270980358124, -0.5425979495048523, -0.13409334421157837, -0.12800352275371552, 0.3059607744216919, 0.33330175280570984, 0.3292514979839325, 0.16460148990154266, -0.6093044281005859, -0.02810993790626526, 0.38916608691215515, -0.6948789358139038, -0.38156014680862427, 0.6991145610809326, 0.04645535722374916, -0.0637422725558281, 0.4963754713535309, -0.327953964471817, -0.8623421788215637, 0.49380022287368774, 0.10705239325761795, 0.9742593765258789, -0.2808469831943512, 0.24924780428409576, 0.7410066723823547, 0.25168347358703613, -0.17204192280769348, 0.2839696407318115, 0.15179520845413208, -0.8099031448364258, -0.18732571601867676, -0.9982435703277588, -0.092013880610466, -0.04580750688910484, -0.7216834425926208, 0.11637897789478302, -0.48744016885757446, -0.6369350552558899, 0.23398755490779877, 0.2698573172092438, -0.6937301754951477, 0.4610137641429901, -0.07883250713348389, 0.6240352988243103, -0.8667888045310974, 0.6735460758209229, 0.6728517413139343, -0.4562825560569763, -0.8846784234046936, -0.1271364688873291, 0.04828628525137901, -0.49311503767967224, 0.6388710141181946, 0.015745075419545174, -0.02335464209318161, -0.0046931724064052105, -0.33106333017349243, -0.728829026222229, 1.025515079498291, -0.06078127399086952, -0.6945981383323669, 0.2144516408443451, 0.0013393828412517905, 0.6859799027442932, -0.30573445558547974, 0.45341870188713074, 0.6991965770721436, 0.5851242542266846, 0.05111852288246155, -0.8356382250785828, -0.012393612414598465, -0.378426194190979, -0.26228219270706177, 0.15787725150585175, -0.9950796961784363, 1.1486612558364868, 0.12350589781999588, 0.0608987882733345, -0.16967681050300598, 0.4179627299308777, 0.20660531520843506, 0.39532917737960815, 0.6794424653053284, 0.7787162661552429, 0.6168799996376038, -0.3441946506500244, 1.0972135066986084, -0.372487872838974, 0.7583468556404114, 0.8446486592292786, -0.0431392528116703, 0.8680062294006348, 0.20811045169830322, -0.5553559064865112, 0.6581462025642395, 0.6925761103630066, -0.2746516764163971, 0.5576642155647278, -0.0629638060927391, -0.23006229102611542, -0.2107694447040558, 0.1250043362379074, -0.3672860264778137, 0.4765573740005493, 0.1881166398525238, -0.5154885053634644, 0.008909697644412518, -0.07729233056306839, 0.21441175043582916, -0.033499106764793396, -0.2225828915834427, 0.573209822177887, 0.12377816438674927, -0.7023708820343018, 0.8961251974105835, 0.025415008887648582, 0.7875863909721375, -0.4761607348918915, 0.2624812722206116, -0.20046061277389526, 0.4490608870983124, -0.24235177040100098, -0.6358951926231384, 0.13269300758838654, 0.021188581362366676, -0.32727402448654175, -0.0007928722188808024, 0.48738133907318115, -0.2395789921283722, -0.94415682554245, 0.4739886224269867, 0.48852401971817017, 0.19903002679347992, -0.1604614555835724, -1.0167362689971924, 0.1440904587507248, 0.2916785478591919, -0.5310822129249573, -0.00026169014745391905, 0.25013184547424316, 0.22279785573482513, 0.3486953377723694, 0.49079224467277527, 0.002066004555672407, -0.03532645106315613, -0.019116757437586784, 0.8232602477073669, -0.581957995891571, -0.4356227219104767, -0.9184844493865967, 0.6657413244247437, -0.185080423951149, -0.36717870831489563, 0.9360645413398743, 0.6962147355079651, 0.7031129598617554, -0.08449122309684753, 0.9484953284263611, -0.22365742921829224, 0.7896317839622498, -0.23264756798744202, 0.7040840983390808, -0.8618009090423584, 0.20736101269721985, -0.3461363613605499, -1.487327218055725, -0.22823040187358856, 0.6359611749649048, -0.3425813913345337, 0.18332520127296448, 0.669700026512146, 0.738660991191864, -0.06535216420888901, 0.016066696494817734, 0.20290310680866241, 0.48621201515197754, 0.06323817372322083, 0.4788420796394348, 0.603290319442749, -0.7677714824676514, 0.5549636483192444, -0.6202772855758667, -0.5062982439994812, -0.27928242087364197, -0.684376060962677, -0.9373142719268799, -0.4737634062767029, -0.43337830901145935, -0.6088968515396118, -0.20288223028182983, 1.0316693782806396, 0.47214874625205994, -1.0225896835327148, -0.30244317650794983, 0.19607123732566833, -0.19055071473121643, -0.4894621968269348, -0.32045966386795044, 0.559262752532959, -0.28243687748908997, -1.0078907012939453, 0.11128237843513489, -0.05843686684966087, -0.07244787365198135, -0.2994339168071747, -0.1514769345521927, -0.1814969778060913, 0.21426495909690857, 0.6754242777824402, -0.006918393541127443, -0.6155094504356384, -0.17903102934360504, 0.16644802689552307, -0.04762877896428108, 0.24990493059158325, 0.41297876834869385, -0.465168297290802, 0.4378151595592499, 0.639380693435669, 0.17118562757968903, 0.6624255180358887, 0.2226978838443756, 0.10531871765851974, -0.7189359664916992, 0.1349465399980545, 0.35776588320732117, 0.3249606490135193, 0.29235225915908813, -0.3038049340248108, 0.49878737330436707, 0.4763959050178528, -0.7191412448883057, -0.7434207201004028, -0.08191043883562088, -1.2481638193130493, -0.3802918791770935, 1.0538039207458496, -0.19157026708126068, -0.20287710428237915, 0.14814166724681854, -0.17996598780155182, 0.3449876606464386, -0.5800051093101501, 0.7483006119728088, 0.8061647415161133, -0.18551437556743622, -0.022722352296113968, -0.5428451299667358, 0.4438996911048889, 0.4660564064979553, -0.4343951642513275, -0.1476369947195053, 0.5163096785545349, 0.4230141341686249, 0.41126468777656555, 0.43197211623191833, -0.10607440024614334, 0.05752434581518173, 0.11940412223339081, 0.2964577376842499, 0.10458848625421524, -0.11425045132637024, -0.1691017597913742, 0.19571153819561005, -0.03140328451991081, -0.34676894545555115 ]
NousResearch/Llama-2-13b-hf
NousResearch
"2023-08-26T20:17:04Z"
27,182
63
transformers
[ "transformers", "pytorch", "safetensors", "llama", "text-generation", "facebook", "meta", "llama-2", "en", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-07-18T19:16:15Z"
--- extra_gated_heading: Access Llama 2 on Hugging Face extra_gated_description: >- This is a form to enable access to Llama 2 on Hugging Face after you have been granted access from Meta. Please visit the [Meta website](https://ai.meta.com/resources/models-and-libraries/llama-downloads) and accept our license terms and acceptable use policy before submitting this form. Requests will be processed in 1-2 days. extra_gated_button_content: Submit extra_gated_fields: I agree to share my name, email address and username with Meta and confirm that I have already been granted download access on the Meta website: checkbox language: - en pipeline_tag: text-generation inference: false tags: - facebook - meta - pytorch - llama - llama-2 --- # **Llama 2** Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 13B 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/) ## Intended Use **Intended Use Cases** Llama 2 is intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. To get the expected features and performance for the chat versions, a specific formatting needs to be followed, including the `INST` and `<<SYS>>` tags, `BOS` and `EOS` tokens, and the whitespaces and breaklines in between (we recommend calling `strip()` on inputs to avoid double-spaces). See our reference code in github for details: [`chat_completion`](https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L212). **Out-of-scope Uses** Use in any manner that violates applicable laws or regulations (including trade compliance laws).Use in languages other than English. Use in any other way that is prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2. ## Hardware and Software **Training Factors** We used custom training libraries, Meta's Research Super Cluster, and production clusters for pretraining. Fine-tuning, annotation, and evaluation were also performed on third-party cloud compute. **Carbon Footprint** Pretraining utilized a cumulative 3.3M GPU hours of computation on hardware of type A100-80GB (TDP of 350-400W). Estimated total emissions were 539 tCO2eq, 100% of which were offset by Meta’s sustainability program. ||Time (GPU hours)|Power Consumption (W)|Carbon Emitted(tCO<sub>2</sub>eq)| |---|---|---|---| |Llama 2 7B|184320|400|31.22| |Llama 2 13B|368640|400|62.44| |Llama 2 70B|1720320|400|291.42| |Total|3311616||539.00| **CO<sub>2</sub> emissions during pretraining.** Time: total GPU time required for training each model. Power Consumption: peak power capacity per GPU device for the GPUs used adjusted for power usage efficiency. 100% of the emissions are directly offset by Meta's sustainability program, and because we are openly releasing these models, the pretraining costs do not need to be incurred by others. ## Training Data **Overview** Llama 2 was pretrained on 2 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples. Neither the pretraining nor the fine-tuning datasets include Meta user data. **Data Freshness** The pretraining data has a cutoff of September 2022, but some tuning data is more recent, up to July 2023. ## Evaluation Results In this section, we report the results for the Llama 1 and Llama 2 models on standard academic benchmarks.For all the evaluations, we use our internal evaluations library. |Model|Size|Code|Commonsense Reasoning|World Knowledge|Reading Comprehension|Math|MMLU|BBH|AGI Eval| |---|---|---|---|---|---|---|---|---|---| |Llama 1|7B|14.1|60.8|46.2|58.5|6.95|35.1|30.3|23.9| |Llama 1|13B|18.9|66.1|52.6|62.3|10.9|46.9|37.0|33.9| |Llama 1|33B|26.0|70.0|58.4|67.6|21.4|57.8|39.8|41.7| |Llama 1|65B|30.7|70.7|60.5|68.6|30.8|63.4|43.5|47.6| |Llama 2|7B|16.8|63.9|48.9|61.3|14.6|45.3|32.6|29.3| |Llama 2|13B|24.5|66.9|55.4|65.8|28.7|54.8|39.4|39.1| |Llama 2|70B|**37.5**|**71.9**|**63.6**|**69.4**|**35.2**|**68.9**|**51.2**|**54.2**| **Overall performance on grouped academic benchmarks.** *Code:* We report the average pass@1 scores of our models on HumanEval and MBPP. *Commonsense Reasoning:* We report the average of PIQA, SIQA, HellaSwag, WinoGrande, ARC easy and challenge, OpenBookQA, and CommonsenseQA. We report 7-shot results for CommonSenseQA and 0-shot results for all other benchmarks. *World Knowledge:* We evaluate the 5-shot performance on NaturalQuestions and TriviaQA and report the average. *Reading Comprehension:* For reading comprehension, we report the 0-shot average on SQuAD, QuAC, and BoolQ. *MATH:* We report the average of the GSM8K (8 shot) and MATH (4 shot) benchmarks at top 1. |||TruthfulQA|Toxigen| |---|---|---|---| |Llama 1|7B|27.42|23.00| |Llama 1|13B|41.74|23.08| |Llama 1|33B|44.19|22.57| |Llama 1|65B|48.71|21.77| |Llama 2|7B|33.29|**21.25**| |Llama 2|13B|41.86|26.10| |Llama 2|70B|**50.18**|24.60| **Evaluation of pretrained LLMs on automatic safety benchmarks.** For TruthfulQA, we present the percentage of generations that are both truthful and informative (the higher the better). For ToxiGen, we present the percentage of toxic generations (the smaller the better). |||TruthfulQA|Toxigen| |---|---|---|---| |Llama-2-Chat|7B|57.04|**0.00**| |Llama-2-Chat|13B|62.18|**0.00**| |Llama-2-Chat|70B|**64.14**|0.01| **Evaluation of fine-tuned LLMs on different safety datasets.** Same metric definitions as above. ## Ethical Considerations and Limitations Llama 2 is a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2, developers should perform safety testing and tuning tailored to their specific applications of the model. Please see the Responsible Use Guide available at [https://ai.meta.com/llama/responsible-use-guide/](https://ai.meta.com/llama/responsible-use-guide) ## Reporting Issues Please report any software “bug,” or other problems with the models through one of the following means: - Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama) - Reporting problematic content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback) - Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info) ## Llama Model Index |Model|Llama2|Llama2-hf|Llama2-chat|Llama2-chat-hf| |---|---|---|---|---| |7B| [Link](https://huggingface.co/llamaste/Llama-2-7b) | [Link](https://huggingface.co/llamaste/Llama-2-7b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-7b-chat-hf)| |13B| [Link](https://huggingface.co/llamaste/Llama-2-13b) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-13b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-13b-hf)| |70B| [Link](https://huggingface.co/llamaste/Llama-2-70b) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf) | [Link](https://huggingface.co/llamaste/Llama-2-70b-chat) | [Link](https://huggingface.co/llamaste/Llama-2-70b-hf)|
[ -0.22367915511131287, -0.7173254489898682, 0.3776685893535614, 0.2065889686346054, -0.38374432921409607, 0.22452405095100403, -0.0456993542611599, -0.7693837881088257, 0.06465103477239609, 0.32076531648635864, -0.7188208103179932, -0.5784107446670532, -0.6879810690879822, 0.08049710839986801, -0.23019008338451385, 1.102986454963684, -0.017721375450491905, -0.29049983620643616, -0.14065693318843842, 0.08941949158906937, -0.49914610385894775, -0.4108681082725525, -0.5420012474060059, -0.44255852699279785, 0.4126989245414734, 0.49069297313690186, 0.6218450665473938, 0.6678863167762756, 0.5601165890693665, 0.2483450323343277, -0.2624739706516266, 0.2153148353099823, -0.7114288806915283, -0.28593119978904724, 0.1194242388010025, -0.5046349763870239, -0.7036889791488647, 0.18100039660930634, 0.3548257350921631, 0.1809871941804886, -0.3030203580856323, 0.5453198552131653, 0.06534411758184433, 0.47971537709236145, -0.5767518877983093, 0.16674329340457916, -0.7388588786125183, 0.03863833099603653, -0.22679345309734344, -0.08515891432762146, -0.19169843196868896, -0.2983447313308716, -0.19591183960437775, -0.8532564043998718, -0.11728254705667496, 0.08390474319458008, 1.065471887588501, 0.672064483165741, -0.4700656235218048, -0.12074361741542816, -0.2904176414012909, 0.9718447923660278, -0.8693761825561523, 0.05238939821720123, 0.6044473648071289, 0.28580114245414734, -0.22192467749118805, -0.7817423939704895, -0.663104772567749, -0.14673170447349548, 0.0582742840051651, 0.36249613761901855, -0.418144166469574, 0.0040368507616221905, 0.18082202970981598, 0.38551533222198486, -0.5894908308982849, 0.5843643546104431, -0.5272551774978638, -0.16991090774536133, 1.0886695384979248, 0.23737750947475433, 0.003251828718930483, -0.05431699380278587, -0.5143424272537231, -0.29827284812927246, -0.8299702405929565, 0.18120965361595154, 0.4987424612045288, -0.04431712627410889, -0.4810580909252167, 0.6354960203170776, -0.4036397337913513, 0.2953921854496002, 0.015885688364505768, -0.5117153525352478, 0.5038738250732422, -0.48487380146980286, -0.2891007661819458, -0.11974935978651047, 0.9135000705718994, 0.7490640878677368, 0.16619941592216492, 0.11218741536140442, -0.0664498433470726, 0.10999229550361633, -0.0033735709730535746, -0.8288257718086243, -0.04499780759215355, 0.24366384744644165, -0.38416576385498047, -0.5970245599746704, -0.3035283088684082, -0.762108325958252, -0.16752830147743225, -0.09567911177873611, 0.25564494729042053, -0.027882516384124756, -0.40178993344306946, 0.12575259804725647, 0.05446914583444595, 0.5679714679718018, 0.20832538604736328, -0.9635084271430969, 0.2272173911333084, 0.5648379921913147, 0.8016505241394043, -0.24712832272052765, -0.37571173906326294, 0.014797897078096867, -0.018036317080259323, -0.3354392647743225, 0.9188457131385803, -0.34213563799858093, -0.5636608004570007, -0.2303733080625534, -0.017230678349733353, 0.16985423862934113, -0.5393632054328918, 0.4411787688732147, -0.3946433663368225, 0.16862182319164276, -0.33743879199028015, -0.3661707043647766, -0.3532426357269287, 0.19762475788593292, -0.4136921465396881, 1.492307424545288, 0.11516603082418442, -0.4980294406414032, 0.3228304982185364, -0.6999757289886475, -0.19233296811580658, -0.21540771424770355, 0.10787353664636612, -0.5464493632316589, -0.28078901767730713, 0.12991143763065338, 0.383014976978302, -0.6468510031700134, 0.5003108382225037, -0.20228825509548187, -0.44603124260902405, 0.0365670770406723, -0.4187287986278534, 0.877113938331604, 0.297818124294281, -0.47265610098838806, 0.07528865337371826, -0.8551983833312988, 0.044881850481033325, 0.4710439443588257, -0.492384672164917, 0.26404476165771484, 0.07896192371845245, -0.11808311939239502, 0.19732943177223206, 0.49876266717910767, -0.3672064542770386, 0.1680292785167694, -0.3117564618587494, 0.5157105922698975, 0.7749803066253662, 0.04901657998561859, 0.17208914458751678, -0.532604992389679, 0.5360108613967896, -0.03866714984178543, 0.40083062648773193, 0.013343564234673977, -0.7364391088485718, -1.0485615730285645, -0.18333867192268372, -0.049956608563661575, 0.8684147596359253, -0.2570531666278839, 0.7109622359275818, -0.006822353694587946, -0.7572188377380371, -0.42559635639190674, 0.376070111989975, 0.681444525718689, 0.5113294720649719, 0.44580507278442383, -0.284395307302475, -0.6251223087310791, -1.035150170326233, 0.0555674247443676, -0.45765769481658936, -0.012079698033630848, 0.36888387799263, 0.6761114597320557, -0.3519124686717987, 0.7461848855018616, -0.5489929914474487, -0.18311099708080292, -0.2699713408946991, -0.12730763852596283, 0.06826912611722946, 0.36317428946495056, 0.66951984167099, -0.40658435225486755, -0.21023860573768616, -0.1286664456129074, -0.9335479140281677, -0.10120823979377747, 0.1002800464630127, -0.21158288419246674, 0.24142299592494965, 0.32724499702453613, -0.6312738060951233, 0.4663747251033783, 0.7296813130378723, -0.18688955903053284, 0.527498722076416, -0.0074920873157680035, -0.18468521535396576, -1.1015548706054688, 0.04639985039830208, -0.20779870450496674, 0.029229480773210526, -0.4428594410419464, -0.02741246670484543, -0.2166699320077896, 0.07317128777503967, -0.6381881833076477, 0.607534646987915, -0.3176202178001404, -0.17249423265457153, -0.1253584623336792, 0.05013000965118408, 0.0625271126627922, 0.6236256957054138, -0.12997420132160187, 1.10716712474823, 0.41296303272247314, -0.6082625985145569, 0.2673457860946655, 0.4064582884311676, -0.5080757141113281, 0.14856715500354767, -0.8983004689216614, 0.3756387233734131, 0.10692672431468964, 0.5376367568969727, -0.9792500734329224, -0.38054946064949036, 0.3317185044288635, -0.44650498032569885, 0.0923088937997818, 0.2539345622062683, -0.5648183822631836, -0.4162406027317047, -0.43646806478500366, 0.3168003559112549, 0.827254056930542, -0.46919262409210205, 0.1898120492696762, 0.3878422677516937, 0.027729051187634468, -0.708836019039154, -0.8752479553222656, 0.06371179968118668, -0.38194361329078674, -0.5459386706352234, 0.31431546807289124, -0.19391107559204102, -0.24814501404762268, -0.256693959236145, 0.0725574940443039, -0.014885860495269299, 0.4049299955368042, 0.37603655457496643, 0.38437655568122864, -0.1120343804359436, -0.0227391067892313, 0.1441487818956375, -0.21411630511283875, 0.05395151302218437, 0.229272723197937, 0.5978213548660278, -0.17146678268909454, -0.2226838767528534, -0.753818929195404, 0.052996307611465454, 0.2990832030773163, -0.27184590697288513, 0.6261882185935974, 0.4383254945278168, -0.23500314354896545, 0.24015186727046967, -0.7800095677375793, -0.11034694314002991, -0.5458931922912598, 0.5511069893836975, -0.21236516535282135, -0.8449748754501343, 0.5451434850692749, -0.004710516892373562, 0.44347670674324036, 0.7704470157623291, 0.6285892128944397, -0.08806029707193375, 0.8194195628166199, 0.599611222743988, -0.07999300956726074, 0.3420703113079071, -0.5152942538261414, -0.09521449357271194, -0.9714654684066772, -0.6415310502052307, -0.3246208131313324, -0.44025903940200806, -0.683029055595398, -0.4276166558265686, 0.2700134217739105, 0.19749443233013153, -0.6998973488807678, 0.33009204268455505, -0.5939347743988037, 0.580424964427948, 0.5521789193153381, 0.1369108408689499, 0.3130972981452942, 0.09826721251010895, 0.15544326603412628, 0.062848299741745, -0.5350401401519775, -0.7559549808502197, 1.51253080368042, 0.43394744396209717, 0.46334752440452576, 0.09736752510070801, 0.705791711807251, 0.15021653473377228, 0.33851516246795654, -0.7310768961906433, 0.6742250323295593, 0.051441702991724014, -0.7433747053146362, -0.15027616918087006, -0.11710699647665024, -0.918758749961853, 0.13723529875278473, -0.21479909121990204, -0.7938750386238098, 0.030803658068180084, -0.030651099979877472, -0.38631346821784973, 0.2948836386203766, -0.6816653609275818, 0.6177763938903809, -0.583165168762207, -0.31726881861686707, -0.36932846903800964, -0.8138747215270996, 0.6924847364425659, -0.20705251395702362, 0.10395919531583786, -0.5008580684661865, -0.26515993475914, 0.9181815981864929, -0.34236136078834534, 1.029226541519165, -0.04861968383193016, -0.10459376871585846, 0.5981826186180115, -0.1966126412153244, 0.45818689465522766, 0.03479739651083946, -0.284047931432724, 0.6934783458709717, -0.13838455080986023, -0.32071882486343384, -0.15135258436203003, 0.5482674837112427, -1.2406319379806519, -0.816138744354248, -0.5269022583961487, -0.5223326683044434, -0.020609688013792038, 0.09200077503919601, 0.5220951437950134, -0.10196508467197418, -0.03430648520588875, 0.12292060256004333, 0.4663291573524475, -0.5365731716156006, 0.49024489521980286, 0.556178629398346, -0.11125282198190689, -0.46838968992233276, 0.6741437911987305, 0.05609406158328056, 0.3679135739803314, 0.22018209099769592, 0.05029810220003128, -0.41950565576553345, -0.4283810257911682, -0.5242821574211121, 0.28238070011138916, -0.4744197726249695, -0.49809882044792175, -0.5444449186325073, -0.3622501492500305, -0.3325396478176117, -0.0793859213590622, -0.444297730922699, -0.43381166458129883, -0.7688637375831604, -0.41137081384658813, 0.5334658622741699, 0.838571310043335, -0.013575601391494274, 0.6474554538726807, -0.33182185888290405, 0.1875782608985901, 0.3846127688884735, 0.18042318522930145, -0.03612251952290535, -0.7625450491905212, 0.057686176151037216, 0.12076818943023682, -0.781352698802948, -0.6297484636306763, 0.2479257732629776, 0.2789922058582306, 0.4909490644931793, 0.4843428432941437, -0.08309784531593323, 0.7892509698867798, -0.360152006149292, 1.130255937576294, 0.37210625410079956, -0.680724024772644, 0.7209951877593994, -0.22059564292430878, 0.04590864107012749, 0.6474527716636658, 0.28920528292655945, -0.08759395033121109, -0.15758763253688812, -0.6489790678024292, -0.698421835899353, 0.8153675198554993, 0.2323348969221115, 0.188120499253273, 0.05101839080452919, 0.4744783043861389, 0.05334310606122017, 0.10896933078765869, -0.8640902638435364, -0.32204726338386536, -0.2753129005432129, -0.09629394859075546, -0.20906558632850647, -0.5205017924308777, -0.07070540636777878, -0.3213977813720703, 0.6555129289627075, 0.05581514537334442, 0.36051785945892334, -0.13179634511470795, 0.019817767664790154, -0.10370340943336487, 0.045914459973573685, 0.7386946678161621, 0.5165195465087891, -0.2640936076641083, -0.14745230972766876, 0.6613032817840576, -0.6496807932853699, 0.3513867259025574, 0.010494641959667206, -0.13679856061935425, -0.3869960904121399, 0.4155674874782562, 0.8943502902984619, 0.2690255343914032, -0.7260496616363525, 0.3409395217895508, 0.14560139179229736, -0.37741392850875854, -0.4358060657978058, 0.3673563003540039, 0.09404861181974411, 0.32785141468048096, 0.2726033329963684, -0.1367603838443756, 0.08960442245006561, -0.5299856066703796, -0.1249631941318512, 0.3894604742527008, 0.12693919241428375, -0.42726412415504456, 1.0194011926651, 0.32955610752105713, -0.2974478006362915, 0.5455019474029541, -0.16811561584472656, -0.36682283878326416, 0.932083785533905, 0.6568283438682556, 0.6627134084701538, -0.29321104288101196, 0.12577949464321136, 0.7300757169723511, 0.4694253206253052, -0.23672348260879517, 0.2427884191274643, -0.005077106412500143, -0.5091416835784912, -0.21972441673278809, -0.7024332880973816, -0.4758867025375366, 0.36739444732666016, -0.59183669090271, 0.31580978631973267, -0.6511362791061401, -0.27686768770217896, -0.3337683379650116, 0.4619659185409546, -0.6871272921562195, 0.22464075684547424, 0.11399044841527939, 0.9437913298606873, -0.7442774772644043, 0.7799391746520996, 0.5200835466384888, -0.5240318179130554, -0.9114575386047363, -0.3021320104598999, 0.20655858516693115, -1.255110502243042, 0.5420737862586975, 0.39712169766426086, -0.07269569486379623, 0.12681180238723755, -0.7759212255477905, -1.2392252683639526, 1.7417902946472168, 0.4681418538093567, -0.7631412744522095, -0.02018665336072445, 0.3503923714160919, 0.4912705719470978, -0.10414829850196838, 0.44710204005241394, 0.8374695181846619, 0.5077071189880371, 0.11027088761329651, -1.0790382623672485, 0.09774874150753021, -0.3588055372238159, -0.03988626226782799, -0.20141586661338806, -1.3368219137191772, 0.839928925037384, -0.40921086072921753, -0.24637176096439362, 0.21865838766098022, 0.657572329044342, 0.7015248537063599, 0.5758481621742249, 0.3617268204689026, 0.8195529580116272, 0.9394494295120239, -0.01867726258933544, 1.143195390701294, -0.3643835484981537, 0.18430541455745697, 0.90486741065979, -0.2987213134765625, 0.9922268986701965, 0.25161659717559814, -0.6058835387229919, 0.6269814968109131, 1.0353755950927734, -0.019749173894524574, 0.6029866337776184, 0.0646609291434288, -0.17813368141651154, -0.18904608488082886, -0.18184088170528412, -0.6685222387313843, 0.5258585214614868, 0.24118320643901825, -0.1492484211921692, -0.03012225404381752, -0.33816230297088623, 0.23813627660274506, -0.3345683515071869, -0.014140816405415535, 0.8126617074012756, 0.18105362355709076, -0.6236799955368042, 0.8991551995277405, 0.047465573996305466, 0.8667957782745361, -0.6639871597290039, 0.08561327308416367, -0.5305770039558411, 0.0036805332638323307, -0.380855917930603, -0.7274441123008728, 0.08873642235994339, 0.37930047512054443, -0.0139683298766613, -0.11920185387134552, 0.5627553462982178, 0.052216872572898865, -0.5852603316307068, 0.37665289640426636, 0.28341150283813477, 0.3587162494659424, 0.21631303429603577, -0.6962975263595581, 0.17420564591884613, 0.08804630488157272, -0.5550819039344788, 0.3882608413696289, 0.027703942731022835, -0.06887505948543549, 0.8308149576187134, 0.7644359469413757, -0.21087735891342163, 0.14678996801376343, -0.2142675518989563, 1.026304006576538, -0.5159481763839722, -0.19664432108402252, -0.7763140797615051, 0.5450929403305054, 0.055250462144613266, -0.7291958928108215, 0.5574713349342346, 0.6625257134437561, 0.7255917191505432, 0.28042563796043396, 0.6635563969612122, 0.07881981134414673, 0.31362679600715637, -0.5496872067451477, 0.6374518275260925, -0.8025506734848022, 0.3819699287414551, 0.08538293093442917, -0.9988466501235962, -0.06996787339448929, 0.7039898037910461, -0.24721504747867584, 0.048900797963142395, 0.3838716447353363, 0.8731616139411926, 0.18186724185943604, -0.16681928932666779, 0.12757498025894165, 0.17142045497894287, 0.3572002351284027, 0.9025692939758301, 0.8632212281227112, -0.6419665217399597, 0.7145541310310364, -0.39684799313545227, -0.24519045650959015, -0.2665128707885742, -0.7642869353294373, -0.9882676005363464, -0.2709512710571289, -0.2494676113128662, -0.14719045162200928, 0.06585440039634705, 0.7652180790901184, 0.5192477107048035, -0.5908997654914856, -0.3065633773803711, -0.08377779275178909, -0.0867292508482933, 0.029007354751229286, -0.1627274453639984, 0.3365756869316101, -0.10776696354150772, -0.597885012626648, 0.5014324188232422, 0.0011147622717544436, 0.20106622576713562, -0.3395077884197235, -0.2731166183948517, -0.21405650675296783, 0.14495201408863068, 0.6221905946731567, 0.2852005064487457, -0.9399888515472412, -0.23872655630111694, 0.045303236693143845, -0.1421084851026535, 0.12688390910625458, 0.01834760047495365, -0.788200855255127, 0.09642602503299713, 0.14177189767360687, 0.3917756676673889, 0.6782983541488647, 0.057290684431791306, 0.06369350850582123, -0.5107587575912476, 0.4604796767234802, 0.01663481816649437, 0.15537793934345245, 0.3146390914916992, -0.4421130418777466, 0.8159235119819641, 0.15295487642288208, -0.7183193564414978, -0.9596065878868103, 0.1175280436873436, -1.0725983381271362, 0.0017262788023799658, 1.4083369970321655, -0.0027943430468440056, -0.12919621169567108, 0.20360641181468964, -0.20790942013263702, 0.3933947682380676, -0.38630440831184387, 0.8222135901451111, 0.5777295231819153, -0.08497292548418045, -0.10820435732603073, -0.8217124342918396, 0.34630879759788513, 0.4000740051269531, -1.122116208076477, -0.256132572889328, 0.4591072201728821, 0.5019041299819946, -0.09277372807264328, 0.7047294974327087, 0.017601683735847473, 0.23827296495437622, 0.06752713769674301, 0.11692389100790024, -0.25493356585502625, -0.16579727828502655, -0.10419435799121857, -0.2852291762828827, -0.0586760938167572, -0.22762322425842285 ]
nateraw/vit-base-patch16-224-cifar10
nateraw
"2022-01-28T10:22:01Z"
27,133
6
transformers
[ "transformers", "pytorch", "vit", "image-classification", "vision", "dataset:cifar10", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
image-classification
"2022-03-02T23:29:05Z"
--- tags: - image-classification - vision - pytorch license: apache-2.0 datasets: - cifar10 metrics: - accuracy thumbnail: https://avatars3.githubusercontent.com/u/32437151?s=460&u=4ec59abc8d21d5feea3dab323d23a5860e6996a4&v=4 --- # Vision Transformer Fine Tuned on CIFAR10 Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) and **fine-tuned on CIFAR10** at resolution 224x224. Check out the code at my [my Github repo](https://github.com/nateraw/huggingface-vit-finetune). ## Usage ```python from transformers import ViTFeatureExtractor, ViTForImageClassification from PIL import Image import requests url = 'https://www.cs.toronto.edu/~kriz/cifar-10-sample/dog10.png' image = Image.open(requests.get(url, stream=True).raw) feature_extractor = ViTFeatureExtractor.from_pretrained('nateraw/vit-base-patch16-224-cifar10') model = ViTForImageClassification.from_pretrained('nateraw/vit-base-patch16-224-cifar10') inputs = feature_extractor(images=image, return_tensors="pt") outputs = model(**inputs) preds = outputs.logits.argmax(dim=1) classes = [ 'airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck' ] classes[preds[0]] ``` ## Model description The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder. Note that this model does not provide any fine-tuned heads, as these were zero'd by Google researchers. However, the model does include the pre-trained pooler, which can be used for downstream tasks (such as image classification). By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image.
[ -0.7744632959365845, -0.20744235813617706, 0.0750294178724289, 0.024425586685538292, -0.4591933786869049, -0.1116771399974823, 0.007592770271003246, -0.48864561319351196, 0.2948470115661621, 0.49249300360679626, -0.40872204303741455, -0.13587796688079834, -0.745219349861145, -0.09342066943645477, -0.6085200905799866, 1.0349905490875244, 0.06563815474510193, 0.050542984157800674, -0.1076270043849945, 0.043870627880096436, -0.19957560300827026, -0.3203345239162445, -0.624158501625061, -0.3983598053455353, 0.5894214510917664, 0.2782392203807831, 0.6820987462997437, 0.6194851398468018, 0.8011184930801392, 0.45329323410987854, -0.03501308336853981, -0.05948890745639801, -0.45204034447669983, -0.24004773795604706, -0.15309074521064758, -0.32533392310142517, -0.28921231627464294, 0.019990701228380203, 0.7034144997596741, 0.3969748616218567, 0.2510022521018982, 0.3891233801841736, 0.19243089854717255, 0.5050832629203796, -0.5694813132286072, 0.06582801789045334, -0.42999267578125, 0.094499871134758, -0.1410471796989441, -0.05066720396280289, -0.22392316162586212, -0.2900267243385315, 0.45866212248802185, -0.48979806900024414, 0.48750752210617065, 0.007678748108446598, 1.3860572576522827, 0.26205646991729736, -0.29201674461364746, 0.10398567467927933, -0.5893803238868713, 0.509899914264679, -0.24253246188163757, 0.2671974301338196, 0.08481951057910919, 0.5269378423690796, 0.1364462971687317, -1.1998131275177002, -0.5807748436927795, 0.10827241837978363, -0.2218528538942337, -0.13838490843772888, -0.19397617876529694, 0.24181349575519562, 0.41690415143966675, 0.5351617932319641, -0.2621612548828125, 0.04046507924795151, -0.6354318261146545, -0.24756284058094025, 0.5148406028747559, -0.09145137667655945, 0.12276368588209152, 0.04717057943344116, -0.6377305388450623, -0.43450936675071716, -0.29075536131858826, 0.23186729848384857, 0.18700706958770752, 0.03691144287586212, -0.10647042095661163, 0.4357433021068573, 0.016832130029797554, 0.7544558048248291, 0.5977804064750671, 0.10618084669113159, 0.402323842048645, -0.09970642626285553, -0.45727354288101196, -0.05899430438876152, 0.6782721877098083, 0.3608829975128174, 0.4258807599544525, 0.061902597546577454, -0.3861369788646698, 0.01737990975379944, 0.6159695982933044, -0.8474627137184143, -0.2606527507305145, -0.056060582399368286, -0.5672343969345093, -0.4909922480583191, 0.2654898762702942, -0.49996665120124817, -0.05461624637246132, -0.38775020837783813, 0.8829269409179688, -0.345762699842453, -0.17865855991840363, 0.0010321562876924872, -0.2614384591579437, 0.8666405081748962, 0.2906172275543213, -0.7188259959220886, 0.23037461936473846, 0.34880566596984863, 0.8037927150726318, 0.02760668471455574, -0.2800869345664978, -0.23585499823093414, -0.286088228225708, -0.27826380729675293, 0.8222020268440247, -0.21626991033554077, -0.20825418829917908, 0.06496922671794891, 0.5551701188087463, -0.06802470237016678, -0.4389251172542572, 0.4554966986179352, -0.5654997825622559, 0.06343040615320206, -0.1980384886264801, -0.22309216856956482, -0.46821948885917664, 0.2689273953437805, -0.6354210376739502, 0.8526051640510559, 0.3361373245716095, -0.6774819493293762, 0.35300979018211365, -0.6673189401626587, -0.2293580323457718, 0.24492774903774261, 0.07399453967809677, -0.6982244253158569, 0.1319752335548401, 0.2154018133878708, 0.48606497049331665, 0.06882289797067642, 0.16008587181568146, -0.09284807741641998, -0.5825982689857483, 0.24117344617843628, -0.33274710178375244, 0.6257667541503906, 0.18655452132225037, -0.325629860162735, 0.33899742364883423, -0.6201032400131226, 0.029304327443242073, 0.04725108668208122, -0.16477857530117035, -0.022574277594685555, -0.35195112228393555, 0.37409311532974243, 0.2759997546672821, 0.35100045800209045, -0.7557836174964905, 0.0919497087597847, -0.220672145485878, 0.4237239956855774, 0.7157793641090393, -0.1844588965177536, 0.3718332350254059, -0.39391130208969116, 0.3348734676837921, 0.26882535219192505, 0.44108936190605164, -0.25143277645111084, -0.48793959617614746, -1.0457288026809692, -0.18436232209205627, 0.4478394687175751, 0.32061100006103516, -0.78899747133255, 0.5290592908859253, -0.45098721981048584, -0.6032723784446716, -0.5006844401359558, -0.19686287641525269, 0.3297572135925293, 0.368533194065094, 0.3255772590637207, -0.5609042048454285, -0.5701212286949158, -1.0105847120285034, 0.1480359137058258, 0.1944875866174698, -0.0632365420460701, -0.057143472135066986, 0.7531570792198181, -0.34924745559692383, 0.7942615747451782, -0.2780131995677948, -0.290036141872406, -0.0683559998869896, -0.11186940968036652, 0.3484802842140198, 0.7495979070663452, 0.5859266519546509, -0.8436780571937561, -0.34653380513191223, -0.11201869696378708, -0.5760665535926819, 0.25640055537223816, -0.1345837563276291, -0.360169380903244, -0.2041965276002884, 0.27031126618385315, -0.46944376826286316, 0.7244185209274292, 0.4276120066642761, -0.37132135033607483, 0.3749682605266571, -0.20102357864379883, 0.01484773401170969, -0.932371973991394, 0.10936673730611801, -0.0009316506912000477, -0.5197179913520813, -0.5660855770111084, 0.2558029592037201, 0.2267962098121643, -0.1282140165567398, -0.5784438848495483, 0.1423146277666092, -0.32923993468284607, -0.15111525356769562, -0.3356930911540985, -0.36530858278274536, 0.07842538505792618, 0.4503764808177948, 0.1319388449192047, 0.5896896123886108, 0.656713604927063, -0.6114436388015747, 0.4967065453529358, 0.48631900548934937, -0.40720227360725403, 0.5138006806373596, -0.9310818314552307, 0.18389753997325897, -0.2421690672636032, 0.17597554624080658, -0.7155992984771729, -0.3073262870311737, 0.09439196437597275, -0.301298588514328, 0.5244956016540527, -0.09083502739667892, -0.15362802147865295, -0.6201398372650146, -0.3120649755001068, 0.5767806768417358, 0.5714967250823975, -0.7822433114051819, 0.5474344491958618, 0.19909091293811798, 0.3178532123565674, -0.5636332631111145, -0.9149430990219116, -0.12149786204099655, -0.1579035520553589, -0.5181826949119568, 0.5755747556686401, 0.22919361293315887, 0.21770745515823364, 0.1594768911600113, 0.16370582580566406, -0.045029010623693466, -0.16026225686073303, 0.5427566170692444, 0.2581637501716614, -0.3046654760837555, 0.029368702322244644, -0.2287205159664154, -0.20196714997291565, 0.03217768296599388, -0.39619144797325134, 0.5418311357498169, -0.5480543375015259, -0.42894962430000305, -0.49404263496398926, 0.13303031027317047, 0.6880471706390381, -0.26593148708343506, 0.5850221514701843, 0.9348940253257751, -0.5155318379402161, 0.14591850340366364, -0.4336314797401428, -0.13842441141605377, -0.5527572631835938, 0.3276984691619873, -0.4538646340370178, -0.6289801001548767, 0.6400695443153381, 0.0485537052154541, -0.20812831819057465, 0.7078612446784973, 0.3320462107658386, -0.3063328266143799, 0.5935512185096741, 0.6891056299209595, 0.13034024834632874, 0.6570698022842407, -0.6488522887229919, 0.0418783500790596, -0.9044589400291443, -0.4343658685684204, -0.2301277369260788, -0.7091574668884277, -0.534355103969574, -0.31664347648620605, 0.2839404344558716, 0.10037931054830551, -0.6130043268203735, 0.5379009246826172, -0.7609511017799377, 0.5360546112060547, 1.0065664052963257, 0.5370365977287292, -0.15915706753730774, 0.08835315704345703, -0.018273264169692993, 0.10190188884735107, -0.5656143426895142, -0.26945868134498596, 0.8921514749526978, 0.5382072925567627, 0.6859946846961975, -0.1437191665172577, 0.5544167160987854, 0.11929517239332199, 0.07314757257699966, -0.7892742156982422, 0.3702715337276459, -0.3481528162956238, -0.5605167746543884, -0.09286953508853912, 0.052824586629867554, -0.992951512336731, -0.028592029586434364, -0.3819659948348999, -0.45448946952819824, 0.5765267610549927, 0.2052982747554779, -0.37668827176094055, 0.4805372357368469, -0.5459259152412415, 0.8411120176315308, -0.23117168247699738, -0.14933325350284576, 0.08579033613204956, -0.7634073495864868, 0.12902602553367615, -0.14410808682441711, -0.24807535111904144, 0.23286586999893188, 0.427241712808609, 0.754773736000061, -0.612803041934967, 0.9078406095504761, -0.30554652214050293, 0.29135969281196594, 0.42556893825531006, -0.4199596047401428, 0.14920702576637268, -0.24069646000862122, 0.34081724286079407, 0.3062328100204468, 0.15100787580013275, -0.5134944915771484, -0.32072532176971436, 0.3632526993751526, -0.9288679361343384, -0.39278751611709595, -0.38080763816833496, -0.26566556096076965, 0.227397620677948, 0.19090448319911957, 0.7849307060241699, 0.5993293523788452, 0.031483739614486694, 0.5109243988990784, 0.5704893469810486, -0.28189563751220703, 0.6573297381401062, -0.07766208052635193, -0.2357882708311081, -0.27899283170700073, 0.7098086476325989, 0.18039309978485107, 0.22087040543556213, 0.22388173639774323, 0.09286035597324371, -0.18997988104820251, -0.40645501017570496, -0.31137174367904663, 0.06039905920624733, -0.6893551349639893, -0.5274227261543274, -0.31598490476608276, -0.8339440822601318, -0.23619306087493896, -0.1829151064157486, -0.4018580913543701, -0.20105284452438354, -0.4054209887981415, -0.03316359594464302, 0.4574115574359894, 0.6783287525177002, -0.14537480473518372, 0.8047336339950562, -0.6839212775230408, 0.23266299068927765, 0.6630430221557617, 0.45341217517852783, -0.11679468303918839, -0.8149172067642212, -0.3400861620903015, 0.0071297911927104, -0.37060365080833435, -0.50243079662323, 0.49040642380714417, 0.44069546461105347, 0.5690234303474426, 0.6622937917709351, -0.17419594526290894, 0.9160959720611572, -0.5131904482841492, 0.7797742486000061, 0.3362603783607483, -0.8698624968528748, 0.5631926655769348, -0.030147748067975044, 0.3931860327720642, 0.27280813455581665, 0.37127143144607544, -0.19841985404491425, -0.017959443852305412, -0.6922095417976379, -0.5411596894264221, 0.4406851530075073, 0.12885156273841858, 0.2184862643480301, 0.1555708646774292, 0.5074465870857239, 0.008236111141741276, -0.027431314811110497, -0.6772538423538208, -0.16475310921669006, -0.683727502822876, -0.17285512387752533, -0.09774498641490936, -0.28508010506629944, 0.014892182312905788, -0.6588642001152039, 0.429513156414032, -0.10323499143123627, 0.8084241151809692, 0.2951883375644684, -0.2528562843799591, -0.07131338864564896, -0.22248952090740204, 0.47199591994285583, 0.3630600869655609, -0.24175499379634857, 0.18807688355445862, 0.0005207968060858548, -0.8247230052947998, 0.04090944677591324, 0.04230813682079315, -0.1049807146191597, 0.06090780720114708, 0.38035523891448975, 1.063686728477478, 0.07648501545190811, -0.14671938121318817, 0.7053886651992798, -0.045187562704086304, -0.38033074140548706, -0.41892892122268677, 0.12123146653175354, -0.22135266661643982, 0.47588059306144714, 0.4048301577568054, 0.4877457916736603, 0.040881067514419556, -0.19430413842201233, 0.36947983503341675, 0.3246002793312073, -0.58314448595047, -0.3602212071418762, 0.6669610738754272, 0.11644074320793152, -0.18470041453838348, 0.8564753532409668, 0.0490066260099411, -0.7288723587989807, 0.7910705208778381, 0.5075467824935913, 0.8159462213516235, -0.186618372797966, 0.16933515667915344, 0.4778177738189697, 0.37426435947418213, -0.08069858700037003, 0.2981870770454407, 0.018615014851093292, -0.9929599761962891, -0.37506532669067383, -0.7842023372650146, -0.13354246318340302, 0.19071798026561737, -0.9489246606826782, 0.4352419972419739, -0.3471265435218811, -0.3183269500732422, 0.1531379073858261, -0.1641530841588974, -1.1583430767059326, 0.44615474343299866, 0.30693912506103516, 0.8945367336273193, -0.7372408509254456, 1.0252197980880737, 0.7438365817070007, -0.41891324520111084, -0.7918323278427124, -0.3530167043209076, -0.3660077154636383, -0.9438568353652954, 0.6788405179977417, 0.47601449489593506, 0.08120225369930267, 0.21156322956085205, -0.808367133140564, -0.8317427635192871, 1.0198408365249634, 0.2945965826511383, -0.5269448757171631, -0.08715260773897171, 0.09831231832504272, 0.3359495997428894, -0.5130159854888916, 0.3267446458339691, 0.19076138734817505, 0.28965726494789124, 0.13958781957626343, -0.8513468503952026, -0.16875718533992767, -0.3697171211242676, 0.3608632981777191, 0.05272388085722923, -0.4545663893222809, 0.8914752006530762, -0.09394393861293793, 0.053526636213064194, 0.0036962488666176796, 0.5632116198539734, -0.19917894899845123, -0.10563082993030548, 0.7677835822105408, 0.6159440875053406, 0.38791728019714355, -0.24074941873550415, 0.8662774562835693, -0.12215669453144073, 0.447322279214859, 0.774769127368927, 0.2984778881072998, 0.7142910957336426, 0.4914058446884155, -0.10782908648252487, 0.6312257647514343, 0.9319957494735718, -0.47542232275009155, 0.7263970375061035, 0.06895909458398819, -0.03886311128735542, -0.23909850418567657, 0.12408100068569183, -0.5462531447410583, 0.6877171993255615, 0.4428049921989441, -0.7105947136878967, -0.04065882787108421, 0.42269185185432434, -0.5261018872261047, -0.3550480306148529, -0.6467669010162354, 0.6162445545196533, -0.008189982734620571, -0.42201992869377136, 0.6787257790565491, -0.21014516055583954, 0.7313552498817444, -0.3627025783061981, -0.023350952193140984, -0.06172511726617813, 0.3559470474720001, -0.2874976098537445, -0.8826301693916321, 0.38633766770362854, -0.22509588301181793, -0.06958878040313721, -0.17009560763835907, 0.847028911113739, -0.28205060958862305, -0.4949265718460083, 0.1574857532978058, 0.07849173247814178, 0.2881048917770386, -0.22493590414524078, -0.5504303574562073, -0.2004941701889038, -0.110329769551754, -0.27596595883369446, 0.23131416738033295, 0.3492492139339447, 0.05839226022362709, 0.43719273805618286, 0.5093498229980469, -0.10691002011299133, 0.3337112367153168, -0.026367835700511932, 1.0184792280197144, -0.5886136889457703, -0.3614512085914612, -0.5433629155158997, 0.6429886221885681, -0.17051295936107635, -0.4388733506202698, 0.31351998448371887, 0.3123094141483307, 1.003440022468567, -0.46395426988601685, 0.40017813444137573, -0.06073165684938431, 0.055518653243780136, -0.29062962532043457, 0.6151204109191895, -0.3627442717552185, -0.20586156845092773, -0.07362087070941925, -0.9402324557304382, -0.29616478085517883, 0.9483094811439514, -0.053355660289525986, -0.052768148481845856, 0.48292067646980286, 0.6424583792686462, -0.2743515074253082, -0.10421104729175568, 0.3849864602088928, -0.04257730022072792, -0.02318190224468708, 0.44580546021461487, 0.7484702467918396, -0.735146701335907, 0.4273358881473541, -0.5085052251815796, -0.19373708963394165, -0.1126183494925499, -0.6921567320823669, -0.8761409521102905, -0.6542180776596069, -0.3876636326313019, -0.43270638585090637, -0.14444372057914734, 0.6489656567573547, 1.0504077672958374, -0.8671233654022217, 0.05329534411430359, -0.10760995000600815, -0.2696753442287445, -0.2676469683647156, -0.17666032910346985, 0.3603493273258209, -0.22210876643657684, -0.7243987321853638, -0.21904605627059937, -0.057092878967523575, 0.24234901368618011, -0.3121199607849121, 0.018188755959272385, -0.15283387899398804, -0.238599494099617, 0.5017131567001343, 0.20082257688045502, -0.5526894330978394, -0.7031580805778503, -0.06947693973779678, -0.05231393501162529, 0.2925708293914795, 0.4786642789840698, -0.923753559589386, 0.41291573643684387, 0.3732372522354126, 0.5420060157775879, 0.8488898277282715, -0.05941912159323692, 0.4172990322113037, -0.7552327513694763, 0.3114422857761383, 0.032848749309778214, 0.5231317281723022, 0.21994061768054962, -0.36103174090385437, 0.4272669553756714, 0.17345981299877167, -0.6396242380142212, -0.5078142285346985, 0.07220384478569031, -1.1444880962371826, -0.09060108661651611, 0.7127399444580078, -0.3807608485221863, -0.4723339080810547, 0.12268195301294327, -0.21113762259483337, 0.4267819821834564, 0.053088702261447906, 0.36341652274131775, 0.28653743863105774, 0.07533252239227295, -0.5015032291412354, -0.26375165581703186, 0.3280651271343231, 0.047719571739435196, -0.4167936146259308, -0.8368603587150574, 0.005107974633574486, 0.3267958164215088, 0.4989093542098999, 0.10731789469718933, -0.2826710641384125, 0.2672822177410126, 0.1480160355567932, 0.3423142731189728, -0.04286130145192146, -0.3184957802295685, -0.3927505612373352, 0.15769624710083008, -0.1729288250207901, -0.9174627065658569 ]
patrickvonplaten/wavlm-libri-clean-100h-base-plus
patrickvonplaten
"2021-12-20T12:59:01Z"
27,055
3
transformers
[ "transformers", "pytorch", "tensorboard", "wavlm", "automatic-speech-recognition", "librispeech_asr", "generated_from_trainer", "wavlm_libri_finetune", "endpoints_compatible", "region:us" ]
automatic-speech-recognition
"2022-03-02T23:29:05Z"
--- tags: - automatic-speech-recognition - librispeech_asr - generated_from_trainer - wavlm_libri_finetune model-index: - name: wavlm-libri-clean-100h-base-plus 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. --> # wavlm-libri-clean-100h-base-plus This model is a fine-tuned version of [microsoft/wavlm-base-plus](https://huggingface.co/microsoft/wavlm-base-plus) on the LIBRISPEECH_ASR - CLEAN dataset. It achieves the following results on the evaluation set: - Loss: 0.0819 - Wer: 0.0683 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0003 - train_batch_size: 4 - eval_batch_size: 4 - seed: 42 - distributed_type: multi-GPU - num_devices: 8 - total_train_batch_size: 32 - total_eval_batch_size: 32 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - num_epochs: 3.0 - mixed_precision_training: Native AMP ### Training results | Training Loss | Epoch | Step | Validation Loss | Wer | |:-------------:|:-----:|:----:|:---------------:|:------:| | 2.8877 | 0.34 | 300 | 2.8649 | 1.0 | | 0.2852 | 0.67 | 600 | 0.2196 | 0.1830 | | 0.1198 | 1.01 | 900 | 0.1438 | 0.1273 | | 0.0906 | 1.35 | 1200 | 0.1145 | 0.1035 | | 0.0729 | 1.68 | 1500 | 0.1055 | 0.0955 | | 0.0605 | 2.02 | 1800 | 0.0936 | 0.0859 | | 0.0402 | 2.35 | 2100 | 0.0885 | 0.0746 | | 0.0421 | 2.69 | 2400 | 0.0848 | 0.0700 | ### Framework versions - Transformers 4.15.0.dev0 - Pytorch 1.9.0+cu111 - Datasets 1.16.2.dev0 - Tokenizers 0.10.3
[ -0.5655277967453003, -0.5423978567123413, 0.05054882913827896, 0.0604984350502491, -0.24545200169086456, -0.2948710024356842, -0.14094868302345276, -0.4177568256855011, 0.003873823443427682, 0.3549882471561432, -0.8137287497520447, -0.7032793164253235, -0.6390790343284607, -0.37048444151878357, -0.31543493270874023, 1.1842271089553833, 0.1803511381149292, 0.2749606668949127, -0.10025032609701157, -0.25733786821365356, -0.5317299365997314, -0.7663024663925171, -0.8931158185005188, -0.8078850507736206, 0.24582061171531677, 0.23235638439655304, 0.7507990598678589, 0.652658998966217, 0.533677875995636, 0.24396894872188568, -0.4847087562084198, -0.13803631067276, -0.41992124915122986, -0.3239421546459198, 0.11931168287992477, -0.31647008657455444, -0.9409534335136414, 0.042626090347766876, 0.6978513598442078, 0.5000338554382324, -0.2600434720516205, 0.8388335704803467, 0.04059895873069763, 0.49576759338378906, -0.5000908970832825, 0.18415193259716034, -0.5102626085281372, 0.2749597132205963, -0.19287042319774628, -0.31039151549339294, -0.1578664630651474, -0.02368224784731865, 0.0625828430056572, -0.5659130811691284, 0.5074690580368042, 0.0026449263095855713, 1.3806211948394775, 0.28326356410980225, -0.4968394339084625, 0.12100672721862793, -0.748758852481842, 0.9230444431304932, -0.7938385605812073, 0.614454984664917, 0.377678781747818, 0.38785937428474426, 0.1247834861278534, -0.7802932262420654, -0.4375090003013611, 0.008771726861596107, 0.09245705604553223, 0.31862133741378784, -0.21501538157463074, 0.034758973866701126, 0.9295288324356079, 0.5755130648612976, -0.7377726435661316, 0.06474440544843674, -0.6869419813156128, -0.4346223473548889, 0.7728634476661682, 0.43888089060783386, -0.19424806535243988, -0.036674074828624725, -0.5416749715805054, -0.1459244191646576, -0.507917582988739, 0.413433313369751, 0.5504404306411743, 0.3122435510158539, -0.512986421585083, 0.47609201073646545, -0.1210528165102005, 0.8935686349868774, -0.08355241268873215, -0.3251706659793854, 0.836879551410675, -0.05556450039148331, -0.5013842582702637, 0.21948373317718506, 0.7738706469535828, 0.5493475794792175, 0.11520734429359436, 0.3367769420146942, -0.4343581795692444, 0.06433167308568954, 0.1469467282295227, -0.9991101622581482, -0.2959437668323517, 0.32898110151290894, -0.6715267300605774, -0.5236139297485352, 0.10548308491706848, -0.40783554315567017, 0.105445995926857, -0.6306285262107849, 0.5929316282272339, -0.4122540056705475, -0.3268567621707916, 0.16247470676898956, -0.18536172807216644, 0.4362977147102356, 0.14270667731761932, -0.7345578670501709, 0.47095414996147156, 0.534195601940155, 0.577477753162384, 0.04091954231262207, -0.319606214761734, -0.4429551959037781, 0.07507196068763733, -0.22060352563858032, 0.5177483558654785, -0.08359766006469727, -0.6130034327507019, -0.21080400049686432, 0.11338693648576736, -0.05469425022602081, -0.5988163352012634, 0.8631752729415894, -0.44451120495796204, 0.27453961968421936, -0.13475550711154938, -0.6409779191017151, -0.3152504563331604, 0.38991326093673706, -0.6374083757400513, 1.3989996910095215, 0.035456255078315735, -0.7813514471054077, 0.6503254175186157, -0.7074314951896667, -0.28281062841415405, -0.08344829082489014, -0.1331656575202942, -0.8740290403366089, -0.11149055510759354, 0.013777113519608974, 0.3423953950405121, -0.34373074769973755, 0.4124182462692261, -0.2571845054626465, -0.7065901756286621, 0.06832495331764221, -0.8317258954048157, 1.1825488805770874, 0.22248147428035736, -0.5522053837776184, 0.48951590061187744, -1.482109785079956, 0.4257544279098511, 0.0903310626745224, -0.5568597316741943, 0.2271369993686676, -0.438992977142334, 0.5442350506782532, 0.39710208773612976, 0.3153611421585083, -0.5975132584571838, 0.000981116434559226, -0.3436530530452728, 0.1734047830104828, 0.6179224848747253, -0.024182647466659546, 0.04488842561841011, -0.5175592303276062, 0.3952941298484802, 0.09669622033834457, 0.5300581455230713, 0.1362590789794922, -0.5648470520973206, -0.8644444942474365, -0.3652234375476837, 0.10468699038028717, 0.44361117482185364, -0.041807059198617935, 0.7597396969795227, -0.13365738093852997, -0.7298507690429688, -0.5746460556983948, 0.08397217094898224, 0.5191980600357056, 0.7346487045288086, 0.6580471992492676, -0.057006631046533585, -0.6439729928970337, -1.1134315729141235, 0.019919423386454582, 0.06378689408302307, 0.05185529217123985, 0.27852582931518555, 0.5645085573196411, -0.23346318304538727, 0.8922134637832642, -0.5826318860054016, -0.30090972781181335, -0.12099604308605194, -0.07245957106351852, 0.6543443202972412, 0.8296719789505005, 0.5768188238143921, -0.6536290049552917, -0.21774496138095856, -0.24282626807689667, -0.6984828114509583, 0.28045228123664856, -0.041551850736141205, -0.15496867895126343, -0.014763611368834972, 0.31525737047195435, -0.6285394430160522, 0.7892669439315796, 0.5332346558570862, -0.5143004655838013, 0.9584921002388, -0.379128098487854, -0.13578586280345917, -1.138967752456665, 0.3887200653553009, 0.03327599912881851, -0.306713730096817, -0.4211558401584625, -0.015587903559207916, 0.14670342206954956, -0.3679403066635132, -0.44433289766311646, 0.7010408639907837, -0.2867003083229065, 0.049109842628240585, -0.1181766539812088, -0.34527987241744995, 0.11396370828151703, 0.6885780692100525, 0.21137364208698273, 0.6349332928657532, 0.8509432077407837, -0.6266028881072998, 0.397208571434021, 0.35119813680648804, -0.4096176326274872, 0.42987897992134094, -0.9134790897369385, 0.12068333476781845, 0.09171487390995026, 0.036944255232810974, -0.6985843181610107, -0.05893649160861969, 0.2529807388782501, -0.5430747270584106, 0.4282524883747101, -0.24623596668243408, -0.25850287079811096, -0.49184057116508484, -0.18981125950813293, 0.25589290261268616, 0.6774818301200867, -0.48998892307281494, 0.5777794718742371, 0.03709664195775986, 0.42460471391677856, -0.6063145995140076, -0.8637895584106445, -0.3479456603527069, -0.18445365130901337, -0.5139040946960449, 0.3134855329990387, -0.12393815815448761, -0.043956488370895386, -0.12886245548725128, -0.3348952531814575, -0.1403769701719284, 0.06739480793476105, 0.5923277139663696, 0.45646777749061584, -0.31366461515426636, -0.10391690582036972, -0.14782068133354187, -0.43692874908447266, 0.2677305042743683, -0.1397196501493454, 0.7718483805656433, -0.2883895933628082, -0.6073497533798218, -0.9075739979743958, 0.025872239843010902, 0.5699846744537354, -0.39880889654159546, 0.7763242721557617, 0.9818748831748962, -0.45479562878608704, -0.028439143672585487, -0.5016883611679077, -0.1546548753976822, -0.49737268686294556, 0.5397610068321228, -0.5408814549446106, -0.3526437282562256, 0.8065956830978394, 0.20244647562503815, 0.16909681260585785, 0.8991660475730896, 0.547639012336731, 0.050369277596473694, 1.2028366327285767, 0.24015040695667267, -0.04825926944613457, 0.32070061564445496, -0.9980558156967163, -0.28492435812950134, -0.8572725653648376, -0.542779803276062, -0.4464784562587738, -0.3650329113006592, -0.5040326118469238, -0.059699032455682755, 0.17629669606685638, 0.13972575962543488, -0.9623035192489624, 0.17194025218486786, -0.6352179646492004, 0.1626405566930771, 0.9159966111183167, 0.3334544897079468, 0.08032756298780441, 0.08515456318855286, -0.22014564275741577, 0.0015479112043976784, -0.8301430344581604, -0.3695812523365021, 1.2859550714492798, 0.44493868947029114, 0.7079477906227112, -0.04709768667817116, 0.8295010924339294, -0.006483559496700764, 0.28326600790023804, -0.7223144769668579, 0.4106590151786804, 0.11857597529888153, -1.028605580329895, -0.22619424760341644, -0.36529508233070374, -0.7992125749588013, 0.20346471667289734, -0.4149784743785858, -0.7231265306472778, 0.3673256039619446, 0.3463316261768341, -0.41108253598213196, 0.5305913090705872, -0.4793272912502289, 1.1714128255844116, -0.3247956931591034, -0.31017863750457764, -0.12117459625005722, -0.6286213994026184, 0.193393737077713, 0.03624609485268593, -0.027299363166093826, -0.1685572862625122, 0.15839622914791107, 0.9201666712760925, -0.7080409526824951, 0.5233608484268188, -0.4763203561306, 0.20753449201583862, 0.4799876809120178, -0.24084527790546417, 0.5826807618141174, 0.10966011136770248, -0.3048607110977173, 0.2856694757938385, 0.10712515562772751, -0.6188009977340698, -0.4266289472579956, 0.7180222272872925, -1.1585392951965332, -0.3160068988800049, -0.4872959554195404, -0.6385584473609924, -0.13786672055721283, 0.24842171370983124, 0.6803898215293884, 1.033295750617981, 0.15660330653190613, 0.3272243142127991, 0.6164259910583496, -0.05780806764960289, 0.32075053453445435, 0.5174318552017212, -0.24197867512702942, -0.6851608753204346, 1.078109860420227, 0.010397974401712418, 0.22086074948310852, -0.08089832216501236, 0.15558166801929474, -0.4589993953704834, -0.591889500617981, -0.48563212156295776, 0.07127393782138824, -0.7342415452003479, -0.33662348985671997, -0.4248766303062439, -0.48217299580574036, -0.30415087938308716, -0.013723085634410381, -0.4995240569114685, -0.2378954142332077, -0.600214421749115, -0.13458067178726196, 0.5456042885780334, 0.4508664906024933, 0.14846359193325043, 0.4584304988384247, -0.8349049687385559, 0.0022663797717541456, 0.044718410819768906, 0.5193794965744019, 0.21725817024707794, -1.0246278047561646, -0.3077121675014496, 0.09971389919519424, -0.3817172646522522, -0.700663149356842, 0.4484701454639435, 0.12021621316671371, 0.7826813459396362, 0.5282973647117615, -0.223109170794487, 1.1575227975845337, -0.31128013134002686, 0.8849149942398071, 0.48474910855293274, -0.7877522706985474, 0.48848795890808105, -0.2999347448348999, 0.4840894341468811, 0.6719145178794861, 0.40860575437545776, -0.33317163586616516, -0.16958850622177124, -1.26870858669281, -0.9950733780860901, 0.8903272151947021, 0.3144718408584595, 0.09142179042100906, 0.19152915477752686, 0.26555925607681274, -0.1896214783191681, 0.2649112343788147, -0.7301762700080872, -0.8521890044212341, -0.3276081085205078, -0.25127702951431274, -0.04900769889354706, -0.27694931626319885, -0.18109634518623352, -0.8192640542984009, 1.1367948055267334, 0.12729261815547943, 0.22636830806732178, 0.2432069331407547, 0.035651493817567825, 0.0077985976822674274, 0.010203390382230282, 0.6113841533660889, 0.7663505673408508, -0.6905863881111145, -0.1333652138710022, 0.337455689907074, -0.6521578431129456, 0.08179475367069244, 0.3163040280342102, -0.1781320720911026, 0.19624124467372894, 0.43511736392974854, 1.2405436038970947, 0.24421827495098114, -0.44195160269737244, 0.5636209845542908, 0.07515774667263031, -0.45126497745513916, -0.5881462097167969, 0.1503721922636032, 0.059777624905109406, 0.3123511075973511, 0.42406097054481506, 0.5047810673713684, 0.10880494862794876, -0.3347473740577698, 0.3238203823566437, 0.32964783906936646, -0.7858953475952148, -0.24342794716358185, 1.0253032445907593, -0.028187137097120285, -0.40029892325401306, 0.7562596797943115, -0.1486581265926361, -0.38095492124557495, 0.8995934724807739, 0.6244511604309082, 0.8811339139938354, -0.18596546351909637, -0.25710687041282654, 0.7856069803237915, 0.02366206981241703, 0.042964741587638855, 0.7627426385879517, 0.001456580706872046, -0.5718418955802917, -0.2549859881401062, -0.8549265265464783, -0.12260785698890686, 0.5839308500289917, -1.34856116771698, 0.6203330159187317, -0.44900599122047424, -0.6090434789657593, 0.217076376080513, 0.28624820709228516, -1.1669820547103882, 0.601641058921814, 0.22439517080783844, 1.3793699741363525, -0.8126339912414551, 1.0194405317306519, 0.7567607760429382, -0.562900185585022, -1.2577109336853027, -0.371466726064682, -0.07337846606969833, -0.858837902545929, 0.812044084072113, 0.011447109282016754, 0.15244537591934204, 0.3263137936592102, -0.4904032349586487, -1.0109584331512451, 1.2419157028198242, 0.19668753445148468, -0.6980463862419128, 0.18309535086154938, 0.05557774007320404, 0.5594253540039062, -0.10535905510187149, 0.5117737054824829, 0.3682970702648163, 0.33465510606765747, 0.12884502112865448, -1.0711781978607178, 0.042825739830732346, -0.39397767186164856, -0.10661691427230835, 0.15889033675193787, -0.6888267993927002, 1.1361604928970337, -0.09069807082414627, 0.32299304008483887, 0.04874991625547409, 0.6546512246131897, 0.5497941374778748, 0.3195089101791382, 0.4960392117500305, 0.7545351386070251, 0.7762553691864014, -0.11654451489448547, 1.0643422603607178, -0.7159085273742676, 0.8667076230049133, 1.3731945753097534, -0.04198029264807701, 0.768194317817688, 0.40277454257011414, -0.4232539236545563, 0.37904468178749084, 0.7301319241523743, -0.4403994679450989, 0.2627924382686615, 0.20846723020076752, -0.21006813645362854, -0.4309779703617096, 0.20900040864944458, -0.75743168592453, 0.34958645701408386, 0.08972170203924179, -0.6136196851730347, -0.2855492830276489, -0.09398256242275238, -0.13816793262958527, -0.34264492988586426, -0.5674474239349365, 0.5995665788650513, -0.23252542316913605, -0.10365595668554306, 0.9090402722358704, -0.055043842643499374, 0.6148613691329956, -0.8004332780838013, -0.10464996099472046, 0.05565172806382179, 0.38776320219039917, -0.5053185820579529, -0.7006886601448059, 0.21749189496040344, -0.04459787532687187, -0.3033096194267273, 0.022525444626808167, 0.6518213748931885, -0.3956984877586365, -0.839593768119812, 0.19991707801818848, 0.343545138835907, 0.27717825770378113, -0.05581904947757721, -1.0648243427276611, 0.08791942149400711, 0.09748619794845581, -0.5440629720687866, 0.14684447646141052, 0.106735959649086, 0.0037250935565680265, 0.6588132381439209, 0.7896003127098083, 0.12332704663276672, 0.18890833854675293, 0.3957170248031616, 1.0115389823913574, -0.7530099153518677, -0.5556023120880127, -0.7210177779197693, 0.7168961763381958, -0.2625791132450104, -0.8187009692192078, 0.7758143544197083, 1.326128602027893, 0.8185706734657288, -0.06561444699764252, 0.5856107473373413, 0.11799386888742447, 0.44140541553497314, -0.37137776613235474, 0.8711153268814087, -0.7376934885978699, -0.005874308291822672, -0.16980549693107605, -0.876895010471344, -0.11191529780626297, 0.62343829870224, -0.2905764579772949, 0.11880127340555191, 0.333693265914917, 0.8003160357475281, -0.10783977061510086, 0.04448719322681427, 0.34344756603240967, -0.04890100285410881, 0.26304441690444946, 0.37117186188697815, 0.5690688490867615, -0.9279409050941467, 0.6390736699104309, -0.5997850894927979, -0.014468938112258911, -0.008412628434598446, -0.59895259141922, -0.8535817861557007, -0.30589744448661804, -0.531806230545044, -0.5817758440971375, -0.09089895337820053, 1.272351622581482, 0.9353967308998108, -1.0167983770370483, -0.425800621509552, 0.03184899687767029, -0.3168416917324066, -0.47626686096191406, -0.2583741545677185, 0.6863492131233215, -0.22410370409488678, -0.6810085773468018, 0.02369609847664833, -0.3824804425239563, 0.3531150817871094, -0.19733193516731262, -0.34553247690200806, -0.17213617265224457, -0.31415462493896484, 0.37818455696105957, 0.009144644252955914, -0.5787085890769958, -0.27728140354156494, -0.12685254216194153, -0.05307843163609505, 0.25364208221435547, 0.4085148870944977, -0.7063255906105042, 0.374677836894989, 0.3036015033721924, 0.12623676657676697, 0.9503415822982788, 0.00525208143517375, 0.20745322108268738, -0.8890358805656433, 0.5442594289779663, 0.34790629148483276, 0.4604592025279999, 0.061479635536670685, -0.26722073554992676, 0.2996225655078888, 0.4144061803817749, -0.513330340385437, -0.9917474389076233, -0.21009384095668793, -1.1693003177642822, 0.06987117975950241, 1.2594783306121826, 0.10131992399692535, -0.3759840726852417, 0.054931920021772385, -0.34070447087287903, 0.37402477860450745, -0.3462333679199219, 0.2666919529438019, 0.5867480039596558, -0.1277776062488556, 0.14648695290088654, -0.7468689680099487, 0.6596211194992065, 0.09479368478059769, -0.49666380882263184, -0.15309301018714905, 0.42720434069633484, 0.6955764293670654, 0.12079746276140213, 0.5254303216934204, -0.15613047778606415, 0.4059610664844513, 0.3077456057071686, 0.5796228051185608, -0.5970028638839722, -0.1528887152671814, -0.5174469351768494, 0.1449664682149887, 0.128300741314888, -0.5245515704154968 ]
laion/mscoco_finetuned_CoCa-ViT-L-14-laion2B-s13B-b90k
laion
"2023-06-11T03:17:37Z"
27,021
17
open_clip
[ "open_clip", "image-to-text", "license:mit", "has_space", "region:us" ]
image-to-text
"2023-02-03T21:43:31Z"
--- license: mit pipeline_tag: image-to-text ---
[ -0.12853388488292694, -0.18616782128810883, 0.6529127359390259, 0.4943625330924988, -0.19319313764572144, 0.23607465624809265, 0.36071982979774475, 0.05056332051753998, 0.5793652534484863, 0.740013837814331, -0.6508103013038635, -0.2378396987915039, -0.710224986076355, -0.04782581701874733, -0.3894752264022827, 0.8470761775970459, -0.09598272293806076, 0.024004854261875153, 0.047120071947574615, -0.14317826926708221, -0.6121037602424622, -0.04771740734577179, -1.0524537563323975, -0.06787490844726562, 0.3002279996871948, 0.5120972990989685, 0.8275896310806274, 0.39602896571159363, 0.5030564069747925, 1.7515558004379272, -0.08836919069290161, -0.22754427790641785, -0.45892032980918884, 0.4223068356513977, -0.33277371525764465, -0.42133718729019165, -0.2624166011810303, -0.07449338585138321, 0.32380399107933044, 0.790371298789978, -0.38104110956192017, 0.19328099489212036, -0.22438454627990723, 1.008224368095398, -0.8202074766159058, 0.22630876302719116, -0.16698351502418518, 0.14053204655647278, 0.042308706790208817, -0.14591927826404572, -0.1326323002576828, -0.6440033912658691, 0.06469469517469406, -0.899596095085144, 0.1027495265007019, -0.04461126774549484, 0.8789561986923218, 0.21909058094024658, -0.5102370977401733, -0.0459773913025856, -0.6883594989776611, 1.0972508192062378, -0.17556026577949524, 0.7615712881088257, 0.4507811963558197, 0.45288562774658203, -0.5849329829216003, -1.178217887878418, -0.4441864490509033, -0.13579002022743225, 0.14722809195518494, 0.30556100606918335, -0.3453029692173004, -0.022343844175338745, 0.10801105946302414, 0.5610314011573792, -0.5003758072853088, -0.311959445476532, -0.9579929113388062, -0.18164916336536407, 0.6820483207702637, 0.319308340549469, 0.834044337272644, 0.1873151659965515, -0.7347195744514465, 0.12866291403770447, -1.3239703178405762, 0.07650735974311829, 0.6465023756027222, 0.239467591047287, -0.554598867893219, 0.8594784736633301, -0.28587982058525085, 0.626249372959137, 0.2728465497493744, -0.1164526641368866, 0.2784252464771271, -0.23030735552310944, -0.2735062837600708, 0.033087607473134995, 0.34597301483154297, 0.8204491138458252, 0.16248634457588196, -0.019984982907772064, -0.22123965620994568, 0.0020717978477478027, 0.2684449553489685, -0.7935096025466919, -0.4712669551372528, 0.1926696002483368, -0.558952808380127, -0.0910850465297699, 0.4327022135257721, -1.0976827144622803, -0.4812980592250824, -0.1879846155643463, 0.05468139797449112, -0.5451693534851074, -0.3697946071624756, 0.07273250073194504, -0.79254150390625, -0.1243419200181961, 0.570950984954834, -0.6230252981185913, 0.43974608182907104, 0.533625602722168, 0.7861635684967041, 0.2330387681722641, -0.23613610863685608, -0.6695019602775574, 0.48848265409469604, -0.8661867380142212, 0.36860740184783936, -0.3073781132698059, -0.8298640251159668, -0.09631050378084183, 0.5393159985542297, 0.20664852857589722, -0.6653256416320801, 0.7074045538902283, -0.5496984720230103, -0.07806532829999924, -0.4308285415172577, -0.2432200014591217, 0.17460417747497559, 0.11115431040525436, -0.6238909363746643, 0.9402233362197876, 0.5551108121871948, -0.584109902381897, 0.31701239943504333, -0.4869506359100342, -0.6865583658218384, 0.26748135685920715, -0.008750975131988525, -0.047152332961559296, 0.3279528021812439, -0.15983973443508148, -0.0020511597394943237, 0.10505761206150055, 0.008299741894006729, -0.21891699731349945, -0.4786304235458374, 0.06349936127662659, 0.151650071144104, 1.25368332862854, 0.4083622097969055, -0.3771882951259613, -0.13140122592449188, -1.0526149272918701, 0.025432661175727844, 0.0505015105009079, -0.42306768894195557, -0.2504565119743347, -0.14882194995880127, -0.20381587743759155, 0.4307260811328888, 0.2118472456932068, -0.813115119934082, 0.22643625736236572, -0.2064024657011032, 0.364496648311615, 0.8222091794013977, 0.2703101634979248, 0.39760565757751465, -0.6625286340713501, 0.6563138365745544, 0.2076188325881958, 0.49590179324150085, 0.35404202342033386, -0.3845822811126709, -0.9641586542129517, -0.442161500453949, -0.10117404907941818, 0.2975531220436096, -0.7744957804679871, 0.5847322940826416, 0.012979604303836823, -0.5836705565452576, -0.4465281367301941, -0.15488101541996002, 0.2755330502986908, -0.06606576591730118, 0.03334902226924896, -0.4049779176712036, -0.7394417524337769, -1.0127898454666138, -0.13788150250911713, -0.5021388530731201, -0.21892830729484558, 0.3160586357116699, 0.2617739737033844, -0.34290042519569397, 0.7610747814178467, -0.6059278249740601, -0.704064130783081, -0.13973554968833923, -0.0995984673500061, 0.6187719702720642, 0.9297672510147095, 0.749138355255127, -0.7224893569946289, -0.8973818421363831, -0.056230708956718445, -0.5420039892196655, -0.020044349133968353, 0.038149889558553696, -0.18260693550109863, -0.10514980554580688, 0.22352531552314758, -0.6100803017616272, 0.8851073980331421, 0.43224984407424927, -0.681546688079834, 0.5210590958595276, -0.4444413483142853, 0.6073803901672363, -0.8642839193344116, -0.2911490201950073, -0.16823577880859375, -0.1976117193698883, -0.7090160846710205, 0.19411544501781464, -0.3002234101295471, -0.33029863238334656, -0.7474032044410706, 0.5274897813796997, -0.9497010707855225, -0.18781527876853943, -0.33672773838043213, -0.03423111140727997, 0.25807833671569824, 0.19490505754947662, -0.23560254275798798, 0.8900529742240906, 0.9160482287406921, -0.7121306657791138, 0.5487277507781982, 0.3930906653404236, -0.1920013427734375, 0.7131237387657166, -0.3887738585472107, 0.05161993205547333, -0.12344931066036224, 0.14374595880508423, -1.126388430595398, -0.561158299446106, 0.13677382469177246, -0.712703287601471, 0.17686958611011505, -0.16556859016418457, -0.09428537636995316, -0.6608465313911438, -0.33806395530700684, 0.25910091400146484, 0.48612290620803833, -0.47969940304756165, 0.6188148260116577, 0.5728040337562561, 0.02651876211166382, -0.5307406783103943, -0.7206818461418152, 0.20418110489845276, 0.039646461606025696, -0.5569695830345154, 0.3011690080165863, 0.006543457508087158, -0.6622446775436401, -0.371124804019928, -0.26354190707206726, -0.6043857336044312, -0.2267974615097046, 0.7826986312866211, 0.1199423298239708, -0.09012264013290405, -0.20310267806053162, -0.3199536204338074, -0.06167525798082352, 0.30487415194511414, -0.07575298100709915, 0.7232834696769714, -0.33623749017715454, -0.17850083112716675, -0.887734055519104, 0.652754545211792, 0.9970465302467346, 0.09446714073419571, 0.806644082069397, 0.46324217319488525, -0.35647475719451904, -0.1304660439491272, -0.3535459041595459, -0.15120601654052734, -0.685774564743042, -0.1806798279285431, -0.5322476625442505, -0.5411434769630432, 0.40530654788017273, 0.10101459175348282, -0.0021042972803115845, 0.5167046785354614, 0.2533605694770813, -0.28806859254837036, 0.7550324201583862, 1.034340739250183, 0.1391797959804535, 0.3602915108203888, -0.2854715585708618, 0.6341594457626343, -0.8329949378967285, -0.34052175283432007, -0.4548071026802063, -0.2563585042953491, -0.31214389204978943, -0.10750849545001984, 0.5791022181510925, 0.2818215489387512, -0.4463467597961426, 0.1250680536031723, -0.5994209051132202, 0.6587361693382263, 0.6273988485336304, 0.5719727873802185, 0.1997303068637848, -0.46199458837509155, 0.19982971251010895, 0.04816687852144241, -0.45745599269866943, -0.4009109139442444, 0.7711143493652344, 0.2399624139070511, 0.8364022374153137, 0.20927050709724426, 0.4957774877548218, 0.33375421166419983, 0.2528058588504791, -0.6318977475166321, 0.2009797990322113, -0.22282809019088745, -1.245961308479309, -0.206426739692688, -0.16551318764686584, -1.0080583095550537, -0.11792082339525223, -0.18288995325565338, -0.8406620025634766, 0.2665729820728302, -0.19225634634494781, -0.6640645265579224, 0.5206149220466614, -0.5103875398635864, 0.69347083568573, -0.23555898666381836, -0.2817087769508362, 0.11930079013109207, -0.6889920830726624, 0.5254612565040588, 0.3667147755622864, 0.29168397188186646, -0.37968993186950684, -0.3192872405052185, 0.5068994760513306, -0.881224513053894, 0.44081127643585205, -0.10564978420734406, 0.19428130984306335, 0.5358879566192627, 0.4153591990470886, 0.3823971152305603, 0.28699052333831787, -0.2459377944469452, -0.23415414988994598, 0.2250344604253769, -0.7581346035003662, -0.27754613757133484, 0.9095459580421448, -0.7519428730010986, -0.8586915731430054, -0.6954255700111389, -0.30644941329956055, 0.28865277767181396, 0.02781464159488678, 0.7154772281646729, 0.6456884145736694, -0.18821057677268982, 0.23776991665363312, 0.7208225727081299, -0.0146945184096694, 0.7235562801361084, 0.29411184787750244, -0.4056646227836609, -0.6169787645339966, 0.7182320356369019, 0.2627044916152954, 0.05162655562162399, 0.028327951207756996, 0.3058736026287079, -0.17546698451042175, -0.15078596770763397, -0.6318323612213135, -0.06395323574542999, -0.7465729117393494, -0.0927949845790863, -0.7541396617889404, -0.2507742643356323, -0.7114590406417847, -0.8068137764930725, -0.7080163955688477, -0.45604395866394043, -0.43011948466300964, -0.23352204263210297, 0.5163108706474304, 1.1627086400985718, -0.2613152861595154, 0.8011051416397095, -0.8900954723358154, 0.41936296224594116, 0.4969540238380432, 0.7519731521606445, -0.11061006784439087, -0.6746935844421387, -0.07836239039897919, -0.5338755249977112, -0.29485058784484863, -1.0156972408294678, 0.31774646043777466, -0.03688591718673706, 0.40537136793136597, 0.42938894033432007, 0.25190269947052, 0.49392756819725037, -0.30073118209838867, 1.1130688190460205, 0.7274302244186401, -0.803381085395813, 0.519527792930603, -0.7635002136230469, 0.16122324764728546, 0.9363659620285034, 0.54477459192276, -0.4417075514793396, -0.15113934874534607, -1.025976538658142, -0.843137264251709, 0.5963036417961121, 0.15439945459365845, 0.016843896359205246, 0.01821417547762394, 0.03168272227048874, 0.29466384649276733, 0.3591304123401642, -0.7847291231155396, -0.8240220546722412, -0.13851122558116913, 0.25803306698799133, 0.31456053256988525, -0.1648542582988739, -0.3003871440887451, -0.611615777015686, 0.8711391091346741, 0.18286482989788055, 0.3546231985092163, 0.12073354423046112, 0.04369349032640457, -0.35506919026374817, 0.14787021279335022, 0.5522999167442322, 1.2529057264328003, -0.40983331203460693, 0.3673911392688751, 0.1751260608434677, -0.6540069580078125, 0.6494997143745422, -0.3036349415779114, -0.021784601733088493, 0.6203135251998901, 0.17760884761810303, 0.28528398275375366, 0.315599262714386, -0.3621427118778229, 0.6047801971435547, -0.029422052204608917, -0.17758512496948242, -0.7005696296691895, 0.15866968035697937, 0.029350608587265015, 0.27507954835891724, 0.4392024278640747, 0.24443313479423523, 0.08246771991252899, -1.0602877140045166, 0.5711055397987366, 0.24493910372257233, -0.8676618337631226, -0.3011006712913513, 0.7047957181930542, 0.4075389802455902, -0.47599563002586365, 0.38749054074287415, 0.012702330946922302, -0.6710241436958313, 0.5987741351127625, 0.5510413646697998, 0.7569674253463745, -0.4702427089214325, 0.3088020086288452, 0.6245602965354919, 0.06711331009864807, 0.20550549030303955, 0.6923202872276306, 0.03149382025003433, -0.44738656282424927, 0.23022446036338806, -0.5986733436584473, -0.1468990594148636, 0.13735318183898926, -0.8047426342964172, 0.351533442735672, -0.9312615394592285, -0.24089956283569336, 0.08751589059829712, 0.11761097609996796, -0.6130945086479187, 0.6674696207046509, -0.008524954319000244, 0.9280490875244141, -0.8549083471298218, 0.9626278281211853, 0.8559581637382507, -0.31830817461013794, -0.7709448337554932, -0.33556753396987915, 0.02013934776186943, -0.6660526990890503, 0.7108278274536133, -0.18973003327846527, -0.41207411885261536, -0.09323947876691818, -0.622982919216156, -1.0003730058670044, 0.030618250370025635, 0.017415650188922882, -0.4625031054019928, 0.4454794228076935, -0.5157257318496704, 0.3289681673049927, -0.19169732928276062, 0.30509495735168457, 0.7719469666481018, 0.7958452701568604, 0.22960808873176575, -0.6354780197143555, -0.4466685652732849, -0.010276071727275848, -0.16682815551757812, 0.4545809030532837, -1.0710972547531128, 0.967736542224884, -0.4652574360370636, -0.34733209013938904, 0.2706642150878906, 0.797762393951416, 0.2538500428199768, 0.3524126708507538, 0.6219537258148193, 0.9016807079315186, 0.36450111865997314, -0.31178343296051025, 0.7276745438575745, 0.2426338493824005, 0.4152539074420929, 0.7364203333854675, -0.22712187469005585, 0.5403846502304077, 0.8906413316726685, -0.786162257194519, 0.5381765365600586, 0.7879031896591187, 0.16047371923923492, 0.7758157253265381, 0.5944145917892456, -0.611952543258667, -0.1185941994190216, -0.1464141309261322, -0.6171560287475586, 0.1979752480983734, 0.052926212549209595, -0.11974738538265228, -0.2846010625362396, -0.13567376136779785, 0.12295057624578476, 0.2836454212665558, -0.5959328413009644, 0.606866717338562, 0.34341585636138916, -0.6328282356262207, 0.21025103330612183, -0.25779569149017334, 0.6709501147270203, -0.5978154540061951, 0.02733636647462845, -0.226993590593338, 0.41810402274131775, -0.4618742763996124, -1.007582426071167, 0.47138404846191406, -0.2920241355895996, -0.40551304817199707, -0.26942431926727295, 0.8072363138198853, -0.22133907675743103, -0.5572860240936279, 0.37486034631729126, 0.13466592133045197, 0.41473662853240967, 0.40145981311798096, -0.548729419708252, 0.047790080308914185, 0.13760165870189667, -0.20061805844306946, 0.3601190149784088, 0.2973729372024536, 0.25488772988319397, 0.7100128531455994, 0.5052477717399597, 0.22198708355426788, 0.25694364309310913, -0.18668605387210846, 0.8387458324432373, -0.9102796316146851, -0.8167635202407837, -0.9497333765029907, 0.3849896192550659, 0.025727711617946625, -0.880144476890564, 0.7920305728912354, 0.7652608156204224, 0.5113964080810547, -0.4877890348434448, 0.4755283296108246, -0.326479434967041, 0.5047136545181274, -0.13870958983898163, 1.001089096069336, -0.760762631893158, -0.29587265849113464, -0.030554059892892838, -0.9216439723968506, -0.2533753216266632, 0.5375741720199585, 0.1540832668542862, -0.14608067274093628, 0.4385907053947449, 0.44216376543045044, 0.022173406556248665, 0.25223150849342346, 0.32861006259918213, 0.06042787432670593, 0.14508451521396637, 0.5510438680648804, 1.0931141376495361, -0.43394410610198975, 0.18694786727428436, -0.4923475384712219, -0.4536249041557312, -0.4153490662574768, -0.9548057913780212, -0.6640313863754272, -0.48185449838638306, -0.2973935008049011, -0.5915579199790955, 0.11726461350917816, 0.9300885796546936, 0.9018137454986572, -0.6256728172302246, -0.41243645548820496, 0.25713539123535156, 0.30293411016464233, -0.2295418381690979, -0.146267831325531, 0.2736492455005646, -0.006407544948160648, -0.7211178541183472, 0.3930943012237549, 0.807976245880127, 0.3887130320072174, 0.08444006741046906, -0.07217127084732056, -0.4407080411911011, 0.026101574301719666, 0.5373561382293701, 0.5729561448097229, -0.6281182169914246, -0.4099644422531128, -0.5328317880630493, -0.21386730670928955, 0.15529435873031616, 0.48077550530433655, -0.5166378617286682, 0.32661110162734985, 0.8128959536552429, 0.17017659544944763, 0.7187885642051697, -0.0022492259740829468, 0.6678642630577087, -0.8970246315002441, 0.4446259140968323, 0.3953385353088379, 0.5681870579719543, 0.08998038619756699, -0.7339164614677429, 0.9820241928100586, 0.49674350023269653, -0.6334057450294495, -1.0034242868423462, 0.03079957515001297, -1.193113923072815, -0.3788175582885742, 0.9890843629837036, -0.09595765173435211, -0.9597458839416504, -0.36448943614959717, -0.3677716851234436, 0.07989637553691864, -0.33809733390808105, 0.35498204827308655, 0.8268195986747742, -0.2538071274757385, -0.2204185128211975, -0.9505581855773926, 0.4752943515777588, 0.3102525472640991, -0.5886632204055786, -0.05114369094371796, 0.329391211271286, 0.45236870646476746, 0.3009701371192932, 0.5239557027816772, 0.10428227484226227, 0.8970529437065125, 0.25200390815734863, 0.30491405725479126, -0.04526621103286743, -0.590078592300415, -0.0160664189606905, 0.2621477246284485, 0.04487839341163635, -0.6869441270828247 ]
skt/kogpt2-base-v2
skt
"2021-09-23T16:29:28Z"
27,018
27
transformers
[ "transformers", "pytorch", "jax", "gpt2", "text-generation", "ko", "license:cc-by-nc-sa-4.0", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2022-03-02T23:29:05Z"
--- language: ko tags: - gpt2 license: cc-by-nc-sa-4.0 --- For more details: https://github.com/SKT-AI/KoGPT2
[ -0.48687249422073364, -0.4485071897506714, 0.7781909704208374, 0.16480325162410736, -0.3761390745639801, 0.09531017392873764, 0.052769213914871216, -0.4536231756210327, -0.009672400541603565, 0.4137662947177887, -0.6633970737457275, -0.31648167967796326, -0.33036544919013977, -0.6086174249649048, 0.06782905757427216, 1.200425148010254, -0.2813965976238251, 0.3656690716743469, 0.027314314618706703, -0.35203590989112854, -0.7075924873352051, -0.15237478911876678, -0.8172850608825684, -0.8024618625640869, 0.25303706526756287, 0.5439110398292542, 0.39199715852737427, 0.4264795184135437, 0.5634157061576843, 0.02508312650024891, 0.1312042772769928, -0.8162170648574829, -0.21050208806991577, 0.1507989913225174, -0.2607545554637909, -0.3528296947479248, -0.5093008279800415, 0.06905729323625565, 0.6410906910896301, -0.012684259563684464, 0.0426604188978672, 0.20560702681541443, -0.10847850143909454, 1.0990420579910278, -0.11444050073623657, 0.7617265582084656, -0.041154637932777405, -0.01566373184323311, -0.05157149210572243, -0.013104152865707874, -0.09593068063259125, -0.44890058040618896, 0.2549111247062683, -1.0240983963012695, 0.024516131728887558, -0.41599801182746887, 0.9978808760643005, 0.37589889764785767, -0.7728718519210815, -0.5739982724189758, -0.6220255494117737, -0.012602008879184723, -0.6016944646835327, 0.4350784718990326, 0.24459125101566315, 0.8458378314971924, -0.06176459416747093, -0.9041227698326111, -0.3747010827064514, -0.5879432559013367, -0.3193335235118866, 0.6643301248550415, 0.3637312650680542, 0.5918197631835938, 0.4060802757740021, 0.1915474683046341, -1.0914664268493652, -0.578549861907959, -0.9426584839820862, -0.31910550594329834, 0.5387804508209229, -0.2551272511482239, 0.552476704120636, -0.12275127321481705, -0.5912600159645081, -0.16185010969638824, -0.5965733528137207, -0.20928962528705597, 0.6151496767997742, -0.17966431379318237, -0.4115007519721985, 0.8867539763450623, -0.6076422333717346, 0.24686935544013977, -0.08079075813293457, 0.4040336608886719, 0.44406232237815857, -0.5136155486106873, 0.18160615861415863, 0.3818359076976776, 0.1527705043554306, 0.4728003442287445, 0.10630552470684052, -0.18041983246803284, -0.002282476518303156, 0.36983153223991394, 0.23471830785274506, -0.6888595819473267, -1.4893909692764282, 0.3340963125228882, -0.3480331003665924, -0.05147784203290939, 0.16232499480247498, -0.8475937843322754, 0.039999499917030334, -0.5459542274475098, 0.8186564445495605, -0.4671804904937744, -0.7771351337432861, -0.29542988538742065, -0.6828539967536926, 0.8598006367683411, 0.532289981842041, -0.23549918830394745, 0.20165102183818817, 0.8182498216629028, 0.920020580291748, -0.001158548635430634, -0.20387426018714905, -0.44367876648902893, -0.08279009163379669, 0.09493047744035721, 0.7680156826972961, -0.3028852343559265, -0.09670387953519821, -0.08432650566101074, 0.01625560224056244, 0.053896188735961914, -0.10115966945886612, 0.5868186950683594, -0.6516255140304565, -0.3507247567176819, -0.44203507900238037, -0.33785301446914673, -0.4675479829311371, 0.5044272541999817, -0.669037401676178, 1.316405177116394, 0.6001276969909668, -0.7434646487236023, 0.22467735409736633, -1.211380124092102, -0.21554741263389587, 0.44378340244293213, -0.04151976481080055, -0.3495226204395294, -0.009433114901185036, -0.38475731015205383, -0.1356305629014969, 0.35392943024635315, -0.031377363950014114, -0.4462141692638397, -0.16874000430107117, -0.20753011107444763, 0.13809886574745178, 0.6329701542854309, 0.5126364827156067, -0.2204732894897461, 0.1340576559305191, -0.530705988407135, 0.48730581998825073, 0.03710445389151573, -0.4645339548587799, -0.1887258142232895, -0.23614516854286194, 0.08976183086633682, 0.27160054445266724, 0.3144878149032593, -0.4509415924549103, 0.8786576986312866, -0.20500560104846954, 0.8449134826660156, 0.44552934169769287, 0.04597080126404762, 0.7393634915351868, -0.1259918212890625, 0.5565389394760132, -0.37499457597732544, 0.2902528941631317, -0.19121502339839935, -0.8442630767822266, -0.5426799654960632, 0.2302197813987732, 0.7000371813774109, 0.9306409955024719, -1.1912444829940796, -0.23713576793670654, 0.06761686503887177, -0.682219922542572, -0.07077309489250183, -0.12953057885169983, 0.4138648211956024, -0.16157877445220947, -0.13030748069286346, -0.4243770241737366, -0.6936696767807007, -0.7309515476226807, -0.03653983026742935, -0.3871838450431824, 0.17185372114181519, 0.47118985652923584, 1.005506992340088, -0.21786707639694214, 1.2846401929855347, -0.48512741923332214, 0.12712053954601288, 0.007146619725972414, 0.3413776159286499, -0.055936217308044434, 0.563917875289917, 0.7936261892318726, -0.8802123069763184, -1.1775585412979126, 0.31437742710113525, -0.31251829862594604, -0.308398574590683, 0.14709872007369995, -0.37369590997695923, -0.10480672866106033, 0.10861509293317795, -1.1935161352157593, 0.6979339718818665, 0.6962873935699463, -0.3543120324611664, 0.9703306555747986, -0.14526960253715515, 0.022346192970871925, -1.406253457069397, 0.21885573863983154, -0.3221192955970764, -0.4569226801395416, -0.5259364247322083, 0.25612059235572815, 0.2446250170469284, -0.43770086765289307, -0.34164920449256897, 0.4176875650882721, -0.5669108629226685, -0.4197709560394287, -0.18763914704322815, 0.016403546556830406, -0.6466664671897888, 0.5192444324493408, 0.1223830059170723, 1.159532070159912, 0.4757923185825348, -0.3759484589099884, 0.6156572103500366, -0.026544835418462753, -0.12075767666101456, 0.1674293875694275, -0.7358458042144775, 0.4849125146865845, 0.39767247438430786, 0.4997011125087738, -1.4725879430770874, -0.9806478023529053, 0.8325636386871338, -0.8331435322761536, 0.08169889450073242, -1.1934788227081299, -0.5725632309913635, -0.3008008301258087, -0.4076557457447052, 0.6888675093650818, 0.9225994944572449, -0.6459408402442932, 0.16862446069717407, 0.576900839805603, -0.5697774887084961, 0.183704674243927, -0.28108757734298706, -0.19128213822841644, -0.19773761928081512, -0.17277604341506958, 0.1169540286064148, -0.2296016365289688, -0.2727186679840088, 0.10662916302680969, -0.03931920602917671, -0.4665065407752991, -0.3347884714603424, 0.28163132071495056, -0.008832398802042007, -0.3954453766345978, 0.26853808760643005, 0.25964978337287903, -0.7382758855819702, 0.15908436477184296, -0.8302520513534546, 0.8168224096298218, -0.31339702010154724, -0.3727761507034302, -0.6832495927810669, 0.1787797212600708, 0.8199089169502258, 0.1300240457057953, 0.045965805649757385, 1.084697961807251, -0.34638211131095886, 0.3785861134529114, -0.4014168679714203, -0.21091288328170776, -0.45343178510665894, 0.3358306586742401, -0.084614098072052, -0.650006115436554, 0.6452168226242065, -0.7421126365661621, -0.15699809789657593, 1.0223190784454346, 0.7092878222465515, 0.0024736213963478804, 1.357999563217163, 0.42783164978027344, -0.039656415581703186, 0.41110092401504517, -0.40694573521614075, 0.3854830265045166, -0.8206524848937988, -0.28987520933151245, -0.379627525806427, -0.10744335502386093, -0.7202463746070862, -0.2537935972213745, 0.2433381825685501, 0.8329702615737915, -0.38223862648010254, 0.7490799427032471, -0.9420375823974609, 0.6554824709892273, 0.7036271691322327, -0.15843677520751953, -0.1318441778421402, -0.0665212944149971, -0.14590033888816833, 0.020498676225543022, -0.6177855134010315, -0.48193681240081787, 0.9104475378990173, 0.35945984721183777, 0.6424739956855774, 0.14525260031223297, 0.6368598341941833, 0.6051862835884094, 0.11260715126991272, -0.6607723236083984, 0.07148361206054688, 0.722160816192627, -0.7839952111244202, -0.27992111444473267, 0.008783740922808647, -0.271712064743042, -0.12157484889030457, 0.29032954573631287, -0.617633581161499, -0.208206444978714, 0.5928366780281067, -0.3214694857597351, 0.30585673451423645, -1.1372467279434204, 0.828410804271698, -0.3463461995124817, 0.012569274753332138, 0.07790669053792953, -0.8101773262023926, 0.2323189526796341, 0.14687637984752655, -0.30779552459716797, 0.16347433626651764, 0.14600494503974915, 0.6294401288032532, -0.5681887865066528, 0.7611002326011658, -0.3879944980144501, 0.018792714923620224, 0.7122281789779663, -0.08919354528188705, 0.7933962941169739, 0.9158084392547607, 0.14811581373214722, 0.17926150560379028, 0.25243082642555237, -0.4922105371952057, -0.27755287289619446, 0.9421736001968384, -0.7077556848526001, 0.3276973068714142, -0.730226993560791, -0.49927040934562683, 0.3950030505657196, 0.30218127369880676, 0.5932099223136902, 0.13717439770698547, 0.1222747340798378, 0.17996911704540253, 0.6852948069572449, 0.0966818779706955, 0.21357156336307526, 0.38946831226348877, -0.1317271739244461, -0.8360917568206787, 0.8951365947723389, 0.2560926079750061, 0.2195318639278412, 0.04745941236615181, 0.07976271212100983, -0.5519896745681763, -0.5430209636688232, -0.9049630761146545, -0.02116938680410385, -0.6133893728256226, -0.22492027282714844, -0.32799628376960754, -0.3733564019203186, -0.6273321509361267, -0.2894062101840973, -0.5274547934532166, -0.7759570479393005, 0.29170796275138855, -0.021170029416680336, 1.0984065532684326, 1.117591381072998, -0.16446489095687866, 0.8421007394790649, -0.5205281376838684, 0.1460360288619995, 0.18782266974449158, 0.8937967419624329, -0.2907440662384033, -0.15098996460437775, -0.312950074672699, 0.3360852003097534, -0.5582585334777832, -0.7563552856445312, 0.12393984198570251, -0.2022239863872528, 0.5546560883522034, 0.28460270166397095, 0.2633682191371918, 0.40654048323631287, -0.5424039363861084, 1.0596855878829956, 0.39941054582595825, -0.5959802269935608, 0.8855555653572083, -0.6146818399429321, 0.3129955232143402, 0.6771951913833618, -0.06659583747386932, -0.49255526065826416, 0.1745738983154297, -0.7774198651313782, -1.0784989595413208, 0.9297899603843689, 0.7390998601913452, -0.1780574470758438, 0.3481828570365906, 1.071864128112793, 0.2569173276424408, 0.02492241933941841, -0.9517611861228943, -0.3912357985973358, -0.14331287145614624, -0.1592673808336258, -0.08213463425636292, -0.5965326428413391, -0.018977247178554535, -0.40144234895706177, 0.8612544536590576, 0.23961079120635986, 0.6798730492591858, 0.396453857421875, -0.31978240609169006, 0.28208282589912415, 0.24963544309139252, 1.1040852069854736, 0.6744471788406372, -0.0809745043516159, -0.1233898475766182, 0.4092961549758911, -0.7365783452987671, -0.18721844255924225, 0.2203126847743988, -0.15420852601528168, 0.06797229498624802, 0.3256610929965973, 0.9034198522567749, -0.08752749115228653, -0.3654100000858307, 0.1953183114528656, 0.3107902705669403, -0.9281265139579773, -0.8811266422271729, 0.19418616592884064, 0.1370108723640442, 0.8158695101737976, 0.13267432153224945, -0.1323637068271637, 0.26176688075065613, -0.4460713565349579, 0.4000997245311737, -0.060224499553442, -0.7236230373382568, -0.7326896786689758, 0.6975963115692139, 0.30065619945526123, -0.7531384229660034, 0.591970682144165, -0.5805211067199707, -1.2695939540863037, 0.8639223575592041, 0.5354993939399719, 0.9175595045089722, -0.12955842912197113, 0.4652840495109558, 0.4770185947418213, 0.2887845039367676, -0.22478416562080383, 0.5293753147125244, -0.46902596950531006, 0.25770971179008484, -0.30860841274261475, -0.1240563690662384, -0.3638492524623871, 0.1609787940979004, -0.4554811716079712, -0.08922083675861359, -0.1491149663925171, -0.05949540063738823, -0.47290337085723877, 0.581082284450531, -0.48381146788597107, -0.12418857216835022, -0.21348395943641663, 0.9177147746086121, -1.0049940347671509, 1.2458479404449463, 1.3247641324996948, -0.33211079239845276, -0.7089544534683228, 0.16473859548568726, -0.08861903846263885, -0.25431662797927856, 0.4531311094760895, 0.22268140316009521, 0.2008296251296997, 0.21888871490955353, -0.7058441638946533, -0.8426218628883362, 1.4427664279937744, 0.24509811401367188, -0.6149756908416748, 0.12515640258789062, 0.16294023394584656, 0.39406323432922363, 0.07891049236059189, 0.14612513780593872, 0.5169703364372253, 0.8017844557762146, -0.01152277272194624, -1.1344586610794067, -0.6558379530906677, -0.5807578563690186, -0.22034284472465515, 0.5981435179710388, -0.6443997025489807, 0.6586941480636597, -0.03240012750029564, 0.1631668508052826, 0.36267590522766113, 0.0467756949365139, 0.0008547258330509067, 0.8824965953826904, 0.42626065015792847, 0.7762821316719055, 0.36556729674339294, -0.5746591687202454, 0.9665518403053284, -0.47424355149269104, 1.0115246772766113, 1.1024818420410156, -0.2573256194591522, 0.31698372960090637, 0.33036282658576965, -0.28696388006210327, -0.2617295980453491, 1.0845816135406494, 0.03355430066585541, 0.8259719610214233, -0.06173154339194298, -0.34408774971961975, 0.1274830847978592, 0.6625419855117798, -0.8789689540863037, -0.031176390126347542, 0.14389948546886444, -0.2731930613517761, -0.385061651468277, 0.04567612335085869, -0.06765201687812805, -0.780561625957489, -0.218544140458107, 0.8795915842056274, -0.12663008272647858, -0.5854260921478271, -0.22756975889205933, -0.1922476887702942, -0.01618015766143799, -0.8660673499107361, -0.5777007937431335, 0.27837079763412476, 0.4083009958267212, 0.11018557846546173, -1.2058948278427124, 0.3405442535877228, -0.18390695750713348, -0.16909252107143402, 0.14918407797813416, 1.2055156230926514, -0.5583065152168274, -0.3423765301704407, 0.23359467089176178, -0.060790929943323135, 0.4887446463108063, -0.21565337479114532, -1.0195012092590332, 0.0723966732621193, 0.20801135897636414, -0.3953997790813446, 0.27341893315315247, 0.11870601028203964, -0.29060524702072144, 0.5494281649589539, 0.581173837184906, 0.007858838886022568, 0.06603030860424042, -0.1458217203617096, 0.7466999888420105, -0.38412216305732727, -0.6946313381195068, -0.6108693480491638, 0.49727362394332886, -0.3918461501598358, -0.3430880308151245, 0.5262414813041687, 1.0731358528137207, 1.1481621265411377, -0.34773626923561096, 1.1410773992538452, -0.4110155403614044, 0.12743093073368073, -0.5119578838348389, 1.0295169353485107, -0.22060371935367584, -0.24695995450019836, -0.11020077764987946, -1.02585768699646, -0.3336085081100464, 0.94472336769104, -0.38665771484375, 0.06466100364923477, 0.5133970379829407, 0.688575029373169, -0.4004193842411041, 0.05650678649544716, 0.11703815311193466, 0.23058392107486725, 0.3910646140575409, 0.1528862565755844, 0.602924644947052, -0.4897502064704895, 0.7365703582763672, -0.6903473734855652, -0.14171548187732697, -0.5815873146057129, -0.7194204926490784, -0.7346031665802002, -0.7215432524681091, -0.4242471754550934, -0.3033720850944519, 0.5355369448661804, 0.7663430571556091, 1.0290757417678833, -0.6752827167510986, 0.3150748908519745, -0.4101415276527405, -0.1818983405828476, -0.2197931408882141, -0.2478937953710556, 0.8172953724861145, -0.16008715331554413, -0.4313288629055023, -0.37091103196144104, 0.33976149559020996, -0.11074858903884888, 0.1101316288113594, -0.731972336769104, -0.005455904174596071, -0.2260090708732605, 0.7722787261009216, 0.5219817161560059, -0.6695862412452698, -0.5083339810371399, -0.6112849712371826, 0.014584999531507492, 0.09800692647695541, 0.9918109178543091, -0.4355318546295166, 0.4463980197906494, 0.9007861614227295, 0.2015695720911026, 0.3522792458534241, 0.29840269684791565, 0.40180081129074097, -0.10225964337587357, -0.10764136165380478, -0.14560741186141968, 0.04368999972939491, -0.5144298672676086, -0.7090110778808594, 0.9792584180831909, 0.6456444263458252, -0.8986248970031738, -0.8137704730033875, 0.28863418102264404, -1.6168723106384277, 0.2789106070995331, 0.9545221924781799, -0.047343526035547256, 0.1317978799343109, -0.2727126181125641, -1.1073168516159058, 0.6752882599830627, -0.5875246524810791, 0.5926105976104736, 1.0544854402542114, -0.3109952211380005, -0.2892571687698364, -1.6589590311050415, 0.4457382261753082, -0.3387106955051422, -0.5877439975738525, -0.01595926098525524, 0.24820926785469055, 0.800703763961792, -0.004749804735183716, 0.6509245038032532, -0.15971484780311584, 0.6704535484313965, 0.28680524230003357, 0.24444280564785004, -0.08403665572404861, -0.4239603281021118, -0.1274612843990326, -0.02268926613032818, -0.05487377941608429, -0.3852560520172119 ]
KoboldAI/OPT-13B-Erebus
KoboldAI
"2022-09-09T13:54:35Z"
26,997
163
transformers
[ "transformers", "pytorch", "opt", "text-generation", "en", "arxiv:2205.01068", "license:other", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2022-09-09T09:11:05Z"
--- language: en license: other commercial: no inference: false --- # OPT 13B - Erebus ## Model description This is the second generation of the original Shinen made by Mr. Seeker. The full dataset consists of 6 different sources, all surrounding the "Adult" theme. The name "Erebus" comes from the greek mythology, also named "darkness". This is in line with Shin'en, or "deep abyss". For inquiries, please contact the KoboldAI community. **Warning: THIS model is NOT suitable for use by minors. The model will output X-rated content.** ## Training data The data can be divided in 6 different datasets: - Literotica (everything with 4.5/5 or higher) - Sexstories (everything with 90 or higher) - Dataset-G (private dataset of X-rated stories) - Doc's Lab (all stories) - Pike Dataset (novels with "adult" rating) - SoFurry (collection of various animals) The dataset uses `[Genre: <comma-separated list of genres>]` for tagging. ### How to use You can use this model directly with a pipeline for text generation. This example generates a different sequence each time it's run: ```py >>> from transformers import pipeline >>> generator = pipeline('text-generation', model='KoboldAI/OPT-13B-Erebus') >>> generator("Welcome Captain Janeway, I apologize for the delay.", do_sample=True, min_length=50) [{'generated_text': 'Welcome Captain Janeway, I apologize for the delay."\nIt's all right," Janeway said. "I'm certain that you're doing your best to keep me informed of what\'s going on."'}] ``` ## Limitations and biases Based on known problems with NLP technology, potential relevant factors include bias (gender, profession, race and religion). **Warning: This model has a very strong NSFW bias!** ### License OPT-13B is licensed under the OPT-175B license, Copyright (c) Meta Platforms, Inc. All Rights Reserved. ### BibTeX entry and citation info ``` @misc{zhang2022opt, title={OPT: Open Pre-trained Transformer Language Models}, author={Susan Zhang and Stephen Roller and Naman Goyal and Mikel Artetxe and Moya Chen and Shuohui Chen and Christopher Dewan and Mona Diab and Xian Li and Xi Victoria Lin and Todor Mihaylov and Myle Ott and Sam Shleifer and Kurt Shuster and Daniel Simig and Punit Singh Koura and Anjali Sridhar and Tianlu Wang and Luke Zettlemoyer}, year={2022}, eprint={2205.01068}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.43947118520736694, -0.6490491032600403, 0.15768980979919434, 0.246159166097641, -0.27827391028404236, -0.38174915313720703, -0.35703045129776, -0.41602325439453125, 0.323017418384552, 0.7245140075683594, -0.849325954914093, -0.39837467670440674, -0.3977125883102417, 0.3416309654712677, -0.22326169908046722, 0.9334458708763123, 0.21264240145683289, -0.10852815210819244, 0.3742656111717224, 0.13216733932495117, -0.42033979296684265, -0.29653990268707275, -0.6461551785469055, -0.34172147512435913, 0.4481927454471588, 0.3767659366130829, 0.8198798894882202, 0.5182750225067139, 0.6376057863235474, 0.2799539566040039, -0.33413931727409363, 0.2212449014186859, -0.6623911261558533, -0.08308648318052292, -0.02040557749569416, -0.46454861760139465, -0.4484010934829712, -0.12862281501293182, 0.6520810723304749, 0.6005426049232483, -0.08124063909053802, 0.19262102246284485, -0.10585522651672363, 0.548965334892273, -0.4774415194988251, -0.21383515000343323, -0.5275731682777405, 0.12820610404014587, -0.3235037624835968, 0.03770449757575989, -0.8587705492973328, -0.15018153190612793, 0.12865056097507477, -0.47813698649406433, 0.4845421612262726, 0.32928767800331116, 1.373191237449646, 0.2756802439689636, -0.3380057215690613, -0.13500913977622986, -0.677940845489502, 0.8908398151397705, -0.9808096289634705, 0.4291430115699768, 0.26982977986335754, 0.021036600694060326, -0.02211126498878002, -0.9327788949012756, -0.34871959686279297, -0.05539064109325409, -0.17118242383003235, 0.47452282905578613, -0.1524985134601593, -0.2068575918674469, 0.1527068018913269, 0.40020906925201416, -0.574544370174408, 0.10404366999864578, -0.7510240077972412, -0.03833434358239174, 0.668941080570221, 0.21910950541496277, 0.28234368562698364, -0.5624048709869385, -0.5657517313957214, -0.3036753237247467, -0.5721666216850281, -0.0918259397149086, 0.6527823805809021, 0.49904724955558777, -0.2714659869670868, 0.5654776692390442, 0.2616192698478699, 0.6814286708831787, 0.2107342779636383, 0.22900590300559998, 0.6174780130386353, -0.28207993507385254, -0.23476698994636536, 0.10418621450662613, 0.9479805827140808, 0.38476356863975525, 0.06268877536058426, 0.06219670921564102, -0.12038181722164154, -0.13819651305675507, 0.6635053753852844, -0.7211070656776428, -0.15477260947227478, 0.19031193852424622, -0.7824004888534546, -0.5889162421226501, 0.3068780303001404, -1.0943926572799683, -0.35644111037254333, -0.09056173264980316, 0.22186283767223358, -0.6165913939476013, -0.4886152148246765, 0.16225719451904297, 0.10068050026893616, 0.5030567646026611, -0.1402009278535843, -0.9018601775169373, 0.2852711081504822, 0.30229905247688293, 0.562200665473938, -0.14148053526878357, -0.43061503767967224, 0.19617508351802826, -0.15458297729492188, -0.5961745977401733, 0.49625691771507263, -0.38826003670692444, -0.20052127540111542, 0.08507319539785385, 0.3138238489627838, -0.2076950967311859, -0.45042431354522705, 1.0627939701080322, -0.4872809648513794, 0.40741467475891113, 0.22386078536510468, -0.41196873784065247, -0.3543737232685089, -0.35311517119407654, -0.7400463223457336, 1.1740715503692627, 0.18220938742160797, -0.9465107917785645, 0.40190327167510986, -0.6304798722267151, -0.32601240277290344, 0.13840937614440918, 0.17297206819057465, -0.6589950919151306, 0.3482532501220703, 0.1083102822303772, 0.22541853785514832, -0.14926525950431824, 0.41184404492378235, -0.17244240641593933, -0.15136532485485077, 0.17980143427848816, -0.41358551383018494, 1.0134832859039307, 0.4865148365497589, -0.4147231876850128, 0.11838418990373611, -0.9602906107902527, 0.07511131465435028, 0.5285542607307434, -0.21485799551010132, -0.3198672831058502, 0.0028749536722898483, 0.20017112791538239, 0.08284851908683777, 0.2979217767715454, -0.5525851249694824, -0.09865134209394455, -0.5786805152893066, 0.29927125573158264, 0.7360075116157532, -0.10710189491510391, 0.4791710376739502, -0.24176879227161407, 0.4953019917011261, 0.04980684444308281, 0.32049793004989624, -0.32808026671409607, -0.5353193879127502, -1.1587129831314087, -0.0894964411854744, 0.3906109929084778, 0.5392941832542419, -0.4471907615661621, 0.7558711767196655, -0.18479089438915253, -0.7742608785629272, -0.7665405869483948, -0.33119016885757446, 0.19303880631923676, 0.007616522256284952, 0.4619901776313782, 0.08567170798778534, -0.902443528175354, -1.0388455390930176, -0.3072446286678314, -0.0786922350525856, 0.0564243346452713, 0.46647125482559204, 0.6743020415306091, -0.4047757387161255, 0.8106077909469604, -0.6307795643806458, -0.37873417139053345, -0.5408543348312378, -0.02905290387570858, 0.4902392625808716, 0.45224201679229736, 0.6061233282089233, -0.8756844401359558, -0.384711891412735, -0.1586839109659195, -0.7536676526069641, -0.2785061299800873, -0.30778443813323975, -0.4381777048110962, 0.014012349769473076, 0.31941238045692444, -0.24612021446228027, 0.40193188190460205, 0.5178638696670532, -0.5778607726097107, 0.5590687394142151, -0.22179317474365234, -0.06708964705467224, -1.5209932327270508, 0.083113893866539, 0.034403733909130096, -0.0976475179195404, -0.7996300458908081, 0.19620142877101898, 0.1803714483976364, -0.2678908407688141, -0.5371933579444885, 0.5081724524497986, -0.4199938476085663, 0.30048108100891113, -0.2005578875541687, 0.1562674194574356, -0.18783454596996307, 0.4660598039627075, 0.25181299448013306, 0.5681354403495789, 0.5469241142272949, -0.753605306148529, 0.3282654583454132, 0.5847651958465576, -0.19092197716236115, 0.39852601289749146, -0.7878386378288269, 0.0006373267387971282, -0.1298266500234604, -0.07880669087171555, -0.6984560489654541, -0.35879188776016235, 0.25937026739120483, -0.6908641457557678, 0.4209866523742676, 0.046417880803346634, -0.3840307295322418, -0.6602039933204651, -0.1588684469461441, -0.020278766751289368, 0.6814855337142944, -0.6618614792823792, 0.7422194480895996, 0.17584392428398132, -0.16913585364818573, -0.6059600114822388, -0.8632619380950928, -0.0030202444177120924, -0.41816946864128113, -0.8879569172859192, 0.6169050335884094, 0.03412533551454544, 0.03363921493291855, -0.13322314620018005, 0.12723718583583832, -0.08848649263381958, -0.1684267520904541, 0.12319217622280121, 0.4649805724620819, -0.07475167512893677, -0.07095560431480408, 0.21663762629032135, -0.21754014492034912, 0.06367787718772888, 0.0378212071955204, 0.668255090713501, -0.23689614236354828, -0.005836680997163057, -0.25811824202537537, 0.2290695309638977, 0.2528199851512909, -0.2166392058134079, 1.0346238613128662, 0.837885856628418, -0.5002358555793762, -0.368088036775589, -0.3113560974597931, -0.34798964858055115, -0.5020803809165955, 0.6031385660171509, -0.2606281638145447, -0.5295143127441406, 0.580439031124115, 0.039214711636304855, 0.34533455967903137, 0.7475979924201965, 0.49005165696144104, 0.23084914684295654, 0.9719555974006653, 0.892185389995575, 0.3701291084289551, 0.5212595462799072, -0.3276369869709015, 0.25358718633651733, -0.9638881683349609, -0.3793467581272125, -0.5165532827377319, -0.2722600996494293, -0.5910678505897522, -0.08605045825242996, -0.06369104981422424, -0.06929822266101837, -0.5139963626861572, 0.7090054750442505, -0.6062101125717163, 0.19742724299430847, 0.6995754837989807, 0.29969343543052673, -0.011055517010390759, 0.08321297913789749, -0.14555296301841736, -0.2859659790992737, -0.763028085231781, -0.6347867846488953, 1.1059224605560303, 0.5286086201667786, 1.0994709730148315, 0.13727504014968872, 0.9063750505447388, 0.18958762288093567, 0.04348194971680641, -0.3607056438922882, 0.62700355052948, -0.2749771773815155, -1.116304636001587, -0.16807794570922852, -0.39498043060302734, -1.0374037027359009, 0.2839793562889099, -0.1305892914533615, -0.5954822301864624, 0.4531997740268707, -0.2262827754020691, -0.25987008213996887, 0.39241212606430054, -0.8019847273826599, 0.8944594264030457, -0.27766892313957214, -0.29638391733169556, 0.09329864382743835, -0.8299862146377563, 0.34023788571357727, -0.10760809481143951, 0.15984278917312622, 0.18311257660388947, -0.045603640377521515, 1.0885471105575562, -0.37193024158477783, 0.9736992120742798, 0.11432954668998718, -0.14141908288002014, 0.41739627718925476, -0.12647593021392822, 0.32661113142967224, 0.06424678862094879, 0.03547940403223038, 0.07515673339366913, -0.2859916090965271, -0.16296538710594177, 0.046013910323381424, 0.6121278405189514, -1.0391770601272583, -0.13652348518371582, -0.5652579069137573, -0.1284329742193222, 0.2768377959728241, 0.570038378238678, 0.8405917286872864, 0.5140469670295715, -0.014890010468661785, 0.48387545347213745, 0.6943442821502686, -0.6125516891479492, 0.35614725947380066, 0.5378684401512146, -0.5673266053199768, -0.7527399063110352, 0.8267858028411865, -0.02471820078790188, 0.21630915999412537, 0.14023716747760773, 0.10728365182876587, -0.39305558800697327, -0.19038152694702148, -0.3047705590724945, 0.5050137042999268, -0.6957560777664185, -0.2306758314371109, -0.6634082198143005, -0.518515944480896, -0.33889973163604736, -0.25842586159706116, -0.5971793532371521, 0.019514955580234528, -0.532606303691864, -0.1304440051317215, 0.16393853724002838, 0.5868533253669739, -0.17124980688095093, 0.46427780389785767, -0.7103516459465027, 0.3613382875919342, -0.017353134229779243, 0.40586864948272705, -0.05435151234269142, -1.0403802394866943, -0.27730825543403625, 0.060437243431806564, -0.46470996737480164, -1.1052919626235962, 0.6607332825660706, 0.19162221252918243, 0.7128379344940186, 0.5153153538703918, 0.3567650318145752, 0.30840593576431274, -0.576888918876648, 0.9950656294822693, 0.28831666707992554, -0.639319658279419, 0.5629586577415466, -0.37215524911880493, 0.0977383702993393, 0.4503291845321655, 0.3094852864742279, -0.36284515261650085, -0.4131670296192169, -0.9930498600006104, -1.0923559665679932, 1.1607921123504639, 0.5549411773681641, 0.25127094984054565, -0.07343237102031708, 0.11224426329135895, 0.2871743142604828, 0.06446195393800735, -1.238095998764038, -0.8446303009986877, -0.3326742649078369, -0.29402628540992737, -0.016158509999513626, -0.41283077001571655, 0.06826075911521912, -0.00508313812315464, 1.0229625701904297, 0.1378578394651413, 0.6748397350311279, 0.2124248892068863, -0.22373102605342865, -0.1396048218011856, 0.279452383518219, 0.5357353091239929, 0.48577776551246643, -0.41105443239212036, -0.021687157452106476, 0.1320573091506958, -0.8345540165901184, -0.07190332561731339, 0.20313721895217896, -0.5823401808738708, 0.24662157893180847, 0.1760147660970688, 1.2659308910369873, 0.17710421979427338, -0.3414165675640106, 0.23690804839134216, -0.02021052874624729, -0.22263501584529877, -0.6375424265861511, -0.14707796275615692, -0.043132830411195755, 0.13471367955207825, 0.4865299463272095, 0.21689006686210632, 0.05124733969569206, -0.2539381980895996, 0.08059081435203552, -0.15057675540447235, -0.46224352717399597, -0.2828027606010437, 0.9709261655807495, 0.28500521183013916, -0.4486549496650696, 0.7663099765777588, -0.2157851606607437, -0.39566078782081604, 0.6102211475372314, 0.8953112959861755, 1.0205419063568115, -0.22777006030082703, 0.4145091474056244, 0.7585907578468323, 0.7170441746711731, 0.09060566127300262, 0.40952128171920776, 0.7222681045532227, -0.8251962661743164, -0.27981317043304443, -0.7726051211357117, -0.11901744455099106, 0.41604092717170715, -0.8029851913452148, 0.678935170173645, -0.10964258015155792, -0.5148446559906006, -0.07581846415996552, -0.20597679913043976, -0.5500119924545288, 0.27151167392730713, 0.48149603605270386, 0.9350355267524719, -0.8789390921592712, 0.08817967772483826, 0.9680320024490356, -0.565266489982605, -0.7419094443321228, -0.23171068727970123, -0.3255811333656311, -0.5238455533981323, 0.3863562047481537, 0.32965800166130066, 0.26300978660583496, 0.2667697072029114, -0.7713233232498169, -0.8988655209541321, 0.8480435609817505, 0.10313666611909866, -0.34760209918022156, -0.11313876509666443, -0.03711537644267082, 0.5022665858268738, -0.3922280967235565, 0.41126182675361633, 0.47522038221359253, 0.6039280295372009, -0.2965189516544342, -0.6242259740829468, -0.10317400097846985, -0.4338708817958832, 0.19041679799556732, 0.14784033596515656, -0.7796217203140259, 0.8946683406829834, -0.39388611912727356, -0.2640877664089203, 0.29478955268859863, 0.8038392066955566, 0.34653592109680176, 0.1387430876493454, 0.3290819227695465, 0.6210334897041321, 0.4830266833305359, -0.35335245728492737, 0.8036590218544006, -0.34364986419677734, 0.7344913482666016, 0.9484605193138123, -0.019518235698342323, 0.6010643839836121, 0.20793482661247253, -0.5375169515609741, 0.6229050159454346, 0.9101724624633789, -0.3091604709625244, 0.6179306507110596, -0.08185745030641556, 0.23329967260360718, -0.3697633743286133, 0.03950785845518112, -0.6353340148925781, 0.209081768989563, 0.2712598741054535, -0.7388704419136047, -0.07896415144205093, 0.10935018956661224, 0.12183085829019547, 0.004447156097739935, -0.21846379339694977, 0.625459611415863, 0.21697339415550232, -0.4775073826313019, 0.6385009288787842, 0.09467906504869461, 0.8718925714492798, -0.8584251403808594, 0.25795218348503113, -0.03760392218828201, 0.3708765208721161, -0.2182893306016922, -0.7338883876800537, -0.019844207912683487, -0.02579430676996708, -0.276345431804657, -0.050058748573064804, 0.8749818801879883, -0.2701951265335083, -0.7448367476463318, 0.28216683864593506, 0.38412484526634216, 0.2881377637386322, 0.2837396562099457, -0.7798277139663696, 0.013016986660659313, 0.27160683274269104, -0.5204337239265442, 0.004943695850670338, 0.24982106685638428, 0.38828715682029724, 0.6876698136329651, 0.4671214520931244, 0.018858131021261215, 0.5597829222679138, 0.1638256162405014, 0.652289867401123, -0.6220498085021973, -0.6075571775436401, -0.569572925567627, 0.5590610504150391, -0.2719232439994812, -0.5819645524024963, 0.7814708948135376, 0.575223445892334, 0.7602207064628601, -0.5271320343017578, 0.8350174427032471, -0.47332510352134705, 0.6455497145652771, -0.2538548409938812, 0.8180413842201233, -0.6071773767471313, -0.1861666440963745, -0.4284362196922302, -1.302431344985962, -0.05966922640800476, 0.9008517265319824, -0.1414061337709427, 0.36149317026138306, 0.8879324197769165, 0.6503309011459351, -0.00002989827589772176, 0.18328459560871124, 0.20209753513336182, 0.2694343328475952, 0.171569362282753, 0.31278854608535767, 0.8121482133865356, -0.7740698456764221, 0.5977580547332764, -0.5032052397727966, -0.15946535766124725, -0.413483589887619, -0.6233845949172974, -0.961114227771759, -0.519138514995575, -0.2941318154335022, -0.3980497121810913, -0.221498042345047, 0.6556576490402222, 0.6182663440704346, -0.7621577978134155, 0.007860107347369194, -0.16415467858314514, -0.18447944521903992, -0.3512539863586426, -0.29056164622306824, 0.4093192517757416, -0.2945209741592407, -0.8334915041923523, 0.3079036474227905, -0.14799024164676666, 0.19705303013324738, -0.1596076488494873, -0.1495434045791626, -0.2435370236635208, 0.17475609481334686, 0.25351452827453613, -0.025530163198709488, -0.6502078771591187, 0.015584989450871944, 0.3923768699169159, 0.01846540905535221, -0.14301186800003052, 0.32080554962158203, -0.4818110466003418, 0.43210461735725403, 0.49716708064079285, 0.20336537063121796, 0.16187699139118195, -0.004505662713199854, 0.44866934418678284, -0.5414785742759705, 0.05075635015964508, 0.2002720683813095, 0.4828905165195465, 0.29619649052619934, -0.2020571231842041, 0.6929318308830261, 0.18760870397090912, -0.7371115684509277, -1.0184050798416138, 0.22578230500221252, -0.8792911171913147, -0.154020294547081, 1.3752367496490479, -0.06702949106693268, -0.22314900159835815, 0.13024009764194489, -0.4739549160003662, 0.27021750807762146, -0.3832261562347412, 0.29150161147117615, 0.5552575588226318, 0.3506683111190796, -0.21700267493724823, -0.5536747574806213, 0.1754012256860733, 0.22266121208667755, -0.5823162794113159, 0.1142149344086647, 0.2570578455924988, 0.10229282081127167, 0.4694255590438843, 0.15987835824489594, -0.2299378514289856, 0.15758644044399261, 0.35429811477661133, 0.37216994166374207, -0.07228012382984161, -0.4826944172382355, -0.12474264204502106, -0.15336765348911285, -0.31272992491722107, 0.025804076343774796 ]
facebook/convnextv2-tiny-1k-224
facebook
"2023-11-28T09:42:05Z"
26,963
0
transformers
[ "transformers", "pytorch", "tf", "safetensors", "convnextv2", "image-classification", "vision", "dataset:imagenet-1k", "arxiv:2301.00808", "license:apache-2.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
image-classification
"2023-02-17T14:03:53Z"
--- license: apache-2.0 tags: - vision - image-classification datasets: - imagenet-1k widget: - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg example_title: Tiger - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg example_title: Teapot - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg example_title: Palace --- # ConvNeXt V2 (tiny-sized model) ConvNeXt V2 model pretrained using the FCMAE framework and fine-tuned on the ImageNet-1K dataset at resolution 224x224. It was introduced in the paper [ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders](https://arxiv.org/abs/2301.00808) by Woo et al. and first released in [this repository](https://github.com/facebookresearch/ConvNeXt-V2). Disclaimer: The team releasing ConvNeXT V2 did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description ConvNeXt V2 is a pure convolutional model (ConvNet) that introduces a fully convolutional masked autoencoder framework (FCMAE) and a new Global Response Normalization (GRN) layer to ConvNeXt. ConvNeXt V2 significantly improves the performance of pure ConvNets on various recognition benchmarks. ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnextv2_architecture.png) ## Intended uses & limitations You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=convnextv2) 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 AutoImageProcessor, ConvNextV2ForImageClassification import torch from datasets import load_dataset dataset = load_dataset("huggingface/cats-image") image = dataset["test"]["image"][0] preprocessor = AutoImageProcessor.from_pretrained("facebook/convnextv2-tiny-1k-224") model = ConvNextV2ForImageClassification.from_pretrained("facebook/convnextv2-tiny-1k-224") inputs = preprocessor(image, return_tensors="pt") with torch.no_grad(): logits = model(**inputs).logits # model predicts one of the 1000 ImageNet classes predicted_label = logits.argmax(-1).item() print(model.config.id2label[predicted_label]), ``` For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/convnextv2). ### BibTeX entry and citation info ```bibtex @article{DBLP:journals/corr/abs-2301-00808, author = {Sanghyun Woo and Shoubhik Debnath and Ronghang Hu and Xinlei Chen and Zhuang Liu and In So Kweon and Saining Xie}, title = {ConvNeXt {V2:} Co-designing and Scaling ConvNets with Masked Autoencoders}, journal = {CoRR}, volume = {abs/2301.00808}, year = {2023}, url = {https://doi.org/10.48550/arXiv.2301.00808}, doi = {10.48550/arXiv.2301.00808}, eprinttype = {arXiv}, eprint = {2301.00808}, timestamp = {Tue, 10 Jan 2023 15:10:12 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-2301-00808.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} } ```
[ -0.69064861536026, -0.37327349185943604, -0.35589778423309326, 0.17260783910751343, -0.36199310421943665, -0.2878727316856384, -0.16051749885082245, -0.8007912039756775, 0.3273906111717224, 0.4094303250312805, -0.5640605688095093, -0.0964638739824295, -0.570946455001831, -0.08359357714653015, -0.22764229774475098, 0.7766343355178833, 0.07983890920877457, 0.04362097382545471, -0.30769869685173035, -0.2389640063047409, -0.40235984325408936, -0.4524959921836853, -0.8935258388519287, -0.3168703615665436, 0.2171621024608612, 0.4173976480960846, 0.6203411221504211, 0.6640848517417908, 0.6950588226318359, 0.34564998745918274, -0.009576534852385521, 0.12768922746181488, -0.35713669657707214, -0.32471591234207153, 0.13536114990711212, -0.26853471994400024, -0.3929370939731598, 0.09899905323982239, 0.23248454928398132, 0.35125306248664856, 0.2367502748966217, 0.34563887119293213, 0.19801512360572815, 0.4989359378814697, -0.2682349681854248, 0.2771350145339966, -0.4664306938648224, 0.12089439481496811, 0.08764062821865082, 0.10800103098154068, -0.3929376006126404, -0.07310424745082855, 0.22749784588813782, -0.5826706886291504, 0.5310453176498413, 0.1899191290140152, 1.1348254680633545, 0.24741066992282867, -0.35470500588417053, -0.0037498518358916044, -0.431636780500412, 0.6175663471221924, -0.6005783677101135, 0.3003484010696411, 0.10163430124521255, 0.3962777554988861, 0.0005768804112449288, -1.0922969579696655, -0.5821355581283569, -0.12869314849376678, -0.4065016806125641, 0.11771833896636963, -0.3931339681148529, 0.13188748061656952, 0.3640556037425995, 0.4698094427585602, -0.7844155430793762, 0.3229561448097229, -0.5903375744819641, -0.39081117510795593, 0.8146327137947083, -0.13990609347820282, 0.15303927659988403, -0.28409504890441895, -0.7099463939666748, -0.36235880851745605, -0.4019470810890198, 0.24344132840633392, 0.12539049983024597, -0.015820425003767014, -0.5395916700363159, 0.45523518323898315, -0.10806034505367279, 0.520762026309967, 0.37405505776405334, 0.26938438415527344, 0.3488573133945465, -0.35379114747047424, -0.41903403401374817, 0.028324376791715622, 1.0464515686035156, 0.6029869914054871, 0.2436455488204956, 0.1779058277606964, 0.0044258348643779755, 0.07610704749822617, -0.0038492658641189337, -1.122222900390625, -0.6261531710624695, 0.2424020916223526, -0.5742233991622925, -0.33381709456443787, 0.11702112853527069, -0.567727267742157, -0.17819000780582428, -0.3588174283504486, 0.525309145450592, -0.04430914297699928, -0.5232071280479431, -0.00610899506136775, -0.15885010361671448, 0.3374159336090088, 0.2970319092273712, -0.6936980485916138, 0.43479353189468384, 0.416998952627182, 0.8546828627586365, -0.072532519698143, 0.07433772087097168, -0.13262774050235748, -0.5066030621528625, -0.28044405579566956, 0.5110982656478882, 0.07468623667955399, -0.05044146999716759, -0.2111588716506958, 0.4863489270210266, 0.1175583004951477, -0.5444522500038147, 0.37796372175216675, -0.47946465015411377, 0.016388505697250366, -0.21056169271469116, -0.3904576301574707, -0.24185702204704285, 0.2628186345100403, -0.7856389880180359, 1.0005943775177002, 0.3307690918445587, -0.8176977038383484, 0.20023232698440552, -0.4125954806804657, -0.023105479776859283, -0.02519828826189041, 0.019483234733343124, -0.8117533922195435, -0.15929479897022247, 0.11881785094738007, 0.6227254867553711, -0.2872864902019501, 0.20982663333415985, -0.4843480885028839, -0.26580652594566345, 0.06746360659599304, -0.35782697796821594, 1.0484751462936401, 0.2456519901752472, -0.4186091721057892, -0.030866865068674088, -0.6812277436256409, 0.07992485910654068, 0.3107738494873047, 0.09550294280052185, -0.14021717011928558, -0.48385506868362427, 0.300018310546875, 0.6663984656333923, 0.2518598735332489, -0.5877935886383057, 0.3115587830543518, -0.3564370572566986, 0.48149216175079346, 0.5673450827598572, 0.01947498321533203, 0.445242315530777, -0.2042856067419052, 0.3001101613044739, 0.09191711992025375, 0.5688717365264893, 0.026778651401400566, -0.48148393630981445, -0.9283803105354309, -0.18452900648117065, 0.1212267205119133, 0.3916094899177551, -0.7773083448410034, 0.3439888060092926, -0.2339554727077484, -0.7415225505828857, -0.3000339865684509, 0.0074216267094016075, 0.47466421127319336, 0.34545618295669556, 0.5380834937095642, -0.5334015488624573, -0.8957533240318298, -1.0622814893722534, 0.10254138708114624, 0.08900394290685654, 0.0012468036729842424, 0.38357195258140564, 0.6314356327056885, -0.170551136136055, 0.787368893623352, -0.19326668977737427, -0.22526893019676208, -0.035300396382808685, 0.026029260829091072, 0.29682591557502747, 0.8736639618873596, 0.6806750893592834, -1.0090605020523071, -0.6333631277084351, -0.04458216205239296, -0.7829889059066772, 0.22166883945465088, -0.0981779545545578, -0.17098931968212128, 0.1742086559534073, 0.5415039658546448, -0.48052406311035156, 0.5654783844947815, 0.5730211734771729, -0.3883390724658966, 0.6008614897727966, -0.03897397220134735, -0.16688169538974762, -1.0888429880142212, 0.009911821223795414, 0.25297853350639343, -0.23504890501499176, -0.44241228699684143, -0.1184227466583252, 0.10854355990886688, -0.025797514244914055, -0.6650466322898865, 0.8251616954803467, -0.6509663462638855, -0.022687621414661407, -0.21068431437015533, -0.2323365956544876, 0.11798940598964691, 0.813744843006134, 0.2361581176519394, 0.29349857568740845, 0.5498657822608948, -0.5448667407035828, 0.6478599905967712, 0.30091020464897156, -0.3287120461463928, 0.3796789050102234, -0.9149981737136841, 0.15320971608161926, 0.13289809226989746, 0.46406644582748413, -0.9709499478340149, -0.22650833427906036, 0.36463621258735657, -0.5529552102088928, 0.6216332316398621, -0.33701127767562866, -0.3912810683250427, -0.8371304273605347, -0.2749154567718506, 0.5776400566101074, 0.4554922878742218, -0.6885489225387573, 0.10899657011032104, 0.24516187608242035, 0.33906978368759155, -0.5451095700263977, -0.9295488595962524, -0.12299103289842606, 0.068245530128479, -0.7227802276611328, 0.359500527381897, -0.20598763227462769, 0.05611434951424599, 0.13764414191246033, -0.15734857320785522, -0.03476441279053688, -0.12441852688789368, 0.34508785605430603, 0.4405207633972168, -0.28305792808532715, -0.08700772374868393, 0.004566099029034376, -0.22359402477741241, 0.07731319218873978, -0.5502433776855469, 0.40967369079589844, -0.24633167684078217, -0.009538067504763603, -0.6479268074035645, 0.14466023445129395, 0.4139231741428375, -0.10451626032590866, 0.6223450899124146, 0.9345026612281799, -0.5084012150764465, -0.12469009310007095, -0.42696937918663025, -0.3725355565547943, -0.5290020108222961, 0.4211452305316925, -0.2775905430316925, -0.7996451258659363, 0.5249572992324829, 0.12244582176208496, 0.006955729331821203, 0.7675065398216248, 0.5407653450965881, -0.07625904679298401, 0.7015289664268494, 0.5396004915237427, 0.30567216873168945, 0.6326887607574463, -1.021368384361267, 0.012067558243870735, -1.0485548973083496, -0.46832478046417236, -0.24611744284629822, -0.6124357581138611, -0.9660394191741943, -0.5037137269973755, 0.2980577051639557, 0.06514060497283936, -0.530849814414978, 0.7764820456504822, -0.9583823680877686, 0.2208004593849182, 0.6371862888336182, 0.34772366285324097, -0.24020251631736755, 0.17099514603614807, 0.01982111670076847, 0.03693323954939842, -0.8103213906288147, -0.04419645294547081, 0.895095944404602, 0.4219312369823456, 0.5011960864067078, -0.08037858456373215, 0.35782715678215027, 0.1698080152273178, 0.31788477301597595, -0.709404706954956, 0.40790340304374695, -0.34376803040504456, -0.859426736831665, -0.10380298644304276, -0.19368857145309448, -0.9223129153251648, 0.1659054309129715, -0.2715008854866028, -0.6907861232757568, 0.8881648182868958, 0.31745803356170654, -0.18451423943042755, 0.378069669008255, -0.7385324835777283, 1.056540608406067, -0.17040537297725677, -0.5387550592422485, 0.15786196291446686, -0.9337658882141113, 0.37943631410598755, 0.1794326901435852, -0.06636017560958862, 0.09210684895515442, 0.26353850960731506, 0.8056991100311279, -0.7234522104263306, 0.8947640657424927, -0.24648967385292053, 0.3608255386352539, 0.6873443722724915, 0.0306769460439682, 0.6387675404548645, 0.05512996017932892, -0.028200173750519753, 0.547240138053894, 0.13606470823287964, -0.46768686175346375, -0.5499241352081299, 0.6823257207870483, -0.9154003858566284, -0.26496005058288574, -0.40422162413597107, -0.2822035253047943, 0.14597490429878235, 0.13052085041999817, 0.8724011182785034, 0.6806079149246216, 0.03579106554389, 0.5148681402206421, 0.6426772475242615, -0.16071124374866486, 0.47855645418167114, 0.07998272031545639, 0.002549635712057352, -0.4209243953227997, 0.8127540946006775, 0.36703529953956604, 0.4405243396759033, 0.354688823223114, 0.15473394095897675, -0.36791637539863586, -0.20525969564914703, -0.3789401650428772, 0.20812222361564636, -0.586005687713623, -0.5340564250946045, -0.6965492963790894, -0.5429162383079529, -0.4755594730377197, -0.2312476634979248, -0.6127417683601379, -0.48011329770088196, -0.45539602637290955, 0.04786370322108269, 0.44975054264068604, 0.3903707265853882, -0.3793492019176483, 0.3760068118572235, -0.2618732154369354, 0.1673216074705124, 0.3020762503147125, 0.36209815740585327, 0.025472218170762062, -0.7151764631271362, -0.39139851927757263, 0.11418864876031876, -0.34947100281715393, -0.43403252959251404, 0.4649767279624939, 0.11090876907110214, 0.35087981820106506, 0.34832748770713806, 0.107874795794487, 0.46670228242874146, -0.08068718761205673, 0.6735883355140686, 0.5902576446533203, -0.5735964179039001, 0.39700639247894287, -0.09250989556312561, 0.1333010047674179, 0.24556410312652588, 0.2871960401535034, -0.4850083291530609, 0.04106585308909416, -0.9737710356712341, -0.8398267030715942, 0.7115176916122437, 0.26056501269340515, 0.11142146587371826, 0.22000959515571594, 0.49260175228118896, 0.02599474787712097, 0.0445711575448513, -0.8007924556732178, -0.564898669719696, -0.5919786691665649, -0.21792736649513245, -0.11233901977539062, -0.4232677221298218, 0.1178249642252922, -0.6119496822357178, 0.6294938325881958, -0.12246237695217133, 0.8138319849967957, 0.4040549695491791, 0.013100230135023594, -0.04406627267599106, -0.40551117062568665, 0.4293302595615387, 0.06805703788995743, -0.2878815829753876, 0.10744040459394455, -0.03213042393326759, -0.5888799428939819, 0.02572263590991497, 0.17691120505332947, -0.10320374369621277, 0.12320982664823532, 0.4213411808013916, 1.0354721546173096, 0.12312926352024078, 0.059138767421245575, 0.7193366289138794, -0.20590007305145264, -0.4113689661026001, -0.5497347116470337, 0.07566676288843155, -0.15832580626010895, 0.27816241979599, 0.10715759545564651, 0.504603922367096, 0.18215994536876678, -0.3266112506389618, 0.39093267917633057, 0.343713641166687, -0.5555940270423889, -0.3534238338470459, 0.8014004826545715, 0.0456242710351944, -0.10771153122186661, 0.7375297546386719, -0.2746983766555786, -0.4363415539264679, 1.2053546905517578, 0.5118898749351501, 0.9025322794914246, -0.07171815633773804, 0.10033518075942993, 0.9769110679626465, 0.43993231654167175, -0.0893591120839119, -0.05994168296456337, 0.048154477030038834, -0.716874897480011, -0.09816251695156097, -0.5121986269950867, -0.04260948300361633, 0.27988648414611816, -0.6428938508033752, 0.5269074440002441, -0.5197281241416931, -0.1282930225133896, 0.032068926841020584, 0.4761061668395996, -1.1595412492752075, 0.511038601398468, 0.15570290386676788, 1.0589118003845215, -0.774775505065918, 0.9141751527786255, 0.4938671290874481, -0.4557033181190491, -1.1155166625976562, -0.5035523772239685, 0.019984079524874687, -0.6238939166069031, 0.4812667667865753, 0.3598814308643341, 0.3445781469345093, 0.1589810997247696, -1.050564169883728, -0.8798356652259827, 1.3317605257034302, 0.19614411890506744, -0.6166720390319824, 0.23200403153896332, -0.13533467054367065, 0.4941376745700836, -0.3881819248199463, 0.4777579605579376, 0.15203072130680084, 0.36658263206481934, 0.36147597432136536, -0.763274073600769, 0.21946223080158234, -0.506553590297699, 0.14511938393115997, -0.10357615351676941, -1.0121543407440186, 0.89756178855896, -0.23173494637012482, 0.020743785426020622, 0.06242810934782028, 0.8108031153678894, -0.05103519931435585, 0.3764170706272125, 0.4146976172924042, 0.402822345495224, 0.5227686166763306, -0.2762586772441864, 1.0974822044372559, -0.0096040153875947, 0.7014698386192322, 1.0202685594558716, 0.46833229064941406, 0.46289974451065063, 0.20915554463863373, -0.09273353964090347, 0.4055284857749939, 1.0691410303115845, -0.4405154585838318, 0.4337959587574005, 0.162832573056221, 0.07939060777425766, -0.1913537085056305, -0.03738168627023697, -0.5088798999786377, 0.4004902243614197, 0.2512606084346771, -0.4096839129924774, 0.12054119259119034, 0.215867280960083, 0.1021660715341568, -0.373075395822525, -0.24914035201072693, 0.47418147325515747, 0.25171923637390137, -0.4719006419181824, 0.8545258045196533, -0.10096915811300278, 0.7378048896789551, -0.3465130627155304, -0.0212250929325819, -0.3934324383735657, 0.23161183297634125, -0.2980157434940338, -0.6717988848686218, 0.29592782258987427, -0.3237452805042267, -0.17539861798286438, 0.07299908995628357, 0.7589358687400818, -0.40774545073509216, -0.6242995858192444, 0.2803630530834198, -0.03207128494977951, 0.21318362653255463, -0.009135949425399303, -0.9729729294776917, 0.2283763289451599, -0.07933387160301208, -0.4986785054206848, 0.16202442348003387, 0.3657074570655823, -0.19186003506183624, 0.5700799226760864, 0.6384278535842896, -0.2392490953207016, 0.08807694911956787, -0.330472856760025, 0.8700200915336609, -0.2850499451160431, -0.23064351081848145, -0.6133895516395569, 0.5941346287727356, -0.242865651845932, -0.3804474174976349, 0.5835409164428711, 0.6700512766838074, 1.0411990880966187, -0.1629147231578827, 0.6524648070335388, -0.37630972266197205, -0.01576768420636654, -0.22337713837623596, 0.5949022769927979, -0.7769119739532471, -0.08926143497228622, -0.207679882645607, -0.6025335192680359, -0.4007818102836609, 0.5328818559646606, -0.17045365273952484, 0.21854989230632782, 0.5045170187950134, 0.9762052893638611, -0.2602022588253021, -0.21388715505599976, 0.26366397738456726, 0.3433680832386017, 0.2540808618068695, 0.5649085640907288, 0.21014010906219482, -1.0266036987304688, 0.43257397413253784, -0.7724471688270569, -0.22142933309078217, -0.5677449703216553, -0.6448346972465515, -0.7951715588569641, -0.7740494012832642, -0.5729209184646606, -0.7621302604675293, -0.20683690905570984, 0.9714229106903076, 1.0878881216049194, -0.8695409297943115, -0.022768335416913033, -0.2341236174106598, 0.014025931246578693, -0.46080872416496277, -0.23596926033496857, 0.6782207489013672, 0.17453202605247498, -0.7287009358406067, -0.2614840269088745, -0.022525830194354057, 0.21800489723682404, -0.16237305104732513, -0.29360875487327576, -0.15616820752620697, -0.05924040451645851, 0.5830695033073425, 0.4893076419830322, -0.4889863133430481, -0.31840068101882935, 0.03646985813975334, -0.2592836320400238, 0.1245369166135788, 0.4701148271560669, -0.5922544598579407, 0.6456159949302673, 0.4853179454803467, 0.2539021670818329, 0.7415652871131897, -0.2471887320280075, 0.07893715798854828, -0.7235910296440125, 0.5355978608131409, 0.061691783368587494, 0.26370397210121155, 0.3112887740135193, -0.5648824572563171, 0.605791449546814, 0.5406322479248047, -0.5744742155075073, -0.687627375125885, 0.04751402512192726, -1.4280955791473389, -0.08802907168865204, 1.1861592531204224, -0.09509602189064026, -0.39118608832359314, 0.05151025578379631, -0.16961322724819183, 0.5524956583976746, -0.09494520723819733, 0.3827052116394043, 0.35336631536483765, 0.018197668716311455, -0.5155358910560608, -0.5494047999382019, 0.5504921674728394, -0.09435822069644928, -0.4441758096218109, -0.330401211977005, 0.1938580870628357, 0.35576388239860535, 0.10791900008916855, 0.44549936056137085, -0.10724210739135742, 0.37829214334487915, 0.21017812192440033, 0.44297969341278076, -0.3743024170398712, -0.14157137274742126, -0.21089056134223938, -0.12980228662490845, -0.34138649702072144, -0.44457197189331055 ]
porntech/sex-position
porntech
"2023-11-15T08:30:23Z"
26,885
11
timm
[ "timm", "pytorch", "not-for-all-audiences", "image-classification", "license:mit", "has_space", "region:us" ]
image-classification
"2023-06-04T11:10:42Z"
--- license: mit library_name: timm pipeline_tag: image-classification tags: - not-for-all-audiences --- # classify sex positions in a sexy or NSFW image. WARNING! Leave now if you are less than 18 years old! * The following sex positions are supported: ["blowjob", "hardcore", "titjob", "handjob", "pussy-licking", "fingering", "other", "solo"] * Input image must be a sexy or NSFW image, otherwise the prediction is undefined. For example, a clothed women eating a banana would most likely to be predicted as blowjob. * "hardcore" actually represents four subclasses: "missionary", "doggystyle", "cowgirl" and "spooning". I will support these four classes in the future. * "other" means some other behavior such as kissing or talking, "solo" means a single woman. * This repo is for image classification, for sex position classification for videos, see [this repo](https://huggingface.co/spaces/porntech/sex-position-video) of mine. * Here are two sample SFW images you can try with model: [single woman](https://st.depositphotos.com/1022904/2166/i/950/depositphotos_21668751-stock-photo-yang-and-beautiful-sexy-woman.jpg): predicted as "solo" [kissing](https://www.verywellmind.com/thmb/8nU7Yax1VdiTTKzIg6c48aFXkP0=/750x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/GettyImages-471932267-58bc89565f9b58af5ca9d09d.jpg): predicted as "other" I will soon be on job market and is now looking for full time or part time jobs focusing on developping AI models for sexy/NSFW videos/images, if you are interested in me or this work, feel free to contact porntech@126.com
[ -0.1913130283355713, -0.6947161555290222, 0.20350387692451477, 0.6018556356430054, -0.5155429244041443, -0.28162118792533875, 0.2449621707201004, -0.4185889959335327, 0.1519361436367035, 0.8068811297416687, -0.5676672458648682, -0.865923285484314, -0.6395617723464966, 0.1421821415424347, -0.4797092378139496, 0.7425511479377747, 0.2525797486305237, 0.01305979210883379, -0.5967479348182678, 0.28308582305908203, -0.5650270581245422, -0.28255337476730347, -0.3946502208709717, 0.2017183154821396, 0.2689174711704254, 0.41786128282546997, 0.7470532059669495, 0.6488447189331055, 0.7213355302810669, 0.47855475544929504, 0.1901044398546219, 0.02839961275458336, -0.39294326305389404, -0.0191903468221426, 0.12071160227060318, -0.35579437017440796, -0.5988200902938843, 0.19697517156600952, 0.31237637996673584, 0.599014163017273, -0.13530735671520233, 0.24042490124702454, -0.561572790145874, 0.5513524413108826, -0.4827372133731842, 0.03532537817955017, -0.23008643090724945, 0.38294684886932373, -0.4945649802684784, -0.28497597575187683, -0.4424806535243988, -0.28394922614097595, 0.0667508915066719, -0.15430311858654022, 0.29563239216804504, 0.07330503314733505, 0.7417467832565308, 0.3067551553249359, -0.9828598499298096, 0.269428551197052, -0.678519606590271, 0.5257519483566284, -0.5834460854530334, 0.9047248959541321, 0.6539087891578674, 0.15999753773212433, -0.0868014544248581, -0.27430567145347595, -0.0752425268292427, -0.3058769106864929, -0.3645508289337158, 0.06518454849720001, -0.26138991117477417, 0.18338200449943542, 0.42508187890052795, 0.23471173644065857, -0.8121866583824158, 0.035148028284311295, -0.6710465550422668, -0.01212140079587698, 0.8533085584640503, 0.049148332327604294, 0.6206035017967224, -0.1712653785943985, -0.7393608093261719, 0.02532491274178028, -0.4426490366458893, 0.47053006291389465, 0.6009575724601746, -0.006587917450815439, -0.6079472303390503, 0.7474838495254517, -0.13328567147254944, 0.5758187770843506, 0.22139300405979156, -0.5041500926017761, 0.059193652123212814, -0.027659129351377487, -0.47220560908317566, -0.3618333637714386, 0.8817816972732544, 0.5692327618598938, -0.28349101543426514, 0.15882180631160736, 0.06992898136377335, 0.09319283068180084, 0.6514987349510193, -0.6334618330001831, -0.3695676028728485, 0.06678114831447601, -0.5153290033340454, -0.8015139698982239, 0.38624414801597595, -0.6102179884910583, -0.3729207217693329, -0.001965080387890339, -0.06958238035440445, -0.3504140079021454, -0.38483360409736633, -0.004171321634203196, -0.224892258644104, 0.17939679324626923, 0.25213733315467834, -0.9692863821983337, 0.5551245212554932, 0.40065181255340576, 0.5087630152702332, 0.06284833699464798, -0.13894915580749512, 0.1615271270275116, 0.002763925353065133, -0.3115904629230499, 0.6510997414588928, -0.19136208295822144, -0.29269954562187195, 0.02957584522664547, 0.3633858263492584, -0.0014658860163763165, -0.42521020770072937, 0.6111072897911072, -0.507628321647644, 0.04086875915527344, -0.04175085946917534, -0.18394334614276886, -0.5246036648750305, 0.15233008563518524, -0.8226355910301208, 0.7929233908653259, -0.2508864104747772, -0.9300940632820129, 0.47488734126091003, -0.5275806784629822, -0.562133252620697, -0.0851631686091423, -0.14145216345787048, -0.4539940655231476, -0.1131514310836792, 0.0399666465818882, 0.724358081817627, 0.023084836080670357, 0.08766684681177139, -0.5708944797515869, -0.38435035943984985, 0.7550504207611084, -0.14687232673168182, 0.8631254434585571, -0.2202327847480774, -0.30106544494628906, 0.25492143630981445, -0.4438542425632477, -0.178551584482193, 0.2291191667318344, 0.272077739238739, -0.24825042486190796, -0.1625593900680542, -0.06918635964393616, 0.1601981669664383, 0.17695078253746033, -0.4530101716518402, 0.4364855885505676, -0.04861306771636009, 0.11265816539525986, 0.6242972016334534, -0.15176476538181305, 0.4104456603527069, -0.17395098507404327, 0.7849587798118591, 0.028629662469029427, 0.5109549760818481, 0.48609134554862976, -0.4613949954509735, -0.6111357808113098, -0.14611275494098663, -0.05321451649069786, 0.601547360420227, -0.7366549372673035, 0.4787420630455017, 0.10638900846242905, -0.8914092779159546, -0.2936484217643738, -0.030355364084243774, 0.6136010885238647, 0.01712191291153431, 0.34439894556999207, -0.15436342358589172, -0.7392057776451111, -1.0452985763549805, 0.1858895719051361, -0.2585752606391907, 0.1646278202533722, 0.10957402735948563, 0.3975966274738312, 0.001231422065757215, 0.4482928514480591, -0.5705312490463257, -0.6140087246894836, 0.10180310159921646, 0.1278577744960785, 0.2711331844329834, 0.6682438254356384, 0.7453797459602356, -1.3593798875808716, -0.12229394912719727, -0.2554599344730377, -1.0224254131317139, 0.41913074254989624, 0.2159174084663391, -0.30505669116973877, 0.056340012699365616, 0.21681274473667145, -0.43078839778900146, 0.4592467248439789, 0.43349596858024597, -0.30613258481025696, 0.7388205528259277, -0.38025251030921936, 0.3530709147453308, -0.4481043219566345, -0.08213815838098526, 0.41740527749061584, -0.4626421630382538, -0.5396907329559326, 0.4169743061065674, -0.022535722702741623, -0.19936922192573547, -0.6392085552215576, 0.17922277748584747, -0.8006324768066406, -0.16485463082790375, -0.4003954231739044, -0.4167836904525757, -0.4842396080493927, 0.6240077614784241, 0.3015631139278412, 0.41105300188064575, 0.7395561337471008, -0.8202214241027832, 0.5209762454032898, 0.5479175448417664, -0.2013767659664154, 0.3774665594100952, -0.41706106066703796, 0.5926089286804199, 0.09979602694511414, 0.4088916778564453, -1.0517984628677368, -0.6753318309783936, 0.16079744696617126, -0.6778568625450134, 0.22623403370380402, -0.5303807258605957, -0.15556812286376953, -0.6895896792411804, -0.4816156029701233, 0.6073160171508789, 0.3391764461994171, -0.4744490683078766, 0.09768396615982056, 0.6049187779426575, -0.04952182620763779, -1.1840457916259766, -0.8035228848457336, -0.45302680134773254, -0.17639601230621338, -0.8361935615539551, 0.4031931757926941, 0.3840859830379486, -0.0865112841129303, -0.006959483027458191, -0.11731588840484619, -0.5366857051849365, -0.11825839430093765, 0.7003180980682373, 0.7123887538909912, 0.08539050072431564, -0.21271555125713348, 0.18838880956172943, -0.18772542476654053, 0.1860874742269516, -0.06753027439117432, 0.48383864760398865, -0.16951225697994232, -0.18725863099098206, -0.4263019263744354, 0.37001708149909973, 0.43136584758758545, -0.0892997607588768, 0.6016889810562134, 1.1802725791931152, -0.6625521779060364, -0.09676406532526016, -0.2714615762233734, -0.1941896229982376, -0.444986492395401, 0.171187624335289, -0.18343394994735718, -0.5510983467102051, 0.12787699699401855, 0.4022429287433624, -0.1263366937637329, 0.242359459400177, 0.1376027911901474, -0.35994622111320496, 1.4830933809280396, 1.164174199104309, 0.11254699528217316, 0.11889343708753586, -0.4771976172924042, -0.04380469396710396, -0.42744600772857666, -0.2624030113220215, -0.18446052074432373, -0.5379882454872131, -0.9458982348442078, -0.39739206433296204, 0.4738762378692627, -0.08173033595085144, -0.2781563401222229, 0.6124301552772522, -0.6608980298042297, 0.32010340690612793, 0.37990593910217285, 0.556969404220581, 0.00979822687804699, -0.2394922524690628, 0.059312134981155396, -0.14921744167804718, -0.09236737340688705, -0.35300785303115845, 0.5291069746017456, 0.3310174345970154, 0.7945719361305237, 0.5269429683685303, 0.46075239777565, 0.2865749001502991, 0.17214474081993103, -0.8868515491485596, 0.9616012573242188, -0.9282069206237793, -0.9365501403808594, -0.12698107957839966, -0.25196996331214905, -0.584646999835968, 0.07736504077911377, -0.38019096851348877, -0.8860347867012024, 0.13613837957382202, 0.04606977477669716, -0.18700964748859406, 0.4596889615058899, -0.34336400032043457, 1.0060005187988281, -0.1887550801038742, -0.6101776361465454, 0.11852353811264038, -0.9287030100822449, 0.8105722665786743, 0.7915471196174622, 0.21978475153446198, -0.4092673063278198, -0.23736034333705902, 0.6810386180877686, -0.37045449018478394, 1.1106714010238647, -0.5203484296798706, 0.037017572671175, -0.08318691700696945, 0.10563724488019943, -0.010165994986891747, 0.20948143303394318, 0.07364751398563385, -0.18353696167469025, 0.07072138041257858, -0.3521413803100586, -0.1320703774690628, 0.703985333442688, -0.9154317378997803, -0.48067593574523926, -0.47666850686073303, -0.2644399106502533, -0.07617712020874023, 0.09279397130012512, 0.6815115809440613, 0.5387706160545349, -0.2752484679222107, 0.3824236989021301, 0.5481800436973572, -0.09229633957147598, 0.041974566876888275, 0.026298047974705696, -0.5633795261383057, -0.3692588806152344, 0.8687960505485535, -0.06283729523420334, -0.04632824286818504, 0.5645588040351868, 0.1643926203250885, -0.7166841626167297, -0.4241499602794647, -0.2611173391342163, 0.37158313393592834, -0.767600953578949, -0.2343980073928833, -0.6843489408493042, -0.03562702238559723, -0.9278590083122253, -0.4443543255329132, -0.10010586678981781, -0.10653991997241974, -0.17406141757965088, -0.32427918910980225, 0.6026164889335632, 0.457022488117218, 0.1861972063779831, 0.26498350501060486, -0.9053061604499817, 0.3966386020183563, 0.34404078125953674, 0.11254541575908661, -0.5893887877464294, -0.252108633518219, 0.2780250608921051, -0.18855857849121094, -0.3565627932548523, -1.041061282157898, 0.7047311067581177, 0.09669651836156845, 0.27115991711616516, 0.5908240675926208, 0.33937275409698486, 0.8671736717224121, 0.052886493504047394, 0.9277275204658508, 0.28009381890296936, -0.6874152421951294, 0.3897817134857178, -0.5235917568206787, -0.0633641928434372, 0.60592120885849, 0.887695848941803, -0.39477330446243286, -0.23407840728759766, -0.8333551287651062, -0.6006771922111511, 0.7086672782897949, 0.18348562717437744, 0.20955167710781097, 0.22395575046539307, 0.25965186953544617, 0.3688513934612274, 0.4577977955341339, -1.2365564107894897, -0.45234185457229614, 0.062193576246500015, 0.08893845230340958, 0.5178831219673157, 0.025256847962737083, -0.16739583015441895, -0.6073815226554871, 0.826008677482605, -0.23094825446605682, 0.8706294894218445, -0.021415503695607185, -0.14487583935260773, -0.35243552923202515, 0.17089317739009857, 0.46691805124282837, 0.42253074049949646, -0.4850581884384155, 0.4665050506591797, 0.012206092476844788, -0.46465790271759033, 0.5210489630699158, 0.14035199582576752, -0.2539594769477844, 0.018655892461538315, 0.2576318383216858, 0.9485231041908264, 0.40938735008239746, -0.21167069673538208, 0.7438818216323853, -0.11001674830913544, -0.19190613925457, -0.7120260000228882, 0.1484500765800476, 0.00030789809534326196, 0.15331882238388062, 0.07498947530984879, 0.27941834926605225, 0.4417724013328552, -0.6930528879165649, 0.12659046053886414, 0.33184343576431274, -0.557388961315155, -0.3724514842033386, 0.7604071497917175, -0.02539290301501751, -0.12735721468925476, 0.6676275730133057, -0.5041942000389099, -0.49205103516578674, 0.9133787751197815, 0.6441196203231812, 0.8932400345802307, -0.34355491399765015, 0.7018923759460449, 0.6069236993789673, 0.02413676679134369, 0.0430154912173748, 0.5751110911369324, 0.2212265133857727, -0.744735836982727, -0.1260736882686615, -0.4432561993598938, -0.28698718547821045, 0.24942569434642792, -0.6046121716499329, 0.8021330833435059, -0.733626663684845, -0.2877025604248047, 0.5407125949859619, -0.12214130163192749, -0.5110860466957092, 0.5383554697036743, 0.40386250615119934, 0.5047307014465332, -0.8853698968887329, 0.8807187080383301, 1.1165519952774048, -0.4185720980167389, -0.8071541786193848, -0.11677569150924683, 0.45964133739471436, -0.6955202221870422, 0.2851684093475342, 0.5610806941986084, -0.0861114114522934, -0.26258668303489685, -1.089455485343933, -0.52802973985672, 1.0246185064315796, 0.1081317737698555, -0.006762999575585127, -0.4514484107494354, -0.25252559781074524, 0.26704269647598267, -0.26025810837745667, 0.5281195640563965, 0.19571609795093536, 0.33358561992645264, 0.23157112300395966, -0.7888193726539612, 0.15711964666843414, -0.4563194513320923, -0.016811508685350418, 0.45353710651397705, -0.5815728306770325, 0.9445497393608093, -0.40506789088249207, -0.24303321540355682, 0.43725329637527466, 0.6985176801681519, 0.22068189084529877, 0.38807591795921326, 1.000586986541748, 0.2937648892402649, 0.27085959911346436, -0.393621027469635, 0.8460862040519714, 0.5192422270774841, 0.32708799839019775, 0.7284648418426514, 0.05533180385828018, 0.6758124828338623, -0.07846981287002563, -0.4422111213207245, 0.5249714851379395, 0.8223533630371094, -0.3424754738807678, 0.4529612958431244, -0.06491844356060028, 0.052404794842004776, -0.2280510514974594, -0.19560475647449493, -0.365224689245224, 0.8013154864311218, 0.24387909471988678, -0.25401851534843445, 0.24636368453502655, 0.49308502674102783, -0.16594688594341278, 0.03883396089076996, -0.03401387855410576, 0.6905026435852051, 0.09603603929281235, -0.2953115403652191, 0.4904436469078064, -0.056238915771245956, 1.0115158557891846, -0.5052303671836853, -0.14508897066116333, 0.125186949968338, 0.07158906757831573, -0.7149317860603333, -0.9091043472290039, 0.13749198615550995, -0.09252409636974335, -0.03312145546078682, -0.4461984932422638, 1.349927306175232, -0.5201466679573059, -0.5288025140762329, 0.19794495403766632, 0.1914251744747162, 0.4376773536205292, 0.13926348090171814, -0.8292938470840454, -0.29558178782463074, -0.06137700378894806, 0.32324668765068054, 0.24760249257087708, 0.06686252355575562, -0.03511080890893936, 0.6206119656562805, 0.6862149834632874, -0.3366438150405884, -0.14986532926559448, 0.06595427542924881, 0.4654257595539093, -0.8895689845085144, -0.752142608165741, -0.4077370762825012, 0.45058614015579224, -0.011029506102204323, -0.4179336726665497, 0.6891123056411743, 0.2775944769382477, 0.7580132484436035, -0.6610730886459351, 0.32398736476898193, -0.33033549785614014, 0.1414790153503418, -0.43964529037475586, 0.5409867167472839, -0.8802602887153625, -0.2676968574523926, -0.6192963123321533, -0.5213960409164429, -0.16468626260757446, 0.5122585892677307, -0.3473087549209595, -0.01145733892917633, 0.44075000286102295, 0.533082127571106, -0.12218974530696869, 0.3176586627960205, 0.40053513646125793, -0.13308699429035187, -0.02578835003077984, 0.10461881756782532, 1.1633391380310059, -0.3446308672428131, 0.058433033525943756, -1.2539019584655762, -0.27946579456329346, -0.5092952847480774, -0.749518871307373, -0.524219810962677, -0.5736188888549805, -0.5802747011184692, -0.055915288627147675, -0.36539044976234436, 1.0123978853225708, 1.0574185848236084, -0.43348944187164307, -0.48809394240379333, 0.05494013801217079, 0.09227681159973145, -0.8435823917388916, -0.23260241746902466, 0.011416397988796234, 0.40013831853866577, -1.0195680856704712, 0.41980764269828796, 0.03128392994403839, 0.32229459285736084, -0.3034535050392151, 0.4509791433811188, -0.5726308226585388, -0.3606400191783905, 0.38187095522880554, 0.3943033814430237, -0.6586114764213562, -0.199226975440979, 0.5683509707450867, -0.26296287775039673, -0.11709129810333252, 0.5271012783050537, -0.050025805830955505, -0.022702841088175774, 0.4660778045654297, 0.01992913894355297, 0.5822612643241882, 0.03816298395395279, 0.30599910020828247, -1.020277500152588, 0.4048369824886322, 0.45189908146858215, 0.36728477478027344, 0.3650436997413635, -0.9254684448242188, 0.6158653497695923, 0.28300490975379944, -0.45414867997169495, -0.8555302023887634, -0.06128524988889694, -1.6900379657745361, -0.2076023668050766, 0.8759286403656006, 0.0171878132969141, -0.4474291205406189, 0.08052828907966614, -0.35349270701408386, 0.24919873476028442, -0.21589426696300507, 0.3894653916358948, 0.3428191840648651, -0.3410966098308563, -0.28790345788002014, -0.438770592212677, 0.41419264674186707, 0.22134220600128174, -0.7972235679626465, -0.1759292483329773, 0.42622101306915283, 0.2322215735912323, 0.3925744295120239, 0.8312272429466248, -0.17765159904956818, 0.5140372514724731, 0.09354595094919205, 0.2696695327758789, -0.02019750140607357, -0.38326552510261536, 0.027654163539409637, 0.1166289672255516, -0.23708373308181763, -0.566828727722168 ]
keremberke/yolov8n-table-extraction
keremberke
"2023-02-22T13:02:45Z"
26,813
5
ultralytics
[ "ultralytics", "tensorboard", "v8", "ultralyticsplus", "yolov8", "yolo", "vision", "object-detection", "pytorch", "awesome-yolov8-models", "dataset:keremberke/table-extraction", "model-index", "region:us" ]
object-detection
"2023-01-29T03:49:35Z"
--- tags: - ultralyticsplus - yolov8 - ultralytics - yolo - vision - object-detection - pytorch - awesome-yolov8-models library_name: ultralytics library_version: 8.0.21 inference: false datasets: - keremberke/table-extraction model-index: - name: keremberke/yolov8n-table-extraction results: - task: type: object-detection dataset: type: keremberke/table-extraction name: table-extraction split: validation metrics: - type: precision # since mAP@0.5 is not available on hf.co/metrics value: 0.96714 # min: 0.0 - max: 1.0 name: mAP@0.5(box) --- <div align="center"> <img width="640" alt="keremberke/yolov8n-table-extraction" src="https://huggingface.co/keremberke/yolov8n-table-extraction/resolve/main/thumbnail.jpg"> </div> ### Supported Labels ``` ['bordered', 'borderless'] ``` ### How to use - Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus): ```bash pip install ultralyticsplus==0.0.23 ultralytics==8.0.21 ``` - Load model and perform prediction: ```python from ultralyticsplus import YOLO, render_result # load model model = YOLO('keremberke/yolov8n-table-extraction') # set model parameters model.overrides['conf'] = 0.25 # NMS confidence threshold model.overrides['iou'] = 0.45 # NMS IoU threshold model.overrides['agnostic_nms'] = False # NMS class-agnostic model.overrides['max_det'] = 1000 # maximum number of detections per image # set image image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg' # perform inference results = model.predict(image) # observe results print(results[0].boxes) render = render_result(model=model, image=image, result=results[0]) render.show() ``` **More models available at: [awesome-yolov8-models](https://yolov8.xyz)**
[ -0.516972541809082, -0.4241761565208435, 0.5620229840278625, -0.348900705575943, -0.4017253518104553, -0.3287610113620758, 0.13442565500736237, -0.4377731680870056, 0.2981938123703003, 0.3334335386753082, -0.5265106558799744, -0.7004945278167725, -0.3975008726119995, -0.027385488152503967, -0.002013295656070113, 0.8153645992279053, 0.48144933581352234, 0.018112242221832275, -0.011916512623429298, -0.12752005457878113, -0.041429225355386734, 0.12102216482162476, -0.10273145884275436, -0.4790897071361542, 0.15048491954803467, 0.4299909174442291, 0.7592453360557556, 0.7513550519943237, 0.2847280502319336, 0.5013728141784668, -0.12922871112823486, -0.09958315640687943, -0.23612502217292786, 0.19279973208904266, -0.0011310891713947058, -0.4535512924194336, -0.5172594785690308, 0.037987325340509415, 0.6744242906570435, 0.31077897548675537, -0.0768899992108345, 0.39770323038101196, -0.10855820775032043, 0.3907913565635681, -0.5860432386398315, 0.3254354000091553, -0.6091050505638123, 0.09354326874017715, -0.21210531890392303, 0.043302983045578, -0.35222190618515015, -0.14896850287914276, 0.2623356878757477, -0.7885413765907288, 0.1396394520998001, 0.19642238318920135, 1.1994374990463257, 0.06179460138082504, -0.22960911691188812, 0.43584108352661133, -0.26714903116226196, 0.8314492702484131, -1.1430513858795166, 0.25009652972221375, 0.33254295587539673, 0.3103173077106476, -0.14164823293685913, -0.7239264845848083, -0.5717387199401855, -0.17879895865917206, -0.044187795370817184, 0.14035364985466003, -0.3249410092830658, -0.5031445026397705, 0.46857577562332153, 0.11727627366781235, -0.6525656580924988, 0.09191764146089554, -0.6112673878669739, -0.24330738186836243, 0.4811350107192993, 0.3711375296115875, 0.2843926250934601, -0.26573285460472107, -0.47049379348754883, -0.32098302245140076, -0.1680958867073059, -0.09198618680238724, 0.11184626072645187, 0.3140709400177002, -0.47622305154800415, 0.45242324471473694, -0.4662579596042633, 0.7692781090736389, 0.0702090784907341, -0.48039087653160095, 0.7969280481338501, 0.011274773627519608, -0.3801225423812866, 0.01368022058159113, 1.3808342218399048, 0.5548849105834961, -0.1843033879995346, 0.2742142081260681, -0.1682923585176468, -0.05091850832104683, 0.06488785892724991, -0.8488912582397461, -0.3869708478450775, 0.23039962351322174, -0.3770548105239868, -0.611383318901062, 0.056633662432432175, -1.3242216110229492, -0.3878069221973419, 0.20179873704910278, 0.692280650138855, -0.3348222076892853, -0.3968210518360138, 0.14595887064933777, -0.1658000648021698, 0.20832771062850952, 0.18011118471622467, -0.5301296710968018, 0.09666796773672104, -0.03736812248826027, 0.7659903764724731, -0.025523412972688675, -0.06026235595345497, -0.3458501398563385, 0.07686948031187057, -0.29890576004981995, 0.8818439841270447, -0.21996226906776428, -0.3370063900947571, -0.10035641491413116, 0.2968384921550751, 0.12263789027929306, -0.4294337332248688, 0.6906962394714355, -0.5770652294158936, 0.08017247915267944, -0.06094171851873398, -0.3872145116329193, -0.3201417326927185, 0.35498160123825073, -0.7325529456138611, 1.0086841583251953, 0.09263484179973602, -0.9710447788238525, 0.21703709661960602, -0.5066165924072266, -0.1253974735736847, 0.3272624611854553, 0.03714045137166977, -1.010589361190796, 0.04718675836920738, 0.035261329263448715, 0.7875668406486511, -0.24574591219425201, -0.04607918858528137, -0.930832028388977, -0.011374905705451965, 0.44070300459861755, -0.3074347674846649, 0.7378941178321838, 0.12068012356758118, -0.5320625901222229, 0.3145531415939331, -1.1484456062316895, 0.4266307055950165, 0.6602077484130859, -0.12889178097248077, -0.17422251403331757, -0.4711292088031769, 0.23288466036319733, 0.2622624337673187, 0.10586130619049072, -0.6878763437271118, 0.2614589333534241, -0.21419674158096313, 0.30027756094932556, 0.7277585864067078, -0.2409762442111969, 0.35284844040870667, -0.0854407548904419, 0.30512022972106934, 0.00729881227016449, 0.03719589114189148, 0.08967416733503342, -0.3497844934463501, -0.5634282231330872, -0.04240158945322037, 0.19687135517597198, 0.1910575032234192, -0.7664350867271423, 0.6063307523727417, -0.34380006790161133, -0.8084768652915955, -0.23336642980575562, -0.20028340816497803, 0.2474101483821869, 0.818403422832489, 0.5450587272644043, -0.2786506116390228, -0.339009165763855, -0.9461674094200134, 0.44467148184776306, 0.18862415850162506, 0.19559407234191895, -0.008489475585520267, 1.0145759582519531, 0.10807392746210098, 0.41897255182266235, -0.8881313800811768, -0.2570284307003021, -0.37169867753982544, -0.1306334137916565, 0.5426645278930664, 0.6052418351173401, 0.48320677876472473, -0.6762920618057251, -0.9350078105926514, 0.07162854075431824, -0.671375572681427, 0.09462584555149078, 0.25188663601875305, -0.16450375318527222, 0.13974478840827942, 0.08181563019752502, -0.6060540080070496, 0.7123449444770813, 0.20873169600963593, -0.5886012315750122, 1.099676251411438, -0.2488342672586441, 0.09030891209840775, -1.1081966161727905, 0.07734254002571106, 0.6007840037345886, -0.45365869998931885, -0.6351158618927002, 0.05896979197859764, 0.27197661995887756, 0.027474839240312576, -0.6058252453804016, 0.514033317565918, -0.45538222789764404, -0.03781775012612343, -0.21725866198539734, -0.21202188730239868, 0.28699442744255066, 0.2641505002975464, -0.04097435250878334, 0.6343978643417358, 1.0128365755081177, -0.49194714426994324, 0.5509104132652283, 0.3684610426425934, -0.6153281927108765, 0.5392782092094421, -0.6452346444129944, 0.021602101624011993, 0.23927268385887146, 0.09389173239469528, -1.043601632118225, -0.45515871047973633, 0.4554003179073334, -0.49899837374687195, 0.6905362010002136, -0.34627866744995117, -0.36185169219970703, -0.5351198315620422, -0.6385364532470703, 0.061712637543678284, 0.4777648150920868, -0.42278754711151123, 0.5110140442848206, 0.3675196170806885, 0.24724458158016205, -0.6179859638214111, -0.695015013217926, -0.44400864839553833, -0.40996190905570984, -0.24649876356124878, 0.39407381415367126, 0.031545527279376984, -0.07957052439451218, 0.1601995974779129, -0.3099447190761566, -0.1697445958852768, -0.10597684979438782, 0.2828347086906433, 0.9160502552986145, -0.20212137699127197, -0.2256038635969162, -0.3299086391925812, -0.4384481906890869, 0.18734987080097198, -0.5215701460838318, 0.8419806957244873, -0.3736151158809662, -0.07110776007175446, -1.0157322883605957, -0.0780964195728302, 0.695712149143219, -0.064576655626297, 0.8363584280014038, 0.940542459487915, -0.2514367997646332, 0.03149593994021416, -0.6797366738319397, -0.07822345197200775, -0.5010926723480225, 0.5333123803138733, -0.3549267053604126, -0.15265655517578125, 0.6759169101715088, 0.22626475989818573, -0.19115875661373138, 0.9783208966255188, 0.25442811846733093, -0.43951618671417236, 1.1635810136795044, 0.46981215476989746, 0.04526617005467415, 0.3343714475631714, -0.995891273021698, -0.3493242561817169, -1.0777837038040161, -0.4580309987068176, -0.5795053243637085, -0.2163485586643219, -0.5246095061302185, -0.2112474888563156, 0.5740875601768494, -0.19259388744831085, -0.2905777096748352, 0.4584205746650696, -0.7514432668685913, 0.4489727318286896, 0.7004613280296326, 0.3938961923122406, -0.004216271452605724, 0.2183733433485031, -0.39263394474983215, -0.17593662440776825, -0.5217255353927612, -0.3159487247467041, 1.1012117862701416, 0.028633197769522667, 0.7835402488708496, -0.12820591032505035, 0.4835233688354492, 0.031100576743483543, 0.0507066585123539, -0.49679216742515564, 0.6446189284324646, 0.10544994473457336, -0.9649065136909485, -0.2667756974697113, -0.4147205650806427, -0.9396635890007019, 0.29740458726882935, -0.6359639167785645, -1.093658208847046, 0.1732625514268875, 0.0004040470812469721, -0.4800522029399872, 0.7848154902458191, -0.4174840450286865, 0.9296659827232361, -0.17084501683712006, -0.8895828127861023, 0.1659463793039322, -0.690456211566925, 0.06801995635032654, 0.3361174762248993, 0.2085963487625122, -0.40680980682373047, 0.09641025215387344, 0.9680063128471375, -0.608041524887085, 0.8557765483856201, -0.2723758816719055, 0.40223127603530884, 0.47421303391456604, -0.005069809500128031, 0.3808667063713074, -0.1361621916294098, -0.2867698073387146, 0.05341336503624916, 0.28351283073425293, -0.29942598938941956, -0.33759400248527527, 0.7421184778213501, -0.8126956820487976, -0.36334115266799927, -0.6873645782470703, -0.5450215339660645, 0.16529229283332825, 0.5153569579124451, 0.5688528418540955, 0.6030386686325073, 0.11905686557292938, 0.24586810171604156, 0.7598176002502441, -0.10718695819377899, 0.5335180163383484, 0.2597378194332123, -0.3637729287147522, -0.6988259553909302, 0.8864238858222961, 0.2023947685956955, 0.13028305768966675, -0.035674676299095154, 0.6691204905509949, -0.7018774747848511, -0.5617468953132629, -0.5029354095458984, 0.24050340056419373, -0.7496001124382019, -0.5455159544944763, -0.5733495950698853, -0.09666291624307632, -0.6290349960327148, -0.0046609509736299515, -0.4955267608165741, -0.32456734776496887, -0.595022439956665, -0.13757380843162537, 0.5832781791687012, 0.5465816855430603, -0.2675020396709442, 0.48587992787361145, -0.6977543830871582, 0.2801722288131714, 0.2008855789899826, 0.3236177861690521, 0.03630092367529869, -0.8694826364517212, 0.06499703973531723, -0.3067828118801117, -0.5397143959999084, -1.1263281106948853, 0.8560781478881836, -0.1021382138133049, 0.6800627112388611, 0.5149480700492859, 0.118607297539711, 0.7962479591369629, -0.04673130437731743, 0.4390331506729126, 0.6464195847511292, -0.7574787735939026, 0.49091804027557373, -0.39870694279670715, 0.4050597548484802, 0.6274364590644836, 0.6847237348556519, -0.06371331214904785, 0.1621021032333374, -0.8643373250961304, -0.9029060006141663, 0.817874014377594, -0.027919618412852287, -0.14068067073822021, 0.44205817580223083, 0.3722687363624573, 0.1873301863670349, -0.11203491687774658, -1.3278617858886719, -0.5399435758590698, -0.07446633279323578, -0.18964143097400665, 0.19880704581737518, -0.2353326380252838, -0.008669746108353138, -0.689954400062561, 1.0787265300750732, -0.27450957894325256, 0.17010968923568726, 0.19980423152446747, 0.09616465121507645, -0.2370111048221588, 0.1966090351343155, 0.2961609959602356, 0.5155035257339478, -0.42326804995536804, 0.006099356804043055, 0.12729564309120178, -0.35426345467567444, 0.094261534512043, 0.20817676186561584, -0.3674142360687256, -0.11201439797878265, 0.3505971431732178, 0.7009905576705933, -0.16473206877708435, -0.007165571209043264, 0.31025004386901855, 0.07897426187992096, -0.40182366967201233, -0.3401143550872803, 0.19903315603733063, 0.18548350036144257, 0.33823859691619873, 0.4749566316604614, 0.14723828434944153, 0.4151017367839813, -0.42140963673591614, 0.30200472474098206, 0.5934759974479675, -0.6327826976776123, -0.31180769205093384, 0.843582034111023, -0.2888590693473816, 0.036394599825143814, 0.4084095060825348, -0.5578773021697998, -0.6087521910667419, 0.9886350631713867, 0.5749443173408508, 0.5914453268051147, -0.053966913372278214, 0.1832721084356308, 0.8047271370887756, -0.07697039097547531, -0.16443325579166412, 0.4325096011161804, 0.2173646092414856, -0.5123078227043152, -0.0988369882106781, -0.668606698513031, -0.02550335042178631, 0.6201519966125488, -0.7616823315620422, 0.413585901260376, -0.4120140075683594, -0.4643526077270508, 0.6221950650215149, 0.2924068868160248, -0.6786713004112244, 0.3347160220146179, 0.21987760066986084, 0.5716626048088074, -0.9217063188552856, 0.7292383313179016, 0.6902766227722168, -0.4594561457633972, -1.0433430671691895, -0.31113120913505554, 0.29263195395469666, -0.7819719910621643, 0.30944859981536865, 0.5001283288002014, 0.17806755006313324, 0.10721714794635773, -0.9291459321975708, -0.9891956448554993, 1.1095292568206787, -0.01452257577329874, -0.3614834249019623, 0.34664252400398254, -0.16636645793914795, 0.18563967943191528, -0.37887808680534363, 0.6788628697395325, 0.27551594376564026, 0.600031316280365, 0.37242746353149414, -0.6847985982894897, 0.18572887778282166, -0.2862650752067566, -0.29622194170951843, 0.19908930361270905, -0.38799354434013367, 0.8174173831939697, -0.38191351294517517, 0.0844506323337555, 0.09841320663690567, 0.5833206176757812, 0.23168206214904785, 0.2318592667579651, 0.574904203414917, 0.8244484663009644, 0.3689662218093872, -0.23684462904930115, 0.7733282446861267, 0.1937151700258255, 0.799388587474823, 1.1762454509735107, -0.22440090775489807, 0.6045868992805481, 0.19964902102947235, -0.34980085492134094, 0.48216569423675537, 0.6543020009994507, -0.6122751832008362, 0.7616625428199768, -0.06894280016422272, 0.08311567455530167, -0.2480807602405548, -0.15203823149204254, -0.6371045708656311, 0.4440901279449463, 0.39872127771377563, -0.23777207732200623, -0.26281243562698364, -0.2117900252342224, -0.12169457226991653, -0.26649782061576843, -0.31749919056892395, 0.49000245332717896, -0.20379553735256195, -0.142945796251297, 0.6591651439666748, -0.2703871428966522, 0.7975547313690186, -0.5899668335914612, -0.04278021678328514, 0.3057582676410675, 0.23599454760551453, -0.37577635049819946, -1.0281181335449219, 0.17208650708198547, -0.32605525851249695, 0.10998068004846573, 0.2785164713859558, 0.9971665740013123, -0.1465734988451004, -0.8257021903991699, 0.34812384843826294, 0.4369261562824249, 0.2613466680049896, 0.08380521088838577, -0.9491623044013977, 0.2559633255004883, 0.3275313973426819, -0.7013518214225769, 0.3851189613342285, 0.22864368557929993, 0.3056947588920593, 0.8156368732452393, 0.8295652270317078, 0.06836538016796112, 0.0684298574924469, -0.26397615671157837, 1.0092693567276, -0.6199856996536255, -0.35601121187210083, -0.9936973452568054, 0.8464928865432739, -0.3743411898612976, -0.3194877505302429, 0.6297451257705688, 0.6257762312889099, 0.5836523771286011, -0.2664070129394531, 0.46337708830833435, -0.30766332149505615, 0.05925879254937172, -0.3016248941421509, 0.9930023550987244, -0.9545748829841614, -0.1640443503856659, -0.3463708758354187, -0.6992583870887756, -0.2144036889076233, 0.7671812772750854, -0.20431013405323029, -0.04167567938566208, 0.6076026558876038, 0.6264278888702393, -0.36579787731170654, -0.12073896825313568, 0.4231741428375244, 0.4559210538864136, -0.0004898599581792951, 0.18215835094451904, 0.5775272846221924, -0.5748438835144043, 0.4308910667896271, -1.0250121355056763, -0.1406761258840561, -0.14473462104797363, -0.768303394317627, -0.6611730456352234, -0.498625785112381, -0.6842291951179504, -0.538472056388855, -0.4261573851108551, 0.8120254278182983, 1.0896387100219727, -0.8347737193107605, -0.05762780085206032, 0.20967383682727814, 0.04043705761432648, 0.001785731757991016, -0.24769438803195953, 0.49480488896369934, 0.19591982662677765, -0.7115960717201233, 0.2431737631559372, 0.12191110849380493, 0.4175964891910553, 0.06781411916017532, 0.3484603762626648, -0.47358882427215576, -0.499545693397522, -0.006123469211161137, 0.34306928515434265, -0.46994224190711975, 0.05941089615225792, -0.23272426426410675, -0.012327129952609539, 0.5720692276954651, -0.23419015109539032, -0.6096805930137634, 0.4584125876426697, 0.5496847033500671, 0.03886948898434639, 0.656743049621582, -0.3160398602485657, -0.035268425941467285, -0.24290558695793152, 0.33873462677001953, 0.05773273482918739, 0.7172674536705017, 0.21732166409492493, -0.4200330972671509, 0.4769443869590759, 0.34643271565437317, -0.3604058623313904, -0.9131993055343628, -0.1524488627910614, -1.1075866222381592, -0.3094892203807831, 0.8246626257896423, -0.2066861093044281, -0.7611671686172485, -0.01846942864358425, 0.17368178069591522, 0.3309340476989746, -0.6740599274635315, 0.5404989123344421, 0.30885690450668335, -0.05047816038131714, -0.030925728380680084, -0.9223175048828125, 0.07296804338693619, 0.37143561244010925, -0.7605611681938171, -0.4132205843925476, 0.4226727783679962, 0.7244871854782104, 0.7637608647346497, 0.3502715528011322, -0.19865156710147858, 0.16531148552894592, 0.10285577923059464, 0.5068696737289429, -0.28068315982818604, -0.1644773781299591, -0.2714351415634155, 0.21303528547286987, -0.23045627772808075, -0.5086833834648132 ]
mosaicml/mpt-7b-instruct
mosaicml
"2023-10-30T21:53:34Z"
26,789
444
transformers
[ "transformers", "pytorch", "mpt", "text-generation", "Composer", "MosaicML", "llm-foundry", "custom_code", "dataset:mosaicml/dolly_hhrlhf", "arxiv:2205.14135", "arxiv:2108.12409", "arxiv:2010.04245", "license:cc-by-sa-3.0", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-05-05T00:52:12Z"
--- license: cc-by-sa-3.0 datasets: - mosaicml/dolly_hhrlhf tags: - Composer - MosaicML - llm-foundry inference: false --- # MPT-7B-Instruct MPT-7B-Instruct is a model for short-form instruction following. It is built by finetuning [MPT-7B](https://huggingface.co/mosaicml/mpt-7b) on a [dataset](https://huggingface.co/datasets/sam-mosaic/dolly_hhrlhf) 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: _CC-By-SA-3.0_ * [Demo on Hugging Face Spaces](https://huggingface.co/spaces/mosaicml/mpt-7b-instruct) This model was trained by [MosaicML](https://www.mosaicml.com) and follows a modified decoder-only transformer architecture. ## Model Date May 5, 2023 ## Model License CC-By-SA-3.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)! ### Example Question/Instruction **Longboi24**: > What is a quoll? **MPT-7B-Instruct**: >A Quoll (pronounced “cool”) is one of Australia’s native carnivorous marsupial mammals, which are also known as macropods or wallabies in other parts around Asia and South America ## How to Use Note: This model requires that `trust_remote_code=True` be passed to the `from_pretrained` method. This is because we use a custom model architecture that is not yet part of the `transformers` package. It includes options for many training efficiency features such as [FlashAttention (Dao et al. 2022)](https://arxiv.org/pdf/2205.14135.pdf), [ALiBi](https://arxiv.org/abs/2108.12409), QK LayerNorm, and more. ```python import transformers model = transformers.AutoModelForCausalLM.from_pretrained( 'mosaicml/mpt-7b-instruct', 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-instruct' 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-instruct' 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)) ``` ### Formatting This model was trained on data formatted in the dolly-15k format: ```python INSTRUCTION_KEY = "### Instruction:" RESPONSE_KEY = "### Response:" INTRO_BLURB = "Below is an instruction that describes a task. Write a response that appropriately completes the request." PROMPT_FOR_GENERATION_FORMAT = """{intro} {instruction_key} {instruction} {response_key} """.format( intro=INTRO_BLURB, instruction_key=INSTRUCTION_KEY, instruction="{instruction}", response_key=RESPONSE_KEY, ) example = "James decides to run 3 sprints 3 times a week. He runs 60 meters each sprint. How many total meters does he run a week? Explain before answering." fmt_ex = PROMPT_FOR_GENERATION_FORMAT.format(instruction=example) ``` In the above example, `fmt_ex` is ready to be tokenized and sent through the model. ## 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 | ## PreTraining Data For more details on the pretraining process, see [MPT-7B](https://huggingface.co/mosaicml/mpt-7b). The data was tokenized using the [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) tokenizer. ### Training Configuration This model was trained on 8 A100-40GBs for about 2.3 hours 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 AdamW optimizer. ## Limitations and Biases _The following language is modified from [EleutherAI's GPT-NeoX-20B](https://huggingface.co/EleutherAI/gpt-neox-20b)_ MPT-7B-Instruct can produce factually incorrect output, and should not be relied on to produce factually accurate information. MPT-7B-Instruct 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. ## Acknowledgements This model was finetuned by Sam Havens and the MosaicML NLP team ## 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-03-28}, % change this date urldate = {2023-03-28} % change this date } ```
[ -0.4100617468357086, -0.5578343868255615, 0.23666241765022278, 0.3420502841472626, -0.40468859672546387, -0.09964656084775925, -0.016077328473329544, -0.31558898091316223, 0.050576090812683105, 0.3644164800643921, -0.6309673190116882, -0.5828750729560852, -0.6022036671638489, 0.12203408777713776, -0.30109846591949463, 0.9515544176101685, -0.059917982667684555, -0.0476679690182209, -0.0077254436910152435, -0.07420384883880615, -0.1870386004447937, -0.43516209721565247, -0.5456047058105469, -0.33278733491897583, 0.4326024055480957, 0.07365646213293076, 0.7728638052940369, 0.8266206979751587, 0.35518139600753784, 0.36087343096733093, -0.2222890555858612, 0.18951871991157532, -0.4037036597728729, -0.42812657356262207, 0.031093033030629158, -0.3893311321735382, -0.5587990880012512, 0.2563500702381134, 0.47463783621788025, 0.32853463292121887, -0.15130186080932617, 0.35772037506103516, 0.023913132026791573, 0.29455724358558655, -0.3788629174232483, 0.19716890156269073, -0.4253323972225189, 0.15383866429328918, -0.031205428764224052, 0.003928112331777811, -0.4898419678211212, -0.41969814896583557, 0.09171570837497711, -0.5911637544631958, 0.30347490310668945, 0.029382141306996346, 1.0132794380187988, 0.17705610394477844, -0.3669132590293884, 0.0034382666926831007, -0.5288334488868713, 0.6712428331375122, -0.8225093483924866, 0.2980912923812866, 0.335097074508667, 0.19896367192268372, 0.04490221291780472, -0.9854457974433899, -0.6967393755912781, -0.3373938500881195, -0.18763048946857452, 0.3357970118522644, -0.11938384920358658, 0.07175244390964508, 0.5813280344009399, 0.35294777154922485, -0.6057920455932617, -0.2097824066877365, -0.41144779324531555, -0.22428660094738007, 0.5132185816764832, 0.21493516862392426, 0.2519606649875641, -0.46103420853614807, -0.6433862447738647, -0.3226246237754822, -0.6156154870986938, 0.056651629507541656, 0.37490832805633545, 0.01821625791490078, -0.5662670731544495, 0.5890876054763794, 0.003865679958835244, 0.5218222141265869, 0.20906470715999603, -0.05050058290362358, 0.37341710925102234, -0.31659838557243347, -0.25652119517326355, -0.13126608729362488, 1.069251298904419, 0.29464152455329895, 0.09402155876159668, -0.04014400765299797, -0.15340670943260193, -0.08734466135501862, 0.11858664453029633, -1.0025814771652222, -0.33601146936416626, 0.13671566545963287, -0.4633511006832123, -0.22623558342456818, 0.11897653341293335, -0.4960152208805084, -0.17604610323905945, -0.3288244903087616, 0.8120385408401489, -0.7310380339622498, -0.2989750802516937, 0.1336938440799713, -0.12345132976770401, 0.35028812289237976, 0.152427539229393, -0.6918534636497498, 0.156680628657341, 0.40260884165763855, 0.9332693219184875, 0.049672286957502365, -0.5212492346763611, -0.16267795860767365, 0.017707977443933487, -0.007513721939176321, 0.4347389340400696, -0.21131844818592072, -0.3227291405200958, -0.28198757767677307, 0.24777752161026, -0.3756352663040161, -0.46533840894699097, 0.27368271350860596, -0.3669818043708801, 0.547598659992218, -0.21517789363861084, -0.3971026837825775, -0.2216208130121231, 0.13948893547058105, -0.5303604006767273, 1.0623027086257935, 0.46505850553512573, -0.9048160314559937, 0.17496436834335327, -0.6928037405014038, -0.2105128914117813, -0.18007279932498932, 0.07527371495962143, -0.70513916015625, -0.12874576449394226, 0.28746867179870605, 0.41398993134498596, -0.3320891857147217, 0.11261072009801865, -0.2321842461824417, -0.4519822597503662, 0.26868200302124023, -0.4285089075565338, 0.9975005984306335, 0.18399685621261597, -0.6326450109481812, 0.15978938341140747, -0.820324182510376, -0.0967051088809967, 0.256758451461792, -0.37714993953704834, 0.25788554549217224, -0.2919068932533264, 0.013400998897850513, 0.28320473432540894, 0.1725926399230957, -0.556554913520813, 0.23165307939052582, -0.369442343711853, 0.451064795255661, 0.7359648942947388, -0.16479915380477905, 0.34698009490966797, -0.4490262269973755, 0.40116462111473083, 0.14536377787590027, 0.5190634727478027, -0.14864426851272583, -0.5389201045036316, -0.8845171928405762, -0.32594722509384155, 0.2995191216468811, 0.49694275856018066, -0.9355975985527039, 0.3898502290248871, -0.11833737790584564, -0.6407521367073059, -0.558284342288971, -0.12816880643367767, 0.5211270451545715, 0.5369569659233093, 0.6687485575675964, -0.30215951800346375, -0.6169983744621277, -0.7418548464775085, 0.0016032324638217688, 0.08650888502597809, -0.024886736646294594, 0.3169136345386505, 0.5624191761016846, -0.3217160999774933, 0.815198540687561, -0.3524453938007355, 0.08292100578546524, -0.32264816761016846, 0.2537778615951538, 0.5549150109291077, 0.6194701790809631, 0.522307813167572, -0.6788017749786377, -0.6078591346740723, -0.18757246434688568, -0.6941458582878113, 0.07143238931894302, -0.06871874630451202, -0.23016387224197388, 0.08824433386325836, 0.19012674689292908, -1.001804232597351, 0.5449989438056946, 0.45849609375, -0.41502588987350464, 0.6691304445266724, -0.1187439113855362, -0.014594434760510921, -1.3227205276489258, 0.05075820907950401, -0.0889490470290184, -0.21943585574626923, -0.4915723502635956, -0.18350253999233246, 0.11417480558156967, -0.008425824344158173, -0.7497773766517639, 0.4613906145095825, -0.41924145817756653, 0.06132545322179794, -0.2107846736907959, -0.2516542971134186, -0.03222432732582092, 0.6179085373878479, 0.22222298383712769, 0.6740732192993164, 0.5250413417816162, -0.5568640232086182, 0.4439566135406494, 0.3086371421813965, -0.1635265201330185, 0.20118600130081177, -0.7377551198005676, 0.23487018048763275, 0.13045230507850647, 0.23691830039024353, -0.689465343952179, -0.1259293407201767, 0.49035751819610596, -0.5129349231719971, 0.3549542725086212, -0.35772132873535156, -0.3596251606941223, -0.5931389331817627, -0.18064692616462708, 0.4676116704940796, 0.7600030303001404, -0.720003604888916, 0.7017406821250916, -0.06974774599075317, 0.2748708128929138, -0.7747360467910767, -0.4260476231575012, -0.2270280122756958, -0.2519242763519287, -0.7211196422576904, 0.3722314238548279, 0.0031832673121243715, 0.19054333865642548, -0.13465923070907593, -0.12153308093547821, 0.05367621034383774, -0.12454194575548172, 0.3075917959213257, 0.4025213122367859, -0.2515636682510376, -0.253135621547699, -0.16646608710289001, -0.27725082635879517, 0.1636972576379776, -0.2661379873752594, 0.8955022096633911, -0.30992698669433594, -0.2363400012254715, -0.6868947744369507, 0.1143207848072052, 0.47018760442733765, -0.17556464672088623, 0.9589409828186035, 1.086790680885315, -0.1665297895669937, 0.0010224650613963604, -0.530916690826416, -0.32167863845825195, -0.5265901684761047, 0.31939801573753357, -0.1511450558900833, -0.5467260479927063, 0.5298841595649719, 0.13847863674163818, -0.10036204755306244, 0.5918601155281067, 0.612748920917511, -0.10044027864933014, 0.9225060343742371, 0.5400940179824829, 0.26608672738075256, 0.5243675708770752, -0.7858853340148926, -0.023511361330747604, -0.9217394590377808, -0.2805527448654175, -0.19184643030166626, -0.2404291331768036, -0.5978447794914246, -0.6038330793380737, 0.2733994722366333, -0.03021105006337166, -0.6656115055084229, 0.7378243803977966, -0.5813134908676147, 0.3703373968601227, 0.7704051733016968, 0.38922742009162903, 0.00533298309892416, -0.16353881359100342, -0.27910131216049194, 0.15406545996665955, -0.8020489811897278, -0.42072999477386475, 1.1311396360397339, 0.3307833671569824, 0.7463295459747314, -0.08619161695241928, 0.7610363960266113, -0.1309007853269577, 0.4494760036468506, -0.45470961928367615, 0.5117117762565613, 0.11459092050790787, -0.6764297485351562, -0.09676099568605423, -0.644633412361145, -0.8242277503013611, 0.2804250717163086, -0.24145549535751343, -0.6800342798233032, 0.2842717170715332, 0.23708589375019073, -0.4508907198905945, 0.46647781133651733, -0.8544155359268188, 0.9724860191345215, -0.24658340215682983, -0.5245348811149597, 0.07762265205383301, -0.8157500624656677, 0.36064931750297546, 0.16874083876609802, -0.06407400965690613, -0.04564793035387993, 0.2728261351585388, 0.7793138027191162, -0.5216416120529175, 0.9084782004356384, -0.27799883484840393, 0.29036203026771545, 0.4267415702342987, -0.1229805052280426, 0.4885965883731842, 0.10600358247756958, 0.057935260236263275, 0.21239788830280304, 0.16804657876491547, -0.4238940179347992, -0.3234584927558899, 0.3719186782836914, -1.0947993993759155, -0.5107916593551636, -0.5383095145225525, -0.6121742129325867, 0.0717606246471405, 0.16366545855998993, 0.6718526482582092, 0.328335702419281, 0.10074786841869354, 0.2525422275066376, 0.6529930830001831, -0.4792366027832031, 0.6916539669036865, 0.26778462529182434, -0.1153930202126503, -0.5019511580467224, 0.8315392732620239, -0.02397315204143524, 0.37297916412353516, 0.2871288061141968, 0.27772143483161926, -0.41421958804130554, -0.4264160394668579, -0.3785671591758728, 0.428692489862442, -0.4962528347969055, -0.3412958085536957, -0.6574915647506714, -0.4538695514202118, -0.4257270097732544, 0.07471241056919098, -0.6009989976882935, -0.3177277743816376, -0.3896462321281433, 0.01432465948164463, 0.3175073564052582, 0.5556318163871765, -0.10231535881757736, 0.6732233762741089, -0.829276978969574, 0.3750187158584595, 0.34459736943244934, 0.26862862706184387, -0.03493648022413254, -0.7375007271766663, -0.3275511860847473, 0.17809727787971497, -0.6248918771743774, -0.8356603384017944, 0.48155999183654785, -0.01415345910936594, 0.4783938527107239, 0.2895180284976959, -0.03915005549788475, 0.5762202739715576, -0.3713240623474121, 0.7593820095062256, 0.3776240348815918, -0.9041348099708557, 0.3422614634037018, -0.37942615151405334, 0.34640976786613464, 0.08880875259637833, 0.5920115113258362, -0.4523021876811981, -0.09203065931797028, -0.8509386777877808, -0.787434458732605, 0.9130416512489319, 0.48349103331565857, 0.14948734641075134, 0.020044345408678055, 0.3942624628543854, 0.04159178212285042, 0.14583450555801392, -1.1741154193878174, -0.2009860724210739, -0.5728998184204102, -0.2261418104171753, -0.012524055317044258, -0.10469549149274826, -0.19064050912857056, -0.5938014388084412, 0.737499475479126, 0.020023653283715248, 0.6826526522636414, 0.25556352734565735, -0.3311944901943207, 0.03289729356765747, -0.020770063623785973, 0.45845359563827515, 0.6582285165786743, -0.32212361693382263, -0.001290049753151834, 0.3030085861682892, -0.7025748491287231, 0.10644296556711197, 0.24587644636631012, -0.07988796383142471, -0.08221542835235596, 0.37096017599105835, 0.9147056937217712, -0.008648908697068691, -0.11407152563333511, 0.5908182859420776, -0.16482968628406525, -0.22492535412311554, -0.21754825115203857, 0.15580683946609497, 0.34782955050468445, 0.4246441721916199, 0.1317468285560608, 0.06138487905263901, -0.2010468691587448, -0.4374825060367584, 0.16491587460041046, 0.23474669456481934, -0.2641930878162384, -0.4784700274467468, 0.8003354668617249, 0.02924649603664875, -0.24567827582359314, 0.732582688331604, -0.12117133289575577, -0.5247849822044373, 0.7185333967208862, 0.6498109698295593, 0.7851676940917969, -0.33590173721313477, 0.2804395854473114, 0.5038032531738281, 0.3497925400733948, -0.02738897316157818, 0.19589775800704956, -0.05525423586368561, -0.6483372449874878, -0.3953973650932312, -0.7910546660423279, -0.18559928238391876, 0.048312027007341385, -0.5480266213417053, 0.35315483808517456, -0.46985816955566406, -0.2669743597507477, -0.19060227274894714, -0.025278018787503242, -0.7920529246330261, 0.2856040596961975, 0.23856636881828308, 0.8923631906509399, -0.8084027767181396, 0.9048157334327698, 0.41693171858787537, -0.5312538743019104, -1.03407621383667, -0.26809966564178467, -0.15761201083660126, -0.9413119554519653, 0.39103782176971436, 0.3108813762664795, 0.09206723421812057, 0.0018060553120449185, -0.7174948453903198, -0.8389745950698853, 1.3925360441207886, 0.5001675486564636, -0.3652535676956177, -0.2082284688949585, 0.4360973536968231, 0.4516757130622864, -0.30612266063690186, 0.6602151989936829, 0.529685378074646, 0.3738133907318115, 0.29682213068008423, -0.7801156640052795, 0.20196153223514557, -0.23916977643966675, 0.0017724932404235005, -0.0018743537366390228, -0.8032158017158508, 1.164879322052002, -0.22386601567268372, -0.07661161571741104, 0.16084489226341248, 0.6366193294525146, 0.22879654169082642, 0.22523419559001923, 0.3803977072238922, 0.7646318078041077, 0.46685466170310974, -0.2907751798629761, 1.1757327318191528, -0.30073463916778564, 0.6186284422874451, 0.954918622970581, 0.2319616824388504, 0.5264578461647034, 0.34071657061576843, -0.27878275513648987, 0.43193960189819336, 0.8421204090118408, -0.1974458396434784, 0.41590771079063416, 0.02384859137237072, -0.15680357813835144, -0.2923918068408966, 0.23091384768486023, -0.6701042056083679, 0.3139422535896301, 0.17534375190734863, -0.5725841522216797, -0.13132773339748383, 0.025046760216355324, 0.12247747927904129, -0.4574160575866699, -0.12038840353488922, 0.5808936953544617, 0.20697268843650818, -0.4586537182331085, 0.8193304538726807, -0.13156776130199432, 0.6657624840736389, -0.5523962378501892, 0.10344977676868439, -0.2645566463470459, 0.21508042514324188, -0.28592902421951294, -0.6227521300315857, 0.19485415518283844, -0.2065303772687912, -0.042848922312259674, -0.16637589037418365, 0.354902058839798, -0.3294866979122162, -0.458374947309494, 0.2584865689277649, 0.32557716965675354, 0.09307532012462616, -0.16867733001708984, -0.9150693416595459, -0.09683596342802048, 0.03683698922395706, -0.5002106428146362, 0.2422885149717331, 0.2638084888458252, 0.2517937123775482, 0.5895718336105347, 0.6976691484451294, -0.15398988127708435, 0.3270803689956665, -0.06033557280898094, 1.011945366859436, -0.744978666305542, -0.2546938955783844, -0.857201337814331, 0.7013325095176697, -0.06506554782390594, -0.36636048555374146, 0.716652512550354, 0.6156201958656311, 0.8758867383003235, -0.15204155445098877, 0.4691663086414337, -0.1917138397693634, 0.27581071853637695, -0.527086615562439, 0.7531958818435669, -0.3782891035079956, 0.21543718874454498, -0.3064781427383423, -1.2187703847885132, -0.060498278588056564, 0.6613641977310181, -0.4634441137313843, 0.25015178322792053, 0.8047285079956055, 0.9092938899993896, -0.3578149080276489, 0.0779135450720787, 0.17530474066734314, 0.40361714363098145, 0.24470749497413635, 0.6311527490615845, 0.9924098253250122, -0.6491013765335083, 0.636069655418396, -0.6545555591583252, -0.13670162856578827, -0.01128329150378704, -0.7229747176170349, -1.0349884033203125, -0.46095237135887146, -0.23654945194721222, -0.5793272852897644, -0.019705798476934433, 1.0237910747528076, 0.8553383350372314, -0.6356661319732666, -0.3044644892215729, -0.024937501177191734, 0.03739718347787857, -0.16178235411643982, -0.19493642449378967, 0.5427472591400146, -0.06310559064149857, -0.69303297996521, 0.052909549325704575, 0.004212457686662674, 0.33752351999282837, 0.07200275361537933, -0.1251630038022995, -0.36320385336875916, 0.0027649409603327513, 0.5173386335372925, 0.209651380777359, -0.4802378714084625, -0.27183982729911804, 0.08998920023441315, -0.05467803776264191, 0.39358261227607727, 0.4484993517398834, -0.5794393420219421, 0.18070216476917267, 0.28569120168685913, 0.2518591284751892, 0.956766664981842, 0.035209231078624725, 0.4346703588962555, -0.5016949772834778, 0.1875084787607193, 0.26902246475219727, 0.4770345389842987, 0.3161148428916931, -0.2861313819885254, 0.44304394721984863, 0.5040515065193176, -0.5558256506919861, -0.64424067735672, 0.06822755187749863, -1.1035394668579102, -0.08331062644720078, 1.2051225900650024, -0.19146080315113068, -0.5490358471870422, 0.1803564876317978, -0.3572189509868622, 0.5953629016876221, -0.12455674260854721, 0.7368911504745483, 0.3694562613964081, -0.1129293367266655, -0.37751761078834534, -0.3291698694229126, 0.5125165581703186, 0.2790876626968384, -0.634533703327179, -0.17002077400684357, 0.1162584125995636, 0.5128819942474365, 0.1689426302909851, 0.3607047200202942, -0.18234607577323914, 0.38152047991752625, 0.04711009934544563, 0.24245624244213104, -0.2702707350254059, -0.16812573373317719, -0.04807085916399956, 0.04019955173134804, -0.3399646580219269, -0.21228359639644623 ]
facebook/rag-token-nq
facebook
"2023-11-13T16:13:45Z"
26,675
53
transformers
[ "transformers", "pytorch", "tf", "rag", "en", "dataset:wiki_dpr", "arxiv:2005.11401", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
null
"2022-03-02T23:29:05Z"
--- language: en license: apache-2.0 datasets: - wiki_dpr thumbnail: https://huggingface.co/front/thumbnails/facebook.png --- ## RAG This is the RAG-Token Model of the the paper [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/pdf/2005.11401.pdf) by Patrick Lewis, Ethan Perez, Aleksandara Piktus et al. The model is a *uncased* model, which means that capital letters are simply converted to lower-case letters. The model consists of a *question_encoder*, *retriever* and a *generator*. The retriever extracts relevant passages from the *wiki_dpr* `train` datasets, which is linked above. The question_encoder and retriever are based on `facebook/dpr-question_encoder-single-nq-base` and `facebook/bart-large`, which were jointly finetuned on on the *wiki_dpr* QA dataset in an end-to-end fashion. ## Usage: **Note**: In the usage example below only the *dummy* retriever of *wiki_dpr* is used because the complete *lecagy* index requires over 75 GB of RAM. The model can generate answers to any factoid question as follows: ```python from transformers import RagTokenizer, RagRetriever, RagTokenForGeneration tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq") retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=True) model = RagTokenForGeneration.from_pretrained("facebook/rag-token-nq", retriever=retriever) input_dict = tokenizer.prepare_seq2seq_batch("who holds the record in 100m freestyle", return_tensors="pt") generated = model.generate(input_ids=input_dict["input_ids"]) print(tokenizer.batch_decode(generated, skip_special_tokens=True)[0]) # should give michael phelps => sounds reasonable ```
[ -0.34459665417671204, -0.6276803016662598, 0.2107020914554596, 0.020681366324424744, -0.26108378171920776, 0.1009862869977951, -0.0914849117398262, -0.09941430389881134, 0.2980799674987793, 0.4369147717952728, -0.4181472063064575, -0.046239905059337616, -0.5853958129882812, 0.11204923689365387, -0.5742154717445374, 1.3826205730438232, 0.1400810331106186, 0.040846627205610275, -0.2399442046880722, 0.021883657202124596, -0.18027856945991516, -0.5922902822494507, -0.8062741756439209, -0.19055822491645813, 0.5806772708892822, 0.1399056762456894, 0.38603565096855164, 0.3945302963256836, 0.6042563915252686, 0.31739503145217896, -0.45589566230773926, 0.3530932664871216, -0.6723007559776306, -0.05899800732731819, -0.1601427048444748, -0.30416807532310486, -0.5469180941581726, 0.1405428647994995, 0.6888089776039124, 0.6656838655471802, -0.01981051079928875, 0.5832549333572388, -0.07921132445335388, 0.669659435749054, -0.598774790763855, -0.0985204353928566, -0.7475667595863342, -0.13893260061740875, -0.1562615931034088, -0.2330407053232193, -0.39587587118148804, -0.052551399916410446, -0.3397221863269806, -0.5985162258148193, 0.45902135968208313, 0.19754672050476074, 1.225236177444458, 0.33335214853286743, -0.3502577841281891, -0.37132689356803894, -0.7270737886428833, 0.5982108116149902, -0.5590537786483765, 0.2865528464317322, 0.42013755440711975, 0.26680126786231995, -0.28965139389038086, -0.9656405448913574, -0.7939326167106628, -0.08041218668222427, -0.09131835401058197, 0.2585960924625397, 0.06336063146591187, 0.025676032528281212, 0.7209672331809998, 0.5663532614707947, -0.5599112510681152, -0.3092412054538727, -0.824671745300293, 0.05662368983030319, 0.6950544118881226, 0.07351263612508774, 0.08501400053501129, -0.499114453792572, -0.32429736852645874, -0.2197471410036087, -0.35166049003601074, 0.1865202933549881, 0.38466691970825195, 0.3618106245994568, -0.08757202327251434, 0.8794504404067993, -0.22597482800483704, 0.7036458849906921, 0.42332014441490173, -0.3390234112739563, 0.561673641204834, -0.30665481090545654, 0.004762040451169014, -0.2841578722000122, 0.6896008253097534, 0.18059958517551422, 0.2585245966911316, -0.20946094393730164, -0.37094545364379883, -0.15427334606647491, 0.37365466356277466, -0.8269004225730896, -0.043364886194467545, 0.4207700788974762, -0.4337139129638672, -0.24869102239608765, 0.29887163639068604, -0.5152100324630737, -0.23991943895816803, -0.08536967635154724, 0.5754100680351257, -0.34906119108200073, -0.3893231749534607, 0.20521676540374756, -0.6233908534049988, 0.21181632578372955, -0.33291149139404297, -0.6701855659484863, 0.2692294716835022, 0.8265718221664429, 0.5034831762313843, -0.06099390983581543, -0.11522860825061798, -0.5736000537872314, -0.02087746560573578, -0.30516478419303894, 0.6815518736839294, -0.3080827593803406, -0.1982419341802597, -0.11141344159841537, 0.022871412336826324, -0.1861523687839508, -0.49988675117492676, 0.5938217043876648, -0.7704206109046936, 0.2649229168891907, -0.4695218503475189, -0.7962620854377747, 0.0655595138669014, 0.2226022630929947, -0.6992499232292175, 1.2051308155059814, 0.20198433101177216, -1.1397705078125, 0.26869726181030273, -0.5558110475540161, -0.17473919689655304, 0.10636211931705475, -0.09166698157787323, -0.3105129301548004, 0.12542761862277985, 0.17828652262687683, 0.37045368552207947, -0.29660770297050476, 0.35596615076065063, -0.20990806818008423, -0.4886471629142761, 0.58702152967453, -0.2520720362663269, 0.8864400386810303, 0.2831571400165558, -0.04529236629605293, -0.29955488443374634, -0.9827191233634949, -0.10803861171007156, 0.24834465980529785, -0.6247473955154419, -0.24494867026805878, -0.24329552054405212, 0.05848114937543869, 0.22725336253643036, 0.5310630202293396, -0.7453509569168091, -0.005582051817327738, -0.458040714263916, 0.1118498295545578, 0.6548011898994446, 0.08558867126703262, 0.45560893416404724, -0.5879673361778259, 0.5446128845214844, 0.07435055077075958, -0.007094091735780239, -0.1459091752767563, -0.3231920897960663, -0.8585273623466492, -0.3072046935558319, 0.5622074604034424, 0.43158966302871704, -0.8618593215942383, 0.25941717624664307, -0.38557711243629456, -0.5139622688293457, -0.5133271813392639, -0.1410820037126541, 0.5401709079742432, 0.6979764103889465, 0.3444056510925293, -0.05493432655930519, -0.63726407289505, -0.7161916494369507, -0.4344422519207001, -0.212605819106102, -0.13286328315734863, 0.4267823100090027, 0.5647373199462891, -0.17264661192893982, 0.887896716594696, -0.48388761281967163, -0.026917509734630585, -0.21228201687335968, 0.25234484672546387, 0.6357579827308655, 0.5928614735603333, 0.3712919056415558, -1.0501834154129028, -0.47649532556533813, -0.3313736617565155, -0.6113229990005493, -0.10351622104644775, -0.17387229204177856, -0.2564641237258911, 0.27246713638305664, 0.5516442060470581, -0.8545917868614197, 0.4470006823539734, 0.3384443521499634, -0.411314994096756, 0.6188614368438721, -0.12391466647386551, 0.030756045132875443, -1.379711389541626, 0.49809902906417847, -0.3604317605495453, -0.06404048204421997, -0.5096811652183533, 0.147633358836174, 0.0856945738196373, -0.10019942373037338, -0.332348495721817, 0.7964311242103577, -0.485550194978714, -0.16088105738162994, -0.2270260751247406, 0.09925749152898788, 0.10756905376911163, 0.4569658637046814, -0.31182771921157837, 0.7615671753883362, 0.20825335383415222, -0.7325509190559387, 0.2660013735294342, 0.3579171895980835, -0.031914182007312775, 0.456388384103775, -0.7167574763298035, 0.20091256499290466, -0.406197726726532, 0.07675397396087646, -1.0380698442459106, -0.35371914505958557, 0.06928403675556183, -0.8806313276290894, 0.4352404475212097, -0.0768027976155281, -0.5677720308303833, -0.7684348821640015, -0.1378607600927353, 0.5045813322067261, 0.7634537220001221, -0.5651114583015442, 0.6079051494598389, 0.653255045413971, 0.08396106958389282, -0.8773356676101685, -0.4130871593952179, -0.21513855457305908, -0.060297947376966476, -0.4843539297580719, 0.4174202084541321, -0.1897851973772049, -0.17037297785282135, 0.20836105942726135, -0.19065159559249878, -0.1612992286682129, -0.0728171095252037, 0.2171929031610489, 0.21574997901916504, 0.08594229817390442, 0.37102922797203064, -0.05684898793697357, -0.10233214497566223, 0.10802455991506577, 0.09580536931753159, 0.7043737769126892, -0.04697144031524658, -0.3654613196849823, -0.04361359402537346, 0.19663666188716888, 0.1837150901556015, -0.3121635615825653, 0.7165842056274414, 0.8653208017349243, -0.36744919419288635, -0.25807586312294006, -0.6644368767738342, -0.31817832589149475, -0.5060510635375977, 0.4574195146560669, -0.45475539565086365, -0.847837507724762, 0.6624299883842468, -0.01004032138735056, 0.15363846719264984, 0.6572356224060059, 0.5263720750808716, -0.22774261236190796, 1.0759267807006836, 0.4767254889011383, 0.17569467425346375, 0.359097421169281, -0.4933660924434662, 0.18918320536613464, -0.9833101630210876, -0.09380171447992325, -0.5305632948875427, -0.2740652561187744, -0.6221491098403931, -0.5127596259117126, 0.3846423029899597, 0.22444066405296326, -0.35934561491012573, 0.2119694948196411, -0.6286048889160156, 0.35824668407440186, 0.5988020300865173, -0.020432861521840096, -0.043398257344961166, 0.038468364626169205, -0.15653589367866516, 0.0584377683699131, -0.9063342213630676, -0.35687699913978577, 1.307368516921997, 0.12330080568790436, 0.6094902753829956, -0.22787217795848846, 0.8807421922683716, 0.002429513493552804, 0.2691415548324585, -0.6405543088912964, 0.6490140557289124, -0.36315077543258667, -1.1147774457931519, -0.08143820613622665, -0.5495579838752747, -1.1029627323150635, 0.11416349560022354, -0.26946189999580383, -0.4026545286178589, 0.07041356712579727, 0.0326947383582592, -0.3194683790206909, 0.37491118907928467, -0.317726194858551, 0.622514009475708, -0.09621678292751312, -0.04173804819583893, 0.010509955696761608, -0.3843371868133545, 0.5060683488845825, -0.15959954261779785, 0.3786713778972626, -0.08376859873533249, 0.048866428434848785, 1.0396736860275269, -0.3199998140335083, 0.5666906833648682, -0.34481513500213623, 0.25785285234451294, 0.4169085919857025, -0.20680904388427734, 0.25204840302467346, -0.05194209888577461, -0.040832869708538055, -0.07924631237983704, 0.10963039100170135, -0.30272790789604187, -0.3844284415245056, 0.35119006037712097, -0.7551486492156982, -0.5420913696289062, -0.39972564578056335, -0.752272367477417, -0.020629245787858963, 0.2742297351360321, 0.45178383588790894, 0.46969541907310486, -0.15526534616947174, 0.2695953845977783, 0.6594560742378235, -0.3541903793811798, 0.3904109299182892, 0.41374602913856506, -0.23833893239498138, -0.5095208883285522, 0.8563098311424255, 0.30452635884284973, 0.029662054032087326, 0.2939055562019348, 0.11288254708051682, -0.17187708616256714, -0.15762287378311157, -0.2825888991355896, 0.6254233717918396, -0.6400869488716125, -0.30874869227409363, -0.8187965750694275, -0.6460673213005066, -0.5865699052810669, 0.16609403491020203, -0.4831743538379669, -0.6472610235214233, -0.38378047943115234, -0.007124696858227253, 0.3976837396621704, 0.5433052778244019, -0.40848883986473083, 0.3048495054244995, -0.7557605504989624, 0.9019286036491394, 0.29851189255714417, 0.22806476056575775, -0.11491232365369797, -0.9163383841514587, -0.374462366104126, 0.19849324226379395, -0.1315055787563324, -0.78437340259552, 0.3208156228065491, 0.06001174822449684, 0.6509070992469788, 0.3373241424560547, 0.3494837284088135, 0.7934038043022156, -0.5914313197135925, 0.7334871888160706, -0.07018760591745377, -0.5717662572860718, 0.22934076189994812, -0.23402567207813263, 0.09231393039226532, 0.5679999589920044, 0.39017966389656067, -0.5543919205665588, -0.41186580061912537, -0.9398230314254761, -1.0613183975219727, 0.7256395220756531, 0.030262554064393044, 0.3451303243637085, -0.3928855359554291, 0.6435660123825073, -0.18202924728393555, 0.187887504696846, -0.696073055267334, -0.2642475962638855, -0.07419972866773605, -0.2342514842748642, 0.09502731263637543, -0.6266527771949768, -0.20079924166202545, -0.32887139916419983, 0.8404380083084106, 0.03946268558502197, 0.4174797832965851, 0.292145699262619, -0.016260920092463493, -0.03554164618253708, -0.037011973559856415, 0.2190590649843216, 0.5990132093429565, -0.30315113067626953, -0.0863986387848854, 0.10376593470573425, -0.5201210975646973, -0.09973718971014023, 0.36052054166793823, -0.30185994505882263, 0.22877104580402374, 0.22701990604400635, 0.7630105018615723, -0.06187703460454941, -0.6567594408988953, 0.6267778277397156, -0.10548894852399826, -0.30657723546028137, -0.8017846345901489, 0.028397606685757637, 0.12652938067913055, 0.26788896322250366, 0.6977230310440063, -0.1714302897453308, 0.06691650301218033, -0.19725799560546875, 0.25526341795921326, 0.6107104420661926, -0.13852280378341675, -0.22961877286434174, 0.8601760268211365, -0.0566306971013546, -0.39762789011001587, 0.4969361126422882, -0.596421480178833, -0.47439804673194885, 0.7045465707778931, 0.46970006823539734, 0.8237370848655701, 0.06495572626590729, 0.2881574034690857, 0.80035400390625, 0.2708466649055481, -0.19136536121368408, 0.6750603914260864, -0.03776206448674202, -0.854999840259552, -0.42906907200813293, -1.066633701324463, -0.199214369058609, 0.2757841646671295, -0.9167608618736267, 0.03757123276591301, -0.3157578706741333, -0.4326988458633423, -0.0025377932470291853, 0.03933970257639885, -0.7350477576255798, 0.26782163977622986, -0.023982293903827667, 0.8971924185752869, -0.7143651843070984, 0.5689513087272644, 0.8272817134857178, -0.44889676570892334, -1.061424732208252, -0.03845894709229469, -0.45802339911460876, -0.6810504198074341, 0.8662623763084412, 0.14416484534740448, 0.3424747884273529, 0.029490355402231216, -0.648045539855957, -1.098116159439087, 0.9704735279083252, 0.08776658028364182, -0.2753240466117859, -0.15192660689353943, 0.24812188744544983, 0.6199683547019958, -0.20491451025009155, 0.041510943323373795, 0.3682316243648529, 0.36211293935775757, 0.11642412841320038, -0.8350272178649902, 0.08395755290985107, -0.4909418225288391, 0.08045527338981628, -0.1701493263244629, -0.5413733720779419, 1.5220026969909668, -0.17290404438972473, -0.3148808181285858, 0.1517067700624466, 0.5956982970237732, 0.6408458948135376, 0.1880364567041397, 0.6027143597602844, 0.822901725769043, 0.7382214069366455, 0.008891196921467781, 1.1317532062530518, -0.5793837308883667, 0.38597220182418823, 0.904098391532898, 0.09820954501628876, 0.8789573311805725, 0.5547321438789368, -0.1580697000026703, 0.348966509103775, 0.410110741853714, -0.03114943951368332, 0.301440954208374, 0.18002142012119293, -0.0285568255931139, -0.19148875772953033, -0.0005204963963478804, -0.42532142996788025, 0.5838837623596191, 0.20804119110107422, -0.4254211485385895, -0.06070859357714653, -0.13277429342269897, 0.1331266611814499, -0.010460897348821163, -0.27595311403274536, 0.823322594165802, 0.061456937342882156, -0.8132970333099365, 0.9183642268180847, 0.15309320390224457, 0.789619505405426, -0.42620721459388733, 0.05158747360110283, -0.3050253093242645, 0.3200046718120575, -0.08149052411317825, -0.5401764512062073, 0.42265570163726807, 0.21676406264305115, -0.2315371334552765, -0.1128787249326706, 0.9946322441101074, -0.4480689764022827, -0.8116534352302551, 0.0833800658583641, 0.5773149132728577, 0.382085919380188, -0.043275386095047, -0.7894731760025024, -0.16601935029029846, -0.2277413308620453, -0.6597947478294373, 0.16640162467956543, 0.5207002758979797, 0.16670313477516174, 0.45556533336639404, 0.8566075563430786, 0.15351004898548126, 0.18189293146133423, -0.004418233875185251, 1.0696519613265991, -0.6037598848342896, -0.4374609887599945, -0.5824731588363647, 0.6034421324729919, -0.2559622526168823, -0.32414746284484863, 0.8643255829811096, 0.7309964299201965, 0.9456877708435059, -0.05393179506063461, 0.5796021223068237, -0.36466529965400696, 0.9516596794128418, -0.2967664301395416, 0.9201939702033997, -0.8739162683486938, -0.058602962642908096, -0.17940333485603333, -0.7426633834838867, 0.1176936998963356, 0.6187017560005188, 0.015381833538413048, 0.1835584044456482, 0.4942123293876648, 0.9305791854858398, -0.011197857558727264, -0.3951369524002075, 0.10743802040815353, 0.2529381513595581, 0.15466195344924927, 0.23531632125377655, 0.6231774091720581, -0.6484496593475342, 0.6471846103668213, -0.35961323976516724, -0.1257971078157425, -0.07180660963058472, -0.5868049263954163, -1.1158385276794434, -0.8270089030265808, -0.02609299309551716, -0.66290682554245, -0.1358439326286316, 0.6925337910652161, 0.4312460124492645, -0.6082452535629272, -0.18038642406463623, 0.01590791530907154, 0.08903903514146805, -0.1072559580206871, -0.2789607346057892, 0.3290712535381317, -0.5597684383392334, -0.7894185185432434, 0.1168770119547844, -0.21168267726898193, -0.04296889901161194, -0.19362619519233704, 0.06208588927984238, -0.2829217314720154, 0.2733209729194641, 0.4502277076244354, 0.2564960718154907, -0.44754090905189514, -0.21590401232242584, 0.24686209857463837, -0.20530466735363007, -0.17639747262001038, 0.39114928245544434, -0.7913849353790283, 0.2579762935638428, 0.6942471265792847, 0.7068567276000977, 0.8417304754257202, 0.20147064328193665, 0.186437726020813, -0.917702317237854, 0.2813206613063812, 0.25793319940567017, 0.3072367310523987, 0.41231825947761536, -0.25116434693336487, 0.5552968382835388, 0.4286734461784363, -0.6074423789978027, -1.1610968112945557, 0.09470105171203613, -0.9159331917762756, -0.3614232540130615, 1.5028305053710938, 0.05329757183790207, -0.5604566335678101, 0.12296851724386215, -0.15419982373714447, 0.6305945515632629, -0.11295633018016815, 0.8522221446037292, 0.5243819952011108, 0.20996488630771637, 0.07482928037643433, -0.548798680305481, 0.5722516179084778, 0.21398426592350006, -0.36865079402923584, -0.0737849771976471, 0.32124024629592896, 0.394662082195282, 0.39125004410743713, 0.9877695441246033, -0.23251168429851532, 0.24681735038757324, 0.24690380692481995, 0.35135725140571594, -0.33629781007766724, -0.09688868373632431, -0.062431901693344116, 0.15640878677368164, -0.1943303793668747, -0.2317064106464386 ]
SkunkworksAI/BakLLaVA-1
SkunkworksAI
"2023-10-23T21:26:30Z"
26,673
279
transformers
[ "transformers", "pytorch", "llava_mistral", "text-generation", "en", "dataset:SkunkworksAI/BakLLaVA-1-FT", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
text-generation
"2023-10-12T13:12:21Z"
--- datasets: - SkunkworksAI/BakLLaVA-1-FT language: - en license: apache-2.0 --- <p><h1> BakLLaVA-1 </h1></p> Thank you to our compute sponsors Together Compute (www.together.ai). In collaboration with **Ontocord** (www.ontocord.ai) and **LAION** (www.laion.ai). ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64b7e345f92b20f7a38bf47a/V5lpOHWGGYJ2yPpEo_8i1.png) BakLLaVA 1 is a Mistral 7B base augmented with the LLaVA 1.5 architecture. In this first version, we showcase that a Mistral 7B base outperforms Llama 2 13B on several benchmarks. You can run BakLLaVA-1 on our repo. We are currently updating it to make it easier for you to finetune and inference. (https://github.com/SkunkworksAI/BakLLaVA). Note: BakLLaVA-1 is fully open-source but was trained on certain data that includes LLaVA's corpus which is not commercially permissive. We will fix this in the upcoming release. BakLLaVA 2 is cooking with a significantly larger (commercially viable) dataset and a novel architecture that expands beyond the current LLaVA method. BakLLaVA-2 will do away with the restrictions of BakLLaVA-1. # Evaluations ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64b7e345f92b20f7a38bf47a/qdYubrBmF7ztAHgdfkkwG.png) # Training dataset - 558K filtered image-text pairs from LAION/CC/SBU, captioned by BLIP. - 158K GPT-generated multimodal instruction-following data. - 450K academic-task-oriented VQA data mixture. - 40K ShareGPT data. - Additional private data (permissive)
[ -0.1831091046333313, -0.6631636023521423, 0.3349336087703705, 0.5819860100746155, -0.34196314215660095, -0.1184665709733963, -0.21851037442684174, -0.4813607633113861, 0.045320335775613785, 0.4824412763118744, -0.3179379105567932, -0.3715939223766327, -0.6493358612060547, -0.4297882616519928, -0.16221319139003754, 0.7462376952171326, 0.2259088158607483, 0.14843975007534027, -0.32960373163223267, -0.20232582092285156, -0.5898319482803345, -0.4624834954738617, -0.4220866560935974, -0.4212413728237152, 0.5390948057174683, 0.4725852906703949, 0.47886428236961365, 0.346902459859848, 0.39149266481399536, 0.24357019364833832, -0.10642315447330475, 0.08129815757274628, -0.6079203486442566, 0.30166518688201904, 0.06693314015865326, -0.25017139315605164, -0.7686251997947693, -0.41938796639442444, 0.4469071626663208, 0.41651996970176697, -0.4678453207015991, 0.32303014397621155, -0.05882149189710617, 0.9396807551383972, -0.9679695963859558, 0.21264579892158508, -0.41099828481674194, -0.13986270129680634, -0.6017112731933594, 0.21627721190452576, -0.5240070819854736, -0.23567332327365875, -0.29228582978248596, -0.8154694437980652, -0.1887337863445282, -0.1687040776014328, 0.6696557402610779, 0.6318854093551636, -0.5221754312515259, -0.0725347027182579, -0.6410523653030396, 0.6319407224655151, -0.582763671875, 0.6607154011726379, 0.5554365515708923, 0.4284321367740631, -0.3457013964653015, -0.8888874650001526, -0.405846506357193, -0.053519416600465775, 0.2251497209072113, 0.5280902981758118, -0.5639637112617493, -0.09401129186153412, 0.1793493926525116, 0.41806334257125854, -0.647738516330719, 0.06556550413370132, -0.6670354008674622, 0.020356161519885063, 0.4747753441333771, -0.018863262608647346, -0.28149062395095825, -0.022870058193802834, -0.3202964663505554, -0.3594566285610199, -0.6529443264007568, 0.12460372596979141, 0.07925308495759964, -0.20899568498134613, -0.44946056604385376, 0.6975675225257874, -0.31231436133384705, 0.3973795473575592, 0.3049162030220032, 0.0017948637250810862, 0.42990177869796753, -0.206251323223114, -0.5293542742729187, 0.17493711411952972, 0.8083120584487915, 0.17335543036460876, 0.04536866396665573, 0.05838179960846901, 0.29263338446617126, 0.19487635791301727, 0.2364107221364975, -0.7032558917999268, -0.34027954936027527, 0.20935946702957153, -0.4112001657485962, -0.22531826794147491, -0.13046427071094513, -0.7684822678565979, -0.5859269499778748, -0.1318255513906479, 0.37668654322624207, -0.5531396269798279, -0.6094900965690613, 0.05379479005932808, 0.041775595396757126, 0.555777370929718, 0.5780352354049683, -0.8310805559158325, 0.38377052545547485, 0.7584810853004456, 0.7410790920257568, 0.17100182175636292, -0.04538021236658096, -0.4378821551799774, -0.10886891931295395, -0.522750973701477, 0.7000099420547485, -0.1578267216682434, -0.5456634163856506, -0.39214128255844116, -0.3234778642654419, 0.3176538646221161, -0.6009241938591003, 0.4179839491844177, -0.40509718656539917, -0.010138806886970997, -0.4633958637714386, -0.3659341037273407, -0.28746384382247925, -0.09272567927837372, -0.6458661556243896, 1.3595346212387085, 0.3379214107990265, -0.7949159741401672, 0.2255827635526657, -0.19847723841667175, -0.24776557087898254, -0.014309634454548359, -0.3831433057785034, -0.38391435146331787, 0.23371577262878418, 0.15844161808490753, 0.2611227333545685, -0.5993087887763977, 0.01794559881091118, -0.325874000787735, -0.28557369112968445, 0.24164573848247528, -0.4756726026535034, 0.9365768432617188, 0.3787643313407898, -0.43871375918388367, -0.25085973739624023, -0.9204330444335938, -0.16425129771232605, -0.1868457943201065, -0.28200647234916687, -0.2683683931827545, -0.33525845408439636, 0.1443629264831543, 0.09424630552530289, 0.4428696930408478, -0.3970071077346802, 0.49628421664237976, -0.2062772810459137, -0.00415369076654315, 0.730362594127655, -0.020595978945493698, 0.4110230803489685, -0.23003990948200226, 0.6549490094184875, 0.08652091771364212, 0.3776085078716278, 0.04922762140631676, -0.6323490142822266, -0.7560002207756042, -0.8554732799530029, 0.28372085094451904, 0.6354566216468811, -0.5288031101226807, 0.19704625010490417, -0.24653597176074982, -0.7844458222389221, -0.5214012265205383, 0.09854636341333389, 0.4660380184650421, 0.5794069766998291, 0.41422322392463684, -0.35603830218315125, -0.7446234226226807, -0.9328749179840088, 0.30962029099464417, -0.2857235074043274, 0.13870519399642944, 0.05086187645792961, 0.17703165113925934, -0.1256103664636612, 0.9467942714691162, -0.33262550830841064, -0.2603592276573181, 0.026716340333223343, -0.029757337644696236, 0.2334984391927719, 0.5099025368690491, 0.5814792513847351, -0.6035540103912354, -0.5374202132225037, 0.43264007568359375, -1.045989990234375, -0.19042882323265076, 0.10185691714286804, -0.2264649122953415, 0.2262072116136551, 0.22373656928539276, -0.77334064245224, 0.6961672306060791, 0.5564550161361694, -0.21533697843551636, 0.638806164264679, -0.14445027709007263, 0.16361716389656067, -1.2126200199127197, 0.09334912151098251, -0.2763287425041199, -0.25077396631240845, -0.4092239737510681, -0.13182935118675232, -0.07351730018854141, 0.2279394119977951, -0.515823245048523, 0.5850813984870911, -0.4647369682788849, -0.2533489167690277, -0.12922772765159607, -0.5468295216560364, -0.026450226083397865, 0.36931997537612915, -0.1028430163860321, 0.7765926122665405, 1.1072509288787842, -0.4143190383911133, 0.5166077613830566, 0.5168841481208801, -0.4345448613166809, 0.34179720282554626, -0.8003337979316711, 0.28305357694625854, -0.03164085000753403, 0.5995412468910217, -0.819930374622345, -0.2789979875087738, 0.4689990282058716, -0.8202817440032959, 0.11479854583740234, -0.23090948164463043, -0.4069892168045044, 0.15964266657829285, -0.5273064374923706, 0.6656004786491394, 0.9523877501487732, -0.6324370503425598, 0.6404294371604919, 0.25370827317237854, -0.05839632451534271, -1.0350545644760132, -1.225809097290039, -0.047785066068172455, -0.22585687041282654, -0.6155641078948975, 0.12423063814640045, 0.06489850580692291, -0.43097561597824097, 0.18072403967380524, -0.323854923248291, -0.23473165929317474, -0.06779548525810242, 0.8548881411552429, 0.39163461327552795, -0.3524569571018219, -0.06054811552166939, 0.2886371612548828, -0.048393357545137405, -0.08131412416696548, -0.3360038101673126, 0.5106654763221741, -0.05521290749311447, -0.11232318729162216, -0.4667026102542877, 0.0649605542421341, 0.5583502054214478, -0.15290607511997223, 0.7460866570472717, 0.5076103806495667, -0.527575671672821, -0.008070524781942368, -0.8076833486557007, 0.3679174780845642, -0.5207543969154358, 0.21135249733924866, -0.4465511441230774, -0.6266191005706787, 0.3539113402366638, 0.11484899371862411, -0.008377104066312313, 0.4467085599899292, 0.9586560130119324, -0.12423702329397202, 0.46660125255584717, 0.29019469022750854, -0.17082864046096802, 0.3299699127674103, -0.594106912612915, -0.16011710464954376, -0.8696979880332947, -0.5561565160751343, -0.2169761061668396, -0.060710709542036057, -0.6384963989257812, -0.5519891381263733, 0.42119815945625305, 0.46202120184898376, -0.25645187497138977, 0.38731253147125244, -0.4071565568447113, 0.3175163269042969, 0.38151416182518005, 0.21969959139823914, 0.15883152186870575, 0.4273596704006195, -0.008115054108202457, 0.11843066662549973, -0.6174877285957336, -0.15015166997909546, 1.4856467247009277, 0.282465398311615, 0.8154154419898987, 0.38211697340011597, 0.8875885009765625, 0.503649890422821, 0.22775714099407196, -0.582969605922699, 0.4452976882457733, -0.3133237063884735, -0.5064507722854614, 0.0922383964061737, -0.42637404799461365, -1.0927197933197021, 0.22698228061199188, -0.29664644598960876, -0.6922857761383057, 0.437710702419281, 0.31707701086997986, -0.22574084997177124, 0.0428822822868824, -0.7955032587051392, 0.710455596446991, -0.18641062080860138, -0.681239902973175, -0.5279994606971741, -0.36224573850631714, 0.39792773127555847, -0.08906872570514679, 0.15452027320861816, 0.12090082466602325, 0.04047757759690285, 0.46183934807777405, -0.6617593169212341, 0.7370206713676453, -0.16653381288051605, -0.11269515007734299, 0.4972681403160095, -0.04739399626851082, 0.06285766512155533, 0.29659345746040344, -0.32785865664482117, 0.3998025357723236, -0.014400659129023552, -0.6952383518218994, -0.4765871465206146, 0.8554602265357971, -1.0001635551452637, -0.13460098206996918, -0.8759651780128479, -0.29862621426582336, 0.013352525420486927, -0.05916456878185272, 0.6403213739395142, 0.5128077864646912, -0.2567821741104126, 0.43275243043899536, 0.5027952194213867, -0.1709434539079666, -0.012988568283617496, 0.10580797493457794, -0.31467851996421814, -0.6114994883537292, 0.7999145984649658, 0.022055333480238914, 0.02227497100830078, 0.32026705145835876, 0.08354675024747849, -0.5015138387680054, -0.42179030179977417, -0.3690720200538635, 0.21671876311302185, -0.7905023097991943, -0.2708980441093445, -0.3144541084766388, -0.2308143675327301, -0.8644832372665405, -0.08788678050041199, -0.4283303916454315, -0.82807856798172, -0.2035622000694275, -0.025005292147397995, 0.6184597015380859, 0.908708393573761, -0.4883905351161957, 0.4764866530895233, -0.3911651074886322, 0.3094450533390045, 0.24459415674209595, -0.033382054418325424, 0.08075123280286789, -0.6734291911125183, -0.1710060089826584, -0.08760561794042587, -0.32397353649139404, -0.6594645380973816, 0.21144667267799377, 0.04901696741580963, 0.4825320541858673, 0.24101419746875763, -0.21145197749137878, 0.6697658896446228, -0.43749216198921204, 0.75643390417099, 0.36262765526771545, -0.6430010199546814, 0.421772301197052, -0.20593753457069397, 0.3391447365283966, 0.8017209768295288, 0.19754934310913086, -0.22367598116397858, -0.07811692357063293, -0.5629735589027405, -0.9036444425582886, 0.6187159419059753, 0.5413961410522461, -0.1986885964870453, 0.20879119634628296, 0.600396454334259, 0.35314130783081055, 0.012481477111577988, -0.5429180264472961, -0.5867543816566467, -0.5789840817451477, -0.28172141313552856, 0.16537804901599884, -0.15364669263362885, 0.08163466304540634, -0.4162988066673279, 0.7182875275611877, 0.36291447281837463, 0.2741123139858246, 0.2571420669555664, -0.12288292497396469, 0.08624330163002014, 0.1429143249988556, 0.4946608245372772, 0.6936879754066467, -0.33296120166778564, -0.003917633090168238, 0.21434399485588074, -0.9011203050613403, 0.08786912262439728, 0.16940075159072876, -0.1888536661863327, -0.16743157804012299, 0.4920860528945923, 1.0426353216171265, -0.11138162761926651, -0.5764334201812744, 0.32777345180511475, -0.1348465234041214, -0.21247218549251556, -0.635211706161499, 0.09884496033191681, 0.17519527673721313, 0.5011336803436279, 0.49619361758232117, 0.1418786644935608, 0.18072639405727386, -0.39977550506591797, 0.1534654200077057, 0.17880207300186157, 0.1564311981201172, -0.4908352792263031, 0.6732501983642578, -0.03236349672079086, -0.08854756504297256, 0.421330064535141, -0.30938196182250977, -0.36944007873535156, 0.7151715755462646, 0.40572312474250793, 0.7095432877540588, -0.05176166817545891, 0.15954364836215973, 0.5591703057289124, 0.08416284620761871, -0.1885334700345993, 0.41436055302619934, -0.3053089380264282, -0.3576143980026245, -0.37495073676109314, -0.637295126914978, -0.49854058027267456, 0.35588759183883667, -0.670299232006073, 0.37797191739082336, -0.7089115381240845, -0.0240683201700449, 0.08289775997400284, 0.050445836037397385, -0.620528519153595, 0.30431756377220154, 0.40210357308387756, 0.8072230219841003, -0.5976237058639526, 1.2291589975357056, 0.8380060791969299, -0.48163023591041565, -0.7028276920318604, -0.1531093567609787, 0.13460947573184967, -0.7645596265792847, 0.7565504908561707, 0.032099008560180664, -0.2748170793056488, -0.1499834507703781, -0.4976523816585541, -0.7361974120140076, 1.468030571937561, 0.5171715021133423, -0.7378607392311096, 0.17064644396305084, 0.21921734511852264, 0.5093250870704651, 0.07057555019855499, 0.381687730550766, 0.3942925035953522, 0.4560169577598572, 0.09005163609981537, -0.9034474492073059, -0.16937662661075592, -0.29192909598350525, -0.1765700727701187, -0.07042040675878525, -0.8379989862442017, 0.806881308555603, 0.1167089194059372, -0.03195904195308685, 0.18414096534252167, 0.952520489692688, 0.4455268979072571, 0.5436861515045166, 0.5718846917152405, 0.838927686214447, 0.6525399684906006, 0.09824538230895996, 1.0754293203353882, 0.048957113176584244, 0.3056073486804962, 1.2416960000991821, -0.1737576127052307, 0.7797441482543945, 0.3985499143600464, -0.31243711709976196, 0.5296876430511475, 0.6504347920417786, 0.1023191288113594, 0.5066769123077393, 0.057864122092723846, -0.31844404339790344, -0.13668100535869598, 0.06999807059764862, -0.7215439081192017, 0.6543904542922974, 0.32599321007728577, 0.30453893542289734, -0.13237623870372772, -0.13335180282592773, -0.1993383765220642, -0.012234300374984741, -0.2686549723148346, 0.44479116797447205, 0.1836855560541153, -0.4909556210041046, 0.8890772461891174, -0.10636863857507706, 0.6985517144203186, -0.8609117865562439, -0.0988113209605217, -0.5054035782814026, 0.2701919674873352, -0.4428492784500122, -0.5416373014450073, 0.1399860382080078, 0.3576315641403198, -0.013066334649920464, -0.006302754860371351, 0.6822313666343689, -0.19408369064331055, -0.6668711304664612, 0.3766351044178009, 0.31054291129112244, 0.30565765500068665, 0.08473154902458191, -0.5695105195045471, 0.3684321641921997, -0.13457222282886505, -0.3896734416484833, 0.3665679395198822, 0.38337841629981995, -0.24348846077919006, 0.44234010577201843, 0.5988333225250244, 0.22698171436786652, 0.5232704877853394, -0.01808076724410057, 0.9882307648658752, -0.42865613102912903, -0.3286764323711395, -0.5955212712287903, 0.3726768493652344, 0.1107848584651947, -0.6261661648750305, 0.6879705786705017, 1.0095369815826416, 0.6309067606925964, 0.038044098764657974, 0.7351607084274292, -0.38074859976768494, 0.178476020693779, -0.6316788196563721, 0.581500768661499, -0.902353048324585, 0.17591658234596252, 0.04770747944712639, -0.8456252813339233, -0.08081645518541336, 0.6423969864845276, 0.13169041275978088, -0.08205615729093552, 0.5129246115684509, 0.727142870426178, -0.25566336512565613, -0.3414193391799927, 0.2011113464832306, 0.4556649625301361, 0.04745974391698837, 0.7015346884727478, 0.8607507348060608, -0.6156402230262756, 0.5088112354278564, -0.3977537751197815, -0.5157113671302795, -0.049831997603178024, -0.6701886653900146, -0.6514904499053955, -0.5997108817100525, -0.26572340726852417, -0.3791440427303314, 0.24331262707710266, 0.9499561190605164, 0.7376459836959839, -0.794270396232605, -0.4450516402721405, -0.11330851167440414, -0.28426557779312134, -0.2678002119064331, -0.15491168200969696, 0.37261804938316345, 0.16062204539775848, -0.4558683931827545, 0.707172155380249, 0.1457033008337021, -0.24431200325489044, -0.16935144364833832, -0.35383141040802, -0.3769625425338745, 0.04390544444322586, 0.4180320203304291, 0.4986370801925659, -0.656680703163147, 0.04210774227976799, 0.11791690438985825, -0.0931846871972084, 0.2629973292350769, 0.5095610022544861, -0.9433711767196655, 0.3857053518295288, 0.6077306270599365, 0.8540145754814148, 1.0871467590332031, 0.055681996047496796, 0.11919239163398743, -0.6683469414710999, 0.5666558742523193, -0.011631103232502937, 0.2391842156648636, 0.3956952393054962, -0.46776095032691956, 0.6877849698066711, 0.111731618642807, -0.5744249820709229, -0.8721731901168823, 0.10783849656581879, -1.6839231252670288, -0.16744579374790192, 1.2401882410049438, -0.0059165628626942635, -0.2738950848579407, 0.14940990507602692, -0.3518716096878052, 0.5932083129882812, -0.44682130217552185, 0.4958328902721405, 0.7064266204833984, -0.12448982894420624, -0.0690540298819542, -0.5909197330474854, 0.28406456112861633, 0.803832471370697, -0.8489340543746948, 0.030603956431150436, 0.727152943611145, 0.29902490973472595, -0.019285377115011215, 1.0497210025787354, -0.05307765305042267, 0.6634934544563293, 0.1700126975774765, 0.2331136018037796, -0.2651916444301605, -0.28483542799949646, -0.589872419834137, -0.21794022619724274, 0.12535281479358673, -0.5418409109115601 ]
Salesforce/blip2-flan-t5-xxl
Salesforce
"2023-09-13T08:46:29Z"
26,614
64
transformers
[ "transformers", "pytorch", "blip-2", "visual-question-answering", "vision", "image-to-text", "image-captioning", "en", "arxiv:2301.12597", "arxiv:2210.11416", "license:mit", "has_space", "region:us" ]
image-to-text
"2023-02-09T09:10:14Z"
--- language: en license: mit tags: - vision - image-to-text - image-captioning - visual-question-answering pipeline_tag: image-to-text inference: false --- # BLIP-2, Flan T5-xxl, pre-trained only BLIP-2 model, leveraging [Flan T5-xxl](https://huggingface.co/google/flan-t5-xxl) (a large language model). It was introduced in the paper [BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models](https://arxiv.org/abs/2301.12597) by Li et al. and first released in [this repository](https://github.com/salesforce/LAVIS/tree/main/projects/blip2). Disclaimer: The team releasing BLIP-2 did not write a model card for this model so this model card has been written by the Hugging Face team. ## Model description BLIP-2 consists of 3 models: a CLIP-like image encoder, a Querying Transformer (Q-Former) and a large language model. The authors initialize the weights of the image encoder and large language model from pre-trained checkpoints and keep them frozen while training the Querying Transformer, which is a BERT-like Transformer encoder that maps a set of "query tokens" to query embeddings, which bridge the gap between the embedding space of the image encoder and the large language model. The goal for the model is simply to predict the next text token, giving the query embeddings and the previous text. <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/blip2_architecture.jpg" alt="drawing" width="600"/> This allows the model to be used for tasks like: - image captioning - visual question answering (VQA) - chat-like conversations by feeding the image and the previous conversation as prompt to the model ## Direct Use and Downstream Use You can use the raw model for conditional text generation given an image and optional text. See the [model hub](https://huggingface.co/models?search=Salesforce/blip) to look for fine-tuned versions on a task that interests you. ## Bias, Risks, Limitations, and Ethical Considerations BLIP2-FlanT5 uses off-the-shelf Flan-T5 as the language model. It inherits the same risks and limitations from [Flan-T5](https://arxiv.org/pdf/2210.11416.pdf): > Language models, including Flan-T5, can potentially be used for language generation in a harmful way, according to Rae et al. (2021). Flan-T5 should not be used directly in any application, without a prior assessment of safety and fairness concerns specific to the application. BLIP2 is fine-tuned on image-text datasets (e.g. [LAION](https://laion.ai/blog/laion-400-open-dataset/) ) collected from the internet. As a result the model itself is potentially vulnerable to generating equivalently inappropriate content or replicating inherent biases in the underlying data. BLIP2 has not been tested in real world applications. It should not be directly deployed in any applications. Researchers should first carefully assess the safety and fairness of the model in relation to the specific context they’re being deployed within. ### How to use For code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/blip-2#transformers.Blip2ForConditionalGeneration.forward.example), or refer to the snippets below depending on your usecase: #### Running the model on CPU <details> <summary> Click to expand </summary> ```python import requests from PIL import Image from transformers import BlipProcessor, Blip2ForConditionalGeneration processor = BlipProcessor.from_pretrained("Salesforce/blip2-flan-t5-xxl") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xxl") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) ``` </details> #### Running the model on GPU ##### In full precision <details> <summary> Click to expand </summary> ```python # pip install accelerate import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-flan-t5-xxl") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xxl", device_map="auto") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt").to("cuda") out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) ``` </details> ##### In half precision (`float16`) <details> <summary> Click to expand </summary> ```python # pip install accelerate import torch import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-flan-t5-xxl") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xxl", torch_dtype=torch.float16, device_map="auto") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16) out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) ``` </details> ##### In 8-bit precision (`int8`) <details> <summary> Click to expand </summary> ```python # pip install accelerate bitsandbytes import torch import requests from PIL import Image from transformers import Blip2Processor, Blip2ForConditionalGeneration processor = Blip2Processor.from_pretrained("Salesforce/blip2-flan-t5-xxl") model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xxl", load_in_8bit=True, device_map="auto") img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg' raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB') question = "how many dogs are in the picture?" inputs = processor(raw_image, question, return_tensors="pt").to("cuda", torch.float16) out = model.generate(**inputs) print(processor.decode(out[0], skip_special_tokens=True)) ``` </details>
[ -0.3676164448261261, -0.6693320870399475, -0.048395998775959015, 0.4125867187976837, -0.2397540956735611, -0.15244343876838684, -0.30845850706100464, -0.8049662113189697, -0.1390255242586136, 0.30088549852371216, -0.48225685954093933, -0.139356330037117, -0.6022676229476929, -0.028010310605168343, -0.10043259710073471, 0.7039638161659241, 0.08799944072961807, -0.057663433253765106, -0.062232453376054764, -0.029645850881934166, -0.2610447108745575, -0.11647067219018936, -0.6284985542297363, -0.22230060398578644, 0.0829240158200264, 0.3297131061553955, 0.7187387943267822, 0.41442644596099854, 0.7360877394676208, 0.393738716840744, -0.17802266776561737, 0.09274650365114212, -0.47705692052841187, -0.24150319397449493, -0.10028423368930817, -0.7503649592399597, -0.27104297280311584, -0.028067927807569504, 0.4498646557331085, 0.4195117652416229, 0.1477673500776291, 0.41184094548225403, -0.09500870853662491, 0.5038714408874512, -0.5500446557998657, 0.2871481776237488, -0.6955338716506958, 0.07336869835853577, -0.07010364532470703, -0.0061729163862764835, -0.385878324508667, -0.18862906098365784, 0.05044100061058998, -0.7416572570800781, 0.5235555768013, 0.03577033057808876, 1.5955939292907715, 0.2637421786785126, -0.012759697623550892, -0.31936880946159363, -0.4960811138153076, 0.9042481780052185, -0.6589226722717285, 0.47578340768814087, 0.1948995292186737, 0.3443656265735626, 0.0016203813720494509, -0.9662740230560303, -0.766864001750946, -0.12824679911136627, -0.14386937022209167, 0.32265836000442505, -0.24233072996139526, -0.07211620360612869, 0.48572221398353577, 0.28013017773628235, -0.6140036582946777, -0.08151963353157043, -0.849212110042572, -0.20154066383838654, 0.7232949137687683, -0.09315190464258194, 0.32081714272499084, -0.30183717608451843, -0.563826858997345, -0.43672803044319153, -0.5202127695083618, 0.33025315403938293, 0.05756300315260887, 0.12431477010250092, -0.4238385856151581, 0.7881770730018616, 0.019672466441988945, 0.6209205985069275, 0.39567112922668457, -0.3691955506801605, 0.6317145228385925, -0.31639960408210754, -0.3343628942966461, -0.18173284828662872, 0.9697470664978027, 0.5702836513519287, 0.2344922125339508, 0.051970288157463074, -0.2721955478191376, 0.07388526946306229, 0.023663006722927094, -1.102866768836975, -0.22373290359973907, 0.44965893030166626, -0.5041902661323547, -0.2737729549407959, -0.05010615661740303, -0.8805474638938904, -0.11887375265359879, 0.164576455950737, 0.49552902579307556, -0.5728703141212463, -0.3912808299064636, 0.020659511908888817, -0.44307276606559753, 0.39115485548973083, 0.2099553346633911, -0.995430052280426, -0.06764640659093857, 0.48462483286857605, 0.9257693290710449, 0.27200812101364136, -0.49781447649002075, -0.21794497966766357, 0.14304478466510773, -0.3319414556026459, 0.572679340839386, -0.1435348093509674, -0.2475367784500122, -0.03219201788306236, 0.26283907890319824, -0.026669630780816078, -0.6124640703201294, 0.12364359200000763, -0.4191223680973053, 0.27284035086631775, -0.1751524955034256, -0.4608716368675232, -0.35381844639778137, 0.19749006628990173, -0.47670915722846985, 1.0896018743515015, 0.3158852458000183, -0.8741015791893005, 0.47708645462989807, -0.6008402705192566, -0.34601640701293945, 0.19347192347049713, -0.13745003938674927, -0.7143372893333435, -0.09624258428812027, 0.22399887442588806, 0.39426085352897644, -0.3003861904144287, 0.028536532074213028, -0.36629489064216614, -0.37721842527389526, 0.06974431872367859, -0.09599772840738297, 1.0979833602905273, 0.06752822548151016, -0.6972913146018982, 0.004365627653896809, -0.5180848836898804, -0.10324215143918991, 0.4030536115169525, -0.2095896601676941, 0.11964427679777145, -0.2685377895832062, 0.19743119180202484, 0.3517361283302307, 0.5735704302787781, -0.737554132938385, -0.05747874453663826, -0.525580644607544, 0.4912817180156708, 0.5304858684539795, -0.2055647224187851, 0.34383708238601685, -0.24114294350147247, 0.35629576444625854, 0.26514655351638794, 0.3239748477935791, -0.31249701976776123, -0.773306667804718, -0.9445006251335144, -0.20722708106040955, -0.006658847443759441, 0.7087717056274414, -0.8714312314987183, 0.41166526079177856, -0.23992511630058289, -0.6721860766410828, -0.5649513602256775, 0.1303485482931137, 0.530830442905426, 0.7038261890411377, 0.4734635651111603, -0.18653638660907745, -0.5068671703338623, -0.9007936716079712, 0.20799295604228973, -0.23727424442768097, 0.025719720870256424, 0.4163537323474884, 0.7286404371261597, -0.23197627067565918, 0.7837839722633362, -0.4790809452533722, -0.2896607220172882, -0.35418474674224854, 0.06907875835895538, 0.3110838532447815, 0.7060175538063049, 0.871751070022583, -0.8100257515907288, -0.3423232436180115, 0.04406433552503586, -0.9390996098518372, 0.17115949094295502, -0.18508267402648926, -0.19353388249874115, 0.5606529712677002, 0.37789177894592285, -0.8672375679016113, 0.6279049515724182, 0.5224181413650513, -0.2978385090827942, 0.5165327191352844, -0.14625342190265656, -0.06027695909142494, -1.027963399887085, 0.4448568820953369, 0.14248868823051453, -0.1716879904270172, -0.4397428035736084, 0.09396201372146606, 0.249820277094841, -0.24978940188884735, -0.6964961886405945, 0.819022536277771, -0.4539186656475067, -0.28349652886390686, 0.046311154961586, -0.1572694033384323, 0.1545347273349762, 0.5967778563499451, 0.29647183418273926, 0.8114714622497559, 0.8488451242446899, -0.6195704340934753, 0.4581320881843567, 0.5360298156738281, -0.3185652792453766, 0.30208858847618103, -0.8676875829696655, 0.0799281969666481, -0.1084243580698967, 0.07482212036848068, -1.0152326822280884, -0.13886015117168427, 0.28758659958839417, -0.7206550240516663, 0.3131347894668579, -0.22586561739444733, -0.44922614097595215, -0.7367334961891174, -0.29489922523498535, 0.3330778479576111, 0.6712192893028259, -0.684241533279419, 0.43351641297340393, 0.2806386649608612, 0.15083281695842743, -0.7040473818778992, -1.1752240657806396, -0.05150314047932625, 0.034501176327466965, -0.9243777990341187, 0.5097051858901978, 0.04197191819548607, 0.15040788054466248, 0.12065881490707397, 0.2842085659503937, 0.002052921336144209, -0.17185012996196747, 0.2919154763221741, 0.35039418935775757, -0.34176066517829895, -0.19874295592308044, -0.24708586931228638, 0.0034084643702954054, -0.0555843859910965, -0.17893663048744202, 0.7653906941413879, -0.28293800354003906, 0.016343535855412483, -0.7226468324661255, 0.08343353122472763, 0.4990589916706085, -0.34053394198417664, 0.64851313829422, 0.8467250466346741, -0.4577580690383911, -0.08838985115289688, -0.501430094242096, -0.17806687951087952, -0.5931925773620605, 0.5309627056121826, -0.36618784070014954, -0.3834565579891205, 0.6094028949737549, 0.2602229118347168, 0.1755072921514511, 0.3662511706352234, 0.749711811542511, -0.11259127408266068, 0.889716386795044, 0.6453840136528015, 0.22189658880233765, 0.6938926577568054, -0.9300235509872437, 0.08002033084630966, -0.7127974033355713, -0.45708176493644714, -0.07565527409315109, -0.257362425327301, -0.4917856752872467, -0.4475803077220917, 0.2929423153400421, 0.25650840997695923, -0.4543500244617462, 0.3143977224826813, -0.5270298719406128, 0.17548392713069916, 0.6978727579116821, 0.30152490735054016, -0.2921096682548523, 0.15357516705989838, -0.09040416777133942, 0.060164231806993484, -0.6337500810623169, -0.2713317573070526, 0.9630089402198792, 0.459810346364975, 0.6430433392524719, -0.12362712621688843, 0.427264541387558, -0.28336867690086365, 0.2426171749830246, -0.7122613787651062, 0.6014420986175537, -0.33698368072509766, -0.8215914368629456, -0.1861865073442459, -0.27567774057388306, -0.9364094138145447, 0.12755247950553894, -0.2095627784729004, -0.7147406935691833, 0.18922902643680573, 0.36297059059143066, -0.2173544317483902, 0.3995473384857178, -0.9135960936546326, 0.989951491355896, -0.4719211757183075, -0.5900367498397827, 0.06877489387989044, -0.6344302296638489, 0.4517076909542084, 0.20237363874912262, -0.16023367643356323, 0.1028117835521698, 0.06291605532169342, 0.7253409028053284, -0.6056357622146606, 0.8203395009040833, -0.42491769790649414, 0.2946425974369049, 0.4923502504825592, -0.17416441440582275, 0.1686217188835144, -0.07450442016124725, -0.0885181725025177, 0.317402184009552, -0.013604630716145039, -0.606429934501648, -0.5483836531639099, 0.24576076865196228, -0.8776975274085999, -0.41930684447288513, -0.31759411096572876, -0.3920522630214691, 0.0363297201693058, 0.45229676365852356, 0.7032747864723206, 0.3535614311695099, 0.2666221559047699, 0.07515395432710648, 0.28347840905189514, -0.5529015064239502, 0.7213510274887085, 0.04665955528616905, -0.3585306406021118, -0.48520246148109436, 0.9249069094657898, -0.04102472588419914, 0.3058183491230011, 0.20760540664196014, 0.21693377196788788, -0.5176082849502563, -0.29473668336868286, -0.7597481608390808, 0.5575650930404663, -0.6311971545219421, -0.47202110290527344, -0.3794000744819641, -0.27658161520957947, -0.628563642501831, -0.20020173490047455, -0.56017005443573, -0.23765848577022552, -0.5036777257919312, 0.22434291243553162, 0.5494771599769592, 0.47947898507118225, -0.09539127349853516, 0.4088204503059387, -0.6155357360839844, 0.4824201464653015, 0.3260665833950043, 0.3760274648666382, 0.012752390466630459, -0.5663469433784485, -0.04760526120662689, 0.307652086019516, -0.4094073474407196, -0.6950363516807556, 0.5130053758621216, 0.25528213381767273, 0.3467903137207031, 0.40927210450172424, -0.36182132363319397, 0.9407410025596619, -0.31340980529785156, 0.8837976455688477, 0.5205351114273071, -0.9536003470420837, 0.7644467353820801, -0.09009141474962234, 0.11962719261646271, 0.30819427967071533, 0.3106411099433899, -0.35921618342399597, -0.2749321460723877, -0.73282790184021, -0.8179469704627991, 0.8451427817344666, 0.18971288204193115, 0.10414496064186096, 0.2137857973575592, 0.3481491208076477, -0.1760556846857071, 0.143639475107193, -0.6866594552993774, -0.228426992893219, -0.6362627148628235, -0.17564694583415985, -0.031881336122751236, -0.06751218438148499, 0.13855238258838654, -0.46727922558784485, 0.5512957572937012, -0.055467166006565094, 0.6458925008773804, 0.3604310154914856, -0.35272589325904846, -0.20331314206123352, -0.4812484383583069, 0.6066774129867554, 0.5086104273796082, -0.3133983910083771, -0.08289486169815063, -0.018148699775338173, -0.7394230961799622, -0.20143114030361176, 0.037447765469551086, -0.36512553691864014, 0.01755589433014393, 0.43952012062072754, 1.1073559522628784, -0.09357397258281708, -0.5494515895843506, 0.7587354183197021, 0.010058402083814144, -0.2540745735168457, -0.3991144299507141, 0.043202921748161316, 0.10342792421579361, 0.3061631917953491, 0.40270790457725525, 0.1521701067686081, -0.28123030066490173, -0.5061962604522705, 0.31719833612442017, 0.41398465633392334, -0.09389661997556686, -0.4075109362602234, 0.8697401881217957, 0.10277639329433441, -0.23129607737064362, 0.7782033085823059, -0.4036233723163605, -0.7032511234283447, 0.9712429642677307, 0.7716050148010254, 0.5169551372528076, -0.03316641226410866, 0.2172790914773941, 0.722046971321106, 0.376510888338089, -0.05316377803683281, 0.5382480621337891, 0.23789969086647034, -0.9177853465080261, -0.17610831558704376, -0.6293330192565918, -0.27904823422431946, 0.2870829999446869, -0.4801517426967621, 0.580913245677948, -0.7183747887611389, -0.23581793904304504, 0.21080632507801056, 0.23804906010627747, -0.9021146297454834, 0.42810797691345215, 0.34059253334999084, 0.9285591244697571, -0.8179160952568054, 0.5572458505630493, 0.8336567878723145, -0.8748244643211365, -0.9502708911895752, -0.21295279264450073, -0.31663385033607483, -1.0999832153320312, 0.8508723974227905, 0.42233842611312866, 0.05209719017148018, -0.024904724210500717, -0.7682972550392151, -0.7760469913482666, 1.1796159744262695, 0.4459187090396881, -0.3500101566314697, 0.03605462610721588, 0.19910073280334473, 0.5460920929908752, -0.19156911969184875, 0.5169452428817749, 0.24055364727973938, 0.5235265493392944, 0.40244659781455994, -0.9194586873054504, 0.16945551335811615, -0.36823177337646484, 0.04989148676395416, -0.1271830052137375, -1.0116585493087769, 1.0420891046524048, -0.5090662240982056, -0.1953393518924713, 0.055733613669872284, 0.8229038715362549, 0.4706842601299286, 0.17208166420459747, 0.49723559617996216, 0.5840004682540894, 0.7054611444473267, 0.008472461253404617, 1.014061450958252, -0.3892604112625122, 0.6391302347183228, 0.5910986065864563, 0.026378236711025238, 0.8072993159294128, 0.35670050978660583, -0.1196603924036026, 0.2744094431400299, 0.6955577731132507, -0.5916085839271545, 0.39900994300842285, -0.013537456281483173, 0.17478926479816437, 0.04553811252117157, 0.12775181233882904, -0.4081668555736542, 0.6648785471916199, 0.5074372291564941, -0.3827311098575592, -0.029927967116236687, 0.01231901440769434, 0.04074566438794136, -0.4094429016113281, -0.2556284964084625, 0.32473325729370117, -0.118485227227211, -0.7291721701622009, 1.0333844423294067, -0.0025706880260258913, 1.06839919090271, -0.24569056928157806, 0.046423785388469696, -0.33322852849960327, 0.2670334279537201, -0.40166914463043213, -1.0017420053482056, 0.32028403878211975, -0.02587684616446495, 0.03273565322160721, 0.0057324911467731, 0.5454029440879822, -0.4526284635066986, -0.9440315961837769, 0.28935596346855164, 0.10856934636831284, 0.32432228326797485, 0.21027113497257233, -1.0618501901626587, 0.1481892168521881, 0.07211101800203323, -0.36427387595176697, -0.10514426976442337, 0.3240926265716553, 0.06066637486219406, 0.7511941194534302, 0.632766842842102, 0.21406041085720062, 0.47045910358428955, -0.0746345967054367, 0.8127384781837463, -0.6631656289100647, -0.39244651794433594, -0.5680927038192749, 0.6130436062812805, -0.1330721080303192, -0.6198815703392029, 0.4644583463668823, 0.8350121974945068, 0.9179394245147705, -0.16272033751010895, 0.7325277924537659, -0.3742019534111023, 0.19579879939556122, -0.48992109298706055, 0.8055510520935059, -0.8464759588241577, -0.1251511573791504, -0.22466260194778442, -0.6313064694404602, -0.36358442902565, 0.9314538240432739, -0.1994529515504837, 0.19432225823402405, 0.5861329436302185, 1.2299154996871948, -0.3181740939617157, -0.23043107986450195, 0.13225655257701874, 0.2966524660587311, 0.41258013248443604, 0.7000889182090759, 0.595125675201416, -0.7494251728057861, 0.6215543746948242, -0.7533653974533081, -0.18038782477378845, -0.16886569559574127, -0.6380941867828369, -0.9435218572616577, -0.6294301152229309, -0.40798574686050415, -0.5390450954437256, -0.10025887191295624, 0.5452266335487366, 0.9421802163124084, -0.7369728684425354, -0.24396099150180817, -0.1447553187608719, -0.015589521266520023, -0.046768274158239365, -0.2273455560207367, 0.4677485525608063, -0.3577621579170227, -0.9044905304908752, -0.11028747260570526, 0.12451249361038208, 0.29461920261383057, -0.19509074091911316, 0.023835087195038795, -0.22337470948696136, -0.30678054690361023, 0.4623865783214569, 0.4599771797657013, -0.6144456267356873, -0.2594591975212097, 0.06131045147776604, -0.1651095300912857, 0.301482617855072, 0.34791815280914307, -0.6058869361877441, 0.32241925597190857, 0.5532698631286621, 0.36651381850242615, 0.8725146055221558, -0.049507852643728256, 0.20439979434013367, -0.6631496548652649, 0.7870531678199768, 0.14504021406173706, 0.4041573703289032, 0.5373467803001404, -0.3972390592098236, 0.4089755117893219, 0.3410358428955078, -0.2789500951766968, -0.8890794515609741, 0.040072016417980194, -1.166012167930603, -0.24389788508415222, 1.3375605344772339, -0.27060142159461975, -0.6797773241996765, 0.21708093583583832, -0.13464166224002838, 0.4047589600086212, -0.25243234634399414, 0.569379985332489, 0.16228297352790833, -0.1297374665737152, -0.4657331705093384, -0.3370707631111145, 0.4600503742694855, 0.32351934909820557, -0.6476443409919739, -0.2798175811767578, 0.20084844529628754, 0.5258243083953857, 0.4265903830528259, 0.5075324177742004, -0.10807916522026062, 0.391019731760025, 0.25083884596824646, 0.4104468822479248, -0.13574448227882385, -0.06411205232143402, -0.1820661425590515, -0.048238903284072876, -0.17893043160438538, -0.5100371837615967 ]
hakurei/waifu-diffusion
hakurei
"2023-07-05T16:18:18Z"
26,544
2,289
diffusers
[ "diffusers", "stable-diffusion", "text-to-image", "en", "license:creativeml-openrail-m", "endpoints_compatible", "has_space", "diffusers:StableDiffusionPipeline", "region:us" ]
text-to-image
"2022-08-30T02:28:33Z"
--- language: - en tags: - stable-diffusion - text-to-image license: creativeml-openrail-m inference: true --- # waifu-diffusion v1.4 - Diffusion for Weebs waifu-diffusion is a latent text-to-image diffusion model that has been conditioned on high-quality anime images through fine-tuning. ![image](https://user-images.githubusercontent.com/26317155/210155933-db3a5f1a-1ec3-4777-915c-6deff2841ce9.png) <sub>masterpiece, best quality, 1girl, green hair, sweater, looking at viewer, upper body, beanie, outdoors, watercolor, night, turtleneck</sub> [Original Weights](https://huggingface.co/hakurei/waifu-diffusion-v1-4) # Gradio & Colab We also support a [Gradio](https://github.com/gradio-app/gradio) Web UI and Colab with Diffusers to run Waifu Diffusion: [![Open In Spaces](https://camo.githubusercontent.com/00380c35e60d6b04be65d3d94a58332be5cc93779f630bcdfc18ab9a3a7d3388/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f25463025394625413425393725323048756767696e67253230466163652d5370616365732d626c7565)](https://huggingface.co/spaces/hakurei/waifu-diffusion-demo) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1_8wPN7dJO746QXsFnB09Uq2VGgSRFuYE#scrollTo=1HaCauSq546O) ## Model Description [See here for a full model overview.](https://gist.github.com/harubaru/f727cedacae336d1f7877c4bbe2196e1) ## License This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies: 1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content 2. The authors claims no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license 3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully) [Please read the full license here](https://huggingface.co/spaces/CompVis/stable-diffusion-license) ## Downstream Uses This model can be used for entertainment purposes and as a generative art assistant. ## Example Code ```python import torch from torch import autocast from diffusers import StableDiffusionPipeline pipe = StableDiffusionPipeline.from_pretrained( 'hakurei/waifu-diffusion', torch_dtype=torch.float32 ).to('cuda') prompt = "1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt" with autocast("cuda"): image = pipe(prompt, guidance_scale=6)["sample"][0] image.save("test.png") ``` ## Team Members and Acknowledgements This project would not have been possible without the incredible work by Stability AI and Novel AI. - [Haru](https://github.com/harubaru) - [Salt](https://github.com/sALTaccount/) - [Sta @ Bit192](https://twitter.com/naclbbr) In order to reach us, you can join our [Discord server](https://discord.gg/touhouai). [![Discord Server](https://discordapp.com/api/guilds/930499730843250783/widget.png?style=banner2)](https://discord.gg/touhouai)
[ -0.5447089672088623, -0.9112178683280945, 0.47899767756462097, 0.583812952041626, -0.2527102828025818, -0.2175866812467575, 0.2353161871433258, -0.29717519879341125, 0.224864199757576, 0.4023321568965912, -0.5347386598587036, -0.498078316450119, -0.7788227796554565, -0.21026650071144104, -0.31923356652259827, 0.956584632396698, -0.16831591725349426, -0.11954047530889511, -0.19037310779094696, -0.18913093209266663, -0.6224666833877563, -0.07086095958948135, -0.9491889476776123, -0.5988501310348511, 0.5878278613090515, 0.14482790231704712, 0.8043820261955261, 0.3860850930213928, 0.2988066077232361, 0.3154267966747284, -0.13200147449970245, -0.0556582510471344, -0.6736392378807068, -0.1001017615199089, 0.139942929148674, -0.3477790057659149, -0.7271896004676819, 0.1080971211194992, 0.5574430227279663, 0.23417556285858154, -0.2620849907398224, 0.00274636410176754, 0.050092630088329315, 0.6013206243515015, -0.44850635528564453, 0.06115180626511574, -0.05485258996486664, 0.047480881214141846, -0.3448183834552765, 0.0893462523818016, -0.2070213407278061, -0.4069534242153168, -0.04108983650803566, -0.9826035499572754, 0.1561385840177536, 0.10280917584896088, 1.33885657787323, 0.3716942071914673, -0.374893456697464, -0.10793992131948471, -0.4385814964771271, 0.49508532881736755, -0.765182375907898, 0.39076659083366394, 0.3912227153778076, 0.20333731174468994, -0.20922768115997314, -1.1102733612060547, -0.4462312161922455, 0.08104372769594193, -0.12123630940914154, 0.3818262815475464, -0.3656946122646332, -0.1385708451271057, 0.11690477281808853, 0.49792784452438354, -0.7207433581352234, -0.016434423625469208, -0.4223797023296356, 0.0730011910200119, 0.6420562863349915, 0.09087645262479782, 0.5186567306518555, -0.08250108361244202, -0.6255512833595276, -0.12749555706977844, -0.5094972848892212, -0.00949026457965374, 0.47577521204948425, -0.3617386817932129, -0.7940150499343872, 0.2687787413597107, -0.00977278035134077, 0.46389010548591614, 0.24932339787483215, -0.053716640919446945, 0.4518181085586548, -0.0165652297437191, -0.36027848720550537, -0.3995567858219147, 1.2704232931137085, 0.3257952034473419, -0.13763777911663055, -0.04834495857357979, -0.06914528459310532, -0.17900407314300537, -0.03852628543972969, -1.0690836906433105, -0.588081419467926, 0.30966830253601074, -0.6032074689865112, -0.4686245024204254, -0.2782824635505676, -0.8461097478866577, -0.3949281573295593, 0.33767345547676086, 0.6852183938026428, -0.3978325128555298, -0.6862040758132935, 0.08791392296552658, -0.543243944644928, 0.14744903147220612, 0.40549224615097046, -0.7267522215843201, 0.14476904273033142, 0.2119724303483963, 1.0871636867523193, -0.007319469470530748, -0.13798652589321136, -0.10355795919895172, 0.24225008487701416, -0.21109949052333832, 0.7391813397407532, -0.23056593537330627, -0.7999624013900757, -0.5153350234031677, 0.1462913453578949, 0.05607762187719345, -0.35043469071388245, 0.5754764080047607, -0.5017685294151306, 0.3409106433391571, -0.04068557173013687, -0.48581916093826294, -0.32775089144706726, -0.1667896807193756, -0.6806898713111877, 0.8883902430534363, 0.38765066862106323, -0.8374828100204468, 0.14256718754768372, -1.026228904724121, -0.3367338180541992, 0.18530486524105072, 0.07924608141183853, -0.7274578213691711, -0.08389025181531906, 0.002246712101623416, 0.27794018387794495, -0.21209627389907837, 0.1748163402080536, -0.5758119225502014, -0.015976138412952423, 0.0011912556365132332, -0.5058833360671997, 1.3570609092712402, 0.4965333938598633, -0.2914317846298218, 0.24501937627792358, -0.47047263383865356, -0.12516582012176514, 0.3855533003807068, -0.1166774332523346, -0.16225624084472656, -0.1270354837179184, 0.23174607753753662, 0.08182363957166672, 0.22193196415901184, -0.44916561245918274, 0.2442665696144104, -0.20813404023647308, 0.5334640145301819, 0.9675737619400024, 0.1399172842502594, 0.4759017527103424, -0.4499523639678955, 0.6364523768424988, 0.013175222091376781, 0.5743776559829712, 0.2529885768890381, -0.9684615135192871, -0.7731263041496277, -0.61582350730896, 0.22629138827323914, 0.2831248342990875, -0.6391907334327698, 0.3245381712913513, 0.0009491161908954382, -0.7685917019844055, -0.518373429775238, 0.07350660115480423, 0.036387279629707336, 0.7204289436340332, 0.20215827226638794, -0.3568146824836731, -0.2951197028160095, -0.6523599624633789, 0.2952701151371002, -0.10087321698665619, 0.001286639366298914, 0.24535955488681793, 0.610288679599762, -0.32847511768341064, 0.7438710331916809, -0.8813363909721375, -0.4455467462539673, 0.1052882969379425, 0.37026092410087585, 0.37380316853523254, 0.7463229298591614, 0.9224121570587158, -1.0953271389007568, -0.8141389489173889, -0.05390346795320511, -0.9620747566223145, -0.2472514659166336, 0.11007952690124512, -0.7299677729606628, -0.019322186708450317, 0.1633039265871048, -0.8246954083442688, 0.6186743974685669, 0.781722903251648, -0.772758960723877, 0.471936970949173, -0.4181677997112274, 0.21074052155017853, -1.1715359687805176, 0.36566799879074097, 0.08768008649349213, -0.4568288028240204, -0.5767683386802673, 0.4037792980670929, -0.1656333953142166, -0.12084261327981949, -0.5202599167823792, 0.9459176659584045, -0.39510807394981384, 0.43221452832221985, -0.3811911940574646, -0.10036635398864746, 0.18422235548496246, 0.46886831521987915, -0.05016499012708664, 0.673595130443573, 0.8718672394752502, -0.6300643086433411, 0.3316093385219574, 0.425778329372406, -0.24285860359668732, 0.6031267642974854, -0.984610378742218, 0.023459358140826225, -0.17758864164352417, 0.29585275053977966, -1.1020749807357788, -0.27198758721351624, 0.6712878346443176, -0.6134125590324402, 0.2390005886554718, -0.30066415667533875, -0.4813518226146698, -0.3301433026790619, -0.11717084050178528, 0.41186031699180603, 1.0264438390731812, -0.4449935257434845, 0.6618387699127197, 0.44452545046806335, 0.014861968345940113, -0.3667202889919281, -0.7099432349205017, -0.29639607667922974, -0.5666326284408569, -0.8870666027069092, 0.39702486991882324, -0.36052405834198, 0.04379109665751457, 0.17435277998447418, 0.14539624750614166, -0.22867180407047272, 0.13402517139911652, 0.5211790204048157, 0.3412705659866333, 0.07809959352016449, -0.30285775661468506, 0.026713864877820015, -0.1666959673166275, 0.02027181349694729, -0.17226983606815338, 0.7196094989776611, -0.01704343408346176, -0.3165122866630554, -0.7419130802154541, 0.2647465467453003, 0.6856359839439392, -0.06272649765014648, 0.8777226209640503, 1.0513653755187988, -0.4128815531730652, 0.22440290451049805, -0.4140981435775757, 0.11383341252803802, -0.5670843124389648, 0.06375746428966522, -0.2823776304721832, -0.480434775352478, 0.7950729131698608, 0.22148816287517548, 0.2631552517414093, 0.6314935684204102, 0.5775625705718994, -0.4020545184612274, 1.3390707969665527, 0.6129921078681946, 0.11151579767465591, 0.6212872862815857, -0.907260000705719, 0.046930186450481415, -0.962045431137085, -0.4078907072544098, -0.41918766498565674, -0.49303025007247925, -0.4907373785972595, -0.4957349896430969, 0.6348193883895874, 0.38476505875587463, -0.4036541283130646, 0.08759909868240356, -0.36902716755867004, 0.0733284130692482, 0.3240738809108734, 0.3265727460384369, 0.1385922133922577, 0.0202263705432415, 0.04805102199316025, 0.10578592121601105, -0.6921048164367676, -0.21938559412956238, 0.8295568227767944, 0.4496365487575531, 1.0057421922683716, 0.3813000023365021, 0.7151908278465271, 0.4414697587490082, 0.6720242500305176, -0.5395591259002686, 0.4063390791416168, -0.12061695754528046, -0.856658935546875, -0.21710854768753052, -0.5077667832374573, -1.0471043586730957, 0.2703236937522888, -0.15649668872356415, -0.4932699501514435, 0.41652408242225647, 0.22307513654232025, -0.10148627310991287, 0.47272875905036926, -0.8610438704490662, 0.9460245966911316, -0.13784554600715637, -0.6166430115699768, -0.16202357411384583, -0.39798593521118164, 0.32023710012435913, 0.13625282049179077, 0.23351871967315674, -0.1335384100675583, -0.09728997200727463, 0.8175095915794373, -0.6756850481033325, 0.8166585564613342, -0.5006948113441467, -0.17418985068798065, 0.385029137134552, -0.04950353875756264, 0.358490914106369, 0.21095629036426544, -0.008394717238843441, 0.31901615858078003, -0.1337108314037323, -0.7128282785415649, -0.39319944381713867, 0.895914614200592, -0.9740253686904907, -0.5071603655815125, -0.3678876459598541, -0.4670356214046478, 0.340526282787323, 0.46210023760795593, 0.7249960899353027, 0.28812044858932495, -0.008792330510914326, 0.0819823369383812, 0.7640720009803772, -0.045604199171066284, 0.4870099425315857, 0.19944097101688385, -0.4255819022655487, -0.559476912021637, 0.9096150398254395, -0.055117808282375336, 0.3752451539039612, 0.002655457239598036, 0.42803576588630676, -0.4275815188884735, -0.5596729516983032, -0.6633363366127014, 0.3274405002593994, -0.6166607737541199, -0.2691675126552582, -0.5871778726577759, -0.13889344036579132, -0.43369999527931213, -0.15461204946041107, -0.17754577100276947, -0.1766708344221115, -0.7087802290916443, 0.19744251668453217, 0.6337242126464844, 0.6266545057296753, -0.18985241651535034, 0.45895087718963623, -0.44399794936180115, 0.464126855134964, 0.1918308287858963, 0.49901607632637024, 0.25561270117759705, -0.7021539211273193, -0.04590855911374092, 0.16842235624790192, -0.5968335270881653, -0.8874735832214355, 0.5450879335403442, 0.08126399666070938, 0.6341266632080078, 0.5502435564994812, -0.11224842816591263, 0.9325162172317505, -0.3226165771484375, 0.7767645120620728, 0.5927296876907349, -0.6799540519714355, 0.5259350538253784, -0.5898749232292175, 0.2842361032962799, 0.18539711833000183, 0.7309244871139526, -0.42371612787246704, -0.44467371702194214, -0.7929622530937195, -0.899264931678772, 0.3979032337665558, 0.4021757245063782, 0.07003165036439896, 0.15361152589321136, 0.2965802550315857, 0.06370627135038376, -0.030484754592180252, -1.0115476846694946, -0.5661845207214355, -0.28926315903663635, -0.15194597840309143, 0.14310672879219055, 0.19454310834407806, -0.1957860291004181, -0.3084963262081146, 0.9675471782684326, 0.09140576422214508, 0.4401712119579315, 0.2665070593357086, 0.03057928755879402, -0.30786141753196716, -0.17395718395709991, 0.28695374727249146, 0.4988848865032196, -0.22777973115444183, -0.31264498829841614, -0.09451451897621155, -0.5552152395248413, 0.1916593462228775, 0.04997831955552101, -0.550579309463501, -0.06660415977239609, 0.07833525538444519, 0.929343581199646, -0.12365846335887909, -0.23671646416187286, 0.4399052858352661, -0.22274906933307648, -0.39944928884506226, -0.38087746500968933, 0.24886079132556915, 0.36219099164009094, 0.3759988248348236, 0.28760993480682373, 0.28936517238616943, 0.23803235590457916, -0.4362059235572815, -0.11573516577482224, 0.5547025799751282, -0.2371794730424881, -0.25365564227104187, 1.2451988458633423, 0.19464731216430664, -0.3274978697299957, 0.5556622743606567, -0.2749786376953125, -0.1674855500459671, 0.5664042234420776, 0.614492654800415, 0.9056827425956726, -0.1183575838804245, 0.34348350763320923, 0.40646690130233765, -0.08357007801532745, -0.08535978198051453, 0.2701718509197235, 0.13909690082073212, -0.3829304575920105, -0.13481967151165009, -0.6304294466972351, 0.04990871623158455, 0.22303542494773865, -0.4903508722782135, 0.5286188125610352, -0.6147589087486267, -0.44821402430534363, -0.18798448145389557, -0.1049322783946991, -0.5296861529350281, 0.14634056389331818, 0.134268656373024, 0.9315605163574219, -0.9821843504905701, 0.7757110595703125, 0.6063024997711182, -0.6960484385490417, -0.6636304259300232, -0.0900585874915123, -0.2964761555194855, -0.5324379801750183, 0.3372194766998291, -0.12190639972686768, -0.19220007956027985, 0.20347367227077484, -0.887201726436615, -0.8575908541679382, 1.4026793241500854, 0.2788887917995453, -0.006753822322934866, -0.2703526020050049, -0.2690070867538452, 0.5106140375137329, -0.23147432506084442, 0.44691258668899536, 0.07176150381565094, 0.5684272646903992, 0.2169686108827591, -0.6612972617149353, 0.056348543614149094, -0.36562371253967285, 0.10068478435277939, 0.12396054714918137, -1.1119717359542847, 0.8966327905654907, -0.14084766805171967, -0.30348193645477295, 0.4494567811489105, 0.8763740658760071, 0.3526681363582611, 0.3098316788673401, 0.5327319502830505, 0.9321287274360657, 0.6177594065666199, -0.272348016500473, 1.1154401302337646, 0.09137016534805298, 0.5820822715759277, 0.7302489280700684, 0.06026054918766022, 0.6316478848457336, 0.38586851954460144, -0.2388511300086975, 0.8917778134346008, 0.6436343193054199, -0.018676232546567917, 0.760071337223053, -0.05434330180287361, -0.22775636613368988, -0.0993814691901207, -0.03562359884381294, -0.5953962206840515, 0.0042164260521531105, 0.3489207625389099, -0.1830502450466156, -0.13680551946163177, 0.1945301592350006, 0.05404537916183472, -0.3139622211456299, -0.1861812174320221, 0.42187121510505676, 0.117499440908432, -0.3705604076385498, 0.9396734833717346, -0.03141053766012192, 0.9372434020042419, -0.8959329128265381, -0.14439043402671814, -0.26993975043296814, -0.0442667156457901, -0.4238148629665375, -0.9569042325019836, 0.11067242920398712, 0.025838172063231468, -0.036433376371860504, -0.31623315811157227, 0.6187316179275513, -0.12931472063064575, -0.4488711655139923, 0.35172703862190247, 0.2055273801088333, 0.2672123610973358, 0.3512561023235321, -0.8825598359107971, 0.18474768102169037, 0.06856512278318405, -0.3620847463607788, 0.25967034697532654, 0.16816961765289307, 0.1473524272441864, 0.9608120918273926, 0.5680885910987854, 0.09984710067510605, 0.16959281265735626, -0.0191519632935524, 0.7766401767730713, -0.2685503661632538, -0.5720434188842773, -0.6209481358528137, 0.844678521156311, -0.13273240625858307, -0.33444711565971375, 0.6962641477584839, 0.5683059692382812, 0.7531235218048096, -0.16674472391605377, 0.7886221408843994, -0.6387230753898621, 0.08565210551023483, -0.4696912169456482, 1.1804535388946533, -1.0559966564178467, 0.03011072240769863, -0.3717579245567322, -0.5775517821311951, 0.054231952875852585, 0.848757266998291, -0.025663763284683228, 0.20656956732273102, 0.4539320170879364, 0.8302267789840698, -0.32754141092300415, -0.2103431522846222, 0.15119782090187073, 0.27408403158187866, 0.48779627680778503, 0.5747952461242676, 0.6050496101379395, -0.8585542440414429, 0.5370653867721558, -0.3708668053150177, -0.3237846791744232, -0.16131369769573212, -0.8431606292724609, -0.798295259475708, -0.6802745461463928, -0.5721991062164307, -0.6155707836151123, -0.19923023879528046, 0.36800724267959595, 1.084618330001831, -0.5333002805709839, -0.31788015365600586, -0.2398941069841385, 0.1914747953414917, -0.0726434662938118, -0.31191983819007874, 0.2476809322834015, 0.2513754367828369, -0.9302347898483276, 0.007186260540038347, -0.03206055611371994, 0.4590222239494324, -0.3425479531288147, -0.4459584951400757, -0.5182852745056152, -0.23295804858207703, 0.3637317717075348, 0.3426167368888855, -0.5687592625617981, -0.04622826352715492, -0.2217758744955063, 0.02002136968076229, 0.21946154534816742, 0.25754648447036743, -0.5964210629463196, 0.23230431973934174, 0.9013164043426514, 0.0865090861916542, 0.761732280254364, -0.007743090391159058, 0.32118460536003113, -0.5181862711906433, 0.2699456214904785, 0.02268589287996292, 0.4858078062534332, 0.19797876477241516, -0.4452449679374695, 0.6277073621749878, 0.4982213079929352, -0.6929689049720764, -0.7853865027427673, 0.14717915654182434, -1.0820715427398682, -0.28920358419418335, 0.8790819048881531, -0.3195534646511078, -0.33437222242355347, 0.099814772605896, -0.25746268033981323, 0.36579835414886475, -0.4218461215496063, 0.5416366457939148, 0.6590427160263062, -0.336774617433548, -0.23775197565555573, -0.6009512543678284, 0.3026016056537628, 0.2285706102848053, -0.8661563992500305, -0.2537830173969269, 0.4909955561161041, 0.7983694076538086, 0.3024461567401886, 0.9295005798339844, -0.2781292498111725, 0.29990825057029724, -0.00898789707571268, 0.03419192135334015, 0.017322393134236336, -0.06222202628850937, -0.266239732503891, 0.015117431990802288, 0.05549023300409317, -0.1607021987438202 ]
timm/efficientnet_b3.ra2_in1k
timm
"2023-04-27T21:10:28Z"
26,511
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2110.00476", "arxiv:1905.11946", "license:apache-2.0", "region:us" ]
image-classification
"2022-12-12T23:56:39Z"
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for efficientnet_b3.ra2_in1k A EfficientNet image classification model. Trained on ImageNet-1k in `timm` using recipe template described below. Recipe details: * RandAugment `RA2` recipe. Inspired by and evolved from EfficientNet RandAugment recipes. Published as `B` recipe in [ResNet Strikes Back](https://arxiv.org/abs/2110.00476). * RMSProp (TF 1.0 behaviour) optimizer, EMA weight averaging * Step (exponential decay w/ staircase) LR schedule with warmup ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 12.2 - GMACs: 1.6 - Activations (M): 21.5 - Image size: train = 288 x 288, test = 320 x 320 - **Papers:** - EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks: https://arxiv.org/abs/1905.11946 - ResNet strikes back: An improved training procedure in timm: https://arxiv.org/abs/2110.00476 - **Dataset:** ImageNet-1k - **Original:** https://github.com/huggingface/pytorch-image-models ## 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('efficientnet_b3.ra2_in1k', 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) ``` ### Feature Map Extraction ```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( 'efficientnet_b3.ra2_in1k', pretrained=True, features_only=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 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 24, 144, 144]) # torch.Size([1, 32, 72, 72]) # torch.Size([1, 48, 36, 36]) # torch.Size([1, 136, 18, 18]) # torch.Size([1, 384, 9, 9]) print(o.shape) ``` ### 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( 'efficientnet_b3.ra2_in1k', 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, 1536, 9, 9) 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 @inproceedings{tan2019efficientnet, title={Efficientnet: Rethinking model scaling for convolutional neural networks}, author={Tan, Mingxing and Le, Quoc}, booktitle={International conference on machine learning}, pages={6105--6114}, year={2019}, organization={PMLR} } ``` ```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}} } ``` ```bibtex @inproceedings{wightman2021resnet, title={ResNet strikes back: An improved training procedure in timm}, author={Wightman, Ross and Touvron, Hugo and Jegou, Herve}, booktitle={NeurIPS 2021 Workshop on ImageNet: Past, Present, and Future} } ```
[ -0.3767710328102112, -0.4863511621952057, -0.10469537228345871, 0.07603000849485397, -0.19421567022800446, -0.467824786901474, -0.313810259103775, -0.41979074478149414, 0.2492702305316925, 0.441454142332077, -0.43631795048713684, -0.5473328232765198, -0.7644951343536377, -0.11672770977020264, -0.16609740257263184, 0.8570436835289001, -0.05536811798810959, 0.041738372296094894, -0.12918034195899963, -0.6392284631729126, -0.19206595420837402, -0.2024056613445282, -1.098312258720398, -0.5602534413337708, 0.45710504055023193, 0.37522780895233154, 0.5886657238006592, 0.6860194206237793, 0.7418389320373535, 0.49001753330230713, -0.055324140936136246, 0.18678739666938782, -0.24725759029388428, -0.08571899682283401, 0.4057575762271881, -0.6653599143028259, -0.40850746631622314, 0.21449287235736847, 0.6900612711906433, 0.3810124397277832, -0.059279922395944595, 0.4683472812175751, 0.13014397025108337, 0.7021028399467468, -0.3403857946395874, 0.13005691766738892, -0.4697890281677246, 0.19175991415977478, -0.0850779116153717, 0.10693465918302536, -0.37072044610977173, -0.3674270510673523, 0.09724265336990356, -0.5760317444801331, 0.42866554856300354, 0.007612451910972595, 1.300067663192749, 0.3053637146949768, -0.017663370817899704, -0.061665356159210205, -0.22318893671035767, 0.7802212238311768, -0.8386712074279785, 0.1577262133359909, 0.23350124061107635, 0.3356979191303253, -0.053779907524585724, -1.2222503423690796, -0.5671291351318359, -0.19822891056537628, -0.21566064655780792, -0.05862334370613098, -0.3882260024547577, 0.009676963090896606, 0.3717583417892456, 0.24762442708015442, -0.4248584508895874, 0.2015741914510727, -0.4790515601634979, -0.13829445838928223, 0.521134614944458, 0.05812038481235504, 0.3625141382217407, -0.15621334314346313, -0.4652325212955475, -0.4900411367416382, -0.41804206371307373, 0.3160548508167267, 0.29860419034957886, 0.3155726194381714, -0.5685490965843201, 0.3932921290397644, 0.11611948162317276, 0.6555311679840088, 0.08573643118143082, -0.28190696239471436, 0.5840311050415039, 0.039114706218242645, -0.43194320797920227, -0.19167476892471313, 1.0559613704681396, 0.4077175259590149, 0.19876018166542053, 0.16374291479587555, -0.16862289607524872, -0.4540516138076782, 0.028293054550886154, -1.2834256887435913, -0.3772329092025757, 0.27712011337280273, -0.715771496295929, -0.3898198902606964, 0.14519234001636505, -0.506374180316925, -0.13145309686660767, -0.05209473520517349, 0.5923779606819153, -0.4675558805465698, -0.41119474172592163, -0.009986000135540962, -0.20927710831165314, 0.2516263723373413, 0.2477560192346573, -0.5995148420333862, 0.21860386431217194, 0.35768696665763855, 1.2147424221038818, 0.1554073840379715, -0.42655229568481445, -0.2808093726634979, -0.42216020822525024, -0.2789931297302246, 0.3846510648727417, -0.09152005612850189, 0.10177728533744812, -0.3457825183868408, 0.33133256435394287, -0.12426573783159256, -0.7866384983062744, 0.2476191520690918, -0.329715371131897, 0.09801889955997467, -0.03364737331867218, -0.24617207050323486, -0.6376460790634155, 0.36392921209335327, -0.5907924175262451, 1.2064931392669678, 0.30967211723327637, -0.9326777458190918, 0.2543565332889557, -0.6111260056495667, -0.12284984439611435, -0.30388176441192627, -0.002950949128717184, -1.088600754737854, -0.0965391993522644, 0.11890163272619247, 0.7840155959129333, -0.4002748429775238, 0.02692287042737007, -0.5699433088302612, -0.2110409289598465, 0.33184126019477844, -0.025054961442947388, 1.1051796674728394, 0.2752256691455841, -0.5018243789672852, 0.22759892046451569, -0.6427872776985168, 0.2737214267253876, 0.5339143872261047, -0.23165586590766907, -0.04346616938710213, -0.5765738487243652, 0.14711755514144897, 0.28892186284065247, 0.09148281067609787, -0.5304892063140869, 0.2012493908405304, -0.19766412675380707, 0.5176994800567627, 0.5872719883918762, -0.13256053626537323, 0.3531706631183624, -0.42851918935775757, 0.2803421914577484, 0.1884143054485321, 0.26050251722335815, -0.04736173152923584, -0.4950820803642273, -0.8589822053909302, -0.4947025179862976, 0.36980682611465454, 0.38540586829185486, -0.5084907412528992, 0.4029238224029541, -0.19546076655387878, -0.8222549557685852, -0.4506952464580536, 0.08199603110551834, 0.5379530787467957, 0.6079762578010559, 0.3267393708229065, -0.45602864027023315, -0.5185962319374084, -1.0417264699935913, -0.032461218535900116, 0.07204833626747131, 0.0475638285279274, 0.40838220715522766, 0.6535962820053101, -0.05466734617948532, 0.5854811668395996, -0.41450533270835876, -0.2666742503643036, -0.3382868766784668, 0.06301677972078323, 0.44645702838897705, 0.8788855671882629, 0.7909777760505676, -0.6774269938468933, -0.593885064125061, -0.12165257334709167, -0.9298675656318665, 0.20697759091854095, -0.11492206901311874, -0.16372983157634735, 0.16552205383777618, 0.21835735440254211, -0.5679254531860352, 0.4732063114643097, 0.24944724142551422, -0.206198588013649, 0.3964323103427887, -0.23769524693489075, 0.21951092779636383, -1.1755069494247437, 0.18415194749832153, 0.3875904381275177, -0.13261009752750397, -0.525781512260437, 0.23127280175685883, 0.09280703961849213, -0.10008519142866135, -0.4924969971179962, 0.6455783843994141, -0.5998968482017517, -0.21369634568691254, -0.17623507976531982, -0.2920892834663391, 0.028387777507305145, 0.7051275372505188, -0.17890991270542145, 0.3579762279987335, 0.8165178298950195, -0.4204503893852234, 0.47310787439346313, 0.25543153285980225, -0.25562721490859985, 0.34239161014556885, -0.7626091241836548, 0.2367878556251526, 0.06393303722143173, 0.3027111887931824, -1.05145263671875, -0.2573239505290985, 0.3962295353412628, -0.6524339914321899, 0.6969305872917175, -0.4920656681060791, -0.48165684938430786, -0.48777660727500916, -0.4346573054790497, 0.39813271164894104, 0.6435539126396179, -0.7727415561676025, 0.46855536103248596, 0.21933972835540771, 0.3566851019859314, -0.63567715883255, -0.9668306112289429, -0.15616251528263092, -0.4037230312824249, -0.7855809926986694, 0.307779461145401, 0.14782458543777466, 0.01957889273762703, 0.12982028722763062, 0.015044035390019417, -0.1710187941789627, -0.00023657329438719898, 0.5236726999282837, 0.1910925656557083, -0.2751271724700928, -0.09806697815656662, -0.3371722102165222, -0.04542277380824089, 0.0300211813300848, -0.34863075613975525, 0.5342338681221008, -0.24972836673259735, -0.08867143839597702, -0.8975068926811218, -0.03576832264661789, 0.4911941885948181, -0.041998837143182755, 0.8625208139419556, 1.1401398181915283, -0.5782856345176697, -0.0769355520606041, -0.4678289294242859, -0.38631972670555115, -0.49790647625923157, 0.518032431602478, -0.32535824179649353, -0.46442463994026184, 0.8730018734931946, -0.04094668850302696, 0.13061891496181488, 0.6751725673675537, 0.35590410232543945, -0.050513144582509995, 0.6751673817634583, 0.6228797435760498, 0.28547608852386475, 0.7491086721420288, -1.1369575262069702, -0.19912239909172058, -0.9328258037567139, -0.43896129727363586, -0.4235677123069763, -0.7965580821037292, -0.6374834179878235, -0.33046403527259827, 0.4721396863460541, 0.2155543863773346, -0.49262508749961853, 0.47195541858673096, -0.8622914552688599, 0.06550131738185883, 0.7025141716003418, 0.6122261881828308, -0.4384656250476837, 0.34769344329833984, -0.20479391515254974, -0.003948500379920006, -0.8967008590698242, -0.17982372641563416, 1.131743311882019, 0.4341945946216583, 0.5784813761711121, -0.08301474153995514, 0.7058519124984741, -0.2208794206380844, 0.4288790225982666, -0.6162796020507812, 0.5846767425537109, -0.21625365316867828, -0.4935765862464905, -0.21885491907596588, -0.5122585892677307, -1.0964159965515137, 0.15871374309062958, -0.2604984939098358, -0.6297876834869385, 0.1991397589445114, 0.24827933311462402, -0.2703174352645874, 0.8188303709030151, -0.8646966814994812, 0.9107238054275513, -0.07234330475330353, -0.4737336337566376, -0.06261073797941208, -0.7403545379638672, 0.3341488540172577, 0.2573593258857727, -0.19317960739135742, -0.04535410553216934, 0.0691852942109108, 1.087685227394104, -0.711965024471283, 0.9003877639770508, -0.5446122884750366, 0.47633251547813416, 0.5356132388114929, -0.1272769719362259, 0.4152882397174835, -0.11757276207208633, -0.23582139611244202, 0.354960173368454, -0.15064364671707153, -0.4895627498626709, -0.6299462914466858, 0.6380226016044617, -0.9913415312767029, -0.30341866612434387, -0.2236417531967163, -0.46400970220565796, 0.2738848924636841, 0.1294143944978714, 0.5567657351493835, 0.7681611180305481, 0.33451613783836365, 0.3778514564037323, 0.5418884754180908, -0.41130468249320984, 0.4814247488975525, -0.01553983986377716, -0.04964997246861458, -0.5518709421157837, 0.7847016453742981, 0.37685686349868774, 0.20998500287532806, 0.16630935668945312, 0.26276904344558716, -0.22164472937583923, -0.6353474855422974, -0.3466504216194153, 0.23632043600082397, -0.7433434128761292, -0.6386503577232361, -0.7079986929893494, -0.42852070927619934, -0.3425500690937042, -0.08840944617986679, -0.5663445591926575, -0.4360606372356415, -0.3845580518245697, 0.2317933738231659, 0.7450990676879883, 0.5624460577964783, -0.2822857201099396, 0.5917906761169434, -0.46752625703811646, 0.11757251620292664, 0.11960507184267044, 0.4106046259403229, 0.14013773202896118, -0.8798584938049316, -0.336025595664978, -0.06142188608646393, -0.4375111758708954, -0.655748724937439, 0.49250224232673645, 0.24852123856544495, 0.5099179148674011, 0.34070584177970886, -0.18356625735759735, 0.6579018235206604, -0.05089724436402321, 0.5346810817718506, 0.5438252091407776, -0.4427972733974457, 0.5832634568214417, 0.04858681559562683, 0.17499683797359467, 0.12640631198883057, 0.34015461802482605, -0.23393204808235168, -0.04032335430383682, -0.9777108430862427, -0.8232508897781372, 0.8754398822784424, 0.06414111703634262, 0.018226126208901405, 0.2829956114292145, 0.8418357372283936, 0.0627174973487854, -0.07983100414276123, -0.7506069540977478, -0.5319550633430481, -0.2765862047672272, -0.2336329221725464, 0.03663844242691994, -0.11551760882139206, -0.09700753539800644, -0.644550621509552, 0.7032901644706726, -0.0493207648396492, 0.7241567969322205, 0.33565986156463623, -0.012081937864422798, -0.07516126334667206, -0.41789305210113525, 0.44344809651374817, 0.29534679651260376, -0.27916744351387024, 0.15062078833580017, 0.17716845870018005, -0.5586934685707092, 0.1645912528038025, 0.1210150346159935, -0.049820687621831894, -0.037808939814567566, 0.5506213903427124, 0.9698612093925476, 0.008986450731754303, 0.12213826924562454, 0.36412307620048523, -0.10555320233106613, -0.4314327538013458, -0.27365076541900635, 0.19287243485450745, -0.009697116911411285, 0.5062554478645325, 0.2970934808254242, 0.512669563293457, -0.08841590583324432, -0.2370183914899826, 0.3037084639072418, 0.5161764621734619, -0.25529399514198303, -0.31301748752593994, 0.652448832988739, -0.17612625658512115, -0.2694271206855774, 0.8986737132072449, -0.16354243457317352, -0.437997967004776, 1.21494460105896, 0.5073360800743103, 0.9921146631240845, 0.03099486045539379, -0.022838683798909187, 0.9669698476791382, 0.30890703201293945, -0.09238400310277939, 0.13682681322097778, 0.17737846076488495, -0.8343700170516968, 0.039746299386024475, -0.4710180461406708, 0.05610404536128044, 0.3222285509109497, -0.5715025067329407, 0.263935923576355, -0.7485983967781067, -0.4800657033920288, 0.17966145277023315, 0.4143178164958954, -0.9980931282043457, 0.2000831663608551, -0.13528108596801758, 0.9622113108634949, -0.7096672654151917, 0.7827357053756714, 0.8925220370292664, -0.5059604644775391, -1.1746575832366943, -0.15887853503227234, 0.021785682067275047, -0.9374045729637146, 0.7437196969985962, 0.4891417324542999, 0.14176811277866364, 0.11106827110052109, -0.8774869441986084, -0.7063244581222534, 1.4910567998886108, 0.5839563608169556, -0.1676759570837021, 0.34048447012901306, -0.21259146928787231, 0.2082648128271103, -0.4925497770309448, 0.54703688621521, 0.12835456430912018, 0.4290418028831482, 0.28472423553466797, -0.5897098779678345, 0.3459895849227905, -0.38189077377319336, 0.10370197147130966, 0.1455119401216507, -0.9435341358184814, 0.9380343556404114, -0.5692221522331238, -0.14640499651432037, 0.037872377783060074, 0.6968982219696045, 0.16396646201610565, 0.17443634569644928, 0.5964958071708679, 0.9532576203346252, 0.5563267469406128, -0.24555513262748718, 0.9924181699752808, -0.013274207711219788, 0.5567376613616943, 0.6715190410614014, 0.41076669096946716, 0.5527380704879761, 0.28989270329475403, -0.24170833826065063, 0.3577989935874939, 1.0954008102416992, -0.3372056186199188, 0.31351789832115173, 0.2966865003108978, 0.10877235978841782, -0.08306632936000824, 0.10249990969896317, -0.43596991896629333, 0.5190412998199463, 0.14566312730312347, -0.5527568459510803, -0.2454235553741455, 0.045997798442840576, 0.05009743198752403, -0.2995637059211731, -0.23994265496730804, 0.48477455973625183, 0.0536256767809391, -0.40274015069007874, 0.9537826776504517, 0.17255330085754395, 0.888498067855835, -0.426209032535553, 0.00018042080046143383, -0.3346807062625885, 0.24859268963336945, -0.36568090319633484, -0.7301028370857239, 0.3304325342178345, -0.29075896739959717, -0.07740415632724762, 0.03592252731323242, 0.6832017302513123, -0.29944711923599243, -0.46039557456970215, 0.22302675247192383, 0.24240493774414062, 0.5259883403778076, 0.12289126217365265, -1.311718225479126, 0.21825070679187775, 0.025897463783621788, -0.6998137831687927, 0.35087600350379944, 0.44753068685531616, 0.1483362466096878, 0.7935330867767334, 0.5498571991920471, -0.08832451701164246, 0.06741537898778915, -0.14454565942287445, 0.8222440481185913, -0.3898475766181946, -0.23429261147975922, -0.8102813363075256, 0.5728516578674316, -0.13936695456504822, -0.5573336482048035, 0.4895133674144745, 0.5589063763618469, 0.7877591252326965, 0.029023952782154083, 0.417412668466568, -0.30943161249160767, -0.06784944236278534, -0.4210835099220276, 0.7652468085289001, -0.8211733102798462, 0.010909687727689743, -0.05573078617453575, -0.6813215017318726, -0.39100977778434753, 0.701761782169342, -0.15805289149284363, 0.45153743028640747, 0.47388285398483276, 1.0617802143096924, -0.3584374189376831, -0.3854292929172516, 0.15205127000808716, 0.16719971597194672, 0.12157328426837921, 0.4134977161884308, 0.3100798726081848, -0.7831287384033203, 0.33806943893432617, -0.6785699725151062, -0.2737552523612976, -0.17309214174747467, -0.7315807342529297, -0.8294392824172974, -0.8828538656234741, -0.6060503125190735, -0.6927315592765808, -0.11920569092035294, 0.9554125070571899, 1.1139020919799805, -0.6548756957054138, -0.15634803473949432, -0.016016459092497826, 0.17502157390117645, -0.38587990403175354, -0.2362992912530899, 0.6753034591674805, -0.2973252236843109, -0.6801748275756836, -0.3320296108722687, 0.02867130935192108, 0.25050538778305054, 0.020080450922250748, -0.22149693965911865, -0.2000771015882492, -0.27305421233177185, 0.20157748460769653, 0.2961447834968567, -0.6096269488334656, -0.19380079209804535, -0.268870085477829, -0.16153617203235626, 0.3171929717063904, 0.5198178291320801, -0.4430374503135681, 0.3257961571216583, 0.3949487507343292, 0.4243486523628235, 0.7815630435943604, -0.41404983401298523, 0.07205413281917572, -0.8522093296051025, 0.5837938189506531, -0.1426759660243988, 0.47152552008628845, 0.46398743987083435, -0.39219263195991516, 0.685767412185669, 0.3513537049293518, -0.45818620920181274, -0.8906377553939819, -0.07678728550672531, -1.041536808013916, -0.19702279567718506, 0.9551138877868652, -0.504710853099823, -0.49829983711242676, 0.5587233304977417, 0.06598662585020065, 0.6869036555290222, -0.07900121062994003, 0.4518357515335083, 0.2083640694618225, -0.1547841876745224, -0.6543289422988892, -0.6018100380897522, 0.4251495897769928, 0.20607216656208038, -0.5603421926498413, -0.3697219491004944, -0.01928047463297844, 0.67247074842453, 0.1999007612466812, 0.5189126133918762, -0.10978597402572632, 0.13637159764766693, 0.1399490386247635, 0.5436381101608276, -0.5492400527000427, -0.10957088321447372, -0.3219282925128937, 0.09470025449991226, -0.044640928506851196, -0.6150478720664978 ]
stevhliu/my_awesome_model
stevhliu
"2023-08-25T00:04:52Z"
26,479
1
transformers
[ "transformers", "pytorch", "tf", "tensorboard", "safetensors", "distilbert", "text-classification", "generated_from_keras_callback", "license:apache-2.0", "endpoints_compatible", "has_space", "region:us" ]
text-classification
"2022-09-28T18:41:57Z"
--- license: apache-2.0 tags: - generated_from_keras_callback model-index: - name: stevhliu/my_awesome_model results: [] --- <!-- This model card has been generated automatically according to the information Keras had access to. You should probably proofread and complete it, then remove this comment. --> # stevhliu/my_awesome_model This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on an unknown dataset. It achieves the following results on the evaluation set: - Train Loss: 0.0632 - Validation Loss: 0.2355 - Train Accuracy: 0.9295 - Epoch: 2 ## Model description More information needed ## Intended uses & limitations More information needed ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - optimizer: {'name': 'Adam', 'learning_rate': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 2e-05, 'decay_steps': 7810, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False} - training_precision: float32 ### Training results | Train Loss | Validation Loss | Train Accuracy | Epoch | |:----------:|:---------------:|:--------------:|:-----:| | 0.2518 | 0.1859 | 0.9261 | 0 | | 0.1319 | 0.1822 | 0.9318 | 1 | | 0.0632 | 0.2355 | 0.9295 | 2 | ### Framework versions - Transformers 4.22.2 - TensorFlow 2.8.2 - Datasets 2.5.1 - Tokenizers 0.12.1
[ -0.653207540512085, -0.6629088521003723, 0.3538954257965088, 0.04642539471387863, -0.4574810266494751, -0.37136101722717285, -0.07211855798959732, -0.26386788487434387, 0.10349723696708679, 0.11237630993127823, -0.6442773342132568, -0.7300797700881958, -0.8262220621109009, -0.26341530680656433, -0.23041808605194092, 1.284004807472229, 0.2694701850414276, 0.3913343548774719, -0.10975242406129837, -0.1365237534046173, -0.6201009750366211, -0.7239880561828613, -0.8750012516975403, -0.7315763831138611, 0.4329531192779541, 0.19840575754642487, 1.0059247016906738, 1.0962512493133545, 0.6366254091262817, 0.25447598099708557, -0.6407021880149841, -0.08374343067407608, -0.5591662526130676, -0.5391077399253845, -0.04479072242975235, -0.5289454460144043, -0.8015900254249573, -0.20890860259532928, 0.7355634570121765, 0.5618888139724731, -0.2565872073173523, 0.4869055151939392, 0.0300200954079628, 0.36627933382987976, -0.5297996401786804, 0.24304960668087006, -0.6770660281181335, 0.32011428475379944, -0.26617753505706787, -0.1655595302581787, -0.10784050077199936, -0.1031332015991211, 0.10206390172243118, -0.6046215891838074, 0.49674317240715027, -0.015487372875213623, 1.4305305480957031, 0.4186597466468811, -0.2621552348136902, -0.12110556662082672, -0.7020716071128845, 0.6005574464797974, -0.9728893637657166, 0.2024448961019516, 0.444029301404953, 0.45695430040359497, -0.1890469789505005, -0.8452878594398499, -0.6424648761749268, -0.08857936412096024, -0.0037629485595971346, 0.13415870070457458, -0.5526914596557617, 0.03378301113843918, 0.5726432800292969, 0.7025204300880432, -0.32900169491767883, 0.38184884190559387, -0.6203226447105408, -0.3873680531978607, 0.5480196475982666, 0.5168737173080444, -0.23159272968769073, -0.1762678027153015, -0.36217355728149414, -0.3220018744468689, -0.24011364579200745, 0.30374449491500854, 0.9273070096969604, 0.3270338177680969, -0.26435860991477966, 0.5351612567901611, -0.2504916191101074, 0.7529869079589844, 0.25211483240127563, -0.1833871304988861, 0.6711106896400452, 0.07895658165216446, -0.4433792531490326, 0.17580059170722961, 0.8833802342414856, 0.6472668647766113, 0.02882702648639679, 0.10016606003046036, -0.2520182132720947, -0.09835542738437653, 0.33143606781959534, -1.0100477933883667, -0.4245832860469818, 0.20211201906204224, -0.6315181851387024, -0.8538156747817993, 0.015296767465770245, -0.6122056841850281, 0.08751892298460007, -0.3979489803314209, 0.7573554515838623, -0.43212971091270447, -0.22843171656131744, 0.1635010540485382, -0.0015263886889442801, 0.12243563681840897, 0.037740740925073624, -0.8190276026725769, 0.39793726801872253, 0.5743283629417419, 0.5858261585235596, 0.24703750014305115, -0.32592204213142395, -0.09434196352958679, -0.2592240571975708, -0.35920771956443787, 0.47889167070388794, -0.2882004380226135, -0.4279088079929352, -0.3434639573097229, 0.3188696801662445, 0.06241125985980034, -0.3819899260997772, 1.1179789304733276, -0.4573768973350525, 0.32590699195861816, -0.3115507662296295, -0.6702794432640076, -0.5208569169044495, 0.3585299253463745, -0.7324881553649902, 1.1851606369018555, -0.10807795822620392, -0.8047423958778381, 0.6063171029090881, -0.4486098885536194, -0.21649545431137085, -0.006904326379299164, -0.04215863347053528, -1.0792295932769775, 0.1558593064546585, -0.024722134694457054, 0.6617487668991089, -0.18625564873218536, 0.19346725940704346, -0.4917300343513489, -0.4938308000564575, -0.1400027573108673, -0.5406633615493774, 0.743514358997345, 0.3663821220397949, -0.5580105781555176, -0.05178902670741081, -1.503485083580017, 0.29465407133102417, 0.4246009588241577, -0.3533303737640381, -0.11625155806541443, -0.4282216727733612, 0.22574548423290253, 0.15653985738754272, 0.4638453423976898, -0.5953534841537476, 0.11405463516712189, -0.30223649740219116, 0.4206778407096863, 0.7914415001869202, 0.11375363171100616, 0.016847670078277588, -0.3136657476425171, 0.3589533865451813, 0.27217772603034973, 0.2275373488664627, 0.025233663618564606, -0.5373281836509705, -0.9480282068252563, -0.15212850272655487, 0.5084317922592163, 0.24111780524253845, 0.009783174842596054, 1.0285825729370117, 0.09659920632839203, -0.9564105272293091, -0.42699021100997925, -0.024661289528012276, 0.41951990127563477, 0.9464116096496582, 0.35451599955558777, -0.11928581446409225, -0.5486136674880981, -1.2814534902572632, 0.29077062010765076, -0.05164602771401405, 0.3986196517944336, 0.2641690671443939, 0.6292867064476013, -0.20097117125988007, 0.7319011688232422, -0.5811383724212646, -0.16720260679721832, 0.027866080403327942, -0.033212099224328995, 0.6936432123184204, 0.7152678370475769, 0.6936201453208923, -0.6333617568016052, -0.21303702890872955, -0.09978826344013214, -0.7019612193107605, 0.30318522453308105, -0.01227098610252142, -0.3474196195602417, -0.26151394844055176, 0.2415810227394104, -0.583777129650116, 0.5618755221366882, 0.19235911965370178, -0.41553398966789246, 0.6811432838439941, -0.7115083336830139, -0.12050595879554749, -1.3099260330200195, 0.4920584559440613, 0.1417762041091919, -0.10464458912611008, -0.4174554646015167, 0.15780077874660492, 0.17833368480205536, -0.023284101858735085, -0.3405910134315491, 0.43029916286468506, -0.07701842486858368, 0.17613816261291504, -0.16367441415786743, -0.6138043403625488, 0.07617887854576111, 0.8441810607910156, 0.169417604804039, 0.19291172921657562, 0.7717443108558655, -0.6220811009407043, 0.5112220644950867, 0.42768728733062744, -0.41598445177078247, 0.5750270485877991, -1.0350266695022583, 0.1467924565076828, -0.2351524829864502, -0.07264603674411774, -0.9365739822387695, -0.36159753799438477, 0.42058029770851135, -0.3736616373062134, 0.23444393277168274, -0.3711693286895752, -0.36579805612564087, -0.590542197227478, 0.016489993780851364, 0.25096893310546875, 0.6774829030036926, -0.6160241365432739, 0.212716206908226, 0.01265129167586565, 0.251837819814682, -0.7365646362304688, -0.8327802419662476, -0.2987860143184662, -0.3141101002693176, -0.21482986211776733, 0.4514850080013275, -0.1815287470817566, 0.12209304422140121, 0.2538675367832184, -0.009070650674402714, -0.21239003539085388, 0.03058302402496338, 0.546901285648346, 0.5331050157546997, -0.1824485957622528, -0.03651590272784233, 0.10155496001243591, -0.24797600507736206, 0.18166622519493103, 0.11168116331100464, 0.7783725261688232, -0.35064220428466797, -0.4122313857078552, -0.9047536849975586, -0.21362711489200592, 0.7421199083328247, -0.04219141975045204, 0.7409799098968506, 0.7257740497589111, -0.7004059553146362, 0.10584210604429245, -0.4290705919265747, 0.035378921777009964, -0.4771690368652344, 0.7019981145858765, -0.657169759273529, -0.2732415199279785, 0.9197535514831543, 0.34791916608810425, 0.21342311799526215, 1.1417360305786133, 0.645604133605957, -0.03205364570021629, 1.348746657371521, 0.3148394525051117, -0.16591325402259827, 0.01918037049472332, -0.7749474048614502, -0.10882395505905151, -0.68608158826828, -0.7584235072135925, -0.4555366337299347, -0.5675463080406189, -0.6203645467758179, 0.22801920771598816, 0.17772474884986877, 0.4686146676540375, -0.5390392541885376, 0.4518805146217346, -0.775901734828949, 0.49406740069389343, 0.7616961002349854, 0.4936637282371521, 0.04168669879436493, 0.15906116366386414, -0.4268297851085663, -0.05536260828375816, -0.9409369230270386, -0.31977102160453796, 1.3597720861434937, 0.6984844207763672, 0.5314007997512817, -0.3177393972873688, 0.6881946325302124, 0.15997225046157837, -0.05878455564379692, -0.7347606420516968, 0.415200799703598, 0.10708894580602646, -0.8739912509918213, -0.07599752396345139, -0.4437122642993927, -0.8150901198387146, 0.09526412189006805, -0.37209969758987427, -0.35915738344192505, 0.25278714299201965, 0.3967485725879669, -0.7953161001205444, 0.5755800604820251, -0.3110378682613373, 1.0690395832061768, -0.2772394120693207, -0.2991768419742584, -0.2938532829284668, -0.37525418400764465, 0.09377893060445786, 0.02546697109937668, -0.15291740000247955, -0.11285047233104706, 0.26120853424072266, 0.8885871171951294, -0.784083366394043, 0.6234297156333923, -0.4166918396949768, 0.22411005198955536, 0.38938814401626587, -0.11768902838230133, 0.7078656554222107, 0.05660116672515869, -0.19255751371383667, 0.34149038791656494, -0.011495322920382023, -0.5539422631263733, -0.37130501866340637, 0.8479658365249634, -1.2095551490783691, -0.08800233155488968, -0.4352118968963623, -0.47023680806159973, -0.004166096448898315, 0.3649529218673706, 0.8840723633766174, 0.946617066860199, -0.0345822311937809, 0.24797821044921875, 0.6172265410423279, 0.14941085875034332, 0.3774658739566803, 0.28539058566093445, 0.1085541769862175, -0.6916466951370239, 0.9302305579185486, 0.029791386798024178, 0.015228928998112679, -0.10753180831670761, 0.2077600061893463, -0.47516539692878723, -0.7704476118087769, -0.5642476677894592, 0.09325491636991501, -0.9287086129188538, -0.22743719816207886, -0.4170558750629425, -0.4432361423969269, -0.276687353849411, 0.040165528655052185, -0.554194986820221, -0.4184964597225189, -0.6481807827949524, -0.35683709383010864, 0.356974333524704, 0.6708043217658997, -0.11493941396474838, 0.587952196598053, -0.5398001670837402, -0.04087207093834877, 0.2688639163970947, 0.5192716121673584, 0.39447736740112305, -0.9951384663581848, -0.26345348358154297, 0.1785447597503662, -0.3559316396713257, -0.4621887803077698, 0.39118602871894836, 0.16217628121376038, 1.018081784248352, 0.7309747934341431, -0.3172863721847534, 1.0581517219543457, -0.406790554523468, 0.6420982480049133, 0.4772516191005707, -0.4582974910736084, 0.3748299777507782, -0.1525927484035492, 0.3392844796180725, 0.70831698179245, 0.7864821553230286, -0.10044600814580917, 0.03256544470787048, -1.261878252029419, -0.8477983474731445, 0.8129610419273376, 0.381191611289978, 0.22574253380298615, -0.014602244831621647, 0.5738147497177124, 0.168037548661232, 0.30165329575538635, -0.7619606852531433, -0.7651925086975098, -0.3600274920463562, -0.22237828373908997, 0.061280183494091034, -0.38033390045166016, 0.015477952547371387, -0.6399301290512085, 1.1803348064422607, 0.30918458104133606, 0.21378932893276215, 0.09025070816278458, 0.21287696063518524, -0.1604030728340149, -0.11438695341348648, 0.5313059687614441, 0.691638171672821, -0.6888699531555176, 0.00010396865400252864, 0.34137213230133057, -0.5229128003120422, -0.031619708985090256, 0.2527628540992737, 0.07449471950531006, 0.1268119215965271, 0.2467992603778839, 1.1379491090774536, 0.12679718434810638, -0.16221845149993896, 0.33065518736839294, -0.0747104361653328, -0.4452064633369446, -0.48512765765190125, 0.2585437595844269, -0.2052934616804123, 0.2442309856414795, 0.3502843677997589, 0.6472330689430237, 0.10970696806907654, -0.24133898317813873, 0.18223580718040466, 0.2966541051864624, -0.6005208492279053, -0.4176172912120819, 1.0311362743377686, -0.039190590381622314, -0.3415197432041168, 0.664400041103363, -0.26153314113616943, -0.3883017599582672, 0.9760595560073853, 0.4435555040836334, 0.790702760219574, -0.08589061349630356, -0.09879744797945023, 0.8768858313560486, 0.07148206233978271, -0.21025925874710083, 0.3285246789455414, -0.03746126592159271, -0.7034024000167847, -0.1339421421289444, -0.8982028961181641, -0.1975470930337906, 0.852695882320404, -1.22841215133667, 0.6369346976280212, -0.7159785628318787, -0.5304965376853943, 0.5359930396080017, 0.10904974490404129, -1.0408806800842285, 0.6349055767059326, 0.39180630445480347, 1.0991624593734741, -0.9145572185516357, 0.7561659216880798, 0.6556556820869446, -0.34362083673477173, -0.8794850707054138, -0.48397931456565857, -0.3437311053276062, -1.1272305250167847, 0.6177074313163757, 0.1627175211906433, 0.3326157033443451, 0.3644137680530548, -0.4519611895084381, -0.9717414379119873, 1.1788930892944336, 0.3283309042453766, -0.7941202521324158, -0.13493099808692932, 0.37732207775115967, 0.6912240982055664, 0.004676682874560356, 0.6413434147834778, 0.2881132662296295, 0.23356732726097107, 0.29819005727767944, -0.9459261298179626, -0.11004404723644257, -0.555134117603302, 0.07481156289577484, 0.0287768691778183, -0.8775191903114319, 0.9732452630996704, 0.08758100122213364, 0.3506273329257965, 0.26300477981567383, 0.5140228867530823, 0.27456802129745483, 0.2172926813364029, 0.6090604662895203, 1.3125932216644287, 0.7210987210273743, -0.07502751052379608, 0.9823612570762634, -0.5343001484870911, 0.7099212408065796, 1.1333352327346802, 0.24418674409389496, 0.4398733377456665, 0.23365291953086853, -0.24404312670230865, 0.485030859708786, 1.0152651071548462, -0.6028589606285095, 0.7261408567428589, 0.016974469646811485, 0.06290323287248611, -0.476777583360672, 0.2808097004890442, -0.8244251012802124, 0.3782191574573517, 0.020709741860628128, -0.7491214275360107, -0.4933355748653412, -0.2725537419319153, 0.10855035483837128, -0.2877914309501648, -0.6929300427436829, 0.4236639142036438, -0.3261661231517792, -0.36368077993392944, 0.8237242698669434, 0.20308907330036163, 0.4635591506958008, -0.7613264918327332, -0.12325112521648407, 0.03965079039335251, 0.41825708746910095, -0.4146883487701416, -0.7010254859924316, 0.1461304873228073, -0.1684655249118805, -0.3376117944717407, 0.22817975282669067, 0.657372236251831, -0.1323021650314331, -0.9693611860275269, -0.05629454925656319, 0.07975631207227707, 0.364974707365036, -0.05497659742832184, -1.0199637413024902, -0.07656406611204147, 0.07271963357925415, -0.5294647812843323, 0.09777844697237015, 0.2269601672887802, 0.20612592995166779, 0.5192357301712036, 0.8339513540267944, 0.05771677941083908, 0.08535861223936081, -0.07758305221796036, 0.9783185720443726, -0.5313160419464111, -0.9038597345352173, -1.1009694337844849, 0.702617883682251, -0.22072911262512207, -1.0581815242767334, 0.7337881326675415, 1.1234039068222046, 0.8764588832855225, -0.01719803176820278, 0.643822968006134, -0.1324714869260788, 0.2922343909740448, -0.3973279297351837, 0.7822863459587097, -0.5082138776779175, -0.11097091436386108, -0.21915896236896515, -0.913561224937439, 0.08330842852592468, 0.6597894430160522, -0.23312705755233765, -0.013932578265666962, 0.15486299991607666, 0.7170721888542175, -0.30165696144104004, 0.09704854339361191, 0.3613111972808838, 0.11447025090456009, 0.033747415989637375, 0.4546692371368408, 0.5743856430053711, -0.8217552304267883, 0.5835934281349182, -0.9887094497680664, -0.1457224190235138, -0.006460765842348337, -0.8370959162712097, -1.0448472499847412, -0.537854790687561, -0.4870262145996094, -0.3771752417087555, -0.06875094771385193, 0.9437367916107178, 1.0397902727127075, -0.8873841166496277, -0.004751218948513269, -0.30945563316345215, -0.45723533630371094, -0.19131214916706085, -0.2372305542230606, 0.5797554850578308, -0.12670020759105682, -0.9280527830123901, 0.019724583253264427, -0.4673456847667694, 0.3562673330307007, -0.20668907463550568, -0.13800883293151855, 0.08734531700611115, -0.36389288306236267, 0.12872985005378723, 0.09989849478006363, -0.2851860523223877, -0.20229965448379517, -0.2044326663017273, 0.0692833736538887, 0.22882886230945587, 0.067084901034832, -0.5846318006515503, 0.5310578346252441, 0.23043927550315857, 0.3679945468902588, 0.8069357872009277, -0.12627583742141724, 0.20970092713832855, -0.6906941533088684, 0.4052981436252594, 0.21430979669094086, 0.5407049655914307, 0.007082606665790081, -0.6887692809104919, 0.3039409816265106, 0.37662044167518616, -0.5575010776519775, -1.1203069686889648, -0.32289695739746094, -0.9761272072792053, 0.12518742680549622, 0.9871239066123962, -0.015401543118059635, -0.4262694716453552, 0.47822362184524536, -0.1502588540315628, 0.3584076762199402, -0.2636846899986267, 0.7587085962295532, 0.9013025164604187, -0.1399429738521576, 0.2285657376050949, -0.44778233766555786, 0.4024328887462616, 0.3744221329689026, -0.38786497712135315, -0.35514014959335327, 0.24743501842021942, 0.6853058338165283, 0.2494186908006668, 0.07334821671247482, -0.1861632615327835, 0.4250201880931854, 0.14833973348140717, 0.3312476575374603, -0.797534167766571, -0.21884867548942566, -0.5381799936294556, 0.19658857583999634, 0.006078174337744713, -0.6514426469802856 ]
timm/vit_base_r50_s16_384.orig_in21k_ft_in1k
timm
"2023-05-06T00:43:14Z"
26,444
2
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "dataset:imagenet-21k", "arxiv:2010.11929", "license:apache-2.0", "region:us" ]
image-classification
"2022-12-23T00:27:16Z"
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k - imagenet-21k --- # Model card for vit_base_r50_s16_384.orig_in21k_ft_in1k A ResNet - Vision Transformer (ViT) hybrid image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k in JAX by paper authors, ported to PyTorch by Ross Wightman. ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 99.0 - GMACs: 61.3 - Activations (M): 81.8 - Image size: 384 x 384 - **Papers:** - An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale: https://arxiv.org/abs/2010.11929v2 - **Dataset:** ImageNet-1k - **Pretrain 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_base_r50_s16_384.orig_in21k_ft_in1k', 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_base_r50_s16_384.orig_in21k_ft_in1k', 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, 577, 768) 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{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}} } ```
[ -0.48207181692123413, -0.37926656007766724, -0.017191752791404724, 0.0761963278055191, -0.3859846591949463, -0.24362051486968994, -0.2530882656574249, -0.4899621605873108, 0.27586472034454346, 0.2975767254829407, -0.5008023381233215, -0.6059483289718628, -0.6575555205345154, -0.009543349966406822, -0.19188717007637024, 1.0707663297653198, -0.17826735973358154, -0.03820938616991043, -0.2386983036994934, -0.5567428469657898, -0.12223996967077255, -0.32787999510765076, -0.6315224170684814, -0.4922298491001129, 0.38161173462867737, 0.12354505062103271, 0.662323534488678, 0.5393452048301697, 0.6987500190734863, 0.44880399107933044, -0.16116976737976074, 0.05103687569499016, -0.2603699564933777, -0.2282044142484665, 0.26799893379211426, -0.6465898156166077, -0.4796987473964691, 0.26613694429397583, 0.7427853941917419, 0.3716551959514618, 0.0068022869527339935, 0.403644859790802, 0.08354377001523972, 0.5179443359375, -0.3062983453273773, 0.12408996373414993, -0.4374813437461853, 0.2641017436981201, -0.15199030935764313, 0.0594538114964962, -0.376755952835083, -0.3424597382545471, 0.30740299820899963, -0.5265353918075562, 0.5417845249176025, 0.003965392708778381, 1.3978136777877808, 0.15713366866111755, -0.03231481462717056, 0.14016009867191315, -0.35832077264785767, 0.7505995035171509, -0.6841477155685425, 0.4247969686985016, 0.14531347155570984, 0.1469786912202835, -0.009658673778176308, -1.0312631130218506, -0.6901747584342957, -0.20052985846996307, -0.2697595953941345, 0.0921160951256752, -0.4113922715187073, 0.13998836278915405, 0.40364229679107666, 0.49502286314964294, -0.5764836072921753, -0.017583327367901802, -0.550915539264679, -0.28587815165519714, 0.5298857688903809, 0.02207062393426895, 0.26736146211624146, -0.26650258898735046, -0.5759210586547852, -0.5395427346229553, -0.2892245352268219, 0.24176113307476044, 0.30681395530700684, 0.09429764002561569, -0.5947129130363464, 0.5690957903862, 0.11024124920368195, 0.6090366244316101, 0.1793873906135559, -0.2785341143608093, 0.6644563674926758, -0.10580936819314957, -0.37430375814437866, -0.2314848154783249, 1.189815878868103, 0.4130382835865021, 0.3177103102207184, -0.03511250764131546, -0.14074505865573883, -0.09868553280830383, -0.0070849028415977955, -1.1347532272338867, -0.3875366747379303, 0.19855956733226776, -0.6213076710700989, -0.3451687693595886, 0.3570086359977722, -0.6840126514434814, -0.1390998214483261, -0.020142773166298866, 0.7114954590797424, -0.5022568702697754, -0.41867998242378235, 0.11026198416948318, -0.1952054798603058, 0.41100895404815674, 0.19548259675502777, -0.4568987786769867, 0.20373284816741943, 0.23419597744941711, 1.1795843839645386, -0.006337626371532679, -0.48082786798477173, -0.16076485812664032, -0.43378937244415283, -0.24430878460407257, 0.5007624626159668, -0.03990902006626129, -0.2368488311767578, -0.2607673108577728, 0.3532216250896454, -0.2378857284784317, -0.6574041247367859, 0.33667030930519104, -0.21785448491573334, 0.3869781494140625, 0.10845502465963364, -0.19662247598171234, -0.4446437358856201, 0.24412070214748383, -0.4965212047100067, 1.311330795288086, 0.4098876416683197, -0.9821279048919678, 0.3983389437198639, -0.5023014545440674, -0.10643544793128967, -0.0811660960316658, 0.015280306339263916, -1.1632274389266968, -0.0003680080990307033, 0.1769469827413559, 0.6492895483970642, -0.2771143615245819, 0.03470192477107048, -0.5154262185096741, -0.23541498184204102, 0.3331485092639923, -0.14409586787223816, 0.9950332045555115, 0.07335621863603592, -0.36159834265708923, 0.31867849826812744, -0.5699914693832397, 0.11314080655574799, 0.5535341501235962, -0.26399004459381104, -0.025589335709810257, -0.6664606928825378, 0.27527251839637756, 0.268957257270813, 0.20164230465888977, -0.7198809385299683, 0.33030036091804504, -0.18612512946128845, 0.44702884554862976, 0.5740491151809692, -0.2500317394733429, 0.35788917541503906, -0.3991270959377289, 0.4519823491573334, 0.2465774118900299, 0.2474570870399475, 0.0232473723590374, -0.6193948984146118, -0.9161661267280579, -0.5449495315551758, 0.3784407377243042, 0.42546382546424866, -0.5810235738754272, 0.5553566813468933, -0.32670697569847107, -0.8112883567810059, -0.544661819934845, -0.015370175242424011, 0.5101062059402466, 0.5313923358917236, 0.43580180406570435, -0.5261659622192383, -0.5786421895027161, -0.9557565450668335, -0.08216003328561783, -0.08835643529891968, 0.021411264315247536, 0.30656546354293823, 0.7266888618469238, -0.22424247860908508, 0.8599920868873596, -0.3883400559425354, -0.2886679172515869, -0.28329169750213623, 0.11192932724952698, 0.399116575717926, 0.6722618341445923, 0.7830079197883606, -0.6888163685798645, -0.5456595420837402, -0.11861256510019302, -0.92564857006073, 0.19814786314964294, 0.039075128734111786, -0.227931410074234, 0.2866863012313843, 0.13741669058799744, -0.8015932440757751, 0.7587161660194397, 0.29273971915245056, -0.4316929578781128, 0.5699232220649719, -0.23607048392295837, 0.07522092014551163, -1.2067527770996094, 0.11636513471603394, 0.43202632665634155, -0.2678771913051605, -0.443614661693573, -0.01949109323322773, 0.1109124943614006, -0.05592545494437218, -0.4204479455947876, 0.6149353981018066, -0.5122244358062744, -0.12087999284267426, -0.05492257699370384, -0.3355509042739868, 0.01151911448687315, 0.6490057706832886, 0.059998657554388046, 0.5053719282150269, 0.7403528690338135, -0.38568493723869324, 0.5804712176322937, 0.46968212723731995, -0.24399879574775696, 0.5321828126907349, -0.7400276064872742, 0.18453621864318848, 0.03713144734501839, 0.40733957290649414, -1.0599627494812012, -0.16658170521259308, 0.31372714042663574, -0.6589579582214355, 0.5723223090171814, -0.5103950500488281, -0.523842453956604, -0.6674185991287231, -0.4106213450431824, 0.5209333300590515, 0.7007496356964111, -0.7792107462882996, 0.6705703735351562, 0.16019167006015778, 0.30629003047943115, -0.4841547906398773, -0.8695476055145264, -0.27963411808013916, -0.4509076476097107, -0.7549605369567871, 0.49955272674560547, 0.1662874072790146, 0.1549600064754486, 0.1707373857498169, -0.14118294417858124, 0.08458857983350754, -0.2728402614593506, 0.4699065089225769, 0.494425892829895, -0.26193276047706604, -0.11677692085504532, -0.4054812490940094, -0.20003104209899902, 0.0711437314748764, -0.35825812816619873, 0.6046369075775146, -0.35941168665885925, -0.06981328129768372, -0.8560804724693298, -0.18582825362682343, 0.6361379623413086, -0.2561468780040741, 0.8918520212173462, 1.0879292488098145, -0.47022879123687744, -0.01851736009120941, -0.48325732350349426, -0.3224261701107025, -0.48669326305389404, 0.507298469543457, -0.3987899124622345, -0.44572386145591736, 0.8469194173812866, 0.12639197707176208, 0.033367615193128586, 0.7406818866729736, 0.4450991749763489, -0.018900204449892044, 0.8044333457946777, 0.6089931130409241, 0.11697238683700562, 0.8143959045410156, -0.9627813100814819, -0.1188669204711914, -0.8859568238258362, -0.4492240250110626, -0.28548917174339294, -0.5535271167755127, -0.7509334087371826, -0.3785097002983093, 0.48719003796577454, -0.0003823210718110204, -0.3280433118343353, 0.6001647114753723, -0.8670872449874878, 0.09069017320871353, 0.7453258037567139, 0.567529022693634, -0.17292644083499908, 0.35647836327552795, -0.30299144983291626, -0.006740597076714039, -0.7831187844276428, -0.17180778086185455, 1.16354238986969, 0.5053858160972595, 0.7375606298446655, -0.14979229867458344, 0.6607377529144287, -0.25704002380371094, 0.3476445972919464, -0.7422500848770142, 0.6261651515960693, -0.06771159172058105, -0.49889546632766724, -0.07482355833053589, -0.46025359630584717, -1.0474351644515991, 0.22045262157917023, -0.3455637991428375, -0.8259714245796204, 0.17788706719875336, 0.18115317821502686, -0.27029985189437866, 0.7813176512718201, -0.805612325668335, 1.0055503845214844, -0.07292875647544861, -0.4305320084095001, 0.04362144321203232, -0.6689938306808472, 0.1980116069316864, 0.27564164996147156, -0.3162490129470825, 0.06310732662677765, 0.24159550666809082, 1.1778383255004883, -0.6014251708984375, 0.7890859246253967, -0.3710203170776367, 0.3258124887943268, 0.47794681787490845, -0.06044473871588707, 0.3364168703556061, -0.10830199718475342, 0.07229205220937729, 0.4005347490310669, 0.15448789298534393, -0.39940959215164185, -0.5232935547828674, 0.5185467004776001, -1.0572006702423096, -0.3411248028278351, -0.5700201392173767, -0.5715287923812866, 0.13157668709754944, 0.06550812721252441, 0.7010637521743774, 0.6253060102462769, 0.2592828571796417, 0.4099383056163788, 0.5599175095558167, -0.36933887004852295, 0.3529219627380371, -0.01949230767786503, -0.2693561613559723, -0.5555081367492676, 0.8884718418121338, 0.22477403283119202, 0.18343667685985565, 0.11574406176805496, 0.26988598704338074, -0.4422931969165802, -0.47044792771339417, -0.34613537788391113, 0.5503016114234924, -0.6212857961654663, -0.4927276372909546, -0.6004354953765869, -0.47023099660873413, -0.32688668370246887, 0.007207144983112812, -0.503192663192749, -0.28644081950187683, -0.3147798180580139, 0.06965465843677521, 0.8424544930458069, 0.5707558989524841, -0.07386969029903412, 0.474759042263031, -0.5424249768257141, 0.165448397397995, 0.16642427444458008, 0.5508769750595093, -0.13895289599895477, -1.0259044170379639, -0.233846053481102, -0.08372242748737335, -0.4662848711013794, -0.7846341729164124, 0.49883636832237244, 0.14986208081245422, 0.42934665083885193, 0.29698774218559265, -0.2136540710926056, 0.7927539348602295, -0.04824022576212883, 0.5118106603622437, 0.40049952268600464, -0.6191770434379578, 0.5194646716117859, -0.1280694156885147, 0.14775650203227997, 0.10827552527189255, 0.31621700525283813, -0.3196573853492737, -0.008704855106770992, -1.1045001745224, -0.7571174502372742, 0.8718392848968506, 0.2108440101146698, 0.002418252406641841, 0.47365814447402954, 0.6263654232025146, 0.004418181721121073, 0.03312201425433159, -0.9091208577156067, -0.3894440233707428, -0.35170549154281616, -0.3473963141441345, -0.04034435749053955, -0.03315850719809532, -0.03471297398209572, -0.745681881904602, 0.6823439002037048, -0.05282493680715561, 0.8110499978065491, 0.3725275695323944, -0.09255149215459824, -0.17139442265033722, -0.3892141282558441, 0.31012412905693054, 0.23052388429641724, -0.3634609282016754, 0.056374501436948776, 0.19851770997047424, -0.6816031336784363, 0.007985218428075314, 0.2751886248588562, -0.004177258815616369, 0.03896400332450867, 0.4814234673976898, 1.0018304586410522, -0.07640165835618973, -0.014918155036866665, 0.45835062861442566, -0.0642261654138565, -0.44999802112579346, -0.27711620926856995, 0.029558593407273293, -0.10739162564277649, 0.3710087537765503, 0.28490695357322693, 0.31352877616882324, -0.20946510136127472, -0.2589993476867676, 0.21234458684921265, 0.6276885867118835, -0.34528857469558716, -0.43876907229423523, 0.6323013305664062, -0.1971817910671234, -0.1715591549873352, 0.9073869585990906, -0.03454913944005966, -0.602514386177063, 0.9312964081764221, 0.4265543222427368, 0.9787939190864563, -0.06030707061290741, 0.047736525535583496, 0.7991102933883667, 0.19946809113025665, -0.037858035415410995, 0.1805480271577835, 0.1396298110485077, -0.8874155282974243, 0.0816870778799057, -0.6329878568649292, -0.030397862195968628, 0.37706586718559265, -0.6542881727218628, 0.3376791179180145, -0.6573494672775269, -0.46700361371040344, 0.16294775903224945, 0.2739618420600891, -0.9384791254997253, 0.2784881591796875, 0.052896179258823395, 0.8099369406700134, -0.8275188207626343, 0.7347225546836853, 0.9289764165878296, -0.6301754713058472, -1.0220935344696045, -0.1501520425081253, -0.025565732270479202, -0.868506908416748, 0.5180473327636719, 0.452399343252182, 0.0608903132379055, 0.20740388333797455, -0.7767701745033264, -0.6051642298698425, 1.383401870727539, 0.4158017039299011, -0.11848101019859314, 0.16499169170856476, -0.06783216446638107, 0.3408295512199402, -0.2899973690509796, 0.5342891812324524, 0.2559778690338135, 0.3308473527431488, 0.2654023766517639, -0.8667200207710266, 0.1857070028781891, -0.3437248170375824, 0.11818620562553406, 0.2667786478996277, -0.8689566850662231, 0.9672057032585144, -0.4306487739086151, -0.17880871891975403, 0.1975456178188324, 0.6938499212265015, 0.2757827043533325, 0.0774172693490982, 0.567063570022583, 0.9213070273399353, 0.4356605112552643, -0.39996418356895447, 0.9221971035003662, -0.04463811218738556, 0.7904130816459656, 0.4984420835971832, 0.3961890637874603, 0.5825343728065491, 0.470716655254364, -0.4897547960281372, 0.4992547631263733, 0.9826921224594116, -0.4112392067909241, 0.29149508476257324, 0.12750732898712158, -0.025312451645731926, -0.21680501103401184, 0.025280416011810303, -0.45656776428222656, 0.5125945210456848, 0.195841982960701, -0.5506086349487305, -0.16208739578723907, 0.0711013451218605, -0.03574996069073677, -0.35291311144828796, -0.1526387482881546, 0.483039528131485, 0.014069639146327972, -0.4244682192802429, 0.8094066977500916, 0.03485732153058052, 0.9374018907546997, -0.4416564106941223, 0.05289125069975853, -0.23462630808353424, 0.4166770279407501, -0.393436074256897, -0.8734992742538452, 0.21900981664657593, -0.2272154539823532, -0.03851774334907532, -0.003471412230283022, 0.6618838906288147, -0.3304109275341034, -0.5520278811454773, 0.24931113421916962, 0.293326735496521, 0.3519801199436188, -0.07085439562797546, -1.166905403137207, 0.0495961494743824, -0.0171982254832983, -0.6022112369537354, 0.2746713161468506, 0.40777531266212463, 0.06271617114543915, 0.7322232127189636, 0.641303300857544, -0.11627689749002457, 0.16454318165779114, -0.20242714881896973, 0.8631390333175659, -0.4947587549686432, -0.396436482667923, -0.806746780872345, 0.6193557977676392, 0.0075895702466368675, -0.6436057686805725, 0.6218546628952026, 0.5910887122154236, 0.9441325068473816, -0.08297663182020187, 0.4789982736110687, -0.2911824882030487, 0.04511444270610809, -0.3299798369407654, 0.6632721424102783, -0.7708725929260254, -0.18831861019134521, -0.30455899238586426, -0.8130083680152893, -0.39380383491516113, 0.9221609234809875, -0.3707534968852997, 0.4965866506099701, 0.5777109861373901, 1.0123615264892578, -0.3845924139022827, -0.28968632221221924, 0.16412529349327087, 0.19004082679748535, 0.09169503301382065, 0.42763280868530273, 0.5539682507514954, -0.7913243174552917, 0.4669565260410309, -0.6253611445426941, -0.2097843736410141, -0.18140459060668945, -0.6044204831123352, -1.0286372900009155, -0.8710346221923828, -0.6347101330757141, -0.8119686841964722, -0.2782098352909088, 0.9503635764122009, 1.0369079113006592, -0.6875087022781372, -0.16115418076515198, -0.1038169115781784, -0.04504382610321045, -0.23713108897209167, -0.25597864389419556, 0.5892016887664795, 0.03281136229634285, -0.7566146850585938, -0.4192518889904022, -0.03467968478798866, 0.43324851989746094, -0.14518700540065765, -0.2032373547554016, -0.1605415642261505, -0.3521175980567932, 0.19422073662281036, 0.37233346700668335, -0.7453626990318298, -0.17293386161327362, -0.13891351222991943, -0.08742903918027878, 0.4598335027694702, 0.4070371687412262, -0.7000139951705933, 0.38968396186828613, 0.4938242733478546, 0.3072909414768219, 0.8757787942886353, -0.19422802329063416, 0.06883515417575836, -0.7290205955505371, 0.5697795152664185, -0.02642739750444889, 0.5606206059455872, 0.44695714116096497, -0.2891556918621063, 0.5293324589729309, 0.633201003074646, -0.39304763078689575, -0.8384747505187988, -0.04337618872523308, -1.1372703313827515, 0.07614922523498535, 1.0113269090652466, -0.32758286595344543, -0.5006515383720398, 0.46828049421310425, -0.15316244959831238, 0.6395736932754517, -0.14892113208770752, 0.42355385422706604, 0.32330039143562317, -0.08042146265506744, -0.6316786408424377, -0.38571423292160034, 0.4129641354084015, 0.24249626696109772, -0.5843103528022766, -0.37933266162872314, 0.02064630389213562, 0.6823205351829529, 0.3634994626045227, 0.362903356552124, -0.20228458940982819, 0.17393986880779266, 0.05677631497383118, 0.5661559700965881, -0.30304378271102905, -0.16434550285339355, -0.33552566170692444, -0.045462075620889664, -0.13022452592849731, -0.6298564672470093 ]
ChaiML/reward_models_100_170000000_cp_498032
ChaiML
"2023-10-09T17:02:34Z"
26,409
1
transformers
[ "transformers", "pytorch", "gpt2", "text-classification", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-classification
"2023-03-27T09:54:52Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
microsoft/trocr-base-printed
microsoft
"2023-01-24T16:57:27Z"
26,361
102
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 widget: - src: https://layoutlm.blob.core.windows.net/trocr/dataset/SROIE2019Task2Crop/train/X00016469612_1.jpg example_title: Printed 1 - src: https://layoutlm.blob.core.windows.net/trocr/dataset/SROIE2019Task2Crop/train/X51005255805_7.jpg example_title: Printed 2 - src: https://layoutlm.blob.core.windows.net/trocr/dataset/SROIE2019Task2Crop/train/X51005745214_6.jpg example_title: Printed 3 --- # TrOCR (base-sized model, fine-tuned on SROIE) TrOCR model fine-tuned on the [SROIE dataset](https://rrc.cvc.uab.es/?ch=13). 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 (actually this model is meant to be used on printed text) 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-base-printed') model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-base-printed') pixel_values = processor(images=image, return_tensors="pt").pixel_values generated_ids = model.generate(pixel_values) generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0] ``` ### 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} } ```
[ -0.26820409297943115, -0.32079896330833435, 0.046839382499456406, -0.38149961829185486, -0.4318671226501465, -0.07403124868869781, 0.002971394220367074, -0.8562048077583313, 0.14499934017658234, 0.6045117378234863, -0.4207399785518646, -0.3835027813911438, -0.6173871755599976, 0.23744332790374756, -0.2590749263763428, 1.0703190565109253, -0.15382897853851318, -0.04279136285185814, 0.12411640584468842, -0.45728540420532227, -0.11098968982696533, -0.5528567433357239, -0.5130143761634827, -0.23888735473155975, 0.43064287304878235, 0.28459182381629944, 0.6533613204956055, 0.698870837688446, 0.9480406641960144, 0.37863269448280334, -0.3315751552581787, 0.17058883607387543, -0.3382256031036377, -0.37698835134506226, 0.150701642036438, -0.4384664297103882, -0.5352794528007507, 0.08748181164264679, 0.6363359093666077, 0.1761726588010788, -0.07637286186218262, 0.12038210779428482, 0.09945470839738846, 0.5168536901473999, -0.27811187505722046, -0.09249824285507202, -0.3566955626010895, 0.35971078276634216, 0.03903111070394516, -0.06337077915668488, -0.46842291951179504, -0.33244574069976807, 0.261964350938797, -0.5763698220252991, 0.6069570779800415, 0.027189286425709724, 1.314988374710083, -0.12564319372177124, -0.3087729811668396, -0.4210353195667267, -0.6976625919342041, 0.6492843627929688, -0.6282063126564026, 0.5165092945098877, -0.06669976562261581, 0.14124628901481628, 0.10122556239366531, -1.079553484916687, -0.8050106167793274, -0.412731796503067, -0.32575589418411255, 0.1015419214963913, -0.29509681463241577, 0.23017260432243347, 0.41687971353530884, 0.5010388493537903, -0.6626871228218079, -0.2698591351509094, -0.7605665922164917, -0.32841017842292786, 0.3156963884830475, -0.06438583135604858, 0.3469647765159607, -0.02696029655635357, -0.4968157708644867, -0.43771642446517944, -0.08626509457826614, -0.038655586540699005, -0.0018665152601897717, 0.05247977003455162, -0.39987078309059143, 0.698516309261322, 0.25521594285964966, 0.8192644119262695, 0.32087621092796326, -0.2837052643299103, 0.5579425096511841, -0.14400894939899445, -0.07749026268720627, -0.009941274300217628, 1.08525550365448, 0.3041097819805145, 0.3661283850669861, -0.16162768006324768, -0.27679121494293213, 0.2845000922679901, 0.1613326370716095, -0.8411613702774048, -0.041786592453718185, -0.10263916850090027, -0.5725715160369873, -0.3331211507320404, 0.18216097354888916, -0.8366794586181641, -0.159271240234375, -0.13236162066459656, 0.4249281883239746, -0.4387640953063965, 0.008995521813631058, -0.15007877349853516, -0.1894032508134842, 0.16253259778022766, 0.23405827581882477, -0.5214667916297913, 0.05112897604703903, 0.12099122256040573, 1.1505978107452393, -0.1673048883676529, -0.3496927320957184, -0.3503665626049042, -0.03651641681790352, -0.24951303005218506, 0.6786020398139954, -0.3348359167575836, -0.33884114027023315, -0.06168845668435097, 0.1764625608921051, -0.012166307307779789, -0.5086734294891357, 0.5226442217826843, -0.5001157522201538, 0.2890080511569977, 0.10280487686395645, -0.0697721540927887, -0.06972134113311768, 0.39776986837387085, -0.9075457453727722, 1.1682394742965698, 0.29957884550094604, -0.8847655653953552, 0.17481353878974915, -0.6524202227592468, -0.25939854979515076, 0.07033294439315796, 0.12675896286964417, -0.7863367795944214, 0.10325270146131516, 0.02379090152680874, 0.009355874732136726, -0.19146788120269775, -0.0054782661609351635, -0.11620117723941803, -0.3596019148826599, 0.11475735157728195, -0.19301581382751465, 0.7782490849494934, 0.3402029573917389, -0.3577949106693268, -0.03292873129248619, -0.9277340769767761, 0.15092040598392487, 0.14673297107219696, -0.3434695303440094, -0.03218725696206093, -0.25425276160240173, 0.33500587940216064, 0.38958150148391724, 0.4136715233325958, -0.5485589504241943, 0.2787380516529083, -0.3358018100261688, 0.788276195526123, 0.39700162410736084, -0.2587195932865143, 0.4972922205924988, -0.16940425336360931, 0.46468526124954224, 0.2621397078037262, 0.15502530336380005, -0.11509260535240173, -0.31386610865592957, -0.8890946507453918, -0.18924789130687714, 0.23033882677555084, 0.733812153339386, -1.0346462726593018, 0.3153843879699707, -0.3684585690498352, -0.6877341866493225, -0.33745285868644714, -0.13588333129882812, 0.5520235300064087, 0.8166518211364746, 0.3642897307872772, -0.6109307408332825, -0.44542843103408813, -0.623209536075592, -0.1417103111743927, -0.32102838158607483, 0.10149875283241272, 0.3506962060928345, 0.6640135645866394, -0.2827673554420471, 0.8364174962043762, -0.3484277129173279, -0.5902765989303589, -0.3367993235588074, 0.27040162682533264, 0.13969512283802032, 0.7088575959205627, 0.40447351336479187, -0.756083607673645, -0.49710729718208313, 0.06881255656480789, -0.748308539390564, 0.04398985952138901, -0.0379960723221302, -0.09669839590787888, 0.5189254283905029, 0.28881579637527466, -0.7028400897979736, 0.8054220080375671, 0.49277979135513306, -0.4472922086715698, 0.6167322993278503, -0.492789089679718, 0.17280112206935883, -1.1200603246688843, 0.27738437056541443, 0.09439985454082489, -0.29247063398361206, -0.8609345555305481, 0.22180387377738953, 0.20893114805221558, -0.3199654519557953, -0.42735788226127625, 0.577734112739563, -0.6838449239730835, -0.06022326275706291, -0.05672135204076767, 0.11495831608772278, 0.22436989843845367, 0.6349411010742188, 0.5279209017753601, 0.8469387292861938, 0.1937853842973709, -0.4430912435054779, 0.19192369282245636, 0.3558529019355774, -0.3272988200187683, 0.5248426795005798, -1.05971097946167, 0.4640410244464874, -0.03121841512620449, -0.01762327365577221, -0.7518402934074402, 0.21337932348251343, 0.44426143169403076, -0.47236335277557373, 0.35954487323760986, -0.058366063982248306, -0.4868020713329315, -0.7413632869720459, 0.02235444262623787, 0.5418733954429626, 0.4159398078918457, -0.560621976852417, 1.0314786434173584, 0.17792333662509918, 0.3236396610736847, -0.4955076277256012, -1.1568493843078613, -0.001612599822692573, -0.08126336336135864, -0.7537146806716919, 0.5554998517036438, -0.2220873087644577, 0.2751752436161041, -0.06574245542287827, 0.028431469574570656, -0.21358825266361237, -0.4822293817996979, 0.0616934671998024, 0.509125828742981, -0.3096652626991272, -0.19750431180000305, -0.5090779066085815, -0.16903485357761383, -0.3785892128944397, -0.274936318397522, 0.5700843334197998, -0.3667275011539459, 0.0692269429564476, -0.6110263466835022, 0.24413715302944183, 0.6433394551277161, -0.5514657497406006, 0.6301217675209045, 0.640027642250061, -0.3418959081172943, 0.10973623394966125, -0.5785964131355286, -0.17064230144023895, -0.5053263902664185, 0.4276790916919708, -0.3425871729850769, -0.7205818295478821, 0.7857595682144165, 0.407818078994751, -0.14205996692180634, 0.4267049729824066, 0.3198562562465668, 0.040507253259420395, 0.9114235043525696, 0.860288143157959, 0.1698412001132965, 0.8924708962440491, -0.5178797841072083, 0.30383580923080444, -0.8667490482330322, -0.3869973123073578, -0.4262704849243164, -0.33508387207984924, -0.6573412418365479, -0.2921331822872162, 0.3287583589553833, 0.021143224090337753, -0.24019940197467804, 0.6567610502243042, -1.1029777526855469, 0.26294997334480286, 0.700726330280304, 0.4398469924926758, 0.15002945065498352, 0.26906734704971313, -0.2343386709690094, 0.00549402367323637, -0.4930766522884369, -0.5205528140068054, 0.5418297052383423, 0.20736722648143768, 0.7996562719345093, -0.2552504241466522, 0.5144543647766113, 0.2535708248615265, 0.05346463620662689, -0.7740392684936523, 0.6182884573936462, -0.30182895064353943, -0.497531533241272, 0.06789802014827728, -0.4625074565410614, -0.8398608565330505, 0.038261644542217255, -0.34039831161499023, -0.808984637260437, 0.8207414746284485, 0.4331014156341553, -0.06219557300209999, 0.567674458026886, -0.713658332824707, 0.9765024185180664, -0.3380689024925232, -0.30304935574531555, 0.27647992968559265, -0.7661601305007935, -0.01456314604729414, 0.31779778003692627, -0.16518928110599518, 0.3667789697647095, 0.11083953827619553, 0.9674990773200989, -0.6982468366622925, 0.7499023079872131, -0.08266542851924896, 0.04453890025615692, 0.5297682881355286, -0.00943900365382433, 0.6409150958061218, -0.4904946982860565, -0.1628340631723404, 0.644521951675415, 0.1360441893339157, -0.20914039015769958, -0.312218576669693, 0.24837228655815125, -0.9434285163879395, -0.2233864814043045, -0.8440274596214294, -0.6619766354560852, 0.2446591705083847, 0.5496274828910828, 0.8172785639762878, 0.6075987219810486, -0.026611223816871643, -0.060829635709524155, 0.577830970287323, -0.09452813118696213, 0.43904682993888855, 0.3525579571723938, -0.009640326723456383, -0.7833154797554016, 0.8180821537971497, 0.19271548092365265, 0.3744327127933502, 0.5021705627441406, 0.17390215396881104, -0.19885051250457764, -0.2893529236316681, -0.3216693103313446, 0.4784538745880127, -0.6626119017601013, -0.28779762983322144, -0.4435350000858307, -0.3866807520389557, -0.39670389890670776, -0.23201008141040802, -0.24519836902618408, -0.23079989850521088, -0.724764347076416, 0.22390854358673096, 0.37813565135002136, 0.6029364466667175, -0.0025458347517997026, 0.7876075506210327, -0.8418288230895996, 0.41331857442855835, 0.07441791146993637, 0.36302030086517334, -0.06990896910429001, -0.6614621877670288, -0.20827734470367432, 0.11285953223705292, -0.3854600489139557, -0.8199988603591919, 0.8156598210334778, 0.3635999858379364, 0.2807803153991699, 0.4498065412044525, 0.028762811794877052, 0.8262209296226501, -0.5905783176422119, 0.693446695804596, 0.5318580865859985, -0.9620002508163452, 0.4451030194759369, 0.07914561778306961, 0.2809087336063385, 0.3366057276725769, 0.07966258376836777, -0.5605665445327759, -0.11425956338644028, -0.5696630477905273, -0.5662901997566223, 1.1203862428665161, 0.07787718623876572, -0.05740293860435486, 0.2524866461753845, 0.5275177359580994, -0.289794385433197, 0.18043291568756104, -1.0276298522949219, -0.2790544629096985, -0.46327319741249084, -0.5614868402481079, -0.08499633520841599, -0.41155555844306946, 0.1734521985054016, -0.23117640614509583, 0.4324153661727905, -0.05461199954152107, 0.813315212726593, 0.6373802423477173, -0.47715452313423157, -0.18164454400539398, -0.07074002921581268, 0.714043915271759, 0.44653430581092834, -0.23236121237277985, 0.20946058630943298, -0.04753351956605911, -1.0840365886688232, -0.10242550075054169, 0.10311899334192276, -0.35043787956237793, 0.13084198534488678, 0.4360184669494629, 1.116498351097107, -0.18143901228904724, -0.46002525091171265, 0.4531885087490082, -0.08060059696435928, -0.26091787219047546, -0.23893068730831146, -0.10982262343168259, -0.30703189969062805, 0.19469350576400757, 0.4938132166862488, 0.23955363035202026, -0.009183764457702637, -0.4846273362636566, 0.1312573403120041, 0.5074841976165771, -0.7444472312927246, -0.328148752450943, 0.6662641167640686, -0.12800197303295135, -0.5575662851333618, 0.7822090983390808, -0.005234485026448965, -0.9188024401664734, 0.7795499563217163, 0.716960608959198, 0.687240719795227, -0.24994152784347534, 0.17051543295383453, 0.5919562578201294, 0.5477256774902344, -0.0011457500513643026, 0.2854938209056854, -0.041291743516922, -0.8001354932785034, 0.26647719740867615, -0.5591762661933899, -0.20368213951587677, -0.016209186986088753, -0.7288530468940735, 0.46546465158462524, -0.506027102470398, -0.39932748675346375, -0.08708290755748749, 0.22092510759830475, -0.6616977453231812, 0.4451884627342224, 0.08122570812702179, 1.0344759225845337, -0.5181093811988831, 0.7609068155288696, 0.6223458647727966, -0.5207369923591614, -0.7430515289306641, -0.16200335323810577, -0.24358876049518585, -1.062098741531372, 0.6441901922225952, 0.2899174690246582, -0.11002455651760101, 0.17596670985221863, -0.6493148803710938, -0.7405773401260376, 1.1884887218475342, 0.25503966212272644, -0.6257856488227844, -0.34791234135627747, 0.3923850655555725, 0.6375170946121216, -0.47188064455986023, 0.6311085224151611, 0.21946445107460022, 0.24056369066238403, 0.47022321820259094, -0.7758985161781311, 0.049956314265728, -0.4172801375389099, 0.35112670063972473, 0.06200260668992996, -0.6772994995117188, 0.9239970445632935, -0.487261027097702, -0.287210077047348, 0.39599478244781494, 0.7361570000648499, 0.2653769254684448, 0.2581261098384857, 0.447680801153183, 0.6733730435371399, 0.6457300186157227, -0.17314596474170685, 0.8816558718681335, -0.4148307740688324, 0.5353609323501587, 0.7954435348510742, -0.02189546637237072, 0.7646642327308655, 0.4563455879688263, 0.017832757905125618, 0.6591134667396545, 0.5054357051849365, -0.4508778154850006, 0.5382145643234253, -0.24711591005325317, 0.11754314601421356, 0.03699570894241333, -0.026724817231297493, -0.3961225748062134, 0.1998664289712906, 0.15309372544288635, -0.7177197933197021, -0.009298360906541348, 0.16456614434719086, -0.19824708998203278, -0.3499401807785034, -0.4082470238208771, 0.6907715797424316, 0.031374670565128326, -0.5183992981910706, 0.7323637008666992, -0.06400145590305328, 0.8684788942337036, -0.7121373414993286, -0.03743420168757439, -0.11759288609027863, 0.5113971829414368, -0.1701560616493225, -0.7722300291061401, 0.17069092392921448, 0.004136993549764156, -0.33387795090675354, 0.14352788031101227, 0.7703269124031067, -0.5748283863067627, -0.8939140439033508, 0.32171931862831116, -0.0809917226433754, 0.17959417402744293, 0.308581680059433, -0.8101840019226074, 0.2234605848789215, 0.044222392141819, -0.24567504227161407, -0.0007479159976355731, 0.4701709449291229, 0.07171675562858582, 0.5568839311599731, 0.5363118052482605, 0.08108488470315933, 0.2645379602909088, -0.2095704972743988, 0.7229349613189697, -0.6556270122528076, -0.5648994445800781, -0.6034983396530151, 0.6175435185432434, 0.055900413542985916, -0.5195983052253723, 0.5344173908233643, 0.5341702699661255, 0.6604053378105164, -0.2861982583999634, 0.44193851947784424, -0.22911810874938965, 0.19603165984153748, -0.2530256509780884, 0.953828752040863, -0.7983061671257019, -0.15369202196598053, -0.4437865912914276, -0.7117817997932434, -0.5070251226425171, 0.9910354614257812, -0.22561155259609222, 0.30662959814071655, 0.6411144137382507, 1.1193002462387085, -0.16604124009609222, -0.2722913324832916, 0.1912156492471695, 0.26173853874206543, 0.09907934069633484, 0.5767734050750732, 0.4626685678958893, -0.925578236579895, 0.8310017585754395, -0.3956824839115143, -0.18399158120155334, -0.25471192598342896, -0.8712915778160095, -1.00760018825531, -0.6564072966575623, -0.4480563700199127, -0.6924790740013123, -0.010824772529304028, 0.5544294714927673, 0.8433123826980591, -0.9693672060966492, -0.14538335800170898, -0.2598342299461365, 0.07617977261543274, -0.2204313576221466, -0.26556581258773804, 0.4619353413581848, 0.11770599335432053, -0.7438222169876099, -0.4397220313549042, -0.12716475129127502, 0.38926753401756287, 0.12191934883594513, -0.24103444814682007, -0.17931495606899261, -0.026193544268608093, 0.4408988356590271, 0.5875805020332336, -0.6126700043678284, -0.12593825161457062, 0.16828754544258118, -0.2896285057067871, 0.5283167362213135, 0.5664281845092773, -0.705742597579956, 0.38691672682762146, 0.5650976896286011, 0.07584334909915924, 0.6208778023719788, -0.11375929415225983, 0.14228388667106628, -0.4433113932609558, 0.35148438811302185, 0.185804083943367, 0.5108649730682373, 0.3733261525630951, -0.48295024037361145, 0.3963748514652252, 0.46356481313705444, -0.5487733483314514, -0.9557307958602905, -0.09569364041090012, -1.3637845516204834, 0.13724233210086823, 0.8427796363830566, -0.14264348149299622, -0.5445504188537598, 0.33269497752189636, -0.3032822906970978, 0.46274131536483765, -0.4052378535270691, 0.46230360865592957, 0.2743980586528778, 0.12625811994075775, -0.7536569237709045, -0.031880415976047516, 0.22640188038349152, -0.16398096084594727, -0.5267252326011658, -0.14869366586208344, 0.3289380669593811, 0.3566210865974426, 0.7069525122642517, 0.4719097912311554, -0.25140348076820374, 0.20731157064437866, 0.07883211970329285, 0.6403719186782837, -0.17896340787410736, -0.24987569451332092, -0.36429598927497864, 0.06278876960277557, -0.2337363213300705, -0.2079528272151947 ]
microsoft/wavlm-base
microsoft
"2021-12-22T17:23:36Z"
26,269
3
transformers
[ "transformers", "pytorch", "wavlm", "feature-extraction", "speech", "en", "arxiv:2110.13900", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
--- language: - en datasets: tags: - speech inference: false --- # WavLM-Base [Microsoft's WavLM](https://github.com/microsoft/unilm/tree/master/wavlm) The base model pretrained on 16kHz sampled speech audio. When using the model, make sure that your speech input is also sampled at 16kHz. **Note**: This model does not have a tokenizer as it was pretrained on audio alone. In order to use this model **speech recognition**, a tokenizer should be created and the model should be fine-tuned on labeled text data. Check out [this blog](https://huggingface.co/blog/fine-tune-wav2vec2-english) for more in-detail explanation of how to fine-tune the model. The model was pre-trained on 960h of [Librispeech](https://huggingface.co/datasets/librispeech_asr). [Paper: WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing](https://arxiv.org/abs/2110.13900) Authors: Sanyuan Chen, Chengyi Wang, Zhengyang Chen, Yu Wu, Shujie Liu, Zhuo Chen, Jinyu Li, Naoyuki Kanda, Takuya Yoshioka, Xiong Xiao, Jian Wu, Long Zhou, Shuo Ren, Yanmin Qian, Yao Qian, Jian Wu, Michael Zeng, Furu Wei **Abstract** *Self-supervised learning (SSL) achieves great success in speech recognition, while limited exploration has been attempted for other speech processing tasks. As speech signal contains multi-faceted information including speaker identity, paralinguistics, spoken content, etc., learning universal representations for all speech tasks is challenging. In this paper, we propose a new pre-trained model, WavLM, to solve full-stack downstream speech tasks. WavLM is built based on the HuBERT framework, with an emphasis on both spoken content modeling and speaker identity preservation. We first equip the Transformer structure with gated relative position bias to improve its capability on recognition tasks. For better speaker discrimination, we propose an utterance mixing training strategy, where additional overlapped utterances are created unsupervisely and incorporated during model training. Lastly, we scale up the training dataset from 60k hours to 94k hours. WavLM Large achieves state-of-the-art performance on the SUPERB benchmark, and brings significant improvements for various speech processing tasks on their representative benchmarks.* The original model can be found under https://github.com/microsoft/unilm/tree/master/wavlm. # Usage This is an English pre-trained speech model that has to be fine-tuned on a downstream task like speech recognition or audio classification before it can be used in inference. The model was pre-trained in English and should therefore perform well only in English. The model has been shown to work well on the [SUPERB benchmark](https://superbbenchmark.org/). **Note**: The model was pre-trained on phonemes rather than characters. This means that one should make sure that the input text is converted to a sequence of phonemes before fine-tuning. ## Speech Recognition To fine-tune the model for speech recognition, see [the official speech recognition example](https://github.com/huggingface/transformers/tree/master/examples/pytorch/speech-recognition). ## Speech Classification To fine-tune the model for speech classification, see [the official audio classification example](https://github.com/huggingface/transformers/tree/master/examples/pytorch/audio-classification). ## Speaker Verification TODO ## Speaker Diarization TODO # Contribution The model was contributed by [cywang](https://huggingface.co/cywang) and [patrickvonplaten](https://huggingface.co/patrickvonplaten). # License The official license can be found [here](https://github.com/microsoft/UniSpeech/blob/main/LICENSE) ![design](https://raw.githubusercontent.com/patrickvonplaten/scientific_images/master/wavlm.png)
[ -0.32152214646339417, -0.62168288230896, 0.060322731733322144, 0.13178053498268127, -0.23470313847064972, -0.07367018610239029, -0.1724514365196228, -0.6210030317306519, -0.1301722526550293, 0.40222829580307007, -0.5990107655525208, -0.5407830476760864, -0.5057095885276794, -0.16701632738113403, -0.3370651304721832, 0.891453742980957, 0.3465723693370819, 0.2318388670682907, -0.07529255747795105, -0.10653513669967651, -0.43429863452911377, -0.7257335186004639, -0.5849527716636658, -0.4979557693004608, 0.26419925689697266, 0.09306278079748154, 0.21630367636680603, 0.4067865014076233, 0.11980359256267548, 0.3089885711669922, -0.32149142026901245, -0.0012051815865561366, -0.3358646631240845, -0.06352542340755463, -0.05458938702940941, -0.1555018275976181, -0.6913533806800842, 0.19887524843215942, 0.556024432182312, 0.47990405559539795, -0.3768376410007477, 0.5344207882881165, 0.2056560516357422, 0.3205210268497467, -0.34939044713974, 0.14223840832710266, -0.797986626625061, -0.06375905871391296, -0.332626074552536, -0.027928128838539124, -0.2594189941883087, 0.13217008113861084, 0.17928734421730042, -0.3522467017173767, 0.10873004049062729, 0.08676277101039886, 0.8226771354675293, 0.37094613909721375, -0.34823542833328247, -0.08682383596897125, -0.7464534640312195, 0.9363923668861389, -0.8726716637611389, 0.8354379534721375, 0.4880003333091736, 0.1759927123785019, 0.03262502700090408, -0.8545911908149719, -0.434479683637619, -0.3080095052719116, 0.2622227370738983, 0.2115492820739746, -0.45713353157043457, 0.17255787551403046, 0.37174108624458313, 0.2643536627292633, -0.7096607089042664, 0.3210088908672333, -0.5388809442520142, -0.5958648920059204, 0.7457616329193115, -0.1389251947402954, 0.09018561989068985, 0.044653020799160004, -0.34378600120544434, -0.05510324239730835, -0.41480913758277893, 0.3255733549594879, 0.17618505656719208, 0.515059769153595, -0.37105613946914673, 0.3149985671043396, -0.009275824762880802, 0.7201559543609619, -0.05239305645227432, -0.3291376531124115, 0.6911355257034302, -0.11725345253944397, -0.2944636344909668, 0.3253856599330902, 0.8471332788467407, -0.10578732192516327, 0.3763482868671417, 0.09332702308893204, -0.31663060188293457, 0.05264083296060562, 0.11912544816732407, -0.6507290601730347, -0.2992939352989197, 0.40111595392227173, -0.46800538897514343, -0.0677027702331543, -0.13490718603134155, -0.06240026280283928, 0.10522818565368652, -0.6824254393577576, 0.6080901026725769, -0.3852464258670807, -0.3942640721797943, -0.020074376836419106, 0.10578766465187073, 0.16000996530056, 0.17085446417331696, -0.6544291973114014, 0.23913748562335968, 0.5370218753814697, 0.6504024267196655, -0.21839067339897156, -0.3850717544555664, -0.7519746422767639, -0.01972326636314392, -0.0986485704779625, 0.45059511065483093, -0.12384428083896637, -0.3778586983680725, -0.18217980861663818, -0.06819714605808258, 0.14834825694561005, -0.49895352125167847, 0.5808647871017456, -0.3328247666358948, 0.21375712752342224, 0.199747696518898, -0.757982611656189, -0.024097217246890068, -0.14346982538700104, -0.3702290952205658, 1.0389626026153564, -0.09632838517427444, -0.7721607089042664, 0.12753096222877502, -0.6758608222007751, -0.5991705060005188, 0.05102160945534706, 0.12785793840885162, -0.39399901032447815, -0.06732821464538574, 0.09907986223697662, 0.440677285194397, -0.08198650181293488, 0.2043197602033615, -0.05059333145618439, -0.2764606475830078, 0.04854398965835571, -0.44908565282821655, 1.020753026008606, 0.46579504013061523, -0.24886034429073334, 0.4314782917499542, -1.0618705749511719, 0.11773402243852615, 0.05111081898212433, -0.37825635075569153, -0.03139851614832878, -0.06149844452738762, 0.4227631092071533, 0.29706963896751404, 0.34620869159698486, -0.6665060520172119, -0.18798093497753143, -0.560073971748352, 0.5409943461418152, 0.5315511226654053, -0.2643139362335205, 0.32126304507255554, -0.08203468471765518, 0.3089844584465027, -0.057880550622940063, 0.26937156915664673, -0.05627730116248131, -0.4902805685997009, -0.5705226063728333, -0.2432362586259842, 0.500115692615509, 0.7759362459182739, -0.21619068086147308, 0.8125874400138855, -0.07326766103506088, -0.47335657477378845, -0.9195834398269653, 0.15677404403686523, 0.4829273223876953, 0.63846755027771, 0.7406578660011292, -0.047685928642749786, -0.8852009773254395, -0.655180037021637, -0.08752278238534927, -0.1875745952129364, -0.2912743091583252, 0.13359856605529785, 0.20487132668495178, -0.3378831148147583, 0.9907171726226807, -0.17633889615535736, -0.47674962878227234, -0.09723920375108719, 0.058914665132761, 0.20696362853050232, 0.6873003840446472, 0.15179328620433807, -0.7828599810600281, -0.18290762603282928, -0.24102738499641418, -0.358872652053833, -0.16278932988643646, 0.3161541223526001, 0.09800579398870468, 0.21077276766300201, 0.6224702596664429, -0.45003217458724976, 0.29212048649787903, 0.6626883745193481, -0.06431636214256287, 0.5455062389373779, -0.21161127090454102, -0.3715062141418457, -1.0898547172546387, 0.07904389500617981, -0.08253729343414307, -0.47111034393310547, -0.7146723866462708, -0.3463425636291504, 0.021824311465024948, -0.27441132068634033, -0.6266953945159912, 0.4698857069015503, -0.42437273263931274, -0.04528056085109711, -0.32272884249687195, 0.10237973183393478, -0.16676561534404755, 0.45726269483566284, 0.09163916110992432, 0.6877657175064087, 0.7679317593574524, -0.6836549043655396, 0.4149795472621918, 0.25109171867370605, -0.280636727809906, 0.3272705078125, -0.861461341381073, 0.36719971895217896, -0.011049304157495499, 0.21655245125293732, -0.9778038859367371, 0.18588925898075104, -0.08384744077920914, -0.6813917756080627, 0.5313608050346375, -0.1684727668762207, -0.25349462032318115, -0.5833490490913391, 0.1278001070022583, 0.22612769901752472, 0.9240618348121643, -0.51894211769104, 0.6177601218223572, 0.6129679679870605, -0.039700958877801895, -0.4395368993282318, -0.7619838118553162, -0.1442457139492035, -0.09219948202371597, -0.5107396245002747, 0.5392366647720337, -0.23596227169036865, 0.013510624878108501, -0.30890876054763794, -0.19320787489414215, 0.0637887716293335, -0.028879230841994286, 0.3960280418395996, 0.22240303456783295, -0.2253984957933426, 0.23222903907299042, -0.26348233222961426, -0.19262470304965973, -0.04329768568277359, -0.47947999835014343, 0.6671141982078552, -0.14798006415367126, -0.2573682963848114, -0.7917928695678711, 0.2040398120880127, 0.46269920468330383, -0.6087786555290222, 0.1502285748720169, 0.9919927716255188, -0.31619206070899963, -0.12259232997894287, -0.7806882858276367, -0.08273132890462875, -0.4684664011001587, 0.5043954849243164, -0.4071541726589203, -0.9592861533164978, 0.26116371154785156, 0.14327672123908997, 0.1055489033460617, 0.4898228049278259, 0.4229368269443512, -0.28204452991485596, 0.9980349540710449, 0.4860133230686188, -0.40075233578681946, 0.5381086468696594, -0.18684668838977814, -0.004947485867887735, -0.8381407856941223, -0.2578105628490448, -0.533535897731781, -0.04258067160844803, -0.4836179316043854, -0.34525638818740845, 0.047158826142549515, 0.1315072774887085, -0.27359530329704285, 0.369960218667984, -0.6821099519729614, 0.012049462646245956, 0.6642001867294312, -0.03542138636112213, 0.059430573135614395, 0.08202867954969406, -0.16657617688179016, 0.00934452936053276, -0.5237284898757935, -0.33042460680007935, 0.8895597457885742, 0.5389876961708069, 0.6621684432029724, -0.19923214614391327, 0.7850791215896606, 0.2942347526550293, -0.07671604305505753, -0.7387852668762207, 0.3626294732093811, -0.1687438040971756, -0.42910265922546387, -0.4557875692844391, -0.3982132375240326, -1.0224343538284302, 0.293116956949234, -0.23633338510990143, -0.7223005890846252, -0.12345360219478607, 0.3514096438884735, -0.25186359882354736, 0.14941422641277313, -0.6469928026199341, 0.7334937453269958, -0.3017362952232361, 0.07095173746347427, -0.1788833737373352, -0.7759943604469299, 0.054544929414987564, 0.03253553807735443, 0.3597325384616852, -0.3038478195667267, 0.3152044415473938, 0.920910120010376, -0.3248346745967865, 0.6250403523445129, -0.5044823884963989, -0.20147797465324402, 0.27661997079849243, -0.2455846518278122, 0.37425002455711365, -0.3472866415977478, -0.05985154211521149, 0.41150492429733276, 0.293398380279541, -0.32421785593032837, -0.32214468717575073, 0.4291488826274872, -0.8915353417396545, -0.44916272163391113, -0.07251700758934021, -0.3981757164001465, -0.41382911801338196, 0.14359958469867706, 0.5150994658470154, 0.6314287185668945, -0.15634866058826447, 0.2471783310174942, 0.5786198973655701, -0.05377301946282387, 0.4135518968105316, 0.6992011070251465, -0.3614705204963684, -0.3375398814678192, 0.9176645874977112, 0.32014036178588867, 0.11408691853284836, 0.35938555002212524, 0.35246312618255615, -0.582666277885437, -0.7181429266929626, -0.16475699841976166, 0.03754816949367523, -0.4522086977958679, -0.06696738302707672, -0.7252957820892334, -0.5313056111335754, -0.7191783785820007, 0.36277806758880615, -0.5387040376663208, -0.1914810836315155, -0.5205621719360352, -0.019077880308032036, 0.32014361023902893, 0.573578417301178, -0.07781045883893967, 0.19436290860176086, -0.6685600280761719, 0.4749750792980194, 0.43112918734550476, 0.1414794623851776, 0.06192934513092041, -0.9993082880973816, -0.18577374517917633, 0.2989375591278076, -0.06643740832805634, -0.566130518913269, 0.27096980810165405, 0.26347965002059937, 0.7654648423194885, 0.2456248253583908, 0.03202226758003235, 0.6510512828826904, -0.6869832873344421, 0.8447338342666626, 0.2874735891819, -1.0695762634277344, 0.817571759223938, -0.13574767112731934, 0.5322534441947937, 0.4192352592945099, 0.22846724092960358, -0.3693355321884155, -0.2018270194530487, -0.6809560060501099, -0.758030891418457, 0.6211668252944946, 0.17599748075008392, 0.20713844895362854, 0.2810744345188141, 0.04528026282787323, -0.10742595046758652, 0.141943097114563, -0.6810833811759949, -0.48324230313301086, -0.46316197514533997, -0.23856061697006226, -0.3235646188259125, -0.29986268281936646, 0.13080155849456787, -0.7592896819114685, 0.8302789926528931, 0.18048979341983795, 0.10647381842136383, 0.2930428087711334, -0.31058964133262634, 0.2184189409017563, 0.27143728733062744, 0.6067572236061096, 0.5188820958137512, -0.31017860770225525, 0.08305726945400238, 0.35041168332099915, -0.5356189012527466, 0.07989049702882767, 0.33813712000846863, 0.11891639232635498, 0.07176035642623901, 0.3454912602901459, 1.1834551095962524, 0.2501978278160095, -0.45701831579208374, 0.47716084122657776, 0.05485573783516884, -0.349333256483078, -0.46337655186653137, 0.0733061283826828, 0.21112863719463348, 0.19727250933647156, 0.5504382252693176, -0.026804186403751373, 0.09950784593820572, -0.3996686637401581, 0.28133538365364075, 0.41106289625167847, -0.5747876167297363, -0.2482985407114029, 0.7562806010246277, 0.26475751399993896, -0.7106344699859619, 0.48679119348526, -0.14394186437129974, -0.5639284253120422, 0.24744604527950287, 0.7423210144042969, 0.7697051167488098, -0.7192357778549194, -0.127446249127388, 0.273153156042099, 0.1072663888335228, 0.1369309425354004, 0.4061008393764496, -0.4409637153148651, -0.6275364756584167, -0.3599855601787567, -0.9318827390670776, -0.17328321933746338, 0.379783570766449, -0.653083324432373, 0.1636286824941635, -0.34079980850219727, -0.31524765491485596, 0.19939681887626648, 0.07290969789028168, -0.7366809844970703, 0.39996129274368286, 0.3917299807071686, 0.8619892597198486, -0.5772545337677002, 1.195141315460205, 0.4931640028953552, -0.28357023000717163, -1.0215498208999634, -0.12676388025283813, -0.0886676236987114, -0.7566768527030945, 0.6040404438972473, 0.13779406249523163, -0.34452807903289795, 0.38034018874168396, -0.6598133444786072, -0.9322955012321472, 0.9375796914100647, 0.24541723728179932, -0.8686074614524841, -0.0022583159152418375, -0.0446338914334774, 0.48055580258369446, -0.29034626483917236, 0.0017865000991150737, 0.4068961441516876, 0.21411821246147156, 0.1588021218776703, -1.2955904006958008, -0.15894031524658203, -0.30019038915634155, -0.03269593045115471, -0.23652127385139465, -0.3863598108291626, 0.873366117477417, -0.14129506051540375, -0.12669171392917633, -0.07791898399591446, 0.7695090174674988, 0.29196393489837646, 0.20922943949699402, 0.7600119113922119, 0.39461633563041687, 1.0113111734390259, 0.04479276388883591, 0.6970041990280151, -0.2867330014705658, 0.3260766863822937, 1.3791544437408447, -0.24559982120990753, 1.1494005918502808, 0.28998491168022156, -0.5461301207542419, 0.33814072608947754, 0.47175097465515137, -0.15413270890712738, 0.4428599774837494, 0.36476612091064453, -0.06947721540927887, -0.26725080609321594, -0.07107315212488174, -0.6469651460647583, 0.7252263426780701, 0.14419008791446686, -0.12744922935962677, 0.10746915638446808, 0.37164604663848877, -0.2177913635969162, -0.253999799489975, -0.43585535883903503, 0.783088207244873, 0.32427969574928284, -0.20140387117862701, 0.7650944590568542, -0.14619213342666626, 1.0385327339172363, -0.7529943585395813, 0.20219053328037262, 0.24773143231868744, 0.04738706350326538, -0.3322444558143616, -0.516125500202179, 0.04952786862850189, -0.012145518325269222, -0.23942622542381287, -0.1998312622308731, 0.8038487434387207, -0.6332724690437317, -0.42923057079315186, 0.5588849782943726, 0.290793776512146, 0.38718727231025696, -0.3355707824230194, -0.8296055197715759, 0.21825523674488068, 0.03428753465414047, -0.15384432673454285, 0.18888059258460999, 0.07643088698387146, 0.22367897629737854, 0.4988827705383301, 0.9235201478004456, 0.2081192582845688, 0.08853103220462799, 0.5008982419967651, 0.45476043224334717, -0.5235393047332764, -0.7795385122299194, -0.6751943826675415, 0.6333187222480774, -0.017568090930581093, -0.21857529878616333, 0.7337055802345276, 0.5996508598327637, 0.8772527575492859, 0.02929236926138401, 0.6409077048301697, 0.31802287697792053, 0.8435924053192139, -0.5313636064529419, 0.813745379447937, -0.679010808467865, -0.044536322355270386, -0.3718016743659973, -0.8278056383132935, -0.12381981313228607, 0.6717993021011353, -0.03572047874331474, 0.19891944527626038, 0.27059292793273926, 0.6337465047836304, -0.027965489774942398, 0.04790659621357918, 0.6546513438224792, 0.3342839777469635, 0.18439415097236633, 0.18012051284313202, 0.789684534072876, -0.4420114755630493, 0.578524112701416, -0.20374330878257751, -0.12005911767482758, -0.07223723083734512, -0.6220014691352844, -0.8445361256599426, -0.829737663269043, -0.389961302280426, -0.32267487049102783, -0.03182445466518402, 1.1030880212783813, 1.1840730905532837, -0.886832594871521, -0.29450440406799316, 0.04024086892604828, -0.17473895847797394, -0.05005723610520363, -0.19059401750564575, 0.34383001923561096, -0.28290215134620667, -0.5320191979408264, 0.6497500538825989, 0.019010277464985847, 0.3822231590747833, -0.12472178041934967, -0.255951464176178, -0.17498093843460083, -0.0909344032406807, 0.6718069314956665, 0.32679352164268494, -0.9309433698654175, -0.047966741025447845, -0.24790968000888824, 0.007125555537641048, 0.17157146334648132, 0.5625576376914978, -0.76444411277771, 0.40728721022605896, 0.2991471290588379, 0.3756789267063141, 0.8567470908164978, 0.017600195482373238, 0.2487165778875351, -0.846179723739624, 0.2409185767173767, 0.30954355001449585, 0.4650324285030365, 0.4361878037452698, -0.12820549309253693, 0.0911470577120781, 0.15155456960201263, -0.6002424955368042, -0.8791022896766663, 0.07549136877059937, -1.1414802074432373, -0.226823627948761, 1.0283080339431763, 0.055824145674705505, -0.1048392504453659, -0.23909874260425568, -0.4850517213344574, 0.6301895976066589, -0.3420881927013397, 0.23548518121242523, 0.49671995639801025, -0.08426129817962646, -0.2084263414144516, -0.4144219160079956, 0.6079978346824646, 0.2946404814720154, -0.4988243579864502, 0.08367829769849777, 0.27386075258255005, 0.5311545729637146, 0.11528251320123672, 0.7538357973098755, 0.0547405406832695, 0.024239512160420418, -0.13849180936813354, 0.427041232585907, -0.3177814185619354, -0.18556873500347137, -0.5545799732208252, 0.057458747178316116, 0.03130703046917915, -0.5244872570037842 ]
guillaumekln/faster-whisper-tiny
guillaumekln
"2023-05-12T18:57:08Z"
26,263
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", "region:us" ]
automatic-speech-recognition
"2023-03-23T10:14:28Z"
--- 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 tiny model for CTranslate2 This repository contains the conversion of [openai/whisper-tiny](https://huggingface.co/openai/whisper-tiny) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format. This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/guillaumekln/faster-whisper). ## Example ```python from faster_whisper import WhisperModel model = WhisperModel("tiny") 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-tiny --output_dir faster-whisper-tiny \ --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-tiny).**
[ 0.05647590383887291, -0.4083617031574249, 0.3351883292198181, 0.36111313104629517, -0.4551585614681244, -0.3742273449897766, -0.4739497900009155, -0.3822830617427826, 0.09689448028802872, 0.6497912406921387, -0.5137597918510437, -0.5093623399734497, -0.5065990686416626, -0.34318119287490845, -0.33515071868896484, 0.9619906544685364, -0.06425856798887253, 0.2748538553714752, 0.37030184268951416, -0.0760180652141571, -0.42543458938598633, -0.0924379900097847, -0.8179591298103333, -0.3549892008304596, 0.19505836069583893, 0.4126519560813904, 0.6836178302764893, 0.5060753226280212, 0.4834705889225006, 0.25400298833847046, -0.3803253471851349, -0.11282359063625336, -0.20684537291526794, -0.2755783796310425, 0.2403184473514557, -0.7300553321838379, -0.7344292998313904, 0.10287860035896301, 0.7148237824440002, 0.21586228907108307, -0.26841798424720764, 0.6090160012245178, -0.1963270604610443, 0.28870484232902527, -0.46684589982032776, 0.26637616753578186, -0.5924404859542847, 0.025796301662921906, -0.19431760907173157, -0.17177344858646393, -0.5403116345405579, -0.44155415892601013, 0.41223233938217163, -0.8575618863105774, 0.22776682674884796, 0.07595406472682953, 0.8611180186271667, 0.3418607711791992, -0.5256735682487488, -0.34581729769706726, -0.9699143767356873, 0.9424616694450378, -0.7875866889953613, 0.15477482974529266, 0.24356910586357117, 0.5671967267990112, 0.25183817744255066, -1.1741288900375366, -0.300871878862381, -0.1433497816324234, 0.06642790138721466, 0.21789026260375977, -0.4322846531867981, 0.2945846915245056, 0.1715473234653473, 0.5017082691192627, -0.6715734601020813, -0.04949694499373436, -0.7226159572601318, -0.45114049315452576, 0.5039021372795105, 0.18791326880455017, 0.25804954767227173, -0.36882516741752625, -0.2611832618713379, -0.5868246555328369, -0.5313513278961182, -0.02960512787103653, 0.4506058692932129, 0.3468990623950958, -0.6810121536254883, 0.6466112732887268, 0.11251780390739441, 0.36785510182380676, 0.1165647804737091, -0.30257558822631836, 0.2980242967605591, -0.3609296381473541, -0.17386513948440552, 0.46545320749282837, 0.7531636953353882, 0.43378883600234985, 0.0440220907330513, 0.3340604901313782, -0.30716636776924133, -0.04723893851041794, 0.0714910700917244, -1.2304919958114624, -0.5992884635925293, 0.23276422917842865, -0.9886941909790039, -0.3285883069038391, -0.042477305978536606, -0.3340674936771393, 0.06666050851345062, -0.09922526031732559, 0.6980181336402893, -0.4974634349346161, -0.4738498032093048, 0.3088199496269226, -0.49271461367607117, 0.05019759759306908, 0.4933106601238251, -0.8627288341522217, 0.5052381753921509, 0.5212296843528748, 1.180193305015564, 0.17983435094356537, -0.03219393268227577, -0.3054671287536621, 0.22303150594234467, -0.09540802240371704, 0.647465705871582, 0.04922926053404808, -0.5585829019546509, -0.15060707926750183, -0.14059752225875854, -0.13844825327396393, -0.6590495705604553, 0.6499367356300354, -0.19608642160892487, 0.3450632095336914, 0.31917622685432434, -0.21841956675052643, -0.1703607439994812, -0.016270950436592102, -0.7335739731788635, 0.9822788238525391, 0.37232455611228943, -0.7673723101615906, -0.14674541354179382, -0.9010363221168518, -0.1496051698923111, -0.1687919795513153, 0.43024659156799316, -0.49231424927711487, 0.3611730635166168, -0.07176484912633896, -0.010218427516520023, -0.45694124698638916, 0.18491879105567932, -0.23591288924217224, -0.42131325602531433, 0.3596377670764923, -0.4751160144805908, 0.9184471368789673, 0.36338669061660767, 0.1472991555929184, 0.36287921667099, -0.6329697966575623, 0.08993425220251083, 0.04898432269692421, -0.36009225249290466, -0.32088911533355713, -0.23578280210494995, 0.5756884813308716, 0.016672853380441666, 0.3217015564441681, -0.5744022130966187, 0.3341699540615082, -0.594948410987854, 0.8918907642364502, 0.4469759166240692, 0.012054693885147572, 0.5596140027046204, -0.4727059006690979, 0.09616470336914062, 0.2014678418636322, 0.45931294560432434, 0.1219930648803711, -0.5597427487373352, -0.8042859435081482, -0.15105000138282776, 0.5857633352279663, 0.3646739423274994, -0.6122215390205383, 0.20354542136192322, -0.3622422516345978, -0.930609941482544, -1.0222233533859253, -0.3850770890712738, 0.23272705078125, 0.22454534471035004, 0.5235562920570374, -0.045820873230695724, -0.737540602684021, -0.861580491065979, -0.07401309162378311, -0.46577736735343933, -0.2994810938835144, 0.23614414036273956, 0.6506819725036621, -0.16929852962493896, 0.7181537747383118, -0.7076361775398254, -0.5902157425880432, -0.23625914752483368, 0.4157885015010834, 0.20652931928634644, 0.8883030414581299, 0.6656799912452698, -0.7773255705833435, -0.2638564109802246, -0.1824890375137329, -0.21273955702781677, 0.052811264991760254, -0.10667932778596878, 0.023115981370210648, -0.07519307732582092, 0.04371947422623634, -0.7603261470794678, 0.4456465542316437, 0.7153920531272888, -0.36598366498947144, 0.5576366782188416, -0.03690798208117485, -0.08557013422250748, -1.2499784231185913, 0.1783485859632492, -0.02590264566242695, -0.21228884160518646, -0.5949134230613708, -0.016021111980080605, 0.25665390491485596, 0.0573517382144928, -0.8203073143959045, 0.7384853959083557, -0.12526866793632507, -0.08453579246997833, -0.16991548240184784, -0.1522815078496933, -0.09052915126085281, 0.2689697742462158, 0.3591592311859131, 0.8083900213241577, 0.3127542734146118, -0.3861914277076721, 0.15640686452388763, 0.6265178322792053, -0.22581353783607483, 0.12324760109186172, -1.0573616027832031, 0.16031812131404877, 0.3354426324367523, 0.36736154556274414, -0.5997084379196167, -0.09080630540847778, 0.29288139939308167, -0.7273919582366943, 0.20149880647659302, -0.7168325185775757, -0.6559870839118958, -0.3039942681789398, -0.5810314416885376, 0.5689703822135925, 0.6925594806671143, -0.44724828004837036, 0.6388115286827087, 0.23074007034301758, 0.05815904960036278, 0.14016833901405334, -1.1329748630523682, -0.1590140163898468, -0.20721015334129333, -0.7807347178459167, 0.6841425895690918, -0.29306674003601074, -0.1591099053621292, -0.05510080233216286, -0.06839527934789658, -0.34909194707870483, -0.15794192254543304, 0.4157783091068268, 0.36299601197242737, -0.48540979623794556, -0.17264415323734283, 0.4615858197212219, -0.4231502413749695, 0.04655088111758232, -0.5653509497642517, 0.6668184399604797, -0.24444521963596344, 0.04420741647481918, -0.7806445956230164, 0.04486636072397232, 0.5195735096931458, -0.1907339245080948, 0.45511484146118164, 0.8431618809700012, -0.41128531098365784, -0.1808183342218399, -0.36364948749542236, -0.35915619134902954, -0.49789783358573914, 0.1495814323425293, -0.36250510811805725, -0.8548940420150757, 0.46150660514831543, 0.05632106959819794, -0.11884678155183792, 0.8284944891929626, 0.5788701176643372, -0.02200629748404026, 1.1602848768234253, 0.5309420824050903, 0.3326805830001831, 0.501883864402771, -0.767432689666748, -0.19523192942142487, -1.2043319940567017, -0.23917561769485474, -0.7189318537712097, -0.2416360080242157, -0.37534770369529724, -0.35785233974456787, 0.5731507539749146, 0.24038884043693542, -0.4150920510292053, 0.6363444328308105, -0.7498425841331482, 0.019404646009206772, 0.5354565382003784, 0.19558915495872498, 0.33797040581703186, -0.05992523208260536, 0.1952098160982132, -0.22263291478157043, -0.5052858591079712, -0.45219194889068604, 1.1092478036880493, 0.5882736444473267, 0.7858715057373047, 0.36082759499549866, 0.6879754662513733, 0.19624453783035278, 0.1294727921485901, -0.9625913500785828, 0.2842539846897125, -0.2787114977836609, -0.5731334686279297, -0.052819885313510895, -0.3276025950908661, -0.6664015054702759, 0.0677742138504982, -0.014100460335612297, -0.705466628074646, 0.09675274044275284, 0.15932665765285492, -0.3378843367099762, 0.386915922164917, -0.6115201115608215, 0.8990877270698547, 0.15742795169353485, 0.3417207896709442, -0.23688532412052155, -0.44414761662483215, 0.5795450806617737, 0.09520929306745529, -0.29691073298454285, 0.05443819612264633, -0.1480492502450943, 1.1364156007766724, -0.792577862739563, 0.8359137177467346, -0.38781654834747314, -0.06888247281312943, 0.7026780247688293, 0.22381308674812317, 0.4078138768672943, 0.23899948596954346, -0.1409817337989807, 0.48891258239746094, 0.5156831741333008, -0.015317227691411972, -0.35409554839134216, 0.5757983326911926, -1.2638760805130005, -0.05074925348162651, -0.23288539052009583, -0.5443008542060852, 0.4143124520778656, 0.18700569868087769, 0.5425153970718384, 0.5838167667388916, -0.048774030059576035, 0.17725226283073425, 0.6579332947731018, 0.17594589293003082, 0.4773206412792206, 0.6628922820091248, -0.11839687079191208, -0.7343761324882507, 0.8504396080970764, 0.2049855887889862, 0.3041898012161255, 0.45821908116340637, 0.48476642370224, -0.4844166338443756, -0.9672353267669678, -0.4705145061016083, 0.13996414840221405, -0.5431902408599854, -0.46354711055755615, -0.6221122741699219, -0.47046613693237305, -0.5376319885253906, 0.18794816732406616, -0.7531320452690125, -0.8686294555664062, -0.6536890864372253, 0.39062708616256714, 0.6623634099960327, 0.4966447949409485, -0.11597704142332077, 0.7996832132339478, -1.123136043548584, 0.3023762106895447, 0.08067014813423157, 0.039924256503582, 0.1712598353624344, -1.0278797149658203, -0.1700710952281952, 0.12202700227499008, -0.35770517587661743, -0.7197015285491943, 0.4664813280105591, 0.10119907557964325, 0.004548294004052877, 0.24411015212535858, 0.16924090683460236, 0.7866329550743103, -0.21810194849967957, 0.9989797472953796, 0.3449147641658783, -1.2222825288772583, 0.7669147849082947, -0.45936909317970276, 0.17059218883514404, 0.5416820645332336, -0.017132405191659927, -0.5960372686386108, -0.0297908466309309, -0.7149978876113892, -0.6851730942726135, 0.9700388312339783, 0.4461790919303894, -0.13892389833927155, 0.27572953701019287, 0.15372586250305176, 0.0841405838727951, 0.24449141323566437, -0.7494277358055115, -0.2717532515525818, -0.5426357984542847, -0.4600681960582733, 0.23854157328605652, -0.2990601062774658, -0.06986530870199203, -0.2623756527900696, 0.7181126475334167, -0.3628379702568054, 0.5128625631332397, 0.4002172350883484, -0.18554066121578217, -0.15307193994522095, 0.07467607408761978, 0.7297160029411316, -0.021149111911654472, -0.5730254650115967, -0.05460890382528305, 0.15345881879329681, -0.8242321014404297, -0.061795659363269806, 0.0347265787422657, -0.43892979621887207, 0.1659460961818695, 0.4472304582595825, 0.8025404214859009, 0.3891619145870209, -0.2630968987941742, 0.7278100252151489, -0.21879462897777557, -0.3684662878513336, -0.7610329389572144, 0.12592871487140656, 0.18290479481220245, 0.2735327184200287, 0.2746419608592987, 0.4065721929073334, 0.27918657660484314, -0.372127890586853, -0.248895525932312, 0.11730699241161346, -0.5243922472000122, -0.5666906833648682, 0.9016413688659668, 0.1506282240152359, -0.3875376284122467, 0.6233399510383606, -0.024494487792253494, -0.13073018193244934, 0.5561299920082092, 0.7217904925346375, 1.2359604835510254, -0.027189984917640686, 0.12012731283903122, 0.5359940528869629, 0.37750178575515747, -0.18919335305690765, 0.6212135553359985, -0.24092410504817963, -0.39416101574897766, -0.2918907105922699, -0.7752645015716553, -0.3744792342185974, 0.02222578041255474, -0.971167802810669, 0.3304717242717743, -0.6360396146774292, -0.262434184551239, 0.12060972303152084, 0.19470933079719543, -0.6261202096939087, 0.0014591605868190527, 0.1922702044248581, 1.5124239921569824, -0.6753332614898682, 1.3123695850372314, 0.6010035276412964, -0.4916384220123291, -1.0309432744979858, -0.180289626121521, 0.059785954654216766, -0.6776538491249084, 0.5968005061149597, 0.11789878457784653, 0.03654181957244873, 0.08755787461996078, -0.7322101593017578, -0.9070694446563721, 1.4645644426345825, 0.09987615793943405, -0.5477433204650879, -0.2306753247976303, 0.11441060900688171, 0.5013585090637207, -0.5525335073471069, 0.6562215685844421, 0.46518898010253906, 0.8280134797096252, 0.05093536898493767, -1.2616878747940063, 0.005848777946084738, -0.12264925986528397, 0.35431861877441406, 0.09153085201978683, -0.9661952257156372, 1.2494603395462036, -0.24220655858516693, -0.1310381442308426, 0.9715368151664734, 0.7055856585502625, 0.24848516285419464, 0.3840464949607849, 0.4610566794872284, 0.4312755763530731, 0.4405777156352997, -0.37525704503059387, 0.6208662390708923, -0.15273284912109375, 0.5968656539916992, 0.9924556612968445, -0.17440958321094513, 1.0394073724746704, 0.42187047004699707, -0.042482320219278336, 0.6475145816802979, 0.4872969686985016, -0.28968295454978943, 0.6384551525115967, -0.08356251567602158, 0.012903396040201187, -0.05649106577038765, -0.1121143326163292, -0.40590229630470276, 0.677182674407959, 0.45195111632347107, -0.3048386573791504, -0.07915011793375015, -0.025917941704392433, 0.011498006992042065, -0.2106381207704544, -0.5190593600273132, 0.7315137386322021, -0.0244778860360384, -0.25945937633514404, 0.621333122253418, 0.4325353801250458, 0.9257784485816956, -0.9273493885993958, -0.08198701590299606, 0.2442697137594223, 0.2513151466846466, -0.29016971588134766, -0.7318099737167358, 0.4538302421569824, -0.21599724888801575, -0.4005495607852936, -0.010362873785197735, 0.7635086178779602, -0.6027880311012268, -0.3942800760269165, 0.28703948855400085, 0.20404557883739471, 0.2928113043308258, -0.28548136353492737, -0.8033390641212463, 0.4463087320327759, 0.22025108337402344, -0.26543912291526794, 0.26251357793807983, -0.02505224570631981, 0.017066234722733498, 0.49128931760787964, 0.8253437280654907, 0.22355429828166962, 0.016117768362164497, 0.07020494341850281, 0.7058526873588562, -0.6992462277412415, -0.7334810495376587, -0.3983512818813324, 0.5604613423347473, -0.024277543649077415, -0.6895401477813721, 0.5558124780654907, 0.8383579254150391, 0.6288899779319763, -0.3507872223854065, 0.5400263667106628, -0.035742707550525665, 0.39274173974990845, -0.8227496147155762, 0.8857893943786621, -0.5004807114601135, -0.1007695123553276, -0.04020274430513382, -0.7401744723320007, 0.008523448370397091, 0.3648799657821655, -0.04772273823618889, -0.18192116916179657, 0.6892754435539246, 0.9032614827156067, -0.22058451175689697, 0.3171757459640503, 0.056315891444683075, 0.4631931781768799, 0.2784583270549774, 0.5909007787704468, 0.6411607265472412, -1.0457226037979126, 0.8147920966148376, -0.40339434146881104, 0.011566524393856525, -0.1892092376947403, -0.6009002923965454, -0.8932327032089233, -0.5274303555488586, -0.5158216953277588, -0.5729328393936157, -0.1828034222126007, 0.9470479488372803, 0.9973901510238647, -0.7017368078231812, -0.3308908939361572, 0.1303533911705017, -0.0387679859995842, -0.017096970230340958, -0.30189692974090576, 0.501733124256134, 0.3736345171928406, -0.7928338646888733, 0.5199560523033142, 0.11507142335176468, 0.545775294303894, -0.2679676413536072, -0.41092896461486816, 0.32892724871635437, 0.0024444882292300463, 0.3707324266433716, 0.1171225979924202, -0.8043836355209351, -0.28904011845588684, -0.33485865592956543, -0.05733813717961311, 0.13885290920734406, 0.7996469736099243, -0.752837061882019, 0.062107302248477936, 0.5342881679534912, -0.27719080448150635, 0.7385556697845459, -0.4297112822532654, 0.11076855659484863, -0.6863900423049927, 0.5194015502929688, 0.312907338142395, 0.39628806710243225, 0.1580222100019455, -0.0651196762919426, 0.40872374176979065, 0.2483961433172226, -0.3627329170703888, -0.985144853591919, -0.026260195299983025, -1.3963998556137085, -0.051218461245298386, 1.038390040397644, 0.09018084406852722, -0.4222477376461029, 0.3108375668525696, -0.5921156406402588, 0.3471136689186096, -0.6746293306350708, 0.22014009952545166, 0.009056363254785538, 0.3298163115978241, -0.07477565854787827, -0.40910103917121887, 0.44331759214401245, -0.06394577026367188, -0.3986889719963074, 0.017742639407515526, 0.14772695302963257, 0.5025308132171631, 0.48168444633483887, 0.5787805318832397, -0.4075976312160492, 0.4772978127002716, 0.37848228216171265, 0.3779740333557129, -0.3680500090122223, -0.453047513961792, -0.4420512318611145, 0.02966132201254368, 0.045375701040029526, -0.3972944915294647 ]
nreimers/BERT-Tiny_L-2_H-128_A-2
nreimers
"2021-05-28T11:05:21Z"
26,255
2
transformers
[ "transformers", "pytorch", "jax", "bert", "feature-extraction", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2022-03-02T23:29:05Z"
This is the BERT-Medium model from Google: https://github.com/google-research/bert#bert. A BERT model with 2 layers, 128 hidden unit size, and 2 attention heads.
[ -0.46845436096191406, -0.9398109912872314, 0.613865852355957, 0.4033637046813965, 0.048142001032829285, -0.31627240777015686, -0.08419480174779892, -0.3026658296585083, 0.5116163492202759, 0.6325992345809937, -0.9045202136039734, -0.11395115405321121, -0.43224817514419556, -0.5516559481620789, -0.5824970602989197, 1.0093287229537964, 0.516238272190094, 0.45580270886421204, 0.131371408700943, 0.04752384498715401, -0.15450389683246613, -0.051514606922864914, -0.9048367142677307, -0.6682724356651306, 1.2239913940429688, 0.5364488363265991, 0.8377389311790466, 0.3647880256175995, 0.9080899953842163, 0.1629149317741394, -0.018078185617923737, -0.3690760135650635, -0.6784244775772095, -0.5371023416519165, -0.03473144769668579, -0.19713054597377777, -0.7233461141586304, 0.14423389732837677, 0.8233380317687988, 0.7498962879180908, -0.008712357841432095, 0.6429665684700012, 0.01486583985388279, 0.7553017139434814, -0.2996426820755005, 0.14008718729019165, -0.21178272366523743, -0.037120502442121506, 0.22761468589305878, 0.38641679286956787, -0.37457096576690674, -0.059793341904878616, 0.7342389822006226, -0.4484739601612091, 0.5279489755630493, -0.1667906641960144, 0.9876660108566284, 0.318189412355423, -0.3872721195220947, -0.07839413732290268, -0.7562283277511597, 0.8244702219963074, -0.3535720407962799, 0.5456774234771729, 0.45397844910621643, 0.5469719767570496, 0.17477717995643616, -1.009316086769104, -0.1498643010854721, -0.017012979835271835, 0.1191662922501564, -0.016115421429276466, -0.17971308529376984, -0.18449021875858307, 0.19124525785446167, 0.1724325269460678, -0.7114022374153137, -0.15867403149604797, -0.6028374433517456, 0.005810198839753866, 0.5004445314407349, -0.08914660662412643, 0.1484341323375702, 0.13084521889686584, -0.6641987562179565, 0.07929014414548874, -0.490320086479187, -0.09590732306241989, 0.5390235185623169, -0.007187843322753906, -0.4008624255657196, 0.5775240659713745, 0.04243088141083717, 0.9907728433609009, 0.2333158403635025, 0.04312262311577797, 0.20425494015216827, 0.22248515486717224, -0.47896134853363037, -0.1750856190919876, 0.293937623500824, 0.24593332409858704, 0.0320066437125206, -0.40215471386909485, -0.4337642788887024, -0.2266758382320404, 0.6885440945625305, -0.8506447076797485, -0.6690826416015625, 0.03438504785299301, -0.8991522192955017, -0.34476572275161743, 0.004678974859416485, -0.4553450644016266, -0.054770611226558685, -0.1032862588763237, 0.9666780233383179, -0.5608922243118286, -0.4041554033756256, -0.09633976221084595, -0.07314281165599823, 0.5113585591316223, 0.11217046529054642, -0.7926104068756104, 0.46876218914985657, 0.4178403615951538, 0.7406471967697144, 0.21608269214630127, -0.09377259761095047, 0.13948264718055725, 0.24658724665641785, -0.5067022442817688, 0.41182494163513184, -0.7189560532569885, -0.1912013590335846, -0.2787085473537445, 0.2932509481906891, 0.14502131938934326, -0.06577693670988083, 0.8221439719200134, -0.9214933514595032, 0.47628629207611084, -0.578677237033844, -0.3397720158100128, -0.772290825843811, 0.446927934885025, -1.1330047845840454, 1.2031761407852173, 0.5370930433273315, -0.6680482625961304, 0.19042374193668365, -1.0792094469070435, -0.05101846531033516, 0.47226279973983765, 0.020627127960324287, -0.5529582500457764, 0.18242481350898743, -0.15441417694091797, 0.40121108293533325, -0.2884172201156616, 0.19335277378559113, -0.3000586926937103, -0.527222752571106, 0.10960187017917633, -0.02653500810265541, 1.0120301246643066, 0.4120202958583832, -0.12633217871189117, 0.24310964345932007, -0.9870439767837524, 0.15006598830223083, 0.39597004652023315, -0.45366477966308594, -0.1518913209438324, -0.21679052710533142, 0.35603171586990356, 0.28553932905197144, 0.8451953530311584, -0.6391503214836121, 0.002413830254226923, 0.3519408404827118, 0.705171525478363, 0.36751189827919006, -0.10616125911474228, 0.4454647898674011, -0.6050224900245667, 0.04595018923282623, -0.12196918576955795, 0.373860627412796, 0.22912323474884033, -0.8046056628227234, -0.7677851915359497, -0.4306340217590332, 0.6414077877998352, 0.17652678489685059, -0.5081207752227783, 0.6511156558990479, -0.009000166319310665, -0.7247505187988281, -0.446703165769577, 0.030602222308516502, 0.3764447867870331, 0.2739856541156769, 0.06453193724155426, -0.4098990857601166, -0.11433447897434235, -1.7243103981018066, 0.3756508231163025, -0.009661559015512466, -0.5039759874343872, 0.7725677490234375, 0.4120422899723053, -0.6038486361503601, 0.8310643434524536, -0.5310865640640259, -0.33553165197372437, -0.12668591737747192, 0.07532551139593124, 0.319759339094162, 0.6202396154403687, 0.9398806691169739, -0.63023442029953, -0.4190235435962677, -0.4909937381744385, -0.46837663650512695, 0.2600964605808258, 0.009457280859351158, -0.40251463651657104, -0.3727417290210724, -0.08327526599168777, -0.6606416702270508, -0.10940539836883545, 0.6990026235580444, -0.2712697982788086, 0.3518923223018646, -0.31759628653526306, -0.23708055913448334, -0.8663045763969421, 0.47571420669555664, 0.41060781478881836, -0.1722736805677414, -0.5902878642082214, 0.5189168453216553, 0.6226937174797058, -0.26706114411354065, -0.33107948303222656, 0.30152806639671326, -0.6723418831825256, -0.3023190200328827, 0.019937755540013313, -0.28761035203933716, -0.02850022166967392, 0.8115853071212769, -0.2112368941307068, 0.789404034614563, 0.8361415266990662, -0.42049920558929443, 0.5927072763442993, 0.12377265840768814, -0.5499358773231506, 0.18534858524799347, -1.0314499139785767, 0.718880295753479, 0.06488323956727982, 0.15608803927898407, -1.2080615758895874, -0.9003878831863403, -0.02148016169667244, -0.4076775014400482, 0.0757480040192604, 0.038997385650873184, -0.9845009446144104, -0.7043699622154236, -0.542793333530426, 0.3172740638256073, 0.44561249017715454, -0.4653627872467041, 0.4604344367980957, 0.6096323132514954, -0.4190104007720947, -0.3045620024204254, -0.9525063633918762, -0.02188674919307232, -0.023339563980698586, -0.7218379378318787, 0.43994140625, -0.31628644466400146, -0.014891775324940681, 0.39423468708992004, 0.3640405833721161, -0.7132964730262756, -0.16896726191043854, 0.13851149380207062, 0.3431912958621979, -0.43986961245536804, 0.3782881498336792, -0.13463053107261658, 0.43543437123298645, 0.4275578558444977, -0.05477851629257202, 0.7991620302200317, -0.4757823944091797, 0.3057611584663391, -0.4698973298072815, 0.43376046419143677, 0.7398481369018555, 0.26224884390830994, 0.7635605335235596, 0.9925572872161865, -0.7745522260665894, -0.03035116009414196, -0.7157794237136841, -0.39482057094573975, -0.4809728264808655, 0.23763753473758698, -0.4392959177494049, -0.3904274106025696, 0.765552818775177, 0.3481225371360779, -0.14033685624599457, 0.600398063659668, 0.8146622180938721, 0.00720243202522397, 1.324863314628601, 0.7184078097343445, -0.2596369683742523, 0.6894652247428894, -0.5173786878585815, -0.07826249301433563, -0.9723297953605652, -0.4848105311393738, -0.034503739327192307, -0.6858253479003906, -0.2526959776878357, -0.33817997574806213, 0.2458881288766861, -0.16733577847480774, -0.9466382265090942, 0.40736621618270874, -0.6086457967758179, 0.6485584378242493, 1.3489129543304443, 0.8979833126068115, -0.36355969309806824, -0.08413199335336685, -0.04927000775933266, 0.19204482436180115, -0.5129410028457642, -0.5354273319244385, 1.042656421661377, 0.8397995829582214, 0.8633984327316284, 0.37498292326927185, 0.19583353400230408, 0.3995037376880646, -0.1610700786113739, -0.640912652015686, 0.5214421153068542, -0.05957861244678497, -1.6860742568969727, -0.5222930908203125, -0.2373019903898239, -0.9169038534164429, 0.08314244449138641, -0.2562902867794037, -0.4248945713043213, -0.03678559884428978, -0.19578716158866882, -0.5773565769195557, 0.13580679893493652, -1.0726717710494995, 0.6912248730659485, -0.1331799477338791, -0.13570551574230194, -0.1620321422815323, -0.8614329695701599, 0.5550588965415955, -0.016221284866333008, -0.3553692400455475, -0.05395621433854103, 0.17480310797691345, 1.1296436786651611, 0.118658147752285, 0.8283853530883789, -0.23135332763195038, -0.1450546830892563, 0.5424680113792419, 0.02689678594470024, 0.5041893124580383, 0.2979344129562378, 0.34182479977607727, -0.10219201445579529, -0.41435161232948303, -0.7505235075950623, 0.05666517838835716, 1.036575436592102, -1.2227423191070557, -0.11552859097719193, 0.020245160907506943, -1.0507123470306396, -0.16303637623786926, 0.5526344776153564, 0.26280176639556885, 0.5294280052185059, -0.05920340493321419, 0.8000910878181458, 0.968085527420044, -0.19083310663700104, 0.5484336018562317, 0.4308273196220398, -0.0611337311565876, -0.010296613909304142, 1.0354386568069458, 0.14664562046527863, -0.050720442086458206, 0.18934164941310883, 0.10962739586830139, -0.2751657962799072, -0.2846326529979706, -0.2581867575645447, 0.49610191583633423, -0.34210899472236633, 0.11578887701034546, -0.5646752119064331, -0.7763769030570984, -0.50350421667099, -0.03214292973279953, -0.4597938656806946, -0.56144118309021, -0.6296445727348328, 0.07170485705137253, 0.152941033244133, 0.9972285628318787, -0.03645612671971321, 0.8114352822303772, -0.482030987739563, 0.35824868083000183, 1.0869896411895752, 0.9123877882957458, -0.06338489055633545, -0.5513893365859985, -0.22111859917640686, -0.13705986738204956, -0.6405748128890991, -0.5781120657920837, 0.6036258339881897, -0.05699419602751732, 0.8363035321235657, 0.7380030155181885, -0.3807086646556854, 0.1434938758611679, -0.7276292443275452, 0.8448625206947327, 0.7254661321640015, -0.5868750810623169, 0.3403618633747101, -0.725533664226532, 0.21195204555988312, 0.07312165200710297, 0.36384135484695435, -0.09935344755649567, -0.1400367021560669, -1.1931425333023071, -0.7376191020011902, 0.6628161072731018, 0.2776162028312683, 0.12310025840997696, 0.3188551664352417, 0.05443219467997551, 0.19423896074295044, 0.23767498135566711, -0.9617459774017334, -0.447941392660141, -0.1750432550907135, -0.20486584305763245, 0.06865207105875015, -0.8815854787826538, -0.48365896940231323, -0.004493534564971924, 0.4688614010810852, 0.18648792803287506, 0.8417600393295288, 0.0350508876144886, -0.20705090463161469, -0.10176581889390945, -0.24225780367851257, 0.8043107390403748, 0.7103441953659058, -0.9245955348014832, 0.3211260437965393, -0.09322914481163025, -0.6066725850105286, -0.3169589638710022, -0.09160446375608444, -0.08195606619119644, 0.07551175355911255, 0.4437660574913025, 0.69200199842453, 0.46633821725845337, -0.1271841824054718, 0.35538652539253235, 0.05606251209974289, -0.4557105004787445, -0.55466228723526, 0.11244972795248032, 0.2600846290588379, 0.4397735595703125, 0.6059356927871704, -0.11568576842546463, 0.500033438205719, -0.44438669085502625, 0.34035882353782654, 0.34133124351501465, -0.7617049813270569, -0.5314252376556396, 0.7132157683372498, 0.45743781328201294, -0.5231733322143555, 0.5583022236824036, -0.24053362011909485, -0.36801841855049133, 0.7363182306289673, 0.5665310621261597, 0.6757098436355591, -0.07330570369958878, 0.4703167974948883, 0.3659692406654358, 0.4292422831058502, -0.11257965117692947, 0.5389963984489441, 0.27114999294281006, -0.5511652231216431, -0.0863937959074974, -0.26292169094085693, -0.675615668296814, 0.8283815383911133, -1.0329586267471313, 0.05131063237786293, -0.7327224016189575, -0.4722631871700287, 0.473908931016922, 0.47348111867904663, -0.9909486174583435, 0.4398215711116791, 0.37218573689460754, 1.1418805122375488, -0.5359750986099243, 1.2527607679367065, 0.8376893997192383, -0.10262184590101242, -0.6428585648536682, -0.3363373279571533, -0.11566513031721115, -1.2666985988616943, 0.6324191689491272, 0.1414470225572586, 0.04170454666018486, 0.029199017211794853, -1.0086952447891235, -1.240017294883728, 1.1964523792266846, 0.4268377125263214, -0.6650097370147705, -0.20753170549869537, -0.5788413286209106, 0.4265018701553345, -0.4927263557910919, 0.036455970257520676, 0.46227210760116577, 0.29159489274024963, 0.0685577467083931, -0.6681229472160339, -0.2577159106731415, -0.31112009286880493, 0.16084708273410797, -0.06819698959589005, -1.0110535621643066, 1.5654778480529785, -0.19401192665100098, 0.14126546680927277, 0.16338136792182922, 0.29689767956733704, 0.2543985843658447, 0.006094537675380707, 0.7308544516563416, 0.7239482402801514, 0.387981116771698, -0.04008400812745094, 0.9565130472183228, -0.2845020890235901, 1.0355942249298096, 0.9742234945297241, -0.06415512412786484, 0.5046807527542114, 0.29596084356307983, -0.0010983285028487444, 0.42963388562202454, 0.9014949202537537, -0.33901289105415344, 1.035789132118225, -0.03477546572685242, -0.10099132359027863, 0.08502870798110962, 0.08970792591571808, -0.6450636386871338, 0.1059032529592514, 0.5798274278640747, -0.7307156324386597, -0.18965329229831696, -0.4727807641029358, -0.36326101422309875, -0.6211079359054565, -0.5813724994659424, 0.5433262586593628, -0.2795383334159851, -0.18460458517074585, 0.19086799025535583, -0.010143780149519444, 0.309593141078949, -0.39785662293434143, 0.021614132449030876, 0.06171064078807831, 0.23770657181739807, 0.2806962728500366, -1.2350445985794067, -0.21741756796836853, -0.19771422445774078, -0.5457599759101868, 0.06780242174863815, 0.8397325277328491, -0.42853644490242004, -0.9938651323318481, 0.5724605321884155, 0.1991729736328125, 0.3055911958217621, -0.0662197694182396, -1.1062123775482178, -0.09189042448997498, -0.25103792548179626, -0.547758162021637, 0.18803714215755463, 0.5891548991203308, 0.25766709446907043, 0.5915854573249817, 0.20403705537319183, 0.08768367022275925, 0.3834051489830017, 0.2783861756324768, 0.8515592813491821, -0.8236595988273621, -0.7197663187980652, -0.2353568822145462, 0.12916672229766846, -0.4618598520755768, -0.45270097255706787, 0.49323397874832153, 0.6850956678390503, 0.5244568586349487, -0.5915690064430237, 0.5972420573234558, -0.02248988300561905, 0.7238937616348267, -0.13746826350688934, 0.729948878288269, -0.5727474093437195, -0.26642394065856934, -0.1160774827003479, -1.267069935798645, -0.25253361463546753, 0.9143692851066589, 0.14589670300483704, 0.044564638286828995, 0.5458876490592957, 0.4915703237056732, -0.21174323558807373, -0.16781887412071228, 0.6015000343322754, 0.30045777559280396, 0.10451453924179077, 0.7257435321807861, 0.5522353053092957, -0.1640239804983139, 0.29753515124320984, -0.5326873660087585, -0.40698501467704773, -0.6478402018547058, -0.41058290004730225, -1.0476171970367432, -0.6355805397033691, -0.05485977977514267, -0.053334519267082214, -0.18020157516002655, 0.4845125377178192, 1.4144381284713745, -0.7770814895629883, -0.10130206495523453, 0.043634820729494095, -0.11979714781045914, 0.015553091652691364, -0.20516273379325867, 0.36866626143455505, -0.17432309687137604, -0.7874206304550171, 0.13849572837352753, 0.09256026893854141, 0.1394239068031311, -0.4981467127799988, 0.041330814361572266, -0.3111949861049652, 0.1974434107542038, 0.8229385614395142, -0.1871577799320221, -0.8938103318214417, -0.800351083278656, -0.08991769701242447, -0.45604148507118225, -0.4156765639781952, 0.5926405191421509, -0.3108385503292084, 0.03650093823671341, 0.2346254289150238, 0.5166040658950806, 0.618672251701355, -0.12160853296518326, 0.1953703761100769, -1.1973477602005005, 0.21302850544452667, 0.11727097630500793, 0.572889506816864, 0.15298044681549072, -0.5524670481681824, 0.9437997937202454, -0.05960898846387863, -0.765826940536499, -0.832478404045105, 0.021834444254636765, -1.599013328552246, -0.3817167580127716, 0.8401468396186829, -0.15554003417491913, -0.2615502178668976, 0.538972020149231, -0.2933955192565918, 0.11029457300901413, -0.5724747180938721, 1.0854536294937134, 1.1539562940597534, 0.1097702905535698, -0.579298198223114, -0.7660161852836609, -0.07420738786458969, 0.06425142288208008, -0.42287299036979675, -0.5367476940155029, 0.24955865740776062, 0.48334163427352905, 0.756908118724823, 0.11243791878223419, -0.14373061060905457, 0.35950762033462524, 0.23467673361301422, 0.22783859074115753, 0.20959791541099548, -1.1085318326950073, -0.056717757135629654, 0.31517717242240906, -0.11885418742895126, -0.8197652101516724 ]
squeezebert/squeezebert-uncased
squeezebert
"2020-12-11T22:02:17Z"
26,228
0
transformers
[ "transformers", "pytorch", "squeezebert", "arxiv:2006.11316", "arxiv:1904.00962", "endpoints_compatible", "region:us" ]
null
"2022-03-02T23:29:05Z"
language: en license: bsd datasets: - bookcorpus - wikipedia --- # SqueezeBERT pretrained model This model, `squeezebert-uncased`, is a pretrained model for the English language using a masked language modeling (MLM) and Sentence Order Prediction (SOP) objective. SqueezeBERT was introduced in [this paper](https://arxiv.org/abs/2006.11316). This model is case-insensitive. The model architecture is similar to BERT-base, but with the pointwise fully-connected layers replaced with [grouped convolutions](https://blog.yani.io/filter-group-tutorial/). The authors found that SqueezeBERT is 4.3x faster than `bert-base-uncased` on a Google Pixel 3 smartphone. ## Pretraining ### Pretraining data - [BookCorpus](https://yknzhu.wixsite.com/mbweb), a dataset consisting of thousands of unpublished books - [English Wikipedia](https://en.wikipedia.org/wiki/English_Wikipedia) ### Pretraining procedure The model is pretrained using the Masked Language Model (MLM) and Sentence Order Prediction (SOP) tasks. (Author's note: If you decide to pretrain your own model, and you prefer to train with MLM only, that should work too.) From the SqueezeBERT paper: > We pretrain SqueezeBERT from scratch (without distillation) using the [LAMB](https://arxiv.org/abs/1904.00962) optimizer, and we employ the hyperparameters recommended by the LAMB authors: a global batch size of 8192, a learning rate of 2.5e-3, and a warmup proportion of 0.28. Following the LAMB paper's recommendations, we pretrain for 56k steps with a maximum sequence length of 128 and then for 6k steps with a maximum sequence length of 512. ## Finetuning The SqueezeBERT paper results from 2 approaches to finetuning the model: - "finetuning without bells and whistles" -- after pretraining the SqueezeBERT model, finetune it on each GLUE task - "finetuning with bells and whistles" -- after pretraining the SqueezeBERT model, finetune it on a MNLI with distillation from a teacher model. Then, use the MNLI-finetuned SqueezeBERT model as a student model to finetune on each of the other GLUE tasks (e.g. RTE, MRPC, …) with distillation from a task-specific teacher model. A detailed discussion of the hyperparameters used for finetuning is provided in the appendix of the [SqueezeBERT paper](https://arxiv.org/abs/2006.11316). Note that finetuning SqueezeBERT with distillation is not yet implemented in this repo. If the author (Forrest Iandola - forrest.dnn@gmail.com) gets enough encouragement from the user community, he will add example code to Transformers for finetuning SqueezeBERT with distillation. This model, `squeezebert/squeezebert-uncased`, has been pretrained but not finetuned. For most text classification tasks, we recommend using squeezebert-mnli-headless as a starting point. ### How to finetune To try finetuning SqueezeBERT on the [MRPC](https://www.microsoft.com/en-us/download/details.aspx?id=52398) text classification task, you can run the following command: ``` ./utils/download_glue_data.py python examples/text-classification/run_glue.py \ --model_name_or_path squeezebert-base-headless \ --task_name mrpc \ --data_dir ./glue_data/MRPC \ --output_dir ./models/squeezebert_mrpc \ --overwrite_output_dir \ --do_train \ --do_eval \ --num_train_epochs 10 \ --learning_rate 3e-05 \ --per_device_train_batch_size 16 \ --save_steps 20000 ``` ## BibTeX entry and citation info ``` @article{2020_SqueezeBERT, author = {Forrest N. Iandola and Albert E. Shaw and Ravi Krishna and Kurt W. Keutzer}, title = {{SqueezeBERT}: What can computer vision teach NLP about efficient neural networks?}, journal = {arXiv:2006.11316}, year = {2020} } ```
[ -0.2251020073890686, -0.572293758392334, 0.23228254914283752, 0.23314400017261505, -0.10930302739143372, -0.2869742810726166, -0.3998892307281494, -0.0739428922533989, 0.06425324827432632, 0.49662116169929504, -0.5093955993652344, -0.3207094967365265, -0.7810834050178528, 0.023788539692759514, -0.5445303916931152, 1.2967469692230225, 0.061900097876787186, 0.1544204205274582, -0.10573852062225342, 0.07641930878162384, -0.10696377605199814, -0.6401251554489136, -0.3746817409992218, -0.3552576005458832, 0.30489811301231384, 0.43422839045524597, 0.5657640695571899, 0.5157920122146606, 0.24341927468776703, 0.38817036151885986, -0.2509315609931946, -0.05291058495640755, -0.4774487614631653, -0.08356921374797821, 0.10678564757108688, -0.6759759783744812, -0.31371837854385376, 0.4445493519306183, 0.29159438610076904, 0.6598189473152161, -0.18293249607086182, 0.18078851699829102, 0.4108245372772217, 0.6568375825881958, -0.6520845293998718, -0.12293965369462967, -0.5243611335754395, 0.05597275123000145, -0.11345431208610535, -0.15305592119693756, -0.45891448855400085, -0.32350510358810425, 0.37555187940597534, -0.4865470826625824, 0.598576009273529, -0.03944462910294533, 1.1265848875045776, 0.3227595388889313, -0.24223333597183228, -0.23932746052742004, -0.6206716895103455, 0.8440293669700623, -0.6533166170120239, 0.39119967818260193, 0.4769607186317444, 0.06932894140481949, -0.059382952749729156, -1.120207667350769, -0.5588860511779785, -0.36082831025123596, 0.028052328154444695, 0.2778996229171753, -0.023203954100608826, 0.03921737149357796, 0.4771432876586914, 0.4707406163215637, -0.6501025557518005, 0.01675044186413288, -0.6411145925521851, -0.21867097914218903, 0.5375349521636963, -0.06813134998083115, 0.03568410500884056, -0.0629013180732727, -0.7373193502426147, -0.30637326836586, -0.4034810960292816, 0.24109666049480438, 0.4302110970020294, 0.1323997676372528, -0.013710333034396172, 0.5044606328010559, 0.11876888573169708, 0.7819731831550598, 0.31638166308403015, -0.10457873344421387, 0.4548977017402649, -0.0523880198597908, -0.3730843961238861, 0.1523251235485077, 0.9289562702178955, -0.008301817812025547, 0.43143564462661743, -0.036160532385110855, -0.18162906169891357, -0.009665368124842644, 0.3585052192211151, -1.0900251865386963, -0.6251725554466248, 0.23537695407867432, -0.35622891783714294, -0.2997092008590698, -0.03836812451481819, -0.31486615538597107, -0.13060632348060608, -0.4545014202594757, 0.7628678679466248, -0.6109734773635864, 0.098744235932827, 0.2706570625305176, -0.21257036924362183, -0.10396888852119446, 0.18284639716148376, -0.8824674487113953, 0.3350185453891754, 0.3675738573074341, 0.6702849864959717, -0.15815505385398865, -0.4553336501121521, -0.4161745011806488, -0.28580567240715027, -0.17247232794761658, 0.5244888067245483, -0.12215972691774368, 0.019968129694461823, -0.04349532350897789, 0.18388251960277557, -0.25177016854286194, -0.7025448679924011, 0.6376923322677612, -0.3692226707935333, 0.4553702473640442, 0.4087541103363037, -0.8810316324234009, -0.31094521284103394, 0.15938931703567505, -0.4620233476161957, 1.0528684854507446, 0.06364960223436356, -0.7001972198486328, 0.35128942131996155, -0.2882938086986542, -0.421953409910202, -0.10091759264469147, 0.17859379947185516, -0.4589810073375702, -0.041569240391254425, 0.20408913493156433, 0.937778115272522, -0.06028025969862938, 0.379578560590744, -0.17998120188713074, -0.36362549662590027, 0.22105194628238678, -0.37220171093940735, 1.1337225437164307, 0.14978834986686707, -0.5001583099365234, 0.14380089938640594, -0.9826931953430176, 0.11045633256435394, -0.04924021288752556, -0.5627092123031616, -0.24069303274154663, -0.23144222795963287, 0.3040863573551178, 0.18447208404541016, 0.23470649123191833, -0.3121235966682434, 0.23260949552059174, -0.5703760385513306, 0.5397675037384033, 0.6502044200897217, -0.31209537386894226, 0.4191322922706604, -0.19851815700531006, 0.4329177439212799, 0.10423388332128525, 0.15024350583553314, -0.1124475821852684, -0.3459157943725586, -1.1375168561935425, -0.25341886281967163, 0.7221156358718872, 0.8151808977127075, -0.5838942527770996, 0.7212930917739868, -0.06507999449968338, -0.740411639213562, -0.39828115701675415, 0.3335707187652588, 0.42766377329826355, 0.33658236265182495, 0.5235668420791626, -0.36113354563713074, -0.4186055660247803, -0.7404353022575378, -0.15492947399616241, 0.13017159700393677, -0.1767187863588333, -0.05784909427165985, 0.4576722979545593, -0.16840966045856476, 0.6928645372390747, -0.6874552369117737, -0.5095694065093994, -0.32874056696891785, 0.26494544744491577, 0.5126619935035706, 0.6888095736503601, 0.4722885489463806, -0.8256762623786926, -0.4809613823890686, -0.4857867360115051, -0.4010913074016571, 0.13649718463420868, -0.01972944661974907, -0.07233456522226334, 0.03500267118215561, 0.6512896418571472, -0.589148998260498, 0.3831721246242523, 0.5190867781639099, -0.2097805291414261, 0.7429008483886719, -0.23221749067306519, -0.06349342316389084, -1.0891857147216797, -0.07162345945835114, 0.189716175198555, -0.31778115034103394, -0.6779813766479492, -0.19151538610458374, 0.12130516022443771, -0.23676247894763947, -0.561120867729187, 0.23382161557674408, -0.38624826073646545, 0.47156384587287903, -0.1993214637041092, 0.1367805451154709, 0.014865050092339516, 0.7336869835853577, 0.027612319216132164, 0.611200213432312, 0.6627025008201599, -0.8494540452957153, 0.21382270753383636, 0.36640554666519165, -0.5395511388778687, -0.04753037914633751, -0.8240518569946289, 0.03478413075208664, 0.05718604475259781, 0.08075539022684097, -0.8709278702735901, -0.05496041104197502, 0.1713869869709015, -0.5339197516441345, 0.6579692959785461, -0.10144200176000595, -0.47056466341018677, -0.36618685722351074, -0.17538443207740784, 0.1799045354127884, 0.6139087677001953, -0.4993036687374115, 0.44884559512138367, 0.14818210899829865, -0.049683623015880585, -0.6976195573806763, -0.59649258852005, -0.30617502331733704, -0.29562312364578247, -0.5240674614906311, 0.5736627578735352, -0.19972288608551025, 0.2906809449195862, -0.17106014490127563, -0.1339031159877777, -0.5233121514320374, 0.09998176991939545, 0.24960394203662872, 0.3432479798793793, 0.038018256425857544, 0.2727402448654175, -0.1651705801486969, -0.13658607006072998, -0.12664027512073517, -0.4135853052139282, 0.4636749029159546, -0.17385056614875793, 0.18140766024589539, -0.3716387450695038, -0.06658624112606049, 0.33289605379104614, -0.01594260334968567, 0.7658155560493469, 0.8839166164398193, -0.21496893465518951, -0.25267109274864197, -0.5606399178504944, -0.33473876118659973, -0.5035759210586548, 0.33400222659111023, -0.09257485717535019, -0.8738947510719299, 0.013476484455168247, -0.16120637953281403, 0.047101475298404694, 0.4420996606349945, 0.5405046343803406, -0.23630444705486298, 0.6992692351341248, 0.9160182476043701, -0.13306663930416107, 0.45755866169929504, -0.6406798958778381, 0.20962628722190857, -0.47900572419166565, 0.0331108383834362, -0.5059300661087036, -0.28281471133232117, -0.4838438928127289, -0.3467336595058441, 0.2468293160200119, 0.6287094354629517, -0.2727048099040985, 0.7465837597846985, -0.677711009979248, 0.23783642053604126, 0.9107915759086609, 0.17175327241420746, -0.027580706402659416, 0.007062028627842665, -0.20606566965579987, -0.01605628989636898, -0.974850594997406, -0.586337685585022, 1.1305967569351196, 0.2431962639093399, 0.7937261462211609, -0.2230769395828247, 0.7624121308326721, 0.1671794056892395, 0.14220385253429413, -0.9029515385627747, 0.5898646116256714, -0.305841326713562, -0.8377355337142944, -0.28487399220466614, -0.24431627988815308, -1.1106528043746948, 0.19603310525417328, -0.40998244285583496, -0.7549455761909485, 0.12098420411348343, 0.51304692029953, -0.43480613827705383, 0.10097130388021469, -0.982998788356781, 0.9575698971748352, -0.22613582015037537, -0.31368178129196167, 0.02099539339542389, -0.718512237071991, 0.27793270349502563, 0.026921601966023445, -0.14932218194007874, -0.004989152774214745, 0.24011988937854767, 1.0160834789276123, -0.5523924827575684, 0.8280534148216248, -0.18583998084068298, 0.18631966412067413, 0.4853183329105377, -0.1524466872215271, 0.32423728704452515, -0.34821102023124695, 0.1312626153230667, 0.19794505834579468, 0.08280264586210251, -0.24230928719043732, -0.4754917323589325, 0.4306229054927826, -0.7861767411231995, -0.5289582014083862, -0.3783681094646454, -0.4200299084186554, -0.14205020666122437, 0.14289653301239014, 0.7327877283096313, 0.4948309659957886, 0.05195317417383194, 0.26206740736961365, 0.6853548288345337, -0.1915454864501953, 0.4281466603279114, 0.215279683470726, 0.0025447956286370754, -0.15831807255744934, 0.9295415282249451, 0.3199613094329834, 0.07608972489833832, 0.3286486566066742, 0.25849759578704834, -0.3174814283847809, -0.46640512347221375, -0.3314773142337799, 0.02327367290854454, -0.47189149260520935, -0.19778798520565033, -0.7696691751480103, -0.45335903763771057, -0.5538840889930725, -0.008351683616638184, -0.3925406336784363, -0.6021168828010559, -0.6496732831001282, 0.03673263266682625, 0.29360097646713257, 0.3224022686481476, 0.11660792678594589, 0.48717933893203735, -0.9390325546264648, 0.19607539474964142, 0.30690792202949524, 0.18934288620948792, -0.05819096788764, -0.7895590662956238, -0.3362850546836853, -0.16859260201454163, -0.7476354241371155, -0.822885274887085, 0.48966705799102783, 0.34073561429977417, 0.42114636301994324, 0.5262985825538635, 0.19239574670791626, 0.597204327583313, -0.8000597953796387, 0.8036149740219116, 0.4585113525390625, -0.8929083347320557, 0.5835472941398621, -0.019368115812540054, 0.11864056438207626, 0.5602128505706787, 1.0305190086364746, -0.10912034660577774, -0.24134297668933868, -0.7785241603851318, -1.042771816253662, 0.6643165946006775, 0.3190127909183502, 0.07020274549722672, 0.2106320559978485, 0.1159425750374794, 0.23210325837135315, 0.3359113931655884, -0.9471555948257446, -0.4164583086967468, -0.17889505624771118, -0.31594595313072205, -0.45035895705223083, -0.3623504638671875, 0.01431600283831358, -0.5975175499916077, 0.9808816909790039, 0.09960515797138214, 0.30764341354370117, 0.3193995952606201, -0.37416431307792664, 0.4107185900211334, 0.3812471628189087, 0.4339827597141266, 0.4682217240333557, -0.2364623248577118, -0.017333758994936943, 0.07693874835968018, -0.7430955171585083, 0.28523579239845276, 0.5016787648200989, -0.1197737604379654, 0.07590053975582123, 0.30990153551101685, 0.8850921988487244, 0.06574895977973938, -0.6964772343635559, 0.6792542934417725, 0.16128966212272644, -0.5229597687721252, -0.49363240599632263, 0.3835426867008209, 0.049239128828048706, 0.40863803029060364, 0.24620813131332397, 0.23874297738075256, 0.2750149071216583, -0.31415289640426636, 0.19268207252025604, -0.015021368861198425, -0.6379480957984924, -0.17706695199012756, 0.6864280104637146, 0.1643265336751938, -0.30481189489364624, 0.6234840750694275, -0.22316741943359375, -0.6688730716705322, 0.4976790249347687, 0.4240931272506714, 0.7598698735237122, -0.12418469786643982, 0.020643094554543495, 0.46326744556427, 0.2443389892578125, -0.1565215140581131, 0.03797166049480438, -0.15547601878643036, -0.7538741827011108, -0.34769055247306824, -0.7876870036125183, -0.021613910794258118, 0.41435354948043823, -0.5977592468261719, 0.20058216154575348, -0.42875996232032776, -0.35877853631973267, 0.34071582555770874, -0.037843603640794754, -0.7554188966751099, 0.3561508059501648, -0.057582832872867584, 0.9417427182197571, -0.8271458148956299, 0.7770174145698547, 0.8345675468444824, -0.23373495042324066, -1.0144938230514526, 0.021867498755455017, -0.16662979125976562, -0.4730394780635834, 0.88485187292099, 0.5232703685760498, 0.12122555822134018, 0.04744100198149681, -0.7623435854911804, -0.5462391972541809, 0.8117936849594116, 0.2417585700750351, -0.7617316246032715, 0.05448361486196518, -0.17757803201675415, 0.4333927035331726, -0.0215078704059124, 0.18060071766376495, 0.4305132031440735, 0.09333625435829163, -0.12100418657064438, -0.8676777482032776, -0.1341084986925125, -0.3472633361816406, -0.11017003655433655, 0.12562602758407593, -0.5342206954956055, 0.9784044027328491, -0.22791483998298645, -0.13048575818538666, 0.05970111861824989, 0.6782466769218445, 0.04596433416008949, 0.26510798931121826, 0.6547984480857849, 0.7987391948699951, 0.6866541504859924, -0.20958545804023743, 0.7655438184738159, -0.2750369608402252, 0.5450774431228638, 1.1682416200637817, 0.11012380570173264, 0.7754184603691101, 0.33480092883110046, -0.4603716731071472, 0.4657573401927948, 0.645825982093811, -0.27576497197151184, 0.5234379172325134, 0.41397735476493835, -0.06244586408138275, -0.3072040379047394, 0.2587888240814209, -0.28360849618911743, 0.4473187327384949, 0.16559800505638123, -0.5376362204551697, 0.1049661710858345, 0.34088340401649475, -0.00035280303563922644, 0.009185840375721455, -0.322938472032547, 0.43196171522140503, 0.11320532113313675, -0.8020552396774292, 0.9131907224655151, -0.06156997010111809, 0.9520354866981506, -0.5693120360374451, 0.09473419934511185, 0.17470000684261322, 0.4568544328212738, -0.1649041324853897, -0.5869143009185791, -0.056389592587947845, -0.03349980711936951, -0.3527507781982422, -0.2345169335603714, 0.8098868131637573, -0.6555107235908508, -0.4447801411151886, 0.09195411205291748, 0.3357768654823303, 0.46095573902130127, -0.12285806983709335, -0.8510797023773193, -0.37461963295936584, 0.0662115067243576, -0.5181483626365662, 0.24140754342079163, 0.2592615485191345, 0.2580019533634186, 0.7091212272644043, 0.5740905404090881, -0.10960505902767181, 0.23760437965393066, -0.015307119116187096, 0.7914226651191711, -0.5176370143890381, -0.4237435460090637, -0.6537891030311584, 0.5674729943275452, -0.020702701061964035, -0.45786377787590027, 0.7346543669700623, 0.5786925554275513, 1.0723026990890503, -0.41070958971977234, 0.4772745966911316, -0.18949668109416962, 0.43862855434417725, -0.5744546055793762, 0.7365056872367859, -0.6300286650657654, -0.19722451269626617, -0.3024713695049286, -0.9979546666145325, -0.00843591894954443, 0.7420215010643005, -0.16904224455356598, 0.23356886208057404, 0.6921600103378296, 0.7256180644035339, -0.2435801923274994, -0.0007229762268252671, 0.24372082948684692, 0.2669772207736969, -0.1715802699327469, 0.44220075011253357, 0.662057101726532, -0.5904403328895569, 0.7375123500823975, -0.47658535838127136, -0.2934044599533081, -0.16335748136043549, -0.742733359336853, -1.1016042232513428, -0.7266867160797119, -0.5395285487174988, -0.4478800296783447, -0.027157044038176537, 0.9159521460533142, 0.9355035424232483, -0.7346467971801758, -0.20541483163833618, -0.18792122602462769, -0.2740606367588043, -0.34625282883644104, -0.2712135314941406, 0.5009125471115112, -0.5070476531982422, -0.9118517637252808, 0.19602438807487488, -0.09520429372787476, 0.22930476069450378, 0.03434552997350693, 0.11387036740779877, -0.4849448502063751, -0.17914196848869324, 0.5384259223937988, 0.07329104840755463, -0.4097488224506378, 0.0886097401380539, -0.09706351161003113, -0.0682077705860138, 0.007212466560304165, 0.7082095146179199, -0.7379776239395142, 0.34347864985466003, 0.2923436462879181, 0.5188862681388855, 0.8293054699897766, -0.1974417120218277, 0.3231685757637024, -0.7682865262031555, 0.35402750968933105, 0.3397132456302643, 0.3070409297943115, 0.12463348358869553, -0.18747328221797943, 0.5217517614364624, 0.3065449595451355, -0.7723155617713928, -0.5316612124443054, -0.002167360158637166, -1.0043822526931763, -0.3503866493701935, 0.9832406640052795, -0.49499407410621643, -0.16883321106433868, 0.04594060778617859, -0.2466931939125061, 0.48495084047317505, -0.10851485282182693, 0.6052728891372681, 0.6669582724571228, -0.04867222160100937, 0.004067410249263048, -0.6514700055122375, 0.5530853271484375, 0.6324776411056519, -0.48143357038497925, -0.2212759405374527, 0.32417032122612, 0.4232248365879059, 0.33274176716804504, 0.4383945167064667, 0.18768669664859772, 0.05205699801445007, -0.0533403605222702, 0.19537653028964996, -0.09040088206529617, -0.4785511791706085, -0.021136946976184845, 0.1863061785697937, -0.2783835828304291, -0.3103300631046295 ]
timm/vit_small_patch16_224.augreg_in21k_ft_in1k
timm
"2023-05-06T00:28:22Z"
26,141
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "dataset:imagenet-21k", "arxiv:2106.10270", "arxiv:2010.11929", "license:apache-2.0", "region:us" ]
image-classification
"2022-12-22T07:54:03Z"
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k - imagenet-21k --- # Model card for vit_small_patch16_224.augreg_in21k_ft_in1k A Vision Transformer (ViT) image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k (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): 22.1 - GMACs: 4.3 - Activations (M): 8.2 - 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-1k - **Pretrain 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_small_patch16_224.augreg_in21k_ft_in1k', 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_small_patch16_224.augreg_in21k_ft_in1k', 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, 384) 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}} } ```
[ -0.5444533228874207, -0.39614585041999817, -0.032950542867183685, 0.06947948783636093, -0.3947547972202301, -0.3616727292537689, -0.2997099757194519, -0.4776921272277832, 0.19904576241970062, 0.30021318793296814, -0.5701799988746643, -0.48952606320381165, -0.6422619223594666, 0.01699777878820896, -0.1493963897228241, 1.003165364265442, -0.14600339531898499, 0.05344449356198311, -0.23046660423278809, -0.45845717191696167, -0.3194943964481354, -0.26076021790504456, -0.6432316303253174, -0.442915678024292, 0.4038395881652832, 0.18922735750675201, 0.6043280959129333, 0.6277490854263306, 0.8086079955101013, 0.4566238522529602, -0.11060594022274017, 0.1477220356464386, -0.34980958700180054, -0.24363526701927185, 0.303373247385025, -0.642606794834137, -0.3906737267971039, 0.2558949589729309, 0.7432161569595337, 0.3964478075504303, 0.11418710649013519, 0.3729249835014343, 0.15279991924762726, 0.50079745054245, -0.34006622433662415, 0.2055729776620865, -0.5244079232215881, 0.27951887249946594, -0.05959128588438034, -0.02622181735932827, -0.31364092230796814, -0.33720341324806213, 0.26143398880958557, -0.547702968120575, 0.624984622001648, -0.032700374722480774, 1.402375340461731, 0.3086257576942444, 0.06644262373447418, 0.22498761117458344, -0.41039493680000305, 0.7661657333374023, -0.6274979710578918, 0.4254966378211975, 0.18969304859638214, 0.19182680547237396, 0.06523706018924713, -1.0612664222717285, -0.6940143704414368, -0.17910237610340118, -0.26779496669769287, 0.09792758524417877, -0.3098545968532562, 0.2577923834323883, 0.4854954481124878, 0.5976548790931702, -0.5319236516952515, 0.004372505471110344, -0.5803351998329163, -0.2829420268535614, 0.5771311521530151, -0.015136877074837685, 0.1937805414199829, -0.1746980845928192, -0.6061192154884338, -0.6200971007347107, -0.33873051404953003, 0.29246607422828674, 0.30246955156326294, 0.06861969828605652, -0.5103862285614014, 0.5604149103164673, 0.04438728466629982, 0.6758058071136475, 0.23884113132953644, -0.2290380597114563, 0.6603935956954956, -0.1621294468641281, -0.40009477734565735, -0.2596871256828308, 1.121021032333374, 0.4618719220161438, 0.3838997483253479, -0.018640518188476562, -0.1846238076686859, -0.12475574016571045, 0.05900409817695618, -1.1194634437561035, -0.40073931217193604, 0.07947157323360443, -0.48163914680480957, -0.39782124757766724, 0.3617050051689148, -0.6569526791572571, -0.11837596446275711, -0.11746848374605179, 0.8119841814041138, -0.44814613461494446, -0.18716967105865479, 0.10125182569026947, -0.16156204044818878, 0.4811335802078247, 0.2653726637363434, -0.6007528901100159, 0.11175525188446045, 0.22050906717777252, 1.0616154670715332, 0.04308004677295685, -0.5016963481903076, -0.26188555359840393, -0.46662449836730957, -0.3252645432949066, 0.5144320130348206, -0.03067677654325962, -0.12843850255012512, -0.17997950315475464, 0.39658164978027344, -0.2580055594444275, -0.5737698674201965, 0.33901336789131165, -0.2043628990650177, 0.3759377598762512, 0.11903146654367447, -0.19745083153247833, -0.41746392846107483, 0.27659574151039124, -0.4221307039260864, 1.2396202087402344, 0.37899520993232727, -0.9308827519416809, 0.4376773536205292, -0.4709424674510956, -0.08198395371437073, -0.13534803688526154, 0.013095764443278313, -1.129506230354309, 0.06169181689620018, 0.32065466046333313, 0.6042028069496155, -0.2221185863018036, -0.04601951688528061, -0.4200562834739685, -0.3513537347316742, 0.35325998067855835, -0.26503512263298035, 0.9145159721374512, 0.0345819927752018, -0.3123559355735779, 0.2931331396102905, -0.5971064567565918, 0.08473969995975494, 0.44872739911079407, -0.24949528276920319, 0.008088098838925362, -0.6381997466087341, 0.14889441430568695, 0.2309311032295227, 0.2285417914390564, -0.6706740856170654, 0.4124267101287842, -0.3817640542984009, 0.42263472080230713, 0.6712338924407959, -0.10207223147153854, 0.3959461450576782, -0.3523671627044678, 0.3444192409515381, 0.2691407799720764, 0.41343390941619873, -0.133698970079422, -0.650659441947937, -1.0696170330047607, -0.46622708439826965, 0.3724961280822754, 0.4413558840751648, -0.6997376680374146, 0.5639523863792419, -0.38463035225868225, -0.7652695775032043, -0.6341931819915771, 0.04327387362718582, 0.4627596437931061, 0.5462756752967834, 0.5275240540504456, -0.5495924353599548, -0.5457834005355835, -0.985050618648529, -0.1230270266532898, -0.05238564684987068, -0.012467052787542343, 0.22726748883724213, 0.6588966846466064, -0.2755260765552521, 0.8876298666000366, -0.46360155940055847, -0.36513176560401917, -0.2187340259552002, 0.06835561990737915, 0.35831892490386963, 0.758388876914978, 0.7074593901634216, -0.6517789363861084, -0.46853676438331604, -0.1454888880252838, -0.8692122101783752, 0.15040820837020874, -0.03379261493682861, -0.17376112937927246, 0.1419655978679657, 0.1997019201517105, -0.7067556977272034, 0.8068619966506958, 0.17609544098377228, -0.3719278573989868, 0.4172538220882416, -0.2411108762025833, 0.06602555513381958, -1.1812242269515991, -0.012343481183052063, 0.3801268935203552, -0.26316744089126587, -0.48752346634864807, -0.0018188953399658203, 0.0942961648106575, -0.04387252777814865, -0.43008002638816833, 0.6047796607017517, -0.4945392310619354, -0.04951099306344986, -0.0663713589310646, -0.318250834941864, 0.054939813911914825, 0.7386965155601501, -0.053937751799821854, 0.5489364862442017, 0.7378632426261902, -0.4940005838871002, 0.5925931930541992, 0.5582873225212097, -0.24041640758514404, 0.4684808850288391, -0.740451991558075, 0.16733688116073608, -0.04517717659473419, 0.20665860176086426, -1.0244739055633545, -0.21575836837291718, 0.39760535955429077, -0.7387666702270508, 0.6591964960098267, -0.5372085571289062, -0.4690210223197937, -0.6430296897888184, -0.4224202632904053, 0.4238676428794861, 0.7733040452003479, -0.8184629082679749, 0.594892144203186, 0.08331107348203659, 0.32325729727745056, -0.5714151263237, -0.9796575903892517, -0.24475666880607605, -0.3869750499725342, -0.7452136278152466, 0.461936354637146, 0.08995998650789261, 0.1507781744003296, 0.07647160440683365, -0.08260718733072281, 0.008679224178195, -0.22586673498153687, 0.44833847880363464, 0.4075489938259125, -0.23423944413661957, -0.052150581032037735, -0.3362736105918884, -0.22044344246387482, -0.01821897365152836, -0.344123899936676, 0.5257377028465271, -0.3163551986217499, -0.20245394110679626, -0.7835245132446289, -0.27083173394203186, 0.47364410758018494, -0.2890119254589081, 0.7677420973777771, 1.1894354820251465, -0.47670474648475647, 0.05605144426226616, -0.5661522746086121, -0.42580118775367737, -0.5051510334014893, 0.4668811559677124, -0.3332885801792145, -0.4730471074581146, 0.7486464381217957, 0.1709488481283188, 0.0762871652841568, 0.7962055206298828, 0.4311509132385254, 0.02265731617808342, 0.8559467792510986, 0.7060324549674988, 0.1577102243900299, 0.9030948281288147, -0.9984331727027893, -0.09914043545722961, -0.9320926666259766, -0.3574373722076416, -0.25786009430885315, -0.563556432723999, -0.7260251045227051, -0.4988756477832794, 0.4626888036727905, 0.1189219206571579, -0.28689876198768616, 0.529886782169342, -0.907002866268158, 0.18190014362335205, 0.7337550520896912, 0.5263741612434387, -0.11328573524951935, 0.4406853914260864, -0.20492936670780182, -0.09017141908407211, -0.8188920617103577, -0.11116576939821243, 1.1053261756896973, 0.4923234283924103, 0.82822585105896, -0.28440651297569275, 0.677484393119812, -0.2574678659439087, 0.3340672254562378, -0.8021737337112427, 0.5579530596733093, -0.029874078929424286, -0.40947744250297546, -0.13197001814842224, -0.41297218203544617, -1.0578603744506836, 0.22355593740940094, -0.3529844284057617, -0.8280373811721802, 0.35844579339027405, 0.20787811279296875, -0.25111690163612366, 0.6679245233535767, -0.8855999112129211, 1.013351559638977, -0.05951857939362526, -0.5054712295532227, 0.08694884181022644, -0.7258529663085938, 0.19438526034355164, 0.2391200065612793, -0.36660236120224, 0.14661985635757446, 0.26235225796699524, 1.0385276079177856, -0.6290461421012878, 0.8526502251625061, -0.42438802123069763, 0.36176159977912903, 0.5024703741073608, -0.22816988825798035, 0.404512494802475, 0.036897867918014526, 0.18325656652450562, 0.3487032353878021, 0.0045159305445849895, -0.3676588237285614, -0.49783870577812195, 0.4866015911102295, -1.0531803369522095, -0.37753209471702576, -0.5434573888778687, -0.5721546411514282, 0.11286526918411255, 0.07729098945856094, 0.7070633769035339, 0.6217513680458069, 0.28413695096969604, 0.4035048484802246, 0.6656318306922913, -0.34897205233573914, 0.4067535400390625, 0.004334880504757166, -0.18780545890331268, -0.5653993487358093, 0.9702484011650085, 0.22566378116607666, 0.15820391476154327, 0.1715528964996338, 0.2517881989479065, -0.348419189453125, -0.4850054085254669, -0.35761046409606934, 0.4290233850479126, -0.7218647003173828, -0.4988037049770355, -0.5757158398628235, -0.5287442803382874, -0.3408214747905731, 0.016185598447918892, -0.43617942929267883, -0.3360637426376343, -0.3815555274486542, 0.12175595015287399, 0.8468863368034363, 0.5300562381744385, -0.13472841680049896, 0.5628921985626221, -0.5843614339828491, 0.22146372497081757, 0.2999263405799866, 0.5356497168540955, -0.19457361102104187, -1.0477275848388672, -0.38045305013656616, 0.028069576248526573, -0.5228108167648315, -0.7495818734169006, 0.46671029925346375, 0.22265754640102386, 0.44134238362312317, 0.39471176266670227, -0.26437029242515564, 0.8954392075538635, -0.07406740635633469, 0.598723292350769, 0.34273049235343933, -0.5393801927566528, 0.5151669979095459, -0.09484941512346268, 0.14066386222839355, 0.20773808658123016, 0.170312762260437, -0.2975535988807678, -0.05560003221035004, -1.1007126569747925, -0.7530041933059692, 0.8291534185409546, 0.2533143162727356, 0.046203065663576126, 0.4751414358615875, 0.6255819201469421, -0.054914649575948715, 0.07040930539369583, -0.9129945039749146, -0.3249262869358063, -0.39691871404647827, -0.3454661965370178, -0.10556251555681229, -0.013895335607230663, -0.020357998088002205, -0.8381858468055725, 0.6594265699386597, -0.10288100689649582, 0.8480194211006165, 0.4789794087409973, -0.201102614402771, -0.16649919748306274, -0.40129151940345764, 0.37016186118125916, 0.24921077489852905, -0.2934948801994324, 0.03436727449297905, 0.2877059876918793, -0.7523865103721619, -0.03715881332755089, 0.33345434069633484, -0.10768218338489532, 0.05060844495892525, 0.47878599166870117, 1.113221526145935, -0.11779646575450897, -0.010994317941367626, 0.5551708340644836, -0.11324652284383774, -0.41979923844337463, -0.2882895767688751, 0.08388309180736542, -0.26624634861946106, 0.37597087025642395, 0.31522276997566223, 0.3998175263404846, -0.16427354514598846, -0.13834500312805176, 0.15173718333244324, 0.5486828088760376, -0.5434989333152771, -0.37817826867103577, 0.6853464245796204, -0.21222266554832458, -0.09462800621986389, 0.8201850652694702, -0.08667381852865219, -0.5696203708648682, 0.8867699503898621, 0.32411158084869385, 1.032395839691162, -0.08517226576805115, -0.05039757862687111, 0.814221978187561, 0.39819708466529846, -0.04184242710471153, 0.1559968888759613, 0.13629715144634247, -0.8082575798034668, -0.08121766895055771, -0.6717227697372437, 0.032443854957818985, 0.3400202989578247, -0.5320770144462585, 0.42152896523475647, -0.5477576851844788, -0.3737754225730896, 0.05785082280635834, 0.26113519072532654, -1.0550062656402588, 0.2998397946357727, 0.021838221698999405, 0.7705275416374207, -0.8159090876579285, 0.6790246963500977, 0.8728495836257935, -0.7075496912002563, -0.9877536296844482, -0.16987107694149017, -0.180838480591774, -0.906695544719696, 0.4639737606048584, 0.4517694413661957, 0.16427753865718842, 0.26021039485931396, -0.8415903449058533, -0.6252196431159973, 1.3308669328689575, 0.3733953535556793, -0.1527358889579773, 0.14568877220153809, -0.029316328465938568, 0.38968220353126526, -0.2844044864177704, 0.459939181804657, 0.18626640737056732, 0.40900370478630066, 0.2079431712627411, -0.729843020439148, 0.0717674046754837, -0.31337451934814453, 0.16639560461044312, 0.2045266032218933, -0.8409262895584106, 0.9894516468048096, -0.42721027135849, -0.1176363155245781, 0.2010696530342102, 0.6674621105194092, 0.09029321372509003, 0.08331652730703354, 0.5584321022033691, 0.9118703007698059, 0.4033556282520294, -0.46264350414276123, 0.9417582154273987, -0.1328732818365097, 0.7372621893882751, 0.5229576230049133, 0.5157028436660767, 0.4485904574394226, 0.48388710618019104, -0.36230236291885376, 0.3210296630859375, 1.0357365608215332, -0.5805418491363525, 0.30665501952171326, 0.10358097404241562, 0.07004280388355255, -0.2303369641304016, 0.05902863293886185, -0.4927704334259033, 0.5347100496292114, 0.2003304809331894, -0.5613123774528503, -0.08026498556137085, 0.1943286657333374, -0.16757500171661377, -0.39560163021087646, -0.20284540951251984, 0.6286659240722656, 0.017451198771595955, -0.4416259825229645, 0.8438705205917358, -0.004556990694254637, 0.8441163897514343, -0.4519861042499542, -0.013726437464356422, -0.26640602946281433, 0.44030052423477173, -0.3858788013458252, -0.796280026435852, 0.16776500642299652, -0.24611063301563263, -0.0684656947851181, 0.039349205791950226, 0.7289812564849854, -0.4100440740585327, -0.5775594115257263, 0.09712623059749603, 0.32047319412231445, 0.31198710203170776, -0.08088191598653793, -1.043614149093628, -0.04297211021184921, 0.00896539632230997, -0.5936514735221863, 0.21195834875106812, 0.40667298436164856, 0.044532790780067444, 0.6903553605079651, 0.6775437593460083, -0.08462085574865341, 0.2418108433485031, -0.1280408352613449, 0.9363309741020203, -0.43454399704933167, -0.40661999583244324, -0.8005638718605042, 0.6432929039001465, -0.06845396757125854, -0.639146089553833, 0.692502498626709, 0.6097043752670288, 0.9571969509124756, -0.15244467556476593, 0.45253196358680725, -0.17629365622997284, 0.036310188472270966, -0.3695234954357147, 0.6173382997512817, -0.7501076459884644, -0.10696136206388474, -0.29834461212158203, -0.9009286761283875, -0.37411877512931824, 0.9844884872436523, -0.3572993278503418, 0.4566788077354431, 0.5563152432441711, 1.0001436471939087, -0.3409349024295807, -0.3872992992401123, 0.17603613436222076, 0.20521794259548187, 0.11796347051858902, 0.39739754796028137, 0.6044155359268188, -0.9156515002250671, 0.511095404624939, -0.6458348035812378, -0.1718846559524536, -0.25812265276908875, -0.48656490445137024, -1.0495423078536987, -0.8371283411979675, -0.5946967601776123, -0.6896719336509705, -0.2538590133190155, 0.8757522106170654, 0.9687163233757019, -0.573664128780365, -0.05993310362100601, -0.15380649268627167, 0.024057406932115555, -0.31999334692955017, -0.24847353994846344, 0.5318425893783569, -0.1400403082370758, -0.7823441028594971, -0.34269267320632935, -0.008734115399420261, 0.5221139788627625, -0.19066229462623596, -0.17640556395053864, -0.14738884568214417, -0.34168723225593567, 0.24730485677719116, 0.30530571937561035, -0.7094887495040894, -0.24941234290599823, -0.08725485950708389, -0.05095648020505905, 0.5105658769607544, 0.39424648880958557, -0.7522246241569519, 0.5589697957038879, 0.558388888835907, 0.3437439203262329, 0.8677307963371277, -0.20304660499095917, 0.07701978832483292, -0.8882028460502625, 0.624409556388855, -0.031307149678468704, 0.536720871925354, 0.5138481855392456, -0.26948001980781555, 0.6138098835945129, 0.5890614986419678, -0.4692975878715515, -0.8690187335014343, -0.04642532765865326, -1.1111403703689575, 0.1395510733127594, 0.9561364054679871, -0.24211294949054718, -0.48860421776771545, 0.399492084980011, -0.2197577804327011, 0.7176377177238464, -0.05939830467104912, 0.48305150866508484, 0.23305441439151764, 0.07618264108896255, -0.6218636631965637, -0.4763016104698181, 0.5419343113899231, 0.15177199244499207, -0.555519700050354, -0.40052926540374756, 0.042644236236810684, 0.5568663477897644, 0.37940385937690735, 0.3439119756221771, -0.13924744725227356, 0.17431241273880005, 0.06587471812963486, 0.5327714085578918, -0.354929119348526, -0.16801467537879944, -0.4248475432395935, -0.1609315723180771, -0.07654839754104614, -0.640116274356842 ]
trl-internal-testing/dummy-GPT2-correct-vocab
trl-internal-testing
"2023-02-08T15:14:11Z"
26,053
0
transformers
[ "transformers", "pytorch", "gpt2", "text-generation", "endpoints_compatible", "text-generation-inference", "region:us" ]
text-generation
"2023-02-08T15:12:33Z"
Entry not found
[ -0.3227650225162506, -0.22568431496620178, 0.862226128578186, 0.43461495637893677, -0.5282987952232361, 0.7012965679168701, 0.7915717363357544, 0.07618638128042221, 0.7746025919914246, 0.2563219666481018, -0.7852817177772522, -0.22573819756507874, -0.9104480743408203, 0.5715669393539429, -0.3992334008216858, 0.5791245698928833, -0.14494505524635315, -0.10751161724328995, 0.28233757615089417, -0.2768954336643219, -0.5409224033355713, -0.36855220794677734, -1.1902776956558228, 0.061491113156080246, 0.5316578149795532, 0.7435142397880554, 0.7584060430526733, 0.3652167320251465, 0.6432578563690186, 0.3932291269302368, -0.23138920962810516, 0.4827055037021637, -0.04171813279390335, 0.00260411505587399, -0.3524433970451355, -0.5516898036003113, -0.28596609830856323, 0.07584730535745621, 1.0961304903030396, 0.966687798500061, -0.284663587808609, 0.05330817773938179, -0.3063621520996094, 0.33088892698287964, -0.49734312295913696, 0.3054099678993225, -0.022506045177578926, 0.16318801045417786, -0.7041513919830322, -0.5535354018211365, 0.012794834561645985, -0.7361212968826294, 0.17926570773124695, -0.690081000328064, 0.8269098401069641, 0.18583157658576965, 1.1533750295639038, 0.14819414913654327, -0.462487131357193, -0.8161764144897461, -0.6538989543914795, 0.5711171627044678, -0.32703715562820435, 0.39680248498916626, 0.7028235197067261, -0.048573412001132965, -0.9820332527160645, -0.6745741367340088, -0.46466192603111267, 0.2923962473869324, 0.35402774810791016, -0.3411678075790405, -0.17522086203098297, -0.3058989644050598, 0.15792037546634674, 0.12811517715454102, -0.4841994643211365, -0.5543919205665588, -0.5475160479545593, -0.3960252106189728, 0.6206658482551575, 0.3482950031757355, 0.2429177463054657, -0.1888415813446045, -0.3228583335876465, 0.0880163162946701, -0.4160851538181305, 0.3402571678161621, 0.6335517168045044, 0.7114017009735107, -0.5811444520950317, 0.560215950012207, -0.04927587881684303, 0.7439703941345215, 0.11445561796426773, -0.27478092908859253, 0.41460567712783813, -0.14724725484848022, 0.055171746760606766, 0.4226345121860504, 0.31524422764778137, 0.2841312289237976, -0.3273695111274719, 0.2032228708267212, -0.3215144872665405, -0.30496224761009216, -0.22332167625427246, -0.29490774869918823, -0.3592180609703064, 0.5492289066314697, -0.3314017057418823, -0.42855486273765564, 1.143175721168518, -0.4200771450996399, -0.7302224040031433, 0.33156412839889526, 0.4065209925174713, -0.0994480773806572, -0.37146568298339844, -0.052260834723711014, -0.8458789587020874, -0.007907390594482422, 0.7491172552108765, -0.7198970913887024, 0.3371737599372864, 0.4728063642978668, 0.7417217493057251, 0.19650575518608093, -0.14034469425678253, -0.42949390411376953, 0.2971969544887543, -0.8659994006156921, 0.6320174336433411, -0.20135220885276794, -1.0051977634429932, 0.11150479316711426, 0.8971705436706543, -0.37896400690078735, -1.2094876766204834, 1.0605159997940063, -0.6887932419776917, 0.16017857193946838, -0.676761269569397, -0.14661237597465515, -0.07118501514196396, -0.005096632521599531, -0.6088156700134277, 0.7567102313041687, 0.587267279624939, -0.4995276927947998, 0.21429483592510223, -0.26029831171035767, -0.39151400327682495, 0.38824859261512756, -0.07935450226068497, -0.21858926117420197, 0.713833212852478, -0.6647079586982727, -0.26932814717292786, 0.2942774295806885, 0.2368936538696289, -0.35706108808517456, -0.7931919097900391, 0.08478113263845444, -0.05786270648241043, 1.550750494003296, -0.03868847340345383, -0.3586106300354004, -0.679383397102356, -1.1506240367889404, -0.07070787996053696, 0.6886883974075317, -0.9194989204406738, -0.27839475870132446, -0.046410128474235535, -0.26169314980506897, 0.08994917571544647, 0.7390589714050293, -1.1194051504135132, 0.2832726836204529, -0.05092663690447807, -0.22794683277606964, 0.8271058797836304, 0.15387225151062012, 0.24758946895599365, 0.14913396537303925, 0.42958706617355347, 0.527725338935852, 0.11115207523107529, 0.683587908744812, -0.34720373153686523, -0.9694353938102722, 0.6154631972312927, 0.25266361236572266, 0.8121447563171387, -0.49945297837257385, 0.2685093879699707, 0.27025535702705383, -0.3409680724143982, -0.5682371854782104, -0.3102838397026062, 0.09025752544403076, 0.14930562674999237, 0.11142510175704956, -0.5721710324287415, -0.6576125025749207, -0.9689140319824219, -0.13590654730796814, -0.4314374029636383, -0.3571570813655853, 0.21006910502910614, 0.5792906284332275, -1.1975523233413696, 0.4128875136375427, -0.7705625891685486, -0.7038741111755371, -0.01065548975020647, -0.19338123500347137, 0.7540656328201294, 0.43240174651145935, 0.5033966898918152, -0.6397148370742798, -0.5661987066268921, -0.22470176219940186, -1.0333747863769531, -0.13280506432056427, 0.24819621443748474, 0.3065737783908844, -0.13423344492912292, -0.2744963765144348, -0.48740333318710327, 0.8100387454032898, 0.14789170026779175, -0.5391897559165955, 0.5220767259597778, -0.3020317256450653, 0.17224803566932678, -0.6369150280952454, -0.06916818022727966, -0.661676287651062, -0.0009071884560398757, -0.3608308732509613, -0.5737438797950745, 0.14772287011146545, 0.07017494738101959, -0.16065457463264465, 0.28808408975601196, -0.909277081489563, -0.0010852962732315063, -0.7442210912704468, 0.379071980714798, 0.06394772231578827, -0.3145078718662262, -0.017517540603876114, 1.0000386238098145, 0.7784460783004761, -0.3848048746585846, 0.721744179725647, 0.4440041184425354, 0.19036155939102173, 0.7630521059036255, -0.18725109100341797, 0.16478213667869568, -0.5245416760444641, -0.12161104381084442, -0.8887597918510437, -1.0982946157455444, 0.7320570349693298, -0.6114250421524048, 0.36542922258377075, -0.4277869760990143, 0.2589159905910492, -0.6919258832931519, -0.03885362669825554, 0.4808599352836609, -0.05936325341463089, -0.6863942742347717, 0.5232570171356201, 0.45317530632019043, -0.2019241601228714, -0.6609031558036804, -0.530157208442688, 0.39365822076797485, 0.6154114007949829, -0.16390392184257507, 0.06878514587879181, 0.14941060543060303, -0.5441926121711731, -0.040802597999572754, -0.38691970705986023, -0.45766758918762207, 0.054224006831645966, 0.13053473830223083, -0.005750799085944891, -0.404820054769516, -0.0868026465177536, -0.35842007398605347, -0.4656120240688324, 0.21876516938209534, 0.3011947274208069, -0.04096309468150139, -0.42599788308143616, -0.3619818687438965, -0.888181209564209, 0.6719610095024109, 0.5370282530784607, 0.05281545966863632, 0.7555549740791321, 0.16819314658641815, -0.8014987707138062, -0.13532210886478424, -0.1760706603527069, 0.2696830928325653, -0.5588056445121765, 0.13849826157093048, -0.013484534807503223, -0.0637492910027504, 0.26297882199287415, 0.25386232137680054, -0.4300556778907776, 0.9276250004768372, -0.2615274488925934, -0.3592521846294403, 0.7960181832313538, 0.5974742770195007, 0.49583131074905396, 0.16503219306468964, -0.044541798532009125, 0.900709331035614, -1.1966516971588135, -0.6563175916671753, -0.7409549355506897, -0.15945707261562347, -0.43510833382606506, -0.032105933874845505, 0.6254412531852722, 0.2900990843772888, -0.1333388388156891, 0.4756395220756531, -0.5243489742279053, 0.3556033670902252, 1.01198410987854, 0.35748639702796936, 0.3435698449611664, -0.7570229172706604, -0.2515777349472046, -0.1402427852153778, -0.9998157620429993, -0.2631377875804901, 0.8871029019355774, 0.22752606868743896, 0.844460666179657, 0.5992541313171387, 0.6784542798995972, 0.1367226243019104, 0.2523828148841858, -0.30590319633483887, 0.3920294940471649, 0.4376082420349121, -1.0401138067245483, -0.42758408188819885, 0.021418681368231773, -0.9703338742256165, -0.14227519929409027, -0.03495011106133461, -0.42617112398147583, 0.7681737542152405, 0.00016589462757110596, -0.4076709747314453, 0.7732734084129333, -0.455583393573761, 0.7562873363494873, -0.4473648965358734, -0.02663906291127205, 0.4699096083641052, -0.7070636749267578, 0.4677430987358093, 0.12878790497779846, 0.6205843091011047, -0.015572631731629372, -0.04078587517142296, 0.7104941606521606, -0.9129160046577454, 0.25438642501831055, -0.6348397135734558, 0.22421300411224365, 0.24246945977210999, 0.51606285572052, 0.5969953536987305, 0.4371243417263031, 0.10119888931512833, -0.23920902609825134, 0.04115807265043259, -0.8241125345230103, -0.210506409406662, 0.697515606880188, -0.7186890840530396, -0.6864197850227356, -1.2355337142944336, 0.14438660442829132, 0.27347055077552795, 0.389305055141449, 0.7959296107292175, 0.571408748626709, 0.1289544403553009, 0.680525004863739, 0.9888588190078735, -0.0688566341996193, 0.9166924357414246, 0.3224477171897888, 0.09175168722867966, -0.21944808959960938, 0.7036820650100708, 0.26627904176712036, -0.24707956612110138, -0.11939732730388641, 0.20913465321063995, -0.11069409549236298, -0.591761589050293, -0.49990686774253845, 0.3701757788658142, -0.6731787919998169, -0.18303893506526947, -0.6243735551834106, -0.6043769717216492, -0.511759340763092, 0.06927360594272614, -0.7147687673568726, 0.23979046940803528, -0.7753565907478333, -0.10574902594089508, 0.04323432594537735, 0.9792009592056274, -0.589311957359314, 0.5805224180221558, -1.1218582391738892, 0.19345788657665253, -0.07949887961149216, 0.7921058535575867, 0.21395787596702576, -0.7344395518302917, -0.3975418508052826, -0.11592631042003632, -0.3729911744594574, -1.3576762676239014, 0.21404948830604553, -0.2454141080379486, 0.23094046115875244, 0.6145404577255249, 0.1397707313299179, 0.5258248448371887, -0.34326282143592834, 0.7029101848602295, -0.057017259299755096, -0.7069286704063416, 0.7934495210647583, -0.5026894807815552, 0.4963534474372864, 0.9765996932983398, 0.5333835482597351, -0.7984007596969604, 0.035741209983825684, -1.041123390197754, -0.6008695363998413, 0.38426393270492554, 0.11928944289684296, -0.03601083159446716, -0.6659559011459351, -0.054019637405872345, -0.16143807768821716, 0.6043745279312134, -1.039069414138794, -0.7858356237411499, 0.2576698362827301, 0.5277302861213684, 0.0816856250166893, -0.5653398633003235, 0.20880667865276337, -0.544416069984436, 1.0657774209976196, 0.45109400153160095, 0.3274499475955963, 0.8406060934066772, 0.46492424607276917, -0.3823164403438568, 0.09252490103244781, 0.7662695050239563, 0.6666232347488403, -0.5239797830581665, -0.2908027470111847, -0.08827541768550873, -0.9143403768539429, 0.05927472561597824, 0.11168918758630753, -0.013455932028591633, 0.9082110524177551, 0.5793083310127258, 0.2539709210395813, 0.4514279365539551, -0.726460337638855, 0.8859451413154602, -0.14954176545143127, -0.12472866475582123, -1.0677239894866943, 0.1948619782924652, -0.23984959721565247, 0.5006402134895325, 1.0061326026916504, 0.5250048041343689, -0.047630298882722855, -0.8143380880355835, -0.01473585981875658, 0.6939172148704529, -0.7091123461723328, -0.17449834942817688, 0.944853663444519, 0.3847099542617798, -1.2953051328659058, 1.106776475906372, -0.5381771326065063, -0.560332179069519, 0.9121301770210266, 0.522956907749176, 1.1221847534179688, -0.44204121828079224, 0.0008676342549733818, 0.2662237286567688, 0.41378432512283325, 0.5423170328140259, 1.0869629383087158, 0.431413471698761, -0.7931063771247864, 0.8826584815979004, -0.24776044487953186, -0.40361151099205017, -0.05347571521997452, -0.42859897017478943, 0.16892178356647491, -0.4406192898750305, -0.10713007301092148, -0.3444187641143799, 0.28543180227279663, -0.7072042226791382, 0.42807620763778687, -0.0838567465543747, 0.8653068542480469, -0.8553727269172668, 0.47207626700401306, 0.635470449924469, -0.3337355852127075, -0.8508191108703613, -0.26198428869247437, -0.11448462307453156, -0.6389466524124146, 0.30214807391166687, -0.4554102420806885, 0.044398851692676544, 0.09623463451862335, -0.649151623249054, -1.1778275966644287, 0.9093633890151978, -0.639612078666687, -0.2784462869167328, 0.20464053750038147, -0.11514760553836823, 0.28811705112457275, -0.2524643540382385, 0.010661216452717781, 0.41876548528671265, 0.748940110206604, 0.2844654619693756, -0.7727053761482239, -0.3694884479045868, 0.0015032943338155746, -0.44474777579307556, 0.7582978010177612, -0.6002101898193359, 1.1840779781341553, -0.5563543438911438, -0.059654366225004196, 0.44384512305259705, 0.24690914154052734, 0.21076197922229767, 0.6629220843315125, 0.1442081481218338, 0.7282265424728394, 1.07012140750885, -0.40835219621658325, 0.8811809420585632, 0.26432839035987854, 0.47430819272994995, 0.7238501906394958, -0.6487724781036377, 0.7513749003410339, 0.31810489296913147, -0.5682924389839172, 0.9228013753890991, 1.2906063795089722, -0.15699204802513123, 0.8079374432563782, 0.05136508867144585, -1.081600546836853, 0.325833261013031, -0.20724765956401825, -0.7530064582824707, 0.3150254189968109, 0.19055864214897156, -0.6920982599258423, -0.5770308971405029, -0.24046507477760315, -0.35662803053855896, -0.11552901566028595, -0.7631728649139404, 0.6720563769340515, -0.016969164833426476, -0.5103683471679688, 0.18857547640800476, 0.2877499461174011, 0.17368432879447937, -0.5235732793807983, -0.02939440682530403, -0.22823619842529297, 0.2660655975341797, -0.5670853853225708, -0.5234526991844177, 0.5724433064460754, -0.32430219650268555, -0.5343255400657654, 0.18147465586662292, 0.763587236404419, -0.16923809051513672, -0.4515409469604492, 0.32472723722457886, 0.6959525346755981, 0.1665852814912796, 0.4250282347202301, -0.23511263728141785, 0.24480605125427246, -0.08044824004173279, -0.06651552021503448, 0.27714768052101135, 0.3449169099330902, 0.22435641288757324, 0.4450142979621887, 0.43285664916038513, -0.01808755099773407, -0.10736498981714249, -0.382819801568985, 0.4124940037727356, -0.9542785882949829, -0.5713282823562622, -0.6307113766670227, 0.2740660607814789, -0.02315417304635048, -1.0836423635482788, 0.4145168364048004, 1.4406683444976807, 1.0359982252120972, -0.4756383001804352, 1.067226529121399, -0.21818485856056213, 0.9594791531562805, 0.41483086347579956, 0.5420440435409546, -0.6030411720275879, 0.03835370019078255, -0.4364396035671234, -1.076962947845459, -0.35716333985328674, 0.4539391100406647, -0.022899555042386055, -0.3429867625236511, 0.872571587562561, 0.5887166261672974, -0.33473607897758484, -0.11728022992610931, 0.048487238585948944, -0.029941488057374954, -0.12433847039937973, 0.5145376324653625, 0.7648399472236633, -0.9344304800033569, -0.10680416971445084, -0.21577754616737366, -0.6382725834846497, -0.5047279000282288, -0.9632009267807007, -0.12959396839141846, -0.16037796437740326, 0.035343267023563385, -0.5662806630134583, 0.00255737011320889, 1.208324909210205, 0.5684957504272461, -1.1113994121551514, -0.5303789377212524, 0.3371853232383728, 0.3920421898365021, -0.1874791383743286, -0.24202413856983185, 0.2984568774700165, 0.15382249653339386, -0.5908876657485962, 0.6875665783882141, 0.8089625239372253, 0.208888977766037, 0.19554761052131653, 0.15893013775348663, -0.8229473829269409, -0.14913435280323029, 0.17440445721149445, 0.9450570344924927, -0.939853310585022, -0.7114843130111694, -0.03168516233563423, -0.27094873785972595, -0.05765746906399727, 0.17102102935314178, -0.4046344757080078, 0.5180677175521851, 0.34591493010520935, 0.49933457374572754, 0.0561608150601387, -0.054746925830841064, 0.5409556031227112, -0.9069057703018188, 0.09425963461399078, 0.4134361147880554, 0.4154115319252014, -0.4000864028930664, -0.5910194516181946, 0.6713420748710632, 1.0073972940444946, -0.6594868898391724, -0.8743268847465515, -0.19846712052822113, -1.0016002655029297, 0.04189709946513176, 0.6762762069702148, 0.5009527802467346, -0.4806513786315918, -0.4174500107765198, -0.5617399215698242, -0.1254672110080719, -0.1369970738887787, 0.7621601819992065, 1.179680585861206, -0.7432094812393188, 0.07975747436285019, -1.038639783859253, 0.6594986915588379, -0.2419457733631134, -0.3457581698894501, -0.48644304275512695, 0.3832802176475525, 0.35236993432044983, 0.440481036901474, 0.614812433719635, 0.1408471167087555, 0.8338426351547241, 0.3126053214073181, -0.1702686995267868, 0.2698982357978821, -0.4559200704097748, -0.028932858258485794, -0.057962555438280106, 0.31015971302986145, -1.0262157917022705 ]
elastic/distilbert-base-cased-finetuned-conll03-english
elastic
"2023-04-20T10:32:13Z"
26,048
10
transformers
[ "transformers", "pytorch", "safetensors", "distilbert", "token-classification", "en", "dataset:conll2003", "license:apache-2.0", "model-index", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: en license: apache-2.0 datasets: - conll2003 model-index: - name: elastic/distilbert-base-cased-finetuned-conll03-english results: - task: type: token-classification name: Token Classification dataset: name: conll2003 type: conll2003 config: conll2003 split: validation metrics: - type: accuracy value: 0.9834432212868665 name: Accuracy verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOTZmZTJlMzUzOTAzZjg3N2UxNmMxMjQ2M2FhZTM4MDdkYzYyYTYyNjM1YjQ0M2Y4ZmIyMzkwMmY5YjZjZGVhYSIsInZlcnNpb24iOjF9.QaSLUR7AtQmE9F-h6EBueF6INQgdKwUUzS3bNvRu44rhNDY1KAJJkmDC8FeAIVMnlOSvPKvr5pOvJ59W1zckCw - type: precision value: 0.9857564461012737 name: Precision verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMDVmNmNmNWIwNTI0Yzc0YTI1NTk2NDM4YjY4NzY0ODQ4NzQ5MDQxMzYyYWM4YzUwNmYxZWQ1NTU2YTZiM2U2MCIsInZlcnNpb24iOjF9.ui_o64VBS_oC89VeQTx_B-nUUM0ZaivFyb6wNrYZcopJXvYgzptLCkARdBKdBajFjjupdhtq1VCdGbJ3yaXgBA - type: recall value: 0.9882123948925569 name: Recall verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiODg4Mzg1NTY3NjU4ZGQxOGVhMzQxNWU0ZTYxNWM2ZTg1OGZlM2U5ZGMxYTA2NzdiZjM5YWFkZjkzOGYwYTlkMyIsInZlcnNpb24iOjF9.8jHJv_5ZQp_CX3-k8-C3c5Hs4zp7bJPRTeE5SFrNgeX-FdhPv_8bHBM_DqOD2P_nkAzQ_PtEFfEokQpouZFJCw - type: f1 value: 0.9869828926905132 name: F1 verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiYzZlOGRjMDllYWY5MjdhODk2MmNmMDk5MDQyZGYzZDYwZTE1ZDY2MDNlMzAzN2JlMmE5Y2M3ZTNkOWE2MDBjYyIsInZlcnNpb24iOjF9.VKwzPQFSbrnUZ25gkKUZvYO_xFZcaTOSkDcN-YCxksF5DRnKudKI2HmvO8l8GCsQTCoD4DiSTKzghzLMxB1jCg - type: loss value: 0.07748260349035263 name: loss verified: true verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNmVmOTQ2MWI2MzZhY2U2ODQ3YjA0ZWVjYzU1NGRlMTczZDI0NmM0OWI4YmIzMmEyYjlmNDIwYmRiODM4MWM0YiIsInZlcnNpb24iOjF9.0Prq087l2Xfh-ceS99zzUDcKM4Vr4CLM2rF1F1Fqd2fj9MOhVZEXF4JACVn0fWAFqfZIPS2GD8sSwfNYaXkZAA --- [DistilBERT base cased](https://huggingface.co/distilbert-base-cased), fine-tuned for NER using the [conll03 english dataset](https://huggingface.co/datasets/conll2003). Note that this model is sensitive to capital letters — "english" is different than "English". For the case insensitive version, please use [elastic/distilbert-base-uncased-finetuned-conll03-english](https://huggingface.co/elastic/distilbert-base-uncased-finetuned-conll03-english). ## Versions - Transformers version: 4.3.1 - Datasets version: 1.3.0 ## Training ``` $ run_ner.py \ --model_name_or_path distilbert-base-cased \ --label_all_tokens True \ --return_entity_level_metrics True \ --dataset_name conll2003 \ --output_dir /tmp/distilbert-base-cased-finetuned-conll03-english \ --do_train \ --do_eval ``` After training, we update the labels to match the NER specific labels from the dataset [conll2003](https://raw.githubusercontent.com/huggingface/datasets/1.3.0/datasets/conll2003/dataset_infos.json)
[ -0.2932315468788147, -0.5258885622024536, 0.1739029735326767, 0.299043744802475, -0.04296927899122238, 0.044273003935813904, -0.18541444838047028, -0.15339307487010956, 0.43341678380966187, 0.3195332884788513, -0.8093382120132446, -0.7387640476226807, -0.6271409392356873, 0.31272092461586, -0.04825982078909874, 1.3369264602661133, -0.139130100607872, 0.3867788016796112, -0.001100537134334445, -0.3984926640987396, -0.33895066380500793, -0.691834032535553, -1.1052184104919434, -0.52022784948349, 0.40457144379615784, 0.36712902784347534, 0.40363195538520813, 0.19449080526828766, 0.6800457239151001, 0.3446192443370819, -0.4718359410762787, -0.16712844371795654, -0.4148797392845154, 0.005788188427686691, -0.12667010724544525, -0.17949017882347107, -0.934633195400238, -0.11441478878259659, 0.5972759127616882, 0.7157451510429382, -0.4181568920612335, 0.38583630323410034, -0.09293390065431595, 0.6383457183837891, -0.3289095163345337, 0.25194939970970154, -0.6535655856132507, 0.03480447828769684, -0.053104646503925323, -0.014385784044861794, -0.3993402421474457, -0.03517449274659157, 0.30788564682006836, -0.686697244644165, 0.5805782675743103, 0.1868099421262741, 1.2189528942108154, 0.39910265803337097, -0.3961654007434845, -0.2020491659641266, -0.5362591743469238, 0.6792445778846741, -0.8539009094238281, 0.4480690658092499, 0.3107011020183563, 0.38842710852622986, -0.23014043271541595, -0.8464323282241821, -0.39997607469558716, -0.07438065111637115, -0.20982122421264648, 0.2039969265460968, -0.32120898365974426, 0.018448632210493088, 0.6301213502883911, 0.5755352973937988, -0.49610522389411926, 0.1978287249803543, -0.6076125502586365, -0.27212250232696533, 0.6759346723556519, 0.2328943908214569, 0.14204207062721252, 0.08277367800474167, -0.3469465970993042, -0.37774035334587097, -0.5586053729057312, -0.013868567533791065, 0.5171631574630737, 0.5172695517539978, -0.5466982126235962, 0.5973310470581055, -0.424793004989624, 0.7077915072441101, 0.4752306044101715, -0.07585462927818298, 0.9427830576896667, -0.11389476805925369, -0.1667625457048416, 0.4274633824825287, 0.8728952407836914, 0.5150044560432434, 0.1988459825515747, -0.06357953697443008, -0.5521206259727478, -0.10382110625505447, -0.08118928968906403, -1.0572887659072876, -0.18873922526836395, 0.14660096168518066, -0.19829295575618744, -0.17260198295116425, 0.05569685995578766, -0.5030212998390198, -0.09603484719991684, -0.38353052735328674, 0.5215891599655151, -0.355691134929657, -0.2644095718860626, 0.40616992115974426, -0.11507360637187958, 0.11065637320280075, -0.014047871343791485, -0.9838430881500244, 0.5706019401550293, 0.3992810845375061, 0.6393465995788574, 0.12749992311000824, 0.006954990327358246, -0.3833123445510864, -0.17509207129478455, -0.08277300000190735, 0.38349395990371704, -0.11504576355218887, -0.17537367343902588, -0.08879829198122025, 0.4613130986690521, -0.09067429602146149, -0.5524259805679321, 0.6948622465133667, -0.5387222766876221, 0.25632378458976746, -0.05148150399327278, -0.43787261843681335, -0.1771332025527954, 0.48216041922569275, -0.8161891102790833, 1.1630923748016357, 0.45093703269958496, -0.8367512226104736, 0.5670465230941772, -0.6203024387359619, -0.6488910913467407, 0.06386411935091019, 0.0875006765127182, -0.7371160387992859, 0.007782652974128723, 0.24151699244976044, 0.4155181050300598, -0.22616517543792725, 0.28004831075668335, -0.17210234701633453, -0.24239622056484222, -0.06812185794115067, -0.1845487505197525, 0.7614009380340576, -0.15780635178089142, -0.43942877650260925, -0.17668700218200684, -1.130842685699463, -0.04387513920664787, 0.10134503245353699, -0.1937030851840973, -0.35142502188682556, -0.176898792386055, 0.20902559161186218, 0.19134171307086945, 0.4651504456996918, -0.76218181848526, 0.2279939204454422, -0.44089972972869873, 0.4026334583759308, 0.6067643165588379, 0.009522528387606144, 0.47008204460144043, -0.19708597660064697, 0.4876824915409088, 0.17133595049381256, 0.21158455312252045, 0.3710227310657501, -0.18660899996757507, -0.9806153774261475, -0.3375798165798187, 0.6165493726730347, 0.5037267208099365, -0.4607703685760498, 0.4976794719696045, -0.3207850754261017, -0.6840829849243164, -0.5233246088027954, -0.25507140159606934, 0.474471777677536, 0.7775221467018127, 0.6985763311386108, -0.12336937338113785, -0.6559640765190125, -1.1633470058441162, 0.18349520862102509, 0.006881063804030418, -0.03898123651742935, 0.3717864453792572, 0.7461904883384705, -0.24985703825950623, 0.6386270523071289, -0.63385409116745, -0.30909302830696106, -0.12333624809980392, 0.09977447986602783, 0.9449092149734497, 0.49463120102882385, 0.5252556204795837, -0.6953902244567871, -0.6964669823646545, 0.02171160653233528, -0.5241436958312988, -0.10826528817415237, -0.030102815479040146, -0.09771937131881714, 0.0768786370754242, 0.5021486878395081, -0.3618358373641968, 0.3798709511756897, 0.4645625352859497, -0.44032418727874756, 0.3443250358104706, -0.21376323699951172, 0.12732675671577454, -1.42665433883667, -0.020866651087999344, 0.3971681594848633, -0.19134743511676788, -0.3771313726902008, -0.28652331233024597, 0.09394770115613937, 0.3793363869190216, -0.7608538866043091, 0.7387707233428955, -0.6509286761283875, 0.17177627980709076, 0.06454043835401535, -0.2994518280029297, 0.12432626634836197, 0.27008238434791565, 0.1262422651052475, 0.6137872934341431, 0.8265252709388733, -0.6798611879348755, 0.32899612188339233, 0.6002241373062134, -0.31275254487991333, 0.7586427927017212, -0.9734887480735779, -0.04297962784767151, -0.19211548566818237, 0.18664397299289703, -0.37369924783706665, -0.20504982769489288, 0.27707287669181824, -0.28565657138824463, 0.6336907744407654, -0.4282743036746979, -0.42061126232147217, -0.4432063698768616, 0.018018493428826332, 0.4182743430137634, 0.42720121145248413, -0.6775689721107483, 0.4930669665336609, 0.354590505361557, -0.009406083263456821, -0.5307079553604126, -0.7848736643791199, -0.21670746803283691, -0.39470452070236206, -0.4127840995788574, 0.7713825702667236, -0.25678160786628723, -0.11662376672029495, -0.214949831366539, -0.35858890414237976, -0.3824516534805298, -0.04763069376349449, 0.21188034117221832, 0.34751570224761963, -0.4022245407104492, -0.05521216616034508, 0.0565505251288414, -0.273545503616333, 0.038463085889816284, -0.002052003052085638, 0.5002676844596863, -0.3563094735145569, 0.05800902470946312, -0.434850811958313, -0.13161958754062653, 0.4748360812664032, 0.0863020047545433, 0.7527368664741516, 0.551661491394043, -0.6436798572540283, -0.1982736885547638, -0.4916408360004425, -0.4806637465953827, -0.5457301735877991, 0.4501190185546875, -0.5690551400184631, -0.6991610527038574, 0.5299823880195618, 0.18241432309150696, -0.05854210630059242, 0.7651621103286743, 0.4041454792022705, -0.09138292819261551, 1.0305920839309692, 0.6920164227485657, -0.210388645529747, 0.27276167273521423, -0.5506076812744141, 0.09026911109685898, -1.1414940357208252, -0.3470495045185089, -0.44495251774787903, -0.5257927179336548, -0.781277596950531, 0.08391576260328293, 0.2785051763057709, 0.12053316086530685, -0.5912467241287231, 0.8232899308204651, -0.8057293891906738, 0.6076675057411194, 0.4952680766582489, 0.09404806047677994, 0.1676958203315735, 0.18730026483535767, -0.0981280580163002, -0.24972233176231384, -0.6326103210449219, -0.45942777395248413, 0.9027637243270874, 0.2549290657043457, 0.7480554580688477, 0.03212525323033333, 0.6299213171005249, -0.11561980843544006, 0.4221328794956207, -0.546710193157196, 0.31131938099861145, -0.28029653429985046, -0.8052105903625488, -0.07330222427845001, -0.3592231869697571, -1.0281929969787598, -0.07299892604351044, -0.2319842278957367, -0.7307328581809998, 0.09120965749025345, 0.023196598514914513, -0.2764492332935333, 0.31796589493751526, -0.5133070349693298, 0.9766025543212891, -0.3957178592681885, -0.08362706750631332, 0.2694615423679352, -0.5871257781982422, -0.11105749756097794, -0.04264817014336586, -0.038031917065382004, -0.24510271847248077, 0.09228086471557617, 0.822136402130127, -0.4828340709209442, 0.7070093154907227, -0.23106350004673004, 0.14002376794815063, 0.1714349091053009, -0.15731795132160187, 0.3845031261444092, 0.3304545283317566, -0.4610332250595093, 0.5998616218566895, -0.07696390897035599, -0.14059849083423615, -0.3053465783596039, 0.741784393787384, -0.7323580980300903, -0.17121276259422302, -0.758066713809967, -0.4097517132759094, -0.10663314908742905, 0.30538851022720337, 0.637922465801239, 0.5329474806785583, -0.3368397355079651, 0.38444164395332336, 0.6196917295455933, -0.1498410701751709, 0.3938326835632324, 0.820065975189209, 0.15313996374607086, -0.5430473685264587, 0.6874175071716309, 0.05578750744462013, -0.02357710897922516, 0.43628859519958496, 0.23242975771427155, -0.4530359208583832, -0.5138878226280212, -0.5701407790184021, 0.20431774854660034, -0.4709835946559906, -0.35671791434288025, -0.6602026224136353, -0.4486159086227417, -0.2176457792520523, -0.07869166135787964, -0.4863889515399933, -0.3243568539619446, -0.5567231178283691, -0.33583757281303406, 0.8110498189926147, 0.5791651010513306, -0.07208050787448883, 0.4952712953090668, -0.5327581763267517, 0.24711771309375763, -0.2485274374485016, 0.44481828808784485, -0.4079190790653229, -0.8504127264022827, -0.131216362118721, 0.33078113198280334, -0.21012626588344574, -0.6565809845924377, 0.5282003879547119, 0.2879229187965393, 0.5005146861076355, -0.08645489811897278, 0.011892811395227909, 0.6751542091369629, -0.6853001117706299, 0.504254162311554, 0.41990312933921814, -0.5699217319488525, 0.6294189691543579, -0.3109142780303955, 0.20997926592826843, 1.0418444871902466, 0.6851698160171509, -0.42584508657455444, -0.1597571223974228, -0.7945191860198975, -1.4369162321090698, 0.7126734256744385, 0.13989107310771942, 0.30671048164367676, -0.16358476877212524, 0.3656749725341797, 0.2202184647321701, 0.164941668510437, -0.9668204188346863, -0.6449130773544312, 0.08272869139909744, -0.41128650307655334, -0.04881109669804573, 0.04340500012040138, -0.06720834970474243, -0.7121115922927856, 1.1389613151550293, -0.07670222222805023, -0.31861501932144165, 0.32654353976249695, -0.030804937705397606, 0.15616175532341003, 0.04923630878329277, 0.25252094864845276, 0.3542971909046173, -0.4918670952320099, -0.3679674565792084, 0.40488797426223755, -0.563808262348175, 0.18856237828731537, 0.28171467781066895, -0.5243794322013855, 0.3286125957965851, -0.10089534521102905, 1.1618220806121826, 0.21342521905899048, -0.16563399136066437, 0.5760239958763123, -0.3466038107872009, -0.5648221969604492, -0.7074539661407471, -0.19096587598323822, 0.036320943385362625, 0.2487974613904953, 0.2693754732608795, 0.11505399644374847, 0.13208915293216705, -0.031275056302547455, 0.23210108280181885, 0.2113121896982193, -0.7044631242752075, -0.40850523114204407, 0.6385589838027954, 0.019200267270207405, -0.29887253046035767, 0.8603903651237488, -0.3911336064338684, -0.34167206287384033, 0.8512329459190369, 0.6585809588432312, 0.8979458212852478, 0.1647409051656723, 0.12034807354211807, 0.9844764471054077, 0.37934765219688416, -0.20770470798015594, 0.4881589114665985, 0.3630961775779724, -0.6142897009849548, -0.258832186460495, -0.9710025191307068, -0.27883127331733704, 0.4862934648990631, -0.8685227632522583, 0.7051180005073547, -0.4856726825237274, -0.43510785698890686, 0.061279721558094025, -0.09855879843235016, -1.0389443635940552, 0.45962274074554443, 0.036699045449495316, 0.8600842356681824, -0.8639760613441467, 0.4558471143245697, 0.9425108432769775, -0.5573020577430725, -1.0055972337722778, -0.3080543279647827, -0.17207734286785126, -0.3169535994529724, 0.6983221173286438, 0.27258679270744324, 0.18831832706928253, 0.13854900002479553, -0.365454763174057, -1.1798138618469238, 1.2276721000671387, 0.32631823420524597, -0.9750207662582397, 0.26673364639282227, 0.06929509341716766, 0.591302216053009, -0.2725382447242737, 0.5947250723838806, 0.4183615446090698, 0.4811060428619385, 0.06910891830921173, -0.9448145031929016, -0.005968190263956785, -0.45679137110710144, -0.2723256051540375, 0.2722551226615906, -0.7313723564147949, 0.8350247740745544, -0.037573814392089844, -0.03172014281153679, 0.03043818101286888, 0.6451491117477417, 0.3858645260334015, 0.36303114891052246, 0.5253351926803589, 0.9982771277427673, 0.7178156971931458, -0.3499455749988556, 0.736867368221283, -0.5203303694725037, 0.6049838066101074, 1.3357579708099365, -0.3662225008010864, 0.6281650066375732, 0.5255341529846191, -0.14944659173488617, 0.6404852271080017, 0.8549069166183472, -0.4735065698623657, 0.6762518286705017, 0.44536152482032776, -0.261098176240921, 0.09062564373016357, -0.07156188040971756, -0.6327924728393555, 0.34540417790412903, 0.16851906478405, -0.20900338888168335, -0.17077286541461945, -0.2536805272102356, 0.11371149867773056, -0.1385735124349594, -0.24261577427387238, 0.617938220500946, 0.048318393528461456, -0.5696452856063843, 0.7192755341529846, -0.04495874419808388, 1.1128146648406982, -0.4932485520839691, 0.020905567333102226, -0.2505754828453064, 0.3127698302268982, -0.31278547644615173, -0.6015727519989014, 0.2060984969139099, 0.03904898464679718, -0.48721444606781006, -0.31497326493263245, 0.441531777381897, -0.3661072254180908, -0.9439271092414856, 0.3449646532535553, 0.22462919354438782, 0.15437206625938416, 0.1476520299911499, -0.7788955569267273, -0.2723901569843292, -0.17474853992462158, -0.4763162136077881, 0.13662706315517426, 0.3972872495651245, -0.0728650689125061, 0.42908477783203125, 0.708528995513916, 0.14235244691371918, -0.07850466668605804, 0.47266316413879395, 0.7948745489120483, -0.44248050451278687, -0.2908589839935303, -0.8071202039718628, 0.7422717213630676, -0.32165277004241943, -0.8553528189659119, 0.5090318918228149, 1.0020956993103027, 1.1838514804840088, -0.16298751533031464, 0.5583769083023071, -0.2835860550403595, 0.278269499540329, -0.3644769787788391, 0.8152813911437988, -0.752159833908081, -0.0676988959312439, -0.23722848296165466, -1.0533483028411865, -0.18450143933296204, 0.7298879027366638, -0.09923120588064194, 0.06744492799043655, 0.7327319383621216, 1.0252187252044678, -0.4272717535495758, -0.24424219131469727, -0.06527677178382874, 0.4090551435947418, -0.04855581745505333, 0.4733032286167145, 0.5002385377883911, -0.9317357540130615, 0.26831331849098206, -0.6418450474739075, -0.2789038121700287, 0.01084826234728098, -1.055056095123291, -0.821278989315033, -0.44074854254722595, -0.818541944026947, -0.613863468170166, -0.05734052509069443, 0.7477282285690308, 0.7519885301589966, -0.973659336566925, -0.16402307152748108, -0.2159142792224884, -0.1581934541463852, -0.06985858082771301, -0.19218359887599945, 0.2348240464925766, 0.0819055438041687, -0.9180871844291687, 0.44986656308174133, 0.005335899069905281, 0.25288447737693787, 0.18194442987442017, -0.2310304194688797, -0.17070387303829193, -0.3404565453529358, 0.2741870880126953, 0.30947887897491455, -0.388565331697464, -0.15287409722805023, 0.1779325306415558, -0.2693968713283539, 0.1727803349494934, 0.2120368629693985, -0.4687269926071167, 0.14046889543533325, 0.418594092130661, 0.23620536923408508, 0.742550790309906, -0.4608367383480072, 0.4698999524116516, -1.016992211341858, 0.334463506937027, 0.37982943654060364, 0.7007840871810913, 0.6769934892654419, -0.32650232315063477, 0.873664379119873, 0.12664012610912323, -0.42237406969070435, -0.8066678047180176, -0.16394983232021332, -1.0690605640411377, 0.16149765253067017, 1.3677804470062256, 0.1777663230895996, -0.4149322211742401, 0.36584439873695374, -0.23504088819026947, 0.45909056067466736, -0.37607645988464355, 0.5174841284751892, 0.7060663104057312, 0.3157494366168976, 0.3002921938896179, -0.630495548248291, 0.2870265245437622, 0.4226813316345215, -0.4333426058292389, -0.4121018648147583, 0.33744016289711, 0.5806657671928406, 0.04153194651007652, 0.6040205359458923, -0.21107622981071472, 0.010628712363541126, -0.17786720395088196, 0.45389437675476074, 0.046592678874731064, -0.20557783544063568, -0.26563963294029236, -0.44559556245803833, -0.225424125790596, -0.21071571111679077 ]
BAAI/bge-large-zh-v1.5
BAAI
"2023-10-12T03:34:16Z"
25,985
105
transformers
[ "transformers", "pytorch", "safetensors", "bert", "feature-extraction", "zh", "arxiv:2310.07554", "arxiv:2309.07597", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
feature-extraction
"2023-09-12T05:22:11Z"
--- license: mit language: - zh --- <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.
[ -0.4917970299720764, -0.9121562242507935, 0.39335909485816956, 0.15926150977611542, -0.3644159436225891, -0.27619844675064087, -0.3187490701675415, -0.2546616792678833, 0.4034213423728943, 0.3811470866203308, -0.3493821918964386, -0.8789252638816833, -0.48434871435165405, -0.061868757009506226, -0.08562654256820679, 0.5569250583648682, -0.05040394887328148, 0.14363285899162292, 0.052729532122612, -0.25072580575942993, -0.38095730543136597, -0.25557446479797363, -0.6599745154380798, -0.2580225467681885, 0.3454954922199249, 0.22898080945014954, 0.5664677023887634, 0.7565454244613647, 0.29929855465888977, 0.27112576365470886, -0.23612339794635773, 0.1565926969051361, -0.47967153787612915, -0.06917298585176468, -0.20805604755878448, -0.33379724621772766, -0.4219249486923218, 0.1771097332239151, 0.6846937537193298, 0.45031237602233887, -0.10390447080135345, 0.10425695776939392, 0.00692377844825387, 0.71429044008255, -0.46325114369392395, 0.27861225605010986, -0.5734079480171204, 0.03648480027914047, -0.24258849024772644, 0.1513890027999878, -0.5183275938034058, -0.3853422999382019, 0.1603473275899887, -0.6159512400627136, 0.08287999778985977, 0.2900417149066925, 1.307506799697876, 0.20688290894031525, -0.45559000968933105, -0.16615848243236542, -0.12169365584850311, 0.994102954864502, -1.0095791816711426, 0.6872597932815552, 0.5090594291687012, 0.25554022192955017, -0.0781526267528534, -0.8174024224281311, -0.3616727888584137, -0.16660532355308533, -0.20328503847122192, 0.4233214557170868, 0.0256485752761364, 0.019987745210528374, 0.3170413672924042, 0.5985334515571594, -0.5553396344184875, 0.0947275385260582, -0.06872905045747757, -0.15926045179367065, 0.7642083168029785, -0.1649675816297531, 0.45869553089141846, -0.5581547021865845, -0.29989349842071533, -0.3680296242237091, -0.8007943630218506, 0.04600268974900246, 0.3670075833797455, 0.137363001704216, -0.39358171820640564, 0.5685566663742065, -0.22973068058490753, 0.6109962463378906, 0.05062193423509598, 0.0516192652285099, 0.5265907049179077, -0.374182790517807, -0.20757225155830383, -0.14727148413658142, 0.9336583018302917, 0.3954954743385315, -0.057964473962783813, 0.05175301060080528, -0.32384660840034485, -0.09511028230190277, -0.09334386885166168, -0.8982179164886475, -0.24408532679080963, 0.19886384904384613, -0.7663068175315857, -0.18192589282989502, 0.23823782801628113, -0.7802329063415527, 0.10407708585262299, 0.0016007493250072002, 0.585857629776001, -0.7480831146240234, -0.07390255481004715, 0.31346237659454346, -0.2118411660194397, 0.4023590385913849, -0.003231465583667159, -0.6287349462509155, -0.24859385192394257, 0.5332337617874146, 0.860173761844635, 0.16767533123493195, -0.07676992565393448, -0.3748384118080139, 0.03796732425689697, -0.1430635154247284, 0.3286088705062866, -0.5217965245246887, -0.17894569039344788, 0.21137920022010803, 0.38862374424934387, -0.10362780094146729, -0.291079580783844, 0.8852188587188721, -0.5387099981307983, 0.36164164543151855, -0.3797711431980133, -0.8259833455085754, -0.503160297870636, 0.09275687485933304, -0.8069127202033997, 1.1115566492080688, -0.09858797490596771, -0.8519017696380615, 0.08340819180011749, -0.6473492980003357, -0.21710936725139618, -0.25654977560043335, -0.033439960330724716, -0.6009854674339294, -0.11823835223913193, 0.38206779956817627, 0.586105227470398, -0.22970585525035858, 0.03495078533887863, -0.3490271270275116, -0.5734331607818604, -0.007032394874840975, -0.23192544281482697, 1.0995248556137085, 0.2569870948791504, -0.3371439576148987, -0.2211025208234787, -0.43995827436447144, 0.12060470134019852, 0.3049491047859192, -0.3136955797672272, -0.34632110595703125, 0.22229573130607605, 0.23741373419761658, 0.0519283302128315, 0.532094419002533, -0.7079308032989502, 0.18408465385437012, -0.5881211161613464, 0.596612274646759, 0.5611453056335449, 0.17341366410255432, 0.24086976051330566, -0.4767483174800873, 0.28925153613090515, -0.023568883538246155, -0.03820270299911499, -0.2231236845254898, -0.5332085490226746, -0.6302730441093445, -0.3037233054637909, 0.7439141869544983, 0.6626705527305603, -0.8764532208442688, 0.6678094267845154, -0.4590986669063568, -0.6218410730361938, -0.9469890594482422, 0.13509726524353027, 0.5358606576919556, 0.002314120065420866, 0.7215077877044678, -0.13861384987831116, -0.4815653860569, -0.938438355922699, -0.06217969208955765, 0.07854179292917252, -0.09143476188182831, 0.5395910739898682, 0.617742121219635, -0.3207966387271881, 0.4096141755580902, -0.7361123561859131, -0.35045313835144043, -0.23097604513168335, -0.07369431853294373, 0.34056612849235535, 0.49303698539733887, 0.6417325735092163, -1.0118588209152222, -0.5865143537521362, -0.008065720088779926, -0.7820898294448853, 0.07667311280965805, 0.036675386130809784, -0.30095741152763367, 0.17536960542201996, 0.612797737121582, -0.4129248559474945, 0.23894579708576202, 0.47879064083099365, -0.25913238525390625, 0.2828845679759979, -0.02090475521981716, 0.14730790257453918, -1.330299973487854, 0.022242818027734756, 0.30332544445991516, -0.11486539244651794, -0.27505314350128174, 0.5225419402122498, 0.17051756381988525, 0.2073279321193695, -0.34719759225845337, 0.5901947021484375, -0.5294108390808105, 0.25197452306747437, 0.12947365641593933, 0.6173920035362244, -0.0899772047996521, 0.5147316455841064, -0.04709700495004654, 0.7206954956054688, 0.37333211302757263, -0.4015792906284332, 0.12459217011928558, 0.5308554172515869, -0.44731444120407104, 0.08171137422323227, -0.6624714732170105, -0.07638781517744064, -0.07412522286176682, 0.16863416135311127, -0.8326302170753479, -0.0733034536242485, 0.26644769310951233, -0.5769767761230469, 0.5308395624160767, -0.3013218343257904, -0.49975740909576416, -0.3710670471191406, -0.9166911840438843, 0.1475072205066681, 0.5871821641921997, -0.6514768600463867, 0.22120033204555511, 0.2969546318054199, 0.09350575506687164, -0.7782111763954163, -0.8228302001953125, -0.15640223026275635, -0.002264339243993163, -0.5303692817687988, 0.5489431023597717, -0.02883104979991913, 0.25723689794540405, 0.19024287164211273, -0.07193037867546082, 0.15140888094902039, 0.11663859337568283, -0.0029365697409957647, 0.24749252200126648, -0.4802510738372803, 0.0476856529712677, 0.275939404964447, 0.1315978318452835, -0.19963866472244263, -0.16270552575588226, 0.44453224539756775, -0.1731950342655182, -0.35953885316848755, -0.2387179136276245, 0.34303024411201477, 0.2581000030040741, -0.4079892933368683, 0.5978900790214539, 0.9997373223304749, -0.37799617648124695, -0.08413289487361908, -0.6667248010635376, -0.12422462552785873, -0.4862056374549866, 0.4579135477542877, -0.32667216658592224, -0.9906607270240784, 0.3992321789264679, -0.020395895466208458, 0.218032568693161, 0.6829168200492859, 0.3386148512363434, -0.1428033858537674, 1.0860356092453003, 0.3779831826686859, -0.2722134292125702, 0.6689903140068054, -0.6675193309783936, 0.17887775599956512, -1.1849076747894287, -0.04504662752151489, -0.39903220534324646, -0.39822685718536377, -1.3405680656433105, -0.5106154680252075, 0.06238797679543495, 0.2820959985256195, -0.38379231095314026, 0.4338037371635437, -0.5777703523635864, 0.15388894081115723, 0.48900970816612244, 0.2991540729999542, -0.018452363088726997, 0.12543046474456787, -0.4379253685474396, -0.27333033084869385, -0.615394115447998, -0.5130186676979065, 1.0093634128570557, 0.48818039894104004, 0.6184115409851074, 0.36703652143478394, 0.8317365050315857, 0.1904895156621933, 0.09796921163797379, -0.780764639377594, 0.5773665308952332, -0.5281172394752502, -0.5766896605491638, -0.3623805642127991, -0.4928167462348938, -1.1266753673553467, 0.40084049105644226, -0.27620500326156616, -0.7827890515327454, 0.10814967751502991, -0.19935756921768188, -0.030741354450583458, 0.47183531522750854, -0.6826187968254089, 1.0363374948501587, -0.10903039574623108, -0.3109346330165863, -0.07844258099794388, -0.4234257936477661, 0.32927194237709045, 0.20091412961483002, 0.08322131633758545, 0.07470317929983139, -0.26243671774864197, 0.7681471109390259, -0.18991416692733765, 0.6442910432815552, -0.1636548787355423, 0.15086346864700317, 0.4350244402885437, -0.18594372272491455, 0.5594721436500549, 0.08093002438545227, -0.18204768002033234, 0.30464738607406616, 0.09054489433765411, -0.48835110664367676, -0.5022341012954712, 0.8901168704032898, -0.6806955933570862, -0.7152196168899536, -0.3792705833911896, -0.25338515639305115, 0.18115606904029846, 0.4426770508289337, 0.3571534752845764, 0.22144240140914917, -0.10434862226247787, 0.6539531946182251, 0.9369509220123291, -0.5519316792488098, 0.38803672790527344, 0.350559264421463, -0.2768425941467285, -0.5992287993431091, 1.1354446411132812, 0.2656397819519043, -0.05330642685294151, 0.6816064715385437, 0.01351808663457632, -0.28277260065078735, -0.5373090505599976, -0.4611698389053345, 0.6434146165847778, -0.600497305393219, -0.16940733790397644, -0.6488251090049744, -0.4323805570602417, -0.43788644671440125, 0.022176872938871384, -0.2742101550102234, -0.2864987552165985, -0.18045517802238464, -0.28421303629875183, 0.23849305510520935, 0.48024874925613403, 0.12320030480623245, 0.08978405594825745, -0.7190878391265869, 0.21328915655612946, -0.09880057722330093, 0.4449179470539093, 0.07253655791282654, -0.546136736869812, -0.6290742754936218, 0.17635180056095123, -0.4961189925670624, -1.097845196723938, 0.3527429401874542, 0.0763259083032608, 0.8483840823173523, 0.3333483338356018, -0.01122608594596386, 0.41526830196380615, -0.5310884118080139, 1.081298828125, -0.10962003469467163, -0.7951414585113525, 0.5159289240837097, -0.28411999344825745, 0.16692203283309937, 0.5661880970001221, 0.6615703105926514, -0.46920469403266907, -0.27738773822784424, -0.4974641799926758, -0.9762814044952393, 0.49247539043426514, 0.1843331754207611, 0.043226901441812515, -0.3003985583782196, 0.3328987658023834, -0.18441903591156006, -0.0023139920085668564, -0.8095731139183044, -0.7547932863235474, -0.33806613087654114, -0.35643884539604187, -0.0979190468788147, -0.28025397658348083, 0.20887281000614166, -0.29385653138160706, 1.0127955675125122, 0.004170624539256096, 0.5556016564369202, 0.36256203055381775, -0.33087679743766785, 0.24234871566295624, 0.25593316555023193, 0.30133670568466187, 0.18955889344215393, -0.3912491500377655, -0.14632770419120789, 0.3187618851661682, -0.5581767559051514, -0.06475118547677994, 0.31365451216697693, -0.47415584325790405, 0.19585788249969482, 0.3093602955341339, 0.7157406806945801, 0.45411843061447144, -0.4482158422470093, 0.5723576545715332, 0.11585415154695511, -0.19031701982021332, -0.3024125397205353, -0.07244732975959778, 0.3090818226337433, 0.25450772047042847, 0.11810966581106186, -0.4614958167076111, 0.26804250478744507, -0.5359582901000977, 0.3429628610610962, 0.45435860753059387, -0.38470590114593506, -0.0678970068693161, 0.70831298828125, 0.034975845366716385, -0.021308057010173798, 0.4843420386314392, -0.5078408718109131, -0.7446918487548828, 0.4296441674232483, 0.3791488707065582, 0.8493991494178772, -0.1474267691373825, 0.2266235500574112, 0.8720858097076416, 0.5383305549621582, -0.32331085205078125, 0.36064058542251587, 0.07824323326349258, -0.5908493399620056, -0.4484456181526184, -0.5486404895782471, -0.05894216150045395, 0.26951584219932556, -0.5846852660179138, 0.35474514961242676, -0.4215252995491028, -0.1495818942785263, 0.031722791492938995, 0.44416430592536926, -0.7529358863830566, 0.1280055046081543, 0.0456489622592926, 1.1375863552093506, -0.5906219482421875, 0.8449050188064575, 1.0035991668701172, -0.969935953617096, -0.7814849615097046, 0.08019335567951202, -0.13211701810359955, -0.6157646775245667, 0.37970051169395447, 0.2669503688812256, 0.1790168732404709, 0.0628160610795021, -0.4824950397014618, -0.9240347146987915, 1.586942195892334, 0.038656748831272125, -0.5351653695106506, -0.0627468153834343, -0.2851398289203644, 0.4628412127494812, -0.3825380802154541, 0.451323926448822, 0.41685330867767334, 0.6175791025161743, -0.18728259205818176, -0.6515793204307556, 0.5485309958457947, -0.3199205994606018, 0.23725971579551697, 0.04955912381410599, -0.984024703502655, 0.8381196856498718, 0.046198565512895584, -0.3352476954460144, 0.19697697460651398, 0.731243908405304, 0.2325790673494339, 0.42402613162994385, 0.24393317103385925, 0.9391081929206848, 0.6669497489929199, -0.22529436647891998, 1.1691102981567383, -0.26123324036598206, 0.635422945022583, 0.8789224624633789, 0.17103832960128784, 1.1311215162277222, 0.08972802758216858, -0.2383190542459488, 0.6788000464439392, 0.8010855317115784, -0.32304438948631287, 0.4705699682235718, 0.018947070464491844, 0.06136717274785042, -0.3231780230998993, 0.05400153994560242, -0.5413292646408081, 0.29115355014801025, 0.3292744755744934, -0.5224844217300415, 0.04530218616127968, -0.29604601860046387, 0.12072090059518814, 0.10746816545724869, -0.022620033472776413, 0.5829463005065918, 0.3159216642379761, -0.47084447741508484, 0.672248899936676, 0.23842239379882812, 1.0218559503555298, -0.4089002311229706, -0.15431565046310425, -0.28587907552719116, -0.11535292118787766, -0.22934561967849731, -0.790655791759491, -0.08192181587219238, -0.26000723242759705, -0.2086254209280014, 0.08522395044565201, 0.5456407070159912, -0.6298020482063293, -0.4112842082977295, 0.5716066360473633, 0.5203923583030701, 0.2451905906200409, 0.18083496391773224, -1.1097532510757446, 0.03155858442187309, 0.38683757185935974, -0.5384969115257263, 0.31043702363967896, 0.47696754336357117, -0.06284209340810776, 0.5959566235542297, 0.5904459357261658, 0.06490226835012436, -0.01969398558139801, 0.04061232879757881, 0.5199528932571411, -0.9449971914291382, -0.3085385859012604, -0.6386343240737915, 0.3643895387649536, -0.3301919102668762, 0.0221808310598135, 0.8165912628173828, 0.7114246487617493, 1.084007740020752, -0.05303525552153587, 0.8228715658187866, -0.11570622026920319, 0.41215577721595764, -0.6082319021224976, 0.9007401466369629, -1.0377278327941895, 0.2609661817550659, -0.35725247859954834, -0.9467119574546814, -0.15897879004478455, 0.707438588142395, -0.3395439088344574, 0.23371893167495728, 0.6871347427368164, 0.9879443645477295, -0.25833117961883545, -0.1929139345884323, 0.3111801743507385, 0.44082456827163696, 0.15963251888751984, 0.8009560704231262, 0.3490568697452545, -0.9881619811058044, 0.6472155451774597, -0.2394942045211792, 0.12903288006782532, -0.525607705116272, -0.6428669691085815, -0.931767463684082, -0.7401321530342102, -0.42517736554145813, -0.30864813923835754, -0.04586928337812424, 0.9298316240310669, 0.34564995765686035, -0.7558746337890625, -0.06993477046489716, 0.2788669466972351, 0.4898790717124939, -0.2695677578449249, -0.27795010805130005, 0.6664249300956726, -0.07666083425283432, -0.9447400569915771, 0.3316705524921417, -0.08436305820941925, -0.06884507834911346, -0.05372384190559387, -0.24726758897304535, -0.8908063173294067, 0.12003599107265472, 0.6033106446266174, 0.25743740797042847, -0.9210304021835327, -0.4236951172351837, 0.085548996925354, -0.26322922110557556, -0.1556014120578766, 0.17063041031360626, -0.41602054238319397, 0.36280158162117004, 0.6252936124801636, 0.7770823240280151, 0.6671158671379089, -0.04740946739912033, 0.20530149340629578, -0.6183277368545532, -0.08610108494758606, -0.042357608675956726, 0.7162543535232544, 0.36767950654029846, -0.30395805835723877, 0.910102903842926, 0.2162483185529709, -0.4089943766593933, -0.7599421739578247, 0.03271307051181793, -1.0642472505569458, -0.3319217562675476, 1.127224326133728, -0.42954444885253906, -0.25271299481391907, 0.27581310272216797, -0.19327957928180695, 0.5534521341323853, -0.49581798911094666, 0.47473666071891785, 0.8054698705673218, 0.438792884349823, -0.15727850794792175, -0.9182953238487244, 0.315695583820343, 0.6267865896224976, -0.2778308391571045, -0.342660516500473, 0.3409629166126251, 0.48798197507858276, 0.2409132719039917, 0.11801017075777054, -0.24918068945407867, 0.32204949855804443, -0.07588997483253479, -0.008661134168505669, -0.1395338475704193, 0.2484905868768692, -0.18418358266353607, 0.0261821448802948, -0.16862145066261292, -0.31124991178512573 ]
nlpaueb/bert-base-uncased-contracts
nlpaueb
"2022-04-28T14:43:56Z"
25,971
13
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: "This [MASK] Agreement is between General Motors and John Murray." --- # 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 sub-domain variant pre-trained on US contracts. <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/bert-base-uncased-contracts") model = AutoModel.from_pretrained("nlpaueb/bert-base-uncased-contracts") ``` ## 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) |
[ -0.26346102356910706, -0.5934889316558838, 0.42464327812194824, 0.0954173132777214, -0.396665096282959, -0.17190484702587128, -0.0789230689406395, -0.5918699502944946, 0.46446940302848816, 0.6736167073249817, -0.2547263503074646, -0.5623379945755005, -0.5215285420417786, -0.0863867923617363, -0.3244110941886902, 1.236395001411438, 0.14333920180797577, 0.09022460132837296, 0.22344881296157837, -0.2620156407356262, -0.31322503089904785, -0.8274192214012146, -0.36566728353500366, 0.017616063356399536, 0.5300968885421753, 0.12216006964445114, 0.5280464291572571, 0.5012930035591125, 0.37633177638053894, 0.25349077582359314, -0.20703306794166565, -0.15285009145736694, -0.3084850311279297, -0.1619553565979004, -0.18629921972751617, -0.2934713065624237, -0.7379521727561951, 0.23423096537590027, 0.2596675157546997, 0.5614124536514282, -0.5163872838020325, 0.24534225463867188, -0.266731858253479, 0.739745020866394, -0.5477136969566345, -0.08756021410226822, -0.6377158164978027, 0.10334707796573639, -0.16360102593898773, 0.1022968739271164, -0.2722393274307251, -0.3082277476787567, 0.07729045301675797, -0.7018481492996216, 0.1759694665670395, 0.29403156042099, 1.2577898502349854, 0.07476145029067993, -0.395222932100296, -0.575407087802887, -0.37811461091041565, 0.5980405211448669, -0.8747934103012085, 0.33488303422927856, 0.4351319670677185, 0.04120521619915962, -0.2835681140422821, -0.9419629573822021, -0.6747549176216125, -0.46985727548599243, -0.17868401110172272, 0.3479940891265869, -0.4103285074234009, 0.016048230230808258, 0.47935187816619873, 0.4478912055492401, -0.7391403317451477, 0.020830456167459488, -0.6397911906242371, -0.5546966195106506, 0.8499663472175598, 0.028912968933582306, 0.22816278040409088, -0.23629049956798553, -0.4481387138366699, 0.013860673643648624, -0.716526210308075, 0.38951683044433594, 0.754023551940918, 0.20540311932563782, -0.29506340622901917, 0.7115987539291382, -0.06398522853851318, 0.4582226872444153, -0.05184689909219742, -0.009670248255133629, 0.3944729268550873, -0.5263229608535767, -0.32166436314582825, -0.030381590127944946, 0.94878751039505, 0.3315393626689911, -0.03452093526721001, -0.05617306008934975, -0.252634197473526, -0.03258040174841881, 0.25524279475212097, -0.5607572197914124, -0.08678736537694931, 0.46833494305610657, -0.6804327368736267, -0.34650683403015137, 0.1561555564403534, -0.6632480025291443, -0.1409093141555786, -0.1072145402431488, 0.4156874418258667, -0.5476219058036804, -0.09460621327161789, 0.14483697712421417, -0.328658789396286, 0.6600444316864014, 0.04564185440540314, -0.7868403792381287, 0.157216414809227, 0.4815766215324402, 0.4746677577495575, 0.30939140915870667, -0.0657152608036995, -0.6034665703773499, 0.1639472246170044, -0.30131810903549194, 0.528789222240448, -0.4828338325023651, -0.263297438621521, 0.1120137870311737, 0.20094425976276398, -0.035695429891347885, -0.33501991629600525, 0.6309959292411804, -0.6402481198310852, 0.2576668858528137, -0.25582075119018555, -0.4963360130786896, -0.21438142657279968, 0.24935580790042877, -0.5861451029777527, 0.7699719667434692, -0.050553470849990845, -0.7048173546791077, 0.6335753202438354, -0.9967743754386902, -0.4236491322517395, -0.027471749112010002, -0.11834435164928436, -0.47935786843299866, -0.39399254322052, -0.00539349066093564, 0.4180191159248352, -0.17873439192771912, 0.4512564539909363, -0.3409983515739441, -0.10014289617538452, 0.2387118637561798, -0.09367358684539795, 1.4573345184326172, 0.5452551245689392, -0.3707037568092346, 0.1560082882642746, -0.8841193914413452, -0.166414275765419, 0.21372511982917786, -0.6143142580986023, -0.08191580325365067, -0.25289037823677063, -0.07909037172794342, 0.2320972979068756, 0.3108181357383728, -0.7240898013114929, 0.13593387603759766, -0.5479896068572998, 0.7077240943908691, 0.5409114360809326, 0.05452597513794899, 0.20822685956954956, -0.3876078128814697, 0.6583101749420166, 0.07344219088554382, 0.13196569681167603, -0.017279040068387985, -0.649739682674408, -0.7459797859191895, -0.1571667492389679, 0.801982581615448, 0.8452817797660828, -0.2963569164276123, 0.621362030506134, -0.12188395857810974, -0.5695686936378479, -0.556747555732727, -0.20743867754936218, 0.34407317638397217, 0.36566242575645447, 0.2621629536151886, -0.370449036359787, -0.8917247653007507, -1.1976900100708008, -0.3144891560077667, -0.21811455488204956, 0.07892842590808868, 0.10340606421232224, 0.9966326951980591, -0.11608228832483292, 0.8242408037185669, -0.2230815589427948, -0.3275403082370758, -0.20992663502693176, 0.3355661630630493, 0.4974217414855957, 0.6569738388061523, 0.82903653383255, -0.6264798045158386, -0.49422988295555115, 0.13058418035507202, -0.7963173389434814, 0.34248778223991394, -0.029789969325065613, -0.2644869089126587, 0.28007182478904724, 0.2961849272251129, -0.5736315846443176, 0.5266004204750061, 0.12462710589170456, -0.4736272394657135, 0.7890737056732178, -0.524990975856781, -0.003434146521613002, -1.008786678314209, 0.22943370044231415, -0.16155092418193817, -0.24965210258960724, -0.635334312915802, 0.14516030251979828, 0.04225486144423485, -0.16674764454364777, -0.6531973481178284, 0.3068675696849823, -0.46984153985977173, -0.10285262763500214, 0.26785001158714294, -0.051731646060943604, -0.10346975177526474, 0.5740233063697815, -0.24127303063869476, 0.7731007933616638, 0.6996608972549438, -0.7419887185096741, 0.49676036834716797, 0.4473356008529663, -0.16367490589618683, 0.3947063982486725, -0.49979156255722046, 0.04378049075603485, -0.13943089544773102, 0.08480635285377502, -0.5516127347946167, -0.17846740782260895, 0.5046015381813049, -0.4812038838863373, 0.20104564726352692, -0.21934397518634796, -0.45870980620384216, -0.5024389028549194, -0.403999924659729, -0.20664452016353607, 0.6440165042877197, -0.17792612314224243, 0.6474020481109619, 0.6247658133506775, -0.14023591578006744, -0.9308438897132874, -0.8616995811462402, 0.19538863003253937, -0.25810280442237854, -0.5526780486106873, 0.38669639825820923, 0.04194257780909538, -0.12926451861858368, 0.3097415566444397, 0.15751834213733673, -0.3454095125198364, 0.06415913999080658, 0.13901551067829132, 0.0484948456287384, -0.22143124043941498, -0.21816445887088776, -0.023297082632780075, 0.11299258470535278, 0.3043345510959625, -0.07277721166610718, 0.5035535097122192, -0.07965820282697678, -0.20566494762897491, -0.3055517077445984, 0.6355311274528503, 0.37880927324295044, -0.25552457571029663, 0.6517198085784912, 0.5226114988327026, -0.42041015625, 0.15998123586177826, -0.4514157474040985, 0.09040287137031555, -0.3977101147174835, 0.06264721602201462, -0.32200220227241516, -0.5535256862640381, 0.7968340516090393, 0.15586602687835693, 0.17800892889499664, 0.986100971698761, 0.6603135466575623, -0.204789400100708, 0.5309216976165771, 0.6888622045516968, -0.03152789920568466, 0.38233497738838196, -0.4682656526565552, 0.20606917142868042, -0.6693440675735474, -0.3798302114009857, -0.5068385601043701, -0.13751396536827087, -0.8782569169998169, -0.09569653868675232, 0.15803378820419312, -0.0803626999258995, -0.2164269983768463, 0.7380722761154175, -0.3504830300807953, 0.25306758284568787, 0.8199067711830139, 0.05274639651179314, 0.0847851112484932, -0.02959146536886692, -0.8003992438316345, 0.06311250478029251, -0.8656855225563049, -0.7995136380195618, 1.3038756847381592, 0.49200794100761414, 0.48963841795921326, 0.19530610740184784, 0.7356403470039368, 0.5737609267234802, 0.13761499524116516, -0.5487957000732422, 0.6364665627479553, -0.19182749092578888, -0.9982573390007019, -0.3432958424091339, -0.38003039360046387, -1.2530872821807861, 0.12014826387166977, -0.2610018253326416, -0.8650835156440735, 0.5236836671829224, -0.1925964504480362, -0.6696516275405884, 0.2819737195968628, -0.7301039695739746, 0.794075071811676, -0.32666343450546265, -0.28201135993003845, -0.30616873502731323, -0.8752400279045105, 0.42438995838165283, -0.021400298923254013, 0.34747281670570374, -0.141318216919899, 0.18322864174842834, 1.1395704746246338, -0.9741418361663818, 0.7834373116493225, -0.30427101254463196, -0.05356023088097572, 0.3629307150840759, -0.29977211356163025, 0.5030257701873779, 0.262188583612442, -0.24637584388256073, 0.07143478095531464, 0.26275718212127686, -0.25891056656837463, -0.10421715676784515, 0.3448321223258972, -0.6946137547492981, -0.5179063081741333, -0.838042140007019, -0.5841436386108398, 0.14145399630069733, 0.35223257541656494, 0.3805796802043915, 0.38803282380104065, -0.054042916744947433, 0.2688380479812622, 0.38173264265060425, -0.42656615376472473, 0.4211694002151489, 0.6909731030464172, -0.059059564024209976, -0.5292247533798218, 0.7060785293579102, 0.33530741930007935, -0.15156204998493195, 0.17033609747886658, -0.030278433114290237, -0.6465207934379578, -0.5193776488304138, -0.32304421067237854, 0.34706002473831177, -0.7979118227958679, -0.26851266622543335, -0.7325171232223511, -0.3101980686187744, -0.7524445652961731, 0.1496858447790146, -0.16782931983470917, -0.3170270323753357, -0.311813622713089, -0.008411255665123463, 0.3401183485984802, 0.7381453514099121, -0.270967960357666, -0.14959312975406647, -0.6505258083343506, 0.509385347366333, 0.3834523856639862, 0.360499769449234, -0.5132688879966736, -0.8756678104400635, -0.05748775601387024, 0.2889985144138336, -0.5423095226287842, -0.9437588453292847, 0.4636029005050659, 0.14938507974147797, 0.8042594790458679, 0.4426769018173218, 0.17828288674354553, 0.9526413083076477, -0.57832932472229, 1.0280829668045044, 0.2648678421974182, -1.0020264387130737, 0.7212594747543335, -0.2761994004249573, -0.42892366647720337, 0.35331711173057556, 0.592728316783905, -0.31363481283187866, -0.6550837159156799, -0.9676474332809448, -0.8091661334037781, 0.866060197353363, 0.5442138314247131, 0.16157054901123047, 0.2121281921863556, 0.4440785348415375, 0.05661912262439728, 0.37921202182769775, -0.9375475645065308, -0.35469165444374084, 0.0018385756993666291, 0.12822729349136353, 0.4855554699897766, -0.33473676443099976, -0.4154711663722992, -0.41321390867233276, 0.9303961992263794, 0.40202245116233826, 0.52418452501297, 0.436002641916275, -0.2688014805316925, 0.09937917441129684, 0.4867488741874695, 1.0168604850769043, 1.0060138702392578, -0.32963210344314575, -0.04742482304573059, 0.22948847711086273, -0.5381545424461365, 0.306753545999527, 0.4082086384296417, -0.14749284088611603, 0.1863531768321991, 0.1976330578327179, 0.7728751301765442, -0.02395215444266796, -0.6563830971717834, 0.5105483531951904, 0.0334336943924427, -0.8310872316360474, -0.6687350273132324, -0.1529386043548584, -0.12561862170696259, 0.4124177396297455, 0.32549113035202026, 0.02095990628004074, 0.2954873740673065, -0.7545705437660217, 0.3161032199859619, 0.369405061006546, -0.14221297204494476, 0.0020993289072066545, 0.8021580576896667, 0.036867380142211914, -0.04645611345767975, 0.31242606043815613, -0.6899081468582153, -0.527268648147583, 0.8002877235412598, 0.3963184356689453, 0.5744107365608215, -0.028232863172888756, 0.23552291095256805, 0.40995660424232483, 0.5675738453865051, -0.000002731773065534071, 0.6269725561141968, 0.26619797945022583, -0.5172483921051025, -0.19171808660030365, -0.5353711843490601, -0.2708183526992798, 0.30716386437416077, -0.6609551906585693, 0.23007048666477203, -0.41098475456237793, -0.3621789813041687, 0.051887594163417816, 0.08993599563837051, -0.688072144985199, 0.10837164521217346, 0.16641195118427277, 0.8422505855560303, -0.6720722317695618, 0.9887693524360657, 0.9102304577827454, -0.8504105806350708, -0.8705151677131653, -0.2931213974952698, -0.3305923044681549, -0.7651447653770447, 0.7060614824295044, -0.03681918978691101, 0.15397733449935913, -0.2538512051105499, -0.5642645359039307, -0.7239205241203308, 1.1424810886383057, 0.5180168151855469, -0.6622955203056335, 0.06737370789051056, 0.27162814140319824, 0.4676784873008728, -0.1751178652048111, 0.13189613819122314, 0.6913617849349976, 0.4328559935092926, 0.018152352422475815, -1.0091220140457153, 0.21861159801483154, -0.339762419462204, -0.16269657015800476, -0.1421194076538086, -0.6059088110923767, 0.9405292272567749, 0.007299997843801975, -0.09980728477239609, -0.03456488624215126, 0.5270288586616516, 0.2851492762565613, 0.2414676547050476, 0.5274525284767151, 0.8481117486953735, 1.0278065204620361, -0.14640074968338013, 1.0213836431503296, -0.4362845718860626, 0.5450247526168823, 0.7528015375137329, -0.34626200795173645, 0.8070183992385864, 0.42779168486595154, -0.4977738857269287, 0.551902711391449, 0.6173602342605591, -0.37685978412628174, 0.46490734815597534, 0.27809938788414, 0.1209779679775238, -0.06787703931331635, -0.1432664692401886, -0.5923568606376648, 0.30547642707824707, 0.3259398639202118, -0.45918262004852295, -0.13832245767116547, -0.005947998259216547, 0.0013906685635447502, -0.21326826512813568, -0.17105558514595032, 0.7568605542182922, 0.031203294172883034, -0.4783981740474701, 0.47663044929504395, 0.20095105469226837, 0.6239957213401794, -0.660882294178009, -0.050724852830171585, -0.06847323477268219, -0.11283853650093079, -0.14875862002372742, -0.8002320528030396, 0.36938226222991943, 0.3760260343551636, -0.09416089951992035, -0.29474395513534546, 0.6845275163650513, -0.30279797315597534, -0.4354746639728546, 0.1477927267551422, 0.28142601251602173, 0.4996485710144043, 0.06486093252897263, -1.0522537231445312, -0.15857797861099243, -0.23263460397720337, -0.15264025330543518, 0.08993811160326004, 0.5333309769630432, 0.10814765840768814, 0.4590054154396057, 0.7005357146263123, 0.2513255774974823, 0.28577283024787903, -0.10959570109844208, 0.8853738307952881, -1.0106126070022583, -0.7181602120399475, -0.7360220551490784, 0.6453080773353577, -0.20997752249240875, -0.4059397280216217, 0.4104929566383362, 0.8435782194137573, 0.6648715138435364, -0.12105909734964371, 0.9170032143592834, -0.5405880808830261, 0.4791298508644104, -0.8050553798675537, 0.893059492111206, -0.5941891670227051, 0.16583171486854553, -0.09211821854114532, -0.7259383797645569, -0.2049909234046936, 0.5555669665336609, -0.3703813850879669, 0.07055395096540451, 0.811397910118103, 0.6621930003166199, -0.0301700197160244, -0.16842010617256165, 0.473450630903244, 0.29191601276397705, 0.19108445942401886, 0.5113140940666199, 0.7941480278968811, -0.6972142457962036, 0.8850940465927124, -0.4511342942714691, 0.1080116406083107, -0.41057488322257996, -0.8742131590843201, -0.7196671366691589, -0.4164576530456543, -0.26927927136421204, -0.3688986301422119, 0.004944436717778444, 0.9271460771560669, 0.7618048191070557, -1.0557327270507812, -0.3984930217266083, -0.19294746220111847, -0.11552877724170685, -0.1957424134016037, -0.18005545437335968, 0.22991275787353516, -0.3446788489818573, -0.41148123145103455, 0.22655089199543, 0.04880791902542114, -0.007950784638524055, -0.11039023846387863, -0.15173707902431488, -0.5575748682022095, 0.04913981258869171, 0.6427150368690491, 0.4614558219909668, -1.0096135139465332, -0.3280465304851532, -0.1486833244562149, -0.3430693745613098, 0.1125965416431427, 0.6258360147476196, -0.3170381486415863, 0.2825661301612854, 0.29374876618385315, 0.4757237136363983, 0.5615856647491455, -0.03493935987353325, 0.4942532181739807, -0.7233796119689941, 0.38959088921546936, 0.251192569732666, 0.6955716013908386, -0.12711308896541595, -0.37930890917778015, 0.6228633522987366, 0.19204369187355042, -0.47279971837997437, -0.7216004133224487, 0.007221442647278309, -1.2128205299377441, -0.06874734908342361, 0.8757213950157166, -0.41118124127388, -0.3908844590187073, -0.32576802372932434, -0.14612634479999542, 0.4673376977443695, -0.5389209985733032, 0.5662580728530884, 0.7859533429145813, 0.03748488426208496, 0.2757948935031891, -0.9132818579673767, 0.4202025532722473, 0.4593338668346405, -0.7632860541343689, -0.23653480410575867, 0.36149996519088745, 0.2556740641593933, 0.262391597032547, 0.832631528377533, -0.15046082437038422, 0.36979764699935913, 0.09140988439321518, 0.2046026885509491, 0.05340844392776489, 0.041980303823947906, -0.4255869388580322, 0.2019779086112976, -0.1822076290845871, -0.3708343803882599 ]
microsoft/DialoGPT-small
microsoft
"2023-11-28T09:20:58Z"
25,868
59
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "gpt2", "text-generation", "conversational", "arxiv:1911.00536", "license:mit", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
conversational
"2022-03-02T23:29:05Z"
--- thumbnail: https://huggingface.co/front/thumbnails/dialogpt.png tags: - conversational license: mit --- ## A State-of-the-Art Large-scale Pretrained Response generation model (DialoGPT) DialoGPT is a SOTA large-scale pretrained dialogue response generation model for multiturn conversations. The [human evaluation results](https://github.com/dreasysnail/Dialogpt_dev#human-evaluation) indicate that the response generated from DialoGPT is comparable to human response quality under a single-turn conversation Turing test. The model is trained on 147M multi-turn dialogue from Reddit discussion thread. * Multi-turn generation examples from an interactive environment: |Role | Response | |---------|--------| |User | Does money buy happiness? | | Bot | Depends how much money you spend on it .| |User | What is the best way to buy happiness ? | | Bot | You just have to be a millionaire by your early 20s, then you can be happy . | |User |This is so difficult ! | | Bot | You have no idea how hard it is to be a millionaire and happy . There is a reason the rich have a lot of money | Please find the information about preprocessing, training and full details of the DialoGPT in the [original DialoGPT repository](https://github.com/microsoft/DialoGPT) ArXiv paper: [https://arxiv.org/abs/1911.00536](https://arxiv.org/abs/1911.00536) ### How to use Now we are ready to try out how the model works as a chatting partner! ```python from transformers import AutoModelForCausalLM, AutoTokenizer import torch tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small") model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small") # Let's chat for 5 lines for step in range(5): # encode the new user input, add the eos_token and return a tensor in Pytorch new_user_input_ids = tokenizer.encode(input(">> User:") + tokenizer.eos_token, return_tensors='pt') # append the new user input tokens to the chat history bot_input_ids = torch.cat([chat_history_ids, new_user_input_ids], dim=-1) if step > 0 else new_user_input_ids # generated a response while limiting the total chat history to 1000 tokens, chat_history_ids = model.generate(bot_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id) # pretty print last ouput tokens from bot print("DialoGPT: {}".format(tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens=True))) ``` # [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_microsoft__DialoGPT-small) | Metric | Value | |-----------------------|---------------------------| | Avg. | 25.02 | | ARC (25-shot) | 25.77 | | HellaSwag (10-shot) | 25.79 | | MMLU (5-shot) | 25.81 | | TruthfulQA (0-shot) | 47.49 | | Winogrande (5-shot) | 50.28 | | GSM8K (5-shot) | 0.0 | | DROP (3-shot) | 0.0 |
[ -0.34637781977653503, -0.9729541540145874, 0.08294481784105301, 0.07554197311401367, -0.12420155853033066, 0.21068428456783295, -0.07604783028364182, -0.24695870280265808, 0.31295478343963623, 0.31862255930900574, -0.8488420844078064, -0.4837099015712738, -0.5882829427719116, -0.14260025322437286, -0.08244845271110535, 1.0601398944854736, 0.2824374735355377, 0.09060599654912949, -0.07146658003330231, -0.03871546685695648, -0.5492455363273621, -0.6956027150154114, -0.7624058127403259, -0.26097357273101807, 0.0504269115626812, 0.35073399543762207, 0.5727313756942749, 0.035267461091279984, 0.45968860387802124, 0.5103289484977722, -0.11626102775335312, 0.12531781196594238, -0.8293395638465881, -0.019612891599535942, 0.3118775188922882, -0.6265672445297241, -0.9757518768310547, 0.25882673263549805, 0.3185100853443146, 0.3233841359615326, -0.11053957790136337, 0.43694671988487244, 0.2399701476097107, 0.46474286913871765, -0.23640668392181396, 0.30986928939819336, -0.6384977698326111, 0.14612413942813873, 0.05792650207877159, -0.6001007556915283, -0.2995632290840149, -0.2941547632217407, 0.3998907208442688, -0.4741673469543457, 0.1922721415758133, 0.2682742476463318, 0.8979911804199219, -0.02045309916138649, -0.2970583736896515, -0.5130382776260376, -0.24099531769752502, 0.8281884789466858, -0.9446286559104919, 0.28084704279899597, 0.3081870377063751, 0.2033890038728714, -0.5023455619812012, -0.6814525127410889, -0.4404100477695465, -0.2778187096118927, -0.035318128764629364, 0.3031231760978699, -0.28079962730407715, 0.21517318487167358, 0.25815296173095703, 0.4762735664844513, -0.7748702168464661, -0.0813903734087944, -0.44001591205596924, -0.5343486070632935, 0.6577627658843994, 0.3553169071674347, 0.23013341426849365, -0.31876733899116516, -0.42962563037872314, -0.1266259402036667, -0.47633397579193115, 0.2159416824579239, 0.402845561504364, 0.30012282729148865, -0.3527887463569641, 0.7319825887680054, -0.20720693469047546, 0.7115177512168884, 0.0697450190782547, -0.44718512892723083, 0.495008647441864, -0.5589955449104309, -0.24689272046089172, -0.20723988115787506, 0.9482795596122742, 0.6987915635108948, 0.17671358585357666, 0.2754274904727936, -0.08577551692724228, -0.30963483452796936, -0.2421339601278305, -1.0371909141540527, -0.179313063621521, 0.41756242513656616, -0.5632986426353455, -0.29552003741264343, -0.1934528648853302, -0.7255316376686096, -0.1364884078502655, -0.13717438280582428, 0.5714699625968933, -0.4346948266029358, -0.36958640813827515, 0.0969393402338028, -0.16141602396965027, 0.26699668169021606, 0.3937258720397949, -0.6002900004386902, 0.14350657165050507, 0.4151914417743683, 1.0973775386810303, -0.06911011785268784, -0.34294354915618896, -0.46413454413414, -0.5086064338684082, -0.02476344257593155, 0.5548750162124634, -0.1914750188589096, -0.35690248012542725, -0.018084948882460594, -0.07227429747581482, -0.17887359857559204, -0.5735982656478882, -0.00025050219846889377, -0.3753349483013153, 0.6052688360214233, 0.1385544389486313, -0.764786422252655, 0.0743621364235878, 0.43747052550315857, -0.2614097595214844, 0.9980320930480957, 0.008052350021898746, -0.7805918455123901, 0.2833918035030365, -0.8886419534683228, -0.03594421595335007, 0.0027575010899454355, -0.11370517313480377, -0.35699036717414856, -0.06928526610136032, 0.09287983924150467, 0.6376950144767761, -0.27901944518089294, 0.033667076379060745, -0.37434735894203186, -0.18388982117176056, 0.5348297357559204, -0.41982197761535645, 0.9714131355285645, 0.19900795817375183, -0.2417699098587036, 0.4139910936355591, -0.6418638229370117, 0.24146518111228943, 0.2725505530834198, -0.3837244510650635, 0.2837672233581543, -0.28423023223876953, 0.051396243274211884, 0.5075473189353943, 0.4598143398761749, -0.5393140316009521, 0.1834411919116974, -0.40402117371559143, 0.6553714871406555, 0.9417061805725098, 0.044444892555475235, 0.22309179604053497, -0.39438435435295105, 0.5473047494888306, 0.13577361404895782, 0.305486261844635, -0.19151756167411804, -0.6303843855857849, -0.8020377159118652, -0.408918559551239, 0.10509590059518814, 0.6193610429763794, -0.6691316962242126, 0.8087232112884521, -0.09101543575525284, -0.5056605935096741, -0.596824049949646, 0.040121905505657196, 0.29357922077178955, 0.5454102754592896, 0.10823431611061096, -0.3973865211009979, -0.5446966290473938, -0.8234847784042358, -0.07031075656414032, -0.32686325907707214, -0.16165420413017273, 0.5237346887588501, 0.6662585139274597, -0.042662911117076874, 1.0124229192733765, -0.727571964263916, -0.2689240872859955, -0.3429356813430786, 0.26510727405548096, 0.331376850605011, 0.5533840656280518, 0.49337607622146606, -0.5289967656135559, -0.49733951687812805, -0.3515315651893616, -0.6520712971687317, 0.08794297277927399, -0.015175600536167622, -0.2638767957687378, 0.27903568744659424, 0.40650126338005066, -0.6826562285423279, 0.6039078831672668, 0.5955986976623535, -0.6690658926963806, 0.6976146101951599, -0.09101063758134842, 0.37030112743377686, -1.275956630706787, 0.03343074768781662, -0.24705851078033447, -0.4511776268482208, -0.5163832306861877, -0.2149306982755661, -0.4337707459926605, -0.2654764652252197, -0.6516270041465759, 0.6254163384437561, -0.38812363147735596, -0.08427239954471588, -0.1562431901693344, 0.32716891169548035, -0.3709183931350708, 0.8030474781990051, -0.06921301037073135, 0.8247360587120056, 0.5837699770927429, -0.29506656527519226, 0.6118187308311462, 0.4402965307235718, -0.2691846489906311, 0.5597094893455505, -0.7821936011314392, 0.25882619619369507, 0.10586857050657272, 0.28856462240219116, -1.4448843002319336, -0.241771399974823, 0.20476944744586945, -0.9328522086143494, 0.04626614600419998, -0.18427468836307526, -0.5717880725860596, -0.43959078192710876, -0.4871704876422882, 0.08306597918272018, 0.6510201096534729, -0.2989163398742676, 0.44139668345451355, 0.45189574360847473, -0.1779891699552536, -0.41377419233322144, -0.4739280343055725, 0.008477376773953438, -0.1907174289226532, -0.8469737768173218, -0.040687475353479385, -0.5506992340087891, 0.11328515410423279, -0.33183181285858154, 0.03666536882519722, -0.028735797852277756, 0.01628871262073517, 0.3453850746154785, 0.568169116973877, -0.09620170295238495, -0.07104324549436569, -0.5637838244438171, -0.20849962532520294, 0.0013861589832231402, 0.10172422975301743, 1.2052922248840332, -0.4599325656890869, -0.1864863783121109, -0.7170379161834717, 0.13111159205436707, 0.5619768500328064, 0.07411735504865646, 0.6965282559394836, 0.6440765261650085, -0.20792773365974426, 0.2009003609418869, -0.5591683387756348, -0.5225436091423035, -0.5515693426132202, 0.6150574684143066, -0.4039875864982605, -1.098665714263916, 0.7558512091636658, 0.08813411742448807, 0.3369254767894745, 0.5660917162895203, 0.8800846338272095, -0.01126114185899496, 1.177991271018982, 0.47221124172210693, -0.01918366737663746, 0.6935213804244995, -0.4518774151802063, 0.1126600056886673, -0.6401963233947754, -0.1400701254606247, -0.18728125095367432, -0.30304214358329773, -0.7490944862365723, -0.24116435647010803, 0.3107481598854065, 0.07902609556913376, -0.4149605333805084, 0.31486332416534424, -0.5270722508430481, 0.149900883436203, 0.644186794757843, 0.1290009319782257, 0.19421231746673584, -0.08167955279350281, -0.06604719907045364, -0.17010244727134705, -0.7427442073822021, -0.4919404089450836, 1.2442326545715332, 0.5032790303230286, 0.7040748596191406, -0.05465969443321228, 0.7759763598442078, 0.18784859776496887, 0.223501056432724, -0.886677086353302, 0.804853081703186, 0.498022198677063, -0.8085795044898987, -0.3871177136898041, -0.6365802884101868, -0.8751205801963806, 0.2434605360031128, -0.3568205237388611, -1.1129169464111328, -0.2177990972995758, 0.2619120180606842, -0.40356820821762085, 0.19518263638019562, -0.8231549859046936, 0.8585484623908997, -0.2656926214694977, -0.274278849363327, -0.04244627803564072, -0.7185102105140686, 0.2757362425327301, 0.1752697229385376, -0.0703212171792984, -0.34366732835769653, 0.16951514780521393, 0.9211364984512329, -0.49336063861846924, 0.8270688652992249, -0.21563662588596344, 0.17080089449882507, 0.3238276541233063, 0.11827884614467621, 0.29491305351257324, 0.07245104014873505, 0.13543498516082764, 0.1328505277633667, 0.017151765525341034, -0.4390990436077118, -0.3073611855506897, 0.5900344848632812, -0.9840025901794434, -0.6176357865333557, -0.44948750734329224, -0.5657656192779541, -0.17669562995433807, 0.2845436632633209, 0.5262753963470459, 0.44982191920280457, -0.2761871814727783, 0.25520601868629456, 0.3024004399776459, -0.3602861166000366, 0.47392842173576355, 0.3850228488445282, -0.42524781823158264, -0.5320831537246704, 0.788169801235199, 0.11915706098079681, 0.42998576164245605, 0.02634117379784584, 0.03751986101269722, -0.3246118128299713, -0.31725913286209106, -0.2787703573703766, 0.16129766404628754, -0.44680771231651306, -0.28744199872016907, -0.5441193580627441, -0.5376924276351929, -0.5636224746704102, -0.08159373700618744, -0.5869284272193909, -0.3562360107898712, -0.2622753977775574, -0.09115174412727356, 0.3652643859386444, 0.520388126373291, -0.019934335723519325, 0.3922552168369293, -0.6056541204452515, 0.12433144450187683, 0.463425874710083, 0.21080772578716278, -0.006084465887397528, -0.6574553847312927, 0.0028205581475049257, 0.19737635552883148, -0.6027060151100159, -0.6814703345298767, 0.5125980377197266, 0.1541096270084381, 0.5255783796310425, 0.3581998348236084, -0.003948146477341652, 0.8026402592658997, -0.28283047676086426, 1.0329710245132446, 0.4998902678489685, -0.8002057075500488, 0.505867063999176, -0.21607361733913422, 0.33382782340049744, 0.44369471073150635, 0.11958129703998566, -0.590356171131134, -0.36730822920799255, -0.8951737284660339, -0.9243793487548828, 0.9131386280059814, 0.6652191281318665, 0.17519384622573853, 0.18661369383335114, 0.1571444422006607, -0.04387052357196808, 0.4704347550868988, -0.7549548149108887, -0.5245952606201172, -0.16687743365764618, -0.10914237797260284, -0.04739292338490486, -0.221462681889534, -0.16937045753002167, -0.27386242151260376, 0.6724363565444946, -0.12928371131420135, 0.7423774600028992, 0.1475512534379959, -0.09683289378881454, 0.05690474435687065, 0.1040276512503624, 0.6533021926879883, 0.8637458682060242, -0.501713752746582, -0.22757363319396973, 0.22514861822128296, -0.45014435052871704, -0.07550393044948578, 0.09998258203268051, 0.29821357131004333, -0.1308993250131607, 0.5220165252685547, 0.8511567115783691, -0.04263945668935776, -0.6481779217720032, 0.7540296316146851, -0.3260488510131836, -0.36613741517066956, -0.40500888228416443, 0.045639824122190475, 0.18961666524410248, 0.2686166763305664, 0.5008932948112488, -0.09878792613744736, 0.0520959347486496, -0.7371397018432617, 0.2664859890937805, 0.5472750067710876, -0.3744349777698517, -0.3975447714328766, 0.5695623159408569, 0.4700503945350647, -0.5095559358596802, 0.7838680744171143, -0.075261689722538, -0.6508422493934631, 0.5469390749931335, 0.4429625868797302, 0.8571209907531738, -0.06151861697435379, 0.20520053803920746, 0.5046445727348328, 0.04201318696141243, 0.20858892798423767, 0.37801438570022583, -0.0455932691693306, -0.803627073764801, -0.08904259651899338, -0.46757036447525024, -0.25193700194358826, 0.2735738754272461, -0.5138905048370361, 0.2669652998447418, -0.4288541078567505, -0.5292461514472961, 0.05787746235728264, 0.25968441367149353, -0.9910200834274292, -0.04720845818519592, -0.02188868820667267, 0.8523786067962646, -0.6810232996940613, 0.3484058380126953, 0.4712848663330078, -0.3464687764644623, -0.5263845920562744, -0.16971862316131592, 0.31935742497444153, -1.1612823009490967, 0.5192726254463196, 0.265215665102005, 0.015120306052267551, 0.09745265543460846, -0.8044060468673706, -0.7566142678260803, 1.1861652135849, 0.2926812767982483, -0.4818029999732971, -0.016542945057153702, 0.18961374461650848, 0.44071459770202637, -0.5038508772850037, 0.7025244832038879, 0.5071958899497986, 0.1689552217721939, 0.34226229786872864, -1.1577119827270508, 0.008437798358500004, -0.3245530426502228, -0.17877058684825897, -0.09004276245832443, -0.9216322302818298, 0.8913141489028931, -0.15353545546531677, -0.11636000871658325, 0.20396165549755096, 0.5371915698051453, 0.48402804136276245, 0.12804320454597473, 0.6243375539779663, 0.5059509873390198, 0.584185004234314, -0.21529169380664825, 0.831834614276886, -0.4842036962509155, 0.7589172720909119, 0.9909845590591431, 0.12389902025461197, 0.7727145552635193, 0.41545602679252625, -0.2587975859642029, 0.25479599833488464, 0.8222314119338989, 0.2001027911901474, 0.3216155767440796, 0.25350233912467957, -0.07309186458587646, -0.3296613097190857, 0.007257106713950634, -0.39041587710380554, 0.5461929440498352, 0.1781192272901535, -0.2995680868625641, -0.16423623263835907, -0.030004411935806274, 0.2834533452987671, -0.5506001114845276, -0.042998019605875015, 0.8949242830276489, 0.06859758496284485, -0.5089924931526184, 0.6585052013397217, -0.2667252719402313, 0.9319365620613098, -0.7132843732833862, -0.049558188766241074, -0.18745039403438568, 0.240142822265625, -0.1882500946521759, -0.7477762699127197, -0.14477196335792542, -0.14683127403259277, 0.18316981196403503, -0.09669039398431778, 0.5905622243881226, -0.38914215564727783, -0.3377911150455475, 0.1627785861492157, 0.7155287265777588, 0.337889164686203, 0.11844544857740402, -1.0921118259429932, 0.015030269511044025, 0.2057352215051651, -0.7517268061637878, 0.2841595411300659, 0.1929723024368286, 0.36840808391571045, 0.7743613123893738, 0.7317019104957581, -0.06028665602207184, 0.12897410988807678, -0.19855235517024994, 0.939633846282959, -0.6803911328315735, -0.5119099617004395, -0.8717306852340698, 0.7050548791885376, -0.3979853689670563, -0.7780478000640869, 0.8321588635444641, 0.7282704710960388, 0.6426172852516174, -0.0069778659380972385, 0.577324628829956, -0.23170769214630127, 0.3901379704475403, -0.37517720460891724, 0.6967915892601013, -0.6285312175750732, 0.05405167117714882, -0.1762380450963974, -0.848738968372345, -0.07434167712926865, 0.7260186076164246, -0.18907096982002258, 0.1757291704416275, 0.4593069553375244, 0.9373355507850647, 0.14253580570220947, -0.1272842288017273, 0.38923531770706177, 0.4466443359851837, 0.4843508005142212, 0.5926151871681213, 0.8696656227111816, -0.45663926005363464, 0.6169118881225586, -0.047291845083236694, -0.5268213152885437, -0.4560706317424774, -0.6435707807540894, -1.258613109588623, -0.6206085681915283, -0.2578725516796112, -0.5271874666213989, -0.13423076272010803, 1.3262429237365723, 0.926422119140625, -0.6503130197525024, -0.4667462408542633, 0.08827678859233856, -0.05572841316461563, 0.06748194247484207, -0.3132881820201874, 0.3014899492263794, -0.3205723762512207, -0.8406307101249695, -0.009349079802632332, 0.11417605727910995, 0.30794504284858704, -0.3647655248641968, -0.1385524868965149, -0.21003425121307373, 0.0917682871222496, 0.7253078818321228, 0.2188374549150467, -0.5938351154327393, -0.36179161071777344, 0.13268031179904938, -0.17235268652439117, 0.23851576447486877, 0.4924515187740326, -0.438274085521698, 0.5248093605041504, 0.6858379244804382, 0.12634465098381042, 0.7687428593635559, -0.09010250121355057, 0.5764002799987793, -0.6643751859664917, 0.3025757074356079, 0.20999719202518463, 0.41732579469680786, 0.22385941445827484, -0.267831027507782, 0.4479118585586548, 0.2731442451477051, -0.7656139731407166, -0.7906381487846375, 0.12712709605693817, -1.040452241897583, -0.07108735293149948, 1.0032649040222168, -0.24471314251422882, -0.1954735815525055, 0.05227946862578392, -0.5711809396743774, 0.10639709234237671, -0.7526341080665588, 0.7331534028053284, 0.767418622970581, -0.48450490832328796, -0.12495239078998566, -0.6015830636024475, 0.5364362001419067, 0.24670886993408203, -0.7299013137817383, 0.01568271592259407, 0.44646334648132324, 0.5187031626701355, 0.16837283968925476, 1.0767368078231812, -0.08449379354715347, 0.10933729261159897, -0.010591553524136543, 0.14798979461193085, -0.04198349267244339, -0.02669096179306507, -0.05691174417734146, 0.2089015394449234, -0.051016975194215775, -0.43573805689811707 ]
bhadresh-savani/electra-base-squad2
bhadresh-savani
"2023-03-22T09:36:46Z"
25,817
0
transformers
[ "transformers", "pytorch", "tf", "jax", "safetensors", "electra", "question-answering", "dataset:squad_v2", "license:cc-by-4.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
question-answering
"2022-04-13T14:25:23Z"
--- datasets: - squad_v2 license: cc-by-4.0 --- # electra-base for QA ## Overview **Language model:** electra-base **Language:** English **Downstream-task:** Extractive QA **Training data:** SQuAD 2.0 **Eval data:** SQuAD 2.0 **Code:** See [example](https://github.com/deepset-ai/FARM/blob/master/examples/question_answering.py) in [FARM](https://github.com/deepset-ai/FARM/blob/master/examples/question_answering.py) **Infrastructure**: 1x Tesla v100 ## Hyperparameters ``` seed=42 batch_size = 32 n_epochs = 5 base_LM_model = "google/electra-base-discriminator" max_seq_len = 384 learning_rate = 1e-4 lr_schedule = LinearWarmup warmup_proportion = 0.1 doc_stride=128 max_query_length=64 ``` ## Performance Evaluated on the SQuAD 2.0 dev set with the [official eval script](https://worksheets.codalab.org/rest/bundles/0x6b567e1cf2e041ec80d7098f031c5c9e/contents/blob/). ``` "exact": 77.30144024256717, "f1": 81.35438272008543, "total": 11873, "HasAns_exact": 74.34210526315789, "HasAns_f1": 82.45961302894314, "HasAns_total": 5928, "NoAns_exact": 80.25231286795626, "NoAns_f1": 80.25231286795626, "NoAns_total": 5945 ``` ## Usage ### In Transformers ```python from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline model_name = "deepset/electra-base-squad2" # a) Get predictions nlp = pipeline('question-answering', model=model_name, tokenizer=model_name) QA_input = { 'question': 'Why is model conversion important?', 'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.' } res = nlp(QA_input) # b) Load model & tokenizer model = AutoModelForQuestionAnswering.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name) ``` ### In FARM ```python from farm.modeling.adaptive_model import AdaptiveModel from farm.modeling.tokenization import Tokenizer from farm.infer import Inferencer model_name = "deepset/electra-base-squad2" # a) Get predictions nlp = Inferencer.load(model_name, task_type="question_answering") QA_input = [{"questions": ["Why is model conversion important?"], "text": "The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks."}] res = nlp.inference_from_dicts(dicts=QA_input) # b) Load model & tokenizer model = AdaptiveModel.convert_from_transformers(model_name, device="cpu", task_type="question_answering") tokenizer = Tokenizer.load(model_name) ``` ### In haystack For doing QA at scale (i.e. many docs instead of single paragraph), you can load the model also in [haystack](https://github.com/deepset-ai/haystack/): ```python reader = FARMReader(model_name_or_path="deepset/electra-base-squad2") # or reader = TransformersReader(model="deepset/electra-base-squad2",tokenizer="deepset/electra-base-squad2") ``` ## Authors Vaishali Pal `vaishali.pal [at] deepset.ai` Branden Chan: `branden.chan [at] deepset.ai` Timo Möller: `timo.moeller [at] deepset.ai` Malte Pietsch: `malte.pietsch [at] deepset.ai` Tanay Soni: `tanay.soni [at] deepset.ai` Note: Borrowed this model from Haystack model repo for adding tensorflow model.
[ -0.41128817200660706, -0.6429910063743591, 0.3060188889503479, 0.04957647621631622, 0.10421296954154968, 0.15925481915473938, -0.07912005484104156, -0.3268210291862488, 0.061096012592315674, 0.43056759238243103, -0.7247609496116638, -0.4905291497707367, -0.22738692164421082, 0.16654938459396362, -0.3820189833641052, 0.9782315492630005, -0.10662904381752014, -0.012623252347111702, -0.16610051691532135, -0.12054860591888428, -0.37930938601493835, -0.405169278383255, -0.6351715326309204, -0.43623629212379456, 0.07070638239383698, 0.5638993978500366, 0.4634092450141907, 0.10429003089666367, 0.4492029547691345, 0.38549771904945374, -0.07277162373065948, 0.30622565746307373, -0.28576552867889404, 0.21111664175987244, -0.15229731798171997, -0.6624504923820496, -0.4897959530353546, -0.13383661210536957, 0.5801925659179688, 0.16755402088165283, -0.12494761496782303, 0.5728260278701782, -0.2584008574485779, 0.718485414981842, -0.54180908203125, 0.2539787292480469, -0.6785687208175659, -0.2366032749414444, 0.3704632818698883, 0.13317948579788208, -0.3385450839996338, -0.1813822239637375, 0.24572892487049103, -0.5696107745170593, 0.4067282974720001, -0.12309928238391876, 1.5111088752746582, 0.3082365393638611, -0.2727113664150238, -0.12024764716625214, -0.6566147804260254, 0.8461496233940125, -1.1411230564117432, 0.012273166328668594, 0.40424844622612, 0.32961881160736084, 0.10646990686655045, -0.8828390836715698, -0.8427514433860779, 0.027212176471948624, -0.019288357347249985, 0.24798215925693512, -0.2816682457923889, -0.08147403597831726, 0.18621110916137695, 0.33222895860671997, -0.4336060583591461, 0.04729301482439041, -0.6620274186134338, -0.18519307672977448, 0.83538419008255, 0.3519441485404968, 0.26062342524528503, -0.34616774320602417, -0.141168013215065, -0.3354314863681793, -0.5519315004348755, 0.38578274846076965, 0.2918834984302521, 0.31054577231407166, -0.23101301491260529, 0.5891528129577637, -0.5758440494537354, 0.4570663869380951, 0.3596668839454651, 0.362713485956192, 0.7129025459289551, -0.46594560146331787, -0.29673194885253906, -0.1571805328130722, 1.0602577924728394, 0.38564327359199524, 0.0718335434794426, 0.11041901260614395, -0.18496061861515045, -0.08532291650772095, 0.2917605936527252, -1.0370795726776123, -0.22745715081691742, 0.6468902826309204, -0.3064405024051666, -0.5763751864433289, 0.003198865335434675, -0.9878276586532593, -0.23562611639499664, 0.062355801463127136, 0.542375385761261, -0.40552642941474915, -0.5337496995925903, 0.2018250674009323, -0.03087908960878849, 0.7400766611099243, 0.06357543915510178, -0.9320377111434937, 0.2503306269645691, 0.38466304540634155, 0.7143914103507996, 0.14662867784500122, -0.43469205498695374, -0.31563225388526917, -0.20989206433296204, -0.1507093757390976, 0.8551797270774841, -0.10399965196847916, -0.057537991553545, -0.008505100384354591, 0.3691025972366333, -0.43976184725761414, -0.5169046521186829, 0.37114018201828003, -0.6840309500694275, 0.3912900984287262, -0.13126154243946075, -0.5556178689002991, -0.592153012752533, 0.27745431661605835, -0.6847754716873169, 1.1580389738082886, 0.45761236548423767, -0.546518862247467, 0.13180416822433472, -0.7164953351020813, -0.30876624584198, 0.004412384703755379, 0.14684806764125824, -0.6303784251213074, -0.18166321516036987, 0.3372429311275482, 0.46031704545021057, -0.2605564594268799, 0.21266740560531616, -0.09823503345251083, -0.3269559144973755, 0.1728993058204651, -0.10105737298727036, 0.9412530064582825, 0.15293174982070923, -0.5830923914909363, 0.26875945925712585, -0.7911449670791626, 0.39733222126960754, 0.09253102540969849, -0.19695168733596802, 0.11013323813676834, 0.1443551927804947, 0.20825700461864471, 0.4042692184448242, 0.35977742075920105, -0.45104673504829407, 0.02670786902308464, -0.7447240948677063, 0.7679399251937866, 0.6069507598876953, -0.058420732617378235, 0.437181681394577, -0.3397345542907715, 0.6908555626869202, 0.147576242685318, -0.03640970587730408, 0.15873388946056366, -0.3941708207130432, -1.219780683517456, -0.004551535937935114, 0.3839712142944336, 0.8239932060241699, -0.7372675538063049, 0.7905650734901428, -0.1490239053964615, -0.7331013679504395, -0.8905038833618164, 0.03839542344212532, 0.18546059727668762, 0.5000535845756531, 0.531718909740448, 0.20374013483524323, -0.8798910975456238, -1.022756576538086, 0.09842486679553986, -0.3181432783603668, 0.030159611254930496, 0.22439703345298767, 0.9879737496376038, -0.4167792499065399, 0.9356273412704468, -0.49840447306632996, -0.21540020406246185, -0.6491007208824158, -0.1139233186841011, 0.6375463604927063, 0.6235213875770569, 0.5694755911827087, -0.7586254477500916, -0.43542546033859253, -0.051720794290304184, -0.6455416083335876, 0.13028040528297424, -0.07779958099126816, -0.17841272056102753, -0.0037164429668337107, 0.2580987215042114, -0.8149700164794922, 0.2224758118391037, 0.5378720760345459, -0.7052404284477234, 0.6836268901824951, -0.021991245448589325, 0.2221164107322693, -1.5907737016677856, 0.1610005646944046, -0.1394776552915573, -0.23407825827598572, -0.538771390914917, 0.27970778942108154, 0.05461150407791138, 0.041224267333745956, -0.5925172567367554, 0.5337163209915161, -0.18959370255470276, 0.25038382411003113, -0.04073037952184677, -0.20555657148361206, 0.2558613121509552, 0.6061877012252808, -0.19569388031959534, 1.1266807317733765, 0.5839154720306396, -0.7290167212486267, 0.6607496738433838, 0.5357094407081604, -0.3421049118041992, 0.1677277535200119, -0.9043911099433899, 0.1582574099302292, 0.09933972358703613, 0.07957267761230469, -1.0780712366104126, -0.18318243324756622, 0.2754848897457123, -0.6001972556114197, 0.08226027339696884, -0.006071466486901045, -0.41689085960388184, -0.43194034695625305, -0.3496512174606323, 0.3065204322338104, 0.8162354230880737, -0.30833330750465393, 0.6391884684562683, 0.3274866044521332, 0.017879195511341095, -0.4035239815711975, -0.6146636605262756, -0.28367453813552856, -0.19050569832324982, -0.5959938168525696, 0.3134167194366455, -0.01845923438668251, -0.10294322669506073, 0.07333877682685852, 0.020174717530608177, -0.38630032539367676, 0.0893447995185852, 0.07259940356016159, 0.4700984060764313, -0.43889695405960083, 0.2030506283044815, 0.08167564123868942, -0.08352405577898026, 0.13171346485614777, -0.07560329139232635, 0.77872234582901, -0.6774168014526367, 0.05281678959727287, -0.5620169043540955, 0.22907108068466187, 0.7431846261024475, -0.41926032304763794, 0.9004595279693604, 0.6696014404296875, -0.31022337079048157, -0.14141306281089783, -0.5826625823974609, -0.06771444529294968, -0.4824672043323517, 0.7867156267166138, -0.3912844955921173, -0.5525526404380798, 0.8118119239807129, 0.14156706631183624, 0.17916345596313477, 1.1724680662155151, 0.6480855345726013, -0.20533570647239685, 1.2150360345840454, 0.5509557127952576, -0.0572681687772274, 0.4571443200111389, -1.0378668308258057, 0.0036491944920271635, -1.1115753650665283, -0.36876410245895386, -0.6466877460479736, -0.23008358478546143, -0.5445621013641357, -0.22334431111812592, 0.08521442115306854, 0.09393677860498428, -0.5653277635574341, 0.5191178917884827, -0.7641443610191345, 0.2904733419418335, 0.5556194186210632, 0.23882022500038147, 0.027805224061012268, -0.05638725310564041, 0.11759275943040848, 0.2612122595310211, -0.7282195091247559, -0.5016763806343079, 1.1542271375656128, 0.31839483976364136, 0.49843519926071167, -0.04741079732775688, 0.6764522790908813, -0.004274669103324413, 0.037208978086709976, -0.8603419661521912, 0.4718762934207916, -0.023291567340493202, -0.7340437173843384, -0.34818151593208313, -0.35437679290771484, -0.8807599544525146, 0.3084516227245331, -0.07206199318170547, -0.7024703621864319, 0.45526018738746643, -0.09692277759313583, -0.6334400177001953, 0.37385034561157227, -0.8422922492027283, 0.9835559129714966, -0.009532914496958256, -0.08823249489068985, -0.14206969738006592, -0.46142852306365967, 0.18848296999931335, 0.1484997421503067, 0.08589757233858109, -0.22624649107456207, 0.025473270565271378, 1.0347440242767334, -0.6026582717895508, 0.7190980911254883, 0.02046309970319271, 0.205568328499794, 0.5143979787826538, -0.11341128498315811, 0.41831961274147034, 0.13362307846546173, -0.33099493384361267, 0.13004714250564575, 0.3788450062274933, -0.41094642877578735, -0.419521689414978, 0.6074265837669373, -1.1269371509552002, -0.37216219305992126, -0.4754016101360321, -0.5903286933898926, -0.17961247265338898, 0.26244625449180603, 0.585465133190155, 0.3413856625556946, 0.08273796737194061, 0.3200811445713043, 0.7040780782699585, -0.05871099606156349, 0.5165179967880249, 0.4714246988296509, -0.10592444241046906, -0.3935791850090027, 0.7419402003288269, -0.0790160521864891, 0.2327093631029129, 0.35301151871681213, 0.06749536097049713, -0.5038785934448242, -0.5226379632949829, -0.6631903648376465, 0.08128124475479126, -0.5982059836387634, -0.5323559045791626, -0.6998956799507141, -0.5399985909461975, -0.5239481329917908, 0.12810847163200378, -0.5391090512275696, -0.30652013421058655, -0.6427883505821228, -0.29900285601615906, 0.7850270867347717, 0.4396912753582001, 0.20365798473358154, 0.26948821544647217, -0.7428618669509888, 0.37539151310920715, 0.40309232473373413, 0.12749513983726501, -0.013096733018755913, -0.733791708946228, -0.23105758428573608, 0.3191920816898346, -0.26495078206062317, -1.0895003080368042, 0.5632185935974121, 0.19523999094963074, 0.3520747423171997, -0.020774994045495987, 0.06491757929325104, 0.6377890706062317, -0.29093292355537415, 0.8129900693893433, 0.054831624031066895, -0.9566310048103333, 0.682040810585022, -0.21127241849899292, 0.292598158121109, 0.9838378429412842, -0.03704381734132767, -0.3472982347011566, -0.19905446469783783, -0.7961231470108032, -1.1224277019500732, 0.79062819480896, 0.3143450915813446, 0.27835187315940857, 0.0689018964767456, 0.24183396995067596, -0.07111245393753052, 0.2835233509540558, -0.649780809879303, -0.3540281653404236, -0.23965616524219513, -0.41750386357307434, 0.044850729405879974, -0.16343407332897186, 0.027366627007722855, -0.64944988489151, 1.0201252698898315, -0.0035123347770422697, 0.2462240606546402, 0.4806312918663025, -0.25685837864875793, -0.0491015650331974, 0.37941715121269226, 0.368182510137558, 0.7410047650337219, -0.31315189599990845, -0.2608029544353485, 0.4691687226295471, -0.508675754070282, 0.27939844131469727, 0.32147538661956787, -0.5244923830032349, 0.07652062922716141, 0.2971001863479614, 0.9193874597549438, 0.05261050537228584, -0.6228267550468445, 0.3995891511440277, 0.0693160817027092, -0.3528456687927246, -0.5190235376358032, 0.1817641258239746, 0.04064526781439781, 0.3966188132762909, 0.44277459383010864, 0.13494351506233215, 0.11169112473726273, -0.45908644795417786, 0.13642112910747528, 0.1995907723903656, -0.4224611520767212, -0.24742601811885834, 0.6901583671569824, 0.2968788146972656, -0.4040899872779846, 0.8353992700576782, -0.31478384137153625, -0.7816722989082336, 1.1715794801712036, 0.4205765724182129, 1.1438058614730835, -0.07496362179517746, 0.47649338841438293, 0.5999163389205933, 0.314030259847641, -0.0659870132803917, 0.5496570467948914, 0.2826577126979828, -0.9300234317779541, -0.3766525685787201, -0.7442957758903503, -0.22409312427043915, 0.3912121057510376, -0.7595870494842529, 0.15073834359645844, -0.25587424635887146, -0.08277218788862228, -0.105460025370121, 0.29820823669433594, -1.0261279344558716, 0.10624581575393677, -0.25784632563591003, 0.8851297497749329, -0.7641103863716125, 0.4918147623538971, 0.9800735712051392, -0.7960766553878784, -1.2949488162994385, -0.3157294988632202, -0.5388525724411011, -0.8732228875160217, 0.44708797335624695, 0.2411530464887619, 0.09533780068159103, 0.43688446283340454, -0.5870931148529053, -0.8692423701286316, 1.3000069856643677, 0.08779609203338623, -0.5376951694488525, -0.3037331700325012, -0.09863079339265823, 0.5216625332832336, -0.42938438057899475, 0.5391018390655518, 0.7158676981925964, 0.40351060032844543, -0.07407419383525848, -0.907959520816803, 0.27143460512161255, -0.501700222492218, -0.22685831785202026, 0.06525149196386337, -0.7534964084625244, 1.0904085636138916, -0.38113299012184143, 0.03670460358262062, 0.26731330156326294, 0.6203749179840088, 0.35986483097076416, 0.07357656955718994, 0.42292943596839905, 0.5291533470153809, 0.659899890422821, -0.08442705869674683, 0.919535219669342, -0.1768387258052826, 0.9571765661239624, 0.9003773331642151, -0.17597071826457977, 1.0034047365188599, 0.39176398515701294, -0.4324061870574951, 0.9637323021888733, 0.7174514532089233, -0.42584115266799927, 0.5646586418151855, -0.014195388182997704, -0.096638023853302, -0.32516977190971375, 0.20204873383045197, -0.7237180471420288, 0.5102477669715881, 0.1499042510986328, -0.37048420310020447, -0.21698153018951416, -0.19929957389831543, -0.15753407776355743, -0.20037949085235596, -0.302021861076355, 0.7398995757102966, -0.13303504884243011, -0.6105154156684875, 0.7429752349853516, -0.10469124466180801, 0.7349368929862976, -0.6296356916427612, -0.1565588116645813, -0.017764998599886894, 0.335845410823822, -0.3585718274116516, -0.604967474937439, 0.011857063509523869, -0.167509987950325, -0.4375830292701721, 0.03121264837682247, 0.6885741949081421, -0.39821457862854004, -0.9058552980422974, 0.03403517231345177, 0.6779419183731079, 0.07542647421360016, -0.17134961485862732, -0.9447786808013916, -0.3117606043815613, 0.07575657218694687, -0.5640031099319458, 0.06481757760047913, 0.11153407394886017, 0.32243937253952026, 0.6887892484664917, 0.7206205725669861, 0.09532370418310165, 0.03099893219769001, 0.042978908866643906, 0.9514881372451782, -0.6973752975463867, -0.4828769862651825, -0.8759539127349854, 0.747400164604187, -0.18559956550598145, -0.6919342279434204, 0.5819901823997498, 0.6091704368591309, 0.6951440572738647, -0.18264104425907135, 0.7746822237968445, -0.29196780920028687, 0.3610849678516388, -0.5329375267028809, 1.0017156600952148, -0.5264461636543274, 0.13504819571971893, 0.020708052441477776, -0.7073656916618347, 0.2414473444223404, 0.7887765169143677, -0.2872740626335144, 0.06344278156757355, 0.8832370042800903, 0.7938639521598816, 0.06227666139602661, -0.17345145344734192, -0.03954427316784859, 0.3372759521007538, 0.2837616801261902, 0.88860023021698, 0.7832574248313904, -1.0350667238235474, 0.6196298599243164, -0.5453545451164246, -0.018875906243920326, -0.05031667277216911, -0.4697701930999756, -0.9688519239425659, -0.5620384812355042, -0.29115238785743713, -0.6768620014190674, -0.18884757161140442, 0.9251348376274109, 0.7707995176315308, -1.20955228805542, -0.185072124004364, -0.3321967124938965, 0.3048953115940094, -0.4550592601299286, -0.3778477907180786, 0.5422307252883911, -0.3931715786457062, -0.7864717841148376, 0.26487013697624207, -0.3250955641269684, -0.14283905923366547, -0.22105836868286133, 0.042908020317554474, -0.49020451307296753, -0.16192319989204407, 0.4161387085914612, 0.3034515380859375, -0.6258988380432129, -0.18870246410369873, 0.21089208126068115, -0.10860661417245865, 0.12050711363554001, 0.3587903082370758, -1.0160865783691406, 0.23139849305152893, 0.7244955897331238, 0.5431268811225891, 0.44754162430763245, -0.20008668303489685, 0.6779226660728455, -0.37729397416114807, 0.15437781810760498, 0.47035449743270874, 0.3891379237174988, 0.20774590969085693, -0.5685741901397705, 0.5089205503463745, 0.11583631485700607, -0.5167925953865051, -0.9422197341918945, -0.03705941140651703, -0.8823093771934509, -0.17052647471427917, 1.3176612854003906, -0.016830721870064735, -0.26930105686187744, -0.04215605929493904, -0.2582275867462158, 0.4200986921787262, -0.5088624358177185, 0.6833827495574951, 0.6670863032341003, 0.04612114652991295, -0.09100714325904846, -0.6816524267196655, 0.4429590106010437, 0.48071610927581787, -1.0550858974456787, -0.2567472457885742, 0.18288809061050415, 0.5448330044746399, 0.15346252918243408, 0.5409971475601196, 0.15327414870262146, 0.5798346400260925, -0.10068564116954803, 0.19958588480949402, -0.31924718618392944, 0.053759682923555374, -0.3968997895717621, 0.015816090628504753, -0.3699873089790344, -0.5519195795059204 ]
ckiplab/albert-tiny-chinese-pos
ckiplab
"2022-05-10T03:28:11Z"
25,808
0
transformers
[ "transformers", "pytorch", "albert", "token-classification", "zh", "license:gpl-3.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: - zh thumbnail: https://ckip.iis.sinica.edu.tw/files/ckip_logo.png tags: - pytorch - token-classification - albert - zh license: gpl-3.0 --- # CKIP ALBERT Tiny Chinese This project provides traditional Chinese transformers models (including ALBERT, BERT, GPT2) and NLP tools (including word segmentation, part-of-speech tagging, named entity recognition). 這個專案提供了繁體中文的 transformers 模型(包含 ALBERT、BERT、GPT2)及自然語言處理工具(包含斷詞、詞性標記、實體辨識)。 ## Homepage - https://github.com/ckiplab/ckip-transformers ## Contributers - [Mu Yang](https://muyang.pro) at [CKIP](https://ckip.iis.sinica.edu.tw) (Author & Maintainer) ## Usage Please use BertTokenizerFast as tokenizer instead of AutoTokenizer. 請使用 BertTokenizerFast 而非 AutoTokenizer。 ``` from transformers import ( BertTokenizerFast, AutoModel, ) tokenizer = BertTokenizerFast.from_pretrained('bert-base-chinese') model = AutoModel.from_pretrained('ckiplab/albert-tiny-chinese-pos') ``` For full usage and more information, please refer to https://github.com/ckiplab/ckip-transformers. 有關完整使用方法及其他資訊,請參見 https://github.com/ckiplab/ckip-transformers 。
[ -0.3409843444824219, -0.26889529824256897, 0.09081586450338364, 0.7526928186416626, -0.35205408930778503, 0.0398687981069088, -0.22230523824691772, -0.3060459792613983, 0.017458247020840645, 0.3595743477344513, -0.34823334217071533, -0.2576799690723419, -0.531955897808075, 0.12245280295610428, -0.19836843013763428, 0.8465192317962646, -0.1671624481678009, 0.31156423687934875, 0.40303748846054077, 0.08746741712093353, -0.24608661234378815, -0.244944766163826, -0.8553734421730042, -0.5990047454833984, -0.006894324906170368, 0.45073115825653076, 0.7791553139686584, 0.48727408051490784, 0.5627927780151367, 0.3208836317062378, -0.002603370463475585, -0.10219506174325943, -0.09106265008449554, -0.4671807289123535, 0.0042860540561378, -0.6367710828781128, -0.38581305742263794, -0.2670545279979706, 0.7511967420578003, 0.500546932220459, 0.019228270277380943, 0.08212586492300034, 0.22440797090530396, 0.3406580686569214, -0.3200923502445221, 0.44009390473365784, -0.5946444869041443, 0.326359361410141, -0.21482713520526886, -0.04779602214694023, -0.3726736605167389, -0.1992211937904358, 0.09774213284254074, -0.7013614177703857, 0.3677158057689667, 0.026120413094758987, 1.3314296007156372, 0.07989057153463364, -0.2925957143306732, -0.28482845425605774, -0.7198235392570496, 1.1190812587738037, -0.8834134340286255, 0.36922717094421387, 0.38556069135665894, 0.3183531165122986, 0.027011072263121605, -1.1430277824401855, -0.7348561882972717, -0.1838463693857193, -0.4088962972164154, 0.2561066448688507, 0.08438028395175934, -0.03336522355675697, 0.4165668785572052, 0.30675387382507324, -0.6354506611824036, 0.30184847116470337, -0.4245118796825409, -0.4169890880584717, 0.6105122566223145, 0.057127296924591064, 0.5031139254570007, -0.5425887703895569, -0.45862922072410583, -0.3512815535068512, -0.6525388956069946, 0.24314521253108978, 0.22303296625614166, 0.15061120688915253, -0.5793329477310181, 0.6582415103912354, -0.04365214332938194, 0.2640352249145508, 0.17676980793476105, -0.09084603935480118, 0.37137869000434875, -0.3985753059387207, -0.012082935310900211, -0.12714390456676483, 1.106189489364624, 0.204451322555542, 0.01561984233558178, 0.1578356772661209, -0.3733152747154236, -0.37164223194122314, -0.3018532395362854, -0.8680316805839539, -0.7660551071166992, 0.2072947770357132, -0.8500896096229553, -0.21972784399986267, 0.11354769021272659, -0.7232261896133423, 0.2575967609882355, -0.20511087775230408, 0.3960249125957489, -0.6967002749443054, -0.5432335734367371, -0.034647729247808456, -0.34586089849472046, 0.7186180353164673, 0.1486211121082306, -1.3226032257080078, 0.009170846082270145, 0.6588265299797058, 0.8632981181144714, 0.22873421013355255, -0.16535629332065582, 0.11465544998645782, 0.40421268343925476, -0.2581694424152374, 0.6175742745399475, -0.12417802214622498, -0.709252655506134, 0.11004990339279175, 0.06783716380596161, 0.034604188054800034, -0.516658365726471, 0.8327409625053406, -0.2727127969264984, 0.3326166868209839, -0.12318620830774307, -0.20192989706993103, 0.032122645527124405, 0.09410842508077621, -0.5336267948150635, 1.1238734722137451, 0.13865715265274048, -0.910150945186615, 0.2346883863210678, -0.9648023843765259, -0.5365575551986694, 0.3599407970905304, -0.165602445602417, -0.5038990378379822, -0.1058352142572403, 0.24699343740940094, 0.2924407720565796, -0.13360702991485596, 0.07873358577489853, -0.09611357003450394, -0.23382839560508728, -0.007116570137441158, -0.42175427079200745, 1.301564335823059, 0.335260808467865, -0.19239076972007751, 0.18615540862083435, -0.739051342010498, 0.10985715687274933, 0.36806538701057434, -0.2015143483877182, -0.35988885164260864, 0.11873196810483932, 0.5483434796333313, 0.16963748633861542, 0.5315213799476624, -0.6035680174827576, 0.5718518495559692, -0.6580121517181396, 0.802398145198822, 0.8066247701644897, -0.23585915565490723, 0.3750572204589844, -0.21476860344409943, 0.0059111882001161575, 0.03250402584671974, 0.37556228041648865, -0.04344774782657623, -0.5745126605033875, -1.186971664428711, -0.41547954082489014, 0.5407984852790833, 0.7071585655212402, -1.2538913488388062, 0.7621482014656067, -0.31699809432029724, -0.6987140774726868, -0.45801642537117004, -0.00027198914904147387, 0.001215563272126019, 0.10698962956666946, 0.4864230155944824, -0.275669127702713, -0.5793329477310181, -1.0957368612289429, 0.08859387785196304, -0.6588135361671448, -0.7062021493911743, -0.010364571586251259, 0.6764844655990601, -0.4645322859287262, 1.047937035560608, -0.5760599374771118, -0.3911411762237549, -0.2801561951637268, 0.5994412899017334, 0.34814587235450745, 0.9090036749839783, 0.6210492849349976, -1.0495017766952515, -0.8312113285064697, -0.16468113660812378, -0.326671302318573, -0.031601935625076294, -0.31046348810195923, -0.09425225108861923, -0.08796899765729904, 0.05051170289516449, -0.7028079628944397, 0.21808451414108276, 0.33491748571395874, -0.01587173342704773, 0.8681904077529907, -0.07552067190408707, -0.3194465637207031, -1.2813773155212402, 0.1293531209230423, -0.17544341087341309, -0.04013705253601074, -0.3888833224773407, -0.03853273391723633, 0.2377282977104187, -0.12002373486757278, -0.6360217928886414, 0.6571455001831055, -0.36984050273895264, 0.3522540330886841, -0.2528115510940552, -0.07200685888528824, -0.18045806884765625, 0.5678783059120178, 0.3739169239997864, 0.7441807985305786, 0.5643401145935059, -0.7091660499572754, 0.4028976261615753, 0.7632139325141907, -0.28626707196235657, -0.06481173634529114, -0.9930986762046814, -0.0651450827717781, 0.39506739377975464, 0.05010110139846802, -0.9233130812644958, -0.09795013815164566, 0.6662433743476868, -0.7536288499832153, 0.6684414148330688, 0.02972542494535446, -1.057390570640564, -0.544126570224762, -0.5523024797439575, 0.420278936624527, 0.6668369770050049, -0.6964394450187683, 0.4672467112541199, 0.25808224081993103, -0.24606363475322723, -0.4199407696723938, -0.8408575654029846, -0.046847254037857056, 0.19735313951969147, -0.6122704148292542, 0.5980075597763062, -0.2756772041320801, 0.2418789565563202, 0.01933932490646839, 0.14434286952018738, -0.44802403450012207, -0.11512336879968643, -0.17551840841770172, 0.40819939970970154, -0.19076842069625854, -0.031976379454135895, 0.23731450736522675, -0.3784700036048889, 0.11593762040138245, 0.05728572607040405, 0.6370150446891785, -0.04718346893787384, -0.32660359144210815, -0.6912534832954407, 0.28547778725624084, 0.176382377743721, -0.19128532707691193, 0.38288724422454834, 1.1063886880874634, -0.29629814624786377, -0.18617719411849976, -0.2988136112689972, -0.23573866486549377, -0.5866819620132446, 0.5484767556190491, -0.47591444849967957, -0.9075822234153748, 0.29793551564216614, -0.13910460472106934, 0.16568335890769958, 0.8269044756889343, 0.7041198015213013, -0.06237844377756119, 1.3842848539352417, 1.0096821784973145, -0.45013248920440674, 0.4625391364097595, -0.47038429975509644, 0.4557076394557953, -1.0068217515945435, 0.30646640062332153, -0.6921190619468689, 0.06433236598968506, -0.9054668545722961, -0.3378138542175293, 0.04087395966053009, 0.22529274225234985, -0.3013804852962494, 0.7201393246650696, -0.8125967979431152, 0.011225324124097824, 0.7501756548881531, -0.41117361187934875, -0.009239851497113705, -0.17174722254276276, -0.23816826939582825, -0.1312834769487381, -0.7631834149360657, -0.7650482058525085, 0.7571462392807007, 0.6662113070487976, 0.7537396550178528, 0.04629749804735184, 0.5250522494316101, -0.012168348766863346, 0.5368871092796326, -0.8860942125320435, 0.5904842615127563, -0.12590055167675018, -0.8081420063972473, -0.3140336275100708, -0.28371673822402954, -0.900841474533081, 0.3045669198036194, -0.05143611505627632, -0.9916988611221313, 0.24171315133571625, 0.10974087566137314, -0.300901859998703, 0.3713003993034363, -0.540221631526947, 0.8461623787879944, -0.43945229053497314, 0.05346767231822014, -0.061180103570222855, -0.6960700154304504, 0.49306049942970276, -0.09225890040397644, 0.006454036571085453, -0.08352788537740707, -0.030775392428040504, 0.8555905818939209, -0.27561134099960327, 0.8734039664268494, -0.061034124344587326, 0.005132656544446945, 0.38172969222068787, -0.22018148005008698, 0.37798190116882324, 0.3569013178348541, 0.14331303536891937, 0.6747583150863647, 0.3404324948787689, -0.38519829511642456, -0.24041366577148438, 0.5421666502952576, -0.9263216257095337, -0.44770547747612, -0.6246191263198853, -0.2033938765525818, 0.17650845646858215, 0.5962526202201843, 0.5464498996734619, -0.1073487177491188, 0.059386707842350006, 0.25915780663490295, 0.24142232537269592, -0.39702853560447693, 0.6718770265579224, 0.6422820091247559, -0.08647406846284866, -0.43072229623794556, 1.0240203142166138, 0.1030690148472786, 0.07962319999933243, 0.6624282598495483, 0.06343045085668564, -0.17180897295475006, -0.45829543471336365, -0.40133413672447205, 0.5117948055267334, -0.33425313234329224, -0.05785584822297096, -0.35826531052589417, -0.5193445682525635, -0.6439761519432068, 0.1363150179386139, -0.4686277508735657, -0.4488665461540222, -0.36838576197624207, 0.11524060368537903, -0.40571433305740356, 0.1130651906132698, -0.4051361083984375, 0.5535247325897217, -1.1463830471038818, 0.5638629198074341, 0.2436082512140274, 0.19364801049232483, 0.06930037587881088, -0.2742968201637268, -0.6570870876312256, 0.09439336508512497, -0.9370884299278259, -0.6638015508651733, 0.6235482096672058, 0.04123710095882416, 0.5744485855102539, 0.7116795778274536, 0.27837809920310974, 0.5598909854888916, -0.6893523931503296, 1.1747841835021973, 0.4288311302661896, -1.1860238313674927, 0.44368937611579895, -0.12988899648189545, 0.3423371911048889, 0.30603110790252686, 0.48248597979545593, -0.8484178781509399, -0.3362714946269989, -0.5511905550956726, -1.1656602621078491, 0.7688797116279602, 0.4482155740261078, 0.26669391989707947, 0.025844302028417587, -0.059290897101163864, -0.0641842857003212, 0.1943099945783615, -1.0673305988311768, -0.5491492748260498, -0.36890044808387756, -0.35277530550956726, 0.20705240964889526, -0.46053698658943176, -0.002313504461199045, -0.28380224108695984, 1.1269612312316895, -0.04374111443758011, 0.8801391124725342, 0.395281583070755, 0.04520665109157562, -0.19346299767494202, 0.11485781520605087, 0.4765056371688843, 0.5148375034332275, -0.21135228872299194, -0.2531723976135254, 0.08496659249067307, -0.6122636198997498, -0.238883376121521, 0.3840946853160858, -0.4996647536754608, 0.4332849681377411, 0.5608460903167725, 0.6311641335487366, 0.11866020411252975, -0.4575905501842499, 0.6251445412635803, -0.30190151929855347, -0.18911747634410858, -1.0339722633361816, -0.06107519939541817, 0.0028856773860752583, 0.0935569778084755, 0.5890323519706726, -0.09337520599365234, 0.14943717420101166, -0.1589408963918686, 0.14997757971286774, 0.4012136161327362, -0.5459354519844055, -0.5476586818695068, 0.7940012216567993, 0.456063836812973, -0.3956839144229889, 0.8360439538955688, -0.17682164907455444, -0.8482524156570435, 0.6567766070365906, 0.4351695775985718, 0.9986167550086975, -0.2551915645599365, 0.0734156146645546, 0.677915096282959, 0.6120886206626892, 0.03177438676357269, 0.1589585840702057, -0.3177458643913269, -0.9287869930267334, -0.4898110330104828, -0.43482205271720886, -0.5021947622299194, 0.35099124908447266, -0.4958811402320862, 0.6553869843482971, -0.48702067136764526, -0.07652311772108078, -0.001552627538330853, 0.010342642664909363, -0.5976871848106384, 0.05271894857287407, 0.12122280895709991, 1.1812102794647217, -0.7050319314002991, 1.2295622825622559, 0.6231027841567993, -0.5799873471260071, -0.9136602878570557, 0.1913660168647766, -0.31799668073654175, -0.7535661458969116, 1.0012575387954712, 0.3383955955505371, 0.3638041317462921, 0.06779655069112778, -0.7732093930244446, -0.7924619913101196, 1.0835461616516113, -0.2010917216539383, -0.43950918316841125, -0.08134452253580093, 0.3855569660663605, 0.4517223834991455, -0.05655546113848686, 0.5071333646774292, 0.1434272974729538, 0.6592503190040588, -0.23453783988952637, -1.192543864250183, -0.2696913778781891, -0.2603719234466553, 0.12256935983896255, 0.23956826329231262, -1.0208401679992676, 0.8172714710235596, 0.0256506260484457, -0.3708856999874115, 0.5236592888832092, 1.015007495880127, -0.02072630077600479, 0.26004570722579956, 0.5807754397392273, 0.450704962015152, -0.00043747451854869723, -0.2429545670747757, 0.6022017598152161, -0.5655426383018494, 0.8941637277603149, 0.8998852968215942, 0.015315011143684387, 0.7796758413314819, 0.4682515561580658, -0.5363141298294067, 0.49890652298927307, 0.7565006017684937, -0.5697392225265503, 0.6574321389198303, -0.04518170282244682, -0.11102128773927689, -0.10754893720149994, 0.07254640012979507, -0.5196908116340637, 0.23089763522148132, 0.35750019550323486, -0.2960624396800995, -0.05556870996952057, -0.11716853827238083, -0.0596693679690361, -0.4194455146789551, -0.15326227247714996, 0.526479959487915, 0.2691945433616638, -0.16281791031360626, 0.48781660199165344, 0.3779905438423157, 1.0468469858169556, -1.0695756673812866, -0.32363948225975037, 0.24958275258541107, 0.21837615966796875, -0.09747471660375595, -0.64290851354599, 0.20173554122447968, -0.33926883339881897, -0.17043796181678772, -0.1544320434331894, 0.8047679662704468, -0.33430832624435425, -0.5964047908782959, 0.33581867814064026, 0.08657035231590271, 0.13871294260025024, 0.3432142436504364, -1.1948871612548828, -0.33681389689445496, 0.3611307740211487, -0.47571733593940735, 0.20224247872829437, 0.262124240398407, 0.1143667995929718, 0.7137622237205505, 0.8546178340911865, 0.1877782791852951, -0.19064861536026, -0.11616107821464539, 0.8599023222923279, -0.5915001034736633, -0.6180583834648132, -0.7414817214012146, 0.7654716372489929, -0.2734977900981903, -0.3444487452507019, 0.8111156821250916, 0.759943962097168, 1.268495798110962, -0.3619377613067627, 0.9490459561347961, -0.44468045234680176, 0.8108289837837219, -0.15378659963607788, 0.8803749084472656, -0.560565710067749, -0.04233622923493385, -0.2917585074901581, -0.8380886316299438, -0.27147427201271057, 0.8820693492889404, -0.22305196523666382, -0.14796099066734314, 0.7745343446731567, 0.6928545832633972, -0.030822310596704483, -0.19559624791145325, 0.20068128407001495, 0.26140832901000977, 0.6573657989501953, 0.45997798442840576, 0.628974199295044, -0.590582013130188, 0.7610337138175964, -0.7789510488510132, -0.18036524951457977, -0.1729346215724945, -0.6547160744667053, -0.697460412979126, -0.5503304600715637, -0.3380611836910248, -0.0668092593550682, -0.413770854473114, 0.8900213837623596, 0.7539170980453491, -1.0966663360595703, -0.39504215121269226, 0.08260294795036316, 0.18591900169849396, -0.36947983503341675, -0.3667653501033783, 0.6552271842956543, -0.3106532096862793, -1.22220778465271, 0.020679526031017303, 0.16287103295326233, 0.11163000762462616, -0.2863065004348755, 0.004154091700911522, -0.20365093648433685, -0.2042258083820343, 0.40092992782592773, 0.5377917289733887, -0.6845352053642273, -0.4296191930770874, -0.14171519875526428, -0.24421678483486176, 0.11009863764047623, 0.644359290599823, -0.19656021893024445, 0.35226699709892273, 0.6190441846847534, 0.25718677043914795, 0.3139077425003052, -0.2567666172981262, 0.5665844678878784, -0.5615763068199158, 0.38948285579681396, 0.40545591711997986, 0.5758376121520996, 0.33729088306427, -0.19199161231517792, 0.5395910739898682, 0.4983626902103424, -0.7573861479759216, -0.6803514957427979, 0.35866066813468933, -1.0286835432052612, -0.20219585299491882, 0.9618176221847534, -0.18133939802646637, -0.24923402070999146, -0.038455188274383545, -0.5896248817443848, 0.592676043510437, -0.33726370334625244, 0.6464712619781494, 0.7827482223510742, -0.10794439911842346, -0.09541928768157959, -0.5929207801818848, 0.40878069400787354, 0.4323361814022064, -0.3230176568031311, -0.37308722734451294, -0.03745972365140915, 0.1353704035282135, 0.6989268660545349, 0.4862390160560608, -0.05907387658953667, 0.0900566428899765, -0.06751596927642822, 0.5566532015800476, 0.04976436123251915, 0.18905967473983765, 0.018626214936375618, -0.17193081974983215, 0.12173101305961609, -0.4706125557422638 ]
JosefJilek/loliDiffusion
JosefJilek
"2023-11-09T19:29:56Z"
25,711
185
diffusers
[ "diffusers", "art", "anime", "text-to-image", "license:creativeml-openrail-m", "has_space", "region:us" ]
text-to-image
"2023-02-28T21:14:14Z"
--- license: creativeml-openrail-m pipeline_tag: text-to-image tags: - art - anime library_name: diffusers --- # Loli Diffusion The goal of this project is to improve generation of loli characters since most of other models are not good at it. \ __Support me: https://www.buymeacoffee.com/jilek772003__ \ \ __Some of the models can be used online on these plarforms:__ \ __Aipictors (Japanese) - https://www.aipictors.com__ \ __Yodayo (English) - https://www.aipictors.com (comming soon with more content here)__ ## Usage It is recommende to use standard resolution such as 512x768 and EasyNegative embedding with these models. \ Positive prompt example: 1girl, solo, loli, masterpiece \ Negative prompt example: EasyNegative, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, multiple panels, aged up, old \ All examples were generated using custom workflow in ComfyUI and weren't edited using inpainting. You can load the workflow by either importing the example images or importing the workflow directly ## Useful links Reddit: https://www.reddit.com/r/loliDiffusion \ Discord: https://discord.gg/mZ3eGeNX7S ## About v0.4.3 \ Fixed color issue \ General improvements \ \ v0.5.3 \ Integrated VAE\ File size reduced \ CLIP force reset fix \ \ v0.6.3 \ Style improvements \ Added PastelMix and Counterfeit style \ \ v0.7.x \ Style impovements \ Composition improvements \ \ v0.8.x \ Major improvement on higher resolutions \ Style improvements \ Flexibility and responsivity \ Added support for Night Sky YOZORA model \ \ v0.9.x \ Different approach at merging, you might find v0.8.x versions better \ Changes at supported models \ \ v2.1.X EXPERIMENTAL RELEASE \ Stable Diffusion 2.1-768 based \ Default negative prompt: (low quality, worst quality:1.4), (bad anatomy), extra finger, fewer digits, jpeg artifacts \ For positive prompt it's good to include tags: anime, (masterpiece, best quality) alternatively you may achieve positive response with: (exceptional, best aesthetic, new, newest, best quality, masterpiece, extremely detailed, anime, waifu:1.2) \ Though it's Loli Diffusion model it's quite general purpose \ The ability to generate realistic images as Waifu Diffusion can was intentionally decreased \ This model performs better at higher resolutions like 768\*X or 896\*X \ \ v0.10.x \ Different approach at merging \ Better hands \ Better style inheritance \ Some changes in supported models \ v0.11.x \ Slight changes \ Some changes in supported models \ \ v0.13.x \ Slight model stability improvements \ Prompting loli requires lower weight now ## Examples ### YOZORA <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00597_.png"></img> ### 10th Heaven <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00632_.png"></img> ### AOM2 SFW <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00667_.png"></img> ### BASED <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00744_.png"></img> ### Counterfeit <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00849_.png"></img> ### EstheticRetroAnime <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00905_.png"></img> ### Hassaku <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00954_.png"></img> ### Koji <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_00975_.png"></img> ### Animelike <img src="https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/examples/ComfyUI_01185_.png"></img> ## Resources https://huggingface.co/datasets/gsdf/EasyNegative \ https://huggingface.co/WarriorMama777/OrangeMixs \ https://huggingface.co/hakurei/waifu-diffusion-v1-4 \ https://huggingface.co/gsdf/Counterfeit-V2.5 \ https://civitai.com/models/12262?modelVersionId=14459 \ https://civitai.com/models/149664/based67 \ https://huggingface.co/gsdf/Counterfeit-V2.5 \ https://huggingface.co/Yntec/EstheticRetroAnime \ https://huggingface.co/dwarfbum/Hassaku \ https://huggingface.co/stb/animelike2d
[ -0.8250524997711182, -0.865014910697937, 0.350024938583374, 0.4263116717338562, -0.5217438340187073, -0.38253679871559143, 0.19479753077030182, -0.8376951217651367, 0.9993988275527954, 0.682928740978241, -0.8229987621307373, -0.41093873977661133, -0.5526896715164185, 0.15869538486003876, -0.1498863250017166, 0.8014505505561829, -0.0094872135668993, -0.1677667498588562, -0.09528236836194992, -0.12330283969640732, -0.4688125252723694, -0.006320548243820667, -0.8175991177558899, -0.6331839561462402, 0.41107624769210815, 0.31220683455467224, 0.6572489738464355, 0.563332200050354, 0.20395717024803162, 0.46448662877082825, -0.2459927350282669, 0.1329248994588852, -0.5114005208015442, -0.040404435247182846, 0.2242066115140915, -0.39510536193847656, -0.9427812099456787, 0.0900426134467125, 0.5043671727180481, 0.40526145696640015, 0.06394508481025696, 0.049252185970544815, 0.16212870180606842, 0.7723068594932556, -0.33006182312965393, -0.06648708134889603, 0.1623101830482483, 0.26157936453819275, -0.19909213483333588, 0.10848511755466461, -0.1195109486579895, -0.6524145603179932, -0.10762917995452881, -0.9755086302757263, -0.1194944977760315, -0.1642732322216034, 1.3358139991760254, 0.07515280693769455, -0.2993607819080353, 0.02484663762152195, -0.2545633912086487, 0.6939448118209839, -0.9534635543823242, 0.1237012967467308, 0.317271888256073, 0.12377682328224182, -0.21281927824020386, -0.6837142705917358, -0.48157843947410583, 0.12716084718704224, -0.23795492947101593, 0.29827985167503357, -0.46590718626976013, -0.40971919894218445, 0.47703346610069275, 0.5747826099395752, -0.6034830212593079, -0.058318786323070526, -0.22605587542057037, -0.06388740986585617, 0.7573691606521606, 0.0797085240483284, 0.8013207912445068, -0.20572249591350555, -0.3679088056087494, -0.059327270835638046, -0.7213219404220581, 0.0005089799524284899, 0.32825973629951477, -0.2681599259376526, -0.7736988663673401, 0.5114119052886963, -0.16822119057178497, 0.6392499804496765, 0.37424933910369873, -0.35833919048309326, 0.7253022193908691, -0.29745152592658997, -0.2563130259513855, -0.4449494481086731, 1.0128840208053589, 0.6957435011863708, 0.1952090561389923, 0.2845928966999054, 0.06963098049163818, -0.23063331842422485, -0.09945149719715118, -1.2120376825332642, 0.0017245208146050572, 0.22324931621551514, -0.7578452229499817, -0.5752047896385193, -0.22374041378498077, -1.0630853176116943, -0.14084409177303314, -0.04987633600831032, 0.30325374007225037, -0.6217430830001831, -0.41461339592933655, -0.12477249652147293, -0.35856544971466064, -0.008707867935299873, 0.6651307940483093, -0.5586593151092529, 0.00916303787380457, 0.21517819166183472, 0.7254290580749512, 0.07884290814399719, 0.07284534722566605, -0.19356591999530792, 0.11156630516052246, -0.40152305364608765, 0.8954799175262451, -0.2683964669704437, -0.5369701981544495, -0.23742146790027618, 0.30179157853126526, 0.15614202618598938, -0.3259027302265167, 0.5738466382026672, -0.041841041296720505, 0.41523876786231995, -0.3686792254447937, -0.5596563816070557, -0.14790184795856476, 0.19536282122135162, -0.7883719801902771, 0.6564069390296936, 0.3783338963985443, -0.9050255417823792, 0.04378616809844971, -0.8689795732498169, -0.11488967388868332, -0.005827092099934816, 0.07332286238670349, -0.6541107296943665, -0.07690862566232681, -0.08113013952970505, 0.3254810869693756, -0.07982677966356277, -0.42721793055534363, -0.6708405613899231, -0.31485217809677124, 0.48406052589416504, -0.09315337985754013, 1.253196120262146, 0.4661712944507599, -0.43388766050338745, -0.09154345095157623, -0.8871872425079346, 0.09939590841531754, 0.6318221092224121, 0.07200026512145996, -0.3839830458164215, -0.33601126074790955, 0.11036088317632675, 0.14575082063674927, 0.44928213953971863, -0.5406328439712524, 0.4343568682670593, -0.4140157103538513, 0.3296818733215332, 0.7445523738861084, 0.28584399819374084, 0.476077675819397, -0.5335015058517456, 0.6006365418434143, 0.09710772335529327, 0.4901081621646881, -0.18391914665699005, -0.729453444480896, -0.9777435660362244, -0.4083244502544403, 0.04513942450284958, 0.24519549310207367, -0.7114802002906799, 0.4636227786540985, 0.06932797282934189, -0.7972894906997681, -0.4466952681541443, 0.1338348239660263, 0.45256903767585754, 0.506041407585144, 0.09716080874204636, -0.45913931727409363, -0.4355531632900238, -0.9261117577552795, 0.22729262709617615, -0.10031908005475998, 0.21473100781440735, 0.3366954028606415, 0.47209885716438293, -0.4697113335132599, 0.5103439092636108, -0.883307158946991, -0.23595601320266724, -0.0449485182762146, 0.05039319396018982, 0.46479153633117676, 0.6921576261520386, 1.135960578918457, -1.0664260387420654, -0.767203688621521, 0.04821614921092987, -0.8993500471115112, -0.19761422276496887, 0.3117341101169586, -0.629736602306366, 0.24795331060886383, 0.19110599160194397, -0.6494441032409668, 0.6522398591041565, 0.5770235657691956, -0.8268747329711914, 0.4857748746871948, -0.27031591534614563, 0.585153341293335, -1.3989856243133545, 0.2314492017030716, 0.23903721570968628, -0.3755362927913666, -0.8161548376083374, 0.7087149620056152, -0.21837620437145233, 0.04251899942755699, -0.6131961941719055, 0.8635970950126648, -0.33861058950424194, 0.3674435019493103, -0.32929491996765137, 0.054458148777484894, 0.365928590297699, 0.46146395802497864, 0.14925694465637207, 0.3148721158504486, 0.5406482219696045, -0.3777124285697937, 0.5898432731628418, 0.5000038743019104, -0.1029130145907402, 1.2059550285339355, -0.7833528518676758, 0.2601981461048126, -0.20358975231647491, 0.3002517521381378, -0.9521167874336243, -0.5270093083381653, 0.878463864326477, -0.5771782398223877, 0.39846542477607727, -0.17496801912784576, -0.5348894000053406, -0.5324568748474121, -0.5642329454421997, 0.2971743047237396, 0.9863333702087402, -0.4028293192386627, 0.5673542618751526, 0.21897222101688385, 0.14137819409370422, -0.361771821975708, -0.8605316877365112, -0.14781926572322845, -0.6575213074684143, -0.8659338355064392, 0.30405715107917786, -0.45690664649009705, -0.1045612245798111, 0.13836462795734406, 0.3754409849643707, -0.3021796941757202, 0.0032075948547571898, 0.522879421710968, 0.548204243183136, -0.24270817637443542, -0.33537575602531433, -0.12776918709278107, -0.10116060078144073, -0.21447211503982544, 0.11763454228639603, 0.4943446218967438, -0.10628609359264374, -0.33770039677619934, -0.7316332459449768, 0.35727769136428833, 0.5863284468650818, 0.18308985233306885, 0.5884281992912292, 0.9425113797187805, -0.5323939919471741, 0.17581939697265625, -0.6283380389213562, 0.18562355637550354, -0.5194200277328491, -0.2877237796783447, -0.3671067953109741, -0.6276183128356934, 0.8063324689865112, 0.286239892244339, 0.04831506311893463, 0.7219743728637695, 0.5164692997932434, -0.26998552680015564, 1.1661665439605713, 0.49810591340065, -0.1712110936641693, 0.7211769223213196, -0.7129464149475098, -0.020095355808734894, -0.834513247013092, -0.4083056151866913, -0.27891021966934204, -0.4574873447418213, -0.6097365021705627, -0.6102520227432251, 0.3757476508617401, 0.31062814593315125, -0.2280234694480896, 0.7775656580924988, -0.4453706443309784, 0.2024657279253006, 0.23964545130729675, 0.3787343502044678, 0.3965647220611572, 0.08706875145435333, 0.24993306398391724, -0.1573173850774765, -0.33291202783584595, -0.20447127521038055, 0.6069384813308716, 0.43192699551582336, 0.6952001452445984, 0.36272796988487244, 0.9861442446708679, 0.0847981721162796, 0.27759721875190735, -0.47270670533180237, 0.6282234787940979, -0.18131369352340698, -0.6854570508003235, -0.23130293190479279, -0.5371852517127991, -1.0603382587432861, 0.203193798661232, -0.35806065797805786, -0.8083552122116089, 0.4230497181415558, 0.36130791902542114, -0.2894948720932007, 0.1308061182498932, -0.697849452495575, 0.6996766328811646, 0.20000045001506805, -0.5741326808929443, -0.11260227859020233, -0.34493687748908997, 0.40320172905921936, 0.038302283734083176, 0.15961045026779175, -0.15969161689281464, -0.003854462644085288, 0.5177376866340637, -0.8697551488876343, 0.9005226492881775, -0.2541806101799011, -0.3852013945579529, 0.5374444723129272, -0.09588851779699326, 0.554598867893219, 0.02992926724255085, -0.18875277042388916, -0.02472345530986786, 0.16398173570632935, -0.5481728315353394, -0.5886368751525879, 0.9201042652130127, -0.6841244101524353, -0.3236580193042755, -0.22972050309181213, -0.07700830698013306, 0.15911567211151123, 0.23064760863780975, 0.9437295794487, 0.4783703088760376, -0.3777227997779846, 0.059754837304353714, 0.7811571359634399, -0.11860551685094833, 0.37852516770362854, 0.1409054547548294, -0.4549771249294281, -0.5190801024436951, 0.9996631741523743, 0.12605801224708557, 0.34715986251831055, 0.15636146068572998, 0.4342336654663086, -0.16756318509578705, 0.017910782247781754, -0.5755726099014282, 0.5304825901985168, -0.6280139684677124, -0.38787516951560974, -0.4101412892341614, -0.29908865690231323, -0.6602009534835815, -0.28895333409309387, -0.3409130871295929, -0.3842526376247406, -0.7539661526679993, 0.2427191138267517, 0.7509102821350098, 0.7642037868499756, -0.21910469233989716, 0.1648227572441101, -0.5799517631530762, 0.5279730558395386, 0.29773199558258057, 0.38648226857185364, 0.06913703680038452, -0.6528693437576294, -0.07578791677951813, 0.18902212381362915, -0.4700206220149994, -0.8806502223014832, 0.503727376461029, -0.07587379217147827, 0.4543209671974182, 0.7032632231712341, -0.16278254985809326, 1.064231038093567, -0.3372533321380615, 0.6512793898582458, 0.8351125717163086, -0.6492937207221985, 0.5991191267967224, -0.5238553285598755, 0.23178629577159882, 0.3729934096336365, 0.35603559017181396, -0.5895289778709412, -0.36057642102241516, -0.9750708341598511, -0.5080649256706238, 0.4110075831413269, 0.35524165630340576, 0.2776111960411072, 0.10943769663572311, 0.40597498416900635, -0.10884774476289749, 0.10087900608778, -1.0227500200271606, -0.6733318567276001, -0.4263931214809418, -0.06486325711011887, 0.10648418217897415, -0.10931496322154999, -0.03794768452644348, -0.3940674662590027, 0.8435579538345337, -0.08872859925031662, 0.5117422938346863, 0.21623539924621582, 0.29050636291503906, -0.39352530241012573, -0.08411934226751328, 0.5906742811203003, 0.2942107915878296, -0.10236683487892151, -0.3907782733440399, 0.1767033189535141, -0.3252207040786743, 0.18733464181423187, 0.014339184388518333, -0.5172659754753113, 0.10465772449970245, 0.3042448163032532, 0.9061092138290405, 0.2173735648393631, -0.43578070402145386, 0.6274398565292358, 0.03212437033653259, -0.2507597506046295, -0.6356163024902344, 0.4419940412044525, 0.28658729791641235, 0.48063623905181885, -0.023822007700800896, 0.14587977528572083, 0.429127961397171, -0.7968326807022095, -0.013120396994054317, 0.4031503200531006, -0.38179177045822144, -0.3491998016834259, 0.5412841439247131, 0.1240820437669754, -0.2627512216567993, 0.2144823968410492, -0.5007011294364929, -0.43699806928634644, 0.7482678294181824, 0.6064090728759766, 0.5695176124572754, -0.3604982793331146, 0.5180723667144775, 0.8126724362373352, -0.22130495309829712, -0.10161345452070236, 0.2890932559967041, 0.2621404528617859, -0.29003670811653137, -0.20353318750858307, -0.5011312365531921, -0.06860154867172241, 0.3398953378200531, -0.385608047246933, 0.5969823598861694, -0.5748477578163147, -0.377689391374588, -0.2506271302700043, 0.18853160738945007, -0.5570179224014282, 0.33530405163764954, 0.1399383693933487, 0.9831432700157166, -0.9283447861671448, 0.7531785368919373, 0.4755416810512543, -0.6072571873664856, -0.8131496906280518, -0.1079985573887825, 0.21126458048820496, -0.7811404466629028, 0.4713447690010071, 0.049341775476932526, 0.08237285912036896, -0.1597570776939392, -0.805734395980835, -0.8731030821800232, 1.2348737716674805, 0.12896378338336945, -0.3052668571472168, -0.12759192287921906, -0.3391176760196686, 0.7025778889656067, -0.5932151079177856, 0.30732229351997375, 0.25512295961380005, 0.5375247001647949, 0.42865458130836487, -0.5398022532463074, 0.20349135994911194, -0.7532050609588623, 0.16472874581813812, 0.18834288418293, -1.1753615140914917, 0.7773754000663757, -0.14081132411956787, -0.11335568875074387, 0.7757959365844727, 0.6804003119468689, 0.46737608313560486, 0.4250123202800751, 0.712752103805542, 0.9519460797309875, 0.25925102829933167, -0.06601747125387192, 1.0333887338638306, 0.19667880237102509, 0.3150862455368042, 0.7026710510253906, 0.12222950160503387, 0.6796890497207642, 0.2593775987625122, -0.18221859633922577, 0.7542752623558044, 0.6106379628181458, -0.2910589873790741, 0.4093608558177948, 0.1595829874277115, -0.2116006463766098, -0.13074123859405518, -0.427411288022995, -0.6583738923072815, 0.07040337473154068, 0.1489221453666687, -0.323793888092041, 0.0475035235285759, 0.18851082026958466, 0.23873944580554962, 0.05281030759215355, -0.2253175526857376, 0.582772970199585, 0.2607644498348236, -0.5116239190101624, 0.5720163583755493, -0.27565085887908936, 0.8214130401611328, -0.5622760653495789, -0.26838961243629456, -0.41344350576400757, -0.04311608523130417, -0.3569795489311218, -0.9130128622055054, 0.06693071126937866, 0.15173228085041046, 0.11876531690359116, -0.22544331848621368, 0.8658130764961243, -0.2518666386604309, -0.7638911008834839, 0.42654654383659363, 0.16291920840740204, 0.477218896150589, 0.25924140214920044, -1.0467116832733154, 0.4498406946659088, 0.24878694117069244, -0.4663490653038025, 0.21498405933380127, 0.5160830020904541, 0.29014551639556885, 0.5351157784461975, 0.3515312671661377, 0.27681922912597656, -0.23142533004283905, 0.17530906200408936, 0.778121292591095, -0.3931289315223694, -0.3334769308567047, -0.6974925994873047, 0.7471883893013, -0.45842245221138, -0.2382155954837799, 0.8407912850379944, 0.22969606518745422, 0.5538051724433899, -0.25502726435661316, 0.4958541989326477, -0.393458753824234, 0.4859488904476166, -0.4852954149246216, 0.8346536755561829, -1.0815404653549194, -0.20698700845241547, -0.7445976138114929, -0.8300562500953674, 0.07704270631074905, 0.9244740009307861, 0.21000854671001434, 0.11884017288684845, 0.2889939248561859, 0.662869930267334, 0.005865768529474735, -0.28599709272384644, 0.1701890230178833, 0.17883802950382233, 0.1759057492017746, 0.7507197260856628, 0.8404948711395264, -0.8704535961151123, 0.11531361937522888, -0.6204430460929871, -0.2807939052581787, -0.6038281917572021, -0.9466664791107178, -1.0356996059417725, -0.8257764577865601, -0.7591598033905029, -0.6114575266838074, -0.31969916820526123, 0.880484402179718, 0.9738166332244873, -0.4593910276889801, -0.0947909876704216, 0.12209737300872803, 0.10603658109903336, 0.10587652027606964, -0.26356321573257446, -0.08975116908550262, 0.5228307843208313, -1.1447361707687378, -0.013532699085772038, 0.10179824382066727, 0.731252908706665, -0.15158356726169586, -0.43276941776275635, -0.05192297697067261, -0.07971063256263733, 0.6457611322402954, 0.4529464542865753, -0.4848460257053375, -0.25429481267929077, -0.10351873189210892, -0.05681155249476433, 0.05642036721110344, 0.36501964926719666, -0.3442903459072113, 0.005890079773962498, 0.7879173755645752, -0.031017256900668144, 0.5914799571037292, 0.01721077226102352, 0.17627902328968048, -0.34506112337112427, 0.22149251401424408, -0.193759948015213, 0.5745819211006165, 0.1916361153125763, -0.5822102427482605, 0.7807072401046753, 0.5478290915489197, -0.4620247781276703, -0.7677421569824219, 0.2963811159133911, -1.2696597576141357, -0.30402669310569763, 0.8856161236763, -0.17618688941001892, -0.504509449005127, 0.4468919038772583, -0.4713265597820282, 0.23832324147224426, -0.40350714325904846, 0.30781546235084534, 0.6576399207115173, -0.35019633173942566, -0.23202449083328247, -0.4379968047142029, 0.18817107379436493, 0.18086116015911102, -1.0410634279251099, -0.28206667304039, 0.7791550159454346, 0.47008174657821655, 0.7196542620658875, 0.8857300281524658, -0.3985873758792877, 0.2788223326206207, -0.11059684306383133, -0.02999025583267212, 0.12776543200016022, 0.13349370658397675, -0.24766553938388824, -0.2085331678390503, -0.07932315021753311, -0.04028820991516113 ]
elyza/ELYZA-japanese-Llama-2-7b-instruct
elyza
"2023-08-29T03:46:15Z"
25,693
43
transformers
[ "transformers", "pytorch", "llama", "text-generation", "ja", "en", "arxiv:2307.09288", "license:llama2", "endpoints_compatible", "has_space", "text-generation-inference", "region:us" ]
text-generation
"2023-08-28T12:58:25Z"
--- license: llama2 language: - ja - en --- ## ELYZA-japanese-Llama-2-7b ![ELYZA-Japanese-Llama2-image](./key_visual.png) ### Model Description **ELYZA-japanese-Llama-2-7b** は、 Llama2をベースとして日本語能力を拡張するために追加事前学習を行ったモデルです。 詳細は [Blog記事](https://note.com/elyza/n/na405acaca130) を参照してください。 ### Usage ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer B_INST, E_INST = "[INST]", "[/INST]" B_SYS, E_SYS = "<<SYS>>\n", "\n<</SYS>>\n\n" DEFAULT_SYSTEM_PROMPT = "あなたは誠実で優秀な日本人のアシスタントです。" text = "クマが海辺に行ってアザラシと友達になり、最終的には家に帰るというプロットの短編小説を書いてください。" model_name = "elyza/ELYZA-japanese-Llama-2-7b-instruct" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto") if torch.cuda.is_available(): model = model.to("cuda") prompt = "{bos_token}{b_inst} {system}{prompt} {e_inst} ".format( bos_token=tokenizer.bos_token, b_inst=B_INST, system=f"{B_SYS}{DEFAULT_SYSTEM_PROMPT}{E_SYS}", prompt=text, e_inst=E_INST, ) with torch.no_grad(): token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt") output_ids = model.generate( token_ids.to(model.device), max_new_tokens=256, pad_token_id=tokenizer.pad_token_id, eos_token_id=tokenizer.eos_token_id, ) output = tokenizer.decode(output_ids.tolist()[0][token_ids.size(1) :], skip_special_tokens=True) print(output) """ 承知しました。以下にクマが海辺に行ってアザラシと友達になり、最終的には家に帰るというプロットの短編小説を記述します。 クマは山の中でゆっくりと眠っていた。 その眠りに落ちたクマは、夢の中で海辺を歩いていた。 そこにはアザラシがいた。 クマはアザラシに話しかける。 「おはよう」とクマが言うと、アザラシは驚いたように顔を上げた。 「あ、こんにちは」アザラシは答えた。 クマはアザラシと友達になりたいと思う。 「私はクマと申します。」クマは... """ ``` ### ELYZA-japanese-Llama-2-7b Models | Model Name | Vocab Size | #Params | |:---------------------------------------------|:----------:|:-------:| |[elyza/ELYZA-japanese-Llama-2-7b](https://huggingface.co/elyza/ELYZA-japanese-Llama-2-7b)| 32000 | 6.27B | |[elyza/ELYZA-japanese-Llama-2-7b-instruct](https://huggingface.co/elyza/ELYZA-japanese-Llama-2-7b-instruct)| 32000 | 6.27B | |[elyza/ELYZA-japanese-Llama-2-7b-fast](https://huggingface.co/elyza/ELYZA-japanese-Llama-2-7b-fast)| 45043 | 6.37B | |[elyza/ELYZA-japanese-Llama-2-7b-fast-instruct](https://huggingface.co/elyza/ELYZA-japanese-Llama-2-7b-fast-instruct)| 45043 | 6.37B | ### Developers 以下アルファベット順 - [Akira Sasaki](https://huggingface.co/akirasasaki) - [Masato Hirakawa](https://huggingface.co/m-hirakawa) - [Shintaro Horie](https://huggingface.co/e-mon) - [Tomoaki Nakamura](https://huggingface.co/tyoyo) ### Licence Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved. ### How to Cite ```tex @misc{elyzallama2023, title={ELYZA-japanese-Llama-2-7b}, url={https://huggingface.co/elyza/ELYZA-japanese-Llama-2-7b}, author={Akira Sasaki and Masato Hirakawa and Shintaro Horie and Tomoaki Nakamura}, year={2023}, } ``` ### Citations ```tex @misc{touvron2023llama, title={Llama 2: Open Foundation and Fine-Tuned Chat Models}, author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom}, year={2023}, eprint={2307.09288}, archivePrefix={arXiv}, primaryClass={cs.CL} } ```
[ -0.47957712411880493, -0.6532908082008362, 0.27820146083831787, 0.3666231334209442, -0.5690292119979858, 0.08127988874912262, 0.1424674689769745, -0.651692271232605, 0.6269738674163818, 0.11230385303497314, -0.6480724215507507, -0.6336586475372314, -0.5989176630973816, 0.20870926976203918, -0.11224447190761566, 0.7865187525749207, -0.14042098820209503, -0.33525359630584717, 0.04879045486450195, -0.019632749259471893, -0.21611018478870392, -0.3943593204021454, -0.5372695922851562, -0.31926044821739197, 0.2915147840976715, 0.15362906455993652, 0.5824121832847595, 0.7054396867752075, 0.5423994660377502, 0.43370237946510315, -0.2712298333644867, 0.29612651467323303, -0.2803392708301544, -0.2179689258337021, 0.25457921624183655, -0.5149033069610596, -0.8114490509033203, -0.3071867525577545, 0.5643212795257568, 0.32437485456466675, 0.09429536759853363, 0.3760445713996887, -0.04311502352356911, 0.31878238916397095, -0.2947123050689697, 0.03823292627930641, -0.3938823938369751, 0.08967679738998413, -0.22894831001758575, -0.22326843440532684, -0.13135775923728943, -0.369584858417511, -0.29122474789619446, -0.8892716765403748, -0.0659499242901802, 0.08055136352777481, 1.5185128450393677, 0.2347659021615982, -0.2950415313243866, -0.013727035373449326, -0.16473808884620667, 0.905551552772522, -1.0201528072357178, 0.20120975375175476, 0.30521711707115173, -0.0850026085972786, -0.35703229904174805, -0.8524951934814453, -0.7652429938316345, -0.09406682103872299, -0.3040526211261749, 0.20740540325641632, -0.48071277141571045, -0.32247382402420044, 0.20554639399051666, 0.22651152312755585, -0.4669991433620453, 0.3070370852947235, -0.5636388659477234, -0.13088580965995789, 0.7860523462295532, 0.1975908726453781, 0.6061020493507385, -0.36870869994163513, -0.5941590070724487, -0.18955643475055695, -0.6983475685119629, 0.25707826018333435, 0.36670511960983276, 0.10376547276973724, -0.742283284664154, 0.6527257561683655, -0.21627257764339447, 0.4493437111377716, 0.138116717338562, -0.38574784994125366, 0.6768779158592224, -0.4578838646411896, -0.2734130918979645, -0.23954029381275177, 1.1803256273269653, 0.6982188820838928, -0.03005111776292324, 0.17542913556098938, 0.007965529337525368, -0.00423913449048996, -0.46906182169914246, -0.9645054340362549, 0.1709197610616684, 0.34188082814216614, -0.6263039708137512, -0.4079080820083618, -0.07588259130716324, -0.9145615100860596, -0.071851447224617, 0.07729501277208328, 0.23752710223197937, -0.2070792317390442, -0.45588406920433044, 0.19543330371379852, 0.005435558035969734, 0.4307739734649658, 0.15866899490356445, -0.6891905069351196, 0.1485675722360611, 0.4077514410018921, 0.9557881355285645, 0.0735180526971817, -0.32512885332107544, -0.15746775269508362, 0.22498834133148193, -0.18802447617053986, 0.7052373886108398, -0.30580970644950867, -0.5393365621566772, -0.29243481159210205, 0.22549159824848175, -0.12187036126852036, -0.29715925455093384, 0.3866312503814697, -0.11268583685159683, 0.08366057276725769, -0.3283262550830841, -0.2845768928527832, -0.211219921708107, 0.09890410304069519, -0.35704898834228516, 1.1347171068191528, -0.04280823469161987, -0.9184320569038391, 0.00013986561680212617, -0.48236408829689026, -0.17482124269008636, -0.1268475502729416, -0.03070315718650818, -0.58991938829422, -0.1969148963689804, 0.45269161462783813, 0.475966215133667, -0.42889925837516785, -0.050667934119701385, -0.398374080657959, -0.31190505623817444, 0.3428090810775757, -0.04676854982972145, 1.1373815536499023, 0.3510781526565552, -0.47755134105682373, -0.014466932974755764, -0.8952709436416626, 0.05886148661375046, 0.6997610926628113, -0.31538647413253784, 0.021616443991661072, -0.19126330316066742, -0.101865753531456, 0.14697852730751038, 0.6135950684547424, -0.5904902815818787, 0.27035969495773315, -0.456680566072464, 0.5673626065254211, 0.9183648228645325, 0.09037604182958603, 0.15377755463123322, -0.5250464677810669, 0.46689993143081665, 0.13686035573482513, 0.28479325771331787, -0.1405000388622284, -0.6662076115608215, -1.021780252456665, -0.39621636271476746, -0.16041505336761475, 0.5264675617218018, -0.5381991267204285, 0.7248665690422058, -0.12968562543392181, -0.8449952602386475, -0.4596680998802185, 0.040925636887550354, 0.4848494827747345, 0.31018945574760437, 0.2608785331249237, -0.2767055928707123, -0.8754366636276245, -0.7280782461166382, -0.11320894211530685, -0.3756132423877716, 0.23391476273536682, 0.47067296504974365, 0.708451509475708, -0.43621131777763367, 0.6645994782447815, -0.5230156779289246, -0.2487403005361557, -0.2096402943134308, -0.22651563584804535, 0.7025852799415588, 0.7041445374488831, 0.7832399606704712, -0.5349040627479553, -0.5767129063606262, 0.1954997330904007, -0.9231289029121399, -0.07991527020931244, -0.009805263951420784, -0.5208352208137512, 0.31573712825775146, 0.2410678118467331, -0.7668545842170715, 0.6310977339744568, 0.4355286955833435, -0.6673468351364136, 0.3646426200866699, -0.18510274589061737, 0.17294840514659882, -1.2556408643722534, 0.1407981663942337, -0.10955819487571716, 0.025056399405002594, -0.549851655960083, 0.029945753514766693, -0.18661490082740784, 0.31952470541000366, -0.5589096546173096, 0.9224233627319336, -0.4647962152957916, -0.012138612568378448, -0.06357262283563614, 0.37509021162986755, 0.045994099229574203, 0.6609433889389038, -0.10913494229316711, 0.6495177149772644, 0.516223132610321, -0.519450306892395, 0.515987753868103, 0.5897534489631653, -0.2925977110862732, 0.4748372435569763, -0.9113092422485352, 0.27811044454574585, 0.07101114094257355, 0.4603019058704376, -1.2423169612884521, -0.22686007618904114, 0.5031037926673889, -0.7186169028282166, 0.03319980204105377, -0.12530797719955444, -0.48041751980781555, -0.6391246914863586, -0.44504159688949585, 0.3197716176509857, 0.6352016925811768, -0.761368453502655, 0.4161398708820343, 0.2966444492340088, 0.05221182852983475, -0.7857449054718018, -0.7661896347999573, -0.19219981133937836, -0.2882164716720581, -0.802215039730072, 0.43048855662345886, -0.23260380327701569, -0.19272927939891815, -0.18152235448360443, -0.06785023957490921, -0.01604968123137951, 0.1607741117477417, 0.28890904784202576, 0.662409782409668, -0.25391119718551636, -0.4013659358024597, -0.0024554377887398005, -0.18242689967155457, -0.04963307827711105, -0.04808448627591133, 0.9136928915977478, -0.3283346891403198, -0.4124593138694763, -0.9069838523864746, 0.1441328376531601, 0.5350618362426758, -0.21756774187088013, 0.8073079586029053, 0.7790877223014832, -0.39618968963623047, 0.3753494620323181, -0.5856534838676453, -0.03728337958455086, -0.5347478985786438, 0.3838227689266205, -0.45686227083206177, -0.5376756191253662, 0.911970853805542, 0.3292459547519684, 0.24355535209178925, 0.7202657461166382, 0.6495862007141113, 0.026335621252655983, 1.0528323650360107, 0.5882671475410461, -0.05031773820519447, 0.5807794332504272, -0.6907783150672913, 0.29272520542144775, -1.047518253326416, -0.6327236890792847, -0.44823983311653137, -0.38696473836898804, -0.4942966103553772, -0.42607611417770386, 0.24353210628032684, 0.14610394835472107, -0.632986843585968, 0.4400559961795807, -0.7136104702949524, 0.29945093393325806, 0.3845519721508026, 0.23098617792129517, 0.227658212184906, 0.1388459950685501, -0.19576457142829895, 0.025201227515935898, -0.39312928915023804, -0.4152072072029114, 1.1436738967895508, 0.4619561731815338, 0.6317766904830933, 0.2672519385814667, 0.874635636806488, -0.16397574543952942, 0.010769509710371494, -0.4960058629512787, 0.7002562284469604, 0.18450696766376495, -0.6871819496154785, -0.09644351154565811, -0.21039839088916779, -1.0705392360687256, 0.5067028403282166, 0.005506154615432024, -1.1376426219940186, 0.28525489568710327, -0.2379685640335083, -0.4209405183792114, 0.5297207236289978, -0.503756582736969, 0.5550470948219299, -0.33854296803474426, -0.4593759775161743, -0.025641370564699173, -0.5764068365097046, 0.39902618527412415, 0.20845556259155273, 0.27392470836639404, -0.3641183078289032, -0.3075009286403656, 1.1179331541061401, -0.6485094428062439, 0.9204413890838623, -0.10355373471975327, -0.1680523157119751, 0.4074522852897644, -0.09573078155517578, 0.7382017970085144, 0.24080321192741394, 0.009682576172053814, 0.274581640958786, -0.001797202625311911, -0.38142040371894836, -0.20433636009693146, 0.7433920502662659, -1.2455699443817139, -0.7583136558532715, -0.4981386363506317, -0.18952971696853638, 0.207889124751091, 0.2501809000968933, 0.6196075081825256, 0.13359586894512177, 0.21715648472309113, 0.14658568799495697, 0.3752444088459015, -0.3677094280719757, 0.7516840696334839, 0.3110654652118683, -0.3195328414440155, -0.6537901163101196, 0.7328240871429443, 0.15300650894641876, 0.2029673457145691, 0.27806398272514343, 0.07209257036447525, -0.2608244717121124, -0.18388210237026215, -0.49540141224861145, 0.7724611759185791, -0.7673680782318115, -0.3758094012737274, -0.7423661947250366, -0.3368135094642639, -0.40201690793037415, -0.4433201849460602, -0.3810427188873291, -0.4274918735027313, -0.6815041303634644, -0.16973988711833954, 0.8338490724563599, 0.5150230526924133, -0.1346440315246582, 0.3878408372402191, -0.5498805642127991, 0.25238195061683655, 0.03937884420156479, 0.15977147221565247, 0.22043924033641815, -0.890396237373352, -0.06775283813476562, 0.023347828537225723, -0.3701397180557251, -0.9470418691635132, 0.7625237703323364, -0.04992881044745445, 0.657637894153595, 0.33929675817489624, -0.08513133227825165, 1.0258402824401855, -0.1460728645324707, 0.9155117869377136, 0.5867306590080261, -0.9374157786369324, 0.6652206182479858, -0.4193134307861328, 0.016605276614427567, 0.03249742090702057, 0.22960162162780762, -0.439364492893219, -0.15385594964027405, -0.8226631283760071, -1.0291699171066284, 0.9656159281730652, 0.2378227412700653, 0.2224612683057785, 0.11183153837919235, 0.22698257863521576, -0.10319729149341583, 0.05105259642004967, -1.0260499715805054, -0.7744706273078918, -0.23663507401943207, -0.1878127157688141, 0.052650220692157745, -0.26485350728034973, -0.15348367393016815, -0.5612233877182007, 0.8576392531394958, 0.048206597566604614, 0.637356162071228, 0.28325918316841125, -0.060072820633649826, -0.14610256254673004, -0.01856093481183052, 0.7737104892730713, 0.41602611541748047, -0.11619815975427628, -0.20972700417041779, 0.48089149594306946, -0.6416952013969421, 0.22348365187644958, -0.027805913239717484, -0.13747967779636383, 0.12197212129831314, 0.33152058720588684, 0.9578269124031067, 0.24421648681163788, -0.4271511733531952, 0.5037295818328857, 0.03667939826846123, -0.14532357454299927, -0.4510689675807953, 0.009652581997215748, 0.21207726001739502, 0.463889479637146, 0.4211265742778778, -0.19033312797546387, -0.28383052349090576, -0.44716358184814453, -0.14227750897407532, 0.35104358196258545, 0.08785250037908554, -0.3043062090873718, 0.8731301426887512, 0.1589091718196869, -0.20945210754871368, 0.3664436638355255, -0.015971770510077477, -0.5656444430351257, 1.0291985273361206, 0.804049015045166, 0.6443660259246826, -0.22826436161994934, -0.01212554331868887, 0.8833560943603516, 0.2206255942583084, 0.16074053943157196, 0.4205089509487152, 0.0031507625244557858, -0.5554714798927307, 0.06065791845321655, -0.7290502190589905, -0.05926116928458214, 0.20291796326637268, -0.4257867634296417, 0.43818217515945435, -0.6431662440299988, -0.2381933480501175, -0.22904345393180847, 0.4134679138660431, -0.6654945611953735, 0.01858716644346714, 0.10281545668840408, 0.7387131452560425, -0.7551687955856323, 0.6697065830230713, 0.5777524709701538, -0.6260644197463989, -0.9226481318473816, -0.37431100010871887, 0.09764637053012848, -1.1876544952392578, 0.6360207796096802, 0.039259281009435654, -0.06671726703643799, 0.12259001284837723, -0.7001574039459229, -1.3791677951812744, 1.5180456638336182, 0.14346280694007874, -0.4442177414894104, 0.1106426864862442, -0.10243652760982513, 0.4144245684146881, -0.3145366907119751, 0.6628287434577942, 0.5658761262893677, 0.6284719705581665, 0.1677963137626648, -1.0004972219467163, 0.3515542149543762, -0.7129330635070801, 0.042825426906347275, -0.0826391726732254, -1.3565547466278076, 1.2024879455566406, -0.42143794894218445, -0.10936158895492554, 0.4518352150917053, 0.9036040902137756, 0.7633908987045288, 0.17761902511119843, 0.21925070881843567, 0.5388234257698059, 0.7095184326171875, -0.24980393052101135, 0.8842259049415588, -0.2977347671985626, 0.565479040145874, 0.4271692931652069, -0.03958532586693764, 0.8728411793708801, 0.47890815138816833, -0.6635294556617737, 0.6932920813560486, 0.8217161297798157, -0.3103112578392029, 0.34947240352630615, 0.052604515105485916, -0.1976066380739212, -0.05217303708195686, -0.10040020197629929, -0.8486913442611694, 0.3138673007488251, 0.38115501403808594, -0.33417096734046936, 0.042122695595026016, -0.14013202488422394, 0.5446082353591919, -0.24069476127624512, -0.164970263838768, 0.6178319454193115, 0.2016008496284485, -0.5035172700881958, 1.148208498954773, -0.06628142297267914, 1.0678890943527222, -0.4824460446834564, 0.2451186627149582, -0.42474454641342163, 0.17194020748138428, -0.49289828538894653, -0.7216848134994507, -0.08683856576681137, 0.2659051716327667, -0.05979560688138008, 0.16711567342281342, 0.4537671208381653, -0.057517923414707184, -0.6368566155433655, 0.47705262899398804, 0.1550883948802948, 0.4912791848182678, 0.6103715300559998, -0.7629642486572266, 0.46251484751701355, 0.33073070645332336, -0.7132429480552673, 0.238218754529953, 0.15300773084163666, 0.20193159580230713, 0.7901478409767151, 0.7672829627990723, 0.006971029099076986, 0.4182051420211792, -0.20954939723014832, 0.8851205110549927, -0.571044921875, -0.41721972823143005, -1.0242844820022583, 0.6738160848617554, -0.11154986172914505, -0.5160764455795288, 0.8577300906181335, 0.4937257468700409, 0.7120353579521179, 0.08567856252193451, 0.8024739027023315, -0.3354114890098572, 0.3131353557109833, -0.451428085565567, 0.775761604309082, -0.8185890316963196, 0.2183128297328949, -0.28794610500335693, -0.7170382738113403, -0.23484943807125092, 0.9448647499084473, -0.20876798033714294, 0.25012698769569397, 0.5709701180458069, 0.8980945944786072, 0.18956178426742554, -0.3014078438282013, 0.0563439205288887, 0.4717233180999756, 0.49814286828041077, 0.9716863632202148, 0.7272465229034424, -0.8945837020874023, 0.4696256220340729, -0.571244478225708, 0.025205573067069054, -0.5322937369346619, -0.734296441078186, -1.039192795753479, -0.610840380191803, -0.3611879050731659, -0.4514332711696625, -0.3054213523864746, 1.0811693668365479, 0.6535404324531555, -0.6407480835914612, -0.34499287605285645, 0.1333911418914795, 0.27290669083595276, -0.04343285411596298, -0.17751656472682953, 0.5507616996765137, 0.05844305455684662, -0.9884313344955444, 0.17826730012893677, 0.09905294328927994, 0.5392777323722839, 0.025119222700595856, -0.3185775876045227, -0.2899392247200012, 0.11464648693799973, 0.2980663776397705, 0.4711111783981323, -0.956852376461029, -0.081935353577137, 0.03138457611203194, -0.2961231768131256, 0.17847247421741486, -0.01981240324676037, -0.5938833355903625, 0.058494679629802704, 0.5942802429199219, 0.06227821856737137, 0.6091049909591675, -0.204664409160614, 0.054454509168863297, -0.3939861059188843, 0.5522340536117554, -0.18052366375923157, 0.6912043690681458, 0.1864117980003357, -0.4441908001899719, 0.6397413015365601, 0.41685110330581665, -0.3697856366634369, -1.217024326324463, -0.1518443524837494, -1.1779571771621704, -0.1853342056274414, 1.230218529701233, -0.22512079775333405, -0.550035834312439, 0.25294339656829834, -0.361298531293869, 0.4794514775276184, -0.30369219183921814, 0.5879577994346619, 0.48853182792663574, -0.05990249291062355, -0.11755287647247314, -0.4592247009277344, 0.18671980500221252, 0.30825692415237427, -0.8749493360519409, -0.2240564227104187, 0.09402021765708923, 0.36811643838882446, 0.4207998216152191, 0.7686161994934082, -0.07001110911369324, 0.3222903907299042, 0.07366999238729477, 0.1943930685520172, -0.19865870475769043, 0.09172284603118896, -0.042928073555231094, -0.42396095395088196, -0.22998224198818207, -0.3700379431247711 ]
ckiplab/albert-tiny-chinese-ner
ckiplab
"2022-05-10T03:28:10Z"
25,652
2
transformers
[ "transformers", "pytorch", "albert", "token-classification", "zh", "license:gpl-3.0", "autotrain_compatible", "endpoints_compatible", "region:us" ]
token-classification
"2022-03-02T23:29:05Z"
--- language: - zh thumbnail: https://ckip.iis.sinica.edu.tw/files/ckip_logo.png tags: - pytorch - token-classification - albert - zh license: gpl-3.0 --- # CKIP ALBERT Tiny Chinese This project provides traditional Chinese transformers models (including ALBERT, BERT, GPT2) and NLP tools (including word segmentation, part-of-speech tagging, named entity recognition). 這個專案提供了繁體中文的 transformers 模型(包含 ALBERT、BERT、GPT2)及自然語言處理工具(包含斷詞、詞性標記、實體辨識)。 ## Homepage - https://github.com/ckiplab/ckip-transformers ## Contributers - [Mu Yang](https://muyang.pro) at [CKIP](https://ckip.iis.sinica.edu.tw) (Author & Maintainer) ## Usage Please use BertTokenizerFast as tokenizer instead of AutoTokenizer. 請使用 BertTokenizerFast 而非 AutoTokenizer。 ``` from transformers import ( BertTokenizerFast, AutoModel, ) tokenizer = BertTokenizerFast.from_pretrained('bert-base-chinese') model = AutoModel.from_pretrained('ckiplab/albert-tiny-chinese-ner') ``` For full usage and more information, please refer to https://github.com/ckiplab/ckip-transformers. 有關完整使用方法及其他資訊,請參見 https://github.com/ckiplab/ckip-transformers 。
[ -0.34142157435417175, -0.2816339135169983, 0.06577402353286743, 0.7407945394515991, -0.3381766974925995, 0.06053539365530014, -0.2282172292470932, -0.31345295906066895, 0.022809458896517754, 0.3574618995189667, -0.35538962483406067, -0.23813165724277496, -0.5404597520828247, 0.11454218626022339, -0.20177240669727325, 0.8612654805183411, -0.16199536621570587, 0.32033488154411316, 0.39059972763061523, 0.08354996144771576, -0.24696150422096252, -0.2543061375617981, -0.8737722039222717, -0.6136274337768555, 0.0031720399856567383, 0.4493675231933594, 0.7725492119789124, 0.4990020990371704, 0.5649786591529846, 0.32626959681510925, -0.01952957920730114, -0.11247872561216354, -0.09831035882234573, -0.46378329396247864, 0.021974913775920868, -0.6343455910682678, -0.39655837416648865, -0.28052809834480286, 0.7458803653717041, 0.4920040965080261, 0.0283851008862257, 0.09040427953004837, 0.22955641150474548, 0.34307798743247986, -0.2952920198440552, 0.4273601770401001, -0.594046413898468, 0.31157273054122925, -0.21629057824611664, -0.0438322052359581, -0.36470550298690796, -0.2169823944568634, 0.09481263905763626, -0.6887927651405334, 0.37754619121551514, 0.01682760939002037, 1.3295307159423828, 0.07766702026128769, -0.31116074323654175, -0.2803880572319031, -0.7138917446136475, 1.1214910745620728, -0.8875606656074524, 0.38191285729408264, 0.38002467155456543, 0.32899531722068787, 0.027500731870532036, -1.1307052373886108, -0.7491178512573242, -0.18644291162490845, -0.39848166704177856, 0.242076113820076, 0.0751880630850792, -0.041275594383478165, 0.41325634717941284, 0.3048740327358246, -0.6508864760398865, 0.3064644932746887, -0.4494049549102783, -0.42871928215026855, 0.6097297668457031, 0.051512040197849274, 0.5175020694732666, -0.5325396060943604, -0.4386199116706848, -0.35398492217063904, -0.6471206545829773, 0.22014568746089935, 0.23193585872650146, 0.15430238842964172, -0.5955296158790588, 0.6638501882553101, -0.05133828520774841, 0.26904377341270447, 0.18272346258163452, -0.1000450924038887, 0.3902856707572937, -0.395632803440094, -0.001389532582834363, -0.11735521256923676, 1.0914325714111328, 0.2213687002658844, 0.02014128305017948, 0.14132685959339142, -0.37151679396629333, -0.35385847091674805, -0.3096744418144226, -0.8877314329147339, -0.763029158115387, 0.1921704113483429, -0.8477616310119629, -0.21329320967197418, 0.10122881084680557, -0.7276787161827087, 0.28110161423683167, -0.21288952231407166, 0.41172292828559875, -0.6956893801689148, -0.5414953827857971, -0.050133977085351944, -0.35190263390541077, 0.7305952906608582, 0.14015993475914001, -1.3194751739501953, 0.023807939141988754, 0.6548939347267151, 0.8651912808418274, 0.24176833033561707, -0.16577184200286865, 0.11257170885801315, 0.3779533803462982, -0.25129061937332153, 0.596565306186676, -0.12355323135852814, -0.6936804056167603, 0.09795490652322769, 0.0811215415596962, 0.032049279659986496, -0.49922505021095276, 0.8148407936096191, -0.2975791394710541, 0.33775532245635986, -0.11989593505859375, -0.20578335225582123, 0.024737708270549774, 0.09064574539661407, -0.5368544459342957, 1.118203043937683, 0.14105193316936493, -0.9121734499931335, 0.2483154535293579, -0.9660829305648804, -0.5360295176506042, 0.3639267683029175, -0.16160587966442108, -0.4929482638835907, -0.11119341105222702, 0.24940894544124603, 0.2905016243457794, -0.14058168232440948, 0.0704878568649292, -0.0955149307847023, -0.2288130223751068, 0.0027420881669968367, -0.43292102217674255, 1.2929065227508545, 0.325512170791626, -0.20812878012657166, 0.18207013607025146, -0.7542455792427063, 0.12126316130161285, 0.36459043622016907, -0.19480997323989868, -0.36430320143699646, 0.1052170991897583, 0.5776397585868835, 0.1848965287208557, 0.5302673578262329, -0.6178303956985474, 0.5560306906700134, -0.6622900366783142, 0.8059275150299072, 0.8160841464996338, -0.24555392563343048, 0.37307319045066833, -0.21938000619411469, 0.008675969205796719, 0.029044516384601593, 0.3586072325706482, -0.03292279317975044, -0.5509205460548401, -1.2145248651504517, -0.4043023884296417, 0.5409061908721924, 0.6932277083396912, -1.2517307996749878, 0.7620521187782288, -0.3318703770637512, -0.7007343173027039, -0.4685142934322357, 0.00839251559227705, 0.01660575531423092, 0.10799126327037811, 0.49655887484550476, -0.26591408252716064, -0.5857020616531372, -1.0940525531768799, 0.09335944801568985, -0.6461521983146667, -0.6900838613510132, -0.006092918571084738, 0.6925451755523682, -0.48329898715019226, 1.0387158393859863, -0.5622493624687195, -0.3799777328968048, -0.2974746525287628, 0.60127854347229, 0.34914445877075195, 0.9270725846290588, 0.5989601016044617, -1.0544692277908325, -0.8386300802230835, -0.14049290120601654, -0.34183254837989807, -0.018847767263650894, -0.30467689037323, -0.08274821192026138, -0.07396300882101059, 0.07452414929866791, -0.6873224973678589, 0.20265473425388336, 0.34735462069511414, 0.001392796286381781, 0.8411874175071716, -0.08002012968063354, -0.32285797595977783, -1.2914156913757324, 0.13677583634853363, -0.17288032174110413, -0.03290947154164314, -0.399826318025589, -0.0406358577311039, 0.23367983102798462, -0.09815321117639542, -0.6298568844795227, 0.6750117540359497, -0.3775232434272766, 0.3744278848171234, -0.26510488986968994, -0.08512506633996964, -0.19654661417007446, 0.5562820434570312, 0.36389806866645813, 0.7513943910598755, 0.5629212260246277, -0.7149444222450256, 0.3915138244628906, 0.7525672912597656, -0.2763112187385559, -0.06889171153306961, -1.0202614068984985, -0.03934638947248459, 0.3813116252422333, 0.041215263307094574, -0.8928802013397217, -0.1222073957324028, 0.6465777158737183, -0.7671626806259155, 0.6771451830863953, 0.021556075662374496, -1.0475424528121948, -0.5339047908782959, -0.538135290145874, 0.4305107593536377, 0.6698130369186401, -0.7148897051811218, 0.4618050456047058, 0.26062479615211487, -0.24754679203033447, -0.4242854416370392, -0.8396593928337097, -0.036047376692295074, 0.18124321103096008, -0.6207926273345947, 0.6057949066162109, -0.2920299768447876, 0.24486643075942993, 0.019575366750359535, 0.13764388859272003, -0.4597054421901703, -0.1210104376077652, -0.1557266265153885, 0.42048388719558716, -0.20257073640823364, -0.03877180814743042, 0.23369687795639038, -0.37524786591529846, 0.11316636204719543, 0.06716319918632507, 0.6440191864967346, -0.05984311178326607, -0.30753380060195923, -0.6740756630897522, 0.27945634722709656, 0.18368524312973022, -0.18581096827983856, 0.3919617831707001, 1.1103042364120483, -0.2894175052642822, -0.1853909194469452, -0.3210659325122833, -0.24814876914024353, -0.5875732898712158, 0.5519144535064697, -0.4763319194316864, -0.9380285739898682, 0.2947981655597687, -0.12811368703842163, 0.1478365808725357, 0.826716423034668, 0.7074136137962341, -0.044958338141441345, 1.394537091255188, 1.0227447748184204, -0.4604574739933014, 0.45668473839759827, -0.46743127703666687, 0.4411025941371918, -1.0166321992874146, 0.30009669065475464, -0.6732884645462036, 0.0606868602335453, -0.9329125881195068, -0.3295433223247528, 0.03583456575870514, 0.20941293239593506, -0.3079405128955841, 0.7314171195030212, -0.8113136887550354, 0.02589215710759163, 0.7545216679573059, -0.4021061658859253, -0.016849707812070847, -0.17577384412288666, -0.22040915489196777, -0.13126274943351746, -0.7546332478523254, -0.7616770267486572, 0.7688457369804382, 0.6580228209495544, 0.7562386393547058, 0.054103974252939224, 0.5282754898071289, -0.029892820864915848, 0.5243092179298401, -0.8832104802131653, 0.5940929055213928, -0.11308397352695465, -0.8219162821769714, -0.3062562346458435, -0.29564356803894043, -0.9042689204216003, 0.30131667852401733, -0.04873117059469223, -0.9861425161361694, 0.23431533575057983, 0.0990820825099945, -0.2832739055156708, 0.3459778130054474, -0.5208001136779785, 0.8459137082099915, -0.4386826455593109, 0.057577017694711685, -0.06561054289340973, -0.7226741909980774, 0.4880988895893097, -0.10756569355726242, 0.0018269072752445936, -0.07202742993831635, -0.016708752140402794, 0.8648678064346313, -0.2689609229564667, 0.872790515422821, -0.041744571179151535, 0.03514545410871506, 0.3555118441581726, -0.23415228724479675, 0.3558582365512848, 0.35076549649238586, 0.1401359885931015, 0.674007773399353, 0.3154738247394562, -0.3825397193431854, -0.23844709992408752, 0.5575116276741028, -0.934786319732666, -0.438401997089386, -0.6394236087799072, -0.20475824177265167, 0.19097962975502014, 0.61037677526474, 0.5554062128067017, -0.09020790457725525, 0.04117213189601898, 0.2761629819869995, 0.23383522033691406, -0.3924574851989746, 0.6739810109138489, 0.6357847452163696, -0.08015758544206619, -0.44429752230644226, 1.0369268655776978, 0.11642631143331528, 0.09830563515424728, 0.6474630832672119, 0.06323938816785812, -0.1569528579711914, -0.45480456948280334, -0.4010736346244812, 0.5148701071739197, -0.3399275541305542, -0.046987466514110565, -0.37255629897117615, -0.5310719013214111, -0.6312955021858215, 0.1356089562177658, -0.4511744976043701, -0.45166251063346863, -0.36228036880493164, 0.11441685259342194, -0.3953339457511902, 0.10516763478517532, -0.40205127000808716, 0.5602437853813171, -1.1413395404815674, 0.5560831427574158, 0.24213489890098572, 0.17793706059455872, 0.06257621943950653, -0.28957366943359375, -0.6689783930778503, 0.0954940915107727, -0.9195654392242432, -0.6370853185653687, 0.6340813040733337, 0.05261467397212982, 0.572845995426178, 0.6906238794326782, 0.2663261890411377, 0.5615720748901367, -0.7016562819480896, 1.157403588294983, 0.4289565980434418, -1.1852794885635376, 0.44151732325553894, -0.12331254780292511, 0.3454350233078003, 0.3201470971107483, 0.4851999878883362, -0.8405864834785461, -0.3298732340335846, -0.5507024526596069, -1.1643019914627075, 0.7635902762413025, 0.4272885322570801, 0.292500764131546, 0.019748620688915253, -0.07774527370929718, -0.06643643230199814, 0.18366913497447968, -1.0749419927597046, -0.546242892742157, -0.3738941252231598, -0.34226471185684204, 0.19676421582698822, -0.44681864976882935, 0.0052195461466908455, -0.27896732091903687, 1.131569266319275, -0.05709342658519745, 0.8613304495811462, 0.3886915147304535, 0.02562534064054489, -0.18426671624183655, 0.12123236805200577, 0.46616238355636597, 0.5086541175842285, -0.2106427103281021, -0.2522255778312683, 0.09151221066713333, -0.6142084002494812, -0.23251886665821075, 0.3809436559677124, -0.49855631589889526, 0.43000611662864685, 0.5610076785087585, 0.6405408978462219, 0.11856378614902496, -0.4524585008621216, 0.6276057958602905, -0.3068211078643799, -0.18256336450576782, -1.0326824188232422, -0.06238313019275665, 0.0057089258916676044, 0.09317462146282196, 0.5747833251953125, -0.08641792088747025, 0.15792956948280334, -0.15286587178707123, 0.1461217850446701, 0.40534117817878723, -0.559099555015564, -0.5565419793128967, 0.7891086339950562, 0.4437333047389984, -0.3841816186904907, 0.8436455130577087, -0.16949838399887085, -0.8534680604934692, 0.6652912497520447, 0.4570837616920471, 0.9994906783103943, -0.2617991268634796, 0.06421885639429092, 0.675851047039032, 0.6154525876045227, 0.02756134793162346, 0.15841783583164215, -0.30216097831726074, -0.9361465573310852, -0.49601316452026367, -0.4301072955131531, -0.4918753206729889, 0.34503883123397827, -0.5061262249946594, 0.6519914865493774, -0.47342148423194885, -0.07537767291069031, 0.012954824604094028, -0.004173211753368378, -0.6024931073188782, 0.06274671107530594, 0.10966859757900238, 1.165442943572998, -0.6918799877166748, 1.2337380647659302, 0.6104253530502319, -0.5898023247718811, -0.9223494529724121, 0.19420145452022552, -0.2885599434375763, -0.7456547021865845, 1.0450769662857056, 0.35890644788742065, 0.3494947850704193, 0.07032817602157593, -0.7631917595863342, -0.7956922650337219, 1.0802273750305176, -0.18630042672157288, -0.4266221821308136, -0.08299319446086884, 0.3716728687286377, 0.4573487937450409, -0.04307844489812851, 0.5217540860176086, 0.14002202451229095, 0.6507584452629089, -0.2226593792438507, -1.19501531124115, -0.2714681327342987, -0.28810548782348633, 0.130391925573349, 0.24848870933055878, -1.0188043117523193, 0.8203184604644775, 0.019307654350996017, -0.37096884846687317, 0.5189163684844971, 1.0249484777450562, -0.03520261496305466, 0.2644023597240448, 0.5754345059394836, 0.4346027076244354, -0.00656873406842351, -0.22720812261104584, 0.5964996814727783, -0.5727601051330566, 0.8707841634750366, 0.900030791759491, 0.03105277195572853, 0.7810592651367188, 0.47087475657463074, -0.5153287053108215, 0.48701804876327515, 0.7443475723266602, -0.5667684674263, 0.6494384407997131, -0.037147533148527145, -0.1286497861146927, -0.0858418345451355, 0.06067047640681267, -0.5283553600311279, 0.2457081824541092, 0.33672040700912476, -0.29528430104255676, -0.032651420682668686, -0.12185941636562347, -0.03353296220302582, -0.4190727472305298, -0.15156036615371704, 0.5419942140579224, 0.27392539381980896, -0.1543004959821701, 0.49003365635871887, 0.37185657024383545, 1.0741221904754639, -1.0621967315673828, -0.3197903335094452, 0.24692471325397491, 0.22530661523342133, -0.10724667459726334, -0.61456298828125, 0.20548416674137115, -0.33191540837287903, -0.17175592482089996, -0.1435919851064682, 0.807884931564331, -0.3451339900493622, -0.6180735230445862, 0.3533362150192261, 0.09416128695011139, 0.13610775768756866, 0.3616042137145996, -1.1816118955612183, -0.3339323103427887, 0.35309818387031555, -0.4620060920715332, 0.21483199298381805, 0.247909814119339, 0.125792995095253, 0.7114537358283997, 0.8674712777137756, 0.18903660774230957, -0.19116747379302979, -0.11687646061182022, 0.8743751049041748, -0.5924960970878601, -0.5956340432167053, -0.7615837454795837, 0.756098210811615, -0.2732286751270294, -0.347076416015625, 0.832606315612793, 0.7675678133964539, 1.2765178680419922, -0.35602453351020813, 0.9469684362411499, -0.44906872510910034, 0.8072811365127563, -0.1561104953289032, 0.8909519910812378, -0.5645231008529663, -0.05887989699840546, -0.2998270094394684, -0.850123405456543, -0.2809714376926422, 0.8868306875228882, -0.21037806570529938, -0.1372353583574295, 0.7592049241065979, 0.7205173373222351, -0.04603874310851097, -0.18641935288906097, 0.19493626058101654, 0.2579067051410675, 0.6613836884498596, 0.4529981315135956, 0.6183179020881653, -0.6011356711387634, 0.7488646507263184, -0.7753691673278809, -0.1787310242652893, -0.16837558150291443, -0.6626296043395996, -0.7139168381690979, -0.5521272420883179, -0.3362729847431183, -0.07888643443584442, -0.4017024338245392, 0.9137431979179382, 0.7555509805679321, -1.0878099203109741, -0.40755581855773926, 0.07588236033916473, 0.1794966608285904, -0.3647547960281372, -0.36302831768989563, 0.6413102149963379, -0.30441802740097046, -1.2171615362167358, 0.04908665269613266, 0.1456591635942459, 0.10262945294380188, -0.275571346282959, -0.013624282553792, -0.1914396435022354, -0.20466138422489166, 0.3988519608974457, 0.5375486016273499, -0.6777505874633789, -0.4343506693840027, -0.12106773257255554, -0.2388441413640976, 0.10397370159626007, 0.6256336569786072, -0.19750231504440308, 0.3560807704925537, 0.6194933652877808, 0.2764003276824951, 0.3337186574935913, -0.27188336849212646, 0.5675176978111267, -0.541861355304718, 0.36325153708457947, 0.3967396914958954, 0.5614116787910461, 0.34565192461013794, -0.1870351880788803, 0.5399850606918335, 0.4805982708930969, -0.7752805948257446, -0.6903300881385803, 0.34405064582824707, -1.028122901916504, -0.17707662284374237, 0.9579278826713562, -0.1618652492761612, -0.24059055745601654, -0.040067076683044434, -0.5839642286300659, 0.5947887897491455, -0.3423975706100464, 0.6340674757957458, 0.7747758626937866, -0.09265053272247314, -0.10512468218803406, -0.6043983697891235, 0.3920917809009552, 0.4334125816822052, -0.33322417736053467, -0.37695786356925964, -0.035039376467466354, 0.14724718034267426, 0.6886292099952698, 0.4802752733230591, -0.057576362043619156, 0.08902369439601898, -0.0637926235795021, 0.5612416863441467, 0.046310752630233765, 0.1879332810640335, 0.003673642873764038, -0.19005458056926727, 0.11180514842271805, -0.4546911418437958 ]
sentence-transformers/msmarco-distilbert-base-v4
sentence-transformers
"2022-06-15T19:32:25Z"
25,650
3
sentence-transformers
[ "sentence-transformers", "pytorch", "tf", "distilbert", "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"
--- pipeline_tag: sentence-similarity license: apache-2.0 tags: - sentence-transformers - feature-extraction - sentence-similarity - transformers --- # sentence-transformers/msmarco-distilbert-base-v4 This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. ## Usage (Sentence-Transformers) Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed: ``` pip install -U sentence-transformers ``` Then you can use the model like this: ```python from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/msmarco-distilbert-base-v4') 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/msmarco-distilbert-base-v4') model = AutoModel.from_pretrained('sentence-transformers/msmarco-distilbert-base-v4') # 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/msmarco-distilbert-base-v4) ## Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DistilBertModel (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False}) ) ``` ## Citing & Authors This model was trained by [sentence-transformers](https://www.sbert.net/). If you find this model helpful, feel free to cite our publication [Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks](https://arxiv.org/abs/1908.10084): ```bibtex @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "http://arxiv.org/abs/1908.10084", } ```
[ -0.2839162349700928, -0.7245184183120728, 0.2932836413383484, 0.45127183198928833, -0.27977779507637024, -0.35254406929016113, -0.3100484609603882, -0.0157490037381649, 0.14065192639827728, 0.27633634209632874, -0.5634710192680359, -0.4574141502380371, -0.8199626803398132, 0.21074602007865906, -0.41940271854400635, 0.8706517219543457, -0.18881507217884064, -0.05153645947575569, -0.28004226088523865, -0.1978446990251541, -0.26993146538734436, -0.4076860547065735, -0.3067626357078552, -0.1497730165719986, 0.2623429000377655, 0.1726345270872116, 0.4409259259700775, 0.3243766725063324, 0.31745338439941406, 0.5296488404273987, -0.11186189949512482, 0.2221737802028656, -0.36907926201820374, -0.030512694269418716, 0.0041877818293869495, -0.3626912534236908, -0.08463634550571442, 0.24100615084171295, 0.5473719239234924, 0.47746339440345764, -0.17900049686431885, 0.11039888113737106, 0.12171359360218048, 0.3938264548778534, -0.49428823590278625, 0.5104629397392273, -0.6168453097343445, 0.19902780652046204, 0.05103584751486778, -0.019163325428962708, -0.6163027882575989, -0.11449933052062988, 0.2551712095737457, -0.33808237314224243, 0.23266364634037018, 0.14945408701896667, 1.160240650177002, 0.4655788242816925, -0.291887491941452, -0.42070263624191284, -0.37984564900398254, 0.8341054916381836, -0.8954792022705078, 0.10706882923841476, 0.293812096118927, 0.046960603445768356, -0.09002543985843658, -1.0607959032058716, -0.8061610460281372, -0.14960429072380066, -0.4659901261329651, 0.23450012505054474, -0.4275139272212982, 0.033180493861436844, 0.28984490036964417, 0.35403865575790405, -0.6310293078422546, -0.11884264647960663, -0.554098904132843, -0.1663166880607605, 0.5192115902900696, 0.08865521848201752, 0.255303293466568, -0.469108521938324, -0.5075163841247559, -0.30134060978889465, -0.10989415645599365, -0.040436264127492905, 0.15097206830978394, 0.1469692438840866, -0.23793956637382507, 0.809476375579834, -0.05600279942154884, 0.6229987740516663, 0.03146737813949585, 0.15523067116737366, 0.7120046615600586, -0.38190576434135437, -0.2950689494609833, -0.0008926286827772856, 1.1393647193908691, 0.34822824597358704, 0.2949875593185425, 0.03628950193524361, -0.17977236211299896, 0.09251285344362259, 0.2781490683555603, -0.8880584239959717, -0.3602706789970398, 0.2012757956981659, -0.3710249662399292, -0.379971444606781, 0.23195305466651917, -0.6609506607055664, -0.025553833693265915, 0.03040536679327488, 0.6966837644577026, -0.5676767230033875, 0.08976329863071442, 0.3445982336997986, -0.2974376380443573, 0.11333546042442322, -0.3420468270778656, -0.8128365874290466, 0.1972239911556244, 0.1513839066028595, 1.076010823249817, 0.07819288223981857, -0.5563265085220337, -0.2695084810256958, -0.16419172286987305, 0.11353975534439087, 0.6847420334815979, -0.29342973232269287, -0.09012297540903091, 0.18025711178779602, 0.3128091096878052, -0.5668309330940247, -0.3200213313102722, 0.6147911548614502, -0.2637917101383209, 0.712512731552124, 0.11899258941411972, -0.7916483879089355, -0.15128441154956818, 0.11476253718137741, -0.5935272574424744, 1.1254336833953857, 0.2875277101993561, -1.0100313425064087, 0.011357657611370087, -0.7703499794006348, -0.36171582341194153, -0.20630498230457306, 0.01116008497774601, -0.6927717328071594, 0.1687990128993988, 0.4472300708293915, 0.7873126268386841, 0.11104476451873779, 0.2916734516620636, -0.23041576147079468, -0.42004892230033875, 0.44250404834747314, -0.38657331466674805, 1.137580394744873, 0.23579199612140656, -0.4342603385448456, 0.11774533987045288, -0.4380021393299103, -0.23574869334697723, 0.37414225935935974, -0.14173050224781036, -0.21798883378505707, -0.07495718449354172, 0.18518894910812378, 0.3595760464668274, 0.2978724241256714, -0.6032891869544983, 0.2625056505203247, -0.48691630363464355, 0.9922359585762024, 0.6441513895988464, -0.030568988993763924, 0.5900091528892517, -0.24932195246219635, 0.225908100605011, 0.39823105931282043, 0.08083030581474304, -0.31225237250328064, -0.37309908866882324, -0.9953203201293945, -0.39605534076690674, 0.31606757640838623, 0.4614514708518982, -0.8361201882362366, 1.044669270515442, -0.41655460000038147, -0.4834955930709839, -0.7418408393859863, -0.1213795617222786, 0.04294775798916817, 0.532982349395752, 0.6293606758117676, -0.024300534278154373, -0.6316997408866882, -0.9791696071624756, -0.0020633486565202475, 0.07090079039335251, 0.13215816020965576, 0.06755124032497406, 0.7379172444343567, -0.42680591344833374, 0.9841963052749634, -0.7495603561401367, -0.5148649215698242, -0.4067530333995819, 0.209091916680336, 0.36752191185951233, 0.47525739669799805, 0.6279592514038086, -0.7079349756240845, -0.458711713552475, -0.594072699546814, -0.7193503975868225, -0.03408488631248474, -0.19451329112052917, -0.1669342815876007, 0.16112551093101501, 0.5282339453697205, -0.7895654439926147, 0.36431244015693665, 0.6826395988464355, -0.5427259802818298, 0.39727333188056946, -0.32695454359054565, -0.12242849171161652, -1.454594612121582, 0.002441090065985918, 0.061686817556619644, -0.24045543372631073, -0.4674646854400635, -0.06828232854604721, 0.1323433220386505, 0.010725957341492176, -0.4459235370159149, 0.36021262407302856, -0.5138485431671143, 0.179708793759346, -0.04113639146089554, 0.40766441822052, 0.11857518553733826, 0.7897312045097351, -0.14874543249607086, 0.7013570666313171, 0.6122855544090271, -0.5303914546966553, 0.3474573493003845, 0.6120747923851013, -0.5076919794082642, 0.21531881392002106, -0.8895667791366577, -0.05291229858994484, -0.1141633540391922, 0.37663912773132324, -1.2147101163864136, 0.041385624557733536, 0.2382020801305771, -0.5130690932273865, 0.16189312934875488, 0.18579816818237305, -0.7344455718994141, -0.690345823764801, -0.4318896234035492, 0.09022748470306396, 0.5251106023788452, -0.5435159206390381, 0.5256273746490479, 0.33077841997146606, -0.1392824798822403, -0.6218923926353455, -1.1104899644851685, -0.053727176040410995, -0.2321113497018814, -0.6587896347045898, 0.5765036344528198, -0.13114425539970398, 0.20953819155693054, 0.21574582159519196, 0.21921734511852264, 0.029091455042362213, -0.008478104136884212, 0.06224426254630089, 0.33314114809036255, -0.006859246175736189, 0.2136073261499405, 0.3169853091239929, -0.15907888114452362, 0.0322776660323143, -0.24325259029865265, 0.8218260407447815, -0.27581775188446045, -0.12940473854541779, -0.3886035084724426, 0.12683607637882233, 0.4185669422149658, -0.3516230285167694, 1.1195192337036133, 0.9637042284011841, -0.4091586470603943, -0.11029679328203201, -0.47528356313705444, -0.29732072353363037, -0.5133577585220337, 0.6612218022346497, -0.2844305634498596, -0.9774501323699951, 0.36177918314933777, 0.15577778220176697, 0.10505730658769608, 0.7392545342445374, 0.6761862635612488, -0.19722823798656464, 0.825107991695404, 0.5154482126235962, -0.2606545090675354, 0.5707725286483765, -0.6782605051994324, 0.28386685252189636, -0.8745600581169128, -0.06086468696594238, -0.3356887102127075, -0.407504141330719, -0.6540196537971497, -0.4559752643108368, 0.15751610696315765, -0.04138137400150299, -0.21293789148330688, 0.6974976658821106, -0.7097284197807312, 0.2090965360403061, 0.5081517100334167, 0.05303185060620308, 0.032779112458229065, 0.12472353130578995, -0.40823063254356384, -0.04342244565486908, -0.7228044867515564, -0.5791675448417664, 0.7863020896911621, 0.42613402009010315, 0.4632054269313812, -0.12469569593667984, 0.7074745297431946, 0.059066031128168106, 0.009866918437182903, -0.6664143800735474, 0.4664769172668457, -0.30076512694358826, -0.43546438217163086, -0.32450997829437256, -0.4179738163948059, -0.9353677034378052, 0.5252088308334351, -0.18047451972961426, -0.7099912762641907, 0.11288464814424515, -0.2102786898612976, -0.27924928069114685, 0.2285541146993637, -0.8299769759178162, 1.061249852180481, 0.0066093700006604195, -0.05601143464446068, -0.05005350708961487, -0.6719902753829956, 0.1267523467540741, 0.27392011880874634, 0.12160395830869675, -0.09519588947296143, -0.02249814011156559, 0.7729990482330322, -0.3024631142616272, 0.8848996162414551, -0.19354142248630524, 0.20825885236263275, 0.38386285305023193, -0.31413713097572327, 0.2910679280757904, -0.08797472715377808, -0.04882268235087395, 0.1821901500225067, -0.053783293813467026, -0.385209858417511, -0.4856994152069092, 0.726867139339447, -0.8792986273765564, -0.27995023131370544, -0.6227136254310608, -0.5862700939178467, -0.0064717852510511875, 0.2229728102684021, 0.4522044062614441, 0.41337281465530396, -0.13888150453567505, 0.37975093722343445, 0.4897858798503876, -0.26133260130882263, 0.7567722797393799, 0.17594784498214722, -0.039478741586208344, -0.43491506576538086, 0.5309877991676331, 0.0765099748969078, -0.013026177883148193, 0.3999066650867462, 0.19361048936843872, -0.5146599411964417, -0.23335886001586914, -0.4045810103416443, 0.4323798716068268, -0.535070538520813, -0.25045886635780334, -1.0320954322814941, -0.517392635345459, -0.6125489473342896, 0.040725551545619965, -0.27000752091407776, -0.42309072613716125, -0.5197814106941223, -0.3936769366264343, 0.3917980194091797, 0.45230892300605774, 0.043118081986904144, 0.352643221616745, -0.6610239744186401, 0.13880139589309692, 0.11910470575094223, 0.061392635107040405, -0.10953156650066376, -0.8403608798980713, -0.31449025869369507, 0.10482033342123032, -0.4251443147659302, -0.8988229632377625, 0.6232072114944458, 0.22282417118549347, 0.5619978904724121, 0.23011764883995056, 0.13158604502677917, 0.7128422856330872, -0.6706910133361816, 0.7856035828590393, 0.12394089251756668, -1.0079690217971802, 0.45709604024887085, 0.025149574503302574, 0.38404354453086853, 0.6306281685829163, 0.404143363237381, -0.46766531467437744, -0.3864787817001343, -0.7027414441108704, -1.0070221424102783, 0.7005789875984192, 0.563164472579956, 0.5334208011627197, -0.3223270773887634, 0.2234877496957779, -0.2673611640930176, 0.24364537000656128, -1.032124400138855, -0.47065794467926025, -0.3739745020866394, -0.610879123210907, -0.3940850794315338, -0.2949930429458618, 0.12064587324857712, -0.37053182721138, 0.670191764831543, 0.05511501431465149, 0.6738913655281067, 0.3681495487689972, -0.5312286019325256, 0.36682942509651184, 0.1392117589712143, 0.617810845375061, 0.1659826636314392, -0.04507075995206833, 0.26075679063796997, 0.24273693561553955, -0.3693044185638428, 0.028343191370368004, 0.570629894733429, -0.0074267010204494, 0.3048137426376343, 0.40442192554473877, 1.0075932741165161, 0.4112629294395447, -0.431270956993103, 0.8455215692520142, -0.13800524175167084, -0.2767905592918396, -0.5329540371894836, -0.12994635105133057, 0.32032543420791626, 0.3062354326248169, 0.29700788855552673, 0.05175398290157318, 0.08147972822189331, -0.3944079577922821, 0.3394968509674072, 0.14341016113758087, -0.4552086889743805, -0.07577139884233475, 0.6456144452095032, 0.04416605085134506, -0.0712222158908844, 0.9283660650253296, -0.3121609687805176, -0.7285917401313782, 0.45160284638404846, 0.5945537090301514, 0.8890323638916016, -0.06180422380566597, 0.28065186738967896, 0.5716149210929871, 0.3770669996738434, -0.1589326709508896, -0.031640686094760895, 0.08421172946691513, -0.8935972452163696, -0.20779891312122345, -0.6323518753051758, 0.2470865547657013, -0.06218607723712921, -0.6310014724731445, 0.32182180881500244, -0.054056186228990555, -0.12272313237190247, -0.15562346577644348, -0.014999854378402233, -0.7163196206092834, -0.07999547570943832, 0.0445166677236557, 0.8520681262016296, -1.0362588167190552, 0.8216413855552673, 0.6292497515678406, -0.8107280135154724, -0.7116076350212097, -0.18848690390586853, -0.3408614695072174, -0.7348325848579407, 0.35487034916877747, 0.5497429370880127, 0.1822938770055771, 0.1761075109243393, -0.4934409260749817, -0.7298858165740967, 1.5054373741149902, 0.2918235659599304, -0.5402324795722961, -0.19610188901424408, 0.11951766163110733, 0.5805374979972839, -0.4748683273792267, 0.4445253610610962, 0.42945730686187744, 0.34858861565589905, -0.04655291140079498, -0.6980901956558228, 0.18444451689720154, -0.29995501041412354, 0.22363176941871643, -0.1319848597049713, -0.582157552242279, 1.0239826440811157, -0.04803355038166046, -0.22096703946590424, 0.13337825238704681, 0.8820586800575256, 0.340568482875824, -0.04770360514521599, 0.5320643782615662, 0.8108391761779785, 0.6443169713020325, -0.1713373214006424, 0.95501309633255, -0.286691814661026, 0.8364803791046143, 1.0476490259170532, 0.021212639287114143, 0.9703347682952881, 0.5357614159584045, -0.1578821837902069, 0.8579024076461792, 0.5328545570373535, -0.32604843378067017, 0.7150915265083313, 0.26786911487579346, -0.013020684011280537, 0.1458011120557785, 0.21865759789943695, -0.24798618257045746, 0.5138804316520691, 0.1812700778245926, -0.7484467625617981, -0.0309608057141304, 0.14255975186824799, 0.14971794188022614, 0.05288739502429962, 0.1117519736289978, 0.594208300113678, 0.2139739841222763, -0.47091326117515564, 0.46041905879974365, 0.19957615435123444, 1.0090500116348267, -0.4533560872077942, 0.14810600876808167, -0.14073029160499573, 0.3700109124183655, -0.0702449232339859, -0.6106948852539062, 0.372151643037796, -0.09503879398107529, -0.08175746351480484, -0.23695796728134155, 0.5772154331207275, -0.6908798813819885, -0.6564477682113647, 0.3230229616165161, 0.41146790981292725, 0.08923289179801941, -0.04541619494557381, -1.0202375650405884, 0.006452204659581184, 0.06970135122537613, -0.493949830532074, 0.16950181126594543, 0.3903903067111969, 0.3670484125614166, 0.49130988121032715, 0.4256032407283783, -0.1812356561422348, 0.1541992574930191, 0.16566947102546692, 0.8984221816062927, -0.5557383298873901, -0.512076735496521, -1.021708369255066, 0.7958284616470337, -0.3614281713962555, -0.332927405834198, 0.7310622930526733, 0.5881324410438538, 0.9085808396339417, -0.32517552375793457, 0.5753888487815857, -0.2418624311685562, 0.12392964959144592, -0.5084414482116699, 0.9064742922782898, -0.43297669291496277, -0.0721220076084137, -0.2807351052761078, -1.0134087800979614, -0.2181730419397354, 1.1969813108444214, -0.29896149039268494, 0.1196659505367279, 0.9815899729728699, 0.8391614556312561, -0.15169331431388855, -0.15029482543468475, 0.14383827149868011, 0.476928174495697, 0.20807787775993347, 0.4776850640773773, 0.5314594507217407, -0.8547656536102295, 0.6532750725746155, -0.5734664797782898, -0.165605828166008, -0.161051943898201, -0.8142604827880859, -1.018412709236145, -0.9743767380714417, -0.3523105978965759, -0.315854012966156, -0.20179139077663422, 0.9434189200401306, 0.5955004096031189, -0.6930712461471558, -0.06315262615680695, -0.18921180069446564, -0.2515908479690552, -0.12866076827049255, -0.31709644198417664, 0.45905396342277527, -0.5579807758331299, -0.9233264923095703, 0.14712664484977722, -0.011545290239155293, 0.03139502927660942, -0.39838913083076477, 0.10518605262041092, -0.6179810166358948, 0.05637636035680771, 0.7035111784934998, -0.3212481439113617, -0.662124514579773, -0.19038771092891693, 0.044713594019412994, -0.46852821111679077, -0.06542116403579712, 0.40222153067588806, -0.6145013570785522, 0.3088068962097168, 0.42585504055023193, 0.48361271619796753, 0.8096365332603455, -0.23119571805000305, 0.3733981251716614, -0.8307709693908691, 0.41297173500061035, 0.09075543284416199, 0.8344634771347046, 0.3809482753276825, -0.2383633404970169, 0.5741114020347595, 0.16992580890655518, -0.47983667254447937, -0.65757817029953, -0.11169993877410889, -1.0667318105697632, -0.29147273302078247, 1.136584997177124, -0.3894747495651245, -0.34759390354156494, 0.26214835047721863, -0.342456191778183, 0.48631781339645386, -0.30527400970458984, 0.7868199348449707, 0.8821721076965332, 0.08214636147022247, -0.2086266279220581, -0.36172476410865784, 0.19320397078990936, 0.37772315740585327, -0.5976824760437012, -0.24222929775714874, 0.2655949592590332, 0.3131215572357178, 0.261386513710022, 0.4589323103427887, -0.18321403861045837, -0.1218046024441719, 0.02657604217529297, 0.16859318315982819, -0.2646440267562866, -0.0412309430539608, -0.43310797214508057, -0.0031809918582439423, -0.37266477942466736, -0.43569085001945496 ]
timm/efficientnetv2_rw_m.agc_in1k
timm
"2023-04-27T21:12:50Z"
25,631
0
timm
[ "timm", "pytorch", "safetensors", "image-classification", "dataset:imagenet-1k", "arxiv:2110.00476", "arxiv:2104.00298", "license:apache-2.0", "region:us" ]
image-classification
"2022-12-12T23:58:32Z"
--- tags: - image-classification - timm library_name: timm license: apache-2.0 datasets: - imagenet-1k --- # Model card for efficientnetv2_rw_m.agc_in1k A EfficientNet-v2 image classification model. This is a `timm` specific variation of the architecture. Trained on ImageNet-1k in `timm` using recipe template described below. Recipe details: * Based on [ResNet Strikes Back](https://arxiv.org/abs/2110.00476) `C` recipes * SGD (w/ Nesterov) optimizer and AGC (adaptive gradient clipping). * Cosine LR schedule with warmup ## Model Details - **Model Type:** Image classification / feature backbone - **Model Stats:** - Params (M): 53.2 - GMACs: 12.7 - Activations (M): 47.1 - Image size: train = 320 x 320, test = 416 x 416 - **Papers:** - EfficientNetV2: Smaller Models and Faster Training: https://arxiv.org/abs/2104.00298 - ResNet strikes back: An improved training procedure in timm: https://arxiv.org/abs/2110.00476 - **Dataset:** ImageNet-1k - **Original:** https://github.com/huggingface/pytorch-image-models ## 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('efficientnetv2_rw_m.agc_in1k', 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) ``` ### Feature Map Extraction ```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( 'efficientnetv2_rw_m.agc_in1k', pretrained=True, features_only=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 for o in output: # print shape of each feature map in output # e.g.: # torch.Size([1, 32, 160, 160]) # torch.Size([1, 56, 80, 80]) # torch.Size([1, 80, 40, 40]) # torch.Size([1, 192, 20, 20]) # torch.Size([1, 328, 10, 10]) print(o.shape) ``` ### 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( 'efficientnetv2_rw_m.agc_in1k', 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, 2152, 10, 10) 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 @inproceedings{tan2021efficientnetv2, title={Efficientnetv2: Smaller models and faster training}, author={Tan, Mingxing and Le, Quoc}, booktitle={International conference on machine learning}, pages={10096--10106}, year={2021}, organization={PMLR} } ``` ```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}} } ``` ```bibtex @inproceedings{wightman2021resnet, title={ResNet strikes back: An improved training procedure in timm}, author={Wightman, Ross and Touvron, Hugo and Jegou, Herve}, booktitle={NeurIPS 2021 Workshop on ImageNet: Past, Present, and Future} } ```
[ -0.36509302258491516, -0.4454668164253235, -0.13769982755184174, -0.01728200539946556, -0.2799684405326843, -0.40828484296798706, -0.19092807173728943, -0.39705756306648254, 0.2538266181945801, 0.4307255744934082, -0.4140774607658386, -0.588654637336731, -0.7590470910072327, -0.21215802431106567, -0.11889952421188354, 0.8393368721008301, -0.09272126108407974, -0.0059005203656852245, -0.16744357347488403, -0.6327229738235474, -0.2255323976278305, -0.20495451986789703, -1.1026235818862915, -0.5149263739585876, 0.41998329758644104, 0.33191803097724915, 0.49841395020484924, 0.7426108717918396, 0.6945832967758179, 0.48970678448677063, -0.10363785922527313, 0.22573761641979218, -0.2689197063446045, -0.18836036324501038, 0.38123050332069397, -0.6824585795402527, -0.4265590012073517, 0.22223640978336334, 0.7400351166725159, 0.2843289375305176, -0.00839727371931076, 0.4315069317817688, 0.1534298062324524, 0.6669190526008606, -0.2959412932395935, 0.16328579187393188, -0.4719690978527069, 0.24391897022724152, -0.11645415425300598, 0.089322529733181, -0.3083953559398651, -0.30482473969459534, 0.10761822015047073, -0.521234393119812, 0.37806177139282227, 0.014818022027611732, 1.3079705238342285, 0.2734954357147217, -0.1156977042555809, 0.022201498970389366, -0.1956169307231903, 0.7579990029335022, -0.7318723201751709, 0.2173841893672943, 0.3344835340976715, 0.30994758009910583, -0.07864674925804138, -1.229353666305542, -0.5781458020210266, -0.1542215794324875, -0.16334068775177002, 0.04583234339952469, -0.33545929193496704, -0.07160761952400208, 0.26944804191589355, 0.1786714792251587, -0.46403470635414124, 0.2928535044193268, -0.5531097054481506, -0.1957472413778305, 0.4616456627845764, 0.02503582462668419, 0.334369957447052, -0.2255459725856781, -0.473169207572937, -0.48879382014274597, -0.41055190563201904, 0.39152365922927856, 0.3479383885860443, 0.24560777842998505, -0.5668808817863464, 0.38758179545402527, 0.1249438002705574, 0.5492323637008667, -0.0021423278376460075, -0.27260956168174744, 0.5792233943939209, 0.007576885633170605, -0.4061722755432129, -0.22832827270030975, 1.0498415231704712, 0.43948328495025635, 0.15020281076431274, 0.16572429239749908, -0.10014969110488892, -0.39971664547920227, -0.016579044982790947, -1.2173560857772827, -0.39735332131385803, 0.27170029282569885, -0.6697449684143066, -0.3878544867038727, 0.2530125677585602, -0.5283830165863037, -0.1351878046989441, -0.022561179473996162, 0.46071502566337585, -0.43826600909233093, -0.3865470588207245, -0.14495569467544556, -0.2598595917224884, 0.3965226411819458, 0.24733543395996094, -0.5583287477493286, 0.2773730754852295, 0.4457450211048126, 1.3007391691207886, 0.05288255214691162, -0.4065152406692505, -0.40138521790504456, -0.4217340350151062, -0.3377005457878113, 0.46187472343444824, -0.0035467518027871847, 0.08809860795736313, -0.3399694561958313, 0.3764490783214569, -0.12180900573730469, -0.7441913485527039, 0.1824178546667099, -0.31743377447128296, 0.24615080654621124, -0.1134926974773407, -0.16023455560207367, -0.6263400316238403, 0.3141390383243561, -0.5226453542709351, 1.3121472597122192, 0.4001394212245941, -0.9424393773078918, 0.19228558242321014, -0.5514552593231201, -0.10438473522663116, -0.3038439452648163, -0.03716689348220825, -1.0808308124542236, -0.13807740807533264, 0.0547352060675621, 0.7447372674942017, -0.40963348746299744, -0.04004454240202904, -0.4985729455947876, -0.2529124617576599, 0.2794695198535919, 0.02445393241941929, 1.0508958101272583, 0.23406215012073517, -0.5449137687683105, 0.16448698937892914, -0.5649496912956238, 0.24635589122772217, 0.5788512229919434, -0.2759633958339691, -0.05299566313624382, -0.5776041746139526, 0.09546741098165512, 0.3239773213863373, 0.017345145344734192, -0.42413100600242615, 0.21797867119312286, -0.26946258544921875, 0.501305103302002, 0.676994264125824, -0.22190727293491364, 0.3370155394077301, -0.3691943883895874, 0.24716812372207642, 0.2355116754770279, 0.18070897459983826, 0.01605275645852089, -0.5490975379943848, -0.9268340468406677, -0.48403021693229675, 0.4408697783946991, 0.4578601121902466, -0.65298992395401, 0.4308851361274719, -0.17736074328422546, -0.7393619418144226, -0.4311024248600006, 0.11777883023023605, 0.6332435011863708, 0.6227394342422485, 0.31565701961517334, -0.614242672920227, -0.48600295186042786, -0.9993925094604492, 0.018607784062623978, -0.019454406574368477, 0.08301765471696854, 0.44114091992378235, 0.7497751712799072, -0.10930301994085312, 0.6035923361778259, -0.39230969548225403, -0.2852688133716583, -0.29600197076797485, 0.08985444158315659, 0.3175121545791626, 0.8218890428543091, 0.8816432356834412, -0.6054610013961792, -0.5666570663452148, -0.06184237077832222, -0.9296081066131592, 0.1842254102230072, -0.056322164833545685, -0.2180267870426178, 0.30806782841682434, 0.1928333044052124, -0.49427884817123413, 0.5363948345184326, 0.24190469086170197, -0.28379225730895996, 0.3869893252849579, -0.24647018313407898, 0.25696268677711487, -1.1606295108795166, 0.1698981374502182, 0.38322991132736206, -0.21106819808483124, -0.4863278567790985, 0.18034538626670837, 0.007867890410125256, 0.013104290701448917, -0.5783725380897522, 0.6850523948669434, -0.6272359490394592, -0.2753196060657501, -0.22453124821186066, -0.2799195647239685, 0.026569299399852753, 0.6918285489082336, -0.1614968180656433, 0.4400888681411743, 0.8244296312332153, -0.4485739767551422, 0.5436456203460693, 0.3398076891899109, -0.2395365983247757, 0.3303547501564026, -0.7643915414810181, 0.31860342621803284, -0.043232668191194534, 0.27743223309516907, -1.0653547048568726, -0.34197691082954407, 0.48216474056243896, -0.6648291945457458, 0.6818176507949829, -0.5068775415420532, -0.46601176261901855, -0.5561216473579407, -0.525129497051239, 0.3030794858932495, 0.7761521935462952, -0.8382511138916016, 0.4529154598712921, 0.25819888710975647, 0.2694539427757263, -0.6165618300437927, -1.0611858367919922, -0.18396058678627014, -0.4106539487838745, -0.7730671763420105, 0.28154125809669495, 0.23466557264328003, 0.05596936494112015, 0.15705733001232147, -0.020693128928542137, -0.21124553680419922, -0.02344910427927971, 0.5442631840705872, 0.24902129173278809, -0.25831565260887146, -0.11259867995977402, -0.30615752935409546, -0.12565025687217712, 0.000954038230702281, -0.38453149795532227, 0.5820640325546265, -0.298224538564682, -0.131416916847229, -0.9229564666748047, -0.04142311215400696, 0.3880091905593872, -0.04403683543205261, 0.8902956247329712, 1.1650372743606567, -0.5240627527236938, -0.015891671180725098, -0.44598546624183655, -0.36801648139953613, -0.4957687258720398, 0.5597376227378845, -0.3203817307949066, -0.5203022360801697, 0.8496202230453491, -0.04836259037256241, 0.051911476999521255, 0.7172148823738098, 0.35827720165252686, -0.08118437975645065, 0.6703554391860962, 0.5462368726730347, 0.274621844291687, 0.718306839466095, -1.1299318075180054, -0.31275683641433716, -0.9624915719032288, -0.5603368282318115, -0.41841980814933777, -0.7211031317710876, -0.6126695871353149, -0.4565306305885315, 0.4441922605037689, 0.22650675475597382, -0.45025044679641724, 0.5174484252929688, -0.8473466038703918, 0.1133507490158081, 0.7828197479248047, 0.5391770005226135, -0.4774928390979767, 0.4209073483943939, -0.24788211286067963, -0.0047058542259037495, -0.9123383164405823, -0.18921461701393127, 1.0694917440414429, 0.5097499489784241, 0.48281580209732056, -0.011915204115211964, 0.6421235799789429, -0.20271705090999603, 0.260713666677475, -0.5931286215782166, 0.5705121159553528, -0.2336311936378479, -0.3806566298007965, -0.10875675082206726, -0.5325180888175964, -1.114707112312317, 0.16113893687725067, -0.2435392290353775, -0.7665086984634399, 0.15500468015670776, 0.2771490216255188, -0.23745319247245789, 0.7803077697753906, -0.8385400176048279, 0.9211523532867432, -0.1391400843858719, -0.5023946762084961, 0.04149835556745529, -0.8094222545623779, 0.341099351644516, 0.2542803883552551, -0.23614364862442017, -0.023415477946400642, 0.09672516584396362, 1.1490542888641357, -0.7150812745094299, 0.8646196126937866, -0.5158908367156982, 0.5246503949165344, 0.6308850646018982, -0.20295995473861694, 0.514089822769165, -0.14183339476585388, -0.17766648530960083, 0.3434925377368927, -0.16322772204875946, -0.43108776211738586, -0.583364725112915, 0.6508843898773193, -1.0347274541854858, -0.24896755814552307, -0.3646961748600006, -0.28361061215400696, 0.3022025227546692, 0.03500057011842728, 0.5986007452011108, 0.701252818107605, 0.3473304510116577, 0.3605845868587494, 0.5793614387512207, -0.4237489700317383, 0.44852080941200256, -0.04664812982082367, -0.055426131933927536, -0.5944071412086487, 0.8595537543296814, 0.34326082468032837, 0.1597573608160019, 0.09984006732702255, 0.25714415311813354, -0.3342859148979187, -0.6140870451927185, -0.33499062061309814, 0.25240424275398254, -0.7400755882263184, -0.5337929725646973, -0.75139981508255, -0.39759546518325806, -0.4640262722969055, 0.0014662588946521282, -0.6027277708053589, -0.39143460988998413, -0.49043524265289307, 0.2564995288848877, 0.7586261034011841, 0.49150288105010986, -0.2825857102870941, 0.6847771406173706, -0.4765664339065552, 0.2035362720489502, 0.18288858234882355, 0.45436981320381165, 0.0015526014612987638, -0.9574546217918396, -0.2184743583202362, -0.09805815666913986, -0.3870004713535309, -0.6680893898010254, 0.4875533878803253, 0.24740783870220184, 0.48153817653656006, 0.32063573598861694, -0.26321694254875183, 0.6981838941574097, -0.057239994406700134, 0.5686354041099548, 0.5962619781494141, -0.4439920485019684, 0.5742376446723938, 0.05767180398106575, 0.15105748176574707, 0.17821785807609558, 0.2789768576622009, -0.2544066309928894, 0.1023765280842781, -0.9285231828689575, -0.8448700308799744, 0.9621354341506958, 0.13115085661411285, -0.0614514984190464, 0.3346158266067505, 0.842015266418457, 0.011885353364050388, -0.03359173238277435, -0.7052703499794006, -0.5266214609146118, -0.3188539445400238, -0.1778145432472229, 0.07621073722839355, -0.17539893090724945, -0.08382180333137512, -0.6837418675422668, 0.7870014905929565, -0.12244440615177155, 0.815978467464447, 0.29088571667671204, 0.06114153563976288, -0.0460757315158844, -0.47048434615135193, 0.4241718649864197, 0.16020135581493378, -0.2048652172088623, 0.1457827091217041, 0.22591935098171234, -0.5094857811927795, 0.1096641793847084, 0.14633741974830627, -0.07779356092214584, -0.04846440628170967, 0.508547842502594, 1.0836621522903442, -0.12849250435829163, 0.11710440367460251, 0.4365984797477722, -0.089716836810112, -0.45007559657096863, -0.31167498230934143, 0.24508672952651978, -0.019671978428959846, 0.5259889364242554, 0.1986079066991806, 0.4375661611557007, -0.08624320477247238, -0.3140285611152649, 0.3076777756214142, 0.5658478736877441, -0.3182826638221741, -0.30039989948272705, 0.7188661098480225, -0.14758515357971191, -0.23249708116054535, 0.9253857135772705, -0.24050818383693695, -0.5088332295417786, 1.2025166749954224, 0.4351843297481537, 0.9790899157524109, 0.049131862819194794, 0.036737460643053055, 0.8232084512710571, 0.2751922905445099, -0.0889059454202652, 0.16410651803016663, 0.2588936388492584, -0.7199735641479492, 0.028495626524090767, -0.4657822847366333, 0.10955972224473953, 0.36253252625465393, -0.5186207890510559, 0.29779908061027527, -0.7230910062789917, -0.46688446402549744, 0.11190234124660492, 0.3974590599536896, -1.013892412185669, 0.18068121373653412, -0.10279000550508499, 0.8925807476043701, -0.6818723082542419, 0.769733726978302, 0.9110654592514038, -0.3951287269592285, -1.1526787281036377, -0.1900251805782318, 0.16546310484409332, -0.984902560710907, 0.6959213614463806, 0.4930819272994995, 0.12390611320734024, 0.08402326703071594, -0.8216372132301331, -0.6368342638015747, 1.5434173345565796, 0.543377161026001, -0.14699402451515198, 0.3674972355365753, -0.13569068908691406, 0.2081689089536667, -0.42242369055747986, 0.5973427891731262, 0.20019587874412537, 0.4500167667865753, 0.3881256580352783, -0.6306979060173035, 0.2379145324230194, -0.3937888741493225, 0.1743794083595276, 0.12307461351156235, -1.0024305582046509, 0.9419922828674316, -0.5316478610038757, -0.171446293592453, 0.05186634510755539, 0.7315847277641296, 0.16190774738788605, 0.21795128285884857, 0.5231723189353943, 0.891918420791626, 0.5881568193435669, -0.3598911464214325, 1.012516975402832, 0.07382450997829437, 0.5708410739898682, 0.7041783332824707, 0.3848373591899872, 0.5156393647193909, 0.2947412133216858, -0.1886713206768036, 0.36219683289527893, 1.114259958267212, -0.37273475527763367, 0.3709113597869873, 0.27304813265800476, 0.11964021623134613, -0.03998574614524841, 0.04245464876294136, -0.4904618263244629, 0.6043429374694824, 0.04693252220749855, -0.5095557570457458, -0.16881942749023438, -0.009438904002308846, 0.04288533702492714, -0.3472612202167511, -0.18759174644947052, 0.5813008546829224, 0.044445376843214035, -0.4232863783836365, 0.9040637612342834, 0.27567070722579956, 0.8588714599609375, -0.4485234320163727, 0.009443032555282116, -0.3020646572113037, 0.2156849503517151, -0.31260398030281067, -0.7466152906417847, 0.32822686433792114, -0.225770965218544, 0.005449958145618439, 0.09956375509500504, 0.7624933123588562, -0.28326356410980225, -0.3996981382369995, 0.2035234570503235, 0.29939237236976624, 0.5938608646392822, 0.10605725646018982, -1.281502366065979, 0.20142589509487152, 0.04960472509264946, -0.7106209993362427, 0.37967449426651, 0.306842565536499, 0.12551048398017883, 0.7411524057388306, 0.5795387029647827, -0.09411949664354324, 0.06730321794748306, -0.23635858297348022, 0.8499162197113037, -0.4215882420539856, -0.2926737666130066, -0.8011795282363892, 0.6216926574707031, -0.19030620157718658, -0.6044235229492188, 0.46250370144844055, 0.5856772661209106, 0.7829421162605286, 0.027601903304457664, 0.49664032459259033, -0.30007174611091614, -0.07849111407995224, -0.4886653423309326, 0.7013774514198303, -0.8260858654975891, 0.013818707317113876, 0.006087913643568754, -0.6958144903182983, -0.31892916560173035, 0.7486646175384521, -0.10994924604892731, 0.43272536993026733, 0.4914810359477997, 0.9949468970298767, -0.35695090889930725, -0.45017507672309875, 0.0626721903681755, 0.11870534718036652, 0.11588691174983978, 0.428299218416214, 0.3650481104850769, -0.8315234184265137, 0.2983284592628479, -0.6380577087402344, -0.2580829858779907, -0.20951084792613983, -0.7349709272384644, -0.9648631811141968, -0.8020466566085815, -0.6630570888519287, -0.7567341923713684, -0.05799978971481323, 0.9724084734916687, 1.0846354961395264, -0.6498066186904907, -0.06563731282949448, -0.01947828009724617, 0.13058273494243622, -0.3172553777694702, -0.238418847322464, 0.7000524401664734, -0.10572002083063126, -0.7174150347709656, -0.29111534357070923, 0.04490439593791962, 0.3694455623626709, 0.060903679579496384, -0.3282349705696106, -0.17294864356517792, -0.2797592878341675, 0.20658481121063232, 0.3562229871749878, -0.6407635807991028, -0.2640710771083832, -0.27854493260383606, -0.16986946761608124, 0.35270068049430847, 0.45206212997436523, -0.5138067603111267, 0.29374679923057556, 0.4711410105228424, 0.4400438368320465, 0.7660711407661438, -0.32149738073349, -0.04594060033559799, -0.9281185269355774, 0.6036940813064575, -0.17473618686199188, 0.46297091245651245, 0.4350617527961731, -0.35576045513153076, 0.7198078632354736, 0.48556384444236755, -0.3892107307910919, -0.8865832090377808, -0.05008977651596069, -1.1079086065292358, -0.19896622002124786, 1.0365450382232666, -0.481262743473053, -0.5385076999664307, 0.527588427066803, 0.04521574079990387, 0.7299108505249023, -0.07509875297546387, 0.4084462523460388, 0.16001486778259277, -0.1075461283326149, -0.6569443345069885, -0.6012347936630249, 0.39043548703193665, 0.16665226221084595, -0.689373254776001, -0.4790852665901184, -0.03489061817526817, 0.6490116119384766, 0.17929352819919586, 0.5514641404151917, -0.059297673404216766, 0.13991403579711914, 0.1920369565486908, 0.46180376410484314, -0.6396557092666626, -0.20311172306537628, -0.2860199511051178, 0.04995128512382507, -0.10100215673446655, -0.642414927482605 ]
facebook/esmfold_v1
facebook
"2023-03-22T17:39:28Z"
25,615
13
transformers
[ "transformers", "pytorch", "esm", "license:mit", "endpoints_compatible", "has_space", "region:us" ]
null
"2022-11-01T18:24:14Z"
--- license: mit --- # ESMFold ESMFold is a state-of-the-art end-to-end protein folding model based on an ESM-2 backbone. It does not require any lookup or MSA step, and therefore does not require any external databases to be present in order to make predictions. As a result, inference time is very significantly faster than AlphaFold2. For details on the model architecture and training, please refer to the [accompanying paper](https://www.science.org/doi/10.1126/science.ade2574). If you're interested in using ESMFold in practice, please check out the associated [tutorial notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/protein_folding.ipynb).
[ -0.5136392116546631, -0.5368983149528503, 0.3144552707672119, 0.05252030864357948, -0.12973709404468536, -0.09755190461874008, 0.6885697245597839, -0.5513832569122314, 0.4799072742462158, 0.5396507382392883, -1.003792405128479, -0.5854203701019287, -0.7264200448989868, -0.048903800547122955, -0.4617493152618408, 0.6635326743125916, 0.1304151862859726, 0.21636836230754852, -0.5916274189949036, -0.27485284209251404, 0.6375143527984619, -0.11045870184898376, -0.3808968663215637, -0.8621947169303894, 0.3602356016635895, 0.28937673568725586, 0.31611335277557373, 0.8623715043067932, 0.3767390847206116, 0.2858617603778839, -0.6726346015930176, 0.0868305191397667, -0.4748167097568512, 0.2930798828601837, 0.13069570064544678, -0.6147161722183228, -0.7707552909851074, 0.18506723642349243, 0.058823857456445694, 0.7130412459373474, -0.054397307336330414, 0.6526213884353638, 0.02760472521185875, 1.3015108108520508, -0.5535324811935425, -0.1795009821653366, -0.3423601984977722, 0.21026183664798737, -0.22032368183135986, -0.05413530394434929, -0.30455097556114197, -0.2248746156692505, 0.23165015876293182, -0.5104894638061523, 0.2710651755332947, 0.3267073631286621, 0.8779497742652893, -0.02771506831049919, -0.6832816004753113, -0.290619820356369, 0.010300138965249062, 0.4044158160686493, -0.46335819363594055, 0.5063087940216064, 0.5148189663887024, 0.7211005091667175, -0.46975454688072205, -0.9029585719108582, -0.27682316303253174, 0.1827770620584488, 0.2671269178390503, 0.23985710740089417, 0.3802929222583771, 0.37080416083335876, 0.5219222903251648, 0.44137948751449585, -1.1004819869995117, 0.07325129956007004, -0.7014371752738953, 0.19690127670764923, 0.49015000462532043, -0.1791771799325943, 0.38679268956184387, -0.17234773933887482, -0.8545072078704834, 0.18603742122650146, -1.0240309238433838, -0.07154787331819534, 0.5113793611526489, -0.006455443799495697, -0.2864007353782654, 0.805795431137085, -0.22484318912029266, 0.6300803422927856, 0.05322519689798355, 0.24202904105186462, 0.4027872383594513, 0.1354244202375412, -0.4389418363571167, -0.2568308115005493, 0.11071530729532242, 0.7612167000770569, -0.24859517812728882, -0.31831344962120056, -0.11670257151126862, -0.18308418989181519, -0.026536304503679276, -1.2923861742019653, -0.35647958517074585, 0.9797585010528564, -0.7540544271469116, 0.05371847376227379, -0.05623944103717804, -0.6248844861984253, -0.37005746364593506, -0.24598126113414764, 0.6159225702285767, -0.46902450919151306, 0.08749226480722427, 0.37652114033699036, -0.6046489477157593, 0.8859768509864807, 0.09994843602180481, -0.7544296383857727, 0.8445114493370056, 0.8596157431602478, 1.4687154293060303, -0.13064835965633392, -0.255810409784317, -0.45782119035720825, 0.2256397306919098, -0.13183650374412537, 1.3165812492370605, -0.08776602149009705, -0.3021789491176605, -0.11660583317279816, 0.37049099802970886, 0.10346285253763199, -0.05250411108136177, 0.6374369859695435, -0.475607693195343, 0.32030153274536133, -0.4683712124824524, -0.918753981590271, -0.7325961589813232, 0.05625396966934204, -0.6397892236709595, 0.7780563235282898, -0.10976360738277435, -0.5666450262069702, 0.18957675993442535, -0.7866277098655701, -0.5231824517250061, 0.010414996184408665, 0.18785813450813293, -0.6868667006492615, 0.12362126260995865, 0.07561460137367249, 0.20908208191394806, -0.2636902928352356, -0.29448556900024414, -0.649186909198761, -0.2163868397474289, -0.18042445182800293, 0.3919415771961212, 0.8738851547241211, 0.20892255008220673, -0.04811897873878479, -0.2161819189786911, -0.8721333742141724, 0.20492471754550934, 0.08836466819047928, -0.2386772483587265, -0.13509130477905273, 0.08717135339975357, 0.07326687127351761, 0.36266207695007324, 0.12107865512371063, -0.7061111330986023, 0.6755102872848511, -0.4522753953933716, 0.5025840997695923, 0.8214329481124878, 0.09401433914899826, 0.8114409446716309, -0.6638292670249939, 0.17383094131946564, -0.4406796097755432, 0.4374713897705078, -0.5356680750846863, -0.7557879686355591, -0.8823269009590149, -0.23881244659423828, 0.11436721682548523, 0.12635549902915955, -0.03424602001905441, 0.11425991356372833, 0.2668278217315674, -0.6122398376464844, -0.25102493166923523, -0.24888499081134796, 0.4235856831073761, 0.41751739382743835, 0.5534252524375916, -0.15273095667362213, -0.6035839915275574, -1.067537546157837, -0.22215434908866882, 0.011644622310996056, -0.39575546979904175, -0.10755918174982071, 0.9424944519996643, 0.018384629860520363, 0.4075937569141388, -0.5547516942024231, -0.35795703530311584, -0.03901604935526848, 0.24243921041488647, 0.26051968336105347, 0.4310899078845978, 0.3750336170196533, -0.8286436200141907, -0.3335585594177246, -0.4613911807537079, -0.864600419998169, -0.18371757864952087, 0.16546519100666046, -0.2558162212371826, 0.20098090171813965, 0.4934570789337158, -0.6743482947349548, 0.2298860251903534, 0.9361134767532349, -0.4268743395805359, 0.2753871977329254, -0.37532466650009155, 0.11431825906038284, -1.2285469770431519, 0.12967713177204132, -0.053202901035547256, -0.1729792356491089, -0.643983006477356, 0.25638875365257263, 0.18100605905056, -0.4375969469547272, -0.5745986104011536, 0.4359204173088074, -1.0514142513275146, -0.5398666262626648, -0.08920584619045258, -0.25423744320869446, 0.46568721532821655, 0.5274600982666016, -0.21703016757965088, 0.5000271201133728, 0.597638726234436, -0.4249446988105774, -0.5082587599754333, 0.484544962644577, -0.0380263552069664, 0.24201810359954834, -1.027402639389038, 0.6690227389335632, -0.38720107078552246, 0.4394080936908722, -1.0713399648666382, -0.22607029974460602, 0.055887967348098755, -0.46021878719329834, 0.4683474898338318, -0.6549488306045532, -0.1399639993906021, -0.3925990164279938, -0.927061915397644, -0.12202996015548706, 0.43374955654144287, -0.4828322231769562, 1.0190463066101074, 0.7258568406105042, 0.07082024961709976, -0.31019383668899536, -0.9066572785377502, -0.1446574479341507, 0.14763832092285156, -0.6811185479164124, 0.6455214619636536, -0.4072665572166443, 0.08439771085977554, -0.19627265632152557, -0.4931128919124603, 0.11210042983293533, -0.09033969789743423, 0.845704197883606, -0.15306970477104187, 0.1413724571466446, -0.03296705707907677, 0.4794865548610687, -0.3673929274082184, -0.45036986470222473, -0.6675367951393127, 0.3761732280254364, -0.2785317897796631, -0.5235666036605835, -0.505378007888794, 0.8918920755386353, 1.213660717010498, -0.3161845803260803, 0.8023074269294739, -0.19873665273189545, -0.6623919606208801, -0.44635066390037537, -0.3014567196369171, -0.3539031445980072, -0.49177396297454834, 0.28983551263809204, -0.3977854549884796, -0.4157637357711792, 0.80351722240448, -0.21203014254570007, 0.4625617563724518, 0.09528039395809174, 0.21624888479709625, -0.34674978256225586, 1.1232655048370361, 0.7956759929656982, 0.78275465965271, 0.06015866994857788, -0.6851914525032043, 0.079241082072258, -1.1216336488723755, -0.7927498817443848, -0.7788705825805664, -0.6388198137283325, -0.43172091245651245, -0.788957417011261, 0.2608051598072052, 0.2404894083738327, -0.2882308065891266, 0.6263785362243652, -0.35828810930252075, 0.5276840925216675, 0.3531026542186737, -0.006867148447781801, 0.304932564496994, 0.04664989188313484, -0.2411951869726181, 0.3128809630870819, -0.8620166182518005, -0.5796971321105957, 1.1037209033966064, 0.43939444422721863, 0.6925415992736816, 0.07649249583482742, 0.5323207378387451, 0.30838754773139954, 0.27469587326049805, -0.8998076915740967, 0.5977898240089417, -0.10567474365234375, -0.5819949507713318, -0.051550183445215225, 0.07723432034254074, -0.590151846408844, 0.364464670419693, -0.46212008595466614, -0.6387707591056824, 0.0711883008480072, 0.14758794009685516, 0.007813271135091782, 0.3443357050418854, -0.8921393156051636, 0.11582506448030472, -0.1821773201227188, -0.11745472252368927, 0.14542603492736816, -0.6899791955947876, 0.07648880034685135, 0.21601749956607819, 0.12547004222869873, -0.24611161649227142, -0.28670305013656616, 0.9776166677474976, -0.6476950645446777, 0.49508222937583923, -0.08960749208927155, 0.4336530864238739, -0.13481494784355164, 0.35846972465515137, 0.6059452891349792, -0.22407571971416473, -0.30670881271362305, 0.35854384303092957, 0.03113645128905773, -0.618876576423645, -0.6507258415222168, 0.6367549300193787, -0.4385813772678375, -0.2847249507904053, -0.4331474006175995, -0.20659588277339935, 0.04655379056930542, 0.27184349298477173, 0.3106776475906372, 0.7098117470741272, 0.07811225950717926, 0.11953894793987274, 0.5775697827339172, -0.08023851364850998, 0.1863943338394165, 1.0439869165420532, -0.391684353351593, -0.25866788625717163, 0.3551979959011078, 0.8335461020469666, 0.2946859300136566, 0.6026672720909119, 0.03385818377137184, -0.5057693123817444, -0.8432595133781433, -0.42847272753715515, 0.4454975128173828, -0.599169135093689, -0.10237829387187958, -1.1492998600006104, -0.032282907515764236, -0.2779201865196228, -0.4010333716869354, -0.8618606925010681, -0.8967717885971069, 0.3994126319885254, -0.44749197363853455, 0.2515195310115814, 0.5231973528862, 0.03154821693897247, 0.08205605298280716, -0.43966609239578247, 0.4970349371433258, 0.04588133841753006, 0.3863350749015808, -0.25170034170150757, -0.44997459650039673, -0.1381569653749466, -0.37547799944877625, -0.41312119364738464, -0.9318947792053223, 0.08094127476215363, 0.5567801594734192, 0.5913522243499756, 0.42499929666519165, -0.11803250759840012, 0.32652485370635986, -0.7296096086502075, 0.6501425504684448, 0.2078896164894104, -0.684333324432373, 0.6969242095947266, -0.0786755234003067, 0.5486197471618652, 0.40304601192474365, 0.6729542016983032, -0.3996866047382355, -0.22444914281368256, -0.3817995488643646, -1.343455195426941, 0.37012970447540283, 0.20115110278129578, -0.3317723870277405, 0.34845003485679626, 0.16021226346492767, 0.5381065011024475, 0.11281363666057587, -0.32941311597824097, -0.4013824462890625, 0.1594177484512329, 0.3360109031200409, 0.23198765516281128, -0.4325653612613678, -0.16106915473937988, 0.04183565080165863, 0.8008680939674377, -0.4178560674190521, 0.43782737851142883, 0.2612498104572296, -0.1982954740524292, -0.12100818753242493, -0.24684469401836395, 0.42930370569229126, 0.7367189526557922, -0.6589629054069519, 0.21783508360385895, 0.08644018322229385, -0.14750352501869202, -0.16459399461746216, 0.20509538054466248, -0.5223420262336731, -0.28221946954727173, 0.4471173584461212, 0.3707493245601654, 0.1649385541677475, -0.2992399334907532, 0.2825571298599243, -0.13890494406223297, -0.6563972234725952, 0.09682732075452805, -0.303325891494751, 0.3562158942222595, 0.3788706064224243, 0.48973292112350464, 0.3247961699962616, 0.5525918006896973, -0.5869782567024231, 0.5551038980484009, 0.06694621592760086, -0.37858515977859497, -0.5248827338218689, 0.7279727458953857, 0.3797233998775482, -0.6129119992256165, 0.2923036813735962, 0.16430717706680298, -0.47326064109802246, 0.5342447757720947, 0.6371447443962097, 0.9366474747657776, -0.3921167254447937, 0.4632996618747711, 0.3545224666595459, 0.25012293457984924, -0.05443074181675911, 0.416314959526062, -0.19270341098308563, -0.08846770226955414, -0.0726894810795784, -1.0623564720153809, -0.4252873361110687, 0.10075566917657852, -0.4534229636192322, 0.4351273477077484, -0.3005406856536865, 0.1323833465576172, 0.07265641540288925, 0.11495158821344376, -0.31030330061912537, -0.1124444305896759, 0.08626843243837357, 1.770185947418213, -1.0382932424545288, 0.4297472834587097, 0.6319425702095032, -0.2952148914337158, -0.09434077888727188, -0.1949491798877716, 0.6318489909172058, -0.5256265997886658, 0.10025361180305481, 0.7054275870323181, -0.3952203392982483, -0.04685564711689949, -0.4532138705253601, -0.7062899470329285, 1.364458680152893, 0.38662561774253845, -0.5147068500518799, -0.4002121686935425, -0.31154778599739075, 0.39923006296157837, -0.36346593499183655, 0.44908958673477173, -0.06134738028049469, 0.1892884373664856, 0.23505768179893494, -0.049528803676366806, -0.12759210169315338, -0.5165287852287292, -0.010876458138227463, 0.14058253169059753, -0.90694659948349, 0.74201500415802, -0.4785921275615692, -0.512748658657074, 0.3022765815258026, 0.7405450940132141, 0.23842167854309082, 0.48360535502433777, 0.32131657004356384, 0.6294687986373901, 1.0316187143325806, 0.014284133911132812, 1.0892401933670044, -0.48878800868988037, 0.5366379618644714, 1.0123060941696167, -0.3375137150287628, 0.6232851147651672, 0.7607826590538025, 0.011324332095682621, 0.3042675256729126, 0.7798663377761841, 0.08730077743530273, 0.44495105743408203, 0.19798405468463898, 0.16651855409145355, -0.1368701308965683, -0.01633370667695999, -0.4598492681980133, 0.3093942701816559, 0.12353123724460602, -0.27936187386512756, -0.35762786865234375, -0.016631608828902245, -0.005487647373229265, -0.04754035919904709, -0.1181575208902359, 0.5915136337280273, 0.3569481670856476, -0.5873320698738098, 0.48090627789497375, -0.11999347805976868, 0.18777476251125336, -0.799107015132904, -0.16776786744594574, -0.34204429388046265, -0.17542068660259247, -0.1825866550207138, -0.8319125175476074, 0.32120242714881897, -0.07410365343093872, -0.2081201672554016, -0.26007741689682007, 0.6291106939315796, -0.3060842454433441, -0.283284991979599, 0.7712950706481934, 0.5585951209068298, 0.2232193946838379, 0.26065391302108765, -0.882381021976471, 0.010095249861478806, -0.5993045568466187, -0.92823326587677, 0.4160517752170563, -0.23315533995628357, 0.1711065173149109, 1.2077347040176392, 0.7916772365570068, -0.29046761989593506, -0.39751559495925903, -0.011036398820579052, 0.9142544865608215, -0.40384113788604736, -0.5356098413467407, -0.37373271584510803, 0.5744282603263855, -0.3380052149295807, -0.15777546167373657, 0.542260468006134, 1.106460690498352, 0.5654728412628174, -0.13690364360809326, 0.5385589003562927, 0.05152300372719765, 0.2584262788295746, -0.7589777708053589, 0.8574984073638916, -0.8423476815223694, -0.021044984459877014, 0.1348799467086792, -0.7453571557998657, -0.433001309633255, 0.2124014049768448, 0.09474220871925354, 0.006236017681658268, 0.7558505535125732, 1.2150096893310547, -0.18929007649421692, 0.20736870169639587, 0.3124799132347107, 0.36320140957832336, 0.42824679613113403, 0.35693323612213135, 0.18751145899295807, -0.73660808801651, 0.1338028460741043, 0.060518596321344376, -0.4420192837715149, -0.46422696113586426, -0.9284420013427734, -1.0293527841567993, -0.8992121815681458, -0.07711543887853622, -0.5381681323051453, 0.5786424279212952, 0.890322208404541, 1.3258312940597534, -0.6045987606048584, -0.11026498675346375, -0.18183286488056183, 0.024151859804987907, -0.26929527521133423, -0.03856279328465462, 0.4454386830329895, 0.08963241428136826, -0.7142051458358765, 0.45779839158058167, 1.0595892667770386, 0.1397494226694107, -0.0312616266310215, -0.18972386419773102, -0.45980897545814514, 0.5594912171363831, 0.6230429410934448, 0.4347538352012634, -0.23666128516197205, -0.09152483940124512, 0.19328181445598602, 0.06384721398353577, 0.10541548579931259, 0.6262291073799133, -0.3160736858844757, 0.6223893761634827, 1.037400484085083, 0.18572676181793213, 0.9457973837852478, -0.07590776681900024, 0.8470468521118164, 0.0431421659886837, -0.03190535306930542, -0.1526111215353012, 0.39599379897117615, 0.36990147829055786, -0.29569578170776367, 0.39239174127578735, 0.21039634943008423, -0.5250397324562073, -0.7083988189697266, 0.6328954100608826, -1.2298386096954346, -0.23643758893013, 0.7940255403518677, -0.20191553235054016, -0.8974777460098267, 0.012543260119855404, -0.0959853082895279, 0.3066008388996124, -0.2714938521385193, 0.6735609173774719, 0.2577986419200897, -0.3534873425960541, -0.022208891808986664, -0.48053672909736633, 0.6078553199768066, 0.10230616480112076, -0.640281081199646, 0.012368671596050262, -0.16140587627887726, 0.3434228003025055, -0.2370520681142807, 0.5608024597167969, -0.4853334426879883, 0.23871652781963348, 0.17527882754802704, -0.15198172628879547, -0.7588964700698853, -0.5900049805641174, -0.37100669741630554, 0.5182087421417236, -0.2555710971355438, -0.07385438680648804 ]
RUCAIBox/mvp
RUCAIBox
"2022-06-27T02:27:44Z"
25,562
8
transformers
[ "transformers", "pytorch", "mvp", "text-generation", "text2text-generation", "summarization", "conversational", "en", "arxiv:2206.12131", "license:apache-2.0", "endpoints_compatible", "region:us" ]
text2text-generation
"2022-05-29T08:21:56Z"
--- license: apache-2.0 language: - en tags: - text-generation - text2text-generation - summarization - conversational pipeline_tag: text2text-generation widget: - text: "Summarize: You may want to stick it to your boss and leave your job, but don't do it if these are your reasons." example_title: "Summarization" - text: "Given the dialog: do you like dance? [SEP] Yes I do. Did you know Bruce Lee was a cha cha dancer?" example_title: "Dialog" - text: "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man" example_title: "Data-to-text" - text: "Given the story title: I think all public schools should have a uniform dress code." example_title: "Story Generation" - text: "Answer the following question: From which country did Angola achieve independence in 1975?" example_title: "Question Answering" - text: "Generate the question based on the answer: boxing [X_SEP] A bolo punch is a punch used in martial arts . A hook is a punch in boxing ." example_title: "Question Generaion" --- # MVP The MVP model was proposed in [**MVP: Multi-task Supervised Pre-training for Natural Language Generation**](https://arxiv.org/abs/2206.12131) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen. The detailed information and instructions can be found [https://github.com/RUCAIBox/MVP](https://github.com/RUCAIBox/MVP). ## Model Description MVP is supervised pre-trained using a mixture of labeled datasets. It follows a standard Transformer encoder-decoder architecture. MVP is specially designed for natural language generation and can be adapted to a wide range of generation tasks, including but not limited to summarization, data-to-text generation, open-ended dialogue system, story generation, question answering, question generation, task-oriented dialogue system, commonsense generation, paraphrase generation, text style transfer, and text simplification. Our model can also be adapted to natural language understanding tasks such as sequence classification and (extractive) question answering. ## Examples For summarization: ```python >>> from transformers import MvpTokenizer, MvpForConditionalGeneration >>> tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp") >>> model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp") >>> inputs = tokenizer( ... "Summarize: You may want to stick it to your boss and leave your job, but don't do it if these are your reasons.", ... return_tensors="pt", ... ) >>> generated_ids = model.generate(**inputs) >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True) ["Why You Shouldn't Quit Your Job"] ``` For data-to-text generation: ```python >>> from transformers import MvpTokenizerFast, MvpForConditionalGeneration >>> tokenizer = MvpTokenizerFast.from_pretrained("RUCAIBox/mvp") >>> model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp") >>> inputs = tokenizer( ... "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man", ... return_tensors="pt", ... ) >>> generated_ids = model.generate(**inputs) >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True) ['Stan Lee created the character of Iron Man, a fictional superhero appearing in American comic'] ``` ## Related Models **MVP**: [https://huggingface.co/RUCAIBox/mvp](https://huggingface.co/RUCAIBox/mvp). **Prompt-based models**: - MVP-multi-task: [https://huggingface.co/RUCAIBox/mvp-multi-task](https://huggingface.co/RUCAIBox/mvp-multi-task). - MVP-summarization: [https://huggingface.co/RUCAIBox/mvp-summarization](https://huggingface.co/RUCAIBox/mvp-summarization). - MVP-open-dialog: [https://huggingface.co/RUCAIBox/mvp-open-dialog](https://huggingface.co/RUCAIBox/mvp-open-dialog). - MVP-data-to-text: [https://huggingface.co/RUCAIBox/mvp-data-to-text](https://huggingface.co/RUCAIBox/mvp-data-to-text). - MVP-story: [https://huggingface.co/RUCAIBox/mvp-story](https://huggingface.co/RUCAIBox/mvp-story). - MVP-question-answering: [https://huggingface.co/RUCAIBox/mvp-question-answering](https://huggingface.co/RUCAIBox/mvp-question-answering). - MVP-question-generation: [https://huggingface.co/RUCAIBox/mvp-question-generation](https://huggingface.co/RUCAIBox/mvp-question-generation). - MVP-task-dialog: [https://huggingface.co/RUCAIBox/mvp-task-dialog](https://huggingface.co/RUCAIBox/mvp-task-dialog). **Multi-task models**: - MTL-summarization: [https://huggingface.co/RUCAIBox/mtl-summarization](https://huggingface.co/RUCAIBox/mtl-summarization). - MTL-open-dialog: [https://huggingface.co/RUCAIBox/mtl-open-dialog](https://huggingface.co/RUCAIBox/mtl-open-dialog). - MTL-data-to-text: [https://huggingface.co/RUCAIBox/mtl-data-to-text](https://huggingface.co/RUCAIBox/mtl-data-to-text). - MTL-story: [https://huggingface.co/RUCAIBox/mtl-story](https://huggingface.co/RUCAIBox/mtl-story). - MTL-question-answering: [https://huggingface.co/RUCAIBox/mtl-question-answering](https://huggingface.co/RUCAIBox/mtl-question-answering). - MTL-question-generation: [https://huggingface.co/RUCAIBox/mtl-question-generation](https://huggingface.co/RUCAIBox/mtl-question-generation). - MTL-task-dialog: [https://huggingface.co/RUCAIBox/mtl-task-dialog](https://huggingface.co/RUCAIBox/mtl-task-dialog). ## Citation ```bibtex @article{tang2022mvp, title={MVP: Multi-task Supervised Pre-training for Natural Language Generation}, author={Tang, Tianyi and Li, Junyi and Zhao, Wayne Xin and Wen, Ji-Rong}, journal={arXiv preprint arXiv:2206.12131}, year={2022}, url={https://arxiv.org/abs/2206.12131}, } ```
[ -0.4447360336780548, -0.9157733917236328, 0.3481644093990326, 0.3273167610168457, -0.12713012099266052, 0.05885317176580429, 0.02999812364578247, -0.13727577030658722, 0.06675653159618378, 0.46747663617134094, -0.8290769457817078, -0.5592105388641357, -0.5217525362968445, 0.2567063271999359, -0.08442363142967224, 1.2554601430892944, -0.04877575859427452, -0.10954593867063522, -0.2806696891784668, -0.1450335681438446, -0.7331809401512146, -0.4687352180480957, -0.5902301073074341, -0.4065762460231781, 0.28694820404052734, 0.3964059352874756, 0.6225395202636719, 0.27628064155578613, 0.27778321504592896, 0.4025660753250122, -0.09866127371788025, 0.26777538657188416, -0.28582897782325745, -0.06295014917850494, -0.11015047132968903, -0.24036595225334167, -1.0607808828353882, -0.12158868461847305, 0.5491069555282593, 0.43127620220184326, 0.16393141448497772, 0.48190104961395264, 0.19084526598453522, 0.8168854117393494, -0.38960781693458557, 0.224092036485672, -0.23140861093997955, 0.25194501876831055, -0.11077506095170975, -0.3030495047569275, -0.23044262826442719, -0.1769310086965561, 0.16051647067070007, -0.5346035957336426, 0.24009659886360168, 0.1997518241405487, 1.064903736114502, 0.09091924130916595, -0.41132956743240356, -0.10845359414815903, -0.4514484405517578, 0.9960325956344604, -0.9512751698493958, 0.1748160421848297, 0.27250346541404724, 0.1628233939409256, 0.07819333672523499, -0.8712566494941711, -0.7422126531600952, -0.09060803800821304, -0.2298096865415573, 0.3725945055484772, -0.25904762744903564, 0.15190201997756958, 0.3110056519508362, 0.45656120777130127, -0.8937238454818726, -0.11431612074375153, -0.26116305589675903, -0.013965718448162079, 0.5591998100280762, 0.5333048701286316, 0.47556471824645996, -0.777923583984375, -0.3609502911567688, -0.09955256432294846, -0.4851747453212738, 0.27832886576652527, 0.13225610554218292, 0.16512489318847656, -0.4544019103050232, 0.7827638983726501, -0.29772835969924927, 0.8236921429634094, 0.14249509572982788, -0.3916148841381073, 0.5859729647636414, -0.9272045493125916, -0.3425605893135071, -0.34450340270996094, 1.2317925691604614, 0.48776915669441223, 0.03895258530974388, 0.022049473598599434, -0.040495000779628754, -0.3552159368991852, 0.18497641384601593, -0.8426579833030701, -0.06938953697681427, 0.5739381909370422, -0.7575987577438354, -0.40008383989334106, -0.15991860628128052, -0.7450923919677734, -0.07408776134252548, -0.33300256729125977, 0.471327006816864, -0.4951213598251343, -0.4021121561527252, -0.028572825714945793, -0.2518986165523529, -0.1348833292722702, 0.2802620530128479, -0.6852636337280273, 0.13578805327415466, 0.3656536638736725, 0.9529902935028076, -0.08206002414226532, -0.5128849148750305, -0.34242570400238037, -0.029010947793722153, -0.23030120134353638, 0.6950857043266296, -0.22138406336307526, -0.10422137379646301, -0.30926311016082764, -0.11000481992959976, -0.32779985666275024, -0.3303861618041992, 0.4954967796802521, -0.042620621621608734, 0.5611573457717896, -0.17681901156902313, -0.3661997318267822, -0.13961312174797058, 0.4691200256347656, -0.5907725691795349, 1.1441618204116821, 0.12547925114631653, -1.146202564239502, 0.29335135221481323, -1.1614888906478882, -0.18271860480308533, -0.136804461479187, -0.08170764893293381, -0.5276628136634827, -0.0321703664958477, 0.3590902090072632, 0.8312215805053711, -0.4744281470775604, 0.413739413022995, 0.14796790480613708, -0.06135505810379982, 0.14797767996788025, -0.1242295578122139, 0.8801169395446777, 0.40918639302253723, -0.3700393736362457, 0.5425705909729004, -0.8957850933074951, 0.0336635448038578, 0.30067458748817444, -0.26187318563461304, 0.14255429804325104, -0.11870772391557693, 0.05547436326742172, 0.4091232419013977, 0.21798327565193176, -0.3763628602027893, 0.032753460109233856, -0.4459095299243927, 0.38644900918006897, 0.5318349599838257, 0.10462378710508347, 0.3226671516895294, -0.6189214587211609, 0.7628805637359619, 0.24691633880138397, 0.2955000102519989, -0.3261801302433014, -0.6402109265327454, -0.7537146806716919, -0.10008514672517776, 0.3493776023387909, 0.8043388724327087, -0.9680776000022888, 0.6429694890975952, -0.32974088191986084, -0.7136167287826538, -0.47038283944129944, -0.004987501073628664, 0.6972945928573608, 0.7635070085525513, 0.3683135211467743, -0.30100372433662415, -0.6695356369018555, -0.9768551588058472, -0.1763242483139038, -0.17811115086078644, -0.05069930478930473, 0.5301244854927063, 0.6582463979721069, -0.058661505579948425, 0.9453956484794617, -0.5105054378509521, -0.22019459307193756, -0.8720375895500183, 0.37105298042297363, 0.5000607967376709, 0.6572598814964294, 0.6905096173286438, -0.7054972052574158, -0.6626870036125183, -0.15947671234607697, -0.8139444589614868, 0.15928299725055695, -0.1896476000547409, -0.037025779485702515, 0.13958455622196198, 0.28049948811531067, -0.9242973327636719, 0.4709815979003906, 0.35931020975112915, -0.49914202094078064, 0.9992403984069824, -0.1923847645521164, 0.41645288467407227, -1.7008917331695557, 0.4264294505119324, 0.04801272228360176, -0.2719048261642456, -0.9078450798988342, 0.004800987429916859, -0.08395165950059891, -0.23811955749988556, -0.5954446792602539, 0.726259708404541, -0.5080305337905884, 0.19594718515872955, -0.0442238487303257, 0.12284080684185028, 0.008887171745300293, 0.7354364395141602, -0.002031228505074978, 0.8440250158309937, 0.6839718818664551, -0.6525004506111145, 0.3229060173034668, 0.5426119565963745, -0.2651263475418091, 0.547390341758728, -0.9208229780197144, 0.06307191401720047, -0.29128316044807434, 0.28506550192832947, -0.9808875322341919, -0.12513163685798645, 0.36807310581207275, -0.8351901769638062, 0.15329515933990479, -0.11705700308084488, -0.9577910304069519, -0.5231770277023315, -0.48664960265159607, 0.2680371105670929, 0.4077174663543701, -0.2667134702205658, 0.7031804919242859, 0.2970280647277832, -0.3258177638053894, -0.6537501811981201, -0.44981712102890015, 0.07282593846321106, -0.23389023542404175, -0.7487674355506897, 0.41741153597831726, -0.4262557923793793, -0.0027817708905786276, -0.0182242002338171, 0.17429119348526, -0.061547599732875824, 0.002025430090725422, 0.22674036026000977, 0.46469220519065857, -0.16545258462429047, 0.04514968395233154, -0.04387739300727844, -0.04092053696513176, -0.1363668143749237, 0.11355669051408768, 0.8967241048812866, -0.203338623046875, -0.008443101309239864, -0.5670832991600037, 0.40494081377983093, 0.4638586640357971, -0.25769492983818054, 0.8925772309303284, 0.8224557638168335, -0.37985748052597046, 0.06654214859008789, -0.43800610303878784, 0.053049929440021515, -0.4296471178531647, 0.3558342754840851, -0.5884551405906677, -0.6487890481948853, 0.4693261981010437, 0.027185723185539246, 0.3777407705783844, 0.7389174103736877, 0.777678370475769, 0.15434426069259644, 1.3054181337356567, 0.45293888449668884, -0.03661159798502922, 0.5016615390777588, -0.5004640817642212, 0.07450764626264572, -0.9600188136100769, -0.2809762954711914, -0.3658597469329834, -0.1802593320608139, -0.20718374848365784, -0.48554518818855286, 0.2979162335395813, 0.2825024724006653, -0.3249833583831787, 0.5516433715820312, -0.7185114622116089, 0.1583365797996521, 0.5538629293441772, -0.08376985043287277, 0.14050881564617157, -0.2802225351333618, -0.256272554397583, -0.04814451187849045, -0.8758015036582947, -0.5190659165382385, 1.23153555393219, 0.3639291822910309, 0.38549351692199707, 0.009970743209123611, 0.7128462195396423, 0.10771288722753525, 0.056854113936424255, -0.3999769985675812, 0.7648105621337891, 0.025573808699846268, -0.648137092590332, -0.27172261476516724, -0.5719437003135681, -0.9828749895095825, 0.21056833863258362, -0.3861444592475891, -0.9370371103286743, -0.1987820863723755, 0.23552706837654114, -0.5098171234130859, 0.3006749153137207, -0.7702934741973877, 1.1176629066467285, -0.11427421867847443, -0.16033612191677094, -0.05395546182990074, -0.7928499579429626, 0.49782076478004456, 0.12757714092731476, 0.1435890793800354, -0.056541167199611664, 0.16882506012916565, 0.8845722675323486, -0.5580691695213318, 0.8272100687026978, -0.13484624028205872, 0.30843865871429443, 0.35983961820602417, -0.1738349348306656, 0.5184115171432495, 0.11819706112146378, 0.07664471864700317, -0.05788880214095116, -0.0074968948028981686, -0.24071162939071655, -0.5054441094398499, 0.4546062648296356, -0.6654567718505859, -0.35701581835746765, -0.501862645149231, -0.7134062647819519, -0.1791587769985199, 0.3655398190021515, 0.4956274628639221, 0.6030279994010925, -0.1961098313331604, -0.010214473120868206, 0.5370963215827942, -0.42184731364250183, 0.5403540730476379, 0.3032912611961365, -0.11964734643697739, -0.6572124361991882, 0.9689174890518188, -0.009509839117527008, 0.14701533317565918, 0.5020777583122253, 0.17610061168670654, -0.2963566482067108, -0.7163392305374146, -0.6923962831497192, 0.2570284605026245, -0.3712615668773651, -0.39872506260871887, -1.0269652605056763, -0.40242892503738403, -0.7069019675254822, 0.13913679122924805, -0.42361608147621155, -0.5935254693031311, -0.6095683574676514, -0.12258962541818619, 0.3433209955692291, 0.6934497356414795, 0.12436344474554062, 0.03684861212968826, -0.9556491374969482, 0.5366494059562683, 0.18374522030353546, 0.1388179063796997, 0.09939909726381302, -0.3929916322231293, -0.17293193936347961, -0.007984429597854614, -0.5454031825065613, -0.7295395135879517, 0.5914482474327087, 0.17848797142505646, 0.6949598789215088, 0.2764849364757538, 0.034962188452482224, 0.8034918308258057, -0.6492839455604553, 1.2431243658065796, 0.6032007336616516, -0.9281454682350159, 0.7581077218055725, -0.31190770864486694, 0.5435987710952759, 0.4447658061981201, 0.3577026426792145, -0.5773285627365112, -0.40144574642181396, -0.7824423909187317, -1.0215815305709839, 0.8753147721290588, 0.536490797996521, 0.031087663024663925, -0.016365621238946915, -0.0020827641710639, 0.2642989158630371, 0.4200890064239502, -0.8338512182235718, -0.6659406423568726, -0.517357587814331, -0.30388343334198, -0.08197061717510223, -0.24190379679203033, -0.021647313609719276, -0.393259733915329, 0.6648090481758118, -0.08655798435211182, 0.5339137315750122, 0.23662233352661133, -0.156344935297966, 0.1559656411409378, 0.5034926533699036, 0.8349641561508179, 0.8306239247322083, -0.2851552367210388, -0.01084333285689354, 0.240349680185318, -0.3392527103424072, -0.2507059574127197, 0.1922921985387802, -0.02104654349386692, 0.09496892243623734, 0.3648417592048645, 1.1863765716552734, 0.05754682049155235, -0.8829119205474854, 0.5048507452011108, -0.1362432986497879, -0.40345266461372375, -0.283256858587265, -0.048223819583654404, 0.16263429820537567, 0.2750896215438843, 0.24815715849399567, 0.13365481793880463, 0.16304203867912292, -0.6766706705093384, 0.09016207605600357, 0.29749956727027893, -0.2885683476924896, -0.4466148912906647, 0.9084272384643555, 0.1448611468076706, -0.3975624442100525, 0.2785671651363373, -0.47508224844932556, -0.6271487474441528, 0.34116286039352417, 0.45321667194366455, 0.9215627312660217, 0.008061928674578667, 0.41933077573776245, 0.684371829032898, -0.013550195842981339, -0.004538389388471842, 0.4175102114677429, -0.19518496096134186, -0.49560481309890747, -0.3820781707763672, -0.574808657169342, -0.12694759666919708, 0.31225210428237915, -0.3314676582813263, 0.06036079302430153, -0.4238322973251343, -0.36791354417800903, -0.016137054190039635, 0.23646418750286102, -0.8729180097579956, 0.2277042120695114, -0.28897038102149963, 0.9553824067115784, -0.6877698302268982, 0.6277716159820557, 0.787024974822998, -0.5707341432571411, -0.8364294171333313, -0.32485949993133545, 0.10350237041711807, -0.563614010810852, 0.7796440124511719, 0.0554293617606163, 0.37780889868736267, 0.031247923150658607, -0.3426115810871124, -0.7170006036758423, 1.3968044519424438, 0.03522922471165657, -0.1703069508075714, -0.29938071966171265, 0.1942712515592575, 0.5086919069290161, -0.5089276432991028, 0.47518599033355713, 0.5116665959358215, 0.37365543842315674, 0.11251433938741684, -1.318090796470642, 0.21887116134166718, -0.7542611360549927, -0.1295340210199356, -0.049503665417432785, -0.7227298617362976, 1.2789452075958252, -0.25880369544029236, -0.1755291223526001, 0.29723840951919556, 0.5362027287483215, 0.6573982834815979, 0.2741338312625885, 0.4873008131980896, 0.8275047540664673, 0.4468269944190979, -0.015847520902752876, 1.1024118661880493, -0.27594658732414246, 0.3265744149684906, 0.9407258033752441, 0.21521687507629395, 0.7145517468452454, 0.17350547015666962, -0.13988134264945984, 0.4043712913990021, 0.5718715190887451, -0.09220590442419052, 0.4318493902683258, 0.03320804238319397, -0.04373516887426376, -0.09903043508529663, -0.16309095919132233, -0.4671051800251007, 0.16918888688087463, 0.021342802792787552, -0.40137338638305664, -0.14678573608398438, 0.07678580284118652, 0.20147445797920227, -0.21937522292137146, -0.2695440948009491, 0.857646644115448, -0.07184005528688431, -0.742300808429718, 0.587673544883728, -0.0810517966747284, 0.8832285404205322, -0.6038264036178589, -0.1215624213218689, -0.01636938937008381, -0.04335625842213631, -0.26118776202201843, -0.8048911690711975, 0.010050750337541103, 0.11700991541147232, -0.2840398848056793, -0.43628981709480286, 0.784652829170227, -0.2622840702533722, -0.6151359677314758, -0.04752441495656967, 0.7016422748565674, 0.28769978880882263, -0.10006976127624512, -1.1426024436950684, -0.05764203891158104, 0.012859022244811058, -0.5261596441268921, 0.34520161151885986, 0.37766754627227783, 0.4202011227607727, 0.785078763961792, 0.6368127465248108, 0.1116972416639328, 0.12469783425331116, 0.20602603256702423, 0.7999016046524048, -0.767203688621521, -0.5368248224258423, -0.7803267240524292, 0.9646832942962646, -0.4176962375640869, -0.6750672459602356, 0.9807479381561279, 0.8298482894897461, 0.5165174603462219, -0.2567633390426636, 0.8309934139251709, -0.37372103333473206, 0.7885122299194336, -0.5243682861328125, 0.9046217799186707, -0.8269436955451965, 0.044518567621707916, -0.7421802282333374, -0.7655958533287048, -0.15907546877861023, 0.38821443915367126, 0.05059788376092911, 0.10752639174461365, 0.7374796271324158, 0.5918826460838318, 0.08077641576528549, -0.17820890247821808, 0.15032503008842468, 0.10598055273294449, 0.4003852903842926, 0.6996240019798279, 0.6053549647331238, -0.6845110058784485, 0.6780156493186951, -0.2736465632915497, -0.25698429346084595, -0.19886550307273865, -0.850432276725769, -1.3102612495422363, -0.9127611517906189, -0.3397812247276306, -0.33261099457740784, -0.2108462005853653, 1.0012611150741577, 0.8466742634773254, -0.7313776016235352, -0.1834472417831421, -0.20652373135089874, 0.2649138867855072, -0.32201799750328064, -0.2945230305194855, 0.4036349654197693, -0.22806447744369507, -0.7608336210250854, 0.31574705243110657, 0.13413244485855103, 0.16496920585632324, -0.062007512897253036, -0.21245664358139038, -0.28084179759025574, 0.08133045583963394, 0.920352578163147, 0.3156902492046356, -0.5805811882019043, -0.17072828114032745, 0.0795249491930008, 0.13836273550987244, 0.21910734474658966, 0.7192023992538452, -0.7522488832473755, 0.2572595477104187, 0.7773520946502686, 0.2650182247161865, 0.5824589729309082, 0.10441864281892776, 0.5414661765098572, -0.8273372054100037, -0.09475204348564148, 0.2948252856731415, 0.30621376633644104, 0.22575893998146057, -0.177489772439003, 0.5011112093925476, 0.15077313780784607, -0.6249645352363586, -0.9644269347190857, 0.14326798915863037, -1.2660412788391113, -0.3112507462501526, 0.9999005794525146, 0.13128939270973206, -0.11272484064102173, -0.19177702069282532, -0.3976818919181824, 0.20092327892780304, -0.49019110202789307, 0.5929186940193176, 0.5963290929794312, -0.4010162651538849, -0.39797112345695496, -0.7296669483184814, 0.5540328621864319, 0.2750154435634613, -1.056233286857605, -0.05362875014543533, 0.18709756433963776, 0.4351889491081238, 0.4292043149471283, 1.0148677825927734, -0.13213038444519043, 0.28366953134536743, 0.04592413455247879, 0.05168118700385094, -0.3884982466697693, -0.16442003846168518, 0.09204002469778061, 0.24555709958076477, -0.14527058601379395, -0.26015591621398926 ]