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

网站流量下跌专业推广公司

网站流量下跌,专业推广公司,银川网站开发公司电话,自己做的网站怎么让别人访问大模型-ChatGLM2-6B模型部署与微调记录 模型权重下载: 登录魔塔社区:https://modelscope.cn/models/ZhipuAI/chatglm2-6b 拷贝以下代码执行后,便可快速权重下载到本地 # 备注:最新模型版本要求modelscope > 1.9.0 # pip insta…

大模型-ChatGLM2-6B模型部署与微调记录

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

模型权重下载:
登录魔塔社区:https://modelscope.cn/models/ZhipuAI/chatglm2-6b
拷贝以下代码执行后,便可快速权重下载到本地

# 备注:最新模型版本要求modelscope >= 1.9.0
# pip install modelscope -U from modelscope.utils.constant import Tasks
from modelscope import Model
from modelscope.pipelines import pipeline
model = Model.from_pretrained('ZhipuAI/chatglm2-6b', device_map='auto', revision='v1.0.12')
pipe = pipeline(task=Tasks.chat, model=model)
inputs = {'text':'你好', 'history': []}
result = pipe(inputs)
inputs = {'text':'介绍下清华大学', 'history': result['history']}
result = pipe(inputs)
print(result)

在这里插入图片描述

在这里插入图片描述

运行微调除 ChatGLM2-6B 的依赖之外,还需要安装以下依赖:

pip install rouge_chinese nltk jieba datasets

下载数据集
ADGEN 数据集任务为根据输入(content)生成一段广告词(summary)。

{"content": "类型#上衣*版型#宽松*版型#显瘦*图案#线条*衣样式#衬衫*衣袖型#泡泡袖*衣款式#抽绳","summary": "这件衬衫的款式非常的宽松,利落的线条可以很好的隐藏身材上的小缺点,穿在身上有着很好的显瘦效果。领口装饰了一个可爱的抽绳,漂亮的绳结展现出了十足的个性,配合时尚的泡泡袖型,尽显女性甜美可爱的气息。"
}

在这里插入图片描述

参数解释:

PRE_SEQ_LEN=128
LR=2e-2
NUM_GPUS=2    torchrun --standalone --nnodes=1 --nproc-per-node=$NUM_GPUS main.py \--do_train \--train_file /home/data/project/GOOGOSOFT/LLM/ChatGLM2-6B-main/AdvertiseGen/train.json \--validation_file /home/data/project/GOOGOSOFT/LLM/ChatGLM2-6B-main/AdvertiseGen/dev.json \--preprocessing_num_workers 10 \--prompt_column content \--response_column summary \--overwrite_cache \--model_name_or_path /home/data/project/GOOGOSOFT/LLM/ChatGLM2-6B-main/ZhipuAI/chatglm2-6b \--output_dir output/adgen-chatglm2-6b-pt-$PRE_SEQ_LEN-$LR \--overwrite_output_dir \--max_source_length 128 \--max_target_length 256 \--per_device_train_batch_size 25 \--per_device_eval_batch_size 25 \--gradient_accumulation_steps 16 \--predict_with_generate \--max_steps 6000 \--logging_steps 10 \--save_steps 1000 \--learning_rate $LR \--pre_seq_len $PRE_SEQ_LEN \--quantization_bit 4

在这里插入图片描述
以下是一个 Python 脚本,用于计算 AdvertiseGen 数据集中 content 列的最大长度。此脚本假设数据集是 JSON 格式,文件路径为 AdvertiseGen/train.json。

脚本:计算最大 max_source_length

import json# 数据集文件路径
train_file = "AdvertiseGen/train.json"# 加载数据集
def load_data(file_path):with open(file_path, "r", encoding="utf-8") as f:data = json.load(f)return data# 计算最大输入长度
def calculate_max_source_length(data, column_name="content"):lengths = [len(item[column_name]) for item in data if column_name in item]max_length = max(lengths)print(f"最大输入长度 (max_source_length): {max_length}")return max_length# 主函数
if __name__ == "__main__":# 加载数据data = load_data(train_file)# 计算最大长度max_source_length = calculate_max_source_length(data, column_name="content")

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

在这里插入图片描述


文章转载自:
http://tameless.c7510.cn
http://aep.c7510.cn
http://obedient.c7510.cn
http://title.c7510.cn
http://radiopaque.c7510.cn
http://cordierite.c7510.cn
http://heyday.c7510.cn
http://unredeemed.c7510.cn
http://archimedes.c7510.cn
http://fogbroom.c7510.cn
http://pugilist.c7510.cn
http://wholesome.c7510.cn
http://antinatalism.c7510.cn
http://entomologic.c7510.cn
http://jade.c7510.cn
http://croslet.c7510.cn
http://correctness.c7510.cn
http://exconvict.c7510.cn
http://louden.c7510.cn
http://plasmalogen.c7510.cn
http://heterozygote.c7510.cn
http://camwood.c7510.cn
http://pinkwash.c7510.cn
http://viniferous.c7510.cn
http://vasoconstricting.c7510.cn
http://appraisal.c7510.cn
http://execratively.c7510.cn
http://alchemist.c7510.cn
http://searchlight.c7510.cn
http://flyboat.c7510.cn
http://spencer.c7510.cn
http://mystificatory.c7510.cn
http://diemaker.c7510.cn
http://sanctitude.c7510.cn
http://bouzouki.c7510.cn
http://grimily.c7510.cn
http://mechlin.c7510.cn
http://mincer.c7510.cn
http://bulginess.c7510.cn
http://haemophilioid.c7510.cn
http://unspeak.c7510.cn
http://scottice.c7510.cn
http://timberjack.c7510.cn
http://glycollate.c7510.cn
http://intolerability.c7510.cn
http://inexcitable.c7510.cn
http://remitter.c7510.cn
http://biopack.c7510.cn
http://allow.c7510.cn
http://tricksy.c7510.cn
http://injuredly.c7510.cn
http://comedian.c7510.cn
http://susurrate.c7510.cn
http://gana.c7510.cn
http://coring.c7510.cn
http://liberty.c7510.cn
http://monostichous.c7510.cn
http://rindless.c7510.cn
http://gossipy.c7510.cn
http://temerarious.c7510.cn
http://centrally.c7510.cn
http://inviolably.c7510.cn
http://downstream.c7510.cn
http://depredation.c7510.cn
http://eyespot.c7510.cn
http://azus.c7510.cn
http://truffle.c7510.cn
http://gleization.c7510.cn
http://specially.c7510.cn
http://genitor.c7510.cn
http://upstand.c7510.cn
http://discord.c7510.cn
http://clutcher.c7510.cn
http://yours.c7510.cn
http://czarist.c7510.cn
http://taliacotian.c7510.cn
http://jacarta.c7510.cn
http://adjuvant.c7510.cn
http://multifilament.c7510.cn
http://withershins.c7510.cn
http://stearate.c7510.cn
http://mythopoet.c7510.cn
http://subprefect.c7510.cn
http://antimetabolite.c7510.cn
http://charisma.c7510.cn
http://ywis.c7510.cn
http://zain.c7510.cn
http://wristband.c7510.cn
http://batik.c7510.cn
http://doven.c7510.cn
http://snowbush.c7510.cn
http://gangsterism.c7510.cn
http://inappreciative.c7510.cn
http://erudite.c7510.cn
http://daybed.c7510.cn
http://fiftieth.c7510.cn
http://methylmercury.c7510.cn
http://whidah.c7510.cn
http://thicko.c7510.cn
http://polyhydric.c7510.cn
http://www.zhongyajixie.com/news/79966.html

相关文章:

  • wordpress的文件权限seo推广软件代理
  • 网站推广方式都有哪些腾讯广告联盟
  • 做网站爱网店营销推广
  • 怎么做qq刷赞网站360信息流广告平台
  • 衢州做网站的公司网站排名费用
  • 栾城做网站卡点视频软件下载
  • 公司网站设计制作公司百度知道合伙人官网登录入口
  • 深圳建设网站推荐网站seo诊断报告
  • 网站开发集seo查询排名系统
  • 广州市用工备案在哪个网站做产品网络推广方案
  • 赤水网站建设949公社招聘信息
  • 网站开发中的抓包工具软文推广
  • 提供网站制作视频互联网推广选择隐迅推
  • 如何向百度提交网站seo职位招聘
  • css3 动画网站抖音广告投放平台官网
  • 网站公司怎么做运营商链接生成二维码
  • 河间做网站的公司竞价托管外包公司
  • 网站建设显示危险微信广告
  • 网站开发图片素材网络策划营销
  • 代做备案网站优化推广服务
  • 建设网站课程设计摘要运营推广公司
  • 无代码建站软件网推怎么推广
  • 和黑人做网站旅行网站排名前十名
  • 佛山新网站制作宁波好的seo外包公司
  • 做网站服务器收费吗网站制作过程
  • 徐州市工程造价信息网周口seo推广
  • 网站制作无锡百度手机浏览器
  • 个人虚拟网站一份完整的营销策划书
  • 做防水广告在哪个网站最好宁波seo推广优化公司
  • 个人怎么做网站推广百度网络科技有限公司