TAPEX: Table Pre-training via Learning a Neural SQL Executor

Overview

TAPEX: Table Pre-training via Learning a Neural SQL Executor

The official repository which contains the code and pre-trained models for our paper TAPEX: Table Pre-training via Learning a Neural SQL Executor.

🔥 Updates

  • 2021-08-28: We released the fine-tuned model weights on SQA and WikiTableQuestions!
  • 2021-08-27: We released the code, the pre-training corpus, and the pre-trained TAPEX model weights. Thanks for your patience!
  • 2021-07-16: We released our paper and home page. Check it out!

🏴 󠁶󠁵󠁭󠁡󠁰󠁿 Overview

Paper

In the paper, we present TAPEX (for Table Pre-training via Execution), a conceptually simple and empirically powerful pre-training approach to empower existing generative pre-trained models (e.g., BART in our paper) with table reasoning skills. TAPEX realizes table pre-training by learning a neural SQL executor over a synthetic corpus, which is obtained by automatically synthesizing executable SQL queries.

Fig 1. The schematic illustration of TAPEX. Tables not shown for brevity.

The central point of TAPEX is to train a model to mimic the SQL query execution process over a table. We believe that if a model can be trained to faithfully execute SQL queries, then it must have a deep understanding of table structures and possess an inductive bias towards table structures.

Meanwhile, since the diversity of SQL queries can be guaranteed systemically, and thus a diverse and high-quality pre-training corpus can be automatically synthesized for TAPEX.

Project

This project contains two parts, tapex library and examples to employ it on different table-related applications (e.g., Table Question Answering).

  • For tapex, there is an overview:
|-- common
    |-- dbengine.py # the database engine to return answer for a SQL query
    |-- download.py # download helper for automatic resource
|-- data_utils
    |-- wikisql
        |-- executor.py # the re-implementation of WikiSQL style SQL execution to obtain ground-truth answers in the dataset
    |-- format_converter.py # convert dataset formats into HuggingFace style
    |-- preprocess_binary.py # wrapper for the fairseq preprocess script
    |-- preprocess_bpe.py # wrapper for the BPE preprocess
|-- processor
    |-- table_linearize.py # the class to flatten a table into a linearized form, which should keep consistent during pre-training, fine-tuning and evaluating
    |-- table_truncate.py # the class to truncate a long table into a shorter version to satisfy model's input length limit (e.g., BART can accept at most 1024 tokens)
    |-- table_processor.py # the wrapper for the above two table utility function classes
|-- model_eval.py # evaluate the denotation accuracy of model
|-- model_interface.py # wrap a model interface for interaction based on HubInterface
  • For examples, please refer to here for more details.

⚡️ Quickstart

Prepare Environment

First, you should set up a python environment. This code base has been tested under python 3.x, and we officially support python 3.8.

After installing python 3.8, we strongly recommend you to use virtualenv (a tool to create isolated Python environments) to manage the python environment. You could use following commands to create an environment venv and activate it.

$ python3.8 -m venv venv
$ source venv/bin/activate

Install TAPEX

The main requirements of our code base is fairseq, which may be difficult for beginners to get started in an hour.

However, do not worry, we already wrap all necessary commands for developers. In other words, you do not need to study fairseq to start your journey about TAPEX! You can simply run the following command (in the virtual environment) to use TAPEX:

$ pip install --editable ./

The argument --editable is important for your potential follow-up modification on the tapex library. The command will not only install dependencies, but also install tapex as a library, which can be imported easily.

Use TAPEX

Once tapex is successfully installed, you could go into examples to enjoy fine-tuning TAPEX models and using them on different applications!

🏰 Resource

Pre-training Corpus

Our synthetic pre-training corpus which includes nearly 5,000,000 tuples of (SQL queries, flattened tables, SQL execution results) can be downloaded from here. You can use it for research purpose, but you should be careful about the data license.

Below is an example from the pre-training corpus:

  • The SQL plus flattened Table as INPUT:
select ( select number where number = 4 ) - ( select number where number = 3 ) col : number | date | name | age (at execution) | age (at offense) | race | state | method row 1 : 1 | november 2, 1984 | velma margie barfield | 52 | 45 | white | north carolina | lethal injection row 2 : 2 | february 3, 1998 | karla faye tucker | 38 | 23 | white | texas | lethal injection row 3 : 3 | march 30, 1998 | judias v. buenoano | 54 | 28 | white | florida | electrocution row 4 : 4 | february 24, 2000 | betty lou beets | 62 | 46 | white | texas | lethal injection row 5 : 5 | may 2, 2000 | christina marie riggs | 28 | 26 | white | arkansas | lethal injection row 6 : 6 | january 11, 2001 | wanda jean allen | 41 | 29 | black | oklahoma | lethal injection row 7 : 7 | may 1, 2001 | marilyn kay plantz | 40 | 27 | white | oklahoma | lethal injection row 8 : 8 | december 4, 2001 | lois nadean smith | 61 | 41 | white | oklahoma | lethal injection row 9 : 9 | may 10, 2002 | lynda lyon block | 54 | 45 | white | alabama | electrocution row 10 : 10 | october 9, 2002 | aileen carol wuornos | 46 | 33 | white | florida | lethal injection row 11 : 11 | september 14, 2005 | frances elaine newton | 40 | 21 | black | texas | lethal injection row 12 : 12 | september 23, 2010 | teresa wilson bean lewis | 41 | 33 | white | virginia | lethal injection row 13 : 13 | june 26, 2013 | kimberly lagayle mccarthy | 52 | 36 | black | texas | lethal injection row 14 : 14 | february 5, 2014 | suzanne margaret basso | 59 | 44 | white | texas | lethal injection
  • The SQL Execution Result as OUTPUT:
1.0

Here we want to acknowledge the huge effort of paper On the Potential of Lexico-logical Alignments for Semantic Parsing to SQL Queries, which provides the rich resources of SQL templates for us to synthesize the pre-training corpus. If you are interested, please give a STAR to their repo.

Pre-trained models

The pre-trained models trained on the above pre-training corpus.

Model Description # Params Download
tapex.base 6 encoder and decoder layers 140M tapex.base.tar.gz
tapex.large 12 encoder and decoder layers 400M tapex.large.tar.gz

Fine-tuned Models

We provide fine-tuned model weights and their performance on different datasets below. The following Accuracy (Acc) refers to denotation accuracy computed by our script model_eval.py. Meanwhile, it is worth noting that we need truncating long tables during preprocessing with some randomness. Therefore, we also provide preprocessed datasets for reproducing our experimental results.

Model Dev Acc Test Acc Dataset Download Data Download Model
tapex.large.wtq 58.0 57.2 WikiTableQuestions wtq.preprocessed.zip tapex.large.wtq.tar.gz
tapex.large.sqa 70.7 74.0 SQA sqa.preprocessed.zip tapex.large.sqa.tar.gz
tapex.large.wikisql 89.3 89.2 WikiSQL wikisql.preprocessed.zip tapex.large.wikisql.tar.gz

Given these fine-tuned model weights, you can play with them using the predict mode in examples/tableqa/run_model.py.

For example, you can use the following command and see its log:

$ python examples/tableqa/run_model.py predict --resource-dir ./tapex.large.wtq --checkpoint-name model.pt
2021-08-29 17:39:47 | INFO | __main__ | Receive question as : Greece held its last Summer Olympics in which year?
2021-08-29 17:39:47 | INFO | __main__ | The answer should be : 2004

💬 Citation

If our work is useful for you, please consider citing our paper:

@misc{liu2021tapex,
    title={TAPEX: Table Pre-training via Learning a Neural SQL Executor}, 
    author={Qian Liu and Bei Chen and Jiaqi Guo and Zeqi Lin and Jian-guang Lou},
    year={2021},
    eprint={2107.07653},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

👍 Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

📝 License

Please note that there are TWO LICENSES for code and pre-training corpus. The code and pre-trained models are open-sourced under MIT License, while the pre-training corpus is released under CC BY-SA 4.0.

™️ Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Comments
  • Error preprocessing data for TabFact

    Error preprocessing data for TabFact

    Hi, thank you for sharing your code! I am trying to run your trained model tapex.large on TabFact's test set, and I am pre-processing the file test.jsonl for that. When I run the file python process_tabfact_data.py to do this pre-processing, I get the following error:

    FileNotFoundError: [Errno 2] No such file or directory: 'tapex.large/dict.src.txt'

    I downloaded your preprocessed data from this link (https://github.com/microsoft/Table-Pretraining/releases/download/preprocessed-data/tabfact.preprocessed.zip) but I did not find this file tapex.large/dict.src.txt anywhere.

    Could you please help me solve this? Thank you very much!

    opened by vnik18 15
  • load pretrained model errors

    load pretrained model errors

    Dear authors, Thanks for contributing to the development of table pretraining and release the code.

    When I try to reimplement the code of github,I get a problem of "AttributeError: 'NoneType' object has no attribute 'bpe'". It seems the load_checkpoint_to_cpu return a NoneType when loading the pretrained model.pt. Because state = load_checkpoint_to_cpu(filename, arg_overrides) missing the key "args".

    Could you give any advice?

    opened by airsYuan 15
  • Adding TAPEX to HuggingFace Transformers

    Adding TAPEX to HuggingFace Transformers

    Hi!

    First of all, congratulations on the great paper and results! If you need any help regarding converting the models to the HuggingFace API, let me know. My very first contribution to HuggingFace Transformers was actually TAPAS, the table question answering model from Google. We also create a subsequent table-question answering task on the hub, as well as an inference widget which let's users directly try out TAPAS in the browser.

    We could do the same for TAPEX! TAPEX also looks way simpler as it's a generative model. The only thing required would be to write a conversion script (which I can help you with).

    Also, are you interested in joining the Microsoft organization on the hub?

    Btw, the README is also very comprehensive and well written. Wish more authors did that ;)

    Kind regards,

    Niels ML Engineer @ HuggingFace

    opened by NielsRogge 13
  • GPU memory usage about this model

    GPU memory usage about this model

    Hi, I used 3090 to infer this model(hugging face version) on tabFact now(using test_examples.json file), and I found that my CUDA was out of memory(24G) for both batch inference and single inference. Could you please tell me how much memory I need to fine-tune this model so that I can apply for more instances? Thank you in advance!

    opened by skywalkerzhang 9
  • tapex.base model performance poorly with

    tapex.base model performance poorly with "run_model.py predict"

    Hello,

    I follow the instruction and trained a tapex.base model on wikisql dataset. The "run_model.py eval" reports Denotation Accuracy : 0.879. However when I use ''run_model.py predict" command to perform online prediction, the result is very poor. Is there any thing I can try to sovle this problem?

    Thanks

    Nian

    opened by xienian87 9
  • pretrain dataset error

    pretrain dataset error

    Hi,

    I meet a problem when I want to pretrain a model via your introduction. Error stacks are as follows.

    File "/home/user/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/tasks/translation.py", line 156, in load_langpair_dataset return LanguagePairDataset( File "/home/user/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/data/language_pair_dataset.py", line 232, in __init__ assert len(src) == len( AssertionError: Source and target must contain the same number of examples

    I check the preprocess log, and preprocess log is as follows.

    Namespace(align_suffix=None, alignfile=None, all_gather_list_size=16384, amp=False, amp_batch_retries=2, amp_init_scale=128, amp_scale_window=None, azureml_logging=False, bf16=False, bpe=None, cpu=False, criterion='cross_entropy', dataset_impl='mmap', destdir='dataset/pretrain/bart.base/bin', dict_only=False, empty_cache_freq=0, fp16=False, fp16_init_scale=128, fp16_no_flatten_grads=False, fp16_scale_tolerance=0.0, fp16_scale_window=None, joined_dictionary=False, log_file=None, log_format=None, log_interval=100, lr_scheduler='fixed', memory_efficient_bf16=False, memory_efficient_fp16=False, min_loss_scale=0.0001, model_parallel_size=1, no_progress_bar=False, nwordssrc=-1, nwordstgt=-1, on_cpu_convert_precision=False, only_source=False, optimizer=None, padding_factor=8, plasma_path='/tmp/plasma', profile=False, quantization_config_path=None, reset_logging=False, scoring='bleu', seed=1, source_lang='src', srcdict='bart.base/dict.src.txt', suppress_crashes=False, target_lang='tgt', task='translation', tensorboard_logdir=None, testpref=None, tgtdict='bart.base/dict.tgt.txt', threshold_loss_scale=None, thresholdsrc=0, thresholdtgt=0, tokenizer=None, tpu=False, trainpref='dataset/pretrain/train.bpe', use_plasma_view=False, user_dir=None, validpref='dataset/pretrain/valid.bpe', wandb_project=None, workers=1) [src] Dictionary: 51200 types [src] dataset/pretrain/train.bpe.src: 4949629 sents, 2195465273 tokens, 0.0% replaced by <unk> [src] Dictionary: 51200 types [src] dataset/pretrain/valid.bpe.src: 20000 sents, 8907694 tokens, 0.0% replaced by <unk> [tgt] Dictionary: 51200 types [tgt] dataset/pretrain/train.bpe.tgt: 4946227 sents, 31818856 tokens, 0.0% replaced by <unk> [tgt] Dictionary: 51200 types [tgt] dataset/pretrain/valid.bpe.tgt: 19987 sents, 127668 tokens, 0.0% replaced by <unk> Wrote preprocessed data to dataset/pretrain/bart.base/bin

    The difference between train and valid bpe dataset is due to [num_filtered_EMPTY] filtered when preprocessing dataset. So I am not sure if it is right. I successfully finish process_pretrain_data step, and some problems occur when I run the script run_model.py in tapex/examples/pretrain/ folder.

    Could your please tell me which step is wrong?

    opened by q5s2c1 7
  • Tapex performance on large tables

    Tapex performance on large tables

    Hello team, I've csv files with more than 30K rows and 10 columns. I am in need of your help to understand what is the best way to approach this problem since the table is too large. Is Tapex able to handle large tables or there are work around that I can adapt?

    The first thought that comes into my mind is splitting the huge table into multiple sub-tables(meaning column names will remain the same) and then perform inference on it. The predictions further can be aggregated for final results. Could you please share your expertise on this problem. In general, how are the large tableQA performed, please suggest.

    Additionally, can we list/view the corresponding SQL queries of predicted answers?

    opened by srewai 5
  • fairseq version does not exist

    fairseq version does not exist

    fairseq@git+git://github.com/pytorch/fairseq@801a64683164680562c77b688d9ca77fc3e0cea7 seems to be not existing, could you update another version that is compatible to the code? Thanks a lot!

    opened by Harry-hash 3
  • Label Encoding for fact verifacation over TabFact

    Label Encoding for fact verifacation over TabFact

    The Trained Tapex large model (especially availaible at Huggingface) has 0 label corresponding to Entailed class or 0 label corresponding to Refute class? As by default, the TabFact when loaded through huggingface dataset has 0 corresponding to Refute class. Please tell us this.

    opened by vikxoxo 3
  • I get a bug when I use the fine-tuned model to predict.

    I get a bug when I use the fine-tuned model to predict.

    I download the fine-tuned model and dataset, such as tapex.large.wtq and wtq.preprocess. And I run python examples/tableqa/run_model.py predict --resource-dir ./tapex.large.wtq --checkpoint-name model.pt. Then I get the following bug:

    Traceback (most recent call last):
      File "/data2/huchaowen/Table-Pretraining/examples/tableqa/run_model.py", line 181, in <module>
        predict_demo(args)
      File "/data2/huchaowen/Table-Pretraining/examples/tableqa/run_model.py", line 161, in predict_demo
        answer = demo_interface.predict(question=question,
      File "/data2/huchaowen/Table-Pretraining/tapex/model_interface.py", line 34, in predict
        model_output = self.model.translate(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/hub_utils.py", line 124, in translate
        return self.sample(sentences, beam, verbose, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/hub_utils.py", line 132, in sample
        batched_hypos = self.generate(tokenized_sentences, beam, verbose, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/bart/hub_interface.py", line 107, in generate
        results = super().generate(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/hub_utils.py", line 189, in generate
        translations = self.task.inference_step(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/tasks/fairseq_task.py", line 540, in inference_step
        return generator.generate(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
        return func(*args, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 204, in generate
        return self._generate(sample, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 274, in _generate
        encoder_outs = self.model.forward_encoder(net_input)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 801, in forward_encoder
        return [model.encoder.forward_torchscript(net_input) for model in self.models]
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 801, in <listcomp>
        return [model.encoder.forward_torchscript(net_input) for model in self.models]
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/fairseq_encoder.py", line 55, in forward_torchscript
        return self.forward_non_torchscript(net_input)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/fairseq_encoder.py", line 62, in forward_non_torchscript
        return self.forward(**encoder_input)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/transformer/transformer_encoder.py", line 165, in forward
        return self.forward_scriptable(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/transformer/transformer_encoder.py", line 294, in forward_scriptable
        lr = layer(x, encoder_padding_mask=encoder_padding_mask_out)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
        return forward_call(*input, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/modules/transformer_layer.py", line 351, in forward
        x, _ = self.self_attn(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
        return forward_call(*input, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/modules/multihead_attention.py", line 538, in forward
        return F.multi_head_attention_forward(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/nn/functional.py", line 5160, in multi_head_attention_forward
        attn_output_weights = torch.bmm(q_scaled, k.transpose(-2, -1))
    RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling `cublasSgemmStridedBatched( handle, opa, opb, m, n, k, &alpha, a, lda, stridea, b, ldb, strideb, &beta, c, ldc, stridec, num_batches)`
    

    fairseq==0.12.2, transformers==4.24.0

    opened by jhrsya 2
  • What‘s the training corpus of single GETAR?

    What‘s the training corpus of single GETAR?

    Hi, thanks for your sharing~ Your pretext task designing is very ingenious! But I'm confused about the training corpus' difference between GETAR and GETAR+TAPEX. In this paper, the accuracy of the single GETAR on TabFact is 80.8%. Is it obtained by directly fine-tuning BART on TabFact? If so, why could BART achieve such competitive performance with TAPAS(81%, pre-train on 3.7M tables), since BART isn't typical for table understanding?

    opened by wutianjie 2
Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
An executor that performs image segmentation on fashion items

ClothingSegmenter U2NET fashion image/clothing segmenter based on https://github.com/levindabhi/cloth-segmentation Overview The ClothingSegmenter exec

Jina AI 5 Mar 30, 2022
An executor that loads ONNX models and embeds documents using the ONNX runtime.

ONNXEncoder An executor that loads ONNX models and embeds documents using the ONNX runtime. Usage via Docker image (recommended) from jina import Flow

Jina AI 2 Mar 15, 2022
The official PyTorch implementation of recent paper - SAINT: Improved Neural Networks for Tabular Data via Row Attention and Contrastive Pre-Training

This repository is the official PyTorch implementation of SAINT. Find the paper on arxiv SAINT: Improved Neural Networks for Tabular Data via Row Atte

Gowthami Somepalli 284 Dec 21, 2022
VIMPAC: Video Pre-Training via Masked Token Prediction and Contrastive Learning

This is a release of our VIMPAC paper to illustrate the implementations. The pretrained checkpoints and scripts will be soon open-sourced in HuggingFace transformers.

Hao Tan 74 Dec 3, 2022
Unified Pre-training for Self-Supervised Learning and Supervised Learning for ASR

UniSpeech The family of UniSpeech: UniSpeech (ICML 2021): Unified Pre-training for Self-Supervised Learning and Supervised Learning for ASR UniSpeech-

Microsoft 282 Jan 9, 2023
deep-table implements various state-of-the-art deep learning and self-supervised learning algorithms for tabular data using PyTorch.

deep-table implements various state-of-the-art deep learning and self-supervised learning algorithms for tabular data using PyTorch.

null 63 Oct 17, 2022
ActNN: Reducing Training Memory Footprint via 2-Bit Activation Compressed Training

ActNN : Activation Compressed Training This is the official project repository for ActNN: Reducing Training Memory Footprint via 2-Bit Activation Comp

UC Berkeley RISE 178 Jan 5, 2023
PyTorch implementation of the Transformer in Post-LN (Post-LayerNorm) and Pre-LN (Pre-LayerNorm).

Transformer-PyTorch A PyTorch implementation of the Transformer from the paper Attention is All You Need in both Post-LN (Post-LayerNorm) and Pre-LN (

Jared Wang 22 Feb 27, 2022
Codes to pre-train T5 (Text-to-Text Transfer Transformer) models pre-trained on Japanese web texts

t5-japanese Codes to pre-train T5 (Text-to-Text Transfer Transformer) models pre-trained on Japanese web texts. The following is a list of models that

Kimio Kuramitsu 1 Dec 13, 2021
PyTorch implementation of "Contrast to Divide: self-supervised pre-training for learning with noisy labels"

Contrast to Divide: self-supervised pre-training for learning with noisy labels This is an official implementation of "Contrast to Divide: self-superv

null 55 Nov 23, 2022
[CVPR'21 Oral] Seeing Out of tHe bOx: End-to-End Pre-training for Vision-Language Representation Learning

Seeing Out of tHe bOx: End-to-End Pre-training for Vision-Language Representation Learning [CVPR'21, Oral] By Zhicheng Huang*, Zhaoyang Zeng*, Yupan H

Multimedia Research 196 Dec 13, 2022
Code of our paper "Contrastive Object-level Pre-training with Spatial Noise Curriculum Learning"

CCOP Code of our paper Contrastive Object-level Pre-training with Spatial Noise Curriculum Learning Requirement Install OpenSelfSup Install Detectron2

Chenhongyi Yang 21 Dec 13, 2022
This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CNPs), Neural Processes (NPs), Attentive Neural Processes (ANPs).

The Neural Process Family This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CN

DeepMind 892 Dec 28, 2022
Code and data for "TURL: Table Understanding through Representation Learning"

TURL This Repo contains code and data for "TURL: Table Understanding through Representation Learning". Environment and Setup Data Pretraining Finetuni

SunLab-OSU 63 Nov 23, 2022
Source code and dataset for ACL2021 paper: "ERICA: Improving Entity and Relation Understanding for Pre-trained Language Models via Contrastive Learning".

ERICA Source code and dataset for ACL2021 paper: "ERICA: Improving Entity and Relation Understanding for Pre-trained Language Models via Contrastive L

THUNLP 75 Nov 2, 2022
[ICLR 2021] "CPT: Efficient Deep Neural Network Training via Cyclic Precision" by Yonggan Fu, Han Guo, Meng Li, Xin Yang, Yining Ding, Vikas Chandra, Yingyan Lin

CPT: Efficient Deep Neural Network Training via Cyclic Precision Yonggan Fu, Han Guo, Meng Li, Xin Yang, Yining Ding, Vikas Chandra, Yingyan Lin Accep

null 26 Oct 25, 2022
Implement of "Training deep neural networks via direct loss minimization" in PyTorch for 0-1 loss

This is the implementation of "Training deep neural networks via direct loss minimization" published at ICML 2016 in PyTorch. The implementation targe

Cuong Nguyen 1 Jan 18, 2022
[CVPR2021 Oral] UP-DETR: Unsupervised Pre-training for Object Detection with Transformers

UP-DETR: Unsupervised Pre-training for Object Detection with Transformers This is the official PyTorch implementation and models for UP-DETR paper: @a

dddzg 430 Dec 23, 2022