←新闻详情

Hugging Face更新于 10月27日 19:44

作者用 ML Intern 提示词在两天内训练出六个模型

The model that didn't exist, so you made it yourself

AI 导读

Hugging Face 博主 yvrjsharma 公开了自己使用 ML Intern 的七个提示词,并展示两天内完成的六个项目,包括基于 Qwen3.5-2B 的柑橘病害 VLM、FLUX.2 klein 4B 的 Huggy 角色 LoRA、Qwen-Image 2.1 的相机视角 LoRA 与涂鸦 LoRA、Pocket Rewriter 0.8B/2B 蒸馏模型,以及把 Agate Preview 002 从 50 步蒸馏到 4 步的版本。作者建议提示词中写明已验证事实、要求训练前基线和带检查的冒烟测试,并设置花费上限,例如柑橘项目限定 12 美元。所有提示词已放在 GitHub 的 yvrjsharma/ml-intern-prompts,ML Intern 模式可在 HuggingChat 中开启使用。

推荐理由

精选AI 评分 62

作者公开了七个 ML Intern 提示词与六个项目的完整成本,读者可据此复现自己的模型训练流程。

主题

标签

正文

How I prompt ML Intern

The first message is where I spend my effort. My first prompt, for the citrus model shared below, was about 450 words. By my 6th project it was closer to 2,000, because each project taught me something I wanted in the next one. All seven prompts are on GitHub at yvrjsharma/ml-intern-prompts , exactly as I wrote them.

A prompt starts with the idea in one line and why I want it. Then it names the exact pieces: the dataset, the base model, the training script. Anything I have already checked goes under a heading that literally says "Verified facts, do not re-derive", so the agent spends its budget on the work instead of rediscovering what I know. For the camera-angle LoRA that section listed which trainer had just added transparent-image support, and which open GitHub issues made the fallback trainer risky.

Two lines in the prompt are critical . The first asks for a baseline before any training. For example, the citrus prompt says: "Also report the base model's zero-shot score on the same metric before training so we can see the gain." Without it you get a trained model and no idea whether it is better than what you started with. The second is a smoke test with a check attached. For the image LoRAs I asked for 50 training steps, then a check that the saved weights had actually changed, before paying for the full run.

At the end of the prompt, I lay out the expected deliverables and limit the cost. I define what belongs in the model card and include a instruction like: "Cap total spend at USD 12 and ask me before exceeding it." Because ML-intern begins every task with zero dollar budget and needs permission before executing paid jobs, this spending limit stays strictly enforced. When you leave out a budget, the agent suggests a couple of paths depending on project size and asks which one you prefer.

You don't necessarily need all of that on your first attempt. For example, I didn't have the verified-facts section in my citrus brief and ML Intern still produced a model that more than tripled the accuracy of the Qwen3.5-2B model. Let me walk you through 6 things I built with Ml-Intern in just a couple of days.

1. A model that knows your field

A general vision model can describe a yellowing citrus leaf. However, telling you whether it is a mite problem or a magnesium deficiency, and the bio and non-bio remedies to treat the plant is very hard. Using Claude, I put together a training dataset merged from three sources hosted by the Project-AgML organization on the Hub. The resulting citrus-disease-vlm-instruct is a dataset containing 3,017 annotated images across 21 distinct pests, illnesses, nutritional gaps, and treatment approaches. ML-intern handled the fine-tuning of Qwen3.5-2B using these examples, making sure to benchmark the foundation model beforehand.

2. A model that draws your character

Image models know plenty of characters. Huggy, drawn in the flat style of the Hugging Face brand assets, was not one of them. I asked ML-Intern for a LoRA on FLUX.2 klein base 4B , trained on 84 captioned drawings from Chunte/huggy_for_training dataset.

3. A model that does a new trick

Camera-angle LoRAs are among the most-liked community add-ons for earlier Qwen-Image models. You can give the model a picture of an object and ask to see it 45 degrees from the left. When I checked a few days after the Qwen-Image 2.1 model release, nobody had made one, so I tasked ML-intern to build it.

ML-intern rendered 1,030 scanned household objects from Google Scanned Objects at 24 angles each, 24,722 transparent images, on a CPU job that cost a few cents. It later finalised 461 objects for training and 40 held out for testing, and 1,844 before-and-after training pairs spread evenly over 23 camera instructions.

Doodle-in LoRA is another cool idea. Upload a photo with a magenta scribble on it and add a short prompt naming an object. The LoRA replaces the scribble with that object while keeping the original lighting and composition consistent.

No dataset existed for this, so my prompt described how to make one. Start from a real photo in Open Images, remove one object with the LaMa inpainting model, and draw a scribble where the object used to be. The untouched photo is the target. ML-intern wrote and tested the pair-building scripts in a CPU sandbox, then ran them as GPU jobs, recording the author and license of every source photo along the way. It built 6,042 training pairs and a 160-pair test set, where 40 of the test pairs come from 23 object classes kept out of training entirely.

Before training, it measured the base model on its own and with the Viggle turbo LoRA, and checked that running edits in batches produced identical images, which made the evaluation cheaper. Training ran 2,000 steps in 1 hour 38 minutes on one A100 (~USD 4), and a comparison of the saved checkpoints on 48 test pairs picked step 500.

4. A model that fits your device

The Pocket Rewriter from the top of this post is the first one. ML-intern started by generating 8,797 short image requests with a small instruct model through Inference Providers, following a mix set in my prompt: photos, posters, logos, infographics and more, about a third of them asking for exact text in quotes, and many in languages other than English. The 9B teacher then rewrote all of them on one A100 in 2 hours 37 minutes (~USD 6.50). After filtering for quality, 1,840 examples were selected for training dataset.

Check out: Pocket rewriter 0.8B Student · 2B Student · Dataset · Pocket Studio App · Compare the teacher-student in Rewriter Arena

Agate-Preview-002-4step is the second. Logolabs' Agate Preview 002 is a 260M-parameter text-to-image model, small enough for a browser, but it needs 50 steps with guidance, which is 100 network passes per image. I asked ML-intern to distill it down to just 4 passes!

It took two runs. The first cached 155,000 training images as latents, baked the guidance into the model, then cut the step count in stages from 16 to 8 to 4, all on A100s. The 4-step student beat the teacher run at the same 4 steps on GenEval and FID, after that ML-intern exported it to ONNX for the browser. This run took about 13 hours and USD 22.

Check out: Agate 4-step model · Dataset · Run Agate in your browser · Agate 4-step LIVE

What it cost

These are the GPU and CPU job charges reported for each session.

Make yours

ML-intern is in HuggingChat . Switch on ML-intern mode and paste a prompt. If you want a starting point, my example prompts are free to copy. Start from a model you wish existed and a dataset you have, or one you can describe. Give it a small budget, ask for a baseline and a smoke test, and read what comes back before you raise the cap.

If you make something with it, share it on X and tag @Gradio and @HuggingFace . We would love to see the models you make that nobody else would think to build for you.

Models mentioned in this article 10

ML-Intern-lab/Qwen-Image-2.1-PE-T2I-Pocket-0.8B

ML-Intern-lab/Qwen-Image-2.1-PE-T2I-Pocket-2B

ML-Intern-lab/Qwen-Image-2.1-doodle-in-LoRA

ML-Intern-lab/Qwen-Image-2.1-viewpoint-orbit-LoRA

ML-Intern-lab/citrus-disease-vlm

ML-Intern-lab/huggy-flux2-klein-lora

Qwen/Qwen-Image-2.1-PE-T2I

Qwen/Qwen3.5-2B

Viggle/Qwen-Image-2.1-viggle-turbo

black-forest-labs/FLUX.2-klein-base-4B

Datasets mentioned in this article 7

Chunte/huggy_for_training

ML-Intern-lab/Qwen-Image-2.1-rewriter-distill

ML-Intern-lab/agate-preview-002-4step-latents

ML-Intern-lab/citrus-disease-vlm-instruct

ML-Intern-lab/doodle-in-pairs

ML-Intern-lab/gso-orbit-rgba

suvadityamuk/google-scanned-objects

Spaces mentioned in this article 8

Qwen-Image 2.1 Doodle-In LoRA

Scribble an outline on a photo, name it, it appears

Qwen-Image 2.1 Pocket Studio

Small distilled prompt rewriter plus Qwen-Image 2.1

Qwen-Image 2.1 Rewriter Arena

9B vs 0.8B vs 2B prompt rewriters, rendered side by side

Qwen-Image 2.1 Viewpoint Orbit LoRA

Rotate the camera around a transparent object

Agate Preview 002 4-step Live

A new image on every keystroke, 4-step Agate on GPU

Agate Preview 002 4-step WebGPU

4-step Agate text-to-image in your browser, live as you type

Citrus Doctor

Diagnose citrus diseases, pests and deficiencies

Huggy Generator

Draw new Huggy mascots in the Hugging Face brand style

More Articles from our Blog

Rebuilding AUTOMATIC1111 with Gradio Workflow

Models mentioned in this article 10

ML-Intern-lab/Qwen-Image-2.1-PE-T2I-Pocket-0.8B

ML-Intern-lab/Qwen-Image-2.1-PE-T2I-Pocket-2B

ML-Intern-lab/Qwen-Image-2.1-doodle-in-LoRA

ML-Intern-lab/Qwen-Image-2.1-viewpoint-orbit-LoRA

ML-Intern-lab/citrus-disease-vlm

ML-Intern-lab/huggy-flux2-klein-lora

Qwen/Qwen-Image-2.1-PE-T2I

Qwen/Qwen3.5-2B

Viggle/Qwen-Image-2.1-viggle-turbo

black-forest-labs/FLUX.2-klein-base-4B

来源

Hugging Face