lphm_parameterized_bilinear_interdependence
Bases: parameterized_bilinear_interdependence
A low-rank hierarchical mapping (LPHM) parameterized bilinear interdependence function.
This class models interdependence using low-rank approximations with hierarchical mapping, where the parameter fabrication aligns with the LPHM methodology.
Notes
Formally, given a data batch
Notation
where
The required length of parameter vector of this interdependence function is
Attributes:
Name | Type | Description |
---|---|---|
r |
int
|
Rank of the low-rank approximation. |
p |
int
|
Number of partitions in the input dimension. |
q |
int
|
Number of partitions in the output dimension. |
Methods:
Name | Description |
---|---|
__init__ |
Initializes the low-rank hierarchical mapping parameterized bilinear interdependence function. |
Source code in tinybig/interdependence/parameterized_bilinear_interdependence.py
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
|
__init__(r, p, q=None, name='lphm_parameterized_bilinear_interdependence', *args, **kwargs)
Initializes the low-rank hierarchical mapping parameterized bilinear interdependence function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
r
|
int
|
Rank of the low-rank approximation. |
required |
p
|
int
|
Number of partitions in the input dimension. |
required |
q
|
int
|
Number of partitions in the output dimension. Defaults to |
None
|
name
|
str
|
Name of the interdependence function. Defaults to 'lphm_parameterized_bilinear_interdependence'. |
'lphm_parameterized_bilinear_interdependence'
|
*args
|
tuple
|
Additional positional arguments for the parent class. |
()
|
**kwargs
|
dict
|
Additional keyword arguments for the parent class. |
{}
|
Raises:
Type | Description |
---|---|
ValueError
|
If the interdependence type is not supported. |
AssertionError
|
If the dimensions are not divisible by the partitions. |