Zing Forum

Reading

Velum: A Python Library Unifying Classical Machine Learning and Deep Learning

Velum is a unified machine learning library built on PyTorch and scikit-learn. It integrates 19 classical models and deep learning architectures through a consistent fit/predict/score interface, and provides a FastAPI backend and chat interface, with the goal of building a no-code machine learning platform.

机器学习深度学习PythonPyTorchscikit-learn统一APIFastAPI无代码平台开源工具
Published 2026-05-28 05:15Recent activity 2026-05-28 05:18Estimated read 8 min
Velum: A Python Library Unifying Classical Machine Learning and Deep Learning
1

Section 01

Introduction / Main Post: Velum: A Python Library Unifying Classical Machine Learning and Deep Learning

Velum is a unified machine learning library built on PyTorch and scikit-learn. It integrates 19 classical models and deep learning architectures through a consistent fit/predict/score interface, and provides a FastAPI backend and chat interface, with the goal of building a no-code machine learning platform.

2

Section 02

Original Author and Source


3

Section 03

Project Overview

Velum is an ambitious open-source machine learning library whose core mission is to solve a common pain point faced by ML developers in their daily work: frequent context switching between different frameworks. In the current ML ecosystem, scikit-learn provides classical algorithms while PyTorch dominates deep learning, but their API styles are vastly different, forcing developers to constantly adapt to different calling methods across projects. Velum builds a unified abstraction layer, allowing developers to use various models from linear regression to Transformers with almost the same code pattern.

This project is not just a tool wrapper; it reflects the author's in-depth thinking on ML engineering. Velum's design philosophy is to let developers focus on data and business logic instead of getting bogged down in framework details. This unified interface design concept has important practical value in the ML toolchain.


4

Section 04

Core Architecture and Technical Implementation

Velum adopts a three-layer architecture design, which reflects a complete technical stack plan from underlying algorithms to user interaction:

5

Section 05

Core Library Layer (velum/)

The core library implements 19 models covering both classical machine learning and deep learning domains. All models follow a unified fit/predict/score interface contract, meaning you can replace a Random Forest with a Multilayer Perceptron (MLP), or a CNN with a Transformer, without modifying your code logic.

Classical Machine Learning Models (based on scikit-learn backend):

Velum encapsulates the most commonly used classical algorithms, including regression models like Linear Regression, Ridge Regression, Lasso Regression, and Elastic Net; classification models like Logistic Regression, Decision Tree, Random Forest, Gradient Boosting, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Naive Bayes; as well as unsupervised learning methods like K-Means Clustering and PCA dimensionality reduction. These model encapsulations retain the full functionality of scikit-learn while providing a more concise calling method.

Deep Learning Models (based on PyTorch backend):

The deep learning section includes Multilayer Perceptron (MLP), AutoEncoder, Long Short-Term Memory (LSTM), Convolutional Neural Network (CNN), standard Transformer, and Tabular Transformer specifically for tabular data. These models fully leverage PyTorch's automatic differentiation and GPU acceleration capabilities, while hiding the complexity of training loops and hyperparameter configuration details.

6

Section 06

REST API Layer (api/)

The FastAPI backend exposes the core library as HTTP interfaces, supporting functions like dataset management, model training, prediction, and chat interaction. The API design follows RESTful principles and provides the following core endpoints:

  • Dataset Management: Supports CSV file upload, dataset list query, and deletion
  • Training Tasks: Supports asynchronous training task submission, progress streaming, and status polling
  • Model Management: Query of trained model lists, viewing of available model types and hyperparameters, and model deletion
  • Prediction Service: Inference on new data using trained models
  • Chat Interface: Natural language interaction entry with session management support
7

Section 07

Frontend Layer (Under Development)

The React frontend plans to provide a fully no-code machine learning workflow, allowing users to complete data upload, model configuration, training, and prediction via a graphical interface without writing any Python code.


8

Section 08

Innovative Highlight: Chat-based Interaction

Velum's most distinctive feature is its built-in chat interface, which implements function calling capabilities based on the Google Gemini 2.5 Flash model. Users can interact with the system using natural language, such as:

  • "Show all datasets I uploaded"
  • "Train a classification model on the iris dataset using Random Forest"
  • "Check training progress"

The chat system converts users' natural language intentions into underlying API calls, and each session state is persisted to support conversation recovery across restarts. This interaction mode significantly lowers the barrier to using machine learning, allowing non-technical users to leverage powerful model capabilities as well.