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

所有做运动的网站百度搜索引擎seo

所有做运动的网站,百度搜索引擎seo,宝鸡网站建设多少钱,怎么在虚拟空间做两个网站Gemma-SFT Gemma-SFT(谷歌, Google), gemma-2b/gemma-7b微调(transformers)/LORA(peft)/推理 项目地址 https://github.com/yongzhuo/gemma-sft全部weights要用fp32/tf32, 使用fp16微调十几或几十的步数后大概率lossnan;(即便layer-norm是fp32也不行, LLaMA就没有这个问题, …

Gemma-SFT

Gemma-SFT(谷歌, Google), gemma-2b/gemma-7b微调(transformers)/LORA(peft)/推理

项目地址

  • https://github.com/yongzhuo/gemma-sft
  • 全部weights要用fp32/tf32, 使用fp16微调十几或几十的步数后大概率loss=nan;(即便layer-norm是fp32也不行, LLaMA就没有这个问题, 原因暂时未知)

备注

1. 非常重要: 全部weights要用fp32/tf32, 使用fp16微调十几或几十的步数后大概率loss=nan;(即便layer-norm是fp32也不行, LLaMA就没有这个问题, 原因暂时未知)
2. transformers需要4.38及以上;
3. gemma词典大小为25w,多语言版本,包含繁/简体;
4. gemma网络架构同Llama, gemma-2b为18层网络, gemma-7b为28层网络; 
5. prompt:5.1 标准格式为: 
bos + input + eos + bos + output + eos5.2 prompt格式为: 
<start_of_turn>user
input<end_of_turn>
<start_of_turn>model
output<end_of_turn>6 微调输入输出:输入:"<start_of_turn>user\n{问题}<end_of_turn>\n"输出:"<start_of_turn>model\n{答案}<end_of_turn>"
7 推理输入输出(assistant\n放置位置不同):输入:"<start_of_turn>user\n{问题}<end_of_turn>\n<start_of_turn>model\n"输出:"{答案}<end_of_turn>"
8. 网络各层名称
('model.embed_tokens.weight', torch.bfloat16, True)
......
('model.layers.17.self_attn.q_proj.weight', torch.bfloat16, True)
('model.layers.17.self_attn.k_proj.weight', torch.bfloat16, True)
('model.layers.17.self_attn.v_proj.weight', torch.bfloat16, True)
('model.layers.17.self_attn.o_proj.weight', torch.bfloat16, True)
('model.layers.17.mlp.gate_proj.weight', torch.bfloat16, True)
('model.layers.17.mlp.up_proj.weight', torch.bfloat16, True)
('model.layers.17.mlp.down_proj.weight', torch.bfloat16, True)
('model.layers.17.input_layernorm.weight', torch.bfloat16, True)
('model.layers.17.post_attention_layernorm.weight', torch.bfloat16, True)
......
('model.norm.weight', torch.bfloat16, True)
9. RuntimeError: unscale_() has already been called on this optimizer since the last update().微调语料太少导致的

环境配置

transformers>=4.38.1
torch>=1.13.1
safetensors>=0.4.1
accelerate==0.27.1
fsspec==2023.9.2
rouge==1.0.1
nltk==3.6.6
peft>=0.2.0
numpy
tqdm

微调

地址: gemma_sft/ft_gemma配置: gemma_sft/ft_gemma/config.py
训练: python train.py
推理: python predict.py
验证: python evaluation.py
接口: python post_api.py

数据集-中文

  • https://huggingface.co/datasets/JosephusCheung/GuanacoDataset
  • https://huggingface.co/datasets/shareAI/shareGPT_cn
  • https://huggingface.co/datasets/Mutonix/RefGPT-Fact
  • https://huggingface.co/datasets/BAAI/COIG
  • https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM
  • https://github.com/carbonz0/alpaca-chinese-dataset
  • https://github.com/LianjiaTech/BELLE
  • https://github.com/PhoebusSi/Alpaca-CoT
  • https://github.com/Hello-SimpleAI/chatgpt-comparison-detection
  • https://github.com/yangjianxin1/Firefly
  • https://github.com/XueFuzhao/InstructionWild
  • https://github.com/OpenLMLab/MOSS
  • https://github.com/thu-coai/Safety-Prompts
  • https://github.com/LAION-AI/Open-Assistant
  • https://github.com/TigerResearch/TigerBot

参考/感谢

  • https://github.com/google/gemma_pytorch
  • https://huggingface.co/google/gemma-2b-it
  • https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
  • https://github.com/THUDM/ChatGLM-6B
  • https://github.com/THUDM/GLM
  • https://github.com/tatsu-lab/stanford_alpaca
  • https://github.com/LianjiaTech/BELLE
  • https://github.com/huggingface/peft
  • https://github.com/mymusise/ChatGLM-Tuning
  • https://github.com/bojone/bert4keras
  • trl
  • math23k

微调日志-advgen

在这里插入图片描述

推理日志-advgen

请输入:
类型#上衣*颜色#黑色*颜色#紫色*风格#性感*图案#字母*图案#文字*图案#线条*图案#刺绣*衣样式#卫衣*衣长#短款*衣袖型#落肩袖*衣款式#连帽
请稍等...
################################################################################################################################
{'instruction': '类型#上衣*颜色#黑色*颜色#紫色*风格#性感*图案#字母*图案#文字*图案#线条*图案#刺绣*衣样式#卫衣*衣长#短款*衣袖型#落肩袖*衣款式#连帽', 'input': '', 'output': ''}
tensor([[     2,  23055, 235345, 235502, 236524, 235287,  43972, 235345,  57988,235287,  43972, 235345, 124945, 235287,  60525, 235345, 135994, 235287,182148, 235345, 125156, 235287, 182148, 235345,  25047, 235287, 182148,235345, 179958, 235287, 182148, 235345, 237164, 240872, 235287, 236524,95243, 235345, 237587, 236524, 235287, 236524, 236045, 235345, 236809,236604, 235287, 236524, 237785, 235954, 235345, 236362, 238047, 237785,235287, 236524, 166242, 235345, 236557, 238229]])
一款个性吸睛的连帽服務卫衣,黑色系底色,增添了甜美小性感;经典的落肩短款版型,修饰出纤细的颈脖线条;个性时尚的连帽设计,搭配字母刺绣装饰,增添了甜美少女感;肩部的字母刺绣装饰,增添了时尚感,使整体更具特色;紫色的刺绣设计,丰富了视觉感,使整体更具个性。<eos>
请输入:
类型#上衣*风格#街头*图案#创意*衣样式#卫衣
请稍等...
################################################################################################################################
{'instruction': '类型#上衣*风格#街头*图案#创意*衣样式#卫衣', 'input': '', 'output': ''}
tensor([[     2,  23055, 235345, 235502, 236524, 235287,  60525, 235345, 218295,235287, 182148, 235345,  50259, 235287, 236524,  95243, 235345, 237587,236524]])
这一款卫衣采用经典的领口设计,不拘一格的设计,展现出街头风。领口的设计,不仅能够修饰脸型,还能够打造出精致的小脸,而且还能够起到遮挡口型的效果,让脸型更加小巧。领口处采用了创意的圆环装饰,让整个卫衣更加丰富,视觉上更加亮眼。卫衣采用宽大的版型设计,不挑人穿,即使是身材不那么好的人也能轻松驾驭。<eos>
请输入:

口的设计,不仅能够修饰脸型,还能够打造出精致的小脸,而且还能够起到遮挡口型的效果,让脸型更加小巧。领口处采用了创意的圆环装饰,让整个卫衣更加丰富,视觉上更加亮眼。卫衣采用宽大的版型设计,不挑人穿,即使是身材不那么好的人也能轻松驾驭。
请输入:

http://www.rdtb.cn/news/17584.html

相关文章:

  • 做网站什么字体指数是什么
  • 杭州 做网站正规微商免费推广软件
  • 网站域名变更后怎样操作推广普通话手抄报简单又好看
  • 哪个网站可以做设计比赛怎么查搜索关键词排名
  • 易语言做试用点击网站长沙专业做网站公司
  • 怎么注册做鸭网站管理人员需要培训哪些课程
  • 西安网络推广seo0515一点优化
  • wordpress mysql 扩展seo培训一对一
  • 石油化工建设工程网站百度知道在线
  • wordpress 微信付款seo综合优化公司
  • wordpress图片名百度seo招聘
  • 什么网站做禽苗好的网站我想做电商
  • 苏州网站建设联系苏州梦易行seo工程师是做什么的
  • 山东住房城乡建设部网站软件开发公司
  • 连云港网站建设价格新闻稿发布软文平台
  • 河南交友网站开发公司网络搜索引擎有哪些
  • 做各国民宿租赁的网站西安疫情最新通知
  • 军事新闻大事站长工具seo优化建议
  • 网站建设维护外包电商运营工作内容
  • 网站建设管理百度指数查询官方网
  • 有没有做网站的教程打广告推广怎么做
  • 网站建设课程百度资源
  • 青岛 公司 网站建设上百度推广的网站要多少钱
  • com网站建设怎么打开网站
  • 河北建筑工程信息网站seo服务商技术好的公司
  • wordpress的页面图片排版太原seo推广
  • 名片在哪个网站做在线服务器网站
  • 怎么做网站网页游戏代理
  • 常平东站是东莞东站吗做网站公司
  • 大型电子商务网站建设成本顾问式营销