A Rust-based console application that demonstrates loading and using language models with the Candle crate. The application is designed to work with Gemma 3 270M but currently demonstrates the framework with a basic tokenizer.
β οΈ Important Note: This is currently a demonstration application that shows the framework structure. The full Gemma 3 270M model loading requires:
cargo build
Run the application:
cargo run
The application will attempt to load a tokenizer and model configuration
Type your questions and press Enter
Type quit or exit to close the application
π Initializing Language Model Question-Answer System
Loading model (this may take a moment on first run)...
Loading language model...
Attempting to load tokenizer from: distilbert-base-uncased
β οΈ Failed to load tokenizer from distilbert-base-uncased: request error: status code 401
Creating a basic tokenizer instead...
β
Model configuration loaded successfully!
π Note: This is a demonstration with model configuration only.
π To load actual Gemma weights, you need Hugging Face authentication.
π‘ The system can still tokenize and process text input.
β
System ready! Type your questions below (type 'quit' to exit)
==================================================
π€ Question: How old are you?
π€ Processing input...
π‘ Answer: β
Input processed successfully! π Found 0 tokens...
π€ Question: quit
π Goodbye!
To make this a fully functional Gemma 3 270M application:
Authentication Setup:
# Set Hugging Face token
export HF_TOKEN="your_token_here"
Model Loading: Implement proper weight downloading from Hugging Face
Tokenizer: Load the correct Gemma tokenizer
Inference: Implement the full text generation pipeline
candle-core: Core tensor operationscandle-transformers: Transformer model implementationscandle-nn: Neural network utilitiestokenizers: Hugging Face tokenization (with http feature)anyhow: Error handlingtokio: Async runtimeThis is a demonstration project. To contribute to making it fully functional:
17 commits
Rust
94.4%
Shell
5.6%
A Rust-based console application that demonstrates loading and using language models with the Candle crate. The application is designed to work with Gemma 3 270M but currently demonstrates the framework with a basic tokenizer.
β οΈ Important Note: This is currently a demonstration application that shows the framework structure. The full Gemma 3 270M model loading requires:
cargo build
Run the application:
cargo run
The application will attempt to load a tokenizer and model configuration
Type your questions and press Enter
Type quit or exit to close the application
π Initializing Language Model Question-Answer System
Loading model (this may take a moment on first run)...
Loading language model...
Attempting to load tokenizer from: distilbert-base-uncased
β οΈ Failed to load tokenizer from distilbert-base-uncased: request error: status code 401
Creating a basic tokenizer instead...
β
Model configuration loaded successfully!
π Note: This is a demonstration with model configuration only.
π To load actual Gemma weights, you need Hugging Face authentication.
π‘ The system can still tokenize and process text input.
β
System ready! Type your questions below (type 'quit' to exit)
==================================================
π€ Question: How old are you?
π€ Processing input...
π‘ Answer: β
Input processed successfully! π Found 0 tokens...
π€ Question: quit
π Goodbye!
To make this a fully functional Gemma 3 270M application:
Authentication Setup:
# Set Hugging Face token
export HF_TOKEN="your_token_here"
Model Loading: Implement proper weight downloading from Hugging Face
Tokenizer: Load the correct Gemma tokenizer
Inference: Implement the full text generation pipeline
candle-core: Core tensor operationscandle-transformers: Transformer model implementationscandle-nn: Neural network utilitiestokenizers: Hugging Face tokenization (with http feature)anyhow: Error handlingtokio: Async runtimeThis is a demonstration project. To contribute to making it fully functional:
17 commits
Rust
94.4%
Shell
5.6%