Optimización de librería de tensores para aprendizaje automático mediante las extensiones de vectorización del procesador
Tensor library optimization for automatic learning through the vectorial extensions of the processor
Ver/ Abrir
Identificadores
URI: https://hdl.handle.net/10902/33833Registro completo
Mostrar el registro completo DCAutoría
Martínez Arribas, SergioFecha
2024-06Director/es
Derechos
Attribution-NonCommercial-NoDerivatives 4.0 International
Resumen/Abstract
La informática está sufriendo una gran revolución y crecimiento en lo que se respecta a inteligencias artificiales, incorporándolas cada vez a más aspectos de nuestra vida. Uno de los tipos más comunes y usados ahora mismo son los Large Language Models, como puede ser el conocido ChatGPT, capaces de generar lenguaje como si de un humano se tratara.
Sin embargo, estos avances tienen una dificultad, los algoritmos usados en estas aplicaciones requieren grandes requerimientos computacionales y son muy costosos, y por tanto necesitan software optimizado y librerías matemáticas especializadas, como por ejemplo GGML.
La librería GGML es usada en algoritmos de machine learning y aprendizaje automático para tratar de ejecutar de forma eficiente operaciones con tensores en hardware de propósito general. Sin embargo, esta librería es reciente, sufriendo modificaciones constantes, tratando de adaptarse a los cambios en el hardware y los modelos. En este trabajo intentaremos ampliarla para que haga uso de las extensiones x86 para operaciones vectoriales, AVX512 y AMX, que no estaban siendo utilizadas en la librería en la fecha de realización de este TFG. Hacer uso de estas extensiones permitirá, a los procesadores que las incluyan, operar con un mayor número de datos de manera simultánea. Evaluaremos los resultados obtenidos con la herramienta perf, usando la librería a través de aplicaciones como llama.cpp o benchmarks propios.
The computing industry is nowadays suffering a big revolution and growth in the matter of Artificial Intelligences, making them more available in all the aspects of our daily lives. One of the more common and used are the Large Language Models such as the well-known ChatGpt, that can generate words and talks as a human would do.
All of this has a disadvantage, the algorithms used in these applications require a big computational cost, and they need optimized software and specialized mathematic libraries such as GGML.
GGML is a library used by machine learning algorithms and automatic learning that tries to execute efficiently operations with tensors on general purpose hardware. This library is quite new, being constantly modify, adapting to the changes in the models and the hardware. In this work we will try to improve it through the vectorial extensions available in x86 processors, such as AVX512 and AMX, that were not being used at the start of this work. We will evaluate the results with perf, using the library through applications such as llama.cpp or our own benchmarks.