mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 20:04:35 +00:00
clean up
This commit is contained in:
parent
7f59af52a9
commit
7df9ab9687
@ -176,6 +176,12 @@ int main(int argc, char ** argv) {
|
|||||||
|
|
||||||
if (!params.steering_add.empty() || !params.steering_sub.empty())
|
if (!params.steering_add.empty() || !params.steering_sub.empty())
|
||||||
{
|
{
|
||||||
|
fprintf(stderr, "%s: steering: ('%s' - '%s') * %f\n",
|
||||||
|
__func__, params.steering_add.c_str(), params.steering_sub.c_str(), params.steering_mul);
|
||||||
|
|
||||||
|
params.steering_add.insert(0, 1, ' ');
|
||||||
|
params.steering_sub.insert(0, 1, ' ');
|
||||||
|
|
||||||
auto add_tokens = ::llama_tokenize(ctx, params.steering_add, true);
|
auto add_tokens = ::llama_tokenize(ctx, params.steering_add, true);
|
||||||
auto sub_tokens = ::llama_tokenize(ctx, params.steering_sub, true);
|
auto sub_tokens = ::llama_tokenize(ctx, params.steering_sub, true);
|
||||||
|
|
||||||
@ -196,7 +202,6 @@ int main(int argc, char ** argv) {
|
|||||||
llama_eval(ctx, sub_tokens.data(), std::min((int)sub_tokens.size(), n_ctx), 0, params.n_threads);
|
llama_eval(ctx, sub_tokens.data(), std::min((int)sub_tokens.size(), n_ctx), 0, params.n_threads);
|
||||||
|
|
||||||
llama_set_steering_read(ctx, params.steering_layer, params.steering_mul);
|
llama_set_steering_read(ctx, params.steering_layer, params.steering_mul);
|
||||||
std::cout << "Steering: `" << params.steering_add << "` - `" << params.steering_sub << "` * " << params.steering_mul << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug message about similarity of saved session, if applicable
|
// debug message about similarity of saved session, if applicable
|
||||||
|
Loading…
Reference in New Issue
Block a user