iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > Python >国外资源国内镜像访问(亲测)
  • 246
分享到

国外资源国内镜像访问(亲测)

人工智能pythonPoweredby金山文档 2023-08-31 05:08:10 246人浏览 泡泡鱼

Python 官方文档:入门教程 => 点击学习

摘要

关于huggingface模型下载: 手动下载:https://mirrors.tuna.tsinghua.edu.cn/hugging-face-models/hfl/ 代码下载: import llama#MODEL = '/ho

关于huggingface模型下载:

手动下载:https://mirrors.tuna.tsinghua.edu.cn/hugging-face-models/hfl/

代码下载:

import llama#MODEL = '/home/guo/llama_test/llama_model'MODEL = 'decapoda-research/llama-7b-hf'# MODEL = 'decapoda-research/llama-13b-hf'# MODEL = 'decapoda-research/llama-30b-hf'# MODEL = 'decapoda-research/llama-65b-hf'#建议使用tuna 与 bfsutokenizer = llama.LLaMATokenizer.from_pretrained(MODEL,mirror='tuna')model = llama.LLaMAForCausalLM.from_pretrained(MODEL, mirror='tuna',low_cpu_mem_usage = True)model.to('cpu')batch = tokenizer("Yo mama", return_tensors = "pt")print(tokenizer.decode(model.generate(batch["input_ids"], max_length=100)[0]))

关于GitHub的镜像仓库下载,

参考:(4条消息) git clone 换源 / GitHub 国内镜像_git换源_面里多加汤的博客-CSDN博客

https://gitclone.com# 服务器位于杭州(可用)使用方式:原始git地址:Https://github.com/junegunn/vim-plug克隆地址: git clone https://gitclone.com/github.com/junegunn/vim-plug

关于pypi源:

linux进入到~/.pip/pip.conf[global]index-url=http://mirrors.aliyun.com/pypi/simpletrusted-host=mirrors.aliyun.comwindow进入到~/pip/pip.conf[global]index-url=http://mirrors.aliyun.com/pypi/simpletrusted-host=mirrors.aliyun.com

关于conda源:

在~/.condarc修改conda 源:channels:  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/PyTorch/  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/show_channel_urls: truessl_verify: false原文链接:https://blog.csdn.net/sslfk/article/details/127857073

来源地址:https://blog.csdn.net/sslfk/article/details/129582255

--结束END--

本文标题: 国外资源国内镜像访问(亲测)

本文链接: https://www.lsjlt.com/news/384284.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作