mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	turning off
This commit is contained in:
		| @@ -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); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Henri Vasserman
					Henri Vasserman