Xuan Son Nguyen 3e58b0ee35 cvector: fix CI + correct help message (#8064) hai 1 ano
..
CMakeLists.txt 0c7b3595b9 Add `cvector-generator` example (#7514) hai 1 ano
README.md 3e58b0ee35 cvector: fix CI + correct help message (#8064) hai 1 ano
completions.txt 0c7b3595b9 Add `cvector-generator` example (#7514) hai 1 ano
cvector-generator.cpp 3e58b0ee35 cvector: fix CI + correct help message (#8064) hai 1 ano
negative.txt adf480c3ab cvector-generator: Moe Moe Fixie-Fixie for Lots of Formats~! ♡(ᐢ ᴥ ᐢ)♡ (#8052) hai 1 ano
pca.hpp 43b35e38ba Add support for sqrt on CUDA (#7953) hai 1 ano
positive.txt adf480c3ab cvector-generator: Moe Moe Fixie-Fixie for Lots of Formats~! ♡(ᐢ ᴥ ᐢ)♡ (#8052) hai 1 ano

README.md

cvector-generator

This example demonstrates how to generate a control vector using gguf models.

Related PRs:

Examples

# CPU only
./cvector-generator -m ./dolphin-2.0-mistral-7b.Q4_K_M.gguf

# With GPU
./cvector-generator -m ./dolphin-2.0-mistral-7b.Q4_K_M.gguf -ngl 99

# With advanced options
./cvector-generator -m ./dolphin-2.0-mistral-7b.Q4_K_M.gguf -ngl 99 --completions 128 --pca-iter 2000 --pca-batch 100

# To see help message
./cvector-generator -h
# Then, have a look at "cvector" section

Tips and tricks

If you have multiple lines per prompt, you can escape the newline character (change it to \n). For example:

<|im_start|>system\nAct like a person who is extremely happy.<|im_end|>
<|im_start|>system\nYou are in a very good mood today<|im_end|>