mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-12 02:40:17 +00:00
rebrand to samosaChaat: UI, logo, and server messages
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5019accc5b
commit
c767741b42
|
|
@ -1,8 +1,23 @@
|
|||
<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<radialGradient id="g" cx="50%" cy="50%">
|
||||
<stop offset="0%" style="stop-color:#667eea;stop-opacity:1"></stop>
|
||||
<stop offset="100%" style="stop-color:#764ba2;stop-opacity:0.3"></stop>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<path d="M315.9110991546882,231.0582854123025 L228.97777478867204,207.7645713530756 M284.8528137423857,284.8528137423857 L221.21320343559643,221.21320343559643 M231.0582854123025,315.9110991546882 L207.7645713530756,228.97777478867204 M168.94171458769753,315.9110991546882 L192.2354286469244,228.97777478867204 M115.14718625761431,284.8528137423857 L178.78679656440357,221.21320343559643 M84.08890084531181,231.05828541230252 L171.02222521132796,207.76457135307564 M84.0889008453118,168.9417145876975 L171.02222521132796,192.2354286469244 M115.14718625761425,115.14718625761435 L178.78679656440357,178.78679656440357 M168.94171458769753,84.0889008453118 L192.2354286469244,171.02222521132796 M231.05828541230244,84.08890084531178 L207.7645713530756,171.02222521132794 M284.8528137423857,115.14718625761428 L221.21320343559643,178.78679656440357 M315.91109915468815,168.94171458769742 L228.97777478867204,192.23542864692436 " stroke="url(#g)" stroke-width="6" stroke-linecap="round" fill="none"></path><path d="M200,-12 L212,0 L200,12 L188,0 Z" transform="translate(0,200)" fill="#000"></path></svg>
|
||||
<svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient id="samosa-fill" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#e8a838;stop-opacity:1"/>
|
||||
<stop offset="100%" style="stop-color:#c47f17;stop-opacity:1"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="samosa-shadow" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#b5690e;stop-opacity:1"/>
|
||||
<stop offset="100%" style="stop-color:#8b4d0a;stop-opacity:1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<!-- Samosa triangle shape -->
|
||||
<path d="M200 60 L340 320 L60 320 Z" fill="url(#samosa-fill)" stroke="#a0620f" stroke-width="6" stroke-linejoin="round"/>
|
||||
<!-- Crispy texture lines -->
|
||||
<path d="M200 100 L160 220" stroke="#c47f17" stroke-width="3" fill="none" opacity="0.5"/>
|
||||
<path d="M200 100 L240 220" stroke="#c47f17" stroke-width="3" fill="none" opacity="0.5"/>
|
||||
<path d="M140 260 L260 260" stroke="#c47f17" stroke-width="3" fill="none" opacity="0.4"/>
|
||||
<path d="M120 290 L280 290" stroke="#c47f17" stroke-width="2" fill="none" opacity="0.3"/>
|
||||
<!-- Chat bubble dots at center -->
|
||||
<circle cx="170" cy="230" r="10" fill="#fff" opacity="0.85"/>
|
||||
<circle cx="200" cy="230" r="10" fill="#fff" opacity="0.85"/>
|
||||
<circle cx="230" cy="230" r="10" fill="#fff" opacity="0.85"/>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
||||
<title>NanoChat</title>
|
||||
<title>samosaChaat</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.svg">
|
||||
<style>
|
||||
:root {
|
||||
|
|
@ -247,7 +247,7 @@
|
|||
<path d="M5 12h14"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<h1>nanochat</h1>
|
||||
<h1>samosaChaat</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ assistant_start, assistant_end = tokenizer.encode_special("<|assistant_start|>")
|
|||
# Create Engine for efficient generation
|
||||
engine = Engine(model, tokenizer)
|
||||
|
||||
print("\nNanoChat Interactive Mode")
|
||||
print("\nsamosaChaat Interactive Mode")
|
||||
print("-" * 50)
|
||||
print("Type 'quit' or 'exit' to end the conversation")
|
||||
print("Type 'clear' to start a new conversation")
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ MAX_TOP_K = 200
|
|||
MIN_MAX_TOKENS = 1
|
||||
MAX_MAX_TOKENS = 4096
|
||||
|
||||
parser = argparse.ArgumentParser(description='NanoChat Web Server')
|
||||
parser = argparse.ArgumentParser(description='samosaChaat Web Server')
|
||||
parser.add_argument('-n', '--num-gpus', type=int, default=1, help='Number of GPUs to use (default: 1)')
|
||||
parser.add_argument('-i', '--source', type=str, default="sft", help="Source of the model: sft|rl")
|
||||
parser.add_argument('-t', '--temperature', type=float, default=0.8, help='Default temperature for generation')
|
||||
|
|
@ -216,7 +216,7 @@ def validate_chat_request(request: ChatRequest):
|
|||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
"""Load models on all GPUs on startup."""
|
||||
print("Loading nanochat models across GPUs...")
|
||||
print("Loading samosaChaat models across GPUs...")
|
||||
app.state.worker_pool = WorkerPool(num_gpus=args.num_gpus)
|
||||
await app.state.worker_pool.initialize(args.source, model_tag=args.model_tag, step=args.step)
|
||||
print(f"Server ready at http://localhost:{args.port}")
|
||||
|
|
@ -248,7 +248,7 @@ async def root():
|
|||
|
||||
@app.get("/logo.svg")
|
||||
async def logo():
|
||||
"""Serve the NanoChat logo for favicon and header."""
|
||||
"""Serve the samosaChaat logo for favicon and header."""
|
||||
logo_path = os.path.join("nanochat", "logo.svg")
|
||||
return FileResponse(logo_path, media_type="image/svg+xml")
|
||||
|
||||
|
|
@ -402,6 +402,6 @@ async def stats():
|
|||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
print(f"Starting NanoChat Web Server")
|
||||
print(f"Starting samosaChaat Web Server")
|
||||
print(f"Temperature: {args.temperature}, Top-k: {args.top_k}, Max tokens: {args.max_tokens}")
|
||||
uvicorn.run(app, host=args.host, port=args.port)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user