File size: 4,742 Bytes
7c5e40e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9210292
7c5e40e
 
 
 
9210292
7c5e40e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9210292
7c5e40e
 
 
 
9210292
7c5e40e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
"""Type-directed compiler and exact relational execution for STRATA-COMPOSE."""

from strata.modeling.compose.ast import (
    AnchorRef,
    Apply,
    ProgramNode,
    ProgramTypeError,
    anchor_ref,
    apply_chain,
    canonicalize,
    operator_chain,
)
from strata.modeling.compose.anchors import (
    AnchorLinkOutput,
    ParticipantFacetAnchorLinker,
    StructuredAnchorLinker,
    TypedCandidateAnchorLinker,
    copied_anchor,
)
from strata.modeling.compose.chart_parser import ChartItem, ParseResult, TypedChartParser
from strata.modeling.compose.executor import (
    TypedAlgebraGraph,
    TypedGraphValue,
    TypedProgramExecutor,
    permute_graph,
    permute_value,
)
from strata.modeling.compose.evidence_lattice import (
    EvidenceDecision,
    decide_evidence,
    decide_evidence_tensor,
)
from strata.modeling.compose.fragments import (
    FunctionFragment,
    LexicalCandidate,
    LexicalFragmentClassifier,
)
from strata.modeling.compose.lm_adapter import (
    AlgebraGraphReadAdapter,
    ComposeLMOutput,
    FrozenLMWithAlgebraRead,
    SparseAlgebraGraphRead,
)
from strata.modeling.compose.head_quotient import (
    ExportedHeadQuotientAttention,
    GraphProgram,
    GroupedGraphReadAdapter,
    HeadKVCache,
    HeadMode,
    HeadQuotientAttention,
    HeadQuotientBlock,
    HeadQuotientLM,
    HeadQuotientIncrementalOutput,
    HeadQuotientOutput,
    ScopedGraphRead,
    StaticProgramGraphReadAdapter,
    StaticScopedGraphReadAdapter,
    sparsemax,
)
from strata.modeling.compose.natural_compiler import (
    NaturalAtomicCompiler,
    NaturalCompilerOutput,
    decode_valid_spans,
    gated_compiler_reliability,
)
from strata.modeling.compose.natural_grounder import (
    NaturalGrounderOutput,
    NaturalMentionGrounder,
    decode_joint_assignment,
    set_valued_assignment_loss,
)
from strata.modeling.compose.natural_denotation_ranker import (
    DenotationRankerOutput,
    FrameConditionedDenotationRanker,
    decode_role_specific,
)
from strata.modeling.compose.prunable_attention import (
    AlgebraOverlapBlock,
    ExportedAlgebraBlock,
    PrunableAlgebraLM,
    PrunableLMOutput,
)
from strata.modeling.compose.position_extension import SegmentFactorizedPositionExtension
from strata.modeling.compose.residual_memory import (
    BoundedFusionOutput,
    ResidualMemory,
    ResidualNodeType,
    SparseResidualRead,
    bounded_graph_residual_fusion,
    graph_residual_orthogonality_loss,
    reconstruction_residual,
    residual_utility,
    select_residual_memory,
    sparse_residual_read,
)
from strata.modeling.compose.types import (
    GraphOperator,
    OPERATOR_SIGNATURES,
    OperatorSignature,
    SemanticType,
    signature,
)

__all__ = [
    "AnchorLinkOutput",
    "AnchorRef",
    "AlgebraGraphReadAdapter",
    "GroupedGraphReadAdapter",
    "ExportedHeadQuotientAttention",
    "GraphProgram",
    "HeadKVCache",
    "HeadMode",
    "HeadQuotientAttention",
    "HeadQuotientBlock",
    "HeadQuotientLM",
    "HeadQuotientIncrementalOutput",
    "HeadQuotientOutput",
    "ScopedGraphRead",
    "StaticProgramGraphReadAdapter",
    "StaticScopedGraphReadAdapter",
    "sparsemax",
    "AlgebraOverlapBlock",
    "Apply",
    "BoundedFusionOutput",
    "ChartItem",
    "ComposeLMOutput",
    "FunctionFragment",
    "FrozenLMWithAlgebraRead",
    "GraphOperator",
    "LexicalCandidate",
    "LexicalFragmentClassifier",
    "NaturalAtomicCompiler",
    "NaturalCompilerOutput",
    "NaturalGrounderOutput",
    "NaturalMentionGrounder",
    "DenotationRankerOutput",
    "FrameConditionedDenotationRanker",
    "OPERATOR_SIGNATURES",
    "OperatorSignature",
    "ParseResult",
    "ParticipantFacetAnchorLinker",
    "ProgramNode",
    "ProgramTypeError",
    "PrunableAlgebraLM",
    "PrunableLMOutput",
    "ResidualMemory",
    "ResidualNodeType",
    "SemanticType",
    "SparseAlgebraGraphRead",
    "SparseResidualRead",
    "SegmentFactorizedPositionExtension",
    "StructuredAnchorLinker",
    "TypedAlgebraGraph",
    "TypedCandidateAnchorLinker",
    "TypedChartParser",
    "TypedGraphValue",
    "TypedProgramExecutor",
    "ExportedAlgebraBlock",
    "EvidenceDecision",
    "anchor_ref",
    "apply_chain",
    "bounded_graph_residual_fusion",
    "canonicalize",
    "copied_anchor",
    "decide_evidence",
    "decide_evidence_tensor",
    "decode_valid_spans",
    "decode_joint_assignment",
    "decode_role_specific",
    "gated_compiler_reliability",
    "graph_residual_orthogonality_loss",
    "operator_chain",
    "permute_graph",
    "permute_value",
    "reconstruction_residual",
    "residual_utility",
    "select_residual_memory",
    "signature",
    "set_valued_assignment_loss",
    "sparse_residual_read",
]