Compress threat indexing, update feature set name to Full Threats v2 - #398
Open
sscg13 wants to merge 4 commits into
Open
Compress threat indexing, update feature set name to Full Threats v2#398sscg13 wants to merge 4 commits into
sscg13 wants to merge 4 commits into
Conversation
Member
|
will need a rebase now that shawns pr is in |
Co-authored-by: Viren6 <94880762+Viren6@users.noreply.github.com>
sscg13
force-pushed
the
compress-indexing
branch
from
February 25, 2026 23:25
4d29c24 to
60b256e
Compare
Member
|
This fails for me.. A bit unclear why we call this v2, honestly, it is functionally equivalent to the previous version? |
Member
|
halfkav2 was also identical to halfka except it used less space |
Member
|
Still needs a rebase and diff --git a/model/modules/__init__.py b/model/modules/__init__.py
index e533443..4e3cec3 100644
--- a/model/modules/__init__.py
+++ b/model/modules/__init__.py
@@ -5,7 +5,7 @@ from .feature_transformer import (
)
from .features import (
HalfKav2Hm,
- FullThreats,
+ FullThreatsv2,
get_feature_cls,
get_available_features,
add_feature_args,
@@ -18,7 +18,7 @@ __all__ = [
"DoubleFeatureTransformer",
"FeatureTransformer",
"HalfKav2Hm",
- "FullThreats",
+ "FullThreatsv2",
"get_feature_cls",
"get_available_features",
"add_feature_args",
diff --git a/model/utils/serialize.py b/model/utils/serialize.py
index d4b2989..c128bbe 100644
--- a/model/utils/serialize.py
+++ b/model/utils/serialize.py
@@ -158,7 +158,7 @@ class NNUEWriter:
# Weights stored as [num_features][outputs]
self.write_tensor(bias.flatten().numpy(), ft_compression)
- if isinstance(layer, FullThreats):
+ if isinstance(layer, FullThreatsv2):
threat_weight = weight[: layer.NUM_THREAT_FEATURES].to(torch.int8)
psq_weight = weight[layer.NUM_THREAT_FEATURES :]
self.write_tensor(threat_weight.flatten().numpy())
@@ -306,7 +306,7 @@ class NNUEReader:
bias = self.tensor(np.int16, [num_outputs - num_psqt_buckets])
# weights stored as [num_features][outputs]
- if isinstance(layer, FullThreats):
+ if isinstance(layer, FullThreatsv2):
threat_weight = self.tensor(
np.int8, [layer.NUM_THREAT_FEATURES, num_outputs - num_psqt_buckets]
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the corresponding trainer side changes for official-stockfish/Stockfish#6635