---
title: "We Got Claude to Build CUDA Kernels and teach open models!"
description: "Domain-specific coding tasks like writing optimized CUDA kernels often require capable, expensive frontier models, leading to high operational costs. The upskill tool addresses this challenge by capturing specialized workflows from teacher models such as Claude Opus 4.5 into portable skill files that can be consumed by smaller or locally hosted models. The framework automatically generates input-output test cases from execution traces to benchmark student model accuracy and token efficiency with and without the skill. In an evaluation targeting HuggingFace kernel-builder development, a local GLM-4.7 Flash model improved its pass rate from 40% to 85% when supplied with the generated skill. Measuring token usage across different models remains essential, as skills can lower token consumption for some architectures while introducing unnecessary overhead for others."
---

# We Got Claude to Build CUDA Kernels and teach open models!

[Hugging Face](https://yomu.fyi/company/hugging-face) · ben burtenshaw, shaun smith, merve, Pedro Cuenca · Jan 28, 2026

**Type:** Problem & solution

## Summary

Domain-specific coding tasks like writing optimized CUDA kernels often require capable, expensive frontier models, leading to high operational costs. The upskill tool addresses this challenge by capturing specialized workflows from teacher models such as Claude Opus 4.5 into portable skill files that can be consumed by smaller or locally hosted models. The framework automatically generates input-output test cases from execution traces to benchmark student model accuracy and token efficiency with and without the skill. In an evaluation targeting HuggingFace kernel-builder development, a local GLM-4.7 Flash model improved its pass rate from 40% to 85% when supplied with the generated skill. Measuring token usage across different models remains essential, as skills can lower token consumption for some architectures while introducing unnecessary overhead for others.

## Context

Executing complex domain-specific tasks, such as writing optimized CUDA kernels with PyTorch bindings, typically requires expensive state-of-the-art models like Claude Opus. Deploying these large models repeatedly incurs high inference costs, whereas smaller or local models often lack the specialized knowledge required to perform the tasks accurately on their own.

## Approach / What changed

The upskill tool uses teacher models to generate portable agent skill markdown files and automated test cases from task descriptions or agent traces. It evaluates smaller student models against these test cases both with and without the skill to measure accuracy gains and token consumption changes.

## Takeaways

- The upskill tool evaluates skill effectiveness using a teacher-student framework where teacher models generate assertion test cases to measure task lift on student models.
- Adding an agent skill does not uniformly improve efficiency; some models reduce token consumption while others experience increased token usage without accuracy gains.
- Skills follow a standard agent directory structure ({agent}/skills/{skill\_name}/SKILL.md) and package specialized domain requirements into roughly 500 tokens that load on demand.

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience), [LLMs](https://yomu.fyi/topic/llm), [Testing](https://yomu.fyi/topic/testing)

- Source: [Hugging Face](https://huggingface.co/blog/upskill)
- Source URL: https://huggingface.co/blog/upskill
- Ingested by Yomu: 2026-08-28T04:00:53.554Z

[Read original post](https://huggingface.co/blog/upskill)
