Model Reference API¶
ModelReference is the parsed form of the opaque user-facing --model input.
Normalized representation of a user-supplied model reference string.
Source code in src/ollm/runtime/reference.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
parse
classmethod
¶
parse(raw_reference: str) -> Self
Parse a raw model reference into a structured form.
Source code in src/ollm/runtime/reference.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
is_huggingface_reference
¶
is_huggingface_reference() -> bool
Return whether the reference should be treated as a Hugging Face repo ID.
Source code in src/ollm/runtime/reference.py
62 63 64 65 66 67 68 69 70 | |
materialization_name
¶
materialization_name() -> str
Return the directory name used for local materialization of this reference.
Source code in src/ollm/runtime/reference.py
72 73 74 75 76 77 78 | |