|
-
- <!doctype html>
- <html lang="en" class="no-js">
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1">
-
-
-
-
- <link rel="prev" href="../FAQ/">
-
-
- <link rel="next" href="../Tutorials/NativeLibraryConfig/">
-
- <link rel="icon" href="../media/icon128.png">
- <meta name="generator" content="mkdocs-1.4.3, mkdocs-material-9.1.20">
-
-
-
- <title>Contributing Guide - LLamaSharp Documentation</title>
-
-
-
- <link rel="stylesheet" href="../assets/stylesheets/main.eebd395e.min.css">
-
-
- <link rel="stylesheet" href="../assets/stylesheets/palette.ecc896b0.min.css">
-
-
-
-
-
-
-
-
-
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,700,700i%7CFira+Mono:400,400i,700,700i&display=fallback">
- <style>:root{--md-text-font:"Fira Sans";--md-code-font:"Fira Mono"}</style>
-
-
-
- <link rel="stylesheet" href="../css/extra.css?v=14">
-
- <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
-
-
-
-
-
-
- </head>
-
-
-
-
-
-
-
-
-
- <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="white" data-md-color-accent="red">
-
-
-
- <script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
-
- <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
- <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
- <label class="md-overlay" for="__drawer"></label>
- <div data-md-component="skip">
-
-
- <a href="#llamasharp-contributing-guide" class="md-skip">
- Skip to content
- </a>
-
- </div>
- <div data-md-component="announce">
-
- </div>
-
- <div data-md-color-scheme="default" data-md-component="outdated" hidden>
-
- </div>
-
-
-
-
-
-
- <header class="md-header md-header--shadow" data-md-component="header">
- <nav class="md-header__inner md-grid" aria-label="Header">
- <a href=".." title="LLamaSharp Documentation" class="md-header__button md-logo" aria-label="LLamaSharp Documentation" data-md-component="logo">
-
-
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m9 16v-2H6v2h9m3-4v-2H6v2h12Z"/></svg>
-
- </a>
- <label class="md-header__button md-icon" for="__drawer">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
- </label>
- <div class="md-header__title" data-md-component="header-title">
- <div class="md-header__ellipsis">
- <div class="md-header__topic">
- <span class="md-ellipsis">
- LLamaSharp Documentation
- </span>
- </div>
- <div class="md-header__topic" data-md-component="header-topic">
- <span class="md-ellipsis">
-
- Contributing Guide
-
- </span>
- </div>
- </div>
- </div>
-
-
- <form class="md-header__option" data-md-component="palette">
-
-
-
-
- <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="white" data-md-color-accent="red" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
-
- <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5c-.84 0-1.65.15-2.39.42L12 2M3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29L3.34 7m.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14L3.36 17M20.65 7l-1.77 3.79a7.023 7.023 0 0 0-2.38-4.15l4.15.36m-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29L20.64 17M12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44L12 22Z"/></svg>
- </label>
-
-
-
-
-
- <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="blue" data-md-color-accent="blue" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
-
- <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3 3.19.09m3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95 2.06.05m-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31Z"/></svg>
- </label>
-
-
- </form>
-
-
-
-
- <label class="md-header__button md-icon" for="__search">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
- </label>
- <div class="md-search" data-md-component="search" role="dialog">
- <label class="md-search__overlay" for="__search"></label>
- <div class="md-search__inner" role="search">
- <form class="md-search__form" name="search">
- <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
- <label class="md-search__icon md-icon" for="__search">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
- </label>
- <nav class="md-search__options" aria-label="Search">
-
- <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
- </button>
- </nav>
-
- </form>
- <div class="md-search__output">
- <div class="md-search__scrollwrap" data-md-scrollfix>
- <div class="md-search-result" data-md-component="search-result">
- <div class="md-search-result__meta">
- Initializing search
- </div>
- <ol class="md-search-result__list" role="presentation"></ol>
- </div>
- </div>
- </div>
- </div>
- </div>
-
-
- </nav>
-
- </header>
-
- <div class="md-container" data-md-component="container">
-
-
-
-
-
-
- <main class="md-main" data-md-component="main">
- <div class="md-main__inner md-grid">
-
-
-
- <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
- <div class="md-sidebar__scrollwrap">
- <div class="md-sidebar__inner">
-
-
-
- <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
- <label class="md-nav__title" for="__drawer">
- <a href=".." title="LLamaSharp Documentation" class="md-nav__button md-logo" aria-label="LLamaSharp Documentation" data-md-component="logo">
-
-
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m9 16v-2H6v2h9m3-4v-2H6v2h12Z"/></svg>
-
- </a>
- LLamaSharp Documentation
- </label>
-
- <ul class="md-nav__list" data-md-scrollfix>
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href=".." class="md-nav__link">
- Overview
- </a>
- </li>
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../QuickStart/" class="md-nav__link">
- Quick Start
- </a>
- </li>
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Architecture/" class="md-nav__link">
- Architecture
- </a>
- </li>
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../FAQ/" class="md-nav__link">
- FAQ
- </a>
- </li>
-
-
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item md-nav__item--active">
-
- <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
-
-
-
-
-
- <label class="md-nav__link md-nav__link--active" for="__toc">
- Contributing Guide
- <span class="md-nav__icon md-icon"></span>
- </label>
-
- <a href="./" class="md-nav__link md-nav__link--active">
- Contributing Guide
- </a>
-
-
-
- <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
-
-
-
-
-
-
- <label class="md-nav__title" for="__toc">
- <span class="md-nav__icon md-icon"></span>
- Table of contents
- </label>
- <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
-
- <li class="md-nav__item">
- <a href="#the-goal-of-llamasharp" class="md-nav__link">
- The goal of LLamaSharp
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#how-to-compile-the-native-library-from-source" class="md-nav__link">
- How to compile the native library from source
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-a-new-feature-to-llamasharp" class="md-nav__link">
- Add a new feature to LLamaSharp
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#find-the-problem-and-fix-the-bug" class="md-nav__link">
- Find the problem and fix the BUG
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-integrations" class="md-nav__link">
- Add integrations
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-examples" class="md-nav__link">
- Add examples
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-documents" class="md-nav__link">
- Add documents
- </a>
-
- </li>
-
- </ul>
-
- </nav>
-
- </li>
-
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item md-nav__item--nested">
-
-
-
-
- <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
-
-
-
- <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
- Tutorials
- <span class="md-nav__icon md-icon"></span>
- </label>
-
- <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
- <label class="md-nav__title" for="__nav_6">
- <span class="md-nav__icon md-icon"></span>
- Tutorials
- </label>
- <ul class="md-nav__list" data-md-scrollfix>
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Tutorials/NativeLibraryConfig/" class="md-nav__link">
- Customize the native library loading
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Tutorials/Executors/" class="md-nav__link">
- Use executors
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Tutorials/ChatSession/" class="md-nav__link">
- Use ChatSession
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Tutorials/UnderstandLLamaContext/" class="md-nav__link">
- Understand LLamaContext
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Tutorials/GetEmbeddings/" class="md-nav__link">
- Get embeddings
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Tutorials/Quantization/" class="md-nav__link">
- Quantize the model
- </a>
- </li>
-
-
-
-
- </ul>
- </nav>
- </li>
-
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item md-nav__item--nested">
-
-
-
-
- <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
-
-
-
- <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
- Integrations
- <span class="md-nav__icon md-icon"></span>
- </label>
-
- <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
- <label class="md-nav__title" for="__nav_7">
- <span class="md-nav__icon md-icon"></span>
- Integrations
- </label>
- <ul class="md-nav__list" data-md-scrollfix>
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Integrations/semantic-kernel/" class="md-nav__link">
- semantic-kernel integration
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Integrations/kernel-memory/" class="md-nav__link">
- kernel-memory integration
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Integrations/BotSharp.md" class="md-nav__link">
- BotSharp integration
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Integrations/Langchain.md" class="md-nav__link">
- Langchain integration
- </a>
- </li>
-
-
-
-
- </ul>
- </nav>
- </li>
-
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item md-nav__item--nested">
-
-
-
-
- <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" >
-
-
-
- <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
- Examples
- <span class="md-nav__icon md-icon"></span>
- </label>
-
- <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
- <label class="md-nav__title" for="__nav_8">
- <span class="md-nav__icon md-icon"></span>
- Examples
- </label>
- <ul class="md-nav__list" data-md-scrollfix>
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/BatchedExecutorFork/" class="md-nav__link">
- Bacthed executor - multi-output to one input
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/BatchedExecutorGuidance/" class="md-nav__link">
- Batched executor - basic guidance
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/BatchedExecutorRewind/" class="md-nav__link">
- Batched executor - rewinding to an earlier state
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/ChatChineseGB2312/" class="md-nav__link">
- Chinese LLM - with GB2312 encoding
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/ChatSessionStripRoleName/" class="md-nav__link">
- ChatSession - stripping role names
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/ChatSessionWithHistory/" class="md-nav__link">
- ChatSession - with history
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/ChatSessionWithRestart/" class="md-nav__link">
- ChatSession - restarting
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/ChatSessionWithRoleName/" class="md-nav__link">
- ChatSession - Basic
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/CodingAssistant/" class="md-nav__link">
- Coding assistant
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/GetEmbeddings/" class="md-nav__link">
- Get embeddings
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/GrammarJsonResponse/" class="md-nav__link">
- Grammar - json response
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/InstructModeExecute/" class="md-nav__link">
- Instruct executor - basic
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/InteractiveModeExecute/" class="md-nav__link">
- Interactive executor - basic
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/KernelMemory/" class="md-nav__link">
- Kernel memory integration - basic
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/KernelMemorySaveAndLoad/" class="md-nav__link">
- Kernel-memory - save & load
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/LLavaInteractiveModeExecute/" class="md-nav__link">
- LLaVA - basic
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/LoadAndSaveSession/" class="md-nav__link">
- ChatSession - load & save
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/LoadAndSaveState/" class="md-nav__link">
- Executor - save/load state
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/QuantizeModel/" class="md-nav__link">
- Quantization
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/SemanticKernelChat/" class="md-nav__link">
- Semantic-kernel - chat
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/SemanticKernelMemory/" class="md-nav__link">
- Semantic-kernel - with kernel-memory
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/SemanticKernelPrompt/" class="md-nav__link">
- Semantic-kernel - basic
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/StatelessModeExecute/" class="md-nav__link">
- Stateless executor
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../Examples/TalkToYourself/" class="md-nav__link">
- Talk to yourself
- </a>
- </li>
-
-
-
-
- </ul>
- </nav>
- </li>
-
-
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item md-nav__item--nested">
-
-
-
-
- <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" >
-
-
-
- <label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="0">
- API Reference
- <span class="md-nav__icon md-icon"></span>
- </label>
-
- <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
- <label class="md-nav__title" for="__nav_9">
- <span class="md-nav__icon md-icon"></span>
- API Reference
- </label>
- <ul class="md-nav__list" data-md-scrollfix>
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/" class="md-nav__link">
- index
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.adaptercollection/" class="md-nav__link">
- llama.abstractions.adaptercollection
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.icontextparams/" class="md-nav__link">
- llama.abstractions.icontextparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.ihistorytransform/" class="md-nav__link">
- llama.abstractions.ihistorytransform
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.iinferenceparams/" class="md-nav__link">
- llama.abstractions.iinferenceparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.illamaexecutor/" class="md-nav__link">
- llama.abstractions.illamaexecutor
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.illamaparams/" class="md-nav__link">
- llama.abstractions.illamaparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.imodelparams/" class="md-nav__link">
- llama.abstractions.imodelparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.itextstreamtransform/" class="md-nav__link">
- llama.abstractions.itextstreamtransform
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.itexttransform/" class="md-nav__link">
- llama.abstractions.itexttransform
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.loraadapter/" class="md-nav__link">
- llama.abstractions.loraadapter
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.metadataoverride/" class="md-nav__link">
- llama.abstractions.metadataoverride
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.metadataoverrideconverter/" class="md-nav__link">
- llama.abstractions.metadataoverrideconverter
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.tensorsplitscollection/" class="md-nav__link">
- llama.abstractions.tensorsplitscollection
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.abstractions.tensorsplitscollectionconverter/" class="md-nav__link">
- llama.abstractions.tensorsplitscollectionconverter
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.antipromptprocessor/" class="md-nav__link">
- llama.antipromptprocessor
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.alreadypromptedconversationexception/" class="md-nav__link">
- llama.batched.alreadypromptedconversationexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.batchedexecutor/" class="md-nav__link">
- llama.batched.batchedexecutor
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.cannotforkwhilerequiresinferenceexception/" class="md-nav__link">
- llama.batched.cannotforkwhilerequiresinferenceexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.cannotmodifywhilerequiresinferenceexception/" class="md-nav__link">
- llama.batched.cannotmodifywhilerequiresinferenceexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.cannotsamplerequiresinferenceexception/" class="md-nav__link">
- llama.batched.cannotsamplerequiresinferenceexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.cannotsamplerequirespromptexception/" class="md-nav__link">
- llama.batched.cannotsamplerequirespromptexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.conversation/" class="md-nav__link">
- llama.batched.conversation
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.conversationextensions/" class="md-nav__link">
- llama.batched.conversationextensions
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.batched.experimentalbatchedexecutorexception/" class="md-nav__link">
- llama.batched.experimentalbatchedexecutorexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.chatsession-1/" class="md-nav__link">
- llama.chatsession-1
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.chatsession/" class="md-nav__link">
- llama.chatsession
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.common.authorrole/" class="md-nav__link">
- llama.common.authorrole
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.common.chathistory/" class="md-nav__link">
- llama.common.chathistory
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.common.fixedsizequeue-1/" class="md-nav__link">
- llama.common.fixedsizequeue-1
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.common.inferenceparams/" class="md-nav__link">
- llama.common.inferenceparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.common.mirostattype/" class="md-nav__link">
- llama.common.mirostattype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.common.modelparams/" class="md-nav__link">
- llama.common.modelparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarexpectedname/" class="md-nav__link">
- llama.exceptions.grammarexpectedname
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarexpectednext/" class="md-nav__link">
- llama.exceptions.grammarexpectednext
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarexpectedprevious/" class="md-nav__link">
- llama.exceptions.grammarexpectedprevious
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarformatexception/" class="md-nav__link">
- llama.exceptions.grammarformatexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarunexpectedcharaltelement/" class="md-nav__link">
- llama.exceptions.grammarunexpectedcharaltelement
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarunexpectedcharrngelement/" class="md-nav__link">
- llama.exceptions.grammarunexpectedcharrngelement
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarunexpectedendelement/" class="md-nav__link">
- llama.exceptions.grammarunexpectedendelement
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarunexpectedendofinput/" class="md-nav__link">
- llama.exceptions.grammarunexpectedendofinput
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarunexpectedhexcharscount/" class="md-nav__link">
- llama.exceptions.grammarunexpectedhexcharscount
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.grammarunknownescapecharacter/" class="md-nav__link">
- llama.exceptions.grammarunknownescapecharacter
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.llamadecodeerror/" class="md-nav__link">
- llama.exceptions.llamadecodeerror
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.loadweightsfailedexception/" class="md-nav__link">
- llama.exceptions.loadweightsfailedexception
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.exceptions.runtimeerror/" class="md-nav__link">
- llama.exceptions.runtimeerror
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.extensions.icontextparamsextensions/" class="md-nav__link">
- llama.extensions.icontextparamsextensions
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.extensions.imodelparamsextensions/" class="md-nav__link">
- llama.extensions.imodelparamsextensions
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.grammars.grammar/" class="md-nav__link">
- llama.grammars.grammar
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.grammars.grammarrule/" class="md-nav__link">
- llama.grammars.grammarrule
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.ichatmodel/" class="md-nav__link">
- llama.ichatmodel
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamacache/" class="md-nav__link">
- llama.llamacache
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamaembedder/" class="md-nav__link">
- llama.llamaembedder
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamamodel/" class="md-nav__link">
- llama.llamamodel
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamamodelv1/" class="md-nav__link">
- llama.llamamodelv1
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamaparams/" class="md-nav__link">
- llama.llamaparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamaquantizer/" class="md-nav__link">
- llama.llamaquantizer
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamastate/" class="md-nav__link">
- llama.llamastate
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llamatransforms/" class="md-nav__link">
- llama.llamatransforms
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.llavaweights/" class="md-nav__link">
- llama.llavaweights
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.decoderesult/" class="md-nav__link">
- llama.native.decoderesult
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.ggmltype/" class="md-nav__link">
- llama.native.ggmltype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.gpusplitmode/" class="md-nav__link">
- llama.native.gpusplitmode
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamabatch/" class="md-nav__link">
- llama.native.llamabatch
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamabeamsstate/" class="md-nav__link">
- llama.native.llamabeamsstate
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamabeamview/" class="md-nav__link">
- llama.native.llamabeamview
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamachatmessage/" class="md-nav__link">
- llama.native.llamachatmessage
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamacontextparams/" class="md-nav__link">
- llama.native.llamacontextparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamaftype/" class="md-nav__link">
- llama.native.llamaftype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamagrammarelement/" class="md-nav__link">
- llama.native.llamagrammarelement
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamagrammarelementtype/" class="md-nav__link">
- llama.native.llamagrammarelementtype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamakvcacheview/" class="md-nav__link">
- llama.native.llamakvcacheview
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamakvcacheviewcell/" class="md-nav__link">
- llama.native.llamakvcacheviewcell
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamakvcacheviewsafehandle/" class="md-nav__link">
- llama.native.llamakvcacheviewsafehandle
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamaloglevel/" class="md-nav__link">
- llama.native.llamaloglevel
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamamodelkvoverridetype/" class="md-nav__link">
- llama.native.llamamodelkvoverridetype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamamodelmetadataoverride/" class="md-nav__link">
- llama.native.llamamodelmetadataoverride
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamamodelparams/" class="md-nav__link">
- llama.native.llamamodelparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamamodelquantizeparams/" class="md-nav__link">
- llama.native.llamamodelquantizeparams
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamanativebatch/" class="md-nav__link">
- llama.native.llamanativebatch
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamapoolingtype/" class="md-nav__link">
- llama.native.llamapoolingtype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamapos/" class="md-nav__link">
- llama.native.llamapos
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamaropetype/" class="md-nav__link">
- llama.native.llamaropetype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamaseqid/" class="md-nav__link">
- llama.native.llamaseqid
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamatoken/" class="md-nav__link">
- llama.native.llamatoken
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamatokendata/" class="md-nav__link">
- llama.native.llamatokendata
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamatokendataarray/" class="md-nav__link">
- llama.native.llamatokendataarray
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamatokendataarraynative/" class="md-nav__link">
- llama.native.llamatokendataarraynative
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamatokentype/" class="md-nav__link">
- llama.native.llamatokentype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llamavocabtype/" class="md-nav__link">
- llama.native.llamavocabtype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.llavaimageembed/" class="md-nav__link">
- llama.native.llavaimageembed
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.nativeapi/" class="md-nav__link">
- llama.native.nativeapi
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.nativelibraryconfig/" class="md-nav__link">
- llama.native.nativelibraryconfig
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.ropescalingtype/" class="md-nav__link">
- llama.native.ropescalingtype
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.safellamacontexthandle/" class="md-nav__link">
- llama.native.safellamacontexthandle
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.safellamagrammarhandle/" class="md-nav__link">
- llama.native.safellamagrammarhandle
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.safellamahandlebase/" class="md-nav__link">
- llama.native.safellamahandlebase
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.safellamamodelhandle/" class="md-nav__link">
- llama.native.safellamamodelhandle
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.safellavaimageembedhandle/" class="md-nav__link">
- llama.native.safellavaimageembedhandle
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.native.safellavamodelhandle/" class="md-nav__link">
- llama.native.safellavamodelhandle
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.quantizer/" class="md-nav__link">
- llama.quantizer
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.basesamplingpipeline/" class="md-nav__link">
- llama.sampling.basesamplingpipeline
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.defaultsamplingpipeline/" class="md-nav__link">
- llama.sampling.defaultsamplingpipeline
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.greedysamplingpipeline/" class="md-nav__link">
- llama.sampling.greedysamplingpipeline
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.isamplingpipeline/" class="md-nav__link">
- llama.sampling.isamplingpipeline
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.isamplingpipelineextensions/" class="md-nav__link">
- llama.sampling.isamplingpipelineextensions
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.mirostate2samplingpipeline/" class="md-nav__link">
- llama.sampling.mirostate2samplingpipeline
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sampling.mirostatesamplingpipeline/" class="md-nav__link">
- llama.sampling.mirostatesamplingpipeline
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.sessionstate/" class="md-nav__link">
- llama.sessionstate
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.streamingtokendecoder/" class="md-nav__link">
- llama.streamingtokendecoder
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatcompletion/" class="md-nav__link">
- llama.types.chatcompletion
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatcompletionchoice/" class="md-nav__link">
- llama.types.chatcompletionchoice
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatcompletionchunk/" class="md-nav__link">
- llama.types.chatcompletionchunk
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatcompletionchunkchoice/" class="md-nav__link">
- llama.types.chatcompletionchunkchoice
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatcompletionchunkdelta/" class="md-nav__link">
- llama.types.chatcompletionchunkdelta
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatcompletionmessage/" class="md-nav__link">
- llama.types.chatcompletionmessage
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatmessagerecord/" class="md-nav__link">
- llama.types.chatmessagerecord
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.chatrole/" class="md-nav__link">
- llama.types.chatrole
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.completion/" class="md-nav__link">
- llama.types.completion
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.completionchoice/" class="md-nav__link">
- llama.types.completionchoice
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.completionchunk/" class="md-nav__link">
- llama.types.completionchunk
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.completionlogprobs/" class="md-nav__link">
- llama.types.completionlogprobs
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.completionusage/" class="md-nav__link">
- llama.types.completionusage
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.embedding/" class="md-nav__link">
- llama.types.embedding
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.embeddingdata/" class="md-nav__link">
- llama.types.embeddingdata
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/llama.types.embeddingusage/" class="md-nav__link">
- llama.types.embeddingusage
- </a>
- </li>
-
-
-
-
-
-
-
-
-
- <li class="md-nav__item">
- <a href="../xmldocs/logger/" class="md-nav__link">
- logger
- </a>
- </li>
-
-
-
-
- </ul>
- </nav>
- </li>
-
-
-
- </ul>
- </nav>
- </div>
- </div>
- </div>
-
-
-
- <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
- <div class="md-sidebar__scrollwrap">
- <div class="md-sidebar__inner">
-
-
- <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
-
-
-
-
-
-
- <label class="md-nav__title" for="__toc">
- <span class="md-nav__icon md-icon"></span>
- Table of contents
- </label>
- <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
-
- <li class="md-nav__item">
- <a href="#the-goal-of-llamasharp" class="md-nav__link">
- The goal of LLamaSharp
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#how-to-compile-the-native-library-from-source" class="md-nav__link">
- How to compile the native library from source
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-a-new-feature-to-llamasharp" class="md-nav__link">
- Add a new feature to LLamaSharp
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#find-the-problem-and-fix-the-bug" class="md-nav__link">
- Find the problem and fix the BUG
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-integrations" class="md-nav__link">
- Add integrations
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-examples" class="md-nav__link">
- Add examples
- </a>
-
- </li>
-
- <li class="md-nav__item">
- <a href="#add-documents" class="md-nav__link">
- Add documents
- </a>
-
- </li>
-
- </ul>
-
- </nav>
- </div>
- </div>
- </div>
-
-
-
- <div class="md-content" data-md-component="content">
- <article class="md-content__inner md-typeset">
-
-
-
-
- <h1 id="llamasharp-contributing-guide">LLamaSharp Contributing Guide<a class="headerlink" href="#llamasharp-contributing-guide" title="Permanent link"></a></h1>
- <p>Hi, welcome to develop LLamaSharp with us together! We are always open for every contributor and any format of contributions! If you want to maintain this library actively together, please contact us to get the write access after some PRs. (Email: <a href="mailto:AsakusaRinne@gmail.com">AsakusaRinne@gmail.com</a>)</p>
- <p>In this page, we introduce how to make contributions here easily. 😊</p>
- <h2 id="the-goal-of-llamasharp">The goal of LLamaSharp<a class="headerlink" href="#the-goal-of-llamasharp" title="Permanent link"></a></h2>
- <p>At the beginning, LLamaSharp is a C# binding of <a href="https://github.com/ggerganov/llama.cpp">llama.cpp</a>. It provided only some wrappers for llama.cpp to let C#/.NET users could run LLM models on their local device efficiently even if without any experience with C++. After around a year of development, more tools and integrations has been added to LLamaSharp, significantly expanding the application of LLamaSharp. Though llama.cpp is still the only backend of LLamaSharp, the goal of this repository is more likely to be an efficient and easy-to-use library of LLM inference, rather than just a binding of llama.cpp.</p>
- <p>In this way, our development of LLamaSharp is divided into two main directions:</p>
- <ol>
- <li>To make LLamaSharp more efficient. For example, <code>BatchedExecutor</code> could accept multiple queries and generate the response for them at the same time, which significantly improves the throughput. This part is always related with native APIs and executors in LLamaSharp.</li>
- <li>To make it easier to use LLamaSharp. We believe the best library is to let users build powerful functionalities with simple code. Higher-level APIs and integrations with other libraries are the key points of it.</li>
- </ol>
- <h2 id="how-to-compile-the-native-library-from-source">How to compile the native library from source<a class="headerlink" href="#how-to-compile-the-native-library-from-source" title="Permanent link"></a></h2>
- <p>If you want to contribute to the first direction of our goal, you may need to compile the native library yourself.</p>
- <p>Firstly, please follow the instructions in <a href="https://github.com/ggerganov/llama.cpp#build">llama.cpp readme</a> to configure your local environment. Most importantly, CMake with version higher than 3.14 should be installed on your device.</p>
- <p>Secondly, clone the llama.cpp repositories. You could manually clone it and checkout to the right commit according to <a href="https://github.com/SciSharp/LLamaSharp?tab=readme-ov-file#map-of-llamasharp-and-llama.cpp-versions">Map of LLamaSharp and llama.cpp versions</a>, or use clone the submodule of LLamaSharp when cloning LLamaSharp.</p>
- <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>git<span class="w"> </span>clone<span class="w"> </span>--recursive<span class="w"> </span>https://github.com/SciSharp/LLamaSharp.git
- </code></pre></div></td></tr></table></div>
- <p>If you want to support cublas in the compilation, please make sure that you've installed it. If you are using Intel CPU, please check the highest AVX (<a href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">Advanced Vector Extensions</a>) level that is supported by your device.</p>
- <p>As shown in <a href="https://github.com/ggerganov/llama.cpp/blob/master/CMakeLists.txt">llama.cpp cmake file</a>, there are many options that could be enabled or disabled when building the library. The following ones are commonly used when using it as a native library of LLamaSharp.</p>
- <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 1</span>
- <span class="normal"> 2</span>
- <span class="normal"> 3</span>
- <span class="normal"> 4</span>
- <span class="normal"> 5</span>
- <span class="normal"> 6</span>
- <span class="normal"> 7</span>
- <span class="normal"> 8</span>
- <span class="normal"> 9</span>
- <span class="normal">10</span>
- <span class="normal">11</span>
- <span class="normal">12</span>
- <span class="normal">13</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="n">option</span><span class="p">(</span><span class="n">BUILD_SHARED_LIBS</span><span class="w"> </span><span class="s">"build shared libraries"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Please always enable it </span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_NATIVE</span><span class="w"> </span><span class="s">"llama: enable -march=native flag"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Could be disabled</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_AVX</span><span class="w"> </span><span class="s">"llama: enable AVX"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if the highest supported avx level is AVX</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_AVX2</span><span class="w"> </span><span class="s">"llama: enable AVX2"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if the highest supported avx level is AVX2</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_AVX512</span><span class="w"> </span><span class="s">"llama: enable AVX512"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if the highest supported avx level is AVX512</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_BLAS</span><span class="w"> </span><span class="s">"llama: use BLAS"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if you want to use BLAS library to acclerate the computation on CPU</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_CUDA</span><span class="w"> </span><span class="s">"llama: use CUDA"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if you have CUDA device</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_CLBLAST</span><span class="w"> </span><span class="s">"llama: use CLBlast"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if you have a device with CLBLast or OpenCL support, for example, some AMD GPUs.</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_VULKAN</span><span class="w"> </span><span class="s">"llama: use Vulkan"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if you have a device with Vulkan support</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_METAL</span><span class="w"> </span><span class="s">"llama: use Metal"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Enable it if you are using a MAC with Metal device.</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_BUILD_TESTS</span><span class="w"> </span><span class="s">"llama: build tests"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Please disable it.</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_BUILD_EXAMPLES</span><span class="w"> </span><span class="s">"llama: build examples"</span><span class="p">)</span><span class="w"> </span><span class="c1">// Please disable it.</span>
- <span class="n">option</span><span class="p">(</span><span class="n">LLAMA_BUILD_SERVER</span><span class="w"> </span><span class="s">"llama: build server example"</span><span class="p">)</span><span class="c1">// Please disable it.</span>
- </code></pre></div></td></tr></table></div>
- <p>Most importantly, <code>-DBUILD_SHARED_LIBS=ON</code> must be added to the cmake instruction and other options depends on you. For example, when building with cublas but without openblas, use the following instruction:</p>
- <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
- <span class="normal">2</span>
- <span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><code>mkdir<span class="w"> </span>build<span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="nb">cd</span><span class="w"> </span>build
- cmake<span class="w"> </span>..<span class="w"> </span>-DLLAMA_CUBLAS<span class="o">=</span>ON<span class="w"> </span>-DBUILD_SHARED_LIBS<span class="o">=</span>ON
- cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Release
- </code></pre></div></td></tr></table></div>
- <p>Now you could find the <code>llama.dll</code>, <code>libllama.so</code> or <code>llama.dylib</code> in your build directory (or <code>build/bin</code>). </p>
- <p>To load the compiled native library, please add the following code to the very beginning of your code.</p>
- <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="n">NativeLibraryConfig</span><span class="p">.</span><span class="n">Instance</span><span class="p">.</span><span class="n">WithLibrary</span><span class="p">(</span><span class="s">"<Your native library path>"</span><span class="p">);</span>
- </code></pre></div></td></tr></table></div>
- <h2 id="add-a-new-feature-to-llamasharp">Add a new feature to LLamaSharp<a class="headerlink" href="#add-a-new-feature-to-llamasharp" title="Permanent link"></a></h2>
- <p>After refactoring the framework in <code>v0.4.0</code>, LLamaSharp will try to maintain the backward compatibility. However, in the following cases a breaking change will be required:</p>
- <ol>
- <li>Due to some break changes in <a href="https://github.com/ggerganov/llama.cpp">llama.cpp</a>, making a breaking change will help to maintain the good abstraction and friendly user APIs.</li>
- <li>An important feature cannot be implemented unless refactoring some parts.</li>
- <li>After some discussions, an agreement was reached that making the break change is reasonable.</li>
- </ol>
- <p>If a new feature could be added without introducing any break change, please <strong>open a PR</strong> rather than open an issue first. We will never refuse the PR but help to improve it, unless it's malicious.</p>
- <p>When adding the feature, please take care of the namespace and the naming convention. For example, if you are adding an integration for WPF, please put the code under namespace <code>LLama.WPF</code> or <code>LLama.Integration.WPF</code> instead of putting it under the root namespace. The naming convention of LLamaSharp follows the pascal naming convention, but in some parts that are invisible to users, you can do whatever you want.</p>
- <h2 id="find-the-problem-and-fix-the-bug">Find the problem and fix the BUG<a class="headerlink" href="#find-the-problem-and-fix-the-bug" title="Permanent link"></a></h2>
- <p>If the issue is related to the LLM internal behaviour, such as endless generating the response, the best way to find the problem is to do comparison test between llama.cpp and LLamaSharp.</p>
- <p>You could use exactly the same prompt, the same model and the same parameters to run the inference in llama.cpp and LLamaSharp respectively to see if it's really a problem caused by the implementation in LLamaSharp.</p>
- <p>If the experiment showed that it worked well in llama.cpp but didn't in LLamaSharp, a search for the problem could be started. While the reason of the problem could be various, the best way I think is to add log-print in the code of llama.cpp and use it in LLamaSharp after compilation. Thus, when running LLamaSharp, you could see what happened in the native library.</p>
- <p>During the BUG fix process, please don't hesitate to discuss together when you are blocked.</p>
- <h2 id="add-integrations">Add integrations<a class="headerlink" href="#add-integrations" title="Permanent link"></a></h2>
- <p>All kinds of integration are welcomed here! Currently the following integrations have been added but still need improvement:</p>
- <ol>
- <li>semantic-kernel</li>
- <li>kernel-memory</li>
- <li>BotSharp (maintained in SciSharp/BotSharp repo)</li>
- <li>Langchain (maintained in tryAGI/LangChain repo)</li>
- </ol>
- <p>If you find another library that is good to be integrated, please open an issue to let us know!</p>
- <h2 id="add-examples">Add examples<a class="headerlink" href="#add-examples" title="Permanent link"></a></h2>
- <p>There're mainly two ways to add an example:</p>
- <ol>
- <li>Add the example to <code>LLama.Examples</code> of the repository.</li>
- <li>Put the example in another repository and add the link to the readme or docs of LLamaSharp.</li>
- </ol>
- <h2 id="add-documents">Add documents<a class="headerlink" href="#add-documents" title="Permanent link"></a></h2>
- <p>LLamaSharp uses <a href="https://github.com/mkdocs/mkdocs">mkdocs</a> to build the documentation, please follow the tutorial of mkdocs to add or modify documents in LLamaSharp.</p>
-
-
-
-
-
-
- </article>
- </div>
-
-
- </div>
-
- </main>
-
- <footer class="md-footer">
-
- <div class="md-footer-meta md-typeset">
- <div class="md-footer-meta__inner md-grid">
- <div class="md-copyright">
-
-
- Made with
- <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
- Material for MkDocs
- </a>
-
- </div>
-
- </div>
- </div>
- </footer>
-
- </div>
- <div class="md-dialog" data-md-component="dialog">
- <div class="md-dialog__inner md-typeset"></div>
- </div>
-
- <script id="__config" type="application/json">{"base": "..", "features": ["content.action.edit", "navigation.instant"], "search": "../assets/javascripts/workers/search.74e28a9f.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
-
-
- <script src="../assets/javascripts/bundle.220ee61c.min.js"></script>
-
-
- </body>
- </html>
|