Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in LMStudio models parsing #23764

Closed
jbpin opened this issue Jan 28, 2025 · 9 comments · Fixed by #24054
Closed

Error in LMStudio models parsing #23764

jbpin opened this issue Jan 28, 2025 · 9 comments · Fixed by #24054
Labels
reproducible Verified steps to reproduce included

Comments

@jbpin
Copy link

jbpin commented Jan 28, 2025

Describe the bug / provide steps to reproduce it

Summary:
LMStudio model response cannot be parsed when a model in the list missed the quantization parameter.

Caused by:
    missing field `quantization` at line 24 column 5
2025-01-28T10:13:16.728349+01:00 [ERROR] Unable to parse LM Studio models response

Steps to trigger the problem:

  1. Download SmolVLM model in LMStudio
  2. Refresh Zed LMStudio with the connect button
  3. Open zed log

Actual Behavior:
Zero model are listed from LMStudio because only one is not suitable.
Expected Behavior:
Filter for not compatible models and display the one that match the necessary parameter.

LMStudio response to the models query :

2025-01-28 10:14:38 [DEBUG] 
Received request: GET to /api/v0/models
2025-01-28 10:14:38  [INFO] 
Returning {
  "data": [
    {
      "id": "deepseek-r1-distill-llama-8b",
      "object": "model",
      "type": "llm",
      "publisher": "lmstudio-community",
      "arch": "llama",
      "compatibility_type": "gguf",
      "quantization": "Q8_0",
      "state": "loaded",
      "max_context_length": 131072,
      "loaded_context_length": 4096
    },
    {
      "id": "smolvlm-500m-instruct",
      "object": "model",
      "type": "vlm",
      "publisher": "mlx-community",
      "arch": "idefics3",
      "compatibility_type": "mlx",
      "state": "not-loaded",
      "max_context_length": 8192
    },
    {
      "id": "text-embedding-nomic-embed-text-v1.5",
      "object": "model",
      "type": "embeddings",
      "publisher": "nomic-ai",
      "arch": "nomic-bert",
      "compatibility_type": "gguf",
      "quantization": "Q4_K_M",
      "state": "not-loaded",
      "max_context_length": 2048
    }
  ],
  "object": "list"
}

Zed Version and System Specs

Zed: v0.170.4 (Zed)
OS: macOS 15.2.0
Memory: 128 GiB
Architecture: aarch64

@notpeter
Copy link
Member

I was not able to reproduce. Can you provide more details steps?

Here's what I did:

  1. LM Studio is running with API access enabled (tested working in Zed from previous setup)
  2. Fetch and load these models:
lms get deepseek-r1-distill-llama-8b
lms load deepseek-r1-distill-llama-8b
lms get gaianet/Nomic-embed-text-v1.5-Embedding-GGUF
lms load gaianet/Nomic-embed-text-v1.5-Embedding-GGUF/nomic-embed-text-v1.5.f16.gguf
lms get mlx-community/SmolVLM-500M-Instruct-4bit
lms load mlx-community/SmolVLM-500M-Instruct-4bit
  1. Quit and reload Zed.
  2. Open Assistant Panel and open model selector.
  3. Open Zed log

No errors and models seem to appear.

Image

Perhaps you are loading slightly different models / repacks which have different metadata?
Note I only have 64GB of ram, so LM Studio may be steering me towards models I can run.

@teslanaut
Copy link

teslanaut commented Jan 28, 2025

I've getting this issue since 2 days ago on Mac OS also. Latest Zed + latest LMStudio. Clicking connect in Zed returns the error mentioned above in the Zed logs.

Error persists Zed 0.171.3.

Zed Version and System Specs
Zed: v0.170.4 (Zed)
OS: macOS 15.2.0
Memory: 128 GiB
Architecture: aarch64

@notpeter
Copy link
Member

Would love to reproduce this.

@jbpin How did you get smolvlm-500m-instruct without a quantization parameter? (how did you download this).

@teslanaut Do you have a model listed in curl http://localhost:1234/v1/models which doesn't have a quantization field?

@teslanaut
Copy link

teslanaut commented Jan 31, 2025

Here is the output of curl http://localhost:1234/v1/models:

v1/models json
{
  "data": [
    {
      "id": "deepseek-r1-distill-llama-70b",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "text-embedding-nomic-embed-text-v1.5",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "fuseo1-deepseekr1-qwen2.5-coder-32b-preview",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "qwen2.5-14b-deepseek-r1-1m-mlx",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "qwen2.5-14b-instruct-1m",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "zelensky-78b",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "deepseek-r1-distill-qwen-32b",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "pixtral-12b",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "mistral-nemo-instruct-2407",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "qwen2.5-coder-32b-instruct-128k",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "qwen2.5-coder-32b-instruct",
      "object": "model",
      "owned_by": "organization_owner"
    }
  ],
  "object": "list"
}

And my list of models in LM Studio

Image

models.txt

@notpeter
Copy link
Member

Ooops. I meant curl http://localhost:1234/api/v0/models

@teslanaut
Copy link

teslanaut commented Jan 31, 2025

Here you go:

model list json{ "data": [ { "id": "mistral-small-24b-instruct-2501", "object": "model", "type": "llm", "publisher": "unsloth", "arch": "llama", "compatibility_type": "gguf", "quantization": "Q8_0", "state": "not-loaded", "max_context_length": 32768 }, { "id": "text-embedding-nomic-embed-text-v1.5", "object": "model", "type": "embeddings", "publisher": "nomic-ai", "arch": "nomic-bert", "compatibility_type": "gguf", "quantization": "Q4_K_M", "state": "not-loaded", "max_context_length": 2048 }, { "id": "fuseo1-deepseekr1-qwen2.5-coder-32b-preview", "object": "model", "type": "llm", "publisher": "mlx-community", "arch": "qwen2", "compatibility_type": "mlx", "quantization": "4bit", "state": "not-loaded", "max_context_length": 131072 }, { "id": "qwen2.5-14b-deepseek-r1-1m-mlx", "object": "model", "type": "llm", "publisher": "m-i", "arch": "qwen2", "compatibility_type": "mlx", "quantization": "8bit", "state": "not-loaded", "max_context_length": 1010000 }, { "id": "qwen2.5-14b-instruct-1m", "object": "model", "type": "llm", "publisher": "bartowski", "arch": "qwen2", "compatibility_type": "gguf", "quantization": "Q8_0", "state": "not-loaded", "max_context_length": 1010000 }, { "id": "zelensky-78b", "object": "model", "type": "llm", "publisher": "nisten", "arch": "qwen2", "compatibility_type": "gguf", "state": "not-loaded", "max_context_length": 98304 }, { "id": "deepseek-r1-distill-llama-70b", "object": "model", "type": "llm", "publisher": "unsloth", "arch": "llama", "compatibility_type": "gguf", "quantization": "Q4_K_M", "state": "not-loaded", "max_context_length": 131072 }, { "id": "deepseek-r1-distill-qwen-32b", "object": "model", "type": "llm", "publisher": "lmstudio-community", "arch": "qwen2", "compatibility_type": "gguf", "quantization": "Q4_K_M", "state": "not-loaded", "max_context_length": 131072 }, { "id": "pixtral-12b", "object": "model", "type": "vlm", "publisher": "mlx-community", "arch": "pixtral", "compatibility_type": "mlx", "quantization": "8bit", "state": "not-loaded", "max_context_length": 1024000 }, { "id": "mistral-nemo-instruct-2407", "object": "model", "type": "llm", "publisher": "unsloth", "arch": "llama", "compatibility_type": "gguf", "quantization": "F16", "state": "not-loaded", "max_context_length": 1024000 }, { "id": "qwen2.5-coder-32b-instruct-128k", "object": "model", "type": "llm", "publisher": "unsloth", "arch": "qwen2", "compatibility_type": "gguf", "quantization": "Q4_K_M", "state": "not-loaded", "max_context_length": 131072 }, { "id": "qwen2.5-coder-32b-instruct", "object": "model", "type": "llm", "publisher": "Qwen", "arch": "qwen2", "compatibility_type": "gguf", "quantization": "Q4_0", "state": "not-loaded", "max_context_length": 131072 } ], "object": "list" }

@teslanaut
Copy link

Here is a video of it in action. I have LM Studio running but not Ollama on purpose.

recording.mp4

@notpeter
Copy link
Member

notpeter commented Jan 31, 2025

Got it. I was able to reproduce with zelensky-78b. Thanks @teslanaut

    {
      "id": "zelensky-78b",
      "object": "model",
      "type": "llm",
      "publisher": "nisten",
      "arch": "qwen2",
      "compatibility_type": "gguf",
      "state": "loaded",
      "max_context_length": 98304,
      "loaded_context_length": 4096
    }

@notpeter notpeter added reproducible Verified steps to reproduce included and removed needs-repro Needs reproduction steps / someone to reproduce labels Jan 31, 2025
notpeter added a commit that referenced this issue Jan 31, 2025
- Closes #23764

Certain models do not include `quantization` parameter from lm studio rest API.
notpeter added a commit that referenced this issue Jan 31, 2025
- Closes #23764

Certain models do not include `quantization` parameter from lm studio rest API.
@notpeter
Copy link
Member

notpeter commented Feb 1, 2025

Fixed in Zed Stable v0.171.5 / Zed Preview v0.171.5-pre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproducible Verified steps to reproduce included
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants