Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
//! `LLaMA` Architecture - Main Module
|
||||
//!
|
||||
//! Re-exports from split modules for backward compatibility
|
||||
|
||||
// Re-export from attention module
|
||||
pub use crate::architectures::llama_attention::{
|
||||
LLaMAAttention, LLaMAConfig, RopeScaling, RotaryPositionEmbedding, SwiGLU,
|
||||
};
|
||||
|
||||
// Re-export from model module (commented out until llama_model is implemented)
|
||||
// pub use crate::architectures::llama_model::{
|
||||
// LLaMAModel, LLaMABlock
|
||||
// };
|
||||
|
||||
// Re-export tests for backward compatibility
|
||||
#[cfg(all(test, feature = "disabled_tests"))]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::architectures::llama_attention::LLaMAModel;
|
||||
use rtx_tensor::Device;
|
||||
|
||||
#[test]
|
||||
fn test_llama_integration() {
|
||||
let config = LLaMAConfig::llama_7b();
|
||||
let device = Device::cuda(0).unwrap_or(Device::default());
|
||||
|
||||
// Test complete integration
|
||||
let model = LLaMAModel::new(config, &device);
|
||||
assert!(model.is_ok());
|
||||
|
||||
let model = model.unwrap();
|
||||
assert_eq!(model.architecture_type(), "LLaMA");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user