def forward(self, input_ids, hidden_states, top_p = 0.8, temperature = 1.0, penalty = 1.1): hidden_states = transformer.ln_f(hidden_states) m_logits = origin_model.lm_head(hidden_states) # repeat penalty logits = torch.gather(m_logits, 1, input_ids) logits = torch.where(logits <...
2 changes: 1 addition & 1 deletion 2 LLMFarm/model_setting_templates/phi3.json Original file line numberDiff line numberDiff line change @@ -1,7 +1,7 @@ { "add_eos_token" : false, "mlock" : false, "repeat_penalty" : 1.1000000238418579, "repeat_penalty" : 1, "mirostat_tau" :...
基于可塑权重巩固(EWC)的自适应参数正则化 No penalty 训练完猫狗识别后,模型在猫狗识别的任务上有很不错的表现,此时直接用该模型继续训练狮虎识别模型 学完任务B后将会遗忘任务A L2正则化 L2正则化倾向于生成更小、更分 散的权重向量,鼓励分类器考虑 所有输入维数,防止模型过拟合。 L2正则项没有考虑不同参数对...
基于可塑权重巩固(EWC)的自适应参数正则化 No penalty 训练完猫狗识别后,模型在猫狗识别的任务上有很不错的表现,此时直接用该模型继续训练狮虎识别模型 学完任务B后将会遗忘任务A L2正则化 L2正则化倾向于生成更小、更分 散的权重向量,鼓励分类器考虑 所有输入维数,防止模型过拟合。 L2正则项没有考虑不同参数对...
( model=model_name, messages=messages, temperature=0.1, top_p=0.9, max_tokens=4096, tools=[], extra_body={ "repetition_penalty": 1.05, }, ) req_id = completion.id total_token = completion.usage.total_tokens completion_token = completion.usage.completion_tokens prompt_tokens = completion....
woq_config please check this: https://github.com/intel/intel-extension-for-transformers/blob/main/docs/weightonlyquant.md#llm-runtime-example-code. reptition_penalty & top_k value please check https://github.com/intel/neural-speed/blob/main/docs/advanced_usage.md Storm8878 commented Jan 22,...
# ipex llm changes end return scores def minicpmv_generate_wrapper(origin_generate): def generate( self, @@ -30,8 +54,7 @@ def generate( decode_text=False, **kwargs ): if kwargs.get("repetition_penalty", None) is not None: kwargs["repetition_penalty"] = 1 RepetitionPenaltyLogits...