Closed
Description
Motivation
Support for control vector is added in #5970 , but to generate the vector, users must run python code (which uses huggingface API instead of llama.cpp)
Possible Implementation
By looking at https://github.com/vgel/repeng/blob/main/repeng/extract.py , we can see some key steps that need to be adapted to cpp:
batched_get_hiddens
returns a list of embedding vectors from hidden layers. This can be done in llama.cpp using eval callback- For the moment, we can't find any lightweight implementation of Principal component analysis (PCA) in cpp. An idea would be to replace it with this UMAP C++ implementation