Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abetlen/llama-cpp-python
/ functions
Functions
1,336 in github.com/abetlen/llama-cpp-python
⨍
Functions
1,336
◇
Types & classes
256
↳
Endpoints
95
Method
__init__
(self, scheduler: CompletionScheduler)
examples/server/server.py:12617
Method
__init__
( self, model: Model, sequence_cache: Optional[SequenceCache] = None, )
examples/server/server.py:13087
Method
__init__
(self, scheduler: CompletionScheduler)
examples/server/server.py:15464
Method
__init__
(self, params: GptParams)
examples/low_level_api/low_level_api_chat_cpp.py:26
Method
__init__
(self, pattern)
examples/low_level_api/util.py:14
Method
__init__
(self, size, default=0)
examples/low_level_api/util.py:32
Method
__iter__
(self)
llama_cpp/server/model.py:64
Method
__setitem__
( self, key: Sequence[int], value: "llama_cpp.llama.LlamaState" )
llama_cpp/llama_cache.py:43
Method
__setitem__
(self, key: Sequence[int], value: "llama_cpp.llama.LlamaState")
llama_cpp/llama_cache.py:91
Method
__setitem__
(self, key: Sequence[int], value: "llama_cpp.llama.LlamaState")
llama_cpp/llama_cache.py:144
Method
__setitem__
(self, model: str, settings: Union[ModelSettings, str, bytes])
llama_cpp/server/model.py:59
Method
__setstate__
(self, state)
llama_cpp/llama.py:2196
Function
_byref
Type-annotated version of ctypes.byref
llama_cpp/_ctypes_extensions.py:161
Method
_call
(self, prompt: str, stop: Optional[List[str]] = None)
examples/high_level_api/langchain_custom_llm.py:22
Method
_chat_chunk_payload
( *, chunk_id: str, created: int, model: str, index: int, delt
examples/server/server.py:7588
Method
_chat_chunk_payload
( *, chunk_id: str, created: int, model: str, index: int, delt
examples/server/server.py:9758
Function
_ctypes_function_from_names
Decorator for extension functions whose exported symbol name can vary by ABI.
llama_cpp/llama_cpp_ext.py:19
Method
_find_longest_prefix_key
( self, key: Tuple[int, ...], )
llama_cpp/llama_cache.py:28
Method
_from_json
(value: Any)
examples/server/server.py:3497
Method
_identifying_params
(self)
examples/high_level_api/langchain_custom_llm.py:27
Method
_input_ids
(self)
llama_cpp/llama.py:577
Method
_llm_type
(self)
examples/high_level_api/langchain_custom_llm.py:14
Function
_parse_bool_arg
(arg: str | bytes | bool)
llama_cpp/server/cli.py:55
Function
_parse_json_object_arg
(arg: str | bytes)
llama_cpp/server/cli.py:72
Method
_scores
(self)
llama_cpp/llama.py:581
Method
_stream_state_message
(self, *, partial: bool)
examples/server/server.py:7533
Method
accept
(self, ctx_main: LlamaContext, id: int, apply_grammar: bool)
llama_cpp/_internals.py:640
Method
accept
(self, token: int)
llama_cpp/_internals.py:860
Method
accept
(self, seq_id: int, accepted_draft_tokens: int)
examples/server/server.py:2370
Method
add_component
(comp_schema, is_required)
llama_cpp/llama_grammar.py:747
Method
add_component
(component_schema: Dict[str, Any], is_required: bool)
examples/server/server.py:571
Method
add_dry
( self, model: LlamaModel, n_ctx_train: int, dry_multiplier: float, dr
llama_cpp/_internals.py:800
Method
add_grammar_lazy_patterns
( self, model: LlamaModel, grammar: LlamaGrammar, trigger_patterns: List[str],
llama_cpp/_internals.py:759
Method
add_infill
(self, model: LlamaModel)
llama_cpp/_internals.py:839
Method
add_logit_bias
(self, n_vocab: int, logit_bias: Dict[int, float])
llama_cpp/_internals.py:827
Method
add_softmax
(self)
llama_cpp/_internals.py:706
Method
add_temp_ext
(self, t: float, delta: float, exponent: float)
llama_cpp/_internals.py:733
Method
add_top_n_sigma
(self, n: float)
llama_cpp/_internals.py:741
Method
add_xtc
(self, p: float, t: float, min_keep: int, seed: int)
llama_cpp/_internals.py:737
Method
admit_request
(self, request: CompletionRequest)
examples/server/server.py:12703
Method
admit_request
(self, request: CompletionRequest)
examples/server/server.py:12912
Method
apply_wrapper
( sampler: llama_cpp.llama_sampler_p, cur_p: llama_cpp.llama_token_data_array_p,
llama_cpp/_internals.py:648
Method
attention_partitioned
(self)
examples/server/server.py:11760
Function
authenticate
( settings: Settings = Depends(get_server_settings), authorization: Optional[str] = Depends(bearer_sch
llama_cpp/server/app.py:241
Method
batch_rows
(self)
examples/server/server.py:3871
Method
batch_token_count
(self)
examples/server/server.py:13009
Method
cache_size
(self)
llama_cpp/llama_cache.py:25
Method
cache_size
(self)
llama_cpp/llama_cache.py:60
Method
cache_size
(self)
llama_cpp/llama_cache.py:114
Method
can_admit
(self, request: CompletionRequest)
examples/server/server.py:12744
Method
can_admit
(self, request: CompletionRequest)
examples/server/server.py:12814
Method
can_admit
(self, request: CompletionRequest)
examples/server/server.py:12868
Method
can_draft
(self, input_length: int, /, *, seq_id: int)
examples/server/server.py:1180
Method
can_draft
(self, input_length: int, /, *, seq_id: int)
examples/server/server.py:1542
Method
cancel
(self, request_id: str)
examples/server/server.py:13348
Method
cancel_request
()
examples/server/server.py:15600
Method
capture
(match: re.Match[str])
examples/server/server.py:4510
Function
chat_chunk_payloads
( completion_chunk: CompletionChunk, )
examples/server/server.py:16044
Function
chat_completion_handler
( *, llama: llama.Llama, messages: List[llama_types.ChatCompletionRequestMessage],
llama_cpp/llama_chat_format.py:613
Method
chat_handler_with_kwargs
(*args, **kwargs)
llama_cpp/server/model.py:328
Function
chatml_function_calling
( llama: llama.Llama, messages: List[llama_types.ChatCompletionRequestMessage], functions: Optiona
llama_cpp/llama_chat_format.py:4131
Function
clip_free
(ctx: clip_ctx_p, /)
llama_cpp/llava_cpp.py:154
Function
clip_model_load
( fname: bytes, verbosity: Union[c_int, int], / )
llama_cpp/llava_cpp.py:146
Method
clone
(self)
llama_cpp/_internals.py:866
Method
close
(self)
examples/server/server.py:1204
Method
close
(self)
examples/server/server.py:1389
Method
close
(self)
examples/server/server.py:10382
Method
close
(self)
examples/server/server.py:10622
Method
close
(self)
examples/server/server.py:13336
Method
close
(self)
examples/server/server.py:15477
Method
collect_completion
(stream: Iterator[Any])
examples/server/server.py:7885
Method
completion_token_count
(self)
examples/server/server.py:3837
Method
context_length_exceeded
Formatter for context length exceeded error
llama_cpp/server/errors.py:48
Method
copy
( self, source_sequence_id: int, dest_sequence_id: int, source_length: int,
examples/server/server.py:1099
Method
copy_logits
(self, logits: npt.NDArray[np.single])
llama_cpp/_internals.py:548
Method
copy_prompt_state
( self, source_sequence_id: int, dest_sequence_id: int, keep_len: int, )
examples/server/server.py:12800
Method
copy_prompt_state
( self, source_sequence_id: int, dest_sequence_id: int, keep_len: int, )
examples/server/server.py:12843
Method
copy_prompt_state
( self, source_sequence_id: int, dest_sequence_id: int, keep_len: int, )
examples/server/server.py:12950
Method
copy_sequence
( self, source_seq_id: int, dest_seq_id: int, p0: int, p1: int, )
examples/server/server.py:2415
Function
count_query_tokens
( body: TokenizeInputRequest, llama_proxy: LlamaProxy = Depends(get_llama_proxy), )
llama_cpp/server/app.py:576
Method
cp
(self)
llama_cpp/_internals.py:611
Function
create_chat_completion
( request: Request, body: CreateChatCompletionRequest = Body( openapi_examples={ "
llama_cpp/server/app.py:408
Function
create_chat_completion
( # pyright: ignore[reportUnusedFunction] http_request: Request, body: CreateChatCompletionRequest
examples/server/server.py:16009
Function
create_chat_completions
()
examples/batch-processing/server.py:30
Function
create_completion
( request: Request, body: CreateCompletionRequest, )
llama_cpp/server/app.py:303
Function
create_completion
( # pyright: ignore[reportUnusedFunction] http_request: Request, body: CreateCompletionReques
examples/server/server.py:15942
Function
create_embedding
( request: CreateEmbeddingRequest, llama_proxy: LlamaProxy = Depends(get_llama_proxy), )
llama_cpp/server/app.py:366
Function
create_embedding
( # pyright: ignore[reportUnusedFunction] body: CreateEmbeddingRequest, )
examples/server/server.py:15998
Method
create_embedding
Embed a string. Args: input: The utf-8 encoded string to embed. Returns: An embedding object.
llama_cpp/llama.py:1020
Method
create_embedding
( self, payload: CreateEmbeddingRequest, )
examples/server/server.py:13136
Function
create_response
( # pyright: ignore[reportUnusedFunction] http_request: Request, body: CreateResponseRequest,
examples/server/server.py:16087
Method
ctx
(self)
llama_cpp/llama.py:569
Function
ctypes_function
( name: str, argtypes: List[Any], restype: Any, enabled: bool = True )
llama_cpp/_ctypes_extensions.py:143
Method
custom_route_handler
(request: Request)
llama_cpp/server/errors.py:170
Method
decode
( cls, *, request_id: str, seq_id: int, start_pos:
examples/server/server.py:13055
Method
decode_batch
(seq_sizes: List[int])
llama_cpp/llama.py:1108
Method
decode_embedding_batch
()
examples/server/server.py:12232
Method
decoder_pos_up_to
(self, pos: int)
examples/server/server.py:3993
Method
decoder_position_increments
(self)
examples/server/server.py:3879
Function
decorator
(f: F)
llama_cpp/_ctypes_extensions.py:146
← previous
next →
701–800 of 1,336, ranked by callers