CodeBlock: supervisión de código con granularidad estructural

CodeBlock optimiza el ajuste fino de LLMs de código seleccionando bloques estructuralmente completos. Logra mejor rendimiento con solo el 1.9% de tokens

18 jun 2026 • 2 min read • Q2BSTUDIO Team

Cómo CodeBlock optimiza el ajuste fino de LLMs de código

El entrenamiento de modelos de lenguaje especializados en código ha sido tradicionalmente un proceso intensivo en recursos, donde cada token recibe la misma atención durante la supervisión. Sin embargo, investigaciones recientes demuestran que no todos los fragmentos contribuyen igual al aprendizaje. El concepto de supervisión con granularidad estructural prioriza bloques completos y coherentes en lugar de tokens aislados.

CodeBlock propone un ajuste fino supervisado (SFT) que selecciona fragmentos de código completos desde el punto de vista sintáctico y semántico, combinándolos con tokens informativos del lenguaje natural. En lugar de aplicar pérdida uniforme a todo el texto de respuesta, identifica regiones de alto valor dentro del código, preservando la integridad estructural de las instrucciones y las relaciones de flujo de datos.

La clave está en tratar el código como una entidad estructurada: un bloque no es solo una secuencia de caracteres, sino una unidad lógica con definiciones, usos y dependencias. CodeBlock utiliza señales de alcance y puente para priorizar bloques que propagan o conectan dependencias importantes del programa, logrando que el modelo generalice mejor a partir de ejemplos reducidos pero significativos.

Este enfoque mejora el rendimiento en benchmarks de generación de código (pas@1) y reduce drásticamente la cantidad de tokens supervisados, hasta un 1,9% del total. Esto tiene implicaciones profundas para la eficiencia computacional y el coste del entrenamiento, especialmente en entornos empresariales donde los recursos de cómputo son críticos.

En Q2BSTUDIO aplicamos estas técnicas avanzadas para ofrecer soluciones de inteligencia artificial para empresas que sean escalables y rentables. Nuestro equipo integra supervisión selectiva en el desarrollo de software a medida y aplicaciones a medida, asegurando que los modelos se adapten con precisión a las necesidades de cada cliente.

Combinamos estos conocimientos con servicios cloud AWS y Azure para desplegar modelos en entornos optimizados, y con ciberseguridad para proteger los datos sensibles durante el entrenamiento. Nuestros agentes IA se benefician de estos métodos para ofrecer respuestas más coherentes en tareas de automatización. La integración de servicios inteligencia de negocio y Power BI se potencia con modelos que entienden consultas complejas y generan fragmentos de análisis con alta precisión.

CodeBlock representa un paso adelante en la supervisión de modelos de código. Al respetar la estructura intrínseca del software, logramos entrenamientos más inteligentes y menos derrochadores. En Q2BSTUDIO aplicamos estos principios para desarrollar tecnología que realmente marque la diferencia.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.

Live Chat