This study presents an advanced framework integrating LLAMA_V2, a large language model, into Open Radio Access Network (O-RAN) systems. The focus is on efficient network slicing for various services. Sensors in IoT devices generate continuous data streams, enabling resource allocation through O-RAN’s dynamic slicing and LLAMA_V2’s optimization. LLAMA_V2 was selected for its superior ability to capture complex network dynamics, surpassing traditional AI/ML models. The proposed method combines sophisticated mathematical models with optimization and interfacing techniques to address challenges in resource allocation and slicing. LLAMA_V2 enhances decision making by offering explanations for policy decisions within the O-RAN framework and forecasting future network conditions using a lightweight LSTM model. It outperforms baseline models in key metrics such as latency reduction, throughput improvement, and packet loss mitigation, making it a significant solution for 5G network applications in advanced industries.