开源复现

diffusiongemma-jev-macos

@Saik0s2PythonMIT更新于 2026-09-19可当场跑

在 Apple Silicon 上使用 DiffusionGemma 实现本地 JEV 风格决策,包含基准测试和编码 agent 示例。

英文原文

Local JEV-style decisions with DiffusionGemma on Apple Silicon, with benchmarks and coding-agent examples.

Saik0s/diffusiongemma-jev-macos

它在哪儿调用了 Jev

@app.post("/v1/systemone")

src/diffusion_jev/api.py:168

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 src/diffusion_jev/benchmark_cases.py:56

  1. enabled是/否

    Is enabled true in the supplied state?

  2. color选项

    Select the exact color in the supplied state.

    • redColor is red.
    • greenColor is green.
    • blueColor is blue.
  3. progress打分

    Rate completed_steps using the exact numeric rubric.

    • 0Zero steps completed.
    • 1One step completed.
    • 2Two steps completed.

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    enabled: { type: 'boolean', instructions: 'Is enabled true in the supplied state?' },
    color: { type: 'choice', instructions: 'Select the exact color in the supplied state.',
      criteria: { red: 'Color is red.', green: 'Color is green.', blue: 'Color is blue.' } },
    progress: { type: 'score', instructions: 'Rate completed_steps using the exact numeric rubric.',
      criteria: ['Zero steps completed.', 'One step completed.', 'Two steps completed.'] },
  },
});

取自 src/diffusion_jev/examples.py:64

  1. cause选项

    Choose the direct cause supported by the failure.

    • dependencyA declared Python dependency is missing.
    • assertionAn assertion compares two different values.
    • networkA remote HTTP request timed out.
  2. missing_dependency是/否

    Does the failure indicate an unavailable Python dependency?

  3. network_timeout是/否

    Does the failure indicate a remote network request timed out?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    cause: { type: 'choice', instructions: 'Choose the direct cause supported by the failure.',
      criteria: { dependency: 'A declared Python dependency is missing.', assertion: 'An assertion compares two different values.', network: 'A remote HTTP request timed out.' } },
    missing_dependency: { type: 'boolean', instructions: 'Does the failure indicate an unavailable Python dependency?' },
    network_timeout: { type: 'boolean', instructions: 'Does the failure indicate a remote network request timed out?' },
  },
});

取自 src/diffusion_jev/examples.py:102

  1. file选项

    Select the file most directly responsible for the bug.

    • validatorssrc/email_validation.py
    • stylesassets/colors.css
    • readmeREADME.md

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    file: { type: 'choice', instructions: 'Select the file most directly responsible for the bug.',
      criteria: { validators: 'src/email_validation.py', styles: 'assets/colors.css', readme: 'README.md' } },
  },
});

取自 src/diffusion_jev/examples.py:129

  1. security_regression是/否

    Does this patch remove the authentication check?

  2. review_priority打分

    Rate the patch's review priority using its observed effect.

    • 0Cosmetic change without behavioral impact.
    • 1Nonblocking issue without exposing protected resources.
    • 2Critical security issue exposing protected resources.

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    security_regression: { type: 'boolean', instructions: 'Does this patch remove the authentication check?' },
    review_priority: { type: 'score', instructions: 'Rate the patch\'s review priority using its observed effect.',
      criteria: ['Cosmetic change without behavioral impact.', 'Nonblocking issue without exposing protected resources.', 'Critical security issue exposing protected resources.'] },
  },
});

同类的其他项目