Pin the community ONNX mirrors to their own commit revisions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu tại code/frontend/src/lib/staticClient/arch.ts và kiểm tra đầu ra meta.json của exporter cho từng model, sau đó lần theo cách transformersRuntime.ts gọi pipeline(...). Kiểm tra phản hồi của API model Hugging Face cho từng mirror ONNX_REPOS và xác minh rằng việc tải trong trình duyệt sau đó sử dụng SHA riêng của mirror. Hoàn thành nghĩa là quá trình tạo đã ghim phiên bản hoạt động trong trình duyệt, các revision cũ sẽ thất bại với lỗi bằng ngôn ngữ dễ hiểu, và danh sách model được tuyển chọn có một nguồn sự thật duy nhất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What
In the static build, in-browser generation resolves the community ONNX mirror (e.g. onnx-community/gpt2-ONNX) at main. Everything else the site fetches is pinned: the tokenizer and the safetensors weight windows both use the model repo's recorded commit SHA.
This is the one path where the bytes executed in a visitor's browser can change without a code change here.
Why it isn't already fixed
The obvious fix — pass the recorded revision through to pipeline(...) — is wrong, and was measured to be wrong:
Could not locate file: "https://huggingface.co/onnx-community/gpt2-ONNX/resolve/607a30d783dfa663caf39e06633721c8d4cfcd7e/tokenizer.json"
607a30d7… is gpt2's commit. The ONNX mirror is a different repository with its own commit history, so the model repo's SHA 404s against it. Attempting this broke generation entirely until it was reverted.
What a real fix looks like
Record each mirror's own revision:
- Resolve the mirror's head SHA at export time (
GET https://huggingface.co/api/models/<mirror>→sha), for the mirrors listed inONNX_REPOS(code/frontend/src/lib/staticClient/arch.ts). - Write it into the per-model
meta.jsonthe exporter emits (e.g.onnx_repo+onnx_revision), so the mapping lives with the data rather than hard-coded in the frontend. - Pass that SHA to
pipeline(..., { revision })intransformersRuntime.ts.
Step 2 is the substantive one: it also removes the hard-coded ONNX_REPOS map from the frontend, which is currently a second place the curated model list has to be kept in sync.
Acceptance
- Generation resolves a pinned SHA, verified in a browser (not just in types).
- A stale/incorrect SHA fails loudly at load with a plain-language error, not a hang.
- The curated model list has exactly one source of truth.
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ContextLab/llm-geometry
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 70/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
getting startedĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
ContextLab/llm-geometry#1 · 9 bình luận ·
Tất cả issue của ContextLab/llm-geometry
Issue tương tự
-
area:frontend kind:bug priority:p2 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
handsontable/hyperformula#1879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
RunestoneInteractive/rs#1661 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
capricorn86/happy-dom#2594 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày