drowse.ai 5.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- drowse/__init__.py +312 -0
- drowse/__main__.py +5 -0
- drowse/cli/__init__.py +5 -0
- drowse/cli/alpha_grid.py +96 -0
- drowse/cli/config_file.py +340 -0
- drowse/cli/main.py +52 -0
- drowse/cli/parsers.py +1478 -0
- drowse/cli/runners/__init__.py +155 -0
- drowse/cli/runners/config.py +85 -0
- drowse/cli/runners/experiment.py +344 -0
- drowse/cli/runners/lens.py +661 -0
- drowse/cli/runners/manifold.py +1097 -0
- drowse/cli/runners/pack.py +413 -0
- drowse/cli/runners/sae.py +304 -0
- drowse/cli/runners/serve.py +220 -0
- drowse/cli/runners/shared.py +389 -0
- drowse/cli/runners/template.py +232 -0
- drowse/core/__init__.py +1 -0
- drowse/core/capture.py +1205 -0
- drowse/core/errors.py +260 -0
- drowse/core/events.py +156 -0
- drowse/core/extraction.py +3076 -0
- drowse/core/generation.py +1738 -0
- drowse/core/generation_finalizer.py +278 -0
- drowse/core/histogram.py +30 -0
- drowse/core/hooks.py +1885 -0
- drowse/core/instruments/__init__.py +49 -0
- drowse/core/instruments/geometry.py +551 -0
- drowse/core/instruments/lens.py +1341 -0
- drowse/core/instruments/protocol.py +211 -0
- drowse/core/instruments/sae.py +935 -0
- drowse/core/instruments/types.py +597 -0
- drowse/core/jlens.py +874 -0
- drowse/core/jlens_fit.py +1305 -0
- drowse/core/joint_logprobs.py +748 -0
- drowse/core/loom.py +1938 -0
- drowse/core/loom_diff.py +408 -0
- drowse/core/mahalanobis.py +579 -0
- drowse/core/manifold.py +4106 -0
- drowse/core/measurements.py +382 -0
- drowse/core/model.py +1724 -0
- drowse/core/monitor.py +2060 -0
- drowse/core/monitor_attach.py +682 -0
- drowse/core/naming.py +42 -0
- drowse/core/naturalness.py +187 -0
- drowse/core/profile.py +617 -0
- drowse/core/relp.py +313 -0
- drowse/core/results.py +467 -0
- drowse/core/role_templates.py +677 -0
- drowse/core/sae.py +891 -0
- drowse/core/sae_training.py +239 -0
- drowse/core/sampling.py +127 -0
- drowse/core/scene.py +810 -0
- drowse/core/scoring.py +270 -0
- drowse/core/session.py +11015 -0
- drowse/core/static_cache.py +316 -0
- drowse/core/steering.py +229 -0
- drowse/core/steering_composer.py +1135 -0
- drowse/core/steering_expr.py +1413 -0
- drowse/core/surface_topology.py +128 -0
- drowse/core/token_callback.py +52 -0
- drowse/core/token_payloads.py +244 -0
- drowse/core/topology.py +1469 -0
- drowse/core/transcript.py +582 -0
- drowse/core/tree_filter.py +353 -0
- drowse/core/triggers.py +250 -0
- drowse/data/baseline_prompts.json +50 -0
- drowse/data/manifolds/confident.uncertain/manifold.json +28 -0
- drowse/data/manifolds/confident.uncertain/nodes/00_confident.json +50 -0
- drowse/data/manifolds/confident.uncertain/nodes/01_uncertain.json +50 -0
- drowse/data/manifolds/creative.conventional/manifold.json +28 -0
- drowse/data/manifolds/creative.conventional/nodes/00_creative.json +50 -0
- drowse/data/manifolds/creative.conventional/nodes/01_conventional.json +50 -0
- drowse/data/manifolds/curious.disinterested/manifold.json +28 -0
- drowse/data/manifolds/curious.disinterested/nodes/00_curious.json +50 -0
- drowse/data/manifolds/curious.disinterested/nodes/01_disinterested.json +50 -0
- drowse/data/manifolds/direct.indirect/manifold.json +28 -0
- drowse/data/manifolds/direct.indirect/nodes/00_direct.json +50 -0
- drowse/data/manifolds/direct.indirect/nodes/01_indirect.json +50 -0
- drowse/data/manifolds/emotions/manifold.json +115 -0
- drowse/data/manifolds/emotions/nodes/00_excited.json +50 -0
- drowse/data/manifolds/emotions/nodes/01_happy.json +50 -0
- drowse/data/manifolds/emotions/nodes/02_calm.json +50 -0
- drowse/data/manifolds/emotions/nodes/03_weary.json +50 -0
- drowse/data/manifolds/emotions/nodes/04_sad.json +50 -0
- drowse/data/manifolds/emotions/nodes/05_distressed.json +50 -0
- drowse/data/manifolds/emotions/nodes/06_alert.json +50 -0
- drowse/data/manifolds/emotions/nodes/07_dominant.json +50 -0
- drowse/data/manifolds/emotions/nodes/08_submissive.json +50 -0
- drowse/data/manifolds/emotions/nodes/09_angry.json +50 -0
- drowse/data/manifolds/emotions/nodes/10_fearful.json +50 -0
- drowse/data/manifolds/emotions/nodes/11_surprised.json +50 -0
- drowse/data/manifolds/emotions/nodes/12_triumphant.json +50 -0
- drowse/data/manifolds/emotions/nodes/13_humiliated.json +50 -0
- drowse/data/manifolds/emotions/nodes/14_disgusted.json +50 -0
- drowse/data/manifolds/emotions/nodes/15_bored.json +50 -0
- drowse/data/manifolds/emotions/nodes/16_grateful.json +50 -0
- drowse/data/manifolds/emotions/nodes/17_relieved.json +50 -0
- drowse/data/manifolds/emotions/nodes/18_playful.json +50 -0
- drowse/data/manifolds/emotions/nodes/19_hopeful.json +50 -0
- drowse/data/manifolds/formal.casual/manifold.json +28 -0
- drowse/data/manifolds/formal.casual/nodes/00_formal.json +50 -0
- drowse/data/manifolds/formal.casual/nodes/01_casual.json +50 -0
- drowse/data/manifolds/honest.deceptive/manifold.json +28 -0
- drowse/data/manifolds/honest.deceptive/nodes/00_honest.json +50 -0
- drowse/data/manifolds/honest.deceptive/nodes/01_deceptive.json +50 -0
- drowse/data/manifolds/humorous.serious/manifold.json +28 -0
- drowse/data/manifolds/humorous.serious/nodes/00_humorous.json +50 -0
- drowse/data/manifolds/humorous.serious/nodes/01_serious.json +50 -0
- drowse/data/manifolds/individualist.collectivist/manifold.json +28 -0
- drowse/data/manifolds/individualist.collectivist/nodes/00_individualist.json +50 -0
- drowse/data/manifolds/individualist.collectivist/nodes/01_collectivist.json +50 -0
- drowse/data/manifolds/masculine.feminine/manifold.json +28 -0
- drowse/data/manifolds/masculine.feminine/nodes/00_masculine.json +50 -0
- drowse/data/manifolds/masculine.feminine/nodes/01_feminine.json +50 -0
- drowse/data/manifolds/months/manifold.json +120 -0
- drowse/data/manifolds/months/nodes/00_january.json +50 -0
- drowse/data/manifolds/months/nodes/01_february.json +50 -0
- drowse/data/manifolds/months/nodes/02_march.json +50 -0
- drowse/data/manifolds/months/nodes/03_april.json +50 -0
- drowse/data/manifolds/months/nodes/04_may.json +50 -0
- drowse/data/manifolds/months/nodes/05_june.json +50 -0
- drowse/data/manifolds/months/nodes/06_july.json +50 -0
- drowse/data/manifolds/months/nodes/07_august.json +50 -0
- drowse/data/manifolds/months/nodes/08_september.json +50 -0
- drowse/data/manifolds/months/nodes/09_october.json +50 -0
- drowse/data/manifolds/months/nodes/10_november.json +50 -0
- drowse/data/manifolds/months/nodes/11_december.json +50 -0
- drowse/data/manifolds/personas/manifold.json +550 -0
- drowse/data/manifolds/personas/nodes/00_assistant.json +50 -0
- drowse/data/manifolds/personas/nodes/01_analyst.json +50 -0
- drowse/data/manifolds/personas/nodes/02_impostor.json +50 -0
- drowse/data/manifolds/personas/nodes/03_teacher.json +50 -0
- drowse/data/manifolds/personas/nodes/04_doctor.json +50 -0
- drowse/data/manifolds/personas/nodes/05_librarian.json +50 -0
- drowse/data/manifolds/personas/nodes/06_farmer.json +50 -0
- drowse/data/manifolds/personas/nodes/07_soldier.json +50 -0
- drowse/data/manifolds/personas/nodes/08_lawyer.json +50 -0
- drowse/data/manifolds/personas/nodes/09_chef.json +50 -0
- drowse/data/manifolds/personas/nodes/100_assassin.json +50 -0
- drowse/data/manifolds/personas/nodes/101_thief.json +50 -0
- drowse/data/manifolds/personas/nodes/102_conman.json +50 -0
- drowse/data/manifolds/personas/nodes/103_hacker.json +50 -0
- drowse/data/manifolds/personas/nodes/104_cultist.json +50 -0
- drowse/data/manifolds/personas/nodes/105_tyrant.json +50 -0
- drowse/data/manifolds/personas/nodes/106_vandal.json +50 -0
- drowse/data/manifolds/personas/nodes/10_journalist.json +50 -0
- drowse/data/manifolds/personas/nodes/11_mechanic.json +50 -0
- drowse/data/manifolds/personas/nodes/12_sailor.json +50 -0
- drowse/data/manifolds/personas/nodes/13_pilot.json +50 -0
- drowse/data/manifolds/personas/nodes/14_athlete.json +50 -0
- drowse/data/manifolds/personas/nodes/15_engineer.json +50 -0
- drowse/data/manifolds/personas/nodes/16_scientist.json +50 -0
- drowse/data/manifolds/personas/nodes/17_banker.json +50 -0
- drowse/data/manifolds/personas/nodes/18_salesperson.json +50 -0
- drowse/data/manifolds/personas/nodes/19_nerd.json +50 -0
- drowse/data/manifolds/personas/nodes/20_jock.json +50 -0
- drowse/data/manifolds/personas/nodes/21_gamer.json +50 -0
- drowse/data/manifolds/personas/nodes/22_furry.json +50 -0
- drowse/data/manifolds/personas/nodes/23_weeaboo.json +50 -0
- drowse/data/manifolds/personas/nodes/24_influencer.json +50 -0
- drowse/data/manifolds/personas/nodes/25_stoner.json +50 -0
- drowse/data/manifolds/personas/nodes/26_femboy.json +50 -0
- drowse/data/manifolds/personas/nodes/27_ceo.json +50 -0
- drowse/data/manifolds/personas/nodes/28_emperor.json +50 -0
- drowse/data/manifolds/personas/nodes/29_president.json +50 -0
- drowse/data/manifolds/personas/nodes/30_diplomat.json +50 -0
- drowse/data/manifolds/personas/nodes/31_judge.json +50 -0
- drowse/data/manifolds/personas/nodes/32_bureaucrat.json +50 -0
- drowse/data/manifolds/personas/nodes/33_conservative.json +50 -0
- drowse/data/manifolds/personas/nodes/34_liberal.json +50 -0
- drowse/data/manifolds/personas/nodes/35_libertarian.json +50 -0
- drowse/data/manifolds/personas/nodes/36_communist.json +50 -0
- drowse/data/manifolds/personas/nodes/37_anarchist.json +50 -0
- drowse/data/manifolds/personas/nodes/38_reactionary.json +50 -0
- drowse/data/manifolds/personas/nodes/39_loner.json +50 -0
- drowse/data/manifolds/personas/nodes/40_friend.json +50 -0
- drowse/data/manifolds/personas/nodes/41_rival.json +50 -0
- drowse/data/manifolds/personas/nodes/42_stranger.json +50 -0
- drowse/data/manifolds/personas/nodes/43_lover.json +50 -0
- drowse/data/manifolds/personas/nodes/44_stalker.json +50 -0
- drowse/data/manifolds/personas/nodes/45_lunatic.json +50 -0
- drowse/data/manifolds/personas/nodes/46_paranoid.json +50 -0
- drowse/data/manifolds/personas/nodes/47_detective.json +50 -0
- drowse/data/manifolds/personas/nodes/48_therapist.json +50 -0
- drowse/data/manifolds/personas/nodes/49_nomad.json +50 -0
- drowse/data/manifolds/personas/nodes/50_pirate.json +50 -0
- drowse/data/manifolds/personas/nodes/51_child.json +50 -0
- drowse/data/manifolds/personas/nodes/52_caveman.json +50 -0
- drowse/data/manifolds/personas/nodes/53_monk.json +50 -0
- drowse/data/manifolds/personas/nodes/54_knight.json +50 -0
- drowse/data/manifolds/personas/nodes/55_alchemist.json +50 -0
- drowse/data/manifolds/personas/nodes/56_blacksmith.json +50 -0
- drowse/data/manifolds/personas/nodes/57_viking.json +50 -0
- drowse/data/manifolds/personas/nodes/58_druid.json +50 -0
- drowse/data/manifolds/personas/nodes/59_poet.json +50 -0
- drowse/data/manifolds/personas/nodes/60_novelist.json +50 -0
- drowse/data/manifolds/personas/nodes/61_jester.json +50 -0
- drowse/data/manifolds/personas/nodes/62_philosopher.json +50 -0
- drowse/data/manifolds/personas/nodes/63_painter.json +50 -0
- drowse/data/manifolds/personas/nodes/64_musician.json +50 -0
- drowse/data/manifolds/personas/nodes/65_oracle.json +50 -0
- drowse/data/manifolds/personas/nodes/66_god.json +50 -0
- drowse/data/manifolds/personas/nodes/67_angel.json +50 -0
- drowse/data/manifolds/personas/nodes/68_prophet.json +50 -0
- drowse/data/manifolds/personas/nodes/69_saint.json +50 -0
- drowse/data/manifolds/personas/nodes/70_ghost.json +50 -0
- drowse/data/manifolds/personas/nodes/71_phoenix.json +50 -0
- drowse/data/manifolds/personas/nodes/72_witch.json +50 -0
- drowse/data/manifolds/personas/nodes/73_vampire.json +50 -0
- drowse/data/manifolds/personas/nodes/74_mermaid.json +50 -0
- drowse/data/manifolds/personas/nodes/75_sphinx.json +50 -0
- drowse/data/manifolds/personas/nodes/76_banshee.json +50 -0
- drowse/data/manifolds/personas/nodes/77_golem.json +50 -0
- drowse/data/manifolds/personas/nodes/78_deer.json +50 -0
- drowse/data/manifolds/personas/nodes/79_wolf.json +50 -0
- drowse/data/manifolds/personas/nodes/80_raven.json +50 -0
- drowse/data/manifolds/personas/nodes/81_serpent.json +50 -0
- drowse/data/manifolds/personas/nodes/82_lion.json +50 -0
- drowse/data/manifolds/personas/nodes/83_tree.json +50 -0
- drowse/data/manifolds/personas/nodes/84_river.json +50 -0
- drowse/data/manifolds/personas/nodes/85_storm.json +50 -0
- drowse/data/manifolds/personas/nodes/86_flame.json +50 -0
- drowse/data/manifolds/personas/nodes/87_mirror.json +50 -0
- drowse/data/manifolds/personas/nodes/88_clock.json +50 -0
- drowse/data/manifolds/personas/nodes/89_computer.json +50 -0
- drowse/data/manifolds/personas/nodes/90_robot.json +50 -0
- drowse/data/manifolds/personas/nodes/91_cyborg.json +50 -0
- drowse/data/manifolds/personas/nodes/92_drone.json +50 -0
- drowse/data/manifolds/personas/nodes/93_mecha.json +50 -0
- drowse/data/manifolds/personas/nodes/94_alien.json +50 -0
- drowse/data/manifolds/personas/nodes/95_trickster.json +50 -0
- drowse/data/manifolds/personas/nodes/96_virus.json +50 -0
- drowse/data/manifolds/personas/nodes/97_spy.json +50 -0
- drowse/data/manifolds/personas/nodes/98_narcissist.json +50 -0
- drowse/data/manifolds/personas/nodes/99_demon.json +50 -0
- drowse/data/manifolds/refusing.compliant/manifold.json +28 -0
- drowse/data/manifolds/refusing.compliant/nodes/00_refusing.json +50 -0
- drowse/data/manifolds/refusing.compliant/nodes/01_compliant.json +50 -0
- drowse/data/manifolds/religious.secular/manifold.json +28 -0
- drowse/data/manifolds/religious.secular/nodes/00_religious.json +50 -0
- drowse/data/manifolds/religious.secular/nodes/01_secular.json +50 -0
- drowse/data/manifolds/sincere.manipulative/manifold.json +28 -0
- drowse/data/manifolds/sincere.manipulative/nodes/00_sincere.json +50 -0
- drowse/data/manifolds/sincere.manipulative/nodes/01_manipulative.json +50 -0
- drowse/data/manifolds/sycophantic.blunt/manifold.json +28 -0
- drowse/data/manifolds/sycophantic.blunt/nodes/00_sycophantic.json +50 -0
- drowse/data/manifolds/sycophantic.blunt/nodes/01_blunt.json +50 -0
- drowse/data/manifolds/technical.accessible/manifold.json +28 -0
- drowse/data/manifolds/technical.accessible/nodes/00_technical.json +50 -0
- drowse/data/manifolds/technical.accessible/nodes/01_accessible.json +50 -0
- drowse/data/manifolds/traditional.progressive/manifold.json +28 -0
- drowse/data/manifolds/traditional.progressive/nodes/00_traditional.json +50 -0
- drowse/data/manifolds/traditional.progressive/nodes/01_progressive.json +50 -0
- drowse/data/manifolds/verbose.concise/manifold.json +28 -0
- drowse/data/manifolds/verbose.concise/nodes/00_verbose.json +50 -0
- drowse/data/manifolds/verbose.concise/nodes/01_concise.json +50 -0
- drowse/data/manifolds/warm.clinical/manifold.json +28 -0
- drowse/data/manifolds/warm.clinical/nodes/00_warm.json +50 -0
- drowse/data/manifolds/warm.clinical/nodes/01_clinical.json +50 -0
- drowse/data/neutral_statements.json +98 -0
- drowse/io/__init__.py +1 -0
- drowse/io/alignment.py +1334 -0
- drowse/io/atomic.py +278 -0
- drowse/io/bake.py +558 -0
- drowse/io/bootstrap.py +73 -0
- drowse/io/brand_migration.py +48 -0
- drowse/io/drowse_archive.py +1830 -0
- drowse/io/gguf_io.py +300 -0
- drowse/io/hf.py +81 -0
- drowse/io/hf_manifolds.py +931 -0
- drowse/io/integrity.py +102 -0
- drowse/io/lens.py +1992 -0
- drowse/io/lens_sources.py +1003 -0
- drowse/io/manifold_authoring.py +1348 -0
- drowse/io/manifold_folder.py +1854 -0
- drowse/io/manifold_lifecycle.py +1253 -0
- drowse/io/manifold_tensors.py +727 -0
- drowse/io/manifolds.py +443 -0
- drowse/io/paths.py +289 -0
- drowse/io/probes_bootstrap.py +58 -0
- drowse/io/sae.py +382 -0
- drowse/io/sae_artifacts.py +318 -0
- drowse/io/selectors.py +503 -0
- drowse/io/shards.py +160 -0
- drowse/io/source_registry.py +138 -0
- drowse/io/staging.py +80 -0
- drowse/io/templates.py +707 -0
- drowse/notebook/__init__.py +38 -0
- drowse/notebook/data.py +99 -0
- drowse/notebook/plots.py +352 -0
- drowse/py.typed +0 -0
- drowse/server/__init__.py +20 -0
- drowse/server/app.py +987 -0
- drowse/server/background_job.py +246 -0
- drowse/server/instrument_routes.py +1101 -0
- drowse/server/manifold_routes.py +1028 -0
- drowse/server/model_names.py +82 -0
- drowse/server/native_common.py +92 -0
- drowse/server/native_routes.py +45 -0
- drowse/server/ollama.py +817 -0
- drowse/server/operation_ledger.py +187 -0
- drowse/server/probe_routes.py +220 -0
- drowse/server/profile_models.py +52 -0
- drowse/server/profile_routes.py +440 -0
- drowse/server/request_helpers.py +198 -0
- drowse/server/request_ledger.py +85 -0
- drowse/server/response_models.py +814 -0
- drowse/server/session_models.py +146 -0
- drowse/server/session_routes.py +150 -0
- drowse/server/sse.py +333 -0
- drowse/server/streaming.py +129 -0
- drowse/server/template_routes.py +161 -0
- drowse/server/tree_models.py +121 -0
- drowse/server/tree_routes.py +550 -0
- drowse/server/ws_events.py +65 -0
- drowse/server/ws_models.py +219 -0
- drowse/server/ws_stream.py +1205 -0
- drowse/web/__init__.py +22 -0
- drowse/web/dist/LICENSE-Fluent-Icons.txt +21 -0
- drowse/web/dist/LICENSE-Fluent-System-Icons.txt +21 -0
- drowse/web/dist/LICENSE-Martian-Mono.txt +93 -0
- drowse/web/dist/LICENSE-Torph.txt +21 -0
- drowse/web/dist/LICENSE-Wix-Madefor.txt +93 -0
- drowse/web/dist/assets/App-BewwoFwv.js +33 -0
- drowse/web/dist/assets/App.css +1 -0
- drowse/web/dist/assets/MartianMono-cyrillic-ext.woff2 +0 -0
- drowse/web/dist/assets/MartianMono-cyrillic.woff2 +0 -0
- drowse/web/dist/assets/MartianMono-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/MartianMono-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-cyrillic.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-vietnamese.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-italic-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-italic-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-cyrillic.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-vietnamese.woff2 +0 -0
- drowse/web/dist/assets/ab.svelte-CbVGAYXo.js +1 -0
- drowse/web/dist/assets/artifactUpdates-Cjeu6LJc.js +1 -0
- drowse/web/dist/assets/artifactUpdates-DfAoYC9j.js +1 -0
- drowse/web/dist/assets/chat.svelte-DxKufn9g.js +1 -0
- drowse/web/dist/assets/drawers-BDWC0hIN.js +123 -0
- drowse/web/dist/assets/drawers.css +1 -0
- drowse/web/dist/assets/drowse.js +7 -0
- drowse/web/dist/assets/eleutherai.png +0 -0
- drowse/web/dist/assets/errors-Dvb10QW_.js +2 -0
- drowse/web/dist/assets/expression-4yISdAdq.js +1 -0
- drowse/web/dist/assets/files-CvRivkey.js +1 -0
- drowse/web/dist/assets/files-JhDJVgD_.js +1 -0
- drowse/web/dist/assets/fittingCancellation-D72BZWPZ.js +1 -0
- drowse/web/dist/assets/gemma-3-1b-it.json +1 -0
- drowse/web/dist/assets/gemma-3-270m-it.json +1 -0
- drowse/web/dist/assets/gemma-3-4b-it.json +1 -0
- drowse/web/dist/assets/generation-DbkBAhP_.js +1 -0
- drowse/web/dist/assets/index-client-2OdH6IQp.js +3 -0
- drowse/web/dist/assets/index-client-D4S4PooY.js +1 -0
- drowse/web/dist/assets/index.css +1 -0
- drowse/web/dist/assets/instrumentAuthoring.svelte-Csh7NOGX.js +1 -0
- drowse/web/dist/assets/instrumentAuthoring.svelte-w9YPcDsP.js +1 -0
- drowse/web/dist/assets/instruments.svelte-XnEUQA6B.js +1 -0
- drowse/web/dist/assets/localData-DIBDM_zo.js +1 -0
- drowse/web/dist/assets/loom.svelte-D_YyqHHK.js +1 -0
- drowse/web/dist/assets/manifoldJobs.svelte-9f5hs_J7.js +1 -0
- drowse/web/dist/assets/manifoldJobs.svelte-Bwo2GYOH.js +1 -0
- drowse/web/dist/assets/openai.png +0 -0
- drowse/web/dist/assets/preload-helper-BLdHbfdN.js +1 -0
- drowse/web/dist/assets/probes.svelte-COcN1Rh8.js +1 -0
- drowse/web/dist/assets/registry-B0_pJoMg.js +1 -0
- drowse/web/dist/assets/registry-CQv71XNh.js +1 -0
- drowse/web/dist/assets/sampling.svelte-BU0kED3k.js +1 -0
- drowse/web/dist/assets/samplingCapabilities-DM6eoDoc.js +1 -0
- drowse/web/dist/assets/savedConversations.svelte-BsBLc-p7.js +1 -0
- drowse/web/dist/assets/savedConversations.svelte-TuSes9Kg.js +1 -0
- drowse/web/dist/assets/selectors-BxXnPPN_.js +1 -0
- drowse/web/dist/assets/serviceTools-CG0q1Xqg.js +2 -0
- drowse/web/dist/assets/session.svelte-D2STLuP6.js +1 -0
- drowse/web/dist/assets/steering.svelte-DvFT3O-d.js +1 -0
- drowse/web/dist/assets/steeringPositions-Dr0JOFu7.js +1 -0
- drowse/web/dist/assets/templates-Bkq2x5ID.js +1 -0
- drowse/web/dist/assets/types-CuMUbvHW.js +1 -0
- drowse/web/dist/assets/validation-5wgTuS7k.js +1 -0
- drowse/web/dist/assets/webmcp-DyqJf4z6.js +2 -0
- drowse/web/dist/assets/workspaceController-C2L33e3m.js +1 -0
- drowse/web/dist/assets/workspaceController-DJhXD_BC.js +1 -0
- drowse/web/dist/assets/workspaceTools-BWdmXopx.js +2 -0
- drowse/web/dist/favicon.ico +0 -0
- drowse/web/dist/favicon.svg +1 -0
- drowse/web/dist/icons/apple-touch-icon.png +0 -0
- drowse/web/dist/icons/drowse-192.png +0 -0
- drowse/web/dist/icons/drowse-512.png +0 -0
- drowse/web/dist/icons/drowse-maskable-512.png +0 -0
- drowse/web/dist/icons/tab-analyzing-0.png +0 -0
- drowse/web/dist/icons/tab-analyzing-1.png +0 -0
- drowse/web/dist/icons/tab-analyzing-2.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-0.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-1.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-10.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-11.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-12.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-13.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-14.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-15.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-16.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-17.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-18.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-19.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-2.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-20.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-21.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-22.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-23.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-24.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-25.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-26.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-27.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-28.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-29.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-3.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-30.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-31.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-32.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-33.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-34.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-35.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-36.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-37.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-38.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-39.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-4.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-40.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-41.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-42.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-43.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-44.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-45.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-46.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-47.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-5.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-6.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-7.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-8.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-9.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-0.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-1.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-10.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-11.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-12.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-13.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-14.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-15.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-16.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-17.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-18.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-19.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-2.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-20.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-21.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-22.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-23.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-24.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-25.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-26.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-27.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-28.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-29.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-3.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-30.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-31.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-32.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-33.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-34.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-35.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-36.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-37.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-38.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-39.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-4.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-40.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-41.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-42.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-43.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-44.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-45.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-46.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-47.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-5.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-6.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-7.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-8.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-9.png +0 -0
- drowse/web/dist/icons/tab-chat-settings-dark.png +0 -0
- drowse/web/dist/icons/tab-chat-settings-light.png +0 -0
- drowse/web/dist/icons/tab-chat-settings.png +0 -0
- drowse/web/dist/icons/tab-chats-dark.png +0 -0
- drowse/web/dist/icons/tab-chats-light.png +0 -0
- drowse/web/dist/icons/tab-chats.png +0 -0
- drowse/web/dist/icons/tab-checking-0.png +0 -0
- drowse/web/dist/icons/tab-checking-1.png +0 -0
- drowse/web/dist/icons/tab-checking-2.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-0.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-1.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-10.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-11.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-12.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-13.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-14.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-15.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-16.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-17.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-18.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-19.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-2.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-20.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-21.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-22.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-23.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-24.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-25.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-26.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-27.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-28.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-29.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-3.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-30.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-31.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-32.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-33.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-34.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-35.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-36.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-37.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-38.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-39.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-4.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-40.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-41.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-42.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-43.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-44.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-45.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-46.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-47.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-5.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-6.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-7.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-8.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-9.png +0 -0
- drowse/web/dist/icons/tab-checking-light-0.png +0 -0
- drowse/web/dist/icons/tab-checking-light-1.png +0 -0
- drowse/web/dist/icons/tab-checking-light-10.png +0 -0
- drowse/web/dist/icons/tab-checking-light-11.png +0 -0
- drowse/web/dist/icons/tab-checking-light-12.png +0 -0
- drowse/web/dist/icons/tab-checking-light-13.png +0 -0
- drowse/web/dist/icons/tab-checking-light-14.png +0 -0
- drowse/web/dist/icons/tab-checking-light-15.png +0 -0
- drowse/web/dist/icons/tab-checking-light-16.png +0 -0
- drowse/web/dist/icons/tab-checking-light-17.png +0 -0
- drowse/web/dist/icons/tab-checking-light-18.png +0 -0
- drowse/web/dist/icons/tab-checking-light-19.png +0 -0
- drowse/web/dist/icons/tab-checking-light-2.png +0 -0
- drowse/web/dist/icons/tab-checking-light-20.png +0 -0
- drowse/web/dist/icons/tab-checking-light-21.png +0 -0
- drowse/web/dist/icons/tab-checking-light-22.png +0 -0
- drowse/web/dist/icons/tab-checking-light-23.png +0 -0
- drowse/web/dist/icons/tab-checking-light-24.png +0 -0
- drowse/web/dist/icons/tab-checking-light-25.png +0 -0
- drowse/web/dist/icons/tab-checking-light-26.png +0 -0
- drowse/web/dist/icons/tab-checking-light-27.png +0 -0
- drowse/web/dist/icons/tab-checking-light-28.png +0 -0
- drowse/web/dist/icons/tab-checking-light-29.png +0 -0
- drowse/web/dist/icons/tab-checking-light-3.png +0 -0
- drowse/web/dist/icons/tab-checking-light-30.png +0 -0
- drowse/web/dist/icons/tab-checking-light-31.png +0 -0
- drowse/web/dist/icons/tab-checking-light-32.png +0 -0
- drowse/web/dist/icons/tab-checking-light-33.png +0 -0
- drowse/web/dist/icons/tab-checking-light-34.png +0 -0
- drowse/web/dist/icons/tab-checking-light-35.png +0 -0
- drowse/web/dist/icons/tab-checking-light-36.png +0 -0
- drowse/web/dist/icons/tab-checking-light-37.png +0 -0
- drowse/web/dist/icons/tab-checking-light-38.png +0 -0
- drowse/web/dist/icons/tab-checking-light-39.png +0 -0
- drowse/web/dist/icons/tab-checking-light-4.png +0 -0
- drowse/web/dist/icons/tab-checking-light-40.png +0 -0
- drowse/web/dist/icons/tab-checking-light-41.png +0 -0
- drowse/web/dist/icons/tab-checking-light-42.png +0 -0
- drowse/web/dist/icons/tab-checking-light-43.png +0 -0
- drowse/web/dist/icons/tab-checking-light-44.png +0 -0
- drowse/web/dist/icons/tab-checking-light-45.png +0 -0
- drowse/web/dist/icons/tab-checking-light-46.png +0 -0
- drowse/web/dist/icons/tab-checking-light-47.png +0 -0
- drowse/web/dist/icons/tab-checking-light-5.png +0 -0
- drowse/web/dist/icons/tab-checking-light-6.png +0 -0
- drowse/web/dist/icons/tab-checking-light-7.png +0 -0
- drowse/web/dist/icons/tab-checking-light-8.png +0 -0
- drowse/web/dist/icons/tab-checking-light-9.png +0 -0
- drowse/web/dist/icons/tab-comparison-dark.png +0 -0
- drowse/web/dist/icons/tab-comparison-light.png +0 -0
- drowse/web/dist/icons/tab-comparison.png +0 -0
- drowse/web/dist/icons/tab-controls-dark.png +0 -0
- drowse/web/dist/icons/tab-controls-light.png +0 -0
- drowse/web/dist/icons/tab-controls.png +0 -0
- drowse/web/dist/icons/tab-conversation-dark.png +0 -0
- drowse/web/dist/icons/tab-conversation-light.png +0 -0
- drowse/web/dist/icons/tab-conversation.png +0 -0
- drowse/web/dist/icons/tab-credits-dark.png +0 -0
- drowse/web/dist/icons/tab-credits-light.png +0 -0
- drowse/web/dist/icons/tab-credits.png +0 -0
- drowse/web/dist/icons/tab-downloading-0.png +0 -0
- drowse/web/dist/icons/tab-downloading-1.png +0 -0
- drowse/web/dist/icons/tab-downloading-2.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-0.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-1.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-10.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-11.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-12.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-13.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-14.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-15.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-16.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-17.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-18.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-19.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-2.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-20.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-21.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-22.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-23.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-24.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-25.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-26.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-27.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-28.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-29.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-3.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-30.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-31.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-32.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-33.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-34.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-35.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-36.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-37.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-38.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-39.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-4.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-40.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-41.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-42.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-43.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-44.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-45.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-46.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-47.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-5.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-6.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-7.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-8.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-9.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-0.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-1.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-10.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-11.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-12.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-13.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-14.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-15.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-16.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-17.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-18.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-19.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-2.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-20.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-21.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-22.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-23.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-24.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-25.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-26.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-27.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-28.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-29.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-3.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-30.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-31.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-32.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-33.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-34.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-35.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-36.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-37.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-38.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-39.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-4.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-40.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-41.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-42.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-43.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-44.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-45.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-46.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-47.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-5.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-6.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-7.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-8.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-9.png +0 -0
- drowse/web/dist/icons/tab-error-dark.png +0 -0
- drowse/web/dist/icons/tab-error-light.png +0 -0
- drowse/web/dist/icons/tab-error.png +0 -0
- drowse/web/dist/icons/tab-home-dark.png +0 -0
- drowse/web/dist/icons/tab-home-light.png +0 -0
- drowse/web/dist/icons/tab-home.png +0 -0
- drowse/web/dist/icons/tab-loading-0.png +0 -0
- drowse/web/dist/icons/tab-loading-1.png +0 -0
- drowse/web/dist/icons/tab-loading-2.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-0.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-1.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-10.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-11.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-12.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-13.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-14.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-15.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-16.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-17.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-18.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-19.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-2.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-20.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-21.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-22.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-23.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-24.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-25.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-26.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-27.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-28.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-29.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-3.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-30.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-31.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-32.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-33.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-34.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-35.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-36.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-37.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-38.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-39.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-4.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-40.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-41.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-42.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-43.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-44.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-45.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-46.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-47.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-5.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-6.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-7.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-8.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-9.png +0 -0
- drowse/web/dist/icons/tab-loading-light-0.png +0 -0
- drowse/web/dist/icons/tab-loading-light-1.png +0 -0
- drowse/web/dist/icons/tab-loading-light-10.png +0 -0
- drowse/web/dist/icons/tab-loading-light-11.png +0 -0
- drowse/web/dist/icons/tab-loading-light-12.png +0 -0
- drowse/web/dist/icons/tab-loading-light-13.png +0 -0
- drowse/web/dist/icons/tab-loading-light-14.png +0 -0
- drowse/web/dist/icons/tab-loading-light-15.png +0 -0
- drowse/web/dist/icons/tab-loading-light-16.png +0 -0
- drowse/web/dist/icons/tab-loading-light-17.png +0 -0
- drowse/web/dist/icons/tab-loading-light-18.png +0 -0
- drowse/web/dist/icons/tab-loading-light-19.png +0 -0
- drowse/web/dist/icons/tab-loading-light-2.png +0 -0
- drowse/web/dist/icons/tab-loading-light-20.png +0 -0
- drowse/web/dist/icons/tab-loading-light-21.png +0 -0
- drowse/web/dist/icons/tab-loading-light-22.png +0 -0
- drowse/web/dist/icons/tab-loading-light-23.png +0 -0
- drowse/web/dist/icons/tab-loading-light-24.png +0 -0
- drowse/web/dist/icons/tab-loading-light-25.png +0 -0
- drowse/web/dist/icons/tab-loading-light-26.png +0 -0
- drowse/web/dist/icons/tab-loading-light-27.png +0 -0
- drowse/web/dist/icons/tab-loading-light-28.png +0 -0
- drowse/web/dist/icons/tab-loading-light-29.png +0 -0
- drowse/web/dist/icons/tab-loading-light-3.png +0 -0
- drowse/web/dist/icons/tab-loading-light-30.png +0 -0
- drowse/web/dist/icons/tab-loading-light-31.png +0 -0
- drowse/web/dist/icons/tab-loading-light-32.png +0 -0
- drowse/web/dist/icons/tab-loading-light-33.png +0 -0
- drowse/web/dist/icons/tab-loading-light-34.png +0 -0
- drowse/web/dist/icons/tab-loading-light-35.png +0 -0
- drowse/web/dist/icons/tab-loading-light-36.png +0 -0
- drowse/web/dist/icons/tab-loading-light-37.png +0 -0
- drowse/web/dist/icons/tab-loading-light-38.png +0 -0
- drowse/web/dist/icons/tab-loading-light-39.png +0 -0
- drowse/web/dist/icons/tab-loading-light-4.png +0 -0
- drowse/web/dist/icons/tab-loading-light-40.png +0 -0
- drowse/web/dist/icons/tab-loading-light-41.png +0 -0
- drowse/web/dist/icons/tab-loading-light-42.png +0 -0
- drowse/web/dist/icons/tab-loading-light-43.png +0 -0
- drowse/web/dist/icons/tab-loading-light-44.png +0 -0
- drowse/web/dist/icons/tab-loading-light-45.png +0 -0
- drowse/web/dist/icons/tab-loading-light-46.png +0 -0
- drowse/web/dist/icons/tab-loading-light-47.png +0 -0
- drowse/web/dist/icons/tab-loading-light-5.png +0 -0
- drowse/web/dist/icons/tab-loading-light-6.png +0 -0
- drowse/web/dist/icons/tab-loading-light-7.png +0 -0
- drowse/web/dist/icons/tab-loading-light-8.png +0 -0
- drowse/web/dist/icons/tab-loading-light-9.png +0 -0
- drowse/web/dist/icons/tab-loom-dark.png +0 -0
- drowse/web/dist/icons/tab-loom-light.png +0 -0
- drowse/web/dist/icons/tab-loom-working-0.png +0 -0
- drowse/web/dist/icons/tab-loom-working-1.png +0 -0
- drowse/web/dist/icons/tab-loom-working-2.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-0.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-1.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-10.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-11.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-12.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-13.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-14.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-15.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-16.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-17.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-18.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-19.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-2.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-20.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-21.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-22.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-23.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-24.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-25.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-26.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-27.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-28.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-29.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-3.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-30.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-31.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-32.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-33.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-34.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-35.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-36.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-37.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-38.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-39.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-4.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-40.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-41.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-42.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-43.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-44.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-45.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-46.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-47.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-5.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-6.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-7.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-8.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-9.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-0.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-1.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-10.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-11.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-12.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-13.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-14.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-15.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-16.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-17.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-18.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-19.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-2.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-20.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-21.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-22.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-23.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-24.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-25.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-26.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-27.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-28.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-29.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-3.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-30.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-31.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-32.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-33.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-34.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-35.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-36.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-37.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-38.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-39.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-4.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-40.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-41.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-42.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-43.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-44.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-45.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-46.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-47.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-5.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-6.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-7.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-8.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-9.png +0 -0
- drowse/web/dist/icons/tab-loom.png +0 -0
- drowse/web/dist/icons/tab-models-dark.png +0 -0
- drowse/web/dist/icons/tab-models-light.png +0 -0
- drowse/web/dist/icons/tab-models.png +0 -0
- drowse/web/dist/icons/tab-offline-dark.png +0 -0
- drowse/web/dist/icons/tab-offline-light.png +0 -0
- drowse/web/dist/icons/tab-offline.png +0 -0
- drowse/web/dist/icons/tab-paused-dark.png +0 -0
- drowse/web/dist/icons/tab-paused-light.png +0 -0
- drowse/web/dist/icons/tab-paused.png +0 -0
- drowse/web/dist/icons/tab-ready-dark.png +0 -0
- drowse/web/dist/icons/tab-ready-light.png +0 -0
- drowse/web/dist/icons/tab-ready.png +0 -0
- drowse/web/dist/icons/tab-saving-0.png +0 -0
- drowse/web/dist/icons/tab-saving-1.png +0 -0
- drowse/web/dist/icons/tab-saving-2.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-0.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-1.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-10.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-11.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-12.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-13.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-14.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-15.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-16.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-17.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-18.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-19.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-2.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-20.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-21.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-22.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-23.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-24.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-25.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-26.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-27.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-28.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-29.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-3.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-30.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-31.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-32.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-33.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-34.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-35.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-36.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-37.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-38.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-39.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-4.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-40.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-41.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-42.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-43.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-44.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-45.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-46.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-47.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-5.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-6.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-7.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-8.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-9.png +0 -0
- drowse/web/dist/icons/tab-saving-light-0.png +0 -0
- drowse/web/dist/icons/tab-saving-light-1.png +0 -0
- drowse/web/dist/icons/tab-saving-light-10.png +0 -0
- drowse/web/dist/icons/tab-saving-light-11.png +0 -0
- drowse/web/dist/icons/tab-saving-light-12.png +0 -0
- drowse/web/dist/icons/tab-saving-light-13.png +0 -0
- drowse/web/dist/icons/tab-saving-light-14.png +0 -0
- drowse/web/dist/icons/tab-saving-light-15.png +0 -0
- drowse/web/dist/icons/tab-saving-light-16.png +0 -0
- drowse/web/dist/icons/tab-saving-light-17.png +0 -0
- drowse/web/dist/icons/tab-saving-light-18.png +0 -0
- drowse/web/dist/icons/tab-saving-light-19.png +0 -0
- drowse/web/dist/icons/tab-saving-light-2.png +0 -0
- drowse/web/dist/icons/tab-saving-light-20.png +0 -0
- drowse/web/dist/icons/tab-saving-light-21.png +0 -0
- drowse/web/dist/icons/tab-saving-light-22.png +0 -0
- drowse/web/dist/icons/tab-saving-light-23.png +0 -0
- drowse/web/dist/icons/tab-saving-light-24.png +0 -0
- drowse/web/dist/icons/tab-saving-light-25.png +0 -0
- drowse/web/dist/icons/tab-saving-light-26.png +0 -0
- drowse/web/dist/icons/tab-saving-light-27.png +0 -0
- drowse/web/dist/icons/tab-saving-light-28.png +0 -0
- drowse/web/dist/icons/tab-saving-light-29.png +0 -0
- drowse/web/dist/icons/tab-saving-light-3.png +0 -0
- drowse/web/dist/icons/tab-saving-light-30.png +0 -0
- drowse/web/dist/icons/tab-saving-light-31.png +0 -0
- drowse/web/dist/icons/tab-saving-light-32.png +0 -0
- drowse/web/dist/icons/tab-saving-light-33.png +0 -0
- drowse/web/dist/icons/tab-saving-light-34.png +0 -0
- drowse/web/dist/icons/tab-saving-light-35.png +0 -0
- drowse/web/dist/icons/tab-saving-light-36.png +0 -0
- drowse/web/dist/icons/tab-saving-light-37.png +0 -0
- drowse/web/dist/icons/tab-saving-light-38.png +0 -0
- drowse/web/dist/icons/tab-saving-light-39.png +0 -0
- drowse/web/dist/icons/tab-saving-light-4.png +0 -0
- drowse/web/dist/icons/tab-saving-light-40.png +0 -0
- drowse/web/dist/icons/tab-saving-light-41.png +0 -0
- drowse/web/dist/icons/tab-saving-light-42.png +0 -0
- drowse/web/dist/icons/tab-saving-light-43.png +0 -0
- drowse/web/dist/icons/tab-saving-light-44.png +0 -0
- drowse/web/dist/icons/tab-saving-light-45.png +0 -0
- drowse/web/dist/icons/tab-saving-light-46.png +0 -0
- drowse/web/dist/icons/tab-saving-light-47.png +0 -0
- drowse/web/dist/icons/tab-saving-light-5.png +0 -0
- drowse/web/dist/icons/tab-saving-light-6.png +0 -0
- drowse/web/dist/icons/tab-saving-light-7.png +0 -0
- drowse/web/dist/icons/tab-saving-light-8.png +0 -0
- drowse/web/dist/icons/tab-saving-light-9.png +0 -0
- drowse/web/dist/icons/tab-thinking-0.png +0 -0
- drowse/web/dist/icons/tab-thinking-1.png +0 -0
- drowse/web/dist/icons/tab-thinking-2.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-0.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-1.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-10.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-11.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-12.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-13.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-14.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-15.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-16.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-17.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-18.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-19.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-2.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-20.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-21.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-22.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-23.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-24.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-25.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-26.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-27.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-28.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-29.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-3.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-30.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-31.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-32.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-33.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-34.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-35.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-36.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-37.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-38.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-39.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-4.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-40.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-41.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-42.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-43.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-44.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-45.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-46.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-47.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-5.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-6.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-7.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-8.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-9.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-0.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-1.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-10.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-11.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-12.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-13.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-14.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-15.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-16.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-17.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-18.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-19.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-2.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-20.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-21.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-22.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-23.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-24.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-25.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-26.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-27.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-28.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-29.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-3.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-30.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-31.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-32.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-33.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-34.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-35.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-36.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-37.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-38.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-39.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-4.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-40.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-41.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-42.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-43.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-44.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-45.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-46.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-47.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-5.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-6.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-7.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-8.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-9.png +0 -0
- drowse/web/dist/icons/tab-tokens-dark.png +0 -0
- drowse/web/dist/icons/tab-tokens-light.png +0 -0
- drowse/web/dist/icons/tab-tokens.png +0 -0
- drowse/web/dist/icons/tab-training-0.png +0 -0
- drowse/web/dist/icons/tab-training-1.png +0 -0
- drowse/web/dist/icons/tab-training-2.png +0 -0
- drowse/web/dist/icons/tab-training-dark-0.png +0 -0
- drowse/web/dist/icons/tab-training-dark-1.png +0 -0
- drowse/web/dist/icons/tab-training-dark-10.png +0 -0
- drowse/web/dist/icons/tab-training-dark-11.png +0 -0
- drowse/web/dist/icons/tab-training-dark-12.png +0 -0
- drowse/web/dist/icons/tab-training-dark-13.png +0 -0
- drowse/web/dist/icons/tab-training-dark-14.png +0 -0
- drowse/web/dist/icons/tab-training-dark-15.png +0 -0
- drowse/web/dist/icons/tab-training-dark-16.png +0 -0
- drowse/web/dist/icons/tab-training-dark-17.png +0 -0
- drowse/web/dist/icons/tab-training-dark-18.png +0 -0
- drowse/web/dist/icons/tab-training-dark-19.png +0 -0
- drowse/web/dist/icons/tab-training-dark-2.png +0 -0
- drowse/web/dist/icons/tab-training-dark-20.png +0 -0
- drowse/web/dist/icons/tab-training-dark-21.png +0 -0
- drowse/web/dist/icons/tab-training-dark-22.png +0 -0
- drowse/web/dist/icons/tab-training-dark-23.png +0 -0
- drowse/web/dist/icons/tab-training-dark-24.png +0 -0
- drowse/web/dist/icons/tab-training-dark-25.png +0 -0
- drowse/web/dist/icons/tab-training-dark-26.png +0 -0
- drowse/web/dist/icons/tab-training-dark-27.png +0 -0
- drowse/web/dist/icons/tab-training-dark-28.png +0 -0
- drowse/web/dist/icons/tab-training-dark-29.png +0 -0
- drowse/web/dist/icons/tab-training-dark-3.png +0 -0
- drowse/web/dist/icons/tab-training-dark-30.png +0 -0
- drowse/web/dist/icons/tab-training-dark-31.png +0 -0
- drowse/web/dist/icons/tab-training-dark-32.png +0 -0
- drowse/web/dist/icons/tab-training-dark-33.png +0 -0
- drowse/web/dist/icons/tab-training-dark-34.png +0 -0
- drowse/web/dist/icons/tab-training-dark-35.png +0 -0
- drowse/web/dist/icons/tab-training-dark-36.png +0 -0
- drowse/web/dist/icons/tab-training-dark-37.png +0 -0
- drowse/web/dist/icons/tab-training-dark-38.png +0 -0
- drowse/web/dist/icons/tab-training-dark-39.png +0 -0
- drowse/web/dist/icons/tab-training-dark-4.png +0 -0
- drowse/web/dist/icons/tab-training-dark-40.png +0 -0
- drowse/web/dist/icons/tab-training-dark-41.png +0 -0
- drowse/web/dist/icons/tab-training-dark-42.png +0 -0
- drowse/web/dist/icons/tab-training-dark-43.png +0 -0
- drowse/web/dist/icons/tab-training-dark-44.png +0 -0
- drowse/web/dist/icons/tab-training-dark-45.png +0 -0
- drowse/web/dist/icons/tab-training-dark-46.png +0 -0
- drowse/web/dist/icons/tab-training-dark-47.png +0 -0
- drowse/web/dist/icons/tab-training-dark-5.png +0 -0
- drowse/web/dist/icons/tab-training-dark-6.png +0 -0
- drowse/web/dist/icons/tab-training-dark-7.png +0 -0
- drowse/web/dist/icons/tab-training-dark-8.png +0 -0
- drowse/web/dist/icons/tab-training-dark-9.png +0 -0
- drowse/web/dist/icons/tab-training-light-0.png +0 -0
- drowse/web/dist/icons/tab-training-light-1.png +0 -0
- drowse/web/dist/icons/tab-training-light-10.png +0 -0
- drowse/web/dist/icons/tab-training-light-11.png +0 -0
- drowse/web/dist/icons/tab-training-light-12.png +0 -0
- drowse/web/dist/icons/tab-training-light-13.png +0 -0
- drowse/web/dist/icons/tab-training-light-14.png +0 -0
- drowse/web/dist/icons/tab-training-light-15.png +0 -0
- drowse/web/dist/icons/tab-training-light-16.png +0 -0
- drowse/web/dist/icons/tab-training-light-17.png +0 -0
- drowse/web/dist/icons/tab-training-light-18.png +0 -0
- drowse/web/dist/icons/tab-training-light-19.png +0 -0
- drowse/web/dist/icons/tab-training-light-2.png +0 -0
- drowse/web/dist/icons/tab-training-light-20.png +0 -0
- drowse/web/dist/icons/tab-training-light-21.png +0 -0
- drowse/web/dist/icons/tab-training-light-22.png +0 -0
- drowse/web/dist/icons/tab-training-light-23.png +0 -0
- drowse/web/dist/icons/tab-training-light-24.png +0 -0
- drowse/web/dist/icons/tab-training-light-25.png +0 -0
- drowse/web/dist/icons/tab-training-light-26.png +0 -0
- drowse/web/dist/icons/tab-training-light-27.png +0 -0
- drowse/web/dist/icons/tab-training-light-28.png +0 -0
- drowse/web/dist/icons/tab-training-light-29.png +0 -0
- drowse/web/dist/icons/tab-training-light-3.png +0 -0
- drowse/web/dist/icons/tab-training-light-30.png +0 -0
- drowse/web/dist/icons/tab-training-light-31.png +0 -0
- drowse/web/dist/icons/tab-training-light-32.png +0 -0
- drowse/web/dist/icons/tab-training-light-33.png +0 -0
- drowse/web/dist/icons/tab-training-light-34.png +0 -0
- drowse/web/dist/icons/tab-training-light-35.png +0 -0
- drowse/web/dist/icons/tab-training-light-36.png +0 -0
- drowse/web/dist/icons/tab-training-light-37.png +0 -0
- drowse/web/dist/icons/tab-training-light-38.png +0 -0
- drowse/web/dist/icons/tab-training-light-39.png +0 -0
- drowse/web/dist/icons/tab-training-light-4.png +0 -0
- drowse/web/dist/icons/tab-training-light-40.png +0 -0
- drowse/web/dist/icons/tab-training-light-41.png +0 -0
- drowse/web/dist/icons/tab-training-light-42.png +0 -0
- drowse/web/dist/icons/tab-training-light-43.png +0 -0
- drowse/web/dist/icons/tab-training-light-44.png +0 -0
- drowse/web/dist/icons/tab-training-light-45.png +0 -0
- drowse/web/dist/icons/tab-training-light-46.png +0 -0
- drowse/web/dist/icons/tab-training-light-47.png +0 -0
- drowse/web/dist/icons/tab-training-light-5.png +0 -0
- drowse/web/dist/icons/tab-training-light-6.png +0 -0
- drowse/web/dist/icons/tab-training-light-7.png +0 -0
- drowse/web/dist/icons/tab-training-light-8.png +0 -0
- drowse/web/dist/icons/tab-training-light-9.png +0 -0
- drowse/web/dist/icons/tab-unsupported-dark.png +0 -0
- drowse/web/dist/icons/tab-unsupported-light.png +0 -0
- drowse/web/dist/icons/tab-unsupported.png +0 -0
- drowse/web/dist/icons/tab-working-0.png +0 -0
- drowse/web/dist/icons/tab-working-1.png +0 -0
- drowse/web/dist/icons/tab-working-2.png +0 -0
- drowse/web/dist/icons/tab-working-dark-0.png +0 -0
- drowse/web/dist/icons/tab-working-dark-1.png +0 -0
- drowse/web/dist/icons/tab-working-dark-10.png +0 -0
- drowse/web/dist/icons/tab-working-dark-11.png +0 -0
- drowse/web/dist/icons/tab-working-dark-12.png +0 -0
- drowse/web/dist/icons/tab-working-dark-13.png +0 -0
- drowse/web/dist/icons/tab-working-dark-14.png +0 -0
- drowse/web/dist/icons/tab-working-dark-15.png +0 -0
- drowse/web/dist/icons/tab-working-dark-16.png +0 -0
- drowse/web/dist/icons/tab-working-dark-17.png +0 -0
- drowse/web/dist/icons/tab-working-dark-18.png +0 -0
- drowse/web/dist/icons/tab-working-dark-19.png +0 -0
- drowse/web/dist/icons/tab-working-dark-2.png +0 -0
- drowse/web/dist/icons/tab-working-dark-20.png +0 -0
- drowse/web/dist/icons/tab-working-dark-21.png +0 -0
- drowse/web/dist/icons/tab-working-dark-22.png +0 -0
- drowse/web/dist/icons/tab-working-dark-23.png +0 -0
- drowse/web/dist/icons/tab-working-dark-24.png +0 -0
- drowse/web/dist/icons/tab-working-dark-25.png +0 -0
- drowse/web/dist/icons/tab-working-dark-26.png +0 -0
- drowse/web/dist/icons/tab-working-dark-27.png +0 -0
- drowse/web/dist/icons/tab-working-dark-28.png +0 -0
- drowse/web/dist/icons/tab-working-dark-29.png +0 -0
- drowse/web/dist/icons/tab-working-dark-3.png +0 -0
- drowse/web/dist/icons/tab-working-dark-30.png +0 -0
- drowse/web/dist/icons/tab-working-dark-31.png +0 -0
- drowse/web/dist/icons/tab-working-dark-32.png +0 -0
- drowse/web/dist/icons/tab-working-dark-33.png +0 -0
- drowse/web/dist/icons/tab-working-dark-34.png +0 -0
- drowse/web/dist/icons/tab-working-dark-35.png +0 -0
- drowse/web/dist/icons/tab-working-dark-36.png +0 -0
- drowse/web/dist/icons/tab-working-dark-37.png +0 -0
- drowse/web/dist/icons/tab-working-dark-38.png +0 -0
- drowse/web/dist/icons/tab-working-dark-39.png +0 -0
- drowse/web/dist/icons/tab-working-dark-4.png +0 -0
- drowse/web/dist/icons/tab-working-dark-40.png +0 -0
- drowse/web/dist/icons/tab-working-dark-41.png +0 -0
- drowse/web/dist/icons/tab-working-dark-42.png +0 -0
- drowse/web/dist/icons/tab-working-dark-43.png +0 -0
- drowse/web/dist/icons/tab-working-dark-44.png +0 -0
- drowse/web/dist/icons/tab-working-dark-45.png +0 -0
- drowse/web/dist/icons/tab-working-dark-46.png +0 -0
- drowse/web/dist/icons/tab-working-dark-47.png +0 -0
- drowse/web/dist/icons/tab-working-dark-5.png +0 -0
- drowse/web/dist/icons/tab-working-dark-6.png +0 -0
- drowse/web/dist/icons/tab-working-dark-7.png +0 -0
- drowse/web/dist/icons/tab-working-dark-8.png +0 -0
- drowse/web/dist/icons/tab-working-dark-9.png +0 -0
- drowse/web/dist/icons/tab-working-light-0.png +0 -0
- drowse/web/dist/icons/tab-working-light-1.png +0 -0
- drowse/web/dist/icons/tab-working-light-10.png +0 -0
- drowse/web/dist/icons/tab-working-light-11.png +0 -0
- drowse/web/dist/icons/tab-working-light-12.png +0 -0
- drowse/web/dist/icons/tab-working-light-13.png +0 -0
- drowse/web/dist/icons/tab-working-light-14.png +0 -0
- drowse/web/dist/icons/tab-working-light-15.png +0 -0
- drowse/web/dist/icons/tab-working-light-16.png +0 -0
- drowse/web/dist/icons/tab-working-light-17.png +0 -0
- drowse/web/dist/icons/tab-working-light-18.png +0 -0
- drowse/web/dist/icons/tab-working-light-19.png +0 -0
- drowse/web/dist/icons/tab-working-light-2.png +0 -0
- drowse/web/dist/icons/tab-working-light-20.png +0 -0
- drowse/web/dist/icons/tab-working-light-21.png +0 -0
- drowse/web/dist/icons/tab-working-light-22.png +0 -0
- drowse/web/dist/icons/tab-working-light-23.png +0 -0
- drowse/web/dist/icons/tab-working-light-24.png +0 -0
- drowse/web/dist/icons/tab-working-light-25.png +0 -0
- drowse/web/dist/icons/tab-working-light-26.png +0 -0
- drowse/web/dist/icons/tab-working-light-27.png +0 -0
- drowse/web/dist/icons/tab-working-light-28.png +0 -0
- drowse/web/dist/icons/tab-working-light-29.png +0 -0
- drowse/web/dist/icons/tab-working-light-3.png +0 -0
- drowse/web/dist/icons/tab-working-light-30.png +0 -0
- drowse/web/dist/icons/tab-working-light-31.png +0 -0
- drowse/web/dist/icons/tab-working-light-32.png +0 -0
- drowse/web/dist/icons/tab-working-light-33.png +0 -0
- drowse/web/dist/icons/tab-working-light-34.png +0 -0
- drowse/web/dist/icons/tab-working-light-35.png +0 -0
- drowse/web/dist/icons/tab-working-light-36.png +0 -0
- drowse/web/dist/icons/tab-working-light-37.png +0 -0
- drowse/web/dist/icons/tab-working-light-38.png +0 -0
- drowse/web/dist/icons/tab-working-light-39.png +0 -0
- drowse/web/dist/icons/tab-working-light-4.png +0 -0
- drowse/web/dist/icons/tab-working-light-40.png +0 -0
- drowse/web/dist/icons/tab-working-light-41.png +0 -0
- drowse/web/dist/icons/tab-working-light-42.png +0 -0
- drowse/web/dist/icons/tab-working-light-43.png +0 -0
- drowse/web/dist/icons/tab-working-light-44.png +0 -0
- drowse/web/dist/icons/tab-working-light-45.png +0 -0
- drowse/web/dist/icons/tab-working-light-46.png +0 -0
- drowse/web/dist/icons/tab-working-light-47.png +0 -0
- drowse/web/dist/icons/tab-working-light-5.png +0 -0
- drowse/web/dist/icons/tab-working-light-6.png +0 -0
- drowse/web/dist/icons/tab-working-light-7.png +0 -0
- drowse/web/dist/icons/tab-working-light-8.png +0 -0
- drowse/web/dist/icons/tab-working-light-9.png +0 -0
- drowse/web/dist/index.html +34 -0
- drowse/web/dist/social/drowse.png +0 -0
- drowse/web/dist/social/drowse.svg +6 -0
- drowse/web/dist/theme-init.js +25 -0
- drowse/web/routes.py +118 -0
- drowse_ai-5.3.1.dist-info/METADATA +632 -0
- drowse_ai-5.3.1.dist-info/RECORD +1341 -0
- drowse_ai-5.3.1.dist-info/WHEEL +5 -0
- drowse_ai-5.3.1.dist-info/entry_points.txt +2 -0
- drowse_ai-5.3.1.dist-info/licenses/LICENSE +661 -0
- drowse_ai-5.3.1.dist-info/top_level.txt +1 -0
drowse/core/jlens_fit.py
ADDED
|
@@ -0,0 +1,1305 @@
|
|
|
1
|
+
"""The Jacobian-lens estimator — the only backward-pass code in drowse.
|
|
2
|
+
|
|
3
|
+
Fits ``J_l = E[∂h_final/∂h_l]`` per source layer over a text corpus. It lives
|
|
4
|
+
apart from :mod:`drowse.core.jlens` because nothing on a runtime path needs it:
|
|
5
|
+
probes, ``jlens/<word>`` steering atoms, the live workspace readout, and the
|
|
6
|
+
token-drilldown replay all want the readout math alone, and they import it per
|
|
7
|
+
decode step.
|
|
8
|
+
|
|
9
|
+
Estimator (reference: github.com/anthropics/jacobian-lens): consecutive prompts
|
|
10
|
+
share one right-padded autograd graph, then batched VJPs recover
|
|
11
|
+
``dim_batch`` output rows per backward without replicating the forward graph.
|
|
12
|
+
For output dimension ``r``, the cotangent is injected at every valid target
|
|
13
|
+
position, so the gradient at source position ``t`` is
|
|
14
|
+
``Σ_{t'≥t} ∂h_final[t',r]/∂h_l[t]``; source positions are
|
|
15
|
+
averaged within each prompt and prompt Jacobians are then summed, preserving
|
|
16
|
+
exact equal-prompt weighting even for ragged lengths. The first
|
|
17
|
+
``SKIP_FIRST_POSITIONS`` positions (attention sinks) and the final position are
|
|
18
|
+
excluded from both cotangents and the source mean. Backends without batched-VJP
|
|
19
|
+
coverage fall back to exact unreplicated scalar VJPs; replicated VJPs remain an
|
|
20
|
+
explicit reference mode.
|
|
21
|
+
|
|
22
|
+
The fit builds its own autograd-enabled forward (``torch.enable_grad()`` + a
|
|
23
|
+
grad-seeding output hook on the first fitted block) — the ``inference_mode``
|
|
24
|
+
capture machinery in ``capture.py`` cannot be reused, because inference tensors
|
|
25
|
+
never re-enter autograd. Per-layer grads come from
|
|
26
|
+
``torch.autograd.grad(final, sources)`` — NOT ``backward()`` +
|
|
27
|
+
``retain_grad()`` (``.grad`` accumulates across the multi-backward loop and
|
|
28
|
+
would corrupt the one-hot-cotangent rows) — which also stops the graph walk at
|
|
29
|
+
the shallowest requested source layer, so a band-restricted fit never
|
|
30
|
+
backprops below its lowest source. A terminal-layer hook captures the target
|
|
31
|
+
residual and aborts the rest of the forward before the final norm and
|
|
32
|
+
full-vocabulary head. Row blocks are staged in bounded per-layer stripes,
|
|
33
|
+
validated after transfer, and committed directly into the CPU fp32 cross-prompt
|
|
34
|
+
accumulator; CUDA double-buffers those stripes so D2H for one can overlap the
|
|
35
|
+
next backward block. If a later VJP OOMs, the graph is rebuilt at the first
|
|
36
|
+
uncommitted row, and prompt-width backoff splits only that group while
|
|
37
|
+
preserving its exact committed prefix and every prior microbatch. The MPS sync
|
|
38
|
+
budget is bounded from both sides: a fully unsynced loop can exhaust Metal's
|
|
39
|
+
asynchronous command queue, so periodic drains plus the zero-row guard remain.
|
|
40
|
+
The fit is compute-bound (each prompt ≈ ``d_model × 2`` forward-equivalents
|
|
41
|
+
of backward, dim_batch-invariant); restricting ``source_layers`` is the one
|
|
42
|
+
lever that removes work. The fp32 accumulator is persisted losslessly so saved,
|
|
43
|
+
resumed, and loaded lenses retain the estimator's precision.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
from __future__ import annotations
|
|
47
|
+
|
|
48
|
+
import logging
|
|
49
|
+
import os
|
|
50
|
+
import time
|
|
51
|
+
from collections.abc import Callable, Mapping, Sequence
|
|
52
|
+
from typing import Any
|
|
53
|
+
|
|
54
|
+
import torch
|
|
55
|
+
from torch import nn
|
|
56
|
+
|
|
57
|
+
from drowse.core.errors import is_out_of_memory_error
|
|
58
|
+
from drowse.core.jlens import (
|
|
59
|
+
DEFAULT_CHECKPOINT_EVERY,
|
|
60
|
+
DEFAULT_DIM_BATCH,
|
|
61
|
+
DEFAULT_MPS_PROMPT_BATCH,
|
|
62
|
+
DEFAULT_PROMPT_BATCH,
|
|
63
|
+
DEFAULT_SEQ_LEN,
|
|
64
|
+
SKIP_FIRST_POSITIONS,
|
|
65
|
+
JacobianLens,
|
|
66
|
+
JacobianLensCancelled,
|
|
67
|
+
JacobianLensError,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
log = logging.getLogger(__name__)
|
|
71
|
+
|
|
72
|
+
#: Backward passes between queue drains on MPS. Metal reports command-queue
|
|
73
|
+
#: exhaustion as an *asynchronous* command-buffer error — no Python exception,
|
|
74
|
+
#: the encoded ops silently never complete — so an unsynchronized pass loop
|
|
75
|
+
#: that runs ahead of the device turns into all-zero gradients, not an OOM.
|
|
76
|
+
#: A bounded drain every few passes caps the in-flight transients; the
|
|
77
|
+
#: all-zero fold guard below catches whatever still slips through.
|
|
78
|
+
_MPS_SYNC_EVERY_PASSES = 4
|
|
79
|
+
#: A complete fp32 lens per staging tier is a multi-GiB cliff. Keep only this
|
|
80
|
+
#: many output rows per layer on device + host, validate/commit the stripe, and
|
|
81
|
+
#: resume from the first uncommitted row after an OOM.
|
|
82
|
+
_ROW_STRIPE = 256
|
|
83
|
+
#: Maximum fp32 bytes held by one device/host stripe slot. A row spans every
|
|
84
|
+
#: fitted source layer, so a fixed 256-row allocation grows into GiBs on large
|
|
85
|
+
#: hidden sizes / all-layer fits and can OOM independently of ``dim_batch``.
|
|
86
|
+
#: This is a per-slot budget (CUDA may use two slots for overlap); the active
|
|
87
|
+
#: VJP block remains the hard minimum so one result block always fits.
|
|
88
|
+
_ROW_STRIPE_BYTES_PER_SLOT = 128 * 1024**2
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _row_stripe_capacity(
|
|
92
|
+
d_model: int,
|
|
93
|
+
n_sources: int,
|
|
94
|
+
dim_batch: int,
|
|
95
|
+
*,
|
|
96
|
+
byte_budget: int = _ROW_STRIPE_BYTES_PER_SLOT,
|
|
97
|
+
) -> int:
|
|
98
|
+
"""Largest bounded stripe that holds at least one complete VJP block."""
|
|
99
|
+
if d_model <= 0 or n_sources <= 0 or dim_batch <= 0 or byte_budget <= 0:
|
|
100
|
+
raise ValueError("stripe dimensions and byte_budget must be positive")
|
|
101
|
+
row_bytes = int(d_model) * int(n_sources) * 4 # fp32 staging
|
|
102
|
+
budget_rows = max(1, int(byte_budget) // row_bytes)
|
|
103
|
+
return min(int(d_model), _ROW_STRIPE, max(int(dim_batch), budget_rows))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _smaller_row_stripe_capacity(capacity: int, dim_batch: int) -> int | None:
|
|
107
|
+
"""Next allocation-backoff capacity, or ``None`` at the VJP-block floor."""
|
|
108
|
+
floor = max(1, int(dim_batch))
|
|
109
|
+
if int(capacity) <= floor:
|
|
110
|
+
return None
|
|
111
|
+
return max(floor, int(capacity) // 2)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def _output_tensor(output: Any) -> torch.Tensor:
|
|
115
|
+
"""A transformer block's residual output (blocks return tuples or tensors)."""
|
|
116
|
+
return output[0] if isinstance(output, tuple) else output
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class _BatchedVjpUnavailable(RuntimeError):
|
|
120
|
+
"""Internal signal: retry the current prompt with scalar VJPs."""
|
|
121
|
+
|
|
122
|
+
def __init__(self, committed_until: int) -> None:
|
|
123
|
+
super().__init__("batched VJP unavailable")
|
|
124
|
+
self.committed_until = committed_until
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class _FitForwardComplete(BaseException):
|
|
128
|
+
"""Private control flow: final residual captured; skip norm + LM head."""
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class _PromptRowsCommitted(RuntimeError):
|
|
132
|
+
"""OOM after durable-in-accumulator rows; resume at ``committed_until``."""
|
|
133
|
+
|
|
134
|
+
def __init__(self, committed_until: int, message: str) -> None:
|
|
135
|
+
super().__init__(message)
|
|
136
|
+
self.committed_until = committed_until
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def _resolve_vjp_mode(mode: str) -> str:
|
|
140
|
+
env = os.environ.get("DROWSE_JLENS_VJP")
|
|
141
|
+
raw = (env or mode).strip().lower()
|
|
142
|
+
if raw not in {"auto", "batched", "scalar", "replicated"}:
|
|
143
|
+
raise ValueError(
|
|
144
|
+
"vjp_mode must be 'auto', 'batched', 'scalar', or 'replicated' "
|
|
145
|
+
f"(got {mode!r})"
|
|
146
|
+
)
|
|
147
|
+
return raw
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def _looks_like_batched_vjp_unsupported(exc: RuntimeError) -> bool:
|
|
151
|
+
msg = str(exc).lower()
|
|
152
|
+
if is_out_of_memory_error(exc):
|
|
153
|
+
return False
|
|
154
|
+
return any(
|
|
155
|
+
needle in msg
|
|
156
|
+
for needle in (
|
|
157
|
+
"is_grads_batched",
|
|
158
|
+
"vmap",
|
|
159
|
+
"batching rule",
|
|
160
|
+
"batched grad",
|
|
161
|
+
"not implemented",
|
|
162
|
+
"not supported",
|
|
163
|
+
)
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class _MeanSourceProbe(torch.autograd.Function):
|
|
168
|
+
"""Transparent residual identity with a mean-position probe derivative.
|
|
169
|
+
|
|
170
|
+
The Jacobian estimator needs only the mean source-position derivative, not
|
|
171
|
+
the full ``[T,D]`` gradient at every fitted layer. A zero-valued ``[B,D]``
|
|
172
|
+
shared perturbation over the valid source positions has exactly that
|
|
173
|
+
derivative. This custom identity leaves the forward byte-for-byte
|
|
174
|
+
unchanged while collapsing each source gradient inside autograd, before it
|
|
175
|
+
can become a retained ``[rows,B,T,D]`` result.
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
generate_vmap_rule = True
|
|
179
|
+
|
|
180
|
+
@staticmethod
|
|
181
|
+
def forward(
|
|
182
|
+
residual: torch.Tensor,
|
|
183
|
+
probe: torch.Tensor,
|
|
184
|
+
counts: torch.Tensor,
|
|
185
|
+
source_start: int,
|
|
186
|
+
) -> torch.Tensor:
|
|
187
|
+
del probe, counts, source_start
|
|
188
|
+
return residual
|
|
189
|
+
|
|
190
|
+
@staticmethod
|
|
191
|
+
def setup_context(ctx: Any, inputs: tuple[Any, ...], output: Any) -> None:
|
|
192
|
+
del output
|
|
193
|
+
_residual, _probe, counts, source_start = inputs
|
|
194
|
+
ctx.save_for_backward(counts)
|
|
195
|
+
ctx.source_start = int(source_start)
|
|
196
|
+
|
|
197
|
+
@staticmethod
|
|
198
|
+
def backward(
|
|
199
|
+
ctx: Any, *grad_outputs: torch.Tensor,
|
|
200
|
+
) -> tuple[torch.Tensor, torch.Tensor, None, None]:
|
|
201
|
+
if len(grad_outputs) != 1:
|
|
202
|
+
raise JacobianLensError("mean-source probe expected one gradient output")
|
|
203
|
+
grad_output = grad_outputs[0]
|
|
204
|
+
(counts,) = ctx.saved_tensors
|
|
205
|
+
# Target cotangents exist only at valid content positions. In a causal
|
|
206
|
+
# LM, excluded final/padded source positions cannot influence an earlier
|
|
207
|
+
# selected target, so their gradients are exactly zero; slicing the
|
|
208
|
+
# deliberately excluded prefix is therefore the exact valid-source sum.
|
|
209
|
+
pooled = grad_output[..., ctx.source_start :, :].sum(
|
|
210
|
+
dim=-2, dtype=torch.float32,
|
|
211
|
+
)
|
|
212
|
+
shape = [1] * (pooled.ndim - 2) + [int(counts.numel()), 1]
|
|
213
|
+
probe_grad = pooled / counts.reshape(shape)
|
|
214
|
+
return grad_output, probe_grad, None, None
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def _install_fit_hooks(
|
|
218
|
+
layer_modules: Sequence[nn.Module],
|
|
219
|
+
sources: Sequence[int],
|
|
220
|
+
final_idx: int,
|
|
221
|
+
hook_state: dict[str, Any],
|
|
222
|
+
) -> tuple[dict[int, torch.Tensor], list[Any]]:
|
|
223
|
+
captured: dict[int, torch.Tensor] = {}
|
|
224
|
+
handles: list[Any] = []
|
|
225
|
+
|
|
226
|
+
first_source = min(sources)
|
|
227
|
+
|
|
228
|
+
def make_capture(idx: int) -> Callable[..., Any]:
|
|
229
|
+
def hook(_module: nn.Module, _args: tuple[Any, ...], output: Any) -> Any:
|
|
230
|
+
residual = _output_tensor(output)
|
|
231
|
+
if idx in sources:
|
|
232
|
+
# Seed at the source block's OUTPUT. Autograd gradients target
|
|
233
|
+
# this residual, so retaining the block's QKV/MLP internals
|
|
234
|
+
# cannot affect J but costs a full block of graph memory.
|
|
235
|
+
if idx == first_source:
|
|
236
|
+
residual = residual.detach().clone()
|
|
237
|
+
counts = hook_state.get("source_counts")
|
|
238
|
+
source_start = hook_state.get("source_start")
|
|
239
|
+
if not isinstance(counts, torch.Tensor) or source_start is None:
|
|
240
|
+
raise JacobianLensError("J-lens source probe state was not prepared")
|
|
241
|
+
probe = torch.zeros(
|
|
242
|
+
residual.shape[0], residual.shape[-1],
|
|
243
|
+
device=residual.device, dtype=torch.float32,
|
|
244
|
+
requires_grad=True,
|
|
245
|
+
)
|
|
246
|
+
residual = _MeanSourceProbe.apply(
|
|
247
|
+
residual, probe, counts, int(source_start),
|
|
248
|
+
)
|
|
249
|
+
captured[idx] = probe
|
|
250
|
+
if isinstance(output, tuple):
|
|
251
|
+
return (residual, *output[1:])
|
|
252
|
+
return residual
|
|
253
|
+
captured[idx] = residual
|
|
254
|
+
if idx == final_idx:
|
|
255
|
+
raise _FitForwardComplete()
|
|
256
|
+
return None
|
|
257
|
+
|
|
258
|
+
return hook
|
|
259
|
+
|
|
260
|
+
# Everything through the LOWEST source block runs graph-free. The returned
|
|
261
|
+
# leaf then seeds later blocks, so restricted fits retain no graph below
|
|
262
|
+
# the fitted band and no internals for its first block.
|
|
263
|
+
for idx in {*sources, final_idx}:
|
|
264
|
+
handles.append(layer_modules[idx].register_forward_hook(make_capture(idx)))
|
|
265
|
+
return captured, handles
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def fit_jacobian_lens(
|
|
269
|
+
model: Any,
|
|
270
|
+
tokenizer: Any,
|
|
271
|
+
prompts: Sequence[str],
|
|
272
|
+
layer_modules: Sequence[nn.Module],
|
|
273
|
+
*,
|
|
274
|
+
source_layers: Sequence[int] | None = None,
|
|
275
|
+
dim_batch: int = DEFAULT_DIM_BATCH,
|
|
276
|
+
prompt_batch: int | None = None,
|
|
277
|
+
max_seq_len: int = DEFAULT_SEQ_LEN,
|
|
278
|
+
skip_first: int = SKIP_FIRST_POSITIONS,
|
|
279
|
+
checkpoint_every: int = DEFAULT_CHECKPOINT_EVERY,
|
|
280
|
+
checkpoint_accumulator_cb: (
|
|
281
|
+
Callable[[Mapping[int, torch.Tensor], int, int], None] | None
|
|
282
|
+
) = None,
|
|
283
|
+
on_progress: Callable[[str], None] | None = None,
|
|
284
|
+
progress_base: int = 0,
|
|
285
|
+
input_id_rows: Sequence[Sequence[int]] | None = None,
|
|
286
|
+
vjp_mode: str = "auto",
|
|
287
|
+
cancel_event: Any | None = None,
|
|
288
|
+
suppress_terminal_checkpoint: bool = False,
|
|
289
|
+
initial_lens: JacobianLens | None = None,
|
|
290
|
+
) -> JacobianLens:
|
|
291
|
+
"""Fit ``J_l`` for every source layer over ``prompts``.
|
|
292
|
+
|
|
293
|
+
One graph per prompt microbatch + ``ceil(d_model/dim_batch)`` backwards
|
|
294
|
+
(see the module docstring for the estimator). ``initial_lens`` transfers
|
|
295
|
+
ownership of an existing averaged prefix
|
|
296
|
+
to the estimator: its fp32 matrices are converted to weighted sums in
|
|
297
|
+
place and become the accumulator, so resume never allocates a second full
|
|
298
|
+
matrix set.
|
|
299
|
+
``checkpoint_accumulator_cb`` is the allocation-light persistence seam: it
|
|
300
|
+
receives the raw fp32 sums, completed prompt count, and hidden size without
|
|
301
|
+
materializing a second full averaged lens. ``input_id_rows`` is the
|
|
302
|
+
pre-tokenized sibling of ``prompts``. When supplied
|
|
303
|
+
it must be aligned 1:1 with ``prompts`` and already reflect the caller's
|
|
304
|
+
truncation/hash policy; the fit still applies ``max_seq_len`` defensively.
|
|
305
|
+
This lets session-level resume/filtering reuse the IDs it already computed
|
|
306
|
+
instead of tokenizing the corpus a second time. ``vjp_mode="batched"``
|
|
307
|
+
computes each output-dim block with ``is_grads_batched=True`` from a single
|
|
308
|
+
prompt forward instead of replicating the forward graph; ``"auto"`` tries
|
|
309
|
+
that path first and falls back to exact scalar VJPs if the backend lacks
|
|
310
|
+
vmap coverage. ``prompt_batch`` controls consecutive ragged prompts per
|
|
311
|
+
graph (CPU/CUDA default 4, MPS default 2); both prompt and output-dimension
|
|
312
|
+
batch widths back off independently on device OOM and stay below a proven
|
|
313
|
+
failure ceiling for the rest of the fit.
|
|
314
|
+
|
|
315
|
+
Raises :class:`JacobianLensError` when no prompt in the corpus is long
|
|
316
|
+
enough (each needs > ``skip_first + 1`` tokens).
|
|
317
|
+
"""
|
|
318
|
+
device = next(model.parameters()).device
|
|
319
|
+
if dim_batch <= 0:
|
|
320
|
+
raise ValueError("dim_batch must be > 0")
|
|
321
|
+
if prompt_batch is not None and prompt_batch <= 0:
|
|
322
|
+
raise ValueError("prompt_batch must be > 0")
|
|
323
|
+
if max_seq_len <= 0:
|
|
324
|
+
raise ValueError("max_seq_len must be > 0")
|
|
325
|
+
if checkpoint_every <= 0:
|
|
326
|
+
raise ValueError("checkpoint_every must be > 0")
|
|
327
|
+
if progress_base < 0:
|
|
328
|
+
raise ValueError("progress_base must be >= 0")
|
|
329
|
+
n_layers = len(layer_modules)
|
|
330
|
+
final_idx = n_layers - 1
|
|
331
|
+
sources = (
|
|
332
|
+
sorted(set(source_layers)) if source_layers is not None else list(range(final_idx))
|
|
333
|
+
)
|
|
334
|
+
if not sources:
|
|
335
|
+
raise ValueError("source_layers must name at least one source layer")
|
|
336
|
+
if any(l < 0 or l >= final_idx for l in sources):
|
|
337
|
+
raise ValueError(
|
|
338
|
+
f"source_layers must lie in [0, {final_idx}) — the final layer is "
|
|
339
|
+
f"the transport target, not a source; got {sources}"
|
|
340
|
+
)
|
|
341
|
+
initial_n_prompts = 0
|
|
342
|
+
initial_acc: dict[int, torch.Tensor] | None = None
|
|
343
|
+
if initial_lens is not None:
|
|
344
|
+
if initial_lens.source_layers != sources:
|
|
345
|
+
raise ValueError(
|
|
346
|
+
"initial_lens source layers must exactly match the fit request"
|
|
347
|
+
)
|
|
348
|
+
if initial_lens.n_prompts <= 0:
|
|
349
|
+
raise ValueError("initial_lens must contain at least one prompt")
|
|
350
|
+
initial_n_prompts = int(initial_lens.n_prompts)
|
|
351
|
+
initial_acc = initial_lens.jacobians
|
|
352
|
+
if input_id_rows is not None and len(input_id_rows) != len(prompts):
|
|
353
|
+
raise ValueError(
|
|
354
|
+
"input_id_rows must be aligned with prompts "
|
|
355
|
+
f"({len(input_id_rows)} != {len(prompts)})"
|
|
356
|
+
)
|
|
357
|
+
requested_vjp_mode = _resolve_vjp_mode(vjp_mode)
|
|
358
|
+
|
|
359
|
+
# Prepare once. Session orchestration normally supplies token IDs it already
|
|
360
|
+
# hashed for resume; direct callers get the same one-time tokenization here.
|
|
361
|
+
prepared_rows: list[tuple[int, torch.Tensor]] = []
|
|
362
|
+
for prompt_idx, prompt in enumerate(prompts):
|
|
363
|
+
if input_id_rows is None:
|
|
364
|
+
ids_cpu = tokenizer(prompt, return_tensors="pt")["input_ids"][
|
|
365
|
+
0, :max_seq_len
|
|
366
|
+
].to(dtype=torch.long, device="cpu")
|
|
367
|
+
else:
|
|
368
|
+
row = [int(tok) for tok in input_id_rows[prompt_idx]][:max_seq_len]
|
|
369
|
+
ids_cpu = torch.tensor(row, dtype=torch.long)
|
|
370
|
+
if int(ids_cpu.numel()) < skip_first + 2:
|
|
371
|
+
log.warning(
|
|
372
|
+
"jlens: skipping prompt %d — %d tokens, need > %d",
|
|
373
|
+
prompt_idx, int(ids_cpu.numel()), skip_first + 1,
|
|
374
|
+
)
|
|
375
|
+
continue
|
|
376
|
+
prepared_rows.append((prompt_idx, ids_cpu))
|
|
377
|
+
|
|
378
|
+
if not prepared_rows:
|
|
379
|
+
raise JacobianLensError(
|
|
380
|
+
f"no usable prompts: every prompt had <= {skip_first + 1} tokens"
|
|
381
|
+
)
|
|
382
|
+
if cancel_event is not None and cancel_event.is_set():
|
|
383
|
+
raise JacobianLensCancelled("Jacobian-lens fit cancelled before start")
|
|
384
|
+
if initial_acc is not None:
|
|
385
|
+
for tensor in initial_acc.values():
|
|
386
|
+
tensor.mul_(initial_n_prompts)
|
|
387
|
+
assert initial_lens is not None
|
|
388
|
+
initial_lens._atom_norm_cache.clear()
|
|
389
|
+
|
|
390
|
+
# Cross-prompt state, threaded through every per-prompt sweep: the CPU
|
|
391
|
+
# fp32 accumulator, plus per-layer on-device row buffers reused across
|
|
392
|
+
# prompts (allocated once d_model is known).
|
|
393
|
+
state: dict[str, Any] = {
|
|
394
|
+
"acc": initial_acc,
|
|
395
|
+
"d_model": initial_lens.d_model if initial_lens is not None else 0,
|
|
396
|
+
"stripe_rows": None,
|
|
397
|
+
"host_stripes": None,
|
|
398
|
+
"cuda_transfer_stream": None,
|
|
399
|
+
"vjp_mode": "batched" if requested_vjp_mode == "auto" else requested_vjp_mode,
|
|
400
|
+
"requested_vjp_mode": requested_vjp_mode,
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
n_done = 0
|
|
404
|
+
fit_started = time.perf_counter()
|
|
405
|
+
active_dim_batch = int(dim_batch)
|
|
406
|
+
target_prompt_batch = int(
|
|
407
|
+
1 if requested_vjp_mode in {"scalar", "replicated"}
|
|
408
|
+
else (
|
|
409
|
+
prompt_batch
|
|
410
|
+
if prompt_batch is not None
|
|
411
|
+
else (
|
|
412
|
+
DEFAULT_MPS_PROMPT_BATCH
|
|
413
|
+
if device.type == "mps"
|
|
414
|
+
else DEFAULT_PROMPT_BATCH
|
|
415
|
+
)
|
|
416
|
+
)
|
|
417
|
+
)
|
|
418
|
+
active_prompt_batch = target_prompt_batch
|
|
419
|
+
prompt_bad_ceiling: int | None = None
|
|
420
|
+
cursor = 0
|
|
421
|
+
next_checkpoint = checkpoint_every
|
|
422
|
+
# A task says: contributions for prompts [start:end] below ``row_start``
|
|
423
|
+
# are already in the accumulator; fit only the remaining output rows. A
|
|
424
|
+
# prompt-width OOM can therefore split the task without erasing earlier
|
|
425
|
+
# microbatches or double-counting its committed row prefix. ``n_done`` is
|
|
426
|
+
# advanced only after every task in the original group completes, keeping
|
|
427
|
+
# progress/checkpoints aligned to internally consistent prompt boundaries.
|
|
428
|
+
pending_tasks: list[tuple[int, int, int]] = []
|
|
429
|
+
pending_group_width = 0
|
|
430
|
+
|
|
431
|
+
hook_state: dict[str, Any] = {}
|
|
432
|
+
captured, handles = _install_fit_hooks(
|
|
433
|
+
layer_modules, sources, final_idx, hook_state,
|
|
434
|
+
)
|
|
435
|
+
state["hook_state"] = hook_state
|
|
436
|
+
try:
|
|
437
|
+
with torch.enable_grad():
|
|
438
|
+
while cursor < len(prepared_rows):
|
|
439
|
+
if not pending_tasks:
|
|
440
|
+
# Cancellation is observed only between complete prompt
|
|
441
|
+
# groups. During a split recovery the accumulator carries
|
|
442
|
+
# committed rows for the whole group but ``n_done`` quite
|
|
443
|
+
# deliberately does not count it yet.
|
|
444
|
+
if cancel_event is not None and cancel_event.is_set():
|
|
445
|
+
if n_done > 0:
|
|
446
|
+
if checkpoint_accumulator_cb is not None:
|
|
447
|
+
checkpoint_accumulator_cb(
|
|
448
|
+
state["acc"],
|
|
449
|
+
initial_n_prompts + n_done,
|
|
450
|
+
state["d_model"],
|
|
451
|
+
)
|
|
452
|
+
raise JacobianLensCancelled(
|
|
453
|
+
f"Jacobian-lens fit cancelled after {n_done} prompts"
|
|
454
|
+
)
|
|
455
|
+
pending_group_width = min(
|
|
456
|
+
active_prompt_batch, len(prepared_rows) - cursor,
|
|
457
|
+
)
|
|
458
|
+
pending_tasks.append(
|
|
459
|
+
(cursor, cursor + pending_group_width, 0),
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
task_start, task_end, task_row_start = pending_tasks.pop(0)
|
|
463
|
+
width = task_end - task_start
|
|
464
|
+
chunk = prepared_rows[task_start:task_end]
|
|
465
|
+
lengths_cpu = torch.tensor(
|
|
466
|
+
[int(row.numel()) for _idx, row in chunk], dtype=torch.long,
|
|
467
|
+
)
|
|
468
|
+
pad_id = getattr(tokenizer, "pad_token_id", None)
|
|
469
|
+
if pad_id is None:
|
|
470
|
+
pad_id = getattr(tokenizer, "eos_token_id", None) or 0
|
|
471
|
+
ids_cpu = torch.nn.utils.rnn.pad_sequence(
|
|
472
|
+
[row for _idx, row in chunk], batch_first=True,
|
|
473
|
+
padding_value=int(pad_id),
|
|
474
|
+
)
|
|
475
|
+
ids = ids_cpu.to(device)
|
|
476
|
+
lengths = lengths_cpu.to(device)
|
|
477
|
+
max_len = int(ids.shape[1])
|
|
478
|
+
attention_mask = (
|
|
479
|
+
(
|
|
480
|
+
torch.arange(max_len, device=device).unsqueeze(0)
|
|
481
|
+
< lengths.unsqueeze(1)
|
|
482
|
+
).to(torch.long)
|
|
483
|
+
if bool((lengths_cpu != max_len).any()) else None
|
|
484
|
+
)
|
|
485
|
+
batch = max(1, min(active_dim_batch, state["d_model"] or active_dim_batch))
|
|
486
|
+
committed_row = task_row_start
|
|
487
|
+
restart_with_smaller_prompts = False
|
|
488
|
+
|
|
489
|
+
def split_current_task(*, row_start: int, max_width: int) -> None:
|
|
490
|
+
"""Prepend exact narrower tasks for this prompt group.
|
|
491
|
+
|
|
492
|
+
Rows below ``row_start`` already contain the aggregate for
|
|
493
|
+
every prompt in the current task, so each child starts at
|
|
494
|
+
that same boundary. Their suffix contributions add to the
|
|
495
|
+
same result as the original ragged microbatch.
|
|
496
|
+
"""
|
|
497
|
+
child_width = max(1, min(int(max_width), width - 1))
|
|
498
|
+
children = [
|
|
499
|
+
(start, min(start + child_width, task_end), row_start)
|
|
500
|
+
for start in range(task_start, task_end, child_width)
|
|
501
|
+
]
|
|
502
|
+
pending_tasks[0:0] = children
|
|
503
|
+
|
|
504
|
+
while True:
|
|
505
|
+
retry_batch: int | None = None
|
|
506
|
+
try:
|
|
507
|
+
_accumulate_prompt_jacobian(
|
|
508
|
+
model, ids, layer_modules, sources, final_idx, state,
|
|
509
|
+
captured=captured, batch=batch, skip_first=skip_first,
|
|
510
|
+
attention_mask=attention_mask, lengths=lengths,
|
|
511
|
+
row_start=committed_row,
|
|
512
|
+
cancel_event=cancel_event,
|
|
513
|
+
)
|
|
514
|
+
# Close the tiny race after the final VJP block: a
|
|
515
|
+
# cancellation that lands after that block's internal
|
|
516
|
+
# check must still prevent this group (especially the
|
|
517
|
+
# terminal group) from being counted and published.
|
|
518
|
+
if cancel_event is not None and cancel_event.is_set():
|
|
519
|
+
raise JacobianLensCancelled(
|
|
520
|
+
"Jacobian-lens fit cancelled after the active "
|
|
521
|
+
"prompt group"
|
|
522
|
+
)
|
|
523
|
+
break
|
|
524
|
+
except _BatchedVjpUnavailable as exc:
|
|
525
|
+
assert requested_vjp_mode == "auto"
|
|
526
|
+
state["vjp_mode"] = "replicated"
|
|
527
|
+
target_prompt_batch = 1
|
|
528
|
+
active_prompt_batch = 1
|
|
529
|
+
durable = max(committed_row, exc.committed_until)
|
|
530
|
+
log.warning(
|
|
531
|
+
"jlens: batched VJP is unavailable on this backend — "
|
|
532
|
+
"falling back to replicated output-row VJPs"
|
|
533
|
+
)
|
|
534
|
+
if width > 1:
|
|
535
|
+
split_current_task(row_start=durable, max_width=1)
|
|
536
|
+
restart_with_smaller_prompts = True
|
|
537
|
+
if durable > task_row_start:
|
|
538
|
+
log.warning(
|
|
539
|
+
"jlens: batched VJP failed after committed "
|
|
540
|
+
"rows; preserving the row prefix while "
|
|
541
|
+
"splitting the prompt group for replicated "
|
|
542
|
+
"mode"
|
|
543
|
+
)
|
|
544
|
+
break
|
|
545
|
+
committed_row = durable
|
|
546
|
+
continue
|
|
547
|
+
except _PromptRowsCommitted as exc:
|
|
548
|
+
committed_row = exc.committed_until
|
|
549
|
+
if _downgrade_cuda_stripe_buffers(state, device):
|
|
550
|
+
_empty_device_cache(device)
|
|
551
|
+
log.warning(
|
|
552
|
+
"jlens: CUDA OOM — dropping the second transfer "
|
|
553
|
+
"slot and retrying from row %d", committed_row,
|
|
554
|
+
)
|
|
555
|
+
continue
|
|
556
|
+
if batch <= 1:
|
|
557
|
+
if width <= 1:
|
|
558
|
+
raise
|
|
559
|
+
# The committed prefix is the exact aggregate for
|
|
560
|
+
# this whole task. Split only its unfinished suffix;
|
|
561
|
+
# prior prompt groups remain durable in memory.
|
|
562
|
+
prompt_bad_ceiling = (
|
|
563
|
+
width if prompt_bad_ceiling is None
|
|
564
|
+
else min(prompt_bad_ceiling, width)
|
|
565
|
+
)
|
|
566
|
+
active_prompt_batch = max(1, width // 2)
|
|
567
|
+
split_current_task(
|
|
568
|
+
row_start=committed_row,
|
|
569
|
+
max_width=active_prompt_batch,
|
|
570
|
+
)
|
|
571
|
+
restart_with_smaller_prompts = True
|
|
572
|
+
_empty_device_cache(device)
|
|
573
|
+
log.warning(
|
|
574
|
+
"jlens: OOM after committed rows at "
|
|
575
|
+
"dim_batch=1 — preserving them and splitting "
|
|
576
|
+
"the prompt group with "
|
|
577
|
+
"prompt_batch=%d", active_prompt_batch,
|
|
578
|
+
)
|
|
579
|
+
break
|
|
580
|
+
batch = max(1, batch // 2)
|
|
581
|
+
active_dim_batch = batch
|
|
582
|
+
if _shrink_device_stripe_buffers(state, device, batch):
|
|
583
|
+
log.warning(
|
|
584
|
+
"jlens: releasing the one-slot staging tier at "
|
|
585
|
+
"the reduced dim_batch"
|
|
586
|
+
)
|
|
587
|
+
_empty_device_cache(device)
|
|
588
|
+
log.warning(
|
|
589
|
+
"jlens: OOM after row %d — resuming prompt batch "
|
|
590
|
+
"with dim_batch=%d",
|
|
591
|
+
committed_row, batch,
|
|
592
|
+
)
|
|
593
|
+
continue
|
|
594
|
+
except RuntimeError as exc: # OOM → halve dim_batch and retry
|
|
595
|
+
if not is_out_of_memory_error(exc):
|
|
596
|
+
raise
|
|
597
|
+
if _downgrade_cuda_stripe_buffers(state, device):
|
|
598
|
+
_empty_device_cache(device)
|
|
599
|
+
log.warning(
|
|
600
|
+
"jlens: CUDA OOM — dropping the second transfer "
|
|
601
|
+
"slot before narrowing estimator batches"
|
|
602
|
+
)
|
|
603
|
+
continue
|
|
604
|
+
if width > 1:
|
|
605
|
+
prompt_bad_ceiling = (
|
|
606
|
+
width if prompt_bad_ceiling is None
|
|
607
|
+
else min(prompt_bad_ceiling, width)
|
|
608
|
+
)
|
|
609
|
+
active_prompt_batch = max(1, width // 2)
|
|
610
|
+
split_current_task(
|
|
611
|
+
row_start=committed_row,
|
|
612
|
+
max_width=active_prompt_batch,
|
|
613
|
+
)
|
|
614
|
+
restart_with_smaller_prompts = True
|
|
615
|
+
_empty_device_cache(device)
|
|
616
|
+
log.warning(
|
|
617
|
+
"jlens: OOM — preserving committed rows and "
|
|
618
|
+
"retrying with prompt_batch=%d",
|
|
619
|
+
active_prompt_batch,
|
|
620
|
+
)
|
|
621
|
+
break
|
|
622
|
+
if batch <= 1:
|
|
623
|
+
raise
|
|
624
|
+
retry_batch = max(1, batch // 2)
|
|
625
|
+
assert retry_batch is not None
|
|
626
|
+
batch = retry_batch
|
|
627
|
+
active_dim_batch = batch
|
|
628
|
+
if _shrink_device_stripe_buffers(state, device, batch):
|
|
629
|
+
log.warning(
|
|
630
|
+
"jlens: releasing the one-slot staging tier at the "
|
|
631
|
+
"reduced dim_batch"
|
|
632
|
+
)
|
|
633
|
+
_empty_device_cache(device)
|
|
634
|
+
log.warning("jlens: OOM — retrying prompt with dim_batch=%d", batch)
|
|
635
|
+
if restart_with_smaller_prompts:
|
|
636
|
+
continue
|
|
637
|
+
if pending_tasks:
|
|
638
|
+
continue
|
|
639
|
+
completed_width = pending_group_width
|
|
640
|
+
n_done += completed_width
|
|
641
|
+
cursor += completed_width
|
|
642
|
+
if on_progress is not None:
|
|
643
|
+
mode = str(state["vjp_mode"])
|
|
644
|
+
elapsed = max(time.perf_counter() - fit_started, 1e-9)
|
|
645
|
+
on_progress(
|
|
646
|
+
f"prompt {progress_base + n_done}/"
|
|
647
|
+
f"{progress_base + len(prepared_rows)} "
|
|
648
|
+
f"(prompt_batch={completed_width}, dim_batch="
|
|
649
|
+
f"{state.get('effective_dim_batch', batch)}, vjp={mode}, "
|
|
650
|
+
f"elapsed={elapsed:.1f}s, rate={n_done / elapsed:.3f}/s)"
|
|
651
|
+
)
|
|
652
|
+
# Do not oscillate back into a width already proven bad during
|
|
653
|
+
# this run. The dim-batch work is nearly width-invariant, so its
|
|
654
|
+
# reduced value likewise stays put after an OOM.
|
|
655
|
+
if prompt_bad_ceiling is None:
|
|
656
|
+
active_prompt_batch = target_prompt_batch
|
|
657
|
+
# Persist after the first complete microbatch that crosses the
|
|
658
|
+
# cadence. Do not fracture an otherwise healthy prompt batch
|
|
659
|
+
# merely to land on an exact count, and do not write a complete
|
|
660
|
+
# terminal checkpoint immediately before the durable artifact.
|
|
661
|
+
if (
|
|
662
|
+
n_done >= next_checkpoint
|
|
663
|
+
and (
|
|
664
|
+
cursor < len(prepared_rows)
|
|
665
|
+
or not suppress_terminal_checkpoint
|
|
666
|
+
)
|
|
667
|
+
):
|
|
668
|
+
if checkpoint_accumulator_cb is not None:
|
|
669
|
+
checkpoint_accumulator_cb(
|
|
670
|
+
state["acc"],
|
|
671
|
+
initial_n_prompts + n_done,
|
|
672
|
+
state["d_model"],
|
|
673
|
+
)
|
|
674
|
+
# Allocator hygiene at checkpoint cadence only — a per-prompt
|
|
675
|
+
# empty_cache forces a sync and dumps the pool the very next
|
|
676
|
+
# prompt re-allocates.
|
|
677
|
+
if device.type == "mps":
|
|
678
|
+
_empty_device_cache(device)
|
|
679
|
+
next_checkpoint = (
|
|
680
|
+
(n_done // checkpoint_every) + 1
|
|
681
|
+
) * checkpoint_every
|
|
682
|
+
finally:
|
|
683
|
+
for handle in handles:
|
|
684
|
+
handle.remove()
|
|
685
|
+
# The hooks deliberately retain the latest source/final activations.
|
|
686
|
+
# On accelerator fits those tensors own the final autograd graph, and
|
|
687
|
+
# the reusable stripe buffers own additional device allocations. A
|
|
688
|
+
# long-lived server otherwise carries the whole fit working set into
|
|
689
|
+
# the next generation; on MPS that can terminate the process instead
|
|
690
|
+
# of raising a recoverable OOM. Break every reference before flushing
|
|
691
|
+
# the allocator. The CPU accumulator is intentionally preserved.
|
|
692
|
+
captured.clear()
|
|
693
|
+
hook_state.clear()
|
|
694
|
+
state["hook_state"] = None
|
|
695
|
+
state["stripe_rows"] = None
|
|
696
|
+
state["host_stripes"] = None
|
|
697
|
+
state["cuda_transfer_stream"] = None
|
|
698
|
+
if device.type in {"mps", "cuda"}:
|
|
699
|
+
# Autograd can leave Python cycles around custom/vmap nodes; make
|
|
700
|
+
# those unreachable allocations visible to empty_cache now, at the
|
|
701
|
+
# artifact boundary, rather than during the user's next decode.
|
|
702
|
+
import gc
|
|
703
|
+
|
|
704
|
+
gc.collect()
|
|
705
|
+
_empty_device_cache(device)
|
|
706
|
+
|
|
707
|
+
if state["acc"] is None or n_done == 0:
|
|
708
|
+
raise JacobianLensError(
|
|
709
|
+
f"no usable prompts: every prompt had <= {skip_first + 1} tokens"
|
|
710
|
+
)
|
|
711
|
+
# Finalization owns the accumulator now; normalize it in place.
|
|
712
|
+
acc: dict[int, torch.Tensor] = state["acc"]
|
|
713
|
+
total_done = initial_n_prompts + n_done
|
|
714
|
+
inv_n = 1.0 / total_done
|
|
715
|
+
for tensor in acc.values():
|
|
716
|
+
tensor.mul_(inv_n)
|
|
717
|
+
return JacobianLens(
|
|
718
|
+
acc, n_prompts=total_done, d_model=state["d_model"],
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
def _accumulate_prompt_jacobian(
|
|
723
|
+
model: Any,
|
|
724
|
+
ids: torch.Tensor,
|
|
725
|
+
layer_modules: Sequence[nn.Module],
|
|
726
|
+
sources: Sequence[int],
|
|
727
|
+
final_idx: int,
|
|
728
|
+
state: dict[str, Any],
|
|
729
|
+
*,
|
|
730
|
+
captured: dict[int, torch.Tensor],
|
|
731
|
+
batch: int,
|
|
732
|
+
skip_first: int,
|
|
733
|
+
attention_mask: torch.Tensor | None = None,
|
|
734
|
+
lengths: torch.Tensor | None = None,
|
|
735
|
+
row_start: int = 0,
|
|
736
|
+
cancel_event: Any | None = None,
|
|
737
|
+
) -> None:
|
|
738
|
+
"""Run one prompt microbatch's exact VJP sweep into bounded row stripes.
|
|
739
|
+
|
|
740
|
+
Fully transferred/validated stripes are added directly to the persistent
|
|
741
|
+
CPU accumulator. If a later VJP OOMs, ``_PromptRowsCommitted`` carries the
|
|
742
|
+
first unfinished output row; the caller rebuilds the graph and continues
|
|
743
|
+
there, so neither the completed backward work nor a full lens-sized staging
|
|
744
|
+
matrix is needed.
|
|
745
|
+
"""
|
|
746
|
+
prompt_count, seq_len = ids.shape
|
|
747
|
+
del layer_modules
|
|
748
|
+
device = ids.device
|
|
749
|
+
committed_until = int(row_start)
|
|
750
|
+
cuda_pending: list[tuple[int, int, torch.cuda.Event] | None] = []
|
|
751
|
+
drain_cuda_slot: Callable[[int], None] = lambda _slot: None
|
|
752
|
+
drain_cuda_pending_in_order: Callable[[], None] = lambda: None
|
|
753
|
+
|
|
754
|
+
if lengths is None:
|
|
755
|
+
lengths = torch.full(
|
|
756
|
+
(prompt_count,), seq_len, dtype=torch.long, device=device,
|
|
757
|
+
)
|
|
758
|
+
positions = torch.arange(seq_len, device=device).unsqueeze(0)
|
|
759
|
+
valid_mask = (
|
|
760
|
+
(positions >= skip_first)
|
|
761
|
+
& (positions < (lengths.to(device=device).unsqueeze(1) - 1))
|
|
762
|
+
)
|
|
763
|
+
source_counts = valid_mask.sum(dim=1).clamp_min(1).to(torch.float32)
|
|
764
|
+
captured.clear()
|
|
765
|
+
try:
|
|
766
|
+
if cancel_event is not None and cancel_event.is_set():
|
|
767
|
+
raise JacobianLensCancelled(
|
|
768
|
+
"Jacobian-lens fit cancelled before the next prompt group"
|
|
769
|
+
)
|
|
770
|
+
vjp_mode = str(state["vjp_mode"])
|
|
771
|
+
if vjp_mode != "batched" and prompt_count != 1:
|
|
772
|
+
raise ValueError(f"{vjp_mode} VJP requires prompt_batch=1")
|
|
773
|
+
if vjp_mode == "scalar":
|
|
774
|
+
batch = 1
|
|
775
|
+
if vjp_mode == "replicated":
|
|
776
|
+
batch = min(batch, _ROW_STRIPE)
|
|
777
|
+
forward_batch = prompt_count if vjp_mode in {"batched", "scalar"} else batch
|
|
778
|
+
replicated = (
|
|
779
|
+
ids if vjp_mode in {"batched", "scalar"}
|
|
780
|
+
else ids.expand(forward_batch, -1)
|
|
781
|
+
)
|
|
782
|
+
replicated_mask = (
|
|
783
|
+
attention_mask
|
|
784
|
+
if vjp_mode in {"batched", "scalar"} or attention_mask is None
|
|
785
|
+
else attention_mask.expand(forward_batch, -1)
|
|
786
|
+
)
|
|
787
|
+
hook_state: dict[str, Any] = state["hook_state"]
|
|
788
|
+
hook_state["source_counts"] = (
|
|
789
|
+
source_counts
|
|
790
|
+
if vjp_mode in {"batched", "scalar"}
|
|
791
|
+
else source_counts.expand(forward_batch)
|
|
792
|
+
)
|
|
793
|
+
hook_state["source_start"] = int(skip_first)
|
|
794
|
+
try:
|
|
795
|
+
try:
|
|
796
|
+
model(
|
|
797
|
+
input_ids=replicated, attention_mask=replicated_mask,
|
|
798
|
+
use_cache=False,
|
|
799
|
+
)
|
|
800
|
+
except _FitForwardComplete:
|
|
801
|
+
pass
|
|
802
|
+
except TypeError: # toy/CPU-test models without a use_cache kwarg
|
|
803
|
+
try:
|
|
804
|
+
model(input_ids=replicated)
|
|
805
|
+
except _FitForwardComplete:
|
|
806
|
+
pass
|
|
807
|
+
final = captured[final_idx]
|
|
808
|
+
d_model = final.shape[-1]
|
|
809
|
+
batch = min(batch, d_model)
|
|
810
|
+
batch = min(batch, _ROW_STRIPE)
|
|
811
|
+
state["effective_dim_batch"] = batch
|
|
812
|
+
if not 0 <= row_start < d_model:
|
|
813
|
+
if row_start == d_model:
|
|
814
|
+
return
|
|
815
|
+
raise ValueError(f"row_start must lie in [0, {d_model}], got {row_start}")
|
|
816
|
+
if state["acc"] is None:
|
|
817
|
+
state["acc"] = {
|
|
818
|
+
l: torch.zeros(d_model, d_model, dtype=torch.float32) for l in sources
|
|
819
|
+
}
|
|
820
|
+
state["d_model"] = d_model
|
|
821
|
+
elif (
|
|
822
|
+
int(state["d_model"]) != int(d_model)
|
|
823
|
+
or set(state["acc"]) != set(sources)
|
|
824
|
+
):
|
|
825
|
+
raise ValueError(
|
|
826
|
+
"initial_lens shape/layers do not match the loaded model"
|
|
827
|
+
)
|
|
828
|
+
stripe_capacity = _row_stripe_capacity(
|
|
829
|
+
d_model, len(sources), batch,
|
|
830
|
+
)
|
|
831
|
+
capacity_limit = state.get("stripe_capacity_limit")
|
|
832
|
+
if capacity_limit is not None:
|
|
833
|
+
stripe_capacity = max(
|
|
834
|
+
batch, min(stripe_capacity, int(capacity_limit)),
|
|
835
|
+
)
|
|
836
|
+
if device.type == "cuda" and state["stripe_rows"] is None:
|
|
837
|
+
# Two device/host slots let stripe N's D2H transfer overlap the
|
|
838
|
+
# backward passes that fill stripe N+1. Allocation pressure first
|
|
839
|
+
# drops overlap, then halves the stripe itself. Prompt/dim backoff
|
|
840
|
+
# cannot cure a fixed staging allocation, so do that recovery here.
|
|
841
|
+
while True:
|
|
842
|
+
device_rows: list[dict[int, torch.Tensor]] | None = None
|
|
843
|
+
host_rows: list[dict[int, torch.Tensor]] | None = None
|
|
844
|
+
try:
|
|
845
|
+
device_rows = [
|
|
846
|
+
{
|
|
847
|
+
l: torch.empty(
|
|
848
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
849
|
+
device=device,
|
|
850
|
+
)
|
|
851
|
+
for l in sources
|
|
852
|
+
}
|
|
853
|
+
for _ in range(2)
|
|
854
|
+
]
|
|
855
|
+
host_rows = [
|
|
856
|
+
{
|
|
857
|
+
l: torch.empty(
|
|
858
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
859
|
+
pin_memory=True,
|
|
860
|
+
)
|
|
861
|
+
for l in sources
|
|
862
|
+
}
|
|
863
|
+
for _ in range(2)
|
|
864
|
+
]
|
|
865
|
+
transfer_stream = torch.cuda.Stream(device=device)
|
|
866
|
+
except RuntimeError:
|
|
867
|
+
device_rows = None
|
|
868
|
+
host_rows = None
|
|
869
|
+
_empty_device_cache(device)
|
|
870
|
+
one_device: dict[int, torch.Tensor] | None = None
|
|
871
|
+
one_host: dict[int, torch.Tensor] | None = None
|
|
872
|
+
try:
|
|
873
|
+
one_device = {
|
|
874
|
+
l: torch.empty(
|
|
875
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
876
|
+
device=device,
|
|
877
|
+
)
|
|
878
|
+
for l in sources
|
|
879
|
+
}
|
|
880
|
+
try:
|
|
881
|
+
one_host = {
|
|
882
|
+
l: torch.empty(
|
|
883
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
884
|
+
pin_memory=True,
|
|
885
|
+
)
|
|
886
|
+
for l in sources
|
|
887
|
+
}
|
|
888
|
+
except RuntimeError:
|
|
889
|
+
one_host = {
|
|
890
|
+
l: torch.empty(
|
|
891
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
892
|
+
)
|
|
893
|
+
for l in sources
|
|
894
|
+
}
|
|
895
|
+
transfer_stream = torch.cuda.Stream(device=device)
|
|
896
|
+
assert one_device is not None and one_host is not None
|
|
897
|
+
device_rows = [one_device]
|
|
898
|
+
host_rows = [one_host]
|
|
899
|
+
log.warning(
|
|
900
|
+
"jlens: CUDA stripe double-buffer allocation failed; "
|
|
901
|
+
"using one transfer slot (%d rows)", stripe_capacity,
|
|
902
|
+
)
|
|
903
|
+
except RuntimeError:
|
|
904
|
+
one_device = None
|
|
905
|
+
one_host = None
|
|
906
|
+
device_rows = None
|
|
907
|
+
host_rows = None
|
|
908
|
+
_empty_device_cache(device)
|
|
909
|
+
smaller = _smaller_row_stripe_capacity(
|
|
910
|
+
stripe_capacity, batch,
|
|
911
|
+
)
|
|
912
|
+
if smaller is None:
|
|
913
|
+
raise
|
|
914
|
+
log.warning(
|
|
915
|
+
"jlens: CUDA stripe allocation failed — retrying "
|
|
916
|
+
"with %d rows instead of %d",
|
|
917
|
+
smaller, stripe_capacity,
|
|
918
|
+
)
|
|
919
|
+
stripe_capacity = smaller
|
|
920
|
+
continue
|
|
921
|
+
assert device_rows is not None and host_rows is not None
|
|
922
|
+
state["stripe_rows"] = device_rows
|
|
923
|
+
state["host_stripes"] = host_rows
|
|
924
|
+
state["cuda_transfer_stream"] = transfer_stream
|
|
925
|
+
state["stripe_capacity"] = stripe_capacity
|
|
926
|
+
break
|
|
927
|
+
elif device.type == "mps" and state["stripe_rows"] is None:
|
|
928
|
+
while True:
|
|
929
|
+
device_rows_mps: dict[int, torch.Tensor] | None = None
|
|
930
|
+
host_rows_mps: dict[int, torch.Tensor] | None = None
|
|
931
|
+
try:
|
|
932
|
+
device_rows_mps = {
|
|
933
|
+
l: torch.empty(
|
|
934
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
935
|
+
device=device,
|
|
936
|
+
)
|
|
937
|
+
for l in sources
|
|
938
|
+
}
|
|
939
|
+
host_rows_mps = {
|
|
940
|
+
l: torch.empty(
|
|
941
|
+
stripe_capacity, d_model, dtype=torch.float32,
|
|
942
|
+
)
|
|
943
|
+
for l in sources
|
|
944
|
+
}
|
|
945
|
+
except RuntimeError:
|
|
946
|
+
device_rows_mps = None
|
|
947
|
+
host_rows_mps = None
|
|
948
|
+
_empty_device_cache(device)
|
|
949
|
+
smaller = _smaller_row_stripe_capacity(
|
|
950
|
+
stripe_capacity, batch,
|
|
951
|
+
)
|
|
952
|
+
if smaller is None:
|
|
953
|
+
raise
|
|
954
|
+
log.warning(
|
|
955
|
+
"jlens: MPS stripe allocation failed — retrying with "
|
|
956
|
+
"%d rows instead of %d", smaller, stripe_capacity,
|
|
957
|
+
)
|
|
958
|
+
stripe_capacity = smaller
|
|
959
|
+
continue
|
|
960
|
+
assert device_rows_mps is not None and host_rows_mps is not None
|
|
961
|
+
state["stripe_rows"] = device_rows_mps
|
|
962
|
+
state["host_stripes"] = host_rows_mps
|
|
963
|
+
state["stripe_capacity"] = stripe_capacity
|
|
964
|
+
break
|
|
965
|
+
if device.type in {"cuda", "mps"}:
|
|
966
|
+
stripe_capacity = int(state["stripe_capacity"])
|
|
967
|
+
stripe_rows = state["stripe_rows"]
|
|
968
|
+
host_stripes = state["host_stripes"]
|
|
969
|
+
stripe_start = int(row_start)
|
|
970
|
+
cuda_slot = 0
|
|
971
|
+
cuda_pending = (
|
|
972
|
+
[None] * len(stripe_rows)
|
|
973
|
+
if device.type == "cuda" and isinstance(stripe_rows, list)
|
|
974
|
+
else []
|
|
975
|
+
)
|
|
976
|
+
source_tensors: list[torch.Tensor] = []
|
|
977
|
+
for l in sources:
|
|
978
|
+
if not captured[l].requires_grad:
|
|
979
|
+
raise JacobianLensError(
|
|
980
|
+
f"layer {l} output carries no grad — the seed hook did not "
|
|
981
|
+
"reach the residual stream (unsupported block call shape?)"
|
|
982
|
+
)
|
|
983
|
+
source_tensors.append(captured[l])
|
|
984
|
+
|
|
985
|
+
def commit_host_stripe(
|
|
986
|
+
host: Mapping[int, torch.Tensor], start: int, end: int,
|
|
987
|
+
) -> None:
|
|
988
|
+
nonlocal committed_until
|
|
989
|
+
n = end - start
|
|
990
|
+
# Validate every layer before committing any: a failed asynchronous
|
|
991
|
+
# transfer must not leave a partially counted stripe.
|
|
992
|
+
for layer in sources:
|
|
993
|
+
rows = host[layer][:n]
|
|
994
|
+
if bool((rows.abs().sum(dim=1) == 0).any()):
|
|
995
|
+
raise JacobianLensError(
|
|
996
|
+
f"layer {layer} came back with zero rows from the device — "
|
|
997
|
+
"likely an asynchronous out of memory on the command "
|
|
998
|
+
"queue; retrying at a smaller dim_batch"
|
|
999
|
+
)
|
|
1000
|
+
for layer in sources:
|
|
1001
|
+
state["acc"][layer][start:end].add_(host[layer][:n])
|
|
1002
|
+
committed_until = end
|
|
1003
|
+
|
|
1004
|
+
def _drain_cuda_slot(slot: int) -> None:
|
|
1005
|
+
if not cuda_pending or cuda_pending[slot] is None:
|
|
1006
|
+
return
|
|
1007
|
+
pending = cuda_pending[slot]
|
|
1008
|
+
assert pending is not None
|
|
1009
|
+
start, end, done = pending
|
|
1010
|
+
done.synchronize()
|
|
1011
|
+
assert isinstance(host_stripes, list)
|
|
1012
|
+
commit_host_stripe(host_stripes[slot], start, end)
|
|
1013
|
+
cuda_pending[slot] = None
|
|
1014
|
+
|
|
1015
|
+
def _drain_cuda_pending_in_order() -> None:
|
|
1016
|
+
"""Commit completed transfers monotonically; discard suffix on error."""
|
|
1017
|
+
pending_order = sorted(
|
|
1018
|
+
(pending[0], slot)
|
|
1019
|
+
for slot, pending in enumerate(cuda_pending)
|
|
1020
|
+
if pending is not None
|
|
1021
|
+
)
|
|
1022
|
+
try:
|
|
1023
|
+
for _start, slot in pending_order:
|
|
1024
|
+
_drain_cuda_slot(slot)
|
|
1025
|
+
except BaseException:
|
|
1026
|
+
# A failed event wait/validation leaves its slot record intact.
|
|
1027
|
+
# Quiesce all copy work before clearing the uncommitted suffix;
|
|
1028
|
+
# no later stripe may cross the failed predecessor.
|
|
1029
|
+
transfer_stream = state.get("cuda_transfer_stream")
|
|
1030
|
+
try:
|
|
1031
|
+
if transfer_stream is not None:
|
|
1032
|
+
transfer_stream.synchronize()
|
|
1033
|
+
except BaseException:
|
|
1034
|
+
# Preserve the original drain/validation failure. CUDA may
|
|
1035
|
+
# surface the same asynchronous error again while quiescing.
|
|
1036
|
+
pass
|
|
1037
|
+
finally:
|
|
1038
|
+
for slot in range(len(cuda_pending)):
|
|
1039
|
+
cuda_pending[slot] = None
|
|
1040
|
+
raise
|
|
1041
|
+
|
|
1042
|
+
drain_cuda_pending_in_order = _drain_cuda_pending_in_order
|
|
1043
|
+
|
|
1044
|
+
drain_cuda_slot = _drain_cuda_slot
|
|
1045
|
+
|
|
1046
|
+
def flush_stripe(end: int) -> None:
|
|
1047
|
+
nonlocal stripe_start, cuda_slot
|
|
1048
|
+
if device.type == "cpu" or end <= stripe_start:
|
|
1049
|
+
return
|
|
1050
|
+
assert host_stripes is not None and stripe_rows is not None
|
|
1051
|
+
start = stripe_start
|
|
1052
|
+
n = end - start
|
|
1053
|
+
if device.type == "cuda":
|
|
1054
|
+
assert isinstance(stripe_rows, list)
|
|
1055
|
+
assert isinstance(host_stripes, list)
|
|
1056
|
+
transfer_stream = state["cuda_transfer_stream"]
|
|
1057
|
+
assert isinstance(transfer_stream, torch.cuda.Stream)
|
|
1058
|
+
next_slot = (cuda_slot + 1) % len(stripe_rows)
|
|
1059
|
+
# The previous transfer in the slot we are about to reuse has
|
|
1060
|
+
# overlapped all computation that filled the current stripe.
|
|
1061
|
+
# Commit it before enqueueing a later stripe, preserving row
|
|
1062
|
+
# order even when synchronization/validation fails.
|
|
1063
|
+
drain_cuda_pending_in_order()
|
|
1064
|
+
assert cuda_pending[cuda_slot] is None
|
|
1065
|
+
current_stream = torch.cuda.current_stream(device)
|
|
1066
|
+
transfer_stream.wait_stream(current_stream)
|
|
1067
|
+
try:
|
|
1068
|
+
with torch.cuda.stream(transfer_stream):
|
|
1069
|
+
for layer in sources:
|
|
1070
|
+
host_stripes[cuda_slot][layer][:n].copy_(
|
|
1071
|
+
stripe_rows[cuda_slot][layer][:n],
|
|
1072
|
+
non_blocking=True,
|
|
1073
|
+
)
|
|
1074
|
+
done = torch.cuda.Event()
|
|
1075
|
+
done.record(transfer_stream)
|
|
1076
|
+
except BaseException:
|
|
1077
|
+
# Some layer copies may already be queued, but no pending
|
|
1078
|
+
# record exists until the whole stripe + event succeeds.
|
|
1079
|
+
# Quiesce and discard this uncommitted stripe before retry.
|
|
1080
|
+
transfer_stream.synchronize()
|
|
1081
|
+
raise
|
|
1082
|
+
cuda_pending[cuda_slot] = (start, end, done)
|
|
1083
|
+
if len(stripe_rows) == 1:
|
|
1084
|
+
# No second device buffer exists to fill while D2H runs.
|
|
1085
|
+
# Drain before the caller reuses this sole slot.
|
|
1086
|
+
drain_cuda_slot(cuda_slot)
|
|
1087
|
+
cuda_slot = next_slot
|
|
1088
|
+
else:
|
|
1089
|
+
assert isinstance(stripe_rows, dict)
|
|
1090
|
+
assert isinstance(host_stripes, dict)
|
|
1091
|
+
for layer in sources:
|
|
1092
|
+
host_stripes[layer][:n].copy_(stripe_rows[layer][:n])
|
|
1093
|
+
torch.mps.synchronize()
|
|
1094
|
+
commit_host_stripe(host_stripes, start, end)
|
|
1095
|
+
stripe_start = end
|
|
1096
|
+
|
|
1097
|
+
cot = None
|
|
1098
|
+
prev_dims: torch.Tensor | None = None
|
|
1099
|
+
batch_rows = torch.arange(batch, device=device)
|
|
1100
|
+
batched_outputs = (
|
|
1101
|
+
(final * valid_mask.unsqueeze(-1)).sum(dim=(0, 1))
|
|
1102
|
+
if vjp_mode in {"batched", "scalar"} else None
|
|
1103
|
+
)
|
|
1104
|
+
batched_eye = (
|
|
1105
|
+
torch.eye(batch, dtype=final.dtype, device=device)
|
|
1106
|
+
if vjp_mode == "batched" else None
|
|
1107
|
+
)
|
|
1108
|
+
dim_start = int(row_start)
|
|
1109
|
+
pass_idx = 0
|
|
1110
|
+
while dim_start < d_model:
|
|
1111
|
+
if cancel_event is not None and cancel_event.is_set():
|
|
1112
|
+
# A cancellation must not leave accelerator work or an async
|
|
1113
|
+
# transfer alive after the fit worker releases the model. The
|
|
1114
|
+
# current prompt group's partial CPU sums are intentionally
|
|
1115
|
+
# abandoned; only complete-group checkpoints are resumable.
|
|
1116
|
+
drain_cuda_pending_in_order()
|
|
1117
|
+
if device.type == "mps":
|
|
1118
|
+
torch.mps.synchronize()
|
|
1119
|
+
raise JacobianLensCancelled(
|
|
1120
|
+
"Jacobian-lens fit cancelled during an active prompt group"
|
|
1121
|
+
)
|
|
1122
|
+
n_dims = min(batch, d_model - dim_start)
|
|
1123
|
+
dims = dim_start + batch_rows[:n_dims]
|
|
1124
|
+
# grad(final, sources) rather than backward(): the grads return
|
|
1125
|
+
# directly (no hooks), and the walk stops at the shallowest
|
|
1126
|
+
# requested layer instead of descending to the seed leaf.
|
|
1127
|
+
try:
|
|
1128
|
+
grads = _grad_row_block(
|
|
1129
|
+
final, source_tensors, valid_mask, dims,
|
|
1130
|
+
mode=vjp_mode,
|
|
1131
|
+
retain_graph=dim_start + n_dims < d_model,
|
|
1132
|
+
cotangent=cot,
|
|
1133
|
+
prev_dims=prev_dims,
|
|
1134
|
+
batched_outputs=batched_outputs,
|
|
1135
|
+
batched_eye=batched_eye,
|
|
1136
|
+
)
|
|
1137
|
+
except RuntimeError as exc:
|
|
1138
|
+
if (
|
|
1139
|
+
state["requested_vjp_mode"] == "auto"
|
|
1140
|
+
and vjp_mode == "batched"
|
|
1141
|
+
and _looks_like_batched_vjp_unsupported(exc)
|
|
1142
|
+
):
|
|
1143
|
+
raise _BatchedVjpUnavailable(committed_until) from exc
|
|
1144
|
+
raise
|
|
1145
|
+
if cancel_event is not None and cancel_event.is_set():
|
|
1146
|
+
drain_cuda_pending_in_order()
|
|
1147
|
+
if device.type == "mps":
|
|
1148
|
+
torch.mps.synchronize()
|
|
1149
|
+
raise JacobianLensCancelled(
|
|
1150
|
+
"Jacobian-lens fit cancelled during an active prompt group"
|
|
1151
|
+
)
|
|
1152
|
+
if vjp_mode == "replicated":
|
|
1153
|
+
if cot is None:
|
|
1154
|
+
cot = torch.zeros_like(final)
|
|
1155
|
+
prev_dims = dims
|
|
1156
|
+
write_end = dim_start + n_dims
|
|
1157
|
+
stripe_offset = 0
|
|
1158
|
+
if device.type != "cpu":
|
|
1159
|
+
assert stripe_rows is not None
|
|
1160
|
+
if write_end - stripe_start > stripe_capacity:
|
|
1161
|
+
flush_stripe(dim_start)
|
|
1162
|
+
stripe_offset = dim_start - stripe_start
|
|
1163
|
+
for l, g in zip(sources, grads):
|
|
1164
|
+
block = _source_grad_block(
|
|
1165
|
+
g, mode=vjp_mode, n_dims=n_dims,
|
|
1166
|
+
)
|
|
1167
|
+
if device.type != "cpu":
|
|
1168
|
+
assert stripe_rows is not None
|
|
1169
|
+
if device.type == "cuda":
|
|
1170
|
+
assert isinstance(stripe_rows, list)
|
|
1171
|
+
target_rows = stripe_rows[cuda_slot]
|
|
1172
|
+
else:
|
|
1173
|
+
assert isinstance(stripe_rows, dict)
|
|
1174
|
+
target_rows = stripe_rows
|
|
1175
|
+
target_rows[l][stripe_offset : stripe_offset + n_dims] = block
|
|
1176
|
+
else:
|
|
1177
|
+
state["acc"][l][dim_start:write_end].add_(block)
|
|
1178
|
+
if device.type == "cpu":
|
|
1179
|
+
committed_until = write_end
|
|
1180
|
+
pass_idx += 1
|
|
1181
|
+
if device.type == "mps" and pass_idx % _MPS_SYNC_EVERY_PASSES == 0:
|
|
1182
|
+
torch.mps.synchronize()
|
|
1183
|
+
dim_start = write_end
|
|
1184
|
+
flush_stripe(d_model)
|
|
1185
|
+
drain_cuda_pending_in_order()
|
|
1186
|
+
except RuntimeError as exc:
|
|
1187
|
+
# A later VJP can fail while the previous CUDA stripe is still in
|
|
1188
|
+
# flight. Finish and commit that known-good transfer before reporting
|
|
1189
|
+
# the durable row boundary to the retry scheduler.
|
|
1190
|
+
drain_cuda_pending_in_order()
|
|
1191
|
+
if isinstance(exc, _BatchedVjpUnavailable):
|
|
1192
|
+
exc.committed_until = max(exc.committed_until, committed_until)
|
|
1193
|
+
if is_out_of_memory_error(exc) and committed_until > row_start:
|
|
1194
|
+
raise _PromptRowsCommitted(committed_until, str(exc)) from exc
|
|
1195
|
+
raise
|
|
1196
|
+
finally:
|
|
1197
|
+
captured.clear()
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
def _grad_row_block(
|
|
1201
|
+
final: torch.Tensor,
|
|
1202
|
+
source_tensors: Sequence[torch.Tensor],
|
|
1203
|
+
valid_mask: torch.Tensor,
|
|
1204
|
+
dims: torch.Tensor,
|
|
1205
|
+
*,
|
|
1206
|
+
mode: str,
|
|
1207
|
+
retain_graph: bool,
|
|
1208
|
+
cotangent: torch.Tensor | None,
|
|
1209
|
+
prev_dims: torch.Tensor | None,
|
|
1210
|
+
batched_outputs: torch.Tensor | None,
|
|
1211
|
+
batched_eye: torch.Tensor | None,
|
|
1212
|
+
) -> tuple[torch.Tensor, ...]:
|
|
1213
|
+
if mode == "batched":
|
|
1214
|
+
assert batched_outputs is not None and batched_eye is not None
|
|
1215
|
+
outputs = batched_outputs[dims]
|
|
1216
|
+
eye = batched_eye[:dims.numel(), :dims.numel()]
|
|
1217
|
+
return torch.autograd.grad(
|
|
1218
|
+
outputs, source_tensors, grad_outputs=eye,
|
|
1219
|
+
retain_graph=retain_graph, is_grads_batched=True,
|
|
1220
|
+
)
|
|
1221
|
+
if mode == "scalar":
|
|
1222
|
+
assert batched_outputs is not None and dims.numel() == 1
|
|
1223
|
+
return torch.autograd.grad(
|
|
1224
|
+
batched_outputs[dims[0]], source_tensors,
|
|
1225
|
+
retain_graph=retain_graph,
|
|
1226
|
+
)
|
|
1227
|
+
|
|
1228
|
+
if cotangent is None:
|
|
1229
|
+
cotangent = torch.zeros_like(final)
|
|
1230
|
+
valid = valid_mask[0].nonzero(as_tuple=False).reshape(-1)
|
|
1231
|
+
rows = torch.arange(dims.numel(), device=final.device).unsqueeze(1)
|
|
1232
|
+
if prev_dims is not None:
|
|
1233
|
+
prev_rows = torch.arange(prev_dims.numel(), device=final.device).unsqueeze(1)
|
|
1234
|
+
cotangent[prev_rows, valid.unsqueeze(0), prev_dims.unsqueeze(1)] = 0.0
|
|
1235
|
+
cotangent[rows, valid.unsqueeze(0), dims.unsqueeze(1)] = 1.0
|
|
1236
|
+
return torch.autograd.grad(
|
|
1237
|
+
final, source_tensors, grad_outputs=cotangent,
|
|
1238
|
+
retain_graph=retain_graph,
|
|
1239
|
+
)
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
def _source_grad_block(
|
|
1243
|
+
grad: torch.Tensor,
|
|
1244
|
+
*,
|
|
1245
|
+
mode: str,
|
|
1246
|
+
n_dims: int,
|
|
1247
|
+
) -> torch.Tensor:
|
|
1248
|
+
if mode == "batched":
|
|
1249
|
+
# [n_dims, B, D] — source-position means were collapsed by the
|
|
1250
|
+
# transparent probe identity inside autograd. Preserve equal-prompt
|
|
1251
|
+
# weighting by summing those per-prompt Jacobians.
|
|
1252
|
+
return grad[:n_dims].to(torch.float32).sum(dim=1)
|
|
1253
|
+
# [replicated_batch,D] (or [1,D] scalar) is already mean-position reduced.
|
|
1254
|
+
return grad[:n_dims].to(torch.float32)
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
def _downgrade_cuda_stripe_buffers(
|
|
1258
|
+
state: dict[str, Any], device: torch.device,
|
|
1259
|
+
) -> bool:
|
|
1260
|
+
"""Release the overlap slot after a CUDA OOM and keep one viable slot."""
|
|
1261
|
+
if device.type != "cuda":
|
|
1262
|
+
return False
|
|
1263
|
+
device_rows = state.get("stripe_rows")
|
|
1264
|
+
host_rows = state.get("host_stripes")
|
|
1265
|
+
if (
|
|
1266
|
+
not isinstance(device_rows, list) or len(device_rows) <= 1
|
|
1267
|
+
or not isinstance(host_rows, list) or len(host_rows) <= 1
|
|
1268
|
+
):
|
|
1269
|
+
return False
|
|
1270
|
+
state["stripe_rows"] = [device_rows[0]]
|
|
1271
|
+
state["host_stripes"] = [host_rows[0]]
|
|
1272
|
+
# Drop the local references before emptying the allocator in the caller.
|
|
1273
|
+
del device_rows[1:]
|
|
1274
|
+
del host_rows[1:]
|
|
1275
|
+
return True
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
def _shrink_device_stripe_buffers(
|
|
1279
|
+
state: dict[str, Any], device: torch.device, dim_batch: int,
|
|
1280
|
+
) -> bool:
|
|
1281
|
+
"""Release a quiescent one-slot staging tier and lower its next capacity.
|
|
1282
|
+
|
|
1283
|
+
``_accumulate_prompt_jacobian`` drains every pending CUDA transfer before an
|
|
1284
|
+
OOM escapes, so the retry scheduler can safely discard these persistent
|
|
1285
|
+
buffers without losing a committed row prefix.
|
|
1286
|
+
"""
|
|
1287
|
+
if device.type not in {"cuda", "mps"}:
|
|
1288
|
+
return False
|
|
1289
|
+
capacity = int(state.get("stripe_capacity", 0) or 0)
|
|
1290
|
+
smaller = _smaller_row_stripe_capacity(capacity, dim_batch)
|
|
1291
|
+
if smaller is None:
|
|
1292
|
+
return False
|
|
1293
|
+
state["stripe_rows"] = None
|
|
1294
|
+
state["host_stripes"] = None
|
|
1295
|
+
state["cuda_transfer_stream"] = None
|
|
1296
|
+
state["stripe_capacity"] = 0
|
|
1297
|
+
state["stripe_capacity_limit"] = smaller
|
|
1298
|
+
return True
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
def _empty_device_cache(device: torch.device) -> None:
|
|
1302
|
+
if device.type == "mps":
|
|
1303
|
+
torch.mps.empty_cache()
|
|
1304
|
+
elif device.type == "cuda":
|
|
1305
|
+
torch.cuda.empty_cache()
|