Skip to content

Instantly share code, notes, and snippets.

View luuil's full-sized avatar
🎯
Focusing

luuil

🎯
Focusing
View GitHub Profile
@luuil
luuil / hfdown.py
Last active March 20, 2025 11:18
hfdown: Download file/repo from url of huggingface
"""
# @ Author: Lu Liu
# @ Create Time: 2024-12-05 14:28:43
# @ Modified by: Lu Liu
# @ Modified time: 2025-03-20 18:56:59
# @ Description: 从huggingface下载
# - 整个repo
# - 单个文件
# huya海聪平台外网加速器 https://ai.huya.com/docs/QA/common.html#%E9%80%9A%E7%94%A8%E5%A4%96%E7%BD%91%E4%B8%8B%E8%BD%BD%E5%8A%A0%E9%80%9F%E5%99%A8
@luuil
luuil / ollama_model_download.py
Created February 8, 2025 08:26
Used with the `ollama-model-direct-download` software, you can download ollama models with one click.
"""
Manually download the ollama model
1. You need a software (Linux only): https://github.com/amirrezaDev1378/ollama-model-direct-download
2. Use the software to get the download links of the model, it will output 6 links. (If the file downloaded from the release page is not available, you need to install the Go environment and compile it yourself)
3. You can manually download them, or use this script to download all at once.
"""
import subprocess
import re
import json
import requests