Resolve a model path, downloading from HuggingFace if it looks like a repo ID.
(model: &str)
| 697 | |
| 698 | /// Resolve a model path, downloading from HuggingFace if it looks like a repo ID. |
| 699 | fn resolve_model_path(model: &str) -> Result<PathBuf> { |
| 700 | let path = PathBuf::from(model); |
| 701 | if path.exists() { |
| 702 | Ok(path) |
| 703 | } else if utils::hf::looks_like_hf_repo(model) { |
| 704 | utils::hf::ensure_model_downloaded(model) |
| 705 | } else { |
| 706 | anyhow::bail!("model path does not exist: {}", path.display()) |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | /// Build a minimal Topology for a single worker from assigned layers. |
| 711 | fn build_worker_topology( |
no test coverage detected