Documentation
Getting Started
Predicting with LLMs
Agentic Flows
Text Embedding
Tokenization
Model Info
List Downloaded Models
You can iterate through locally available models using the downloaded model listing methods.
The listing results offer .model()
and .load_new_instance()
methods, which allow the
downloaded model reference to be converted in the full SDK handle for a loaded model.
import lmstudio as lms
downloaded = lms.list_downloaded_models()
llm_only = lms.list_downloaded_models("llm")
embedding_only = lms.list_downloaded_models("embedding")
for model in downloaded:
print(model)
This will give you results equivalent to using lms ls
in the CLI.
DownloadedLlm(model_key='qwen2.5-7b-instruct-1m', display_name='Qwen2.5 7B Instruct 1M', architecture='qwen2', vision=False) DownloadedEmbeddingModel(model_key='text-embedding-nomic-embed-text-v1.5', display_name='Nomic Embed Text v1.5', architecture='nomic-bert')