tinycodinglm / lmstudio /lmstudio-0045.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 15)
b27bfb3 verified
|
Raw History Blame Contribute Delete
2.06 kB
opencode trace
System You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing c...

You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies.

User

How do I choose which model to download and run in LM Studio for my hardware? Explain size vs VRAM/RAM, quantization such as Q4_K_M, and how to list models via the API. Include code examples.

Assistant

Model selection in LM Studio is a hardware tradeoff.

  • 3-7B: runs on CPU or low VRAM, fastest, good for simple chat
  • 8-14B: needs a discrete GPU for reasonable speed, good balance
  • 16B+: needs 16GB+ VRAM, best quality, slower
  • Check the Models tab in LM Studio for download size before downloading

Quantization (GGUF):

  • Q4_K_M: recommended speed/quality balance
  • Q5_K_M: slightly better quality, more memory
  • Q8_0: near full quality, ~2x memory of Q4
  • FP16: full quality, ~4x memory of Q4 - only if you have VRAM to spare

Pick the largest model + quantization that fits your GPU with room for context length.

python
import requests

# LM Studio must be running with server started (default port 1234)
resp = requests.get("http://localhost:1234/v1/models", timeout=10)
resp.raise_for_status()
for model in resp.json().get("data", []):
    print(model.get("id"), "-", model.get("object", "model"))

Example families to search in the Models tab (availability varies): Llama 3 8B for general chat, Phi-3 Mini 3.8B for speed, DeepSeek Coder / Qwen2.5-Coder for code, Hermes 2 Pro for tool use. Verify the exact quantized file fits your hardware.