Skip to content

rafaelkamimura/deepseek-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust_deepseek_test

A simple Rust-based harness for loading and running text-generation models using the rust-bert and tch (PyTorch) libraries.

Prerequisites

Setup & Build

# Clone this repository
git clone <repository-url>
cd rust_deepseek_test

# Build in release mode
cargo build --release

Usage

Run the predefined sample prompts and log responses plus inference timings:

cargo run --release

Configuration

  • Model: Edit src/model_loader.rs to change model_name or adjust TextGenerationConfig (e.g., max_length, temperature, etc.)
  • Prompts: Modify the test_inputs vector in src/main.rs to add or change test questions.

Project Structure

├── Cargo.toml         # Project & dependency definitions
├── codex.md           # Detailed codex/context for the codebase
├── README.md          # Overview and getting started
├── src
│   ├── main.rs             # Entry point and benchmarking harness
│   ├── model_loader.rs     # Model initialization logic
│   ├── text_generator.rs   # Text generation wrapper
│   ├── disk_offloader.rs   # Utilities to read binary shards from disk
│   └── utils.rs            # Logging helpers
└── target                 # Build artifacts (generated)

Extending

  • Integrate disk_offloader to manually stream model weights from custom locations.
  • Add CLI options (e.g., prompt input, model parameters) in main.rs.
  • Enhance error handling or retry logic using anyhow and the helpers in src/utils.rs.

For more in-depth context on module responsibilities and design, see codex.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors