mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-10 09:50:25 +00:00
* feat(inference): deploy d24 SFT weights to Modal Repoint Modal inference app from the broken d20 checkpoint to our own ManmohanSharma/nanochat-d24 SFT step 484. Rewrites the standalone model as an inference-only port of nanochat/gpt.py so the modern architecture (smear gate, per-layer value embeddings, ve_gate, backout, sliding window attention via SDPA, rotary base 100000, padded vocab, logit softcap) loads cleanly from the checkpoint. Tokenizer loads the pickled tiktoken encoding directly so special tokens end up at their true IDs (32759-32767), and the stop check uses that set instead of hardcoded 0-8. GPU bumped to L4 for headroom. HF token sourced from the 'huggingface' Modal secret. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(frontend): polished redesign with serif display + dark mode Lifts the craft level of the landing and chat UI without changing the desi identity. Adds Fraunces for display headlines, a floating pill LandingNav, a saffron-glow hero with a large serif headline and black pill CTAs, and three gradient-tiled feature cards with inline SVG glyphs replacing the emoji cards. The chat empty state is now a serif greeting with pill-chip prompt starters, and ChatInput is a single rounded pod so the send button sits inside the input (fixes the misaligned floating button). Adds a class-based dark mode across the chat surfaces with a sun/moon toggle in the sidebar footer, powered by a small useTheme hook and a no-flash init script in the root layout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(frontend): add ESLint config so CI lint step passes next lint was failing with an interactive prompt because the repo had no ESLint config. Adds a minimal next/core-web-vitals extends and drops the now-unloadable @typescript-eslint/no-explicit-any disable directive in the stream proxy by narrowing the body type to unknown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
2.1 KiB
TypeScript
43 lines
2.1 KiB
TypeScript
'use client';
|
|
|
|
import { useAuth } from '@/hooks/useAuth';
|
|
import { BookOpen, Sparkles, Code2, Smile } from 'lucide-react';
|
|
|
|
const SUGGESTIONS = [
|
|
{ icon: BookOpen, label: 'Summarize a topic', prompt: 'Summarize the history of samosas in 3 paragraphs.' },
|
|
{ icon: Sparkles, label: 'Explain a concept', prompt: 'Explain transformers to a curious beginner.' },
|
|
{ icon: Code2, label: 'Write some code', prompt: 'Write a Python function that reverses a linked list.' },
|
|
{ icon: Smile, label: 'Tell me a joke', prompt: 'Tell me a joke about chai.' },
|
|
];
|
|
|
|
export default function EmptyState({ onPick }: { onPick: (prompt: string) => void }) {
|
|
const { user } = useAuth();
|
|
const firstName = (user?.name ?? 'friend').split(' ')[0];
|
|
|
|
return (
|
|
<div className="flex flex-col items-center justify-center flex-1 px-4 py-10 text-center">
|
|
<h2 className="font-display font-medium text-[clamp(2.25rem,5vw,3.75rem)] leading-tight tracking-tight text-gray-900 dark:text-ink-text">
|
|
Hello, <span className="italic text-saffron">{firstName}</span>.
|
|
</h2>
|
|
<p className="mt-3 max-w-xl text-base md:text-lg text-gray-600 dark:text-ink-text-soft">
|
|
What shall we cook today — a doubt, a recipe, a code snippet, or a fresh idea?
|
|
</p>
|
|
|
|
{/* Pill chips — pick a starter */}
|
|
<div className="mt-10 flex flex-wrap items-center justify-center gap-2.5 max-w-2xl">
|
|
{SUGGESTIONS.map(({ icon: Icon, label, prompt }) => (
|
|
<button
|
|
key={label}
|
|
type="button"
|
|
onClick={() => onPick(prompt)}
|
|
className="inline-flex items-center gap-2 px-4 py-2.5 rounded-full bg-white dark:bg-ink-soft border border-cream-border dark:border-ink-border text-sm font-medium text-gray-700 dark:text-ink-text hover:border-saffron/60 dark:hover:border-saffron/50 hover:text-gray-900 dark:hover:text-white hover:bg-cream/50 dark:hover:bg-ink-elev transition-colors shadow-sm"
|
|
>
|
|
<Icon size={15} className="text-saffron" />
|
|
{label}
|
|
</button>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|