Spaces:
Runtime error
Runtime error
File size: 1,841 Bytes
4bdb245 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
---
title: API Reference
---
## High Level API
High-level Python bindings for llama.cpp.
::: llama_cpp.Llama
options:
members:
- __init__
- tokenize
- detokenize
- reset
- eval
- sample
- generate
- create_embedding
- embed
- create_completion
- __call__
- create_chat_completion
- create_chat_completion_openai_v1
- set_cache
- save_state
- load_state
- token_bos
- token_eos
- from_pretrained
show_root_heading: true
::: llama_cpp.LlamaGrammar
options:
members:
- from_string
- from_json_schema
::: llama_cpp.LlamaCache
options:
show_root_heading: true
::: llama_cpp.LlamaState
options:
show_root_heading: true
::: llama_cpp.LogitsProcessor
options:
show_root_heading: true
::: llama_cpp.LogitsProcessorList
options:
show_root_heading: true
::: llama_cpp.StoppingCriteria
options:
show_root_heading: true
::: llama_cpp.StoppingCriteriaList
options:
show_root_heading: true
## Low Level API
Low-level Python bindings for llama.cpp using Python's ctypes library.
::: llama_cpp.llama_cpp
options:
show_if_no_docstring: true
# filter only members starting with `llama_`
filters:
- "^llama_"
::: llama_cpp.llama_cpp
options:
show_if_no_docstring: true
show_root_heading: false
show_root_toc_entry: false
heading_level: 4
# filter only members starting with `LLAMA_`
filters:
- "^LLAMA_"
## Misc
::: llama_cpp.llama_types
options:
show_if_no_docstring: true |