[package]
edition = "2021"
name = "trustformers"
version = "0.2.0"
authors = ["COOLJAPAN OU (Team KitaSan) <contact@cooljapan.tech>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "TrustformeRS - Rust port of Hugging Face Transformers"
homepage = "https://github.com/cool-japan/trustformers"
documentation = "https://docs.rs/trustformers"
readme = "README.md"
keywords = [
"transformers",
"machine-learning",
"nlp",
"ai",
"bert",
]
categories = [
"science",
"algorithms",
]
license = "Apache-2.0"
repository = "https://github.com/cool-japan/trustformers"
[features]
albert = ["trustformers-models/albert"]
all-models = [
"bert",
"roberta",
"albert",
"gpt2",
"gpt_neo",
"gpt_j",
"t5",
]
async = [
"axum",
"tower",
"tower-http",
"async-stream",
]
audio = []
bert = ["trustformers-models/bert"]
candle = [
"trustformers-core/candle",
"trustformers-training/candle",
]
cuda = ["trustformers-models/cuda"]
default = [
"bert",
"async",
]
full = [
"all-models",
"candle",
"async",
"vision",
"hub",
"trustformers-core/full",
]
gpt2 = ["trustformers-models/gpt2"]
gpt_j = ["trustformers-models/gpt_j"]
gpt_neo = ["trustformers-models/gpt_neo"]
hub = ["dep:reqwest"]
roberta = ["trustformers-models/roberta"]
t5 = ["trustformers-models/t5"]
vision = ["image"]
[lib]
name = "trustformers"
path = "src/lib.rs"
[[example]]
name = "adaptive_inference_demo"
path = "examples/adaptive_inference_demo.rs"
[[example]]
name = "advanced_composition"
path = "examples/advanced_composition.rs"
[[example]]
name = "basic_pipeline"
path = "examples/basic_pipeline.rs"
[[example]]
name = "custom_backend_examples"
path = "examples/custom_backend_examples.rs"
required-features = ["hub"]
[[example]]
name = "dynamic_batching"
path = "examples/dynamic_batching.rs"
[[example]]
name = "ensemble_models"
path = "examples/ensemble_models.rs"
[[example]]
name = "interactive_cli"
path = "examples/interactive_cli.rs"
[[example]]
name = "jit_optimization"
path = "examples/jit_optimization.rs"
[[example]]
name = "realtime_streaming"
path = "examples/realtime_streaming.rs"
[[example]]
name = "tensorrt_demo"
path = "examples/tensorrt_demo.rs"
[[example]]
name = "web_demo"
path = "examples/web_demo.rs"
[[test]]
name = "compatibility_tests"
path = "tests/compatibility_tests.rs"
[[test]]
name = "fuzz_tests"
path = "tests/fuzz_tests.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "metrics_bridge"
path = "tests/metrics_bridge.rs"
[[test]]
name = "performance_benchmarks"
path = "tests/performance_benchmarks.rs"
[[test]]
name = "pipeline_e2e_tests"
path = "tests/pipeline_e2e_tests.rs"
[[test]]
name = "stress_tests"
path = "tests/stress_tests.rs"
[[test]]
name = "trainer_auto_metric"
path = "tests/trainer_auto_metric.rs"
[dependencies.anyhow]
version = "1.0.103"
[dependencies.async-stream]
version = "0.3"
optional = true
[dependencies.async-trait]
version = "0.1"
[dependencies.axum]
version = "0.8.9"
features = [
"ws",
"macros",
]
optional = true
[dependencies.bytes]
version = "1.12.0"
[dependencies.chrono]
version = "0.4"
features = ["serde"]
[dependencies.clap]
version = "4.6"
features = ["derive"]
[dependencies.colored]
version = "3.1"
[dependencies.dirs]
version = "6.0.0"
[dependencies.fastrand]
version = "2.4.1"
[dependencies.futures]
version = "0.3.32"
[dependencies.hex]
version = "0.4.3"
[dependencies.image]
version = "0.25.10"
optional = true
[dependencies.indicatif]
version = "0.18.6"
[dependencies.lazy_static]
version = "1.5.0"
[dependencies.log]
version = "0.4.33"
[dependencies.num_cpus]
version = "1.17"
[dependencies.oxiarc-archive]
version = "0.3.5"
[dependencies.oxiarc-deflate]
version = "0.3.5"
[dependencies.regex]
version = "1.12.4"
[dependencies.reqwest]
version = "0.13.4"
features = [
"json",
"stream",
"blocking",
"form",
"query",
]
optional = true
[dependencies.serde]
version = "1.0.228"
features = ["derive"]
[dependencies.serde_json]
version = "1.0.150"
[dependencies.serde_yaml]
version = "0.9.34"
[dependencies.sha2]
version = "0.11.0"
[dependencies.thiserror]
version = "2.0.18"
[dependencies.tokio]
version = "1.52.3"
features = ["full"]
[dependencies.tokio-stream]
version = "0.1"
features = ["sync"]
[dependencies.tower]
version = "0.5"
optional = true
[dependencies.tower-http]
version = "0.7"
features = [
"cors",
"trace",
"fs",
]
optional = true
[dependencies.tracing]
version = "0.1.44"
[dependencies.trustformers-core]
version = "0.2.0"
default-features = false
[dependencies.trustformers-models]
version = "0.2.0"
default-features = false
[dependencies.trustformers-optim]
version = "0.2.0"
default-features = false
[dependencies.trustformers-tokenizers]
version = "0.2.0"
default-features = false
[dependencies.trustformers-training]
version = "0.2.0"
default-features = false
[dependencies.url]
version = "2.5"
[dependencies.uuid]
version = "1.23.4"
features = [
"v4",
"serde",
]
[dev-dependencies.proptest]
version = "1.11"
[dev-dependencies.rstest]
version = "0.26"
[dev-dependencies.scirs2-core]
version = "0.6.0"
features = [
"array",
"simd",
"parallel",
"linalg",
"memory_efficient",
"array_protocol",
"random",
"serialization",
]
default-features = false
[dev-dependencies.tempfile]
version = "3.27"
[dev-dependencies.tokio]
version = "1.52.3"
features = [
"full",
"macros",
"rt-multi-thread",
]
[lints.clippy]
all = "warn"
[lints.rust]
dead_code = "warn"
deprecated = "warn"
unused_assignments = "warn"
unused_imports = "warn"
unused_mut = "warn"
unused_variables = "warn"