Michael R
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ### Announcing VidCap-12B: A Video Captioning Model Built for Web Scale *[Inference.net](http://inference.net/) × Wynd Labs* We're releasing VidCap-12B, a 12-billion parameter model that transforms video frames into structured, schema-compliant JSON designed specifically for temporal video understanding. Unlike generic captioning models that produce varying descriptions frame-to-frame, VidCap-12B outputs consistent, structured fields that make video content programmatically accessible. Each frame generates JSON with standardized keys for objects, actions, environment, content type, and production quality. This structure enables you to track how scenes evolve, when objects appear or disappear, and how actions unfold across time, turning raw video into queryable, analyzable data. The model was built in partnership with Wynd Labs to process over a billion videos while maintaining perfect schema adherence. Through careful distillation from larger vision-language models, VidCap-12B achieves near-identical output quality to models 10x its size while running at a fraction of the cost and latency. It's optimized for production workloads where you need consistent, valid JSON across millions to billions of frames without extensive post-processing. --- ### The Story: A Billion Videos and a Prohibitive Cost This project began with a specific, massive-scale challenge from our partners at Wynd Labs: building a usable index of more than a billion videos captions with perfect adherence to a pre-defined JSON schema. Their initial approach using the open-source Gemma-27B was promising but the quality was not quite there, and while internal tests showed that much larger vision-language models produced superior, less hallucinatory JSON, their inference cost was prohibitive. The goal became clear: we needed to capture the quality of a top-tier model in a package that was efficient enough to run at internet scale. This is a classic distillation problem. ### Training Process: From an Expert Teacher to a Distilled Student Our process was methodical. We first selected a high-qualit vision-language model to act as the *teacher* and used it to generate structured JSON annotations for 1 million video frames from Wynd Labs’ dataset. We worked closely with their team, iterating on the prompt to ensure the structured output contained the exact, literal details needed for downstream tasks like retrieval. With this high-quality dataset in hand, we began distilling that knowledge into a more compact "student." After evaluating several models, we selected Google's Gemma as the most promising student model. To find the optimal balance of performance and efficiency, we trained Gemma 12B on subsets of our data, benchmarking it at 100K and 1M samples to measure how it learned. At 1M samples, the Gemma 12B proved to nearly match the performance of Gemini 2.5 Pro*. --- ## Benchmark Results: Why 12B is the Right Choice for Production Our benchmarks told a clear story, leading us to a definitive choice for this production workload. ### Price and Latency That quality parity translates directly into significant savings. While these numbers are illustrative, they reflect the core trade-off we unlocked: distilling to a 12B model delivers the performance of a much larger model at a fraction of the cost and latency. For 1B requests, the price reduction becomes even more substantial: from $11M to $230K! ![output (13)](https://hackmd.io/_uploads/S1diVce_el.png) ![output (12)](https://hackmd.io/_uploads/Sy3sN5gOle.png) ### ROUGE/BLEU Metrics (Accuracy of Specific Details) Next, we measured how well the model names the specific objects and actions in a scene. ROUGE scores the overlap of exact words and phrases, while BLEU measures precision, penalizing irrelevant words. We wanted to make sure that the captions generated aligned with the captions of the teacher model. Our results showed that the more data we trained on the better the alignment between the teacher and the student outputs. To further confirm that that the distilled model was an improvement over Gemma 12B base we used LLM-as-a-judge, which showed a significant improvement in output quality and a reduction in hallucinations. ![download (19)](https://hackmd.io/_uploads/r1hW79e_xx.png) ### FP8 Quantization: Efficiency Without Compromise With a high-quality model in hand, our final step was to optimize it for production serving. We applied FP8 quantization, a technique that reduces the model’s memory footprint. We were pleased to find that, for this fine-tuned model, using FP8 had no measurable impact on the caption quality. This offers a "free" win for deployment—the same caption quality, but with significantly higher throughput and lower costs on modern hardware. ![download (20)](https://hackmd.io/_uploads/S187X9lOee.png) --- ### Production Applications: Why Structured Output Changes Everything Most video captioning fails because it treats each frame as an isolated image. VidCap-12B's structured JSON solves the fundamental problem: maintaining semantic consistency across time. Consider searching for "chef cutting vegetables in professional kitchen" across a million hours of footage. Free-form captions might describe the same scene as "cooking show," "food preparation," or "kitchen scene" across consecutive frames. VidCap-12B's consistent schema means "chef" appears in the objects field every frame they're visible, "cutting vegetables" appears in actions with specific participants, and "professional kitchen" appears in environment. This isn't just better search; it's computationally tractable search at petabyte scale. The structure enables entirely new workflows. Broadcasters detect true scene boundaries by monitoring when multiple fields change simultaneously: environment shifts from "news studio" to "outdoor location," objects change completely, and actions reset. This produces chapter markers that match how humans actually perceive scenes. Ad verification becomes deterministic: sponsored products must appear in objects, in "professional" production quality segments, for minimum durations. No more manual verification or disputed make-goods. But the real breakthrough is temporal aggregation. Traditional captioning forces you to choose between frame-level noise and video-level averaging. Structured JSON lets you track state changes: when objects enter or leave, how actions progress, which environments persist. A car accident becomes a queryable sequence: "vehicle approaching intersection" followed by "collision with truck" followed by "airbag deployment," each with timestamped evidence. Complex queries like "find professional footage where someone picks up a product, examines it, then puts it back" become simple field comparisons across time windows. Search-first RAG systems can use hard JSON predicates for metadata filtering, slashing tokens, latency, and costs by 90%. This transforms video from opaque binary data into a structured, temporal database you can analyze, aggregate, and automate at internet scale. ## Minimal API Example The model always takes a single frame as input and provides reliable JSON metadata directly. No external JSON schema is required. ```python import os from openai import OpenAI import base64 import requests client = OpenAI( base_url="https://api.inference.net/v1", api_key='inference-e6c91778c252452ea5f5386e7b4d14eb' ) SYSTEM_PROMPT = "You are an image annotation API trained to analyze YouTube video keyframes. You will be given instructions on the output format, what to caption, and how to perform your job. Follow those instructions. For descriptions and summaries, provide them directly and do not lead them with 'This image shows' or 'This keyframe displays...', just get right into the details." USER_PROMPT = """ You are an image annotation API trained to analyze YouTube video keyframes. You must respond with a valid JSON object matching the exact structure below. Your job is to extract detailed **factual elements directly visible** in the image. Do not speculate or interpret artistic intent, camera focus, or composition. Do not include phrases like "this appears to be", "this looks like", or anything about the image itself. Describe what **is physically present in the frame**, and nothing more. Return JSON in this structure: { "description": "A detailed, factual account of what is visibly happening (4 sentences max). Only mention concrete elements or actions that are clearly shown. Do not include anything about how the image is styled, shot, or composed. Do not lead the description with something like 'This image shows' or 'this keyframe is...', just get right into the details.", "objects": ["object1 with relevant visual details", "object2 with relevant visual details", ...], "actions": ["action1 with participants and context", "action2 with participants and context", ...], "environment": "Detailed factual description of the setting and atmosphere based on visible cues (e.g., interior of a classroom with fluorescent lighting, or outdoor forest path with snow-covered trees).", "content_type": "The type of content it is, e.g. 'real-world footage', 'video game', 'animation', 'cartoon', 'CGI', 'VTuber', etc.", "specific_style": "Specific genre, aesthetic, or platform style (e.e., anime, 3D animation, mobile gameplay, vlog, tutorial, news broadcast, etc.)", "production_quality": "Visible production level: e.g., 'professional studio', 'amateur handheld', 'webcam recording', 'TV broadcast', etc.", "summary": "One clear, comprehensive sentence summarizing the visual content of the frame. Like the description, get right to the point.", "logos": ["logo1 with visual description", "logo2 with visual description", ...] } Rules: - Be specific and literal. Focus on what is explicitly visible. - Do NOT include interpretations of emotion, mood, or narrative unless it's visually explicit. - No artistic or cinematic analysis. - Always include the language of any text in the image if present as an object, e.g. "English text", "Japanese text", "Russian text", etc. - Maximum 10 objects and 5 actions. - Return an empty array for 'logos' if none are present. - Always output strictly valid JSON with proper escaping. - Output **only the JSON**, no extra text or explanation. """ # Function to fetch image and encode into base64 def encode_image_url(image_url): response = requests.get(image_url) image_bytes = response.content base64_image = base64.b64encode(image_bytes).decode('utf-8') return base64_image url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" base64_image = encode_image_url(url) messages = [ {"role": "system", "content": SYSTEM_PROMPT}, { "role": "user", "content": [ {"type": "text", "text": USER_PROMPT}, { "type": "image_url", "image_url": { "url": f"data:image/jpeg;base64,{base64_image}", "detail": "high" }, }, ], }, ] response = client.chat.completions.create( model="wynd/wynd-vidcap-12b", messages=messages, temperature=0.1, max_tokens=2000, response_format={"type": "json_object"}, ) print(response.choices[0].message.content) ``` ```jsx # Output: { "actions": [], "content_type": "real-world footage", "description": "A wooden boardwalk path extends from the foreground into the distance, cutting through a field of tall, vibrant green grass. The path is flanked on both sides by the dense grass. In the background, a line of trees is visible on the horizon under a blue sky with scattered white clouds.", "environment": "An outdoor, natural landscape, likely a marsh or wetland, on a clear day. The scene is characterized by a wooden boardwalk, lush green vegetation, and a bright blue sky with wispy clouds.", "logos": [], "objects": [ "Wooden boardwalk", "Tall green grass", "Blue sky", "White clouds", "Trees" ], "production_quality": "professional photography", "specific_style": "landscape photography", "summary": "A wooden boardwalk path winds through a lush green field under a bright blue sky with scattered clouds." } ``` **Prompting Note:** Use the provided prompt as-is for best results. While the model may respond to other prompts, this version is extensively tested and optimized for the highest quality structured output. --- ## Availability & Integration VidCap-12B is now available via the [**Inference.net](http://inference.net/) platform**. We offer flexible API integrations, asynchronous batch processing with webhook callbacks, and simple on-premise deployment options. If you plan on using this model, contact us and we’ll make sure you have all the support you need to bring it to prod! --- ## Your Own Custom Model (Distillation) The creation of VidCap-12B follows our proven **Custom LLM Distillation** pipeline. We select a powerful "teacher," generate high-quality datasets optimized to your KPIs, and distill a student model customized to your specific use case. Customers consistently experience: - Over **50% lower latency** - Up to **95% lower inference costs** - Optimized inference on dedicated instances - Complete model ownership and transparent benchmarking [**Schedule a 15-minute call**](https://inference.net/sales) to discuss your use case. VidCap-12B makes structured video captioning a reality at internet scale. We can't wait to see what you build. *We also trained Gemma 27B at 100k and 1M samples, but saw virtually no difference in quality between Gemma 27B at 1M samples and Gemma 12B at 1M samples.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully