Spaces:
Running
v0.8.5-fix: spec-decode examples → open-weight pairs (HF auth not required)
Browse filesBug report from user: clicking the "good example" button returned
"Target: model is gated or private (HTTP 401)". Llama-3.1 needs Meta
license acceptance + HF login, which a public browser fetch cannot
satisfy.
Switched both default examples to OPEN-WEIGHT models that 200 from a
non-authenticated request:
- Good (compatible): Qwen/Qwen2.5-72B-Instruct + Qwen/Qwen2.5-7B-Instruct
- Bad (incompatible): Qwen/Qwen2.5-7B-Instruct + microsoft/Phi-3.5-mini-instruct
Verified all three tokenizer.json URLs return 200 via curl.
Added an inline note ("💡 Gated models require HF login...") under the
input fields so users learn why Llama/Mistral/Gemma fail and which
families work without auth (Qwen/Phi/DeepSeek/Yi/StarCoder/Falcon).
4-lang i18n added (EN/ES/FR/ZH).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- index.html +6 -3
- js/i18n.js +8 -4
- js/main.js +8 -4
|
@@ -1125,17 +1125,20 @@
|
|
| 1125 |
</p>
|
| 1126 |
<div class="form-row">
|
| 1127 |
<label for="spec-target-id" data-i18n="speculative.target_label">Target (large) model id:</label>
|
| 1128 |
-
<input type="text" id="spec-target-id" placeholder="
|
| 1129 |
</div>
|
| 1130 |
<div class="form-row">
|
| 1131 |
<label for="spec-draft-id" data-i18n="speculative.draft_label">Draft (small) model id:</label>
|
| 1132 |
-
<input type="text" id="spec-draft-id" placeholder="
|
| 1133 |
</div>
|
| 1134 |
<div class="form-row">
|
| 1135 |
<button type="button" id="spec-check-btn" data-i18n="speculative.check_btn">🔍 Check compatibility</button>
|
| 1136 |
-
<button type="button" id="spec-example-good-btn" class="secondary" data-i18n="speculative.example_good_btn">↳ Example:
|
| 1137 |
<button type="button" id="spec-example-bad-btn" class="secondary" data-i18n="speculative.example_bad_btn">↳ Example: cross-family (bad)</button>
|
| 1138 |
</div>
|
|
|
|
|
|
|
|
|
|
| 1139 |
<p id="spec-status" class="recipe-desc" style="font-size:0.92em;"></p>
|
| 1140 |
<div id="spec-output" style="margin-top: 1em;"></div>
|
| 1141 |
</section>
|
|
|
|
| 1125 |
</p>
|
| 1126 |
<div class="form-row">
|
| 1127 |
<label for="spec-target-id" data-i18n="speculative.target_label">Target (large) model id:</label>
|
| 1128 |
+
<input type="text" id="spec-target-id" placeholder="Qwen/Qwen2.5-72B-Instruct" style="flex:1;" />
|
| 1129 |
</div>
|
| 1130 |
<div class="form-row">
|
| 1131 |
<label for="spec-draft-id" data-i18n="speculative.draft_label">Draft (small) model id:</label>
|
| 1132 |
+
<input type="text" id="spec-draft-id" placeholder="Qwen/Qwen2.5-7B-Instruct" style="flex:1;" />
|
| 1133 |
</div>
|
| 1134 |
<div class="form-row">
|
| 1135 |
<button type="button" id="spec-check-btn" data-i18n="speculative.check_btn">🔍 Check compatibility</button>
|
| 1136 |
+
<button type="button" id="spec-example-good-btn" class="secondary" data-i18n="speculative.example_good_btn">↳ Example: Qwen2.5 7B/72B (good)</button>
|
| 1137 |
<button type="button" id="spec-example-bad-btn" class="secondary" data-i18n="speculative.example_bad_btn">↳ Example: cross-family (bad)</button>
|
| 1138 |
</div>
|
| 1139 |
+
<p class="recipe-desc subtle" style="font-size:0.82em;" data-i18n="speculative.gated_note">
|
| 1140 |
+
💡 <strong>Gated models</strong> (Llama, Mistral, Gemma) require HF login + license acceptance — this tool can't auth, so they return 401. Use open-weight pairs (Qwen, Phi, DeepSeek, Yi, StarCoder, Falcon) for demos.
|
| 1141 |
+
</p>
|
| 1142 |
<p id="spec-status" class="recipe-desc" style="font-size:0.92em;"></p>
|
| 1143 |
<div id="spec-output" style="margin-top: 1em;"></div>
|
| 1144 |
</section>
|
|
@@ -648,8 +648,9 @@ export const TRANSLATIONS = {
|
|
| 648 |
"speculative.target_label_short": "target",
|
| 649 |
"speculative.draft_label_short": "draft",
|
| 650 |
"speculative.check_btn": "🔍 Check compatibility",
|
| 651 |
-
"speculative.example_good_btn":"↳ Example:
|
| 652 |
"speculative.example_bad_btn": "↳ Example: cross-family (bad)",
|
|
|
|
| 653 |
"speculative.status.fetching": "🔄 Fetching tokenizer.json from HF Hub for both models…",
|
| 654 |
"speculative.status.done": "✅ {verdict}",
|
| 655 |
"speculative.status.error": "❌ Error",
|
|
@@ -1801,8 +1802,9 @@ export const TRANSLATIONS = {
|
|
| 1801 |
"speculative.target_label_short": "target",
|
| 1802 |
"speculative.draft_label_short": "draft",
|
| 1803 |
"speculative.check_btn": "🔍 Verificar compatibilidad",
|
| 1804 |
-
"speculative.example_good_btn":"↳ Ejemplo:
|
| 1805 |
"speculative.example_bad_btn": "↳ Ejemplo: cross-family (malo)",
|
|
|
|
| 1806 |
"speculative.status.fetching": "🔄 Haciendo fetch de tokenizer.json desde HF Hub para ambos modelos…",
|
| 1807 |
"speculative.status.done": "✅ {verdict}",
|
| 1808 |
"speculative.status.error": "❌ Error",
|
|
@@ -2818,8 +2820,9 @@ export const TRANSLATIONS = {
|
|
| 2818 |
"speculative.target_label_short": "target",
|
| 2819 |
"speculative.draft_label_short": "draft",
|
| 2820 |
"speculative.check_btn": "🔍 Vérifier compatibilité",
|
| 2821 |
-
"speculative.example_good_btn":"↳ Exemple :
|
| 2822 |
"speculative.example_bad_btn": "↳ Exemple : cross-family (mauvais)",
|
|
|
|
| 2823 |
"speculative.status.fetching": "🔄 Récupération de tokenizer.json depuis HF Hub pour les deux modèles…",
|
| 2824 |
"speculative.status.done": "✅ {verdict}",
|
| 2825 |
"speculative.status.error": "❌ Erreur",
|
|
@@ -3835,8 +3838,9 @@ export const TRANSLATIONS = {
|
|
| 3835 |
"speculative.target_label_short": "target",
|
| 3836 |
"speculative.draft_label_short": "draft",
|
| 3837 |
"speculative.check_btn": "🔍 检查兼容性",
|
| 3838 |
-
"speculative.example_good_btn":"↳ 示例:
|
| 3839 |
"speculative.example_bad_btn": "↳ 示例:跨 family(坏)",
|
|
|
|
| 3840 |
"speculative.status.fetching": "🔄 从 HF Hub 获取两个模型的 tokenizer.json…",
|
| 3841 |
"speculative.status.done": "✅ {verdict}",
|
| 3842 |
"speculative.status.error": "❌ 错误",
|
|
|
|
| 648 |
"speculative.target_label_short": "target",
|
| 649 |
"speculative.draft_label_short": "draft",
|
| 650 |
"speculative.check_btn": "🔍 Check compatibility",
|
| 651 |
+
"speculative.example_good_btn":"↳ Example: Qwen2.5 7B/72B (good)",
|
| 652 |
"speculative.example_bad_btn": "↳ Example: cross-family (bad)",
|
| 653 |
+
"speculative.gated_note": "💡 <strong>Gated models</strong> (Llama, Mistral, Gemma) require HF login + license acceptance — this tool can't auth, so they return 401. Use open-weight pairs (Qwen, Phi, DeepSeek, Yi, StarCoder, Falcon) for demos.",
|
| 654 |
"speculative.status.fetching": "🔄 Fetching tokenizer.json from HF Hub for both models…",
|
| 655 |
"speculative.status.done": "✅ {verdict}",
|
| 656 |
"speculative.status.error": "❌ Error",
|
|
|
|
| 1802 |
"speculative.target_label_short": "target",
|
| 1803 |
"speculative.draft_label_short": "draft",
|
| 1804 |
"speculative.check_btn": "🔍 Verificar compatibilidad",
|
| 1805 |
+
"speculative.example_good_btn":"↳ Ejemplo: Qwen2.5 7B/72B (bueno)",
|
| 1806 |
"speculative.example_bad_btn": "↳ Ejemplo: cross-family (malo)",
|
| 1807 |
+
"speculative.gated_note": "💡 <strong>Modelos gated</strong> (Llama, Mistral, Gemma) requieren login HF + aceptar licencia — esta tool no puede autenticar, así que devuelven 401. Usa pares open-weight (Qwen, Phi, DeepSeek, Yi, StarCoder, Falcon) para demos.",
|
| 1808 |
"speculative.status.fetching": "🔄 Haciendo fetch de tokenizer.json desde HF Hub para ambos modelos…",
|
| 1809 |
"speculative.status.done": "✅ {verdict}",
|
| 1810 |
"speculative.status.error": "❌ Error",
|
|
|
|
| 2820 |
"speculative.target_label_short": "target",
|
| 2821 |
"speculative.draft_label_short": "draft",
|
| 2822 |
"speculative.check_btn": "🔍 Vérifier compatibilité",
|
| 2823 |
+
"speculative.example_good_btn":"↳ Exemple : Qwen2.5 7B/72B (bon)",
|
| 2824 |
"speculative.example_bad_btn": "↳ Exemple : cross-family (mauvais)",
|
| 2825 |
+
"speculative.gated_note": "💡 <strong>Modèles gated</strong> (Llama, Mistral, Gemma) requièrent login HF + acceptation de licence — cet outil ne peut pas auth, ils renvoient 401. Utilisez des paires open-weight (Qwen, Phi, DeepSeek, Yi, StarCoder, Falcon) pour les démos.",
|
| 2826 |
"speculative.status.fetching": "🔄 Récupération de tokenizer.json depuis HF Hub pour les deux modèles…",
|
| 2827 |
"speculative.status.done": "✅ {verdict}",
|
| 2828 |
"speculative.status.error": "❌ Erreur",
|
|
|
|
| 3838 |
"speculative.target_label_short": "target",
|
| 3839 |
"speculative.draft_label_short": "draft",
|
| 3840 |
"speculative.check_btn": "🔍 检查兼容性",
|
| 3841 |
+
"speculative.example_good_btn":"↳ 示例:Qwen2.5 7B/72B(好)",
|
| 3842 |
"speculative.example_bad_btn": "↳ 示例:跨 family(坏)",
|
| 3843 |
+
"speculative.gated_note": "💡 <strong>受限模型</strong>(Llama、Mistral、Gemma)需要 HF 登录 + 接受许可——这个工具无法 auth,所以会返回 401。请使用 open-weight 对(Qwen、Phi、DeepSeek、Yi、StarCoder、Falcon)作为演示。",
|
| 3844 |
"speculative.status.fetching": "🔄 从 HF Hub 获取两个模型的 tokenizer.json…",
|
| 3845 |
"speculative.status.done": "✅ {verdict}",
|
| 3846 |
"speculative.status.error": "❌ 错误",
|
|
@@ -4072,14 +4072,18 @@ async function runSpecCheck() {
|
|
| 4072 |
}
|
| 4073 |
|
| 4074 |
$("spec-check-btn")?.addEventListener("click", runSpecCheck);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4075 |
$("spec-example-good-btn")?.addEventListener("click", () => {
|
| 4076 |
-
$("spec-target-id").value = "
|
| 4077 |
-
$("spec-draft-id").value = "
|
| 4078 |
runSpecCheck();
|
| 4079 |
});
|
| 4080 |
$("spec-example-bad-btn")?.addEventListener("click", () => {
|
| 4081 |
-
$("spec-target-id").value = "
|
| 4082 |
-
$("spec-draft-id").value = "
|
| 4083 |
runSpecCheck();
|
| 4084 |
});
|
| 4085 |
|
|
|
|
| 4072 |
}
|
| 4073 |
|
| 4074 |
$("spec-check-btn")?.addEventListener("click", runSpecCheck);
|
| 4075 |
+
// Examples use OPEN-WEIGHT models (no HF gating). Llama / Mistral /
|
| 4076 |
+
// Gemma require license acceptance — they 401 from a public browser
|
| 4077 |
+
// fetch. Qwen2.5 + Phi-3.5 ship under permissive licenses so the
|
| 4078 |
+
// in-app demo Just Works without the user having to log in to HF.
|
| 4079 |
$("spec-example-good-btn")?.addEventListener("click", () => {
|
| 4080 |
+
$("spec-target-id").value = "Qwen/Qwen2.5-72B-Instruct";
|
| 4081 |
+
$("spec-draft-id").value = "Qwen/Qwen2.5-7B-Instruct";
|
| 4082 |
runSpecCheck();
|
| 4083 |
});
|
| 4084 |
$("spec-example-bad-btn")?.addEventListener("click", () => {
|
| 4085 |
+
$("spec-target-id").value = "Qwen/Qwen2.5-7B-Instruct";
|
| 4086 |
+
$("spec-draft-id").value = "microsoft/Phi-3.5-mini-instruct";
|
| 4087 |
runSpecCheck();
|
| 4088 |
});
|
| 4089 |
|