Spaces:
Running
Running
Move API docs to separate static Space
Browse files- Dockerfile +3 -6
- README.md +4 -2
- api-docs/example-results/dataset-audit-sft-plan.json +0 -80
- api-docs/example-results/diffusion-language-models.json +0 -79
- api-docs/example-results/fast-english-transcription-model.json +0 -88
- api-docs/example-results/finetune-imdb-artifact.json +0 -266
- api-docs/example-results/multiturn-rag-followup.json +0 -142
- api-docs/example-results/rag-embedding-reranker-selection.json +0 -72
- api-docs/example-results/sparse-autoencoders-interpretability.json +0 -87
- api-docs/index.html +0 -912
- backend/main.py +7 -0
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
# API-only Space image: same backend/agent as the main Space
|
| 2 |
-
#
|
| 3 |
-
#
|
| 4 |
FROM python:3.12-slim
|
| 5 |
|
| 6 |
# Install uv directly from official image
|
|
@@ -29,9 +29,6 @@ COPY agent/ ./agent/
|
|
| 29 |
COPY backend/ ./backend/
|
| 30 |
COPY configs/ ./configs/
|
| 31 |
|
| 32 |
-
# Static self-documenting API landing page (served at /)
|
| 33 |
-
COPY api-docs/ ./static/
|
| 34 |
-
|
| 35 |
# Create directories and set ownership
|
| 36 |
RUN mkdir -p /app/session_logs && \
|
| 37 |
chown -R user:user /app
|
|
|
|
| 1 |
+
# API-only Space image: same backend/agent as the main Space. Documentation is
|
| 2 |
+
# served from abidlabs/ml-intern-api-docs so docs-only changes do not rebuild
|
| 3 |
+
# or restart this API server.
|
| 4 |
FROM python:3.12-slim
|
| 5 |
|
| 6 |
# Install uv directly from official image
|
|
|
|
| 29 |
COPY backend/ ./backend/
|
| 30 |
COPY configs/ ./configs/
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
# Create directories and set ownership
|
| 33 |
RUN mkdir -p /app/session_logs && \
|
| 34 |
chown -R user:user /app
|
README.md
CHANGED
|
@@ -17,8 +17,10 @@ send a task with your Hugging Face token as a Bearer header, the agent
|
|
| 17 |
researches/codes/launches HF Jobs under **your** namespace, and streams
|
| 18 |
results + artifacts (trackio dashboards, jobs, models) over resumable SSE.
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
|
| 23 |
The docs include verified public-endpoint examples, starting with short
|
| 24 |
research/model-selection tasks and extending to longer artifact-producing runs.
|
|
|
|
| 17 |
researches/codes/launches HF Jobs under **your** namespace, and streams
|
| 18 |
results + artifacts (trackio dashboards, jobs, models) over resumable SSE.
|
| 19 |
|
| 20 |
+
Interactive API documentation is served separately at
|
| 21 |
+
https://abidlabs-ml-intern-api-docs.hf.space so docs-only changes do not
|
| 22 |
+
restart this backend Space. Endpoints live under `/v1` — start at
|
| 23 |
+
`POST /v1/responses`.
|
| 24 |
|
| 25 |
The docs include verified public-endpoint examples, starting with short
|
| 26 |
research/model-selection tasks and extending to longer artifact-producing runs.
|
api-docs/example-results/dataset-audit-sft-plan.json
DELETED
|
@@ -1,80 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"request": {
|
| 3 |
-
"slug": "dataset-audit-sft-plan",
|
| 4 |
-
"title": "Audit a dataset and draft an SFT plan",
|
| 5 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 6 |
-
"instructions": "Do a practical ML-engineering audit. Use dataset inspection and current HF/TRL knowledge as needed, but keep the final answer concise and do not launch training jobs.",
|
| 7 |
-
"input": "Inspect the HuggingFaceH4/ultrachat_200k dataset for supervised fine-tuning viability. Report the available splits, key columns/format, any risks for SFT, and propose a 1-hour LoRA SFT smoke-test plan for Qwen/Qwen3-0.6B using current TRL/Transformers conventions. Keep under 600 words.",
|
| 8 |
-
"background": true,
|
| 9 |
-
"max_cost_usd": 3.0,
|
| 10 |
-
"metadata": {
|
| 11 |
-
"example_slug": "dataset-audit-sft-plan"
|
| 12 |
-
}
|
| 13 |
-
},
|
| 14 |
-
"response": {
|
| 15 |
-
"id": "resp_c63732bf03fc49b19d7cd141fa5fbd54",
|
| 16 |
-
"object": "response",
|
| 17 |
-
"created_at": 1781314944,
|
| 18 |
-
"completed_at": 1781315073,
|
| 19 |
-
"status": "completed",
|
| 20 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 21 |
-
"background": true,
|
| 22 |
-
"previous_response_id": null,
|
| 23 |
-
"session_id": "3626f79c-d105-4ebe-a035-091f625baae9",
|
| 24 |
-
"max_cost_usd": 3.0,
|
| 25 |
-
"instructions": "Do a practical ML-engineering audit. Use dataset inspection and current HF/TRL knowledge as needed, but keep the final answer concise and do not launch training jobs.",
|
| 26 |
-
"output": [
|
| 27 |
-
{
|
| 28 |
-
"type": "custom_tool_call",
|
| 29 |
-
"id": "hf_inspect_dataset_0",
|
| 30 |
-
"name": "hf_inspect_dataset",
|
| 31 |
-
"input": "{\"dataset\": \"HuggingFaceH4/ultrachat_200k\", \"sample_rows\": 10}",
|
| 32 |
-
"output": "# HuggingFaceH4/ultrachat_200k\n\n## Status\n\u2713 Valid (viewer, preview, search, filter, statistics)\n\n## Structure (configs & splits)\n| Config | Split |\n|--------|-------|\n| default | train_sft |\n| default | test_sft |\n| default | train_gen |\n| default | test_gen |\n\n## Sample Rows (default/train_sft)\n**Row 1:**\n- prompt: These instructions apply to section-based themes (Responsive 6.0+, Retina 4.0+, Parallax 3.0+ Turbo 2.0+, Mobilia 5.0+). What theme version am I using...\n- prompt_id: f0e37e9f7800261167ce91143f98f511f768847236f133f2d0aed60b444ebe57\n- messages: [{'content': \"These instructions apply to section-based themes (Responsive 6.0+, Retina 4.0+, Parallax 3.0+ Turbo 2.0+, Mobilia 5.0+). What theme vers...\n**Row 2:**\n- prompt: Which famous landmarks should I visit in London, beyond the usual ones?\n- prompt_id: f5025bdcae61bb77fd98a4d6cd6ba8e0199a098cfebcf6830f4a85e0d13a9e21\n- messages: [{'content': 'Which famous landmarks should I visit in London, beyond the usual ones?', 'role': 'user'}, {'content': \"1. Leadenhall Market - a beautif...\n**Row 3:**\n- prompt: Write a comprehensive blog post of at least 1000 words about the top 10 most eco-friendly cities in the world and their renewable energy initiatives. ...\n- prompt_id: 6db663a4d2671b41e0038c43c39f79cf909b10987dc5954286228079c2c78207\n- messages: [{'content': \"Write a comprehensive blog post of at least 1000 words about the top 10 most eco-friendly cities in the world and their renewable energy...\n**Row 4:**\n- prompt: De Le\u00f3n, previewing the speech he will give today, said he will highlight his Senate Bill 535, which directs a quarter of the proceeds from the Greenh...\n- prompt_id: dd1afba7d2151b0695edea838378c8fd086d538e62a6643f67b24b7afeaf7f19\n- messages: [{'content': 'De Le\u00f3n, previewing the speech he will give today, said he will highlight his Senate Bill 535, which directs a quarter of the proceeds f...\n**Row 5:**\n- prompt: Write an essay that evaluates the positive and negative influence of social media on personal relationships, citing specific examples and research to ...\n- prompt_id: cbf683405d8fe0221a42560cec50307d5fa9efa160c49d6d9b2522278f335f56\n- messages: [{'content': 'Write an essay that evaluates the positive and negative influence of social media on personal relationships, citing specific examples an...\n**Row 6:**\n- prompt: What many companies do when planning their global marketing strategies is to organize the world\u2019s countries into three categories.\nEmerging Markets \u2013 ...\n- prompt_id: e4fefd659416848d028ccfa3a87a7f530887c588feface5c4282e30b65fd7054\n- messages: [{'content': 'What many companies do when planning their global marketing strategies is to organize the world\u2019s countries into three categories.\\nEmer...\n**Row 7:**\n- prompt: Write a Python program that can identify and remove duplicate images from a given folder or directory. The program should be able to compare images ba...\n- prompt_id: b6c4eb83a6629ffd727a9b50a469062283b44c82d7008457f5fa111085c792ae\n- messages: [{'content': 'Write a Python program that can identify and remove duplicate images from a given folder or directory. The program should be able to com...\n**Row 8:**\n- prompt: Please provide a specific cooking method for the salmon, as well as any seasonings or ingredients necessary to complete the dish. Additionally, includ...\n- prompt_id: bb7ef3d3c15f467429ce09e2c44573c35a9ea55c4f28361755afeac2d90301c9\n- messages: [{'content': 'Please provide a specific cooking method for the salmon, as well as any seasonings or ingredients necessary to complete the dish. Additi...\n**Row 9:**\n- prompt: What are the classic cocktails that every bartender should know how to make and what are their ingredients?\n- prompt_id: db5deabb538bb2ffad351eaade86d6f2abd79e1923564f119a7b42b2dcd52bdb\n- messages: [{'content': 'What are the classic cocktails that every bartender should know how to make and what are their ingredients?', 'role': 'user'}, {'content...\n**Row 10:**\n- prompt: Write step-by-step instructions detailing how to make a creamy and tangy vegan cashew cheese, including a list of required ingredients\u2026 [truncated 840 chars]",
|
| 33 |
-
"status": "completed"
|
| 34 |
-
},
|
| 35 |
-
{
|
| 36 |
-
"type": "custom_tool_call",
|
| 37 |
-
"id": "research_1",
|
| 38 |
-
"name": "research",
|
| 39 |
-
"input": "{\"task\": \"Find current TRL SFTTrainer LoRA SFT conventions for small LLMs (0.5B-1B params). Read the latest SFTTrainer docs and a working example script. Focus on: SFTConfig parameters, PEFT LoRA config (r, alpha, dropout, target_modules), dataset formatting requirements (messages/text columns), current recommended learning rate and batch size for 1-hour smoke tests. Also check Qwen3-0.6B tokenizer special tokens/chat template.\", \"context\": \"Need to propose a 1-hour LoRA SFT smoke-test plan for Qwen/Qwen3-0.6B on ultrachat_200k. Must use current TRL/Transformers APIs. No training jobs to be launched.\"}",
|
| 40 |
-
"output": "## TRL SFTTrainer LoRA SFT Recipe for Qwen3-0.6B Smoke Test\n\n### Recipe Summary\n\n| Parameter | Value | Source |\n|---|---|---|\n| **Model** | `Qwen/Qwen3-0.6B` | TRL docs quickstart example |\n| **Dataset** | `HuggingFaceH4/ultrachat_200k` (split `train_sft`) | User request; `messages` column verified |\n| **Training** | LoRA SFT via `SFTTrainer` + `LoraConfig` | TRL PEFT integration docs |\n| **LoRA rank** | `r=32` (smoke test) or `r=256` (SFT scale) | TRL \"LoRA Without Regret\" guide |\n| **LoRA alpha** | `lora_alpha=16` | TRL PEFT docs |\n| **LoRA dropout** | `0.05` | TRL PEFT docs |\n| **Target modules** | `\"all-linear\"` | Schulman et al. 2025; TRL recommended |\n| **Task type** | `\"CAUSAL_LM\"` | Required |\n| **Learning rate** | `2.0e-4` (10x base `2e-5`) | TRL PEFT docs |\n| **Batch size** | `per_device_train_batch_size=1`, `gradient_accumulation_steps=4` | Effective batch = 4 (< 32 per LoRA Without Regret) |\n| **Precision** | `bf16=True` (default in SFTConfig) | SFTConfig defaults |\n| **Gradient checkpointing** | `True` (default) | SFTConfig defaults |\n| **Packing** | `--packing` or `packing=True` | Recommended for efficiency |\n| **Epochs** | `num_train_epochs=1` | Smoke test; ~1hr for 0.6B |\n\n### Qwen3-0.6B Tokenizer / Chat Template\n\n- **Architecture:** `Qwen3ForCausalLM`, 28 layers, 1024 hidden dim, 16 heads, 8 KV heads, tied embeddings.\n- **Special tokens:** `<|im_start|>` (151644), `<|im_end|>`/`</tool_call>` (151645), `<tool_call>` (151657), ` thinking ` (151667), ` reasoning ` (151668).\n- **Chat template:** Automatically applied by `SFTTrainer` when dataset has `messages` column. The template wraps user/assistant turns with `<|im_start|>{role}\\n{content}<|im_end|>\\n` and adds `<|im_start|>assistant\\n` as generation prompt.\n- **No manual formatting needed:** `ultrachat_200k` already has the correct `messages` format (`[{\"role\": \"user\", ...}, {\"role\": \"assistant\", ...}]`).\n\n### Working Code Pattern\n\n```python\nfrom datasets import load_dataset\nfrom peft import LoraConfig\nfrom trl import SFTTrainer, SFTConfig\n\n# 1. Load dataset (conversational format, messages column verified)\ndataset = load_dataset(\"HuggingFaceH4/ultrachat_200k\", split=\"train_sft\")\n\n# 2. LoRA config \u2014 \"all-linear\" is current TRL best practice for SFT\npeft_config = LoraConfig(\n r=32, # smoke-test rank; use 256 for post-training scale\n lora_alpha=16,\n lora_dropout=0.05,\n bias=\"none\",\n task_type=\"CAUSAL_LM\",\n target_modules=\"all-linear\", # key insight from Schulman et al. 2025\n)\n\n# 3. SFTConfig \u2014 note defaults differ from TrainingArguments\ntraining_args = SFTConfig(\n output_dir=\"./qwen3-0.6b-ultrachat-lora\",\n num_train_epochs=1,\n per_device_train_batch_size=1,\n gradient_accumulation_steps=4, # effective batch = 4\n learning_rate=2.0e-4, # 10x base rate for LoRA\n logging_steps=10, # default in SFTConfig\n bf16=True, # default in SFTConfig\n gradient_checkpointing=True, # default in SFTConfig\n packing=True, # recommended for throughput\n report_to=\"none\", # smoke test; remove for wandb/trackio\n)\n\n# 4. Trainer \u2014 SFTTrainer auto-applies chat template to messages\ntrainer = SFTTrainer(\n model=\"Qwen/Qwen3-0.6B\",\n train_dataset=dataset,\n peft_config=peft_config,\n args=training_args,\n)\n\ntrainer.train()\n```\n\n### Key TRL Defaults vs. Transformers TrainingArguments\n\n`SFTConfig` overrides these from `TrainingArguments`:\n- `logging_steps=10` (not 500)\n- `gradient_checkpointing=True` (not False)\n- `bf16=True` if `fp16` not set (not False)\n- `learning_rate=2e-5` (not 5e-5)\n\n### Critical Insights for Small LLM Smoke Tests\n\n1. **\"all-linear\" target_modules:** Current TRL recommendation (Schulman et al., 2025). Matches full fine-tuning with ~67% compute. Previously users targeted only `q_proj`/`v_proj`.\n2. **Effective batch size < 32:** LoRA is less tolerant of large batches than full fine-tuning. For 0.6B, `per_device_train_batch_size=1` + `grad_accum=4` is safe.\n3. **Packing:** Enable `packing=True` for dense to\u2026 [truncated 959 chars]",
|
| 41 |
-
"status": "completed"
|
| 42 |
-
},
|
| 43 |
-
{
|
| 44 |
-
"type": "message",
|
| 45 |
-
"id": "msg_2",
|
| 46 |
-
"role": "assistant",
|
| 47 |
-
"status": "completed",
|
| 48 |
-
"content": [
|
| 49 |
-
{
|
| 50 |
-
"type": "output_text",
|
| 51 |
-
"text": "## Dataset Audit: `HuggingFaceH4/ultrachat_200k`\n\n**Splits & Scale**\n- `train_sft` (~698 MB) and `test_sft` (~77 MB) \u2014 the SFT-relevant splits.\n- `train_gen` / `test_gen` are generation/evaluation splits; ignore for SFT.\n\n**Key Columns & Format**\n- Primary column: **`messages`** \u2014 a list of `{\"role\": \"user\"/\"assistant\", \"content\": \"...\"}` dicts.\n- `prompt` and `prompt_id` are present but redundant; `SFTTrainer` will consume `messages` directly.\n- Format is **conversational ChatML**, which current `SFTTrainer` auto-tokenizes using the model\u2019s chat template.\n\n**SFT Viability**\n- \u2705 **Compatible**: `messages` column matches TRL\u2019s expected conversational schema.\n- \u2705 **Scale**: ~200k multi-turn examples, sufficient for a smoke test and beyond.\n- \u26a0\ufe0f **Risks**:\n 1. **Long sequences**: Some prompts request 1000+ word outputs. Without a `max_seq_length` cap, these create memory pressure and slow throughput.\n 2. **Quality variance**: Open-domain user-generated text; expect some noisy or unsafe completions. A downstream safety filter or loss-mask audit is advisable before production training.\n 3. **No system role**: Turns are strictly `user` \u2192 `assistant`. Fine-tuned model may not learn to follow explicit system instructions unless system turns are injected.\n\n---\n\n## 1-Hour LoRA SFT Smoke-Test Plan: `Qwen/Qwen3-0.6B`\n\n**Objective**: Verify end-to-end LoRA SFT convergence on a single GPU in \u22641 hour.\n\n**Hardware**: `t4-small` (16 GB VRAM) is sufficient; 0.6B params in bf16 \u2248 1.2 GB.\n\n**Recipe (Current TRL Conventions)**\n\n```python\nfrom peft import LoraConfig\nfrom trl import SFTTrainer, SFTConfig\n\npeft_config = LoraConfig(\n r=32,\n lora_alpha=16,\n lora_dropout=0.05,\n bias=\"none\",\n task_type=\"CAUSAL_LM\",\n target_modules=\"all-linear\", # TRL best practice (Schulman et al. 2025)\n)\n\nargs = SFTConfig(\n output_dir=\"./qwen3-0.6b-ultrachat-lora\",\n num_train_epochs=1,\n per_device_train_batch_size=1,\n gradient_accumulation_steps=4, # effective batch = 4\n learning_rate=2.0e-4, # 10\u00d7 base for LoRA\n max_seq_length=2048, # caps long Ultrachat examples\n packing=True, # dense throughput for 1-hr window\n bf16=True,\n gradient_checkpointing=True,\n logging_steps=10,\n report_to=\"none\", # set \"trackio\" for monitored smoke test\n)\n\ntrainer = SFTTrainer(\n model=\"Qwen/Qwen3-0.6B\",\n train_dataset=dataset[\"train_sft\"],\n peft_config=peft_config,\n args=args,\n)\ntrainer.train()\n```\n\n**What This Tests**\n- `SFTTrainer` auto-applies the Qwen3 chat template (`<|im_start|>`, `<|im_end|>`) to the `messages` column.\n- LoRA adapters train only on linear layers, keeping VRAM well under 16 GB.\n- `packing=True` + `max_seq_length=2048` ensures the epoch finishes in ~1 hour while still exercising long-context handling.\n\n**Success Criteria**\n- Loss decreases steadily from step ~10.\n- No OOM or tokenizer/chat-template errors.\n- Final checkpoint saves successfully to `output_dir`.\n\n*Word count: ~380*"
|
| 52 |
-
}
|
| 53 |
-
]
|
| 54 |
-
}
|
| 55 |
-
],
|
| 56 |
-
"error": null,
|
| 57 |
-
"incomplete_details": null,
|
| 58 |
-
"usage": {
|
| 59 |
-
"session_id": "3626f79c-d105-4ebe-a035-091f625baae9",
|
| 60 |
-
"total_usd": 0.0,
|
| 61 |
-
"inference_usd": 0.0,
|
| 62 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 63 |
-
"sandbox_estimated_usd": 0.0,
|
| 64 |
-
"llm_calls": 10,
|
| 65 |
-
"hf_jobs_count": 0,
|
| 66 |
-
"sandbox_count": 0,
|
| 67 |
-
"prompt_tokens": 180875,
|
| 68 |
-
"completion_tokens": 5747,
|
| 69 |
-
"cache_read_tokens": 119360,
|
| 70 |
-
"cache_creation_tokens": 0,
|
| 71 |
-
"total_tokens": 186622,
|
| 72 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 73 |
-
"sandbox_billable_seconds_estimate": 0
|
| 74 |
-
},
|
| 75 |
-
"artifacts": [],
|
| 76 |
-
"metadata": {
|
| 77 |
-
"example_slug": "dataset-audit-sft-plan"
|
| 78 |
-
}
|
| 79 |
-
}
|
| 80 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/example-results/diffusion-language-models.json
DELETED
|
@@ -1,79 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"request": {
|
| 3 |
-
"slug": "diffusion-language-models",
|
| 4 |
-
"title": "Research a cutting-edge concept",
|
| 5 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 6 |
-
"input": "Research diffusion language models for text generation. In 5 concise bullets, explain what changed recently, why it matters, and cite 2 relevant Hugging Face paper pages or model pages if available. Keep under 300 words.",
|
| 7 |
-
"background": true,
|
| 8 |
-
"max_cost_usd": 3.0,
|
| 9 |
-
"metadata": {
|
| 10 |
-
"example_slug": "diffusion-language-models"
|
| 11 |
-
}
|
| 12 |
-
},
|
| 13 |
-
"response": {
|
| 14 |
-
"id": "resp_bf64687c764f4d509a134188390a2236",
|
| 15 |
-
"object": "response",
|
| 16 |
-
"created_at": 1781313817,
|
| 17 |
-
"completed_at": 1781313849,
|
| 18 |
-
"status": "completed",
|
| 19 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 20 |
-
"background": true,
|
| 21 |
-
"previous_response_id": null,
|
| 22 |
-
"session_id": "7f8b617e-640d-4aa8-a8df-1402037b7c71",
|
| 23 |
-
"max_cost_usd": 3.0,
|
| 24 |
-
"instructions": null,
|
| 25 |
-
"output": [
|
| 26 |
-
{
|
| 27 |
-
"type": "custom_tool_call",
|
| 28 |
-
"id": "functions.hf_papers:0",
|
| 29 |
-
"name": "hf_papers",
|
| 30 |
-
"input": "{\"operation\": \"search\", \"query\": \"diffusion language models text generation\", \"date_from\": \"2024-01-01\", \"limit\": 15}",
|
| 31 |
-
"output": "# Papers matching 'diffusion language models text generation'\nShowing 15 paper(s)\n\n## 1. Energy-Based Diffusion Language Models for Text Generation\n**arxiv_id:** 2410.21357 | **upvotes:** 3\nhttps://huggingface.co/papers/2410.21357\n**Keywords:** discrete diffusion models, parallel generation, Energy-based Diffusion Language Model, energy-based model, residual form\n**GitHub:** https://github.com/MinkaiXu/Energy-Diffusion-LLM (69 stars)\n**Summary:** Energy-based Diffusion Language Model improves diffusion-based generation by using an energy-based model with parameter optimization from autoregressive models and achieves faster sampling speeds with comparable performance to autoregressive models.\n\n## 2. Dependency-Guided Parallel Decoding in Discrete Diffusion Language Models\n**arxiv_id:** 2604.02560 | **upvotes:** 0\nhttps://huggingface.co/papers/2604.02560\n**Keywords:** discrete diffusion language models, parallel decoding, distributional mismatch, joint conditional, per-token marginals\n**Summary:** Discrete diffusion language models accelerate text generation by parallel token unmasking, but this introduces distributional mismatch; a dependency predictor called DEMASK addresses this by identifying bounded cumulative dependency positions for simultaneous unmasking under sub-additivity assumptio...\n\n## 3. DPad: Efficient Diffusion Language Models with Suffix Dropout\n**arxiv_id:** 2508.14148 | **upvotes:** 0\nhttps://huggingface.co/papers/2508.14148\n**Keywords:** diffusion-based large language models, denoising process, attention, sliding window, distance-decay dropout\n**GitHub:** https://github.com/Crys-Chen/DPad (62 stars)\n**Summary:** Diffusion Scratchpad (DPad) enhances the efficiency of diffusion-based large language models by restricting attention to nearby tokens, achieving significant speedup without compromising accuracy.\n\n## 4. Unveiling the Potential of Diffusion Large Language Model in\n Controllable Generation\n**arxiv_id:** 2507.04504 | **upvotes:** 1\nhttps://huggingface.co/papers/2507.04504\n**Keywords:** diffusion models, autoregressive large language models, dLLMs, bidirectional attention mechanism, controllable generation\n**Summary:** A novel framework, S<sup>3</sup>, enhances diffusion language models for controllable text generation by improving context modeling, reducing hallucinations, and accelerating inference.\n\n## 5. FS-DFM: Fast and Accurate Long Text Generation with Few-Step Diffusion\n Language Models\n**arxiv_id:** 2509.20624 | **upvotes:** 1\nhttps://huggingface.co/papers/2509.20624\n**Summary:** Autoregressive language models (ARMs) deliver strong likelihoods, but are\ninherently serial: they generate one token per forward pass, which limits\nthroughput and inflates latency for long sequences. Diffusion Language Models\n(DLMs) parallelize across positions and thus appear promising for language...\n\n## 6. Text Generation with Diffusion Language Models: A Pre-training Approach\n with Continuous Paragraph Denoise\n**arxiv_id:** 2212.11685 | **upvotes:** 2\nhttps://huggingface.co/papers/2212.11685\n**Keywords:** diffusion language model, encoder, diffusion-based decoder, continuous paragraph denoise objective, semantic coherence\n**Summary:** GENIE, a diffusion-based language model with an encoder and diffusion decoder, achieves state-of-the-art performance in text generation by using a continuous paragraph denoise objective.\n\n## 7. A Survey on Parallel Text Generation: From Parallel Decoding to\n Diffusion Language Models\n**arxiv_id:** 2508.08712 | **upvotes:** 0\nhttps://huggingface.co/papers/2508.08712\n**Keywords:** Large Language Models, autoregressive, parallel text generation, token-by-token, inference efficiency\n**GitHub:** https://github.com/zhanglingzhe0820/Awesome-Parallel-Text-Generation (43 stars)\n**Summary:** A survey of parallel text generation methods categorizes and analyzes AR-based and Non-AR-based techniques, assessing their trade-offs and potential for improving inference efficiency in LLMs.\n\n## 8. CtrlDiff: Boosting Large Diffusion Language Models with Dynamic Block\n Prediction and Controllabl\u2026 [truncated 4109 chars]",
|
| 32 |
-
"status": "completed"
|
| 33 |
-
},
|
| 34 |
-
{
|
| 35 |
-
"type": "custom_tool_call",
|
| 36 |
-
"id": "functions.web_search:1",
|
| 37 |
-
"name": "web_search",
|
| 38 |
-
"input": "{\"query\": \"site:huggingface.co diffusion language model text generation\"}",
|
| 39 |
-
"output": "{\n \"query\": \"site:huggingface.co diffusion language model text generation\",\n \"results\": [\n \"Search results for 'site:huggingface.co diffusion language model text generation'. Include a Sources section in the final answer.\\n- [Towards Speed-of-Light Text Generation with Nemotron-Labs Diffusion ...](https://huggingface.co/blog/nvidia/nemotron-labs-diffusion)\\n- [Diffusion Language Models: The New Paradigm - Hugging Face](https://huggingface.co/blog/ProCreations/diffusion-language-model)\\n- [Text diffusion - a stereoplegic Collection - Hugging Face](https://huggingface.co/collections/stereoplegic/text-diffusion)\\n- [google/diffusiongemma-26B-A4B-it \\u00b7 Hugging Face](https://huggingface.co/google/diffusiongemma-26B-A4B-it)\\n- [Paper page - Diffusion-LM Improves Controllable Text Generation](https://huggingface.co/papers/2205.14217)\\n- [Paper page - Text Generation with Diffusion Language Models: A Pre ...](https://huggingface.co/papers/2212.11685)\\n- [Energy-Based Diffusion Language Models for Text Generation](https://huggingface.co/papers/2410.21357)\\n- [SSD-LM: Semi-autoregressive Simplex-based Diffusion Language Model for ...](https://huggingface.co/papers/2210.17432)\",\n {\n \"tool_use_id\": \"functions.web_search:1\",\n \"content\": [\n {\n \"title\": \"Towards Speed-of-Light Text Generation with Nemotron-Labs Diffusion ...\",\n \"url\": \"https://huggingface.co/blog/nvidia/nemotron-labs-diffusion\"\n },\n {\n \"title\": \"Diffusion Language Models: The New Paradigm - Hugging Face\",\n \"url\": \"https://huggingface.co/blog/ProCreations/diffusion-language-model\"\n },\n {\n \"title\": \"Text diffusion - a stereoplegic Collection - Hugging Face\",\n \"url\": \"https://huggingface.co/collections/stereoplegic/text-diffusion\"\n },\n {\n \"title\": \"google/diffusiongemma-26B-A4B-it \\u00b7 Hugging Face\",\n \"url\": \"https://huggingface.co/google/diffusiongemma-26B-A4B-it\"\n },\n {\n \"title\": \"Paper page - Diffusion-LM Improves Controllable Text Generation\",\n \"url\": \"https://huggingface.co/papers/2205.14217\"\n },\n {\n \"title\": \"Paper page - Text Generation with Diffusion Language Models: A Pre ...\",\n \"url\": \"https://huggingface.co/papers/2212.11685\"\n },\n {\n \"title\": \"Energy-Based Diffusion Language Models for Text Generation\",\n \"url\": \"https://huggingface.co/papers/2410.21357\"\n },\n {\n \"title\": \"SSD-LM: Semi-autoregressive Simplex-based Diffusion Language Model for ...\",\n \"url\": \"https://huggingface.co/papers/2210.17432\"\n }\n ]\n }\n ],\n \"durationSeconds\": 0.7180289310053922\n}",
|
| 40 |
-
"status": "completed"
|
| 41 |
-
},
|
| 42 |
-
{
|
| 43 |
-
"type": "message",
|
| 44 |
-
"id": "msg_2",
|
| 45 |
-
"role": "assistant",
|
| 46 |
-
"status": "completed",
|
| 47 |
-
"content": [
|
| 48 |
-
{
|
| 49 |
-
"type": "output_text",
|
| 50 |
-
"text": "**Diffusion language models (DLMs) have shifted from research curiosity to viable AR alternatives.** Google's **DiffusionGemma-26B** now matches autoregressive quality at scale, demonstrating that discrete diffusion can compete on standard benchmarks.\n\n**Few-step decoding has become practical.** Methods like **T3D** (trajectory self-distillation) and **IDLM** (inverse distillation) collapsed sampling from hundreds of steps to 4\u20138 while preserving quality. This removes the main adoption barrier\u2014DLMs are no longer prohibitively slow at inference.\n\n**Hybrid \"plan-and-fill\" architectures are now dominant.** Models like **CtrlDiff** and **FS-DFM** use autoregressive skeleton planning followed by parallel diffusion-based token filling. This semi-autoregressive approach captures AR coherence benefits with DLM parallelization speedups.\n\n**Controllability is emerging as the killer feature.** Bidirectional attention in DLMs enables fine-grained control over length, style, and structure mid-generation\u2014something causal AR models cannot easily do. Recent frameworks like **S\u00b3** exploit this for structured outputs and prompt adherence.\n\n**Reasoning capabilities are being unlocked.** Papers such as **d\u00b2** and the energy-based diffusion LLM show that with policy-gradient training and energy-based formulations, DLMs can match or exceed AR models on math and logical reasoning tasks, challenging the assumption that autoregression is necessary for complex reasoning.\n\n**Relevant Hugging Face pages:**\n- Model: [google/diffusiongemma-26B-A4B-it](https://huggingface.co/google/diffusiongemma-26B-A4B-it)\n- Paper: [T3D: Few-Step Diffusion Language Models via Trajectory Self-Distillation](https://huggingface.co/papers/2602.12262)"
|
| 51 |
-
}
|
| 52 |
-
]
|
| 53 |
-
}
|
| 54 |
-
],
|
| 55 |
-
"error": null,
|
| 56 |
-
"incomplete_details": null,
|
| 57 |
-
"usage": {
|
| 58 |
-
"session_id": "7f8b617e-640d-4aa8-a8df-1402037b7c71",
|
| 59 |
-
"total_usd": 0.0,
|
| 60 |
-
"inference_usd": 0.0,
|
| 61 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 62 |
-
"sandbox_estimated_usd": 0.0,
|
| 63 |
-
"llm_calls": 3,
|
| 64 |
-
"hf_jobs_count": 0,
|
| 65 |
-
"sandbox_count": 0,
|
| 66 |
-
"prompt_tokens": 48470,
|
| 67 |
-
"completion_tokens": 1131,
|
| 68 |
-
"cache_read_tokens": 0,
|
| 69 |
-
"cache_creation_tokens": 0,
|
| 70 |
-
"total_tokens": 49601,
|
| 71 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 72 |
-
"sandbox_billable_seconds_estimate": 0
|
| 73 |
-
},
|
| 74 |
-
"artifacts": [],
|
| 75 |
-
"metadata": {
|
| 76 |
-
"example_slug": "diffusion-language-models"
|
| 77 |
-
}
|
| 78 |
-
}
|
| 79 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/example-results/fast-english-transcription-model.json
DELETED
|
@@ -1,88 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"request": {
|
| 3 |
-
"slug": "fast-english-transcription-model",
|
| 4 |
-
"title": "Find a fast transcription model",
|
| 5 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 6 |
-
"instructions": "Keep this as a quick model-selection answer. Do not launch broad research sub-agents. Use at most three direct Hugging Face lookups, then answer.",
|
| 7 |
-
"input": "Compare these three choices for quickly transcribing batches of English audio on one GPU: openai/whisper-large-v3-turbo, distil-whisper/distil-large-v3, and faster-whisper with large-v3-turbo. Recommend one for speed/accuracy/ease of use and include a short usage snippet. Keep under 400 words.",
|
| 8 |
-
"background": true,
|
| 9 |
-
"max_cost_usd": 2.0,
|
| 10 |
-
"metadata": {
|
| 11 |
-
"example_slug": "fast-english-transcription-model"
|
| 12 |
-
}
|
| 13 |
-
},
|
| 14 |
-
"response": {
|
| 15 |
-
"id": "resp_7edc3515343d4eab81eb0fe7b274d316",
|
| 16 |
-
"object": "response",
|
| 17 |
-
"created_at": 1781314507,
|
| 18 |
-
"completed_at": 1781314539,
|
| 19 |
-
"status": "completed",
|
| 20 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 21 |
-
"background": true,
|
| 22 |
-
"previous_response_id": null,
|
| 23 |
-
"session_id": "f6d73b44-9649-459a-a848-4d2e9f27c88e",
|
| 24 |
-
"max_cost_usd": 2.0,
|
| 25 |
-
"instructions": "Keep this as a quick model-selection answer. Do not launch broad research sub-agents. Use at most three direct Hugging Face lookups, then answer.",
|
| 26 |
-
"output": [
|
| 27 |
-
{
|
| 28 |
-
"type": "custom_tool_call",
|
| 29 |
-
"id": "hub_repo_details:0",
|
| 30 |
-
"name": "hub_repo_details",
|
| 31 |
-
"input": "{\"repo_ids\": [\"openai/whisper-large-v3-turbo\", \"distil-whisper/distil-large-v3\"], \"operations\": [\"overview\"]}",
|
| 32 |
-
"output": "**Type: Model**\n\n# openai/whisper-large-v3-turbo\n\n## Overview\n- **Author:** openai\n- **Task:** automatic-speech-recognition\n- **Library:** transformers\n- **Downloads:** 91.2M | **Likes:** 3081\n- **Updated:** 4 Oct, 2024\n\n## Technical Details\n- **Model Class:** AutoModelForMultimodalLM\n- **Parameters:** 808.9M\n- **Architecture:** whisper\n\n## Tags\n`transformers` `safetensors` `whisper` `automatic-speech-recognition` `audio` `en` `zh` `de` `es` `ru` `ko` `fr` `ja` `pt` `tr` `pl` `ca` `nl` `ar` `sv` `it` `id` `hi` `fi` `vi` `he` `uk` `el` `ms` `cs` `ro` `da` `hu` `ta` `no` `th` `ur` `hr` `bg` `lt` `la` `mi` `ml` `cy` `sk` `te` `fa` `lv` `bn` `sr` `az` `sl` `kn` `et` `mk` `br` `eu` `is` `hy` `ne` `mn` `bs` `kk` `sq` `sw` `gl` `mr` `pa` `si` `km` `sn` `yo` `so` `af` `oc` `ka` `be` `tg` `sd` `gu` `am` `yi` `lo` `uz` `fo` `ht` `ps` `tk` `nn` `mt` `sa` `lb` `my` `bo` `tl` `mg` `as` `tt` `haw` `ln` `ha` `ba` `jw` `su` `arxiv:2212.04356` `base_model:openai/whisper-large-v3` `base_model:finetune:openai/whisper-large-v3` `license:mit` `eval-results` `endpoints_compatible` `deploy:azure` `region:us`\n\n## Metadata\n- **Language:** en, zh, de, es, ru, ko, fr, ja, pt, tr, pl, ca, nl, ar, sv, it, id, hi, fi, vi, he, uk, el, ms, cs, ro, da, hu, ta, no, th, ur, hr, bg, lt, la, mi, ml, cy, sk, te, fa, lv, bn, sr, az, sl, kn, et, mk, br, eu, is, hy, ne, mn, bs, kk, sq, sw, gl, mr, pa, si, km, sn, yo, so, af, oc, ka, be, tg, sd, gu, am, yi, lo, uz, fo, ht, ps, tk, nn, mt, sa, lb, my, bo, tl, mg, as, tt, haw, ln, ha, ba, jw, su\n- **License:** mit\n\n## Demo Spaces\n- [OmniVoice](https://hf.co/spaces/k2-fsa/OmniVoice)\n- [whisper-large-v3-turbo](https://hf.co/spaces/hf-audio/whisper-large-v3-turbo)\n- [higgs_audio_v2](https://hf.co/spaces/smola/higgs_audio_v2)\n- [E2-F5-TTS](https://hf.co/spaces/mrfakename/E2-F5-TTS)\n- [Music-To-Lyrics](https://hf.co/spaces/fffiloni/Music-To-Lyrics)\n- [paza-bench](https://hf.co/spaces/microsoft/paza-bench)\n- [Automatic-Speech-Recognition-Speech-to-Text](https://hf.co/spaces/hchcsuim/Automatic-Speech-Recognition-Speech-to-Text)\n- [ai-meeting-assistant](https://hf.co/spaces/PouyaDevA1/ai-meeting-assistant)\n- [Yui-home-assistant](https://hf.co/spaces/build-small-hackathon/Yui-home-assistant)\n- [tutori](https://hf.co/spaces/build-small-hackathon/tutori)\n- [test_voice](https://hf.co/spaces/shimaa22/test_voice)\n- [Realtime-whisper-large-v3-turbo](https://hf.co/spaces/KingNish/Realtime-whisper-large-v3-turbo)\n- *... and 88 more spaces*\n\n## Inference Providers\n- **hf-inference** (live)\n\nTry this model in the [playground](https://hf.co/playground?modelId=openai/whisper-large-v3-turbo)\n\n**Link:** [https://hf.co/openai/whisper-large-v3-turbo](https://hf.co/openai/whisper-large-v3-turbo)\n\n---\n\n**Type: Model**\n\n# distil-whisper/distil-large-v3\n\n## Overview\n- **Author:** distil-whisper\n- **Task:** automatic-speech-recognition\n- **Library:** transformers\n- **Downloads:** 17.0M | **Likes:** 375\n- **Updated:** 21 Apr, 2026\n\n## Technical Details\n- **Model Class:** AutoModelForMultimodalLM\n- **Parameters:** 756.4M\n- **Architecture:** whisper\n\n## Tags\n`transformers` `jax` `tensorboard` `onnx` `safetensors` `whisper` `automatic-speech-recognition` `audio` `transformers.js` `en` `arxiv:2311.00430` `arxiv:2210.13352` `license:mit` `eval-results` `endpoints_compatible` `region:us`\n\n## Metadata\n- **Language:** en\n- **License:** mit\n\n## Demo Spaces\n- [paza-bench](https://hf.co/spaces/microsoft/paza-bench)\n- [insanely-fast-whisper-webui-zero](https://hf.co/spaces/mfielding92/insanely-fast-whisper-webui-zero)\n- [whisper-vs-distil-whisper](https://hf.co/spaces/distil-whisper/whisper-vs-distil-whisper)\n- [insanely-fast-whisper-webui](https://hf.co/spaces/gobeldan/insanely-fast-whisper-webui)\n- [whisper-v3-zero](https://hf.co/spaces/devilent2/whisper-v3-zero)\n- [Anole](https://hf.co/spaces/ethanchern/Anole)\n- [audio-extractors](https://hf.co/spaces/tensorlake/audio-extractors)\n- [whisper-vs-distil-whisper-fr](https://hf.co/spaces/eustlb/whisper-vs-distil-whisper-fr)\n- [whisper-multi-model](https://hf.co/spaces/TaiYouWeb/whisper-multi-model)\n- [whispe\u2026 [truncated 382 chars]",
|
| 33 |
-
"status": "completed"
|
| 34 |
-
},
|
| 35 |
-
{
|
| 36 |
-
"type": "custom_tool_call",
|
| 37 |
-
"id": "web_search:1",
|
| 38 |
-
"name": "web_search",
|
| 39 |
-
"input": "{\"query\": \"faster-whisper vs distil-whisper vs whisper-large-v3-turbo benchmark speed accuracy English transcription GPU\"}",
|
| 40 |
-
"output": "{\n \"query\": \"faster-whisper vs distil-whisper vs whisper-large-v3-turbo benchmark speed accuracy English transcription GPU\",\n \"results\": [\n \"Search results for 'faster-whisper vs distil-whisper vs whisper-large-v3-turbo benchmark speed accuracy English transcription GPU'. Include a Sources section in the final answer.\\n- [DuckDuckGo](https://duckduckgo.com/html/)\",\n {\n \"tool_use_id\": \"web_search:1\",\n \"content\": [\n {\n \"title\": \"DuckDuckGo\",\n \"url\": \"https://duckduckgo.com/html/\"\n }\n ]\n }\n ],\n \"durationSeconds\": 0.060008110012859106\n}",
|
| 41 |
-
"status": "completed"
|
| 42 |
-
},
|
| 43 |
-
{
|
| 44 |
-
"type": "custom_tool_call",
|
| 45 |
-
"id": "hf_papers:2",
|
| 46 |
-
"name": "hf_papers",
|
| 47 |
-
"input": "{\"operation\": \"search\", \"query\": \"distil-whisper speed accuracy benchmark\", \"limit\": 5}",
|
| 48 |
-
"output": "# Papers matching 'distil-whisper speed accuracy benchmark'\nShowing 5 paper(s)\n\n## 1. Distil-Whisper: Robust Knowledge Distillation via Large-Scale Pseudo\n Labelling\n**arxiv_id:** 2311.00430 | **upvotes:** 56\nhttps://huggingface.co/papers/2311.00430\n**Keywords:** pseudo-labelling, distillation, Whisper model, word error rate (WER), zero-shot transfer\n**GitHub:** https://github.com/innerNULL/simpler-distil-whisper (3 stars)\n**Summary:** Distil-Whisper, a smaller and faster variant of the Whisper model, achieves nearly the same performance with fewer resources and is optimized for low-latency environments.\n\n## 2. uDistil-Whisper: Label-Free Data Filtering for Knowledge Distillation in\n Low-Data Regimes\n**arxiv_id:** 2407.01257 | **upvotes:** 1\nhttps://huggingface.co/papers/2407.01257\n**Keywords:** distillation, Whisper models, pseudo-labels, unsupervised learning, WER\n**GitHub:** https://github.com/UBC-NLP/uDistilWhisper (2 stars)\n**Summary:** A novel distillation framework allows the distillation of Whisper models into smaller, efficient versions without requiring labeled data, showing performance competitive with or better than supervised methods.\n\n## 3. WhisperKit: On-device Real-time ASR with Billion-Scale Transformers\n**arxiv_id:** 2507.10860 | **upvotes:** 2\nhttps://huggingface.co/papers/2507.10860\n**Keywords:** Automatic Speech Recognition, ASR, WhisperKit, on-device inference, real-time ASR\n**Summary:** WhisperKit is an optimized on-device ASR system that achieves lower latency and higher accuracy compared to leading cloud-based models.\n\n## 4. DistilWhisper: Efficient Distillation of Multi-task Speech Models via\n Language-Specific Experts\n**arxiv_id:** 2311.01070 | **upvotes:** 3\nhttps://huggingface.co/papers/2311.01070\n**Keywords:** multitask, multilingual, speech model, automatic speech recognition, language-specific experts\n**GitHub:** https://github.com/naver/multilingual-distilwhisper (34 stars)\n**Summary:** A dual-strategy approach, combining lightweight modular ASR fine-tuning and knowledge distillation, enhances automatic speech recognition for under-represented languages without significant parameter overhead.\n\n## 5. FastWhisper: Adaptive Self-knowledge Distillation for Real-time Automatic Speech Recognition\n**arxiv_id:** 2601.19919 | **upvotes:** 1\nhttps://huggingface.co/papers/2601.19919\n**Keywords:** knowledge distillation, student model, teacher model, generalization capacity, adaptive self-knowledge distillation\n**Summary:** Adaptive self-knowledge distillation improves student model generalization by reducing teacher model dependence while enabling efficient Whisper model compression.\n",
|
| 49 |
-
"status": "completed"
|
| 50 |
-
},
|
| 51 |
-
{
|
| 52 |
-
"type": "message",
|
| 53 |
-
"id": "msg_3",
|
| 54 |
-
"role": "assistant",
|
| 55 |
-
"status": "completed",
|
| 56 |
-
"content": [
|
| 57 |
-
{
|
| 58 |
-
"type": "output_text",
|
| 59 |
-
"text": "**Recommendation: faster-whisper with `large-v3-turbo`**\n\nFor batch English transcription on a single GPU, use **faster-whisper** running `large-v3-turbo`. It beats both vanilla `whisper-large-v3-turbo` and `distil-large-v3` in throughput while preserving accuracy, and the Python API is just as simple.\n\n**Why this wins**\n\n- **Speed**: faster-whisper uses CTranslate2 with fp16/int8 quantization, batched decoding, and efficient attention. On a single GPU it is typically **4\u20136\u00d7 faster** than the Transformers implementation of the same weights. The turbo checkpoint was specifically distilled for speed.\n- **Accuracy**: `large-v3-turbo` retains near-parity with the full large-v3 model on English ASR benchmarks. Distil-large-v3 is competitive but English-only; turbo gives you the same speed win without sacrificing multilingual flexibility if you later need it.\n- **Ease of use**: `pip install faster-whisper`, one `WhisperModel` call, and you get built-in VAD + batched transcription with a generator interface.\n\n**When to pick the others**\n- Use `distil-whisper/distil-large-v3` only if you are strictly CPU-bound or need a tiny on-device English model.\n- Use vanilla `openai/whisper-large-v3-turbo` only if you need seamless Hugging Face `pipeline()` integration and don\u2019t care about throughput.\n\n**Quick usage snippet**\n\n```python\nfrom faster_whisper import WhisperModel\n\nmodel = WhisperModel(\"large-v3-turbo\", device=\"cuda\", compute_type=\"float16\")\n\n# Batch of audio files\nfiles = [\"batch_01.mp3\", \"batch_02.wav\", \"batch_03.flac\"]\n\nfor f in files:\n segments, info = model.transcribe(f, beam_size=5, vad_filter=True)\n print(f\"\\n{f} ({info.language}, {info.language_probability:.2f})\")\n for seg in segments:\n print(f\"[{seg.start:.2f}s -> {seg.end:.2f}s] {seg.text}\")\n```\n\nSet `compute_type=\"int8_float16\"` for even more speed on Ampere/Ada GPUs, or `compute_type=\"int8\"` if VRAM is tight. For true batching across the GPU, pass a list of audio arrays via the lower-level `encode()` + `generate()` API, or use the community batching wrappers.\n\n**Sources**: [openai/whisper-large-v3-turbo](https://hf.co/openai/whisper-large-v3-turbo), [distil-whisper/distil-large-v3](https://hf.co/distil-whisper/distil-large-v3), *Distil-Whisper* (arXiv:2311.00430)"
|
| 60 |
-
}
|
| 61 |
-
]
|
| 62 |
-
}
|
| 63 |
-
],
|
| 64 |
-
"error": null,
|
| 65 |
-
"incomplete_details": null,
|
| 66 |
-
"usage": {
|
| 67 |
-
"session_id": "f6d73b44-9649-459a-a848-4d2e9f27c88e",
|
| 68 |
-
"total_usd": 0.0,
|
| 69 |
-
"inference_usd": 0.0,
|
| 70 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 71 |
-
"sandbox_estimated_usd": 0.0,
|
| 72 |
-
"llm_calls": 4,
|
| 73 |
-
"hf_jobs_count": 0,
|
| 74 |
-
"sandbox_count": 0,
|
| 75 |
-
"prompt_tokens": 65136,
|
| 76 |
-
"completion_tokens": 1506,
|
| 77 |
-
"cache_read_tokens": 61440,
|
| 78 |
-
"cache_creation_tokens": 0,
|
| 79 |
-
"total_tokens": 66642,
|
| 80 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 81 |
-
"sandbox_billable_seconds_estimate": 0
|
| 82 |
-
},
|
| 83 |
-
"artifacts": [],
|
| 84 |
-
"metadata": {
|
| 85 |
-
"example_slug": "fast-english-transcription-model"
|
| 86 |
-
}
|
| 87 |
-
}
|
| 88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/example-results/finetune-imdb-artifact.json
DELETED
|
@@ -1,266 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"request": {
|
| 3 |
-
"slug": "finetune-imdb-artifact",
|
| 4 |
-
"title": "Fine-tune and publish a model artifact",
|
| 5 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 6 |
-
"instructions": "This is a longer public API example. Do not research, do not call plan_tool, and do not run a sandbox preflight. Launch exactly one CPU-only HF Job using the provided script as inline Python source. Use hardware=cpu-basic and timeout about 30 minutes. Set HUB_MODEL_ID to the requested repo id. Wait for the job to finish, then report the model URL, job URL, and eval metrics.",
|
| 7 |
-
"input": "Run this exact CPU-only fine-tuning script as one HF Job and publish the artifact to abidlabs/ml-intern-api-imdb-distilbert-20260613-020123. The script fine-tunes distilbert-base-uncased on a small IMDb subset and pushes the model. Do not modify the training objective; only make minimal fixes if the job errors.\n\n```python\nimport os\nimport json\nimport numpy as np\nfrom datasets import load_dataset\nfrom huggingface_hub import HfApi, create_repo\nfrom transformers import (\n AutoTokenizer,\n AutoModelForSequenceClassification,\n DataCollatorWithPadding,\n Trainer,\n TrainingArguments,\n)\n\nrepo_id = os.environ[\"HUB_MODEL_ID\"]\nmodel_id = \"distilbert-base-uncased\"\n\nraw = load_dataset(\"imdb\")\ntrain_ds = raw[\"train\"].shuffle(seed=42).select(range(1000))\neval_ds = raw[\"test\"].shuffle(seed=42).select(range(200))\n\ntok = AutoTokenizer.from_pretrained(model_id)\n\ndef tokenize(batch):\n return tok(batch[\"text\"], truncation=True, max_length=256)\n\ntrain_tok = train_ds.map(tokenize, batched=True, remove_columns=[\"text\"])\neval_tok = eval_ds.map(tokenize, batched=True, remove_columns=[\"text\"])\n\nmodel = AutoModelForSequenceClassification.from_pretrained(model_id, num_labels=2)\ncollator = DataCollatorWithPadding(tok)\n\ndef compute_metrics(eval_pred):\n logits, labels = eval_pred\n preds = np.argmax(logits, axis=-1)\n return {\"accuracy\": float((preds == labels).mean())}\n\nargs = TrainingArguments(\n output_dir=\"/tmp/imdb-distilbert\",\n max_steps=60,\n per_device_train_batch_size=16,\n per_device_eval_batch_size=32,\n learning_rate=5e-5,\n warmup_steps=5,\n logging_steps=10,\n save_strategy=\"no\",\n report_to=\"none\",\n seed=42,\n)\n\ntrainer = Trainer(\n model=model,\n args=args,\n train_dataset=train_tok,\n eval_dataset=eval_tok,\n tokenizer=tok,\n data_collator=collator,\n compute_metrics=compute_metrics,\n)\ntrainer.train()\nmetrics = trainer.evaluate()\n\ncreate_repo(repo_id, repo_type=\"model\", exist_ok=True)\nmodel.push_to_hub(repo_id)\ntok.push_to_hub(repo_id)\n\nreadme = f\"\"\"---\nlibrary_name: transformers\ntags:\n- text-classification\n- imdb\n- ml-intern-api-example\nbase_model: {model_id}\n---\n\n# ML Intern API IMDb DistilBERT Example\n\nThis model was produced by a public ML Intern API example run.\n\n- Base model: `{model_id}`\n- Dataset: `imdb`\n- Train subset: 1,000 examples\n- Eval subset: 200 examples\n- Training: 60 Trainer steps, batch size 16, learning rate 5e-5\n- Eval metrics: `{json.dumps(metrics, sort_keys=True)}`\n\"\"\"\nHfApi().upload_file(\n path_or_fileobj=readme.encode(\"utf-8\"),\n path_in_repo=\"README.md\",\n repo_id=repo_id,\n repo_type=\"model\",\n)\nprint(json.dumps({\"repo_id\": repo_id, \"model_url\": f\"https://huggingface.co/{repo_id}\", \"metrics\": metrics}, indent=2))\n```",
|
| 8 |
-
"background": true,
|
| 9 |
-
"max_cost_usd": 15.0,
|
| 10 |
-
"metadata": {
|
| 11 |
-
"example_slug": "finetune-imdb-artifact",
|
| 12 |
-
"repo_id": "abidlabs/ml-intern-api-imdb-distilbert-20260613-020123"
|
| 13 |
-
}
|
| 14 |
-
},
|
| 15 |
-
"response": {
|
| 16 |
-
"id": "resp_518beb5c9e7c4aeb94b67d763183fdae",
|
| 17 |
-
"object": "response",
|
| 18 |
-
"created_at": 1781316084,
|
| 19 |
-
"completed_at": 1781316903,
|
| 20 |
-
"status": "completed",
|
| 21 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 22 |
-
"background": true,
|
| 23 |
-
"previous_response_id": null,
|
| 24 |
-
"session_id": "512f6bad-6e24-42ca-9a72-c02f47716281",
|
| 25 |
-
"max_cost_usd": 15.0,
|
| 26 |
-
"instructions": "This is a longer public API example. Do not research, do not call plan_tool, and do not run a sandbox preflight. Launch exactly one CPU-only HF Job using the provided script as inline Python source. Use hardware=cpu-basic and timeout about 30 minutes. Set HUB_MODEL_ID to the requested repo id. Wait for the job to finish, then report the model URL, job URL, and eval metrics.",
|
| 27 |
-
"output": [
|
| 28 |
-
{
|
| 29 |
-
"type": "custom_tool_call",
|
| 30 |
-
"id": "hf_jobs_0",
|
| 31 |
-
"name": "hf_jobs",
|
| 32 |
-
"input": "{\"operation\": \"run\", \"script\": \"\\nimport os\\nimport json\\nimport numpy as np\\nfrom datasets import load_dataset\\nfrom huggingface_hub import HfApi, create_repo\\nfrom transformers import (\\n AutoTokenizer,\\n AutoModelForSequenceClassification,\\n DataCollatorWithPadding,\\n Trainer,\\n TrainingArguments,\\n)\\n\\nrepo_id = os.environ[\\\"HUB_MODEL_ID\\\"]\\nmodel_id = \\\"distilbert-base-uncased\\\"\\n\\nraw = load_dataset(\\\"imdb\\\")\\ntrain_ds = raw[\\\"train\\\"].shuffle(seed=42).select(range(1000))\\neval_ds = raw[\\\"test\\\"].shuffle(seed=42).select(range(200))\\n\\ntok = AutoTokenizer.from_pretrained(model_id)\\n\\ndef tokenize(batch):\\n return tok(batch[\\\"text\\\"], truncation=True, max_length=256)\\n\\ntrain_tok = train_ds.map(tokenize, batched=True, remove_columns=[\\\"text\\\"])\\neval_tok = eval_ds.map(tokenize, batched=True, remove_columns=[\\\"text\\\"])\\n\\nmodel = AutoModelForSequenceClassification.from_pretrained(model_id, num_labels=2)\\ncollator = DataCollatorWithPadding(tok)\\n\\ndef compute_metrics(eval_pred):\\n logits, labels = eval_pred\\n preds = np.argmax(logits, axis=-1)\\n return {\\\"accuracy\\\": float((preds == labels).mean())}\\n\\nargs = TrainingArguments(\\n output_dir=\\\"/tmp/imdb-distilbert\\\",\\n max_steps=60,\\n per_device_train_batch_size=16,\\n per_device_eval_batch_size=32,\\n learning_rate=5e-5,\\n warmup_steps=5,\\n logging_steps=10,\\n save_strategy=\\\"no\\\",\\n report_to=\\\"none\\\",\\n seed=42,\\n)\\n\\ntrainer = Trainer(\\n model=model,\\n args=args,\\n train_dataset=train_tok,\\n eval_dataset=eval_tok,\\n tokenizer=tok,\\n data_collator=collator,\\n compute_metrics=compute_metrics,\\n)\\ntrainer.train()\\nmetrics = trainer.evaluate()\\n\\ncreate_repo(repo_id, repo_type=\\\"model\\\", exist_ok=True)\\nmodel.push_to_hub(repo_id)\\ntok.push_to_hub(repo_id)\\n\\nreadme = f\\\"\\\"\\\"---\\nlibrary_name: transformers\\ntags:\\n- text-classification\\n- imdb\\n- ml-intern-api-example\\nbase_model: {model_id}\\n---\\n\\n# ML Intern API IMDb DistilBERT Example\\n\\nThis model was produced by a public ML Intern API example run.\\n\\n- Base model: `{model_id}`\\n- Dataset: `imdb`\\n- Train subset: 1,000 examples\\n- Eval subset: 200 examples\\n- Training: 60 Trainer steps, batch size 16, learning rate 5e-5\\n- Eval metrics: `{json.dumps(metrics, sort_keys=True)}`\\n\\\"\\\"\\\"\\nHfApi().upload_file(\\n path_or_fileobj=readme.encode(\\\"utf-8\\\"),\\n path_in_repo=\\\"README.md\\\",\\n repo_id=repo_id,\\n repo_type=\\\"model\\\",\\n)\\nprint(json.dumps({\\\"repo_id\\\": repo_id, \\\"model_url\\\": f\\\"https://huggingface.co/{repo_id}\\\", \\\"metrics\\\": metrics}, indent=2))\\n\", \"dependencies\": [\"transformers\", \"datasets\", \"numpy\", \"huggingface_hub\", \"accelerate\"], \"hardware_flavor\": \"cpu-basic\", \"timeout\": \"30m\", \"env\": {\"HUB_MODEL_ID\": \"abidlabs/ml-intern-api-imdb-distilbert-20260613-020123\"}}",
|
| 33 |
-
"output": "Python job completed!\n\n**Job ID:** 6a2cba0a871c005b5352ba1e\n**Final Status:** RUNNING\n**View at:** https://huggingface.co/jobs/abidlabs/6a2cba0a871c005b5352ba1e\n\n**Logs:**\n```\n(no logs)\n```",
|
| 34 |
-
"status": "completed"
|
| 35 |
-
},
|
| 36 |
-
{
|
| 37 |
-
"type": "custom_tool_call",
|
| 38 |
-
"id": "hf_jobs:1",
|
| 39 |
-
"name": "hf_jobs",
|
| 40 |
-
"input": "{\"operation\": \"inspect\", \"job_id\": \"6a2cba0a871c005b5352ba1e\"}",
|
| 41 |
-
"output": "**Job Details** (1 job):\n\n```json\n[\n {\n \"id\": \"6a2cba0a871c005b5352ba1e\",\n \"status\": {\n \"stage\": \"RUNNING\",\n \"message\": null\n },\n \"command\": [\n \"/bin/sh\",\n \"-lc\",\n \"set -e; _ml_intern_artifacts_dir=\\\"$(mktemp -d)\\\"; printf %s IyBBdXRvLWdlbmVyYXRlZCBieSBNTCBJbnRlcm4uIEJlc3QtZWZmb3J0IEh1YiBhcnRpZmFjdCBtZXRhZGF0YSBvbmx5LgpkZWYgX2luc3RhbGxfbWxfaW50ZXJuX2FydGlmYWN0X2hvb2tzKCk6CiAgICBpbXBvcnQgb3MKICAgIGltcG9ydCByZQogICAgaW1wb3J0IHRlbXBmaWxlCiAgICBmcm9tIHBhdGhsaWIgaW1wb3J0IFBhdGgKCiAgICB0cnk6CiAgICAgICAgaW1wb3J0IGh1Z2dpbmdmYWNlX2h1YiBhcyBfaHViCiAgICAgICAgZnJvbSBodWdnaW5nZmFjZV9odWIgaW1wb3J0IEhmQXBpLCBoZl9odWJfZG93bmxvYWQKICAgICAgICBmcm9tIGh1Z2dpbmdmYWNlX2h1Yi5yZXBvY2FyZCBpbXBvcnQgbWV0YWRhdGFfbG9hZCwgbWV0YWRhdGFfc2F2ZQogICAgICAgIGZyb20gaHVnZ2luZ2ZhY2VfaHViLnV0aWxzIGltcG9ydCBFbnRyeU5vdEZvdW5kRXJyb3IsIFJlcG9zaXRvcnlOb3RGb3VuZEVycm9yCiAgICBleGNlcHQgRXhjZXB0aW9uOgogICAgICAgIHJldHVybgoKICAgIHNlc3Npb25faWQgPSAnNTEyZjZiYWQtNmUyNC00MmNhLTlhNzItYzAyZjQ3NzE2MjgxJwogICAgc2Vzc2lvbl9kYXRlID0gJzIwMjYtMDYtMTMnCiAgICBjb2xsZWN0aW9uX3RpdGxlID0gJ21sLWludGVybi1hcnRpZmFjdHMtMjAyNi0wNi0xMy01MTJmNmJhZCcKICAgIHRhZyA9ICdtbC1pbnRlcm4nCiAgICBtYXJrZXIgPSAnPCEtLSBtbC1pbnRlcm4tcHJvdmVuYW5jZSAtLT4nCiAgICBzdXBwb3J0ZWQgPSBbJ2RhdGFzZXQnLCAnbW9kZWwnLCAnc3BhY2UnXQogICAgc2FuZGJveF9zcGFjZV9yZSA9IHJlLmNvbXBpbGUoJ15zYW5kYm94LVthLWYwLTldezh9JCcpCiAgICByZWdpc3RlcmluZyA9IEZhbHNlCiAgICBjb2xsZWN0aW9uX3NsdWcgPSBOb25lCiAgICByZWdpc3RlcmVkID0gc2V0KCkKICAgIHVzYWdlX3JlID0gcmUuY29tcGlsZSgKICAgICAgICByIl4jezIsNn1ccysodXNhZ2V8aG93IHRvIHVzZXx1c2luZyB0aGlzIChtb2RlbHxkYXRhc2V0KXx1c2UgdGhpcyAobW9kZWx8ZGF0YXNldCkpXGIiLAogICAgICAgIHJlLklHTk9SRUNBU0UgfCByZS5NVUxUSUxJTkUsCiAgICApCiAgICBmcm9udF9tYXR0ZXJfcmUgPSByZS5jb21waWxlKHIiXEEtLS1ccypcbi4qP1xuLS0tXHMqXG4/IiwgcmUuRE9UQUxMKQogICAgY29sbGVjdGlvbl9jYWNoZV9wYXRoID0gKAogICAgICAgIG9zLmVudmlyb24uZ2V0KCJNTF9JTlRFUk5fQVJUSUZBQ1RfQ09MTEVDVElPTl9DQUNIRSIpCiAgICAgICAgb3Igc3RyKAogICAgICAgICAgICBQYXRoKHRlbXBmaWxlLmdldHRlbXBkaXIoKSkKICAgICAgICAgICAgLyBmIm1sLWludGVybi1hcnRpZmFjdHMte3Nlc3Npb25faWR9LmNvbGxlY3Rpb24iCiAgICAgICAgKQogICAgKQoKICAgIGRlZiBfdG9rZW4odmFsdWU9Tm9uZSwgYXBpPU5vbmUpOgogICAgICAgIGlmIGlzaW5zdGFuY2UodmFsdWUsIHN0cikgYW5kIHZhbHVlOgogICAgICAgICAgICByZXR1cm4gdmFsdWUKICAgICAgICBhcGlfdG9rZW4gPSBnZXRhdHRyKGFwaSwgInRva2VuIiwgTm9uZSkKICAgICAgICBpZiBpc2luc3RhbmNlKGFwaV90b2tlbiwgc3RyKSBhbmQgYXBpX3Rva2VuOgogICAgICAgICAgICByZXR1cm4gYXBpX3Rva2VuCiAgICAgICAgcmV0dXJuICgKICAgICAgICAgICAgb3MuZW52aXJvbi5nZXQoIkhGX1RPS0VOIikKICAgICAgICAgICAgb3Igb3MuZW52aXJvbi5nZXQoIkhVR0dJTkdGQUNFX0hVQl9UT0tFTiIpCiAgICAgICAgICAgIG9yIE5vbmUKICAgICAgICApCgogICAgZGVmIF9tZXJnZV90YWdzKG1ldGFkYXRhKToKICAgICAgICBtZXRhZGF0YSA9IGRpY3QobWV0YWRhdGEgb3Ige30pCiAgICAgICAgcmF3X3RhZ3MgPSBtZXRhZGF0YS5nZXQoInRhZ3MiKQogICAgICAgIGlmIHJhd190YWdzIGlzIE5vbmU6CiAgICAgICAgICAgIHRhZ3MgPSBbXQogICAgICAgIGVsaWYgaXNpbnN0YW5jZShyYXdfdGFncywgc3RyKToKICAgICAgICAgICAgdGFncyA9IFtyYXdfdGFnc10KICAgICAgICBlbGlmIGlzaW5zdGFuY2UocmF3X3RhZ3MsIGxpc3QpOgogICAgICAgICAgICB0YWdzID0gW3N0cihpdGVtKSBmb3IgaXRlbSBpbiByYXdfdGFnc10KICAgICAgICBlbHNlOgogICAgICAgICAgICB0YWdzID0gW3N0cihyYXdfdGFncyldCiAgICAgICAgaWYgdGFnIG5vdCBpbiB0YWdzOgogICAgICAgICAgICB0YWdzLmFwcGVuZCh0YWcpCiAgICAgICAgbWV0YWRhdGFbInRhZ3MiXSA9IHRhZ3MKICAgICAgICByZXR1cm4gbWV0YWRhdGEKCiAgICBkZWYgX21ldGFkYXRhX2Zyb21fY29udGVudChjb250ZW50KToKICAgICAgICB3aXRoIHRlbXBmaWxlLlRlbXBvcmFyeURpcmVjdG9yeSgpIGFzIHRtcF9kaXI6CiAgICAgICAgICAgIHBhdGggPSBQYXRoKHRtcF9kaXIpIC8gIlJFQURNRS5tZCIKICAgICAgICAgICAgcGF0aC53cml0ZV90ZXh0KGNvbnRlbnQgb3IgIiIsIGVuY29kaW5nPSJ1dGYtOCIpCiAgICAgICAgICAgIHJldHVybiBtZXRhZGF0YV9sb2FkKHBhdGgpIG9yIHt9CgogICAgZGVmIF9jb250ZW50X3dpdGhfbWV0YWRhdGEoY29udGVudCwgbWV0YWRhdGEpOgogICAgICAgIHdpdGggdGVtcGZpbGUuVGVtcG9yYXJ5RGlyZWN0b3J5KCkgYXMgdG1wX2RpcjoKICAgICAgICAgICAgcGF0aCA9IFBhdGgodG1wX2RpcikgLyAiUkVBRE1FLm1kIgogICAgICAgICAgICBwYXRoLndyaXRlX3RleHQoY29udGVudCBvciAiIiwgZW5jb2Rpbmc9InV0Zi04IikKICAgICAgICAgICAgbWV0YWRhdGFfc2F2ZShwYXRoLCBtZXRhZGF0YSkKICAgICAgICAgICAgcmV0dXJuIHBhdGgucmVhZF90ZXh0KGVuY29kaW5nPSJ1dGYtOCIpCgogICAgZGVmIF9ib2R5X3dpdGhvdXRfbWV0YWRhdGEoY29udGVudCk6CiAgICAgICAgcmV0dXJuIGZyb250X21hdHRlcl9yZS5zdWIoIiIsIGNvbnRlbnQg\u2026 [truncated 16288 chars]",
|
| 42 |
-
"status": "completed"
|
| 43 |
-
},
|
| 44 |
-
{
|
| 45 |
-
"type": "custom_tool_call",
|
| 46 |
-
"id": "hf_jobs:2",
|
| 47 |
-
"name": "hf_jobs",
|
| 48 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba0a871c005b5352ba1e\"}",
|
| 49 |
-
"output": "**Logs for 6a2cba0a871c005b5352ba1e:**\n\n```\nDownloading transformers (10.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading setuptools (1.0MiB)\nDownloading pandas (10.4MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading triton (192.1MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading sympy (6.0MiB)\nDownloading aiohttp (1.7MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading pyarrow (46.6MiB)\nDownloading networkx (2.0MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading numpy (15.9MiB)\nDownloading pygments (1.2MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded hf-transfer\n Downloaded setuptools\n Downloaded hf-xet\n Downloaded networkx\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 248ms\n/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\nTraceback (most recent call last):\n File \"<string>\", line 18, in <module>\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/datasets/load.py\", line 1698, in load_dataset\n builder_instance = load_dataset_builder(\n ^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/datasets/load.py\", line 1325, in load_dataset_builder\n dataset_module = dataset_module_factory(\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/datasets/load.py\", line 1217, in dataset_module_factory\n raise e1 from None\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/datasets/load.py\", line 1192, in dataset_module_factory\n ).get_module()\n ^^^^^^^^^^^^\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/datasets/load.py\", line 608, in get_module\n standalone_yaml_path = cached_path(\n ^^^^^^^^^^^^\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/datasets/utils/file_utils.py\", line 180, in cached_path\n ).resolve_path(url_or_filename)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/huggingface_hub/hf_file_system.py\", line 305, in resolve_path\n parsed = parse_hf_uri(f\"{constants.HF_PROTOCOL}{path}\")\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.cache/uv/archive-v0/laJH7LQ0RxAmS-_K1Wijk/lib/python3.12/site-packages/huggingface_hub/utils/_hf_uris.py\", line 313, in parse_hf_uri\n return _parse_repo_body(location, type_, raw=raw)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n Fil\u2026 [truncated 428 chars]",
|
| 50 |
-
"status": "completed"
|
| 51 |
-
},
|
| 52 |
-
{
|
| 53 |
-
"type": "custom_tool_call",
|
| 54 |
-
"id": "hf_jobs:3",
|
| 55 |
-
"name": "hf_jobs",
|
| 56 |
-
"input": "{\"operation\": \"run\", \"script\": \"\\nimport os\\nimport json\\nimport numpy as np\\nfrom datasets import load_dataset\\nfrom huggingface_hub import HfApi, create_repo\\nfrom transformers import (\\n AutoTokenizer,\\n AutoModelForSequenceClassification,\\n DataCollatorWithPadding,\\n Trainer,\\n TrainingArguments,\\n)\\n\\nrepo_id = os.environ[\\\"HUB_MODEL_ID\\\"]\\nmodel_id = \\\"distilbert-base-uncased\\\"\\n\\nraw = load_dataset(\\\"stanfordnlp/imdb\\\")\\ntrain_ds = raw[\\\"train\\\"].shuffle(seed=42).select(range(1000))\\neval_ds = raw[\\\"test\\\"].shuffle(seed=42).select(range(200))\\n\\ntok = AutoTokenizer.from_pretrained(model_id)\\n\\ndef tokenize(batch):\\n return tok(batch[\\\"text\\\"], truncation=True, max_length=256)\\n\\ntrain_tok = train_ds.map(tokenize, batched=True, remove_columns=[\\\"text\\\"])\\neval_tok = eval_ds.map(tokenize, batched=True, remove_columns=[\\\"text\\\"])\\n\\nmodel = AutoModelForSequenceClassification.from_pretrained(model_id, num_labels=2)\\ncollator = DataCollatorWithPadding(tok)\\n\\ndef compute_metrics(eval_pred):\\n logits, labels = eval_pred\\n preds = np.argmax(logits, axis=-1)\\n return {\\\"accuracy\\\": float((preds == labels).mean())}\\n\\nargs = TrainingArguments(\\n output_dir=\\\"/tmp/imdb-distilbert\\\",\\n max_steps=60,\\n per_device_train_batch_size=16,\\n per_device_eval_batch_size=32,\\n learning_rate=5e-5,\\n warmup_steps=5,\\n logging_steps=10,\\n save_strategy=\\\"no\\\",\\n report_to=\\\"none\\\",\\n seed=42,\\n)\\n\\ntrainer = Trainer(\\n model=model,\\n args=args,\\n train_dataset=train_tok,\\n eval_dataset=eval_tok,\\n tokenizer=tok,\\n data_collator=collator,\\n compute_metrics=compute_metrics,\\n)\\ntrainer.train()\\nmetrics = trainer.evaluate()\\n\\ncreate_repo(repo_id, repo_type=\\\"model\\\", exist_ok=True)\\nmodel.push_to_hub(repo_id)\\ntok.push_to_hub(repo_id)\\n\\nreadme = f\\\"\\\"\\\"---\\nlibrary_name: transformers\\ntags:\\n- text-classification\\n- imdb\\n- ml-intern-api-example\\nbase_model: {model_id}\\n---\\n\\n# ML Intern API IMDb DistilBERT Example\\n\\nThis model was produced by a public ML Intern API example run.\\n\\n- Base model: `{model_id}`\\n- Dataset: `imdb`\\n- Train subset: 1,000 examples\\n- Eval subset: 200 examples\\n- Training: 60 Trainer steps, batch size 16, learning rate 5e-5\\n- Eval metrics: `{json.dumps(metrics, sort_keys=True)}`\\n\\\"\\\"\\\"\\nHfApi().upload_file(\\n path_or_fileobj=readme.encode(\\\"utf-8\\\"),\\n path_in_repo=\\\"README.md\\\",\\n repo_id=repo_id,\\n repo_type=\\\"model\\\",\\n)\\nprint(json.dumps({\\\"repo_id\\\": repo_id, \\\"model_url\\\": f\\\"https://huggingface.co/{repo_id}\\\", \\\"metrics\\\": metrics}, indent=2))\\n\", \"dependencies\": [\"transformers\", \"datasets\", \"numpy\", \"huggingface_hub\", \"accelerate\"], \"hardware_flavor\": \"cpu-basic\", \"timeout\": \"30m\", \"env\": {\"HUB_MODEL_ID\": \"abidlabs/ml-intern-api-imdb-distilbert-20260613-020123\"}}",
|
| 57 |
-
"output": "Python job completed!\n\n**Job ID:** 6a2cba40234ca64b6012104f\n**Final Status:** RUNNING\n**View at:** https://huggingface.co/jobs/abidlabs/6a2cba40234ca64b6012104f\n\n**Logs:**\n```\n[installs truncated]\nInstalled 75 packages in 241ms\n/root/.cache/uv/archive-v0/DdwQhNe2FyP0JLEpfvuoU/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n```",
|
| 58 |
-
"status": "completed"
|
| 59 |
-
},
|
| 60 |
-
{
|
| 61 |
-
"type": "custom_tool_call",
|
| 62 |
-
"id": "hf_jobs:4",
|
| 63 |
-
"name": "hf_jobs",
|
| 64 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba40234ca64b6012104f\"}",
|
| 65 |
-
"output": "**Logs for 6a2cba40234ca64b6012104f:**\n\n```\nDownloading networkx (2.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading transformers (10.6MiB)\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading torch (507.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading hf-xet (4.3MiB)\nDownloading numpy (15.9MiB)\nDownloading pyarrow (46.6MiB)\nDownloading aiohttp (1.7MiB)\nDownloading sympy (6.0MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading tokenizers (3.1MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\n Downloaded nvidia-cufile\n Downloaded pygments\n Downloaded aiohttp\n Downloaded setuptools\n Downloaded networkx\n Downloaded nvidia-cuda-runtime\n Downloaded tokenizers\n Downloaded hf-transfer\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded sympy\n Downloaded nvidia-cuda-cupti\n Downloaded numpy\n Downloaded pandas\n Downloaded transformers\n Downloaded nvidia-nvjitlink\n Downloaded pyarrow\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 241ms\n/root/.cache/uv/archive-v0/DdwQhNe2FyP0JLEpfvuoU/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 252690.23 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 324852.77 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 305963.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2402.92 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2548.52 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_layer_norm.weight | UNEXPECTED | \nclassifier.bias | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \npre_classifier.weight | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\nTraceback (most recent call last):\n File \"<string>\", line 51, in <module>\nTypeError: Trainer.__init__() got an unexpected keyword argument 'tokenizer'\n```",
|
| 66 |
-
"status": "completed"
|
| 67 |
-
},
|
| 68 |
-
{
|
| 69 |
-
"type": "custom_tool_call",
|
| 70 |
-
"id": "hf_jobs:5",
|
| 71 |
-
"name": "hf_jobs",
|
| 72 |
-
"input": "{\"operation\": \"run\", \"script\": \"\\nimport os\\nimport json\\nimport numpy as np\\nfrom datasets import load_dataset\\nfrom huggingface_hub import HfApi, create_repo\\nfrom transformers import (\\n AutoTokenizer,\\n AutoModelForSequenceClassification,\\n DataCollatorWithPadding,\\n Trainer,\\n TrainingArguments,\\n)\\n\\nrepo_id = os.environ[\\\"HUB_MODEL_ID\\\"]\\nmodel_id = \\\"distilbert-base-uncased\\\"\\n\\nraw = load_dataset(\\\"stanfordnlp/imdb\\\")\\ntrain_ds = raw[\\\"train\\\"].shuffle(seed=42).select(range(1000))\\neval_ds = raw[\\\"test\\\"].shuffle(seed=42).select(range(200))\\n\\ntok = AutoTokenizer.from_pretrained(model_id)\\n\\ndef tokenize(batch):\\n return tok(batch[\\\"text\\\"], truncation=True, max_length=256)\\n\\ntrain_tok = train_ds.map(tokenize, batched=True, remove_columns=[\\\"text\\\"])\\neval_tok = eval_ds.map(tokenize, batched=True, remove_columns=[\\\"text\\\"])\\n\\nmodel = AutoModelForSequenceClassification.from_pretrained(model_id, num_labels=2)\\ncollator = DataCollatorWithPadding(tok)\\n\\ndef compute_metrics(eval_pred):\\n logits, labels = eval_pred\\n preds = np.argmax(logits, axis=-1)\\n return {\\\"accuracy\\\": float((preds == labels).mean())}\\n\\nargs = TrainingArguments(\\n output_dir=\\\"/tmp/imdb-distilbert\\\",\\n max_steps=60,\\n per_device_train_batch_size=16,\\n per_device_eval_batch_size=32,\\n learning_rate=5e-5,\\n warmup_steps=5,\\n logging_steps=10,\\n save_strategy=\\\"no\\\",\\n report_to=\\\"none\\\",\\n seed=42,\\n)\\n\\ntrainer = Trainer(\\n model=model,\\n args=args,\\n train_dataset=train_tok,\\n eval_dataset=eval_tok,\\n processing_class=tok,\\n data_collator=collator,\\n compute_metrics=compute_metrics,\\n)\\ntrainer.train()\\nmetrics = trainer.evaluate()\\n\\ncreate_repo(repo_id, repo_type=\\\"model\\\", exist_ok=True)\\nmodel.push_to_hub(repo_id)\\ntok.push_to_hub(repo_id)\\n\\nreadme = f\\\"\\\"\\\"---\\nlibrary_name: transformers\\ntags:\\n- text-classification\\n- imdb\\n- ml-intern-api-example\\nbase_model: {model_id}\\n---\\n\\n# ML Intern API IMDb DistilBERT Example\\n\\nThis model was produced by a public ML Intern API example run.\\n\\n- Base model: `{model_id}`\\n- Dataset: `imdb`\\n- Train subset: 1,000 examples\\n- Eval subset: 200 examples\\n- Training: 60 Trainer steps, batch size 16, learning rate 5e-5\\n- Eval metrics: `{json.dumps(metrics, sort_keys=True)}`\\n\\\"\\\"\\\"\\nHfApi().upload_file(\\n path_or_fileobj=readme.encode(\\\"utf-8\\\"),\\n path_in_repo=\\\"README.md\\\",\\n repo_id=repo_id,\\n repo_type=\\\"model\\\",\\n)\\nprint(json.dumps({\\\"repo_id\\\": repo_id, \\\"model_url\\\": f\\\"https://huggingface.co/{repo_id}\\\", \\\"metrics\\\": metrics}, indent=2))\\n\", \"dependencies\": [\"transformers\", \"datasets\", \"numpy\", \"huggingface_hub\", \"accelerate\"], \"hardware_flavor\": \"cpu-basic\", \"timeout\": \"30m\", \"env\": {\"HUB_MODEL_ID\": \"abidlabs/ml-intern-api-imdb-distilbert-20260613-020123\"}}",
|
| 73 |
-
"output": "Python job completed!\n\n**Job ID:** 6a2cba84871c005b5352ba24\n**Final Status:** RUNNING\n**View at:** https://huggingface.co/jobs/abidlabs/6a2cba84871c005b5352ba24\n\n**Logs:**\n```\n(no logs)\n```",
|
| 74 |
-
"status": "completed"
|
| 75 |
-
},
|
| 76 |
-
{
|
| 77 |
-
"type": "custom_tool_call",
|
| 78 |
-
"id": "hf_jobs:6",
|
| 79 |
-
"name": "hf_jobs",
|
| 80 |
-
"input": "{\"operation\": \"inspect\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 81 |
-
"output": "**Job Details** (1 job):\n\n```json\n[\n {\n \"id\": \"6a2cba84871c005b5352ba24\",\n \"status\": {\n \"stage\": \"RUNNING\",\n \"message\": null\n },\n \"command\": [\n \"/bin/sh\",\n \"-lc\",\n \"set -e; _ml_intern_artifacts_dir=\\\"$(mktemp -d)\\\"; printf %s IyBBdXRvLWdlbmVyYXRlZCBieSBNTCBJbnRlcm4uIEJlc3QtZWZmb3J0IEh1YiBhcnRpZmFjdCBtZXRhZGF0YSBvbmx5LgpkZWYgX2luc3RhbGxfbWxfaW50ZXJuX2FydGlmYWN0X2hvb2tzKCk6CiAgICBpbXBvcnQgb3MKICAgIGltcG9ydCByZQogICAgaW1wb3J0IHRlbXBmaWxlCiAgICBmcm9tIHBhdGhsaWIgaW1wb3J0IFBhdGgKCiAgICB0cnk6CiAgICAgICAgaW1wb3J0IGh1Z2dpbmdmYWNlX2h1YiBhcyBfaHViCiAgICAgICAgZnJvbSBodWdnaW5nZmFjZV9odWIgaW1wb3J0IEhmQXBpLCBoZl9odWJfZG93bmxvYWQKICAgICAgICBmcm9tIGh1Z2dpbmdmYWNlX2h1Yi5yZXBvY2FyZCBpbXBvcnQgbWV0YWRhdGFfbG9hZCwgbWV0YWRhdGFfc2F2ZQogICAgICAgIGZyb20gaHVnZ2luZ2ZhY2VfaHViLnV0aWxzIGltcG9ydCBFbnRyeU5vdEZvdW5kRXJyb3IsIFJlcG9zaXRvcnlOb3RGb3VuZEVycm9yCiAgICBleGNlcHQgRXhjZXB0aW9uOgogICAgICAgIHJldHVybgoKICAgIHNlc3Npb25faWQgPSAnNTEyZjZiYWQtNmUyNC00MmNhLTlhNzItYzAyZjQ3NzE2MjgxJwogICAgc2Vzc2lvbl9kYXRlID0gJzIwMjYtMDYtMTMnCiAgICBjb2xsZWN0aW9uX3RpdGxlID0gJ21sLWludGVybi1hcnRpZmFjdHMtMjAyNi0wNi0xMy01MTJmNmJhZCcKICAgIHRhZyA9ICdtbC1pbnRlcm4nCiAgICBtYXJrZXIgPSAnPCEtLSBtbC1pbnRlcm4tcHJvdmVuYW5jZSAtLT4nCiAgICBzdXBwb3J0ZWQgPSBbJ2RhdGFzZXQnLCAnbW9kZWwnLCAnc3BhY2UnXQogICAgc2FuZGJveF9zcGFjZV9yZSA9IHJlLmNvbXBpbGUoJ15zYW5kYm94LVthLWYwLTldezh9JCcpCiAgICByZWdpc3RlcmluZyA9IEZhbHNlCiAgICBjb2xsZWN0aW9uX3NsdWcgPSBOb25lCiAgICByZWdpc3RlcmVkID0gc2V0KCkKICAgIHVzYWdlX3JlID0gcmUuY29tcGlsZSgKICAgICAgICByIl4jezIsNn1ccysodXNhZ2V8aG93IHRvIHVzZXx1c2luZyB0aGlzIChtb2RlbHxkYXRhc2V0KXx1c2UgdGhpcyAobW9kZWx8ZGF0YXNldCkpXGIiLAogICAgICAgIHJlLklHTk9SRUNBU0UgfCByZS5NVUxUSUxJTkUsCiAgICApCiAgICBmcm9udF9tYXR0ZXJfcmUgPSByZS5jb21waWxlKHIiXEEtLS1ccypcbi4qP1xuLS0tXHMqXG4/IiwgcmUuRE9UQUxMKQogICAgY29sbGVjdGlvbl9jYWNoZV9wYXRoID0gKAogICAgICAgIG9zLmVudmlyb24uZ2V0KCJNTF9JTlRFUk5fQVJUSUZBQ1RfQ09MTEVDVElPTl9DQUNIRSIpCiAgICAgICAgb3Igc3RyKAogICAgICAgICAgICBQYXRoKHRlbXBmaWxlLmdldHRlbXBkaXIoKSkKICAgICAgICAgICAgLyBmIm1sLWludGVybi1hcnRpZmFjdHMte3Nlc3Npb25faWR9LmNvbGxlY3Rpb24iCiAgICAgICAgKQogICAgKQoKICAgIGRlZiBfdG9rZW4odmFsdWU9Tm9uZSwgYXBpPU5vbmUpOgogICAgICAgIGlmIGlzaW5zdGFuY2UodmFsdWUsIHN0cikgYW5kIHZhbHVlOgogICAgICAgICAgICByZXR1cm4gdmFsdWUKICAgICAgICBhcGlfdG9rZW4gPSBnZXRhdHRyKGFwaSwgInRva2VuIiwgTm9uZSkKICAgICAgICBpZiBpc2luc3RhbmNlKGFwaV90b2tlbiwgc3RyKSBhbmQgYXBpX3Rva2VuOgogICAgICAgICAgICByZXR1cm4gYXBpX3Rva2VuCiAgICAgICAgcmV0dXJuICgKICAgICAgICAgICAgb3MuZW52aXJvbi5nZXQoIkhGX1RPS0VOIikKICAgICAgICAgICAgb3Igb3MuZW52aXJvbi5nZXQoIkhVR0dJTkdGQUNFX0hVQl9UT0tFTiIpCiAgICAgICAgICAgIG9yIE5vbmUKICAgICAgICApCgogICAgZGVmIF9tZXJnZV90YWdzKG1ldGFkYXRhKToKICAgICAgICBtZXRhZGF0YSA9IGRpY3QobWV0YWRhdGEgb3Ige30pCiAgICAgICAgcmF3X3RhZ3MgPSBtZXRhZGF0YS5nZXQoInRhZ3MiKQogICAgICAgIGlmIHJhd190YWdzIGlzIE5vbmU6CiAgICAgICAgICAgIHRhZ3MgPSBbXQogICAgICAgIGVsaWYgaXNpbnN0YW5jZShyYXdfdGFncywgc3RyKToKICAgICAgICAgICAgdGFncyA9IFtyYXdfdGFnc10KICAgICAgICBlbGlmIGlzaW5zdGFuY2UocmF3X3RhZ3MsIGxpc3QpOgogICAgICAgICAgICB0YWdzID0gW3N0cihpdGVtKSBmb3IgaXRlbSBpbiByYXdfdGFnc10KICAgICAgICBlbHNlOgogICAgICAgICAgICB0YWdzID0gW3N0cihyYXdfdGFncyldCiAgICAgICAgaWYgdGFnIG5vdCBpbiB0YWdzOgogICAgICAgICAgICB0YWdzLmFwcGVuZCh0YWcpCiAgICAgICAgbWV0YWRhdGFbInRhZ3MiXSA9IHRhZ3MKICAgICAgICByZXR1cm4gbWV0YWRhdGEKCiAgICBkZWYgX21ldGFkYXRhX2Zyb21fY29udGVudChjb250ZW50KToKICAgICAgICB3aXRoIHRlbXBmaWxlLlRlbXBvcmFyeURpcmVjdG9yeSgpIGFzIHRtcF9kaXI6CiAgICAgICAgICAgIHBhdGggPSBQYXRoKHRtcF9kaXIpIC8gIlJFQURNRS5tZCIKICAgICAgICAgICAgcGF0aC53cml0ZV90ZXh0KGNvbnRlbnQgb3IgIiIsIGVuY29kaW5nPSJ1dGYtOCIpCiAgICAgICAgICAgIHJldHVybiBtZXRhZGF0YV9sb2FkKHBhdGgpIG9yIHt9CgogICAgZGVmIF9jb250ZW50X3dpdGhfbWV0YWRhdGEoY29udGVudCwgbWV0YWRhdGEpOgogICAgICAgIHdpdGggdGVtcGZpbGUuVGVtcG9yYXJ5RGlyZWN0b3J5KCkgYXMgdG1wX2RpcjoKICAgICAgICAgICAgcGF0aCA9IFBhdGgodG1wX2RpcikgLyAiUkVBRE1FLm1kIgogICAgICAgICAgICBwYXRoLndyaXRlX3RleHQoY29udGVudCBvciAiIiwgZW5jb2Rpbmc9InV0Zi04IikKICAgICAgICAgICAgbWV0YWRhdGFfc2F2ZShwYXRoLCBtZXRhZGF0YSkKICAgICAgICAgICAgcmV0dXJuIHBhdGgucmVhZF90ZXh0KGVuY29kaW5nPSJ1dGYtOCIpCgogICAgZGVmIF9ib2R5X3dpdGhvdXRfbWV0YWRhdGEoY29udGVudCk6CiAgICAgICAgcmV0dXJuIGZyb250X21hdHRlcl9yZS5zdWIoIiIsIGNvbnRlbnQg\u2026 [truncated 16312 chars]",
|
| 82 |
-
"status": "completed"
|
| 83 |
-
},
|
| 84 |
-
{
|
| 85 |
-
"type": "custom_tool_call",
|
| 86 |
-
"id": "hf_jobs:7",
|
| 87 |
-
"name": "hf_jobs",
|
| 88 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 89 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n```",
|
| 90 |
-
"status": "completed"
|
| 91 |
-
},
|
| 92 |
-
{
|
| 93 |
-
"type": "custom_tool_call",
|
| 94 |
-
"id": "hf_jobs:8",
|
| 95 |
-
"name": "hf_jobs",
|
| 96 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 97 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n```",
|
| 98 |
-
"status": "completed"
|
| 99 |
-
},
|
| 100 |
-
{
|
| 101 |
-
"type": "custom_tool_call",
|
| 102 |
-
"id": "bash:9",
|
| 103 |
-
"name": "bash",
|
| 104 |
-
"input": "{\"command\": \"sleep 30\", \"description\": \"Wait for job to progress\"}",
|
| 105 |
-
"output": "(no output)",
|
| 106 |
-
"status": "completed"
|
| 107 |
-
},
|
| 108 |
-
{
|
| 109 |
-
"type": "custom_tool_call",
|
| 110 |
-
"id": "hf_jobs:10",
|
| 111 |
-
"name": "hf_jobs",
|
| 112 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 113 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n```",
|
| 114 |
-
"status": "completed"
|
| 115 |
-
},
|
| 116 |
-
{
|
| 117 |
-
"type": "custom_tool_call",
|
| 118 |
-
"id": "hf_jobs:11",
|
| 119 |
-
"name": "hf_jobs",
|
| 120 |
-
"input": "{\"operation\": \"inspect\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 121 |
-
"output": "**Job Details** (1 job):\n\n```json\n[\n {\n \"id\": \"6a2cba84871c005b5352ba24\",\n \"status\": {\n \"stage\": \"RUNNING\",\n \"message\": null\n },\n \"command\": [\n \"/bin/sh\",\n \"-lc\",\n \"set -e; _ml_intern_artifacts_dir=\\\"$(mktemp -d)\\\"; printf %s IyBBdXRvLWdlbmVyYXRlZCBieSBNTCBJbnRlcm4uIEJlc3QtZWZmb3J0IEh1YiBhcnRpZmFjdCBtZXRhZGF0YSBvbmx5LgpkZWYgX2luc3RhbGxfbWxfaW50ZXJuX2FydGlmYWN0X2hvb2tzKCk6CiAgICBpbXBvcnQgb3MKICAgIGltcG9ydCByZQogICAgaW1wb3J0IHRlbXBmaWxlCiAgICBmcm9tIHBhdGhsaWIgaW1wb3J0IFBhdGgKCiAgICB0cnk6CiAgICAgICAgaW1wb3J0IGh1Z2dpbmdmYWNlX2h1YiBhcyBfaHViCiAgICAgICAgZnJvbSBodWdnaW5nZmFjZV9odWIgaW1wb3J0IEhmQXBpLCBoZl9odWJfZG93bmxvYWQKICAgICAgICBmcm9tIGh1Z2dpbmdmYWNlX2h1Yi5yZXBvY2FyZCBpbXBvcnQgbWV0YWRhdGFfbG9hZCwgbWV0YWRhdGFfc2F2ZQogICAgICAgIGZyb20gaHVnZ2luZ2ZhY2VfaHViLnV0aWxzIGltcG9ydCBFbnRyeU5vdEZvdW5kRXJyb3IsIFJlcG9zaXRvcnlOb3RGb3VuZEVycm9yCiAgICBleGNlcHQgRXhjZXB0aW9uOgogICAgICAgIHJldHVybgoKICAgIHNlc3Npb25faWQgPSAnNTEyZjZiYWQtNmUyNC00MmNhLTlhNzItYzAyZjQ3NzE2MjgxJwogICAgc2Vzc2lvbl9kYXRlID0gJzIwMjYtMDYtMTMnCiAgICBjb2xsZWN0aW9uX3RpdGxlID0gJ21sLWludGVybi1hcnRpZmFjdHMtMjAyNi0wNi0xMy01MTJmNmJhZCcKICAgIHRhZyA9ICdtbC1pbnRlcm4nCiAgICBtYXJrZXIgPSAnPCEtLSBtbC1pbnRlcm4tcHJvdmVuYW5jZSAtLT4nCiAgICBzdXBwb3J0ZWQgPSBbJ2RhdGFzZXQnLCAnbW9kZWwnLCAnc3BhY2UnXQogICAgc2FuZGJveF9zcGFjZV9yZSA9IHJlLmNvbXBpbGUoJ15zYW5kYm94LVthLWYwLTldezh9JCcpCiAgICByZWdpc3RlcmluZyA9IEZhbHNlCiAgICBjb2xsZWN0aW9uX3NsdWcgPSBOb25lCiAgICByZWdpc3RlcmVkID0gc2V0KCkKICAgIHVzYWdlX3JlID0gcmUuY29tcGlsZSgKICAgICAgICByIl4jezIsNn1ccysodXNhZ2V8aG93IHRvIHVzZXx1c2luZyB0aGlzIChtb2RlbHxkYXRhc2V0KXx1c2UgdGhpcyAobW9kZWx8ZGF0YXNldCkpXGIiLAogICAgICAgIHJlLklHTk9SRUNBU0UgfCByZS5NVUxUSUxJTkUsCiAgICApCiAgICBmcm9udF9tYXR0ZXJfcmUgPSByZS5jb21waWxlKHIiXEEtLS1ccypcbi4qP1xuLS0tXHMqXG4/IiwgcmUuRE9UQUxMKQogICAgY29sbGVjdGlvbl9jYWNoZV9wYXRoID0gKAogICAgICAgIG9zLmVudmlyb24uZ2V0KCJNTF9JTlRFUk5fQVJUSUZBQ1RfQ09MTEVDVElPTl9DQUNIRSIpCiAgICAgICAgb3Igc3RyKAogICAgICAgICAgICBQYXRoKHRlbXBmaWxlLmdldHRlbXBkaXIoKSkKICAgICAgICAgICAgLyBmIm1sLWludGVybi1hcnRpZmFjdHMte3Nlc3Npb25faWR9LmNvbGxlY3Rpb24iCiAgICAgICAgKQogICAgKQoKICAgIGRlZiBfdG9rZW4odmFsdWU9Tm9uZSwgYXBpPU5vbmUpOgogICAgICAgIGlmIGlzaW5zdGFuY2UodmFsdWUsIHN0cikgYW5kIHZhbHVlOgogICAgICAgICAgICByZXR1cm4gdmFsdWUKICAgICAgICBhcGlfdG9rZW4gPSBnZXRhdHRyKGFwaSwgInRva2VuIiwgTm9uZSkKICAgICAgICBpZiBpc2luc3RhbmNlKGFwaV90b2tlbiwgc3RyKSBhbmQgYXBpX3Rva2VuOgogICAgICAgICAgICByZXR1cm4gYXBpX3Rva2VuCiAgICAgICAgcmV0dXJuICgKICAgICAgICAgICAgb3MuZW52aXJvbi5nZXQoIkhGX1RPS0VOIikKICAgICAgICAgICAgb3Igb3MuZW52aXJvbi5nZXQoIkhVR0dJTkdGQUNFX0hVQl9UT0tFTiIpCiAgICAgICAgICAgIG9yIE5vbmUKICAgICAgICApCgogICAgZGVmIF9tZXJnZV90YWdzKG1ldGFkYXRhKToKICAgICAgICBtZXRhZGF0YSA9IGRpY3QobWV0YWRhdGEgb3Ige30pCiAgICAgICAgcmF3X3RhZ3MgPSBtZXRhZGF0YS5nZXQoInRhZ3MiKQogICAgICAgIGlmIHJhd190YWdzIGlzIE5vbmU6CiAgICAgICAgICAgIHRhZ3MgPSBbXQogICAgICAgIGVsaWYgaXNpbnN0YW5jZShyYXdfdGFncywgc3RyKToKICAgICAgICAgICAgdGFncyA9IFtyYXdfdGFnc10KICAgICAgICBlbGlmIGlzaW5zdGFuY2UocmF3X3RhZ3MsIGxpc3QpOgogICAgICAgICAgICB0YWdzID0gW3N0cihpdGVtKSBmb3IgaXRlbSBpbiByYXdfdGFnc10KICAgICAgICBlbHNlOgogICAgICAgICAgICB0YWdzID0gW3N0cihyYXdfdGFncyldCiAgICAgICAgaWYgdGFnIG5vdCBpbiB0YWdzOgogICAgICAgICAgICB0YWdzLmFwcGVuZCh0YWcpCiAgICAgICAgbWV0YWRhdGFbInRhZ3MiXSA9IHRhZ3MKICAgICAgICByZXR1cm4gbWV0YWRhdGEKCiAgICBkZWYgX21ldGFkYXRhX2Zyb21fY29udGVudChjb250ZW50KToKICAgICAgICB3aXRoIHRlbXBmaWxlLlRlbXBvcmFyeURpcmVjdG9yeSgpIGFzIHRtcF9kaXI6CiAgICAgICAgICAgIHBhdGggPSBQYXRoKHRtcF9kaXIpIC8gIlJFQURNRS5tZCIKICAgICAgICAgICAgcGF0aC53cml0ZV90ZXh0KGNvbnRlbnQgb3IgIiIsIGVuY29kaW5nPSJ1dGYtOCIpCiAgICAgICAgICAgIHJldHVybiBtZXRhZGF0YV9sb2FkKHBhdGgpIG9yIHt9CgogICAgZGVmIF9jb250ZW50X3dpdGhfbWV0YWRhdGEoY29udGVudCwgbWV0YWRhdGEpOgogICAgICAgIHdpdGggdGVtcGZpbGUuVGVtcG9yYXJ5RGlyZWN0b3J5KCkgYXMgdG1wX2RpcjoKICAgICAgICAgICAgcGF0aCA9IFBhdGgodG1wX2RpcikgLyAiUkVBRE1FLm1kIgogICAgICAgICAgICBwYXRoLndyaXRlX3RleHQoY29udGVudCBvciAiIiwgZW5jb2Rpbmc9InV0Zi04IikKICAgICAgICAgICAgbWV0YWRhdGFfc2F2ZShwYXRoLCBtZXRhZGF0YSkKICAgICAgICAgICAgcmV0dXJuIHBhdGgucmVhZF90ZXh0KGVuY29kaW5nPSJ1dGYtOCIpCgogICAgZGVmIF9ib2R5X3dpdGhvdXRfbWV0YWRhdGEoY29udGVudCk6CiAgICAgICAgcmV0dXJuIGZyb250X21hdHRlcl9yZS5zdWIoIiIsIGNvbnRlbnQg\u2026 [truncated 16312 chars]",
|
| 122 |
-
"status": "completed"
|
| 123 |
-
},
|
| 124 |
-
{
|
| 125 |
-
"type": "custom_tool_call",
|
| 126 |
-
"id": "bash:12",
|
| 127 |
-
"name": "bash",
|
| 128 |
-
"input": "{\"command\": \"sleep 60\", \"description\": \"Wait for training to finish\"}",
|
| 129 |
-
"output": "(no output)",
|
| 130 |
-
"status": "completed"
|
| 131 |
-
},
|
| 132 |
-
{
|
| 133 |
-
"type": "custom_tool_call",
|
| 134 |
-
"id": "hf_jobs:13",
|
| 135 |
-
"name": "hf_jobs",
|
| 136 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 137 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n{'loss': '0.6979', 'grad_norm': '0.8113\u2026 [truncated 55 chars]",
|
| 138 |
-
"status": "completed"
|
| 139 |
-
},
|
| 140 |
-
{
|
| 141 |
-
"type": "custom_tool_call",
|
| 142 |
-
"id": "bash:14",
|
| 143 |
-
"name": "bash",
|
| 144 |
-
"input": "{\"command\": \"sleep 90\", \"description\": \"Wait for training to complete\"}",
|
| 145 |
-
"output": "(no output)",
|
| 146 |
-
"status": "completed"
|
| 147 |
-
},
|
| 148 |
-
{
|
| 149 |
-
"type": "custom_tool_call",
|
| 150 |
-
"id": "hf_jobs:15",
|
| 151 |
-
"name": "hf_jobs",
|
| 152 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 153 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n{'loss': '0.6979', 'grad_norm': '0.8113\u2026 [truncated 146 chars]",
|
| 154 |
-
"status": "completed"
|
| 155 |
-
},
|
| 156 |
-
{
|
| 157 |
-
"type": "custom_tool_call",
|
| 158 |
-
"id": "bash:16",
|
| 159 |
-
"name": "bash",
|
| 160 |
-
"input": "{\"command\": \"sleep 120\", \"description\": \"Wait for training to finish\"}",
|
| 161 |
-
"output": "(no output)",
|
| 162 |
-
"status": "completed"
|
| 163 |
-
},
|
| 164 |
-
{
|
| 165 |
-
"type": "custom_tool_call",
|
| 166 |
-
"id": "hf_jobs:17",
|
| 167 |
-
"name": "hf_jobs",
|
| 168 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 169 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n{'loss': '0.6979', 'grad_norm': '0.8113\u2026 [truncated 236 chars]",
|
| 170 |
-
"status": "completed"
|
| 171 |
-
},
|
| 172 |
-
{
|
| 173 |
-
"type": "custom_tool_call",
|
| 174 |
-
"id": "bash:18",
|
| 175 |
-
"name": "bash",
|
| 176 |
-
"input": "{\"command\": \"sleep 120\", \"description\": \"Wait for training to finish\"}",
|
| 177 |
-
"output": "(no output)",
|
| 178 |
-
"status": "completed"
|
| 179 |
-
},
|
| 180 |
-
{
|
| 181 |
-
"type": "custom_tool_call",
|
| 182 |
-
"id": "hf_jobs:19",
|
| 183 |
-
"name": "hf_jobs",
|
| 184 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 185 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n{'loss': '0.6979', 'grad_norm': '0.8113\u2026 [truncated 411 chars]",
|
| 186 |
-
"status": "completed"
|
| 187 |
-
},
|
| 188 |
-
{
|
| 189 |
-
"type": "custom_tool_call",
|
| 190 |
-
"id": "bash:20",
|
| 191 |
-
"name": "bash",
|
| 192 |
-
"input": "{\"command\": \"sleep 90\", \"description\": \"Wait for job to finish\"}",
|
| 193 |
-
"output": "(no output)",
|
| 194 |
-
"status": "completed"
|
| 195 |
-
},
|
| 196 |
-
{
|
| 197 |
-
"type": "custom_tool_call",
|
| 198 |
-
"id": "hf_jobs:21",
|
| 199 |
-
"name": "hf_jobs",
|
| 200 |
-
"input": "{\"operation\": \"logs\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 201 |
-
"output": "**Logs for 6a2cba84871c005b5352ba24:**\n\n```\nDownloading nvidia-cublas (403.5MiB)\nDownloading nvidia-cusparselt-cu13 (162.3MiB)\nDownloading pyarrow (46.6MiB)\nDownloading nvidia-cuda-cupti (10.2MiB)\nDownloading sympy (6.0MiB)\nDownloading pygments (1.2MiB)\nDownloading nvidia-cufile (1.2MiB)\nDownloading tokenizers (3.1MiB)\nDownloading nvidia-cusparse (139.2MiB)\nDownloading nvidia-cuda-runtime (2.1MiB)\nDownloading nvidia-cudnn-cu13 (349.2MiB)\nDownloading nvidia-cufft (204.2MiB)\nDownloading triton (192.1MiB)\nDownloading setuptools (1.0MiB)\nDownloading nvidia-cuda-nvrtc (86.0MiB)\nDownloading hf-xet (4.3MiB)\nDownloading nvidia-cusolver (191.6MiB)\nDownloading hf-transfer (3.4MiB)\nDownloading cuda-bindings (6.3MiB)\nDownloading pandas (10.4MiB)\nDownloading nvidia-nvshmem-cu13 (57.6MiB)\nDownloading nvidia-nccl-cu13 (196.4MiB)\nDownloading nvidia-nvjitlink (38.8MiB)\nDownloading networkx (2.0MiB)\nDownloading numpy (15.9MiB)\nDownloading aiohttp (1.7MiB)\nDownloading torch (507.6MiB)\nDownloading nvidia-curand (56.8MiB)\nDownloading transformers (10.6MiB)\n Downloaded nvidia-cufile\n Downloaded aiohttp\n Downloaded nvidia-cuda-runtime\n Downloaded pygments\n Downloaded tokenizers\n Downloaded setuptools\n Downloaded hf-transfer\n Downloaded networkx\n Downloaded hf-xet\n Downloaded cuda-bindings\n Downloaded nvidia-cuda-cupti\n Downloaded sympy\n Downloaded numpy\n Downloaded pandas\n Downloaded nvidia-nvjitlink\n Downloaded transformers\n Downloaded nvidia-curand\n Downloaded nvidia-nvshmem-cu13\n Downloaded nvidia-cuda-nvrtc\n Downloaded pyarrow\n Downloaded nvidia-cusparse\n Downloaded nvidia-cusparselt-cu13\n Downloaded nvidia-cusolver\n Downloaded nvidia-nccl-cu13\n Downloaded nvidia-cufft\n Downloaded triton\n Downloaded nvidia-cudnn-cu13\n Downloaded nvidia-cublas\n Downloaded torch\nInstalled 75 packages in 249ms\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/huggingface_hub/constants.py:298: FutureWarning: The `HF_HUB_ENABLE_HF_TRANSFER` environment variable is deprecated as 'hf_transfer' is not used anymore. Please use `HF_XET_HIGH_PERFORMANCE` instead to enable high performance transfer with Xet. Visit https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfxethighperformance for more details.\n warnings.warn(\n\n\rGenerating train split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating train split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 262536.49 examples/s]\n\n\rGenerating test split: 0%| | 0/25000 [00:00<?, ? examples/s]\rGenerating test split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 25000/25000 [00:00<00:00, 299508.42 examples/s]\n\n\rGenerating unsupervised split: 0%| | 0/50000 [00:00<?, ? examples/s]\rGenerating unsupervised split: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 50000/50000 [00:00<00:00, 298079.75 examples/s]\n\n\rMap: 0%| | 0/1000 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1000/1000 [00:00<00:00, 2368.15 examples/s]\n\n\rMap: 0%| | 0/200 [00:00<?, ? examples/s]\rMap: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 200/200 [00:00<00:00, 2555.81 examples/s]\n[transformers] DistilBertForSequenceClassification LOAD REPORT from: distilbert-base-uncased\nKey | Status | \n------------------------+------------+-\nvocab_layer_norm.weight | UNEXPECTED | \nvocab_projector.bias | UNEXPECTED | \nvocab_transform.bias | UNEXPECTED | \nvocab_transform.weight | UNEXPECTED | \nvocab_layer_norm.bias | UNEXPECTED | \nclassifier.bias | MISSING | \npre_classifier.weight | MISSING | \nclassifier.weight | MISSING | \npre_classifier.bias | MISSING | \n\nNotes:\n- UNEXPECTED:\tcan be ignored when loading from different task/architecture; not ok if you expect identical arch.\n- MISSING:\tthose params were newly initialized because missing from the checkpoint. Consider training on your downstream task.\n/root/.cache/uv/archive-v0/rUmhh6q7EMihhAVTbstVN/lib/python3.12/site-packages/torch/utils/data/dataloader.py:752: UserWarning: 'pin_memory' argument is set as true but no accelerator is found, then device pinned memory won't be used.\n super().__init__(loader)\n{'loss': '0.6979', 'grad_norm': '0.8113\u2026 [truncated 1032 chars]",
|
| 202 |
-
"status": "completed"
|
| 203 |
-
},
|
| 204 |
-
{
|
| 205 |
-
"type": "custom_tool_call",
|
| 206 |
-
"id": "hf_jobs:22",
|
| 207 |
-
"name": "hf_jobs",
|
| 208 |
-
"input": "{\"operation\": \"inspect\", \"job_id\": \"6a2cba84871c005b5352ba24\"}",
|
| 209 |
-
"output": "**Job Details** (1 job):\n\n```json\n[\n {\n \"id\": \"6a2cba84871c005b5352ba24\",\n \"status\": {\n \"stage\": \"COMPLETED\",\n \"message\": null\n },\n \"command\": [\n \"/bin/sh\",\n \"-lc\",\n \"set -e; _ml_intern_artifacts_dir=\\\"$(mktemp -d)\\\"; printf %s IyBBdXRvLWdlbmVyYXRlZCBieSBNTCBJbnRlcm4uIEJlc3QtZWZmb3J0IEh1YiBhcnRpZmFjdCBtZXRhZGF0YSBvbmx5LgpkZWYgX2luc3RhbGxfbWxfaW50ZXJuX2FydGlmYWN0X2hvb2tzKCk6CiAgICBpbXBvcnQgb3MKICAgIGltcG9ydCByZQogICAgaW1wb3J0IHRlbXBmaWxlCiAgICBmcm9tIHBhdGhsaWIgaW1wb3J0IFBhdGgKCiAgICB0cnk6CiAgICAgICAgaW1wb3J0IGh1Z2dpbmdmYWNlX2h1YiBhcyBfaHViCiAgICAgICAgZnJvbSBodWdnaW5nZmFjZV9odWIgaW1wb3J0IEhmQXBpLCBoZl9odWJfZG93bmxvYWQKICAgICAgICBmcm9tIGh1Z2dpbmdmYWNlX2h1Yi5yZXBvY2FyZCBpbXBvcnQgbWV0YWRhdGFfbG9hZCwgbWV0YWRhdGFfc2F2ZQogICAgICAgIGZyb20gaHVnZ2luZ2ZhY2VfaHViLnV0aWxzIGltcG9ydCBFbnRyeU5vdEZvdW5kRXJyb3IsIFJlcG9zaXRvcnlOb3RGb3VuZEVycm9yCiAgICBleGNlcHQgRXhjZXB0aW9uOgogICAgICAgIHJldHVybgoKICAgIHNlc3Npb25faWQgPSAnNTEyZjZiYWQtNmUyNC00MmNhLTlhNzItYzAyZjQ3NzE2MjgxJwogICAgc2Vzc2lvbl9kYXRlID0gJzIwMjYtMDYtMTMnCiAgICBjb2xsZWN0aW9uX3RpdGxlID0gJ21sLWludGVybi1hcnRpZmFjdHMtMjAyNi0wNi0xMy01MTJmNmJhZCcKICAgIHRhZyA9ICdtbC1pbnRlcm4nCiAgICBtYXJrZXIgPSAnPCEtLSBtbC1pbnRlcm4tcHJvdmVuYW5jZSAtLT4nCiAgICBzdXBwb3J0ZWQgPSBbJ2RhdGFzZXQnLCAnbW9kZWwnLCAnc3BhY2UnXQogICAgc2FuZGJveF9zcGFjZV9yZSA9IHJlLmNvbXBpbGUoJ15zYW5kYm94LVthLWYwLTldezh9JCcpCiAgICByZWdpc3RlcmluZyA9IEZhbHNlCiAgICBjb2xsZWN0aW9uX3NsdWcgPSBOb25lCiAgICByZWdpc3RlcmVkID0gc2V0KCkKICAgIHVzYWdlX3JlID0gcmUuY29tcGlsZSgKICAgICAgICByIl4jezIsNn1ccysodXNhZ2V8aG93IHRvIHVzZXx1c2luZyB0aGlzIChtb2RlbHxkYXRhc2V0KXx1c2UgdGhpcyAobW9kZWx8ZGF0YXNldCkpXGIiLAogICAgICAgIHJlLklHTk9SRUNBU0UgfCByZS5NVUxUSUxJTkUsCiAgICApCiAgICBmcm9udF9tYXR0ZXJfcmUgPSByZS5jb21waWxlKHIiXEEtLS1ccypcbi4qP1xuLS0tXHMqXG4/IiwgcmUuRE9UQUxMKQogICAgY29sbGVjdGlvbl9jYWNoZV9wYXRoID0gKAogICAgICAgIG9zLmVudmlyb24uZ2V0KCJNTF9JTlRFUk5fQVJUSUZBQ1RfQ09MTEVDVElPTl9DQUNIRSIpCiAgICAgICAgb3Igc3RyKAogICAgICAgICAgICBQYXRoKHRlbXBmaWxlLmdldHRlbXBkaXIoKSkKICAgICAgICAgICAgLyBmIm1sLWludGVybi1hcnRpZmFjdHMte3Nlc3Npb25faWR9LmNvbGxlY3Rpb24iCiAgICAgICAgKQogICAgKQoKICAgIGRlZiBfdG9rZW4odmFsdWU9Tm9uZSwgYXBpPU5vbmUpOgogICAgICAgIGlmIGlzaW5zdGFuY2UodmFsdWUsIHN0cikgYW5kIHZhbHVlOgogICAgICAgICAgICByZXR1cm4gdmFsdWUKICAgICAgICBhcGlfdG9rZW4gPSBnZXRhdHRyKGFwaSwgInRva2VuIiwgTm9uZSkKICAgICAgICBpZiBpc2luc3RhbmNlKGFwaV90b2tlbiwgc3RyKSBhbmQgYXBpX3Rva2VuOgogICAgICAgICAgICByZXR1cm4gYXBpX3Rva2VuCiAgICAgICAgcmV0dXJuICgKICAgICAgICAgICAgb3MuZW52aXJvbi5nZXQoIkhGX1RPS0VOIikKICAgICAgICAgICAgb3Igb3MuZW52aXJvbi5nZXQoIkhVR0dJTkdGQUNFX0hVQl9UT0tFTiIpCiAgICAgICAgICAgIG9yIE5vbmUKICAgICAgICApCgogICAgZGVmIF9tZXJnZV90YWdzKG1ldGFkYXRhKToKICAgICAgICBtZXRhZGF0YSA9IGRpY3QobWV0YWRhdGEgb3Ige30pCiAgICAgICAgcmF3X3RhZ3MgPSBtZXRhZGF0YS5nZXQoInRhZ3MiKQogICAgICAgIGlmIHJhd190YWdzIGlzIE5vbmU6CiAgICAgICAgICAgIHRhZ3MgPSBbXQogICAgICAgIGVsaWYgaXNpbnN0YW5jZShyYXdfdGFncywgc3RyKToKICAgICAgICAgICAgdGFncyA9IFtyYXdfdGFnc10KICAgICAgICBlbGlmIGlzaW5zdGFuY2UocmF3X3RhZ3MsIGxpc3QpOgogICAgICAgICAgICB0YWdzID0gW3N0cihpdGVtKSBmb3IgaXRlbSBpbiByYXdfdGFnc10KICAgICAgICBlbHNlOgogICAgICAgICAgICB0YWdzID0gW3N0cihyYXdfdGFncyldCiAgICAgICAgaWYgdGFnIG5vdCBpbiB0YWdzOgogICAgICAgICAgICB0YWdzLmFwcGVuZCh0YWcpCiAgICAgICAgbWV0YWRhdGFbInRhZ3MiXSA9IHRhZ3MKICAgICAgICByZXR1cm4gbWV0YWRhdGEKCiAgICBkZWYgX21ldGFkYXRhX2Zyb21fY29udGVudChjb250ZW50KToKICAgICAgICB3aXRoIHRlbXBmaWxlLlRlbXBvcmFyeURpcmVjdG9yeSgpIGFzIHRtcF9kaXI6CiAgICAgICAgICAgIHBhdGggPSBQYXRoKHRtcF9kaXIpIC8gIlJFQURNRS5tZCIKICAgICAgICAgICAgcGF0aC53cml0ZV90ZXh0KGNvbnRlbnQgb3IgIiIsIGVuY29kaW5nPSJ1dGYtOCIpCiAgICAgICAgICAgIHJldHVybiBtZXRhZGF0YV9sb2FkKHBhdGgpIG9yIHt9CgogICAgZGVmIF9jb250ZW50X3dpdGhfbWV0YWRhdGEoY29udGVudCwgbWV0YWRhdGEpOgogICAgICAgIHdpdGggdGVtcGZpbGUuVGVtcG9yYXJ5RGlyZWN0b3J5KCkgYXMgdG1wX2RpcjoKICAgICAgICAgICAgcGF0aCA9IFBhdGgodG1wX2RpcikgLyAiUkVBRE1FLm1kIgogICAgICAgICAgICBwYXRoLndyaXRlX3RleHQoY29udGVudCBvciAiIiwgZW5jb2Rpbmc9InV0Zi04IikKICAgICAgICAgICAgbWV0YWRhdGFfc2F2ZShwYXRoLCBtZXRhZGF0YSkKICAgICAgICAgICAgcmV0dXJuIHBhdGgucmVhZF90ZXh0KGVuY29kaW5nPSJ1dGYtOCIpCgogICAgZGVmIF9ib2R5X3dpdGhvdXRfbWV0YWRhdGEoY29udGVudCk6CiAgICAgICAgcmV0dXJuIGZyb250X21hdHRlcl9yZS5zdWIoIiIsIGNvbnRlbn\u2026 [truncated 16314 chars]",
|
| 210 |
-
"status": "completed"
|
| 211 |
-
},
|
| 212 |
-
{
|
| 213 |
-
"type": "message",
|
| 214 |
-
"id": "msg_23",
|
| 215 |
-
"role": "assistant",
|
| 216 |
-
"status": "completed",
|
| 217 |
-
"content": [
|
| 218 |
-
{
|
| 219 |
-
"type": "output_text",
|
| 220 |
-
"text": "Done. The HF Job finished successfully.\n\n**Job ID:** `6a2cba84871c005b5352ba24` \n**Job URL:** https://huggingface.co/jobs/abidlabs/6a2cba84871c005b5352ba24\n\n**Model published to:** \nhttps://huggingface.co/abidlabs/ml-intern-api-imdb-distilbert-20260613-020123\n\n**Eval metrics:**\n- `eval_loss`: 0.4811\n- `eval_accuracy`: 0.815\n- `eval_runtime`: 24.20 s\n- `epoch`: 0.9524\n\n**Minimal fixes applied:**\n1. Dataset ID: `\"imdb\"` \u2192 `\"stanfordnlp/imdb\"` (resolved `HfUriError`)\n2. `Trainer` argument: `tokenizer=tok` \u2192 `processing_class=tok` (resolved `TypeError` in current Transformers)"
|
| 221 |
-
}
|
| 222 |
-
]
|
| 223 |
-
}
|
| 224 |
-
],
|
| 225 |
-
"error": null,
|
| 226 |
-
"incomplete_details": null,
|
| 227 |
-
"usage": {
|
| 228 |
-
"session_id": "512f6bad-6e24-42ca-9a72-c02f47716281",
|
| 229 |
-
"total_usd": 0.0012,
|
| 230 |
-
"inference_usd": 0.0,
|
| 231 |
-
"hf_jobs_estimated_usd": 0.0012,
|
| 232 |
-
"sandbox_estimated_usd": 0.0,
|
| 233 |
-
"llm_calls": 24,
|
| 234 |
-
"hf_jobs_count": 3,
|
| 235 |
-
"sandbox_count": 0,
|
| 236 |
-
"prompt_tokens": 1188761,
|
| 237 |
-
"completion_tokens": 4229,
|
| 238 |
-
"cache_read_tokens": 1083392,
|
| 239 |
-
"cache_creation_tokens": 0,
|
| 240 |
-
"total_tokens": 1192990,
|
| 241 |
-
"hf_jobs_billable_seconds_estimate": 84,
|
| 242 |
-
"sandbox_billable_seconds_estimate": 0
|
| 243 |
-
},
|
| 244 |
-
"artifacts": [
|
| 245 |
-
{
|
| 246 |
-
"type": "hf_job",
|
| 247 |
-
"id": "6a2cba0a871c005b5352ba1e",
|
| 248 |
-
"url": "https://huggingface.co/jobs/abidlabs/6a2cba0a871c005b5352ba1e"
|
| 249 |
-
},
|
| 250 |
-
{
|
| 251 |
-
"type": "hf_job",
|
| 252 |
-
"id": "6a2cba40234ca64b6012104f",
|
| 253 |
-
"url": "https://huggingface.co/jobs/abidlabs/6a2cba40234ca64b6012104f"
|
| 254 |
-
},
|
| 255 |
-
{
|
| 256 |
-
"type": "hf_job",
|
| 257 |
-
"id": "6a2cba84871c005b5352ba24",
|
| 258 |
-
"url": "https://huggingface.co/jobs/abidlabs/6a2cba84871c005b5352ba24"
|
| 259 |
-
}
|
| 260 |
-
],
|
| 261 |
-
"metadata": {
|
| 262 |
-
"example_slug": "finetune-imdb-artifact",
|
| 263 |
-
"repo_id": "abidlabs/ml-intern-api-imdb-distilbert-20260613-020123"
|
| 264 |
-
}
|
| 265 |
-
}
|
| 266 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/example-results/multiturn-rag-followup.json
DELETED
|
@@ -1,142 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"title": "Multiturn RAG follow-up with previous_response_id",
|
| 3 |
-
"turns": [
|
| 4 |
-
{
|
| 5 |
-
"request": {
|
| 6 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 7 |
-
"instructions": "This is turn 1 of a multiturn API example. Keep it concise. Do not launch jobs or broad research sub-agents. Use direct Hub/model knowledge or at most two direct Hub lookups.",
|
| 8 |
-
"input": "For technical-document RAG, compare BAAI/bge-m3 and Qwen/Qwen3-Embedding-8B. Recommend one default embedding model for a startup that cares about good quality but low latency. Keep under 250 words.",
|
| 9 |
-
"background": true,
|
| 10 |
-
"max_cost_usd": 2.0,
|
| 11 |
-
"metadata": {
|
| 12 |
-
"example_slug": "multiturn-rag-followup",
|
| 13 |
-
"turn": "1"
|
| 14 |
-
}
|
| 15 |
-
},
|
| 16 |
-
"response": {
|
| 17 |
-
"id": "resp_2768fb94ff614a3a90a1c455548d767f",
|
| 18 |
-
"object": "response",
|
| 19 |
-
"created_at": 1781315593,
|
| 20 |
-
"completed_at": 1781315619,
|
| 21 |
-
"status": "completed",
|
| 22 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 23 |
-
"background": true,
|
| 24 |
-
"previous_response_id": null,
|
| 25 |
-
"session_id": "3098e124-fd5a-4968-90d9-4c11d6dee78a",
|
| 26 |
-
"max_cost_usd": 2.0,
|
| 27 |
-
"instructions": "This is turn 1 of a multiturn API example. Keep it concise. Do not launch jobs or broad research sub-agents. Use direct Hub/model knowledge or at most two direct Hub lookups.",
|
| 28 |
-
"output": [
|
| 29 |
-
{
|
| 30 |
-
"type": "custom_tool_call",
|
| 31 |
-
"id": "hub_repo_details:0",
|
| 32 |
-
"name": "hub_repo_details",
|
| 33 |
-
"input": "{\"repo_ids\": [\"BAAI/bge-m3\", \"Qwen/Qwen3-Embedding-8B\"]}",
|
| 34 |
-
"output": "**Type: Model**\n\n# BAAI/bge-m3\n\n## Overview\n- **Author:** BAAI\n- **Task:** sentence-similarity\n- **Library:** sentence-transformers\n- **Downloads:** 182.5M | **Likes:** 3104\n- **Updated:** 3 Jul, 2024\n\n## Technical Details\n- **Architecture:** xlm-roberta\n\n## Tags\n`sentence-transformers` `pytorch` `onnx` `xlm-roberta` `feature-extraction` `sentence-similarity` `arxiv:2402.03216` `arxiv:2004.04906` `arxiv:2106.14807` `arxiv:2107.05720` `arxiv:2004.12832` `license:mit` `eval-results` `text-embeddings-inference` `endpoints_compatible` `deploy:azure` `region:us`\n\n## Metadata\n- **License:** mit\n\n## Demo Spaces\n- [leaderboard](https://hf.co/spaces/mteb/leaderboard)\n- [DanbooruSearch](https://hf.co/spaces/SAkizuki/DanbooruSearch)\n- [WenQiuYue](https://hf.co/spaces/SAkizuki/WenQiuYue)\n- [ManthanAI](https://hf.co/spaces/anirudh594/ManthanAI)\n- [construction-rag](https://hf.co/spaces/Ashanasri/construction-rag)\n- [leaderboard](https://hf.co/spaces/mteb-pt/leaderboard)\n- [FinTech-FinalProject-Group7](https://hf.co/spaces/JasonRott/FinTech-FinalProject-Group7)\n- [rag2](https://hf.co/spaces/shreyasp11111111111111/rag2)\n- [foodeval-leaderboard](https://hf.co/spaces/latimal/foodeval-leaderboard)\n- [leaderboard_legacy](https://hf.co/spaces/mteb/leaderboard_legacy)\n- [thai_sentence_embedding_benchmark](https://hf.co/spaces/panuthept/thai_sentence_embedding_benchmark)\n- [mtem-pruner](https://hf.co/spaces/antoinelouis/mtem-pruner)\n- *... and 88 more spaces*\n\n## Inference Providers\n- **hf-inference** (live)\n\nTry this model in the [playground](https://hf.co/playground?modelId=BAAI/bge-m3)\n\n**Link:** [https://hf.co/BAAI/bge-m3](https://hf.co/BAAI/bge-m3)\n\n---\n\n**Type: Model**\n\n# Qwen/Qwen3-Embedding-8B\n\n## Overview\n- **Author:** Qwen\n- **Task:** feature-extraction\n- **Library:** sentence-transformers\n- **Downloads:** 13.8M | **Likes:** 705\n- **Updated:** 7 Jul, 2025\n\n## Technical Details\n- **Model Class:** AutoModel\n- **Parameters:** 7567.3M\n\n## Tags\n`sentence-transformers` `safetensors` `transformers` `sentence-similarity` `feature-extraction` `text-embeddings-inference` `arxiv:2506.05176` `base_model:Qwen/Qwen3-8B-Base` `base_model:finetune:Qwen/Qwen3-8B-Base` `license:apache-2.0` `endpoints_compatible` `deploy:azure` `region:us`\n\n## Metadata\n- **License:** apache-2.0\n\n## Demo Spaces\n- [leaderboard](https://hf.co/spaces/mteb/leaderboard)\n- [leaderboard](https://hf.co/spaces/mteb-pt/leaderboard)\n- [PhiRAG](https://hf.co/spaces/alx-d/PhiRAG)\n- [nomic-embeddings](https://hf.co/spaces/ipepe/nomic-embeddings)\n- [miian-Q3](https://hf.co/spaces/miiann/miian-Q3)\n- [rag_korean_manufacturing_docs](https://hf.co/spaces/Ahmed-El-Zainy/rag_korean_manufacturing_docs)\n- [germeval2025](https://hf.co/spaces/cortex359/germeval2025)\n- [Saudi-Law-AI-Assistant](https://hf.co/spaces/AldawsariNLP/Saudi-Law-AI-Assistant)\n- [AIDA](https://hf.co/spaces/destinyebuka/AIDA)\n- [legacy_code_modernizer](https://hf.co/spaces/MCP-1st-Birthday/legacy_code_modernizer)\n- [central-memory-agent](https://hf.co/spaces/MCP-1st-Birthday/central-memory-agent)\n- [leaderboard](https://hf.co/spaces/maxpar1/leaderboard)\n- *... and 49 more spaces*\n\n## Inference Providers\n- **scaleway** (live)\n- **novita** (error)\n- **nebius** (error)\n\nTry this model in the [playground](https://hf.co/playground?modelId=Qwen/Qwen3-Embedding-8B)\n\n**Link:** [https://hf.co/Qwen/Qwen3-Embedding-8B](https://hf.co/Qwen/Qwen3-Embedding-8B)",
|
| 35 |
-
"status": "completed"
|
| 36 |
-
},
|
| 37 |
-
{
|
| 38 |
-
"type": "message",
|
| 39 |
-
"id": "msg_1",
|
| 40 |
-
"role": "assistant",
|
| 41 |
-
"status": "completed",
|
| 42 |
-
"content": [
|
| 43 |
-
{
|
| 44 |
-
"type": "output_text",
|
| 45 |
-
"text": "**Recommendation: BAAI/bge-m3**\n\n| | **BAAI/bge-m3** | **Qwen/Qwen3-Embedding-8B** |\n|---|---|---|\n| **Size** | ~568 M | 7.6 B |\n| **Architecture** | XLM-RoBERTa (encoder) | Qwen3 decoder-based |\n| **Downloads** | 182 M | 14 M |\n| **Embedding modes** | Dense, sparse, multi-vector | Dense |\n\nFor a startup optimizing quality **and** latency, **bge-m3 is the better default**.\n\nIt is roughly **13\u00d7 smaller** than Qwen3-Embedding-8B, so inference is significantly faster and cheaper to host\u2014even with `text-embeddings-inference` (TEI). Despite its smaller footprint, bge-m3 is a proven, production-grade retriever with strong MTEB scores, 100+ language support, and built-in sparse/multi-vector capabilities that improve technical-document recall without extra model calls.\n\nQwen3-Embedding-8B is newer and likely scores higher on some English-only MTEB tasks, but its 8 B parameter count introduces real latency and cost penalties at scale. For RAG, embedding latency directly impacts user-perceived response time, and the marginal retrieval gains rarely justify the slowdown for startup workloads.\n\n**Verdict:** Start with **BAAI/bge-m3**. It offers the best quality-per-latency trade-off for technical-document RAG and is trivial to deploy via TEI or sentence-transformers. Consider the Qwen model only if you later find specific retrieval gaps that smaller models cannot close."
|
| 46 |
-
}
|
| 47 |
-
]
|
| 48 |
-
}
|
| 49 |
-
],
|
| 50 |
-
"error": null,
|
| 51 |
-
"incomplete_details": null,
|
| 52 |
-
"usage": {
|
| 53 |
-
"session_id": "3098e124-fd5a-4968-90d9-4c11d6dee78a",
|
| 54 |
-
"total_usd": 0.0,
|
| 55 |
-
"inference_usd": 0.0,
|
| 56 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 57 |
-
"sandbox_estimated_usd": 0.0,
|
| 58 |
-
"llm_calls": 2,
|
| 59 |
-
"hf_jobs_count": 0,
|
| 60 |
-
"sandbox_count": 0,
|
| 61 |
-
"prompt_tokens": 30620,
|
| 62 |
-
"completion_tokens": 898,
|
| 63 |
-
"cache_read_tokens": 28672,
|
| 64 |
-
"cache_creation_tokens": 0,
|
| 65 |
-
"total_tokens": 31518,
|
| 66 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 67 |
-
"sandbox_billable_seconds_estimate": 0
|
| 68 |
-
},
|
| 69 |
-
"artifacts": [],
|
| 70 |
-
"metadata": {
|
| 71 |
-
"example_slug": "multiturn-rag-followup",
|
| 72 |
-
"turn": "1"
|
| 73 |
-
}
|
| 74 |
-
}
|
| 75 |
-
},
|
| 76 |
-
{
|
| 77 |
-
"request": {
|
| 78 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 79 |
-
"previous_response_id": "resp_2768fb94ff614a3a90a1c455548d767f",
|
| 80 |
-
"instructions": "This is turn 2 of a multiturn API example. Reuse the prior recommendation; do not restate the comparison. Provide runnable minimal code only plus two setup notes. Do not launch jobs.",
|
| 81 |
-
"input": "Using your recommended embedding model from the previous turn, write a minimal Python script that indexes 100 local Markdown files and retrieves the top 5 chunks for a query. Keep it compact.",
|
| 82 |
-
"background": true,
|
| 83 |
-
"max_cost_usd": 2.0,
|
| 84 |
-
"metadata": {
|
| 85 |
-
"example_slug": "multiturn-rag-followup",
|
| 86 |
-
"turn": "2"
|
| 87 |
-
}
|
| 88 |
-
},
|
| 89 |
-
"response": {
|
| 90 |
-
"id": "resp_29eb917b2e2c4a0fbecdba4aa8303a21",
|
| 91 |
-
"object": "response",
|
| 92 |
-
"created_at": 1781315627,
|
| 93 |
-
"completed_at": 1781315637,
|
| 94 |
-
"status": "completed",
|
| 95 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 96 |
-
"background": true,
|
| 97 |
-
"previous_response_id": "resp_2768fb94ff614a3a90a1c455548d767f",
|
| 98 |
-
"session_id": "3098e124-fd5a-4968-90d9-4c11d6dee78a",
|
| 99 |
-
"max_cost_usd": 2.0,
|
| 100 |
-
"instructions": "This is turn 2 of a multiturn API example. Reuse the prior recommendation; do not restate the comparison. Provide runnable minimal code only plus two setup notes. Do not launch jobs.",
|
| 101 |
-
"output": [
|
| 102 |
-
{
|
| 103 |
-
"type": "message",
|
| 104 |
-
"id": "msg_0",
|
| 105 |
-
"role": "assistant",
|
| 106 |
-
"status": "completed",
|
| 107 |
-
"content": [
|
| 108 |
-
{
|
| 109 |
-
"type": "output_text",
|
| 110 |
-
"text": "```python\n# pip install sentence-transformers faiss-cpu markdown\nimport os, glob, faiss, numpy as np\nfrom sentence_transformers import SentenceTransformer\nfrom markdown import markdown\nfrom bs4 import BeautifulSoup\n\ndef md_to_text(path):\n with open(path, encoding=\"utf-8\") as f:\n html = markdown(f.read())\n return BeautifulSoup(html, \"html.parser\").get_text()\n\nmodel = SentenceTransformer(\"BAAI/bge-m3\")\nfiles = glob.glob(\"docs/**/*.md\", recursive=True)[:100]\nchunks, metas = [], []\nfor f in files:\n text = md_to_text(f)\n for i in range(0, len(text), 500):\n chunks.append(text[i:i+500])\n metas.append((f, i))\n\nemb = model.encode(chunks, normalize_embeddings=True, show_progress_bar=False)\nindex = faiss.IndexFlatIP(emb.shape[1])\nindex.add(np.array(emb, dtype=\"float32\"))\n\ndef search(query, k=5):\n q = model.encode([query], normalize_embeddings=True)\n D, I = index.search(np.array(q, dtype=\"float32\"), k)\n return [(metas[i], float(D[0][j])) for j, i in enumerate(I[0])]\n\n# Example\nfor (file, offset), score in search(\"how to configure the API\"):\n print(f\"{score:.3f} {file} @ {offset}\")\n```\n\n**Setup notes**\n1. Install dependencies: `pip install sentence-transformers faiss-cpu markdown beautifulsoup4`\n2. Place Markdown files under a `docs/` folder (or change the `glob.glob` path)."
|
| 111 |
-
}
|
| 112 |
-
]
|
| 113 |
-
}
|
| 114 |
-
],
|
| 115 |
-
"error": null,
|
| 116 |
-
"incomplete_details": null,
|
| 117 |
-
"usage": {
|
| 118 |
-
"session_id": "3098e124-fd5a-4968-90d9-4c11d6dee78a",
|
| 119 |
-
"total_usd": 0.0,
|
| 120 |
-
"inference_usd": 0.0,
|
| 121 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 122 |
-
"sandbox_estimated_usd": 0.0,
|
| 123 |
-
"llm_calls": 3,
|
| 124 |
-
"hf_jobs_count": 0,
|
| 125 |
-
"sandbox_count": 0,
|
| 126 |
-
"prompt_tokens": 46984,
|
| 127 |
-
"completion_tokens": 1317,
|
| 128 |
-
"cache_read_tokens": 43008,
|
| 129 |
-
"cache_creation_tokens": 0,
|
| 130 |
-
"total_tokens": 48301,
|
| 131 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 132 |
-
"sandbox_billable_seconds_estimate": 0
|
| 133 |
-
},
|
| 134 |
-
"artifacts": [],
|
| 135 |
-
"metadata": {
|
| 136 |
-
"example_slug": "multiturn-rag-followup",
|
| 137 |
-
"turn": "2"
|
| 138 |
-
}
|
| 139 |
-
}
|
| 140 |
-
}
|
| 141 |
-
]
|
| 142 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/example-results/rag-embedding-reranker-selection.json
DELETED
|
@@ -1,72 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"request": {
|
| 3 |
-
"slug": "rag-embedding-reranker-selection",
|
| 4 |
-
"title": "Choose embedding and reranker models for RAG",
|
| 5 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 6 |
-
"instructions": "Keep this as a quick model-selection answer. Do not launch broad research sub-agents. Use at most four direct Hugging Face lookups, then answer.",
|
| 7 |
-
"input": "For a 2026 production RAG system over technical docs, compare these Hugging Face options: Qwen/Qwen3-Embedding-8B, BAAI/bge-m3, jinaai/jina-embeddings-v4, and BAAI/bge-reranker-v2-m3. Recommend an embedding + reranker stack for quality vs latency. Include one short sentence-transformers or transformers usage snippet. Keep under 450 words.",
|
| 8 |
-
"background": true,
|
| 9 |
-
"max_cost_usd": 2.0,
|
| 10 |
-
"metadata": {
|
| 11 |
-
"example_slug": "rag-embedding-reranker-selection"
|
| 12 |
-
}
|
| 13 |
-
},
|
| 14 |
-
"response": {
|
| 15 |
-
"id": "resp_c32ba10ebac6446f83d6e18102f54b44",
|
| 16 |
-
"object": "response",
|
| 17 |
-
"created_at": 1781314650,
|
| 18 |
-
"completed_at": 1781314686,
|
| 19 |
-
"status": "completed",
|
| 20 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 21 |
-
"background": true,
|
| 22 |
-
"previous_response_id": null,
|
| 23 |
-
"session_id": "b6254061-b8b9-4d8c-8768-a4d96606263f",
|
| 24 |
-
"max_cost_usd": 2.0,
|
| 25 |
-
"instructions": "Keep this as a quick model-selection answer. Do not launch broad research sub-agents. Use at most four direct Hugging Face lookups, then answer.",
|
| 26 |
-
"output": [
|
| 27 |
-
{
|
| 28 |
-
"type": "custom_tool_call",
|
| 29 |
-
"id": "hub_repo_details:0",
|
| 30 |
-
"name": "hub_repo_details",
|
| 31 |
-
"input": "{\"repo_ids\": [\"Qwen/Qwen3-Embedding-8B\", \"BAAI/bge-m3\", \"jinaai/jina-embeddings-v4\", \"BAAI/bge-reranker-v2-m3\"]}",
|
| 32 |
-
"output": "**Type: Model**\n\n# Qwen/Qwen3-Embedding-8B\n\n## Overview\n- **Author:** Qwen\n- **Task:** feature-extraction\n- **Library:** sentence-transformers\n- **Downloads:** 13.8M | **Likes:** 705\n- **Updated:** 7 Jul, 2025\n\n## Technical Details\n- **Model Class:** AutoModel\n- **Parameters:** 7567.3M\n\n## Tags\n`sentence-transformers` `safetensors` `transformers` `sentence-similarity` `feature-extraction` `text-embeddings-inference` `arxiv:2506.05176` `base_model:Qwen/Qwen3-8B-Base` `base_model:finetune:Qwen/Qwen3-8B-Base` `license:apache-2.0` `endpoints_compatible` `deploy:azure` `region:us`\n\n## Metadata\n- **License:** apache-2.0\n\n## Demo Spaces\n- [leaderboard](https://hf.co/spaces/mteb/leaderboard)\n- [leaderboard](https://hf.co/spaces/mteb-pt/leaderboard)\n- [PhiRAG](https://hf.co/spaces/alx-d/PhiRAG)\n- [nomic-embeddings](https://hf.co/spaces/ipepe/nomic-embeddings)\n- [miian-Q3](https://hf.co/spaces/miiann/miian-Q3)\n- [rag_korean_manufacturing_docs](https://hf.co/spaces/Ahmed-El-Zainy/rag_korean_manufacturing_docs)\n- [germeval2025](https://hf.co/spaces/cortex359/germeval2025)\n- [Saudi-Law-AI-Assistant](https://hf.co/spaces/AldawsariNLP/Saudi-Law-AI-Assistant)\n- [AIDA](https://hf.co/spaces/destinyebuka/AIDA)\n- [legacy_code_modernizer](https://hf.co/spaces/MCP-1st-Birthday/legacy_code_modernizer)\n- [central-memory-agent](https://hf.co/spaces/MCP-1st-Birthday/central-memory-agent)\n- [leaderboard](https://hf.co/spaces/maxpar1/leaderboard)\n- *... and 48 more spaces*\n\n## Inference Providers\n- **scaleway** (live)\n- **novita** (error)\n- **nebius** (error)\n\nTry this model in the [playground](https://hf.co/playground?modelId=Qwen/Qwen3-Embedding-8B)\n\n**Link:** [https://hf.co/Qwen/Qwen3-Embedding-8B](https://hf.co/Qwen/Qwen3-Embedding-8B)\n\n---\n\n**Type: Model**\n\n# BAAI/bge-m3\n\n## Overview\n- **Author:** BAAI\n- **Task:** sentence-similarity\n- **Library:** sentence-transformers\n- **Downloads:** 182.5M | **Likes:** 3104\n- **Updated:** 3 Jul, 2024\n\n## Technical Details\n- **Architecture:** xlm-roberta\n\n## Tags\n`sentence-transformers` `pytorch` `onnx` `xlm-roberta` `feature-extraction` `sentence-similarity` `arxiv:2402.03216` `arxiv:2004.04906` `arxiv:2106.14807` `arxiv:2107.05720` `arxiv:2004.12832` `license:mit` `eval-results` `text-embeddings-inference` `endpoints_compatible` `deploy:azure` `region:us`\n\n## Metadata\n- **License:** mit\n\n## Demo Spaces\n- [leaderboard](https://hf.co/spaces/mteb/leaderboard)\n- [DanbooruSearch](https://hf.co/spaces/SAkizuki/DanbooruSearch)\n- [WenQiuYue](https://hf.co/spaces/SAkizuki/WenQiuYue)\n- [ManthanAI](https://hf.co/spaces/anirudh594/ManthanAI)\n- [construction-rag](https://hf.co/spaces/Ashanasri/construction-rag)\n- [leaderboard](https://hf.co/spaces/mteb-pt/leaderboard)\n- [FinTech-FinalProject-Group7](https://hf.co/spaces/JasonRott/FinTech-FinalProject-Group7)\n- [rag2](https://hf.co/spaces/shreyasp11111111111111/rag2)\n- [foodeval-leaderboard](https://hf.co/spaces/latimal/foodeval-leaderboard)\n- [leaderboard_legacy](https://hf.co/spaces/mteb/leaderboard_legacy)\n- [thai_sentence_embedding_benchmark](https://hf.co/spaces/panuthept/thai_sentence_embedding_benchmark)\n- [mtem-pruner](https://hf.co/spaces/antoinelouis/mtem-pruner)\n- *... and 88 more spaces*\n\n## Inference Providers\n- **hf-inference** (live)\n\nTry this model in the [playground](https://hf.co/playground?modelId=BAAI/bge-m3)\n\n**Link:** [https://hf.co/BAAI/bge-m3](https://hf.co/BAAI/bge-m3)\n\n---\n\n**Type: Model**\n\n# jinaai/jina-embeddings-v4\n\n## Overview\n- **Author:** jinaai\n- **Task:** visual-document-retrieval\n- **Library:** transformers\n- **Downloads:** 2.4M | **Likes:** 525\n- **Updated:** 8 Apr, 2026\n\n## Technical Details\n- **Model Class:** AutoModel\n- **Parameters:** 3754.9M\n\n## Tags\n`transformers` `safetensors` `image-feature-extraction` `vidore` `colpali` `multimodal-embedding` `multilingual-embedding` `Text-to-Visual Document (T\u2192VD) retrieval` `feature-extraction` `sentence-similarity` `mteb` `sentence-transformers` `vllm` `visual-document-retrieval` `custom_code` `multilingual` `arxiv:2506.18902` `region:eu`\n\n## Metadata\n- **Language:** multilingual\n\n## Demo\u2026 [truncated 2919 chars]",
|
| 33 |
-
"status": "completed"
|
| 34 |
-
},
|
| 35 |
-
{
|
| 36 |
-
"type": "message",
|
| 37 |
-
"id": "msg_1",
|
| 38 |
-
"role": "assistant",
|
| 39 |
-
"status": "completed",
|
| 40 |
-
"content": [
|
| 41 |
-
{
|
| 42 |
-
"type": "output_text",
|
| 43 |
-
"text": "| Model | Params | Speed | Best For |\n|---|---|---|---|\n| **Qwen3-Embedding-8B** | 7.6B | Slowest | Maximum retrieval quality |\n| **BAAI/bge-m3** | ~278M | Fastest | Proven production workhorse |\n| **jina-embeddings-v4** | 3.8B | Medium | Visual/multimodal docs, late chunking |\n| **BAAI/bge-reranker-v2-m3** | 568M | Fast | Standard reranker |\n\n**Latency stack:** `BAAI/bge-m3` + `BAAI/bge-reranker-v2-m3`. bge-m3 is the most downloaded embedding on the Hub (182M), runs efficiently on CPU or small GPU, and handles multilingual technical text well. The 568M reranker is lightweight to re-score top-k chunks.\n\n**Quality stack:** `Qwen/Qwen3-Embedding-8B` + `BAAI/bge-reranker-v2-m3`. The 8B Qwen3 model dominates MTEB benchmarks and captures nuanced technical concepts far better than smaller encoders, but budget a GPU for inference.\n\n**Jina v4** (3.8B, April 2026) is compelling if your docs include diagrams or you want ColPali-style visual retrieval; otherwise it sits between the other two on speed/quality.\n\nShort usage snippet:\n```python\nfrom sentence_transformers import SentenceTransformer\nmodel = SentenceTransformer(\"BAAI/bge-m3\")\nembeddings = model.encode(docs, normalize_embeddings=True)\n```"
|
| 44 |
-
}
|
| 45 |
-
]
|
| 46 |
-
}
|
| 47 |
-
],
|
| 48 |
-
"error": null,
|
| 49 |
-
"incomplete_details": null,
|
| 50 |
-
"usage": {
|
| 51 |
-
"session_id": "b6254061-b8b9-4d8c-8768-a4d96606263f",
|
| 52 |
-
"total_usd": 0.0,
|
| 53 |
-
"inference_usd": 0.0,
|
| 54 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 55 |
-
"sandbox_estimated_usd": 0.0,
|
| 56 |
-
"llm_calls": 2,
|
| 57 |
-
"hf_jobs_count": 0,
|
| 58 |
-
"sandbox_count": 0,
|
| 59 |
-
"prompt_tokens": 31905,
|
| 60 |
-
"completion_tokens": 1413,
|
| 61 |
-
"cache_read_tokens": 14336,
|
| 62 |
-
"cache_creation_tokens": 0,
|
| 63 |
-
"total_tokens": 33318,
|
| 64 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 65 |
-
"sandbox_billable_seconds_estimate": 0
|
| 66 |
-
},
|
| 67 |
-
"artifacts": [],
|
| 68 |
-
"metadata": {
|
| 69 |
-
"example_slug": "rag-embedding-reranker-selection"
|
| 70 |
-
}
|
| 71 |
-
}
|
| 72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/example-results/sparse-autoencoders-interpretability.json
DELETED
|
@@ -1,87 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"request": {
|
| 3 |
-
"slug": "sparse-autoencoders-interpretability",
|
| 4 |
-
"title": "Research sparse autoencoders for interpretability",
|
| 5 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 6 |
-
"input": "Research sparse autoencoders (SAEs) for mechanistic interpretability of language models. In 5 concise bullets, explain the current frontier, the main open problem, and cite 2 relevant Hugging Face paper pages if available. Keep under 350 words.",
|
| 7 |
-
"background": true,
|
| 8 |
-
"max_cost_usd": 3.0,
|
| 9 |
-
"metadata": {
|
| 10 |
-
"example_slug": "sparse-autoencoders-interpretability"
|
| 11 |
-
}
|
| 12 |
-
},
|
| 13 |
-
"response": {
|
| 14 |
-
"id": "resp_0a5e9ee6a94a43eda152c4310d7ddab2",
|
| 15 |
-
"object": "response",
|
| 16 |
-
"created_at": 1781314801,
|
| 17 |
-
"completed_at": 1781314831,
|
| 18 |
-
"status": "completed",
|
| 19 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 20 |
-
"background": true,
|
| 21 |
-
"previous_response_id": null,
|
| 22 |
-
"session_id": "b84ec8fc-8ace-4431-9566-99c401b1cfee",
|
| 23 |
-
"max_cost_usd": 3.0,
|
| 24 |
-
"instructions": null,
|
| 25 |
-
"output": [
|
| 26 |
-
{
|
| 27 |
-
"type": "custom_tool_call",
|
| 28 |
-
"id": "hf_papers_0",
|
| 29 |
-
"name": "hf_papers",
|
| 30 |
-
"input": "{\"operation\": \"search\", \"query\": \"sparse autoencoders mechanistic interpretability language models\", \"limit\": 15}",
|
| 31 |
-
"output": "# Papers matching 'sparse autoencoders mechanistic interpretability language models'\nShowing 15 paper(s)\n\n## 1. The Birth of Knowledge: Emergent Features across Time, Space, and Scale\n in Large Language Models\n**arxiv_id:** 2505.19440 | **upvotes:** 1\nhttps://huggingface.co/papers/2505.19440\n**Keywords:** large language models, interpretable categorical features, training checkpoints, transformer layers, varying model sizes\n**Summary:** The study examines interpretable categorical features in large language models, using sparse autoencoders to identify semantic concept emergence over time, across layers, and varying sizes, revealing spatial feature reactivation.\n\n## 2. Geospatial Mechanistic Interpretability of Large Language Models\n**arxiv_id:** 2505.03368 | **upvotes:** 13\nhttps://huggingface.co/papers/2505.03368\n**Keywords:** Large Language Models, geospatial mechanistic interpretability, spatial analysis, probing, mechanistic interpretability\n**GitHub:** https://github.com/sdesabbata/geospatial-mechanistic-interpretability (19 stars)\n**Summary:** A framework for understanding how Large Language Models process geographical information using spatial analysis and mechanistic interpretability techniques.\n\n## 3. Sparse Autoencoders Find Highly Interpretable Features in Language\n Models\n**arxiv_id:** 2309.08600 | **upvotes:** 15\nhttps://huggingface.co/papers/2309.08600\n**Keywords:** polysemanticity, superposition, sparse autoencoders, internal activations, monosemantic\n**GitHub:** https://github.com/hoagyc/sparse_coding (305 stars)\n**Summary:** Using sparse autoencoders, this work identifies and removes overcomplete directions in language model activations, improving interpretability and model editability.\n\n## 4. A Survey on Sparse Autoencoders: Interpreting the Internal Mechanisms of Large Language Models\n**arxiv_id:** 2503.05613 | **upvotes:** 0\nhttps://huggingface.co/papers/2503.05613\n**Keywords:** Sparse Autoencoders, Large Language Models, mechanistic interpretability, input-based explanation, output-based explanation\n**Summary:** A survey explores the use of Sparse Autoencoders for interpreting Large Language Models, detailing their architecture, explanation methods, evaluation metrics, and applications.\n\n## 5. Interpreting and Steering Protein Language Models through Sparse\n Autoencoders\n**arxiv_id:** 2502.09135 | **upvotes:** 1\nhttps://huggingface.co/papers/2502.09135\n**Keywords:** sparse autoencoders, protein language models, latent components, protein annotations, transmembrane regions\n**GitHub:** https://github.com/edithvillegas/plm-sae (1 stars)\n**Summary:** Latent components of a protein language model (ESM-2) are analyzed using sparse autoencoders to guide sequence generation towards specific protein characteristics.\n\n## 6. Sparse Autoencoders Enable Scalable and Reliable Circuit Identification\n in Language Models\n**arxiv_id:** 2405.12522 | **upvotes:** 2\nhttps://huggingface.co/papers/2405.12522\n**Keywords:** sparse autoencoders, discrete sparse autoencoders, attention head outputs, integer codes, indirect object identification\n**Summary:** A new method using discrete sparse autoencoders identifies interpretable circuits in large language models efficiently and robustly, outperforming baselines with reduced computational cost.\n\n## 7. Qwen-Scope: Turning Sparse Features into Development Tools for Large Language Models\n**arxiv_id:** 2605.11887 | **upvotes:** 13\nhttps://huggingface.co/papers/2605.11887\n**Keywords:** sparse autoencoders, mechanistic interpretability, language models, inference-time steering, evaluation analysis\n**Summary:** Sparse autoencoders (SAEs) developed for Qwen models enable both interpretability and practical model development applications including inference steering, evaluation analysis, data-centric workflows, and post-training optimization.\n\n## 8. Evaluating and Designing Sparse Autoencoders by Approximating\n Quasi-Orthogonality\n**arxiv_id:** 2503.24277 | **upvotes:** 8\nhttps://huggingface.co/papers/2503.24277\n**Keywords:** sparse autoencoders, $\\ell_0$, $\\ell_2$-norm, feature a\u2026 [truncated 3794 chars]",
|
| 32 |
-
"status": "completed"
|
| 33 |
-
},
|
| 34 |
-
{
|
| 35 |
-
"type": "custom_tool_call",
|
| 36 |
-
"id": "hf_papers_1",
|
| 37 |
-
"name": "hf_papers",
|
| 38 |
-
"input": "{\"operation\": \"read_paper\", \"arxiv_id\": \"2503.05613\"}",
|
| 39 |
-
"output": "# A Survey on Sparse Autoencoders:Interpreting the Internal Mechanisms of Large Language Models\nhttps://arxiv.org/abs/2503.05613\n\n## Abstract\nLarge Language Models (LLMs) have transformed natural language processing, yet their internal mechanisms remain largely opaque. Recently, mechanistic interpretability has attracted significant attention from the research community as a means to understand the inner workings of LLMs. Among various mechanistic interpretability approaches, Sparse Autoencoders (SAEs) have emerged as a promising method due to their ability to disentangle the complex, superimposed features within LLMs into more interpretable components. This paper presents a comprehensive survey of SAEs for interpreting and understanding the internal workings of LLMs. Our major contributions include: (1) exploring the technical framework of SAEs, covering basic architecture, design improvements, and effective training strategies; (2) examining different approaches to explaining SAE features, categorized into input-based and output-based explanation methods; (3) discussing evaluation methods for assessing SAE performance, covering both structural and functional metrics; and (4) investigating real-world applications of SAEs in understanding and manipulating LLM behaviors.\n\n## Sections\n- **1 Introduction**: Large Language Models (LLMs), such as GPT-4 OpenAI et\u00a0al. ( 2024 ) , Claude-3.5 Anthropic ( 2024 ) , DeepSeek-R1 DeepSeek-AI et\u00a0al. ( 2025 ) , and Grok-3 xAI ( 2025 ) , have emerged as powerful tools in natural language processing, demonstrating remarkable capabilities in tasks r...\n - **1.1 Contribution and Uniqueness**: Our Contributions. In this paper, we provide a comprehensive overview of SAE for LLM interpretability, with major contributions listed as following: (1) We explore the technical framework of SAEs, including their basic architecture, various design improvements, and effective trai...\n- **2 Technical Framework of SAEs**: 2.1 Basic SAE Framework SAE is a neural network that learns an overcomplete dictionary for representation reconstruction. As shown in Figure 1 a, the input of SAE is the representation of a token from LLMs, which is mapped onto a sparse vector of dictionary activations. Input. Gi...\n - **2.1 Basic SAE Framework**: SAE is a neural network that learns an overcomplete dictionary for representation reconstruction. As shown in Figure 1 a, the input of SAE is the representation of a token from LLMs, which is mapped onto a sparse vector of dictionary activations.\n\nInput. Given a LLM denoted as f ...\n - **2.2 Different SAE Variants**: As SAEs continue to emerge as a powerful tool for interpreting the internal representations of LLMs, researchers have increasingly focused on refining and extending their capabilities. Various SAE variants have been proposed to address the limitations of traditional SAEs, each in...\n- **3 Explainability Analysis of SAEs**: This section aims to interpret the learned feature vectors from a trained SAE with natural language.\nSpecifically, given a pre-defined vocabulary set \ud835\udcb1 \\mathcal{V} , the goal of the explainability analysis is to extract a subset of words \u2110 m \u2282 \ud835\udcb1 \\mathcal{I}_{m}\\subset\\mathcal{V} ...\n - **3.1 Input-based Explanations**: MaxAct. The most straightforward way to collect natural language explanation is by selecting a set of texts whose hidden representation can maximally activate a certain feature vector we are interpreting Bricken et\u00a0al. ( 2023 ); Lee et\u00a0al. ( 2023 ) . Formally, given a large corpu...\n - **3.2 Output-based Explanations**: VocabProj. Output-based explanations project the learned feature vectors to the output word embeddings of words to compute the activations.\nMathematically, f out \u200b ( w ) : \ud835\udcb1 \u2192 \u211d d f_{\\text{out}}(w):\\mathcal{V}\\rightarrow\\mathbb{R}^{d} denotes the output word embedding layer that ...\n- **4 Evaluation Metrics and Methods**: Evaluating SAEs is inherently challenging due to the absence of ground truth labels. Unlike traditional machine learning tasks where performance can be directly measured against labeled data, t\u2026 [truncated 7909 chars]",
|
| 40 |
-
"status": "completed"
|
| 41 |
-
},
|
| 42 |
-
{
|
| 43 |
-
"type": "custom_tool_call",
|
| 44 |
-
"id": "hf_papers_2",
|
| 45 |
-
"name": "hf_papers",
|
| 46 |
-
"input": "{\"operation\": \"read_paper\", \"arxiv_id\": \"2601.03047\"}",
|
| 47 |
-
"output": "# When the Coffee Feature Activates on Coffins:An Analysis of Feature Extraction and Steering for Mechanistic Interpretability\nhttps://arxiv.org/abs/2601.03047\n\n## Abstract\nRecent work by Anthropic on Mechanistic interpretability claims to understand and control Large Language Models by extracting human-interpretable features from their neural activation patterns using sparse autoencoders (SAEs). If successful, this approach offers one of the most promising routes for human oversight in AI safety. We conduct an initial stress-test of these claims by replicating their main results with open-source SAEs for Llama 3.1.\nWhile we successfully reproduce basic feature extraction and steering capabilities, our investigation suggests that major caution is warranted regarding the generalizability of these claims.\nWe find that feature steering exhibits substantial fragility, with sensitivity to layer selection, steering magnitude, and context. We observe non-standard activation behavior and demonstrate the difficulty to distinguish thematically similar features from one another.\nWhile SAE-based interpretability produces compelling demonstrations in selected cases, current methods often fall short of the systematic reliability required for safety-critical applications.\nThis suggests a necessary shift in focus from prioritizing interpretability of internal representations toward reliable prediction and control of model output.\nOur work contributes to a more nuanced understanding of what mechanistic interpretability has achieved and highlights fundamental challenges for AI safety that remain unresolved.\n\n## Sections\n- **1 Introduction**: Mechanistic interpretability (MI) is a form of explainable AI. It refers to a broad set of recent approaches to understanding, and ultimately controlling, the behavior of Large Language Models (LLMs).\nThe core idea is to construct semantic representations \u2013 so-called \u201cfeatures\u201d \u2013...\n- **2 Background: Mechanistic Interpretability**: Mechanistic interpretability is one approach to providing an understanding of the behavior of AI systems (mostly LLMs) by aiming [\u2026] to completely specify a neural network\u2019s computation, potentially in a format as explicit as pseudocode (also called reverse engineering), striving...\n- **3 Anthropic\u2019s Claims**: Our analysis of SAE-based features will focus on two claims by the Anthropic team that are explicitly laid out in the proof-of-concept work in bricken2023monosemanticity and the follow-up work by templeton2024scaling , who scale the approach up to production-level LLMs.\nBoth clai...\n- **4 Replicating Anthropic\u2019s Results**: Our goal is to critically examine the two claims underlying Anthropic\u2019s recent work on interpretable features in LLMs. As a starting point, we will first reproduce the relevant basic results found in Scaling Monosemanticity [ templeton2024scaling ] on a publicly available model.\n...\n - **4.1 Replicating Interpretable Feature Extraction and Activation**: As a first step, we show that there exist interpretable features that activate in the appropriate contexts. To do so, we need to find a feature that is similar to the \u201cGolden Gate Bridge\u201d feature in templeton2024scaling : the feature should have a clear-cut meaning (as opposed to...\n - **4.2 Replicating Feature Activation Specificity**: The next step is to check the specificity of our coffee-feature. We want our feature to activate only in the context that its description mentions. The further away the content of a text is to the feature, the lower its activation should be. While we are not able to test the feat...\n - **4.3 Replicating Feature Steering in Output**: Finally, we need to check for the influence this feature can exert on the output of the LLM. In order to achieve an effect, a so-called steering coefficient can be used to clamp a specific feature. In that case, the output of the SAE for the clamped feature consists of the baseli...\n- **5 Do the Findings Generalize?**: In Section 4 we showed that we are able to reproduce Anthropic\u2019s basic results. We now turn to the stronger promise ass\u2026 [truncated 7230 chars]",
|
| 48 |
-
"status": "completed"
|
| 49 |
-
},
|
| 50 |
-
{
|
| 51 |
-
"type": "message",
|
| 52 |
-
"id": "msg_3",
|
| 53 |
-
"role": "assistant",
|
| 54 |
-
"status": "completed",
|
| 55 |
-
"content": [
|
| 56 |
-
{
|
| 57 |
-
"type": "output_text",
|
| 58 |
-
"text": "**Sparse Autoencoders (SAEs) for Mechanistic Interpretability: Current State**\n\n- **Current frontier:** SAEs have scaled from proof-of-concept demonstrations to production-level LLMs (e.g., Llama 3.1, Qwen, Gemma), learning overcomplete sparse dictionaries that disentangle superimposed features into human-interpretable concepts. Recent variants include Gated SAEs, k-sparse autoencoders, Matryoshka-SAEs, and discrete SAEs for circuit identification, alongside applications in model steering, evaluation analysis, and multimodal interpretability.\n\n- **Feature extraction works, but\u2026** Replicated studies confirm SAEs can extract semantically meaningful features (e.g., \"coffee,\" \"Golden Gate Bridge\") and steer model outputs by amplifying or attenuating specific feature activations. Open-source SAE suites (LLaMa Scope, Gemma Scope, Pythia SAE) are now widely available.\n\n- **Main open problem: Reliability and faithfulness.** Feature steering exhibits substantial fragility\u2014sensitive to layer selection, steering magnitude, and context. Similar-looking features produce divergent activation patterns; features activate on semantically unrelated inputs (e.g., a \"coffee\" feature firing on \"coffins\"); and automated interpretations often mismatch actual behavior. Reconstruction errors remain poorly understood and can degrade model performance.\n\n- **Interpretation-behavior gap:** There is a critical disconnect between what SAE features appear to represent and how they actually influence model computation. Hyperactive features, spurious activations, and context-dependent behavior mean current methods fall short of the systematic reliability required for safety-critical oversight.\n\n- **Path forward:** The field is shifting focus from merely interpreting internal representations toward ensuring reliable prediction and control of model outputs. Key challenges remain: incomplete concept coverage, lack of theoretical foundations for linear feature representations, and the immense computational cost of training layer-wise SAEs on large models.\n\n**Relevant Hugging Face Papers:**\n1. [A Survey on Sparse Autoencoders: Interpreting the Internal Mechanisms of Large Language Models](https://huggingface.co/papers/2503.05613) \u2014 Comprehensive survey of SAE architectures, explanation methods, evaluation metrics, and applications.\n2. [When the Coffee Feature Activates on Coffins: An Analysis of Feature Extraction and Steering for Mechanistic Interpretability](https://huggingface.co/papers/2601.03047) \u2014 Stress-test revealing fragility in feature steering and the interpretation-behavior gap in open-source SAEs."
|
| 59 |
-
}
|
| 60 |
-
]
|
| 61 |
-
}
|
| 62 |
-
],
|
| 63 |
-
"error": null,
|
| 64 |
-
"incomplete_details": null,
|
| 65 |
-
"usage": {
|
| 66 |
-
"session_id": "b84ec8fc-8ace-4431-9566-99c401b1cfee",
|
| 67 |
-
"total_usd": 0.0,
|
| 68 |
-
"inference_usd": 0.0,
|
| 69 |
-
"hf_jobs_estimated_usd": 0.0,
|
| 70 |
-
"sandbox_estimated_usd": 0.0,
|
| 71 |
-
"llm_calls": 4,
|
| 72 |
-
"hf_jobs_count": 0,
|
| 73 |
-
"sandbox_count": 0,
|
| 74 |
-
"prompt_tokens": 72069,
|
| 75 |
-
"completion_tokens": 868,
|
| 76 |
-
"cache_read_tokens": 49664,
|
| 77 |
-
"cache_creation_tokens": 0,
|
| 78 |
-
"total_tokens": 72937,
|
| 79 |
-
"hf_jobs_billable_seconds_estimate": 0,
|
| 80 |
-
"sandbox_billable_seconds_estimate": 0
|
| 81 |
-
},
|
| 82 |
-
"artifacts": [],
|
| 83 |
-
"metadata": {
|
| 84 |
-
"example_slug": "sparse-autoencoders-interpretability"
|
| 85 |
-
}
|
| 86 |
-
}
|
| 87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api-docs/index.html
DELETED
|
@@ -1,912 +0,0 @@
|
|
| 1 |
-
<!doctype html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="utf-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
-
<title>ML Intern API Reference</title>
|
| 7 |
-
<meta name="description" content="API reference for the ML Intern HTTP API: an OpenAI Responses-API-compatible interface for running the ML Intern agent. Authentication, endpoints, SSE event stream, response object, and artifacts." />
|
| 8 |
-
<link rel="icon" href="https://huggingface.co/spaces/smolagents/ml-intern/resolve/main/frontend/public/smolagents.webp" />
|
| 9 |
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 10 |
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 11 |
-
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet" />
|
| 12 |
-
<style>
|
| 13 |
-
:root {
|
| 14 |
-
--bg: #faf7f0;
|
| 15 |
-
--bg-deep: #f1ece0;
|
| 16 |
-
--ink: #201b14;
|
| 17 |
-
--ink-soft: #4a4337;
|
| 18 |
-
--muted: #7a7060;
|
| 19 |
-
--line: rgba(32, 27, 20, 0.16);
|
| 20 |
-
--line-soft: rgba(32, 27, 20, 0.08);
|
| 21 |
-
--yellow: #ffd21e;
|
| 22 |
-
--orange: #e08700;
|
| 23 |
-
--terminal: #1c1814;
|
| 24 |
-
--terminal-edge: #322a22;
|
| 25 |
-
--t-text: #e8ddc9;
|
| 26 |
-
--t-dim: #8d8170;
|
| 27 |
-
--t-amber: #ffc24b;
|
| 28 |
-
--t-green: #7fd6a4;
|
| 29 |
-
--t-blue: #8fc7ff;
|
| 30 |
-
--t-pink: #ff9e9e;
|
| 31 |
-
--ok: #2f7d59;
|
| 32 |
-
--bad: #b3492f;
|
| 33 |
-
--body: "IBM Plex Sans", sans-serif;
|
| 34 |
-
--mono: "IBM Plex Mono", ui-monospace, monospace;
|
| 35 |
-
--sidebar-w: 248px;
|
| 36 |
-
}
|
| 37 |
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
| 38 |
-
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
|
| 39 |
-
body {
|
| 40 |
-
font-family: var(--body);
|
| 41 |
-
background:
|
| 42 |
-
radial-gradient(circle at 1px 1px, rgba(32,27,20,.06) 1px, transparent 0) 0 0 / 24px 24px,
|
| 43 |
-
var(--bg);
|
| 44 |
-
color: var(--ink);
|
| 45 |
-
font-size: 15px;
|
| 46 |
-
line-height: 1.65;
|
| 47 |
-
-webkit-font-smoothing: antialiased;
|
| 48 |
-
}
|
| 49 |
-
::selection { background: var(--yellow); color: var(--ink); }
|
| 50 |
-
a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; }
|
| 51 |
-
a:hover { color: var(--orange); }
|
| 52 |
-
code, pre, kbd { font-family: var(--mono); }
|
| 53 |
-
p code, li code, td code, h3 code {
|
| 54 |
-
background: rgba(32,27,20,.07); padding: 1px 6px; border-radius: 4px; font-size: .88em;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
/* ── layout ────────────────────────────────────────── */
|
| 58 |
-
.layout { display: flex; max-width: 1180px; margin: 0 auto; }
|
| 59 |
-
aside {
|
| 60 |
-
width: var(--sidebar-w); flex-shrink: 0;
|
| 61 |
-
position: sticky; top: 0; height: 100vh; overflow-y: auto;
|
| 62 |
-
padding: 28px 20px 40px 24px; border-right: 1px solid var(--line-soft);
|
| 63 |
-
}
|
| 64 |
-
main { flex: 1; min-width: 0; max-width: 800px; padding: 36px 36px 96px; }
|
| 65 |
-
@media (max-width: 880px) {
|
| 66 |
-
.layout { display: block; }
|
| 67 |
-
aside { position: static; width: auto; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
|
| 68 |
-
main { padding: 28px 20px 80px; }
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
/* ── sidebar ───────────────────────────────────────── */
|
| 72 |
-
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-bottom: 6px; }
|
| 73 |
-
.brand img { width: 24px; height: 24px; }
|
| 74 |
-
.brand b { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
|
| 75 |
-
.brand .tag {
|
| 76 |
-
font-family: var(--mono); font-size: 10px; font-weight: 600;
|
| 77 |
-
background: var(--ink); color: var(--yellow); padding: 1px 6px; border-radius: 4px;
|
| 78 |
-
}
|
| 79 |
-
.version { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 22px; display: block; }
|
| 80 |
-
aside h5 {
|
| 81 |
-
font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
|
| 82 |
-
text-transform: uppercase; color: var(--muted); margin: 18px 0 6px;
|
| 83 |
-
}
|
| 84 |
-
aside nav a {
|
| 85 |
-
display: block; font-size: 13.5px; color: var(--ink-soft); text-decoration: none;
|
| 86 |
-
padding: 4px 10px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
|
| 87 |
-
}
|
| 88 |
-
aside nav a:hover { color: var(--ink); background: rgba(32,27,20,.05); }
|
| 89 |
-
aside nav a.active { border-left-color: var(--orange); color: var(--ink); font-weight: 600; background: rgba(255,210,30,.18); }
|
| 90 |
-
aside nav a .m { font-family: var(--mono); font-size: 10px; font-weight: 600; margin-right: 6px; }
|
| 91 |
-
aside nav a .m.post { color: var(--orange); }
|
| 92 |
-
aside nav a .m.get { color: var(--ok); }
|
| 93 |
-
.side-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
|
| 94 |
-
.side-foot a { display: block; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 3px 0; }
|
| 95 |
-
.side-foot a:hover { color: var(--ink); }
|
| 96 |
-
|
| 97 |
-
/* ── content ───────────────────────────────────────── */
|
| 98 |
-
section { padding: 26px 0; border-bottom: 1px solid var(--line-soft); }
|
| 99 |
-
section:last-of-type { border-bottom: none; }
|
| 100 |
-
h1 { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; }
|
| 101 |
-
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; scroll-margin-top: 24px; }
|
| 102 |
-
h3 { font-size: 15px; font-weight: 600; margin: 22px 0 8px; }
|
| 103 |
-
section > p, section li { color: var(--ink-soft); }
|
| 104 |
-
section p + p { margin-top: 10px; }
|
| 105 |
-
section ul, section ol { padding-left: 22px; margin: 8px 0; }
|
| 106 |
-
.anchor { color: var(--muted); text-decoration: none; opacity: 0; margin-left: 6px; font-weight: 400; }
|
| 107 |
-
h2:hover .anchor { opacity: 1; }
|
| 108 |
-
|
| 109 |
-
.endpoint-head {
|
| 110 |
-
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
|
| 111 |
-
font-family: var(--mono); font-size: 14px; margin-bottom: 12px;
|
| 112 |
-
background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
|
| 113 |
-
}
|
| 114 |
-
.chip {
|
| 115 |
-
font-family: var(--mono); font-weight: 600; font-size: 11.5px;
|
| 116 |
-
border-radius: 5px; padding: 2px 9px; border: 1px solid var(--ink);
|
| 117 |
-
}
|
| 118 |
-
.chip.post { background: var(--yellow); }
|
| 119 |
-
.chip.get { background: #d9eadf; }
|
| 120 |
-
|
| 121 |
-
/* base url row */
|
| 122 |
-
.baseurl {
|
| 123 |
-
display: flex; align-items: stretch; max-width: 620px; margin: 18px 0 4px;
|
| 124 |
-
border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff;
|
| 125 |
-
}
|
| 126 |
-
.baseurl .label {
|
| 127 |
-
display: flex; align-items: center; padding: 0 12px; background: var(--bg-deep);
|
| 128 |
-
border-right: 1px solid var(--line); font-family: var(--mono); font-size: 11px;
|
| 129 |
-
font-weight: 600; letter-spacing: .06em; color: var(--ink-soft);
|
| 130 |
-
}
|
| 131 |
-
.baseurl .url { flex: 1; display: flex; align-items: center; padding: 10px 12px; font-family: var(--mono); font-size: 13px; overflow-x: auto; white-space: nowrap; }
|
| 132 |
-
.baseurl button {
|
| 133 |
-
border: none; border-left: 1px solid var(--line); background: var(--bg-deep);
|
| 134 |
-
font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 0 14px; cursor: pointer;
|
| 135 |
-
}
|
| 136 |
-
.baseurl button:hover { background: var(--yellow); }
|
| 137 |
-
|
| 138 |
-
/* tables */
|
| 139 |
-
.tbl-wrap { overflow-x: auto; margin: 12px 0; }
|
| 140 |
-
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 13.5px; }
|
| 141 |
-
th {
|
| 142 |
-
font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
|
| 143 |
-
text-align: left; color: var(--ink-soft); background: var(--bg-deep);
|
| 144 |
-
padding: 8px 12px; border-bottom: 1px solid var(--line);
|
| 145 |
-
}
|
| 146 |
-
td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-soft); }
|
| 147 |
-
tr:last-child td { border-bottom: none; }
|
| 148 |
-
td:first-child code { white-space: nowrap; }
|
| 149 |
-
.t { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
|
| 150 |
-
.req { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--orange); }
|
| 151 |
-
.dflt { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
|
| 152 |
-
|
| 153 |
-
/* code blocks */
|
| 154 |
-
.codebox { position: relative; background: var(--terminal); border: 1px solid var(--terminal-edge); border-radius: 8px; margin: 12px 0; }
|
| 155 |
-
.codebox .lang {
|
| 156 |
-
position: absolute; top: 8px; left: 12px; font-family: var(--mono); font-size: 10px;
|
| 157 |
-
letter-spacing: .08em; text-transform: uppercase; color: var(--t-dim);
|
| 158 |
-
}
|
| 159 |
-
.codebox pre { padding: 30px 16px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.65; color: var(--t-text); }
|
| 160 |
-
.codebox .copy {
|
| 161 |
-
position: absolute; top: 6px; right: 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
|
| 162 |
-
cursor: pointer; background: rgba(255,255,255,.07); color: var(--t-dim);
|
| 163 |
-
border: 1px solid var(--terminal-edge); border-radius: 5px; padding: 3px 9px;
|
| 164 |
-
}
|
| 165 |
-
.codebox .copy:hover { color: var(--t-amber); }
|
| 166 |
-
.codebox .cmt { color: var(--t-dim) } .codebox .k { color: var(--t-amber) }
|
| 167 |
-
.codebox .s { color: var(--t-green) } .codebox .f { color: var(--t-blue) }
|
| 168 |
-
|
| 169 |
-
/* status pills */
|
| 170 |
-
.statuses { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
|
| 171 |
-
.statuses code {
|
| 172 |
-
font-size: 12px; font-weight: 500; border: 1px solid var(--line); border-radius: 999px;
|
| 173 |
-
padding: 3px 12px; background: #fff;
|
| 174 |
-
}
|
| 175 |
-
.statuses code.run { background: var(--yellow); border-color: var(--ink); }
|
| 176 |
-
.statuses code.done { background: #d9eadf; border-color: var(--ink); }
|
| 177 |
-
.statuses code.pause { background: #ffe9bd; border-color: var(--ink); }
|
| 178 |
-
.statuses code.dead { background: #f3dcd4; border-color: var(--ink); }
|
| 179 |
-
|
| 180 |
-
.callout {
|
| 181 |
-
border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 6px;
|
| 182 |
-
background: #fff; padding: 12px 16px; font-size: 13.5px; color: var(--ink-soft); margin: 14px 0;
|
| 183 |
-
}
|
| 184 |
-
.callout b { color: var(--ink); }
|
| 185 |
-
|
| 186 |
-
/* examples */
|
| 187 |
-
.examples { display: grid; gap: 14px; margin-top: 14px; }
|
| 188 |
-
.example {
|
| 189 |
-
background: #fff; border: 1px solid var(--line); border-radius: 8px;
|
| 190 |
-
padding: 14px 16px;
|
| 191 |
-
}
|
| 192 |
-
.example h3 { margin: 0 0 6px; }
|
| 193 |
-
.example .meta {
|
| 194 |
-
display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px;
|
| 195 |
-
}
|
| 196 |
-
.example .meta code {
|
| 197 |
-
border: 1px solid var(--line-soft); background: var(--bg-deep);
|
| 198 |
-
font-size: 11.5px; padding: 2px 7px; border-radius: 5px;
|
| 199 |
-
}
|
| 200 |
-
.example p { font-size: 13.5px; }
|
| 201 |
-
.example pre { white-space: pre-wrap; word-break: break-word; }
|
| 202 |
-
.result-details {
|
| 203 |
-
margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px;
|
| 204 |
-
}
|
| 205 |
-
.result-details summary {
|
| 206 |
-
cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink);
|
| 207 |
-
}
|
| 208 |
-
.result-details summary:hover { color: var(--orange); }
|
| 209 |
-
.result-details .codebox { margin-bottom: 0; }
|
| 210 |
-
.result-link { font-size: 12.5px; margin-top: 8px; }
|
| 211 |
-
|
| 212 |
-
/* ── terminal (animated example) ───────────────────── */
|
| 213 |
-
.term { background: var(--terminal); border: 1px solid var(--terminal-edge); border-radius: 10px; overflow: hidden; margin: 18px 0 6px; }
|
| 214 |
-
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--terminal-edge); }
|
| 215 |
-
.term-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
|
| 216 |
-
.term-bar i:nth-child(1){ background:#ff6057 } .term-bar i:nth-child(2){ background:#ffbd2e } .term-bar i:nth-child(3){ background:#27c93f }
|
| 217 |
-
.term-bar span { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--t-dim); }
|
| 218 |
-
.term-body {
|
| 219 |
-
padding: 14px 16px 18px; font-family: var(--mono); font-size: 12px; line-height: 1.7;
|
| 220 |
-
color: var(--t-text); min-height: 360px; white-space: pre-wrap; word-break: break-word;
|
| 221 |
-
}
|
| 222 |
-
.term-body .p { color: var(--t-dim); }
|
| 223 |
-
.term-body .c { color: var(--t-amber); }
|
| 224 |
-
.term-body .ev { color: var(--t-blue); }
|
| 225 |
-
.term-body .ok { color: var(--t-green); }
|
| 226 |
-
.term-body .str { color: var(--t-green); }
|
| 227 |
-
.term-body .art { color: var(--t-pink); }
|
| 228 |
-
.cursor { display: inline-block; width: 7px; height: 14px; background: var(--t-amber); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
|
| 229 |
-
@keyframes blink { 50% { opacity: 0 } }
|
| 230 |
-
.term-cap { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
|
| 231 |
-
</style>
|
| 232 |
-
</head>
|
| 233 |
-
<body>
|
| 234 |
-
|
| 235 |
-
<div class="layout">
|
| 236 |
-
|
| 237 |
-
<aside>
|
| 238 |
-
<a class="brand" href="#overview">
|
| 239 |
-
<img src="https://huggingface.co/spaces/smolagents/ml-intern/resolve/main/frontend/public/smolagents.webp" alt="" />
|
| 240 |
-
<b>ML Intern</b><span class="tag">API</span>
|
| 241 |
-
</a>
|
| 242 |
-
<span class="version">v1 · reference</span>
|
| 243 |
-
<nav id="nav">
|
| 244 |
-
<h5>Getting started</h5>
|
| 245 |
-
<a href="#overview">Overview</a>
|
| 246 |
-
<a href="#authentication">Authentication</a>
|
| 247 |
-
<a href="#examples">Examples</a>
|
| 248 |
-
<a href="#conventions">Conventions</a>
|
| 249 |
-
<h5>Endpoints</h5>
|
| 250 |
-
<a href="#create"><span class="m post">POST</span>/responses</a>
|
| 251 |
-
<a href="#retrieve"><span class="m get">GET</span>/responses/{id}</a>
|
| 252 |
-
<a href="#events"><span class="m get">GET</span>/responses/{id}/events</a>
|
| 253 |
-
<a href="#cancel"><span class="m post">POST</span>/responses/{id}/cancel</a>
|
| 254 |
-
<a href="#approvals"><span class="m post">POST</span>/responses/{id}/approvals</a>
|
| 255 |
-
<h5>Objects</h5>
|
| 256 |
-
<a href="#response-object">The response object</a>
|
| 257 |
-
<a href="#artifacts">Artifacts</a>
|
| 258 |
-
<a href="#errors">Errors</a>
|
| 259 |
-
<h5>Behavior</h5>
|
| 260 |
-
<a href="#cost-control">Cost control</a>
|
| 261 |
-
<a href="#limits">Limits & persistence</a>
|
| 262 |
-
</nav>
|
| 263 |
-
<div class="side-foot">
|
| 264 |
-
<a href="https://github.com/huggingface/ml-intern" target="_blank" rel="noopener">Source (GitHub) ↗</a>
|
| 265 |
-
<a href="https://huggingface.co/spaces/smolagents/ml-intern" target="_blank" rel="noopener">Web app ↗</a>
|
| 266 |
-
<a href="https://huggingface.co/settings/tokens" target="_blank" rel="noopener">HF tokens ↗</a>
|
| 267 |
-
</div>
|
| 268 |
-
</aside>
|
| 269 |
-
|
| 270 |
-
<main>
|
| 271 |
-
|
| 272 |
-
<!-- ════════ OVERVIEW ════════ -->
|
| 273 |
-
<section id="overview">
|
| 274 |
-
<h1>ML Intern API</h1>
|
| 275 |
-
<p>
|
| 276 |
-
An HTTP API for running the <a href="https://github.com/huggingface/ml-intern" target="_blank" rel="noopener">ML Intern</a>
|
| 277 |
-
agent. A request submits a task; the agent plans, writes code, and executes it —
|
| 278 |
-
including launching <a href="https://huggingface.co/docs/huggingface_hub/guides/jobs" target="_blank" rel="noopener">HF Jobs</a>
|
| 279 |
-
on cloud hardware — under the namespace of the calling token. Progress is delivered
|
| 280 |
-
as a resumable server-sent-event stream; results and artifacts (jobs, trackio
|
| 281 |
-
dashboards, pushed repos) are also available by polling.
|
| 282 |
-
</p>
|
| 283 |
-
<p>
|
| 284 |
-
The surface follows the OpenAI Responses API where applicable
|
| 285 |
-
(<code>POST /v1/responses</code>, <code>background</code>, <code>previous_response_id</code>,
|
| 286 |
-
response object shape, error envelope) with documented extensions:
|
| 287 |
-
<code>max_cost_usd</code>, <code>artifacts[]</code>, approval endpoints, and additional
|
| 288 |
-
SSE event types. The openai-python SDK works for create/retrieve/cancel via
|
| 289 |
-
<code>base_url</code> + <code>extra_body</code>; its typed streaming parser does not accept
|
| 290 |
-
the extended event names, so consume SSE directly for streaming.
|
| 291 |
-
</p>
|
| 292 |
-
<div class="baseurl">
|
| 293 |
-
<span class="label">BASE URL</span>
|
| 294 |
-
<span class="url" id="base-url">…</span>
|
| 295 |
-
<button id="copy-base" type="button">copy</button>
|
| 296 |
-
</div>
|
| 297 |
-
<p style="font-size:13px; color: var(--muted); margin-top: 8px;">
|
| 298 |
-
Agent runs are long-lived: a turn may take seconds (a question) or hours (training).
|
| 299 |
-
Design clients around <code>background: true</code> plus polling or stream resumption.
|
| 300 |
-
</p>
|
| 301 |
-
|
| 302 |
-
<div class="term" aria-hidden="true">
|
| 303 |
-
<div class="term-bar"><i></i><i></i><i></i><span>example turn — SSE</span></div>
|
| 304 |
-
<div class="term-body" id="term"></div>
|
| 305 |
-
</div>
|
| 306 |
-
<p class="term-cap">Replay of a representative turn. Event names and payload shapes are documented under <a href="#events">/responses/{id}/events</a>.</p>
|
| 307 |
-
</section>
|
| 308 |
-
|
| 309 |
-
<!-- ════════ AUTHENTICATION ════════ -->
|
| 310 |
-
<section id="authentication">
|
| 311 |
-
<h2>Authentication <a class="anchor" href="#authentication">#</a></h2>
|
| 312 |
-
<p>All <code>/v1</code> endpoints require a Hugging Face <b>user access token</b> in the
|
| 313 |
-
<code>Authorization</code> header:</p>
|
| 314 |
-
<div class="codebox"><span class="lang">http</span><button class="copy" type="button">copy</button>
|
| 315 |
-
<pre>Authorization: Bearer hf_xxxxxxxxxxxxxxxx</pre></div>
|
| 316 |
-
<p>Tokens are validated against <code>huggingface.co/api/whoami-v2</code> (cached for 5 minutes).
|
| 317 |
-
Both classic and fine-grained user tokens are accepted; organization tokens are rejected.
|
| 318 |
-
There is no cookie or OAuth-redirect flow on this surface.</p>
|
| 319 |
-
<h3>Required token permissions</h3>
|
| 320 |
-
<ul>
|
| 321 |
-
<li><b>Inference Providers</b> — all agent reasoning runs through HF Inference Providers as the caller. A token without this permission fails before session creation with <code>403 inference_provider_permission_required</code>.</li>
|
| 322 |
-
<li><b>Write access to repos</b> — for pushing models/datasets/Spaces.</li>
|
| 323 |
-
<li><b>Jobs</b> — for launching HF Jobs. Job billing requires credits on the target namespace; without them the job call returns a billing error to the agent.</li>
|
| 324 |
-
</ul>
|
| 325 |
-
<p>All compute, inference, and storage initiated by a run is authenticated as — and billed
|
| 326 |
-
to — the account behind the token. The server holds the token in memory for the session
|
| 327 |
-
lifetime only.</p>
|
| 328 |
-
</section>
|
| 329 |
-
|
| 330 |
-
<!-- ════════ EXAMPLES ════════ -->
|
| 331 |
-
<section id="examples">
|
| 332 |
-
<h2>Examples <a class="anchor" href="#examples">#</a></h2>
|
| 333 |
-
<p>Verified against the public Space endpoint. Each example uses
|
| 334 |
-
<code>background: true</code>, then polls <code>GET /v1/responses/{id}</code> until terminal status.</p>
|
| 335 |
-
|
| 336 |
-
<div class="examples">
|
| 337 |
-
<article class="example">
|
| 338 |
-
<h3>Research a cutting-edge concept</h3>
|
| 339 |
-
<div class="meta">
|
| 340 |
-
<code>completed</code><code>43 s</code><code>hf_papers</code><code>resp_bf64687c764f4d509a134188390a2236</code>
|
| 341 |
-
</div>
|
| 342 |
-
<p><b>Task:</b> Research diffusion language models for text generation; explain recent changes and cite Hugging Face paper/model pages.</p>
|
| 343 |
-
<div class="codebox"><span class="lang">request</span><button class="copy" type="button">copy</button>
|
| 344 |
-
<pre>{
|
| 345 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 346 |
-
"input": "Research diffusion language models for text generation. In 5 concise bullets, explain what changed recently, why it matters, and cite 2 relevant Hugging Face paper pages or model pages if available. Keep under 300 words.",
|
| 347 |
-
"background": true,
|
| 348 |
-
"max_cost_usd": 3.0
|
| 349 |
-
}</pre></div>
|
| 350 |
-
<p><b>Result:</b> The agent found recent DLM work, identified few-step decoding and hybrid plan-and-fill architectures as key shifts, and cited
|
| 351 |
-
<a href="https://huggingface.co/google/diffusiongemma-26B-A4B-it" target="_blank" rel="noopener">google/diffusiongemma-26B-A4B-it</a> plus
|
| 352 |
-
<a href="https://huggingface.co/papers/2602.12262" target="_blank" rel="noopener">T3D on HF Papers</a>.</p>
|
| 353 |
-
<details class="result-details" data-result="example-results/diffusion-language-models.json">
|
| 354 |
-
<summary>Full API response</summary>
|
| 355 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 356 |
-
<p class="result-link"><a href="example-results/diffusion-language-models.json" target="_blank" rel="noopener">Open captured request + response JSON</a></p>
|
| 357 |
-
</details>
|
| 358 |
-
</article>
|
| 359 |
-
|
| 360 |
-
<article class="example">
|
| 361 |
-
<h3>Find a fast transcription model</h3>
|
| 362 |
-
<div class="meta">
|
| 363 |
-
<code>completed</code><code>32 s</code><code>hub_repo_details</code><code>resp_7edc3515343d4eab81eb0fe7b274d316</code>
|
| 364 |
-
</div>
|
| 365 |
-
<p><b>Task:</b> Compare three Hugging Face ASR choices for fast batch English transcription on one GPU and recommend an implementation path.</p>
|
| 366 |
-
<div class="codebox"><span class="lang">request</span><button class="copy" type="button">copy</button>
|
| 367 |
-
<pre>{
|
| 368 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 369 |
-
"instructions": "Keep this as a quick model-selection answer. Do not launch broad research sub-agents. Use at most three direct Hugging Face lookups, then answer.",
|
| 370 |
-
"input": "Compare these three choices for quickly transcribing batches of English audio on one GPU: openai/whisper-large-v3-turbo, distil-whisper/distil-large-v3, and faster-whisper with large-v3-turbo. Recommend one for speed/accuracy/ease of use and include a short usage snippet. Keep under 400 words.",
|
| 371 |
-
"background": true,
|
| 372 |
-
"max_cost_usd": 2.0
|
| 373 |
-
}</pre></div>
|
| 374 |
-
<p><b>Result:</b> The agent recommended <code>faster-whisper</code> with <code>large-v3-turbo</code>, compared it against
|
| 375 |
-
<a href="https://huggingface.co/openai/whisper-large-v3-turbo" target="_blank" rel="noopener">openai/whisper-large-v3-turbo</a> and
|
| 376 |
-
<a href="https://huggingface.co/distil-whisper/distil-large-v3" target="_blank" rel="noopener">distil-whisper/distil-large-v3</a>,
|
| 377 |
-
and returned a short <code>WhisperModel(...).transcribe(...)</code> snippet.</p>
|
| 378 |
-
<details class="result-details" data-result="example-results/fast-english-transcription-model.json">
|
| 379 |
-
<summary>Full API response</summary>
|
| 380 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 381 |
-
<p class="result-link"><a href="example-results/fast-english-transcription-model.json" target="_blank" rel="noopener">Open captured request + response JSON</a></p>
|
| 382 |
-
</details>
|
| 383 |
-
</article>
|
| 384 |
-
|
| 385 |
-
<article class="example">
|
| 386 |
-
<h3>Choose embedding and reranker models for RAG</h3>
|
| 387 |
-
<div class="meta">
|
| 388 |
-
<code>completed</code><code>43 s</code><code>hub_repo_details</code><code>resp_c32ba10ebac6446f83d6e18102f54b44</code>
|
| 389 |
-
</div>
|
| 390 |
-
<p><b>Task:</b> Pick a production embedding and reranker stack for technical-doc RAG, balancing quality and latency.</p>
|
| 391 |
-
<div class="codebox"><span class="lang">request</span><button class="copy" type="button">copy</button>
|
| 392 |
-
<pre>{
|
| 393 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 394 |
-
"instructions": "Keep this as a quick model-selection answer. Do not launch broad research sub-agents. Use at most four direct Hugging Face lookups, then answer.",
|
| 395 |
-
"input": "For a 2026 production RAG system over technical docs, compare these Hugging Face options: Qwen/Qwen3-Embedding-8B, BAAI/bge-m3, jinaai/jina-embeddings-v4, and BAAI/bge-reranker-v2-m3. Recommend an embedding + reranker stack for quality vs latency. Include one short sentence-transformers or transformers usage snippet. Keep under 450 words.",
|
| 396 |
-
"background": true,
|
| 397 |
-
"max_cost_usd": 2.0
|
| 398 |
-
}</pre></div>
|
| 399 |
-
<p><b>Result:</b> The agent recommended <a href="https://huggingface.co/BAAI/bge-m3" target="_blank" rel="noopener">BAAI/bge-m3</a> plus
|
| 400 |
-
<a href="https://huggingface.co/BAAI/bge-reranker-v2-m3" target="_blank" rel="noopener">BAAI/bge-reranker-v2-m3</a> for latency, and
|
| 401 |
-
<a href="https://huggingface.co/Qwen/Qwen3-Embedding-8B" target="_blank" rel="noopener">Qwen3-Embedding-8B</a> plus the same reranker for maximum quality.</p>
|
| 402 |
-
<details class="result-details" data-result="example-results/rag-embedding-reranker-selection.json">
|
| 403 |
-
<summary>Full API response</summary>
|
| 404 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 405 |
-
<p class="result-link"><a href="example-results/rag-embedding-reranker-selection.json" target="_blank" rel="noopener">Open captured request + response JSON</a></p>
|
| 406 |
-
</details>
|
| 407 |
-
</article>
|
| 408 |
-
|
| 409 |
-
<article class="example">
|
| 410 |
-
<h3>Continue a session with <code>previous_response_id</code></h3>
|
| 411 |
-
<div class="meta">
|
| 412 |
-
<code>completed</code><code>33 s + 11 s</code><code>multiturn</code><code>resp_2768fb94ff614a3a90a1c455548d767f → resp_29eb917b2e2c4a0fbecdba4aa8303a21</code>
|
| 413 |
-
</div>
|
| 414 |
-
<p><b>Task:</b> First ask for a RAG embedding recommendation, then continue the same session and ask for code that uses the recommended model.</p>
|
| 415 |
-
<div class="codebox"><span class="lang">turn 1 request</span><button class="copy" type="button">copy</button>
|
| 416 |
-
<pre>{
|
| 417 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 418 |
-
"instructions": "This is turn 1 of a multiturn API example. Keep it concise. Do not launch jobs or broad research sub-agents. Use direct Hub/model knowledge or at most two direct Hub lookups.",
|
| 419 |
-
"input": "For technical-document RAG, compare BAAI/bge-m3 and Qwen/Qwen3-Embedding-8B. Recommend one default embedding model for a startup that cares about good quality but low latency. Keep under 250 words.",
|
| 420 |
-
"background": true,
|
| 421 |
-
"max_cost_usd": 2.0
|
| 422 |
-
}</pre></div>
|
| 423 |
-
<div class="codebox"><span class="lang">turn 2 request</span><button class="copy" type="button">copy</button>
|
| 424 |
-
<pre>{
|
| 425 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 426 |
-
"previous_response_id": "resp_2768fb94ff614a3a90a1c455548d767f",
|
| 427 |
-
"instructions": "This is turn 2 of a multiturn API example. Reuse the prior recommendation; do not restate the comparison. Provide runnable minimal code only plus two setup notes. Do not launch jobs.",
|
| 428 |
-
"input": "Using your recommended embedding model from the previous turn, write a minimal Python script that indexes 100 local Markdown files and retrieves the top 5 chunks for a query. Keep it compact.",
|
| 429 |
-
"background": true,
|
| 430 |
-
"max_cost_usd": 2.0
|
| 431 |
-
}</pre></div>
|
| 432 |
-
<p><b>Result:</b> Turn 1 recommended <a href="https://huggingface.co/BAAI/bge-m3" target="_blank" rel="noopener">BAAI/bge-m3</a>.
|
| 433 |
-
Turn 2 reused that context via <code>previous_response_id</code> and returned a compact <code>sentence-transformers</code> + <code>faiss</code> indexing script without resending the comparison.</p>
|
| 434 |
-
<details class="result-details" data-result="example-results/multiturn-rag-followup.json">
|
| 435 |
-
<summary>Full API responses</summary>
|
| 436 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 437 |
-
<p class="result-link"><a href="example-results/multiturn-rag-followup.json" target="_blank" rel="noopener">Open captured two-turn request + response JSON</a></p>
|
| 438 |
-
</details>
|
| 439 |
-
</article>
|
| 440 |
-
|
| 441 |
-
<article class="example">
|
| 442 |
-
<h3>Research sparse autoencoders for interpretability</h3>
|
| 443 |
-
<div class="meta">
|
| 444 |
-
<code>completed</code><code>32 s</code><code>hf_papers</code><code>resp_0a5e9ee6a94a43eda152c4310d7ddab2</code>
|
| 445 |
-
</div>
|
| 446 |
-
<p><b>Task:</b> Summarize the current frontier for sparse autoencoders in mechanistic interpretability and cite recent HF Papers.</p>
|
| 447 |
-
<div class="codebox"><span class="lang">request</span><button class="copy" type="button">copy</button>
|
| 448 |
-
<pre>{
|
| 449 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 450 |
-
"input": "Research sparse autoencoders (SAEs) for mechanistic interpretability of language models. In 5 concise bullets, explain the current frontier, the main open problem, and cite 2 relevant Hugging Face paper pages if available. Keep under 350 words.",
|
| 451 |
-
"background": true,
|
| 452 |
-
"max_cost_usd": 3.0
|
| 453 |
-
}</pre></div>
|
| 454 |
-
<p><b>Result:</b> The agent summarized scaling SAEs to production LLMs, feature-steering fragility, and the interpretation-behavior gap, citing the
|
| 455 |
-
<a href="https://huggingface.co/papers/2503.05613" target="_blank" rel="noopener">SAE survey</a> and
|
| 456 |
-
<a href="https://huggingface.co/papers/2601.03047" target="_blank" rel="noopener">Coffee/Coffins feature-steering analysis</a>.</p>
|
| 457 |
-
<details class="result-details" data-result="example-results/sparse-autoencoders-interpretability.json">
|
| 458 |
-
<summary>Full API response</summary>
|
| 459 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 460 |
-
<p class="result-link"><a href="example-results/sparse-autoencoders-interpretability.json" target="_blank" rel="noopener">Open captured request + response JSON</a></p>
|
| 461 |
-
</details>
|
| 462 |
-
</article>
|
| 463 |
-
|
| 464 |
-
<article class="example">
|
| 465 |
-
<h3>Audit a dataset and draft an SFT plan</h3>
|
| 466 |
-
<div class="meta">
|
| 467 |
-
<code>completed</code><code>143 s</code><code>hf_inspect_dataset</code><code>resp_c63732bf03fc49b19d7cd141fa5fbd54</code>
|
| 468 |
-
</div>
|
| 469 |
-
<p><b>Task:</b> Inspect an instruction-tuning dataset and produce a practical one-hour LoRA SFT smoke-test plan.</p>
|
| 470 |
-
<div class="codebox"><span class="lang">request</span><button class="copy" type="button">copy</button>
|
| 471 |
-
<pre>{
|
| 472 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 473 |
-
"instructions": "Do a practical ML-engineering audit. Use dataset inspection and current HF/TRL knowledge as needed, but keep the final answer concise and do not launch training jobs.",
|
| 474 |
-
"input": "Inspect the HuggingFaceH4/ultrachat_200k dataset for supervised fine-tuning viability. Report the available splits, key columns/format, any risks for SFT, and propose a 1-hour LoRA SFT smoke-test plan for Qwen/Qwen3-0.6B using current TRL/Transformers conventions. Keep under 600 words.",
|
| 475 |
-
"background": true,
|
| 476 |
-
"max_cost_usd": 3.0
|
| 477 |
-
}</pre></div>
|
| 478 |
-
<p><b>Result:</b> The agent verified <a href="https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k" target="_blank" rel="noopener">HuggingFaceH4/ultrachat_200k</a>
|
| 479 |
-
has <code>train_sft</code>/<code>test_sft</code> conversational <code>messages</code> splits, flagged long-sequence and quality-variance risks,
|
| 480 |
-
and proposed a LoRA <code>SFTTrainer</code> smoke test for <a href="https://huggingface.co/Qwen/Qwen3-0.6B" target="_blank" rel="noopener">Qwen/Qwen3-0.6B</a>.</p>
|
| 481 |
-
<details class="result-details" data-result="example-results/dataset-audit-sft-plan.json">
|
| 482 |
-
<summary>Full API response</summary>
|
| 483 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 484 |
-
<p class="result-link"><a href="example-results/dataset-audit-sft-plan.json" target="_blank" rel="noopener">Open captured request + response JSON</a></p>
|
| 485 |
-
</details>
|
| 486 |
-
</article>
|
| 487 |
-
|
| 488 |
-
<article class="example">
|
| 489 |
-
<h3>Fine-tune and publish a model artifact</h3>
|
| 490 |
-
<div class="meta">
|
| 491 |
-
<code>completed</code><code>14 min</code><code>hf_jobs</code><code>model artifact</code><code>resp_518beb5c9e7c4aeb94b67d763183fdae</code>
|
| 492 |
-
</div>
|
| 493 |
-
<p><b>Task:</b> Launch a CPU HF Job that fine-tunes <code>distilbert-base-uncased</code> on a small IMDb subset, evaluates it, and pushes a model repo.</p>
|
| 494 |
-
<div class="codebox"><span class="lang">request excerpt</span><button class="copy" type="button">copy</button>
|
| 495 |
-
<pre>{
|
| 496 |
-
"model": "moonshotai/Kimi-K2.6:novita",
|
| 497 |
-
"instructions": "Launch exactly one CPU-only HF Job using the provided script as inline Python source. Use hardware=cpu-basic and timeout about 30 minutes. Set HUB_MODEL_ID to the requested repo id. Wait for the job to finish, then report the model URL, job URL, and eval metrics.",
|
| 498 |
-
"input": "Run this exact CPU-only fine-tuning script as one HF Job and publish the artifact to abidlabs/ml-intern-api-imdb-distilbert-20260613-020123. The script fine-tunes distilbert-base-uncased on a small IMDb subset and pushes the model.",
|
| 499 |
-
"background": true,
|
| 500 |
-
"max_cost_usd": 15.0
|
| 501 |
-
}</pre></div>
|
| 502 |
-
<p><b>Result:</b> The job published
|
| 503 |
-
<a href="https://huggingface.co/abidlabs/ml-intern-api-imdb-distilbert-20260613-020123" target="_blank" rel="noopener">abidlabs/ml-intern-api-imdb-distilbert-20260613-020123</a>
|
| 504 |
-
from <a href="https://huggingface.co/jobs/abidlabs/6a2cba84871c005b5352ba24" target="_blank" rel="noopener">HF Job 6a2cba84871c005b5352ba24</a>.
|
| 505 |
-
The final eval accuracy on the 200-example subset was <code>0.815</code>.</p>
|
| 506 |
-
<details class="result-details" data-result="example-results/finetune-imdb-artifact.json">
|
| 507 |
-
<summary>Full API response</summary>
|
| 508 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button><pre>Loading…</pre></div>
|
| 509 |
-
<p class="result-link"><a href="example-results/finetune-imdb-artifact.json" target="_blank" rel="noopener">Open captured request + response JSON</a></p>
|
| 510 |
-
</details>
|
| 511 |
-
</article>
|
| 512 |
-
</div>
|
| 513 |
-
</section>
|
| 514 |
-
|
| 515 |
-
<!-- ════════ CONVENTIONS ════════ -->
|
| 516 |
-
<section id="conventions">
|
| 517 |
-
<h2>Conventions <a class="anchor" href="#conventions">#</a></h2>
|
| 518 |
-
<ul>
|
| 519 |
-
<li>Request and response bodies are JSON (<code>Content-Type: application/json</code>); streams are <code>text/event-stream</code>.</li>
|
| 520 |
-
<li>Errors use the envelope <code>{"error": {"message", "type", "code"}}</code>. See <a href="#errors">Errors</a>.</li>
|
| 521 |
-
<li>One <b>response</b> corresponds to one agent turn. <code>previous_response_id</code> continues the same underlying session (shared context and budget).</li>
|
| 522 |
-
<li>Every emitted event has a monotonically increasing <b>sequence number</b> per session, used for stream resumption.</li>
|
| 523 |
-
<li>Identifiers: responses are <code>resp_<hex></code>; sessions are UUIDs (exposed as <code>session_id</code>).</li>
|
| 524 |
-
</ul>
|
| 525 |
-
<h3>Response lifecycle</h3>
|
| 526 |
-
<div class="statuses">
|
| 527 |
-
<code>queued</code><code class="run">in_progress</code><code class="done">completed</code>
|
| 528 |
-
<code class="pause">incomplete</code><code class="dead">cancelled</code><code class="dead">failed</code>
|
| 529 |
-
</div>
|
| 530 |
-
<p><code>incomplete</code> is a <b>resumable pause</b>, not a terminal state:
|
| 531 |
-
<code>incomplete_details.reason</code> is either <code>approval_required</code>
|
| 532 |
-
(resume via <a href="#approvals">/approvals</a>) or <code>server_restart</code>
|
| 533 |
-
(the server restarted mid-turn; previously created artifacts, including running HF
|
| 534 |
-
Jobs, remain listed). <code>completed</code>, <code>cancelled</code>, and
|
| 535 |
-
<code>failed</code> are terminal.</p>
|
| 536 |
-
</section>
|
| 537 |
-
|
| 538 |
-
<!-- ════════ CREATE ════════ -->
|
| 539 |
-
<section id="create">
|
| 540 |
-
<h2>Create a response <a class="anchor" href="#create">#</a></h2>
|
| 541 |
-
<div class="endpoint-head"><span class="chip post">POST</span><span>/v1/responses</span></div>
|
| 542 |
-
<p>Submits a task. Three execution modes, selected by <code>background</code> and <code>stream</code>:</p>
|
| 543 |
-
<div class="tbl-wrap"><table>
|
| 544 |
-
<thead><tr><th>mode</th><th>flags</th><th>behavior</th></tr></thead>
|
| 545 |
-
<tbody>
|
| 546 |
-
<tr><td>background</td><td><code>background: true</code></td><td>Returns the response object immediately with <code>status: "queued"</code>. The turn runs server-side; poll or attach to the event stream.</td></tr>
|
| 547 |
-
<tr><td>streaming</td><td><code>stream: true</code></td><td>Returns <code>text/event-stream</code> for this request, ending at a terminal event or pause.</td></tr>
|
| 548 |
-
<tr><td>synchronous</td><td>neither</td><td>Blocks up to <code>wait_timeout_seconds</code>, then returns the response object (possibly still <code>in_progress</code>; the run continues server-side).</td></tr>
|
| 549 |
-
</tbody>
|
| 550 |
-
</table></div>
|
| 551 |
-
|
| 552 |
-
<h3>Request body</h3>
|
| 553 |
-
<div class="tbl-wrap"><table>
|
| 554 |
-
<thead><tr><th>field</th><th>type</th><th>description</th></tr></thead>
|
| 555 |
-
<tbody>
|
| 556 |
-
<tr><td><code>input</code> <span class="req">required</span></td><td class="t">string | message[]</td><td>The task. If a list of <code>{role, content}</code> messages, all but the last are inserted as context and the last is submitted. Max 100,000 chars per message.</td></tr>
|
| 557 |
-
<tr><td><code>model</code></td><td class="t">string</td><td>Model id from the app's supported list (<code>GET /api/config/model</code>). Unknown ids → <code>400</code>. Default follows the account plan. Ignored when chaining.</td></tr>
|
| 558 |
-
<tr><td><code>background</code></td><td class="t">boolean <span class="dflt">= false</span></td><td>Run without holding the connection.</td></tr>
|
| 559 |
-
<tr><td><code>stream</code></td><td class="t">boolean <span class="dflt">= false</span></td><td>Stream this turn as SSE.</td></tr>
|
| 560 |
-
<tr><td><code>previous_response_id</code></td><td class="t">string</td><td>Continue the session of an earlier response. <code>409</code> if that session is still processing or paused on an approval.</td></tr>
|
| 561 |
-
<tr><td><code>max_cost_usd</code></td><td class="t">number <span class="dflt">= 5.0</span></td><td>Session-cumulative auto-approval cap, range (0, 500]. See <a href="#cost-control">Cost control</a>.</td></tr>
|
| 562 |
-
<tr><td><code>instructions</code></td><td class="t">string</td><td>Developer guidance, prefixed to the submitted task. Max 20,000 chars.</td></tr>
|
| 563 |
-
<tr><td><code>wait_timeout_seconds</code></td><td class="t">number <span class="dflt">= 900</span></td><td>Synchronous mode only; range [1, 3600].</td></tr>
|
| 564 |
-
<tr><td><code>metadata</code></td><td class="t">object</td><td>String key/value pairs, echoed back unmodified.</td></tr>
|
| 565 |
-
</tbody>
|
| 566 |
-
</table></div>
|
| 567 |
-
|
| 568 |
-
<h3>Example</h3>
|
| 569 |
-
<div class="codebox"><span class="lang">curl</span><button class="copy" type="button">copy</button>
|
| 570 |
-
<pre>curl -s -X POST <span class="f js-base">…</span>/v1/responses \
|
| 571 |
-
-H <span class="s">"Authorization: Bearer $HF_TOKEN"</span> \
|
| 572 |
-
-H <span class="s">'Content-Type: application/json'</span> \
|
| 573 |
-
-d <span class="s">'{
|
| 574 |
-
"input": "Fine-tune a small encoder on imdb as an HF job; push to my namespace",
|
| 575 |
-
"background": true,
|
| 576 |
-
"max_cost_usd": 5.0
|
| 577 |
-
}'</span></pre></div>
|
| 578 |
-
<div class="codebox"><span class="lang">200 — application/json</span><button class="copy" type="button">copy</button>
|
| 579 |
-
<pre>{
|
| 580 |
-
<span class="s">"id"</span>: <span class="s">"resp_820438d1de1a453da1d822409188b3e0"</span>,
|
| 581 |
-
<span class="s">"object"</span>: <span class="s">"response"</span>,
|
| 582 |
-
<span class="s">"status"</span>: <span class="s">"queued"</span>,
|
| 583 |
-
<span class="s">"session_id"</span>: <span class="s">"6f9e1d1c-…"</span>,
|
| 584 |
-
<span class="s">"max_cost_usd"</span>: <span class="f">5.0</span>,
|
| 585 |
-
<span class="s">"output"</span>: [], <span class="s">"artifacts"</span>: [], <span class="s">"error"</span>: <span class="k">null</span>, …
|
| 586 |
-
}</pre></div>
|
| 587 |
-
|
| 588 |
-
<h3>openai-python</h3>
|
| 589 |
-
<div class="codebox"><span class="lang">python</span><button class="copy" type="button">copy</button>
|
| 590 |
-
<pre><span class="k">from</span> openai <span class="k">import</span> OpenAI
|
| 591 |
-
|
| 592 |
-
client = OpenAI(base_url=<span class="s">"<span class="js-base">…</span>/v1"</span>, api_key=os.environ[<span class="s">"HF_TOKEN"</span>])
|
| 593 |
-
|
| 594 |
-
resp = client.responses.create(
|
| 595 |
-
input=<span class="s">"fine-tune llama on my dataset"</span>,
|
| 596 |
-
background=<span class="k">True</span>,
|
| 597 |
-
extra_body={<span class="s">"max_cost_usd"</span>: <span class="f">20.0</span>}, <span class="cmt"># non-standard fields via extra_body</span>
|
| 598 |
-
)
|
| 599 |
-
resp = client.responses.retrieve(resp.id)
|
| 600 |
-
resp.status, resp.model_extra[<span class="s">"artifacts"</span>]</pre></div>
|
| 601 |
-
</section>
|
| 602 |
-
|
| 603 |
-
<!-- ════════ RETRIEVE ════════ -->
|
| 604 |
-
<section id="retrieve">
|
| 605 |
-
<h2>Retrieve a response <a class="anchor" href="#retrieve">#</a></h2>
|
| 606 |
-
<div class="endpoint-head"><span class="chip get">GET</span><span>/v1/responses/{id}</span></div>
|
| 607 |
-
<p>Returns the current <a href="#response-object">response object</a>. Status is derived from
|
| 608 |
-
the persisted event log: <code>output[]</code> is reconstructed from the turn's events,
|
| 609 |
-
<code>artifacts[]</code> aggregated, and <code>usage</code> attached when available.</p>
|
| 610 |
-
<p>This endpoint does not require a live runtime session — it works after idle eviction
|
| 611 |
-
and across server restarts (with persistence configured; see
|
| 612 |
-
<a href="#limits">Limits & persistence</a>). Requests for responses owned by another
|
| 613 |
-
account return <code>404</code>.</p>
|
| 614 |
-
<div class="codebox"><span class="lang">curl</span><button class="copy" type="button">copy</button>
|
| 615 |
-
<pre>curl -s <span class="f js-base">…</span>/v1/responses/$RESPONSE_ID \
|
| 616 |
-
-H <span class="s">"Authorization: Bearer $HF_TOKEN"</span> | jq <span class="s">'{status, artifacts, usage}'</span></pre></div>
|
| 617 |
-
</section>
|
| 618 |
-
|
| 619 |
-
<!-- ════════ EVENTS ════════ -->
|
| 620 |
-
<section id="events">
|
| 621 |
-
<h2>Stream events <a class="anchor" href="#events">#</a></h2>
|
| 622 |
-
<div class="endpoint-head"><span class="chip get">GET</span><span>/v1/responses/{id}/events</span></div>
|
| 623 |
-
<p>Server-sent events for one turn. Each frame is:</p>
|
| 624 |
-
<div class="codebox"><span class="lang">text/event-stream</span><button class="copy" type="button">copy</button>
|
| 625 |
-
<pre>id: 47
|
| 626 |
-
event: response.output_text.delta
|
| 627 |
-
data: {"type": "response.output_text.delta", "response_id": "resp_…", "sequence_number": 47, "delta": "…"}</pre></div>
|
| 628 |
-
<h3>Resumption</h3>
|
| 629 |
-
<ul>
|
| 630 |
-
<li><code>?starting_after=<seq></code> (or the standard <code>Last-Event-ID</code> header) replays persisted events after that sequence number, then continues live.</li>
|
| 631 |
-
<li>Comment frames (<code>: keepalive</code>) are sent every 15 s during quiet periods; parsers ignore them.</li>
|
| 632 |
-
<li>The stream closes at a terminal event, or at <code>response.approval_required</code> (re-attach after resolving the approval).</li>
|
| 633 |
-
</ul>
|
| 634 |
-
<h3>Event types</h3>
|
| 635 |
-
<div class="tbl-wrap"><table>
|
| 636 |
-
<thead><tr><th>event</th><th>payload / semantics</th></tr></thead>
|
| 637 |
-
<tbody>
|
| 638 |
-
<tr><td><code>response.created</code></td><td>Synthetic first frame on <code>POST</code> streams; carries the initial response object.</td></tr>
|
| 639 |
-
<tr><td><code>response.in_progress</code></td><td>Turn execution started.</td></tr>
|
| 640 |
-
<tr><td><code>response.output_text.delta</code></td><td><code>{delta}</code> — incremental assistant text.</td></tr>
|
| 641 |
-
<tr><td><code>response.output_text.done</code></td><td>Current text segment finished.</td></tr>
|
| 642 |
-
<tr><td><code>response.output_item.added</code></td><td><code>{item}</code> — tool call started (<code>custom_tool_call</code>: id, name, input).</td></tr>
|
| 643 |
-
<tr><td><code>response.output_item.done</code></td><td><code>{item}</code> — tool call finished, with output (truncated to 4 KB).</td></tr>
|
| 644 |
-
<tr><td><code>response.tool_log</code></td><td>Incremental tool logs — HF Job logs stream here.</td></tr>
|
| 645 |
-
<tr><td><code>response.tool_state.changed</code></td><td>Tool runtime state, e.g. a job entering <code>running</code> with its <code>jobUrl</code>.</td></tr>
|
| 646 |
-
<tr><td><code>response.artifact.created</code></td><td><code>{artifact}</code> — see <a href="#artifacts">Artifacts</a>.</td></tr>
|
| 647 |
-
<tr><td><code>response.approval_required</code></td><td>Paused; payload includes the pending action and budget context. Stream ends.</td></tr>
|
| 648 |
-
<tr><td><code>response.completed</code> / <code>.failed</code> / <code>.cancelled</code></td><td>Terminal. Stream ends.</td></tr>
|
| 649 |
-
</tbody>
|
| 650 |
-
</table></div>
|
| 651 |
-
<p>Unrecognized internal events are forwarded as <code>response.<internal_name></code>
|
| 652 |
-
(e.g. <code>response.llm_call</code> telemetry); clients should ignore event names they
|
| 653 |
-
don't handle.</p>
|
| 654 |
-
</section>
|
| 655 |
-
|
| 656 |
-
<!-- ════════ CANCEL ════════ -->
|
| 657 |
-
<section id="cancel">
|
| 658 |
-
<h2>Cancel a response <a class="anchor" href="#cancel">#</a></h2>
|
| 659 |
-
<div class="endpoint-head"><span class="chip post">POST</span><span>/v1/responses/{id}/cancel</span></div>
|
| 660 |
-
<p>Signals interruption and returns the current snapshot. Cancellation is asynchronous:
|
| 661 |
-
the returned object may still read <code>in_progress</code>; the status becomes
|
| 662 |
-
<code>cancelled</code> when the interrupt lands (observable via polling or the
|
| 663 |
-
<code>response.cancelled</code> event). Idempotent — cancelling a finished response
|
| 664 |
-
returns it unchanged.</p>
|
| 665 |
-
<div class="callout">Cancelling a turn does <b>not</b> kill HF Jobs that were already
|
| 666 |
-
launched; manage those at <code>huggingface.co/jobs</code> or via a follow-up task.</div>
|
| 667 |
-
</section>
|
| 668 |
-
|
| 669 |
-
<!-- ════════ APPROVALS ════════ -->
|
| 670 |
-
<section id="approvals">
|
| 671 |
-
<h2>Resolve an approval <a class="anchor" href="#approvals">#</a></h2>
|
| 672 |
-
<div class="endpoint-head"><span class="chip post">POST</span><span>/v1/responses/{id}/approvals</span></div>
|
| 673 |
-
<p>Resumes a response paused with <code>incomplete_details.reason = "approval_required"</code>.
|
| 674 |
-
The same response id continues — pollers and event streams pick up where they left off.</p>
|
| 675 |
-
<h3>Request body</h3>
|
| 676 |
-
<div class="tbl-wrap"><table>
|
| 677 |
-
<thead><tr><th>field</th><th>type</th><th>description</th></tr></thead>
|
| 678 |
-
<tbody>
|
| 679 |
-
<tr><td><code>approve</code> <span class="req">required</span></td><td class="t">boolean</td><td>Applied to the entire pending batch (headless callers approve or deny all pending actions at once).</td></tr>
|
| 680 |
-
<tr><td><code>new_max_cost_usd</code></td><td class="t">number</td><td>Raises the session cap before resuming. Required in practice when the pause was the cap itself — approving without headroom re-pauses immediately.</td></tr>
|
| 681 |
-
<tr><td><code>feedback</code></td><td class="t">string</td><td>Passed to the agent with the decision (most useful with <code>approve: false</code>).</td></tr>
|
| 682 |
-
</tbody>
|
| 683 |
-
</table></div>
|
| 684 |
-
<div class="codebox"><span class="lang">curl</span><button class="copy" type="button">copy</button>
|
| 685 |
-
<pre>curl -s -X POST <span class="f js-base">…</span>/v1/responses/$RESPONSE_ID/approvals \
|
| 686 |
-
-H <span class="s">"Authorization: Bearer $HF_TOKEN"</span> \
|
| 687 |
-
-H <span class="s">'Content-Type: application/json'</span> \
|
| 688 |
-
-d <span class="s">'{"approve": true, "new_max_cost_usd": 15.0}'</span></pre></div>
|
| 689 |
-
<p>Returns <code>409 no_pending_approval</code> if nothing is pending.</p>
|
| 690 |
-
</section>
|
| 691 |
-
|
| 692 |
-
<!-- ════════ RESPONSE OBJECT ════════ -->
|
| 693 |
-
<section id="response-object">
|
| 694 |
-
<h2>The response object <a class="anchor" href="#response-object">#</a></h2>
|
| 695 |
-
<div class="tbl-wrap"><table>
|
| 696 |
-
<thead><tr><th>field</th><th>type</th><th>description</th></tr></thead>
|
| 697 |
-
<tbody>
|
| 698 |
-
<tr><td><code>id</code></td><td class="t">string</td><td><code>resp_<hex></code></td></tr>
|
| 699 |
-
<tr><td><code>object</code></td><td class="t">string</td><td>Always <code>"response"</code>.</td></tr>
|
| 700 |
-
<tr><td><code>status</code></td><td class="t">string</td><td>See <a href="#conventions">lifecycle</a>.</td></tr>
|
| 701 |
-
<tr><td><code>output</code></td><td class="t">item[]</td><td>Ordered turn output: <code>message</code> items (<code>content[].type = "output_text"</code>) and <code>custom_tool_call</code> items (<code>name</code>, <code>input</code>, <code>output</code>, <code>status</code>).</td></tr>
|
| 702 |
-
<tr><td><code>artifacts</code></td><td class="t">artifact[]</td><td>Extension. See <a href="#artifacts">Artifacts</a>.</td></tr>
|
| 703 |
-
<tr><td><code>usage</code></td><td class="t">object | null</td><td>Session-window usage: <code>total_usd</code>, <code>inference_usd</code>, <code>hf_jobs_estimated_usd</code>, token counts. Null if unavailable.</td></tr>
|
| 704 |
-
<tr><td><code>error</code></td><td class="t">object | null</td><td><code>{code, message}</code> when <code>status = "failed"</code>.</td></tr>
|
| 705 |
-
<tr><td><code>incomplete_details</code></td><td class="t">object | null</td><td><code>{reason: "approval_required", approval: {…}}</code> or <code>{reason: "server_restart"}</code>.</td></tr>
|
| 706 |
-
<tr><td><code>session_id</code></td><td class="t">string</td><td>Extension. Underlying session; shared across chained responses.</td></tr>
|
| 707 |
-
<tr><td><code>previous_response_id</code></td><td class="t">string | null</td><td>Set when this turn chained an earlier response.</td></tr>
|
| 708 |
-
<tr><td><code>max_cost_usd</code></td><td class="t">number</td><td>Effective session cap at creation (or as last raised).</td></tr>
|
| 709 |
-
<tr><td><code>model</code>, <code>background</code>, <code>instructions</code>, <code>metadata</code></td><td class="t">—</td><td>As supplied at creation.</td></tr>
|
| 710 |
-
<tr><td><code>created_at</code>, <code>completed_at</code></td><td class="t">int | null</td><td>Unix seconds.</td></tr>
|
| 711 |
-
</tbody>
|
| 712 |
-
</table></div>
|
| 713 |
-
</section>
|
| 714 |
-
|
| 715 |
-
<!-- ════════ ARTIFACTS ════════ -->
|
| 716 |
-
<section id="artifacts">
|
| 717 |
-
<h2>Artifacts <a class="anchor" href="#artifacts">#</a></h2>
|
| 718 |
-
<p>Hub resources produced by a turn. Emitted incrementally as
|
| 719 |
-
<code>response.artifact.created</code> events and aggregated (deduplicated) on the response
|
| 720 |
-
object. Repos created <i>inside</i> HF Jobs produce no in-process events; they are
|
| 721 |
-
recovered at turn end from the session's Hub artifact collection.</p>
|
| 722 |
-
<div class="tbl-wrap"><table>
|
| 723 |
-
<thead><tr><th>type</th><th>fields</th><th>notes</th></tr></thead>
|
| 724 |
-
<tbody>
|
| 725 |
-
<tr><td><code>hf_job</code></td><td class="t">id, url</td><td>A launched HF Job under the caller's namespace.</td></tr>
|
| 726 |
-
<tr><td><code>trackio_dashboard</code></td><td class="t">space_id, url, project?</td><td>Auto-seeded metrics dashboard Space; embeddable for live training curves.</td></tr>
|
| 727 |
-
<tr><td><code>model</code> / <code>dataset</code> / <code>space</code></td><td class="t">repo_id, url</td><td>Hub repos created or written by the run.</td></tr>
|
| 728 |
-
<tr><td><code>collection</code></td><td class="t">slug, url</td><td>The session's artifact collection (groups everything above).</td></tr>
|
| 729 |
-
</tbody>
|
| 730 |
-
</table></div>
|
| 731 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button>
|
| 732 |
-
<pre><span class="s">"artifacts"</span>: [
|
| 733 |
-
{ <span class="s">"type"</span>: <span class="s">"hf_job"</span>, <span class="s">"id"</span>: <span class="s">"6843a1…"</span>, <span class="s">"url"</span>: <span class="s">"https://huggingface.co/jobs/<user>/6843a1…"</span> },
|
| 734 |
-
{ <span class="s">"type"</span>: <span class="s">"trackio_dashboard"</span>, <span class="s">"space_id"</span>: <span class="s">"<user>/trackio"</span>, <span class="s">"project"</span>: <span class="s">"imdb-finetune"</span>,
|
| 735 |
-
<span class="s">"url"</span>: <span class="s">"https://huggingface.co/spaces/<user>/trackio"</span> },
|
| 736 |
-
{ <span class="s">"type"</span>: <span class="s">"model"</span>, <span class="s">"repo_id"</span>: <span class="s">"<user>/distilbert-imdb"</span>,
|
| 737 |
-
<span class="s">"url"</span>: <span class="s">"https://huggingface.co/<user>/distilbert-imdb"</span> }
|
| 738 |
-
]</pre></div>
|
| 739 |
-
</section>
|
| 740 |
-
|
| 741 |
-
<!-- ════════ ERRORS ════════ -->
|
| 742 |
-
<section id="errors">
|
| 743 |
-
<h2>Errors <a class="anchor" href="#errors">#</a></h2>
|
| 744 |
-
<div class="codebox"><span class="lang">json</span><button class="copy" type="button">copy</button>
|
| 745 |
-
<pre>{ <span class="s">"error"</span>: { <span class="s">"message"</span>: <span class="s">"…"</span>, <span class="s">"type"</span>: <span class="s">"invalid_request_error"</span>, <span class="s">"code"</span>: <span class="s">"…"</span> } }</pre></div>
|
| 746 |
-
<div class="tbl-wrap"><table>
|
| 747 |
-
<thead><tr><th>status</th><th>code</th><th>meaning</th></tr></thead>
|
| 748 |
-
<tbody>
|
| 749 |
-
<tr><td class="t">401</td><td><code>invalid_api_key</code></td><td>Missing/invalid Bearer token, or an organization token.</td></tr>
|
| 750 |
-
<tr><td class="t">403</td><td><code>inference_provider_permission_required</code></td><td>Bearer token is valid but cannot call HF Inference Providers through Router.</td></tr>
|
| 751 |
-
<tr><td class="t">400</td><td><code>model_not_found</code></td><td>Unknown <code>model</code> id.</td></tr>
|
| 752 |
-
<tr><td class="t">400</td><td><code>empty_input</code></td><td><code>input</code> was an empty message list.</td></tr>
|
| 753 |
-
<tr><td class="t">404</td><td><code>response_not_found</code></td><td>Unknown id, or owned by another account.</td></tr>
|
| 754 |
-
<tr><td class="t">409</td><td><code>previous_response_still_running</code></td><td>Chained session is mid-turn; wait for terminal status.</td></tr>
|
| 755 |
-
<tr><td class="t">409</td><td><code>approval_pending</code></td><td>Session paused; resolve via <a href="#approvals">/approvals</a> first.</td></tr>
|
| 756 |
-
<tr><td class="t">409</td><td><code>no_pending_approval</code></td><td>Approval posted but nothing is pending.</td></tr>
|
| 757 |
-
<tr><td class="t">429 / 503</td><td><code>capacity_exceeded</code></td><td>Per-user (10 live sessions) or global capacity reached.</td></tr>
|
| 758 |
-
<tr><td class="t">503</td><td><code>session_unavailable</code></td><td>Session runtime failed to start; retry.</td></tr>
|
| 759 |
-
</tbody>
|
| 760 |
-
</table></div>
|
| 761 |
-
<p>Failures <i>inside</i> a run (model auth, job billing, tool errors) do not surface as
|
| 762 |
-
HTTP errors — the run ends with <code>status: "failed"</code> and a populated
|
| 763 |
-
<code>error</code> object, or the agent reports the problem in its output.</p>
|
| 764 |
-
</section>
|
| 765 |
-
|
| 766 |
-
<!-- ════════ COST CONTROL ════════ -->
|
| 767 |
-
<section id="cost-control">
|
| 768 |
-
<h2>Cost control <a class="anchor" href="#cost-control">#</a></h2>
|
| 769 |
-
<p>API runs execute unattended, so tool calls that would normally require interactive
|
| 770 |
-
approval auto-approve under a budget:</p>
|
| 771 |
-
<ul>
|
| 772 |
-
<li><code>max_cost_usd</code> is enforced <b>per session, cumulatively</b> — estimated spend from inference, jobs, and sandboxes accrues against it across all chained responses. The most recent request's value replaces the cap.</li>
|
| 773 |
-
<li>When the next action's estimated cost exceeds remaining budget — or accrued spend reaches the cap — the run pauses: <code>status: "incomplete"</code>, <code>incomplete_details.reason: "approval_required"</code>, and a <code>response.approval_required</code> event with the pending action and budget context.</li>
|
| 774 |
-
<li>Resume via <a href="#approvals">/approvals</a>, typically raising the cap. Denial returns control to the agent with your feedback.</li>
|
| 775 |
-
</ul>
|
| 776 |
-
<p>Costs are estimates at approval time; authoritative billing is the HF account's
|
| 777 |
-
(<a href="https://huggingface.co/settings/billing" target="_blank" rel="noopener">settings/billing</a>).
|
| 778 |
-
The response object's <code>usage</code> reports the session window's attributed spend.</p>
|
| 779 |
-
</section>
|
| 780 |
-
|
| 781 |
-
<!-- ════════ LIMITS ════════ -->
|
| 782 |
-
<section id="limits">
|
| 783 |
-
<h2>Limits & persistence <a class="anchor" href="#limits">#</a></h2>
|
| 784 |
-
<ul>
|
| 785 |
-
<li><b>Concurrency:</b> 10 live sessions per account; one turn at a time per session (concurrent submits → <code>409</code>).</li>
|
| 786 |
-
<li><b>Idle eviction:</b> sessions idle ≥ 15 min release runtime resources; they restore transparently on the next request to the same <code>session_id</code>.</li>
|
| 787 |
-
<li><b>Input size:</b> 100,000 chars per message; <code>instructions</code> 20,000.</li>
|
| 788 |
-
<li><b>Tool output in <code>output[]</code>:</b> truncated to 4 KB per item (full logs stream via <code>response.tool_log</code>).</li>
|
| 789 |
-
<li><b>Persistence:</b> with a configured event store, events/status/artifacts are durable — streams resume and polling survives restarts. Without it, tracking is in-memory: live streaming works, but replay and restart recovery are unavailable.</li>
|
| 790 |
-
<li><b>Restart mid-turn:</b> the response reports <code>incomplete (server_restart)</code>; launched HF Jobs continue on HF infrastructure and remain listed in <code>artifacts[]</code>.</li>
|
| 791 |
-
</ul>
|
| 792 |
-
</section>
|
| 793 |
-
|
| 794 |
-
</main>
|
| 795 |
-
</div>
|
| 796 |
-
|
| 797 |
-
<script>
|
| 798 |
-
/* ── self-documenting base URL ─────────────────────── */
|
| 799 |
-
const ORIGIN = location.origin;
|
| 800 |
-
document.getElementById("base-url").textContent = ORIGIN + "/v1";
|
| 801 |
-
document.querySelectorAll(".js-base").forEach(el => { el.textContent = ORIGIN; });
|
| 802 |
-
|
| 803 |
-
/* ── copy buttons ──────────────────────────────────── */
|
| 804 |
-
function flash(btn, label) {
|
| 805 |
-
const old = btn.textContent;
|
| 806 |
-
btn.textContent = label;
|
| 807 |
-
setTimeout(() => { btn.textContent = old; }, 1200);
|
| 808 |
-
}
|
| 809 |
-
document.getElementById("copy-base").addEventListener("click", (e) => {
|
| 810 |
-
navigator.clipboard.writeText(ORIGIN + "/v1").then(() => flash(e.target, "copied"));
|
| 811 |
-
});
|
| 812 |
-
document.querySelectorAll(".codebox .copy").forEach(btn => {
|
| 813 |
-
btn.addEventListener("click", () => {
|
| 814 |
-
const text = btn.parentElement.querySelector("pre").innerText;
|
| 815 |
-
navigator.clipboard.writeText(text).then(() => flash(btn, "copied"));
|
| 816 |
-
});
|
| 817 |
-
});
|
| 818 |
-
|
| 819 |
-
/* ── full example responses ───────────────────────── */
|
| 820 |
-
document.querySelectorAll(".result-details").forEach(details => {
|
| 821 |
-
details.addEventListener("toggle", async () => {
|
| 822 |
-
if (!details.open || details.dataset.loaded) return;
|
| 823 |
-
const pre = details.querySelector("pre");
|
| 824 |
-
try {
|
| 825 |
-
const res = await fetch(details.dataset.result);
|
| 826 |
-
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
| 827 |
-
const payload = await res.json();
|
| 828 |
-
pre.textContent = JSON.stringify(payload.response || payload, null, 2);
|
| 829 |
-
details.dataset.loaded = "true";
|
| 830 |
-
} catch (err) {
|
| 831 |
-
pre.textContent = `Could not load full response: ${err.message}`;
|
| 832 |
-
}
|
| 833 |
-
});
|
| 834 |
-
});
|
| 835 |
-
|
| 836 |
-
/* ── sidebar scrollspy ─────────────────────────────── */
|
| 837 |
-
const links = Array.from(document.querySelectorAll("#nav a"));
|
| 838 |
-
const targets = links.map(a => document.querySelector(a.getAttribute("href")));
|
| 839 |
-
function spy() {
|
| 840 |
-
let active = 0;
|
| 841 |
-
targets.forEach((t, i) => { if (t && t.getBoundingClientRect().top <= 90) active = i; });
|
| 842 |
-
links.forEach((a, i) => a.classList.toggle("active", i === active));
|
| 843 |
-
}
|
| 844 |
-
addEventListener("scroll", spy, { passive: true });
|
| 845 |
-
spy();
|
| 846 |
-
|
| 847 |
-
/* ── animated example turn (SSE) ───────────────────── */
|
| 848 |
-
const SCRIPT = [
|
| 849 |
-
{ t: "cmd", text: "curl -sN -X POST " },
|
| 850 |
-
{ t: "cmdo", text: "$BASE/v1/responses \\\n -H \"Authorization: Bearer hf_••••\" \\\n -d '{\"input\":\"fine-tune on imdb, push to my hub\",\"stream\":true}'" },
|
| 851 |
-
{ t: "gap" },
|
| 852 |
-
{ t: "ev", name: "response.created", body: "{\"id\": \"resp_8c41f2…\"}" },
|
| 853 |
-
{ t: "ev", name: "response.in_progress", body: "" },
|
| 854 |
-
{ t: "delta", text: "Planning: small encoder, LoRA, a10g-small should do." },
|
| 855 |
-
{ t: "ev", name: "response.output_item.added", body: "{\"name\": \"hf_jobs\"}" },
|
| 856 |
-
{ t: "ev", name: "response.tool_state.changed", body: "{\"state\": \"running\"}" },
|
| 857 |
-
{ t: "art", name: "response.artifact.created", body: "{\"type\": \"hf_job\", \"url\": \"hf.co/jobs/you/6843a1\"}" },
|
| 858 |
-
{ t: "art", name: "response.artifact.created", body: "{\"type\": \"trackio_dashboard\", \"space\": \"you/trackio\"}" },
|
| 859 |
-
{ t: "log", text: "epoch 1/3 loss 0.412 acc 0.871" },
|
| 860 |
-
{ t: "log", text: "epoch 2/3 loss 0.236 acc 0.917" },
|
| 861 |
-
{ t: "log", text: "epoch 3/3 loss 0.171 acc 0.934" },
|
| 862 |
-
{ t: "art", name: "response.artifact.created", body: "{\"type\": \"model\", \"repo\": \"you/distilbert-imdb\"}" },
|
| 863 |
-
{ t: "ok", name: "response.completed", body: "{\"usage\": {\"total_usd\": 1.84}}" },
|
| 864 |
-
];
|
| 865 |
-
const term = document.getElementById("term");
|
| 866 |
-
const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
| 867 |
-
|
| 868 |
-
function lineFor(step) {
|
| 869 |
-
if (step.t === "cmd") return `<span class="p">$ </span><span class="c">${step.text}</span>`;
|
| 870 |
-
if (step.t === "cmdo") return `<span class="c">${step.text.replace(/</g,"<")}</span>`;
|
| 871 |
-
if (step.t === "gap") return "";
|
| 872 |
-
if (step.t === "delta")return `<span class="ev">event:</span> response.output_text.delta\n<span class="p">data:</span> <span class="str">"${step.text}"</span>`;
|
| 873 |
-
if (step.t === "log") return `<span class="ev">event:</span> response.tool_log\n<span class="p">data:</span> <span class="str">"${step.text}"</span>`;
|
| 874 |
-
if (step.t === "art") return `<span class="ev">event:</span> <span class="art">${step.name}</span>\n<span class="p">data:</span> ${step.body.replace(/</g,"<")}`;
|
| 875 |
-
if (step.t === "ok") return `<span class="ev">event:</span> <span class="ok">${step.name}</span>\n<span class="p">data:</span> ${step.body}`;
|
| 876 |
-
return `<span class="ev">event:</span> ${step.name}` + (step.body ? `\n<span class="p">data:</span> ${step.body.replace(/</g,"<")}` : "");
|
| 877 |
-
}
|
| 878 |
-
|
| 879 |
-
function renderAll() { term.innerHTML = SCRIPT.map(lineFor).join("\n") + "\n"; }
|
| 880 |
-
|
| 881 |
-
async function play() {
|
| 882 |
-
if (reduced) { renderAll(); return; }
|
| 883 |
-
while (true) {
|
| 884 |
-
term.innerHTML = "";
|
| 885 |
-
const cursor = document.createElement("span");
|
| 886 |
-
cursor.className = "cursor";
|
| 887 |
-
for (const step of SCRIPT) {
|
| 888 |
-
const div = document.createElement("div");
|
| 889 |
-
term.appendChild(div);
|
| 890 |
-
term.appendChild(cursor);
|
| 891 |
-
if (step.t === "cmd" || step.t === "cmdo") {
|
| 892 |
-
const html = lineFor(step);
|
| 893 |
-
const tmp = document.createElement("div"); tmp.innerHTML = html;
|
| 894 |
-
const raw = tmp.textContent;
|
| 895 |
-
for (let i = 1; i <= raw.length; i++) {
|
| 896 |
-
div.textContent = raw.slice(0, i);
|
| 897 |
-
await new Promise(r => setTimeout(r, 13));
|
| 898 |
-
}
|
| 899 |
-
div.innerHTML = html;
|
| 900 |
-
} else {
|
| 901 |
-
await new Promise(r => setTimeout(r, step.t === "gap" ? 350 : 520));
|
| 902 |
-
div.innerHTML = lineFor(step);
|
| 903 |
-
}
|
| 904 |
-
term.scrollTop = term.scrollHeight;
|
| 905 |
-
}
|
| 906 |
-
await new Promise(r => setTimeout(r, 6500));
|
| 907 |
-
}
|
| 908 |
-
}
|
| 909 |
-
play();
|
| 910 |
-
</script>
|
| 911 |
-
</body>
|
| 912 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backend/main.py
CHANGED
|
@@ -9,6 +9,7 @@ from pathlib import Path
|
|
| 9 |
from dotenv import load_dotenv
|
| 10 |
from fastapi import FastAPI
|
| 11 |
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
| 12 |
from fastapi.staticfiles import StaticFiles
|
| 13 |
|
| 14 |
# Load .env before importing routes/session_manager so persistence and model
|
|
@@ -28,6 +29,7 @@ logging.basicConfig(
|
|
| 28 |
)
|
| 29 |
logger = logging.getLogger(__name__)
|
| 30 |
SHUTDOWN_USAGE_REFRESH_CONCURRENCY = 32
|
|
|
|
| 31 |
|
| 32 |
|
| 33 |
async def _flush_session_on_shutdown(sid: str, agent_session, semaphore) -> None:
|
|
@@ -121,6 +123,11 @@ app.include_router(auth_router)
|
|
| 121 |
app.include_router(v1_router)
|
| 122 |
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
@app.exception_handler(V1APIError)
|
| 125 |
async def v1_api_error_handler(request, exc: V1APIError):
|
| 126 |
"""OpenAI-shaped error bodies for the /v1 developer API."""
|
|
|
|
| 9 |
from dotenv import load_dotenv
|
| 10 |
from fastapi import FastAPI
|
| 11 |
from fastapi.middleware.cors import CORSMiddleware
|
| 12 |
+
from fastapi.responses import RedirectResponse
|
| 13 |
from fastapi.staticfiles import StaticFiles
|
| 14 |
|
| 15 |
# Load .env before importing routes/session_manager so persistence and model
|
|
|
|
| 29 |
)
|
| 30 |
logger = logging.getLogger(__name__)
|
| 31 |
SHUTDOWN_USAGE_REFRESH_CONCURRENCY = 32
|
| 32 |
+
API_DOCS_URL = "https://abidlabs-ml-intern-api-docs.hf.space"
|
| 33 |
|
| 34 |
|
| 35 |
async def _flush_session_on_shutdown(sid: str, agent_session, semaphore) -> None:
|
|
|
|
| 123 |
app.include_router(v1_router)
|
| 124 |
|
| 125 |
|
| 126 |
+
@app.get("/", include_in_schema=False)
|
| 127 |
+
async def docs_redirect():
|
| 128 |
+
return RedirectResponse(API_DOCS_URL, status_code=307)
|
| 129 |
+
|
| 130 |
+
|
| 131 |
@app.exception_handler(V1APIError)
|
| 132 |
async def v1_api_error_handler(request, exc: V1APIError):
|
| 133 |
"""OpenAI-shaped error bodies for the /v1 developer API."""
|