上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 404 下一页
摘要: Transformers 源码解析(五十四) .\models\gpt2\tokenization_gpt2.py # 设置脚本的编码格式为UTF-8 # 引入必要的模块和函数 import json # 导入用于 JSON 操作的模块 import os # 导入用于操作系统功能的模块 from 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十三) .\models\glpn\convert_glpn_to_pytorch.py # 导入必要的模块和库 import argparse # 导入命令行参数解析模块 from collections import OrderedDict # 导入有序字典 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十七) .\models\groupvit\modeling_tf_groupvit.py # coding=utf-8 # Copyright 2022 NVIDIA and The HuggingFace Team. All rights reserved. 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十六) .\models\gpt_neox\tokenization_gpt_neox_fast.py # 设置脚本文件的编码格式为UTF-8 # 版权声明,指出此代码的版权归EleutherAI和The HuggingFace Inc.团队所有 # # 根据A 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十九) .\models\idefics\perceiver.py def __init__( self, config: IdeficsConfig, embed_dim: int, depth: int, n_heads: int, head_dim: in 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十二) .\models\gemma\convert_gemma_weights_to_hf.py # 版权声明和信息 # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Li 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(61) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十八) .\models\hubert\modeling_tf_hubert.py # 设置编码为 UTF-8 # 版权声明,指明版权归 Fairseq 作者和 HuggingFace Inc. 团队所有 # # 根据 Apache License, Versi 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五十) .\models\fnet\tokenization_fnet.py # coding=utf-8 # 上面的行声明了文件编码格式为 UTF-8,确保可以正确处理中文和其他特殊字符 # Copyright 2021 Google Research, Goo 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(9) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(五) .\generation\stopping_criteria.py # 导入时间模块,用于处理时间相关功能 import time # 导入警告模块,用于发出警告信息 import warnings # 导入抽象基类模块,用于定义抽象类 from abc i 阅读全文
posted @ 2024-06-30 15:37 绝不原创的飞龙 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Transformers 源码解析(四十一) .\models\distilbert\tokenization_distilbert.py # coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # Licensed under th 阅读全文
posted @ 2024-06-30 15:37 绝不原创的飞龙 阅读(26) 评论(0) 推荐(0) 编辑
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 404 下一页