{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "n36Uicw5axSb" }, "source": [ "# SmartCore V1 — Faz 2 Colab Smoke (GPU)\n", "\n", "180M Mamba-3 (SISO) + GQA 5:1 hibrit modelin **smoke testi**: HF'deki pre-tokenize veriden\n", "(`kdirgul/smartcore-v1-data`) streaming + model + WSD eğitim döngüsü, GPU'da.\n", "\n", "**Önkoşul:** Colab **Pro+ / A100** (Runtime > Change runtime type > A100). HF token (private repo erişimi).\n", "\n", "**Smoke amacı:** veri akışı + model + loop + GPU uçtan uca çalışıyor mu (loss ~10.8'den düşüyor, NaN/OOM yok).\n", "**NOT:** Bu smoke saf-PyTorch minimal modeli kullanır (her yerde çalışır, yavaş). **Tam-hız Faz 3** için\n", "`mamba-og` fork (Triton SISO kernel) entegre edilecek — ayrı adım." ] }, { "cell_type": "code", "metadata": { "id": "4iMibUmpaxSd", "outputId": "e2bf59b8-9ca5-4ea5-d380-07f171ae5288", "colab": { "base_uri": "https://localhost:8080/" } }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "GPU 0: NVIDIA A100-SXM4-40GB (UUID: GPU-14abd7b2-d5a9-2d64-6756-bdd5ffc37da3)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m555.1/555.1 kB\u001b[0m \u001b[31m43.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m684.4/684.4 kB\u001b[0m \u001b[31m54.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.9/48.9 MB\u001b[0m \u001b[31m57.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h" ] } ], "source": [ "!nvidia-smi -L\n", "!pip -q install -U einops sentencepiece \"datasets>=2.18\" \"huggingface_hub>=0.23\" pyarrow" ] }, { "cell_type": "markdown", "metadata": { "id": "9xL15dAmaxSe" }, "source": [ "## 1) HF login (private repo erişimi)" ] }, { "cell_type": "code", "metadata": { "id": "r0vrDO9kaxSe" }, "execution_count": null, "outputs": [], "source": [ "from huggingface_hub import login, get_token\n", "login()\n", "assert get_token(), 'Token yok - once login'" ] }, { "cell_type": "markdown", "metadata": { "id": "bjMvH7IAaxSf" }, "source": [ "## 2) Kodu HF'den indir" ] }, { "cell_type": "code", "metadata": { "id": "jm_PiGuqaxSf", "outputId": "f3651ee1-e690-44db-8801-f6500b28da63", "colab": { "base_uri": "https://localhost:8080/", "height": 98, "referenced_widgets": [ "3e734ac757e84b05a4e10624419d4b55", "87e623cd2d674d498e335a39e3b6eecc", "1ff99dced5ff4c72b1b831b952055f64", "cc087f88f5c643a68f0aa6237b2f9fc0", "9873ce191c2a4698a90dfa11b7760c40", "d564b758d7dc4eb0ab6db94e8de06590", "90d03e6014f8455e89bc47e9fc86e329", "aff26c1ac9cb4119b6458ba0a76df344", "260af1d6cdb648728d1c780918e3bc71", "0560002eec9647ed99f06e142352aa05", "97d385ce66834d18b80dfc0c80fe1313", "bcef62b0f99545a183ba9f2744597cef", "c8bf0944cd4d49d78be20da42de23b2b", "95f149a78adc42daaf44ca33af5e45d2", "80a908e8bce74abdadd53f82cc527fd6", "7e901b255f4d4b1c96f30166a1fe0bf9", "971590608bc44085bf327c329849b03d", "e70a054d312a448e9d141d1a7fe65d89", "e48ab507b83642ce80fb7b43232ff70d", "5a3fa1785c794e62af7a602fa04bf2be", "2c426c1c06a549f1826be8d5d6cb64e2", "0ef2dcd762eb4a29b842d1c375659359" ] } }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "Downloading (incomplete total...): 0.00B [00:00, ?B/s]" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, "model_id": "3e734ac757e84b05a4e10624419d4b55" } }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "Fetching 24 files: 0%| | 0/24 [00:00