Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleaning up code
  • Loading branch information
Pringled committed Mar 13, 2026
commit 31859f8c40c4372497d95cef9a78f6dc8ec6820e
12 changes: 6 additions & 6 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct ResolvedPaths {
layout: ModelLayout,
}

struct Layout {
struct LayoutSpec {
config_file: &'static str,
tokenizer_file: &'static str,
model_file: &'static str,
Expand All @@ -45,9 +45,9 @@ struct Layout {
layout: ModelLayout,
}

static LAYOUTS: &[Layout] = &[
static LAYOUTS: &[LayoutSpec] = &[
// 1. Native model2vec
Layout {
LayoutSpec {
config_file: "config.json",
tokenizer_file: "tokenizer.json",
model_file: "model.safetensors",
Expand All @@ -56,7 +56,7 @@ static LAYOUTS: &[Layout] = &[
layout: ModelLayout::Native,
},
// 2. Sentence Transformers root layout
Layout {
LayoutSpec {
config_file: "config_sentence_transformers.json",
tokenizer_file: "tokenizer.json",
model_file: "model.safetensors",
Expand All @@ -65,7 +65,7 @@ static LAYOUTS: &[Layout] = &[
layout: ModelLayout::SentenceTransformers,
},
// 3. Sentence Transformers 0_StaticEmbedding subfolder
Layout {
LayoutSpec {
config_file: "config_sentence_transformers.json",
tokenizer_file: "0_StaticEmbedding/tokenizer.json",
model_file: "0_StaticEmbedding/model.safetensors",
Expand All @@ -74,7 +74,7 @@ static LAYOUTS: &[Layout] = &[
layout: ModelLayout::SentenceTransformers,
},
// 4. Config-in-parent (caller passed subfolder pointing directly at model files)
Layout {
LayoutSpec {
config_file: "config_sentence_transformers.json",
tokenizer_file: "tokenizer.json",
model_file: "model.safetensors",
Expand Down