File size: 2,439 Bytes
cc857c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import json, urllib.request, urllib.parse, sys
# number -> explicit repos, or "?search term"
M = {47787:["BlinkDL/rwkv7-g1","?rwkv7"],47692:["amazon/chronos-2"],45099:["naver-hyperclovax/HyperCLOVAX-SEED-Vision-Instruct-3B"],
 43671:["?Qwen3-TTS"],42758:["microsoft/VibeVoice-1.5B"],42209:["?evo2"],41081:["lmms-lab/LLaVA-OneVision-1.5-8B-Instruct"],
 40649:["StarJiaxing/HumanOmni-7B"],38708:["yigitbekir/Bert2D-cased-Turkish-128K-WWM-NSW2"],37165:["?QLIP"],36817:["EuroBERT/EuroBERT-210m"],
 36398:["?TransPixar"],36205:["?dino-detr"],36111:["deepseek-ai/deepseek-vl2"],35882:["?co-detr"],34651:["LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct"],
 32164:["dereksiyuanli/masa"],30995:["nomic-ai/nomic-embed-text-v1.5","nomic-ai/nomic-embed-code"],30791:["deepseek-ai/DeepSeek-V2"],
 29823:["?MoAI"],29482:["?LargeWorldModel"],27453:["?audiomae"],27031:["GLIPModel/GLIP"],26628:["lj1995/VoiceConversionWebUI"],
 26269:["tensorgirl/TFaugvit"],25293:["?massformer"],25123:["charactr/vocos-mel-24khz","charactr/vocos-encodec-24khz"],23846:["?LaVIN"],
 22315:["?megatron-t5"],22178:["?beit3"],20133:["?compact-transformer"],19081:["?unified-io"],17339:["?trillsson"],17224:["?albef"],
 16466:["?teams-electra"],15763:["?tunet"],12807:["?blenderbot2"],9526:["?smith"],7675:["?performer"]}
API="https://huggingface.co/api/models"
def get(u):
    try: return json.load(urllib.request.urlopen(u, timeout=20))
    except Exception as e: return None
out={}
for i,(n,specs) in enumerate(M.items(),1):
    res=[]
    for s in specs:
        if s.startswith("?"):
            hits=get(f"{API}?search={urllib.parse.quote(s[1:])}&sort=downloads&direction=-1&limit=3") or []
            res+= [h["id"] for h in hits]
        else: res.append(s)
    stats=[]
    for rid in res[:3]:
        d=get(f"{API}/{rid}?expand[]=downloads&expand[]=likes&expand[]=createdAt&expand[]=safetensors&expand[]=cardData&expand[]=tags")
        if d: stats.append({"id":rid,"dl":d.get("downloads"),"likes":d.get("likes"),"created":(d.get("createdAt") or "")[:7],
            "params":(d.get("safetensors") or {}).get("total"),"license":((d.get("cardData") or {}).get("license")),"remote":"custom_code" in (d.get("tags") or [])})
    out[n]=stats
    print(f"[{i}/{len(M)}] #{n} " + "; ".join(f"{s['id']} dl={s['dl']} likes={s['likes']} {s['created']} p={s['params']} lic={s['license']} rc={s['remote']}" for s in stats), flush=True)
json.dump(out,open("nm2_stats.json","w"),indent=1)