The Future of AI-Native Data Storage
Tensorus is a specialized database designed for AI and machine learning applications. While traditional databases store simple data types and vector databases store flat arrays, Tensorus can store and process multi-dimensional arrays called tensors.
Native Tensor Support
Store and query multi-dimensional tensor data without flattening or loss of structure
GPU Acceleration
Hardware-accelerated tensor operations for real-time processing and analysis
Self-Optimizing
Uses AI to improve its performance and adapt to your specific data patterns
ML Integration
Seamless integration with popular deep learning frameworks and workflows
Comprehensive Feature Set
Tensorus provides a rich set of features designed specifically for AI and machine learning workflows
Native Tensor Support
Store and query multi-dimensional tensor data without flattening or loss of structure
Advanced Indexing
Fast similarity search optimized for high-dimensional tensor data using FAISS
GPU Acceleration
Hardware-accelerated tensor operations for real-time processing and analysis
Seamless AI/ML Integration
Direct compatibility with popular deep learning frameworks like PyTorch and TensorFlow
Comprehensive API
RESTful interface for easy integration with various applications and services
Scalable Architecture
Built for distributed environments and high-throughput workloads
System Architecture & Flow
Visual representation of how Tensorus processes requests and delivers results
Tensorus Architecture Overview
Client Applications
- Web UI
- Python SDK
- REST API Clients
API Layer
- REST Endpoints
- Authentication
- Request Validation
Core Services
- Tensor Storage
- Indexing
- Query Processing
Agent System
- Learning
- Optimization
- Suggestions
Infrastructure
- Storage
- Compute
- GPU Acceleration
- Distributed Processing
API Reference
Comprehensive documentation of Tensorus API endpoints for seamless integration
Store a tensor in the database
Request Example
{ "tensor": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], "metadata": { "name": "example_tensor", "description": "A 2x3 matrix example", "created_by": "user" } }
Response Example
{ "tensor_id": "tensor_20240301_123456_789", "status": "success", "shape": [ 2, 3 ] }
Retrieve a tensor by its ID
Parameters
- tensor_id (string): Unique identifier of the tensor
Response Example
{ "tensor": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], "metadata": { "name": "example_tensor", "description": "A 2x3 matrix example", "created_by": "user" }, "shape": [ 2, 3 ], "dtype": "float32" }
Find similar tensors using vector similarity search
Request Example
{ "query_tensor": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], "k": 5, "metric": "cosine" }
Response Example
{ "results": [ { "tensor_id": "tensor_20240301_123456_789", "similarity": 0.98 }, { "tensor_id": "tensor_20240301_123456_790", "similarity": 0.85 }, { "tensor_id": "tensor_20240301_123456_791", "similarity": 0.72 } ] }
Perform tensor operations
Request Example
{ "operation": "normalize", "tensor_id": "tensor_20240301_123456_789", "parameters": { "axis": 0 } }
Response Example
{ "result_tensor_id": "tensor_20240301_123456_800", "operation": "normalize", "status": "success" }
Get database performance metrics
Response Example
{ "total_tensors": 1250, "storage_used": "2.3 GB", "avg_query_time": "45ms", "active_connections": 8, "uptime": "3d 12h 45m" }
Intelligent Agent Interaction
Experience how Tensorus agents provide intelligent assistance and automate complex tasks
Intelligent Suggestions
Provides context-aware recommendations based on your data and usage patterns
Automated Code Generation
Creates optimized code snippets for common tensor operations and queries
Real-time Feedback
Offers immediate insights and optimization suggestions as you work
Performance Optimization
Continuously monitors and improves database performance based on usage patterns
Self-Learning
Evolves and improves over time based on interactions and feedback
Enter a description of your data or task, and the agent will provide intelligent suggestions.
Code Examples
See how easy it is to work with Tensorus in your applications
Basic Tensor Operations
import numpy as np from tensor_database import TensorDatabase # Initialize the database db = TensorDatabase( storage_path="my_first_db.h5", # Where to store the data use_gpu=False # Start without GPU for simplicity ) # Create a simple tensor (2D matrix) data = np.array([ [1.0, 2.0, 3.0], [4.0, 5.0, 6.0] ]) # Add some helpful information about the tensor metadata = { "name": "first_matrix", "description": "A 2x3 matrix example", "created_by": "tutorial" } # Save the tensor to the database tensor_id = db.save(data, metadata) print(f"Saved tensor with ID: {tensor_id}") # Retrieve the tensor retrieved_tensor, meta = db.get(tensor_id) print("Retrieved tensor shape:", retrieved_tensor.shape) print("Metadata:", meta) # Search for similar tensors similar_tensors = db.search_similar( query_tensor=retrieved_tensor, k=5 # Find 5 most similar tensors )
Getting Started
Follow these steps to start using Tensorus in your projects
Install Tensorus using pip, the Python package manager:
pip install tensorus
For GPU support, install the CUDA version:
pip install tensorus[gpu]
- Python 3.8 or newer
- NumPy and PyTorch
- HDF5 for storage
- FAISS for similarity search
- CUDA 11.0+ (optional, for GPU support)
Create your first Tensorus database:
import numpy as np from tensorus import TensorDatabase # Initialize database db = TensorDatabase("my_db.h5") # Save a tensor tensor = np.random.randn(10, 10) tensor_id = db.save(tensor, {"name": "test"}) # Retrieve the tensor result, metadata = db.get(tensor_id) print(result.shape) # (10, 10)
Deploy Tensorus as a service:
# server.py from flask import Flask, request, jsonify from tensorus import TensorDatabase app = Flask(__name__) db = TensorDatabase("tensors.h5") @app.route("/tensor/<tensor_id>", methods=["GET"]) def get_tensor(tensor_id): tensor, metadata = db.get(tensor_id) return jsonify({ "shape": tensor.shape, "metadata": metadata }) if __name__ == "__main__": app.run(host="0.0.0.0", port=8000)