From b237aec49aae7fce701ea38a68d04b2cd1208cee Mon Sep 17 00:00:00 2001 From: guinmoon Date: Thu, 23 May 2024 22:01:51 +0300 Subject: [PATCH] skip_tokens in template fix --- LLMFarm/Chats/ChatView.swift | 4 ++-- LLMFarm/Lib/FileHelper.swift | 3 +++ llmfarm_core.swift | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/LLMFarm/Chats/ChatView.swift b/LLMFarm/Chats/ChatView.swift index 0e61e03..b99d3a7 100644 --- a/LLMFarm/Chats/ChatView.swift +++ b/LLMFarm/Chats/ChatView.swift @@ -123,7 +123,7 @@ struct ChatView: View { } private var debugOverlay: some View { - Text(aiChatModel.cur_t_name) + Text(aiChatModel.cur_eval_token_num.description) .foregroundColor(.white) .frame(width: 185, height: 25) // .padding([.top, .leading], 5) @@ -155,7 +155,7 @@ struct ChatView: View { } .listStyle(PlainListStyle()) .overlay(scrollDownOverlay, alignment: .bottomTrailing) - .overlay(debugOverlay, alignment: .topLeading) +// .overlay(debugOverlay, alignment: .topLeading) } .onChange(of: aiChatModel.AI_typing){ ai_typing in scrollToBottom(with_animation: false) diff --git a/LLMFarm/Lib/FileHelper.swift b/LLMFarm/Lib/FileHelper.swift index 62b0951..b7713e8 100644 --- a/LLMFarm/Lib/FileHelper.swift +++ b/LLMFarm/Lib/FileHelper.swift @@ -24,6 +24,9 @@ func parse_model_setting_template(template_path:String) -> ChatSettingsTemplate{ if (jsonResult_dict!["model_inference"] != nil){ tmp_template.inference = jsonResult_dict!["model_inference"] as! String } + if (jsonResult_dict!["skip_tokens"] != nil){ + tmp_template.skip_tokens = jsonResult_dict!["skip_tokens"] as! String + } if (jsonResult_dict!["prompt_format"] != nil){ tmp_template.prompt_format = jsonResult_dict!["prompt_format"] as! String } diff --git a/llmfarm_core.swift b/llmfarm_core.swift index 6cbb1d5..07d53c7 160000 --- a/llmfarm_core.swift +++ b/llmfarm_core.swift @@ -1 +1 @@ -Subproject commit 6cbb1d579f3cb895228b7a6596b40524fb59ea28 +Subproject commit 07d53c734605cc112dd528993fa349bd96364ee6