Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
selimseker committed Sep 2, 2024
2 parents 583c214 + 7ab68fd commit 29b11e4
Show file tree
Hide file tree
Showing 15 changed files with 518 additions and 403 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DKN_WALLET_SECRET_KEY=
# You don't need to change this, simply copy and paste it.
DKN_ADMIN_PUBLIC_KEY=0208ef5e65a9c656a6f92fb2c770d5d5e2ecffe02a6aade19207f75110be6ae658
# model1,model2,model3,... (comma separated, case-insensitive)
# example: phi3:3.8b,gpt-4o-mini
DKN_MODELS=

## DRIA (optional) ##
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dkn-compute"
version = "0.1.6"
version = "0.1.7"
edition = "2021"
license = "Apache-2.0"
readme = "README.md"
Expand All @@ -11,6 +11,7 @@ inherits = "release"
debug = true

[features]
# used by flamegraphs & instruments
profiling = []

[dependencies]
Expand Down Expand Up @@ -45,7 +46,7 @@ sha3 = "0.10.8"
fastbloom-rs = "0.5.9"

# workflows
ollama-workflows = { git = "https://github.com/andthattoo/ollama-workflows", rev = "d6b2e1e" }
ollama-workflows = { git = "https://github.com/andthattoo/ollama-workflows", rev = "ba038f7" }

# peer-to-peer
libp2p = { git = "https://github.com/anilaltuner/rust-libp2p.git", rev = "3c55e95", features = [
Expand Down
27 changes: 11 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ ifneq (,$(wildcard ./.env))
endif

###############################################################################
.PHONY: launch # | Run with INFO log-level in release mode
.PHONY: launch # | Run with INFO logs in release mode
launch:
RUST_LOG=warn,dkn_compute=info cargo run --release
RUST_LOG=none,dkn_compute=info cargo run --release

.PHONY: run # | Run with INFO log-level
.PHONY: run # | Run with INFO logs
run:
RUST_LOG=none,dkn_compute=info cargo run

.PHONY: debug # | Run with DEBUG log-level with INFO log-level workflows
.PHONY: debug # | Run with DEBUG logs with INFO log-level workflows
debug:
RUST_LOG=warn,dkn_compute=debug,ollama_workflows=info cargo run

.PHONY: trace # | Run with crate-level TRACE logging
.PHONY: trace # | Run with TRACE logs
trace:
RUST_LOG=none,dkn_compute=trace,libp2p=debug cargo run
RUST_LOG=warn,dkn_compute=trace,libp2p=debug cargo run

.PHONY: build # | Build
build:
cargo build

.PHONY: profile-cpu # | Profile CPU usage with flamegraph
.PHONY: profile-cpu # | Profile CPU usage with flamegraph
profile-cpu:
cargo flamegraph --root --profile=profiling --features=profiling

.PHONY: profile-mem # | Profile memory usage with instruments
.PHONY: profile-mem # | Profile memory usage with instruments
profile-mem:
cargo instruments --profile=profiling --features=profiling -t Leaks
cargo instruments --profile=profiling --features=profiling -t Allocations

.PHONY: version # | Print version
version:
Expand All @@ -42,17 +42,12 @@ version:
test:
cargo test

###############################################################################
.PHONY: prompt # | Run a single prompt on a model
prompt:
cargo run --example prompt

###############################################################################
.PHONY: lint # | Run clippy
.PHONY: lint # | Run linter (clippy)
lint:
cargo clippy

.PHONY: format # | Run formatter
.PHONY: format # | Run formatter (cargo fmt)
format:
cargo fmt -v

Expand Down
Loading

0 comments on commit 29b11e4

Please sign in to comment.