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 +1 more
1/30/2025
cs.LGcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hossain2025finetuning,
  title  = {Fine-tuning LLaMA 2 interference: a comparative study of language implementations for optimal efficiency},
  author = {Sazzad Hossain and Touhidul Alam Seyam and Avijit Chowdhury and Munis Xamidov and Rajib Ghose and Abhijit Pathak},
  year   = {2025},
  eprint = {2502.01651},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.01651v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.01651.svg)](https://codeofpaper.com/paper/2502.01651)

Discussion