MCPcopy Create free account
hub / github.com/Icecubesaad/OpenLLM-Studio / deriveModelName

Function deriveModelName

src/components/ModelWizard.tsx:746–750  ·  view source on GitHub ↗
(repoId: string, filename: string)

Source from the content-addressed store, hash-verified

744}
745
746function deriveModelName(repoId: string, filename: string): string {
747 const baseName = repoId.split('/').pop() || repoId;
748 const quantization = filename.match(/Q\d+_K_[MSL]|Q\d+_\d+|Q\d+|F\d+/i)?.[0] || '';
749 return `${baseName}-${quantization}`.toLowerCase().replace(/[^a-z0-9-]/g, '-');
750}
751
752function formatFileSizeGb(size: number): string {
753 return `${(size / 1_073_741_824).toFixed(1)} GB`;

Callers 1

handleDownloadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected