Skip to content

Research Articles

Context Budgets for Foundation Model Inference: Baseline Load

Emil Wrenford (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing)

Vol. 8 No. 1 (2024) · pp. 43–53 · Published 9 May 2024

Abstract

Under steady demand with isolated exceptions, we construct a synthetic comparison between allocating context according to estimated relevance and position and retaining the first tokens up to a fixed limit. Each configuration is evaluated on the same 240 cases. In the 60 stress cases, needed evidence must appear late and compete with near duplicates; difficult cases are separated by ordinary intervals rather than grouped into bursts. A case counts as a pass only if it meets this criterion: the model must answer the held-out question with the correct supporting span. The comparison holds the training and selection splits fixed across alternatives; evaluation cases are not reused for tuning. Compute or memory assigned to an alternative counts toward its budget even if training does not finish. Across the full set, 177 cases meet the criterion with the first configuration and 169 with the second. The stress cases account for 43 and 39 passes, respectively. The stress results should be read alongside the full-set results rather than treated as a general performance guarantee. The practical trade-off is that aggressive selection can drop premises that are individually uninformative. The paired design makes the comparison interpretable within the fixture. It does not establish the size of the effect in an independent deployment.

Keywords: foundation models, attention, long context, baseline load, synthetic evaluation

References

  1. Aminabadi, R. Y., et al. (2022). DeepSpeed-Inference: Enabling efficient inference of transformer models at unprecedented scale. Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, Article 46.
  2. Chen, S., Wong, S., Chen, L., & Tian, Y. (2023). Extending context window of large language models via positional interpolation. arXiv:2306.15595.
  3. Chen, Y., et al. (2023). LongLoRA: Efficient fine-tuning of long-context large language models. arXiv:2309.12307.
  4. Dai, D., et al. (2023). Why can GPT learn in-context? Language models implicitly perform gradient descent as meta-optimizers. Findings of ACL.
  5. Kandpal, N., Deng, H., Roberts, A., Wallace, E., & Raffel, C. (2022). Large language models struggle to learn long-tail knowledge. arXiv:2211.08411.
  6. Liu, N. F., et al. (2023). Lost in the middle: How language models use long contexts. arXiv:2307.03172.
  7. Mohtashami, A., & Jaggi, M. (2023). Landmark attention: Random-access infinite context length for transformers. arXiv:2305.16300.
  8. Peng, B., Quesnelle, J., Fan, H., & Shippole, E. (2023). YaRN: Efficient context window extension of large language models. arXiv:2309.00071.
  9. Ram, O., et al. (2023). In-context retrieval-augmented language models. Transactions of the Association for Computational Linguistics, 11, 1316–1331.
  10. Sheng, Y., et al. (2023). FlexGen: High-throughput generative inference of large language models with a single GPU. Proceedings of the 40th International Conference on Machine Learning, 31094–31116.
  11. Shi, F., et al. (2023). Large language models can be easily distracted by irrelevant context. International Conference on Machine Learning.
  12. Touvron, H., et al. (2023). LLaMA: Open and efficient foundation language models. arXiv:2302.13971.
  13. Wei, J., et al. (2023). Larger language models do in-context learning differently. arXiv:2303.03846.
  14. Wornow, M., et al. (2023). The shaky foundations of large language models and foundation models for electronic health records. npj Digital Medicine, 6, Article 135.
  15. Xiao, G., Tian, Y., Chen, B., Han, S., & Lewis, M. (2023). Efficient streaming language models with attention sinks. arXiv:2309.17453.
  16. Zhang, Z., et al. (2023). H2O: Heavy-hitter oracle for efficient generative inference of large language models. Advances in Neural Information Processing Systems, 36.