원클릭으로
berkovich-inference-walkthrough-guide
Standards and layouts for building and styling model next-character inference live walkthrough cards.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Standards and layouts for building and styling model next-character inference live walkthrough cards.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Guidelines and visual standards for creating and modifying Berkovich space interactive visualizations.
Guidelines and coding principles for the AnimatedTransformer repository, including TensorFlow.js usage, typed named tensors (GTensor), Angular standalone component patterns, code styling, testing paradigms, and project configurations.
Guidelines and reference for Berkovich spaces and p-adic logic in the project, ensuring agents read the underlying mathematical LaTeX definitions prior to editing or analyzing the implementation.
Guidelines, grammar, syntax, and configuration rules for writing linear logic stories and simulator configurations, including action scores, probability modes, and plotting mappings.
| name | berkovich-inference-walkthrough-guide |
| description | Standards and layouts for building and styling model next-character inference live walkthrough cards. |
This skill documents the rules, layout system, and coding standards for creating next-character inference explanation cards (walkthrough components) in the Berkovich project.
Place new model-specific walkthrough cards under:
src/app/berkovich-hub/berkovich-space-explorers/walkthrough-components/
Use the following naming convention:
<model-name>-walkthrough.component.ts (e.g. berkovich-bigram-walkthrough.component.ts)To ensure look-and-feel consistency, walkthrough components MUST use the shared subcomponents located in walkthrough-components/shared/:
app-walkthrough-context)Handles input and text display for the context.
<app-walkthrough-context
[inputId]="'walkthrough-input-field-<model-name>'"
[contextLength]="contextLength"
[preText]="walkthrough.preText"
[contextText]="walkthrough.contextText"
[walkthroughInput]="walkthroughInput()"
[walkthroughInputError]="walkthroughInputError()"
(inputChanged)="walkthroughInputChange.emit($event)">
</app-walkthrough-context>
app-softmax-walkthrough-table)Renders scores, exponentials, bar ratios, and math symbols for logits.
<app-softmax-walkthrough-table
[stepTitle]="'Show Step X output probabilities'"
[predictions]="walkthrough.predictions"
[denominatorSum]="walkthrough.sumExp"
[beta]="beta()"
[guideData]="'- **Score (S)**: Description...\\n- **$e^{\\beta \\cdot S}$ (Numerator)**: Description...'">
</app-softmax-walkthrough-table>
When rendering characters from the vocabulary, always wrap them in quotes and escape whitespaces/newlines. Inside your component, define:
formatDisplayString(str: string): string {
return str.replace(/ /g, '␣').replace(/\n/g, '\\n');
}
wrapInQuotes(str: string): string {
return `'${str}'`;
}
In template: {{ wrapInQuotes(formatDisplayString(p.char)) }}
Since Angular templates do not have access to JavaScript global Infinity, always define a helper method in your walkthrough component class:
isNegInfinity(val: number): boolean {
return val === -Infinity;
}
In template: {{ isNegInfinity(det.dist) ? '∞' : (-det.dist) }}
<markdown [katex]="true" [data]="'...'"></markdown> for all mathematical formulas.\\\\in or \\\\mathbb inside multi-line strings).Walkthrough cards should match this input/output structure:
export class NewModelWalkthroughComponent {
details = input.required<WalkthroughDetails | null>();
walkthroughInput = input.required<string>();
walkthroughInputError = input.required<string | null>();
beta = input.required<number>();
vocab = input.required<string[]>();
walkthroughInputChange = output<string>();
}
Walkthrough explainer components should never wrap their template inside a <section class="card ..."> block or define their own <h3> card title headers.
berkovich-space-explorers.component.html) provides the card wrapper structure and handles the shared heading:
<section class="card explainer-card">
<h3><mat-icon>info</mat-icon> How Model Inference Works?</h3>
<!-- Walkthrough component is rendered inside here -->
</section>
<h4>), description paragraphs (<p>), worked example editor inputs, and step-by-step math cards.