turning off
This commit is contained in:
parent
5c9b45c204
commit
da3d60f154
3 changed files with 7 additions and 0 deletions
|
@ -430,6 +430,8 @@ int main(int argc, char ** argv) {
|
||||||
llama_save_session_file(ctx, path_session.c_str(), session_tokens.data(), session_tokens.size());
|
llama_save_session_file(ctx, path_session.c_str(), session_tokens.data(), session_tokens.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//llama_set_steering_off(ctx);
|
||||||
|
|
||||||
llama_token id = 0;
|
llama_token id = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -279,6 +279,10 @@ struct llama_context {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void llama_set_steering_off(struct llama_context * ctx) {
|
||||||
|
ctx->steering_mode = STEERING_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
void llama_set_steering_write(struct llama_context * ctx, int layer, float mul) {
|
void llama_set_steering_write(struct llama_context * ctx, int layer, float mul) {
|
||||||
ctx->steering_mode = STEERING_WRITE;
|
ctx->steering_mode = STEERING_WRITE;
|
||||||
ctx->steering_mul = mul;
|
ctx->steering_mul = mul;
|
||||||
|
|
1
llama.h
1
llama.h
|
@ -191,6 +191,7 @@ extern "C" {
|
||||||
LLAMA_API llama_token llama_token_eos();
|
LLAMA_API llama_token llama_token_eos();
|
||||||
LLAMA_API llama_token llama_token_nl();
|
LLAMA_API llama_token llama_token_nl();
|
||||||
|
|
||||||
|
LLAMA_API void llama_set_steering_off(struct llama_context * ctx);
|
||||||
LLAMA_API void llama_set_steering_write(struct llama_context * ctx, int layer, float mul);
|
LLAMA_API void llama_set_steering_write(struct llama_context * ctx, int layer, float mul);
|
||||||
LLAMA_API void llama_set_steering_read(struct llama_context * ctx, int layer, float mul);
|
LLAMA_API void llama_set_steering_read(struct llama_context * ctx, int layer, float mul);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue