Accelerating Neural Networks for Large Language Models and Graph Processing with Silicon Photonics