- 博客(17)
- 收藏
- 关注
原创 llama.cpp项目构建
1.cmake -B build -DGGML_CUDA=ON #检测当前系统中的C/C++编译器、Git、CMAKE、CUDA Toolkit并写入当前目前下生成build文件夹,生成构建系统。2.cmake --build build --config Release #要编译项目,指定构建配置为Release版本。
2025-01-16 14:15:22
191
原创 torchrun远程Debug
ln -s /root/miniconda3/envs/chinease_llma_alpaca/bin/torchrun 工作区/torchrun。4.配置项目debug,选择'工作区/torchrun' 及对应参数即可。需求:使用pycharm远程连接训练服务器,debug torchrun分布式训练。2.同步远程 '工作区/torchrun' 至本地。3.配置远程python解释器。
2025-01-13 10:26:08
223
原创 ImportError: cannot import name ‘import_path‘ from ‘_pytest.doctest‘
问题:ImportError: cannot import name 'import_path' from '_pytest.doctest'原因:Pytest8.0.1+有这个错误,只需要降低Pytest版本就可以。解决方案:pip install pytest==8.0.0。
2025-01-12 12:24:48
234
原创 ImportError: No module named ‘google‘
执行命令:pip install --upgrade google-api-python-client 即可使用google包。问题:pip install google 后依然无法使用Google包。解决:google包官方安装使用说明。
2025-01-12 11:15:50
202
原创 torch.nn.Dropout(p,inplace)说明
1.在训练阶段,以概率p随机将input中的元素置0,概率分布满足Bernoulli 分布。2.在训练阶段,其他未被置0的元素乘于一个因子(1/(1-p))明显可以看出来其余未被置0的元素被乘了一个因子。提高泛化能力,防止特征检测器的共同适应。
2025-01-04 10:59:51
163
原创 LabelSmoother计算损失
shift_labels 为标签移位标识,false不移位,true需要移位(logits 倒数第二个维度删除最后一行;则,input_ids=[我,爱,中,国] = [100, 101, 102, 103]原始预训练语料为:我爱中国 (分词结果为[100, 101, 102, 103])2.nll_loss 为-log(softmaxt(C)),C为对应的labels的值。logits=[爱,中,国] = [101, 102, 103]labels=[爱,中,国] = [101, 102, 103]
2024-12-30 14:28:09
177
原创 自动混合精度(amp)与梯度缩放
包提供便利的混合精度操作方法,即对应不同的层采取不一样的浮点数精度(),以减小模型计算时间与内存资源为目的。配合完成自动混合精度的功能。
2024-12-27 09:52:38
218
原创 Tensorflow keras‘s layer of conv2d output shape understanding
keras 内部处理卷积层时,非人化操作filter shape造成初学者误导,无法理解output shape。实际上挺简单,keras依据实际input的channels_nums,将filter shape由(origin_width,origin_height)-->(origin_width,origin_height,channels_nums),进行卷积计算,并将各个不同的channel计算结果相加,得到最终结果。
2024-05-20 16:53:08
194
1
原创 修复Python read file:UnicodeDecodeError: ‘gbk’ codec can’t decode
修复Python read file:UnicodeDecodeError: ‘gbk’ codec can’t decode
2024-01-29 16:03:54
437
原创 Docker Desktop error: WslRegisterDistribution failed with error: 0x80070531
Docker Desktop 错误0x80070531
2024-01-12 13:47:39
726
1
原创 Adress docker office ‘multi-container-app‘ tutorial error
Additional property develop is not allowed;=> ERROR resolve image config for docker.io/docker/dockerfile:1
2024-01-11 15:26:08
438
1
原创 python 函数参数中的f: Callable[[T], Iterable[U]]说明
所以,f: Callable[[T], Iterable[U]]表示入参f是一个入参为T,返回值为Iterable[U]类型的函数。这种写法必须使用两个确定的值才能使用,即参数列表和返回类型。参数列表是必须是一组类型或一个省略号...,返回类型必须是一个单值。期待信号回调函数的框架可以被简写为Callable。是一个入参类型为int,返回值为str的函数。
2023-09-28 15:29:53
290
原创 Linux远程访问windows——创建文件夹and复制文件
1.Linux远程连接windows并创建文件夹C:\Users\xxx:sshpass -p windows密码ssh -o StrictHostKeyChecking=no -p 端口号 windowsUserName@windowsIp "mkdir -p C:\Users\xxx"前提:Linux机器安装sshpass:apt-get install sshpass;windows启动openssh服务。
2022-11-24 16:48:14
1547
1
转载 intellij IDEA2021.1 Maven project使用
Create a new Maven project If no project is currently open in IntelliJ IDEA, clickNew Projecton the Welcome screen. Otherwise, selectFile | New | Projectfrom the main menu. SelectMavenfrom the options on the left. Specify project's SDK (J...
2021-07-02 15:32:01
534
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人