{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/real-time-open-domain-question-answering-with","title":"Real-Time Open-Domain Question Answering with Dense-Sparse Phrase Index","arxiv_id":"1906.05807","date":"2019-06-13","proceeding":"ACL 2019 7","authors":["Minjoon Seo","Jinhyuk Lee","Tom Kwiatkowski","Ankur P. Parikh","Ali Farhadi","Hannaneh Hajishirzi"],"abstract":"Existing open-domain question answering (QA) models are not suitable for real-time usage because they need to process several long documents on-demand for every input query. In this paper, we introduce the query-agnostic indexable representation of document phrases that can drastically speed up open-domain QA and also allows us to reach long-tail targets. In particular, our dense-sparse phrase encoding effectively captures syntactic, semantic, and lexical information of the phrases and eliminates the pipeline filtering of context documents. Leveraging optimization strategies, our model can be trained in a single 4-GPU server and serve entire Wikipedia (up to 60 billion phrases) under 2TB with CPUs only. Our experiments on SQuAD-Open show that our model is more accurate than DrQA (Chen et al., 2017) with 6000x reduced computational cost, which translates into at least 58x faster end-to-end inference benchmark on CPUs.","url_abs":"https://arxiv.org/abs/1906.05807v2","url_pdf":"https://arxiv.org/pdf/1906.05807v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"real-time-open-domain-question-answering-with","repo_url":"https://github.com/uwnlp/denspi","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"open-domain-question-answering","task_name":"Open-Domain Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1906.05807","atlas_url":"https://app.syntology.ai/?focus=1906.05807","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1906.05807"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uwnlp/denspi","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":2,"ran_violates":1,"ran_honours":4,"unverified":12},"by_repo_kind":{"official":{"samples":19,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"1923fc05163d207d","entry":"convert_to_unicode","repo":"uwnlp/denspi","repo_kind":"official","path":"tokenization.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/tokenization.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1923fc05163d207d"}},{"code_sha256_prefix":"f6c275d6a18330a9","entry":"exact_match_score","repo":"uwnlp/denspi","repo_kind":"official","path":"evaluate-v1.1.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/evaluate-v1.1.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6c275d6a18330a9"}},{"code_sha256_prefix":"2112c433b9c6d343","entry":"f1_score","repo":"uwnlp/denspi","repo_kind":"official","path":"evaluate-v1.1.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/evaluate-v1.1.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2112c433b9c6d343"}},{"code_sha256_prefix":"40e9fee2e0b7e278","entry":"gelu","repo":"uwnlp/denspi","repo_kind":"official","path":"bert.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/bert.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"40e9fee2e0b7e278"}},{"code_sha256_prefix":"c6a80c065d2e4851","entry":"normalize_answer","repo":"uwnlp/denspi","repo_kind":"official","path":"evaluate-v1.1.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/evaluate-v1.1.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6a80c065d2e4851"}},{"code_sha256_prefix":"e7d542062316094a","entry":"warmup_constant","repo":"uwnlp/denspi","repo_kind":"official","path":"optimization.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/optimization.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e7d542062316094a"}},{"code_sha256_prefix":"c58d57224530d17e","entry":"warmup_linear","repo":"uwnlp/denspi","repo_kind":"official","path":"optimization.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/optimization.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c58d57224530d17e"}},{"code_sha256_prefix":"805c7cf81b34cfb8","entry":"adjust","repo":"uwnlp/denspi","repo_kind":"official","path":"open/mips.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/open/mips.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"805c7cf81b34cfb8"}},{"code_sha256_prefix":"13b8c556b20f1352","entry":"compress_metadata","repo":"uwnlp/denspi","repo_kind":"official","path":"post.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/post.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"13b8c556b20f1352"}},{"code_sha256_prefix":"b29057ff0bdfab27","entry":"encode_phrase","repo":"uwnlp/denspi","repo_kind":"official","path":"phrase.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/phrase.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b29057ff0bdfab27"}},{"code_sha256_prefix":"2ce75402d89eabd7","entry":"filter_metadata","repo":"uwnlp/denspi","repo_kind":"official","path":"post.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/post.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2ce75402d89eabd7"}},{"code_sha256_prefix":"c3c09581ddf6a885","entry":"get_logits","repo":"uwnlp/denspi","repo_kind":"official","path":"phrase.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/phrase.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c3c09581ddf6a885"}},{"code_sha256_prefix":"ad8fbb8cb7f3dc0a","entry":"get_sparse_logits","repo":"uwnlp/denspi","repo_kind":"official","path":"phrase.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/phrase.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ad8fbb8cb7f3dc0a"}},{"code_sha256_prefix":"892f4e6b7e006e15","entry":"int8_to_float","repo":"uwnlp/denspi","repo_kind":"official","path":"open/mips.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/open/mips.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"892f4e6b7e006e15"}},{"code_sha256_prefix":"cba1d07a90a46468","entry":"load_backward","repo":"uwnlp/denspi","repo_kind":"official","path":"run_piqa.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/run_piqa.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cba1d07a90a46468"}},{"code_sha256_prefix":"c8956ce86812a6c2","entry":"load_vocab","repo":"uwnlp/denspi","repo_kind":"official","path":"tokenization.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/tokenization.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c8956ce86812a6c2"}},{"code_sha256_prefix":"df3944b07a180cef","entry":"overlap","repo":"uwnlp/denspi","repo_kind":"official","path":"open/mips.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/open/mips.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"df3944b07a180cef"}},{"code_sha256_prefix":"0e5615f8994003cf","entry":"printable_text","repo":"uwnlp/denspi","repo_kind":"official","path":"tokenization.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/tokenization.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0e5615f8994003cf"}},{"code_sha256_prefix":"35f7cddf90dd05d4","entry":"warmup_cosine","repo":"uwnlp/denspi","repo_kind":"official","path":"optimization.py","file_url":"https://github.com/uwnlp/denspi/blob/HEAD/optimization.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35f7cddf90dd05d4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}