DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to load a bf16 model in Python with Glyd with Glyd

Use glyd.from_pretrained to load Qwen3.5-9B from a Python script.

Who it is forA machine learning engineer who writes Python inference code and wants smaller GPU memory use without changing the model.

The problemLoading bf16 model weights in Python takes more GPU memory than the Glyd format needs.

The outcomeA Python object holding Qwen3.5-9B loaded through Glyd, ready for the engineer's own inference code.

What you need first

  • Linux (x86_64 or aarch64) with an NVIDIA GPU: Ampere, Ada, Hopper or Blackwell, driver 580 or newer
  • For the Python and vLLM steps: Python with pip, and vLLM for serving
  • For the codec: Homebrew or a release tarball from the Glyd releases
  • A Glyd license from [email protected] if the work is commercial, since the README says commercial use needs one

Steps

  1. Confirm the GPU meets the README's requirements: NVIDIA Ampere, Ada, Hopper or Blackwell on Linux with driver 580 or newer.
  2. Run pip install "glyd[vllm]", as shown in the README's vLLM section.
  3. In a Python file, run import glyd and then model = glyd.from_pretrained("Qwen/Qwen3.5-9B").
  4. Print the loaded object's type and run one short forward pass to confirm the model loads. (inferred, check the README)

Prompt for your agent

In the repo surya-koritala/Glyd, install the package with `pip install "glyd[vllm]"` and run `import glyd` followed by `model = glyd.from_pretrained("Qwen/Qwen3.5-9B")` on a machine with <GPU model>. Report any errors and the GPU memory in use after loading. Verify that the model object is created without an exception.

Caveat. The README gives Python usage only as a single line, so check the returned object's interface yourself before building on it.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page