|
Benchmark
| Metric | Facebook Dragon+ | Nvidia Dragon-Multiturn | Cerebras Dragon-DocChat |
| Doc2Dial | Recall@1 | 43.95 | 50.11 | 51.54 |
| Recall@5 | 77.61 | 83.85 | 83.12 | |
| Recall@20 | 92.05 | 95.33 | 95.25 | |
| QuAC | Recall@1 | 62.09 | 60.02 | 61.30 |
| Recall@5 | 86.01 | 86.51 | 87.69 | |
| Recall@20 | 96.48 | 96.60 | 97.25 | |
| QReCC | Recall@1 | 49.00 | 49.43 | 55.41 |
| Recall@5 | 85.14 | 86.6 | 90.11 | |
| Recall@20 | 97.21 | 98.28 | 98.39 | |
| INSCIT* | Recall@1 | 11.13 | 18.35 | 21.65 |
| Recall@5 | 29.27 | 48.45 | 50.72 | |
| Recall@20 | 49.07 | 66.19 | 72.78 | |
| Topiocqa* | Recall@1 | 29.19 | 31.34 | 38.19 |
| Recall@5 | 62.52 | 65.79 | 72.47 | |
| Recall@20 | 83.69 | 84.37 | 87.23 | |
| Average** | Avg top 1 | 49.36 | 54.76 | 58.29 |
| Avg top 5 | 76.30 | 81.50 | 84.19 |
user: {user turn 1}
agent: {agent turn 1}
...
user: {current user turn}1# Demonstration of DocChat retriever in a multi-turn setting
2# The sample documents are from a spec sheet about the Cerebras system & supercomputers
3
4from transformers import AutoTokenizer, AutoModel
5import torch
6
7tokenizer = AutoTokenizer.from_pretrained("cerebras/Dragon-DocChat-Query-Encoder")
8query_encoder = AutoModel.from_pretrained("cerebras/Dragon-DocChat-Query-Encoder")
9context_encoder = AutoModel.from_pretrained("cerebras/Dragon-DocChat-Context-Encoder")
10
11documents = []
12documents.append("""
13# Cerebras Wafer-Scale Cluster
14
15The Cerebras Wafer-Scale Cluster (WSC) is a revolutionary technology suite that efficiently handles the enormous computational needs of AI model training. It centers around the CS-3 system, powered by the 3rd generation Wafer-Scale Engine (WSE-3)—the world’s largest AI-optimized processor. The WSC integrates MemoryX for high-capacity, off-chip model weight storage, and SwarmX for effective weight broadcasting and gradient reduction across the cluster. This setup allows the WSC to adeptly train multi-trillion parameter models, achieving near perfect linear-scaled performance and simplifying the complexity seen in traditional distributed computing.
16
17The Cerebras WSE-3 is 46,250 square millimeters of silicon, 4 trillion transistors, 900K cores, 44 GB on-chip memory, and delivers an unparalleled 125 petaFLOPS of AI compute. It surpasses all other processors in AI-optimized cores, memory speed, and on-chip fabric bandwidth.
18""")
19documents.append("""
20## AI Supercomputers
21
22Condor Galaxy (CG), the supercomputer built by G42 and Cerebras, is the simplest and fastest way to build AI models in the cloud. With over 16 ExaFLOPs of AI compute, Condor Galaxy trains the most demanding models in hours rather than days. The terabyte scale MemoryX system natively accommodates 100 billion+ parameter models, making large scale training simple and efficient.
23
24| Cluster | ExaFLOPs | Systems | Memory |
25| -------- | -------- | -------- | ------ |
26| CG1 | 4 | 64 CS-2s | 82 TB |
27| CG2 | 4 | 64 CS-2s | 82 TB |
28| CG3 | 8 | 64 CS-3s | 108 TB |
29""")
30
31
32query = [
33 {"role": "user", "content": "How many cores does a WSE-3 have?"},
34 {"role": "agent", "content": "WSE-3 has 900k cores."},
35 {"role": "user", "content": "What is Condor Galaxy?"}
36]
37
38formatted_query = "\n".join([turn["role"] + ": " + turn["content"] for turn in query]).strip()
39
40query_input = tokenizer(formatted_query, return_tensors='pt')
41ctx_input = tokenizer(documents, padding=True, truncation=True, max_length=512, return_tensors='pt')
42query_emb = query_encoder(**query_input).last_hidden_state[:, 0, :]
43ctx_emb = context_encoder(**ctx_input).last_hidden_state[:, 0, :]
44
45## Compute similarity scores:
46similarities = query_emb.matmul(ctx_emb.transpose(0, 1)) # (1, num_ctx)
47
48## Rank the similarity from highest to lowest
49ranked_results = torch.argsort(similarities, dim=-1, descending=True) # (1, num_ctx)
50
51for i, doc_idx in enumerate(ranked_results[0].tolist()):
52 print(f"Rank {i}th document:")
53 print("-" * 80)
54 print(documents[doc_idx])
55 print()
56@article{lin_dragon_2023,
title = How to Train Your DRAGON: Diverse Augmentation Towards Generalizable Dense Retrieval,
url = {https://arxiv.org/abs/2302.07452},
publisher = {arXiv},
journal = {arXiv e-print 2302.07452},
author = {Sheng-Chieh Lin, Akari Asai, Minghan Li, Barlas Oguz, Jimmy Lin, Yashar Mehdad, Wen-tau Yih, Xilun Chen},
year = {2023},
}
@inproceedings{feng2020doc2dial,
title={doc2dial: A Goal-Oriented Document-Grounded Dialogue Dataset},
author={Feng, Song and Wan, Hui and Gunasekara, Chulaka and Patel, Siva and Joshi, Sachindra and Lastras, Luis},
booktitle={Proceedings of the 2020 Conference on EMNLP},
year={2020}
}
@inproceedings{choi2018quac,
title={QuAC: Question Answering in Context},
author={Choi, Eunsol and He, He and Iyyer, Mohit and Yatskar, Mark and Yih, Wen-tau and Choi, Yejin and Liang, Percy and Zettlemoyer, Luke},
booktitle={Proceedings of the 2018 Conference on EMNLP},
year={2018}
}
@inproceedings{anantha2021open,
title={Open-Domain Question Answering Goes Conversational via Question Rewriting},
author={Anantha, Raviteja and Vakulenko, Svitlana and Tu, Zhucheng and Longpre, Shayne and Pulman, Stephen and Chappidi, Srinivas},
booktitle={Proceedings of the 2021 Conference on NAACL},
year={2021}
}
@article{adlakha2022topiocqa,
title={TopiOCQA: Open-domain Conversational Question Answering with Topic Switching},
author={Adlakha, Vaibhav and Dhuliawala, Shehzaad and Suleman, Kaheer and de Vries, Harm and Reddy, Siva},
journal={Transactions of the Association for Computational Linguistics},
year={2022}
}
@article{wu2023inscit,
title={InSCIt: Information-Seeking Conversations with Mixed-Initiative Interactions},
author={Wu, Zeqiu and Parish, Ryu and Cheng, Hao and Min, Sewon and Ammanabrolu, Prithviraj and Ostendorf, Mari and Hajishirzi, Hannaneh},
journal={Transactions of the Association for Computational Linguistics},
year={2023}
}