上一页 1 ··· 500 501 502 503 504 505 506 507 508 ··· 865 下一页
摘要: Transformers 源码解析(一) .\activations.py # 导入必要的库 import math from collections import OrderedDict # 导入 PyTorch 相关模块 import torch from packaging import ve 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(528) 评论(0) 推荐(0)
摘要: Transformers 源码解析(五十一) .\models\funnel\modeling_tf_funnel.py # coding=utf-8 # Copyright 2020-present Google Brain and Carnegie Mellon University Autho 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(100) 评论(0) 推荐(0)
摘要: Transformers 源码解析(五十五) .\models\gptsan_japanese\tokenization_gptsan_japanese.py # 指定文件编码为 UTF-8 # 版权声明,版权归 HuggingFace Inc. 团队所有 # # 根据 Apache 许可证 2.0 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(256) 评论(0) 推荐(0)
摘要: Transformers 源码解析(五十四) .\models\gpt2\tokenization_gpt2.py # 设置脚本的编码格式为UTF-8 # 引入必要的模块和函数 import json # 导入用于 JSON 操作的模块 import os # 导入用于操作系统功能的模块 from 阅读全文
posted @ 2024-06-30 15:39 绝不原创的飞龙 阅读(151) 评论(0) 推荐(0)
摘要: Transformers 源码解析(五十三) .\models\glpn\convert_glpn_to_pytorch.py # 导入必要的模块和库 import argparse # 导入命令行参数解析模块 from collections import OrderedDict # 导入有序字典 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(147) 评论(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 绝不原创的飞龙 阅读(106) 评论(0) 推荐(0)
摘要: Transformers 源码解析(五十六) .\models\gpt_neox\tokenization_gpt_neox_fast.py # 设置脚本文件的编码格式为UTF-8 # 版权声明,指出此代码的版权归EleutherAI和The HuggingFace Inc.团队所有 # # 根据A 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(201) 评论(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 绝不原创的飞龙 阅读(384) 评论(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 绝不原创的飞龙 阅读(574) 评论(0) 推荐(0)
摘要: Transformers 源码解析(五十八) .\models\hubert\modeling_tf_hubert.py # 设置编码为 UTF-8 # 版权声明,指明版权归 Fairseq 作者和 HuggingFace Inc. 团队所有 # # 根据 Apache License, Versi 阅读全文
posted @ 2024-06-30 15:38 绝不原创的飞龙 阅读(179) 评论(0) 推荐(0)
上一页 1 ··· 500 501 502 503 504 505 506 507 508 ··· 865 下一页