Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Smaller model, sharper insights: How Atos approached structured outputs

Fine-tuned SLMs outperform frontier models on Red Hat OpenShift AI

October 27, 2026
Aditi Saluja Mustafa Eyceoz Marius Kiskemper
Related topics:
Artificial intelligenceAI inference
Related products:
Red Hat OpenShift AI

    Atos, a global Red Hat Partner, recently completed a groundbreaking proof of value (PoV) for a German public sector customer, and what they found challenges conventional AI wisdom: Bigger isn't always better. Using Red Hat OpenShift AI and lean infrastructure, a fine-tuned 1-billion parameter model outperformed GPT-4.1 on a complex real-world task, proving that specialized small language models (SLMs) can act as domain experts.

    When frontier models aren't the answer

    The customer faced a unique set of requirements that made traditional AI solutions impractical:

    Data sovereignty requirements

    As a German public sector organization, they needed self-hosted models only. Cloud-based frontier models were not an option.

    Multilingual complexity

    The data consisted of complex German public social media comments with nuanced language, slang, and spelling variations and a focus on hate speech.

    Beyond RAG's capabilities

    The problem couldn't be solved by simply providing more context through retrieval augmented generation (RAG). The models needed to truly understand and extract structured information.

    Cost and latency sensitivity

    At scale, using frontier models would have been prohibitively expensive and slow.

    Meeting the challenge

    The core challenge is performing structured analysis on vast amounts of unstructured German public social media data with 2 critical goals:

    Goal 1: Structured feature extraction

    Automatically extracting 14 distinct features (entity extractions like persons and locations or linguistic features like slurs, tonality, vulgarity, linguistic markers, spelling errors) into strictly valid JSON format.

    Goal 2: Violence detection

    Accurately identifying calls to action for violence and specific triggers.

    Solution: Synthetic data generation and specialized fine-tuning on OpenShift AI

    The solution leveraged Red Hat's AI framework combining synthetic data generation with targeted fine-tuning:

    Architecture flow

    Here's the logic used for the workflow, with each stage explained in detail below:

    Raw public social media data → SDG structured extraction flow → synthetic dataset → training hub → KFTrainer job on Red Hat OpenShift AI → tuned small models

    • SDG hub: Used an out-of-the-box flow for generating structured insights data. A "teacher" model (GPT-4.1 accessed by API) generated high-quality synthetic training data from the public social media dataset, with specialized prompts for each component.
    • Training hub: Applied supervised fine tuning (SFT) and orthogonal subspace fine tuning (OSFT) algorithms.
    • Model customization: 3 student models were fine-tuned using synthetic data from Phi-4 Mini 3.8B, Qwen 2.5 1.5B, and Qwen 2.5 7B.
    • Development environment: OpenShift AI with Workbenches and Jupyter notebooks served as the core IDE for both data generation and model training. Training jobs were launched using KFTrainer and Kubeflow SDK.

    Lean infrastructure: High performance without massive hardware

    A major win was proving that high-performance AI doesn't require massive resources.

    • No GPU used for data generation: Teacher LLM accessed by API
    • Training compute: Only 3 NVIDIA L40 GPUs
    • Platform: OpenShift AI for resource scalability and model experimentation

    A custom rubric for rigorous assessment

    A key innovation of the project was developing a custom rubric system specifically designed to measure performance on this complex multilingual task. Rather than relying on generic benchmarks, the team created a domain-specific evaluation framework.

    Custom evaluation data

    The team generated custom eval data that accurately reflected the real-world challenge: German social media comments with all their complexity — slang, spelling variations, contextual nuance, and violent rhetoric. This ensured that model performance metrics would translate directly to production use.

    The 34-point scoring system

    Each model was evaluated on a comprehensive custom rubric totaling 34 points:

    • Information Extraction (28 points): 2 points for each of the 14 correctly extracted features — slurs, tonality, vulgarity, violence triggers, spelling errors, groups, locations, and more. This granular breakdown allowed precise measurement of where models excelled or struggled. Here, 2 points are granted for a completely correct answer, while 1 point was given for a partially correct answer and 0 points for a wrong answer.
    • JSON correctness (3 points): Ensuring output is parsable and all required fields are present — critical for downstream processing. This is binary, so a model output either received 3 points for a correct JSON or 0 for an invalid JSON.
    • Violence detection (3 points): Classification accuracy against a human-validated gold standard. Here, also either 3 or 0 points were given.

    This custom rubric captured what mattered for production: not just accuracy on isolated tasks, but reliable performance across the entire structured extraction pipeline.

    Comprehensive testing scope

    The evaluation covered an impressive range of models and configurations:

    • 27 fine-tuned model variations (3 student models × 9 variations including SFT and OSFT across epochs)
    • 12 base/reference baselines (including NuExtract 2B, 8B, GPT-4.1 and the un-tuned student models — each with different prompting strategies)
    • Total: 39 evaluation runs

    Small models, expert performance

    Before fine-tuning, the base student models struggled with basic structural requirements. The Phi-4 Mini base model produced valid JSON only 1% of the time. After just 1 epoch of fine-tuning, JSON validity jumped to 92% and reached ~99% with further training.

    Outperforming GPT-4.1 on certain tasks

    The results were significant:

    • JSON validity: While GPT-4.1 achieved 96% JSON validity, fine-tuned Phi-4 Mini and Qwen 2.5 7B both reached 99% (see figure 1).
    • Domain-specific tasks: GPT-4.1 scored lower on nuanced German language tasks like adjectives (1.68) and spelling errors (1.86), whereas the customized models matched or exceeded these scores.
    Valid JSON improved to 99%.
    Figure 1: Valid JSON improved to 99%.

    Overall performance on custom rubric

    In summary, evaluation scores (figure 2) included:

    • GPT-4.1 with short prompt: ~29 points
    • Fine-tuned Phi-4 Mini 3.8B: ~30 points (5% improvement over GPT-4.1 baseline)
    • GPT-4.1 with detailed prompt: 30.5 points
    • Fine-tuned Qwen 2.5 7B: 30.8 points (exceeding even the detailed GPT-4.1)
    • All SFT/OSFT variations: Consistent 29-30.8 point range
    Improvements to fine-tuned models were evident from evaluation.
    Figure 2: Improvements to fine-tuned models were evident from evaluation.

    Hard skills mastery

    All fine-tuned models, including the tiny 1.5B-class QWEN 2.5, achieved near-perfect mastery in:

    • JSON formatting
    • Entity extraction
    • Violence detection

    Task difficulty: Extraction vs. understanding

    The custom evaluation data revealed important insights about different types of AI tasks:

    • Interpretative tasks are hard: Across all models, interpretative tasks like determining tonality and generating a summary were significantly more challenging than entity extraction. This highlights a fundamental difference between recognizing concrete information and understanding contextual nuance.
    • Extraction vs. understanding gap: NuExtract, a model specifically designed for extraction, demonstrated this pattern clearly — performing strongly on concrete entities (companies, persons, locations) but dropping significantly on contextual tasks like summary and tonality. Fine-tuned models, however, excelled at both types of tasks, demonstrating true domain understanding rather than pattern matching.

    Why fine-tuning changes everything

    There were some surprises that nobody expected in the findings.

    From 1% to 99%: The power of domain-specific training

    Before fine-tuning, the Phi-4 Mini base model produced valid JSON only 1% of the time. After tuning, it reached 99% validity. This dramatic improvement demonstrates how fine-tuning embeds desired behaviors directly into model weights, creating reliable, production-ready systems.

    Custom evaluation frameworks matter

    Generic benchmarks don't capture domain-specific requirements. By creating a custom rubric system and custom eval data, the team could accurately measure what mattered for production: multilingual extraction accuracy, structured output reliability, and contextual understanding. This evaluation approach revealed performance differences that standard benchmarks would miss.

    Lean infrastructure requirements enable production deployment

    Tuning small models required only modest infrastructure — 3 GPUs maximum. This isn't just about cost savings during training. It means:

    • Rapid iteration cycles
    • Accessible experimentation for domain experts
    • Practical on-premises deployment
    • Lower barriers to customization

    Compare this to the massive compute required for training or even running frontier models at scale. Especially when running at scale, the small models excel as they require even less infrastructure, once tuned.

    The agentic use case

    These insights extend directly to agentic use cases, where the advantages become even more pronounced:

    Agents demand consistent, schema-aligned behavior, not general intelligence. In multi-agent systems, reliability trumps versatility. An agent that produces valid JSON 99% of the time instead of 96% of the time is the difference between a production system and a prototype. An agentic workflow requires predictable, structured output that can be reliably parsed and processed by downstream components.

    Agents are heavily orchestrated around narrow tasks. Most agentic use cases involve specialized roles—data extraction, classification, validation, transformation. In these orchestrated workflows, most of a large model's general capability remains unused. You're paying for billions of parameters when you only need millions, fine-tuned for your specific task.

    As AI systems evolve toward multi-agent architectures, the winning approach won't be deploying GPT-4 clones for every task. It will be orchestrating ensembles of small, fine-tuned models — each an expert in its narrow domain, running efficiently on modest hardware, producing reliable structured outputs. The agentic future is small and specialized.

    This PoV demonstrated exactly that: Specialized models acting as expert agents, producing consistent structured data, deployed on lean infrastructure, with better domain performance than general-purpose frontier models.

    Strategic impact

    This project demonstrates several critical advantages for organizations with similar requirements:

    Data sovereignty and security

    By using specialized SLMs that can be deployed on-premises with OpenShift AI, organizations maintain complete control over sensitive data — essential for public sector and regulated industries. In these areas it is often simply not allowed to use models hosted publicly with an API. Here, specialized SLMs open a door that was previously completely shut.

    Efficiency and cost

    AI costs are rising, but this method utilizes reduced resource consumption to enable local deployment, and a significantly lower inference costs at scale. The result? Faster response times compared to API-based frontier models.

    Robustness and performance

    There are specific advantages you can put to use to optimize your AI workflows:

    • Domain-specific fine-tuning increases model robustness
    • Enables complex, agent-based solutions
    • More reliable structured output for downstream processing

    Competitive advantage

    For resource-constrained, on-premises environments, specialized SLMs are far more valuable than large generalist models. They provide expert-level performance in specific domains without the overhead.

    Key takeaways

    • Custom evaluation frameworks reveal true performance: Domain-specific rubrics and eval data capture what generic benchmarks miss.
    • Customization beats scale for specific use cases: A 1B parameter model, when properly fine-tuned, can outperform 100B+ parameter frontier models in domain-specific tasks.
    • Modest hardware requirements: High-performance model training on OpenShift AI required only 3 GPUs — making customization accessible and practical. For SLM-inference, the requirements are even lower.
    • Synthetic data generation is powerful: Using a teacher model to generate high-quality training data from public social media datasets enables rapid customization without extensive manual annotation.
    • Data sovereignty is achievable: Organizations with strict data residency requirements can achieve state-of-the-art results with self-hosted solutions.
    • The agentic future is specialized: Multi-agent systems benefit more from small, reliable, task-specific models than general-purpose frontier models.

    What's next?

    This successful PoV opens the door for production deployment and expansion to additional use cases where data sovereignty, multilingual complexity, and cost efficiency are paramount. The principles demonstrated here—fine-tuning small models on Red Hat OpenShift AI for specific tasks—provide a blueprint for building reliable, efficient agentic systems.

    Interested in learning more about the specific methodology, datasets, or reproducing these results? Reach out to discuss how specialized small language models might solve your organization's unique AI challenges.

    Related Posts

    • Build an AI matching engine with Docling, Granite & OpenShift AI

    • Distributed training on OpenShift AI 3.4 with Kubeflow Trainer v2

    • Orchestrate production RAG with OpenShift AI

    • Run LoRA fine-tuning on Red Hat OpenShift AI with Ray

    Recent Posts

    • Deploying third-party applications to Red Hat OpenShift: Common pitfalls and how to avoid them

    • Smaller model, sharper insights: How Atos approached structured outputs

    • Apache Camel tool calling: LLM integrations with bounded loops

    • Red Hat Lightspeed advisor self-managed for air-gapped clusters

    • What's new in Red Hat build of Podman Desktop 1.2

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI