mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
/enso, /kai and /zen close on rows you can hit: the model cards, the boards, and the papers and HIPs that exist. /benchmarks lists every board in the model file and every paper in the library. /research links the HIP index, the family specifications, and the standards they are written to. Co-authored-by: Hanzo Dev <[email protected]>
156 lines
5.3 KiB
TypeScript
156 lines
5.3 KiB
TypeScript
/**
|
|
* One diagram per generation, and the packing of Zen 6 Flash.
|
|
* Geometry only. The words live in the markup beside these.
|
|
*/
|
|
import { View, XStack, YStack, Text } from '@/components/ui'
|
|
import type { FigureKind } from './line'
|
|
|
|
const INK = 'var(--foreground)'
|
|
const QUIET = 'var(--muted-foreground)'
|
|
const LINE = 'var(--border)'
|
|
|
|
export function Figure({ kind, hot }: { kind: FigureKind; hot: boolean }) {
|
|
const ink = hot ? INK : QUIET
|
|
return (
|
|
<View width="100%" maxW={440} aria-hidden>
|
|
<svg width="100%" height="148" viewBox="0 0 440 148" fill="none">
|
|
{kind === 'dense' ? <Dense ink={ink} /> : null}
|
|
{kind === 'wide' ? <Wide ink={ink} /> : null}
|
|
{kind === 'branch' ? <Branch ink={ink} /> : null}
|
|
{kind === 'sparse' ? <Sparse ink={ink} /> : null}
|
|
{kind === 'paths' ? <Paths ink={ink} /> : null}
|
|
{kind === 'bridge' ? <Bridge ink={ink} /> : null}
|
|
{kind === 'practical' ? <Practical ink={ink} /> : null}
|
|
{kind === 'research' ? <Research ink={ink} /> : null}
|
|
</svg>
|
|
</View>
|
|
)
|
|
}
|
|
|
|
function Dense({ ink }: { ink: string }) {
|
|
return <rect x="160" y="38" width="120" height="72" stroke={ink} strokeWidth="1.5" />
|
|
}
|
|
|
|
function Wide({ ink }: { ink: string }) {
|
|
return <rect x="36" y="50" width="368" height="48" stroke={ink} strokeWidth="1.5" />
|
|
}
|
|
|
|
function Branch({ ink }: { ink: string }) {
|
|
const labels = [28, 96, 164, 232, 300, 368]
|
|
return (
|
|
<>
|
|
<line x1="220" y1="16" x2="220" y2="132" stroke={ink} strokeWidth="1.25" />
|
|
{labels.map((x) => (
|
|
<g key={x}>
|
|
<line x1="220" y1="78" x2={x} y2="36" stroke={ink} strokeWidth="1" />
|
|
<rect x={x - 10} y="24" width="20" height="14" stroke={ink} strokeWidth="1" />
|
|
</g>
|
|
))}
|
|
</>
|
|
)
|
|
}
|
|
|
|
function Sparse({ ink }: { ink: string }) {
|
|
const bars = [18, 42, 28, 70, 22, 56, 34, 64, 20, 48, 30, 58]
|
|
return (
|
|
<>
|
|
{bars.map((h, i) => (
|
|
<rect key={i} x={28 + i * 32} y={120 - h} width="8" height={h} stroke={ink} strokeWidth="1" />
|
|
))}
|
|
<line x1="24" y1="124" x2="416" y2="124" stroke={LINE} strokeWidth="1" />
|
|
</>
|
|
)
|
|
}
|
|
|
|
function Paths({ ink }: { ink: string }) {
|
|
return (
|
|
<>
|
|
<rect x="48" y="52" width="88" height="44" stroke={ink} strokeWidth="1.5" />
|
|
<path d="M136 64 H240 L268 40 H360" stroke={ink} strokeWidth="1.25" />
|
|
<path d="M136 74 H300" stroke={ink} strokeWidth="1.25" />
|
|
<path d="M136 84 H240 L268 108 H360" stroke={ink} strokeWidth="1.25" />
|
|
<rect x="360" y="32" width="16" height="16" stroke={ink} strokeWidth="1" />
|
|
<rect x="300" y="66" width="16" height="16" stroke={ink} strokeWidth="1" />
|
|
<rect x="360" y="100" width="16" height="16" stroke={ink} strokeWidth="1" />
|
|
</>
|
|
)
|
|
}
|
|
|
|
function Bridge({ ink }: { ink: string }) {
|
|
return (
|
|
<>
|
|
<line x1="48" y1="74" x2="180" y2="74" stroke={ink} strokeWidth="1.25" />
|
|
<line x1="260" y1="74" x2="392" y2="74" stroke={ink} strokeWidth="1.25" />
|
|
<rect x="196" y="62" width="24" height="24" stroke={ink} strokeWidth="1" transform="rotate(45 208 74)" />
|
|
</>
|
|
)
|
|
}
|
|
|
|
function Practical({ ink }: { ink: string }) {
|
|
return (
|
|
<>
|
|
<rect x="150" y="36" width="140" height="76" stroke={ink} strokeWidth="1.75" />
|
|
<line x1="150" y1="74" x2="290" y2="74" stroke={ink} strokeWidth="1" />
|
|
</>
|
|
)
|
|
}
|
|
|
|
function Research({ ink }: { ink: string }) {
|
|
const dots = [70, 150, 230, 310]
|
|
return (
|
|
<>
|
|
<line x1="70" y1="74" x2="230" y2="74" stroke={ink} strokeWidth="1.25" />
|
|
<line x1="230" y1="74" x2="310" y2="74" stroke={ink} strokeWidth="1.25" strokeDasharray="3 4" />
|
|
{dots.map((x, i) => (
|
|
<circle
|
|
key={x}
|
|
cx={x}
|
|
cy="74"
|
|
r={i === 0 ? 7 : 6}
|
|
stroke={ink}
|
|
strokeWidth="1.25"
|
|
fill={i < 2 ? 'none' : 'none'}
|
|
strokeDasharray={i > 1 ? '2 3' : undefined}
|
|
/>
|
|
))}
|
|
</>
|
|
)
|
|
}
|
|
|
|
/** FP16 representation, then ternary, then the packed file. The end state is the paint. */
|
|
export function Pack() {
|
|
const stages = [
|
|
{ label: 'FP16 representation', sub: '53.79 GB', bars: 12, solid: false },
|
|
{ label: 'Ternary', sub: '1.77 bits / weight', bars: 4, solid: false },
|
|
{ label: '5.95 GB', sub: 'Dense packed', bars: 1, solid: true },
|
|
]
|
|
return (
|
|
<XStack width="100%" items="flex-end" gap="$4" $sm={{ gap: '$6' }}>
|
|
{stages.map((stage) => (
|
|
<YStack key={stage.label} flex={1} minW={0} gap="$3" data-pack="" $platform-web={{ transformOrigin: 'left center' }}>
|
|
<XStack height={96} items="flex-end" gap={4}>
|
|
{Array.from({ length: stage.bars }, (_, i) => (
|
|
<View
|
|
key={i}
|
|
flex={1}
|
|
height={stage.solid ? 96 : 28 + ((i * 17) % 68)}
|
|
borderWidth={1}
|
|
borderColor={stage.solid ? 'var(--foreground)' : LINE}
|
|
bg={stage.solid ? 'var(--foreground)' : 'transparent'}
|
|
/>
|
|
))}
|
|
</XStack>
|
|
<YStack gap="$1">
|
|
<Text fontSize="$2" lineHeight="$2" fontWeight="600" color="$ink">
|
|
{stage.label}
|
|
</Text>
|
|
<Text fontFamily="$mono" fontSize="$1" lineHeight="$1" color="var(--muted-foreground)">
|
|
{stage.sub}
|
|
</Text>
|
|
</YStack>
|
|
</YStack>
|
|
))}
|
|
</XStack>
|
|
)
|
|
}
|