JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

PreTrainedModel 中 from_pretrained 和 load_state_dict 的关联

发布时间 2023-11-09 23:37:39作者: WActen

from_pretrained

  1. AutoTokenizer.from_pretrained:从path/vocab.json中加载tokenizer

  2. AutoConfig.from_pretrained:从path/config.json中加载模型配置信息

    • 更新模型配置信息:model = Model(config)
  3. PreTrainedModel.from_pretrained:加载模型结构和模型参数

load_checkpoint

从 checkpoint 中加载模型 parameter,而不加载模型结构

    本栏目推荐文章
  • 2024-01-13 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. ==》引用了未使用的方法导致
  • 状态模式(state)
  • xPU pipeline and state machine
  • 状态模式 State
  • prometheus监控k8s集群信息(通过kube-state-metrics)
  • 关于再次出现 Could not open client transport with JDBC Uri: jdbc:hive2://node1:10000: java.net.ConnectException: 拒绝连接 (Connection refused) (state=08S01,code=0)
  • 【论文阅读笔记】【多模态-Vision-Language Pretraining】 BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation
  • 《Mamba: Linear-Time Sequence Modeling with Selective State Spaces》阅读笔记
  • Linux: CPU C-states
  • AM trader Change in State of Delivery (CISD) - Making Reversals Easy
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们