Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Simplifying AI with RamaLama and llama-run

December 17, 2024
Eric Curtin
Related topics:
Artificial intelligenceData ScienceDeveloper Productivity
Related products:
Red Hat Enterprise Linux AI

Share:

    In our previous blog post, we introduced the RamaLama project, a bold initiative to make AI development and deployment delightfully boring by leveraging the power of OCI containers. Since then, the RamaLama community has been busy, contributing tools and workflows to simplify AI integration. One of the contributions we’d like to spotlight today is llama-run, a new addition to the llama.cpp ecosystem.
    In this post, we’ll explore how llama-run aligns with RamaLama’s vision of effortless AI workflows, enabling developers to work with large language models (LLMs) straightforwardly and intuitively.

    What Is llama-run?

    The llama-run tool was designed to be a minimal and versatile interface for running LLMs with llama.cpp. While llama.cpp has been widely recognized for its efficient and resource-friendly approach to running LLMs, configuring and invoking these models could sometimes feel daunting—until now.

    With llama-run, we’ve abstracted away much of the complexity, focusing on simplicity and usability. Developers can now load and run models with a single command or fine-tune their configuration through lightweight options. llama-run will power the “ramalama run” command.

    Here’s how it works:

    A Simple Example

    llama-run granite-code

    The above command launches the granite-code model, retrieving it seamlessly from its designated source.

    Need more control? Check out these additional options:

    llama-run --context-size 4096 --verbose llama3

    This flexibility makes llama-run an excellent tool for developers who want to focus on outcomes rather than infrastructure.


    Why llama-run Matters for RamaLama

    The RamaLama project is all about reducing friction in AI workflows. By using OCI containers as the foundation for deploying LLMs, we aim to eliminate the headaches of dependency management, environment setup, and operational inconsistencies. llama-run integrates seamlessly into this philosophy by providing:

    1. Protocol-Agnostic Model Retrieval


      With support for multiple protocols (e.g., hf://, huggingface://, ollama://, https://, or file://), llama-run enables easy integration with your preferred model repositories or local files.
       

    2. Declarative Simplicity


      Whether you’re pulling a model from Hugging Face, Ollama, or a custom endpoint, llama-run simplifies the process:
      llama-run hf://QuantFactory/SmolLM-135M-GGUF/SmolLM-135M.Q2_K.gguf

    3. Interoperability with Containers


      Combined with OCI containerized environments from RamaLama, llama-run becomes a lightweight runtime for deploying and experimenting with LLMs at scale.
       

    4. Debugging Made Easy


      With options like --verbose, llama-run provides detailed logs for debugging, making it easier to iterate on configurations or troubleshoot issues.
       


    Key Features of llama-run

    Here’s a closer look at the features that make llama-run a must-have for AI developers:

    Flexible Model Support

    Run models from a variety of sources with minimal effort. llama-run intelligently handles model retrieval, ensuring you always have access to the resources you need:

    • hf:// (or huggingface://)
    • ollama://
    • file://
    • https://

    If no protocol is specified, llama-run defaults to local files or assumes an Ollama-hosted model. This flexibility ensures compatibility with a wide array of use cases.

    Configurable Context Sizes

    Control the context size to suit your specific requirements:

    llama-run --context-size 4096 some-model

    GPU Optimization

    Leverage GPU acceleration with the --ngl option, giving you the ability to specify the number of GPU layers used:

    llama-run --ngl 999 some-model

    Debugging Options

    Use --verbose to log detailed information during execution, which is invaluable for debugging and profiling:

    llama-run --verbose model-name


    Example Use Cases

    Running a Hugging Face Model

    llama-run hf://bartowski/SmolLM-1.7B-Instruct-v0.2-GGUF/SmolLM-1.7B-Instruct-v0.2-IQ3_M.gguf

    Running an Ollama Model

    llama-run granite-code

    Testing Locally Stored Models

    llama-run some-local-file.gguf "Hello World"

    Stdin support

    git diff | llama-run granite-code "Write a git commit message for this change"

    GPU Acceleration for Performance

    llama-run --ngl 999 my-model.gguf

    Debugging

    llama-run --verbose dev-model.gguf


    llama-run in the RamaLama Ecosystem

    By combining the flexibility of llama-run with the containerized, predictable environments offered by RamaLama, we’re making AI workflows simpler and more productive. Developers can:

    • Quickly prototype AI applications.
    • Standardize deployments across environments.
    • Collaborate easily, sharing configurations and results without worrying about underlying infrastructure.

    This approach empowers teams to focus on creating meaningful applications without being bogged down by the intricacies of model management or deployment.


    What’s Next?

    At Red Hat and in the RamaLama community, we’re continually looking for ways to make AI boring—in the best possible way. Join us by experimenting with RamaLama, contributing to the RamaLama project, or sharing your feedback and use cases. Together, we can make the extraordinary seem routine.

    Let’s keep innovating—one boring AI tool at a time. 🚀

    Disclaimer: Please note the content in this blog post has not been thoroughly reviewed by the Red Hat Developer editorial team. Any opinions expressed in this post are the author's own and do not necessarily reflect the policies or positions of Red Hat.

    Recent Posts

    • Storage considerations for OpenShift Virtualization

    • Upgrade from OpenShift Service Mesh 2.6 to 3.0 with Kiali

    • EE Builder with Ansible Automation Platform on OpenShift

    • How to debug confidential containers securely

    • Announcing self-service access to Red Hat Enterprise Linux for Business Developers

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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
    © 2025 Red Hat

    Red Hat legal and privacy links

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

    Report a website issue