modelhardware

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package modelhardware provides read-only hardware facts before a model is downloaded.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Vendor               string
	Name                 string
	Kind                 string
	TotalBytes           int64
	AvailableBytes       int64
	MemoryKnown          bool
	Source               string
	SharedTotalBytes     int64
	SharedAvailableBytes int64
	SharedMemoryKnown    bool
}

Device records observed hardware; detection does not establish driver or model compatibility. Shared memory is backed by system RAM and is not added to the selected device budget.

type Hardware

type Hardware struct {
	MemoryBytes          int64
	PreferredBackend     string
	Kind                 string
	Label                string
	TotalBytes           int64
	AvailableBytes       int64
	Known                bool
	SystemTotalBytes     int64
	SystemAvailableBytes int64
	Devices              []Device
	Summary              string
}

Hardware describes one conservative memory pool; RAM and device memory are never added. MemoryBytes excludes modeld's default reserve and headroom. Live modeld capacity remains authoritative.

func Detect

func Detect(ctx context.Context) Hardware

Detect probes installed platform tools and OS memory telemetry without installing or downloading anything.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL