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-0.4.0.tar.gz (11.2 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-0.4.0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

weed_loader-0.4.0-py3-none-manylinux_2_39_x86_64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

weed_loader-0.4.0-py3-none-manylinux_2_35_x86_64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

weed_loader-0.4.0-py3-none-macosx_15_0_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

weed_loader-0.4.0-py3-none-macosx_15_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

weed_loader-0.4.0-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-0.4.0.tar.gz.

File metadata

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

File hashes

Hashes for weed_loader-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6797eebeb77724a35ad400b4487a4cf36c87492102a0aa7009945218220b662f
MD5 5c7c1cda844084a7c52ece760f163a04
BLAKE2b-256 f17efa9d7f40eae85d9ac804bc052ead8cb93b48f98a0e6f18b34c89a3ab1167

See more details on using hashes here.

File details

Details for the file weed_loader-0.4.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: weed_loader-0.4.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for weed_loader-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9c5e88a952aa6c272b65afbfee2c5458546f6f6c0c626f13b538beff53c264d4
MD5 1f5afae4ecc5e6e2dfd6ac3a172ba66f
BLAKE2b-256 d1fefd912adca6c9a09304f3be44a4ff9199dec6e02112339b565990467072bb

See more details on using hashes here.

File details

Details for the file weed_loader-0.4.0-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader-0.4.0-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 41b24b8386192c049263f2990ef06856db876e448941ffb5d786c1cbeba1575e
MD5 813ea29b4f65a9904ee8910823e0918c
BLAKE2b-256 f1237ec36f8ccaaed443a3a0479323c889709a8904b9070d33746ab77737319c

See more details on using hashes here.

File details

Details for the file weed_loader-0.4.0-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader-0.4.0-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 a2e33cdb4877754963b6da98def33596ac13ec6fe7455d37f90aafddd1ccc934
MD5 7d82a30d4577f133d3fac5bafd2328fa
BLAKE2b-256 e4496dc923f9b584af5bba7118f6655756be9a024df600e24ddad6e2bb4f8576

See more details on using hashes here.

File details

Details for the file weed_loader-0.4.0-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader-0.4.0-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 5fab58c0469113f35997a45b4e0477f134a520cf2e509168a5e360e6446f2a03
MD5 1651d557c307815f89de403ea15ba565
BLAKE2b-256 3d70cec09e6f2da4b4cf2de0c369a4c427b110bc685b22360fe9b6a0dd496c9f

See more details on using hashes here.

File details

Details for the file weed_loader-0.4.0-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader-0.4.0-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5fd9645c511d59d3212ae4a5939e72de0af5f3dfc735f5df42ffa82b86893071
MD5 6b7bb1e66ad4c522b6227ea2b7368d3c
BLAKE2b-256 873cb15d7807fdb84812111b6c8fa0d9853c1b035acba7c0bd92f4dd870ea266

See more details on using hashes here.

File details

Details for the file weed_loader-0.4.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader-0.4.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2b6a2ed6aff41e42cf6eeb20629b0f22e66f9611297ea6cbad7ba05ccbd37c94
MD5 b52666c0d9e6890d273e89ff548bb980
BLAKE2b-256 6e34bdeaa412798d3368ac52db725421c236b1db84184f13cd4c3d4b13f34f77

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