|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939 |
-
- <!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="../assets/images/favicon.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="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
- <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
-
-
-
- <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">
-
-
-
- <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="M12 8a3 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 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></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>
-
-
-
- <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="M12 8a3 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 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></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</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: AsakusaRinne@gmail.com)</p>
- <p>In this page, we introduce how to make contributions here easily. 😊</p>
- <h2 id="the-goal-of-llamasharp">The goal of LLamaSharp</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</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>
- <pre><code class="language-shell">git clone --recursive https://github.com/SciSharp/LLamaSharp.git
- </code></pre>
- <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>
- <pre><code class="language-cpp">option(BUILD_SHARED_LIBS "build shared libraries") // Please always enable it
- option(LLAMA_NATIVE "llama: enable -march=native flag") // Could be disabled
- option(LLAMA_AVX "llama: enable AVX") // Enable it if the highest supported avx level is AVX
- option(LLAMA_AVX2 "llama: enable AVX2") // Enable it if the highest supported avx level is AVX2
- option(LLAMA_AVX512 "llama: enable AVX512") // Enable it if the highest supported avx level is AVX512
- option(LLAMA_BLAS "llama: use BLAS") // Enable it if you want to use BLAS library to acclerate the computation on CPU
- option(LLAMA_CUDA "llama: use CUDA") // Enable it if you have CUDA device
- option(LLAMA_CLBLAST "llama: use CLBlast") // Enable it if you have a device with CLBLast or OpenCL support, for example, some AMD GPUs.
- option(LLAMA_VULKAN "llama: use Vulkan") // Enable it if you have a device with Vulkan support
- option(LLAMA_METAL "llama: use Metal") // Enable it if you are using a MAC with Metal device.
- option(LLAMA_BUILD_TESTS "llama: build tests") // Please disable it.
- option(LLAMA_BUILD_EXAMPLES "llama: build examples") // Please disable it.
- option(LLAMA_BUILD_SERVER "llama: build server example")// Please disable it.
- </code></pre>
- <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>
- <pre><code class="language-bash">mkdir build && cd build
- cmake .. -DLLAMA_CUBLAS=ON -DBUILD_SHARED_LIBS=ON
- cmake --build . --config Release
- </code></pre>
- <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>
- <pre><code class="language-cs">NativeLibraryConfig.Instance.WithLibrary("<Your native library path>");
- </code></pre>
- <h2 id="add-a-new-feature-to-llamasharp">Add a new feature to LLamaSharp</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</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</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</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</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": [], "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>
|