vllm.model_executor.models.aria ¶
Classes:
-
AriaForConditionalGeneration–Aria model for conditional generation tasks.
-
AriaImagePixelInputs–Dimensions:
-
AriaProjector–A projection module with one cross attention layer and one FFN layer, which
-
AriaTextDecoderLayer–Custom Decoder Layer for the AriaMoE model which modifies the standard
-
AriaTextMoELayer–Mixture of Experts (MoE) Layer for the AriaMoE model.
-
AriaTextModel–Custom LlamaModel for the AriaMoE model which modifies the standard
AriaForConditionalGeneration ¶
Bases: Module, SupportsMultiModal
Aria model for conditional generation tasks.
This model combines a vision tower, a multi-modal projector, and a language model to perform tasks that involve both image and text inputs.
Source code in vllm/model_executor/models/aria.py
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 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
AriaImagePixelInputs ¶
Bases: TensorSchema
Dimensions
- b: Batch size
- n: Number of images
- c: Number of channels
- h: Height of each image
- w: Width of each image
Source code in vllm/model_executor/models/aria.py
AriaProjector ¶
Bases: Module
A projection module with one cross attention layer and one FFN layer, which projects ViT's outputs into MoE's inputs.
Parameters:
-
(config¶AriaConfig) –AriaConfig containing projector configuration parameters.
Outputs
A tensor with the shape of (batch_size, query_number, output_dim)
Source code in vllm/model_executor/models/aria.py
AriaTextDecoderLayer ¶
Bases: LlamaDecoderLayer
Custom Decoder Layer for the AriaMoE model which modifies the standard LlamaDecoderLayer by replacing the traditional MLP with a Mixture of Experts (MoE) Layer.
Source code in vllm/model_executor/models/aria.py
AriaTextMoELayer ¶
Bases: Module
Mixture of Experts (MoE) Layer for the AriaMoE model.
This layer implements the MoE mechanism, which routes input tokens to different experts based on a routing algorithm, processes them through the experts, and then combines the outputs.
Methods:
-
forward–Forward pass of the MoE Layer.
Source code in vllm/model_executor/models/aria.py
forward(hidden_states) ¶
Forward pass of the MoE Layer.
Parameters:
Returns:
-
Tensor–torch.Tensor: Output tensor after passing through the MoE layer.
Source code in vllm/model_executor/models/aria.py
AriaTextModel ¶
Bases: LlamaModel, SupportsQuant
Custom LlamaModel for the AriaMoE model which modifies the standard LlamaModel by replacing the LlamaDecoderLayer with MoEDecoderLayer.