arXiv Analytics

Sign in

arXiv:2502.01651 [cs.LG]AbstractReferencesReviewsResources

Fine-tuning LLaMA 2 interference: a comparative study of language implementations for optimal efficiency

Sazzad Hossain, Touhidul Alam Seyam, Avijit Chowdhury, Munis Xamidov, Rajib Ghose, Abhijit Pathak

Published 2025-01-30Version 1

This paper presents a comparative study aimed at optimizing Llama2 inference, a critical aspect of machine learning and natural language processing (NLP). We evaluate various programming languages and frameworks, including TensorFlow, PyTorch, Python, Mojo, C++, and Java, analyzing their performance in terms of speed, memory consumption, and ease of implementation through extensive benchmarking. Strengths and limitations of each approach are highlighted, along with proposed optimization strategies for parallel processing and hardware utilization. Furthermore, we investigate the Mojo SDK, a novel framework designed for large language model (LLM) inference on Apple Silicon, benchmarking its performance against implementations in C, C++, Rust, Zig, Go, and Julia. Our experiments, conducted on an Apple M1 Max, demonstrate Mojo SDK's competitive performance, ease of use, and seamless Python compatibility, positioning it as a strong alternative for LLM inference on Apple Silicon. We also discuss broader implications for LLM deployment on resource-constrained hardware and identify potential directions for future research.

Comments: 11 pages, conference paper. International conference on Artificial Intelligence and Future Civilization
Categories: cs.LG, cs.AI
Related articles: Most relevant | Search more
arXiv:2310.09819 [cs.LG] (Published 2023-10-15)
Optimizing K-means for Big Data: A Comparative Study
arXiv:2501.01785 [cs.LG] (Published 2025-01-03)
Can Synthetic Data be Fair and Private? A Comparative Study of Synthetic Data Generation and Fairness Algorithms
arXiv:2008.12442 [cs.LG] (Published 2020-08-28)
Semi-supervised Learning with the EM Algorithm: A Comparative Study between Unstructured and Structured Prediction