Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrtForge.AI (Active work in progress!)

License: MIT

OrtForge.AI is a comprehensive .NET library suite for building advanced Retrieval Augmented Generation (RAG) applications with fully local hosting capabilities. It leverages ONNX Runtime to provide efficient, cross-platform AI model deployment without cloud dependencies.

🌟 Features

  • Fully Local AI Processing: Run LLMs (TODO), embedding models, and rerankers entirely on your own infrastructure
  • High-Performance Inference: Optimized execution through ONNX Runtime integration
  • Cross-Platform Support: Works across Windows, Linux, and macOS environments (TBD on acceleration technics)
  • Advanced RAG Capabilities: Build sophisticated document retrieval and generation workflows
  • Modular Architecture: Mix and match components to suit your specific use case
  • Production-Ready: Designed for reliability and performance in real-world applications

📋 Components

OrtForge.AI consists of several specialized libraries:

  • OrtForge.AI.Core: Core abstractions and utilities for the entire framework
  • OrtForge.AI.Models: Implementation of various AI models including embedding generators and rerankers
  • OrtForge.AI.LLM: Integration with large language models for text generation
  • OrtForge.AI.Rag: Building blocks for implementing RAG pipelines
  • OrtForge.PgSql: PostgreSQL query generator library to enable vector search

🚀 Getting Started

Prerequisites

  • .NET 8.0 SDK or later
  • Sufficient CPU/GPU resources for running inference (requirements vary by model)

Installation

#TBD

Basic Usage

// Initialize an embedding model
var embeddingModel = new BgeM3Model("path/to/tokenizer.bpe.model", "path/to/model.onnx");

// Generate embeddings for text
var embeddings = await embeddingModel.CreateEmbeddingAsync("Your text here");

// Generate embeddings for multiple texts
var batchEmbeddings = await embeddingModel.CreateEmbeddingsAsync(new[] { "First text", "Second text" });

// Initialize a reranker
var reranker = new BgeRerankerM3("path/to/tokenizer.bpe.model", "path/to/reranker.onnx");

// Get reranking score between query and document
float score = await reranker.GetRerankingScoreAsync("query", "document");

// Initialize and use LLM (implementation may vary)
var llmOptions = new LlmOptions { ModelPath = "path/to/llm.onnx" };
var llm = new LlmService(llmOptions);
var response = await llm.GenerateResponseAsync("Your prompt here");

📖 Documentation

Comprehensive documentation is available in the /docs directory and includes:

  • Detailed API references
  • Architecture overview
  • Performance optimization guides
  • Example applications and use cases

🔍 Examples

The /examples directory contains complete sample applications demonstrating:

  • Document indexing and retrieval
  • Question-answering systems
  • Custom RAG pipeline construction
  • Performance benchmarking

🛠️ Building from Source

# Clone the repository
git clone https://github.com/yourusername/OrtForge.AI.git
cd OrtForge.AI

# Build the solution
dotnet build

# Run tests
dotnet test

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📊 Benchmarks

Performance benchmarks for various models and configurations can be found in the /benchmarks directory.

🔗 Related Projects

About

.NET stack to construct advanced RAG based on ONNX runtime

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.