Skip to content

Commit 9ee4cdd

Browse files
ngxsonpcuenca
andauthored
Apply suggestions from code review
Co-authored-by: Pedro Cuenca <[email protected]>
1 parent 5d6e768 commit 9ee4cdd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This is a collection of JS libraries to interact with the Hugging Face API, with
6262
- [@huggingface/tasks](packages/tasks/README.md): The definition files and source-of-truth for the Hub's main primitives like pipeline tasks, model libraries, etc.
6363
- [@huggingface/jinja](packages/jinja/README.md): A minimalistic JS implementation of the Jinja templating engine, to be used for ML chat templates.
6464
- [@huggingface/space-header](packages/space-header/README.md): Use the Space `mini_header` outside Hugging Face
65-
- [@huggingface/ollama-utils](packages/ollama-utils/README.md): Various utilities for maintaining Ollama compatibility with models on Hugging Face hub.
65+
- [@huggingface/ollama-utils](packages/ollama-utils/README.md): Various utilities for maintaining Ollama compatibility with models on the Hugging Face Hub.
6666

6767

6868
We use modern features to avoid polyfills and dependencies, so the libraries will only work on modern browsers / Node.js >= 18 / Bun / Deno.

packages/ollama-utils/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# `@huggingface/ollama-utils`
22

3-
Various utilities for maintaining Ollama compatibility with models on Hugging Face hub.
3+
Various utilities for maintaining [Ollama compatibility with GGUF models on the Hugging Face Hub](https://huggingface.co/docs/hub/en/ollama).
44

5-
Documentation: https://huggingface.co/docs/hub/en/ollama
5+
For now, we are exposing chat template conversion to the Go format used by Ollama.
66

77
## Chat template converter
88

@@ -45,12 +45,12 @@ Most templates will be converted automatically. You can debug the output templat
4545
- This space to retrieve the converted template: https://huggingface.co/spaces/ngxson/debug_ollama_manifest
4646
- And this space to apply the Go template into a list of messages: https://huggingface.co/spaces/ngxson/ollama_template_test
4747

48-
Please only add a new template only when the conversion above is not successful. Cases that are acceptable to add a custom handler:
48+
Please only add a new template when the conversion process above is not successful. Cases that are acceptable include:
4949
- The converted template is wrong
5050
- The Jinja template is not compatible with `@huggingface/jinja`
5151
- The Jinja template is not "linear," meaning it can modify the content of other messages or append dynamic postfixes. For instance, the DeepSeek template removes `<think>...</think>` from previous messages in a conversation, making it non-linear. Another example is a template that adds the EOS token `</s>` when `add_generation_prompt=False`.
5252

5353
To add a new custom handler:
5454
1. Edit the list of `CUSTOM_TEMPLATE_MAPPING` inside `chat-template.ts`
5555
2. Add a new test case in `chat-template.spec.ts`
56-
3. Push your change into new PR.
56+
3. Push your change to a new PR.

0 commit comments

Comments
 (0)