NotScaledAttribute
Attributes · AiDotNet.Attributes
Marks an options size that test-scale construction must leave at its value, because the number is fixed by data the model reads rather than chosen for capacity: a tokenizer’s vocabulary, a phoneme inventory.
Inheritance: Attribute → NotScaledAttribute
For Beginners
Tests build tiny versions of every model by shrinking their sizes. This tag says “this number must stay as it is”, because it has to match a real dictionary the model uses.
How It Works
ModelTestScale (generated by TestScaleOptionsGenerator) shrinks every integer size above its floor so a sweep can build every model cheaply. A size that indexes external data cannot shrink: Grounding DINO embeds BERT-base-uncased token ids, so a vocabulary under 30522 cannot hold them, and the model rightly rejects it. The attribute keeps such a size out of the scaling table; it has no effect on a model a user constructs.
On a property it exempts that property. On an options class it names an inherited property to exempt for that class only (a VocabSize declared on a shared base whose other models do scale it).
Constructors
| Constructor | Summary |
|---|---|
NotScaledAttribute(string propertyName, string reason) |
Exempts the named (usually inherited) property of the options class carrying the attribute. |
NotScaledAttribute(string reason) |
Creates the declaration. |
Properties
| Property | Summary |
|---|---|
string PropertyName { get; } |
The exempt property’s name when the attribute is on a class; null on a property. |
string Reason { get; } |
What fixes the value. |