Moondream logo

Rock Paper Scissors

Classify hand gestures as rock, paper, or scissors. With only 5 training examples per class and 50 RL steps, accuracy jumps from 54.8% to 98.8%. This shows that simple tasks can be perfected with just a few examples to learn from.

Accuracy

BaseGPT-5.4Fine-tuned
MethodRL
Steps50
Training time23 min
Cost$7.84

See it in action

Compare the base model against the fine-tuned model across representative benchmark examples.

Prompt

Is this rock, paper, or scissors? Respond with rock, paper, or scissors only.

Scissors

Hand showing scissors gesture

Base model

Incorrect

paper

Fine-tuned model

Correct

scissors

Paper

Hand showing paper gesture

Base model

Incorrect

rock

Fine-tuned model

Correct

paper

Rock

Hand showing rock gesture

Base model

Incorrect

paper

Fine-tuned model

Correct

rock

Perfection in 3 steps

1

Bring examples.

Collect images for the task you want Moondream to learn.

2

Fine-tune.

Teach Moondream with SFT or RL. Pass your data to the API and we handle the rest.

3

Deploy.

Use your model through the API or run it locally with Photon.

What is fine-tuning?

Moondream starts as a general model trained on broad, public information. Fine-tuning makes it great at one specific task by teaching it the products, documents, categories, or internal information that matter to your business.

Who is this for?

This is for teams putting vision AI into production. If you already know the task and need the model to master that job, fine-tuning is how you get there. It is built for teams that need frontier performance at real-time speed.

See the code

Fine-tuning is just a small API loop: format your data, call `train_step`, and the model updates as you go.

import moondream as md

# Create fine-tune
ft = md.ft(
    api_key="your-api-key",
    name="Rock Paper Scissors",
    rank=8,
)

# Hidden boilerplate and data code

requests = (
    (
        example,
        {
            "skill": "query",
            "image": example["image"],
            "question": "Is this rock, paper, or scissors? Respond with rock, paper, or scissors only.",
            "num_rollouts": 4,
        },
    )
    for example in training_data
)

for context, response in ft.rollout_stream(requests):
    rewards = compute_rewards(context, response)
    ft.train_step([{
        "mode": "rl",
        "request": response["request"],
        "rollouts": response["rollouts"],
        "rewards": rewards,
    }])

Frequently asked questions

Ready to take Moondream to production?

Get started

Start with the docs and run your first experiment in a few API calls.

Start fine-tuning

Need help? We'll build it for you.

We can help define the task, prepare the data, run training, validate results, and hand off a model your team can use.