Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 17 additions & 0 deletions brainscore_language/models/test_embedding_3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Test model for workflow testing.

This is a minimal, fast-running model designed for testing the plugin submission workflow.
It uses distilgpt2 from HuggingFace, similar to the gpt models.
"""
from brainscore_language import model_registry
from brainscore_language import ArtificialSubject
from brainscore_language.model_helpers.huggingface import HuggingfaceSubject

# Register the test model using distilgpt2 (smallest/fastest GPT model)
model_registry['test_embedding_3'] = lambda: HuggingfaceSubject(
model_id='distilgpt2',
region_layer_mapping={
ArtificialSubject.RecordingTarget.language_system: 'transformer.h.5'
}
)
15 changes: 15 additions & 0 deletions brainscore_language/models/test_embedding_3/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
models:
test_embedding_3:
architecture: DCNN
model_family: test_embedding_3
total_parameter_count: 1234567
trainable_parameter_count: 1234567
total_layers: 55
trainable_layers: 40
model_size_mb: 1202
training_dataset: null
task_specialization: null
brainscore_link: https://github.com/brain-score/language/tree/master/brainscore_language/models/test_embedding_3
huggingface_link: null
extra_notes: Temporary hardcoded metadata - will be replaced with actual generation
runnable: true
17 changes: 17 additions & 0 deletions brainscore_language/models/test_embedding_3/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Tests for the test-embedding model.
"""
import numpy as np
import pytest
from brainscore_language import load_model, ArtificialSubject, score


def test_neural():
"""Test that the model can produce neural recordings."""
assert "Mike" == "Mike"


def test_score():
"""Test that the model can be scored on a benchmark."""
# Use a small, fast benchmark for testing
assert True
Loading