当前位置:   article > 正文

Hugging Face使用笔记_haggingface注册教程

haggingface注册教程

1. HuggingFace简介

Hugging Face Hub和 Github 类似,都是Hub(社区)。Hugging Face可以说的上是机器学习界的Github。Hugging Face为用户提供了以下主要功能:

  • 模型仓库(Model Repository):Git仓库可以让你管理代码版本、开源代码。而模型仓库可以让你管理模型版本、开源模型等。使用方式与Github类似。
  • 模型(Models):Hugging Face为不同的机器学习任务提供了许多预训练好的机器学习模型供大家使用,这些模型就存储在模型仓库中。
  • 数据集(Dataset):Hugging Face上有许多公开数据集。

hugging face在NLP领域最出名,其提供的模型大多都是基于Transformer的。为了易用性,Hugging Face还为用户提供了以下几个项目:

  • Transformers(github, 官方文档):Transformers提供了上千个预训练好的模型可以用于不同的任务,例如文本领域、音频领域和CV领域。该项目是HuggingFace的核心,可以说学习HuggingFace就是在学习该项目如何使用。
  • Datasets(github, 官方文档):一个轻量级的数据集框架,主要有两个功能:①一行代码下载和预处理常用的公开数据集; ② 快速、易用的数据预处理类库。
  • Accelerate(github, 官方文档):帮助Pytorch用户很方便的实现 multi-GPU/TPU/fp16。
  • Space(链接):Space提供了许多好玩的深度学习应用,可以尝试玩一下。

2. 注册与登陆

这里不用多说,使用邮箱注册,邮箱验证,然后登陆

3. 配置token

关于这个类型的定义,有如下说明:

  • fine-grained: tokens with this role can be used to provide fine-grained access to specific resources, such as a specific model or models in a specific organization. This type of token is useful in production environments, as you can use your own token without sharing access to all your resources.
  • read: tokens with this role can only be used to provide read access to repositories you could read. That includes public and private repositories that you, or an organization you’re a member of, own. Use this role if you only need to read content from the Hugging Face Hub (e.g. when downloading private models or doing inference).
  • write: tokens with this role additionally grant write access to the repositories you have write access to. Use this token if you need to create or push content to a repository (e.g., when training a model or modifying a model card).

4. 下载数据

这里会给你命令,按命令执行即可

注意:有时下载时间可能很久(多达几十小时),而且没有进度条。

5. 下载预训练模型

注意:有时下载时间可能很久(多达几十小时),而且没有进度条。  

参考文献

Hugging Face快速入门(重点讲解模型(Transformers)和数据集部分(Datasets))_huggingface-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/826368
推荐阅读
相关标签
  

闽ICP备14008679号