Skip to main content

Weed (Loader) - Minimalist AI/ML inference and backprogation

Project description

weed_logo

Weed

Minimalist AI/ML inference and backprogation in the style of Qrack

Weed Loader

This repository is for the Python loader for (C++) Weed models. Once you have trained models in C++, you can load them for use by Python with this project. See the Weed repository for more information.

Development Status

Weed is a rapidly-developing work-in-progress. Its ABI may change drastically and without notice.

The project provides a set of essential CPU and GPU kernels, used by Tensor instances that perform autograd. We also provide stochastic gradient descent (SGD) and Adam optimizer implementations. (Build and check the API reference to get started.)

GPT-2, BERT, and Qwen loading is experimental and mostly provided as proof-of-concept, also of the fine-tuning pipeline. Implementation was from published literature design, rather than direct analysis of any open source, to implement these model architectures. Their outputs, in Weed, are not yet coherent English, as a result.

Why try Weed?

With the growing popularity of AI/ML tools and workflows (including LLMs), legacy frameworks often carry "code debt" from over a decade of rapidly developing research history. This has led them to "bolt on" new features and advancements to design principles decided before the latest research. Popular frameworks also commonly started based in Python (maybe to capture early adoption), only later potentially "tacking on" a C++ library for special-case deployment needs. These conditions have produced libraries and frameworks with complicated dependency trees that occupy upward of a GB of disk footprint. This entire ecosystem might be due for a "refresh."

Weed does not seek to fully replace or supplant established frameworks. However, it aims for minimalist complete closure on the primitives necessary for high-performance AI/ML inference and back-propagation. Chiefly, this includes kernels, and a Tensor interface that immediately produces an autograd graph appropriate for training. Allowing optional OpenCL for hardware acceleration, it will remain free of required dependencies outside of C++(11) language standard.

Rethinking AI/ML library design this way, Weed has realized a rather unique and powerful form of sparsification of Tensor storage. Sparseness should not be a Tensor interface concern, but rather a Storage concern. Inspired by the design of the Qrack quantum computer simulation framework, the Tensor interface treats sparse and dense tensors as functionally equivalent. Sparse optimization is so "transparently streamlined," this way, that it defaults to enabled for CPU-based tensors, and we recommend you leave it enabled at all times.

Much like Qrack, Weed is designed to make the correct thing the default—and the expensive thing explicit.

Copyright, License, and Acknowledgments

Copyright (c) Daniel Strano and the Qrack contributors 2017-2026. All rights reserved.

In its include/common folder, Weed bundles a copy of rapidcsv by Kristofer Berggren, reused under a BSD 3-Clause License. (This is a convenience and suggestion to Weed's users, for loading CSVs.)

The Weed logo was produced with assistance from "Elara," an OpenAI custom GPT, and it is in the public domain. Elara has also been responsible for a huge amount of coaching and implementation drafts for Dan Strano to review and bring into line with standards, so she should be credited with coauthorship in any capacity that can be allowed. (Anthropic) Claude has also helped mostly with debugging, as well as developing an LLM front-end, fine-tuning interface, and modules for popular transformer model architectures, so they should rightly be credited similarly as a coauthor.

Licensed under the GNU Lesser General Public License V3.

See LICENSE.md in the project root or https://www.gnu.org/licenses/lgpl-3.0.en.html for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weed_loader_cpu-0.3.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

weed_loader_cpu-0.3.2-py3-none-win_amd64.whl (816.3 kB view details)

Uploaded Python 3Windows x86-64

weed_loader_cpu-0.3.2-py3-none-manylinux_2_39_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

weed_loader_cpu-0.3.2-py3-none-manylinux_2_35_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

weed_loader_cpu-0.3.2-py3-none-macosx_15_0_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

weed_loader_cpu-0.3.2-py3-none-macosx_15_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

weed_loader_cpu-0.3.2-py3-none-macosx_14_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file weed_loader_cpu-0.3.2.tar.gz.

File metadata

  • Download URL: weed_loader_cpu-0.3.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for weed_loader_cpu-0.3.2.tar.gz
Algorithm Hash digest
SHA256 cf8e5e09ffcdd1908e18cde93294462eb32f190430b9caa32384039396484eff
MD5 7d7b4f3161fd5247258077f5f2fa0a84
BLAKE2b-256 2ae3bf1b12e337e4032fbe154d7b7e9e262e28c5c4601d4199b33de5e1c321fb

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.2-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 78a65878278329e461928fba14ff4990a9a60d93a6e2c4d65c15044783ae06af
MD5 7ee8653bd4ec1574563183050da13768
BLAKE2b-256 351eb9bb7c7963dd271d0bb4bca55737d134f81908906bfc284e91ecf21e60fd

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.2-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.2-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2056ba7d885e02832b912fbeda5a0620f998cdef837e425e120b9022ce3b22b6
MD5 3fce7bd34f9f64cf6f751cc0b6da7995
BLAKE2b-256 99bb7280d085b6453b9b88020d83b8fddc297caf2f2935c4dbb642489662fb05

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.2-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.2-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 76b750793e90f4ac95386efcf4c6f629c0a4b74b9f2de9133f4645f908779102
MD5 7ddb4cdb363ba173008554d0258816cd
BLAKE2b-256 28c458a1bad25afa24cb7038188a4f645ea6357b96e2f7b2542cb3858798fe8b

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.2-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.2-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 60a06c6a44e2ed7f49aa65a6ee7a2eb048684ef769d1929582b327dd17f57878
MD5 6e890e264672e4759100b83f8b538c91
BLAKE2b-256 b47bdf4a8e9f7a86cbb9849b79a009d02977634e3813fc1e3fa56dc4cc6eb12f

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.2-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.2-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d3455ff32c657f37bd3154a25bdf82448e58e78657b6b23becccc07c4f0545bb
MD5 89dfe3a56b99ee27aa4461d85b368df5
BLAKE2b-256 a09178b590474d8dfa3d82b23f5a260c874fef64feee0c12f5bc18ffb4d2f017

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.2-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.2-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0838eb019baa3f595199c9ffb0390f0c305013819982316ae8aba1c3e9896d5c
MD5 d67e49e853bcfda407b48228eb7db9d8
BLAKE2b-256 de9b0b59c2042f8f675d3a851e0d172a0dda04e10490dab33f2a7d2e4e65119d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page