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

有哪个网站可以做ppt赚钱宁波网络推广团队

有哪个网站可以做ppt赚钱,宁波网络推广团队,专做酒的小程序网站,wordpress 主题 ftp参加了书生・浦语(InternLM)端侧小模型论文分类微调练习打榜赛 具体的实践教程在: https://aicarrier.feishu.cn/wiki/D7kZw9Nx4iMyDnkpL0Gc5giNn5g 折腾了十多天,各种尝试,AB榜单终于进入了前十都,累死 …

参加了书生・浦语(InternLM)端侧小模型论文分类微调练习打榜赛

具体的实践教程在:
https://aicarrier.feishu.cn/wiki/D7kZw9Nx4iMyDnkpL0Gc5giNn5g

折腾了十多天,各种尝试,AB榜单终于进入了前十都,累死
在这里插入图片描述
贴一下最后成绩最好的配置文件:

# Copyright (c) OpenMMLab. All rights reserved.
import torch
from datasets import load_dataset
from mmengine.dataset import DefaultSampler
from mmengine.hooks import (CheckpointHook,DistSamplerSeedHook,IterTimerHook,LoggerHook,ParamSchedulerHook,
)
from mmengine.optim import AmpOptimWrapper, CosineAnnealingLR, LinearLR
from peft import LoraConfig
from torch.optim import AdamW
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfigfrom xtuner.dataset import process_hf_dataset
from xtuner.dataset.collate_fns import default_collate_fn
from xtuner.dataset.map_fns import alpaca_map_fn, template_map_fn_factory
from xtuner.engine.hooks import (DatasetInfoHook,EvaluateChatHook,VarlenAttnArgsToMessageHubHook,
)
from xtuner.engine.runner import TrainLoop
from xtuner.model import SupervisedFinetune
from xtuner.parallel.sequence import SequenceParallelSampler
from xtuner.utils import PROMPT_TEMPLATE, SYSTEM_TEMPLATE#######################################################################
#                          PART 1  Settings                           #
#######################################################################
# Model
pretrained_model_name_or_path = "/root/share/new_models/Shanghai_AI_Laboratory/internlm2_5-7b-chat"
use_varlen_attn = False# Data
alpaca_en_path = "/root/sft/output8.jsonl"#换成自己的数据路径
prompt_template = PROMPT_TEMPLATE.internlm2_chat
max_length = 2048
pack_to_max_length = True# parallel
sequence_parallel_size = 1# Scheduler & Optimizer
batch_size = 4  # per_device
accumulative_counts = 1
accumulative_counts *= sequence_parallel_size
dataloader_num_workers = 0
max_epochs = 6
optim_type = AdamW
lr = 2e-4
betas = (0.9, 0.999)
weight_decay = 0
max_norm = 1  # grad clip
warmup_ratio = 0.03# Save
save_steps = 500
save_total_limit = 2  # Maximum checkpoints to keep (-1 means unlimited)# Evaluate the generation performance during the training
evaluation_freq = 500
SYSTEM = SYSTEM_TEMPLATE.alpaca
evaluation_inputs = ["请给我介绍五个上海的景点", "Please tell me five scenic spots in Shanghai"]#######################################################################
#                      PART 2  Model & Tokenizer                      #
#######################################################################
tokenizer = dict(type=AutoTokenizer.from_pretrained,pretrained_model_name_or_path=pretrained_model_name_or_path,trust_remote_code=True,padding_side="right",
)model = dict(type=SupervisedFinetune,use_varlen_attn=use_varlen_attn,llm=dict(type=AutoModelForCausalLM.from_pretrained,pretrained_model_name_or_path=pretrained_model_name_or_path,trust_remote_code=True,torch_dtype=torch.float16,quantization_config=dict(type=BitsAndBytesConfig,load_in_4bit=True,load_in_8bit=False,llm_int8_threshold=6.0,llm_int8_has_fp16_weight=False,bnb_4bit_compute_dtype=torch.float16,bnb_4bit_use_double_quant=True,bnb_4bit_quant_type="nf4",),),lora=dict(type=LoraConfig,r=32,lora_alpha=64,#       target_modules=["wqkv", "wo"],  # 优先注意力层lora_dropout=0.1,bias="none",task_type="CAUSAL_LM",),
)#######################################################################
#                      PART 3  Dataset & Dataloader                   #
#######################################################################
alpaca_en = dict(type=process_hf_dataset,dataset=dict(type=load_dataset, path='json', data_files=alpaca_en_path),tokenizer=tokenizer,max_length=max_length,dataset_map_fn=alpaca_map_fn,template_map_fn=dict(type=template_map_fn_factory, template=prompt_template),remove_unused_columns=True,shuffle_before_pack=True,pack_to_max_length=pack_to_max_length,use_varlen_attn=use_varlen_attn,
)sampler = SequenceParallelSampler if sequence_parallel_size > 1 else DefaultSampler
train_dataloader = dict(batch_size=batch_size,num_workers=dataloader_num_workers,dataset=alpaca_en,sampler=dict(type=sampler, shuffle=True),collate_fn=dict(type=default_collate_fn, use_varlen_attn=use_varlen_attn),
)#######################################################################
#                    PART 4  Scheduler & Optimizer                    #
#######################################################################
# optimizer
optim_wrapper = dict(type=AmpOptimWrapper,optimizer=dict(type=optim_type, lr=lr, betas=betas, weight_decay=weight_decay),clip_grad=dict(max_norm=max_norm, error_if_nonfinite=False),accumulative_counts=accumulative_counts,loss_scale="dynamic",dtype="float16",
)# learning policy
# More information: https://github.com/open-mmlab/mmengine/blob/main/docs/en/tutorials/param_scheduler.md  # noqa: E501
param_scheduler = [dict(type=LinearLR,start_factor=1e-5,by_epoch=True,begin=0,end=warmup_ratio * max_epochs,convert_to_iter_based=True,),dict(type=CosineAnnealingLR,eta_min=0.0,by_epoch=True,begin=warmup_ratio * max_epochs,end=max_epochs,convert_to_iter_based=True,),
]# train, val, test setting
train_cfg = dict(type=TrainLoop, max_epochs=max_epochs)#######################################################################
#                           PART 5  Runtime                           #
#######################################################################
# Log the dialogue periodically during the training process, optional
custom_hooks = [dict(type=DatasetInfoHook, tokenizer=tokenizer),dict(type=EvaluateChatHook,tokenizer=tokenizer,every_n_iters=evaluation_freq,evaluation_inputs=evaluation_inputs,system=SYSTEM,prompt_template=prompt_template,),
]if use_varlen_attn:custom_hooks += [dict(type=VarlenAttnArgsToMessageHubHook)]# configure default hooks
default_hooks = dict(# record the time of every iteration.timer=dict(type=IterTimerHook),# print log every 10 iterations.logger=dict(type=LoggerHook, log_metric_by_epoch=False, interval=10),# enable the parameter scheduler.param_scheduler=dict(type=ParamSchedulerHook),# save checkpoint per `save_steps`.checkpoint=dict(type=CheckpointHook,by_epoch=False,interval=save_steps,max_keep_ckpts=save_total_limit,),# set sampler seed in distributed evrionment.sampler_seed=dict(type=DistSamplerSeedHook),
)# configure environment
env_cfg = dict(# whether to enable cudnn benchmarkcudnn_benchmark=False,# set multi process parametersmp_cfg=dict(mp_start_method="fork", opencv_num_threads=0),# set distributed parametersdist_cfg=dict(backend="nccl"),
)# set visualizer
visualizer = None# set log level
log_level = "INFO"# load from which checkpoint
load_from = None# whether to resume training from the loaded checkpoint
resume = False# Defaults to use random seed and disable `deterministic`
randomness = dict(seed=None, deterministic=False)# set log processor
log_processor = dict(by_epoch=False)```
http://www.dtcms.com/a/519879.html

相关文章:

  • 力扣每日一题(三)划分题 + 思路题
  • Python爬虫第10课:分布式爬虫架构与Scrapy-Redis
  • 2025年运维部网络安全工作小结1025
  • 基于 Python 的坦克大战小程序,使用 Pygame 库开发
  • 做网站前期需求分析收费么互联网营销是做什么
  • 在 MacOS 中安装 MySQL 8
  • 宿迁网站建设宿迁网站域名的组成
  • Gartner发布AI安全创新指南:用集成的模块化AI安全平台赢得AI安全之战
  • FastGateway 核心技术原理拆解手册
  • vue3中实现渐变三层柱状图
  • 7.IXM6U系统时钟
  • 算子相关通用概念整理
  • Java 操作 PDF 图像:轻松驾驭 PDF 文档中的图片
  • OS_2 进程与线程(进程管理)
  • 网站规划 评价谷歌三件套一键安装
  • 腾讯云服务器如何建设网站百度关键词排名突然没了
  • 【论文笔记】LTX-Video极致速度的视频生成模型
  • 安科瑞防逆流解决方案:物联网技术赋能光伏能源高效管理
  • 如何根据不同的场景选择YOLO相应的基座模型
  • 【OJ】二叉树的经典OJ题
  • Excel 重磅更新 AI技术走进公式
  • div嵌套影响网站收录建设公司需要网站吗
  • VBA技术资料MF383:处理Excel中存储为文本的数据
  • 注册网站的公司名字网站项目建设流程图
  • 大数据存储组件分别位于数据仓库的哪一层
  • Dubbo应用开发之RPC直连开发
  • 坦电容做电源滤波,放在陶瓷电容的前面还是后面好
  • 北京城建亚泰建设集团有限公司网站首页wordpress中文教程 下载
  • 虚幻引擎5 GAS开发俯视角RPG游戏 P06-13 属性菜单 - 边框值
  • Bash 括号:()、{}、[]、$()、$(() )、${}、[[]] 到底有什么区别?