Skip to content

v0.0.2 - One-Line Model Loading Across All Platforms

Choose a tag to compare

@openfluke-dev openfluke-dev released this 07 Nov 03:04
· 603 commits to main since this release

🎯 Major Feature: Simplified Model Loading

Load complete neural networks with ONE function call - no more manual layer configuration!

What's New

πŸ”₯ One-Line Model Loading API

Previously, you had to manually configure each layer. Now, just load the JSON:

Python (v0.0.4):

import welvet
network = welvet.load_model_from_string(model_json, "my_model")

JavaScript/WASM (v0.1.2):

import { initLoom } from "@openfluke/welvet";
const loom = await initLoom();
const network = loom.LoadModelFromString(modelJSON, "my_model");

Go:

network, _ := nn.LoadModelFromString(modelJSON, "my_model")

✨ That's it! All layers, weights, biases, and configurations automatically restored.

Cross-Platform Testing

New all_layers_validation.go demo generates a 26.4KB test model with 16 layers (Dense, Conv2D, Multi-Head Attention, RNN, LSTM) that loads identically across all three platforms:

# Generate test model
cd examples && go run all_layers_validation.go

# Test Python
cd ../python/examples && python3 all_layers_test.py

# Test WASM
# Open: http://localhost:3123/wasm/all_layers_test.html

All three platforms verify:

  • βœ… All 16 layers loaded automatically
  • βœ… Weights/biases restored correctly
  • βœ… Outputs match within floating-point precision
  • βœ… Training works (weight mutation verified)

API Changes

Python (welvet v0.0.4)

  • New: load_model_from_string(json_str, model_id) - Load complete model
  • New: save_model_to_string(handle, model_id) - Serialize to JSON string
  • Updated C-ABI bindings for Loom_LoadModel and Loom_SaveModel

TypeScript/WASM (@openfluke/welvet v0.1.2)

  • Updated WASM binary (5.4MB) with enhanced model loading
  • LoadModelFromString() fully tested with cross-platform validation
  • New demo: wasm/all_layers_test.html

Go (nn package)

  • Enhanced LoadModelFromString() and SaveModelToString()
  • Full serialization support for all 5 layer types
  • Cross-platform model format (JSON + base64 weights)

Documentation Updates

Comprehensive documentation added to all READMEs:

  • πŸ“˜ Main LOOM README - Model Serialization section
  • πŸ“˜ Examples README - Cross-platform testing guide
  • πŸ“˜ Python README - Quick Start with new API
  • πŸ“˜ WASM README - LoadModelFromString examples
  • πŸ“˜ nn README - Serialization API and cross-platform demo
  • πŸ“˜ TypeScript README - "The Easy Way" guide

Updated Binaries

  • C-ABI Libraries: libloom.so (Linux), libloom.dylib (macOS), libloom.dll (Windows), Android ARM64
  • WASM Binary: loom.wasm (5.4MB) with full model loading support

Package Releases

Installation

# Python
pip install --upgrade welvet

# JavaScript/TypeScript
npm install @openfluke/welvet@latest

Full Changelog: v0.0.1...v0.0.2