当前位置:   article > 正文

注册 Hugging Face 后的官网创建模型的教程_huggingface如何创建

huggingface如何创建

Welcome

Create a new model

From the website

Hub documentation

Take a first look at the Hub features

Programmatic access

Use the Hub’s Python client library

Getting started with our git and git-lfs interface

You can create a repository from the CLI (skip if you created a repo from the website)

 
pip install huggingface_hub
						
You already have it if you installed transformers or datasets
	
						
huggingface-cli login
						
Log in using a token from huggingface.co/settings/tokens
						
Create a model or dataset repo from the CLI if needed
						
huggingface-cli repo create repo_name --type {model, dataset, space}
					

Clone your model, dataset or Space locally

 
Make sure you have git-lfs installed
					
(https://git-lfs.github.com)
					
git lfs install
					
git clone https://huggingface.co/username/repo_name
				

Then add, commit and push any file you want, including larges files

 
 save files via `.save_pretrained()` or move them here
						
git add .
						
git commit -m "commit from $USER"
						
git push
					

In most cases, if you're using one of the compatible libraries, your repo will then be accessible from code, through its identifier: username/repo_name

For example for a transformers model, anyone can load it with:

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

闽ICP备14008679号