MCPcopy Create free account

hub / github.com/abetlen/llama-cpp-python / functions

Functions1,336 in github.com/abetlen/llama-cpp-python

Functiondecorator
(f)
llama_cpp/llama_cpp_ext.py:26
Functiondecorator
(f: LlamaChatCompletionHandler)
llama_cpp/llama_chat_format.py:157
Methoddefault_params
Get the default llama_model_params.
llama_cpp/_internals.py:242
Methoddefault_params
Get the default llama_context_params.
llama_cpp/_internals.py:462
Methoddesc
(self)
llama_cpp/_internals.py:106
Functiondetokenize
( body: DetokenizeInputRequest, llama_proxy: LlamaProxy = Depends(get_llama_proxy), )
llama_cpp/server/app.py:591
Methoddetokenize
Detokenize the tokens into text. Args: tokens: The list of tokens to detokenize. prev_tokens: The list of previous to
llama_cpp/llama_tokenizer.py:29
Methoddetokenize
( self, tokens: List[int], prev_tokens: Optional[List[int]] = None, special: b
llama_cpp/llama_tokenizer.py:88
Methoddraft
( self, input_ids: np.ndarray, /, *, seq_id: int, max_tokens:
examples/server/server.py:1213
Methoddraft_many
( self, requests: Sequence[Tuple[np.ndarray, int, Optional[int]]], /, )
examples/server/server.py:1818
Methodend_pos
(self)
examples/server/server.py:3867
Methodeval_logits
(self)
llama_cpp/llama.py:589
Methodeval_token_count
(self)
examples/server/server.py:3955
Methodeval_tokens
(self)
llama_cpp/llama.py:585
Methodexact_checkpoints_only
(self)
examples/server/server.py:11752
Methodextend
( self, sequence_id: int, tokens: Sequence[int], position_increments: Optional
examples/server/server.py:1045
Methodfind_first
(s: str, substrs: List[str])
llama_cpp/llama_chat_format.py:3162
Methodfingerprint_file
(path: str)
examples/server/server.py:10433
Functionformat_alpaca
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1084
Functionformat_autotokenizer
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:770
Functionformat_baichuan
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1163
Functionformat_baichuan2
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1147
Functionformat_chatglm3
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1381
Functionformat_chatml
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1343
Functionformat_gemma
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1440
Functionformat_intel
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1253
Functionformat_llama2
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1050
Functionformat_llama3
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1067
Functionformat_mistral_instruct
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1360
Functionformat_mistrallite
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1294
Functionformat_oasst_llama
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1131
Functionformat_open_orca
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1267
Functionformat_openbuddy
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1179
Functionformat_openchat
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1398
Functionformat_phind
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1239
Functionformat_pygmalion
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1327
Functionformat_qwen
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1098
Functionformat_redpajama_incite
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1201
Functionformat_saiga
( messages: list[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1418
Functionformat_snoozy
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1217
Functionformat_tokenizer_config
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:817
Functionformat_zephyr
( messages: List[llama_types.ChatCompletionRequestMessage], **kwargs: Any, )
llama_cpp/llama_chat_format.py:1310
Methodfree
(self)
llama_cpp/server/model.py:68
Methodfree_batch
()
llama_cpp/_internals.py:485
Methodfree_ctx
()
llama_cpp/_internals.py:272
Methodfree_lora_adapter
()
llama_cpp/llama.py:439
Methodfree_model
()
llama_cpp/_internals.py:72
Methodfree_sampler
()
llama_cpp/_internals.py:682
Methodfree_wrapper
(sampler: llama_cpp.llama_sampler_p)
llama_cpp/_internals.py:654
Methodfrom_file
(cls, file: Union[str, Path], verbose: bool = True)
llama_cpp/llama_grammar.py:29
Methodfrom_ggml_file
(cls, path: str)
llama_cpp/llama_tokenizer.py:73
Methodfrom_pretrained
(cls, pretrained_model_name_or_path: str)
llama_cpp/llama_tokenizer.py:109
Methodfrom_pretrained
( cls, repo_id: str, filename: Optional[str], local_dir: Optional[Union[str, o
llama_cpp/llama_chat_format.py:3185
Functionfunctionary_chat_handler
( llama: llama.Llama, messages: List[llama_types.ChatCompletionRequestMessage], functions: Optiona
llama_cpp/llama_chat_format.py:1461
Functionfunctionary_v1_v2_chat_handler
( llama: llama.Llama, messages: List[llama_types.ChatCompletionRequestMessage], functions: Optiona
llama_cpp/llama_chat_format.py:1824
Functionget_chat_completion_handler
(name: str)
llama_cpp/llama_chat_format.py:150
Methodget_dot
()
llama_cpp/llama_grammar.py:541
Methodget_dot
()
examples/server/server.py:382
Methodget_embeddings
(self)
llama_cpp/_internals.py:351
Methodget_embeddings_ith
(self, i: int)
llama_cpp/_internals.py:354
Methodget_embeddings_seq
(self, seq_id: int)
llama_cpp/_internals.py:357
Functionget_event_publisher
( request: Request, inner_send_chan: MemoryObjectSendStream[typing.Any], body: CreateCompletionReq
llama_cpp/server/app.py:191
Functionget_llama_proxy
()
llama_cpp/server/app.py:73
Methodget_logits_ith
(self, i: int)
llama_cpp/_internals.py:348
Functionget_models
( llama_proxy: LlamaProxy = Depends(get_llama_proxy), )
llama_cpp/server/app.py:535
Methodget_recursive_refs
(ks, first_is_optional)
llama_cpp/llama_grammar.py:906
Methodget_recursive_refs
(keys: List[str], first_is_optional: bool)
examples/server/server.py:733
Methodget_route_handler
Defines custom route handler that catches exceptions and formats in OpenAI style error response
llama_cpp/server/errors.py:162
Methodget_seed
(self)
llama_cpp/_internals.py:854
Methodget_state_size
(self)
llama_cpp/_internals.py:315
Methodgrammar_accept_token
(self, grammar: LlamaGrammar, token: int)
llama_cpp/_internals.py:449
Functionguess_chat_format_from_gguf_metadata
(metadata: Dict[str, str])
llama_cpp/llama_chat_format.py:853
Methodhas_attention_budget
(self)
examples/server/server.py:11756
Functionhealthz
()
examples/server/server.py:16332
Functionhf_autotokenizer_to_chat_completion_handler
( pretrained_model_name_or_path: Union[str, os.PathLike[str]], )
llama_cpp/llama_chat_format.py:787
Functionhf_tokenizer_config_to_chat_completion_handler
( tokenizer_config: Dict[str, Any], add_generation_prompt: bool = True, )
llama_cpp/llama_chat_format.py:843
Methodjoin_seq
()
llama_cpp/llama_grammar.py:549
Methodjoin_sequence
()
examples/server/server.py:386
Methodkv_cache_seq_cp
(self, seq_id_src: int, seq_id_dst: int, p0: int, p1: int)
llama_cpp/_internals.py:303
Methodkv_cache_seq_keep
(self, seq_id: int)
llama_cpp/_internals.py:307
Methodkv_cache_seq_shift
(self, seq_id: int, p0: int, p1: int, shift: int)
llama_cpp/_internals.py:311
Methodlast
(self)
llama_cpp/_internals.py:620
Methodlength
(self)
examples/server/server.py:3951
Methodlength
(self)
examples/server/server.py:4140
Functionlist_models
()
examples/server/server.py:16316
Functionllama_adapter_get_alora_invocation_tokens
Get the invocation tokens if the current LoRA is an aLoRA.
llama_cpp/llama_cpp.py:2151
Functionllama_adapter_get_alora_n_invocation_tokens
Get the invocation token count if the current LoRA is an aLoRA.
llama_cpp/llama_cpp.py:2138
Functionllama_adapter_lora_free
(adapter: llama_adapter_lora_p, /)
llama_cpp/llama_cpp.py:2128
Functionllama_adapter_lora_init
( model: llama_model_p, path_lora: bytes, / )
llama_cpp/llama_cpp.py:2036
Functionllama_adapter_meta_count
Get the number of adapter metadata key/value pairs.
llama_cpp/llama_cpp.py:2069
Functionllama_adapter_meta_key_by_index
Get adapter metadata key name by index.
llama_cpp/llama_cpp.py:2086
Functionllama_adapter_meta_val_str
Get adapter metadata value as a string by key name.
llama_cpp/llama_cpp.py:2053
Functionllama_adapter_meta_val_str_by_index
Get adapter metadata value as a string by index.
llama_cpp/llama_cpp.py:2109
Functionllama_add_bos_token
(vocab: llama_vocab_p, /)
llama_cpp/llama_cpp.py:3787
Functionllama_add_eos_token
(vocab: llama_vocab_p, /)
llama_cpp/llama_cpp.py:3804
Functionllama_apply_adapter_cvec
( ctx: llama_context_p, data: CtypesPointerOrRef[ctypes.c_float], len: int, n_embd: int, i
llama_cpp/llama_cpp.py:2246
Functionllama_backend_free
Call once at the end of the program - currently only used for MPI
llama_cpp/llama_cpp.py:1314
Functionllama_backend_init
Initialize the llama + ggml backend Call once at the start of the program
llama_cpp/llama_cpp.py:1284
Functionllama_batch_free
Frees a batch of tokens allocated with llama_batch_init()
llama_cpp/llama_cpp.py:3033
Functionllama_batch_get_one
Return batch for single sequence of tokens NOTE: this is a helper function to facilitate transition to the new batch API - avoid using it
llama_cpp/llama_cpp.py:2988
← previousnext →801–900 of 1,336, ranked by callers