Skip to content

Commit 999d44b

Browse files
jeffrey-fongallenporter
authored andcommitted
update README
1 parent 43b7e8a commit 999d44b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,20 +465,20 @@ llm.create_chat_completion(
465465
```
466466

467467
<details>
468-
<summary>Functionary v2</summary>
468+
<summary>Functionary</summary>
469469

470-
The various gguf-converted files for this set of models can be found [here](https://huggingface.co/meetkai). Functionary is able to intelligently call functions and also analyze any provided function outputs to generate coherent responses. All v2 models of functionary supports **parallel function calling**. You can provide either `functionary-v1` or `functionary-v2` for the `chat_format` when initializing the Llama class.
470+
The various gguf-converted files for this set of models can be found [here](https://huggingface.co/meetkai). Functionary is able to intelligently call functions and also analyze any provided function outputs to generate coherent responses. All v2 models of functionary supports **parallel function calling**. You can provide `functionary` for the `chat_format` when initializing the Llama class.
471471

472472
Due to discrepancies between llama.cpp and HuggingFace's tokenizers, it is required to provide HF Tokenizer for functionary. The `LlamaHFTokenizer` class can be initialized and passed into the Llama class. This will override the default llama.cpp tokenizer used in Llama class. The tokenizer files are already included in the respective HF repositories hosting the gguf files.
473473

474474
```python
475475
from llama_cpp import Llama
476476
from llama_cpp.llama_tokenizer import LlamaHFTokenizer
477477
llm = Llama.from_pretrained(
478-
repo_id="meetkai/functionary-small-v2.2-GGUF",
479-
filename="functionary-small-v2.2.q4_0.gguf",
480-
chat_format="functionary-v2",
481-
tokenizer=LlamaHFTokenizer.from_pretrained("meetkai/functionary-small-v2.2-GGUF")
478+
repo_id="meetkai/functionary-small-v2.5-GGUF",
479+
filename="functionary-small-v2.5.Q4_0.gguf",
480+
chat_format="functionary",
481+
tokenizer=LlamaHFTokenizer.from_pretrained("meetkai/functionary-small-v2.5-GGUF")
482482
)
483483
```
484484

docs/server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ You'll first need to download one of the available function calling models in GG
7878

7979
- [functionary](https://huggingface.co/meetkai)
8080

81-
Then when you run the server you'll need to also specify either `functionary-v1` or `functionary-v2` chat_format.
81+
Then when you run the server you'll need to also specify `functionary` chat_format.
8282

8383
Note that since functionary requires a HF Tokenizer due to discrepancies between llama.cpp and HuggingFace's tokenizers as mentioned [here](https://github.com/abetlen/llama-cpp-python/blob/main?tab=readme-ov-file#function-calling), you will need to pass in the path to the tokenizer too. The tokenizer files are already included in the respective HF repositories hosting the gguf files.
8484

8585
```bash
86-
python3 -m llama_cpp.server --model <model_path_to_functionary_v2_model> --chat_format functionary-v2 --hf_pretrained_model_name_or_path <model_path_to_functionary_v2_tokenizer>
86+
python3 -m llama_cpp.server --model <model_path_to_functionary_model> --chat_format functionary --hf_pretrained_model_name_or_path <model_path_to_functionary_tokenizer>
8787
```
8888

8989
Check out this [example notebook](https://github.com/abetlen/llama-cpp-python/blob/main/examples/notebooks/Functions.ipynb) for a walkthrough of some interesting use cases for function calling.

0 commit comments

Comments
 (0)