Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install Toolchain
run: rustup update stable && rustup default stable
- uses: taiki-e/install-action@sccache
- uses: taiki-e/install-action@nextest

- name: Run Tests
Expand All @@ -29,9 +28,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Toolchain
run: |
rustup update stable && rustup default stable
rustup component add clippy rustfmt
- uses: taiki-e/install-action@sccache
- name: Format
run: cargo fmt --check
- name: Clippy
Expand Down
17 changes: 2 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 28 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
[workspace]
resolver = "2"
members = ["crates/*"]
resolver = "3"
members = ["legacy/*"]

[workspace.package]
version = "0.0.9"
edition = "2024"
authors = ["clearloop <[email protected]>"]
license = "MIT"
repository = "https://github.com/clearloop/cydonia"

[workspace.dependencies]
ccore = { path = "crates/core", package = "cydonia-core" }
model = { path = "legacy/model", package = "cydonia-model" }
candle = { path = "crates/candle", package = "cydonia-candle" }

# crates.io
anyhow = "1"
async-stream = "0.3"
bytes = "1.11.0"
clap = { version = "4.5", features = ["derive"] }
derive_more = { version = "2.1", features = ["display", "try_from"] }
dirs = "6"
futures-core = "0.3"
futures-util = "0.3"
reqwest = { version = "0.12", features = ["json", "stream"] }
schemars = "1.1.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
toml = "0.9.8"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# legacy dependencies
candle-core = "0.8.1"
candle-nn = "0.8.1"
candle-transformers = "0.8.1"
clap = "4.5.23"
dirs = "5.0.1"
hf-hub = "0.4.1"
llamac-sys = { version = "0.1.86", package = "llama-cpp-sys-2" }
once_cell = "1.20.2"
once_cell = "1.21"
rand = "0.8.5"
serde = "1.0.217"
serde_json = "1.0.134"
tokenizers = "0.21.0"
toml = "0.8.19"
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
# Cydonia

Cydonia is a library based on [candle][candle] for developing modern AI applications in rust.

```rust
use cydonia::Model;

fn main() {
let model = Model::new("gemma2").tag("latest");
let response = model.invoke("Hello, world!");
println!("{}", response);
}
```

We support quantized models only derived from `gemma` and `llama` family.

## TODOs

- [x] Support chat interface ( history prompts )
- [ ] Function encoder for llama3 tools (static)
- [ ] Cydonia as service
- [ ] RPC support for llama3 tools (remote)
- [ ] GraphQL support for llama3 tools (remote)
- [ ] RAG support
- [ ] Agent interface
- [ ] Multi-agent support (single-node)
- [ ] An application based on the tools
- [ ] p2p for the decentralized cydonia network (multi-node)
- [ ] Test gpu

<!-- links -->

[candle]: https://github.com/huggingface/candle
The Agent framework.
10 changes: 0 additions & 10 deletions crates/model/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/model/src/lib.rs

This file was deleted.

6 changes: 0 additions & 6 deletions crates/registry/Cargo.toml

This file was deleted.

29 changes: 0 additions & 29 deletions crates/registry/models.toml

This file was deleted.

3 changes: 0 additions & 3 deletions crates/registry/src/main.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/candle/Cargo.toml → legacy/candle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ anyhow.workspace = true
candle-core.workspace = true
candle-nn.workspace = true
candle-transformers.workspace = true
ccore.workspace = true
model.workspace = true
hf-hub.workspace = true
rand.workspace = true
serde.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ccore::{Message, Release};
use cydonia_candle::{Llama, ProcessorConfig};
use model::{Message, Release};
use std::io::Write;

fn main() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use anyhow::Result;
use candle_core::{quantized::gguf_file::Content, Device, Tensor};
use candle_transformers::models::quantized_llama;
use ccore::{chat, Message};
use model::{chat, Message};
use std::fs::File;

/// The inference interface for language models
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use crate::{Inference, Tokenizer};
use anyhow::Result;
use candle_core::Device;
use ccore::{Release, TOKENIZER};
use hf_hub::api::sync::Api;
use model::{Release, TOKENIZER};
use std::fs::File;

/// Huggingface model loader
Expand Down
2 changes: 1 addition & 1 deletion crates/candle/src/model.rs → legacy/candle/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::{Inference, Loader, Processor, ProcessorConfig, TokenStream, Tokenizer};
use anyhow::Result;
use ccore::{Message, Release};
use model::{Message, Release};

/// Language Model interface
pub struct Model<I: Inference> {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml → legacy/model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cydonia-core"
name = "cydonia-model"
version = "0.0.0"
edition = "2021"

Expand Down
1 change: 1 addition & 0 deletions legacy/model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This crate is currently outdated.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.