vllm.model_executor.models.llama ¶
Inference-only LLaMA model compatible with HuggingFace weights.
LlamaDecoderLayer ¶
Bases: Module
Source code in vllm/model_executor/models/llama.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
get_quant_config ¶
get_quant_config(
vllm_config: VllmConfig,
) -> QuantizationConfig | None
Get quantization config for this layer. Override in subclasses.
LlamaForCausalLM ¶
Bases: Module, SupportsLoRA, SupportsPP, SupportsEagle, SupportsEagle3
Source code in vllm/model_executor/models/llama.py
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 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | |
get_eagle3_aux_hidden_state_layers ¶
Override to return default layers for Llama
Note: The GPU model runner will override this with layers from the speculative config if available, providing dynamic configuration.
Source code in vllm/model_executor/models/llama.py
llama_model_invariants ¶
Shape invariants for Llama model compilation, those are translated to runtime assertions for unbacked dynamic shapes and are compiled away for backed