mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 10:54:36 +00:00
43b35e38ba
* cuda sqrt support * enable cuda in pca * fix comments in pca * add test * add sqrt to ggml_backend_cuda_supports_op * fix test * new line * Use F32 sqrtf instead of F64 sqrt Co-authored-by: Johannes Gäßler <johannesg@5d6.de> --------- Co-authored-by: Johannes Gäßler <johannesg@5d6.de> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
completions.txt | ||
cvector-generator.cpp | ||
negative.txt | ||
pca.hpp | ||
positive.txt | ||
README.md |
cvector-generator
This example demonstrates how to generate a control vector using gguf models.
Related PRs:
- Add support for control vectors
- (Issue) Generate control vector using llama.cpp
- Add cvector-generator example
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 --batch-pca 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|>