MCPcopy
hub / github.com/bbycroft/llm-viz / c_blockRef

Function c_blockRef

src/llm/walkthrough/WalkthroughTools.ts:28–32  ·  view source on GitHub ↗
(str: string, blk: IBlkDef | IBlkDef[], style?: DimStyle)

Source from the content-addressed store, hash-verified

26 }
27
28 function c_blockRef(str: string, blk: IBlkDef | IBlkDef[], style?: DimStyle) {
29 let firstBlk = Array.isArray(blk) ? blk[0] : blk;
30 style ??= firstBlk.t === 'i' ? DimStyle.Intermediates : firstBlk.t === "w" ? DimStyle.Weights : DimStyle.Aggregates;
31 return { str, duration: 0, start: 0, t: 0.0, color: dimStyleColor(style), blk };
32 }
33
34 function c_dimRef(str: string, style: DimStyle) {
35 return { str, duration: 0, start: 0, t: 0.0, color: dimStyleColor(style), dim: style };

Callers 5

walkthrough02_EmbeddingFunction · 0.85
walkthrough07_MlpFunction · 0.85
walkthrough06_ProjectionFunction · 0.85
walkthrough03_LayerNormFunction · 0.85

Calls 1

dimStyleColorFunction · 0.85

Tested by

no test coverage detected