@simplexai/localmodels-darwin-x64 0.0.0-stage → 0.1.0-dev.101
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.
- package/bootstrap.identity +1 -0
- package/bootstrap.sha256 +1378 -0
- package/kit.py +120 -0
- package/modules/localmodels/HERMES-LICENSE +21 -0
- package/modules/localmodels/__init__.py +6 -0
- package/modules/localmodels/__main__.py +741 -0
- package/modules/localmodels/app.py +541 -0
- package/modules/localmodels/apple_sensors.py +431 -0
- package/modules/localmodels/approval.py +241 -0
- package/modules/localmodels/asr_audio.py +129 -0
- package/modules/localmodels/asr_soniox.py +273 -0
- package/modules/localmodels/asr_websocket.py +93 -0
- package/modules/localmodels/auth_proxy.py +977 -0
- package/modules/localmodels/bandwidth_probe.py +64 -0
- package/modules/localmodels/catalog.json +8816 -0
- package/modules/localmodels/catalog.py +567 -0
- package/modules/localmodels/catalog_add.py +357 -0
- package/modules/localmodels/catalog_license.py +41 -0
- package/modules/localmodels/catalog_recipes.py +440 -0
- package/modules/localmodels/chat_template.py +62 -0
- package/modules/localmodels/chat_templates/qwen3.8-27b.jinja +184 -0
- package/modules/localmodels/cli_help.py +382 -0
- package/modules/localmodels/cli_parser.py +350 -0
- package/modules/localmodels/component.py +500 -0
- package/modules/localmodels/console.py +396 -0
- package/modules/localmodels/context_policy.py +748 -0
- package/modules/localmodels/contracts.py +133 -0
- package/modules/localmodels/custom_hub.py +1040 -0
- package/modules/localmodels/custom_hub_http.py +513 -0
- package/modules/localmodels/custom_probe.py +479 -0
- package/modules/localmodels/debug_cli.py +158 -0
- package/modules/localmodels/debug_mode.py +642 -0
- package/modules/localmodels/debug_stub_server.py +380 -0
- package/modules/localmodels/decode_calibration.json +6 -0
- package/modules/localmodels/decode_calibration.py +121 -0
- package/modules/localmodels/deploy.py +471 -0
- package/modules/localmodels/deploy_steps.py +154 -0
- package/modules/localmodels/deployment_lifecycle.py +167 -0
- package/modules/localmodels/desktop.py +137 -0
- package/modules/localmodels/diagnostics.py +63 -0
- package/modules/localmodels/discovery.py +189 -0
- package/modules/localmodels/download-mirrors.json +441 -0
- package/modules/localmodels/draft_spec.py +164 -0
- package/modules/localmodels/engine_adapters/__init__.py +6 -0
- package/modules/localmodels/engine_adapters/auxiliary.py +30 -0
- package/modules/localmodels/engine_adapters/base.py +40 -0
- package/modules/localmodels/engine_adapters/llama_cpp.py +539 -0
- package/modules/localmodels/engine_adapters/strata_poly.py +57 -0
- package/modules/localmodels/engine_adapters/suite_plan.py +394 -0
- package/modules/localmodels/engines-b11583.json +122 -0
- package/modules/localmodels/engines-b12588-mix-c0c3de8.json +110 -0
- package/modules/localmodels/engines-b12757-mix-ef2df21.json +110 -0
- package/modules/localmodels/engines-prism-b12178-03ec600.json +131 -0
- package/modules/localmodels/engines-strata-0.1.47.json +35 -0
- package/modules/localmodels/engines-strata-0.1.49.2.json +35 -0
- package/modules/localmodels/engines-strata-0.1.59.1.json +35 -0
- package/modules/localmodels/engines-strata-poly-0.2.20-poly.1.json +132 -0
- package/modules/localmodels/engines-strata-poly-0.2.20-poly.7.json +94 -0
- package/modules/localmodels/engines-whisper-b5454.json +151 -0
- package/modules/localmodels/engines.json +314 -0
- package/modules/localmodels/engines.py +343 -0
- package/modules/localmodels/estimator.py +574 -0
- package/modules/localmodels/fixtures/jfk.wav +0 -0
- package/modules/localmodels/fixtures/stack-research-demo-plan.json +1059 -0
- package/modules/localmodels/frontend.py +147 -0
- package/modules/localmodels/gguf.py +509 -0
- package/modules/localmodels/gpu_specs.py +163 -0
- package/modules/localmodels/guard-requirements.in +3 -0
- package/modules/localmodels/guard-requirements.lock +285 -0
- package/modules/localmodels/guard.py +510 -0
- package/modules/localmodels/guard_runtime.py +235 -0
- package/modules/localmodels/hf_repo.py +346 -0
- package/modules/localmodels/host_sensors.py +704 -0
- package/modules/localmodels/hosts.py +696 -0
- package/modules/localmodels/http_local.py +59 -0
- package/modules/localmodels/install.py +151 -0
- package/modules/localmodels/kokoro-tts-0.6.1.txt +299 -0
- package/modules/localmodels/library_cli.py +362 -0
- package/modules/localmodels/library_custom.py +868 -0
- package/modules/localmodels/library_direct.py +94 -0
- package/modules/localmodels/library_elastic.py +673 -0
- package/modules/localmodels/library_jobs.py +758 -0
- package/modules/localmodels/library_kept.py +161 -0
- package/modules/localmodels/library_model.py +754 -0
- package/modules/localmodels/library_order.py +235 -0
- package/modules/localmodels/library_poly.py +336 -0
- package/modules/localmodels/library_pricing.py +638 -0
- package/modules/localmodels/library_serve.py +776 -0
- package/modules/localmodels/library_smoke.py +334 -0
- package/modules/localmodels/library_state.py +569 -0
- package/modules/localmodels/library_status.py +1179 -0
- package/modules/localmodels/llm_rank.py +434 -0
- package/modules/localmodels/memcalc_cli.py +193 -0
- package/modules/localmodels/metal.py +492 -0
- package/modules/localmodels/metal_probe.py +312 -0
- package/modules/localmodels/mirrors.py +464 -0
- package/modules/localmodels/mlx-lm-0.32.2-requirements.txt +742 -0
- package/modules/localmodels/mlx_server.py +97 -0
- package/modules/localmodels/npm_signatures.py +131 -0
- package/modules/localmodels/npm_transport.py +200 -0
- package/modules/localmodels/nvml_ctypes.py +431 -0
- package/modules/localmodels/openapi.yaml +359 -0
- package/modules/localmodels/plan_envelope.py +479 -0
- package/modules/localmodels/planning/__init__.py +3 -0
- package/modules/localmodels/planning/budget.py +698 -0
- package/modules/localmodels/planning/llm_ram.py +150 -0
- package/modules/localmodels/planning/memcalc.py +477 -0
- package/modules/localmodels/planning/memcalc_load.py +215 -0
- package/modules/localmodels/planning/memory_pools.py +403 -0
- package/modules/localmodels/planning/sizecalc.py +622 -0
- package/modules/localmodels/preparation.py +49 -0
- package/modules/localmodels/privacy.py +311 -0
- package/modules/localmodels/privacy_acceptance.py +123 -0
- package/modules/localmodels/probe.py +750 -0
- package/modules/localmodels/process_identity.py +812 -0
- package/modules/localmodels/process_identity_darwin.py +344 -0
- package/modules/localmodels/process_identity_linux.py +206 -0
- package/modules/localmodels/process_windows.py +235 -0
- package/modules/localmodels/program_scheduler.py +1198 -0
- package/modules/localmodels/python-bootstrap-lock.json +37 -0
- package/modules/localmodels/quant_formats.py +123 -0
- package/modules/localmodels/recommend.py +352 -0
- package/modules/localmodels/recommend_cli.py +242 -0
- package/modules/localmodels/records.py +259 -0
- package/modules/localmodels/region.py +659 -0
- package/modules/localmodels/remote_ops.py +205 -0
- package/modules/localmodels/remote_ops_common.py +670 -0
- package/modules/localmodels/remote_ops_download.py +674 -0
- package/modules/localmodels/remote_ops_launchd.py +91 -0
- package/modules/localmodels/remote_ops_mirrors.py +328 -0
- package/modules/localmodels/remote_ops_prepare.py +486 -0
- package/modules/localmodels/remote_ops_ranges.py +483 -0
- package/modules/localmodels/remote_ops_redirect.py +393 -0
- package/modules/localmodels/remote_ops_remove.py +139 -0
- package/modules/localmodels/remote_ops_service.py +755 -0
- package/modules/localmodels/remote_ops_verify.py +475 -0
- package/modules/localmodels/residency.py +404 -0
- package/modules/localmodels/residency_host.py +161 -0
- package/modules/localmodels/reuse.py +265 -0
- package/modules/localmodels/runtime-lock.json +188 -0
- package/modules/localmodels/runtime_args.py +150 -0
- package/modules/localmodels/runtime_auth.py +639 -0
- package/modules/localmodels/runtime_cli.py +760 -0
- package/modules/localmodels/runtime_discovery.py +142 -0
- package/modules/localmodels/runtime_install.py +258 -0
- package/modules/localmodels/runtime_io.py +753 -0
- package/modules/localmodels/runtime_pi.py +140 -0
- package/modules/localmodels/runtime_process.py +233 -0
- package/modules/localmodels/runtime_releases.py +293 -0
- package/modules/localmodels/runtime_windows_acl.py +365 -0
- package/modules/localmodels/service_autostart.py +153 -0
- package/modules/localmodels/service_control.py +359 -0
- package/modules/localmodels/service_deployment.py +538 -0
- package/modules/localmodels/service_jobs.py +252 -0
- package/modules/localmodels/service_probe.py +722 -0
- package/modules/localmodels/service_supervisor.py +45 -0
- package/modules/localmodels/service_upgrade.py +428 -0
- package/modules/localmodels/service_worker.py +147 -0
- package/modules/localmodels/services_cli.py +499 -0
- package/modules/localmodels/setup_capacity.py +186 -0
- package/modules/localmodels/setup_inspection.py +659 -0
- package/modules/localmodels/setup_text.py +196 -0
- package/modules/localmodels/setup_upgrade.py +146 -0
- package/modules/localmodels/sizecalc_cli.py +257 -0
- package/modules/localmodels/slot_cache.py +531 -0
- package/modules/localmodels/speech-sv.txt +93 -0
- package/modules/localmodels/speech_admission.py +449 -0
- package/modules/localmodels/speech_catalog.py +174 -0
- package/modules/localmodels/speech_cli.py +273 -0
- package/modules/localmodels/speech_jobs.py +861 -0
- package/modules/localmodels/speech_model.py +406 -0
- package/modules/localmodels/speech_serve.py +287 -0
- package/modules/localmodels/speech_server.py +960 -0
- package/modules/localmodels/speech_state.py +708 -0
- package/modules/localmodels/speech_worker_sensevoice.py +481 -0
- package/modules/localmodels/speech_workers.py +907 -0
- package/modules/localmodels/stack.py +463 -0
- package/modules/localmodels/stack_arena.py +732 -0
- package/modules/localmodels/stack_args.py +614 -0
- package/modules/localmodels/stack_auto.py +503 -0
- package/modules/localmodels/stack_aux_gpu.py +157 -0
- package/modules/localmodels/stack_capacity.py +207 -0
- package/modules/localmodels/stack_card.py +196 -0
- package/modules/localmodels/stack_cleanup.py +389 -0
- package/modules/localmodels/stack_cli.py +339 -0
- package/modules/localmodels/stack_compose.py +734 -0
- package/modules/localmodels/stack_console.py +320 -0
- package/modules/localmodels/stack_debug.py +140 -0
- package/modules/localmodels/stack_decision.py +730 -0
- package/modules/localmodels/stack_doctor.py +518 -0
- package/modules/localmodels/stack_down.py +138 -0
- package/modules/localmodels/stack_events.py +375 -0
- package/modules/localmodels/stack_gpu_memory.py +61 -0
- package/modules/localmodels/stack_hardware.py +599 -0
- package/modules/localmodels/stack_hardware_text.py +213 -0
- package/modules/localmodels/stack_journal.py +224 -0
- package/modules/localmodels/stack_ledger.py +442 -0
- package/modules/localmodels/stack_lifecycle.py +453 -0
- package/modules/localmodels/stack_mcp.py +729 -0
- package/modules/localmodels/stack_memory.py +730 -0
- package/modules/localmodels/stack_mlx.py +271 -0
- package/modules/localmodels/stack_picks.py +228 -0
- package/modules/localmodels/stack_plan.py +713 -0
- package/modules/localmodels/stack_ports.py +348 -0
- package/modules/localmodels/stack_preflight.py +696 -0
- package/modules/localmodels/stack_progress.py +117 -0
- package/modules/localmodels/stack_remove.py +355 -0
- package/modules/localmodels/stack_research.py +716 -0
- package/modules/localmodels/stack_research_demo.py +125 -0
- package/modules/localmodels/stack_research_plan.py +146 -0
- package/modules/localmodels/stack_review.py +201 -0
- package/modules/localmodels/stack_rollback.py +290 -0
- package/modules/localmodels/stack_route.py +338 -0
- package/modules/localmodels/stack_run.py +773 -0
- package/modules/localmodels/stack_suite.py +761 -0
- package/modules/localmodels/stack_summary.py +296 -0
- package/modules/localmodels/stack_try.py +281 -0
- package/modules/localmodels/stack_try_client.py +232 -0
- package/modules/localmodels/stack_try_docs.py +139 -0
- package/modules/localmodels/stack_up.py +330 -0
- package/modules/localmodels/stack_update.py +570 -0
- package/modules/localmodels/stack_verify.py +86 -0
- package/modules/localmodels/stack_view.py +602 -0
- package/modules/localmodels/stack_view_access.py +419 -0
- package/modules/localmodels/stack_view_agent.py +370 -0
- package/modules/localmodels/stack_view_apply.py +85 -0
- package/modules/localmodels/stack_view_demo.py +309 -0
- package/modules/localmodels/stack_view_events.py +143 -0
- package/modules/localmodels/stack_view_gpu.py +164 -0
- package/modules/localmodels/stack_view_hub.py +613 -0
- package/modules/localmodels/stack_view_hub_cli.py +312 -0
- package/modules/localmodels/stack_view_llm.py +65 -0
- package/modules/localmodels/stack_view_measure.py +152 -0
- package/modules/localmodels/stack_view_sandbox.py +333 -0
- package/modules/localmodels/stack_view_schema.py +229 -0
- package/modules/localmodels/stack_view_serve.py +523 -0
- package/modules/localmodels/stack_view_service.py +295 -0
- package/modules/localmodels/stack_view_slots.py +167 -0
- package/modules/localmodels/stack_view_telemetry.py +163 -0
- package/modules/localmodels/stack_view_text.py +620 -0
- package/modules/localmodels/stack_view_tick.py +605 -0
- package/modules/localmodels/stack_view_words.py +230 -0
- package/modules/localmodels/stack_warm.py +642 -0
- package/modules/localmodels/stack_warm_store.py +506 -0
- package/modules/localmodels/stack_whatif.py +558 -0
- package/modules/localmodels/startlux-decide-83fe6c7d.txt +1532 -0
- package/modules/localmodels/strata-poly-serve-0.2.20-poly.1.txt +254 -0
- package/modules/localmodels/strata-poly-serve-0.2.20-poly.7.txt +428 -0
- package/modules/localmodels/strata_poly_server.py +142 -0
- package/modules/localmodels/suite.py +250 -0
- package/modules/localmodels/telemetry_math.py +538 -0
- package/modules/localmodels/tool_archive.py +101 -0
- package/modules/localmodels/tools.json +1401 -0
- package/modules/localmodels/transport.py +257 -0
- package/modules/localmodels/tts_server.py +215 -0
- package/modules/localmodels/tui.py +142 -0
- package/modules/localmodels/tui_dialogs.py +168 -0
- package/modules/localmodels/tui_modals.py +326 -0
- package/modules/localmodels/tui_screen.py +736 -0
- package/modules/localmodels/tui_views.py +575 -0
- package/modules/localmodels/vision.py +191 -0
- package/modules/localmodels/web/index.html +2605 -0
- package/modules/localmodels/web/sizecalc/app.js +1306 -0
- package/modules/localmodels/web/sizecalc/calc.js +269 -0
- package/modules/localmodels/web/sizecalc/page.html +520 -0
- package/modules/localmodels/web/view/ASSET-SOURCES.md +11 -0
- package/modules/localmodels/web/view/fleet.html +52 -0
- package/modules/localmodels/web/view/fleet.js +446 -0
- package/modules/localmodels/web/view/i18n.js +126 -0
- package/modules/localmodels/web/view/icon.svg +1 -0
- package/modules/localmodels/web/view/index.html +149 -0
- package/modules/localmodels/web/view/logo-claude.svg +3 -0
- package/modules/localmodels/web/view/logo-codex.png +0 -0
- package/modules/localmodels/web/view/logo-pi.svg +6 -0
- package/modules/localmodels/web/view/manifest.webmanifest +11 -0
- package/modules/localmodels/web/view/nav.js +241 -0
- package/modules/localmodels/web/view/theme.js +13 -0
- package/modules/localmodels/web/view/view.css +903 -0
- package/modules/localmodels/web/view/view.js +2265 -0
- package/modules/localmodels/win_probe.py +204 -0
- package/modules/localmodels/windows_job.py +69 -0
- package/modules/simplex_localmodels-0.1.0.dev101.dist-info/METADATA +9 -0
- package/modules/simplex_localmodels-0.1.0.dev101.dist-info/RECORD +284 -0
- package/modules/simplex_localmodels-0.1.0.dev101.dist-info/WHEEL +4 -0
- package/modules/simplex_localmodels-0.1.0.dev101.dist-info/entry_points.txt +3 -0
- package/modules/simplex_localmodels-0.1.0.dev101.dist-info/licenses/NOTICE +68 -0
- package/modules/simplex_localmodels-0.1.0.dev101.dist-info/licenses/localmodels/HERMES-LICENSE +21 -0
- package/package.json +12 -4
- package/python/bin/python3.12 +0 -0
- package/python/lib/python3.12/LICENSE.txt +279 -0
- package/python/lib/python3.12/__future__.py +147 -0
- package/python/lib/python3.12/__hello__.py +16 -0
- package/python/lib/python3.12/__phello__/__init__.py +7 -0
- package/python/lib/python3.12/__phello__/spam.py +7 -0
- package/python/lib/python3.12/_aix_support.py +108 -0
- package/python/lib/python3.12/_collections_abc.py +1173 -0
- package/python/lib/python3.12/_compat_pickle.py +252 -0
- package/python/lib/python3.12/_compression.py +162 -0
- package/python/lib/python3.12/_markupbase.py +396 -0
- package/python/lib/python3.12/_osx_support.py +579 -0
- package/python/lib/python3.12/_py_abc.py +147 -0
- package/python/lib/python3.12/_pydatetime.py +2643 -0
- package/python/lib/python3.12/_pydecimal.py +6339 -0
- package/python/lib/python3.12/_pyio.py +2698 -0
- package/python/lib/python3.12/_pylong.py +329 -0
- package/python/lib/python3.12/_sitebuiltins.py +103 -0
- package/python/lib/python3.12/_strptime.py +664 -0
- package/python/lib/python3.12/_sysconfigdata__darwin_darwin.py +1034 -0
- package/python/lib/python3.12/_threading_local.py +242 -0
- package/python/lib/python3.12/_weakrefset.py +205 -0
- package/python/lib/python3.12/abc.py +188 -0
- package/python/lib/python3.12/aifc.py +984 -0
- package/python/lib/python3.12/antigravity.py +17 -0
- package/python/lib/python3.12/argparse.py +2650 -0
- package/python/lib/python3.12/ast.py +1840 -0
- package/python/lib/python3.12/asyncio/__init__.py +47 -0
- package/python/lib/python3.12/asyncio/__main__.py +128 -0
- package/python/lib/python3.12/asyncio/base_events.py +2024 -0
- package/python/lib/python3.12/asyncio/base_futures.py +67 -0
- package/python/lib/python3.12/asyncio/base_subprocess.py +285 -0
- package/python/lib/python3.12/asyncio/base_tasks.py +94 -0
- package/python/lib/python3.12/asyncio/constants.py +41 -0
- package/python/lib/python3.12/asyncio/coroutines.py +109 -0
- package/python/lib/python3.12/asyncio/events.py +868 -0
- package/python/lib/python3.12/asyncio/exceptions.py +62 -0
- package/python/lib/python3.12/asyncio/format_helpers.py +76 -0
- package/python/lib/python3.12/asyncio/futures.py +430 -0
- package/python/lib/python3.12/asyncio/locks.py +586 -0
- package/python/lib/python3.12/asyncio/log.py +7 -0
- package/python/lib/python3.12/asyncio/mixins.py +21 -0
- package/python/lib/python3.12/asyncio/proactor_events.py +897 -0
- package/python/lib/python3.12/asyncio/protocols.py +216 -0
- package/python/lib/python3.12/asyncio/queues.py +244 -0
- package/python/lib/python3.12/asyncio/runners.py +216 -0
- package/python/lib/python3.12/asyncio/selector_events.py +1324 -0
- package/python/lib/python3.12/asyncio/sslproto.py +929 -0
- package/python/lib/python3.12/asyncio/staggered.py +174 -0
- package/python/lib/python3.12/asyncio/streams.py +770 -0
- package/python/lib/python3.12/asyncio/subprocess.py +229 -0
- package/python/lib/python3.12/asyncio/taskgroups.py +268 -0
- package/python/lib/python3.12/asyncio/tasks.py +1065 -0
- package/python/lib/python3.12/asyncio/threads.py +25 -0
- package/python/lib/python3.12/asyncio/timeouts.py +168 -0
- package/python/lib/python3.12/asyncio/transports.py +335 -0
- package/python/lib/python3.12/asyncio/trsock.py +98 -0
- package/python/lib/python3.12/asyncio/unix_events.py +1500 -0
- package/python/lib/python3.12/asyncio/windows_events.py +901 -0
- package/python/lib/python3.12/asyncio/windows_utils.py +173 -0
- package/python/lib/python3.12/base64.py +586 -0
- package/python/lib/python3.12/bdb.py +920 -0
- package/python/lib/python3.12/bisect.py +118 -0
- package/python/lib/python3.12/bz2.py +344 -0
- package/python/lib/python3.12/cProfile.py +195 -0
- package/python/lib/python3.12/calendar.py +808 -0
- package/python/lib/python3.12/cgi.py +1014 -0
- package/python/lib/python3.12/cgitb.py +332 -0
- package/python/lib/python3.12/chunk.py +173 -0
- package/python/lib/python3.12/cmd.py +401 -0
- package/python/lib/python3.12/code.py +324 -0
- package/python/lib/python3.12/codecs.py +1129 -0
- package/python/lib/python3.12/codeop.py +161 -0
- package/python/lib/python3.12/collections/__init__.py +1592 -0
- package/python/lib/python3.12/collections/abc.py +3 -0
- package/python/lib/python3.12/colorsys.py +166 -0
- package/python/lib/python3.12/compileall.py +469 -0
- package/python/lib/python3.12/concurrent/__init__.py +1 -0
- package/python/lib/python3.12/concurrent/futures/__init__.py +54 -0
- package/python/lib/python3.12/concurrent/futures/_base.py +654 -0
- package/python/lib/python3.12/concurrent/futures/process.py +876 -0
- package/python/lib/python3.12/concurrent/futures/thread.py +240 -0
- package/python/lib/python3.12/configparser.py +1341 -0
- package/python/lib/python3.12/contextlib.py +800 -0
- package/python/lib/python3.12/contextvars.py +4 -0
- package/python/lib/python3.12/copy.py +292 -0
- package/python/lib/python3.12/copyreg.py +217 -0
- package/python/lib/python3.12/crypt.py +124 -0
- package/python/lib/python3.12/csv.py +461 -0
- package/python/lib/python3.12/ctypes/__init__.py +582 -0
- package/python/lib/python3.12/ctypes/_aix.py +327 -0
- package/python/lib/python3.12/ctypes/_endian.py +78 -0
- package/python/lib/python3.12/ctypes/macholib/README.ctypes +7 -0
- package/python/lib/python3.12/ctypes/macholib/__init__.py +9 -0
- package/python/lib/python3.12/ctypes/macholib/dyld.py +165 -0
- package/python/lib/python3.12/ctypes/macholib/dylib.py +42 -0
- package/python/lib/python3.12/ctypes/macholib/fetch_macholib +2 -0
- package/python/lib/python3.12/ctypes/macholib/fetch_macholib.bat +1 -0
- package/python/lib/python3.12/ctypes/macholib/framework.py +42 -0
- package/python/lib/python3.12/ctypes/util.py +379 -0
- package/python/lib/python3.12/ctypes/wintypes.py +202 -0
- package/python/lib/python3.12/curses/__init__.py +101 -0
- package/python/lib/python3.12/curses/ascii.py +99 -0
- package/python/lib/python3.12/curses/has_key.py +192 -0
- package/python/lib/python3.12/curses/panel.py +6 -0
- package/python/lib/python3.12/curses/textpad.py +204 -0
- package/python/lib/python3.12/dataclasses.py +1588 -0
- package/python/lib/python3.12/datetime.py +9 -0
- package/python/lib/python3.12/dbm/__init__.py +190 -0
- package/python/lib/python3.12/dbm/dumb.py +317 -0
- package/python/lib/python3.12/dbm/gnu.py +3 -0
- package/python/lib/python3.12/dbm/ndbm.py +3 -0
- package/python/lib/python3.12/decimal.py +108 -0
- package/python/lib/python3.12/difflib.py +2056 -0
- package/python/lib/python3.12/dis.py +805 -0
- package/python/lib/python3.12/doctest.py +2845 -0
- package/python/lib/python3.12/email/__init__.py +61 -0
- package/python/lib/python3.12/email/_encoded_words.py +233 -0
- package/python/lib/python3.12/email/_header_value_parser.py +3119 -0
- package/python/lib/python3.12/email/_parseaddr.py +557 -0
- package/python/lib/python3.12/email/_policybase.py +382 -0
- package/python/lib/python3.12/email/architecture.rst +216 -0
- package/python/lib/python3.12/email/base64mime.py +115 -0
- package/python/lib/python3.12/email/charset.py +398 -0
- package/python/lib/python3.12/email/contentmanager.py +251 -0
- package/python/lib/python3.12/email/encoders.py +65 -0
- package/python/lib/python3.12/email/errors.py +117 -0
- package/python/lib/python3.12/email/feedparser.py +534 -0
- package/python/lib/python3.12/email/generator.py +530 -0
- package/python/lib/python3.12/email/header.py +573 -0
- package/python/lib/python3.12/email/headerregistry.py +604 -0
- package/python/lib/python3.12/email/iterators.py +68 -0
- package/python/lib/python3.12/email/message.py +1215 -0
- package/python/lib/python3.12/email/mime/__init__.py +0 -0
- package/python/lib/python3.12/email/mime/application.py +37 -0
- package/python/lib/python3.12/email/mime/audio.py +100 -0
- package/python/lib/python3.12/email/mime/base.py +29 -0
- package/python/lib/python3.12/email/mime/image.py +152 -0
- package/python/lib/python3.12/email/mime/message.py +33 -0
- package/python/lib/python3.12/email/mime/multipart.py +47 -0
- package/python/lib/python3.12/email/mime/nonmultipart.py +21 -0
- package/python/lib/python3.12/email/mime/text.py +40 -0
- package/python/lib/python3.12/email/parser.py +127 -0
- package/python/lib/python3.12/email/policy.py +232 -0
- package/python/lib/python3.12/email/quoprimime.py +300 -0
- package/python/lib/python3.12/email/utils.py +486 -0
- package/python/lib/python3.12/encodings/__init__.py +174 -0
- package/python/lib/python3.12/encodings/aliases.py +551 -0
- package/python/lib/python3.12/encodings/ascii.py +50 -0
- package/python/lib/python3.12/encodings/base64_codec.py +55 -0
- package/python/lib/python3.12/encodings/big5.py +39 -0
- package/python/lib/python3.12/encodings/big5hkscs.py +39 -0
- package/python/lib/python3.12/encodings/bz2_codec.py +78 -0
- package/python/lib/python3.12/encodings/charmap.py +69 -0
- package/python/lib/python3.12/encodings/cp037.py +307 -0
- package/python/lib/python3.12/encodings/cp1006.py +307 -0
- package/python/lib/python3.12/encodings/cp1026.py +307 -0
- package/python/lib/python3.12/encodings/cp1125.py +698 -0
- package/python/lib/python3.12/encodings/cp1140.py +307 -0
- package/python/lib/python3.12/encodings/cp1250.py +307 -0
- package/python/lib/python3.12/encodings/cp1251.py +307 -0
- package/python/lib/python3.12/encodings/cp1252.py +307 -0
- package/python/lib/python3.12/encodings/cp1253.py +307 -0
- package/python/lib/python3.12/encodings/cp1254.py +307 -0
- package/python/lib/python3.12/encodings/cp1255.py +307 -0
- package/python/lib/python3.12/encodings/cp1256.py +307 -0
- package/python/lib/python3.12/encodings/cp1257.py +307 -0
- package/python/lib/python3.12/encodings/cp1258.py +307 -0
- package/python/lib/python3.12/encodings/cp273.py +307 -0
- package/python/lib/python3.12/encodings/cp424.py +307 -0
- package/python/lib/python3.12/encodings/cp437.py +698 -0
- package/python/lib/python3.12/encodings/cp500.py +307 -0
- package/python/lib/python3.12/encodings/cp720.py +309 -0
- package/python/lib/python3.12/encodings/cp737.py +698 -0
- package/python/lib/python3.12/encodings/cp775.py +697 -0
- package/python/lib/python3.12/encodings/cp850.py +698 -0
- package/python/lib/python3.12/encodings/cp852.py +698 -0
- package/python/lib/python3.12/encodings/cp855.py +698 -0
- package/python/lib/python3.12/encodings/cp856.py +307 -0
- package/python/lib/python3.12/encodings/cp857.py +694 -0
- package/python/lib/python3.12/encodings/cp858.py +698 -0
- package/python/lib/python3.12/encodings/cp860.py +698 -0
- package/python/lib/python3.12/encodings/cp861.py +698 -0
- package/python/lib/python3.12/encodings/cp862.py +698 -0
- package/python/lib/python3.12/encodings/cp863.py +698 -0
- package/python/lib/python3.12/encodings/cp864.py +690 -0
- package/python/lib/python3.12/encodings/cp865.py +698 -0
- package/python/lib/python3.12/encodings/cp866.py +698 -0
- package/python/lib/python3.12/encodings/cp869.py +689 -0
- package/python/lib/python3.12/encodings/cp874.py +307 -0
- package/python/lib/python3.12/encodings/cp875.py +307 -0
- package/python/lib/python3.12/encodings/cp932.py +39 -0
- package/python/lib/python3.12/encodings/cp949.py +39 -0
- package/python/lib/python3.12/encodings/cp950.py +39 -0
- package/python/lib/python3.12/encodings/euc_jis_2004.py +39 -0
- package/python/lib/python3.12/encodings/euc_jisx0213.py +39 -0
- package/python/lib/python3.12/encodings/euc_jp.py +39 -0
- package/python/lib/python3.12/encodings/euc_kr.py +39 -0
- package/python/lib/python3.12/encodings/gb18030.py +39 -0
- package/python/lib/python3.12/encodings/gb2312.py +39 -0
- package/python/lib/python3.12/encodings/gbk.py +39 -0
- package/python/lib/python3.12/encodings/hex_codec.py +55 -0
- package/python/lib/python3.12/encodings/hp_roman8.py +314 -0
- package/python/lib/python3.12/encodings/hz.py +39 -0
- package/python/lib/python3.12/encodings/idna.py +317 -0
- package/python/lib/python3.12/encodings/iso2022_jp.py +39 -0
- package/python/lib/python3.12/encodings/iso2022_jp_1.py +39 -0
- package/python/lib/python3.12/encodings/iso2022_jp_2.py +39 -0
- package/python/lib/python3.12/encodings/iso2022_jp_2004.py +39 -0
- package/python/lib/python3.12/encodings/iso2022_jp_3.py +39 -0
- package/python/lib/python3.12/encodings/iso2022_jp_ext.py +39 -0
- package/python/lib/python3.12/encodings/iso2022_kr.py +39 -0
- package/python/lib/python3.12/encodings/iso8859_1.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_10.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_11.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_13.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_14.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_15.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_16.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_2.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_3.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_4.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_5.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_6.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_7.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_8.py +307 -0
- package/python/lib/python3.12/encodings/iso8859_9.py +307 -0
- package/python/lib/python3.12/encodings/johab.py +39 -0
- package/python/lib/python3.12/encodings/koi8_r.py +307 -0
- package/python/lib/python3.12/encodings/koi8_t.py +308 -0
- package/python/lib/python3.12/encodings/koi8_u.py +307 -0
- package/python/lib/python3.12/encodings/kz1048.py +307 -0
- package/python/lib/python3.12/encodings/latin_1.py +50 -0
- package/python/lib/python3.12/encodings/mac_arabic.py +698 -0
- package/python/lib/python3.12/encodings/mac_croatian.py +307 -0
- package/python/lib/python3.12/encodings/mac_cyrillic.py +307 -0
- package/python/lib/python3.12/encodings/mac_farsi.py +307 -0
- package/python/lib/python3.12/encodings/mac_greek.py +307 -0
- package/python/lib/python3.12/encodings/mac_iceland.py +307 -0
- package/python/lib/python3.12/encodings/mac_latin2.py +312 -0
- package/python/lib/python3.12/encodings/mac_roman.py +307 -0
- package/python/lib/python3.12/encodings/mac_romanian.py +307 -0
- package/python/lib/python3.12/encodings/mac_turkish.py +307 -0
- package/python/lib/python3.12/encodings/mbcs.py +47 -0
- package/python/lib/python3.12/encodings/oem.py +41 -0
- package/python/lib/python3.12/encodings/palmos.py +308 -0
- package/python/lib/python3.12/encodings/ptcp154.py +312 -0
- package/python/lib/python3.12/encodings/punycode.py +237 -0
- package/python/lib/python3.12/encodings/quopri_codec.py +56 -0
- package/python/lib/python3.12/encodings/raw_unicode_escape.py +46 -0
- package/python/lib/python3.12/encodings/rot_13.py +113 -0
- package/python/lib/python3.12/encodings/shift_jis.py +39 -0
- package/python/lib/python3.12/encodings/shift_jis_2004.py +39 -0
- package/python/lib/python3.12/encodings/shift_jisx0213.py +39 -0
- package/python/lib/python3.12/encodings/tis_620.py +307 -0
- package/python/lib/python3.12/encodings/undefined.py +49 -0
- package/python/lib/python3.12/encodings/unicode_escape.py +46 -0
- package/python/lib/python3.12/encodings/utf_16.py +155 -0
- package/python/lib/python3.12/encodings/utf_16_be.py +42 -0
- package/python/lib/python3.12/encodings/utf_16_le.py +42 -0
- package/python/lib/python3.12/encodings/utf_32.py +150 -0
- package/python/lib/python3.12/encodings/utf_32_be.py +37 -0
- package/python/lib/python3.12/encodings/utf_32_le.py +37 -0
- package/python/lib/python3.12/encodings/utf_7.py +38 -0
- package/python/lib/python3.12/encodings/utf_8.py +42 -0
- package/python/lib/python3.12/encodings/utf_8_sig.py +130 -0
- package/python/lib/python3.12/encodings/uu_codec.py +103 -0
- package/python/lib/python3.12/encodings/zlib_codec.py +77 -0
- package/python/lib/python3.12/ensurepip/__init__.py +291 -0
- package/python/lib/python3.12/ensurepip/__main__.py +5 -0
- package/python/lib/python3.12/ensurepip/_bundled/pip-26.2.2-py3-none-any.whl +0 -0
- package/python/lib/python3.12/ensurepip/_uninstall.py +31 -0
- package/python/lib/python3.12/enum.py +2108 -0
- package/python/lib/python3.12/filecmp.py +315 -0
- package/python/lib/python3.12/fileinput.py +442 -0
- package/python/lib/python3.12/fnmatch.py +185 -0
- package/python/lib/python3.12/fractions.py +990 -0
- package/python/lib/python3.12/ftplib.py +975 -0
- package/python/lib/python3.12/functools.py +1009 -0
- package/python/lib/python3.12/genericpath.py +176 -0
- package/python/lib/python3.12/getopt.py +215 -0
- package/python/lib/python3.12/getpass.py +185 -0
- package/python/lib/python3.12/gettext.py +646 -0
- package/python/lib/python3.12/glob.py +252 -0
- package/python/lib/python3.12/graphlib.py +250 -0
- package/python/lib/python3.12/gzip.py +711 -0
- package/python/lib/python3.12/hashlib.py +253 -0
- package/python/lib/python3.12/heapq.py +603 -0
- package/python/lib/python3.12/hmac.py +219 -0
- package/python/lib/python3.12/html/__init__.py +132 -0
- package/python/lib/python3.12/html/entities.py +2513 -0
- package/python/lib/python3.12/html/parser.py +563 -0
- package/python/lib/python3.12/http/__init__.py +200 -0
- package/python/lib/python3.12/http/client.py +1598 -0
- package/python/lib/python3.12/http/cookiejar.py +2132 -0
- package/python/lib/python3.12/http/cookies.py +631 -0
- package/python/lib/python3.12/http/server.py +1335 -0
- package/python/lib/python3.12/imaplib.py +1641 -0
- package/python/lib/python3.12/imghdr.py +180 -0
- package/python/lib/python3.12/importlib/__init__.py +138 -0
- package/python/lib/python3.12/importlib/_abc.py +39 -0
- package/python/lib/python3.12/importlib/_bootstrap.py +1551 -0
- package/python/lib/python3.12/importlib/_bootstrap_external.py +1749 -0
- package/python/lib/python3.12/importlib/abc.py +239 -0
- package/python/lib/python3.12/importlib/machinery.py +20 -0
- package/python/lib/python3.12/importlib/metadata/__init__.py +966 -0
- package/python/lib/python3.12/importlib/metadata/_adapters.py +89 -0
- package/python/lib/python3.12/importlib/metadata/_collections.py +30 -0
- package/python/lib/python3.12/importlib/metadata/_functools.py +104 -0
- package/python/lib/python3.12/importlib/metadata/_itertools.py +73 -0
- package/python/lib/python3.12/importlib/metadata/_meta.py +63 -0
- package/python/lib/python3.12/importlib/metadata/_text.py +99 -0
- package/python/lib/python3.12/importlib/readers.py +12 -0
- package/python/lib/python3.12/importlib/resources/__init__.py +38 -0
- package/python/lib/python3.12/importlib/resources/_adapters.py +168 -0
- package/python/lib/python3.12/importlib/resources/_common.py +208 -0
- package/python/lib/python3.12/importlib/resources/_itertools.py +38 -0
- package/python/lib/python3.12/importlib/resources/_legacy.py +98 -0
- package/python/lib/python3.12/importlib/resources/abc.py +173 -0
- package/python/lib/python3.12/importlib/resources/readers.py +146 -0
- package/python/lib/python3.12/importlib/resources/simple.py +106 -0
- package/python/lib/python3.12/importlib/simple.py +14 -0
- package/python/lib/python3.12/importlib/util.py +270 -0
- package/python/lib/python3.12/inspect.py +3433 -0
- package/python/lib/python3.12/io.py +99 -0
- package/python/lib/python3.12/ipaddress.py +2430 -0
- package/python/lib/python3.12/json/__init__.py +359 -0
- package/python/lib/python3.12/json/decoder.py +357 -0
- package/python/lib/python3.12/json/encoder.py +443 -0
- package/python/lib/python3.12/json/scanner.py +73 -0
- package/python/lib/python3.12/json/tool.py +85 -0
- package/python/lib/python3.12/keyword.py +64 -0
- package/python/lib/python3.12/lib-dynload/.empty +0 -0
- package/python/lib/python3.12/lib-dynload/_crypt.cpython-312-darwin.so +0 -0
- package/python/lib/python3.12/lib-dynload/_dbm.cpython-312-darwin.so +0 -0
- package/python/lib/python3.12/lib2to3/Grammar.txt +196 -0
- package/python/lib/python3.12/lib2to3/Grammar3.12.16.final.0.pickle +0 -0
- package/python/lib/python3.12/lib2to3/PatternGrammar.txt +28 -0
- package/python/lib/python3.12/lib2to3/PatternGrammar3.12.16.final.0.pickle +0 -0
- package/python/lib/python3.12/lib2to3/__init__.py +8 -0
- package/python/lib/python3.12/lib2to3/__main__.py +4 -0
- package/python/lib/python3.12/lib2to3/btm_matcher.py +163 -0
- package/python/lib/python3.12/lib2to3/btm_utils.py +280 -0
- package/python/lib/python3.12/lib2to3/fixer_base.py +186 -0
- package/python/lib/python3.12/lib2to3/fixer_util.py +453 -0
- package/python/lib/python3.12/lib2to3/fixes/__init__.py +1 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_apply.py +68 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_asserts.py +34 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_basestring.py +14 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_buffer.py +22 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_dict.py +106 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_except.py +93 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_exec.py +39 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_execfile.py +53 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_exitfunc.py +72 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_filter.py +94 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_funcattrs.py +21 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_future.py +22 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_getcwdu.py +19 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_has_key.py +109 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_idioms.py +152 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_import.py +99 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_imports.py +145 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_imports2.py +16 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_input.py +26 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_intern.py +39 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_isinstance.py +52 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_itertools.py +43 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_itertools_imports.py +57 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_long.py +19 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_map.py +110 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_metaclass.py +228 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_methodattrs.py +24 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_ne.py +23 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_next.py +103 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_nonzero.py +21 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_numliterals.py +28 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_operator.py +97 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_paren.py +44 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_print.py +87 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_raise.py +90 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_raw_input.py +17 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_reduce.py +35 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_reload.py +36 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_renames.py +70 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_repr.py +23 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_set_literal.py +53 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_standarderror.py +18 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_sys_exc.py +30 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_throw.py +56 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_tuple_params.py +175 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_types.py +61 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_unicode.py +42 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_urllib.py +196 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_ws_comma.py +39 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_xrange.py +73 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_xreadlines.py +25 -0
- package/python/lib/python3.12/lib2to3/fixes/fix_zip.py +46 -0
- package/python/lib/python3.12/lib2to3/main.py +273 -0
- package/python/lib/python3.12/lib2to3/patcomp.py +204 -0
- package/python/lib/python3.12/lib2to3/pgen2/__init__.py +4 -0
- package/python/lib/python3.12/lib2to3/pgen2/conv.py +257 -0
- package/python/lib/python3.12/lib2to3/pgen2/driver.py +177 -0
- package/python/lib/python3.12/lib2to3/pgen2/grammar.py +189 -0
- package/python/lib/python3.12/lib2to3/pgen2/literals.py +60 -0
- package/python/lib/python3.12/lib2to3/pgen2/parse.py +204 -0
- package/python/lib/python3.12/lib2to3/pgen2/pgen.py +386 -0
- package/python/lib/python3.12/lib2to3/pgen2/token.py +86 -0
- package/python/lib/python3.12/lib2to3/pgen2/tokenize.py +564 -0
- package/python/lib/python3.12/lib2to3/pygram.py +43 -0
- package/python/lib/python3.12/lib2to3/pytree.py +853 -0
- package/python/lib/python3.12/lib2to3/refactor.py +732 -0
- package/python/lib/python3.12/linecache.py +185 -0
- package/python/lib/python3.12/locale.py +1779 -0
- package/python/lib/python3.12/logging/__init__.py +2345 -0
- package/python/lib/python3.12/logging/config.py +1078 -0
- package/python/lib/python3.12/logging/handlers.py +1624 -0
- package/python/lib/python3.12/lzma.py +356 -0
- package/python/lib/python3.12/mailbox.py +2153 -0
- package/python/lib/python3.12/mailcap.py +302 -0
- package/python/lib/python3.12/mimetypes.py +662 -0
- package/python/lib/python3.12/modulefinder.py +666 -0
- package/python/lib/python3.12/multiprocessing/__init__.py +37 -0
- package/python/lib/python3.12/multiprocessing/connection.py +1178 -0
- package/python/lib/python3.12/multiprocessing/context.py +377 -0
- package/python/lib/python3.12/multiprocessing/dummy/__init__.py +126 -0
- package/python/lib/python3.12/multiprocessing/dummy/connection.py +75 -0
- package/python/lib/python3.12/multiprocessing/forkserver.py +350 -0
- package/python/lib/python3.12/multiprocessing/heap.py +337 -0
- package/python/lib/python3.12/multiprocessing/managers.py +1387 -0
- package/python/lib/python3.12/multiprocessing/pool.py +957 -0
- package/python/lib/python3.12/multiprocessing/popen_fork.py +83 -0
- package/python/lib/python3.12/multiprocessing/popen_forkserver.py +74 -0
- package/python/lib/python3.12/multiprocessing/popen_spawn_posix.py +72 -0
- package/python/lib/python3.12/multiprocessing/popen_spawn_win32.py +145 -0
- package/python/lib/python3.12/multiprocessing/process.py +439 -0
- package/python/lib/python3.12/multiprocessing/queues.py +401 -0
- package/python/lib/python3.12/multiprocessing/reduction.py +281 -0
- package/python/lib/python3.12/multiprocessing/resource_sharer.py +154 -0
- package/python/lib/python3.12/multiprocessing/resource_tracker.py +294 -0
- package/python/lib/python3.12/multiprocessing/shared_memory.py +534 -0
- package/python/lib/python3.12/multiprocessing/sharedctypes.py +240 -0
- package/python/lib/python3.12/multiprocessing/spawn.py +307 -0
- package/python/lib/python3.12/multiprocessing/synchronize.py +404 -0
- package/python/lib/python3.12/multiprocessing/util.py +494 -0
- package/python/lib/python3.12/netrc.py +192 -0
- package/python/lib/python3.12/nntplib.py +1093 -0
- package/python/lib/python3.12/ntpath.py +869 -0
- package/python/lib/python3.12/nturl2path.py +69 -0
- package/python/lib/python3.12/numbers.py +418 -0
- package/python/lib/python3.12/opcode.py +493 -0
- package/python/lib/python3.12/operator.py +467 -0
- package/python/lib/python3.12/optparse.py +1681 -0
- package/python/lib/python3.12/os.py +1160 -0
- package/python/lib/python3.12/pathlib.py +1435 -0
- package/python/lib/python3.12/pdb.py +1987 -0
- package/python/lib/python3.12/pickle.py +1866 -0
- package/python/lib/python3.12/pickletools.py +2904 -0
- package/python/lib/python3.12/pipes.py +250 -0
- package/python/lib/python3.12/pkgutil.py +529 -0
- package/python/lib/python3.12/platform.py +1359 -0
- package/python/lib/python3.12/plistlib.py +920 -0
- package/python/lib/python3.12/poplib.py +478 -0
- package/python/lib/python3.12/posixpath.py +577 -0
- package/python/lib/python3.12/pprint.py +658 -0
- package/python/lib/python3.12/profile.py +615 -0
- package/python/lib/python3.12/pstats.py +778 -0
- package/python/lib/python3.12/pty.py +211 -0
- package/python/lib/python3.12/py_compile.py +212 -0
- package/python/lib/python3.12/pyclbr.py +314 -0
- package/python/lib/python3.12/pydoc.py +2950 -0
- package/python/lib/python3.12/pydoc_data/__init__.py +0 -0
- package/python/lib/python3.12/pydoc_data/_pydoc.css +112 -0
- package/python/lib/python3.12/pydoc_data/topics.py +12500 -0
- package/python/lib/python3.12/queue.py +326 -0
- package/python/lib/python3.12/quopri.py +237 -0
- package/python/lib/python3.12/random.py +996 -0
- package/python/lib/python3.12/re/__init__.py +385 -0
- package/python/lib/python3.12/re/_casefix.py +106 -0
- package/python/lib/python3.12/re/_compiler.py +770 -0
- package/python/lib/python3.12/re/_constants.py +220 -0
- package/python/lib/python3.12/re/_parser.py +1080 -0
- package/python/lib/python3.12/reprlib.py +214 -0
- package/python/lib/python3.12/rlcompleter.py +219 -0
- package/python/lib/python3.12/runpy.py +319 -0
- package/python/lib/python3.12/sched.py +167 -0
- package/python/lib/python3.12/secrets.py +71 -0
- package/python/lib/python3.12/selectors.py +623 -0
- package/python/lib/python3.12/shelve.py +243 -0
- package/python/lib/python3.12/shlex.py +345 -0
- package/python/lib/python3.12/shutil.py +1555 -0
- package/python/lib/python3.12/signal.py +94 -0
- package/python/lib/python3.12/site-packages/README.txt +2 -0
- package/python/lib/python3.12/site-packages/pip/__init__.py +13 -0
- package/python/lib/python3.12/site-packages/pip/__main__.py +24 -0
- package/python/lib/python3.12/site-packages/pip/__pip-runner__.py +50 -0
- package/python/lib/python3.12/site-packages/pip/_internal/__init__.py +18 -0
- package/python/lib/python3.12/site-packages/pip/_internal/build_env/__init__.py +25 -0
- package/python/lib/python3.12/site-packages/pip/_internal/build_env/base.py +103 -0
- package/python/lib/python3.12/site-packages/pip/_internal/build_env/installer.py +333 -0
- package/python/lib/python3.12/site-packages/pip/_internal/build_env/noop.py +42 -0
- package/python/lib/python3.12/site-packages/pip/_internal/build_env/venv.py +145 -0
- package/python/lib/python3.12/site-packages/pip/_internal/build_env/virtual.py +139 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cache.py +294 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/__init__.py +3 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py +187 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/base_command.py +261 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py +1409 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/command_context.py +28 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/index_command.py +217 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/main.py +86 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py +135 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/parser.py +366 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py +153 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/req_command.py +504 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/spinners.py +235 -0
- package/python/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py +7 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/__init__.py +139 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/cache.py +256 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/check.py +66 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/completion.py +136 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/configuration.py +289 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/debug.py +195 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/download.py +150 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/freeze.py +107 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/hash.py +58 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/help.py +40 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/index.py +173 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/inspect.py +92 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/install.py +904 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/list.py +408 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/lock.py +173 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/search.py +178 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/show.py +237 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py +113 -0
- package/python/lib/python3.12/site-packages/pip/_internal/commands/wheel.py +177 -0
- package/python/lib/python3.12/site-packages/pip/_internal/configuration.py +395 -0
- package/python/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py +21 -0
- package/python/lib/python3.12/site-packages/pip/_internal/distributions/base.py +57 -0
- package/python/lib/python3.12/site-packages/pip/_internal/distributions/installed.py +34 -0
- package/python/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py +193 -0
- package/python/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py +45 -0
- package/python/lib/python3.12/site-packages/pip/_internal/exceptions.py +1145 -0
- package/python/lib/python3.12/site-packages/pip/_internal/index/__init__.py +1 -0
- package/python/lib/python3.12/site-packages/pip/_internal/index/collector.py +510 -0
- package/python/lib/python3.12/site-packages/pip/_internal/index/package_finder.py +1152 -0
- package/python/lib/python3.12/site-packages/pip/_internal/index/sources.py +286 -0
- package/python/lib/python3.12/site-packages/pip/_internal/locations/__init__.py +438 -0
- package/python/lib/python3.12/site-packages/pip/_internal/locations/_distutils.py +173 -0
- package/python/lib/python3.12/site-packages/pip/_internal/locations/_sysconfig.py +218 -0
- package/python/lib/python3.12/site-packages/pip/_internal/locations/base.py +82 -0
- package/python/lib/python3.12/site-packages/pip/_internal/main.py +12 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/__init__.py +169 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/_json.py +87 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/base.py +690 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py +6 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py +87 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py +235 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py +148 -0
- package/python/lib/python3.12/site-packages/pip/_internal/metadata/pkg_resources.py +298 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/__init__.py +1 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/candidate.py +27 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/direct_url.py +42 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/format_control.py +78 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/index.py +28 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/installation_report.py +57 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/link.py +657 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/release_control.py +91 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/scheme.py +23 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/search_scope.py +124 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/selection_prefs.py +36 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/target_python.py +122 -0
- package/python/lib/python3.12/site-packages/pip/_internal/models/wheel.py +80 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/__init__.py +1 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/auth.py +587 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/cache.py +128 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/download.py +387 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.py +215 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/session.py +532 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/utils.py +206 -0
- package/python/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.py +61 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py +140 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py +38 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py +41 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py +38 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py +47 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/check.py +174 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/freeze.py +259 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py +1 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py +764 -0
- package/python/lib/python3.12/site-packages/pip/_internal/operations/prepare.py +896 -0
- package/python/lib/python3.12/site-packages/pip/_internal/pyproject.py +123 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/__init__.py +105 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/constructors.py +662 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/pep723.py +41 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/req_dependency_group.py +86 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/req_file.py +622 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/req_install.py +842 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/req_set.py +81 -0
- package/python/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py +644 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/base.py +20 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py +598 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py +164 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py +598 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py +901 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +166 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py +309 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py +98 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py +251 -0
- package/python/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py +341 -0
- package/python/lib/python3.12/site-packages/pip/_internal/self_outdated_check.py +246 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/_log.py +38 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/appdirs.py +52 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/compat.py +91 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/compatibility_tags.py +201 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/datetime.py +28 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/deprecation.py +144 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/direct_url_helpers.py +92 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/egg_link.py +81 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/entrypoints.py +88 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/filesystem.py +201 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/filetypes.py +24 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/glibc.py +102 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/hashes.py +150 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/logging.py +404 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/misc.py +815 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/packaging.py +44 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/pylock.py +299 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/retry.py +46 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/subprocess.py +249 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/temp_dir.py +293 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/unpacking.py +407 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/urls.py +58 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/virtualenv.py +71 -0
- package/python/lib/python3.12/site-packages/pip/_internal/utils/wheel.py +132 -0
- package/python/lib/python3.12/site-packages/pip/_internal/vcs/__init__.py +15 -0
- package/python/lib/python3.12/site-packages/pip/_internal/vcs/bazaar.py +130 -0
- package/python/lib/python3.12/site-packages/pip/_internal/vcs/git.py +574 -0
- package/python/lib/python3.12/site-packages/pip/_internal/vcs/mercurial.py +186 -0
- package/python/lib/python3.12/site-packages/pip/_internal/vcs/subversion.py +335 -0
- package/python/lib/python3.12/site-packages/pip/_internal/vcs/versioncontrol.py +694 -0
- package/python/lib/python3.12/site-packages/pip/_internal/wheel_builder.py +265 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/README.rst +178 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/__init__.py +117 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/bom.cdx.json +231 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py +32 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py +70 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py +167 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py +75 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +8 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +145 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +48 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py +511 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py +121 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py +157 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py +146 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py +43 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/LICENSE +20 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py +4 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py +12 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem +3936 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/core.py +83 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/tests/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/certifi/tests/test_certify.py +18 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/LICENSE.txt +284 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py +33 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/compat.py +1107 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/resources.py +372 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py +451 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/t32.exe +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/t64-arm.exe +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/t64.exe +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/util.py +2021 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/w32.exe +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/w64-arm.exe +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distlib/w64.exe +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distro/LICENSE +202 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py +54 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py +4 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distro/distro.py +1403 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/distro/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/LICENSE.md +31 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py +45 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/__main__.py +6 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/cli.py +128 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/codec.py +159 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/compat.py +41 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/core.py +648 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py +1897 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py +55 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py +1 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py +16896 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/msgpack/COPYING +14 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py +55 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py +170 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py +929 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/LICENSE +3 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/LICENSE.APACHE +177 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/LICENSE.BSD +23 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py +15 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/_elffile.py +108 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py +262 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py +85 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/_parser.py +393 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py +33 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/_tokenizer.py +193 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/dependency_groups.py +302 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/direct_url.py +325 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/errors.py +94 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__init__.py +186 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/_spdx.py +799 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/markers.py +492 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/metadata.py +964 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/pylock.py +905 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.py +129 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py +1943 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py +932 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/utils.py +296 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/packaging/version.py +1231 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pkg_resources/LICENSE +17 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py +3676 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py +917 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py +66 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py +300 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py +463 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py +223 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py +321 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py +24 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py +395 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/LICENSE +25 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.py +82 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py +17 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/console.py +70 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py +70 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py +942 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py +129 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py +157 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/lexer.py +965 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/_mapping.py +603 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/python.py +1204 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.py +43 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/plugin.py +74 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/regexopt.py +102 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/scanner.py +104 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/sphinxext.py +247 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/style.py +203 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__init__.py +61 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/styles/_mapping.py +54 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/token.py +214 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/unistring.py +153 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pygments/util.py +324 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__init__.py +31 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py +410 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +389 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/LICENSE +175 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/__init__.py +214 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/__version__.py +14 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/_internal_utils.py +51 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/_types.py +183 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/adapters.py +748 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/api.py +180 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/auth.py +354 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/certs.py +18 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/compat.py +96 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/cookies.py +625 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/exceptions.py +162 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/help.py +127 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/hooks.py +48 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/models.py +1180 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/packages.py +25 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/sessions.py +920 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/status_codes.py +128 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/structures.py +130 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/requests/utils.py +1155 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/LICENSE +13 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/__init__.py +27 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/providers.py +196 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/reporters.py +55 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +27 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +47 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +48 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +57 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +627 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py +209 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/LICENSE +19 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/__init__.py +177 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/__main__.py +245 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_cell_widths.py +454 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_export_format.py +76 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py +10 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py +24 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py +268 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py +94 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py +43 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py +69 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py +309 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py +17 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.py +153 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py +482 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py +16 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py +19 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.py +661 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_windows.py +71 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py +93 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/abc.py +33 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/align.py +306 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/ansi.py +241 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/bar.py +93 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/box.py +474 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/cells.py +174 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/color.py +621 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/columns.py +187 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/console.py +2680 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py +37 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/containers.py +167 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/control.py +219 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py +193 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py +39 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/emoji.py +91 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/errors.py +34 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py +88 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py +232 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/json.py +139 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/jupyter.py +101 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/layout.py +442 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/live.py +400 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/live_render.py +106 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/logging.py +297 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/markup.py +251 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/measure.py +151 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/padding.py +141 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/pager.py +34 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/palette.py +100 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/panel.py +317 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/pretty.py +1016 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/progress.py +1715 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/progress_bar.py +223 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/prompt.py +400 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/protocol.py +42 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/region.py +10 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/repr.py +149 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/rule.py +130 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/scope.py +86 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/screen.py +54 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/segment.py +752 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/spinner.py +132 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/status.py +131 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/style.py +792 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/styled.py +42 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/syntax.py +985 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/table.py +1006 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/text.py +1361 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/theme.py +115 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/themes.py +5 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/traceback.py +899 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/rich/tree.py +257 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli/__init__.py +8 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli/_parser.py +793 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli/_re.py +119 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli/_types.py +10 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli/py.typed +1 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli_w/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli_w/__init__.py +4 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli_w/_writer.py +229 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/tomli_w/py.typed +1 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/__init__.py +36 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/_api.py +341 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/_macos.py +571 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/_openssl.py +68 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/_ssl_constants.py +31 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/_windows.py +567 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/truststore/py.typed +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/LICENSE.txt +21 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/__init__.py +211 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/_base_connection.py +167 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/_collections.py +486 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/_request_methods.py +278 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/_version.py +24 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/connection.py +1099 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/connectionpool.py +1191 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/emscripten/__init__.py +17 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/emscripten/connection.py +260 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/emscripten/emscripten_fetch_worker.js +110 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/emscripten/fetch.py +726 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/emscripten/request.py +22 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +281 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +563 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/socks.py +228 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/exceptions.py +335 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/fields.py +341 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/filepost.py +89 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/http2/__init__.py +53 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/http2/connection.py +356 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/http2/probe.py +87 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/poolmanager.py +653 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/py.typed +2 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py +1487 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__init__.py +42 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/connection.py +137 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/proxy.py +43 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/request.py +254 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/response.py +101 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/retry.py +557 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_.py +477 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +153 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssltransport.py +271 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/timeout.py +275 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/url.py +469 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/util.py +42 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/urllib3/util/wait.py +124 -0
- package/python/lib/python3.12/site-packages/pip/_vendor/vendor.txt +18 -0
- package/python/lib/python3.12/site-packages/pip/py.typed +4 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/INSTALLER +1 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/METADATA +110 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/RECORD +890 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/REQUESTED +0 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/WHEEL +4 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/direct_url.json +1 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/entry_points.txt +4 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/AUTHORS.txt +888 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/LICENSE.txt +20 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +20 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt +284 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/distro/LICENSE +202 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md +31 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/msgpack/COPYING +14 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE +3 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +177 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD +23 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +17 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/pygments/LICENSE +25 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/requests/LICENSE +175 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE +13 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/rich/LICENSE +19 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +21 -0
- package/python/lib/python3.12/site-packages/pip-26.2.2.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt +21 -0
- package/python/lib/python3.12/site.py +693 -0
- package/python/lib/python3.12/smtplib.py +1109 -0
- package/python/lib/python3.12/sndhdr.py +271 -0
- package/python/lib/python3.12/socket.py +983 -0
- package/python/lib/python3.12/socketserver.py +863 -0
- package/python/lib/python3.12/sqlite3/__init__.py +70 -0
- package/python/lib/python3.12/sqlite3/__main__.py +127 -0
- package/python/lib/python3.12/sqlite3/dbapi2.py +108 -0
- package/python/lib/python3.12/sqlite3/dump.py +89 -0
- package/python/lib/python3.12/sre_compile.py +7 -0
- package/python/lib/python3.12/sre_constants.py +7 -0
- package/python/lib/python3.12/sre_parse.py +7 -0
- package/python/lib/python3.12/ssl.py +1501 -0
- package/python/lib/python3.12/stat.py +195 -0
- package/python/lib/python3.12/statistics.py +1454 -0
- package/python/lib/python3.12/string.py +309 -0
- package/python/lib/python3.12/stringprep.py +449 -0
- package/python/lib/python3.12/struct.py +15 -0
- package/python/lib/python3.12/subprocess.py +2216 -0
- package/python/lib/python3.12/sunau.py +533 -0
- package/python/lib/python3.12/symtable.py +362 -0
- package/python/lib/python3.12/sysconfig.py +894 -0
- package/python/lib/python3.12/tabnanny.py +340 -0
- package/python/lib/python3.12/tarfile.py +3078 -0
- package/python/lib/python3.12/telnetlib.py +680 -0
- package/python/lib/python3.12/tempfile.py +1035 -0
- package/python/lib/python3.12/textwrap.py +491 -0
- package/python/lib/python3.12/this.py +28 -0
- package/python/lib/python3.12/threading.py +1708 -0
- package/python/lib/python3.12/timeit.py +381 -0
- package/python/lib/python3.12/token.py +143 -0
- package/python/lib/python3.12/tokenize.py +594 -0
- package/python/lib/python3.12/tomllib/__init__.py +10 -0
- package/python/lib/python3.12/tomllib/_parser.py +703 -0
- package/python/lib/python3.12/tomllib/_re.py +107 -0
- package/python/lib/python3.12/tomllib/_types.py +10 -0
- package/python/lib/python3.12/trace.py +748 -0
- package/python/lib/python3.12/traceback.py +1187 -0
- package/python/lib/python3.12/tracemalloc.py +560 -0
- package/python/lib/python3.12/tty.py +73 -0
- package/python/lib/python3.12/types.py +333 -0
- package/python/lib/python3.12/typing.py +3494 -0
- package/python/lib/python3.12/unittest/__init__.py +85 -0
- package/python/lib/python3.12/unittest/__main__.py +18 -0
- package/python/lib/python3.12/unittest/_log.py +86 -0
- package/python/lib/python3.12/unittest/async_case.py +143 -0
- package/python/lib/python3.12/unittest/case.py +1456 -0
- package/python/lib/python3.12/unittest/loader.py +497 -0
- package/python/lib/python3.12/unittest/main.py +291 -0
- package/python/lib/python3.12/unittest/mock.py +3054 -0
- package/python/lib/python3.12/unittest/result.py +256 -0
- package/python/lib/python3.12/unittest/runner.py +292 -0
- package/python/lib/python3.12/unittest/signals.py +71 -0
- package/python/lib/python3.12/unittest/suite.py +379 -0
- package/python/lib/python3.12/unittest/util.py +170 -0
- package/python/lib/python3.12/urllib/__init__.py +0 -0
- package/python/lib/python3.12/urllib/error.py +74 -0
- package/python/lib/python3.12/urllib/parse.py +1262 -0
- package/python/lib/python3.12/urllib/request.py +2829 -0
- package/python/lib/python3.12/urllib/response.py +84 -0
- package/python/lib/python3.12/urllib/robotparser.py +275 -0
- package/python/lib/python3.12/uu.py +216 -0
- package/python/lib/python3.12/uuid.py +793 -0
- package/python/lib/python3.12/venv/__init__.py +608 -0
- package/python/lib/python3.12/venv/__main__.py +10 -0
- package/python/lib/python3.12/venv/scripts/common/Activate.ps1 +247 -0
- package/python/lib/python3.12/venv/scripts/common/activate +76 -0
- package/python/lib/python3.12/venv/scripts/posix/activate.csh +27 -0
- package/python/lib/python3.12/venv/scripts/posix/activate.fish +69 -0
- package/python/lib/python3.12/warnings.py +598 -0
- package/python/lib/python3.12/wave.py +653 -0
- package/python/lib/python3.12/weakref.py +674 -0
- package/python/lib/python3.12/webbrowser.py +702 -0
- package/python/lib/python3.12/wsgiref/__init__.py +25 -0
- package/python/lib/python3.12/wsgiref/handlers.py +575 -0
- package/python/lib/python3.12/wsgiref/headers.py +192 -0
- package/python/lib/python3.12/wsgiref/simple_server.py +165 -0
- package/python/lib/python3.12/wsgiref/types.py +54 -0
- package/python/lib/python3.12/wsgiref/util.py +159 -0
- package/python/lib/python3.12/wsgiref/validate.py +438 -0
- package/python/lib/python3.12/xdrlib.py +242 -0
- package/python/lib/python3.12/xml/__init__.py +20 -0
- package/python/lib/python3.12/xml/dom/NodeFilter.py +27 -0
- package/python/lib/python3.12/xml/dom/__init__.py +140 -0
- package/python/lib/python3.12/xml/dom/domreg.py +99 -0
- package/python/lib/python3.12/xml/dom/expatbuilder.py +962 -0
- package/python/lib/python3.12/xml/dom/minicompat.py +109 -0
- package/python/lib/python3.12/xml/dom/minidom.py +2008 -0
- package/python/lib/python3.12/xml/dom/pulldom.py +336 -0
- package/python/lib/python3.12/xml/dom/xmlbuilder.py +389 -0
- package/python/lib/python3.12/xml/etree/ElementInclude.py +186 -0
- package/python/lib/python3.12/xml/etree/ElementPath.py +430 -0
- package/python/lib/python3.12/xml/etree/ElementTree.py +2085 -0
- package/python/lib/python3.12/xml/etree/__init__.py +33 -0
- package/python/lib/python3.12/xml/etree/cElementTree.py +3 -0
- package/python/lib/python3.12/xml/parsers/__init__.py +8 -0
- package/python/lib/python3.12/xml/parsers/expat.py +8 -0
- package/python/lib/python3.12/xml/sax/__init__.py +94 -0
- package/python/lib/python3.12/xml/sax/_exceptions.py +127 -0
- package/python/lib/python3.12/xml/sax/expatreader.py +454 -0
- package/python/lib/python3.12/xml/sax/handler.py +387 -0
- package/python/lib/python3.12/xml/sax/saxutils.py +369 -0
- package/python/lib/python3.12/xml/sax/xmlreader.py +378 -0
- package/python/lib/python3.12/xmlrpc/__init__.py +1 -0
- package/python/lib/python3.12/xmlrpc/client.py +1529 -0
- package/python/lib/python3.12/xmlrpc/server.py +1002 -0
- package/python/lib/python3.12/zipapp.py +206 -0
- package/python/lib/python3.12/zipfile/__init__.py +2376 -0
- package/python/lib/python3.12/zipfile/__main__.py +4 -0
- package/python/lib/python3.12/zipfile/_path/__init__.py +412 -0
- package/python/lib/python3.12/zipfile/_path/glob.py +53 -0
- package/python/lib/python3.12/zipimport.py +712 -0
- package/python/lib/python3.12/zoneinfo/__init__.py +31 -0
- package/python/lib/python3.12/zoneinfo/_common.py +164 -0
- package/python/lib/python3.12/zoneinfo/_tzpath.py +181 -0
- package/python/lib/python3.12/zoneinfo/_zoneinfo.py +772 -0
- package/tool.json +1 -0
- package/README.md +0 -3
|
@@ -0,0 +1,1306 @@
|
|
|
1
|
+
// The page: reads the controls, prices them with SizeCalc (calc.js) and draws the answer.
|
|
2
|
+
const ATT_ZH = { full: "全注意力 GQA", swa: "滑窗混合", hybrid: "线性 / SSM 混合", mla: "MLA 潜向量" };
|
|
3
|
+
const EXACT_ZH = {
|
|
4
|
+
"active parameters cannot exceed total parameters": "激活参数量不能大于总参数量",
|
|
5
|
+
"active parameters must be positive and at most the total": "激活参数量必须大于 0 且不能大于总参数量",
|
|
6
|
+
"parameters must be greater than zero": "参数量必须大于 0",
|
|
7
|
+
"weight file size must be greater than zero": "权重文件大小必须大于 0",
|
|
8
|
+
"parameters and file size must be positive": "参数量和权重文件大小必须大于 0",
|
|
9
|
+
"give two of params, format and file size": "请提供总参数、量化格式和权重文件大小中的至少两项",
|
|
10
|
+
"context must be at least 1 token": "上下文长度至少为 1 token",
|
|
11
|
+
"slots must be at least 1": "并发槽位数至少为 1",
|
|
12
|
+
"exl bits per weight must be between 1 and 16": "EXL3 自定义位数需在 1–16 bpw 之间",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function zhMsg(msg) {
|
|
16
|
+
if (msg == null) return "";
|
|
17
|
+
const s = String(msg).trim();
|
|
18
|
+
if (!s) return "";
|
|
19
|
+
if (EXACT_ZH[s]) return EXACT_ZH[s];
|
|
20
|
+
if (s.startsWith("unknown format: ")) return `未知格式:${s.slice("unknown format: ".length)}`;
|
|
21
|
+
if (s.startsWith("unknown format ")) return `未知格式:${s.slice("unknown format ".length)}`;
|
|
22
|
+
if (s.startsWith("unknown KV cache type: ")) return `未知 KV 缓存类型:${s.slice("unknown KV cache type: ".length)}`;
|
|
23
|
+
let m = s.match(/^(.+) bits per weight is outside 1-32$/);
|
|
24
|
+
if (m) return `每权重位数 ${m[1]} 超出 1–32 范围`;
|
|
25
|
+
m = s.match(/^guessed for (\S+) attention$/);
|
|
26
|
+
if (m) return `按${ATT_ZH[m[1]] || m[1]}注意力参数量估算`;
|
|
27
|
+
m = s.match(/^([\d.]+[A-Za-z]*) parameters inferred from the file size at ([\d.]+) bpw$/);
|
|
28
|
+
if (m) return `按 ${m[2]} bpw 从权重文件大小反推出总参数量约为 ${m[1]}`;
|
|
29
|
+
m = s.match(/^([\d.]+) bits per weight; the nearest listed format is (.+)$/);
|
|
30
|
+
if (m) return `按文件大小折合每权重 ${m[1]} bits;表中最接近的格式是 ${m[2]}`;
|
|
31
|
+
m = s.match(/^the file holds ([\d.]+) bits per weight, (.+?) is typically ([\d.]+): check the parameter count \(embeddings, vision tower, MTP heads\)$/);
|
|
32
|
+
if (m) return `该文件每权重占 ${m[1]} bits,而 ${m[2]} 通常约为 ${m[3]} bpw:请核对总参数量(如嵌入层、视觉塔、MTP 头)`;
|
|
33
|
+
if (s.startsWith("EXL bit rates leave out the 16-bit embeddings and 6-bit head")) {
|
|
34
|
+
return "EXL 标称位数不含 16-bit 嵌入层与 6-bit 输出头,实际权重文件会比估算更大;已知真实大小时可填入「权重文件大小」。";
|
|
35
|
+
}
|
|
36
|
+
m = s.match(/^small model: embeddings are a large share, so real files run above the table \(([^)]+)\); give --file-size when known$/);
|
|
37
|
+
if (m) {
|
|
38
|
+
const ex = m[1].replace(" holds ", " 实测为 ").replace(" bits per weight", " bpw");
|
|
39
|
+
return `小模型嵌入层占比高,实际文件通常会高于表内平均位数(例如 ${ex});已知真实大小时可直接填入「权重文件大小」。`;
|
|
40
|
+
}
|
|
41
|
+
return s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (typeof document !== "undefined") (() => {
|
|
45
|
+
const calc = SizeCalc(SIZECALC_DATA);
|
|
46
|
+
const D = SIZECALC_DATA;
|
|
47
|
+
const GiB = 1073741824;
|
|
48
|
+
const $ = (id) => document.getElementById(id);
|
|
49
|
+
const esc = (s) => String(s).replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[c]);
|
|
50
|
+
const setClass = (el, cls, on) => { if (el?.classList) el.classList[on ? "add" : "remove"](cls); };
|
|
51
|
+
const announce = (msg) => {
|
|
52
|
+
const live = $("live-status");
|
|
53
|
+
if (!live) return;
|
|
54
|
+
live.textContent = "";
|
|
55
|
+
live.textContent = msg;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const TIER_ZH = {
|
|
59
|
+
phone: ["手机", "8–16 GB;安卓单个 App 上限 5–10 GiB"],
|
|
60
|
+
laptop: ["轻薄本 / 小 Mac", "16–36 GB 统一内存"],
|
|
61
|
+
"pc-gpu": ["家用 N 卡", "8–32 GB 显存,可借系统内存卸载"],
|
|
62
|
+
"big-unified": ["大内存一体机", "64–128 GB:Mac Max、DGX Spark、Ryzen AI Max"],
|
|
63
|
+
workstation: ["工作站", "48–96 GB 专业卡,Mac Studio Ultra 256–512 GB"],
|
|
64
|
+
"server-gpu": ["单张服务器卡", "80–192 GB HBM"],
|
|
65
|
+
node: ["8 卡服务器", "640–1536 GB HBM,张量并行"],
|
|
66
|
+
};
|
|
67
|
+
const VERDICT_ZH = { fits: "放得下", offload: "卸载到内存", no: "放不下" };
|
|
68
|
+
const SHORT = {
|
|
69
|
+
"iphone-8": "iPhone 8G", "iphone-12": "iPhone 12G", "android-12": "安卓 12G", "android-16": "安卓 16G",
|
|
70
|
+
"mac-16": "Air 16G", "mac-24": "mini 24G", "mac-36": "MBP 36G", rtx4060: "4060", rtx3060: "3060",
|
|
71
|
+
rtx4060ti: "4060Ti", rtx5070ti: "5070Ti", rtx3090: "3090", rtx4090: "4090", rtx5090: "5090",
|
|
72
|
+
"mac-64": "Mac 64G", "mac-128": "Mac 128G", "dgx-spark": "Spark", "ryzen-ai-max": "AI Max",
|
|
73
|
+
rtx6000ada: "6000Ada", rtxpro6000: "PRO6000", "mac-256": "Ultra 256G", "mac-512": "Ultra 512G",
|
|
74
|
+
a100: "A100", h100: "H100", h200: "H200", b200: "B200", mi300x: "MI300X",
|
|
75
|
+
"8xh100": "8×H100", "8xh200": "8×H200", "8xb200": "8×B200", "8xmi300x": "8×MI300X",
|
|
76
|
+
};
|
|
77
|
+
const FAMILY_ZH = {
|
|
78
|
+
float: "浮点原版", gguf: "GGUF(llama.cpp)", mlx: "MLX(Apple)", awq: "AWQ", gptq: "GPTQ",
|
|
79
|
+
fp8: "FP8", nvfp4: "NVFP4", mxfp4: "MXFP4", exl: "EXL2 / EXL3", bnb: "bitsandbytes",
|
|
80
|
+
};
|
|
81
|
+
const SUPPORT_ZH = {
|
|
82
|
+
native: ["原生", "该设备支持此格式的原生计算 kernel,可直接运行"],
|
|
83
|
+
fallback: ["回退", "可运行但走回退 / weight-only 路径(如 Ampere 卡运行 FP8 Marlin)"],
|
|
84
|
+
convert: ["需转换", "该设备不直接支持此格式,按同等体积换算为 GGUF / MLX 后估算"],
|
|
85
|
+
};
|
|
86
|
+
const BASIS_ZH = {
|
|
87
|
+
file: ["实测文件", "llama.cpp README 中 Llama-3.1-8B 整文件实测平均 bpw(含高精输出层与嵌入)"],
|
|
88
|
+
block: ["块公式", "按 ggml / 分组块结构推算,整文件通常高 0.2–0.8 bpw"],
|
|
89
|
+
derived: ["推导", "按张量量化结构加 16-bit 嵌入与输出头,针对 30B 级模型推算"],
|
|
90
|
+
exact: ["精确", "未量化浮点格式的名义精确位宽"],
|
|
91
|
+
target: ["目标值", "可变码率格式的目标平均位数,不含 16-bit 嵌入层"],
|
|
92
|
+
};
|
|
93
|
+
const FMT_NOTE_ZH = {
|
|
94
|
+
"the usual released checkpoint": "主流开源发布的原始权重格式",
|
|
95
|
+
"E4M3 + fp32 block scales, 16-bit embeddings; Ada/Hopper+": "E4M3 + fp32 分块缩放,16-bit 嵌入;需 Ada / Hopper 及以上",
|
|
96
|
+
"32 int8 + f16 scale per block": "每块 32 个 int8 + f16 缩放因子",
|
|
97
|
+
"group 64, scale + bias; embeddings quantized too": "每组 64 权重,含缩放与偏置;嵌入层也量化",
|
|
98
|
+
"the common default": "最常用的默认平衡量化",
|
|
99
|
+
"also the usual QAT release format": "也是常见的量化感知训练(QAT)发布格式",
|
|
100
|
+
"FP4 + E4M3 scale per 16, 16-bit embeddings; Blackwell": "每 16 权重配 E4M3 缩放,16-bit 嵌入;Blackwell 原生",
|
|
101
|
+
"int4 g128 is 4.16; 16-bit embeddings: 8B 5.7, 70B 4.5": "int4 (g128) 纯块 4.16 bpw;含 16-bit 嵌入:8B 约 5.7、70B 约 4.5",
|
|
102
|
+
"bitsandbytes 4-bit 4.5 (4.127 double-quant), bf16 embeddings": "bitsandbytes 4-bit 约 4.5(双重量化 4.127),bf16 嵌入",
|
|
103
|
+
"gpt-oss-120b: MXFP4 experts, Q8_0 elsewhere": "gpt-oss-120b 实测:专家层 MXFP4,其余层 Q8_0",
|
|
104
|
+
"IQ1/IQ2 keep the output at Q5_K": "IQ1 / IQ2 会将输出层保留在 Q5_K",
|
|
105
|
+
"ExLlama: embeddings stay 16-bit": "ExLlama 可变码率,嵌入层保留 16-bit",
|
|
106
|
+
};
|
|
107
|
+
const PRESET_GROUPS = [
|
|
108
|
+
{ id: "light", label: "轻量 3–8B", match: (p) => p.params < 15 },
|
|
109
|
+
{ id: "main", label: "主力 20–70B", match: (p) => p.params >= 15 && p.params < 100 },
|
|
110
|
+
{ id: "mega", label: "超大 MoE 120B+", match: (p) => p.params >= 100 },
|
|
111
|
+
];
|
|
112
|
+
const DEVICE_META = Object.fromEntries(D.devices.map((x) => [x.id, x]));
|
|
113
|
+
const CONTEXTS = [4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576];
|
|
114
|
+
|
|
115
|
+
// Public model shapes from sizecalc.EXAMPLES; the CLI fills catalog sizes from catalog.json.
|
|
116
|
+
const PRESETS = D.examples.map((x) => ({
|
|
117
|
+
id: x.id, name: x.name, params: x.params / 1e9, active: x.active ? x.active / 1e9 : null,
|
|
118
|
+
attention: x.attention, kv: x.kv_per_token / 1024, quant: x.quant,
|
|
119
|
+
file: x.file_bytes ? +(x.file_bytes / 1e9).toFixed(3) : null,
|
|
120
|
+
}));
|
|
121
|
+
|
|
122
|
+
const REFS = [
|
|
123
|
+
["llama.cpp quantize README:Llama-3.1-8B 各量化的整文件 bpw", "https://github.com/ggml-org/llama.cpp/blob/master/tools/quantize/README.md"],
|
|
124
|
+
["llama.cpp --fit / llama-fit-params:空跑真实分配,每卡留 1 GiB,MoE 专家按层溢出到 CPU", "https://github.com/ggml-org/llama.cpp/tree/master/tools/fit-params"],
|
|
125
|
+
["gpustack/gguf-parser-go:只读 GGUF 头,逐张量求和估 RAM / VRAM(MIT)", "https://github.com/gpustack/gguf-parser-go"],
|
|
126
|
+
["AlexsJones/llmfit:本机探测 + 模型库,MoE 卸载模式与 0.60 / 0.85 / 0.98 适配阈值(MIT)", "https://github.com/AlexsJones/llmfit"],
|
|
127
|
+
["fitllm-engine:按 revision 固定的真实 GGUF 字节数(MIT)", "https://github.com/click6067-ship-it/fitllm-engine"],
|
|
128
|
+
["Hugging Face accelerate estimate-memory:只算加载权重", "https://github.com/huggingface/accelerate/blob/main/src/accelerate/commands/estimate.py"],
|
|
129
|
+
["NyxKrage LLM-Model-VRAM-Calculator:GGUF / EXL2 + 上下文(bpw 表已过时)", "https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator"],
|
|
130
|
+
["vLLM gpu_worker:启动时实测激活峰值与 CUDA graph,再分 KV 池", "https://github.com/vllm-project/vllm/blob/main/vllm/v1/worker/gpu_worker.py"],
|
|
131
|
+
["Android 17 Memory Limiter:各 RAM 档单个 App 的内存上限", "https://source.android.com/docs/core/perf/memory-limiter"],
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
// ── controls ──────────────────────────────────────────────────────
|
|
135
|
+
function fillControls() {
|
|
136
|
+
const sel = $("quant");
|
|
137
|
+
const byFam = {};
|
|
138
|
+
for (const f of D.formats) (byFam[f.family] = byFam[f.family] || []).push(f);
|
|
139
|
+
sel.innerHTML = Object.entries(byFam)
|
|
140
|
+
.map(([fam, list]) => `<optgroup label="${esc(FAMILY_ZH[fam] || fam)}">${list
|
|
141
|
+
.map((f) => `<option value="${esc(f.name)}">${esc(f.name)} · ${f.bits} bpw</option>`).join("")}</optgroup>`)
|
|
142
|
+
.join("") + `<optgroup label="其它"><option value="custom-exl">EXL3 / EXL2,自定义 bpw</option><option value="custom">其它,自定义 bpw</option></optgroup>`;
|
|
143
|
+
sel.value = "Q4_K_M";
|
|
144
|
+
$("presets").innerHTML = PRESET_GROUPS.map((grp) => {
|
|
145
|
+
const items = PRESETS.filter(grp.match);
|
|
146
|
+
if (!items.length) return "";
|
|
147
|
+
return `<div class="preset-group" data-group="${grp.id}">
|
|
148
|
+
<span class="preset-glabel">${esc(grp.label)}</span>
|
|
149
|
+
<div class="preset-chips">${items.map((p) => `<button type="button" data-id="${p.id}" aria-pressed="false">${esc(p.name)}</button>`).join("")}</div>
|
|
150
|
+
</div>`;
|
|
151
|
+
}).join("");
|
|
152
|
+
$("presets").addEventListener("click", (e) => {
|
|
153
|
+
const b = e.target.closest?.("button");
|
|
154
|
+
if (b) applyPreset(PRESETS.find((p) => p.id === b.dataset.id));
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// The preset that filled the controls, and which of its overrides (file size, KV per token)
|
|
159
|
+
// still stand: changing the shape or the format drops an override the new shape would contradict.
|
|
160
|
+
let presetId = null;
|
|
161
|
+
const fromPreset = { filesize: false, kvpt: false };
|
|
162
|
+
function setPresetControls(p) {
|
|
163
|
+
presetId = p.id;
|
|
164
|
+
fromPreset.filesize = Boolean(p.file);
|
|
165
|
+
fromPreset.kvpt = true;
|
|
166
|
+
$("k-moe").checked = Boolean(p.active);
|
|
167
|
+
$("k-dense").checked = !p.active;
|
|
168
|
+
$("params").value = p.params;
|
|
169
|
+
if (p.active) $("active").value = p.active;
|
|
170
|
+
$("attention").value = p.attention;
|
|
171
|
+
$("kvpt").value = p.kv;
|
|
172
|
+
$("quant").value = p.quant;
|
|
173
|
+
$("filesize").value = p.file || "";
|
|
174
|
+
$("i-bits").checked = true;
|
|
175
|
+
$("i-params").checked = false;
|
|
176
|
+
selected = null;
|
|
177
|
+
}
|
|
178
|
+
function applyPreset(p) {
|
|
179
|
+
setPresetControls(p);
|
|
180
|
+
update();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const num = (id) => {
|
|
184
|
+
const v = $(id).value.trim();
|
|
185
|
+
return v === "" ? null : Number(v);
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
function readInputs() {
|
|
189
|
+
const moe = $("k-moe").checked;
|
|
190
|
+
const quant = $("quant").value;
|
|
191
|
+
const customBits = num("custom-bits");
|
|
192
|
+
const bits = String(customBits ?? 4);
|
|
193
|
+
const fmt = quant === "custom" ? bits : quant === "custom-exl" ? `EXL3-${bits}` : quant;
|
|
194
|
+
const params = num("params");
|
|
195
|
+
const file = num("filesize");
|
|
196
|
+
const inferParams = file != null && $("i-params").checked;
|
|
197
|
+
const inferBits = file != null && !inferParams && !fromPreset.filesize;
|
|
198
|
+
const kv = num("kvpt");
|
|
199
|
+
return {
|
|
200
|
+
moe, quant, customBits, fmt,
|
|
201
|
+
params: params != null ? Math.round(params * 1e9) : null,
|
|
202
|
+
active: moe && num("active") != null ? Math.round(num("active") * 1e9) : null,
|
|
203
|
+
fileBytes: file != null ? Math.round(file * 1e9) : null,
|
|
204
|
+
inferParams,
|
|
205
|
+
inferBits,
|
|
206
|
+
attention: $("attention").value,
|
|
207
|
+
kvPerToken: kv != null && kv > 0 ? Math.round(kv * 1024) : null,
|
|
208
|
+
context: CONTEXTS[Number($("ctx").value)],
|
|
209
|
+
slots: num("slots"),
|
|
210
|
+
kvType: $("kvtype").value,
|
|
211
|
+
hostRam: Math.max(0, num("hostram") ?? 64) * GiB,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// ── formatting ────────────────────────────────────────────────────
|
|
216
|
+
const gib = (b) => { const g = b / GiB; return g >= 100 ? g.toFixed(0) : g >= 10 ? g.toFixed(1) : g.toFixed(2); };
|
|
217
|
+
const gb = (b) => { const g = b / 1e9; return g >= 100 ? g.toFixed(0) : g >= 10 ? g.toFixed(1) : g.toFixed(2); };
|
|
218
|
+
const tok = (t) => (t >= 100 ? Math.round(t).toLocaleString() : t >= 10 ? t.toFixed(0) : t ? t.toFixed(1) : "");
|
|
219
|
+
const ctxLabel = (c) => (c >= 1048576 ? `${c / 1048576}M` : `${c / 1024}K`);
|
|
220
|
+
const sizeArg = (b) => `${+(b / 1e9).toFixed(2)}GB`;
|
|
221
|
+
const paramArg = (n) => (n >= 1e12 ? `${+(n / 1e12).toFixed(3)}T` : `${+(n / 1e9).toFixed(2)}B`);
|
|
222
|
+
|
|
223
|
+
// ── render ────────────────────────────────────────────────────────
|
|
224
|
+
let selected = null;
|
|
225
|
+
let last = null;
|
|
226
|
+
let lastInputs = null;
|
|
227
|
+
let pinned = null;
|
|
228
|
+
let devFilter = "all";
|
|
229
|
+
let devQuery = "";
|
|
230
|
+
|
|
231
|
+
function ensureSelected(r) {
|
|
232
|
+
if (!selected || !r.devices.some((d) => d.device === selected)) {
|
|
233
|
+
const t = r.tiers.find((x) => x.verdict === "fits") || r.tiers.find((x) => x.verdict === "offload");
|
|
234
|
+
selected = t ? t.device : r.devices[r.devices.length - 1].device;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function tierIndex(t) {
|
|
239
|
+
const idx = D.tiers.findIndex(([id]) => id === t);
|
|
240
|
+
return idx === -1 ? D.tiers.length : idx;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function comparisonDevice(r) {
|
|
244
|
+
if (selected) {
|
|
245
|
+
const cur = r.devices.find((d) => d.device === selected);
|
|
246
|
+
if (cur) return cur;
|
|
247
|
+
}
|
|
248
|
+
const t = r.tiers.find((x) => x.verdict === "fits") || r.tiers.find((x) => x.verdict === "offload");
|
|
249
|
+
return (t && r.devices.find((d) => d.device === t.device)) || r.devices[r.devices.length - 1] || null;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function currentLabel(r) {
|
|
253
|
+
const preset = presetId ? PRESETS.find((p) => p.id === presetId) : null;
|
|
254
|
+
const base = preset
|
|
255
|
+
? preset.name
|
|
256
|
+
: `${(r.model.params / 1e9).toFixed(1)}B${r.model.kind === "moe" ? ` (A${(r.model.active_params / 1e9).toFixed(1)}B)` : ""}`;
|
|
257
|
+
return `${base} · ${r.format.name}`;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function syncPinButton() {
|
|
261
|
+
const pinBtn = $("pin-btn");
|
|
262
|
+
if (!pinBtn) return;
|
|
263
|
+
pinBtn.textContent = pinned ? "取消对比" : "固定当前方案作对比";
|
|
264
|
+
pinBtn.setAttribute("aria-pressed", String(Boolean(pinned)));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function renderCompare(r) {
|
|
268
|
+
const bar = $("compare-bar");
|
|
269
|
+
if (!bar) return;
|
|
270
|
+
if (!pinned) {
|
|
271
|
+
bar.hidden = true;
|
|
272
|
+
bar.innerHTML = "";
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
bar.hidden = false;
|
|
276
|
+
const curTierId = r.magnitude.fits;
|
|
277
|
+
const curTier = tierName(curTierId);
|
|
278
|
+
const df = r.file_bytes - pinned.fileBytes;
|
|
279
|
+
const dr = r.runtime.total - pinned.runTotal;
|
|
280
|
+
const fileCls = Math.abs(df) < 1e6 ? "delta-flat" : df > 0 ? "delta-up" : "delta-down";
|
|
281
|
+
const runCls = Math.abs(dr) < 1e6 ? "delta-flat" : dr > 0 ? "delta-up" : "delta-down";
|
|
282
|
+
const fmtDelta = (bytes, unit) => {
|
|
283
|
+
const div = unit === "GiB" ? GiB : 1e9;
|
|
284
|
+
if (Math.abs(bytes / div) < 0.005) return `±0 ${unit}`;
|
|
285
|
+
const absStr = unit === "GiB" ? gib(Math.abs(bytes)) : gb(Math.abs(bytes));
|
|
286
|
+
return `${bytes > 0 ? "+" : "-"}${absStr} ${unit}`;
|
|
287
|
+
};
|
|
288
|
+
const pinnedTierId = "tierId" in pinned
|
|
289
|
+
? pinned.tierId
|
|
290
|
+
: (D.tiers.find(([id]) => TIER_ZH[id][0] === pinned.tier)?.[0] ?? null);
|
|
291
|
+
let tierChip;
|
|
292
|
+
if (curTier === pinned.tier) {
|
|
293
|
+
tierChip = `<span class="delta-chip delta-flat">量级:${esc(curTier)}(不变)</span>`;
|
|
294
|
+
} else {
|
|
295
|
+
const tierCls = tierIndex(curTierId) > tierIndex(pinnedTierId) ? "delta-up" : "delta-down";
|
|
296
|
+
tierChip = `<span class="delta-chip ${tierCls}">量级:${esc(pinned.tier)} → ${esc(curTier)}</span>`;
|
|
297
|
+
}
|
|
298
|
+
const dev = (pinned.deviceId && r.devices.find((d) => d.device === pinned.deviceId)) || comparisonDevice(r);
|
|
299
|
+
const curDecode = dev?.decode_ceiling_tok_s || 0;
|
|
300
|
+
let decodeChip = "";
|
|
301
|
+
if (pinned.decode > 0 || curDecode > 0) {
|
|
302
|
+
const devNote = dev ? `(${SHORT[dev.device] || dev.name})` : "";
|
|
303
|
+
if (pinned.decode > 0 && curDecode > 0) {
|
|
304
|
+
const dd = curDecode - pinned.decode;
|
|
305
|
+
const dCls = Math.abs(dd) < 0.05 ? "delta-flat" : dd > 0 ? "delta-up better" : "delta-down worse";
|
|
306
|
+
const dText = Math.abs(dd) < 0.05 ? "±0 tok/s" : `${dd > 0 ? "+" : "-"}${tok(Math.abs(dd))} tok/s`;
|
|
307
|
+
decodeChip = `<span class="delta-chip ${dCls}">decode${esc(devNote)}:${esc(dText)}</span>`;
|
|
308
|
+
} else if (curDecode > 0) {
|
|
309
|
+
decodeChip = `<span class="delta-chip delta-up better">decode${esc(devNote)}:可运行(${tok(curDecode)} tok/s)</span>`;
|
|
310
|
+
} else {
|
|
311
|
+
decodeChip = `<span class="delta-chip delta-down worse">decode${esc(devNote)}:不可运行</span>`;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
bar.innerHTML = `<div class="compare-base">对比基准:<b>${esc(pinned.label)}</b>(${gb(pinned.fileBytes)} GB · ${gib(pinned.runTotal)} GiB · ${esc(pinned.tier)})</div>
|
|
315
|
+
<div class="compare-deltas">
|
|
316
|
+
<span class="delta-chip ${fileCls}">权重:${esc(fmtDelta(df, "GB"))}</span>
|
|
317
|
+
<span class="delta-chip ${runCls}">运行:${esc(fmtDelta(dr, "GiB"))}</span>
|
|
318
|
+
${tierChip}
|
|
319
|
+
${decodeChip}
|
|
320
|
+
</div>
|
|
321
|
+
<button type="button" class="compare-unpin" id="compare-unpin" data-action="unpin">× 取消对比</button>`;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function parseHashMap() {
|
|
325
|
+
if (typeof location === "undefined" || !location.hash || location.hash === "#") return null;
|
|
326
|
+
const raw = location.hash.startsWith("#") ? location.hash.slice(1) : location.hash;
|
|
327
|
+
if (!raw) return null;
|
|
328
|
+
const out = {};
|
|
329
|
+
for (const part of raw.split("&")) {
|
|
330
|
+
if (!part) continue;
|
|
331
|
+
const eq = part.indexOf("=");
|
|
332
|
+
const rawKey = eq === -1 ? part : part.slice(0, eq);
|
|
333
|
+
const rawVal = eq === -1 ? "" : part.slice(eq + 1);
|
|
334
|
+
try {
|
|
335
|
+
const k = decodeURIComponent(rawKey.replace(/\+/g, " "));
|
|
336
|
+
const v = decodeURIComponent(rawVal.replace(/\+/g, " "));
|
|
337
|
+
if (k) out[k] = v;
|
|
338
|
+
} catch { /* ignore malformed percent-encoding */ }
|
|
339
|
+
}
|
|
340
|
+
return Object.keys(out).length ? out : null;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
function parseCtxIndex(raw) {
|
|
344
|
+
if (raw == null || raw === "") return null;
|
|
345
|
+
const text = String(raw).trim().toLowerCase();
|
|
346
|
+
if (/^\d+$/.test(text)) {
|
|
347
|
+
const idx = Number(text);
|
|
348
|
+
if (idx >= 0 && idx < CONTEXTS.length) return idx;
|
|
349
|
+
}
|
|
350
|
+
const m = text.match(/^(\d+(?:\.\d+)?)([km])?$/);
|
|
351
|
+
if (!m) return null;
|
|
352
|
+
const mul = m[2] === "m" ? 1048576 : m[2] === "k" ? 1024 : 1;
|
|
353
|
+
const tokens = Math.round(Number(m[1]) * mul);
|
|
354
|
+
if (!Number.isFinite(tokens) || tokens <= 0) return null;
|
|
355
|
+
let best = 0;
|
|
356
|
+
let bestDiff = Infinity;
|
|
357
|
+
for (let idx = 0; idx < CONTEXTS.length; idx++) {
|
|
358
|
+
const diff = Math.abs(CONTEXTS[idx] - tokens);
|
|
359
|
+
if (diff < bestDiff) { bestDiff = diff; best = idx; }
|
|
360
|
+
}
|
|
361
|
+
return best;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
function applyQuantParam(quantRaw, bitsRaw) {
|
|
365
|
+
if (quantRaw == null || quantRaw === "") return;
|
|
366
|
+
const q = String(quantRaw).trim();
|
|
367
|
+
if (q === "custom" || q === "custom-exl") {
|
|
368
|
+
$("quant").value = q;
|
|
369
|
+
const b = Number(bitsRaw);
|
|
370
|
+
const maxB = q === "custom-exl" ? 16 : 32;
|
|
371
|
+
if (bitsRaw != null && Number.isFinite(b) && b >= 1 && b <= maxB) $("custom-bits").value = String(b);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const upper = q.toUpperCase();
|
|
375
|
+
const matched = D.formats.find((f) => f.name.toUpperCase() === upper);
|
|
376
|
+
if (matched) {
|
|
377
|
+
$("quant").value = matched.name;
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
if (upper.startsWith("EXL2-") || upper.startsWith("EXL3-")) {
|
|
381
|
+
const b = Number(q.slice(5));
|
|
382
|
+
if (Number.isFinite(b) && b >= 1 && b <= 16) {
|
|
383
|
+
$("quant").value = "custom-exl";
|
|
384
|
+
$("custom-bits").value = String(b);
|
|
385
|
+
}
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
const b = Number(q);
|
|
389
|
+
if (Number.isFinite(b) && b >= 1 && b <= 32) {
|
|
390
|
+
$("quant").value = "custom";
|
|
391
|
+
$("custom-bits").value = String(b);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function buildHash(i) {
|
|
396
|
+
const pairs = [];
|
|
397
|
+
const add = (key, val) => {
|
|
398
|
+
if (val != null && String(val) !== "") {
|
|
399
|
+
pairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(val))}`);
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
if (presetId) add("preset", presetId);
|
|
403
|
+
add("kind", i.moe ? "moe" : "dense");
|
|
404
|
+
if (!i.inferParams) add("params", $("params").value.trim());
|
|
405
|
+
if (i.moe) add("active", $("active").value.trim());
|
|
406
|
+
add("att", i.attention);
|
|
407
|
+
add("kvpt", $("kvpt").value.trim());
|
|
408
|
+
if (!i.inferBits) {
|
|
409
|
+
add("quant", i.quant);
|
|
410
|
+
if (i.quant.startsWith("custom")) add("bits", $("custom-bits").value.trim());
|
|
411
|
+
}
|
|
412
|
+
const fileRaw = $("filesize").value.trim();
|
|
413
|
+
add("file", fileRaw);
|
|
414
|
+
if (fileRaw !== "") add("infer", i.inferParams ? "params" : "bits");
|
|
415
|
+
add("ctx", i.context);
|
|
416
|
+
add("slots", $("slots").value.trim());
|
|
417
|
+
add("kv", i.kvType);
|
|
418
|
+
add("ram", $("hostram").value.trim());
|
|
419
|
+
return "#" + pairs.join("&");
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function syncHash(i) {
|
|
423
|
+
if (typeof history === "undefined" || typeof history.replaceState !== "function") return;
|
|
424
|
+
const next = buildHash(i);
|
|
425
|
+
if (typeof location === "undefined" || location.hash !== next) {
|
|
426
|
+
try { history.replaceState(null, "", next); } catch { /* ignore file:// history restrictions */ }
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function shareUrl() {
|
|
431
|
+
const hash = lastInputs ? buildHash(lastInputs) : (typeof location !== "undefined" && location.hash ? location.hash : "");
|
|
432
|
+
if (typeof location !== "undefined" && location.href) {
|
|
433
|
+
return location.href.split("#")[0] + hash;
|
|
434
|
+
}
|
|
435
|
+
return hash;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function clearFileSize(focusId) {
|
|
439
|
+
$("filesize").value = "";
|
|
440
|
+
fromPreset.filesize = false;
|
|
441
|
+
presetId = null;
|
|
442
|
+
$("i-bits").checked = true;
|
|
443
|
+
$("i-params").checked = false;
|
|
444
|
+
update();
|
|
445
|
+
if (focusId) $(focusId)?.focus?.();
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function syncInferenceControls(i, hasFile) {
|
|
449
|
+
$("infer-seg").hidden = !hasFile;
|
|
450
|
+
const clearBtn = $("clear-file");
|
|
451
|
+
if (clearBtn) clearBtn.hidden = !hasFile;
|
|
452
|
+
$("active-field").hidden = !$("k-moe").checked;
|
|
453
|
+
const isCustomExl = i.quant === "custom-exl";
|
|
454
|
+
$("custom-field").hidden = i.inferBits || !i.quant.startsWith("custom");
|
|
455
|
+
const customBitsEl = $("custom-bits");
|
|
456
|
+
if (customBitsEl) {
|
|
457
|
+
const maxB = isCustomExl ? "16" : "32";
|
|
458
|
+
customBitsEl.max = maxB;
|
|
459
|
+
customBitsEl.setAttribute("max", maxB);
|
|
460
|
+
}
|
|
461
|
+
const customHint = $("custom-bits-hint");
|
|
462
|
+
if (customHint) customHint.textContent = isCustomExl ? "1–16 bpw" : "1–32 bpw";
|
|
463
|
+
|
|
464
|
+
const paramsEl = $("params");
|
|
465
|
+
paramsEl.disabled = i.inferParams;
|
|
466
|
+
paramsEl.setAttribute("aria-disabled", String(i.inferParams));
|
|
467
|
+
setClass($("params-field"), "is-inferred", i.inferParams);
|
|
468
|
+
const paramsInf = $("params-inferred");
|
|
469
|
+
if (paramsInf) paramsInf.hidden = !i.inferParams;
|
|
470
|
+
if (i.inferParams && $("params-inferred-text")) $("params-inferred-text").textContent = "由文件大小反推";
|
|
471
|
+
|
|
472
|
+
const quantEl = $("quant");
|
|
473
|
+
quantEl.disabled = i.inferBits;
|
|
474
|
+
quantEl.setAttribute("aria-disabled", String(i.inferBits));
|
|
475
|
+
setClass($("quant-field"), "is-inferred", i.inferBits);
|
|
476
|
+
const quantInf = $("quant-inferred");
|
|
477
|
+
if (quantInf) quantInf.hidden = !i.inferBits;
|
|
478
|
+
if (i.inferBits && $("quant-inferred-text")) $("quant-inferred-text").textContent = "由文件大小反推";
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
function update() {
|
|
482
|
+
for (const b of $("presets").querySelectorAll("button")) b.setAttribute("aria-pressed", String(b.dataset.id === presetId));
|
|
483
|
+
const hasFile = num("filesize") != null;
|
|
484
|
+
const i = readInputs();
|
|
485
|
+
syncInferenceControls(i, hasFile);
|
|
486
|
+
const ctxText = `${ctxLabel(i.context)} tokens`;
|
|
487
|
+
$("ctx-val").textContent = ctxText;
|
|
488
|
+
$("ctx").setAttribute("aria-valuetext", ctxText);
|
|
489
|
+
const resultsEl = document.querySelector(".results");
|
|
490
|
+
let r;
|
|
491
|
+
try {
|
|
492
|
+
if (i.slots != null && (!Number.isFinite(i.slots) || i.slots < 1)) throw new Error("slots must be at least 1");
|
|
493
|
+
if (!i.inferBits && i.quant === "custom-exl") {
|
|
494
|
+
if (i.customBits == null || !Number.isFinite(i.customBits) || i.customBits < 1 || i.customBits > 16) {
|
|
495
|
+
throw new Error("exl bits per weight must be between 1 and 16");
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
const slots = Math.max(1, Math.round(i.slots ?? 1));
|
|
499
|
+
const { shape, notes } = calc.shape({
|
|
500
|
+
params: i.inferParams ? null : i.params,
|
|
501
|
+
active: i.active,
|
|
502
|
+
fmt: i.inferBits ? null : i.fmt,
|
|
503
|
+
fileBytes: i.fileBytes,
|
|
504
|
+
attention: i.attention,
|
|
505
|
+
kvPerToken: i.kvPerToken,
|
|
506
|
+
});
|
|
507
|
+
const p = calc.posture({ context: i.context, slots, kvType: i.kvType, hostRam: i.hostRam });
|
|
508
|
+
r = calc.report(shape, p, notes);
|
|
509
|
+
r.shape = shape;
|
|
510
|
+
r.posture = p;
|
|
511
|
+
$("err").textContent = "";
|
|
512
|
+
$("err").hidden = true;
|
|
513
|
+
$("stale-note").hidden = true;
|
|
514
|
+
resultsEl?.classList.remove("is-stale");
|
|
515
|
+
setClass($("mobile-summary"), "is-stale", false);
|
|
516
|
+
} catch (e) {
|
|
517
|
+
$("err").textContent = zhMsg(e.message);
|
|
518
|
+
$("err").hidden = false;
|
|
519
|
+
$("stale-note").hidden = false;
|
|
520
|
+
resultsEl?.classList.add("is-stale");
|
|
521
|
+
setClass($("mobile-summary"), "is-stale", true);
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
last = r;
|
|
525
|
+
lastInputs = i;
|
|
526
|
+
ensureSelected(r);
|
|
527
|
+
if (i.inferParams && $("params-inferred-text")) {
|
|
528
|
+
$("params-inferred-text").textContent = `由文件大小反推 ≈ ${(r.model.params / 1e9).toFixed(1)}B`;
|
|
529
|
+
}
|
|
530
|
+
if (i.inferBits && $("quant-inferred-text")) {
|
|
531
|
+
const nearMatch = String(r.format.note || "").match(/^nearest listed:\s*(.+)$/);
|
|
532
|
+
$("quant-inferred-text").textContent = nearMatch
|
|
533
|
+
? `由文件大小反推 · ${r.format.bits_per_weight} bpw(近 ${nearMatch[1]})`
|
|
534
|
+
: `由文件大小反推 · ${r.format.bits_per_weight} bpw`;
|
|
535
|
+
}
|
|
536
|
+
$("kv-val").textContent = `${(r.kv_bytes_per_token / 1024).toFixed(0)} KiB/token`;
|
|
537
|
+
$("bits-val").textContent = `${r.format.bits_per_weight} bpw`;
|
|
538
|
+
renderReadouts(r, i);
|
|
539
|
+
renderRuler(r);
|
|
540
|
+
renderDevices(r);
|
|
541
|
+
renderLadder(r);
|
|
542
|
+
renderCmd(r, i);
|
|
543
|
+
syncHash(i);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
function tierName(t) {
|
|
547
|
+
return t ? TIER_ZH[t][0] : "多机集群";
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
function renderReadouts(r, i) {
|
|
551
|
+
const m = r.magnitude;
|
|
552
|
+
$("r-tier").textContent = tierName(m.fits);
|
|
553
|
+
const pick = r.tiers.find((t) => t.tier === m.fits);
|
|
554
|
+
let extra = m.runs && m.runs !== m.fits ? `;借系统内存卸载时,${tierName(m.runs)}也能跑` : "";
|
|
555
|
+
if (m.fits && m.fits_as_is !== m.fits)
|
|
556
|
+
extra += `;这一档要先转成同样大小的 GGUF / MLX,${r.format.name} 原样最小要${m.fits_as_is ? `到${tierName(m.fits_as_is)}` : "多机"}`;
|
|
557
|
+
$("r-tier-s").textContent = m.fits ? `${TIER_ZH[m.fits][1]},最小如 ${pick.name}${extra}` : `超过 8 卡服务器${extra}`;
|
|
558
|
+
$("r-file").innerHTML = `${gb(r.file_bytes)}<small>GB</small>`;
|
|
559
|
+
$("r-file-s").textContent = `${gib(r.file_bytes)} GiB · ${r.format.name} · ${r.format.bits_per_weight} bpw · ${(r.model.params / 1e9).toFixed(1)}B 参数`;
|
|
560
|
+
const rt = r.runtime;
|
|
561
|
+
$("r-run").innerHTML = `${gib(rt.total)}<small>GiB</small>`;
|
|
562
|
+
$("r-run-s").textContent = `${r.format.default_engine}:权重 ${gib(rt.weights)} + KV ${gib(rt.kv)} + 引擎 ${gib(rt.overhead)}`;
|
|
563
|
+
const active = (r.file_bytes * r.model.active_params) / r.model.params;
|
|
564
|
+
const read = active + rt.kv / r.posture.slots;
|
|
565
|
+
$("r-read").innerHTML = `${gb(read)}<small>GB</small>`;
|
|
566
|
+
$("r-read-s").textContent = r.model.kind === "moe"
|
|
567
|
+
? `MoE 只读激活的 ${(r.model.active_params / 1e9).toFixed(1)}B;${(r.model.expert_share * 100).toFixed(0)}% 权重在路由专家里`
|
|
568
|
+
: "稠密模型每 token 读一遍全部权重";
|
|
569
|
+
const notes = r.notes.map(zhMsg);
|
|
570
|
+
if (r.kv_source !== "given") notes.push(`KV 每 token 是按参数估的(${zhMsg(r.kv_source)});知道真实值就填进去,或用 memcalc 读 config.json。`);
|
|
571
|
+
if (i.context > 131072) notes.push("上下文超过 128K:很多模型训练长度到不了这里,先查模型的 max_position_embeddings。");
|
|
572
|
+
$("notes").innerHTML = notes.map((n) => `<p>· ${esc(n)}</p>`).join("");
|
|
573
|
+
const msTier = $("ms-tier");
|
|
574
|
+
const msRun = $("ms-run");
|
|
575
|
+
const msFile = $("ms-file");
|
|
576
|
+
if (msTier) msTier.textContent = tierName(m.fits);
|
|
577
|
+
if (msRun) msRun.textContent = `运行 ${gib(rt.total)} GiB`;
|
|
578
|
+
if (msFile) msFile.textContent = `权重 ${gb(r.file_bytes)} GB`;
|
|
579
|
+
renderCompare(r);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
function renderRuler(r, restoreDotIds = null) {
|
|
583
|
+
const wrap = $("ruler-wrap");
|
|
584
|
+
const W = Math.max(300, wrap.clientWidth);
|
|
585
|
+
const narrow = W < 620;
|
|
586
|
+
const gutter = narrow ? 8 : 128;
|
|
587
|
+
const rowH = narrow ? 58 : 50;
|
|
588
|
+
const top = 34;
|
|
589
|
+
const H = top + rowH * D.tiers.length + 26;
|
|
590
|
+
const need = r.runtime.total, weights = r.runtime.weights;
|
|
591
|
+
const lo = 0.5 * GiB;
|
|
592
|
+
const hi = Math.max(2048 * GiB, need * 1.3);
|
|
593
|
+
const x0 = gutter, x1 = W - 14;
|
|
594
|
+
const X = (b) => x0 + ((Math.log2(Math.max(b, lo)) - Math.log2(lo)) / (Math.log2(hi) - Math.log2(lo))) * (x1 - x0);
|
|
595
|
+
const xn = X(need), xw = X(weights);
|
|
596
|
+
const parts = [];
|
|
597
|
+
// grid
|
|
598
|
+
for (let g = 1; g * GiB <= hi; g *= 2) {
|
|
599
|
+
const x = X(g * GiB);
|
|
600
|
+
const major = [1, 4, 16, 64, 256, 1024].includes(g) || (!narrow && g >= 2048);
|
|
601
|
+
parts.push(`<line x1="${x}" x2="${x}" y1="${top - 6}" y2="${H - 22}" stroke="var(--line)" stroke-width="1"/>`);
|
|
602
|
+
if (major || !narrow) parts.push(`<text x="${x}" y="${H - 6}" text-anchor="middle">${g >= 1024 ? `${g / 1024}T` : `${g}G`}</text>`);
|
|
603
|
+
}
|
|
604
|
+
// tier baselines
|
|
605
|
+
const rows = r.devices;
|
|
606
|
+
D.tiers.forEach((_t, idx) => {
|
|
607
|
+
const y = top + idx * rowH + rowH / 2 + (narrow ? 8 : 0);
|
|
608
|
+
parts.push(`<line x1="${x0}" x2="${x1}" y1="${y}" y2="${y}" stroke="var(--line-2)" stroke-width="1"/>`);
|
|
609
|
+
});
|
|
610
|
+
// vertical reference lines drawn below tier labels, device dots & haloed labels
|
|
611
|
+
parts.push(`<line x1="${xw}" x2="${xw}" y1="${top - 4}" y2="${H - 22}" stroke="var(--muted)" stroke-width="1.5" stroke-dasharray="4 3"/>`);
|
|
612
|
+
parts.push(`<line x1="${xn}" x2="${xn}" y1="${top - 10}" y2="${H - 22}" stroke="var(--ink)" stroke-width="2"/>`);
|
|
613
|
+
// tier labels & devices of each tier, merged when their usable memory is within 4%
|
|
614
|
+
D.tiers.forEach(([tier], idx) => {
|
|
615
|
+
const y = top + idx * rowH + rowH / 2 + (narrow ? 8 : 0);
|
|
616
|
+
const [label] = TIER_ZH[tier];
|
|
617
|
+
if (narrow) parts.push(`<text class="tl halo" x="${x0}" y="${y - 24}">${esc(label)}</text>`);
|
|
618
|
+
else parts.push(`<text class="tl" x="0" y="${y + 4}">${esc(label)}</text>`);
|
|
619
|
+
const mine = rows.filter((d) => d.tier === tier).sort((a, b) => a.usable_bytes - b.usable_bytes);
|
|
620
|
+
const groups = [];
|
|
621
|
+
for (const d of mine) {
|
|
622
|
+
const g = groups[groups.length - 1];
|
|
623
|
+
if (g && d.usable_bytes / g[0].usable_bytes < 1.04) g.push(d);
|
|
624
|
+
else groups.push([d]);
|
|
625
|
+
}
|
|
626
|
+
const lastRight = [-1e9, -1e9];
|
|
627
|
+
groups.forEach((g, gi) => {
|
|
628
|
+
const best = g.find((d) => d.verdict === "fits") || g.find((d) => d.verdict === "offload") || g[0];
|
|
629
|
+
const x = X(g[0].usable_bytes);
|
|
630
|
+
const color = best.verdict === "fits" ? "var(--good)" : best.verdict === "offload" ? "var(--s-off)" : "var(--none)";
|
|
631
|
+
const text = g.map((d) => SHORT[d.device] || d.device).join("/");
|
|
632
|
+
const w = [...text].reduce((n, ch) => n + (ch.charCodeAt(0) > 0x2e80 ? 10.5 : 6.2), 0);
|
|
633
|
+
const tryPlace = (sideIdx) => {
|
|
634
|
+
let lx = x;
|
|
635
|
+
let anchor = "middle";
|
|
636
|
+
let left = lx - w / 2;
|
|
637
|
+
let right = lx + w / 2;
|
|
638
|
+
if (left < x0) { left = x0; right = x0 + w; lx = x0; anchor = "start"; }
|
|
639
|
+
else if (right > x1) { right = x1; left = x1 - w; lx = x1; anchor = "end"; }
|
|
640
|
+
// Shift away from the vertical need line when a label would cross xn
|
|
641
|
+
if (left < xn + 5 && right > xn - 5) {
|
|
642
|
+
if (x <= xn && xn - 6 - w >= x0) {
|
|
643
|
+
anchor = "end";
|
|
644
|
+
lx = xn - 6;
|
|
645
|
+
right = lx;
|
|
646
|
+
left = lx - w;
|
|
647
|
+
} else if (x > xn && xn + 6 + w <= x1) {
|
|
648
|
+
anchor = "start";
|
|
649
|
+
lx = xn + 6;
|
|
650
|
+
left = lx;
|
|
651
|
+
right = lx + w;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
if (left > lastRight[sideIdx] + 6) return { sideIdx, lx, anchor, right };
|
|
655
|
+
return null;
|
|
656
|
+
};
|
|
657
|
+
const placed = tryPlace(gi % 2) || tryPlace(1 - (gi % 2));
|
|
658
|
+
if (placed) lastRight[placed.sideIdx] = placed.right;
|
|
659
|
+
const ly = placed ? (placed.sideIdx ? y + 17 : y - 9) : y - 9;
|
|
660
|
+
const isSelDot = g.some((d) => d.device === selected);
|
|
661
|
+
const ariaLabel = g.map((d) => {
|
|
662
|
+
const status = VERDICT_ZH[d.verdict] + (d.offload_bytes ? `(${gib(d.offload_bytes)} GiB 进内存)` : "");
|
|
663
|
+
return `${d.name},可用 ${gib(d.usable_bytes)} GiB,需要 ${gib(d.need.total)} GiB,${status}`;
|
|
664
|
+
}).join(";");
|
|
665
|
+
parts.push(`<g class="dev${isSelDot ? " is-selected" : ""}" role="button" tabindex="0" data-ids="${g.map((d) => d.device).join(",")}" aria-label="${esc(ariaLabel)}" aria-pressed="${isSelDot ? "true" : "false"}">
|
|
666
|
+
${isSelDot ? `<circle class="sel-ring" cx="${x}" cy="${y}" r="9.5"/>` : ""}
|
|
667
|
+
<circle class="dot" cx="${x}" cy="${y}" r="6" fill="${color}" stroke="var(--surface)" stroke-width="2"/>
|
|
668
|
+
${placed ? `<text class="dl halo" aria-hidden="true" x="${placed.lx}" y="${ly}" text-anchor="${placed.anchor}">${esc(text)}</text>` : ""}</g>`);
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
const anchor = xn > W - 95 ? "end" : xn < x0 + 75 ? "start" : "middle";
|
|
672
|
+
parts.push(`<text class="need halo" x="${xn}" y="${top - 16}" text-anchor="${anchor}">需要 ${gib(need)} GiB</text>`);
|
|
673
|
+
const svg = $("ruler");
|
|
674
|
+
svg.setAttribute("viewBox", `0 0 ${W} ${H}`);
|
|
675
|
+
svg.setAttribute("width", W);
|
|
676
|
+
svg.setAttribute("height", H);
|
|
677
|
+
svg.innerHTML = parts.join("");
|
|
678
|
+
if (restoreDotIds) {
|
|
679
|
+
svg.querySelector?.(`g.dev[data-ids="${restoreDotIds}"]`)?.focus?.({ preventScroll: true });
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
function devTip(ids, evt) {
|
|
684
|
+
const rows = ids.map((id) => last.devices.find((d) => d.device === id)).filter(Boolean);
|
|
685
|
+
if (!rows.length) return;
|
|
686
|
+
const tip = $("tip");
|
|
687
|
+
tip.innerHTML = rows.map((d, idx) => {
|
|
688
|
+
const isCur = d.device === selected;
|
|
689
|
+
return `<div class="tip-dev${idx > 0 ? " tip-sep" : ""}">
|
|
690
|
+
<div class="th">${esc(d.name)}${rows.length > 1 && isCur ? '<span class="tip-cur">当前</span>' : ""}</div>
|
|
691
|
+
<div class="tr"><span>可用</span><span>${gib(d.usable_bytes)} GiB</span></div>
|
|
692
|
+
<div class="tr"><span>需要(${esc(d.engine)})</span><span>${gib(d.need.total)} GiB</span></div>
|
|
693
|
+
<div class="tr"><span>结论</span><span>${VERDICT_ZH[d.verdict]}${d.offload_bytes ? `,${gib(d.offload_bytes)} GiB 进内存` : ""}</span></div>
|
|
694
|
+
${d.decode_ceiling_tok_s ? `<div class="tr"><span>decode 上限</span><span>${tok(d.decode_ceiling_tok_s)} tok/s</span></div>` : ""}
|
|
695
|
+
</div>`;
|
|
696
|
+
}).join("") + (rows.length > 1 ? `<div class="tip-hint">点击圆点依次切换这 ${rows.length} 台设备</div>` : "");
|
|
697
|
+
tip.hidden = false;
|
|
698
|
+
const wrap = $("ruler-wrap").getBoundingClientRect();
|
|
699
|
+
const targetNode = evt.target?.closest?.("g") || evt.target;
|
|
700
|
+
if (!targetNode || typeof targetNode.getBoundingClientRect !== "function") return;
|
|
701
|
+
const box = targetNode.getBoundingClientRect();
|
|
702
|
+
const tipW = tip.offsetWidth || 220;
|
|
703
|
+
const tipH = tip.offsetHeight || 120;
|
|
704
|
+
const dotX = box.left - wrap.left + (box.width || 0) / 2;
|
|
705
|
+
const dotY = box.top - wrap.top + (box.height || 0) / 2;
|
|
706
|
+
let left = dotX + 12;
|
|
707
|
+
if (left + tipW > wrap.width - 4) left = dotX - tipW - 12;
|
|
708
|
+
left = Math.max(4, Math.min(left, Math.max(4, wrap.width - tipW - 4)));
|
|
709
|
+
const viewH = typeof window !== "undefined" && window.innerHeight ? window.innerHeight : wrap.top + wrap.height;
|
|
710
|
+
let top = dotY + 12;
|
|
711
|
+
if (top + tipH > wrap.height - 4 || wrap.top + top + tipH > viewH - 8) {
|
|
712
|
+
top = dotY - tipH - 12;
|
|
713
|
+
}
|
|
714
|
+
top = Math.max(4, Math.min(top, Math.max(4, wrap.height - tipH - 4)));
|
|
715
|
+
tip.style.left = `${Math.round(left)}px`;
|
|
716
|
+
tip.style.top = `${Math.round(top)}px`;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
function matchesDevFilter(d) {
|
|
720
|
+
if (devFilter === "runnable" && d.verdict === "no") return false;
|
|
721
|
+
const q = devQuery.trim().toLowerCase();
|
|
722
|
+
if (!q) return true;
|
|
723
|
+
const tierInfo = TIER_ZH[d.tier] || ["", ""];
|
|
724
|
+
const backend = DEVICE_META[d.device]?.backend || "";
|
|
725
|
+
const hay = `${d.name} ${d.device} ${SHORT[d.device] || ""} ${d.engine} ${backend} ${tierInfo[0]} ${tierInfo[1]}`.toLowerCase();
|
|
726
|
+
return q.split(/\s+/).every((token) => hay.includes(token));
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
function renderDevices(r, restoreFocusId = null) {
|
|
730
|
+
const table = $("devtable");
|
|
731
|
+
const activeEl = typeof document !== "undefined" ? document.activeElement : null;
|
|
732
|
+
const activeRow = activeEl && typeof activeEl.closest === "function" ? activeEl.closest("tr.dev") : null;
|
|
733
|
+
const inTable = activeRow && (typeof table.contains !== "function" || table.contains(activeRow));
|
|
734
|
+
const focusId = restoreFocusId || (inTable ? activeRow.dataset?.id : null);
|
|
735
|
+
ensureSelected(r);
|
|
736
|
+
const byTier = {};
|
|
737
|
+
const visibleIds = new Set();
|
|
738
|
+
let runnableCount = 0;
|
|
739
|
+
for (const d of r.devices) {
|
|
740
|
+
if (d.verdict !== "no") runnableCount++;
|
|
741
|
+
if (!matchesDevFilter(d)) continue;
|
|
742
|
+
(byTier[d.tier] = byTier[d.tier] || []).push(d);
|
|
743
|
+
visibleIds.add(d.device);
|
|
744
|
+
}
|
|
745
|
+
const supportTag = (s) => {
|
|
746
|
+
const [label, tip] = SUPPORT_ZH[s] || [s, ""];
|
|
747
|
+
return `<span class="tag ${esc(s)}" data-support="${esc(s)}"${tip ? ` title="${esc(tip)}"` : ""}>${esc(label)}</span>`;
|
|
748
|
+
};
|
|
749
|
+
const html = [];
|
|
750
|
+
for (const [tier] of D.tiers) {
|
|
751
|
+
const rows = byTier[tier] || [];
|
|
752
|
+
if (!rows.length) continue;
|
|
753
|
+
const [label, detail] = TIER_ZH[tier];
|
|
754
|
+
html.push(`<tr class="tierhead"><td colspan="7">${esc(label)}<span>${esc(detail)}</span></td></tr>`);
|
|
755
|
+
for (const d of rows) {
|
|
756
|
+
const isSel = d.device === selected;
|
|
757
|
+
const verdict = `<span class="pill ${d.verdict}">${VERDICT_ZH[d.verdict]}</span>${d.offload_bytes ? ` <span class="hint">${gib(d.offload_bytes)} GiB 进内存</span>` : ""}`;
|
|
758
|
+
html.push(`<tr class="dev${isSel ? " cur" : ""}" data-id="${d.device}" tabindex="0" aria-selected="${isSel ? "true" : "false"}">
|
|
759
|
+
<td>${esc(d.name)}</td><td>${esc(d.engine)}</td><td>${supportTag(d.format_support)}</td>
|
|
760
|
+
<td class="n">${gib(d.need.total)}</td><td class="n">${gib(d.usable_bytes)}</td><td>${verdict}</td>
|
|
761
|
+
<td class="n">${tok(d.decode_ceiling_tok_s)}</td></tr>`);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
if (!visibleIds.size) {
|
|
765
|
+
html.push('<tr class="empty-row"><td colspan="7">没有匹配的设备 <button type="button" class="link-btn" data-action="reset-dev-filter">清除筛选</button></td></tr>');
|
|
766
|
+
}
|
|
767
|
+
table.querySelector("tbody").innerHTML = html.join("");
|
|
768
|
+
const countEl = $("dev-filter-count");
|
|
769
|
+
if (countEl) {
|
|
770
|
+
const filtered = devFilter !== "all" || devQuery.trim() !== "";
|
|
771
|
+
countEl.textContent = filtered
|
|
772
|
+
? `显示 ${visibleIds.size} / ${r.devices.length} 台`
|
|
773
|
+
: `可运行 ${runnableCount} / ${r.devices.length} 台`;
|
|
774
|
+
}
|
|
775
|
+
if (focusId && visibleIds.has(focusId)) {
|
|
776
|
+
table.querySelector?.(`tr.dev[data-id="${focusId}"]`)?.focus?.({ preventScroll: true });
|
|
777
|
+
}
|
|
778
|
+
renderBar(r.devices.find((d) => d.device === selected), r);
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
function renderBar(d, r) {
|
|
782
|
+
const n = d.need;
|
|
783
|
+
const onHost = d.offload_bytes || 0;
|
|
784
|
+
const hostKv = d.host_kv_bytes || 0;
|
|
785
|
+
const hostWeights = d.host_weights_bytes ?? Math.max(0, onHost - hostKv);
|
|
786
|
+
const hostRoom = d.host_room_bytes || 0;
|
|
787
|
+
const scale = Math.max(d.usable_bytes, n.total - onHost, 1);
|
|
788
|
+
const pct = (b) => `${Math.max(0, (b / scale) * 100)}%`;
|
|
789
|
+
const weightsCard = n.weights - (d.host_weights_bytes || 0);
|
|
790
|
+
const kvCard = n.kv - hostKv;
|
|
791
|
+
const segs = [
|
|
792
|
+
[weightsCard, "var(--s-w)", "权重"],
|
|
793
|
+
[kvCard, "var(--s-kv)", "KV"],
|
|
794
|
+
[n.overhead, "var(--s-ov)", "引擎"],
|
|
795
|
+
];
|
|
796
|
+
const used = weightsCard + kvCard + n.overhead;
|
|
797
|
+
const free = Math.max(0, d.usable_bytes - used);
|
|
798
|
+
const over = Math.max(0, used - d.usable_bytes);
|
|
799
|
+
const um = (d.usable_bytes / scale) * 100;
|
|
800
|
+
const markCls = um > 85 ? "end" : um < 15 ? "start" : "";
|
|
801
|
+
let hostSection = "";
|
|
802
|
+
if (onHost > 0) {
|
|
803
|
+
const hostScale = Math.max(hostRoom, onHost, 1);
|
|
804
|
+
const hpct = (b) => `${Math.max(0, (b / hostScale) * 100)}%`;
|
|
805
|
+
const hostFree = Math.max(0, hostRoom - onHost);
|
|
806
|
+
const hum = (hostRoom / hostScale) * 100;
|
|
807
|
+
const hMarkCls = hum > 85 ? "end" : hum < 15 ? "start" : "";
|
|
808
|
+
const hostSegs = [[hostWeights, "var(--s-off)", "卸载权重"]];
|
|
809
|
+
if (hostKv > 0) hostSegs.push([hostKv, "color-mix(in srgb, var(--s-off) 55%, var(--s-kv))", "卸载 KV"]);
|
|
810
|
+
const hostAria = `卸载到系统内存 ${gib(onHost)} GiB(权重 ${gib(hostWeights)}${hostKv ? `,KV ${gib(hostKv)}` : ""}),主机可用 ${gib(hostRoom)} GiB`;
|
|
811
|
+
hostSection = `
|
|
812
|
+
<div class="bar-label host-label"><span>系统内存卸载</span><span>已用 <b>${gib(onHost)}</b> / 主机可用 ${gib(hostRoom)} GiB(权重 ${gib(hostWeights)}${hostKv ? ` + KV ${gib(hostKv)}` : ""})</span></div>
|
|
813
|
+
<div class="bar host-bar" role="img" aria-label="${esc(hostAria)}">
|
|
814
|
+
${hostSegs.map(([b, c, t]) => `<div title="${t} ${gib(b)} GiB" style="width:${hpct(b)};background:${c}"></div>`).join("")}
|
|
815
|
+
${hostFree ? `<div class="free" style="width:${hpct(hostFree)}"></div>` : ""}
|
|
816
|
+
<div class="mark ${hMarkCls}" style="left:${hum}%"><span>主机可用 ${gib(hostRoom)} GiB</span></div>
|
|
817
|
+
</div>`;
|
|
818
|
+
}
|
|
819
|
+
$("dev-title").textContent = `设备明细 · ${d.name}`;
|
|
820
|
+
$("mbar").innerHTML = `
|
|
821
|
+
<div class="mh"><span><b>${esc(d.name)}</b> · ${esc(d.engine)} · ${VERDICT_ZH[d.verdict]}</span>
|
|
822
|
+
<span>${onHost
|
|
823
|
+
? `卡上 <b>${gib(used)}</b> GiB + 卸载到内存 <b>${gib(onHost)}</b> GiB / 主机可用 ${gib(hostRoom)} GiB`
|
|
824
|
+
: `卡上 / 统一内存里 <b>${gib(used)}</b> GiB,可用 ${gib(d.usable_bytes)} GiB${over ? ` <b class="oom-note">(超出 ${gib(over)} GiB)</b>` : ""}`}</span></div>
|
|
825
|
+
${onHost ? `<div class="bar-label"><span>卡上显存</span><span>已用 <b>${gib(used)}</b> / 可用 ${gib(d.usable_bytes)} GiB</span></div>` : ""}
|
|
826
|
+
<div class="bar${over ? " is-over" : ""}" role="img" aria-label="权重 ${gib(weightsCard)},KV ${gib(kvCard)},引擎 ${gib(n.overhead)} GiB,可用 ${gib(d.usable_bytes)} GiB${over ? `,超出 ${gib(over)} GiB` : ""}">
|
|
827
|
+
${segs.map(([b, c, t]) => `<div title="${t} ${gib(b)} GiB" style="width:${pct(b)};background:${c}"></div>`).join("")}
|
|
828
|
+
${free ? `<div class="free" style="width:${pct(free)}"></div>` : ""}
|
|
829
|
+
${over ? `<div class="over" title="超出可用内存 ${gib(over)} GiB" style="left:${um}%;width:${Math.max(0, 100 - um)}%"></div>` : ""}
|
|
830
|
+
<div class="mark ${markCls}" style="left:${um}%"><span>可用 ${gib(d.usable_bytes)} GiB</span></div>
|
|
831
|
+
</div>${hostSection}
|
|
832
|
+
<div class="legend"><span><i class="sq" style="background:var(--s-w)"></i>权重 ${gib(weightsCard)}</span><span><i class="sq" style="background:var(--s-kv)"></i>KV ${gib(kvCard)}(${ctxLabel(r.posture.context)} × ${r.posture.slots},${r.posture.kvType})</span><span><i class="sq" style="background:var(--s-ov)"></i>引擎 ${gib(n.overhead)}</span>${onHost ? `<span><i class="sq" style="background:var(--s-off)"></i>卸载到内存 ${gib(onHost)}(权重 ${gib(hostWeights)}${hostKv ? ` + KV ${gib(hostKv)}` : ""})</span>` : ""}${over ? `<span><i class="sq over-swatch"></i>超出 ${gib(over)} GiB</span>` : ""}${d.decode_ceiling_tok_s ? `<span>decode 上限 ≈ ${tok(d.decode_ceiling_tok_s)} tok/s</span>` : ""}</div>`;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
function renderLadder(r) {
|
|
836
|
+
const max = Math.max(...r.ladder.map((l) => l.file_bytes));
|
|
837
|
+
const listed = new Set(D.formats.map((f) => f.name));
|
|
838
|
+
$("ladder").innerHTML = r.ladder.map((l) => {
|
|
839
|
+
const selectable = listed.has(l.format);
|
|
840
|
+
const attrs = selectable
|
|
841
|
+
? ` role="button" tabindex="0" data-fmt="${esc(l.format)}" aria-pressed="${l.current ? "true" : "false"}" title="切换到 ${esc(l.format)}"`
|
|
842
|
+
: "";
|
|
843
|
+
return `<div class="lr${l.current ? " on" : ""}${selectable ? " clickable" : ""}"${attrs}>
|
|
844
|
+
<span class="ln">${esc(l.format)}<small>${l.bits}</small></span>
|
|
845
|
+
<span class="lb"><div style="width:${(l.file_bytes / max) * 100}%"></div><em>${gb(l.file_bytes)} GB</em></span>
|
|
846
|
+
<span class="lt">${esc(tierName(l.fits))}${l.fits && l.fits_as_is !== l.fits ? `(需转格式;原样:${esc(tierName(l.fits_as_is))})` : ""}${l.runs && l.runs !== l.fits ? ` · 卸载:${esc(tierName(l.runs))}` : ""}</span></div>`;
|
|
847
|
+
}).join("");
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function renderFormats() {
|
|
851
|
+
const basisTag = (b) => {
|
|
852
|
+
const [label, tip] = BASIS_ZH[b] || [b, ""];
|
|
853
|
+
return `<span class="tag" data-basis="${esc(b)}"${tip ? ` title="${esc(tip)}"` : ""}>${esc(label)}</span>`;
|
|
854
|
+
};
|
|
855
|
+
const fmtNote = (note) => (note ? (FMT_NOTE_ZH[note] || note) : "");
|
|
856
|
+
$("fmttable").querySelector("tbody").innerHTML = D.formats.map((f) => `<tr>
|
|
857
|
+
<td class="mono">${esc(f.name)}</td><td>${esc(FAMILY_ZH[f.family] || f.family)}</td>
|
|
858
|
+
<td class="n">${f.bits}</td><td>${basisTag(f.basis)}</td><td class="n">${(f.bits / 8).toFixed(2)} GB</td>
|
|
859
|
+
<td>${esc(D.default_engine[f.family])}</td><td class="hint">${esc(fmtNote(f.note))}</td></tr>`).join("");
|
|
860
|
+
$("refs").innerHTML = REFS.map(([t, u]) => `<li><a href="${esc(u)}" target="_blank" rel="noopener">${esc(t)}</a></li>`).join("");
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
function renderCmd(r, i) {
|
|
864
|
+
const a = ["localmodels sizecalc"];
|
|
865
|
+
if (!i.inferParams && i.params != null) a.push(`--params ${paramArg(i.params)}`);
|
|
866
|
+
if (i.active != null) a.push(`--active ${paramArg(i.active)}`);
|
|
867
|
+
if (!i.inferBits) a.push(`--quant ${i.fmt}`);
|
|
868
|
+
if (i.fileBytes != null) a.push(`--file-size ${sizeArg(i.fileBytes)}`);
|
|
869
|
+
if (i.attention !== "full") a.push(`--attention ${i.attention}`);
|
|
870
|
+
if (i.kvPerToken != null) a.push(`--kv-per-token ${+(i.kvPerToken / 1024).toFixed(1)}KiB`);
|
|
871
|
+
if (i.context !== D.constants.default_context) a.push(`--context ${ctxLabel(i.context).toLowerCase()}`);
|
|
872
|
+
if (i.slots != null && Math.round(i.slots) > 1) a.push(`--slots ${Math.round(i.slots)}`);
|
|
873
|
+
if (i.kvType !== "f16") a.push(`--kv ${i.kvType}`);
|
|
874
|
+
if (i.hostRam !== D.constants.default_host_ram) a.push(`--host-ram ${i.hostRam / GiB}GiB`);
|
|
875
|
+
$("cmd").textContent = a.join(" ");
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
// ── clipboard & theme helpers ─────────────────────────────────────
|
|
879
|
+
async function copyText(text, fallbackEl = null) {
|
|
880
|
+
if (typeof navigator !== "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText === "function") {
|
|
881
|
+
try {
|
|
882
|
+
await navigator.clipboard.writeText(text);
|
|
883
|
+
return "copied";
|
|
884
|
+
} catch { /* fall through to execCommand fallback */ }
|
|
885
|
+
}
|
|
886
|
+
if (typeof document !== "undefined" && typeof document.createElement === "function" && document.body && typeof document.body.appendChild === "function") {
|
|
887
|
+
const ta = document.createElement("textarea");
|
|
888
|
+
ta.value = text;
|
|
889
|
+
ta.setAttribute?.("readonly", "");
|
|
890
|
+
if (ta.style) {
|
|
891
|
+
ta.style.position = "fixed";
|
|
892
|
+
ta.style.top = "-9999px";
|
|
893
|
+
ta.style.left = "-9999px";
|
|
894
|
+
ta.style.opacity = "0";
|
|
895
|
+
}
|
|
896
|
+
document.body.appendChild(ta);
|
|
897
|
+
try {
|
|
898
|
+
ta.focus?.();
|
|
899
|
+
ta.select?.();
|
|
900
|
+
ta.setSelectionRange?.(0, text.length);
|
|
901
|
+
if (typeof document.execCommand === "function" && document.execCommand("copy")) {
|
|
902
|
+
return "copied";
|
|
903
|
+
}
|
|
904
|
+
} catch { /* fall through to selection fallback */ }
|
|
905
|
+
finally {
|
|
906
|
+
ta.remove?.();
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
if (fallbackEl && typeof window !== "undefined" && typeof window.getSelection === "function" && typeof document.createRange === "function") {
|
|
910
|
+
try {
|
|
911
|
+
const range = document.createRange();
|
|
912
|
+
range.selectNodeContents(fallbackEl);
|
|
913
|
+
const sel = window.getSelection();
|
|
914
|
+
sel?.removeAllRanges?.();
|
|
915
|
+
sel?.addRange?.(range);
|
|
916
|
+
return "selected";
|
|
917
|
+
} catch { /* ignore */ }
|
|
918
|
+
}
|
|
919
|
+
return "failed";
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
function bindCopyButton(btn, getText, defaultLabel, opts = {}) {
|
|
923
|
+
if (!btn) return;
|
|
924
|
+
let resetTimer = null;
|
|
925
|
+
btn.addEventListener("click", async () => {
|
|
926
|
+
if (typeof clearTimeout === "function" && resetTimer != null) {
|
|
927
|
+
clearTimeout(resetTimer);
|
|
928
|
+
resetTimer = null;
|
|
929
|
+
}
|
|
930
|
+
const res = await copyText(getText(), opts.fallbackEl || null);
|
|
931
|
+
if (res === "copied") {
|
|
932
|
+
btn.textContent = opts.okLabel || "已复制";
|
|
933
|
+
btn.classList.add("done");
|
|
934
|
+
announce(opts.okAnnounce || "已复制到剪贴板");
|
|
935
|
+
} else if (res === "selected") {
|
|
936
|
+
btn.textContent = "已选中,请 Ctrl+C";
|
|
937
|
+
btn.classList.remove("done");
|
|
938
|
+
announce("未能自动复制,已选中文本,请按 Ctrl+C 复制");
|
|
939
|
+
} else {
|
|
940
|
+
btn.textContent = opts.failLabel || "复制失败";
|
|
941
|
+
btn.classList.remove("done");
|
|
942
|
+
announce(opts.failAnnounce || "复制失败");
|
|
943
|
+
}
|
|
944
|
+
if (typeof setTimeout === "function") {
|
|
945
|
+
resetTimer = setTimeout(() => {
|
|
946
|
+
btn.textContent = defaultLabel;
|
|
947
|
+
btn.classList.remove("done");
|
|
948
|
+
resetTimer = null;
|
|
949
|
+
}, 1600);
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
const THEME_KEY = "localmodels.theme";
|
|
955
|
+
const THEME_LEGACY_KEYS = ["lm-sizecalc-theme", "lm-theme"];
|
|
956
|
+
const THEME_ORDER = ["auto", "light", "dark"];
|
|
957
|
+
const THEME_LABEL = { auto: "外观:跟随系统", light: "外观:浅色", dark: "外观:深色" };
|
|
958
|
+
const THEME_NEXT = { auto: "浅色", light: "深色", dark: "跟随系统" };
|
|
959
|
+
|
|
960
|
+
function readSavedTheme() {
|
|
961
|
+
try {
|
|
962
|
+
if (typeof localStorage !== "undefined" && typeof localStorage.getItem === "function") {
|
|
963
|
+
for (const key of [THEME_KEY, ...THEME_LEGACY_KEYS]) {
|
|
964
|
+
const saved = localStorage.getItem(key);
|
|
965
|
+
if (THEME_ORDER.includes(saved)) return saved;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
} catch { /* ignore storage errors on file:// or private browsing */ }
|
|
969
|
+
return "auto";
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
function saveTheme(mode) {
|
|
973
|
+
try {
|
|
974
|
+
if (typeof localStorage !== "undefined" && typeof localStorage.setItem === "function") {
|
|
975
|
+
localStorage.setItem(THEME_KEY, mode);
|
|
976
|
+
for (const key of THEME_LEGACY_KEYS) localStorage.setItem(key, mode);
|
|
977
|
+
}
|
|
978
|
+
} catch { /* ignore */ }
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
function applyTheme(mode) {
|
|
982
|
+
const m = THEME_ORDER.includes(mode) ? mode : "auto";
|
|
983
|
+
if (document.documentElement?.dataset) {
|
|
984
|
+
if (m === "auto") delete document.documentElement.dataset.theme;
|
|
985
|
+
else document.documentElement.dataset.theme = m;
|
|
986
|
+
}
|
|
987
|
+
const btn = $("theme");
|
|
988
|
+
if (!btn) return;
|
|
989
|
+
btn.textContent = THEME_LABEL[m];
|
|
990
|
+
const tip = `当前${THEME_LABEL[m]},点击切换为${THEME_NEXT[m]}`;
|
|
991
|
+
btn.title = tip;
|
|
992
|
+
btn.setAttribute("aria-label", tip);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
function selectLadderFormat(fmt, restoreFocus = false) {
|
|
996
|
+
if (!fmt || !D.formats.some((f) => f.name === fmt)) return;
|
|
997
|
+
const inferring = num("filesize") != null && $("i-params").checked;
|
|
998
|
+
presetId = null;
|
|
999
|
+
if (!inferring && num("filesize") != null) {
|
|
1000
|
+
$("filesize").value = "";
|
|
1001
|
+
fromPreset.filesize = false;
|
|
1002
|
+
} else if (inferring) {
|
|
1003
|
+
fromPreset.filesize = false;
|
|
1004
|
+
}
|
|
1005
|
+
$("quant").value = fmt;
|
|
1006
|
+
update();
|
|
1007
|
+
if (restoreFocus) {
|
|
1008
|
+
$("ladder").querySelector?.(`.lr[data-fmt="${fmt}"]`)?.focus?.({ preventScroll: true });
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
// ── wiring ────────────────────────────────────────────────────────
|
|
1013
|
+
fillControls();
|
|
1014
|
+
renderFormats();
|
|
1015
|
+
for (const el of document.querySelectorAll(".controls input, .controls select")) {
|
|
1016
|
+
el.addEventListener(el.tagName === "SELECT" ? "change" : "input", () => {
|
|
1017
|
+
const id = el.id;
|
|
1018
|
+
const posture = ["ctx", "slots", "kvtype", "hostram"].includes(id);
|
|
1019
|
+
if (!posture) presetId = null;
|
|
1020
|
+
// Parameters are inferred from the file when its size is given and "infer parameters" is on.
|
|
1021
|
+
const inferring = num("filesize") != null && $("i-params").checked;
|
|
1022
|
+
const isInferRadio = id === "i-bits" || id === "i-params" || el.name === "infer";
|
|
1023
|
+
const formatMoves = id === "quant" || id === "custom-bits";
|
|
1024
|
+
const paramsMove = ["params", "active", "k-dense", "k-moe"].includes(id) ||
|
|
1025
|
+
isInferRadio || (inferring && (formatMoves || id === "filesize"));
|
|
1026
|
+
// A preset's file belongs to its parameters and format, unless it is the input the
|
|
1027
|
+
// parameters are inferred from; its KV per token belongs to its layer layout.
|
|
1028
|
+
if (id === "filesize" || id === "i-bits" || (inferring && formatMoves)) fromPreset.filesize = false;
|
|
1029
|
+
else if (fromPreset.filesize && !inferring && !isInferRadio && (paramsMove || formatMoves)) {
|
|
1030
|
+
$("filesize").value = "";
|
|
1031
|
+
fromPreset.filesize = false;
|
|
1032
|
+
}
|
|
1033
|
+
if (id === "kvpt") fromPreset.kvpt = false;
|
|
1034
|
+
else if (fromPreset.kvpt && (paramsMove || id === "attention")) {
|
|
1035
|
+
$("kvpt").value = "";
|
|
1036
|
+
fromPreset.kvpt = false;
|
|
1037
|
+
}
|
|
1038
|
+
update();
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
function syncDevFilterButtons() {
|
|
1042
|
+
$("dev-filter-all")?.setAttribute("aria-pressed", String(devFilter === "all"));
|
|
1043
|
+
$("dev-filter-runnable")?.setAttribute("aria-pressed", String(devFilter === "runnable"));
|
|
1044
|
+
}
|
|
1045
|
+
function setDevFilter(mode) {
|
|
1046
|
+
if ((mode !== "all" && mode !== "runnable") || devFilter === mode) return;
|
|
1047
|
+
devFilter = mode;
|
|
1048
|
+
syncDevFilterButtons();
|
|
1049
|
+
if (last) renderDevices(last);
|
|
1050
|
+
}
|
|
1051
|
+
function resetDevFilters() {
|
|
1052
|
+
devFilter = "all";
|
|
1053
|
+
devQuery = "";
|
|
1054
|
+
const searchEl = $("dev-search");
|
|
1055
|
+
if (searchEl) searchEl.value = "";
|
|
1056
|
+
const clearSearch = $("dev-search-clear");
|
|
1057
|
+
if (clearSearch) clearSearch.hidden = true;
|
|
1058
|
+
syncDevFilterButtons();
|
|
1059
|
+
if (last) renderDevices(last);
|
|
1060
|
+
}
|
|
1061
|
+
function clearPin() {
|
|
1062
|
+
if (!pinned) return;
|
|
1063
|
+
pinned = null;
|
|
1064
|
+
syncPinButton();
|
|
1065
|
+
if (last) renderCompare(last);
|
|
1066
|
+
announce("已取消对比");
|
|
1067
|
+
}
|
|
1068
|
+
function pickRulerDot(ids, { restoreFocus = false, refreshTip = false } = {}) {
|
|
1069
|
+
if (!ids.length || !last) return;
|
|
1070
|
+
const idx = ids.indexOf(selected);
|
|
1071
|
+
selected = idx >= 0 ? ids[(idx + 1) % ids.length] : ids[0];
|
|
1072
|
+
const rawIds = ids.join(",");
|
|
1073
|
+
renderRuler(last, restoreFocus ? rawIds : null);
|
|
1074
|
+
renderDevices(last);
|
|
1075
|
+
if (refreshTip && !$("tip").hidden) {
|
|
1076
|
+
const freshG = $("ruler").querySelector?.(`g.dev[data-ids="${rawIds}"]`);
|
|
1077
|
+
if (freshG && typeof freshG.getBoundingClientRect === "function") devTip(ids, { target: freshG });
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
$("clear-file")?.addEventListener("click", () => clearFileSize("filesize"));
|
|
1082
|
+
$("clear-file-params")?.addEventListener("click", () => clearFileSize("params"));
|
|
1083
|
+
$("clear-file-quant")?.addEventListener("click", () => clearFileSize("quant"));
|
|
1084
|
+
$("dev-filter-all")?.addEventListener("click", () => setDevFilter("all"));
|
|
1085
|
+
$("dev-filter-runnable")?.addEventListener("click", () => setDevFilter("runnable"));
|
|
1086
|
+
$("dev-filter-bar")?.addEventListener("click", (e) => {
|
|
1087
|
+
const btn = e.target?.closest?.("button[data-filter]");
|
|
1088
|
+
if (btn) setDevFilter(btn.dataset.filter);
|
|
1089
|
+
});
|
|
1090
|
+
$("dev-search")?.addEventListener("input", () => {
|
|
1091
|
+
devQuery = $("dev-search").value || "";
|
|
1092
|
+
const clearSearch = $("dev-search-clear");
|
|
1093
|
+
if (clearSearch) clearSearch.hidden = !devQuery;
|
|
1094
|
+
if (last) renderDevices(last);
|
|
1095
|
+
});
|
|
1096
|
+
$("dev-search")?.addEventListener("keydown", (e) => {
|
|
1097
|
+
if (e.key === "Escape" && devQuery) {
|
|
1098
|
+
e.preventDefault?.();
|
|
1099
|
+
devQuery = "";
|
|
1100
|
+
$("dev-search").value = "";
|
|
1101
|
+
const clearSearch = $("dev-search-clear");
|
|
1102
|
+
if (clearSearch) clearSearch.hidden = true;
|
|
1103
|
+
if (last) renderDevices(last);
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
$("dev-search-clear")?.addEventListener("click", () => {
|
|
1107
|
+
devQuery = "";
|
|
1108
|
+
const searchEl = $("dev-search");
|
|
1109
|
+
if (searchEl) searchEl.value = "";
|
|
1110
|
+
$("dev-search-clear").hidden = true;
|
|
1111
|
+
if (last) renderDevices(last);
|
|
1112
|
+
searchEl?.focus?.();
|
|
1113
|
+
});
|
|
1114
|
+
$("compare-bar")?.addEventListener("click", (e) => {
|
|
1115
|
+
if (e.target?.closest?.("[data-action='unpin']")) clearPin();
|
|
1116
|
+
});
|
|
1117
|
+
$("ms-jump")?.addEventListener("click", () => {
|
|
1118
|
+
const resultsEl = document.querySelector(".results");
|
|
1119
|
+
let reduce = false;
|
|
1120
|
+
try {
|
|
1121
|
+
reduce = typeof matchMedia === "function" && Boolean(matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
1122
|
+
} catch { /* ignore */ }
|
|
1123
|
+
resultsEl?.scrollIntoView?.({ behavior: reduce ? "auto" : "smooth", block: "start" });
|
|
1124
|
+
});
|
|
1125
|
+
$("devtable").addEventListener("click", (e) => {
|
|
1126
|
+
if (e.target?.closest?.("[data-action='reset-dev-filter']")) { resetDevFilters(); return; }
|
|
1127
|
+
const tr = e.target?.closest?.("tr.dev");
|
|
1128
|
+
if (tr) { selected = tr.dataset.id; if (last) { renderRuler(last); renderDevices(last); } }
|
|
1129
|
+
});
|
|
1130
|
+
$("devtable").addEventListener("keydown", (e) => {
|
|
1131
|
+
const tr = e.target?.closest?.("tr.dev");
|
|
1132
|
+
if (tr && (e.key === "Enter" || e.key === " ")) {
|
|
1133
|
+
e.preventDefault?.();
|
|
1134
|
+
selected = tr.dataset.id;
|
|
1135
|
+
if (last) { renderRuler(last); renderDevices(last, tr.dataset.id); }
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
$("ladder").addEventListener("click", (e) => {
|
|
1139
|
+
const row = e.target.closest?.(".lr[data-fmt]");
|
|
1140
|
+
if (row) selectLadderFormat(row.dataset.fmt, false);
|
|
1141
|
+
});
|
|
1142
|
+
$("ladder").addEventListener("keydown", (e) => {
|
|
1143
|
+
const row = e.target.closest?.(".lr[data-fmt]");
|
|
1144
|
+
if (row && (e.key === "Enter" || e.key === " ")) { e.preventDefault?.(); selectLadderFormat(row.dataset.fmt, true); }
|
|
1145
|
+
});
|
|
1146
|
+
const ruler = $("ruler");
|
|
1147
|
+
const showTip = (e) => { const g = e.target?.closest?.("g.dev"); if (g) devTip(g.dataset.ids.split(","), e); };
|
|
1148
|
+
ruler.addEventListener("mouseover", showTip);
|
|
1149
|
+
ruler.addEventListener("focusin", showTip);
|
|
1150
|
+
ruler.addEventListener("mouseout", () => { $("tip").hidden = true; });
|
|
1151
|
+
ruler.addEventListener("focusout", () => { $("tip").hidden = true; });
|
|
1152
|
+
ruler.addEventListener("click", (e) => {
|
|
1153
|
+
const g = e.target?.closest?.("g.dev");
|
|
1154
|
+
if (g) pickRulerDot(g.dataset.ids.split(","), { refreshTip: true });
|
|
1155
|
+
});
|
|
1156
|
+
ruler.addEventListener("keydown", (e) => {
|
|
1157
|
+
const g = e.target?.closest?.("g.dev");
|
|
1158
|
+
if (g && (e.key === "Enter" || e.key === " ")) {
|
|
1159
|
+
e.preventDefault?.();
|
|
1160
|
+
const ids = g.dataset.ids.split(",");
|
|
1161
|
+
pickRulerDot(ids, { restoreFocus: true, refreshTip: true });
|
|
1162
|
+
if (ids.length === 1) {
|
|
1163
|
+
$("devtable").querySelector?.(`tr[data-id="${selected}"]`)?.scrollIntoView?.({ block: "nearest" });
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
bindCopyButton($("copy"), () => $("cmd").textContent, "复制", {
|
|
1168
|
+
fallbackEl: $("cmd"),
|
|
1169
|
+
okLabel: "已复制",
|
|
1170
|
+
okAnnounce: "命令已复制到剪贴板",
|
|
1171
|
+
failAnnounce: "复制命令失败",
|
|
1172
|
+
});
|
|
1173
|
+
bindCopyButton($("share-btn"), shareUrl, "复制链接", {
|
|
1174
|
+
okLabel: "已复制链接",
|
|
1175
|
+
okAnnounce: "当前方案链接已复制到剪贴板",
|
|
1176
|
+
failLabel: "请复制地址栏",
|
|
1177
|
+
failAnnounce: "未能自动复制链接,请直接复制浏览器地址栏",
|
|
1178
|
+
});
|
|
1179
|
+
let themeMode = readSavedTheme();
|
|
1180
|
+
applyTheme(themeMode);
|
|
1181
|
+
$("theme").addEventListener("click", () => {
|
|
1182
|
+
themeMode = THEME_ORDER[(THEME_ORDER.indexOf(themeMode) + 1) % THEME_ORDER.length];
|
|
1183
|
+
applyTheme(themeMode);
|
|
1184
|
+
saveTheme(themeMode);
|
|
1185
|
+
});
|
|
1186
|
+
$("pin-btn")?.addEventListener("click", () => {
|
|
1187
|
+
if (pinned) {
|
|
1188
|
+
clearPin();
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
1191
|
+
if (last) {
|
|
1192
|
+
const dev = comparisonDevice(last);
|
|
1193
|
+
pinned = {
|
|
1194
|
+
label: currentLabel(last),
|
|
1195
|
+
fileBytes: last.file_bytes,
|
|
1196
|
+
runTotal: last.runtime.total,
|
|
1197
|
+
tier: tierName(last.magnitude.fits),
|
|
1198
|
+
tierId: last.magnitude.fits,
|
|
1199
|
+
deviceId: dev?.device || null,
|
|
1200
|
+
deviceName: dev?.name || "",
|
|
1201
|
+
decode: dev?.decode_ceiling_tok_s || 0,
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
syncPinButton();
|
|
1205
|
+
if (last) renderCompare(last);
|
|
1206
|
+
});
|
|
1207
|
+
let raf = 0;
|
|
1208
|
+
addEventListener("resize", () => { cancelAnimationFrame(raf); raf = requestAnimationFrame(() => last && renderRuler(last)); });
|
|
1209
|
+
|
|
1210
|
+
function initFromHash() {
|
|
1211
|
+
const fallback = PRESETS.find((p) => p.id === "qwen38-27b");
|
|
1212
|
+
const map = parseHashMap();
|
|
1213
|
+
const preset = map?.preset ? PRESETS.find((p) => p.id === map.preset) : null;
|
|
1214
|
+
if (!map || (!preset && map.params == null && map.file == null)) {
|
|
1215
|
+
applyPreset(fallback);
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
if (preset) {
|
|
1219
|
+
setPresetControls(preset);
|
|
1220
|
+
} else {
|
|
1221
|
+
presetId = null;
|
|
1222
|
+
fromPreset.filesize = false;
|
|
1223
|
+
fromPreset.kvpt = false;
|
|
1224
|
+
$("k-dense").checked = true;
|
|
1225
|
+
$("k-moe").checked = false;
|
|
1226
|
+
$("filesize").value = "";
|
|
1227
|
+
$("kvpt").value = "";
|
|
1228
|
+
$("i-bits").checked = true;
|
|
1229
|
+
$("i-params").checked = false;
|
|
1230
|
+
selected = null;
|
|
1231
|
+
}
|
|
1232
|
+
const shapeMatchesPreset = !preset || (
|
|
1233
|
+
(map.kind == null || map.kind === (preset.active ? "moe" : "dense"))
|
|
1234
|
+
&& (map.params == null || Number(map.params) === preset.params)
|
|
1235
|
+
&& (map.active == null || Number(map.active) === preset.active)
|
|
1236
|
+
&& (map.att == null || map.att === preset.attention)
|
|
1237
|
+
&& (map.quant == null || map.quant === preset.quant)
|
|
1238
|
+
);
|
|
1239
|
+
if (!shapeMatchesPreset) {
|
|
1240
|
+
presetId = null;
|
|
1241
|
+
if (map.file == null && map.infer !== "params") {
|
|
1242
|
+
$("filesize").value = "";
|
|
1243
|
+
fromPreset.filesize = false;
|
|
1244
|
+
}
|
|
1245
|
+
if (map.kvpt == null) {
|
|
1246
|
+
$("kvpt").value = "";
|
|
1247
|
+
fromPreset.kvpt = false;
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
if (map.kind === "moe") { $("k-moe").checked = true; $("k-dense").checked = false; }
|
|
1251
|
+
else if (map.kind === "dense") { $("k-dense").checked = true; $("k-moe").checked = false; }
|
|
1252
|
+
if (map.params != null) {
|
|
1253
|
+
const pVal = Number(map.params);
|
|
1254
|
+
if (Number.isFinite(pVal) && pVal > 0) $("params").value = map.params;
|
|
1255
|
+
}
|
|
1256
|
+
if (map.active != null) {
|
|
1257
|
+
const aVal = Number(map.active);
|
|
1258
|
+
if (Number.isFinite(aVal) && aVal > 0) $("active").value = map.active;
|
|
1259
|
+
}
|
|
1260
|
+
if (map.att && ["full", "swa", "hybrid", "mla"].includes(map.att)) $("attention").value = map.att;
|
|
1261
|
+
if (map.kvpt != null) {
|
|
1262
|
+
if (map.kvpt === "") { $("kvpt").value = ""; fromPreset.kvpt = false; }
|
|
1263
|
+
else {
|
|
1264
|
+
const kVal = Number(map.kvpt);
|
|
1265
|
+
if (Number.isFinite(kVal) && kVal >= 0) {
|
|
1266
|
+
$("kvpt").value = map.kvpt;
|
|
1267
|
+
if (!preset || kVal !== preset.kv) fromPreset.kvpt = false;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
applyQuantParam(map.quant, map.bits);
|
|
1272
|
+
if (map.file != null) {
|
|
1273
|
+
if (map.file === "") { $("filesize").value = ""; fromPreset.filesize = false; }
|
|
1274
|
+
else {
|
|
1275
|
+
const fVal = Number(map.file);
|
|
1276
|
+
if (Number.isFinite(fVal) && fVal > 0) {
|
|
1277
|
+
$("filesize").value = map.file;
|
|
1278
|
+
if (!preset || fVal !== preset.file) {
|
|
1279
|
+
fromPreset.filesize = false;
|
|
1280
|
+
presetId = null;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
if (map.infer === "params") { $("i-params").checked = true; $("i-bits").checked = false; presetId = null; }
|
|
1286
|
+
else if (map.infer === "bits") { $("i-bits").checked = true; $("i-params").checked = false; }
|
|
1287
|
+
const ctxIdx = parseCtxIndex(map.ctx);
|
|
1288
|
+
if (ctxIdx != null) $("ctx").value = String(ctxIdx);
|
|
1289
|
+
if (map.slots != null) {
|
|
1290
|
+
const sVal = Number(map.slots);
|
|
1291
|
+
if (Number.isFinite(sVal) && sVal >= 1) $("slots").value = String(Math.round(sVal));
|
|
1292
|
+
}
|
|
1293
|
+
if (map.kv && ["f16", "fp8", "q8_0", "q4_0"].includes(map.kv)) $("kvtype").value = map.kv;
|
|
1294
|
+
if (map.ram != null) {
|
|
1295
|
+
const rVal = Number(map.ram);
|
|
1296
|
+
if (Number.isFinite(rVal) && rVal >= 0) $("hostram").value = map.ram;
|
|
1297
|
+
}
|
|
1298
|
+
last = null;
|
|
1299
|
+
update();
|
|
1300
|
+
if (!last) applyPreset(fallback);
|
|
1301
|
+
}
|
|
1302
|
+
syncPinButton();
|
|
1303
|
+
initFromHash();
|
|
1304
|
+
addEventListener("hashchange", initFromHash);
|
|
1305
|
+
})();
|
|
1306
|
+
if (typeof module !== "undefined") module.exports = { zhMsg };
|