{"id":17859880,"url":"https://github.com/miniex/maidenx","last_synced_at":"2025-03-20T19:31:16.409Z","repository":{"id":259741794,"uuid":"877602779","full_name":"miniex/maidenx","owner":"miniex","description":"Rust-based CUDA library designed for learning purposes and building my AI engines named Maiden Engine","archived":false,"fork":false,"pushed_at":"2024-10-27T22:52:49.000Z","size":90,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-27T22:59:00.484Z","etag":null,"topics":["ai","cuda","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/maidenx","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miniex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T23:20:49.000Z","updated_at":"2024-10-27T22:34:28.000Z","dependencies_parsed_at":"2024-10-27T22:59:05.767Z","dependency_job_id":null,"html_url":"https://github.com/miniex/maidenx","commit_stats":null,"previous_names":["miniex/maiden","miniex/maidenx"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniex%2Fmaidenx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniex%2Fmaidenx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniex%2Fmaidenx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miniex%2Fmaidenx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miniex","download_url":"https://codeload.github.com/miniex/maidenx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221796222,"owners_count":16881809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cuda","rust"],"created_at":"2024-10-28T07:03:50.247Z","updated_at":"2025-03-20T19:31:16.388Z","avatar_url":"https://github.com/miniex.png","language":"Rust","funding_links":[],"categories":["Neural Networks"],"sub_categories":[],"readme":"# MaidenX\n\nA Rust-based machine learning framework developed as part of the Maiden Engine project. MaidenX is designed with an educational focus, structured to mirror PyTorch's architecture to facilitate learning and understanding of ML framework implementations.\nThis library prioritizes code readability, ensuring that anyone can easily understand and work with the codebase.\n\n[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/miniex/maidenx#license)\n[![Crates.io](https://img.shields.io/crates/v/maidenx.svg)](https://crates.io/crates/maidenx)\n\n## Project Status 🚧\n\nThis is a personal learning and development project. As such:\n- The framework is under active development\n- Features may be experimental or incomplete\n- Functionality is not guaranteed for production use\n\nThe project serves primarily as a testbed for AI engine development and learning purposes.\n\n## Goals\n\nMaidenX is being developed with a vision to create a lightweight, fast, and human-like artificial intelligence framework.\nThe library focuses on simplicity, performance, and user convenience, ensuring that developers can work effortlessly while enjoying robust machine learning capabilities.\nAs the project evolves, MaidenX aims to serve as a foundation for innovative AI solutions and advanced learning resources.\n\n## Examples\n\n```rust\nuse maidenx::nn::*;\nuse maidenx::prelude::*;\nuse std::time::Instant;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let input_data: Vec\u003cVec\u003cf32\u003e\u003e = (0..10000)\n        .map(|i| vec![(i % 100) as f32 / 100.0, ((i % 100) + 1) as f32 / 100.0, ((i % 100) + 2) as f32 / 100.0])\n        .collect();\n    let target_data: Vec\u003cVec\u003cf32\u003e\u003e = (0..10000).map(|i| vec![((i % 100) * 10) as f32 / 1000.0]).collect();\n\n    let mut input = Tensor::new(input_data)?;\n    let target = Tensor::new(target_data)?;\n    input.with_grad()?;\n\n    let mut linear = Linear::new(3, 1, true)?;\n    let mse_loss = MSE::new();\n    let mut optimizer = SGD::new(0.01);\n    let epochs = 1000;\n\n    let mut hundred_epochs_start = Instant::now();\n\n    for epoch in 0..epochs {\n        let pred = linear.forward(\u0026input)?;\n        let loss = mse_loss.forward((\u0026pred, \u0026target))?;\n        loss.backward()?;\n\n        optimizer.step(\u0026mut linear.parameters())?;\n        optimizer.zero_grad(\u0026mut linear.parameters())?;\n\n        if (epoch + 1) % 100 == 0 {\n            let hundred_elapsed = hundred_epochs_start.elapsed();\n            let params = linear.parameters();\n            println!(\n                \"Epoch {}: Loss = {}, 100 Epochs Time = {:?}, Weight = {}, Bias = {}\",\n                epoch + 1,\n                loss,\n                hundred_elapsed,\n                params[0],\n                params.get(1).unwrap()\n            );\n            hundred_epochs_start = Instant::now();\n        }\n    }\n\n    Ok(())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminiex%2Fmaidenx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminiex%2Fmaidenx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminiex%2Fmaidenx/lists"}