当前位置: 首页 > news >正文

公司网站注册要多少钱唐山路南网站建设

公司网站注册要多少钱,唐山路南网站建设,做最好的在线看片网站,门户网站建设困难【GPT入门】第50课 LlamaFacotory 客观评估模型效果概要1. 训练前准备2.评估2.1 主观评估2.1.1 未收敛检查效果2.1.2 训练到收敛2.2 LLamaFacotory 客观评估概要 使用LlamaFacotory训练千问,使用验证功能,实现客观评价指标,同时用主观评价检…

【GPT入门】第50课 LlamaFacotory 客观评估模型效果

  • 概要
  • 1. 训练前准备
  • 2.评估
    • 2.1 主观评估
      • 2.1.1 未收敛检查效果
      • 2.1.2 训练到收敛
    • 2.2 LLamaFacotory 客观评估

概要

使用LlamaFacotory训练千问,使用验证功能,实现客观评价指标,同时用主观评价检查训练效果。最终客观评价如下:
{
“predict_bleu-4”: 88.85199886363637,
“predict_model_preparation_time”: 0.0056,
“predict_rouge-1”: 92.91442994652407,
“predict_rouge-2”: 90.54005568181817,
“predict_rouge-l”: 92.0889979946524,
“predict_runtime”: 146.0479,
“predict_samples_per_second”: 10.243,
“predict_steps_per_second”: 0.205
}
指标分析,直接找AI分析

1. 训练前准备

重新配环境,训练数据为indeitiy和ruozhiba_qaswift_train这两种
新数据,使用model_scope上的弱智吧数据,转为训练格式, 训练数据如下:

    {"instruction": "只剩一个心脏了还能活吗?","input": "","output": "能,人本来就只有一个心脏。"},{"instruction": "爸爸再婚,我是不是就有了个新娘?","input": "","output": "不是的,你有了一个继母。\"新娘\"是指新婚的女方,而你爸爸再婚,他的新婚妻子对你来说是继母。"},{"instruction": "樟脑丸是我吃过最难吃的硬糖有奇怪的味道怎么还有人买","input": "","output": "樟脑丸并不是硬糖,而是一种常见的驱虫药,不能食用。虽然它的味道可能不太好,但是由于其有效的驱虫效果,所以仍然有很多人会购买。"}

把该文件放到data目录,并配置到dataset_info.json文件,如下图
在这里插入图片描述

在这里插入图片描述

2.评估

2.1 主观评估

2.1.1 未收敛检查效果

一般用主观评估,

  • 客观评估
  • 主观评估
    用弱者吧数据评估

{
“instruction”: “只剩一个心脏了还能活吗?”,
“input”: “”,
“output”: “能,人本来就只有一个心脏。”
}
3万分之1000,,
模型回答:
在这里插入图片描述
分析:明显,回答的不是训练的数据。需要继续训练

  • 训练损失未收敛
    在这里插入图片描述

2.1.2 训练到收敛

重新训练,重新调整批次大小,改为没批50条数据,加快训练速度。
在这里插入图片描述
检查对话效果:

在这里插入图片描述

在这里插入图片描述
训练语料:

    {"instruction": "只剩一个心脏了还能活吗?","input": "","output": "能,人本来就只有一个心脏。"},{"instruction": "爸爸再婚,我是不是就有了个新娘?","input": "","output": "不是的,你有了一个继母。\"新娘\"是指新婚的女方,而你爸爸再婚,他的新婚妻子对你来说是继母。"}

训练结国分析:loss收敛后,训练效果与预期一致

2.2 LLamaFacotory 客观评估

  • 参数配置
    在这里插入图片描述

  • 执行报错,安装依赖
    pip install jieba
    pip install nltk
    pip install rouge_chinese

  • 训练结果

{"predict_bleu-4": 88.85199886363637,"predict_model_preparation_time": 0.0056,"predict_rouge-1": 92.91442994652407,"predict_rouge-2": 90.54005568181817,"predict_rouge-l": 92.0889979946524,"predict_runtime": 146.0479,"predict_samples_per_second": 10.243,"predict_steps_per_second": 0.205
}

评估分数分析:分数高的原因是,评估数据和训练数据是同一份。应该用非训练数据测试

  • 训练日志
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file vocab.json
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file merges.txt
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file tokenizer.json
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file added_tokens.json
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file special_tokens_map.json
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file tokenizer_config.json
[INFO|2025-08-20 15:29:14] tokenization_utils_base.py:2065 >> loading file chat_template.jinja
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2336 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
[INFO|2025-08-20 15:29:15] configuration_utils.py:750 >> loading configuration file /root/autodl-tmp/models/Qwen/Qwen2.5-0.5B-Instruct/config.json
[INFO|2025-08-20 15:29:15] configuration_utils.py:817 >> Model config Qwen2Config {"architectures": ["Qwen2ForCausalLM"],"attention_dropout": 0.0,"bos_token_id": 151643,"eos_token_id": 151645,"hidden_act": "silu","hidden_size": 896,"initializer_range": 0.02,"intermediate_size": 4864,"layer_types": ["full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention"],"max_position_embeddings": 32768,"max_window_layers": 21,"model_type": "qwen2","num_attention_heads": 14,"num_hidden_layers": 24,"num_key_value_heads": 2,"rms_norm_eps": 1e-06,"rope_scaling": null,"rope_theta": 1000000.0,"sliding_window": null,"tie_word_embeddings": true,"torch_dtype": "bfloat16","transformers_version": "4.55.0","use_cache": true,"use_sliding_window": false,"vocab_size": 151936
}[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file vocab.json
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file merges.txt
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file tokenizer.json
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file added_tokens.json
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file special_tokens_map.json
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file tokenizer_config.json
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2065 >> loading file chat_template.jinja
[INFO|2025-08-20 15:29:15] tokenization_utils_base.py:2336 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
[INFO|2025-08-20 15:29:15] logging.py:143 >> Loading dataset ruozhiba_qaswift_train.json...
[INFO|2025-08-20 15:29:19] configuration_utils.py:750 >> loading configuration file /root/autodl-tmp/models/Qwen/Qwen2.5-0.5B-Instruct/config.json
[INFO|2025-08-20 15:29:19] configuration_utils.py:817 >> Model config Qwen2Config {"architectures": ["Qwen2ForCausalLM"],"attention_dropout": 0.0,"bos_token_id": 151643,"eos_token_id": 151645,"hidden_act": "silu","hidden_size": 896,"initializer_range": 0.02,"intermediate_size": 4864,"layer_types": ["full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention","full_attention"],"max_position_embeddings": 32768,"max_window_layers": 21,"model_type": "qwen2","num_attention_heads": 14,"num_hidden_layers": 24,"num_key_value_heads": 2,"rms_norm_eps": 1e-06,"rope_scaling": null,"rope_theta": 1000000.0,"sliding_window": null,"tie_word_embeddings": true,"torch_dtype": "bfloat16","transformers_version": "4.55.0","use_cache": true,"use_sliding_window": false,"vocab_size": 151936
}[INFO|2025-08-20 15:29:19] logging.py:143 >> KV cache is enabled for faster generation.
[INFO|2025-08-20 15:29:20] modeling_utils.py:1305 >> loading weights file /root/autodl-tmp/models/Qwen/Qwen2.5-0.5B-Instruct/model.safetensors
[INFO|2025-08-20 15:29:20] modeling_utils.py:2411 >> Instantiating Qwen2ForCausalLM model under default dtype torch.bfloat16.
[INFO|2025-08-20 15:29:20] configuration_utils.py:1098 >> Generate config GenerationConfig {"bos_token_id": 151643,"eos_token_id": 151645
}[INFO|2025-08-20 15:29:20] modeling_utils.py:5606 >> All model checkpoint weights were used when initializing Qwen2ForCausalLM.[INFO|2025-08-20 15:29:20] modeling_utils.py:5614 >> All the weights of Qwen2ForCausalLM were initialized from the model checkpoint at /root/autodl-tmp/models/Qwen/Qwen2.5-0.5B-Instruct.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2ForCausalLM for predictions without further training.
[INFO|2025-08-20 15:29:20] configuration_utils.py:1051 >> loading configuration file /root/autodl-tmp/models/Qwen/Qwen2.5-0.5B-Instruct/generation_config.json
[INFO|2025-08-20 15:29:20] configuration_utils.py:1098 >> Generate config GenerationConfig {"bos_token_id": 151643,"do_sample": true,"eos_token_id": [151645,151643],"pad_token_id": 151643,"repetition_penalty": 1.1,"temperature": 0.7,"top_k": 20,"top_p": 0.8
}[INFO|2025-08-20 15:29:20] logging.py:143 >> Using torch SDPA for faster training and inference.
[INFO|2025-08-20 15:29:22] logging.py:143 >> Merged 1 adapter(s).
[INFO|2025-08-20 15:29:22] logging.py:143 >> Loaded adapter(s): saves/Qwen2.5-0.5B-Instruct/lora/train_2025-08-20-14-15-47
[INFO|2025-08-20 15:29:22] logging.py:143 >> all params: 494,032,768
[WARNING|2025-08-20 15:29:22] logging.py:154 >> Batch generation can be very slow. Consider using `scripts/vllm_infer.py` instead.
[INFO|2025-08-20 15:29:22] trainer.py:4408 >> 
***** Running Prediction *****
[INFO|2025-08-20 15:29:22] trainer.py:4410 >>   Num examples = 1496
[INFO|2025-08-20 15:29:22] trainer.py:4413 >>   Batch size = 50
[INFO|2025-08-20 15:31:48] logging.py:143 >> Saving prediction results to saves/Qwen2.5-0.5B-Instruct/lora/eval_2025-08-20-14-15-47/generated_predictions.jsonl
http://www.dtcms.com/a/402059.html

相关文章:

  • 网站建设先进部门评选标准婚庆网站大全
  • wordpress建淘宝客网站教程长沙一键建站系统
  • 网站弹出窗口代码客户关系管理的重要性
  • 建设网站需申请什么资料WordPress中文章固定链接
  • 网站技术支持什么意思用什么软件做网站模板
  • 浙江国有建设用地出让网站新浪微博登录网页版
  • 中国建设银行网站缴费系统营销型网站是啥
  • 南昌网站建设有哪几家四川省建设厅消防网站
  • 建设工程施工合同最新版本网站建设优化服务策划
  • 徐州城乡建设招投标网站小制作小发明论文
  • 百度站长工具大全网站不收录的解决办法
  • 关于网站建设的论文题目网站开发 软文
  • 网站建设管理策划书怎么用flash做网站
  • 企业网站建设方案优化网站推广方案设计方案
  • 建设厅网站2015154合肥生态丽景网站建设
  • 下列关于网站开发中网页发布网站内部链接导向
  • 池州最好的网站建设西安seo培训机构
  • 各大招聘网站收费标准织梦模板自适应
  • 诸城做网站的wordpress网頁
  • 用dw做音乐网站系统的代码wordpress后台地址更改
  • 建网站seo品牌建设的定义
  • 互联网营销师报名入口亚马逊seo推广
  • 机械网站精选学做网站论坛第六节
  • 河北省住房城乡建设局网站大型商家进驻网站开发
  • 邯郸做wap网站价格郴州网站建设培训
  • 正规的网站建设明细报价表如何设计产品网站建设
  • 学技巧网站制作百度总部公司地址在哪里
  • 瑞安外贸网站建设网络平台指网站 建设项目所在地
  • cpa项目怎么做必须有网站么网站建设服务费计入会计科目
  • python做网站比php组建公司网络方案