Abstract
LLaMA-Annotate is a tool that allows visually inspecting the confidences that a large language model assigns to individual tokens, and the alternative tokens considered for that position. We provide both a simple, non-interactive command-line interface, as well as a more elaborate web application. Besides generally helping to form an intuition about the “thinking” of the LLM, our tool can be used for context-aware spellchecking, or to see how a different prompt or a differently trained LLM can impact the interpretation of a piece of text. The tool can be tried online at https://huggingface.co/spaces/s-t-j/llama-annotate.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
For a demonstration, see https://drive.google.com/file/d/1HEBbuhJL_vrrP8-WpxmdhoUA8GVmcdWo/view?usp=sharing.
- 3.
Code is available at https://version.aalto.fi/gitlab/schulte1/llama-annotate.
- 4.
- 5.
- 6.
References
Brown, T., et al.: Language models are few-shot learners. In: Advances in Neural Information Processing Systems, vol. 33, pp. 1877–1901 (2020)
Lin, B.Y., et al.: The unlocking spell on base LLMs: rethinking alignment via in-context learning. ArXiv preprint (2023)
Meister, C., Pimentel, T., Wiher, G., Cotterell, R.: Locally typical sampling. Trans. Assoc. Comput. Linguist. 11, 102–121 (2023)
Sarti, G., Feldhus, N., Sickert, L., van der Wal, O., Nissim, M., Bisazza, A.: Inseq: an interpretability toolkit for sequence generation models. In: 61st Annual Meeting of the Association for Computational Linguistics, pp. 421–435 (2023)
Touvron, H., et al.: LLaMA 2: open foundation and fine-tuned chat models (2023). arXiv:2307.09288
Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 30 (2017)
Vig, J.: A multiscale visualization of attention in the transformer model. In: 57th Annual Meeting of the Association for Computational Linguistics, pp. 37–42 (2019)
Yun, Z., Chen, Y., Olshausen, B.A., LeCun, Y.: Transformer visualization via dictionary learning: contextualized embedding as a linear superposition of transformer factors. In: Deep Learning Inside Out (DeeLIO) NAACL: The Second Workshop on Knowledge Extraction and Integration for Deep Learning Architectures (2021)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Schultheis, E., John, S.T. (2024). LLaMA-Annotate—Visualizing Token-Level Confidences for LLMs. In: Bifet, A., et al. Machine Learning and Knowledge Discovery in Databases. Research Track and Demo Track. ECML PKDD 2024. Lecture Notes in Computer Science(), vol 14948. Springer, Cham. https://doi.org/10.1007/978-3-031-70371-3_33
Download citation
DOI: https://doi.org/10.1007/978-3-031-70371-3_33
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-70370-6
Online ISBN: 978-3-031-70371-3
eBook Packages: Computer ScienceComputer Science (R0)