From e489ad7a210f4234db696d1f2749d5f3662fa65b Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Sun, 2 Feb 2025 14:58:18 -0500 Subject: [PATCH] [Misc] Add SPDX-License-Identifier headers to python source files (#12628) - **Add SPDX license headers to python source files** - **Check for SPDX headers using pre-commit** commit 9d7ef44c3cfb72ca4c32e1c677d99259d10d4745 Author: Russell Bryant Date: Fri Jan 31 14:18:24 2025 -0500 Add SPDX license headers to python source files This commit adds SPDX license headers to python source files as recommended to the project by the Linux Foundation. These headers provide a concise way that is both human and machine readable for communicating license information for each source file. It helps avoid any ambiguity about the license of the code and can also be easily used by tools to help manage license compliance. The Linux Foundation runs license scans against the codebase to help ensure we are in compliance with the licenses of the code we use, including dependencies. Having these headers in place helps that tool do its job. More information can be found on the SPDX site: - https://spdx.dev/learn/handling-license-info/ Signed-off-by: Russell Bryant commit 5a1cf1cb3b80759131c73f6a9dddebccac039dea Author: Russell Bryant Date: Fri Jan 31 14:36:32 2025 -0500 Check for SPDX headers using pre-commit Signed-off-by: Russell Bryant --------- Signed-off-by: Russell Bryant --- .buildkite/check-wheel-size.py | 2 + .buildkite/generate_index.py | 2 + .../test_lm_eval_correctness.py | 1 + .../convert-results-json-to-markdown.py | 2 + .../scripts/download-tokenizer.py | 2 + .../scripts/generate-nightly-markdown.py | 2 + .../scripts/get-lmdeploy-modelname.py | 2 + .../scripts/summary-nightly-results.py | 2 + .pre-commit-config.yaml | 6 ++- benchmarks/backend_request_func.py | 2 + benchmarks/benchmark_guided.py | 1 + benchmarks/benchmark_latency.py | 1 + .../benchmark_long_document_qa_throughput.py | 1 + benchmarks/benchmark_prefix_caching.py | 1 + benchmarks/benchmark_prioritization.py | 1 + benchmarks/benchmark_serving.py | 1 + benchmarks/benchmark_serving_guided.py | 1 + benchmarks/benchmark_throughput.py | 1 + .../cutlass_benchmarks/sparse_benchmarks.py | 2 + benchmarks/cutlass_benchmarks/utils.py | 2 + .../cutlass_benchmarks/w8a8_benchmarks.py | 2 + .../cutlass_benchmarks/weight_shapes.py | 2 + .../disagg_prefill_proxy_server.py | 2 + .../disagg_benchmarks/round_robin_proxy.py | 2 + .../visualize_benchmark_results.py | 2 + .../fused_kernels/layernorm_rms_benchmarks.py | 2 + benchmarks/kernels/benchmark_aqlm.py | 2 + benchmarks/kernels/benchmark_layernorm.py | 2 + benchmarks/kernels/benchmark_lora.py | 2 + benchmarks/kernels/benchmark_machete.py | 2 + benchmarks/kernels/benchmark_marlin.py | 2 + benchmarks/kernels/benchmark_moe.py | 2 + .../kernels/benchmark_paged_attention.py | 2 + benchmarks/kernels/benchmark_quant.py | 2 + benchmarks/kernels/benchmark_rmsnorm.py | 2 + benchmarks/kernels/benchmark_rope.py | 2 + benchmarks/kernels/benchmark_shapes.py | 2 + benchmarks/kernels/graph_machete_bench.py | 2 + benchmarks/kernels/utils.py | 2 + benchmarks/kernels/weight_shapes.py | 2 + benchmarks/overheads/benchmark_hashing.py | 2 + cmake/hipify.py | 2 + collect_env.py | 2 + .../vllm_cutlass_library_extension.py | 2 + csrc/quantization/machete/generate.py | 2 + docs/source/conf.py | 2 + docs/source/generate_examples.py | 2 + examples/offline_inference/aqlm_example.py | 2 + examples/offline_inference/arctic.py | 2 + examples/offline_inference/audio_language.py | 1 + examples/offline_inference/basic.py | 2 + .../basic_with_model_default_sampling.py | 2 + examples/offline_inference/chat.py | 2 + examples/offline_inference/chat_with_tools.py | 2 + examples/offline_inference/classification.py | 2 + examples/offline_inference/cli.py | 2 + examples/offline_inference/cpu_offload.py | 2 + examples/offline_inference/distributed.py | 1 + examples/offline_inference/embedding.py | 2 + examples/offline_inference/encoder_decoder.py | 1 + .../offline_inference/florence2_inference.py | 1 + examples/offline_inference/gguf_inference.py | 2 + .../offline_inference/llm_engine_example.py | 2 + .../lora_with_quantization_inference.py | 1 + examples/offline_inference/mlpspeculator.py | 2 + .../offline_inference/multilora_inference.py | 1 + examples/offline_inference/neuron.py | 2 + .../neuron_int8_quantization.py | 2 + examples/offline_inference/pixtral.py | 2 + examples/offline_inference/prefix_caching.py | 2 + examples/offline_inference/profiling.py | 2 + .../profiling_tpu/profiling.py | 2 + examples/offline_inference/rlhf.py | 1 + .../offline_inference/save_sharded_state.py | 1 + examples/offline_inference/scoring.py | 2 + .../offline_inference/simple_profiling.py | 2 + .../offline_inference/structured_outputs.py | 2 + .../offline_inference/torchrun_example.py | 1 + examples/offline_inference/tpu.py | 2 + examples/offline_inference/vision_language.py | 1 + .../vision_language_embedding.py | 1 + .../vision_language_multi_image.py | 1 + examples/offline_inference/whisper.py | 2 + examples/online_serving/api_client.py | 1 + .../online_serving/cohere_rerank_client.py | 1 + .../gradio_openai_chatbot_webserver.py | 2 + examples/online_serving/gradio_webserver.py | 2 + .../online_serving/jinaai_rerank_client.py | 1 + .../openai_chat_completion_client.py | 2 + ...i_chat_completion_client_for_multimodal.py | 1 + ...penai_chat_completion_client_with_tools.py | 1 + ...enai_chat_completion_structured_outputs.py | 2 + .../openai_chat_completion_with_reasoning.py | 1 + ...hat_completion_with_reasoning_streaming.py | 1 + ...ai_chat_embedding_client_for_multimodal.py | 2 + .../openai_completion_client.py | 2 + .../openai_cross_encoder_score.py | 1 + .../online_serving/openai_embedding_client.py | 2 + .../online_serving/openai_pooling_client.py | 1 + .../opentelemetry/dummy_client.py | 2 + examples/other/tensorize_vllm_model.py | 2 + find_cuda_init.py | 2 + python_only_dev.py | 2 + setup.py | 2 + tests/async_engine/api_server_async_engine.py | 1 + tests/async_engine/test_api_server.py | 2 + tests/async_engine/test_async_llm_engine.py | 2 + tests/async_engine/test_request_tracker.py | 2 + .../test_basic_correctness.py | 1 + .../basic_correctness/test_chunked_prefill.py | 1 + tests/basic_correctness/test_cpu_offload.py | 2 + tests/basic_correctness/test_cumem.py | 2 + tests/basic_correctness/test_preemption.py | 1 + tests/compile/backend.py | 2 + tests/compile/piecewise/test_simple.py | 1 + tests/compile/piecewise/test_toy_llama.py | 1 + tests/compile/test_basic_correctness.py | 2 + tests/compile/test_full_graph.py | 2 + tests/compile/test_functionalization.py | 2 + tests/compile/test_fusion.py | 2 + tests/compile/test_pass_manager.py | 2 + tests/compile/test_wrapper.py | 2 + tests/compile/utils.py | 2 + tests/conftest.py | 2 + tests/core/block/conftest.py | 2 + tests/core/block/e2e/conftest.py | 2 + tests/core/block/e2e/test_correctness.py | 2 + .../e2e/test_correctness_sliding_window.py | 2 + tests/core/block/test_block_manager.py | 2 + tests/core/block/test_block_table.py | 2 + tests/core/block/test_common.py | 2 + .../block/test_cpu_gpu_block_allocator.py | 2 + tests/core/block/test_naive_block.py | 2 + tests/core/block/test_prefix_caching_block.py | 2 + tests/core/test_chunked_prefill_scheduler.py | 2 + tests/core/test_num_computed_tokens_update.py | 2 + tests/core/test_scheduler.py | 2 + tests/core/test_scheduler_encoder_decoder.py | 2 + tests/core/test_serialization.py | 2 + tests/core/utils.py | 2 + tests/distributed/test_ca_buffer_sharing.py | 2 + tests/distributed/test_comm_ops.py | 1 + tests/distributed/test_custom_all_reduce.py | 2 + tests/distributed/test_distributed_oot.py | 2 + .../distributed/test_multi_node_assignment.py | 1 + tests/distributed/test_pipeline_parallel.py | 1 + tests/distributed/test_pipeline_partition.py | 2 + tests/distributed/test_pp_cudagraph.py | 2 + tests/distributed/test_pynccl.py | 2 + tests/distributed/test_same_node.py | 2 + tests/distributed/test_shm_broadcast.py | 2 + tests/distributed/test_torchrun_example.py | 2 + tests/distributed/test_utils.py | 2 + tests/encoder_decoder/test_e2e_correctness.py | 1 + .../output_processor/test_multi_step.py | 2 + .../output_processor/test_stop_checker.py | 2 + tests/engine/test_arg_utils.py | 2 + tests/engine/test_computed_prefix_blocks.py | 2 + tests/engine/test_custom_executor.py | 2 + tests/engine/test_detokenization.py | 2 + tests/engine/test_multiproc_workers.py | 2 + tests/engine/test_short_mm_context.py | 2 + tests/engine/test_skip_tokenizer_init.py | 2 + tests/engine/test_stop_reason.py | 1 + tests/engine/test_stop_strings.py | 2 + tests/entrypoints/conftest.py | 2 + tests/entrypoints/llm/test_accuracy.py | 1 + tests/entrypoints/llm/test_chat.py | 2 + tests/entrypoints/llm/test_collective_rpc.py | 2 + tests/entrypoints/llm/test_encode.py | 2 + tests/entrypoints/llm/test_generate.py | 2 + .../llm/test_generate_multiple_loras.py | 2 + tests/entrypoints/llm/test_gpu_utilization.py | 2 + tests/entrypoints/llm/test_guided_generate.py | 2 + tests/entrypoints/llm/test_init.py | 2 + tests/entrypoints/llm/test_lazy_outlines.py | 2 + .../entrypoints/llm/test_prompt_validation.py | 2 + .../offline_mode/test_offline_mode.py | 1 + .../test_deepseekr1_reasoning_parser.py | 2 + .../openai/reasoning_parsers/utils.py | 2 + tests/entrypoints/openai/test_accuracy.py | 1 + .../openai/test_async_tokenization.py | 2 + tests/entrypoints/openai/test_audio.py | 2 + tests/entrypoints/openai/test_basic.py | 2 + tests/entrypoints/openai/test_chat.py | 2 + tests/entrypoints/openai/test_chat_echo.py | 2 + .../entrypoints/openai/test_chat_template.py | 2 + .../entrypoints/openai/test_chunked_prompt.py | 2 + tests/entrypoints/openai/test_cli_args.py | 2 + tests/entrypoints/openai/test_completion.py | 2 + tests/entrypoints/openai/test_embedding.py | 2 + .../openai/test_encoder_decoder.py | 2 + .../entrypoints/openai/test_lora_adapters.py | 2 + tests/entrypoints/openai/test_metrics.py | 2 + tests/entrypoints/openai/test_models.py | 2 + .../openai/test_oot_registration.py | 2 + tests/entrypoints/openai/test_pooling.py | 2 + .../openai/test_prompt_validation.py | 2 + tests/entrypoints/openai/test_rerank.py | 2 + .../openai/test_return_tokens_as_ids.py | 2 + tests/entrypoints/openai/test_root_path.py | 2 + tests/entrypoints/openai/test_run_batch.py | 2 + tests/entrypoints/openai/test_score.py | 2 + tests/entrypoints/openai/test_serving_chat.py | 2 + .../entrypoints/openai/test_serving_models.py | 2 + tests/entrypoints/openai/test_shutdown.py | 2 + tests/entrypoints/openai/test_tokenization.py | 2 + tests/entrypoints/openai/test_video.py | 2 + tests/entrypoints/openai/test_vision.py | 2 + .../openai/test_vision_embedding.py | 2 + .../tool_parsers/test_pythonic_tool_parser.py | 2 + .../entrypoints/openai/tool_parsers/utils.py | 2 + tests/entrypoints/test_chat_utils.py | 2 + tests/kernels/allclose_default.py | 2 + tests/kernels/conftest.py | 2 + tests/kernels/quant_utils.py | 2 + tests/kernels/test_activation.py | 2 + tests/kernels/test_aqlm.py | 2 + tests/kernels/test_attention.py | 2 + tests/kernels/test_attention_selector.py | 2 + tests/kernels/test_awq.py | 2 + tests/kernels/test_awq_marlin.py | 1 + tests/kernels/test_awq_triton.py | 1 + tests/kernels/test_block_fp8.py | 2 + tests/kernels/test_blocksparse_attention.py | 2 + tests/kernels/test_cache.py | 2 + tests/kernels/test_cascade_flash_attn.py | 2 + tests/kernels/test_causal_conv1d.py | 2 + tests/kernels/test_cutlass.py | 1 + tests/kernels/test_cutlass_2of4_sparse.py | 1 + tests/kernels/test_encoder_decoder_attn.py | 1 + tests/kernels/test_flash_attn.py | 2 + tests/kernels/test_flashinfer.py | 2 + tests/kernels/test_fp8_quant.py | 2 + tests/kernels/test_fused_quant_layernorm.py | 2 + tests/kernels/test_ggml.py | 2 + tests/kernels/test_gguf.py | 2 + tests/kernels/test_gptq.py | 2 + tests/kernels/test_int8_quant.py | 2 + tests/kernels/test_layernorm.py | 2 + tests/kernels/test_machete_mm.py | 1 + tests/kernels/test_mamba_ssm.py | 2 + tests/kernels/test_marlin_gemm.py | 1 + tests/kernels/test_mha_attn.py | 1 + tests/kernels/test_moe.py | 1 + tests/kernels/test_permute_cols.py | 2 + tests/kernels/test_pos_encoding.py | 2 + tests/kernels/test_prefix_prefill.py | 2 + tests/kernels/test_rotary_embedding.py | 1 + tests/kernels/test_triton_decode_attention.py | 2 + tests/kernels/test_triton_scaled_mm.py | 1 + tests/kernels/test_utils.py | 1 + tests/kernels/utils.py | 1 + tests/kv_transfer/disagg_test.py | 2 + tests/kv_transfer/module_test.py | 2 + tests/kv_transfer/test_lookup_buffer.py | 2 + tests/kv_transfer/test_send_recv.py | 2 + tests/lora/conftest.py | 2 + tests/lora/data/long_context_test_data.py | 2 + tests/lora/test_baichuan.py | 2 + tests/lora/test_chatglm3_tp.py | 2 + tests/lora/test_gemma.py | 2 + tests/lora/test_jamba.py | 2 + tests/lora/test_layers.py | 2 + tests/lora/test_llama_tp.py | 2 + tests/lora/test_long_context.py | 2 + tests/lora/test_lora_bias_e2e.py | 2 + tests/lora/test_lora_checkpoints.py | 2 + tests/lora/test_lora_huggingface.py | 2 + tests/lora/test_lora_manager.py | 2 + tests/lora/test_minicpmv_tp.py | 2 + tests/lora/test_mixtral.py | 2 + tests/lora/test_peft_helper.py | 2 + tests/lora/test_phi.py | 2 + tests/lora/test_punica_ops_sizes.py | 1 + tests/lora/test_punica_ops_variation.py | 1 + tests/lora/test_quant_model.py | 2 + tests/lora/test_qwen2vl.py | 2 + tests/lora/test_tokenizer_group.py | 2 + tests/lora/test_utils.py | 2 + tests/lora/test_worker.py | 2 + tests/lora/utils.py | 2 + tests/metrics/test_metrics.py | 2 + tests/model_executor/conftest.py | 2 + .../model_executor/test_enabled_custom_ops.py | 2 + .../model_executor/test_guided_processors.py | 2 + .../test_model_load_with_params.py | 2 + tests/model_executor/weight_utils.py | 2 + .../audio_language/test_ultravox.py | 2 + .../models/decoder_only/language/test_aqlm.py | 1 + .../models/decoder_only/language/test_fp8.py | 2 + .../models/decoder_only/language/test_gguf.py | 1 + .../decoder_only/language/test_gptq_marlin.py | 1 + .../language/test_gptq_marlin_24.py | 1 + .../decoder_only/language/test_granite.py | 1 + .../decoder_only/language/test_jamba.py | 2 + .../decoder_only/language/test_mamba.py | 1 + .../decoder_only/language/test_mistral.py | 1 + .../decoder_only/language/test_modelopt.py | 2 + .../decoder_only/language/test_models.py | 1 + .../decoder_only/language/test_phimoe.py | 1 + .../decoder_only/vision_language/test_awq.py | 2 + .../vision_language/test_h2ovl.py | 2 + .../vision_language/test_intern_vit.py | 2 + .../vision_language/test_models.py | 1 + .../vision_language/test_phi3v.py | 2 + .../vision_language/test_pixtral.py | 1 + .../vision_language/test_qwen2_vl.py | 2 + .../vision_language/vlm_utils/builders.py | 1 + .../vlm_utils/case_filtering.py | 1 + .../vision_language/vlm_utils/core.py | 3 +- .../vlm_utils/custom_inputs.py | 1 + .../vision_language/vlm_utils/model_utils.py | 1 + .../vision_language/vlm_utils/runners.py | 1 + .../vision_language/vlm_utils/types.py | 1 + .../embedding/language/test_cls_models.py | 1 + .../embedding/language/test_embedding.py | 1 + .../models/embedding/language/test_gritlm.py | 2 + .../models/embedding/language/test_scoring.py | 1 + tests/models/embedding/utils.py | 2 + .../vision_language/test_dse_qwen2_vl.py | 2 + .../vision_language/test_llava_next.py | 2 + .../embedding/vision_language/test_phi3v.py | 2 + .../audio_language/test_whisper.py | 1 + .../encoder_decoder/language/test_bart.py | 1 + .../vision_language/test_broadcast.py | 2 + .../vision_language/test_florence2.py | 2 + .../vision_language/test_mllama.py | 2 + .../multimodal/processing/test_common.py | 2 + .../multimodal/processing/test_idefics3.py | 1 + .../multimodal/processing/test_internvl.py | 1 + .../multimodal/processing/test_llava_next.py | 2 + .../processing/test_llava_onevision.py | 2 + .../multimodal/processing/test_phi3v.py | 1 + .../multimodal/processing/test_qwen2_vl.py | 2 + tests/models/registry.py | 2 + tests/models/test_initialization.py | 2 + tests/models/test_oot_registration.py | 2 + tests/models/test_registry.py | 2 + tests/models/utils.py | 2 + tests/mq_llm_engine/test_abort.py | 1 + tests/mq_llm_engine/test_error_handling.py | 1 + tests/mq_llm_engine/test_load.py | 1 + tests/mq_llm_engine/utils.py | 2 + .../multi_step/test_correctness_async_llm.py | 2 + tests/multi_step/test_correctness_llm.py | 2 + tests/multimodal/test_inputs.py | 2 + tests/multimodal/test_processing.py | 2 + tests/multimodal/test_processor_kwargs.py | 2 + tests/multimodal/test_utils.py | 2 + tests/multimodal/utils.py | 2 + tests/neuron/test_prefix_prefill.py | 2 + tests/plugins/vllm_add_dummy_model/setup.py | 2 + .../vllm_add_dummy_model/__init__.py | 2 + .../my_gemma_embedding.py | 2 + .../vllm_add_dummy_model/my_llava.py | 2 + .../vllm_add_dummy_model/my_opt.py | 2 + .../plugins/vllm_add_dummy_platform/setup.py | 2 + .../vllm_add_dummy_platform/__init__.py | 2 + .../dummy_attention_backend.py | 2 + .../vllm_add_dummy_platform/dummy_platform.py | 2 + tests/plugins_tests/test_platform_plugins.py | 2 + .../test_disable_sliding_window.py | 1 + tests/prefix_caching/test_prefix_caching.py | 1 + tests/prompt_adapter/test_bloom.py | 2 + .../test_multi_adapter_inference.py | 2 + tests/prompt_adapter/test_pa_lora.py | 2 + tests/quantization/test_bitsandbytes.py | 1 + tests/quantization/test_compressed_tensors.py | 1 + tests/quantization/test_configs.py | 1 + tests/quantization/test_cpu_offload.py | 2 + tests/quantization/test_experts_int8.py | 2 + tests/quantization/test_fp8.py | 1 + tests/quantization/test_ipex_quant.py | 1 + tests/quantization/test_lm_head.py | 1 + tests/quantization/test_quark.py | 1 + .../test_register_quantization_config.py | 1 + tests/quantization/utils.py | 2 + .../test_runai_model_streamer_loader.py | 2 + .../runai_model_streamer/test_weight_utils.py | 2 + tests/samplers/test_beam_search.py | 1 + tests/samplers/test_ignore_eos.py | 1 + tests/samplers/test_logits_processor.py | 2 + tests/samplers/test_logprobs.py | 2 + tests/samplers/test_no_bad_words.py | 1 + tests/samplers/test_ranks.py | 2 + tests/samplers/test_rejection_sampler.py | 1 + tests/samplers/test_sampler.py | 2 + tests/samplers/test_seeded_generate.py | 1 + .../test_typical_acceptance_sampler.py | 1 + tests/spec_decode/e2e/conftest.py | 2 + tests/spec_decode/e2e/test_compatibility.py | 2 + .../spec_decode/e2e/test_eagle_correctness.py | 1 + tests/spec_decode/e2e/test_integration.py | 1 + .../e2e/test_integration_dist_tp2.py | 1 + .../e2e/test_integration_dist_tp4.py | 1 + tests/spec_decode/e2e/test_logprobs.py | 2 + .../e2e/test_medusa_correctness.py | 1 + tests/spec_decode/e2e/test_mlp_correctness.py | 1 + .../e2e/test_multistep_correctness.py | 1 + .../spec_decode/e2e/test_ngram_correctness.py | 1 + tests/spec_decode/e2e/test_seed.py | 2 + tests/spec_decode/test_batch_expansion.py | 2 + tests/spec_decode/test_dynamic_spec_decode.py | 2 + tests/spec_decode/test_metrics.py | 2 + tests/spec_decode/test_multi_step_worker.py | 2 + tests/spec_decode/test_ngram_worker.py | 2 + tests/spec_decode/test_scorer.py | 2 + tests/spec_decode/test_spec_decode_worker.py | 2 + tests/spec_decode/test_utils.py | 2 + tests/spec_decode/utils.py | 2 + tests/standalone_tests/lazy_torch_compile.py | 2 + tests/tensorizer_loader/conftest.py | 2 + tests/tensorizer_loader/test_tensorizer.py | 2 + tests/test_cache_block_hashing.py | 1 + tests/test_config.py | 2 + tests/test_embedded_commit.py | 2 + tests/test_inputs.py | 2 + tests/test_logger.py | 2 + tests/test_logits_processor.py | 2 + tests/test_regression.py | 1 + tests/test_sampling_params.py | 1 + tests/test_scalartype.py | 2 + tests/test_sequence.py | 2 + tests/test_sharded_state_loader.py | 2 + tests/test_utils.py | 2 + tests/tokenization/test_cached_tokenizer.py | 2 + tests/tokenization/test_detokenize.py | 2 + tests/tokenization/test_get_eos.py | 1 + tests/tokenization/test_tokenizer.py | 2 + tests/tokenization/test_tokenizer_group.py | 2 + tests/tool_use/conftest.py | 2 + ...est_chat_completion_request_validations.py | 2 + tests/tool_use/test_chat_completions.py | 2 + tests/tool_use/test_jamba_tool_parser.py | 2 + tests/tool_use/test_parallel_tool_calls.py | 2 + tests/tool_use/test_tool_calls.py | 2 + tests/tool_use/utils.py | 2 + tests/tpu/test_compilation.py | 2 + tests/tpu/test_custom_dispatcher.py | 2 + tests/tpu/test_quantization_accuracy.py | 2 + tests/tracing/test_tracing.py | 2 + tests/utils.py | 2 + tests/v1/core/test_kv_cache_utils.py | 2 + tests/v1/core/test_prefix_caching.py | 1 + tests/v1/e2e/test_cascade_attention.py | 2 + tests/v1/engine/test_async_llm.py | 2 + tests/v1/engine/test_engine_args.py | 2 + tests/v1/engine/test_engine_core.py | 2 + tests/v1/engine/test_engine_core_client.py | 2 + tests/v1/engine/test_output_processor.py | 2 + tests/v1/sample/test_sampler.py | 2 + tests/v1/test_stats.py | 2 + tests/v1/test_utils.py | 2 + tests/v1/worker/test_gpu_input_batch.py | 2 + tests/vllm_test_utils/setup.py | 2 + .../vllm_test_utils/__init__.py | 1 + .../vllm_test_utils/vllm_test_utils/blame.py | 2 + .../vllm_test_utils/monitor.py | 2 + tests/weight_loading/test_weight_loading.py | 2 + .../test_encoder_decoder_model_runner.py | 2 + tests/worker/test_model_input.py | 2 + tests/worker/test_model_runner.py | 2 + tests/worker/test_profile.py | 2 + tests/worker/test_swap.py | 2 + tools/check_spdx_header.py | 43 +++++++++++++++++++ tools/profiler/print_layerwise_table.py | 2 + tools/profiler/visualize_layerwise_profile.py | 2 + tools/report_build_time_ninja.py | 2 + use_existing_torch.py | 2 + vllm/__init__.py | 1 + vllm/_custom_ops.py | 2 + vllm/_ipex_ops.py | 2 + vllm/adapter_commons/layers.py | 2 + vllm/adapter_commons/models.py | 2 + vllm/adapter_commons/request.py | 2 + vllm/adapter_commons/utils.py | 2 + vllm/adapter_commons/worker_manager.py | 2 + vllm/assets/audio.py | 2 + vllm/assets/base.py | 2 + vllm/assets/image.py | 2 + vllm/assets/video.py | 2 + vllm/attention/__init__.py | 2 + vllm/attention/backends/abstract.py | 2 + vllm/attention/backends/blocksparse_attn.py | 2 + vllm/attention/backends/flash_attn.py | 1 + vllm/attention/backends/flashinfer.py | 2 + vllm/attention/backends/hpu_attn.py | 2 + vllm/attention/backends/ipex_attn.py | 1 + vllm/attention/backends/mla/utils.py | 2 + vllm/attention/backends/openvino.py | 2 + vllm/attention/backends/pallas.py | 2 + vllm/attention/backends/placeholder_attn.py | 2 + vllm/attention/backends/rocm_flash_attn.py | 1 + vllm/attention/backends/torch_sdpa.py | 1 + vllm/attention/backends/triton_mla.py | 2 + vllm/attention/backends/utils.py | 1 + vllm/attention/backends/xformers.py | 1 + vllm/attention/layer.py | 1 + .../blocksparse_attention_kernel.py | 2 + .../ops/blocksparse_attention/interface.py | 2 + .../ops/blocksparse_attention/utils.py | 2 + vllm/attention/ops/hpu_paged_attn.py | 2 + vllm/attention/ops/ipex_attn.py | 2 + vllm/attention/ops/nki_flash_attn.py | 2 + vllm/attention/ops/paged_attn.py | 2 + vllm/attention/ops/prefix_prefill.py | 2 + vllm/attention/ops/triton_decode_attention.py | 2 + vllm/attention/ops/triton_flash_attention.py | 2 + vllm/attention/selector.py | 2 + vllm/beam_search.py | 2 + vllm/compilation/backends.py | 2 + vllm/compilation/counter.py | 2 + vllm/compilation/decorators.py | 2 + vllm/compilation/fix_functionalization.py | 2 + vllm/compilation/fusion.py | 2 + vllm/compilation/fx_utils.py | 2 + vllm/compilation/inductor_pass.py | 2 + vllm/compilation/monitor.py | 2 + vllm/compilation/multi_output_match.py | 2 + vllm/compilation/pass_manager.py | 2 + vllm/compilation/reshapes.py | 2 + vllm/compilation/vllm_inductor_pass.py | 2 + vllm/compilation/wrapper.py | 2 + vllm/config.py | 2 + vllm/connections.py | 2 + vllm/core/block/block_table.py | 2 + vllm/core/block/common.py | 2 + vllm/core/block/cpu_gpu_block_allocator.py | 2 + vllm/core/block/interfaces.py | 2 + vllm/core/block/naive_block.py | 2 + vllm/core/block/prefix_caching_block.py | 1 + vllm/core/block/utils.py | 1 + vllm/core/block_manager.py | 1 + vllm/core/evictor.py | 2 + vllm/core/interfaces.py | 2 + vllm/core/placeholder_block_space_manager.py | 2 + vllm/core/scheduler.py | 2 + vllm/device_allocator/cumem.py | 2 + vllm/distributed/__init__.py | 2 + vllm/distributed/communication_op.py | 2 + .../device_communicators/cuda_wrapper.py | 1 + .../device_communicators/custom_all_reduce.py | 2 + .../custom_all_reduce_utils.py | 2 + .../device_communicators/hpu_communicator.py | 2 + .../device_communicators/pynccl.py | 2 + .../device_communicators/pynccl_wrapper.py | 2 + .../device_communicators/shm_broadcast.py | 2 + .../device_communicators/tpu_communicator.py | 2 + .../device_communicators/xpu_communicator.py | 2 + .../kv_transfer/kv_connector/base.py | 1 + .../kv_transfer/kv_connector/factory.py | 2 + .../kv_connector/simple_connector.py | 1 + .../kv_transfer/kv_lookup_buffer/base.py | 1 + .../kv_lookup_buffer/simple_buffer.py | 1 + vllm/distributed/kv_transfer/kv_pipe/base.py | 1 + .../kv_transfer/kv_pipe/mooncake_pipe.py | 2 + .../kv_transfer/kv_pipe/pynccl_pipe.py | 1 + .../kv_transfer/kv_transfer_agent.py | 1 + vllm/distributed/parallel_state.py | 2 + vllm/distributed/utils.py | 2 + vllm/engine/arg_utils.py | 2 + vllm/engine/async_llm_engine.py | 2 + vllm/engine/async_timeout.py | 2 + vllm/engine/llm_engine.py | 2 + vllm/engine/metrics.py | 2 + vllm/engine/metrics_types.py | 1 + vllm/engine/multiprocessing/__init__.py | 2 + vllm/engine/multiprocessing/client.py | 2 + vllm/engine/multiprocessing/engine.py | 2 + vllm/engine/output_processor/interfaces.py | 2 + vllm/engine/output_processor/multi_step.py | 2 + vllm/engine/output_processor/single_step.py | 2 + vllm/engine/output_processor/stop_checker.py | 2 + vllm/engine/output_processor/util.py | 2 + vllm/engine/protocol.py | 2 + vllm/entrypoints/api_server.py | 1 + vllm/entrypoints/chat_utils.py | 2 + vllm/entrypoints/launcher.py | 2 + vllm/entrypoints/llm.py | 2 + vllm/entrypoints/logger.py | 2 + vllm/entrypoints/openai/api_server.py | 2 + vllm/entrypoints/openai/cli_args.py | 1 + vllm/entrypoints/openai/logits_processors.py | 2 + vllm/entrypoints/openai/protocol.py | 2 + .../openai/reasoning_parsers/__init__.py | 2 + .../abs_reasoning_parsers.py | 2 + .../deepseek_r1_reasoning_parser.py | 2 + vllm/entrypoints/openai/run_batch.py | 2 + vllm/entrypoints/openai/serving_chat.py | 2 + vllm/entrypoints/openai/serving_completion.py | 2 + vllm/entrypoints/openai/serving_embedding.py | 2 + vllm/entrypoints/openai/serving_engine.py | 2 + vllm/entrypoints/openai/serving_models.py | 2 + vllm/entrypoints/openai/serving_pooling.py | 2 + vllm/entrypoints/openai/serving_rerank.py | 2 + vllm/entrypoints/openai/serving_score.py | 2 + .../openai/serving_tokenization.py | 2 + .../openai/tool_parsers/__init__.py | 2 + .../tool_parsers/abstract_tool_parser.py | 2 + .../granite_20b_fc_tool_parser.py | 2 + .../tool_parsers/granite_tool_parser.py | 2 + .../openai/tool_parsers/hermes_tool_parser.py | 2 + .../tool_parsers/internlm2_tool_parser.py | 2 + .../openai/tool_parsers/jamba_tool_parser.py | 2 + .../openai/tool_parsers/llama_tool_parser.py | 2 + .../tool_parsers/mistral_tool_parser.py | 2 + .../tool_parsers/pythonic_tool_parser.py | 2 + vllm/entrypoints/openai/tool_parsers/utils.py | 2 + vllm/entrypoints/utils.py | 2 + vllm/envs.py | 2 + vllm/executor/executor_base.py | 2 + vllm/executor/mp_distributed_executor.py | 2 + vllm/executor/msgspec_utils.py | 2 + vllm/executor/multiproc_worker_utils.py | 2 + vllm/executor/ray_distributed_executor.py | 2 + vllm/executor/ray_utils.py | 2 + vllm/executor/uniproc_executor.py | 2 + vllm/forward_context.py | 2 + vllm/inputs/__init__.py | 2 + vllm/inputs/data.py | 2 + vllm/inputs/parse.py | 2 + vllm/inputs/preprocess.py | 2 + vllm/inputs/registry.py | 2 + vllm/logger.py | 1 + vllm/logging_utils/__init__.py | 2 + vllm/logging_utils/formatter.py | 2 + vllm/logits_process.py | 2 + vllm/lora/fully_sharded_layers.py | 2 + vllm/lora/layers.py | 2 + vllm/lora/lora.py | 2 + vllm/lora/models.py | 2 + vllm/lora/ops/torch_ops/__init__.py | 2 + vllm/lora/ops/torch_ops/lora_ops.py | 2 + vllm/lora/ops/triton_ops/__init__.py | 2 + vllm/lora/ops/triton_ops/bgmv_expand.py | 1 + vllm/lora/ops/triton_ops/bgmv_expand_slice.py | 1 + vllm/lora/ops/triton_ops/bgmv_shrink.py | 1 + vllm/lora/ops/triton_ops/sgmv_expand.py | 1 + vllm/lora/ops/triton_ops/sgmv_shrink.py | 1 + vllm/lora/ops/triton_ops/utils.py | 2 + vllm/lora/peft_helper.py | 2 + vllm/lora/punica_wrapper/__init__.py | 2 + vllm/lora/punica_wrapper/punica_base.py | 1 + vllm/lora/punica_wrapper/punica_cpu.py | 2 + vllm/lora/punica_wrapper/punica_gpu.py | 1 + vllm/lora/punica_wrapper/punica_hpu.py | 2 + vllm/lora/punica_wrapper/punica_selector.py | 2 + vllm/lora/punica_wrapper/utils.py | 2 + vllm/lora/request.py | 2 + vllm/lora/utils.py | 2 + vllm/lora/worker_manager.py | 2 + vllm/model_executor/__init__.py | 2 + vllm/model_executor/custom_op.py | 2 + .../guided_decoding/__init__.py | 2 + .../guided_decoding/guided_fields.py | 2 + .../lm_format_enforcer_decoding.py | 2 + .../guided_decoding/outlines_decoding.py | 2 + .../outlines_logits_processors.py | 2 + vllm/model_executor/guided_decoding/utils.py | 2 + .../guided_decoding/xgrammar_decoding.py | 2 + vllm/model_executor/layers/activation.py | 1 + .../layers/fused_moe/__init__.py | 2 + .../layers/fused_moe/fused_marlin_moe.py | 1 + .../layers/fused_moe/fused_moe.py | 1 + vllm/model_executor/layers/fused_moe/layer.py | 2 + .../layers/fused_moe/moe_pallas.py | 2 + .../layers/fused_moe/moe_torch_iterative.py | 2 + vllm/model_executor/layers/layernorm.py | 1 + vllm/model_executor/layers/linear.py | 2 + .../model_executor/layers/logits_processor.py | 1 + .../layers/mamba/mamba_mixer.py | 2 + .../layers/mamba/ops/causal_conv1d.py | 2 + .../layers/mamba/ops/mamba_ssm.py | 2 + vllm/model_executor/layers/pooler.py | 2 + .../layers/quantization/__init__.py | 2 + .../layers/quantization/aqlm.py | 2 + .../model_executor/layers/quantization/awq.py | 2 + .../layers/quantization/awq_marlin.py | 2 + .../layers/quantization/awq_triton.py | 2 + .../layers/quantization/base_config.py | 2 + .../layers/quantization/bitsandbytes.py | 2 + .../compressed_tensors/compressed_tensors.py | 2 + .../compressed_tensors_moe.py | 2 + .../compressed_tensors/schemes/__init__.py | 2 + .../schemes/compressed_tensors_24.py | 2 + .../schemes/compressed_tensors_scheme.py | 2 + .../schemes/compressed_tensors_w4a16_24.py | 2 + .../schemes/compressed_tensors_w8a16_fp8.py | 2 + .../schemes/compressed_tensors_w8a8_fp8.py | 2 + .../schemes/compressed_tensors_w8a8_int8.py | 2 + .../schemes/compressed_tensors_wNa16.py | 2 + .../compressed_tensors/triton_scaled_mm.py | 2 + .../quantization/compressed_tensors/utils.py | 2 + .../layers/quantization/deepspeedfp.py | 2 + .../layers/quantization/experts_int8.py | 2 + .../layers/quantization/fbgemm_fp8.py | 2 + .../model_executor/layers/quantization/fp8.py | 2 + .../layers/quantization/gguf.py | 2 + .../layers/quantization/gptq.py | 2 + .../layers/quantization/gptq_marlin.py | 2 + .../layers/quantization/gptq_marlin_24.py | 2 + .../layers/quantization/hqq_marlin.py | 2 + .../layers/quantization/ipex_quant.py | 2 + .../kernels/mixed_precision/MPLinearKernel.py | 2 + .../kernels/mixed_precision/__init__.py | 2 + .../kernels/mixed_precision/exllama.py | 2 + .../kernels/mixed_precision/machete.py | 2 + .../kernels/mixed_precision/marlin.py | 2 + .../kernels/scaled_mm/ScaledMMLinearKernel.py | 2 + .../kernels/scaled_mm/__init__.py | 2 + .../quantization/kernels/scaled_mm/cutlass.py | 2 + .../quantization/kernels/scaled_mm/triton.py | 2 + .../quantization/kernels/scaled_mm/xla.py | 2 + .../layers/quantization/kv_cache.py | 2 + .../layers/quantization/marlin.py | 2 + .../layers/quantization/modelopt.py | 2 + .../layers/quantization/moe_wna16.py | 2 + .../layers/quantization/neuron_quant.py | 2 + .../model_executor/layers/quantization/qqq.py | 2 + .../layers/quantization/quark/quark.py | 2 + .../layers/quantization/quark/quark_moe.py | 2 + .../quantization/quark/schemes/__init__.py | 2 + .../quark/schemes/quark_scheme.py | 2 + .../quark/schemes/quark_w8a8_fp8.py | 2 + .../quark/schemes/quark_w8a8_int8.py | 2 + .../layers/quantization/quark/utils.py | 2 + .../layers/quantization/schema.py | 1 + .../layers/quantization/tpu_int8.py | 2 + .../layers/quantization/utils/__init__.py | 2 + .../layers/quantization/utils/fp8_utils.py | 2 + .../layers/quantization/utils/layer_utils.py | 2 + .../quantization/utils/machete_utils.py | 2 + .../layers/quantization/utils/marlin_utils.py | 2 + .../quantization/utils/marlin_utils_fp8.py | 2 + .../quantization/utils/marlin_utils_test.py | 1 + .../utils/marlin_utils_test_24.py | 1 + .../utils/marlin_utils_test_qqq.py | 2 + .../layers/quantization/utils/quant_utils.py | 1 + .../layers/quantization/utils/w8a8_utils.py | 2 + .../layers/rejection_sampler.py | 2 + vllm/model_executor/layers/resampler.py | 2 + .../model_executor/layers/rotary_embedding.py | 2 + vllm/model_executor/layers/sampler.py | 1 + .../layers/spec_decode_base_sampler.py | 2 + .../layers/typical_acceptance_sampler.py | 2 + vllm/model_executor/layers/utils.py | 1 + .../layers/vocab_parallel_embedding.py | 2 + vllm/model_executor/model_loader/__init__.py | 2 + vllm/model_executor/model_loader/loader.py | 2 + vllm/model_executor/model_loader/neuron.py | 1 + vllm/model_executor/model_loader/openvino.py | 2 + .../model_executor/model_loader/tensorizer.py | 2 + vllm/model_executor/model_loader/utils.py | 1 + .../model_loader/weight_utils.py | 1 + vllm/model_executor/models/__init__.py | 2 + vllm/model_executor/models/adapters.py | 2 + vllm/model_executor/models/arctic.py | 1 + vllm/model_executor/models/aria.py | 2 + vllm/model_executor/models/baichuan.py | 2 + vllm/model_executor/models/bart.py | 2 + vllm/model_executor/models/bert.py | 2 + vllm/model_executor/models/blip.py | 1 + vllm/model_executor/models/blip2.py | 2 + vllm/model_executor/models/bloom.py | 2 + vllm/model_executor/models/chameleon.py | 2 + vllm/model_executor/models/chatglm.py | 2 + vllm/model_executor/models/clip.py | 1 + vllm/model_executor/models/commandr.py | 2 + vllm/model_executor/models/dbrx.py | 2 + vllm/model_executor/models/decilm.py | 2 + vllm/model_executor/models/deepseek.py | 2 + vllm/model_executor/models/deepseek_v2.py | 2 + vllm/model_executor/models/deepseek_v3.py | 2 + vllm/model_executor/models/deepseek_vl2.py | 2 + vllm/model_executor/models/eagle.py | 2 + vllm/model_executor/models/exaone.py | 2 + vllm/model_executor/models/fairseq2_llama.py | 2 + vllm/model_executor/models/falcon.py | 2 + vllm/model_executor/models/florence2.py | 2 + vllm/model_executor/models/fuyu.py | 2 + vllm/model_executor/models/gemma.py | 2 + vllm/model_executor/models/gemma2.py | 2 + vllm/model_executor/models/glm.py | 1 + .../models/glm4_vision_encoder.py | 2 + vllm/model_executor/models/gpt2.py | 2 + vllm/model_executor/models/gpt_bigcode.py | 2 + vllm/model_executor/models/gpt_j.py | 2 + vllm/model_executor/models/gpt_neox.py | 2 + vllm/model_executor/models/granite.py | 2 + vllm/model_executor/models/granitemoe.py | 2 + vllm/model_executor/models/gritlm.py | 2 + vllm/model_executor/models/h2ovl.py | 2 + .../models/idefics2_vision_model.py | 2 + vllm/model_executor/models/idefics3.py | 2 + vllm/model_executor/models/interfaces.py | 2 + vllm/model_executor/models/interfaces_base.py | 2 + vllm/model_executor/models/intern_vit.py | 2 + vllm/model_executor/models/internlm2.py | 2 + vllm/model_executor/models/internlm2_ve.py | 2 + vllm/model_executor/models/internvl.py | 2 + vllm/model_executor/models/jais.py | 2 + vllm/model_executor/models/jamba.py | 1 + vllm/model_executor/models/llama.py | 2 + vllm/model_executor/models/llava.py | 2 + vllm/model_executor/models/llava_next.py | 2 + .../model_executor/models/llava_next_video.py | 2 + vllm/model_executor/models/llava_onevision.py | 2 + vllm/model_executor/models/mamba.py | 1 + vllm/model_executor/models/mamba_cache.py | 2 + vllm/model_executor/models/medusa.py | 2 + vllm/model_executor/models/minicpm.py | 2 + vllm/model_executor/models/minicpm3.py | 2 + vllm/model_executor/models/minicpmo.py | 2 + vllm/model_executor/models/minicpmv.py | 2 + vllm/model_executor/models/mixtral.py | 2 + vllm/model_executor/models/mixtral_quant.py | 2 + vllm/model_executor/models/mllama.py | 2 + vllm/model_executor/models/mlp_speculator.py | 2 + vllm/model_executor/models/module_mapping.py | 2 + vllm/model_executor/models/molmo.py | 2 + vllm/model_executor/models/mpt.py | 2 + vllm/model_executor/models/nemotron.py | 2 + vllm/model_executor/models/nvlm_d.py | 2 + vllm/model_executor/models/olmo.py | 2 + vllm/model_executor/models/olmo2.py | 2 + vllm/model_executor/models/olmoe.py | 2 + vllm/model_executor/models/opt.py | 2 + vllm/model_executor/models/orion.py | 2 + vllm/model_executor/models/paligemma.py | 2 + vllm/model_executor/models/persimmon.py | 2 + vllm/model_executor/models/phi.py | 2 + vllm/model_executor/models/phi3.py | 2 + vllm/model_executor/models/phi3_small.py | 2 + vllm/model_executor/models/phi3v.py | 2 + vllm/model_executor/models/phimoe.py | 2 + vllm/model_executor/models/pixtral.py | 2 + vllm/model_executor/models/qwen.py | 2 + vllm/model_executor/models/qwen2.py | 2 + vllm/model_executor/models/qwen2_audio.py | 2 + vllm/model_executor/models/qwen2_moe.py | 2 + vllm/model_executor/models/qwen2_rm.py | 2 + vllm/model_executor/models/qwen2_vl.py | 2 + vllm/model_executor/models/registry.py | 1 + vllm/model_executor/models/roberta.py | 2 + vllm/model_executor/models/siglip.py | 1 + vllm/model_executor/models/solar.py | 2 + vllm/model_executor/models/stablelm.py | 2 + vllm/model_executor/models/starcoder2.py | 2 + vllm/model_executor/models/telechat2.py | 2 + vllm/model_executor/models/ultravox.py | 2 + vllm/model_executor/models/utils.py | 2 + vllm/model_executor/models/vision.py | 2 + vllm/model_executor/models/whisper.py | 2 + vllm/model_executor/parameter.py | 2 + vllm/model_executor/pooling_metadata.py | 2 + vllm/model_executor/sampling_metadata.py | 2 + vllm/model_executor/utils.py | 1 + vllm/multimodal/__init__.py | 2 + vllm/multimodal/audio.py | 2 + vllm/multimodal/base.py | 2 + vllm/multimodal/hasher.py | 2 + vllm/multimodal/image.py | 2 + vllm/multimodal/inputs.py | 2 + vllm/multimodal/parse.py | 2 + vllm/multimodal/processing.py | 2 + vllm/multimodal/profiling.py | 2 + vllm/multimodal/registry.py | 2 + vllm/multimodal/utils.py | 2 + vllm/multimodal/video.py | 2 + vllm/outputs.py | 2 + vllm/platforms/__init__.py | 2 + vllm/platforms/cpu.py | 2 + vllm/platforms/cuda.py | 1 + vllm/platforms/hpu.py | 2 + vllm/platforms/interface.py | 2 + vllm/platforms/neuron.py | 2 + vllm/platforms/openvino.py | 2 + vllm/platforms/rocm.py | 2 + vllm/platforms/tpu.py | 2 + vllm/platforms/xpu.py | 2 + vllm/plugins/__init__.py | 2 + vllm/pooling_params.py | 2 + vllm/profiler/__init__.py | 2 + vllm/profiler/layerwise_profile.py | 2 + vllm/profiler/utils.py | 2 + vllm/prompt_adapter/layers.py | 2 + vllm/prompt_adapter/models.py | 2 + vllm/prompt_adapter/request.py | 2 + vllm/prompt_adapter/utils.py | 2 + vllm/prompt_adapter/worker_manager.py | 2 + vllm/sampling_params.py | 1 + vllm/scalar_type.py | 2 + vllm/scripts.py | 2 + vllm/sequence.py | 1 + vllm/spec_decode/batch_expansion.py | 2 + vllm/spec_decode/draft_model_runner.py | 2 + vllm/spec_decode/interfaces.py | 2 + vllm/spec_decode/medusa_worker.py | 2 + vllm/spec_decode/metrics.py | 2 + vllm/spec_decode/mlp_speculator_worker.py | 2 + vllm/spec_decode/mqa_scorer.py | 2 + vllm/spec_decode/multi_step_worker.py | 2 + vllm/spec_decode/ngram_worker.py | 2 + vllm/spec_decode/proposer_worker_base.py | 2 + .../spec_decode/smaller_tp_proposer_worker.py | 2 + vllm/spec_decode/spec_decode_worker.py | 2 + vllm/spec_decode/target_model_runner.py | 2 + vllm/spec_decode/top1_proposer.py | 2 + vllm/spec_decode/util.py | 2 + vllm/tracing.py | 2 + vllm/transformers_utils/__init__.py | 2 + vllm/transformers_utils/config.py | 2 + vllm/transformers_utils/configs/__init__.py | 2 + vllm/transformers_utils/configs/arctic.py | 2 + vllm/transformers_utils/configs/chatglm.py | 2 + vllm/transformers_utils/configs/cohere2.py | 2 + vllm/transformers_utils/configs/dbrx.py | 2 + .../configs/deepseek_vl2.py | 2 + vllm/transformers_utils/configs/eagle.py | 2 + vllm/transformers_utils/configs/exaone.py | 2 + vllm/transformers_utils/configs/falcon.py | 2 + vllm/transformers_utils/configs/h2ovl.py | 2 + vllm/transformers_utils/configs/internvl.py | 2 + vllm/transformers_utils/configs/jais.py | 2 + vllm/transformers_utils/configs/medusa.py | 2 + vllm/transformers_utils/configs/mllama.py | 2 + .../configs/mlp_speculator.py | 2 + vllm/transformers_utils/configs/mpt.py | 2 + vllm/transformers_utils/configs/nemotron.py | 2 + vllm/transformers_utils/configs/nvlm_d.py | 2 + vllm/transformers_utils/configs/olmo2.py | 2 + vllm/transformers_utils/configs/solar.py | 2 + vllm/transformers_utils/configs/telechat2.py | 2 + vllm/transformers_utils/configs/ultravox.py | 2 + vllm/transformers_utils/detokenizer.py | 2 + vllm/transformers_utils/detokenizer_utils.py | 2 + vllm/transformers_utils/processor.py | 2 + .../transformers_utils/processors/__init__.py | 2 + .../processors/deepseek_vl2.py | 2 + vllm/transformers_utils/s3_utils.py | 2 + vllm/transformers_utils/tokenizer.py | 2 + .../tokenizer_group/__init__.py | 2 + .../tokenizer_group/base_tokenizer_group.py | 2 + .../tokenizer_group/ray_tokenizer_group.py | 2 + .../tokenizer_group/tokenizer_group.py | 2 + .../transformers_utils/tokenizers/__init__.py | 2 + vllm/transformers_utils/tokenizers/mistral.py | 2 + vllm/transformers_utils/utils.py | 2 + vllm/triton_utils/__init__.py | 2 + vllm/triton_utils/custom_cache_manager.py | 2 + vllm/triton_utils/importing.py | 2 + vllm/usage/usage_lib.py | 2 + vllm/utils.py | 2 + vllm/v1/attention/backends/flash_attn.py | 1 + vllm/v1/core/encoder_cache_manager.py | 2 + vllm/v1/core/kv_cache_manager.py | 2 + vllm/v1/core/kv_cache_utils.py | 1 + vllm/v1/core/scheduler.py | 2 + vllm/v1/engine/__init__.py | 2 + vllm/v1/engine/async_llm.py | 2 + vllm/v1/engine/core.py | 2 + vllm/v1/engine/core_client.py | 2 + vllm/v1/engine/detokenizer.py | 2 + vllm/v1/engine/llm_engine.py | 2 + vllm/v1/engine/mm_input_mapper.py | 2 + vllm/v1/engine/output_processor.py | 2 + vllm/v1/engine/processor.py | 2 + vllm/v1/executor/abstract.py | 2 + vllm/v1/executor/multiproc_executor.py | 2 + vllm/v1/kv_cache_interface.py | 2 + vllm/v1/metrics/loggers.py | 2 + vllm/v1/metrics/stats.py | 2 + vllm/v1/outputs.py | 2 + vllm/v1/request.py | 2 + vllm/v1/sample/metadata.py | 2 + vllm/v1/sample/ops/penalties.py | 2 + vllm/v1/sample/ops/topk_topp_sampler.py | 2 + vllm/v1/sample/sampler.py | 1 + vllm/v1/serial_utils.py | 2 + vllm/v1/stats/common.py | 2 + vllm/v1/utils.py | 2 + vllm/v1/worker/block_table.py | 2 + vllm/v1/worker/gpu_input_batch.py | 2 + vllm/v1/worker/gpu_model_runner.py | 2 + vllm/v1/worker/gpu_worker.py | 1 + vllm/version.py | 2 + vllm/worker/cache_engine.py | 1 + vllm/worker/cpu_enc_dec_model_runner.py | 2 + vllm/worker/cpu_model_runner.py | 2 + vllm/worker/cpu_pooling_model_runner.py | 2 + vllm/worker/cpu_worker.py | 1 + vllm/worker/enc_dec_model_runner.py | 2 + vllm/worker/hpu_model_runner.py | 2 + vllm/worker/hpu_worker.py | 2 + vllm/worker/model_runner.py | 2 + vllm/worker/model_runner_base.py | 2 + vllm/worker/multi_step_model_runner.py | 2 + vllm/worker/multi_step_tpu_worker.py | 2 + vllm/worker/multi_step_worker.py | 2 + vllm/worker/neuron_model_runner.py | 2 + vllm/worker/neuron_worker.py | 1 + vllm/worker/openvino_model_runner.py | 2 + vllm/worker/openvino_worker.py | 1 + vllm/worker/pooling_model_runner.py | 2 + vllm/worker/tpu_model_runner.py | 2 + vllm/worker/tpu_worker.py | 2 + vllm/worker/utils.py | 1 + vllm/worker/worker.py | 1 + vllm/worker/worker_base.py | 2 + vllm/worker/xpu_model_runner.py | 2 + vllm/worker/xpu_worker.py | 1 + 1012 files changed, 1884 insertions(+), 2 deletions(-) create mode 100644 tools/check_spdx_header.py diff --git a/.buildkite/check-wheel-size.py b/.buildkite/check-wheel-size.py index e29eb78a9f94..2e4aecdd3e16 100644 --- a/.buildkite/check-wheel-size.py +++ b/.buildkite/check-wheel-size.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import sys import zipfile diff --git a/.buildkite/generate_index.py b/.buildkite/generate_index.py index 8350e2705141..36e1b6c01326 100644 --- a/.buildkite/generate_index.py +++ b/.buildkite/generate_index.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import os diff --git a/.buildkite/lm-eval-harness/test_lm_eval_correctness.py b/.buildkite/lm-eval-harness/test_lm_eval_correctness.py index afc935c1a931..96e57dfd0647 100644 --- a/.buildkite/lm-eval-harness/test_lm_eval_correctness.py +++ b/.buildkite/lm-eval-harness/test_lm_eval_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ LM eval harness on model to compare vs HF baseline computed offline. Configs are found in configs/$MODEL.yaml diff --git a/.buildkite/nightly-benchmarks/scripts/convert-results-json-to-markdown.py b/.buildkite/nightly-benchmarks/scripts/convert-results-json-to-markdown.py index 9d3646e2f6a1..e031686c7a29 100644 --- a/.buildkite/nightly-benchmarks/scripts/convert-results-json-to-markdown.py +++ b/.buildkite/nightly-benchmarks/scripts/convert-results-json-to-markdown.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import os from pathlib import Path diff --git a/.buildkite/nightly-benchmarks/scripts/download-tokenizer.py b/.buildkite/nightly-benchmarks/scripts/download-tokenizer.py index 68ac5909e595..5e17b79d26a1 100644 --- a/.buildkite/nightly-benchmarks/scripts/download-tokenizer.py +++ b/.buildkite/nightly-benchmarks/scripts/download-tokenizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse from transformers import AutoTokenizer diff --git a/.buildkite/nightly-benchmarks/scripts/generate-nightly-markdown.py b/.buildkite/nightly-benchmarks/scripts/generate-nightly-markdown.py index 052060c57630..0ff95a0911b1 100644 --- a/.buildkite/nightly-benchmarks/scripts/generate-nightly-markdown.py +++ b/.buildkite/nightly-benchmarks/scripts/generate-nightly-markdown.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import json from pathlib import Path diff --git a/.buildkite/nightly-benchmarks/scripts/get-lmdeploy-modelname.py b/.buildkite/nightly-benchmarks/scripts/get-lmdeploy-modelname.py index 18bcc3a8714c..e5f179a0f5b6 100644 --- a/.buildkite/nightly-benchmarks/scripts/get-lmdeploy-modelname.py +++ b/.buildkite/nightly-benchmarks/scripts/get-lmdeploy-modelname.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from lmdeploy.serve.openai.api_client import APIClient api_client = APIClient("http://localhost:8000") diff --git a/.buildkite/nightly-benchmarks/scripts/summary-nightly-results.py b/.buildkite/nightly-benchmarks/scripts/summary-nightly-results.py index 92d6fad73a94..62ee5e10b509 100644 --- a/.buildkite/nightly-benchmarks/scripts/summary-nightly-results.py +++ b/.buildkite/nightly-benchmarks/scripts/summary-nightly-results.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import datetime import json import os diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae518e1902f5..4568efcbba21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,10 +97,14 @@ repos: language: system verbose: true stages: [commit-msg] + - id: check-spdx-header + name: Check SPDX headers + entry: python tools/check_spdx_header.py + language: python + types: [python] - id: suggestion name: Suggestion entry: bash -c 'echo "To bypass pre-commit hooks, add --no-verify to git commit."' language: system verbose: true pass_filenames: false - diff --git a/benchmarks/backend_request_func.py b/benchmarks/backend_request_func.py index 0612e8778aca..364b087b841d 100644 --- a/benchmarks/backend_request_func.py +++ b/benchmarks/backend_request_func.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import os import sys diff --git a/benchmarks/benchmark_guided.py b/benchmarks/benchmark_guided.py index 1a0e62598bfc..2b41834baf4d 100644 --- a/benchmarks/benchmark_guided.py +++ b/benchmarks/benchmark_guided.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Benchmark guided decoding throughput.""" import argparse import dataclasses diff --git a/benchmarks/benchmark_latency.py b/benchmarks/benchmark_latency.py index 77c4f6aa927e..896312945312 100644 --- a/benchmarks/benchmark_latency.py +++ b/benchmarks/benchmark_latency.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Benchmark the latency of processing a single batch of requests.""" import argparse import dataclasses diff --git a/benchmarks/benchmark_long_document_qa_throughput.py b/benchmarks/benchmark_long_document_qa_throughput.py index 0b8fba38156f..21480578edbd 100644 --- a/benchmarks/benchmark_long_document_qa_throughput.py +++ b/benchmarks/benchmark_long_document_qa_throughput.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Offline benchmark to test the long document QA throughput. diff --git a/benchmarks/benchmark_prefix_caching.py b/benchmarks/benchmark_prefix_caching.py index 3ab421a89c93..23822856b882 100644 --- a/benchmarks/benchmark_prefix_caching.py +++ b/benchmarks/benchmark_prefix_caching.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Benchmark the efficiency of prefix caching. diff --git a/benchmarks/benchmark_prioritization.py b/benchmarks/benchmark_prioritization.py index e0c9e6a6db50..a32065e4e7c0 100644 --- a/benchmarks/benchmark_prioritization.py +++ b/benchmarks/benchmark_prioritization.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Benchmark offline prioritization.""" import argparse import dataclasses diff --git a/benchmarks/benchmark_serving.py b/benchmarks/benchmark_serving.py index 8b3212831e7e..e934d228f7fd 100644 --- a/benchmarks/benchmark_serving.py +++ b/benchmarks/benchmark_serving.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 r"""Benchmark online serving throughput. On the server side, run one of the following commands: diff --git a/benchmarks/benchmark_serving_guided.py b/benchmarks/benchmark_serving_guided.py index 4435d87e18a8..561e500d8b6c 100644 --- a/benchmarks/benchmark_serving_guided.py +++ b/benchmarks/benchmark_serving_guided.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 r"""Benchmark online serving throughput with guided decoding. On the server side, run one of the following commands: diff --git a/benchmarks/benchmark_throughput.py b/benchmarks/benchmark_throughput.py index c1b10b3cf8f5..658eab6a278c 100644 --- a/benchmarks/benchmark_throughput.py +++ b/benchmarks/benchmark_throughput.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Benchmark offline inference throughput.""" import argparse import dataclasses diff --git a/benchmarks/cutlass_benchmarks/sparse_benchmarks.py b/benchmarks/cutlass_benchmarks/sparse_benchmarks.py index 3d1c5e392f9e..468a1b2868f0 100644 --- a/benchmarks/cutlass_benchmarks/sparse_benchmarks.py +++ b/benchmarks/cutlass_benchmarks/sparse_benchmarks.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import copy import itertools diff --git a/benchmarks/cutlass_benchmarks/utils.py b/benchmarks/cutlass_benchmarks/utils.py index ef06fcd6604d..bab377800729 100644 --- a/benchmarks/cutlass_benchmarks/utils.py +++ b/benchmarks/cutlass_benchmarks/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Cutlass bench utils from typing import Iterable, Tuple diff --git a/benchmarks/cutlass_benchmarks/w8a8_benchmarks.py b/benchmarks/cutlass_benchmarks/w8a8_benchmarks.py index b87496ca3b2b..6552b62dae88 100644 --- a/benchmarks/cutlass_benchmarks/w8a8_benchmarks.py +++ b/benchmarks/cutlass_benchmarks/w8a8_benchmarks.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import copy import itertools diff --git a/benchmarks/cutlass_benchmarks/weight_shapes.py b/benchmarks/cutlass_benchmarks/weight_shapes.py index d58fb0bf8637..3d1121df40d0 100644 --- a/benchmarks/cutlass_benchmarks/weight_shapes.py +++ b/benchmarks/cutlass_benchmarks/weight_shapes.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Weight Shapes are in the format # ([K, N], TP_SPLIT_DIM) # Example: diff --git a/benchmarks/disagg_benchmarks/disagg_prefill_proxy_server.py b/benchmarks/disagg_benchmarks/disagg_prefill_proxy_server.py index 4058b1c0a3b7..980e68668911 100644 --- a/benchmarks/disagg_benchmarks/disagg_prefill_proxy_server.py +++ b/benchmarks/disagg_benchmarks/disagg_prefill_proxy_server.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import aiohttp diff --git a/benchmarks/disagg_benchmarks/round_robin_proxy.py b/benchmarks/disagg_benchmarks/round_robin_proxy.py index 6eb5f6398007..c2ad4916bf07 100644 --- a/benchmarks/disagg_benchmarks/round_robin_proxy.py +++ b/benchmarks/disagg_benchmarks/round_robin_proxy.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import itertools diff --git a/benchmarks/disagg_benchmarks/visualize_benchmark_results.py b/benchmarks/disagg_benchmarks/visualize_benchmark_results.py index e59d8bb0e6c8..a7b4b9e8bf30 100644 --- a/benchmarks/disagg_benchmarks/visualize_benchmark_results.py +++ b/benchmarks/disagg_benchmarks/visualize_benchmark_results.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import matplotlib.pyplot as plt diff --git a/benchmarks/fused_kernels/layernorm_rms_benchmarks.py b/benchmarks/fused_kernels/layernorm_rms_benchmarks.py index ef91f9f8eb52..c56cc743845e 100644 --- a/benchmarks/fused_kernels/layernorm_rms_benchmarks.py +++ b/benchmarks/fused_kernels/layernorm_rms_benchmarks.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle as pkl import time from dataclasses import dataclass diff --git a/benchmarks/kernels/benchmark_aqlm.py b/benchmarks/kernels/benchmark_aqlm.py index 601c4ea439ae..8d20b91560dd 100644 --- a/benchmarks/kernels/benchmark_aqlm.py +++ b/benchmarks/kernels/benchmark_aqlm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import sys from typing import Optional diff --git a/benchmarks/kernels/benchmark_layernorm.py b/benchmarks/kernels/benchmark_layernorm.py index 7acea6087fdf..d265c91bfeff 100644 --- a/benchmarks/kernels/benchmark_layernorm.py +++ b/benchmarks/kernels/benchmark_layernorm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time import torch diff --git a/benchmarks/kernels/benchmark_lora.py b/benchmarks/kernels/benchmark_lora.py index e1f613e1da50..ecde8fbaa15b 100644 --- a/benchmarks/kernels/benchmark_lora.py +++ b/benchmarks/kernels/benchmark_lora.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import copy import json diff --git a/benchmarks/kernels/benchmark_machete.py b/benchmarks/kernels/benchmark_machete.py index 46bab74ae8ad..0301fee1a886 100644 --- a/benchmarks/kernels/benchmark_machete.py +++ b/benchmarks/kernels/benchmark_machete.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import copy import itertools diff --git a/benchmarks/kernels/benchmark_marlin.py b/benchmarks/kernels/benchmark_marlin.py index 8fb44e3a3dbd..c22e66c0b0c9 100644 --- a/benchmarks/kernels/benchmark_marlin.py +++ b/benchmarks/kernels/benchmark_marlin.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import torch diff --git a/benchmarks/kernels/benchmark_moe.py b/benchmarks/kernels/benchmark_moe.py index 068830f02fb5..a4a45c9cbff2 100644 --- a/benchmarks/kernels/benchmark_moe.py +++ b/benchmarks/kernels/benchmark_moe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import time from datetime import datetime diff --git a/benchmarks/kernels/benchmark_paged_attention.py b/benchmarks/kernels/benchmark_paged_attention.py index 219013a38134..daedaadb1a77 100644 --- a/benchmarks/kernels/benchmark_paged_attention.py +++ b/benchmarks/kernels/benchmark_paged_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random import time from typing import List, Optional diff --git a/benchmarks/kernels/benchmark_quant.py b/benchmarks/kernels/benchmark_quant.py index 1d6248344894..0ddea9390d77 100644 --- a/benchmarks/kernels/benchmark_quant.py +++ b/benchmarks/kernels/benchmark_quant.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time import torch diff --git a/benchmarks/kernels/benchmark_rmsnorm.py b/benchmarks/kernels/benchmark_rmsnorm.py index baa5de0fff1b..dba153742da4 100644 --- a/benchmarks/kernels/benchmark_rmsnorm.py +++ b/benchmarks/kernels/benchmark_rmsnorm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from typing import Optional, Tuple, Union diff --git a/benchmarks/kernels/benchmark_rope.py b/benchmarks/kernels/benchmark_rope.py index 250d505168d0..8ee0212a0c11 100644 --- a/benchmarks/kernels/benchmark_rope.py +++ b/benchmarks/kernels/benchmark_rope.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from itertools import accumulate from typing import List, Optional diff --git a/benchmarks/kernels/benchmark_shapes.py b/benchmarks/kernels/benchmark_shapes.py index 4eeeca35a37c..c375e61e4187 100644 --- a/benchmarks/kernels/benchmark_shapes.py +++ b/benchmarks/kernels/benchmark_shapes.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + WEIGHT_SHAPES = { "ideal": [[4 * 256 * 32, 256 * 32]], "mistralai/Mistral-7B-v0.1/TP1": [ diff --git a/benchmarks/kernels/graph_machete_bench.py b/benchmarks/kernels/graph_machete_bench.py index 7d0bd84150a2..01d97d63d7cf 100644 --- a/benchmarks/kernels/graph_machete_bench.py +++ b/benchmarks/kernels/graph_machete_bench.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math import pickle import re diff --git a/benchmarks/kernels/utils.py b/benchmarks/kernels/utils.py index fee877b6f76f..728170748492 100644 --- a/benchmarks/kernels/utils.py +++ b/benchmarks/kernels/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import Any, Callable, Iterable, Optional diff --git a/benchmarks/kernels/weight_shapes.py b/benchmarks/kernels/weight_shapes.py index 51f24f3ba177..89b05d5882a3 100644 --- a/benchmarks/kernels/weight_shapes.py +++ b/benchmarks/kernels/weight_shapes.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Weight Shapes are in the format # ([K, N], TP_SPLIT_DIM) # Example: diff --git a/benchmarks/overheads/benchmark_hashing.py b/benchmarks/overheads/benchmark_hashing.py index d16d6f9fba44..5f94552e9dc8 100644 --- a/benchmarks/overheads/benchmark_hashing.py +++ b/benchmarks/overheads/benchmark_hashing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import cProfile import pstats diff --git a/cmake/hipify.py b/cmake/hipify.py index 340e41c8179e..2e0c8a172410 100755 --- a/cmake/hipify.py +++ b/cmake/hipify.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + #!/usr/bin/env python3 # diff --git a/collect_env.py b/collect_env.py index 254c19b19a5a..0ec9d4cae4ba 100644 --- a/collect_env.py +++ b/collect_env.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa # code borrowed from https://github.com/pytorch/pytorch/blob/main/torch/utils/collect_env.py diff --git a/csrc/cutlass_extensions/vllm_cutlass_library_extension.py b/csrc/cutlass_extensions/vllm_cutlass_library_extension.py index b401736c9824..d5a5e2ef83dd 100644 --- a/csrc/cutlass_extensions/vllm_cutlass_library_extension.py +++ b/csrc/cutlass_extensions/vllm_cutlass_library_extension.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum from typing import Dict, Union diff --git a/csrc/quantization/machete/generate.py b/csrc/quantization/machete/generate.py index a9b5ddf4cbdd..02e59fe28b9a 100644 --- a/csrc/quantization/machete/generate.py +++ b/csrc/quantization/machete/generate.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools import math import os diff --git a/docs/source/conf.py b/docs/source/conf.py index 6b0a1dad142b..ea3b56e02d1e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full diff --git a/docs/source/generate_examples.py b/docs/source/generate_examples.py index ac592e22328d..9d4de18a3b79 100644 --- a/docs/source/generate_examples.py +++ b/docs/source/generate_examples.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools import re from dataclasses import dataclass, field diff --git a/examples/offline_inference/aqlm_example.py b/examples/offline_inference/aqlm_example.py index 40f9a21ec9e5..e8db3811ff17 100644 --- a/examples/offline_inference/aqlm_example.py +++ b/examples/offline_inference/aqlm_example.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams from vllm.utils import FlexibleArgumentParser diff --git a/examples/offline_inference/arctic.py b/examples/offline_inference/arctic.py index 1fec3c99eb47..90c88446c514 100644 --- a/examples/offline_inference/arctic.py +++ b/examples/offline_inference/arctic.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams # Sample prompts. diff --git a/examples/offline_inference/audio_language.py b/examples/offline_inference/audio_language.py index 5952ec13ec3c..707ca9f87896 100644 --- a/examples/offline_inference/audio_language.py +++ b/examples/offline_inference/audio_language.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use vLLM for running offline inference with the correct prompt format on audio language models. diff --git a/examples/offline_inference/basic.py b/examples/offline_inference/basic.py index 23cc6e853943..a6e96c0bb433 100644 --- a/examples/offline_inference/basic.py +++ b/examples/offline_inference/basic.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams # Sample prompts. diff --git a/examples/offline_inference/basic_with_model_default_sampling.py b/examples/offline_inference/basic_with_model_default_sampling.py index 346bb80b1e23..80de9428f6a9 100644 --- a/examples/offline_inference/basic_with_model_default_sampling.py +++ b/examples/offline_inference/basic_with_model_default_sampling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM # Sample prompts. diff --git a/examples/offline_inference/chat.py b/examples/offline_inference/chat.py index 8814f4d7bef0..dbc710cc8a0b 100644 --- a/examples/offline_inference/chat.py +++ b/examples/offline_inference/chat.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams llm = LLM(model="meta-llama/Meta-Llama-3-8B-Instruct") diff --git a/examples/offline_inference/chat_with_tools.py b/examples/offline_inference/chat_with_tools.py index e69a6c067e4d..15519bfed9cb 100644 --- a/examples/offline_inference/chat_with_tools.py +++ b/examples/offline_inference/chat_with_tools.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa import json import random diff --git a/examples/offline_inference/classification.py b/examples/offline_inference/classification.py index de539b639a19..4a364aeb8c47 100644 --- a/examples/offline_inference/classification.py +++ b/examples/offline_inference/classification.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM # Sample prompts. diff --git a/examples/offline_inference/cli.py b/examples/offline_inference/cli.py index 391ac6b9b6b0..bc6833b3f39c 100644 --- a/examples/offline_inference/cli.py +++ b/examples/offline_inference/cli.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import asdict from vllm import LLM, SamplingParams diff --git a/examples/offline_inference/cpu_offload.py b/examples/offline_inference/cpu_offload.py index b152e5bc37e6..5511eb738778 100644 --- a/examples/offline_inference/cpu_offload.py +++ b/examples/offline_inference/cpu_offload.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams # Sample prompts. diff --git a/examples/offline_inference/distributed.py b/examples/offline_inference/distributed.py index 677127844ccd..a2df41d4ce21 100644 --- a/examples/offline_inference/distributed.py +++ b/examples/offline_inference/distributed.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use Ray Data for running offline batch inference distributively on a multi-nodes cluster. diff --git a/examples/offline_inference/embedding.py b/examples/offline_inference/embedding.py index 58d004313ad5..f9399329d24f 100644 --- a/examples/offline_inference/embedding.py +++ b/examples/offline_inference/embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM # Sample prompts. diff --git a/examples/offline_inference/encoder_decoder.py b/examples/offline_inference/encoder_decoder.py index 0f266d791885..8765d1812cc5 100644 --- a/examples/offline_inference/encoder_decoder.py +++ b/examples/offline_inference/encoder_decoder.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 ''' Demonstrate prompting of text-to-text encoder/decoder models, specifically BART diff --git a/examples/offline_inference/florence2_inference.py b/examples/offline_inference/florence2_inference.py index c24096e90004..58610b0fd2a5 100644 --- a/examples/offline_inference/florence2_inference.py +++ b/examples/offline_inference/florence2_inference.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 ''' Demonstrate prompting of text-to-text encoder/decoder models, specifically Florence-2 diff --git a/examples/offline_inference/gguf_inference.py b/examples/offline_inference/gguf_inference.py index aa05c4c0bfaa..0447e74e0d6f 100644 --- a/examples/offline_inference/gguf_inference.py +++ b/examples/offline_inference/gguf_inference.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from huggingface_hub import hf_hub_download from vllm import LLM, SamplingParams diff --git a/examples/offline_inference/llm_engine_example.py b/examples/offline_inference/llm_engine_example.py index 60d894aae969..501034c1cc5d 100644 --- a/examples/offline_inference/llm_engine_example.py +++ b/examples/offline_inference/llm_engine_example.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse from typing import List, Tuple diff --git a/examples/offline_inference/lora_with_quantization_inference.py b/examples/offline_inference/lora_with_quantization_inference.py index 0c454ea50f66..de0734c1aa83 100644 --- a/examples/offline_inference/lora_with_quantization_inference.py +++ b/examples/offline_inference/lora_with_quantization_inference.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use LoRA with different quantization techniques for offline inference. diff --git a/examples/offline_inference/mlpspeculator.py b/examples/offline_inference/mlpspeculator.py index 8f0eb65e47f6..10d9de8cb0de 100644 --- a/examples/offline_inference/mlpspeculator.py +++ b/examples/offline_inference/mlpspeculator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import gc import time from typing import List diff --git a/examples/offline_inference/multilora_inference.py b/examples/offline_inference/multilora_inference.py index 043220d979c3..630fd1bf8342 100644 --- a/examples/offline_inference/multilora_inference.py +++ b/examples/offline_inference/multilora_inference.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use the multi-LoRA functionality for offline inference. diff --git a/examples/offline_inference/neuron.py b/examples/offline_inference/neuron.py index f098c8e5fed1..517d1bfce95d 100644 --- a/examples/offline_inference/neuron.py +++ b/examples/offline_inference/neuron.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams # Sample prompts. diff --git a/examples/offline_inference/neuron_int8_quantization.py b/examples/offline_inference/neuron_int8_quantization.py index 8ec17e340095..c899a01a0bb9 100644 --- a/examples/offline_inference/neuron_int8_quantization.py +++ b/examples/offline_inference/neuron_int8_quantization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from vllm import LLM, SamplingParams diff --git a/examples/offline_inference/pixtral.py b/examples/offline_inference/pixtral.py index c12ff7021cf5..760de114508c 100644 --- a/examples/offline_inference/pixtral.py +++ b/examples/offline_inference/pixtral.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa import argparse diff --git a/examples/offline_inference/prefix_caching.py b/examples/offline_inference/prefix_caching.py index 67b755a15596..4c326c417b4d 100644 --- a/examples/offline_inference/prefix_caching.py +++ b/examples/offline_inference/prefix_caching.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams from vllm.distributed import cleanup_dist_env_and_memory diff --git a/examples/offline_inference/profiling.py b/examples/offline_inference/profiling.py index 8a94b5c2a862..c2e072fdd888 100644 --- a/examples/offline_inference/profiling.py +++ b/examples/offline_inference/profiling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import inspect import json import os diff --git a/examples/offline_inference/profiling_tpu/profiling.py b/examples/offline_inference/profiling_tpu/profiling.py index d7423e6c6da9..b1fe829b3c38 100644 --- a/examples/offline_inference/profiling_tpu/profiling.py +++ b/examples/offline_inference/profiling_tpu/profiling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import dataclasses import os diff --git a/examples/offline_inference/rlhf.py b/examples/offline_inference/rlhf.py index 5c4918008dcb..5000251c099f 100644 --- a/examples/offline_inference/rlhf.py +++ b/examples/offline_inference/rlhf.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ a simple demonstration of RLHF with vLLM, inspired by the OpenRLHF framework https://github.com/OpenRLHF/OpenRLHF . diff --git a/examples/offline_inference/save_sharded_state.py b/examples/offline_inference/save_sharded_state.py index 4207f8922403..863276432cb9 100644 --- a/examples/offline_inference/save_sharded_state.py +++ b/examples/offline_inference/save_sharded_state.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Saves each worker's model state dict directly to a checkpoint, which enables a fast load path for large tensor-parallel models where each worker only needs to diff --git a/examples/offline_inference/scoring.py b/examples/offline_inference/scoring.py index 5da9e710959b..7daa82b82772 100644 --- a/examples/offline_inference/scoring.py +++ b/examples/offline_inference/scoring.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM # Sample prompts. diff --git a/examples/offline_inference/simple_profiling.py b/examples/offline_inference/simple_profiling.py index abcfa8e8f2f2..b45954b3bd54 100644 --- a/examples/offline_inference/simple_profiling.py +++ b/examples/offline_inference/simple_profiling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import time diff --git a/examples/offline_inference/structured_outputs.py b/examples/offline_inference/structured_outputs.py index 00d864606eef..38ffd7fb9903 100644 --- a/examples/offline_inference/structured_outputs.py +++ b/examples/offline_inference/structured_outputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from enum import Enum from pydantic import BaseModel diff --git a/examples/offline_inference/torchrun_example.py b/examples/offline_inference/torchrun_example.py index b6de73eb7266..35df6011550f 100644 --- a/examples/offline_inference/torchrun_example.py +++ b/examples/offline_inference/torchrun_example.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ experimental support for tensor-parallel inference with torchrun, see https://github.com/vllm-project/vllm/issues/11400 for diff --git a/examples/offline_inference/tpu.py b/examples/offline_inference/tpu.py index 251629b8027c..bd0e984627d1 100644 --- a/examples/offline_inference/tpu.py +++ b/examples/offline_inference/tpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams prompts = [ diff --git a/examples/offline_inference/vision_language.py b/examples/offline_inference/vision_language.py index 38c2b13d3f2c..65940b6ada88 100644 --- a/examples/offline_inference/vision_language.py +++ b/examples/offline_inference/vision_language.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use vLLM for running offline inference with the correct prompt format on vision language models for text generation. diff --git a/examples/offline_inference/vision_language_embedding.py b/examples/offline_inference/vision_language_embedding.py index 4ce3d496bf45..3075fbbfa0f3 100644 --- a/examples/offline_inference/vision_language_embedding.py +++ b/examples/offline_inference/vision_language_embedding.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use vLLM for running offline inference with the correct prompt format on vision language models for multimodal embedding. diff --git a/examples/offline_inference/vision_language_multi_image.py b/examples/offline_inference/vision_language_multi_image.py index 43c44fa867e0..601ac96e16ea 100644 --- a/examples/offline_inference/vision_language_multi_image.py +++ b/examples/offline_inference/vision_language_multi_image.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This example shows how to use vLLM for running offline inference with multi-image input on vision language models for text generation, diff --git a/examples/offline_inference/whisper.py b/examples/offline_inference/whisper.py index 087ad4376fb2..59c119a772da 100644 --- a/examples/offline_inference/whisper.py +++ b/examples/offline_inference/whisper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from vllm import LLM, SamplingParams diff --git a/examples/online_serving/api_client.py b/examples/online_serving/api_client.py index 49a085febdc5..623e0d59a30e 100644 --- a/examples/online_serving/api_client.py +++ b/examples/online_serving/api_client.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Example Python client for `vllm.entrypoints.api_server` NOTE: The API server is used only for demonstration and simple performance benchmarks. It is not intended for production use. diff --git a/examples/online_serving/cohere_rerank_client.py b/examples/online_serving/cohere_rerank_client.py index a07affe3351c..fc434ada1d15 100644 --- a/examples/online_serving/cohere_rerank_client.py +++ b/examples/online_serving/cohere_rerank_client.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Example of using the OpenAI entrypoint's rerank API which is compatible with the Cohere SDK: https://github.com/cohere-ai/cohere-python diff --git a/examples/online_serving/gradio_openai_chatbot_webserver.py b/examples/online_serving/gradio_openai_chatbot_webserver.py index 8ceb8f68ea0c..ee01e1eae628 100644 --- a/examples/online_serving/gradio_openai_chatbot_webserver.py +++ b/examples/online_serving/gradio_openai_chatbot_webserver.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import gradio as gr diff --git a/examples/online_serving/gradio_webserver.py b/examples/online_serving/gradio_webserver.py index 54e907582986..c619146b03ae 100644 --- a/examples/online_serving/gradio_webserver.py +++ b/examples/online_serving/gradio_webserver.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import json diff --git a/examples/online_serving/jinaai_rerank_client.py b/examples/online_serving/jinaai_rerank_client.py index bf4de76ddf36..3e760e171788 100644 --- a/examples/online_serving/jinaai_rerank_client.py +++ b/examples/online_serving/jinaai_rerank_client.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Example of using the OpenAI entrypoint's rerank API which is compatible with Jina and Cohere https://jina.ai/reranker diff --git a/examples/online_serving/openai_chat_completion_client.py b/examples/online_serving/openai_chat_completion_client.py index bbada3891bd1..a81562041130 100644 --- a/examples/online_serving/openai_chat_completion_client.py +++ b/examples/online_serving/openai_chat_completion_client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from openai import OpenAI # Modify OpenAI's API key and API base to use vLLM's API server. diff --git a/examples/online_serving/openai_chat_completion_client_for_multimodal.py b/examples/online_serving/openai_chat_completion_client_for_multimodal.py index 03cc037bb677..d5f798a8dae6 100644 --- a/examples/online_serving/openai_chat_completion_client_for_multimodal.py +++ b/examples/online_serving/openai_chat_completion_client_for_multimodal.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """An example showing how to use vLLM to serve multimodal models and run online serving with OpenAI client. diff --git a/examples/online_serving/openai_chat_completion_client_with_tools.py b/examples/online_serving/openai_chat_completion_client_with_tools.py index 2bbe42b6bd2e..416fb61ca8bb 100644 --- a/examples/online_serving/openai_chat_completion_client_with_tools.py +++ b/examples/online_serving/openai_chat_completion_client_with_tools.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Set up this example by starting a vLLM OpenAI-compatible server with tool call options enabled. For example: diff --git a/examples/online_serving/openai_chat_completion_structured_outputs.py b/examples/online_serving/openai_chat_completion_structured_outputs.py index 8c059c7ca07c..cddd9318000b 100644 --- a/examples/online_serving/openai_chat_completion_structured_outputs.py +++ b/examples/online_serving/openai_chat_completion_structured_outputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from enum import Enum from openai import OpenAI diff --git a/examples/online_serving/openai_chat_completion_with_reasoning.py b/examples/online_serving/openai_chat_completion_with_reasoning.py index 83e51a48bcc6..a88c8adb55c2 100644 --- a/examples/online_serving/openai_chat_completion_with_reasoning.py +++ b/examples/online_serving/openai_chat_completion_with_reasoning.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ An example shows how to generate chat completions from reasoning models like DeepSeekR1. diff --git a/examples/online_serving/openai_chat_completion_with_reasoning_streaming.py b/examples/online_serving/openai_chat_completion_with_reasoning_streaming.py index 8c14aac6b4ec..489bfcd5ec2a 100644 --- a/examples/online_serving/openai_chat_completion_with_reasoning_streaming.py +++ b/examples/online_serving/openai_chat_completion_with_reasoning_streaming.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ An example shows how to generate chat completions from reasoning models like DeepSeekR1. diff --git a/examples/online_serving/openai_chat_embedding_client_for_multimodal.py b/examples/online_serving/openai_chat_embedding_client_for_multimodal.py index a56e7429b756..f49d7a228191 100644 --- a/examples/online_serving/openai_chat_embedding_client_for_multimodal.py +++ b/examples/online_serving/openai_chat_embedding_client_for_multimodal.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import base64 import io diff --git a/examples/online_serving/openai_completion_client.py b/examples/online_serving/openai_completion_client.py index 58519f978d34..06b93d7d1931 100644 --- a/examples/online_serving/openai_completion_client.py +++ b/examples/online_serving/openai_completion_client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from openai import OpenAI # Modify OpenAI's API key and API base to use vLLM's API server. diff --git a/examples/online_serving/openai_cross_encoder_score.py b/examples/online_serving/openai_cross_encoder_score.py index 365a684d53f2..67c5fc91bc65 100644 --- a/examples/online_serving/openai_cross_encoder_score.py +++ b/examples/online_serving/openai_cross_encoder_score.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Example online usage of Score API. diff --git a/examples/online_serving/openai_embedding_client.py b/examples/online_serving/openai_embedding_client.py index 4bd7ca01d750..cb110997464a 100644 --- a/examples/online_serving/openai_embedding_client.py +++ b/examples/online_serving/openai_embedding_client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from openai import OpenAI # Modify OpenAI's API key and API base to use vLLM's API server. diff --git a/examples/online_serving/openai_pooling_client.py b/examples/online_serving/openai_pooling_client.py index 37ec8f2fb6be..e17f9c5efd65 100644 --- a/examples/online_serving/openai_pooling_client.py +++ b/examples/online_serving/openai_pooling_client.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Example online usage of Pooling API. diff --git a/examples/online_serving/opentelemetry/dummy_client.py b/examples/online_serving/opentelemetry/dummy_client.py index b1a2b3c3c4aa..7a605f85b97f 100644 --- a/examples/online_serving/opentelemetry/dummy_client.py +++ b/examples/online_serving/opentelemetry/dummy_client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import requests from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( OTLPSpanExporter) diff --git a/examples/other/tensorize_vllm_model.py b/examples/other/tensorize_vllm_model.py index 5fff1fdf502c..68345e6cb98d 100644 --- a/examples/other/tensorize_vllm_model.py +++ b/examples/other/tensorize_vllm_model.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import dataclasses import json diff --git a/find_cuda_init.py b/find_cuda_init.py index 51db23102f9a..0d13b2f86210 100644 --- a/find_cuda_init.py +++ b/find_cuda_init.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import importlib import traceback from typing import Callable diff --git a/python_only_dev.py b/python_only_dev.py index 7d95ac96e6e4..a303697b780a 100644 --- a/python_only_dev.py +++ b/python_only_dev.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + msg = """Old style python only build (without compilation) is deprecated, please check https://docs.vllm.ai/en/latest/getting_started/installation.html#python-only-build-without-compilation for the new way to do python only build (without compilation). TL;DR: diff --git a/setup.py b/setup.py index 50a2392a4d83..50265d46e7d6 100755 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ctypes import importlib.util import logging diff --git a/tests/async_engine/api_server_async_engine.py b/tests/async_engine/api_server_async_engine.py index a3c9d5c6e089..d9ac611644df 100644 --- a/tests/async_engine/api_server_async_engine.py +++ b/tests/async_engine/api_server_async_engine.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """vllm.entrypoints.api_server with some extra logging for testing.""" from typing import Any, Dict, Iterable diff --git a/tests/async_engine/test_api_server.py b/tests/async_engine/test_api_server.py index 91ac35dd67bb..77f3fb0025a0 100644 --- a/tests/async_engine/test_api_server.py +++ b/tests/async_engine/test_api_server.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import subprocess import sys import time diff --git a/tests/async_engine/test_async_llm_engine.py b/tests/async_engine/test_async_llm_engine.py index 8a04693ba676..ca29abc92850 100644 --- a/tests/async_engine/test_async_llm_engine.py +++ b/tests/async_engine/test_async_llm_engine.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os import uuid diff --git a/tests/async_engine/test_request_tracker.py b/tests/async_engine/test_request_tracker.py index 5668cc30d32c..fd6d89d4e00d 100644 --- a/tests/async_engine/test_request_tracker.py +++ b/tests/async_engine/test_request_tracker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.engine.async_llm_engine import RequestTracker diff --git a/tests/basic_correctness/test_basic_correctness.py b/tests/basic_correctness/test_basic_correctness.py index 23285040642a..2792dfde733e 100644 --- a/tests/basic_correctness/test_basic_correctness.py +++ b/tests/basic_correctness/test_basic_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the short outputs of HF and vLLM when using greedy sampling. Run `pytest tests/basic_correctness/test_basic_correctness.py`. diff --git a/tests/basic_correctness/test_chunked_prefill.py b/tests/basic_correctness/test_chunked_prefill.py index 469d18a4dd7a..cefd54d1c71a 100644 --- a/tests/basic_correctness/test_chunked_prefill.py +++ b/tests/basic_correctness/test_chunked_prefill.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM when using greedy sampling. It tests chunked prefill. Chunked prefill can be enabled by diff --git a/tests/basic_correctness/test_cpu_offload.py b/tests/basic_correctness/test_cpu_offload.py index d7f36a781280..b4d558ce22e4 100644 --- a/tests/basic_correctness/test_cpu_offload.py +++ b/tests/basic_correctness/test_cpu_offload.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from ..utils import compare_two_settings diff --git a/tests/basic_correctness/test_cumem.py b/tests/basic_correctness/test_cumem.py index 53f4ef08f36a..da9239b09407 100644 --- a/tests/basic_correctness/test_cumem.py +++ b/tests/basic_correctness/test_cumem.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from vllm import LLM, SamplingParams diff --git a/tests/basic_correctness/test_preemption.py b/tests/basic_correctness/test_preemption.py index 4b27dcbc8609..6aaec6eef9de 100644 --- a/tests/basic_correctness/test_preemption.py +++ b/tests/basic_correctness/test_preemption.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the short outputs of HF and vLLM when using greedy sampling. VLLM_TEST_ENABLE_ARTIFICIAL_PREEMPT=1 has to be set before running this test. diff --git a/tests/compile/backend.py b/tests/compile/backend.py index 8fa10e5bd1b3..74bc58a2dd54 100644 --- a/tests/compile/backend.py +++ b/tests/compile/backend.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from copy import deepcopy from typing import Callable, Union diff --git a/tests/compile/piecewise/test_simple.py b/tests/compile/piecewise/test_simple.py index aa11524812cd..9d633ad259b1 100644 --- a/tests/compile/piecewise/test_simple.py +++ b/tests/compile/piecewise/test_simple.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Test the piecewise compilation with a simple model so that we can exactly calculate the expected output and side effects. diff --git a/tests/compile/piecewise/test_toy_llama.py b/tests/compile/piecewise/test_toy_llama.py index d4ede4d2320a..0404722bab89 100644 --- a/tests/compile/piecewise/test_toy_llama.py +++ b/tests/compile/piecewise/test_toy_llama.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Test the piecewise compilation with a simple model, comparing the output with and without the piecewise compilation. diff --git a/tests/compile/test_basic_correctness.py b/tests/compile/test_basic_correctness.py index 1945479fc303..d7acec690d88 100644 --- a/tests/compile/test_basic_correctness.py +++ b/tests/compile/test_basic_correctness.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import Dict, List, Optional diff --git a/tests/compile/test_full_graph.py b/tests/compile/test_full_graph.py index 4dfdfe21a67d..6e83fa36881e 100644 --- a/tests/compile/test_full_graph.py +++ b/tests/compile/test_full_graph.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.config import CompilationLevel diff --git a/tests/compile/test_functionalization.py b/tests/compile/test_functionalization.py index ea3aaee9565e..8f5040522692 100644 --- a/tests/compile/test_functionalization.py +++ b/tests/compile/test_functionalization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/compile/test_fusion.py b/tests/compile/test_fusion.py index b4266a4a7db9..c14f0caab539 100644 --- a/tests/compile/test_fusion.py +++ b/tests/compile/test_fusion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch from compressed_tensors.quantization import FP8_DTYPE diff --git a/tests/compile/test_pass_manager.py b/tests/compile/test_pass_manager.py index 03e7535093c5..70920ab10ec2 100644 --- a/tests/compile/test_pass_manager.py +++ b/tests/compile/test_pass_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle import pytest diff --git a/tests/compile/test_wrapper.py b/tests/compile/test_wrapper.py index 74f66baaa5ea..0934c6113579 100644 --- a/tests/compile/test_wrapper.py +++ b/tests/compile/test_wrapper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional import torch diff --git a/tests/compile/utils.py b/tests/compile/utils.py index 7c92d165d05f..e4a88584e158 100644 --- a/tests/compile/utils.py +++ b/tests/compile/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import torch diff --git a/tests/conftest.py b/tests/conftest.py index 279c1bf9a377..85dd5bcb0dd1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import os import tempfile diff --git a/tests/core/block/conftest.py b/tests/core/block/conftest.py index 0464d6a74da6..b7a9863f4aaf 100644 --- a/tests/core/block/conftest.py +++ b/tests/core/block/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest diff --git a/tests/core/block/e2e/conftest.py b/tests/core/block/e2e/conftest.py index 70577ec052a2..7d3ccaadaca1 100644 --- a/tests/core/block/e2e/conftest.py +++ b/tests/core/block/e2e/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, Iterable, Optional import pytest diff --git a/tests/core/block/e2e/test_correctness.py b/tests/core/block/e2e/test_correctness.py index 86502f613b18..e9b537ed5150 100644 --- a/tests/core/block/e2e/test_correctness.py +++ b/tests/core/block/e2e/test_correctness.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from itertools import cycle import pytest diff --git a/tests/core/block/e2e/test_correctness_sliding_window.py b/tests/core/block/e2e/test_correctness_sliding_window.py index 415d0bd8237d..c874608e40a2 100644 --- a/tests/core/block/e2e/test_correctness_sliding_window.py +++ b/tests/core/block/e2e/test_correctness_sliding_window.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import List diff --git a/tests/core/block/test_block_manager.py b/tests/core/block/test_block_manager.py index cfd749ad5869..68d9618ae245 100644 --- a/tests/core/block/test_block_manager.py +++ b/tests/core/block/test_block_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.core.block.utils import (STR_NOT_IMPL_ENC_DEC_PREFIX_CACHE, diff --git a/tests/core/block/test_block_table.py b/tests/core/block/test_block_table.py index e2391a5680b3..d8cf0bec709a 100644 --- a/tests/core/block/test_block_table.py +++ b/tests/core/block/test_block_table.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/core/block/test_common.py b/tests/core/block/test_common.py index cfdd3582ed2e..20260873003d 100644 --- a/tests/core/block/test_common.py +++ b/tests/core/block/test_common.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random import pytest diff --git a/tests/core/block/test_cpu_gpu_block_allocator.py b/tests/core/block/test_cpu_gpu_block_allocator.py index a9e38d40444a..a1414edd9562 100644 --- a/tests/core/block/test_cpu_gpu_block_allocator.py +++ b/tests/core/block/test_cpu_gpu_block_allocator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.core.block.cpu_gpu_block_allocator import CpuGpuBlockAllocator diff --git a/tests/core/block/test_naive_block.py b/tests/core/block/test_naive_block.py index 10d5964dcfe8..0ca2a0b8054d 100644 --- a/tests/core/block/test_naive_block.py +++ b/tests/core/block/test_naive_block.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional import pytest diff --git a/tests/core/block/test_prefix_caching_block.py b/tests/core/block/test_prefix_caching_block.py index 6642174c17d8..771627a57dac 100644 --- a/tests/core/block/test_prefix_caching_block.py +++ b/tests/core/block/test_prefix_caching_block.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math import random from typing import List, Optional diff --git a/tests/core/test_chunked_prefill_scheduler.py b/tests/core/test_chunked_prefill_scheduler.py index eaaf004df38b..8da25aea457d 100644 --- a/tests/core/test_chunked_prefill_scheduler.py +++ b/tests/core/test_chunked_prefill_scheduler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List from unittest.mock import MagicMock diff --git a/tests/core/test_num_computed_tokens_update.py b/tests/core/test_num_computed_tokens_update.py index bd4accab7f37..a4a90144482b 100644 --- a/tests/core/test_num_computed_tokens_update.py +++ b/tests/core/test_num_computed_tokens_update.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from tests.conftest import VllmRunner diff --git a/tests/core/test_scheduler.py b/tests/core/test_scheduler.py index 8f6de84e566e..dcc97ebaa7c5 100644 --- a/tests/core/test_scheduler.py +++ b/tests/core/test_scheduler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from collections import deque from typing import List, Set, Tuple diff --git a/tests/core/test_scheduler_encoder_decoder.py b/tests/core/test_scheduler_encoder_decoder.py index 16bea54936bc..a4e3c73a5a7b 100644 --- a/tests/core/test_scheduler_encoder_decoder.py +++ b/tests/core/test_scheduler_encoder_decoder.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest # noqa diff --git a/tests/core/test_serialization.py b/tests/core/test_serialization.py index d604e5250a3f..64b3e148ee72 100644 --- a/tests/core/test_serialization.py +++ b/tests/core/test_serialization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import msgspec from vllm.executor.msgspec_utils import decode_hook, encode_hook diff --git a/tests/core/utils.py b/tests/core/utils.py index 16703cd19fa1..fb77dccce1c9 100644 --- a/tests/core/utils.py +++ b/tests/core/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from collections import defaultdict from typing import Any, Dict, List, Optional diff --git a/tests/distributed/test_ca_buffer_sharing.py b/tests/distributed/test_ca_buffer_sharing.py index fc4043cd3014..72e7ebdb7b59 100644 --- a/tests/distributed/test_ca_buffer_sharing.py +++ b/tests/distributed/test_ca_buffer_sharing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # can only run on machines with p2p access across GPUs # can only run with torchrun: # torchrun --nproc_per_node=2 tests/distributed/test_ca_buffer_sharing.py diff --git a/tests/distributed/test_comm_ops.py b/tests/distributed/test_comm_ops.py index d01f187521fe..bc916e8de07c 100644 --- a/tests/distributed/test_comm_ops.py +++ b/tests/distributed/test_comm_ops.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test the communication operators. Run `pytest tests/distributed/test_comm_ops.py`. diff --git a/tests/distributed/test_custom_all_reduce.py b/tests/distributed/test_custom_all_reduce.py index 4072616fd30e..46887bca42a9 100644 --- a/tests/distributed/test_custom_all_reduce.py +++ b/tests/distributed/test_custom_all_reduce.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import random diff --git a/tests/distributed/test_distributed_oot.py b/tests/distributed/test_distributed_oot.py index 62e77a2f7759..4b0c65d1d3a4 100644 --- a/tests/distributed/test_distributed_oot.py +++ b/tests/distributed/test_distributed_oot.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from ..entrypoints.openai.test_oot_registration import ( run_and_test_dummy_opt_api_server) diff --git a/tests/distributed/test_multi_node_assignment.py b/tests/distributed/test_multi_node_assignment.py index 9f9c0ff07ee3..c86d2d8a0061 100644 --- a/tests/distributed/test_multi_node_assignment.py +++ b/tests/distributed/test_multi_node_assignment.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Make sure ray assigns GPU workers to the correct node. Run: diff --git a/tests/distributed/test_pipeline_parallel.py b/tests/distributed/test_pipeline_parallel.py index ddbf40f08940..5b6741d74efc 100644 --- a/tests/distributed/test_pipeline_parallel.py +++ b/tests/distributed/test_pipeline_parallel.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ WARNING: This test runs in both single-node (4 GPUs) and multi-node (2 node with 2 GPUs each) modes. If the test only uses 2 GPUs, it is diff --git a/tests/distributed/test_pipeline_partition.py b/tests/distributed/test_pipeline_partition.py index 2d4d07dd2752..3ed104820b47 100644 --- a/tests/distributed/test_pipeline_partition.py +++ b/tests/distributed/test_pipeline_partition.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pytest diff --git a/tests/distributed/test_pp_cudagraph.py b/tests/distributed/test_pp_cudagraph.py index 4912858d8279..3bc85b05e7d1 100644 --- a/tests/distributed/test_pp_cudagraph.py +++ b/tests/distributed/test_pp_cudagraph.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pytest diff --git a/tests/distributed/test_pynccl.py b/tests/distributed/test_pynccl.py index a8571a115789..4c42a0ed8112 100644 --- a/tests/distributed/test_pynccl.py +++ b/tests/distributed/test_pynccl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import multiprocessing import os from typing import Dict, List diff --git a/tests/distributed/test_same_node.py b/tests/distributed/test_same_node.py index 62311a626bc4..9b1bbd6e545c 100644 --- a/tests/distributed/test_same_node.py +++ b/tests/distributed/test_same_node.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import torch.distributed as dist diff --git a/tests/distributed/test_shm_broadcast.py b/tests/distributed/test_shm_broadcast.py index 723872682cf9..59fa7cc9f319 100644 --- a/tests/distributed/test_shm_broadcast.py +++ b/tests/distributed/test_shm_broadcast.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import multiprocessing import random import time diff --git a/tests/distributed/test_torchrun_example.py b/tests/distributed/test_torchrun_example.py index 7aa03d7f0402..a092a548a59c 100644 --- a/tests/distributed/test_torchrun_example.py +++ b/tests/distributed/test_torchrun_example.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # unit test for `examples/offline_inference/torchrun_example.py` import random diff --git a/tests/distributed/test_utils.py b/tests/distributed/test_utils.py index 5fb1ae7b29fd..4432950f274e 100644 --- a/tests/distributed/test_utils.py +++ b/tests/distributed/test_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import socket import pytest diff --git a/tests/encoder_decoder/test_e2e_correctness.py b/tests/encoder_decoder/test_e2e_correctness.py index fa5d6a69a9bc..d0e4f86250bb 100644 --- a/tests/encoder_decoder/test_e2e_correctness.py +++ b/tests/encoder_decoder/test_e2e_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """E2E tests to verify the correctness of the encoder-decoder framework Run `pytest tests/encoder_decoder/test_e2e_correctness.py`. diff --git a/tests/engine/output_processor/test_multi_step.py b/tests/engine/output_processor/test_multi_step.py index 88f3fad4c79f..3ba3c4ec53a5 100644 --- a/tests/engine/output_processor/test_multi_step.py +++ b/tests/engine/output_processor/test_multi_step.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from unittest.mock import MagicMock diff --git a/tests/engine/output_processor/test_stop_checker.py b/tests/engine/output_processor/test_stop_checker.py index cc14e8cbf75d..e9ad8d161210 100644 --- a/tests/engine/output_processor/test_stop_checker.py +++ b/tests/engine/output_processor/test_stop_checker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from unittest.mock import MagicMock import pytest diff --git a/tests/engine/test_arg_utils.py b/tests/engine/test_arg_utils.py index 4e269de9fc40..8698d124e73f 100644 --- a/tests/engine/test_arg_utils.py +++ b/tests/engine/test_arg_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from argparse import ArgumentTypeError import pytest diff --git a/tests/engine/test_computed_prefix_blocks.py b/tests/engine/test_computed_prefix_blocks.py index ed35212cc3f1..dca8fa6026ab 100644 --- a/tests/engine/test_computed_prefix_blocks.py +++ b/tests/engine/test_computed_prefix_blocks.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.engine.arg_utils import EngineArgs diff --git a/tests/engine/test_custom_executor.py b/tests/engine/test_custom_executor.py index 0e33f3662da8..3e77faecbd3f 100644 --- a/tests/engine/test_custom_executor.py +++ b/tests/engine/test_custom_executor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union diff --git a/tests/engine/test_detokenization.py b/tests/engine/test_detokenization.py index f77f6d0725b6..742176ea8b60 100644 --- a/tests/engine/test_detokenization.py +++ b/tests/engine/test_detokenization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.entrypoints.llm import LLM diff --git a/tests/engine/test_multiproc_workers.py b/tests/engine/test_multiproc_workers.py index 04505fcaae24..f1fe58e35a32 100644 --- a/tests/engine/test_multiproc_workers.py +++ b/tests/engine/test_multiproc_workers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from concurrent.futures import ThreadPoolExecutor from functools import partial diff --git a/tests/engine/test_short_mm_context.py b/tests/engine/test_short_mm_context.py index a6ba7a131c50..d5111e3fda8f 100644 --- a/tests/engine/test_short_mm_context.py +++ b/tests/engine/test_short_mm_context.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from ..conftest import IMAGE_ASSETS diff --git a/tests/engine/test_skip_tokenizer_init.py b/tests/engine/test_skip_tokenizer_init.py index b8818af5614c..655c8232ac77 100644 --- a/tests/engine/test_skip_tokenizer_init.py +++ b/tests/engine/test_skip_tokenizer_init.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.entrypoints.llm import LLM diff --git a/tests/engine/test_stop_reason.py b/tests/engine/test_stop_reason.py index b0bd6c4aa95d..a50b388048c9 100644 --- a/tests/engine/test_stop_reason.py +++ b/tests/engine/test_stop_reason.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test the different finish_reason="stop" situations during generation: 1. One of the provided stop strings 2. One of the provided stop tokens diff --git a/tests/engine/test_stop_strings.py b/tests/engine/test_stop_strings.py index 499935620c16..0f633bb26da9 100644 --- a/tests/engine/test_stop_strings.py +++ b/tests/engine/test_stop_strings.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, List, Optional import pytest diff --git a/tests/entrypoints/conftest.py b/tests/entrypoints/conftest.py index ef74062ce4b4..b00e168db9d3 100644 --- a/tests/entrypoints/conftest.py +++ b/tests/entrypoints/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest diff --git a/tests/entrypoints/llm/test_accuracy.py b/tests/entrypoints/llm/test_accuracy.py index 6bf7190a656b..29ff00df6d50 100644 --- a/tests/entrypoints/llm/test_accuracy.py +++ b/tests/entrypoints/llm/test_accuracy.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This file test accuracy of the vLLM server via LMEval. It uses local-completions, which interacts with vLLM diff --git a/tests/entrypoints/llm/test_chat.py b/tests/entrypoints/llm/test_chat.py index fc66386fd2d2..77c80b2f8944 100644 --- a/tests/entrypoints/llm/test_chat.py +++ b/tests/entrypoints/llm/test_chat.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/entrypoints/llm/test_collective_rpc.py b/tests/entrypoints/llm/test_collective_rpc.py index 22473ce27529..39d4810de9e7 100644 --- a/tests/entrypoints/llm/test_collective_rpc.py +++ b/tests/entrypoints/llm/test_collective_rpc.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm import LLM diff --git a/tests/entrypoints/llm/test_encode.py b/tests/entrypoints/llm/test_encode.py index 3906ad766e0b..ebec8baba38d 100644 --- a/tests/entrypoints/llm/test_encode.py +++ b/tests/entrypoints/llm/test_encode.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import weakref from typing import List diff --git a/tests/entrypoints/llm/test_generate.py b/tests/entrypoints/llm/test_generate.py index 7d2b37775272..4c78c2c8ee2e 100644 --- a/tests/entrypoints/llm/test_generate.py +++ b/tests/entrypoints/llm/test_generate.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import weakref from typing import List diff --git a/tests/entrypoints/llm/test_generate_multiple_loras.py b/tests/entrypoints/llm/test_generate_multiple_loras.py index eb2113692e7b..90e1d5814137 100644 --- a/tests/entrypoints/llm/test_generate_multiple_loras.py +++ b/tests/entrypoints/llm/test_generate_multiple_loras.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import weakref import pytest diff --git a/tests/entrypoints/llm/test_gpu_utilization.py b/tests/entrypoints/llm/test_gpu_utilization.py index c2dab300ecef..c2b4a935886b 100644 --- a/tests/entrypoints/llm/test_gpu_utilization.py +++ b/tests/entrypoints/llm/test_gpu_utilization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams diff --git a/tests/entrypoints/llm/test_guided_generate.py b/tests/entrypoints/llm/test_guided_generate.py index ccb9906fc5c0..932a35a9950e 100644 --- a/tests/entrypoints/llm/test_guided_generate.py +++ b/tests/entrypoints/llm/test_guided_generate.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import re import weakref diff --git a/tests/entrypoints/llm/test_init.py b/tests/entrypoints/llm/test_init.py index c9a4ad44fea3..925bf56a9340 100644 --- a/tests/entrypoints/llm/test_init.py +++ b/tests/entrypoints/llm/test_init.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm import LLM diff --git a/tests/entrypoints/llm/test_lazy_outlines.py b/tests/entrypoints/llm/test_lazy_outlines.py index bf609b38a94f..b1f9ae14da07 100644 --- a/tests/entrypoints/llm/test_lazy_outlines.py +++ b/tests/entrypoints/llm/test_lazy_outlines.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import sys from contextlib import nullcontext diff --git a/tests/entrypoints/llm/test_prompt_validation.py b/tests/entrypoints/llm/test_prompt_validation.py index ee7010a23811..f2c145fa3c2b 100644 --- a/tests/entrypoints/llm/test_prompt_validation.py +++ b/tests/entrypoints/llm/test_prompt_validation.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm import LLM diff --git a/tests/entrypoints/offline_mode/test_offline_mode.py b/tests/entrypoints/offline_mode/test_offline_mode.py index 65699e609e4a..eac76f2ba0fa 100644 --- a/tests/entrypoints/offline_mode/test_offline_mode.py +++ b/tests/entrypoints/offline_mode/test_offline_mode.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for HF_HUB_OFFLINE mode""" import importlib import sys diff --git a/tests/entrypoints/openai/reasoning_parsers/test_deepseekr1_reasoning_parser.py b/tests/entrypoints/openai/reasoning_parsers/test_deepseekr1_reasoning_parser.py index 4607e4dfe4d0..f7b81be48bd1 100644 --- a/tests/entrypoints/openai/reasoning_parsers/test_deepseekr1_reasoning_parser.py +++ b/tests/entrypoints/openai/reasoning_parsers/test_deepseekr1_reasoning_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/entrypoints/openai/reasoning_parsers/utils.py b/tests/entrypoints/openai/reasoning_parsers/utils.py index ac73ad50a739..2157e059594b 100644 --- a/tests/entrypoints/openai/reasoning_parsers/utils.py +++ b/tests/entrypoints/openai/reasoning_parsers/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple, Union from vllm.entrypoints.openai.protocol import (ChatCompletionRequest, diff --git a/tests/entrypoints/openai/test_accuracy.py b/tests/entrypoints/openai/test_accuracy.py index b1d4461d164a..df25780cd0f4 100644 --- a/tests/entrypoints/openai/test_accuracy.py +++ b/tests/entrypoints/openai/test_accuracy.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This file test accuracy of the vLLM server via LMEval. It uses local-completions, which interacts with vLLM diff --git a/tests/entrypoints/openai/test_async_tokenization.py b/tests/entrypoints/openai/test_async_tokenization.py index fcce8b46c434..1f7ba0da4f24 100644 --- a/tests/entrypoints/openai/test_async_tokenization.py +++ b/tests/entrypoints/openai/test_async_tokenization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import contextlib import random diff --git a/tests/entrypoints/openai/test_audio.py b/tests/entrypoints/openai/test_audio.py index 1116c0da1a6f..6e206dfd99b6 100644 --- a/tests/entrypoints/openai/test_audio.py +++ b/tests/entrypoints/openai/test_audio.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List import openai diff --git a/tests/entrypoints/openai/test_basic.py b/tests/entrypoints/openai/test_basic.py index 547c1fd02092..0d44a7611aed 100644 --- a/tests/entrypoints/openai/test_basic.py +++ b/tests/entrypoints/openai/test_basic.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from http import HTTPStatus from typing import List diff --git a/tests/entrypoints/openai/test_chat.py b/tests/entrypoints/openai/test_chat.py index 5e6499d8f563..4b5ad55c5eda 100644 --- a/tests/entrypoints/openai/test_chat.py +++ b/tests/entrypoints/openai/test_chat.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # imports for guided decoding tests import json import re diff --git a/tests/entrypoints/openai/test_chat_echo.py b/tests/entrypoints/openai/test_chat_echo.py index 223ac5b41aa8..3e76158a8c14 100644 --- a/tests/entrypoints/openai/test_chat_echo.py +++ b/tests/entrypoints/openai/test_chat_echo.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import NamedTuple import openai # use the official client for correctness check diff --git a/tests/entrypoints/openai/test_chat_template.py b/tests/entrypoints/openai/test_chat_template.py index e1e1dcff7475..255aba139ad3 100644 --- a/tests/entrypoints/openai/test_chat_template.py +++ b/tests/entrypoints/openai/test_chat_template.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.entrypoints.chat_utils import (apply_hf_chat_template, diff --git a/tests/entrypoints/openai/test_chunked_prompt.py b/tests/entrypoints/openai/test_chunked_prompt.py index 61d66365130c..0419395f1816 100644 --- a/tests/entrypoints/openai/test_chunked_prompt.py +++ b/tests/entrypoints/openai/test_chunked_prompt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import openai # use the official client for correctness check import pytest import pytest_asyncio diff --git a/tests/entrypoints/openai/test_cli_args.py b/tests/entrypoints/openai/test_cli_args.py index 01bcd78aa91a..2f065ec1070e 100644 --- a/tests/entrypoints/openai/test_cli_args.py +++ b/tests/entrypoints/openai/test_cli_args.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import pytest diff --git a/tests/entrypoints/openai/test_completion.py b/tests/entrypoints/openai/test_completion.py index 183d900c493e..28671cc27571 100644 --- a/tests/entrypoints/openai/test_completion.py +++ b/tests/entrypoints/openai/test_completion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # imports for guided decoding tests import json import re diff --git a/tests/entrypoints/openai/test_embedding.py b/tests/entrypoints/openai/test_embedding.py index b52a5b28c9cf..e86ea87dd661 100644 --- a/tests/entrypoints/openai/test_embedding.py +++ b/tests/entrypoints/openai/test_embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import base64 import numpy as np diff --git a/tests/entrypoints/openai/test_encoder_decoder.py b/tests/entrypoints/openai/test_encoder_decoder.py index 51eba694e62a..52b4df9ceecd 100644 --- a/tests/entrypoints/openai/test_encoder_decoder.py +++ b/tests/entrypoints/openai/test_encoder_decoder.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import openai import pytest import pytest_asyncio diff --git a/tests/entrypoints/openai/test_lora_adapters.py b/tests/entrypoints/openai/test_lora_adapters.py index 6ff99f6faa14..1a62157acc47 100644 --- a/tests/entrypoints/openai/test_lora_adapters.py +++ b/tests/entrypoints/openai/test_lora_adapters.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import json import shutil diff --git a/tests/entrypoints/openai/test_metrics.py b/tests/entrypoints/openai/test_metrics.py index 941f465711ef..a9134be62322 100644 --- a/tests/entrypoints/openai/test_metrics.py +++ b/tests/entrypoints/openai/test_metrics.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import subprocess import sys import tempfile diff --git a/tests/entrypoints/openai/test_models.py b/tests/entrypoints/openai/test_models.py index ae5bf404d3d2..3d4f1cde2789 100644 --- a/tests/entrypoints/openai/test_models.py +++ b/tests/entrypoints/openai/test_models.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import openai # use the official client for correctness check import pytest import pytest_asyncio diff --git a/tests/entrypoints/openai/test_oot_registration.py b/tests/entrypoints/openai/test_oot_registration.py index b25cb1d0e722..a1b7a205a457 100644 --- a/tests/entrypoints/openai/test_oot_registration.py +++ b/tests/entrypoints/openai/test_oot_registration.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from ...utils import VLLM_PATH, RemoteOpenAIServer chatml_jinja_path = VLLM_PATH / "examples/template_chatml.jinja" diff --git a/tests/entrypoints/openai/test_pooling.py b/tests/entrypoints/openai/test_pooling.py index 9c49239398cd..11d3bfafab1c 100644 --- a/tests/entrypoints/openai/test_pooling.py +++ b/tests/entrypoints/openai/test_pooling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import base64 import numpy as np diff --git a/tests/entrypoints/openai/test_prompt_validation.py b/tests/entrypoints/openai/test_prompt_validation.py index 1ae64ef492d5..64a1eb6a63ee 100644 --- a/tests/entrypoints/openai/test_prompt_validation.py +++ b/tests/entrypoints/openai/test_prompt_validation.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # imports for guided decoding tests import re diff --git a/tests/entrypoints/openai/test_rerank.py b/tests/entrypoints/openai/test_rerank.py index cfd8f3313396..4c9774a7397d 100644 --- a/tests/entrypoints/openai/test_rerank.py +++ b/tests/entrypoints/openai/test_rerank.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import requests diff --git a/tests/entrypoints/openai/test_return_tokens_as_ids.py b/tests/entrypoints/openai/test_return_tokens_as_ids.py index 99f6da160d6f..9b33eddae2a8 100644 --- a/tests/entrypoints/openai/test_return_tokens_as_ids.py +++ b/tests/entrypoints/openai/test_return_tokens_as_ids.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Separate these tests out from test_completion and test_chat, because they # require launching a second server with a different flag. Running both servers # at the same time on a single node will OOM. diff --git a/tests/entrypoints/openai/test_root_path.py b/tests/entrypoints/openai/test_root_path.py index 20f7960619ef..ad8159afc875 100644 --- a/tests/entrypoints/openai/test_root_path.py +++ b/tests/entrypoints/openai/test_root_path.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import contextlib import os from typing import Any, List, NamedTuple diff --git a/tests/entrypoints/openai/test_run_batch.py b/tests/entrypoints/openai/test_run_batch.py index 1f8a56bb43ac..db049ee2bfd8 100644 --- a/tests/entrypoints/openai/test_run_batch.py +++ b/tests/entrypoints/openai/test_run_batch.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import subprocess import sys diff --git a/tests/entrypoints/openai/test_score.py b/tests/entrypoints/openai/test_score.py index 0d19615bc0d9..bcbcb5702c95 100644 --- a/tests/entrypoints/openai/test_score.py +++ b/tests/entrypoints/openai/test_score.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import requests diff --git a/tests/entrypoints/openai/test_serving_chat.py b/tests/entrypoints/openai/test_serving_chat.py index e88d6c3c6782..1e7dbaf60dc0 100644 --- a/tests/entrypoints/openai/test_serving_chat.py +++ b/tests/entrypoints/openai/test_serving_chat.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from contextlib import suppress from dataclasses import dataclass diff --git a/tests/entrypoints/openai/test_serving_models.py b/tests/entrypoints/openai/test_serving_models.py index 657ea20213ec..70ca8507a546 100644 --- a/tests/entrypoints/openai/test_serving_models.py +++ b/tests/entrypoints/openai/test_serving_models.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from http import HTTPStatus from unittest.mock import MagicMock diff --git a/tests/entrypoints/openai/test_shutdown.py b/tests/entrypoints/openai/test_shutdown.py index 090523a836e1..5edf85ab52f5 100644 --- a/tests/entrypoints/openai/test_shutdown.py +++ b/tests/entrypoints/openai/test_shutdown.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import openai import pytest diff --git a/tests/entrypoints/openai/test_tokenization.py b/tests/entrypoints/openai/test_tokenization.py index b1956a8cbc9d..663b722426c5 100644 --- a/tests/entrypoints/openai/test_tokenization.py +++ b/tests/entrypoints/openai/test_tokenization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import pytest_asyncio import requests diff --git a/tests/entrypoints/openai/test_video.py b/tests/entrypoints/openai/test_video.py index e73449e40673..ab9285407d2a 100644 --- a/tests/entrypoints/openai/test_video.py +++ b/tests/entrypoints/openai/test_video.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List import openai diff --git a/tests/entrypoints/openai/test_vision.py b/tests/entrypoints/openai/test_vision.py index 5f070ba3b12e..029c9b038b04 100644 --- a/tests/entrypoints/openai/test_vision.py +++ b/tests/entrypoints/openai/test_vision.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List import openai diff --git a/tests/entrypoints/openai/test_vision_embedding.py b/tests/entrypoints/openai/test_vision_embedding.py index c851539c610e..f2ff4a0b07a5 100644 --- a/tests/entrypoints/openai/test_vision_embedding.py +++ b/tests/entrypoints/openai/test_vision_embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict import pytest diff --git a/tests/entrypoints/openai/tool_parsers/test_pythonic_tool_parser.py b/tests/entrypoints/openai/tool_parsers/test_pythonic_tool_parser.py index 47b0b6bb80ff..788efa86b109 100644 --- a/tests/entrypoints/openai/tool_parsers/test_pythonic_tool_parser.py +++ b/tests/entrypoints/openai/tool_parsers/test_pythonic_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List from unittest.mock import MagicMock diff --git a/tests/entrypoints/openai/tool_parsers/utils.py b/tests/entrypoints/openai/tool_parsers/utils.py index f0a2a32c1678..57ec9865355d 100644 --- a/tests/entrypoints/openai/tool_parsers/utils.py +++ b/tests/entrypoints/openai/tool_parsers/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Iterable, List, Tuple, Union from vllm.entrypoints.openai.protocol import (ChatCompletionRequest, diff --git a/tests/entrypoints/test_chat_utils.py b/tests/entrypoints/test_chat_utils.py index 513b466c10d6..737f733092b6 100644 --- a/tests/entrypoints/test_chat_utils.py +++ b/tests/entrypoints/test_chat_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import warnings from typing import Optional diff --git a/tests/kernels/allclose_default.py b/tests/kernels/allclose_default.py index 175cfe82fb74..97ceffab4eb8 100644 --- a/tests/kernels/allclose_default.py +++ b/tests/kernels/allclose_default.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch # Reference default values of atol and rtol are from diff --git a/tests/kernels/conftest.py b/tests/kernels/conftest.py index 4f2f9cc3dac7..4f04ec947532 100644 --- a/tests/kernels/conftest.py +++ b/tests/kernels/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.utils import (create_kv_caches_with_random, diff --git a/tests/kernels/quant_utils.py b/tests/kernels/quant_utils.py index f2358940fc7b..34dcf91c7666 100644 --- a/tests/kernels/quant_utils.py +++ b/tests/kernels/quant_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple, Union import torch diff --git a/tests/kernels/test_activation.py b/tests/kernels/test_activation.py index dac26efe866b..2e70b1db35c4 100644 --- a/tests/kernels/test_activation.py +++ b/tests/kernels/test_activation.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import Type diff --git a/tests/kernels/test_aqlm.py b/tests/kernels/test_aqlm.py index 860fb66b1735..7d36172815b7 100644 --- a/tests/kernels/test_aqlm.py +++ b/tests/kernels/test_aqlm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from tests.kernels.utils import opcheck diff --git a/tests/kernels/test_attention.py b/tests/kernels/test_attention.py index 574a0f223ef0..b667d8d9e030 100644 --- a/tests/kernels/test_attention.py +++ b/tests/kernels/test_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import List, Optional, Tuple diff --git a/tests/kernels/test_attention_selector.py b/tests/kernels/test_attention_selector.py index 492acb91e8ed..0e87437312ea 100644 --- a/tests/kernels/test_attention_selector.py +++ b/tests/kernels/test_attention_selector.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from unittest.mock import Mock, patch import pytest diff --git a/tests/kernels/test_awq.py b/tests/kernels/test_awq.py index aa7a430850f9..ace75a336173 100644 --- a/tests/kernels/test_awq.py +++ b/tests/kernels/test_awq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pytest diff --git a/tests/kernels/test_awq_marlin.py b/tests/kernels/test_awq_marlin.py index 238d6426bf09..67595010cb2a 100644 --- a/tests/kernels/test_awq_marlin.py +++ b/tests/kernels/test_awq_marlin.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test AWQ with fused MoE Marlin kernels. Run `pytest tests/kernels/test_awq_marlin.py`. diff --git a/tests/kernels/test_awq_triton.py b/tests/kernels/test_awq_triton.py index 406a0c8dd808..3fc3feaf4972 100644 --- a/tests/kernels/test_awq_triton.py +++ b/tests/kernels/test_awq_triton.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for the AWQ Triton kernel. Run `pytest tests/kernels/test_awq_triton.py`. diff --git a/tests/kernels/test_block_fp8.py b/tests/kernels/test_block_fp8.py index f28fdf3feedb..20eff1c20723 100644 --- a/tests/kernels/test_block_fp8.py +++ b/tests/kernels/test_block_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from https://github.com/sgl-project/sglang/pull/2575 import itertools diff --git a/tests/kernels/test_blocksparse_attention.py b/tests/kernels/test_blocksparse_attention.py index 08f31219e357..e653d34d00ee 100644 --- a/tests/kernels/test_blocksparse_attention.py +++ b/tests/kernels/test_blocksparse_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import List, Optional, Tuple diff --git a/tests/kernels/test_cache.py b/tests/kernels/test_cache.py index c848be4f9d80..6f909b6803d3 100644 --- a/tests/kernels/test_cache.py +++ b/tests/kernels/test_cache.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import List, Tuple diff --git a/tests/kernels/test_cascade_flash_attn.py b/tests/kernels/test_cascade_flash_attn.py index 8edfde42ede7..8cc1a6a1b49f 100755 --- a/tests/kernels/test_cascade_flash_attn.py +++ b/tests/kernels/test_cascade_flash_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple import pytest diff --git a/tests/kernels/test_causal_conv1d.py b/tests/kernels/test_causal_conv1d.py index 51be2425d7dd..93064e23dd7d 100644 --- a/tests/kernels/test_causal_conv1d.py +++ b/tests/kernels/test_causal_conv1d.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional import pytest diff --git a/tests/kernels/test_cutlass.py b/tests/kernels/test_cutlass.py index f538d492c2df..49fd8ed634f1 100644 --- a/tests/kernels/test_cutlass.py +++ b/tests/kernels/test_cutlass.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for cutlass kernels Run `pytest tests/kernels/test_cutlass.py`. diff --git a/tests/kernels/test_cutlass_2of4_sparse.py b/tests/kernels/test_cutlass_2of4_sparse.py index 56495df34aa6..4c613b75fc6f 100644 --- a/tests/kernels/test_cutlass_2of4_sparse.py +++ b/tests/kernels/test_cutlass_2of4_sparse.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for sparse cutlass kernels Run `pytest tests/kernels/test_semi_structured.py`. diff --git a/tests/kernels/test_encoder_decoder_attn.py b/tests/kernels/test_encoder_decoder_attn.py index e008a56de620..0d11e8652ce6 100644 --- a/tests/kernels/test_encoder_decoder_attn.py +++ b/tests/kernels/test_encoder_decoder_attn.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Tests: diff --git a/tests/kernels/test_flash_attn.py b/tests/kernels/test_flash_attn.py index 0ee0bf6c6a37..b8af89b660a6 100644 --- a/tests/kernels/test_flash_attn.py +++ b/tests/kernels/test_flash_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple import pytest diff --git a/tests/kernels/test_flashinfer.py b/tests/kernels/test_flashinfer.py index 1645ef911d69..212ceb5e4174 100644 --- a/tests/kernels/test_flashinfer.py +++ b/tests/kernels/test_flashinfer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple import flashinfer diff --git a/tests/kernels/test_fp8_quant.py b/tests/kernels/test_fp8_quant.py index ebaaae232188..876cf03fd644 100644 --- a/tests/kernels/test_fp8_quant.py +++ b/tests/kernels/test_fp8_quant.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/kernels/test_fused_quant_layernorm.py b/tests/kernels/test_fused_quant_layernorm.py index baf8d73fdbff..d4b674b23534 100644 --- a/tests/kernels/test_fused_quant_layernorm.py +++ b/tests/kernels/test_fused_quant_layernorm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple, Union import pytest diff --git a/tests/kernels/test_ggml.py b/tests/kernels/test_ggml.py index dddb285bf26e..dc728fd4861d 100644 --- a/tests/kernels/test_ggml.py +++ b/tests/kernels/test_ggml.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import gguf import pytest import torch diff --git a/tests/kernels/test_gguf.py b/tests/kernels/test_gguf.py index 893af99ba497..847ca9f43105 100644 --- a/tests/kernels/test_gguf.py +++ b/tests/kernels/test_gguf.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from pathlib import Path from typing import List diff --git a/tests/kernels/test_gptq.py b/tests/kernels/test_gptq.py index c1ca6f1f5191..fea013d9e579 100644 --- a/tests/kernels/test_gptq.py +++ b/tests/kernels/test_gptq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from tests.kernels.utils import opcheck diff --git a/tests/kernels/test_int8_quant.py b/tests/kernels/test_int8_quant.py index 761eb95c423f..25dcb587e487 100644 --- a/tests/kernels/test_int8_quant.py +++ b/tests/kernels/test_int8_quant.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/kernels/test_layernorm.py b/tests/kernels/test_layernorm.py index 727769e07184..fa4bbe458645 100644 --- a/tests/kernels/test_layernorm.py +++ b/tests/kernels/test_layernorm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/kernels/test_machete_mm.py b/tests/kernels/test_machete_mm.py index 1c6eb2dd9a22..bd60526ed9b7 100644 --- a/tests/kernels/test_machete_mm.py +++ b/tests/kernels/test_machete_mm.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for the machete kernel. Run `pytest tests/kernels/test_machete_mm.py`. diff --git a/tests/kernels/test_mamba_ssm.py b/tests/kernels/test_mamba_ssm.py index 19d1158c79c7..84d4c347e0d8 100644 --- a/tests/kernels/test_mamba_ssm.py +++ b/tests/kernels/test_mamba_ssm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch import torch.nn.functional as F diff --git a/tests/kernels/test_marlin_gemm.py b/tests/kernels/test_marlin_gemm.py index 5e047f4b099f..b96aca06cdff 100644 --- a/tests/kernels/test_marlin_gemm.py +++ b/tests/kernels/test_marlin_gemm.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for the marlin kernel. Run `pytest tests/kernels/marlin/test_marlin_gemm.py`. diff --git a/tests/kernels/test_mha_attn.py b/tests/kernels/test_mha_attn.py index eab874e9e02b..5a18b7916f0f 100644 --- a/tests/kernels/test_mha_attn.py +++ b/tests/kernels/test_mha_attn.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Test: diff --git a/tests/kernels/test_moe.py b/tests/kernels/test_moe.py index 7aa248ed1475..0f13fbc96503 100644 --- a/tests/kernels/test_moe.py +++ b/tests/kernels/test_moe.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for the MOE layers. Run `pytest tests/kernels/test_moe.py`. diff --git a/tests/kernels/test_permute_cols.py b/tests/kernels/test_permute_cols.py index 14ad7a22cf7c..35d62079fb65 100644 --- a/tests/kernels/test_permute_cols.py +++ b/tests/kernels/test_permute_cols.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/kernels/test_pos_encoding.py b/tests/kernels/test_pos_encoding.py index eee77c22ab81..5b7b0fda2be6 100644 --- a/tests/kernels/test_pos_encoding.py +++ b/tests/kernels/test_pos_encoding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from itertools import accumulate, product from typing import Dict, List, Optional diff --git a/tests/kernels/test_prefix_prefill.py b/tests/kernels/test_prefix_prefill.py index 10e73ab950b0..2184c98525fe 100644 --- a/tests/kernels/test_prefix_prefill.py +++ b/tests/kernels/test_prefix_prefill.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math import random import time diff --git a/tests/kernels/test_rotary_embedding.py b/tests/kernels/test_rotary_embedding.py index da879406b393..362bcb35ceab 100644 --- a/tests/kernels/test_rotary_embedding.py +++ b/tests/kernels/test_rotary_embedding.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Tests for miscellaneous utilities """ diff --git a/tests/kernels/test_triton_decode_attention.py b/tests/kernels/test_triton_decode_attention.py index 14f5a3b770b6..fd3c9fa4196a 100644 --- a/tests/kernels/test_triton_decode_attention.py +++ b/tests/kernels/test_triton_decode_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/kernels/test_triton_scaled_mm.py b/tests/kernels/test_triton_scaled_mm.py index a5aab3c2ea4b..d878ed6f4514 100644 --- a/tests/kernels/test_triton_scaled_mm.py +++ b/tests/kernels/test_triton_scaled_mm.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for the triton_scaled_mm kernel Run `pytest tests/kernels/test_triton_scaled_mm.py`. diff --git a/tests/kernels/test_utils.py b/tests/kernels/test_utils.py index 7e5126a76f88..d3f032002651 100644 --- a/tests/kernels/test_utils.py +++ b/tests/kernels/test_utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Tests for miscellaneous utilities """ diff --git a/tests/kernels/utils.py b/tests/kernels/utils.py index c735c5edd7a3..5be111d71308 100644 --- a/tests/kernels/utils.py +++ b/tests/kernels/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Kernel test utils""" import itertools diff --git a/tests/kv_transfer/disagg_test.py b/tests/kv_transfer/disagg_test.py index adc6150edece..97e0d6eb1f93 100644 --- a/tests/kv_transfer/disagg_test.py +++ b/tests/kv_transfer/disagg_test.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import subprocess import sys diff --git a/tests/kv_transfer/module_test.py b/tests/kv_transfer/module_test.py index 355461919cd7..8a6490b5c887 100644 --- a/tests/kv_transfer/module_test.py +++ b/tests/kv_transfer/module_test.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import subprocess import sys diff --git a/tests/kv_transfer/test_lookup_buffer.py b/tests/kv_transfer/test_lookup_buffer.py index 4d6890305af7..c5b34660d165 100644 --- a/tests/kv_transfer/test_lookup_buffer.py +++ b/tests/kv_transfer/test_lookup_buffer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import random diff --git a/tests/kv_transfer/test_send_recv.py b/tests/kv_transfer/test_send_recv.py index 1cc1ced9968d..181a5ac207fe 100644 --- a/tests/kv_transfer/test_send_recv.py +++ b/tests/kv_transfer/test_send_recv.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import time from typing import List diff --git a/tests/lora/conftest.py b/tests/lora/conftest.py index e7378d00765f..071cdbecc689 100644 --- a/tests/lora/conftest.py +++ b/tests/lora/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import tempfile from collections import OrderedDict from typing import Dict, List, TypedDict diff --git a/tests/lora/data/long_context_test_data.py b/tests/lora/data/long_context_test_data.py index 61b8899f0533..2d33f738bd87 100644 --- a/tests/lora/data/long_context_test_data.py +++ b/tests/lora/data/long_context_test_data.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa """This file contains a dictionary of prompts and golden responses.""" diff --git a/tests/lora/test_baichuan.py b/tests/lora/test_baichuan.py index 0ba2ce3617b6..249f7619d624 100644 --- a/tests/lora/test_baichuan.py +++ b/tests/lora/test_baichuan.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_chatglm3_tp.py b/tests/lora/test_chatglm3_tp.py index 49a527b99ac1..0aa9fe7a9494 100644 --- a/tests/lora/test_chatglm3_tp.py +++ b/tests/lora/test_chatglm3_tp.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import vllm diff --git a/tests/lora/test_gemma.py b/tests/lora/test_gemma.py index 5ae705e474ec..8923aa2210a5 100644 --- a/tests/lora/test_gemma.py +++ b/tests/lora/test_gemma.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_jamba.py b/tests/lora/test_jamba.py index 6aa33926cb6b..c04174665897 100644 --- a/tests/lora/test_jamba.py +++ b/tests/lora/test_jamba.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_layers.py b/tests/lora/test_layers.py index 08a589d7ee29..0838ca02c9b7 100644 --- a/tests/lora/test_layers.py +++ b/tests/lora/test_layers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from copy import deepcopy from dataclasses import dataclass diff --git a/tests/lora/test_llama_tp.py b/tests/lora/test_llama_tp.py index dfeac380951d..39f779f400ca 100644 --- a/tests/lora/test_llama_tp.py +++ b/tests/lora/test_llama_tp.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import ray diff --git a/tests/lora/test_long_context.py b/tests/lora/test_long_context.py index e7a34f2ced7e..62005de73ddb 100644 --- a/tests/lora/test_long_context.py +++ b/tests/lora/test_long_context.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ast from typing import List, Optional, Tuple diff --git a/tests/lora/test_lora_bias_e2e.py b/tests/lora/test_lora_bias_e2e.py index c2520c847d87..cbdd688311d7 100644 --- a/tests/lora/test_lora_bias_e2e.py +++ b/tests/lora/test_lora_bias_e2e.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_lora_checkpoints.py b/tests/lora/test_lora_checkpoints.py index b907af47d08d..d2a4b901bd8d 100644 --- a/tests/lora/test_lora_checkpoints.py +++ b/tests/lora/test_lora_checkpoints.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_lora_huggingface.py b/tests/lora/test_lora_huggingface.py index 1c0ee01c038d..273fe9ae0eb5 100644 --- a/tests/lora/test_lora_huggingface.py +++ b/tests/lora/test_lora_huggingface.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_lora_manager.py b/tests/lora/test_lora_manager.py index 9a5b9aabf507..6666f54fdebd 100644 --- a/tests/lora/test_lora_manager.py +++ b/tests/lora/test_lora_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Dict, List diff --git a/tests/lora/test_minicpmv_tp.py b/tests/lora/test_minicpmv_tp.py index 3b0f18325a40..2e81bb326710 100644 --- a/tests/lora/test_minicpmv_tp.py +++ b/tests/lora/test_minicpmv_tp.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_mixtral.py b/tests/lora/test_mixtral.py index 940a86522880..90cf8fd39a18 100644 --- a/tests/lora/test_mixtral.py +++ b/tests/lora/test_mixtral.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_peft_helper.py b/tests/lora/test_peft_helper.py index a524d5ce5f34..9935472ad18f 100644 --- a/tests/lora/test_peft_helper.py +++ b/tests/lora/test_peft_helper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import math import shutil diff --git a/tests/lora/test_phi.py b/tests/lora/test_phi.py index 5a3fcb8d690d..651c89ffce2d 100644 --- a/tests/lora/test_phi.py +++ b/tests/lora/test_phi.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import vllm diff --git a/tests/lora/test_punica_ops_sizes.py b/tests/lora/test_punica_ops_sizes.py index 433ca7577d08..ecd3bc4978f3 100644 --- a/tests/lora/test_punica_ops_sizes.py +++ b/tests/lora/test_punica_ops_sizes.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This script is mainly used to tests various hidden_sizes. We have collected the hidden_sizes included in the LoRA models currently supported by vLLM. It tests diff --git a/tests/lora/test_punica_ops_variation.py b/tests/lora/test_punica_ops_variation.py index 2bb84c1cf11e..6d1d3c9430f3 100644 --- a/tests/lora/test_punica_ops_variation.py +++ b/tests/lora/test_punica_ops_variation.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This script is mainly used to test whether trtion kernels can run normally under different conditions, including various batches, numbers of LoRA , and diff --git a/tests/lora/test_quant_model.py b/tests/lora/test_quant_model.py index 26bf770cc0d4..5702aa26bd91 100644 --- a/tests/lora/test_quant_model.py +++ b/tests/lora/test_quant_model.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/fmmoret/vllm/blob/fm-support-lora-on-quantized-models/tests/lora/test_llama.py from dataclasses import dataclass diff --git a/tests/lora/test_qwen2vl.py b/tests/lora/test_qwen2vl.py index 570aa3861d0b..a988f06ab25f 100644 --- a/tests/lora/test_qwen2vl.py +++ b/tests/lora/test_qwen2vl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/lora/test_tokenizer_group.py b/tests/lora/test_tokenizer_group.py index d225a3f7d6c0..589167e801f1 100644 --- a/tests/lora/test_tokenizer_group.py +++ b/tests/lora/test_tokenizer_group.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from transformers import AutoTokenizer, PreTrainedTokenizerBase diff --git a/tests/lora/test_utils.py b/tests/lora/test_utils.py index 85110b8fa8cd..34a26e9edf36 100644 --- a/tests/lora/test_utils.py +++ b/tests/lora/test_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import OrderedDict from unittest.mock import patch diff --git a/tests/lora/test_worker.py b/tests/lora/test_worker.py index 9d814f657ac4..797141ea39e8 100644 --- a/tests/lora/test_worker.py +++ b/tests/lora/test_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import random import tempfile diff --git a/tests/lora/utils.py b/tests/lora/utils.py index ce47546f2154..bda00e08190e 100644 --- a/tests/lora/utils.py +++ b/tests/lora/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List, Optional import torch diff --git a/tests/metrics/test_metrics.py b/tests/metrics/test_metrics.py index b3c7850556f9..0942c8eed344 100644 --- a/tests/metrics/test_metrics.py +++ b/tests/metrics/test_metrics.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from typing import List diff --git a/tests/model_executor/conftest.py b/tests/model_executor/conftest.py index 10792b0a0499..b588a1a96638 100644 --- a/tests/model_executor/conftest.py +++ b/tests/model_executor/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest diff --git a/tests/model_executor/test_enabled_custom_ops.py b/tests/model_executor/test_enabled_custom_ops.py index 0a3aba255fd7..2c6780848567 100644 --- a/tests/model_executor/test_enabled_custom_ops.py +++ b/tests/model_executor/test_enabled_custom_ops.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/model_executor/test_guided_processors.py b/tests/model_executor/test_guided_processors.py index be5282d9c822..64d0928f828f 100644 --- a/tests/model_executor/test_guided_processors.py +++ b/tests/model_executor/test_guided_processors.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle import pytest diff --git a/tests/model_executor/test_model_load_with_params.py b/tests/model_executor/test_model_load_with_params.py index 9c1f784c1c93..760a11993523 100644 --- a/tests/model_executor/test_model_load_with_params.py +++ b/tests/model_executor/test_model_load_with_params.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pytest diff --git a/tests/model_executor/weight_utils.py b/tests/model_executor/weight_utils.py index c8b9bed691bb..11dfe4d4995d 100644 --- a/tests/model_executor/weight_utils.py +++ b/tests/model_executor/weight_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import tempfile diff --git a/tests/models/decoder_only/audio_language/test_ultravox.py b/tests/models/decoder_only/audio_language/test_ultravox.py index 1e329dc4cb22..fe9361d12612 100644 --- a/tests/models/decoder_only/audio_language/test_ultravox.py +++ b/tests/models/decoder_only/audio_language/test_ultravox.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple, Type import numpy as np diff --git a/tests/models/decoder_only/language/test_aqlm.py b/tests/models/decoder_only/language/test_aqlm.py index a8cb5bbf9349..85557b30d8b0 100644 --- a/tests/models/decoder_only/language/test_aqlm.py +++ b/tests/models/decoder_only/language/test_aqlm.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of a AQLM model between vLLM and HF Transformers Run `pytest tests/models/test_aqlm.py`. diff --git a/tests/models/decoder_only/language/test_fp8.py b/tests/models/decoder_only/language/test_fp8.py index 5f06f1e3a2fe..6a0e148d5673 100644 --- a/tests/models/decoder_only/language/test_fp8.py +++ b/tests/models/decoder_only/language/test_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # flake8: noqa """Tests fp8 models against ground truth generation Note: these tests will only pass on L4 GPU. diff --git a/tests/models/decoder_only/language/test_gguf.py b/tests/models/decoder_only/language/test_gguf.py index ad8f8a0c320e..57fe1d5b1515 100644 --- a/tests/models/decoder_only/language/test_gguf.py +++ b/tests/models/decoder_only/language/test_gguf.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Tests gguf models against unquantized models generations Note: To pass the test, quantization higher than Q4 should be used diff --git a/tests/models/decoder_only/language/test_gptq_marlin.py b/tests/models/decoder_only/language/test_gptq_marlin.py index 037411a18c19..0f61466c3997 100644 --- a/tests/models/decoder_only/language/test_gptq_marlin.py +++ b/tests/models/decoder_only/language/test_gptq_marlin.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compares the outputs of gptq vs gptq_marlin Note: GPTQ and Marlin do not have bitwise correctness. As a result, in this test, we just confirm that the top selected tokens of the diff --git a/tests/models/decoder_only/language/test_gptq_marlin_24.py b/tests/models/decoder_only/language/test_gptq_marlin_24.py index 26cb3ec31070..c8162614849c 100644 --- a/tests/models/decoder_only/language/test_gptq_marlin_24.py +++ b/tests/models/decoder_only/language/test_gptq_marlin_24.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of a GPTQ model to a Marlin_24 model. Note: GPTQ and Marlin_24 do not have bitwise correctness. diff --git a/tests/models/decoder_only/language/test_granite.py b/tests/models/decoder_only/language/test_granite.py index 5e93842f4616..119b79d64c96 100644 --- a/tests/models/decoder_only/language/test_granite.py +++ b/tests/models/decoder_only/language/test_granite.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM for Granite models using greedy sampling. Run `pytest tests/models/test_granite.py`. diff --git a/tests/models/decoder_only/language/test_jamba.py b/tests/models/decoder_only/language/test_jamba.py index 2e06b10fbb82..cc98f1d7b5ce 100644 --- a/tests/models/decoder_only/language/test_jamba.py +++ b/tests/models/decoder_only/language/test_jamba.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from tests.utils import multi_gpu_test diff --git a/tests/models/decoder_only/language/test_mamba.py b/tests/models/decoder_only/language/test_mamba.py index 1ad4f5aae8f5..854f4fe4f919 100644 --- a/tests/models/decoder_only/language/test_mamba.py +++ b/tests/models/decoder_only/language/test_mamba.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM when using greedy sampling for Mamba. Run `pytest tests/models/test_mamba.py`. diff --git a/tests/models/decoder_only/language/test_mistral.py b/tests/models/decoder_only/language/test_mistral.py index bdc1571784b5..17923673023f 100644 --- a/tests/models/decoder_only/language/test_mistral.py +++ b/tests/models/decoder_only/language/test_mistral.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM for Mistral models using greedy sampling. Run `pytest tests/models/test_mistral.py`. diff --git a/tests/models/decoder_only/language/test_modelopt.py b/tests/models/decoder_only/language/test_modelopt.py index 077e50e3a4df..66dd979579c4 100644 --- a/tests/models/decoder_only/language/test_modelopt.py +++ b/tests/models/decoder_only/language/test_modelopt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # flake8: noqa """Tests Model Optimizer fp8 models against ground truth generation Note: these tests will only pass on H100 diff --git a/tests/models/decoder_only/language/test_models.py b/tests/models/decoder_only/language/test_models.py index c7efa4edbbc0..1ad56241535b 100644 --- a/tests/models/decoder_only/language/test_models.py +++ b/tests/models/decoder_only/language/test_models.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM when using greedy sampling. Run `pytest tests/models/test_models.py`. diff --git a/tests/models/decoder_only/language/test_phimoe.py b/tests/models/decoder_only/language/test_phimoe.py index c997359a2781..f9757d6ac295 100644 --- a/tests/models/decoder_only/language/test_phimoe.py +++ b/tests/models/decoder_only/language/test_phimoe.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM for moe models using greedy sampling. Run `pytest tests/models/test_phimoe.py`. diff --git a/tests/models/decoder_only/vision_language/test_awq.py b/tests/models/decoder_only/vision_language/test_awq.py index 18ceb34a4e04..31a5cd260a1d 100644 --- a/tests/models/decoder_only/vision_language/test_awq.py +++ b/tests/models/decoder_only/vision_language/test_awq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Type import pytest diff --git a/tests/models/decoder_only/vision_language/test_h2ovl.py b/tests/models/decoder_only/vision_language/test_h2ovl.py index 7406df253e7f..9590adf6f73c 100644 --- a/tests/models/decoder_only/vision_language/test_h2ovl.py +++ b/tests/models/decoder_only/vision_language/test_h2ovl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple import pytest diff --git a/tests/models/decoder_only/vision_language/test_intern_vit.py b/tests/models/decoder_only/vision_language/test_intern_vit.py index 32fcb0bbc42f..a842d14fee2e 100644 --- a/tests/models/decoder_only/vision_language/test_intern_vit.py +++ b/tests/models/decoder_only/vision_language/test_intern_vit.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional import pytest diff --git a/tests/models/decoder_only/vision_language/test_models.py b/tests/models/decoder_only/vision_language/test_models.py index 62c644f73d62..e3cda8971b78 100644 --- a/tests/models/decoder_only/vision_language/test_models.py +++ b/tests/models/decoder_only/vision_language/test_models.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Common tests for testing .generate() functionality for single / multiple image, embedding, and video support for different VLMs in vLLM. """ diff --git a/tests/models/decoder_only/vision_language/test_phi3v.py b/tests/models/decoder_only/vision_language/test_phi3v.py index 3a8934adfb07..dd68fe4cd55e 100644 --- a/tests/models/decoder_only/vision_language/test_phi3v.py +++ b/tests/models/decoder_only/vision_language/test_phi3v.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import re from typing import List, Optional, Tuple, Type diff --git a/tests/models/decoder_only/vision_language/test_pixtral.py b/tests/models/decoder_only/vision_language/test_pixtral.py index 8103e5305b91..602da2b5f4ee 100644 --- a/tests/models/decoder_only/vision_language/test_pixtral.py +++ b/tests/models/decoder_only/vision_language/test_pixtral.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM for Mistral models using greedy sampling. Run `pytest tests/models/test_mistral.py`. diff --git a/tests/models/decoder_only/vision_language/test_qwen2_vl.py b/tests/models/decoder_only/vision_language/test_qwen2_vl.py index 5a485f3d8174..de240a904e47 100644 --- a/tests/models/decoder_only/vision_language/test_qwen2_vl.py +++ b/tests/models/decoder_only/vision_language/test_qwen2_vl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, List, Optional, Tuple, Type, TypedDict, Union import numpy.typing as npt diff --git a/tests/models/decoder_only/vision_language/vlm_utils/builders.py b/tests/models/decoder_only/vision_language/vlm_utils/builders.py index 59773be709fa..539410d18950 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/builders.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/builders.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Helpers for building inputs that can be leveraged for different test types. """ from pathlib import PosixPath diff --git a/tests/models/decoder_only/vision_language/vlm_utils/case_filtering.py b/tests/models/decoder_only/vision_language/vlm_utils/case_filtering.py index 9bb713416065..ca4ec2141182 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/case_filtering.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/case_filtering.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utils for determining which subset of model tests belong to a specific modality, getting all combinations (similar to pytest's parametrization), handling multimodal placeholder substitution, and so on. diff --git a/tests/models/decoder_only/vision_language/vlm_utils/core.py b/tests/models/decoder_only/vision_language/vlm_utils/core.py index 54b7b0733210..0aed267692ab 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/core.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/core.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Core test implementation to be shared across modalities.""" from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union @@ -153,4 +154,4 @@ def process_runner_outputs( def process_outputs(output_processor, model, outputs_per_image): """Applies a model specific post-processor function to a runner's output""" return [[output_processor(res, model) for res in outputs] - for outputs in outputs_per_image] \ No newline at end of file + for outputs in outputs_per_image] diff --git a/tests/models/decoder_only/vision_language/vlm_utils/custom_inputs.py b/tests/models/decoder_only/vision_language/vlm_utils/custom_inputs.py index 2291f4fa0d0a..2f03a114ae53 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/custom_inputs.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/custom_inputs.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Custom input builders for edge-cases in different models.""" from typing import Callable diff --git a/tests/models/decoder_only/vision_language/vlm_utils/model_utils.py b/tests/models/decoder_only/vision_language/vlm_utils/model_utils.py index 07bdb2cee44d..b0a88161c4c9 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/model_utils.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/model_utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Common utility functions relating to different models that are useful for manipulating the input / output of HF & vLLM test runners, which are typically specific to a small subset of models. diff --git a/tests/models/decoder_only/vision_language/vlm_utils/runners.py b/tests/models/decoder_only/vision_language/vlm_utils/runners.py index 2d3b39fe3594..fb9df37cad92 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/runners.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/runners.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Entrypoints for wrapping the core run_test implementation for specific test types / modalities. """ diff --git a/tests/models/decoder_only/vision_language/vlm_utils/types.py b/tests/models/decoder_only/vision_language/vlm_utils/types.py index e2e0c6390fcb..ae3b9d59bf9b 100644 --- a/tests/models/decoder_only/vision_language/vlm_utils/types.py +++ b/tests/models/decoder_only/vision_language/vlm_utils/types.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Types for writing multimodal model tests.""" from enum import Enum from pathlib import PosixPath diff --git a/tests/models/embedding/language/test_cls_models.py b/tests/models/embedding/language/test_cls_models.py index 0cbe4afe96c0..b0420ff5cc78 100644 --- a/tests/models/embedding/language/test_cls_models.py +++ b/tests/models/embedding/language/test_cls_models.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the classification outputs of HF and vLLM models. Run `pytest tests/models/test_cls_models.py`. diff --git a/tests/models/embedding/language/test_embedding.py b/tests/models/embedding/language/test_embedding.py index e17198e38547..ad6385376dc8 100644 --- a/tests/models/embedding/language/test_embedding.py +++ b/tests/models/embedding/language/test_embedding.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the embedding outputs of HF and vLLM models. Run `pytest tests/models/embedding/language/test_embedding.py`. diff --git a/tests/models/embedding/language/test_gritlm.py b/tests/models/embedding/language/test_gritlm.py index 55c2e5d4ed41..7ed2fb8a6358 100644 --- a/tests/models/embedding/language/test_gritlm.py +++ b/tests/models/embedding/language/test_gritlm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import importlib.util import math from array import array diff --git a/tests/models/embedding/language/test_scoring.py b/tests/models/embedding/language/test_scoring.py index 3db27d942ac8..d6408258ffce 100644 --- a/tests/models/embedding/language/test_scoring.py +++ b/tests/models/embedding/language/test_scoring.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the scoring outputs of HF and vLLM models. Run `pytest tests/models/embedding/language/test_scoring.py`. diff --git a/tests/models/embedding/utils.py b/tests/models/embedding/utils.py index f96c7d2b176d..567aa5098493 100644 --- a/tests/models/embedding/utils.py +++ b/tests/models/embedding/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Sequence import torch diff --git a/tests/models/embedding/vision_language/test_dse_qwen2_vl.py b/tests/models/embedding/vision_language/test_dse_qwen2_vl.py index 2641987b25a3..82f2bf53122a 100644 --- a/tests/models/embedding/vision_language/test_dse_qwen2_vl.py +++ b/tests/models/embedding/vision_language/test_dse_qwen2_vl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import partial from typing import Callable, Dict, List, Type diff --git a/tests/models/embedding/vision_language/test_llava_next.py b/tests/models/embedding/vision_language/test_llava_next.py index f4cd8b81a0d7..6ba3c5403896 100644 --- a/tests/models/embedding/vision_language/test_llava_next.py +++ b/tests/models/embedding/vision_language/test_llava_next.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Type import pytest diff --git a/tests/models/embedding/vision_language/test_phi3v.py b/tests/models/embedding/vision_language/test_phi3v.py index 9374c23dd6ff..0cb948746042 100644 --- a/tests/models/embedding/vision_language/test_phi3v.py +++ b/tests/models/embedding/vision_language/test_phi3v.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Type import pytest diff --git a/tests/models/encoder_decoder/audio_language/test_whisper.py b/tests/models/encoder_decoder/audio_language/test_whisper.py index eb238c533213..80d6897da7e0 100644 --- a/tests/models/encoder_decoder/audio_language/test_whisper.py +++ b/tests/models/encoder_decoder/audio_language/test_whisper.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM for Whisper models using greedy sampling. Run `pytest tests/models/encoder_decoder/audio/test_whisper.py`. diff --git a/tests/models/encoder_decoder/language/test_bart.py b/tests/models/encoder_decoder/language/test_bart.py index 10aba8427944..81b629fdcf1f 100644 --- a/tests/models/encoder_decoder/language/test_bart.py +++ b/tests/models/encoder_decoder/language/test_bart.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM for BART models using greedy sampling. Run `pytest tests/models/encoder_decoder/language/test_bart.py`. diff --git a/tests/models/encoder_decoder/vision_language/test_broadcast.py b/tests/models/encoder_decoder/vision_language/test_broadcast.py index 542f41a38859..8d986414eec8 100644 --- a/tests/models/encoder_decoder/vision_language/test_broadcast.py +++ b/tests/models/encoder_decoder/vision_language/test_broadcast.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from ....utils import multi_gpu_test diff --git a/tests/models/encoder_decoder/vision_language/test_florence2.py b/tests/models/encoder_decoder/vision_language/test_florence2.py index d686f1da3fa1..a1d15679918b 100644 --- a/tests/models/encoder_decoder/vision_language/test_florence2.py +++ b/tests/models/encoder_decoder/vision_language/test_florence2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import partial from typing import List, Optional, Tuple, Type diff --git a/tests/models/encoder_decoder/vision_language/test_mllama.py b/tests/models/encoder_decoder/vision_language/test_mllama.py index 16c71228ede7..4cd2dbdb4f98 100644 --- a/tests/models/encoder_decoder/vision_language/test_mllama.py +++ b/tests/models/encoder_decoder/vision_language/test_mllama.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple, Type, overload import pytest diff --git a/tests/models/multimodal/processing/test_common.py b/tests/models/multimodal/processing/test_common.py index ca28da268fa0..3921d4e19dd2 100644 --- a/tests/models/multimodal/processing/test_common.py +++ b/tests/models/multimodal/processing/test_common.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import partial import numpy as np diff --git a/tests/models/multimodal/processing/test_idefics3.py b/tests/models/multimodal/processing/test_idefics3.py index 69b91ad4a5df..00c1dae51158 100644 --- a/tests/models/multimodal/processing/test_idefics3.py +++ b/tests/models/multimodal/processing/test_idefics3.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for Idefics3's multimodal preprocessing kwargs.""" from typing import Optional diff --git a/tests/models/multimodal/processing/test_internvl.py b/tests/models/multimodal/processing/test_internvl.py index d6c60595ca5e..0d921e9d3296 100644 --- a/tests/models/multimodal/processing/test_internvl.py +++ b/tests/models/multimodal/processing/test_internvl.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for InternVL's multimodal preprocessing kwargs.""" from typing import Callable, Optional diff --git a/tests/models/multimodal/processing/test_llava_next.py b/tests/models/multimodal/processing/test_llava_next.py index 6de649f87204..d2497e62d91b 100644 --- a/tests/models/multimodal/processing/test_llava_next.py +++ b/tests/models/multimodal/processing/test_llava_next.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from functools import partial diff --git a/tests/models/multimodal/processing/test_llava_onevision.py b/tests/models/multimodal/processing/test_llava_onevision.py index 806437d35ec8..bd4dbd46da4c 100644 --- a/tests/models/multimodal/processing/test_llava_onevision.py +++ b/tests/models/multimodal/processing/test_llava_onevision.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from functools import partial diff --git a/tests/models/multimodal/processing/test_phi3v.py b/tests/models/multimodal/processing/test_phi3v.py index 7f82a8f18f0c..44edec457a66 100644 --- a/tests/models/multimodal/processing/test_phi3v.py +++ b/tests/models/multimodal/processing/test_phi3v.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for phi3v's multimodal preprocessing kwargs.""" import pytest diff --git a/tests/models/multimodal/processing/test_qwen2_vl.py b/tests/models/multimodal/processing/test_qwen2_vl.py index de14fbbffe5b..47c9b0add55a 100644 --- a/tests/models/multimodal/processing/test_qwen2_vl.py +++ b/tests/models/multimodal/processing/test_qwen2_vl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.multimodal import MULTIMODAL_REGISTRY diff --git a/tests/models/registry.py b/tests/models/registry.py index 7952e65aa76a..d0dbbf00e0c5 100644 --- a/tests/models/registry.py +++ b/tests/models/registry.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass, field from typing import AbstractSet, Any, Literal, Mapping, Optional diff --git a/tests/models/test_initialization.py b/tests/models/test_initialization.py index d3a3aaf670c2..64928a65d856 100644 --- a/tests/models/test_initialization.py +++ b/tests/models/test_initialization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from unittest.mock import patch import pytest diff --git a/tests/models/test_oot_registration.py b/tests/models/test_oot_registration.py index 2c413a633896..ef665baa1804 100644 --- a/tests/models/test_oot_registration.py +++ b/tests/models/test_oot_registration.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pytest diff --git a/tests/models/test_registry.py b/tests/models/test_registry.py index ac0366847e33..80d3f78f9f31 100644 --- a/tests/models/test_registry.py +++ b/tests/models/test_registry.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import warnings import pytest diff --git a/tests/models/utils.py b/tests/models/utils.py index 0eb3f61f1f04..e2be43c12667 100644 --- a/tests/models/utils.py +++ b/tests/models/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import warnings from typing import Dict, List, Optional, Sequence, Tuple, Union diff --git a/tests/mq_llm_engine/test_abort.py b/tests/mq_llm_engine/test_abort.py index 782b508a5714..808346b5e58d 100644 --- a/tests/mq_llm_engine/test_abort.py +++ b/tests/mq_llm_engine/test_abort.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test that aborting is handled properly.""" import asyncio diff --git a/tests/mq_llm_engine/test_error_handling.py b/tests/mq_llm_engine/test_error_handling.py index 83bc4e7cf847..35d001781110 100644 --- a/tests/mq_llm_engine/test_error_handling.py +++ b/tests/mq_llm_engine/test_error_handling.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test that various errors are handled properly.""" import asyncio diff --git a/tests/mq_llm_engine/test_load.py b/tests/mq_llm_engine/test_load.py index 630c112d0f0c..2069ff987f2f 100644 --- a/tests/mq_llm_engine/test_load.py +++ b/tests/mq_llm_engine/test_load.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test that the MQLLMEngine is able to handle 10k concurrent requests.""" import asyncio diff --git a/tests/mq_llm_engine/utils.py b/tests/mq_llm_engine/utils.py index f717c1355431..11e44f12bc56 100644 --- a/tests/mq_llm_engine/utils.py +++ b/tests/mq_llm_engine/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import multiprocessing from typing import Callable, Tuple, Union diff --git a/tests/multi_step/test_correctness_async_llm.py b/tests/multi_step/test_correctness_async_llm.py index b8524ed83026..9822cee14a25 100644 --- a/tests/multi_step/test_correctness_async_llm.py +++ b/tests/multi_step/test_correctness_async_llm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Test the AsyncLLMEngine with multi-step-decoding from typing import List, Optional diff --git a/tests/multi_step/test_correctness_llm.py b/tests/multi_step/test_correctness_llm.py index 34030d9d6ac6..29d5ffd4c9cb 100644 --- a/tests/multi_step/test_correctness_llm.py +++ b/tests/multi_step/test_correctness_llm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Test the LLMEngine with multi-step-decoding import copy diff --git a/tests/multimodal/test_inputs.py b/tests/multimodal/test_inputs.py index 678bbb52b8c2..f5d3e282f953 100644 --- a/tests/multimodal/test_inputs.py +++ b/tests/multimodal/test_inputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from vllm.multimodal.inputs import MultiModalKwargs, NestedTensors diff --git a/tests/multimodal/test_processing.py b/tests/multimodal/test_processing.py index 13f820d013e2..6cccd2aa2323 100644 --- a/tests/multimodal/test_processing.py +++ b/tests/multimodal/test_processing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from contextlib import nullcontext from typing import cast from unittest.mock import MagicMock diff --git a/tests/multimodal/test_processor_kwargs.py b/tests/multimodal/test_processor_kwargs.py index d141cdf1f083..5d18b2ed7566 100644 --- a/tests/multimodal/test_processor_kwargs.py +++ b/tests/multimodal/test_processor_kwargs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from array import array from typing import Callable, Dict, Mapping, Optional from unittest.mock import patch diff --git a/tests/multimodal/test_utils.py b/tests/multimodal/test_utils.py index 198344e5bd88..f9e0f507a1e8 100644 --- a/tests/multimodal/test_utils.py +++ b/tests/multimodal/test_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import base64 import mimetypes import os diff --git a/tests/multimodal/utils.py b/tests/multimodal/utils.py index 29aeca605109..9a336b7e60ff 100644 --- a/tests/multimodal/utils.py +++ b/tests/multimodal/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import numpy as np from PIL import Image diff --git a/tests/neuron/test_prefix_prefill.py b/tests/neuron/test_prefix_prefill.py index 77b707a73711..dfbcfc15e232 100644 --- a/tests/neuron/test_prefix_prefill.py +++ b/tests/neuron/test_prefix_prefill.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import Optional diff --git a/tests/plugins/vllm_add_dummy_model/setup.py b/tests/plugins/vllm_add_dummy_model/setup.py index 9b535127f1df..e3fb6efb2757 100644 --- a/tests/plugins/vllm_add_dummy_model/setup.py +++ b/tests/plugins/vllm_add_dummy_model/setup.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from setuptools import setup setup(name='vllm_add_dummy_model', diff --git a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/__init__.py b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/__init__.py index 62a8f871fa51..0c431cb39737 100644 --- a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/__init__.py +++ b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import ModelRegistry diff --git a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py index 5e7d7d1877e6..3af62b2885e5 100644 --- a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py +++ b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Iterable, List, Optional, Tuple, Union import torch diff --git a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_llava.py b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_llava.py index ac64edfd4ec9..c23ab64308f2 100644 --- a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_llava.py +++ b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_llava.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional import torch diff --git a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_opt.py b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_opt.py index 569ef216c9f0..bbd11ed4aac9 100644 --- a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_opt.py +++ b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_opt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional import torch diff --git a/tests/plugins/vllm_add_dummy_platform/setup.py b/tests/plugins/vllm_add_dummy_platform/setup.py index 31639906898d..10df0b5e0503 100644 --- a/tests/plugins/vllm_add_dummy_platform/setup.py +++ b/tests/plugins/vllm_add_dummy_platform/setup.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from setuptools import setup setup( diff --git a/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/__init__.py b/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/__init__.py index 594cef520a7d..0d1b062ac2eb 100644 --- a/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/__init__.py +++ b/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional diff --git a/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_attention_backend.py b/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_attention_backend.py index 5634be3c8d88..33425bbc11ed 100644 --- a/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_attention_backend.py +++ b/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_attention_backend.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.attention.backends.flash_attn import FlashAttentionBackend diff --git a/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_platform.py b/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_platform.py index d7c6bdd707eb..5cefafc7e06c 100644 --- a/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_platform.py +++ b/tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_platform.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.platforms.cuda import CudaPlatform diff --git a/tests/plugins_tests/test_platform_plugins.py b/tests/plugins_tests/test_platform_plugins.py index 661aa5f649ab..ed50fe535014 100644 --- a/tests/plugins_tests/test_platform_plugins.py +++ b/tests/plugins_tests/test_platform_plugins.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from tests.kernels.utils import override_backend_env_variable diff --git a/tests/prefix_caching/test_disable_sliding_window.py b/tests/prefix_caching/test_disable_sliding_window.py index 5a28943b7ecb..19f393e07984 100644 --- a/tests/prefix_caching/test_disable_sliding_window.py +++ b/tests/prefix_caching/test_disable_sliding_window.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the with and without prefix caching. Run `pytest tests/prefix_caching/test_prefix_caching.py`. diff --git a/tests/prefix_caching/test_prefix_caching.py b/tests/prefix_caching/test_prefix_caching.py index 8d16710f1458..90d424fe35d8 100644 --- a/tests/prefix_caching/test_prefix_caching.py +++ b/tests/prefix_caching/test_prefix_caching.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the with and without prefix caching. Run `pytest tests/prefix_caching/test_prefix_caching.py`. diff --git a/tests/prompt_adapter/test_bloom.py b/tests/prompt_adapter/test_bloom.py index 6528b3009b8c..a31d8e873d79 100644 --- a/tests/prompt_adapter/test_bloom.py +++ b/tests/prompt_adapter/test_bloom.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import vllm diff --git a/tests/prompt_adapter/test_multi_adapter_inference.py b/tests/prompt_adapter/test_multi_adapter_inference.py index 39a79becdfbb..e249a6e64427 100644 --- a/tests/prompt_adapter/test_multi_adapter_inference.py +++ b/tests/prompt_adapter/test_multi_adapter_inference.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import EngineArgs, LLMEngine, SamplingParams from vllm.prompt_adapter.request import PromptAdapterRequest diff --git a/tests/prompt_adapter/test_pa_lora.py b/tests/prompt_adapter/test_pa_lora.py index 2a5f23f7f92e..fb4c3e149765 100644 --- a/tests/prompt_adapter/test_pa_lora.py +++ b/tests/prompt_adapter/test_pa_lora.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from huggingface_hub import snapshot_download from vllm import EngineArgs, LLMEngine, SamplingParams diff --git a/tests/quantization/test_bitsandbytes.py b/tests/quantization/test_bitsandbytes.py index 569fc8dfb6a2..4b5210cdf074 100644 --- a/tests/quantization/test_bitsandbytes.py +++ b/tests/quantization/test_bitsandbytes.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 '''Tests whether bitsandbytes computation is enabled correctly. Run `pytest tests/quantization/test_bitsandbytes.py`. diff --git a/tests/quantization/test_compressed_tensors.py b/tests/quantization/test_compressed_tensors.py index 1072697ecf5c..7e2e6f6ed589 100644 --- a/tests/quantization/test_compressed_tensors.py +++ b/tests/quantization/test_compressed_tensors.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test model set-up and weight loading for llmcompressor-quantized models. Run `pytest tests/quantization/test_compressed_tensors.py`. diff --git a/tests/quantization/test_configs.py b/tests/quantization/test_configs.py index cf77ccec7a19..0abbd8ebb598 100644 --- a/tests/quantization/test_configs.py +++ b/tests/quantization/test_configs.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests whether Marlin models can be loaded from the autogptq config. Run `pytest tests/quantization/test_configs.py --forked`. diff --git a/tests/quantization/test_cpu_offload.py b/tests/quantization/test_cpu_offload.py index 21ce5174c641..29a5721ef364 100644 --- a/tests/quantization/test_cpu_offload.py +++ b/tests/quantization/test_cpu_offload.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Expanded quantized model tests for CPU offloading # Base tests: tests/basic_correctness/test_cpu_offload.py diff --git a/tests/quantization/test_experts_int8.py b/tests/quantization/test_experts_int8.py index ec31c94efa07..b6db6d5f2fdc 100644 --- a/tests/quantization/test_experts_int8.py +++ b/tests/quantization/test_experts_int8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # flake8: noqa """Tests experts_int8 quantization startup and generation, doesn't test correctness diff --git a/tests/quantization/test_fp8.py b/tests/quantization/test_fp8.py index 4bff73474629..5616935ebdc0 100644 --- a/tests/quantization/test_fp8.py +++ b/tests/quantization/test_fp8.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests whether FP8 computation is enabled correctly. Run `pytest tests/quantization/test_fp8.py --forked`. diff --git a/tests/quantization/test_ipex_quant.py b/tests/quantization/test_ipex_quant.py index 68a73f0f8ab4..0e3913676f5f 100644 --- a/tests/quantization/test_ipex_quant.py +++ b/tests/quantization/test_ipex_quant.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test model set-up and inference for quantized HF models supported on the CPU/GPU backend using IPEX (including AWQ/GPTQ). diff --git a/tests/quantization/test_lm_head.py b/tests/quantization/test_lm_head.py index fa2d9645ea47..ec60d8a57559 100644 --- a/tests/quantization/test_lm_head.py +++ b/tests/quantization/test_lm_head.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests whether gptq models with quantized lm_head can be loaded. Run `pytest tests/quantization/test_quant_lm_head_true.py --forked`. diff --git a/tests/quantization/test_quark.py b/tests/quantization/test_quark.py index 11382ad708fa..491370c7cc24 100644 --- a/tests/quantization/test_quark.py +++ b/tests/quantization/test_quark.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test model set-up and weight loading for quark-quantized models. Run `pytest tests/quantization/test_quark.py`. diff --git a/tests/quantization/test_register_quantization_config.py b/tests/quantization/test_register_quantization_config.py index 8e7f44a399dd..9e1867f913e9 100644 --- a/tests/quantization/test_register_quantization_config.py +++ b/tests/quantization/test_register_quantization_config.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests register custom quantization config. See https://github.com/vllm-project/vllm/issues/11926 for more details. diff --git a/tests/quantization/utils.py b/tests/quantization/utils.py index 8ebd8dd2be0d..7a339c162cc4 100644 --- a/tests/quantization/utils.py +++ b/tests/quantization/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.model_executor.layers.quantization import get_quantization_config from vllm.platforms import current_platform diff --git a/tests/runai_model_streamer/test_runai_model_streamer_loader.py b/tests/runai_model_streamer/test_runai_model_streamer_loader.py index c5722fbae5c8..aa91fa8e1c1c 100644 --- a/tests/runai_model_streamer/test_runai_model_streamer_loader.py +++ b/tests/runai_model_streamer/test_runai_model_streamer_loader.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import SamplingParams from vllm.config import LoadConfig, LoadFormat from vllm.model_executor.model_loader.loader import (RunaiModelStreamerLoader, diff --git a/tests/runai_model_streamer/test_weight_utils.py b/tests/runai_model_streamer/test_weight_utils.py index 5c89bd78ad81..4afa76c51693 100644 --- a/tests/runai_model_streamer/test_weight_utils.py +++ b/tests/runai_model_streamer/test_weight_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import glob import tempfile diff --git a/tests/samplers/test_beam_search.py b/tests/samplers/test_beam_search.py index 4d1a6978d4c5..39feb1895b09 100644 --- a/tests/samplers/test_beam_search.py +++ b/tests/samplers/test_beam_search.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the outputs of HF and vLLM when using beam search. Run `pytest tests/samplers/test_beam_search.py`. diff --git a/tests/samplers/test_ignore_eos.py b/tests/samplers/test_ignore_eos.py index dc2482d85a91..7f26698c927c 100644 --- a/tests/samplers/test_ignore_eos.py +++ b/tests/samplers/test_ignore_eos.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Make sure ignore_eos works. Run `pytest tests/samplers/test_ignore_eos.py`. diff --git a/tests/samplers/test_logits_processor.py b/tests/samplers/test_logits_processor.py index 297947012071..3b95b038979f 100644 --- a/tests/samplers/test_logits_processor.py +++ b/tests/samplers/test_logits_processor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/samplers/test_logprobs.py b/tests/samplers/test_logprobs.py index c07c71e38233..59d36099c650 100644 --- a/tests/samplers/test_logprobs.py +++ b/tests/samplers/test_logprobs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/samplers/test_no_bad_words.py b/tests/samplers/test_no_bad_words.py index 4190cf7cd766..cc6557694c6c 100644 --- a/tests/samplers/test_no_bad_words.py +++ b/tests/samplers/test_no_bad_words.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Make sure bad_words works. Run `pytest tests/samplers/test_no_bad_words.py`. diff --git a/tests/samplers/test_ranks.py b/tests/samplers/test_ranks.py index ed2fee1ae252..c74c1c02c247 100644 --- a/tests/samplers/test_ranks.py +++ b/tests/samplers/test_ranks.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm import SamplingParams diff --git a/tests/samplers/test_rejection_sampler.py b/tests/samplers/test_rejection_sampler.py index dcb1b27bff37..cc199bf682fc 100644 --- a/tests/samplers/test_rejection_sampler.py +++ b/tests/samplers/test_rejection_sampler.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for rejection sampling.""" from typing import List, Tuple diff --git a/tests/samplers/test_sampler.py b/tests/samplers/test_sampler.py index 28c34064f670..ca09e536a06c 100644 --- a/tests/samplers/test_sampler.py +++ b/tests/samplers/test_sampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools import random from dataclasses import dataclass diff --git a/tests/samplers/test_seeded_generate.py b/tests/samplers/test_seeded_generate.py index bf1ee6c39783..4e828256130e 100644 --- a/tests/samplers/test_seeded_generate.py +++ b/tests/samplers/test_seeded_generate.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Verify that seeded random sampling is deterministic. Run `pytest tests/samplers/test_seeded_generate.py`. diff --git a/tests/samplers/test_typical_acceptance_sampler.py b/tests/samplers/test_typical_acceptance_sampler.py index 4ddad66dce1f..ecf98179ca21 100644 --- a/tests/samplers/test_typical_acceptance_sampler.py +++ b/tests/samplers/test_typical_acceptance_sampler.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for rejection sampling.""" import pytest diff --git a/tests/spec_decode/e2e/conftest.py b/tests/spec_decode/e2e/conftest.py index 5cb982a0811c..53c888816a6c 100644 --- a/tests/spec_decode/e2e/conftest.py +++ b/tests/spec_decode/e2e/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from itertools import cycle from typing import List, Optional, Sequence, Tuple, Union diff --git a/tests/spec_decode/e2e/test_compatibility.py b/tests/spec_decode/e2e/test_compatibility.py index af8397c235f4..14a0ebf1d634 100644 --- a/tests/spec_decode/e2e/test_compatibility.py +++ b/tests/spec_decode/e2e/test_compatibility.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm import SamplingParams diff --git a/tests/spec_decode/e2e/test_eagle_correctness.py b/tests/spec_decode/e2e/test_eagle_correctness.py index 5bc70de9dac5..6d1803f8bc63 100644 --- a/tests/spec_decode/e2e/test_eagle_correctness.py +++ b/tests/spec_decode/e2e/test_eagle_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """This docstring details important information on the testing methodology. Most of the tests rely on "greedy equality", where we expect the output of diff --git a/tests/spec_decode/e2e/test_integration.py b/tests/spec_decode/e2e/test_integration.py index b89e5849727f..c67fa85146c6 100644 --- a/tests/spec_decode/e2e/test_integration.py +++ b/tests/spec_decode/e2e/test_integration.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests which cover integration of the speculative decoding framework with other features, e.g. cuda graphs. """ diff --git a/tests/spec_decode/e2e/test_integration_dist_tp2.py b/tests/spec_decode/e2e/test_integration_dist_tp2.py index 7001ee4c007f..e5a542b6d84c 100644 --- a/tests/spec_decode/e2e/test_integration_dist_tp2.py +++ b/tests/spec_decode/e2e/test_integration_dist_tp2.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests which cover integration of the speculative decoding framework with tensor parallelism. """ diff --git a/tests/spec_decode/e2e/test_integration_dist_tp4.py b/tests/spec_decode/e2e/test_integration_dist_tp4.py index 2cb10de1c6f5..cb9c46dc7071 100644 --- a/tests/spec_decode/e2e/test_integration_dist_tp4.py +++ b/tests/spec_decode/e2e/test_integration_dist_tp4.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests which cover integration of the speculative decoding framework with tensor parallelism. """ diff --git a/tests/spec_decode/e2e/test_logprobs.py b/tests/spec_decode/e2e/test_logprobs.py index 1a543606cb3f..5991a8b02353 100644 --- a/tests/spec_decode/e2e/test_logprobs.py +++ b/tests/spec_decode/e2e/test_logprobs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from itertools import cycle import pytest diff --git a/tests/spec_decode/e2e/test_medusa_correctness.py b/tests/spec_decode/e2e/test_medusa_correctness.py index dbcbc0db1088..807f41cc9e5c 100644 --- a/tests/spec_decode/e2e/test_medusa_correctness.py +++ b/tests/spec_decode/e2e/test_medusa_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """This docstring details important information on the testing methodology. Most of the tests rely on "greedy equality", where we expect the output of diff --git a/tests/spec_decode/e2e/test_mlp_correctness.py b/tests/spec_decode/e2e/test_mlp_correctness.py index 1fa1104f5d3a..a2b84b90222d 100644 --- a/tests/spec_decode/e2e/test_mlp_correctness.py +++ b/tests/spec_decode/e2e/test_mlp_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """This docstring details important information on the testing methodology. Most of the tests rely on "greedy equality", where we expect the output of diff --git a/tests/spec_decode/e2e/test_multistep_correctness.py b/tests/spec_decode/e2e/test_multistep_correctness.py index 05ad468dd8bc..d396e52a9ddc 100644 --- a/tests/spec_decode/e2e/test_multistep_correctness.py +++ b/tests/spec_decode/e2e/test_multistep_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """The tests in this file verify end-to-end speculative decoding correctness. This docstring details important information on the testing methodology. diff --git a/tests/spec_decode/e2e/test_ngram_correctness.py b/tests/spec_decode/e2e/test_ngram_correctness.py index 77f8b8998c8d..1aff53cb55c9 100644 --- a/tests/spec_decode/e2e/test_ngram_correctness.py +++ b/tests/spec_decode/e2e/test_ngram_correctness.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """This docstring details important information on the testing methodology. Most of the tests rely on "greedy equality", where we expect the output of diff --git a/tests/spec_decode/e2e/test_seed.py b/tests/spec_decode/e2e/test_seed.py index e42cf416b159..b7d279f2919b 100644 --- a/tests/spec_decode/e2e/test_seed.py +++ b/tests/spec_decode/e2e/test_seed.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from .conftest import run_equality_correctness_test diff --git a/tests/spec_decode/test_batch_expansion.py b/tests/spec_decode/test_batch_expansion.py index 3504fcf43e36..fe95ff9b9c35 100644 --- a/tests/spec_decode/test_batch_expansion.py +++ b/tests/spec_decode/test_batch_expansion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/spec_decode/test_dynamic_spec_decode.py b/tests/spec_decode/test_dynamic_spec_decode.py index aa49a3aee62a..0bff0ea1d7db 100644 --- a/tests/spec_decode/test_dynamic_spec_decode.py +++ b/tests/spec_decode/test_dynamic_spec_decode.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from unittest.mock import MagicMock, patch import pytest diff --git a/tests/spec_decode/test_metrics.py b/tests/spec_decode/test_metrics.py index 7477486a3388..1a6693e16817 100644 --- a/tests/spec_decode/test_metrics.py +++ b/tests/spec_decode/test_metrics.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from unittest.mock import MagicMock diff --git a/tests/spec_decode/test_multi_step_worker.py b/tests/spec_decode/test_multi_step_worker.py index 0b5d82b6610c..2bf401613f06 100644 --- a/tests/spec_decode/test_multi_step_worker.py +++ b/tests/spec_decode/test_multi_step_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import Dict, List from unittest.mock import MagicMock diff --git a/tests/spec_decode/test_ngram_worker.py b/tests/spec_decode/test_ngram_worker.py index f66e95718660..7de54b3edb6c 100644 --- a/tests/spec_decode/test_ngram_worker.py +++ b/tests/spec_decode/test_ngram_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from vllm.sequence import ExecuteModelRequest diff --git a/tests/spec_decode/test_scorer.py b/tests/spec_decode/test_scorer.py index 5a093dea16d4..7bbbb0236da1 100644 --- a/tests/spec_decode/test_scorer.py +++ b/tests/spec_decode/test_scorer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import List diff --git a/tests/spec_decode/test_spec_decode_worker.py b/tests/spec_decode/test_spec_decode_worker.py index d8c3af4c1cd1..eee0f4c89c89 100644 --- a/tests/spec_decode/test_spec_decode_worker.py +++ b/tests/spec_decode/test_spec_decode_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from collections import defaultdict from types import SimpleNamespace diff --git a/tests/spec_decode/test_utils.py b/tests/spec_decode/test_utils.py index 195fce64822b..24573e22487d 100644 --- a/tests/spec_decode/test_utils.py +++ b/tests/spec_decode/test_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from unittest.mock import MagicMock import pytest diff --git a/tests/spec_decode/utils.py b/tests/spec_decode/utils.py index 2f883c2ff9b7..38f57e99bdb0 100644 --- a/tests/spec_decode/utils.py +++ b/tests/spec_decode/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from itertools import count from typing import Callable, Dict, List, Optional from typing import Sequence as GenericSequence diff --git a/tests/standalone_tests/lazy_torch_compile.py b/tests/standalone_tests/lazy_torch_compile.py index b950877a4337..b3b5809525c9 100644 --- a/tests/standalone_tests/lazy_torch_compile.py +++ b/tests/standalone_tests/lazy_torch_compile.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Description: Test the lazy import module # The utility function cannot be placed in `vllm.utils` # this needs to be a standalone script diff --git a/tests/tensorizer_loader/conftest.py b/tests/tensorizer_loader/conftest.py index 2a4565362244..694bb5fbc3f7 100644 --- a/tests/tensorizer_loader/conftest.py +++ b/tests/tensorizer_loader/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import functools import gc from typing import Callable, TypeVar diff --git a/tests/tensorizer_loader/test_tensorizer.py b/tests/tensorizer_loader/test_tensorizer.py index 6e7eec1c6ab3..b268d4bf0c4c 100644 --- a/tests/tensorizer_loader/test_tensorizer.py +++ b/tests/tensorizer_loader/test_tensorizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import gc import json import os diff --git a/tests/test_cache_block_hashing.py b/tests/test_cache_block_hashing.py index e8f8499aa88c..17c128a17656 100644 --- a/tests/test_cache_block_hashing.py +++ b/tests/test_cache_block_hashing.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Test hashing of cache blocks. Run `pytest tests/test_cache_block_hashing.py`. diff --git a/tests/test_config.py b/tests/test_config.py index ec366b93d6a3..2dfae218b47d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import asdict import pytest diff --git a/tests/test_embedded_commit.py b/tests/test_embedded_commit.py index ffeacf34b7ba..a9b4f5cbf78c 100644 --- a/tests/test_embedded_commit.py +++ b/tests/test_embedded_commit.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import vllm diff --git a/tests/test_inputs.py b/tests/test_inputs.py index fff7c5fc0428..fff909154a2a 100644 --- a/tests/test_inputs.py +++ b/tests/test_inputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/test_logger.py b/tests/test_logger.py index e3749616d420..993822e92240 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import logging import os diff --git a/tests/test_logits_processor.py b/tests/test_logits_processor.py index 39c1c38151fd..487fbb8fcb8c 100644 --- a/tests/test_logits_processor.py +++ b/tests/test_logits_processor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import random from typing import Tuple from unittest.mock import patch diff --git a/tests/test_regression.py b/tests/test_regression.py index 5d27d3579301..f781b3113b4c 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Containing tests that check for regressions in vLLM's behavior. It should include tests that are reported by users and making sure they diff --git a/tests/test_sampling_params.py b/tests/test_sampling_params.py index 01cbe0c997f2..40e26ed5199c 100644 --- a/tests/test_sampling_params.py +++ b/tests/test_sampling_params.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Tests for the SamplingParams class. """ from vllm import SamplingParams diff --git a/tests/test_scalartype.py b/tests/test_scalartype.py index a9221f08c294..6e36f2c337f3 100644 --- a/tests/test_scalartype.py +++ b/tests/test_scalartype.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import torch diff --git a/tests/test_sequence.py b/tests/test_sequence.py index 30e53a180ea3..902de1099e60 100644 --- a/tests/test_sequence.py +++ b/tests/test_sequence.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.model_executor.layers.sampler import SamplerOutput diff --git a/tests/test_sharded_state_loader.py b/tests/test_sharded_state_loader.py index 2412da5037ec..088b95be721f 100644 --- a/tests/test_sharded_state_loader.py +++ b/tests/test_sharded_state_loader.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import multiprocessing as mp import os import shutil diff --git a/tests/test_utils.py b/tests/test_utils.py index d5dc4464e634..5b69ffd18bb2 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os import socket diff --git a/tests/tokenization/test_cached_tokenizer.py b/tests/tokenization/test_cached_tokenizer.py index 4c8238fd8d11..cd60cefd7ccd 100644 --- a/tests/tokenization/test_cached_tokenizer.py +++ b/tests/tokenization/test_cached_tokenizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from copy import deepcopy from transformers import AutoTokenizer diff --git a/tests/tokenization/test_detokenize.py b/tests/tokenization/test_detokenize.py index 84348cbc0bce..57832394d0fc 100644 --- a/tests/tokenization/test_detokenize.py +++ b/tests/tokenization/test_detokenize.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, Generator, List, Optional import pytest diff --git a/tests/tokenization/test_get_eos.py b/tests/tokenization/test_get_eos.py index 875ca19d3b4b..787fb6ea63f4 100644 --- a/tests/tokenization/test_get_eos.py +++ b/tests/tokenization/test_get_eos.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This test file includes some cases where it is inappropriate to only get the `eos_token_id` from the tokenizer as defined by diff --git a/tests/tokenization/test_tokenizer.py b/tests/tokenization/test_tokenizer.py index 8db7204f15d4..eddc630986ea 100644 --- a/tests/tokenization/test_tokenizer.py +++ b/tests/tokenization/test_tokenizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from transformers import PreTrainedTokenizerBase diff --git a/tests/tokenization/test_tokenizer_group.py b/tests/tokenization/test_tokenizer_group.py index 3faaf326f542..8e99f86917b8 100644 --- a/tests/tokenization/test_tokenizer_group.py +++ b/tests/tokenization/test_tokenizer_group.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os import sys diff --git a/tests/tool_use/conftest.py b/tests/tool_use/conftest.py index 294acf202a23..39ab01c9b874 100644 --- a/tests/tool_use/conftest.py +++ b/tests/tool_use/conftest.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest import pytest_asyncio from huggingface_hub import snapshot_download diff --git a/tests/tool_use/test_chat_completion_request_validations.py b/tests/tool_use/test_chat_completion_request_validations.py index 3d0fe8f06089..7bee56281c7d 100644 --- a/tests/tool_use/test_chat_completion_request_validations.py +++ b/tests/tool_use/test_chat_completion_request_validations.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.entrypoints.openai.protocol import ChatCompletionRequest diff --git a/tests/tool_use/test_chat_completions.py b/tests/tool_use/test_chat_completions.py index 75bbfbb76693..da033fa1d85c 100644 --- a/tests/tool_use/test_chat_completions.py +++ b/tests/tool_use/test_chat_completions.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import openai diff --git a/tests/tool_use/test_jamba_tool_parser.py b/tests/tool_use/test_jamba_tool_parser.py index 3095ef451679..7e349c51253c 100644 --- a/tests/tool_use/test_jamba_tool_parser.py +++ b/tests/tool_use/test_jamba_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from typing import Generator, List, Optional diff --git a/tests/tool_use/test_parallel_tool_calls.py b/tests/tool_use/test_parallel_tool_calls.py index c294cb04919f..b49a5e8e7e4c 100644 --- a/tests/tool_use/test_parallel_tool_calls.py +++ b/tests/tool_use/test_parallel_tool_calls.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from typing import Dict, List, Optional diff --git a/tests/tool_use/test_tool_calls.py b/tests/tool_use/test_tool_calls.py index fe8cb496c974..45f1bfc45bd7 100644 --- a/tests/tool_use/test_tool_calls.py +++ b/tests/tool_use/test_tool_calls.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from typing import Dict, List, Optional diff --git a/tests/tool_use/utils.py b/tests/tool_use/utils.py index 2241f1846e74..a7dfb10780a3 100644 --- a/tests/tool_use/utils.py +++ b/tests/tool_use/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from copy import deepcopy from typing import Any, Dict, List, Optional diff --git a/tests/tpu/test_compilation.py b/tests/tpu/test_compilation.py index b7124ebc1b0f..6ed83f30ee02 100644 --- a/tests/tpu/test_compilation.py +++ b/tests/tpu/test_compilation.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import glob import os import tempfile diff --git a/tests/tpu/test_custom_dispatcher.py b/tests/tpu/test_custom_dispatcher.py index bb1379deba3f..e94bbd287722 100644 --- a/tests/tpu/test_custom_dispatcher.py +++ b/tests/tpu/test_custom_dispatcher.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from vllm.config import CompilationLevel diff --git a/tests/tpu/test_quantization_accuracy.py b/tests/tpu/test_quantization_accuracy.py index 6cd5615c44e1..3db9bc73aa87 100644 --- a/tests/tpu/test_quantization_accuracy.py +++ b/tests/tpu/test_quantization_accuracy.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass import lm_eval diff --git a/tests/tracing/test_tracing.py b/tests/tracing/test_tracing.py index 49a16d16eb84..592775e8b892 100644 --- a/tests/tracing/test_tracing.py +++ b/tests/tracing/test_tracing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import threading from concurrent import futures diff --git a/tests/utils.py b/tests/utils.py index f4eecf19e8c6..3b32052fe4c8 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import copy import functools diff --git a/tests/v1/core/test_kv_cache_utils.py b/tests/v1/core/test_kv_cache_utils.py index 0a5ba1f98221..60cf4384d3fd 100644 --- a/tests/v1/core/test_kv_cache_utils.py +++ b/tests/v1/core/test_kv_cache_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.multimodal.inputs import MultiModalKwargs diff --git a/tests/v1/core/test_prefix_caching.py b/tests/v1/core/test_prefix_caching.py index 5c1cda285fb1..2e16d7d2502e 100644 --- a/tests/v1/core/test_prefix_caching.py +++ b/tests/v1/core/test_prefix_caching.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Compare the with and without prefix caching.""" import pytest diff --git a/tests/v1/e2e/test_cascade_attention.py b/tests/v1/e2e/test_cascade_attention.py index 8ec9f1ba3f55..a8079dcce5e2 100644 --- a/tests/v1/e2e/test_cascade_attention.py +++ b/tests/v1/e2e/test_cascade_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm import LLM, SamplingParams diff --git a/tests/v1/engine/test_async_llm.py b/tests/v1/engine/test_async_llm.py index 10f783b21a9e..4b5bc9ced373 100644 --- a/tests/v1/engine/test_async_llm.py +++ b/tests/v1/engine/test_async_llm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from contextlib import ExitStack from typing import List, Tuple diff --git a/tests/v1/engine/test_engine_args.py b/tests/v1/engine/test_engine_args.py index ff38a4568ecb..a3540582a397 100644 --- a/tests/v1/engine/test_engine_args.py +++ b/tests/v1/engine/test_engine_args.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm import envs diff --git a/tests/v1/engine/test_engine_core.py b/tests/v1/engine/test_engine_core.py index 033bbcfce564..6a91f190118f 100644 --- a/tests/v1/engine/test_engine_core.py +++ b/tests/v1/engine/test_engine_core.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time import uuid diff --git a/tests/v1/engine/test_engine_core_client.py b/tests/v1/engine/test_engine_core_client.py index e2c728b22d48..b2539132f4e0 100644 --- a/tests/v1/engine/test_engine_core_client.py +++ b/tests/v1/engine/test_engine_core_client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import time import uuid diff --git a/tests/v1/engine/test_output_processor.py b/tests/v1/engine/test_output_processor.py index 4735c6f94753..5782a249f362 100644 --- a/tests/v1/engine/test_output_processor.py +++ b/tests/v1/engine/test_output_processor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/v1/sample/test_sampler.py b/tests/v1/sample/test_sampler.py index 5ebf72927cfd..f7eedcb9c58d 100644 --- a/tests/v1/sample/test_sampler.py +++ b/tests/v1/sample/test_sampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Set, Tuple import numpy as np diff --git a/tests/v1/test_stats.py b/tests/v1/test_stats.py index 580392ac5f44..48419d8a2791 100644 --- a/tests/v1/test_stats.py +++ b/tests/v1/test_stats.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pytest from vllm.sampling_params import SamplingParams diff --git a/tests/v1/test_utils.py b/tests/v1/test_utils.py index ac773b611f40..9b669ae00660 100644 --- a/tests/v1/test_utils.py +++ b/tests/v1/test_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import torch diff --git a/tests/v1/worker/test_gpu_input_batch.py b/tests/v1/worker/test_gpu_input_batch.py index 694ce81ff6e2..5b40fbff8212 100644 --- a/tests/v1/worker/test_gpu_input_batch.py +++ b/tests/v1/worker/test_gpu_input_batch.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List, Set, Tuple import numpy as np diff --git a/tests/vllm_test_utils/setup.py b/tests/vllm_test_utils/setup.py index 790e891ec837..c039431494c4 100644 --- a/tests/vllm_test_utils/setup.py +++ b/tests/vllm_test_utils/setup.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from setuptools import setup setup( diff --git a/tests/vllm_test_utils/vllm_test_utils/__init__.py b/tests/vllm_test_utils/vllm_test_utils/__init__.py index 6505c81546bb..1d1219fbeffa 100644 --- a/tests/vllm_test_utils/vllm_test_utils/__init__.py +++ b/tests/vllm_test_utils/vllm_test_utils/__init__.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ vllm_utils is a package for vLLM testing utilities. It does not import any vLLM modules. diff --git a/tests/vllm_test_utils/vllm_test_utils/blame.py b/tests/vllm_test_utils/vllm_test_utils/blame.py index 1ddd3471d357..392fd2705fb2 100644 --- a/tests/vllm_test_utils/vllm_test_utils/blame.py +++ b/tests/vllm_test_utils/vllm_test_utils/blame.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import contextlib import dataclasses import sys diff --git a/tests/vllm_test_utils/vllm_test_utils/monitor.py b/tests/vllm_test_utils/vllm_test_utils/monitor.py index a237f53a75d1..44d45f262105 100644 --- a/tests/vllm_test_utils/vllm_test_utils/monitor.py +++ b/tests/vllm_test_utils/vllm_test_utils/monitor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import contextlib import dataclasses import sys diff --git a/tests/weight_loading/test_weight_loading.py b/tests/weight_loading/test_weight_loading.py index 7a3786456d0d..e456bfab83d3 100644 --- a/tests/weight_loading/test_weight_loading.py +++ b/tests/weight_loading/test_weight_loading.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pytest diff --git a/tests/worker/test_encoder_decoder_model_runner.py b/tests/worker/test_encoder_decoder_model_runner.py index a6b3cb5759f2..0ce0465a704c 100644 --- a/tests/worker/test_encoder_decoder_model_runner.py +++ b/tests/worker/test_encoder_decoder_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from typing import List diff --git a/tests/worker/test_model_input.py b/tests/worker/test_model_input.py index 57f1fd47a600..eb341fb1b293 100644 --- a/tests/worker/test_model_input.py +++ b/tests/worker/test_model_input.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import List, Tuple, Type diff --git a/tests/worker/test_model_runner.py b/tests/worker/test_model_runner.py index aabe913c242e..c32ceb4faa08 100644 --- a/tests/worker/test_model_runner.py +++ b/tests/worker/test_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import pytest diff --git a/tests/worker/test_profile.py b/tests/worker/test_profile.py index 79233c75714d..22466105b8ab 100644 --- a/tests/worker/test_profile.py +++ b/tests/worker/test_profile.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from vllm.engine.arg_utils import EngineArgs diff --git a/tests/worker/test_swap.py b/tests/worker/test_swap.py index acede959f59f..7ae0f4bb8e80 100644 --- a/tests/worker/test_swap.py +++ b/tests/worker/test_swap.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from vllm.engine.arg_utils import EngineArgs diff --git a/tools/check_spdx_header.py b/tools/check_spdx_header.py new file mode 100644 index 000000000000..3f7fd66bf64b --- /dev/null +++ b/tools/check_spdx_header.py @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: Apache-2.0 + +import sys + +SPDX_HEADER = "# SPDX-License-Identifier: Apache-2.0" +SPDX_HEADER_PREFIX = "# SPDX-License-Identifier:" + + +def check_spdx_header(file_path): + with open(file_path, encoding='UTF-8') as file: + lines = file.readlines() + if not lines: + # not necessary for an empty file like __init__.py + return True + if not lines[0].strip().startswith(SPDX_HEADER_PREFIX): + return False + return True + + +def add_header(file_path): + with open(file_path, 'r+', encoding='UTF-8') as file: + lines = file.readlines() + file.seek(0, 0) + file.write(SPDX_HEADER + '\n\n' + ''.join(lines)) + + +def main(): + files_with_missing_header = [] + for file_path in sys.argv[1:]: + if not check_spdx_header(file_path): + files_with_missing_header.append(file_path) + + if files_with_missing_header: + print("The following files are missing the SPDX header:") + for file_path in files_with_missing_header: + print(f" {file_path}") + add_header(file_path) + + sys.exit(1 if files_with_missing_header else 0) + + +if __name__ == "__main__": + main() diff --git a/tools/profiler/print_layerwise_table.py b/tools/profiler/print_layerwise_table.py index 54cd60c2bc95..adbb7301bfc7 100644 --- a/tools/profiler/print_layerwise_table.py +++ b/tools/profiler/print_layerwise_table.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import json from typing import Dict diff --git a/tools/profiler/visualize_layerwise_profile.py b/tools/profiler/visualize_layerwise_profile.py index cb56ebd69a8c..c527cdbe0225 100644 --- a/tools/profiler/visualize_layerwise_profile.py +++ b/tools/profiler/visualize_layerwise_profile.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import copy import json diff --git a/tools/report_build_time_ninja.py b/tools/report_build_time_ninja.py index 9dc19f5fd4cd..33e85b9ff1a4 100644 --- a/tools/report_build_time_ninja.py +++ b/tools/report_build_time_ninja.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + #!/usr/bin/env python3 # Copyright (c) 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/use_existing_torch.py b/use_existing_torch.py index 319d262898fe..a578328b0357 100644 --- a/use_existing_torch.py +++ b/use_existing_torch.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import glob requires_files = glob.glob('requirements*.txt') diff --git a/vllm/__init__.py b/vllm/__init__.py index 2aabe820d9a8..566c5116d5f0 100644 --- a/vllm/__init__.py +++ b/vllm/__init__.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """vLLM: a high-throughput and memory-efficient inference engine for LLMs""" import os diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index da237da2ecca..ce4f75341232 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import contextlib import importlib from typing import TYPE_CHECKING, List, Optional, Tuple, Union diff --git a/vllm/_ipex_ops.py b/vllm/_ipex_ops.py index 28b804f765a3..ccb67baa5338 100644 --- a/vllm/_ipex_ops.py +++ b/vllm/_ipex_ops.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple import torch diff --git a/vllm/adapter_commons/layers.py b/vllm/adapter_commons/layers.py index 3ed60678b52f..18e0c5227d45 100644 --- a/vllm/adapter_commons/layers.py +++ b/vllm/adapter_commons/layers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Tuple diff --git a/vllm/adapter_commons/models.py b/vllm/adapter_commons/models.py index 468904c90fff..f9a5d2fffad5 100644 --- a/vllm/adapter_commons/models.py +++ b/vllm/adapter_commons/models.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Any, Callable, Dict, Optional, TypeVar diff --git a/vllm/adapter_commons/request.py b/vllm/adapter_commons/request.py index 2bb17fdc0110..2b604b91bbb6 100644 --- a/vllm/adapter_commons/request.py +++ b/vllm/adapter_commons/request.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod diff --git a/vllm/adapter_commons/utils.py b/vllm/adapter_commons/utils.py index 1e9adca50093..c2dc5433cc65 100644 --- a/vllm/adapter_commons/utils.py +++ b/vllm/adapter_commons/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, Optional, Set diff --git a/vllm/adapter_commons/worker_manager.py b/vllm/adapter_commons/worker_manager.py index 83929e82ebf0..ce24e08a5b56 100644 --- a/vllm/adapter_commons/worker_manager.py +++ b/vllm/adapter_commons/worker_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Any, Optional, Set diff --git a/vllm/assets/audio.py b/vllm/assets/audio.py index a46c67ad7e00..d9e51082e6ca 100644 --- a/vllm/assets/audio.py +++ b/vllm/assets/audio.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Literal from urllib.parse import urljoin diff --git a/vllm/assets/base.py b/vllm/assets/base.py index 249173141106..03f3b9dabf14 100644 --- a/vllm/assets/base.py +++ b/vllm/assets/base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import lru_cache from pathlib import Path from typing import Optional diff --git a/vllm/assets/image.py b/vllm/assets/image.py index 0a55506f8825..2b1d258da9c7 100644 --- a/vllm/assets/image.py +++ b/vllm/assets/image.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Literal diff --git a/vllm/assets/video.py b/vllm/assets/video.py index eca2ccc54482..494cfc38381c 100644 --- a/vllm/assets/video.py +++ b/vllm/assets/video.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from functools import lru_cache from typing import List, Literal diff --git a/vllm/attention/__init__.py b/vllm/attention/__init__.py index 2cd4ad3e0013..85c5715faba7 100644 --- a/vllm/attention/__init__.py +++ b/vllm/attention/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.attention.backends.abstract import (AttentionBackend, AttentionMetadata, AttentionMetadataBuilder, diff --git a/vllm/attention/backends/abstract.py b/vllm/attention/backends/abstract.py index b9425f659f7c..5f0a54013540 100644 --- a/vllm/attention/backends/abstract.py +++ b/vllm/attention/backends/abstract.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from contextlib import contextmanager from dataclasses import dataclass, fields diff --git a/vllm/attention/backends/blocksparse_attn.py b/vllm/attention/backends/blocksparse_attn.py index 20e9a3f139de..9765e7881ad9 100644 --- a/vllm/attention/backends/blocksparse_attn.py +++ b/vllm/attention/backends/blocksparse_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, Type diff --git a/vllm/attention/backends/flash_attn.py b/vllm/attention/backends/flash_attn.py index 4a9aa1e21736..6a82127acdf7 100755 --- a/vllm/attention/backends/flash_attn.py +++ b/vllm/attention/backends/flash_attn.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Attention layer with FlashAttention.""" from collections import defaultdict from dataclasses import dataclass diff --git a/vllm/attention/backends/flashinfer.py b/vllm/attention/backends/flashinfer.py index 7cccef960821..715ed6748b84 100644 --- a/vllm/attention/backends/flashinfer.py +++ b/vllm/attention/backends/flashinfer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from collections import defaultdict from contextlib import contextmanager diff --git a/vllm/attention/backends/hpu_attn.py b/vllm/attention/backends/hpu_attn.py index 80c132c0a8c0..1518e518e91b 100644 --- a/vllm/attention/backends/hpu_attn.py +++ b/vllm/attention/backends/hpu_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + ############################################################################### # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company ############################################################################### diff --git a/vllm/attention/backends/ipex_attn.py b/vllm/attention/backends/ipex_attn.py index 57916a3c6a34..b4879af4cf20 100644 --- a/vllm/attention/backends/ipex_attn.py +++ b/vllm/attention/backends/ipex_attn.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Attention layer with torch scaled_dot_product_attention and PagedAttention.""" from dataclasses import dataclass diff --git a/vllm/attention/backends/mla/utils.py b/vllm/attention/backends/mla/utils.py index e8fec234c022..9b63192ed0f6 100644 --- a/vllm/attention/backends/mla/utils.py +++ b/vllm/attention/backends/mla/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import abstractmethod from dataclasses import dataclass from typing import Any, Dict, Generic, List, Optional, Tuple diff --git a/vllm/attention/backends/openvino.py b/vllm/attention/backends/openvino.py index be06d1600998..f58528dbf5b7 100644 --- a/vllm/attention/backends/openvino.py +++ b/vllm/attention/backends/openvino.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Dict, List, Optional, Tuple, Type diff --git a/vllm/attention/backends/pallas.py b/vllm/attention/backends/pallas.py index 209a623ba441..b61dfe63ddca 100644 --- a/vllm/attention/backends/pallas.py +++ b/vllm/attention/backends/pallas.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple, Type diff --git a/vllm/attention/backends/placeholder_attn.py b/vllm/attention/backends/placeholder_attn.py index 826311896d1d..9f6e731afd19 100644 --- a/vllm/attention/backends/placeholder_attn.py +++ b/vllm/attention/backends/placeholder_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import defaultdict from dataclasses import dataclass from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type diff --git a/vllm/attention/backends/rocm_flash_attn.py b/vllm/attention/backends/rocm_flash_attn.py index 12110ec7356d..02bff57a62b7 100644 --- a/vllm/attention/backends/rocm_flash_attn.py +++ b/vllm/attention/backends/rocm_flash_attn.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Attention layer ROCm GPUs.""" from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type diff --git a/vllm/attention/backends/torch_sdpa.py b/vllm/attention/backends/torch_sdpa.py index c3b2398b4e63..25fe6ed95c5d 100644 --- a/vllm/attention/backends/torch_sdpa.py +++ b/vllm/attention/backends/torch_sdpa.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Attention layer with torch scaled_dot_product_attention and PagedAttention.""" from dataclasses import dataclass diff --git a/vllm/attention/backends/triton_mla.py b/vllm/attention/backends/triton_mla.py index 95dc119a47bb..20d7ef0fa88e 100644 --- a/vllm/attention/backends/triton_mla.py +++ b/vllm/attention/backends/triton_mla.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import defaultdict from contextlib import contextmanager from dataclasses import dataclass diff --git a/vllm/attention/backends/utils.py b/vllm/attention/backends/utils.py index 7f2fe7e83106..ad53e4e70b0f 100644 --- a/vllm/attention/backends/utils.py +++ b/vllm/attention/backends/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Attention backend utils""" from collections import defaultdict from contextlib import contextmanager diff --git a/vllm/attention/backends/xformers.py b/vllm/attention/backends/xformers.py index 49f47f9c8ded..723a4558d0b3 100644 --- a/vllm/attention/backends/xformers.py +++ b/vllm/attention/backends/xformers.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Attention layer with xFormers and PagedAttention.""" from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple, Type diff --git a/vllm/attention/layer.py b/vllm/attention/layer.py index b97165f625e5..19ee89630ffa 100644 --- a/vllm/attention/layer.py +++ b/vllm/attention/layer.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Attention layer.""" from typing import Any, Dict, List, Optional diff --git a/vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py b/vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py index 727a470ba6d0..71caf3cbac02 100644 --- a/vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py +++ b/vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import triton import triton.language as tl diff --git a/vllm/attention/ops/blocksparse_attention/interface.py b/vllm/attention/ops/blocksparse_attention/interface.py index 350f88c8f974..6ab69ea5b409 100644 --- a/vllm/attention/ops/blocksparse_attention/interface.py +++ b/vllm/attention/ops/blocksparse_attention/interface.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math import torch diff --git a/vllm/attention/ops/blocksparse_attention/utils.py b/vllm/attention/ops/blocksparse_attention/utils.py index 78d752230d6e..4de9bd530642 100644 --- a/vllm/attention/ops/blocksparse_attention/utils.py +++ b/vllm/attention/ops/blocksparse_attention/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Helper functions for 3D sparse pattern # These function are not optimized and very inefficient. # Avoid calling them too frequent or use a cache mechanism. diff --git a/vllm/attention/ops/hpu_paged_attn.py b/vllm/attention/ops/hpu_paged_attn.py index 4c0fb2a62836..8bb536343ed8 100644 --- a/vllm/attention/ops/hpu_paged_attn.py +++ b/vllm/attention/ops/hpu_paged_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + ############################################################################### # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company ############################################################################### diff --git a/vllm/attention/ops/ipex_attn.py b/vllm/attention/ops/ipex_attn.py index 3a07184ed31f..598ceea130d9 100644 --- a/vllm/attention/ops/ipex_attn.py +++ b/vllm/attention/ops/ipex_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List, Optional, Tuple try: diff --git a/vllm/attention/ops/nki_flash_attn.py b/vllm/attention/ops/nki_flash_attn.py index 9de4ef7f5a14..68aa63f5ac16 100644 --- a/vllm/attention/ops/nki_flash_attn.py +++ b/vllm/attention/ops/nki_flash_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass import neuronxcc.nki.isa as nisa diff --git a/vllm/attention/ops/paged_attn.py b/vllm/attention/ops/paged_attn.py index fd62329141f6..2c60bd0c38d6 100644 --- a/vllm/attention/ops/paged_attn.py +++ b/vllm/attention/ops/paged_attn.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import List, Optional, Tuple diff --git a/vllm/attention/ops/prefix_prefill.py b/vllm/attention/ops/prefix_prefill.py index ec3c8459c43e..fbb6757ee304 100644 --- a/vllm/attention/ops/prefix_prefill.py +++ b/vllm/attention/ops/prefix_prefill.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # The kernels in this file are adapted from LightLLM's context_attention_fwd: # https://github.com/ModelTC/lightllm/blob/main/lightllm/models/llama/triton_kernel/context_flashattention_nopad.py diff --git a/vllm/attention/ops/triton_decode_attention.py b/vllm/attention/ops/triton_decode_attention.py index 675df109b6c0..ec5ec4ce6e6b 100644 --- a/vllm/attention/ops/triton_decode_attention.py +++ b/vllm/attention/ops/triton_decode_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/sgl-project/sglang/blob/9f635ea50de920aa507f486daafba26a5b837574/python/sglang/srt/layers/attention/triton_ops/decode_attention.py # which was originally adapted from diff --git a/vllm/attention/ops/triton_flash_attention.py b/vllm/attention/ops/triton_flash_attention.py index ef04603f22b6..ab8fb8953641 100644 --- a/vllm/attention/ops/triton_flash_attention.py +++ b/vllm/attention/ops/triton_flash_attention.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + #!/usr/bin/env python """ Fused Attention diff --git a/vllm/attention/selector.py b/vllm/attention/selector.py index 4c6bbc727228..26c6ac812a12 100644 --- a/vllm/attention/selector.py +++ b/vllm/attention/selector.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from contextlib import contextmanager from functools import cache diff --git a/vllm/beam_search.py b/vllm/beam_search.py index 026037e5434d..97b2b630fc3e 100644 --- a/vllm/beam_search.py +++ b/vllm/beam_search.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union diff --git a/vllm/compilation/backends.py b/vllm/compilation/backends.py index 7f4f97466d50..979890170c16 100644 --- a/vllm/compilation/backends.py +++ b/vllm/compilation/backends.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ast import copy import dataclasses diff --git a/vllm/compilation/counter.py b/vllm/compilation/counter.py index 6385f1c5dbf8..a6f11a3af4d4 100644 --- a/vllm/compilation/counter.py +++ b/vllm/compilation/counter.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import copy import dataclasses from contextlib import contextmanager diff --git a/vllm/compilation/decorators.py b/vllm/compilation/decorators.py index 17eb0592ced6..20afe6967df3 100644 --- a/vllm/compilation/decorators.py +++ b/vllm/compilation/decorators.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import inspect from typing import Callable, Dict, List, Optional, TypeVar, Union, overload from unittest.mock import patch diff --git a/vllm/compilation/fix_functionalization.py b/vllm/compilation/fix_functionalization.py index e15d7b315c50..9b0e9c5d0408 100644 --- a/vllm/compilation/fix_functionalization.py +++ b/vllm/compilation/fix_functionalization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import operator from typing import Dict, Iterable, List, Optional, Tuple, Union diff --git a/vllm/compilation/fusion.py b/vllm/compilation/fusion.py index cde27bd10821..0c3d8697b237 100644 --- a/vllm/compilation/fusion.py +++ b/vllm/compilation/fusion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, Dict, List, NamedTuple, Optional, Tuple import torch diff --git a/vllm/compilation/fx_utils.py b/vllm/compilation/fx_utils.py index 924e26f2e262..b9a8d3112e77 100644 --- a/vllm/compilation/fx_utils.py +++ b/vllm/compilation/fx_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import operator from typing import Iterable, Optional diff --git a/vllm/compilation/inductor_pass.py b/vllm/compilation/inductor_pass.py index f6846c08ac84..be663946f4d8 100644 --- a/vllm/compilation/inductor_pass.py +++ b/vllm/compilation/inductor_pass.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import hashlib import inspect import types diff --git a/vllm/compilation/monitor.py b/vllm/compilation/monitor.py index b97e40415b41..786c7c1e1859 100644 --- a/vllm/compilation/monitor.py +++ b/vllm/compilation/monitor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import time diff --git a/vllm/compilation/multi_output_match.py b/vllm/compilation/multi_output_match.py index b6bcecdc89e2..e6f6a60b2595 100644 --- a/vllm/compilation/multi_output_match.py +++ b/vllm/compilation/multi_output_match.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import abc import operator from abc import abstractmethod diff --git a/vllm/compilation/pass_manager.py b/vllm/compilation/pass_manager.py index 34f5f355798b..c7387fb7c2db 100644 --- a/vllm/compilation/pass_manager.py +++ b/vllm/compilation/pass_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List from torch import fx as fx diff --git a/vllm/compilation/reshapes.py b/vllm/compilation/reshapes.py index ba28b1f0be7b..292baae85282 100644 --- a/vllm/compilation/reshapes.py +++ b/vllm/compilation/reshapes.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Union import torch.fx diff --git a/vllm/compilation/vllm_inductor_pass.py b/vllm/compilation/vllm_inductor_pass.py index b8c52a7f4683..1d2597e42711 100644 --- a/vllm/compilation/vllm_inductor_pass.py +++ b/vllm/compilation/vllm_inductor_pass.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time import torch diff --git a/vllm/compilation/wrapper.py b/vllm/compilation/wrapper.py index 58a8fa76f6ce..a8a283ddd8c0 100644 --- a/vllm/compilation/wrapper.py +++ b/vllm/compilation/wrapper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import sys from abc import abstractmethod diff --git a/vllm/config.py b/vllm/config.py index a13700aba343..d2d59c7059e9 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ast import copy import enum diff --git a/vllm/connections.py b/vllm/connections.py index 4c9f4f40cf64..dc060bb6f88a 100644 --- a/vllm/connections.py +++ b/vllm/connections.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from pathlib import Path from typing import Mapping, MutableMapping, Optional from urllib.parse import urlparse diff --git a/vllm/core/block/block_table.py b/vllm/core/block/block_table.py index 90c1438efbd0..d4d31c58dc8d 100644 --- a/vllm/core/block/block_table.py +++ b/vllm/core/block/block_table.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from typing import List, Optional diff --git a/vllm/core/block/common.py b/vllm/core/block/common.py index 115f663e4ad3..1966eac1cf9e 100644 --- a/vllm/core/block/common.py +++ b/vllm/core/block/common.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import deque from dataclasses import dataclass from typing import Deque, Dict, Iterable, List, Optional, Protocol, Tuple diff --git a/vllm/core/block/cpu_gpu_block_allocator.py b/vllm/core/block/cpu_gpu_block_allocator.py index c3e1665b4464..359b5b263f68 100644 --- a/vllm/core/block/cpu_gpu_block_allocator.py +++ b/vllm/core/block/cpu_gpu_block_allocator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, FrozenSet, List, Optional, Tuple from vllm.core.block.interfaces import (Block, BlockAllocator, BlockId, diff --git a/vllm/core/block/interfaces.py b/vllm/core/block/interfaces.py index cb432db919c7..0b0197deb8d4 100644 --- a/vllm/core/block/interfaces.py +++ b/vllm/core/block/interfaces.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Dict, FrozenSet, List, Optional, Protocol, Tuple diff --git a/vllm/core/block/naive_block.py b/vllm/core/block/naive_block.py index c38ae2dd6761..c388366b825f 100644 --- a/vllm/core/block/naive_block.py +++ b/vllm/core/block/naive_block.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import deque from typing import Deque, FrozenSet, Iterable, List, Optional, Tuple, Union diff --git a/vllm/core/block/prefix_caching_block.py b/vllm/core/block/prefix_caching_block.py index ccdc5daa9595..fbf19e1b461f 100644 --- a/vllm/core/block/prefix_caching_block.py +++ b/vllm/core/block/prefix_caching_block.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Token blocks.""" import sys from bisect import bisect_left diff --git a/vllm/core/block/utils.py b/vllm/core/block/utils.py index 1c6578e4cc6a..910afdd9feff 100644 --- a/vllm/core/block/utils.py +++ b/vllm/core/block/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Block manager utils.""" from vllm.sequence import SequenceGroup from vllm.utils import (STR_NOT_IMPL_ENC_DEC_PREFIX_CACHE, diff --git a/vllm/core/block_manager.py b/vllm/core/block_manager.py index 2d6a132ed555..c5b3b04f37ca 100644 --- a/vllm/core/block_manager.py +++ b/vllm/core/block_manager.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A block manager that manages token blocks.""" from typing import Dict, List, Optional from typing import Sequence as GenericSequence diff --git a/vllm/core/evictor.py b/vllm/core/evictor.py index c9306518223a..0e363eddc8a5 100644 --- a/vllm/core/evictor.py +++ b/vllm/core/evictor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum import heapq from abc import ABC, abstractmethod diff --git a/vllm/core/interfaces.py b/vllm/core/interfaces.py index 9c7e246e3c4e..b48ba87e95a0 100644 --- a/vllm/core/interfaces.py +++ b/vllm/core/interfaces.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum from abc import ABC, abstractmethod from typing import List diff --git a/vllm/core/placeholder_block_space_manager.py b/vllm/core/placeholder_block_space_manager.py index f9924be4a383..70c22afa8e15 100644 --- a/vllm/core/placeholder_block_space_manager.py +++ b/vllm/core/placeholder_block_space_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Tuple from vllm.core.interfaces import AllocStatus, BlockSpaceManager diff --git a/vllm/core/scheduler.py b/vllm/core/scheduler.py index 2bb961481e5f..f507847ad82c 100644 --- a/vllm/core/scheduler.py +++ b/vllm/core/scheduler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum import os import random diff --git a/vllm/device_allocator/cumem.py b/vllm/device_allocator/cumem.py index a43418dbb3b4..f74ad9ac3385 100644 --- a/vllm/device_allocator/cumem.py +++ b/vllm/device_allocator/cumem.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # cumem-based pytorch pluggable allocator to implement sleep mode. # other approaches tried but failed: # - cuda-python package binding diff --git a/vllm/distributed/__init__.py b/vllm/distributed/__init__.py index db325cfabf55..39955ddacfe9 100644 --- a/vllm/distributed/__init__.py +++ b/vllm/distributed/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .communication_op import * from .parallel_state import * from .utils import * diff --git a/vllm/distributed/communication_op.py b/vllm/distributed/communication_op.py index e13505dc37bb..0228264f91f9 100644 --- a/vllm/distributed/communication_op.py +++ b/vllm/distributed/communication_op.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, Optional, Union import torch diff --git a/vllm/distributed/device_communicators/cuda_wrapper.py b/vllm/distributed/device_communicators/cuda_wrapper.py index d5a53381ce62..010caf7ebac9 100644 --- a/vllm/distributed/device_communicators/cuda_wrapper.py +++ b/vllm/distributed/device_communicators/cuda_wrapper.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """This file is a pure Python wrapper for the cudart library. It avoids the need to compile a separate shared library, and is convenient for use when we just need to call a few functions. diff --git a/vllm/distributed/device_communicators/custom_all_reduce.py b/vllm/distributed/device_communicators/custom_all_reduce.py index 62929dc0feaa..a2614ed5d0bd 100644 --- a/vllm/distributed/device_communicators/custom_all_reduce.py +++ b/vllm/distributed/device_communicators/custom_all_reduce.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ctypes from contextlib import contextmanager from typing import List, Optional, Union diff --git a/vllm/distributed/device_communicators/custom_all_reduce_utils.py b/vllm/distributed/device_communicators/custom_all_reduce_utils.py index 1f78e10cc1dc..d8d6eed2dd7e 100644 --- a/vllm/distributed/device_communicators/custom_all_reduce_utils.py +++ b/vllm/distributed/device_communicators/custom_all_reduce_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ctypes import json import os diff --git a/vllm/distributed/device_communicators/hpu_communicator.py b/vllm/distributed/device_communicators/hpu_communicator.py index cc9b19ce022b..3f85da98aca4 100644 --- a/vllm/distributed/device_communicators/hpu_communicator.py +++ b/vllm/distributed/device_communicators/hpu_communicator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import torch.distributed as dist from torch.distributed import ProcessGroup diff --git a/vllm/distributed/device_communicators/pynccl.py b/vllm/distributed/device_communicators/pynccl.py index efc59987195f..0ccd423121cb 100644 --- a/vllm/distributed/device_communicators/pynccl.py +++ b/vllm/distributed/device_communicators/pynccl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Union # ===================== import region ===================== diff --git a/vllm/distributed/device_communicators/pynccl_wrapper.py b/vllm/distributed/device_communicators/pynccl_wrapper.py index 7dea61b6a09f..03c3b0be7639 100644 --- a/vllm/distributed/device_communicators/pynccl_wrapper.py +++ b/vllm/distributed/device_communicators/pynccl_wrapper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # This file is a pure Python wrapper for the NCCL library. # The main purpose is to use NCCL combined with CUDA graph. # Before writing this script, we tried the following approach: diff --git a/vllm/distributed/device_communicators/shm_broadcast.py b/vllm/distributed/device_communicators/shm_broadcast.py index 268edc0925fe..48ac81ac008b 100644 --- a/vllm/distributed/device_communicators/shm_broadcast.py +++ b/vllm/distributed/device_communicators/shm_broadcast.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pickle import sys diff --git a/vllm/distributed/device_communicators/tpu_communicator.py b/vllm/distributed/device_communicators/tpu_communicator.py index 765a0f9cb1c8..7af7c65f6422 100644 --- a/vllm/distributed/device_communicators/tpu_communicator.py +++ b/vllm/distributed/device_communicators/tpu_communicator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import torch diff --git a/vllm/distributed/device_communicators/xpu_communicator.py b/vllm/distributed/device_communicators/xpu_communicator.py index eafd3c2f6774..79ccc101e080 100644 --- a/vllm/distributed/device_communicators/xpu_communicator.py +++ b/vllm/distributed/device_communicators/xpu_communicator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import torch.distributed as dist from torch.distributed import ProcessGroup diff --git a/vllm/distributed/kv_transfer/kv_connector/base.py b/vllm/distributed/kv_transfer/kv_connector/base.py index 6089e3babac3..57c764b481c2 100644 --- a/vllm/distributed/kv_transfer/kv_connector/base.py +++ b/vllm/distributed/kv_transfer/kv_connector/base.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ KVConnectorBase Class for Distributed KV Cache & Hidden State communication diff --git a/vllm/distributed/kv_transfer/kv_connector/factory.py b/vllm/distributed/kv_transfer/kv_connector/factory.py index 6372dab72608..fe480533458b 100644 --- a/vllm/distributed/kv_transfer/kv_connector/factory.py +++ b/vllm/distributed/kv_transfer/kv_connector/factory.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import importlib from typing import TYPE_CHECKING, Callable, Dict, Type diff --git a/vllm/distributed/kv_transfer/kv_connector/simple_connector.py b/vllm/distributed/kv_transfer/kv_connector/simple_connector.py index 7780e2dfa317..2033e9762ac0 100644 --- a/vllm/distributed/kv_transfer/kv_connector/simple_connector.py +++ b/vllm/distributed/kv_transfer/kv_connector/simple_connector.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Simple KV Cache Connector for Distributed Machine Learning Inference diff --git a/vllm/distributed/kv_transfer/kv_lookup_buffer/base.py b/vllm/distributed/kv_transfer/kv_lookup_buffer/base.py index bad119a1aa92..845da7c501e8 100644 --- a/vllm/distributed/kv_transfer/kv_lookup_buffer/base.py +++ b/vllm/distributed/kv_transfer/kv_lookup_buffer/base.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This file contains a new class `KVLookupBufferBase` that allows developers to think of KV cache operations as inserting new KV cache entries (`insert`) diff --git a/vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py b/vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py index fe8d8d7375f3..5e1b62352d14 100644 --- a/vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py +++ b/vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Implements a distributed key-value (KV) cache transfer mechanism. diff --git a/vllm/distributed/kv_transfer/kv_pipe/base.py b/vllm/distributed/kv_transfer/kv_pipe/base.py index 4b0cb44cc5b8..40589fb3ef87 100644 --- a/vllm/distributed/kv_transfer/kv_pipe/base.py +++ b/vllm/distributed/kv_transfer/kv_pipe/base.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This file defines an interface `KVPipeBase` that provides an abstraction for sending and receiving tensors, or None, via diff --git a/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py b/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py index 8e4358672b74..58ab7f0b6424 100644 --- a/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py +++ b/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import os import pickle diff --git a/vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py b/vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py index 98222fa67e49..7aa53d07a9ef 100644 --- a/vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py +++ b/vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This module implements a PyNccl pipe for sending and receiving Optional[torch.Tensor] between distributed ranks with advanced diff --git a/vllm/distributed/kv_transfer/kv_transfer_agent.py b/vllm/distributed/kv_transfer/kv_transfer_agent.py index 9ce97851dc84..1e80e0bd7de8 100644 --- a/vllm/distributed/kv_transfer/kv_transfer_agent.py +++ b/vllm/distributed/kv_transfer/kv_transfer_agent.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A centralized entrypoint to perform distributed KV cache transfer. This implementation is a shim wrapper on two APIs exposed by `kv_connector`: diff --git a/vllm/distributed/parallel_state.py b/vllm/distributed/parallel_state.py index 7fe9b68d4b9e..c5c5dfbbab76 100644 --- a/vllm/distributed/parallel_state.py +++ b/vllm/distributed/parallel_state.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2023 The vLLM team. # Adapted from # https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/parallel_state.py diff --git a/vllm/distributed/utils.py b/vllm/distributed/utils.py index dcfcb848cbe0..84f8c0a8e51c 100644 --- a/vllm/distributed/utils.py +++ b/vllm/distributed/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2023 The vLLM team. # Adapted from # https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/tensor_parallel/utils.py diff --git a/vllm/engine/arg_utils.py b/vllm/engine/arg_utils.py index cc7c99e50ac4..7c0e8c214066 100644 --- a/vllm/engine/arg_utils.py +++ b/vllm/engine/arg_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import dataclasses import json diff --git a/vllm/engine/async_llm_engine.py b/vllm/engine/async_llm_engine.py index 739ea06ae381..053635a28638 100644 --- a/vllm/engine/async_llm_engine.py +++ b/vllm/engine/async_llm_engine.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import copy import time diff --git a/vllm/engine/async_timeout.py b/vllm/engine/async_timeout.py index 4b1842625212..aa54c0693941 100644 --- a/vllm/engine/async_timeout.py +++ b/vllm/engine/async_timeout.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Workaround for https://github.com/python/cpython/issues/86296 # # From https://github.com/aio-libs/async-timeout/blob/master/async_timeout/__init__.py diff --git a/vllm/engine/llm_engine.py b/vllm/engine/llm_engine.py index dd677300fc66..d82d9ad9df32 100644 --- a/vllm/engine/llm_engine.py +++ b/vllm/engine/llm_engine.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import copy import time from collections import Counter as collectionsCounter diff --git a/vllm/engine/metrics.py b/vllm/engine/metrics.py index b771c190dd82..ce806b4a937a 100644 --- a/vllm/engine/metrics.py +++ b/vllm/engine/metrics.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from typing import TYPE_CHECKING from typing import Counter as CollectionsCounter diff --git a/vllm/engine/metrics_types.py b/vllm/engine/metrics_types.py index 5c7a430d11c5..7f0c2fa70c3f 100644 --- a/vllm/engine/metrics_types.py +++ b/vllm/engine/metrics_types.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ These types are defined in this file to avoid importing vllm.engine.metrics and therefore importing prometheus_client. diff --git a/vllm/engine/multiprocessing/__init__.py b/vllm/engine/multiprocessing/__init__.py index d9703b820a77..3cf1850ee65a 100644 --- a/vllm/engine/multiprocessing/__init__.py +++ b/vllm/engine/multiprocessing/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import uuid from dataclasses import dataclass, field from enum import Enum diff --git a/vllm/engine/multiprocessing/client.py b/vllm/engine/multiprocessing/client.py index 5237f63c34c0..85b5f31e3a4a 100644 --- a/vllm/engine/multiprocessing/client.py +++ b/vllm/engine/multiprocessing/client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import copy import pickle diff --git a/vllm/engine/multiprocessing/engine.py b/vllm/engine/multiprocessing/engine.py index 166f89743b3c..a0dd79586588 100644 --- a/vllm/engine/multiprocessing/engine.py +++ b/vllm/engine/multiprocessing/engine.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle import signal from contextlib import contextmanager diff --git a/vllm/engine/output_processor/interfaces.py b/vllm/engine/output_processor/interfaces.py index 50adaf4e5918..4c8e295c1381 100644 --- a/vllm/engine/output_processor/interfaces.py +++ b/vllm/engine/output_processor/interfaces.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Callable, List diff --git a/vllm/engine/output_processor/multi_step.py b/vllm/engine/output_processor/multi_step.py index 99c2baf3f4df..8ceef855e020 100644 --- a/vllm/engine/output_processor/multi_step.py +++ b/vllm/engine/output_processor/multi_step.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import functools from typing import Callable, List, cast diff --git a/vllm/engine/output_processor/single_step.py b/vllm/engine/output_processor/single_step.py index 55c56abea0da..4d96791a1f8a 100644 --- a/vllm/engine/output_processor/single_step.py +++ b/vllm/engine/output_processor/single_step.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List from vllm.config import SchedulerConfig diff --git a/vllm/engine/output_processor/stop_checker.py b/vllm/engine/output_processor/stop_checker.py index 4b701f81504b..3bca0bee35a4 100644 --- a/vllm/engine/output_processor/stop_checker.py +++ b/vllm/engine/output_processor/stop_checker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional, Tuple from vllm.lora.request import LoRARequest diff --git a/vllm/engine/output_processor/util.py b/vllm/engine/output_processor/util.py index 770982a207e6..0d2b58c109e3 100644 --- a/vllm/engine/output_processor/util.py +++ b/vllm/engine/output_processor/util.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List from typing import Sequence as GenericSequence from typing import cast diff --git a/vllm/engine/protocol.py b/vllm/engine/protocol.py index de7b2c1b91f5..d1112558666f 100644 --- a/vllm/engine/protocol.py +++ b/vllm/engine/protocol.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from abc import ABC, abstractmethod from typing import AsyncGenerator, List, Mapping, Optional diff --git a/vllm/entrypoints/api_server.py b/vllm/entrypoints/api_server.py index daefbff7e517..96818507d589 100644 --- a/vllm/entrypoints/api_server.py +++ b/vllm/entrypoints/api_server.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ NOTE: This API server is used only for demonstrating usage of AsyncEngine and simple performance benchmarks. It is not intended for production use. diff --git a/vllm/entrypoints/chat_utils.py b/vllm/entrypoints/chat_utils.py index 97d2561df602..3a6e75b1d8e5 100644 --- a/vllm/entrypoints/chat_utils.py +++ b/vllm/entrypoints/chat_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import codecs import json diff --git a/vllm/entrypoints/launcher.py b/vllm/entrypoints/launcher.py index 5dcf50bd1b0a..351a39525fa6 100644 --- a/vllm/entrypoints/launcher.py +++ b/vllm/entrypoints/launcher.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import signal from http import HTTPStatus diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index 46b595b0da73..d071a0b3cfc5 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools import warnings from contextlib import contextmanager diff --git a/vllm/entrypoints/logger.py b/vllm/entrypoints/logger.py index 584ee0d9e1c5..e82b6ba6c7ba 100644 --- a/vllm/entrypoints/logger.py +++ b/vllm/entrypoints/logger.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Union from vllm.logger import init_logger diff --git a/vllm/entrypoints/openai/api_server.py b/vllm/entrypoints/openai/api_server.py index 9e5cf4ba2e49..b8f54d6c7804 100644 --- a/vllm/entrypoints/openai/api_server.py +++ b/vllm/entrypoints/openai/api_server.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import atexit import gc diff --git a/vllm/entrypoints/openai/cli_args.py b/vllm/entrypoints/openai/cli_args.py index 9cfe07c65d55..3054958f3c8a 100644 --- a/vllm/entrypoints/openai/cli_args.py +++ b/vllm/entrypoints/openai/cli_args.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This file contains the command line arguments for the vLLM's OpenAI-compatible server. It is kept in a separate file for documentation diff --git a/vllm/entrypoints/openai/logits_processors.py b/vllm/entrypoints/openai/logits_processors.py index c8132811de90..41e5eef40eaf 100644 --- a/vllm/entrypoints/openai/logits_processors.py +++ b/vllm/entrypoints/openai/logits_processors.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import lru_cache, partial from typing import Dict, FrozenSet, Iterable, List, Optional, Union diff --git a/vllm/entrypoints/openai/protocol.py b/vllm/entrypoints/openai/protocol.py index 29d071ce50c8..83b841826231 100644 --- a/vllm/entrypoints/openai/protocol.py +++ b/vllm/entrypoints/openai/protocol.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/protocol/openai_api_protocol.py import re diff --git a/vllm/entrypoints/openai/reasoning_parsers/__init__.py b/vllm/entrypoints/openai/reasoning_parsers/__init__.py index a21bff52f61f..80354d69b50a 100644 --- a/vllm/entrypoints/openai/reasoning_parsers/__init__.py +++ b/vllm/entrypoints/openai/reasoning_parsers/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .abs_reasoning_parsers import ReasoningParser, ReasoningParserManager from .deepseek_r1_reasoning_parser import DeepSeekR1ReasoningParser diff --git a/vllm/entrypoints/openai/reasoning_parsers/abs_reasoning_parsers.py b/vllm/entrypoints/openai/reasoning_parsers/abs_reasoning_parsers.py index e5d10ee0bc3a..b5df7e47446b 100644 --- a/vllm/entrypoints/openai/reasoning_parsers/abs_reasoning_parsers.py +++ b/vllm/entrypoints/openai/reasoning_parsers/abs_reasoning_parsers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from functools import cached_property from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union diff --git a/vllm/entrypoints/openai/reasoning_parsers/deepseek_r1_reasoning_parser.py b/vllm/entrypoints/openai/reasoning_parsers/deepseek_r1_reasoning_parser.py index a440ddc8d3b5..5c19888d4540 100644 --- a/vllm/entrypoints/openai/reasoning_parsers/deepseek_r1_reasoning_parser.py +++ b/vllm/entrypoints/openai/reasoning_parsers/deepseek_r1_reasoning_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import re from typing import Optional, Sequence, Tuple, Union diff --git a/vllm/entrypoints/openai/run_batch.py b/vllm/entrypoints/openai/run_batch.py index 37ae23506ace..675d3cdcf971 100644 --- a/vllm/entrypoints/openai/run_batch.py +++ b/vllm/entrypoints/openai/run_batch.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from http import HTTPStatus from io import StringIO diff --git a/vllm/entrypoints/openai/serving_chat.py b/vllm/entrypoints/openai/serving_chat.py index dc97f0eb059d..107220d548af 100644 --- a/vllm/entrypoints/openai/serving_chat.py +++ b/vllm/entrypoints/openai/serving_chat.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import json import time diff --git a/vllm/entrypoints/openai/serving_completion.py b/vllm/entrypoints/openai/serving_completion.py index 13c392636889..e7ad263e7fbe 100644 --- a/vllm/entrypoints/openai/serving_completion.py +++ b/vllm/entrypoints/openai/serving_completion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import time from typing import AsyncGenerator, AsyncIterator, Dict, List, Optional diff --git a/vllm/entrypoints/openai/serving_embedding.py b/vllm/entrypoints/openai/serving_embedding.py index e7116a3d95d1..45f8ad90ddcb 100644 --- a/vllm/entrypoints/openai/serving_embedding.py +++ b/vllm/entrypoints/openai/serving_embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import base64 import time diff --git a/vllm/entrypoints/openai/serving_engine.py b/vllm/entrypoints/openai/serving_engine.py index 8d54164e500e..8d39fdcb7483 100644 --- a/vllm/entrypoints/openai/serving_engine.py +++ b/vllm/entrypoints/openai/serving_engine.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from concurrent.futures.thread import ThreadPoolExecutor from http import HTTPStatus diff --git a/vllm/entrypoints/openai/serving_models.py b/vllm/entrypoints/openai/serving_models.py index 22e74b387cd7..f917a4851901 100644 --- a/vllm/entrypoints/openai/serving_models.py +++ b/vllm/entrypoints/openai/serving_models.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import pathlib from dataclasses import dataclass diff --git a/vllm/entrypoints/openai/serving_pooling.py b/vllm/entrypoints/openai/serving_pooling.py index 5830322071e5..01a3d211f6ba 100644 --- a/vllm/entrypoints/openai/serving_pooling.py +++ b/vllm/entrypoints/openai/serving_pooling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import base64 import time diff --git a/vllm/entrypoints/openai/serving_rerank.py b/vllm/entrypoints/openai/serving_rerank.py index be4420261afe..366df71217e9 100644 --- a/vllm/entrypoints/openai/serving_rerank.py +++ b/vllm/entrypoints/openai/serving_rerank.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from typing import Any, AsyncGenerator, Dict, List, Optional, Union, cast diff --git a/vllm/entrypoints/openai/serving_score.py b/vllm/entrypoints/openai/serving_score.py index 381edf8fac49..832aa8516cc3 100644 --- a/vllm/entrypoints/openai/serving_score.py +++ b/vllm/entrypoints/openai/serving_score.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import time from typing import Any, AsyncGenerator, Dict, List, Optional, Union, cast diff --git a/vllm/entrypoints/openai/serving_tokenization.py b/vllm/entrypoints/openai/serving_tokenization.py index b67ecfb01316..6c79adf90c8a 100644 --- a/vllm/entrypoints/openai/serving_tokenization.py +++ b/vllm/entrypoints/openai/serving_tokenization.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Final, List, Optional, Union from fastapi import Request diff --git a/vllm/entrypoints/openai/tool_parsers/__init__.py b/vllm/entrypoints/openai/tool_parsers/__init__.py index 2850349a4483..d1c3afa64b96 100644 --- a/vllm/entrypoints/openai/tool_parsers/__init__.py +++ b/vllm/entrypoints/openai/tool_parsers/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .abstract_tool_parser import ToolParser, ToolParserManager from .granite_20b_fc_tool_parser import Granite20bFCToolParser from .granite_tool_parser import GraniteToolParser diff --git a/vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py index aa7c20109893..7cdd6d4c4f2b 100644 --- a/vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from functools import cached_property from typing import Callable, Dict, List, Optional, Sequence, Type, Union diff --git a/vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py index 93e357e8b9f2..002bf1738830 100644 --- a/vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import re from json import JSONDecoder diff --git a/vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py index 8aefcd8d58a3..c948ed78f503 100644 --- a/vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from typing import Dict, Sequence, Union diff --git a/vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py index 869d15ac359e..4841b28703ee 100644 --- a/vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import re from typing import Dict, List, Sequence, Union diff --git a/vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py index cb391e11bbde..b9215e7979bf 100644 --- a/vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from typing import Dict, Sequence, Union diff --git a/vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py index cfd024853f88..7c4d63e18865 100644 --- a/vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import re from typing import Dict, List, Sequence, Union diff --git a/vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py index 1856308b88cf..6a7b113623e6 100644 --- a/vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import re from json import JSONDecoder diff --git a/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py index bada805dd35b..51354f7c9562 100644 --- a/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json import re from random import choices diff --git a/vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py b/vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py index 26da4d689fb8..5c282b5c2605 100644 --- a/vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py +++ b/vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import ast import json import re diff --git a/vllm/entrypoints/openai/tool_parsers/utils.py b/vllm/entrypoints/openai/tool_parsers/utils.py index 5e4eb23bfaf4..945cbd683502 100644 --- a/vllm/entrypoints/openai/tool_parsers/utils.py +++ b/vllm/entrypoints/openai/tool_parsers/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import json from json import JSONDecodeError, JSONDecoder from typing import Any, List, Tuple diff --git a/vllm/entrypoints/utils.py b/vllm/entrypoints/utils.py index e8a78d216d0f..9af37871d57c 100644 --- a/vllm/entrypoints/utils.py +++ b/vllm/entrypoints/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import functools diff --git a/vllm/envs.py b/vllm/envs.py index 25098070b00c..78ee3047b9ac 100644 --- a/vllm/envs.py +++ b/vllm/envs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import tempfile from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional diff --git a/vllm/executor/executor_base.py b/vllm/executor/executor_base.py index 471d1bfac311..fb76276bb4b3 100644 --- a/vllm/executor/executor_base.py +++ b/vllm/executor/executor_base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from abc import ABC, abstractmethod from typing import (Any, Awaitable, Callable, Dict, List, Optional, Set, Tuple, diff --git a/vllm/executor/mp_distributed_executor.py b/vllm/executor/mp_distributed_executor.py index 78c86321d861..d1f8c36fbbec 100644 --- a/vllm/executor/mp_distributed_executor.py +++ b/vllm/executor/mp_distributed_executor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os from typing import Any, Callable, List, Optional, Union diff --git a/vllm/executor/msgspec_utils.py b/vllm/executor/msgspec_utils.py index c467115f124c..e680d53cbd10 100644 --- a/vllm/executor/msgspec_utils.py +++ b/vllm/executor/msgspec_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from array import array from typing import Any, Type diff --git a/vllm/executor/multiproc_worker_utils.py b/vllm/executor/multiproc_worker_utils.py index 539b6ae2d357..cef6a994a9c0 100644 --- a/vllm/executor/multiproc_worker_utils.py +++ b/vllm/executor/multiproc_worker_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os import sys diff --git a/vllm/executor/ray_distributed_executor.py b/vllm/executor/ray_distributed_executor.py index 2afd99f99b35..80e7a1c405f9 100644 --- a/vllm/executor/ray_distributed_executor.py +++ b/vllm/executor/ray_distributed_executor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os from collections import defaultdict diff --git a/vllm/executor/ray_utils.py b/vllm/executor/ray_utils.py index e55155ea0622..5d5cc8398e94 100644 --- a/vllm/executor/ray_utils.py +++ b/vllm/executor/ray_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import time from collections import defaultdict diff --git a/vllm/executor/uniproc_executor.py b/vllm/executor/uniproc_executor.py index a5c4dcf0ec7f..dcb4a8f27c25 100644 --- a/vllm/executor/uniproc_executor.py +++ b/vllm/executor/uniproc_executor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union diff --git a/vllm/forward_context.py b/vllm/forward_context.py index 828b394ec5d2..10de8bc593ab 100644 --- a/vllm/forward_context.py +++ b/vllm/forward_context.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from collections import defaultdict from contextlib import contextmanager diff --git a/vllm/inputs/__init__.py b/vllm/inputs/__init__.py index a0dd89f69bac..6f8f2cd758f7 100644 --- a/vllm/inputs/__init__.py +++ b/vllm/inputs/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .data import (DecoderOnlyInputs, EncoderDecoderInputs, ExplicitEncoderDecoderPrompt, ProcessorInputs, PromptType, SingletonInputs, SingletonInputsAdapter, SingletonPrompt, diff --git a/vllm/inputs/data.py b/vllm/inputs/data.py index 57e85779dd58..2ffebeee392a 100644 --- a/vllm/inputs/data.py +++ b/vllm/inputs/data.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from functools import cached_property from typing import (TYPE_CHECKING, Any, Dict, Generic, Iterable, List, Literal, diff --git a/vllm/inputs/parse.py b/vllm/inputs/parse.py index 09f1ff2cb42e..454d9d8303b7 100644 --- a/vllm/inputs/parse.py +++ b/vllm/inputs/parse.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Literal, Sequence, TypedDict, Union, cast, overload from typing_extensions import TypeIs diff --git a/vllm/inputs/preprocess.py b/vllm/inputs/preprocess.py index 70372e0cad22..4d8f28cb0417 100644 --- a/vllm/inputs/preprocess.py +++ b/vllm/inputs/preprocess.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from typing import List, Mapping, Optional, Union diff --git a/vllm/inputs/registry.py b/vllm/inputs/registry.py index 4b73ade7af5f..0ec726b8b05f 100644 --- a/vllm/inputs/registry.py +++ b/vllm/inputs/registry.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import functools from collections import UserDict from dataclasses import dataclass diff --git a/vllm/logger.py b/vllm/logger.py index cac174f7ba02..b20d55e3c101 100644 --- a/vllm/logger.py +++ b/vllm/logger.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Logging configuration for vLLM.""" import datetime import json diff --git a/vllm/logging_utils/__init__.py b/vllm/logging_utils/__init__.py index 576ccf78a811..7ab4632589bf 100644 --- a/vllm/logging_utils/__init__.py +++ b/vllm/logging_utils/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.logging_utils.formatter import NewLineFormatter __all__ = [ diff --git a/vllm/logging_utils/formatter.py b/vllm/logging_utils/formatter.py index b24b4e11d1fc..010b0a124987 100644 --- a/vllm/logging_utils/formatter.py +++ b/vllm/logging_utils/formatter.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import logging diff --git a/vllm/logits_process.py b/vllm/logits_process.py index 7716ccd27e25..d02072e8f818 100644 --- a/vllm/logits_process.py +++ b/vllm/logits_process.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Tuple, Union import torch diff --git a/vllm/lora/fully_sharded_layers.py b/vllm/lora/fully_sharded_layers.py index 545ec21ca74c..3d6620817b4b 100644 --- a/vllm/lora/fully_sharded_layers.py +++ b/vllm/lora/fully_sharded_layers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # pylint: disable=unused-argument from typing import TYPE_CHECKING, List, Optional, Tuple, Union, cast diff --git a/vllm/lora/layers.py b/vllm/lora/layers.py index cdd439d0385b..9f0297596ccb 100644 --- a/vllm/lora/layers.py +++ b/vllm/lora/layers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # pylint: disable=unused-argument import math from dataclasses import dataclass diff --git a/vllm/lora/lora.py b/vllm/lora/lora.py index 93ad4651f4b7..00299bf6c2a8 100644 --- a/vllm/lora/lora.py +++ b/vllm/lora/lora.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional from typing import Sequence as GenericSequence diff --git a/vllm/lora/models.py b/vllm/lora/models.py index 2e04cb902d00..ef77fd4b74ce 100644 --- a/vllm/lora/models.py +++ b/vllm/lora/models.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import copy import math import os diff --git a/vllm/lora/ops/torch_ops/__init__.py b/vllm/lora/ops/torch_ops/__init__.py index 9c9159b95f30..85601d58c9d7 100644 --- a/vllm/lora/ops/torch_ops/__init__.py +++ b/vllm/lora/ops/torch_ops/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.lora.ops.torch_ops.lora_ops import bgmv_expand # noqa: F401 from vllm.lora.ops.torch_ops.lora_ops import (bgmv_expand_slice, bgmv_shrink, sgmv_expand, sgmv_expand_slice, diff --git a/vllm/lora/ops/torch_ops/lora_ops.py b/vllm/lora/ops/torch_ops/lora_ops.py index 5f5aafd51615..af79f98415cb 100644 --- a/vllm/lora/ops/torch_ops/lora_ops.py +++ b/vllm/lora/ops/torch_ops/lora_ops.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch diff --git a/vllm/lora/ops/triton_ops/__init__.py b/vllm/lora/ops/triton_ops/__init__.py index 9805b6dd5038..dc440f7327fa 100644 --- a/vllm/lora/ops/triton_ops/__init__.py +++ b/vllm/lora/ops/triton_ops/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.lora.ops.triton_ops.bgmv_expand import bgmv_expand from vllm.lora.ops.triton_ops.bgmv_expand_slice import bgmv_expand_slice from vllm.lora.ops.triton_ops.bgmv_shrink import bgmv_shrink diff --git a/vllm/lora/ops/triton_ops/bgmv_expand.py b/vllm/lora/ops/triton_ops/bgmv_expand.py index 42adb191b8ea..98510b39661a 100644 --- a/vllm/lora/ops/triton_ops/bgmv_expand.py +++ b/vllm/lora/ops/triton_ops/bgmv_expand.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/ops/triton_ops/bgmv_expand_slice.py b/vllm/lora/ops/triton_ops/bgmv_expand_slice.py index f397d752a3ea..48804123c1ea 100644 --- a/vllm/lora/ops/triton_ops/bgmv_expand_slice.py +++ b/vllm/lora/ops/triton_ops/bgmv_expand_slice.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/ops/triton_ops/bgmv_shrink.py b/vllm/lora/ops/triton_ops/bgmv_shrink.py index f3ef01d39e77..227a5765e56b 100644 --- a/vllm/lora/ops/triton_ops/bgmv_shrink.py +++ b/vllm/lora/ops/triton_ops/bgmv_shrink.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/ops/triton_ops/sgmv_expand.py b/vllm/lora/ops/triton_ops/sgmv_expand.py index 48fa5cd63741..a8e71cacfe5a 100644 --- a/vllm/lora/ops/triton_ops/sgmv_expand.py +++ b/vllm/lora/ops/triton_ops/sgmv_expand.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/ops/triton_ops/sgmv_shrink.py b/vllm/lora/ops/triton_ops/sgmv_shrink.py index 9bb35e8ffd32..8b26583c11c1 100644 --- a/vllm/lora/ops/triton_ops/sgmv_shrink.py +++ b/vllm/lora/ops/triton_ops/sgmv_shrink.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/ops/triton_ops/utils.py b/vllm/lora/ops/triton_ops/utils.py index 7df5bc2c225e..78409b91a14e 100644 --- a/vllm/lora/ops/triton_ops/utils.py +++ b/vllm/lora/ops/triton_ops/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import functools from typing import Dict, List, Tuple diff --git a/vllm/lora/peft_helper.py b/vllm/lora/peft_helper.py index b9c506f6e0bf..9496ab5a75c0 100644 --- a/vllm/lora/peft_helper.py +++ b/vllm/lora/peft_helper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from: https://github.com/huggingface/peft/blob/main/src/peft/tuners/lora/config.py import json diff --git a/vllm/lora/punica_wrapper/__init__.py b/vllm/lora/punica_wrapper/__init__.py index 48ada3926ea4..915fc6623398 100644 --- a/vllm/lora/punica_wrapper/__init__.py +++ b/vllm/lora/punica_wrapper/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.lora.punica_wrapper.punica_base import PunicaWrapperBase from vllm.lora.punica_wrapper.punica_selector import get_punica_wrapper diff --git a/vllm/lora/punica_wrapper/punica_base.py b/vllm/lora/punica_wrapper/punica_base.py index b9ec0c4bc632..1a2282ae9acc 100644 --- a/vllm/lora/punica_wrapper/punica_base.py +++ b/vllm/lora/punica_wrapper/punica_base.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/punica_wrapper/punica_cpu.py b/vllm/lora/punica_wrapper/punica_cpu.py index b9ae3e07492c..29428f4cfff3 100644 --- a/vllm/lora/punica_wrapper/punica_cpu.py +++ b/vllm/lora/punica_wrapper/punica_cpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, Optional, Tuple, Union import torch diff --git a/vllm/lora/punica_wrapper/punica_gpu.py b/vllm/lora/punica_wrapper/punica_gpu.py index 451f23e49f27..9ccd9c36a073 100644 --- a/vllm/lora/punica_wrapper/punica_gpu.py +++ b/vllm/lora/punica_wrapper/punica_gpu.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Based on: Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023). diff --git a/vllm/lora/punica_wrapper/punica_hpu.py b/vllm/lora/punica_wrapper/punica_hpu.py index d9c4f44a1c28..51e1bfab3f51 100644 --- a/vllm/lora/punica_wrapper/punica_hpu.py +++ b/vllm/lora/punica_wrapper/punica_hpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple, Union, final import torch diff --git a/vllm/lora/punica_wrapper/punica_selector.py b/vllm/lora/punica_wrapper/punica_selector.py index a29322465199..ad5d4b788ec4 100644 --- a/vllm/lora/punica_wrapper/punica_selector.py +++ b/vllm/lora/punica_wrapper/punica_selector.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.utils import resolve_obj_by_qualname diff --git a/vllm/lora/punica_wrapper/utils.py b/vllm/lora/punica_wrapper/utils.py index 7360c8c09e3a..dbc2d27c597f 100644 --- a/vllm/lora/punica_wrapper/utils.py +++ b/vllm/lora/punica_wrapper/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import TYPE_CHECKING, List, Optional, Tuple, Union import torch diff --git a/vllm/lora/request.py b/vllm/lora/request.py index 5e3d2f0ed211..badfaa419377 100644 --- a/vllm/lora/request.py +++ b/vllm/lora/request.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import warnings from typing import Optional diff --git a/vllm/lora/utils.py b/vllm/lora/utils.py index d72b7638d84a..f47b0af15522 100644 --- a/vllm/lora/utils.py +++ b/vllm/lora/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import re from typing import List, Optional, Set, Tuple, Type, Union diff --git a/vllm/lora/worker_manager.py b/vllm/lora/worker_manager.py index a64296f7fd90..f33a7b88cc35 100644 --- a/vllm/lora/worker_manager.py +++ b/vllm/lora/worker_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from contextlib import contextmanager from typing import Any, Dict, List, Literal, Optional, Set, Type, Union diff --git a/vllm/model_executor/__init__.py b/vllm/model_executor/__init__.py index 7278c7fbe8be..7636152176f1 100644 --- a/vllm/model_executor/__init__.py +++ b/vllm/model_executor/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.model_executor.parameter import (BasevLLMParameter, PackedvLLMParameter) from vllm.model_executor.sampling_metadata import (SamplingMetadata, diff --git a/vllm/model_executor/custom_op.py b/vllm/model_executor/custom_op.py index 96995c56bf50..ee4f41ea6ec9 100644 --- a/vllm/model_executor/custom_op.py +++ b/vllm/model_executor/custom_op.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, Type import torch.nn as nn diff --git a/vllm/model_executor/guided_decoding/__init__.py b/vllm/model_executor/guided_decoding/__init__.py index 18b435a42544..cf96461a549f 100644 --- a/vllm/model_executor/guided_decoding/__init__.py +++ b/vllm/model_executor/guided_decoding/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/vllm/model_executor/guided_decoding/guided_fields.py b/vllm/model_executor/guided_decoding/guided_fields.py index 8deb4c949824..db4ce26806c1 100644 --- a/vllm/model_executor/guided_decoding/guided_fields.py +++ b/vllm/model_executor/guided_decoding/guided_fields.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Dict, List, Optional, TypedDict, Union diff --git a/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py b/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py index a17e75a80300..7eaf9e38e66a 100644 --- a/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py +++ b/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import lru_cache from json import loads as json_loads from typing import Optional, Union diff --git a/vllm/model_executor/guided_decoding/outlines_decoding.py b/vllm/model_executor/guided_decoding/outlines_decoding.py index eb8db882435e..ba9c98290368 100644 --- a/vllm/model_executor/guided_decoding/outlines_decoding.py +++ b/vllm/model_executor/guided_decoding/outlines_decoding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import concurrent.futures import os diff --git a/vllm/model_executor/guided_decoding/outlines_logits_processors.py b/vllm/model_executor/guided_decoding/outlines_logits_processors.py index e4eb3f16e56c..ab72b55a8943 100644 --- a/vllm/model_executor/guided_decoding/outlines_logits_processors.py +++ b/vllm/model_executor/guided_decoding/outlines_logits_processors.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024- the Outlines developers # This file is adapted from # https://github.com/outlines-dev/outlines/blob/main/outlines/serve/vllm.py diff --git a/vllm/model_executor/guided_decoding/utils.py b/vllm/model_executor/guided_decoding/utils.py index 90dfa62ec467..87ef45358457 100644 --- a/vllm/model_executor/guided_decoding/utils.py +++ b/vllm/model_executor/guided_decoding/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import re diff --git a/vllm/model_executor/guided_decoding/xgrammar_decoding.py b/vllm/model_executor/guided_decoding/xgrammar_decoding.py index ee30ce96f0a1..c01bd3af1d5b 100644 --- a/vllm/model_executor/guided_decoding/xgrammar_decoding.py +++ b/vllm/model_executor/guided_decoding/xgrammar_decoding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # noqa: UP007 from __future__ import annotations diff --git a/vllm/model_executor/layers/activation.py b/vllm/model_executor/layers/activation.py index fb9684ac1c18..f782920d06a0 100644 --- a/vllm/model_executor/layers/activation.py +++ b/vllm/model_executor/layers/activation.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Custom activation functions.""" import math from typing import Optional diff --git a/vllm/model_executor/layers/fused_moe/__init__.py b/vllm/model_executor/layers/fused_moe/__init__.py index c4223d12600a..6f933c3fa3c9 100644 --- a/vllm/model_executor/layers/fused_moe/__init__.py +++ b/vllm/model_executor/layers/fused_moe/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from contextlib import contextmanager from typing import Any, Dict, Optional diff --git a/vllm/model_executor/layers/fused_moe/fused_marlin_moe.py b/vllm/model_executor/layers/fused_moe/fused_marlin_moe.py index 87993267c05b..4ca569ca4f19 100644 --- a/vllm/model_executor/layers/fused_moe/fused_marlin_moe.py +++ b/vllm/model_executor/layers/fused_moe/fused_marlin_moe.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Fused MoE utilities for GPTQ.""" import functools from typing import Optional diff --git a/vllm/model_executor/layers/fused_moe/fused_moe.py b/vllm/model_executor/layers/fused_moe/fused_moe.py index c80e6bf07468..9613696a0eb4 100644 --- a/vllm/model_executor/layers/fused_moe/fused_moe.py +++ b/vllm/model_executor/layers/fused_moe/fused_moe.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Fused MoE kernel.""" import functools import json diff --git a/vllm/model_executor/layers/fused_moe/layer.py b/vllm/model_executor/layers/fused_moe/layer.py index da0ce1885dbb..3c7ef5e0080f 100644 --- a/vllm/model_executor/layers/fused_moe/layer.py +++ b/vllm/model_executor/layers/fused_moe/layer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import abstractmethod from enum import Enum from typing import Callable, List, Optional, Tuple diff --git a/vllm/model_executor/layers/fused_moe/moe_pallas.py b/vllm/model_executor/layers/fused_moe/moe_pallas.py index 563ee18c6430..0365afa10a45 100644 --- a/vllm/model_executor/layers/fused_moe/moe_pallas.py +++ b/vllm/model_executor/layers/fused_moe/moe_pallas.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import torch.nn.functional as F from torch_xla.experimental.custom_kernel import _histogram diff --git a/vllm/model_executor/layers/fused_moe/moe_torch_iterative.py b/vllm/model_executor/layers/fused_moe/moe_torch_iterative.py index bcff55f4fdf1..d9a5de1b3033 100644 --- a/vllm/model_executor/layers/fused_moe/moe_torch_iterative.py +++ b/vllm/model_executor/layers/fused_moe/moe_torch_iterative.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import torch.nn.functional as F diff --git a/vllm/model_executor/layers/layernorm.py b/vllm/model_executor/layers/layernorm.py index 43ea4eb5a4d1..b476fb0dbc7e 100644 --- a/vllm/model_executor/layers/layernorm.py +++ b/vllm/model_executor/layers/layernorm.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Custom normalization layers.""" from typing import Optional, Tuple, Union diff --git a/vllm/model_executor/layers/linear.py b/vllm/model_executor/layers/linear.py index 52263e96fb9f..08f1e103e53b 100644 --- a/vllm/model_executor/layers/linear.py +++ b/vllm/model_executor/layers/linear.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from abc import abstractmethod from typing import Dict, List, Optional, Tuple diff --git a/vllm/model_executor/layers/logits_processor.py b/vllm/model_executor/layers/logits_processor.py index 42decde1d0f7..ebf74c67d64c 100644 --- a/vllm/model_executor/layers/logits_processor.py +++ b/vllm/model_executor/layers/logits_processor.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A layer that compute logits from hidden_stats.""" import inspect from typing import Optional diff --git a/vllm/model_executor/layers/mamba/mamba_mixer.py b/vllm/model_executor/layers/mamba/mamba_mixer.py index 606c796d503c..93c3cc91bb09 100644 --- a/vllm/model_executor/layers/mamba/mamba_mixer.py +++ b/vllm/model_executor/layers/mamba/mamba_mixer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from torch import nn from torch.nn.parameter import Parameter diff --git a/vllm/model_executor/layers/mamba/ops/causal_conv1d.py b/vllm/model_executor/layers/mamba/ops/causal_conv1d.py index be5639df985f..21e27160f090 100644 --- a/vllm/model_executor/layers/mamba/ops/causal_conv1d.py +++ b/vllm/model_executor/layers/mamba/ops/causal_conv1d.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024, Tri Dao. # Adapted from https://github.com/Dao-AILab/causal-conv1d/blob/main/causal_conv1d/causal_conv1d_interface.py diff --git a/vllm/model_executor/layers/mamba/ops/mamba_ssm.py b/vllm/model_executor/layers/mamba/ops/mamba_ssm.py index 1484b79815ab..3c35f1ac0dcf 100644 --- a/vllm/model_executor/layers/mamba/ops/mamba_ssm.py +++ b/vllm/model_executor/layers/mamba/ops/mamba_ssm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/main/mamba_ssm/ops/triton/selective_state_update.py diff --git a/vllm/model_executor/layers/pooler.py b/vllm/model_executor/layers/pooler.py index 75bf33dc70a5..0012636ef9ff 100644 --- a/vllm/model_executor/layers/pooler.py +++ b/vllm/model_executor/layers/pooler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from enum import IntEnum from typing import List, Optional, Union diff --git a/vllm/model_executor/layers/quantization/__init__.py b/vllm/model_executor/layers/quantization/__init__.py index bd0fd4799339..6ded3874fc1d 100644 --- a/vllm/model_executor/layers/quantization/__init__.py +++ b/vllm/model_executor/layers/quantization/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List, Type from vllm.model_executor.layers.quantization.base_config import ( diff --git a/vllm/model_executor/layers/quantization/aqlm.py b/vllm/model_executor/layers/quantization/aqlm.py index 72c89fe2b0e4..6c08d016c0f7 100644 --- a/vllm/model_executor/layers/quantization/aqlm.py +++ b/vllm/model_executor/layers/quantization/aqlm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Supports AQLM compression, see https://github.com/Vahe1994/AQLM # and https://arxiv.org/pdf/2401.06118.pdf diff --git a/vllm/model_executor/layers/quantization/awq.py b/vllm/model_executor/layers/quantization/awq.py index d83528e9ec79..ff77af44d770 100644 --- a/vllm/model_executor/layers/quantization/awq.py +++ b/vllm/model_executor/layers/quantization/awq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/awq_marlin.py b/vllm/model_executor/layers/quantization/awq_marlin.py index 0c3c9816878e..8849ba292822 100644 --- a/vllm/model_executor/layers/quantization/awq_marlin.py +++ b/vllm/model_executor/layers/quantization/awq_marlin.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/awq_triton.py b/vllm/model_executor/layers/quantization/awq_triton.py index ace8f4a34881..09efd4dbd797 100644 --- a/vllm/model_executor/layers/quantization/awq_triton.py +++ b/vllm/model_executor/layers/quantization/awq_triton.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import triton import triton.language as tl diff --git a/vllm/model_executor/layers/quantization/base_config.py b/vllm/model_executor/layers/quantization/base_config.py index 2fb2642dd515..2eefcc4f3051 100644 --- a/vllm/model_executor/layers/quantization/base_config.py +++ b/vllm/model_executor/layers/quantization/base_config.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import inspect from abc import ABC, abstractmethod from typing import Any, Dict, List, Optional, Type diff --git a/vllm/model_executor/layers/quantization/bitsandbytes.py b/vllm/model_executor/layers/quantization/bitsandbytes.py index 5dc872933282..889eda009df1 100644 --- a/vllm/model_executor/layers/quantization/bitsandbytes.py +++ b/vllm/model_executor/layers/quantization/bitsandbytes.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py b/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py index 37981ed918e7..24f7542e1238 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from contextlib import suppress from typing import Any, Dict, List, Literal, Optional, Tuple, cast diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py b/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py index e1c45f4e42e4..db8e8a4b6c11 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum from enum import Enum from typing import Callable, List, Optional diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py index 569ecaa6f5a7..b26c74f2484b 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .compressed_tensors_scheme import CompressedTensorsScheme from .compressed_tensors_w4a16_24 import (W4A16SPARSE24_SUPPORTED_BITS, CompressedTensorsW4A16Sparse24) diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py index 21e6fe7a2261..84f924b236af 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py index b4bab33e1fb1..daa25d23a306 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Optional diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py index 2e1b5e3c2d3b..535ea6b32cfb 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py index 1671a23d77c6..5c8261908735 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py index 1d4e4bd52ada..5dcc41a9e5da 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py index 0e3f4731775c..08d86a4e5ddd 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional, Set import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py index 2dd243b9c310..38df09ff3937 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional, Set import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py b/vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py index f4c1dbc0361c..b69c5e7a02a7 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Type import torch diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/utils.py b/vllm/model_executor/layers/quantization/compressed_tensors/utils.py index 34996b08e9c9..d700a0b15a81 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/utils.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import re from typing import Iterable, Optional diff --git a/vllm/model_executor/layers/quantization/deepspeedfp.py b/vllm/model_executor/layers/quantization/deepspeedfp.py index 36598b3e2990..b4123650149f 100644 --- a/vllm/model_executor/layers/quantization/deepspeedfp.py +++ b/vllm/model_executor/layers/quantization/deepspeedfp.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/experts_int8.py b/vllm/model_executor/layers/quantization/experts_int8.py index 100cbfa4c959..87fbcf62ac1e 100644 --- a/vllm/model_executor/layers/quantization/experts_int8.py +++ b/vllm/model_executor/layers/quantization/experts_int8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/fbgemm_fp8.py b/vllm/model_executor/layers/quantization/fbgemm_fp8.py index 7b71e13b50cc..da5ef36c5105 100644 --- a/vllm/model_executor/layers/quantization/fbgemm_fp8.py +++ b/vllm/model_executor/layers/quantization/fbgemm_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/fp8.py b/vllm/model_executor/layers/quantization/fp8.py index adab1973b40e..86e025310f4e 100644 --- a/vllm/model_executor/layers/quantization/fp8.py +++ b/vllm/model_executor/layers/quantization/fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/gguf.py b/vllm/model_executor/layers/quantization/gguf.py index f0943efa0039..86e6dbb5a5fb 100644 --- a/vllm/model_executor/layers/quantization/gguf.py +++ b/vllm/model_executor/layers/quantization/gguf.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import gguf diff --git a/vllm/model_executor/layers/quantization/gptq.py b/vllm/model_executor/layers/quantization/gptq.py index abafad0f1047..0cb77a7546d1 100644 --- a/vllm/model_executor/layers/quantization/gptq.py +++ b/vllm/model_executor/layers/quantization/gptq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum from enum import Enum from fractions import Fraction diff --git a/vllm/model_executor/layers/quantization/gptq_marlin.py b/vllm/model_executor/layers/quantization/gptq_marlin.py index 4dc4b052b041..99ab299958b4 100644 --- a/vllm/model_executor/layers/quantization/gptq_marlin.py +++ b/vllm/model_executor/layers/quantization/gptq_marlin.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, List, Optional, Set, Union import torch diff --git a/vllm/model_executor/layers/quantization/gptq_marlin_24.py b/vllm/model_executor/layers/quantization/gptq_marlin_24.py index 07552c0f1334..cec984483fd8 100644 --- a/vllm/model_executor/layers/quantization/gptq_marlin_24.py +++ b/vllm/model_executor/layers/quantization/gptq_marlin_24.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/hqq_marlin.py b/vllm/model_executor/layers/quantization/hqq_marlin.py index 28538d299335..432f43688ff5 100644 --- a/vllm/model_executor/layers/quantization/hqq_marlin.py +++ b/vllm/model_executor/layers/quantization/hqq_marlin.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/ipex_quant.py b/vllm/model_executor/layers/quantization/ipex_quant.py index c16a962134d0..2531170ececf 100644 --- a/vllm/model_executor/layers/quantization/ipex_quant.py +++ b/vllm/model_executor/layers/quantization/ipex_quant.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py b/vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py index 915bdc477892..c06befaf3b5a 100644 --- a/vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py +++ b/vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Callable, Optional, Tuple diff --git a/vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py b/vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py index 83549870e3f0..bcfdb1677716 100644 --- a/vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py +++ b/vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Type import vllm.envs as envs diff --git a/vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py b/vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py index 1d85d62ec83e..2706fbb539ab 100644 --- a/vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py +++ b/vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple import torch diff --git a/vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py b/vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py index 15df0200f30b..3f0586f6e30d 100644 --- a/vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py +++ b/vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import partial from typing import Optional, Tuple diff --git a/vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py b/vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py index 6969583d6d47..e21801cf6a78 100644 --- a/vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py +++ b/vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple import torch diff --git a/vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py b/vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py index c4a83b4faafe..91e7654053f9 100644 --- a/vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py +++ b/vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Optional, Tuple diff --git a/vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py b/vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py index 4824a1180416..a5967995ac88 100644 --- a/vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py +++ b/vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Dict, List, Optional, Type diff --git a/vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py b/vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py index 2e83a04286a0..2bf21a05c46d 100644 --- a/vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py +++ b/vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple import torch diff --git a/vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py b/vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py index 97ec8cb0500d..5da5df8efaeb 100644 --- a/vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py +++ b/vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Tuple import torch diff --git a/vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py b/vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py index 9de668e65882..0bf090d7fab3 100644 --- a/vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py +++ b/vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import warnings from typing import Optional, Tuple diff --git a/vllm/model_executor/layers/quantization/kv_cache.py b/vllm/model_executor/layers/quantization/kv_cache.py index e1870c73cc93..388a4f16699c 100644 --- a/vllm/model_executor/layers/quantization/kv_cache.py +++ b/vllm/model_executor/layers/quantization/kv_cache.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch from vllm.logger import init_logger diff --git a/vllm/model_executor/layers/quantization/marlin.py b/vllm/model_executor/layers/quantization/marlin.py index 20212e672eab..4cf0c677c079 100644 --- a/vllm/model_executor/layers/quantization/marlin.py +++ b/vllm/model_executor/layers/quantization/marlin.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/modelopt.py b/vllm/model_executor/layers/quantization/modelopt.py index a1b3eeb43cbe..348e9bccd9b0 100644 --- a/vllm/model_executor/layers/quantization/modelopt.py +++ b/vllm/model_executor/layers/quantization/modelopt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/moe_wna16.py b/vllm/model_executor/layers/quantization/moe_wna16.py index 11a9d4ac5c1a..1ae765a2260f 100644 --- a/vllm/model_executor/layers/quantization/moe_wna16.py +++ b/vllm/model_executor/layers/quantization/moe_wna16.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/neuron_quant.py b/vllm/model_executor/layers/quantization/neuron_quant.py index 2d5cdfa16577..a8e8be207fd1 100644 --- a/vllm/model_executor/layers/quantization/neuron_quant.py +++ b/vllm/model_executor/layers/quantization/neuron_quant.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from importlib.util import find_spec from typing import Any, Dict, List, Optional diff --git a/vllm/model_executor/layers/quantization/qqq.py b/vllm/model_executor/layers/quantization/qqq.py index 2ccd08202961..6e9d3dc6cb37 100644 --- a/vllm/model_executor/layers/quantization/qqq.py +++ b/vllm/model_executor/layers/quantization/qqq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/quark/quark.py b/vllm/model_executor/layers/quantization/quark/quark.py index fc214255eca7..0451cf82b997 100644 --- a/vllm/model_executor/layers/quantization/quark/quark.py +++ b/vllm/model_executor/layers/quantization/quark/quark.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import fnmatch import re from typing import Any, Dict, List, Optional, cast diff --git a/vllm/model_executor/layers/quantization/quark/quark_moe.py b/vllm/model_executor/layers/quantization/quark/quark_moe.py index 68a395454076..98743b15e4b2 100644 --- a/vllm/model_executor/layers/quantization/quark/quark_moe.py +++ b/vllm/model_executor/layers/quantization/quark/quark_moe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Callable, Dict, Optional import torch diff --git a/vllm/model_executor/layers/quantization/quark/schemes/__init__.py b/vllm/model_executor/layers/quantization/quark/schemes/__init__.py index fb0ba9bd5220..9069b5a0d515 100644 --- a/vllm/model_executor/layers/quantization/quark/schemes/__init__.py +++ b/vllm/model_executor/layers/quantization/quark/schemes/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .quark_scheme import QuarkScheme from .quark_w8a8_fp8 import QuarkW8A8Fp8 from .quark_w8a8_int8 import QuarkW8A8Int8 diff --git a/vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py b/vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py index 239597fa4be0..40c8ea86d3c3 100644 --- a/vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py +++ b/vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Optional diff --git a/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py b/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py index 206931ea2ffc..c885e98a4d66 100644 --- a/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py +++ b/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional import torch diff --git a/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py b/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py index 8cb47e9c37e5..1bf34b098938 100644 --- a/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py +++ b/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Callable, List, Optional, Set import torch diff --git a/vllm/model_executor/layers/quantization/quark/utils.py b/vllm/model_executor/layers/quantization/quark/utils.py index 742a629bdb1c..afb1d9d63e73 100644 --- a/vllm/model_executor/layers/quantization/quark/utils.py +++ b/vllm/model_executor/layers/quantization/quark/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import re from typing import Any, Iterable, Optional diff --git a/vllm/model_executor/layers/quantization/schema.py b/vllm/model_executor/layers/quantization/schema.py index a26c524787a0..026881f2dbaa 100644 --- a/vllm/model_executor/layers/quantization/schema.py +++ b/vllm/model_executor/layers/quantization/schema.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ This file contains the Pydantic schemas for various quantization-related parameters. When a relevant quantization technique is specified, these diff --git a/vllm/model_executor/layers/quantization/tpu_int8.py b/vllm/model_executor/layers/quantization/tpu_int8.py index 605c3a38644a..3234fecaa3b3 100644 --- a/vllm/model_executor/layers/quantization/tpu_int8.py +++ b/vllm/model_executor/layers/quantization/tpu_int8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional, Tuple import torch diff --git a/vllm/model_executor/layers/quantization/utils/__init__.py b/vllm/model_executor/layers/quantization/utils/__init__.py index e60f0c79ac1f..f7ee47288514 100644 --- a/vllm/model_executor/layers/quantization/utils/__init__.py +++ b/vllm/model_executor/layers/quantization/utils/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .layer_utils import replace_parameter, update_tensor_inplace __all__ = ['update_tensor_inplace', 'replace_parameter'] diff --git a/vllm/model_executor/layers/quantization/utils/fp8_utils.py b/vllm/model_executor/layers/quantization/utils/fp8_utils.py index 850820f66ff9..29c7268ad9e0 100644 --- a/vllm/model_executor/layers/quantization/utils/fp8_utils.py +++ b/vllm/model_executor/layers/quantization/utils/fp8_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from https://github.com/sgl-project/sglang/pull/2575 import functools import json diff --git a/vllm/model_executor/layers/quantization/utils/layer_utils.py b/vllm/model_executor/layers/quantization/utils/layer_utils.py index edce6d19b6c4..5acae7ca3b84 100644 --- a/vllm/model_executor/layers/quantization/utils/layer_utils.py +++ b/vllm/model_executor/layers/quantization/utils/layer_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Union import torch diff --git a/vllm/model_executor/layers/quantization/utils/machete_utils.py b/vllm/model_executor/layers/quantization/utils/machete_utils.py index 18e1332050cd..cb7d49ed6f1c 100644 --- a/vllm/model_executor/layers/quantization/utils/machete_utils.py +++ b/vllm/model_executor/layers/quantization/utils/machete_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/layers/quantization/utils/marlin_utils.py b/vllm/model_executor/layers/quantization/utils/marlin_utils.py index c9366ca97d14..3beba3083244 100644 --- a/vllm/model_executor/layers/quantization/utils/marlin_utils.py +++ b/vllm/model_executor/layers/quantization/utils/marlin_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple import numpy diff --git a/vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py b/vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py index 245fe9238e42..6120a8e66aef 100644 --- a/vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py +++ b/vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional import torch diff --git a/vllm/model_executor/layers/quantization/utils/marlin_utils_test.py b/vllm/model_executor/layers/quantization/utils/marlin_utils_test.py index 4a06c5d63d52..fb557a31393c 100644 --- a/vllm/model_executor/layers/quantization/utils/marlin_utils_test.py +++ b/vllm/model_executor/layers/quantization/utils/marlin_utils_test.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utility functions used for tests and benchmarks""" from typing import List, Optional diff --git a/vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py b/vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py index 17d09055b1ea..3654268e27af 100644 --- a/vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py +++ b/vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utility functions used for tests and benchmarks""" import random diff --git a/vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py b/vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py index cb58eb945836..176b2947ab09 100644 --- a/vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py +++ b/vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import numpy diff --git a/vllm/model_executor/layers/quantization/utils/quant_utils.py b/vllm/model_executor/layers/quantization/utils/quant_utils.py index 95e785dcc407..62484f62f618 100644 --- a/vllm/model_executor/layers/quantization/utils/quant_utils.py +++ b/vllm/model_executor/layers/quantization/utils/quant_utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """This file is used for /tests and /benchmarks""" from typing import List, Optional, Tuple diff --git a/vllm/model_executor/layers/quantization/utils/w8a8_utils.py b/vllm/model_executor/layers/quantization/utils/w8a8_utils.py index 3af3b3e0ea94..3fd88e8754a5 100644 --- a/vllm/model_executor/layers/quantization/utils/w8a8_utils.py +++ b/vllm/model_executor/layers/quantization/utils/w8a8_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple, Union import torch diff --git a/vllm/model_executor/layers/rejection_sampler.py b/vllm/model_executor/layers/rejection_sampler.py index 9d6c3797c62f..62e27b714866 100644 --- a/vllm/model_executor/layers/rejection_sampler.py +++ b/vllm/model_executor/layers/rejection_sampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import cached_property from importlib.util import find_spec from typing import Dict, Optional, Tuple diff --git a/vllm/model_executor/layers/resampler.py b/vllm/model_executor/layers/resampler.py index a67713c320b8..4c9860006c32 100644 --- a/vllm/model_executor/layers/resampler.py +++ b/vllm/model_executor/layers/resampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py diff --git a/vllm/model_executor/layers/rotary_embedding.py b/vllm/model_executor/layers/rotary_embedding.py index d071cfe888f0..814c3b7d9cd8 100644 --- a/vllm/model_executor/layers/rotary_embedding.py +++ b/vllm/model_executor/layers/rotary_embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.33.2/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/layers/sampler.py b/vllm/model_executor/layers/sampler.py index 8dc26309d754..6af734be5e98 100644 --- a/vllm/model_executor/layers/sampler.py +++ b/vllm/model_executor/layers/sampler.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A layer that samples the next tokens from the model's outputs.""" import itertools import warnings diff --git a/vllm/model_executor/layers/spec_decode_base_sampler.py b/vllm/model_executor/layers/spec_decode_base_sampler.py index 6aa4b8bd34cd..35c7ffec271e 100644 --- a/vllm/model_executor/layers/spec_decode_base_sampler.py +++ b/vllm/model_executor/layers/spec_decode_base_sampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import abstractmethod from typing import Dict, Optional, Union diff --git a/vllm/model_executor/layers/typical_acceptance_sampler.py b/vllm/model_executor/layers/typical_acceptance_sampler.py index 584cf971d9c0..95362c280b43 100644 --- a/vllm/model_executor/layers/typical_acceptance_sampler.py +++ b/vllm/model_executor/layers/typical_acceptance_sampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import torch import torch.jit diff --git a/vllm/model_executor/layers/utils.py b/vllm/model_executor/layers/utils.py index f6f34cd49d95..dfe71028c1bc 100644 --- a/vllm/model_executor/layers/utils.py +++ b/vllm/model_executor/layers/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utility methods for model layers.""" from typing import Tuple diff --git a/vllm/model_executor/layers/vocab_parallel_embedding.py b/vllm/model_executor/layers/vocab_parallel_embedding.py index f230efacacdb..e409094dd535 100644 --- a/vllm/model_executor/layers/vocab_parallel_embedding.py +++ b/vllm/model_executor/layers/vocab_parallel_embedding.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import List, Optional, Sequence, Tuple diff --git a/vllm/model_executor/model_loader/__init__.py b/vllm/model_executor/model_loader/__init__.py index 12468997e465..9048c70c7a71 100644 --- a/vllm/model_executor/model_loader/__init__.py +++ b/vllm/model_executor/model_loader/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from torch import nn from vllm.config import VllmConfig diff --git a/vllm/model_executor/model_loader/loader.py b/vllm/model_executor/model_loader/loader.py index 4be511d12838..809af81d707a 100644 --- a/vllm/model_executor/model_loader/loader.py +++ b/vllm/model_executor/model_loader/loader.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa: SIM117 import collections import copy diff --git a/vllm/model_executor/model_loader/neuron.py b/vllm/model_executor/model_loader/neuron.py index a90fbd648def..d900fb3a7d39 100644 --- a/vllm/model_executor/model_loader/neuron.py +++ b/vllm/model_executor/model_loader/neuron.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utilities for selecting and loading neuron models.""" import copy import importlib diff --git a/vllm/model_executor/model_loader/openvino.py b/vllm/model_executor/model_loader/openvino.py index e6299295c85a..7bd531c568f5 100644 --- a/vllm/model_executor/model_loader/openvino.py +++ b/vllm/model_executor/model_loader/openvino.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa: SIM117 from pathlib import Path from typing import List, Optional, Tuple diff --git a/vllm/model_executor/model_loader/tensorizer.py b/vllm/model_executor/model_loader/tensorizer.py index 9266ca75ddaa..117251ccf05f 100644 --- a/vllm/model_executor/model_loader/tensorizer.py +++ b/vllm/model_executor/model_loader/tensorizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import dataclasses import io diff --git a/vllm/model_executor/model_loader/utils.py b/vllm/model_executor/model_loader/utils.py index 3f923d2f6632..084ca53b123d 100644 --- a/vllm/model_executor/model_loader/utils.py +++ b/vllm/model_executor/model_loader/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utilities for selecting and loading models.""" import contextlib from dataclasses import dataclass, field diff --git a/vllm/model_executor/model_loader/weight_utils.py b/vllm/model_executor/model_loader/weight_utils.py index e4d103f7cab9..cade0a1dd595 100644 --- a/vllm/model_executor/model_loader/weight_utils.py +++ b/vllm/model_executor/model_loader/weight_utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utilities for downloading and initializing model weights.""" import fnmatch import glob diff --git a/vllm/model_executor/models/__init__.py b/vllm/model_executor/models/__init__.py index a3ef9adad16d..6be4a8341306 100644 --- a/vllm/model_executor/models/__init__.py +++ b/vllm/model_executor/models/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .interfaces import (HasInnerState, SupportsLoRA, SupportsMultiModal, SupportsPP, has_inner_state, supports_lora, supports_multimodal, supports_pp) diff --git a/vllm/model_executor/models/adapters.py b/vllm/model_executor/models/adapters.py index 55e90b9d4195..3e1daa773fc8 100644 --- a/vllm/model_executor/models/adapters.py +++ b/vllm/model_executor/models/adapters.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections.abc import Iterable from typing import TYPE_CHECKING, Any, Optional, TypeVar diff --git a/vllm/model_executor/models/arctic.py b/vllm/model_executor/models/arctic.py index fd6b5659df5d..d015682aab47 100644 --- a/vllm/model_executor/models/arctic.py +++ b/vllm/model_executor/models/arctic.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Inference-only Snowflake Arctic model.""" from typing import Iterable, List, Optional, Set, Tuple, Union diff --git a/vllm/model_executor/models/aria.py b/vllm/model_executor/models/aria.py index 8c6873de1362..97502c38b9f0 100644 --- a/vllm/model_executor/models/aria.py +++ b/vllm/model_executor/models/aria.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import (Iterable, List, Mapping, Optional, Set, Tuple, TypedDict, Union) diff --git a/vllm/model_executor/models/baichuan.py b/vllm/model_executor/models/baichuan.py index a923ed36a9db..5dfaa727b75a 100644 --- a/vllm/model_executor/models/baichuan.py +++ b/vllm/model_executor/models/baichuan.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX diff --git a/vllm/model_executor/models/bart.py b/vllm/model_executor/models/bart.py index 57eb5adc82d5..204c48d0d896 100644 --- a/vllm/model_executor/models/bart.py +++ b/vllm/model_executor/models/bart.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Derived from BART implementation posted on HuggingFace; license below: # # coding=utf-8 diff --git a/vllm/model_executor/models/bert.py b/vllm/model_executor/models/bert.py index 4be136543de1..4d0f5ac8ea5d 100644 --- a/vllm/model_executor/models/bert.py +++ b/vllm/model_executor/models/bert.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Iterable, List, Optional, Set, Tuple import torch diff --git a/vllm/model_executor/models/blip.py b/vllm/model_executor/models/blip.py index 987dfaf44f22..bedbdceb7721 100644 --- a/vllm/model_executor/models/blip.py +++ b/vllm/model_executor/models/blip.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Minimal implementation of BlipVisionModel intended to be only used within a vision language model.""" from typing import Iterable, Optional, Set, Tuple, Union diff --git a/vllm/model_executor/models/blip2.py b/vllm/model_executor/models/blip2.py index b559ac677a74..2b04522223d0 100644 --- a/vllm/model_executor/models/blip2.py +++ b/vllm/model_executor/models/blip2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import cached_property from typing import (Iterable, List, Literal, Mapping, Optional, Set, Tuple, TypedDict, Union) diff --git a/vllm/model_executor/models/bloom.py b/vllm/model_executor/models/bloom.py index fee74f491acc..229677ae7d98 100644 --- a/vllm/model_executor/models/bloom.py +++ b/vllm/model_executor/models/bloom.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/bloom/modeling_bloom.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/chameleon.py b/vllm/model_executor/models/chameleon.py index e834c9004f14..9061a31280e6 100644 --- a/vllm/model_executor/models/chameleon.py +++ b/vllm/model_executor/models/chameleon.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import cached_property from typing import (Any, Dict, Iterable, List, Literal, Mapping, Optional, Set, Tuple, TypedDict, Union) diff --git a/vllm/model_executor/models/chatglm.py b/vllm/model_executor/models/chatglm.py index d5f9b4d19e5c..b81a9e917d45 100644 --- a/vllm/model_executor/models/chatglm.py +++ b/vllm/model_executor/models/chatglm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/THUDM/CogAgent """Inference-only CogAgent model compatible with THUDM weights.""" diff --git a/vllm/model_executor/models/clip.py b/vllm/model_executor/models/clip.py index dd69f6c9a5af..1e784f5b4172 100644 --- a/vllm/model_executor/models/clip.py +++ b/vllm/model_executor/models/clip.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Minimal implementation of CLIPVisionModel intended to be only used within a vision language model.""" from typing import Iterable, List, Optional, Set, Tuple, Union diff --git a/vllm/model_executor/models/commandr.py b/vllm/model_executor/models/commandr.py index 989056bf5c15..e73627da05d4 100644 --- a/vllm/model_executor/models/commandr.py +++ b/vllm/model_executor/models/commandr.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 Cohere and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX diff --git a/vllm/model_executor/models/dbrx.py b/vllm/model_executor/models/dbrx.py index b2aa3c0709bd..bb3f4f40dd21 100644 --- a/vllm/model_executor/models/dbrx.py +++ b/vllm/model_executor/models/dbrx.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Iterable, List, Optional, Set, Tuple, Union import torch diff --git a/vllm/model_executor/models/decilm.py b/vllm/model_executor/models/decilm.py index c551853956b9..b239b642f752 100644 --- a/vllm/model_executor/models/decilm.py +++ b/vllm/model_executor/models/decilm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 DeciAI Research Team. All rights reserved. diff --git a/vllm/model_executor/models/deepseek.py b/vllm/model_executor/models/deepseek.py index 74b6bfdf2190..9599e1df6a3c 100644 --- a/vllm/model_executor/models/deepseek.py +++ b/vllm/model_executor/models/deepseek.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/deepseek_v2.py b/vllm/model_executor/models/deepseek_v2.py index 73388cd26985..f5fede4d8226 100644 --- a/vllm/model_executor/models/deepseek_v2.py +++ b/vllm/model_executor/models/deepseek_v2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/deepseek_v3.py b/vllm/model_executor/models/deepseek_v3.py index 06ea3dab93e1..a4829aa1a572 100644 --- a/vllm/model_executor/models/deepseek_v3.py +++ b/vllm/model_executor/models/deepseek_v3.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/deepseek_vl2.py b/vllm/model_executor/models/deepseek_vl2.py index 344832d8b33e..1343b9762874 100644 --- a/vllm/model_executor/models/deepseek_vl2.py +++ b/vllm/model_executor/models/deepseek_vl2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py """Inference-only Deepseek-VL2 model compatible with HuggingFace weights.""" import math diff --git a/vllm/model_executor/models/eagle.py b/vllm/model_executor/models/eagle.py index 948560b4906b..373a728be89c 100644 --- a/vllm/model_executor/models/eagle.py +++ b/vllm/model_executor/models/eagle.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Iterable, List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/exaone.py b/vllm/model_executor/models/exaone.py index bc3295da7b60..2eb91a682242 100644 --- a/vllm/model_executor/models/exaone.py +++ b/vllm/model_executor/models/exaone.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct/blob/main/modeling_exaone.py # Copyright 2024 The LG U+ CTO AI Tech Lab. diff --git a/vllm/model_executor/models/fairseq2_llama.py b/vllm/model_executor/models/fairseq2_llama.py index b93a68680375..310aca999bc2 100644 --- a/vllm/model_executor/models/fairseq2_llama.py +++ b/vllm/model_executor/models/fairseq2_llama.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 The vLLM team. # Copyright 2024 Meta Platforms, Inc. and affiliates. All rights reserved. # diff --git a/vllm/model_executor/models/falcon.py b/vllm/model_executor/models/falcon.py index c503a368e824..01b66a1c2a5f 100644 --- a/vllm/model_executor/models/falcon.py +++ b/vllm/model_executor/models/falcon.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/a5cc30d72ae2dc19af534e4b35c986cc28db1275/src/transformers/models/falcon/modeling_falcon.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/florence2.py b/vllm/model_executor/models/florence2.py index 3a5fe8e1f414..4a1ad5f4ee0c 100644 --- a/vllm/model_executor/models/florence2.py +++ b/vllm/model_executor/models/florence2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from typing import Iterable, List, Optional, Set, Tuple diff --git a/vllm/model_executor/models/fuyu.py b/vllm/model_executor/models/fuyu.py index dbf9da50cc9d..6d8c829687ee 100644 --- a/vllm/model_executor/models/fuyu.py +++ b/vllm/model_executor/models/fuyu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://github.com/huggingface/transformers/blob/v4.39.3/src/transformers/models/fuyu/modeling_fuyu.py # Copyright 2023 The vLLM team. # Copyright 2023 HuggingFace Inc. team. All rights reserved. diff --git a/vllm/model_executor/models/gemma.py b/vllm/model_executor/models/gemma.py index b23aba829c54..cb81aa41e254 100644 --- a/vllm/model_executor/models/gemma.py +++ b/vllm/model_executor/models/gemma.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2023 The vLLM team. # Copyright (c) Google Inc. # diff --git a/vllm/model_executor/models/gemma2.py b/vllm/model_executor/models/gemma2.py index f0dc7693974b..a6dc8f84772b 100644 --- a/vllm/model_executor/models/gemma2.py +++ b/vllm/model_executor/models/gemma2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 The vLLM team. # Copyright 2024 Google Inc. HuggingFace Inc. team. All rights reserved. # diff --git a/vllm/model_executor/models/glm.py b/vllm/model_executor/models/glm.py index 942d1e14baed..5f1903345f0d 100644 --- a/vllm/model_executor/models/glm.py +++ b/vllm/model_executor/models/glm.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Inference-only HF format GLM-4 model compatible with THUDM weights.""" from vllm.config import VllmConfig from vllm.model_executor.models.llama import LlamaForCausalLM diff --git a/vllm/model_executor/models/glm4_vision_encoder.py b/vllm/model_executor/models/glm4_vision_encoder.py index 51922e6f2d03..4449eb8e8b14 100644 --- a/vllm/model_executor/models/glm4_vision_encoder.py +++ b/vllm/model_executor/models/glm4_vision_encoder.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/THUDM/GLM-4 """Inference-only GLM-4v model visual encoder compatible with THUDM weights.""" diff --git a/vllm/model_executor/models/gpt2.py b/vllm/model_executor/models/gpt2.py index 2f1aa2d68653..7ad9a24dcbbc 100644 --- a/vllm/model_executor/models/gpt2.py +++ b/vllm/model_executor/models/gpt2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt2/modeling_gpt2.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/gpt_bigcode.py b/vllm/model_executor/models/gpt_bigcode.py index c64bc7068880..887a444748ae 100644 --- a/vllm/model_executor/models/gpt_bigcode.py +++ b/vllm/model_executor/models/gpt_bigcode.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt2/modeling_gpt2.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/gpt_j.py b/vllm/model_executor/models/gpt_j.py index 08298cc0db36..815aba145d30 100644 --- a/vllm/model_executor/models/gpt_j.py +++ b/vllm/model_executor/models/gpt_j.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gptj/modeling_gptj.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/gpt_neox.py b/vllm/model_executor/models/gpt_neox.py index 731642772011..550ca3f7ca9e 100644 --- a/vllm/model_executor/models/gpt_neox.py +++ b/vllm/model_executor/models/gpt_neox.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt_neox/modeling_gpt_neox.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/granite.py b/vllm/model_executor/models/granite.py index 543b4e2f5e28..85911a0f41c2 100644 --- a/vllm/model_executor/models/granite.py +++ b/vllm/model_executor/models/granite.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/granitemoe.py b/vllm/model_executor/models/granitemoe.py index cdf9414d5949..8ae661bf15c4 100644 --- a/vllm/model_executor/models/granitemoe.py +++ b/vllm/model_executor/models/granitemoe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/gritlm.py b/vllm/model_executor/models/gritlm.py index d179d6235424..7bda54ea7689 100644 --- a/vllm/model_executor/models/gritlm.py +++ b/vllm/model_executor/models/gritlm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from array import array from typing import List, Optional, Union diff --git a/vllm/model_executor/models/h2ovl.py b/vllm/model_executor/models/h2ovl.py index df7e768fe14d..91c89b159ca9 100644 --- a/vllm/model_executor/models/h2ovl.py +++ b/vllm/model_executor/models/h2ovl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/modeling_h2ovl_chat.py # https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/image_process.py # -------------------------------------------------------- diff --git a/vllm/model_executor/models/idefics2_vision_model.py b/vllm/model_executor/models/idefics2_vision_model.py index 4e42a4b6f9e6..f9c2175b2988 100644 --- a/vllm/model_executor/models/idefics2_vision_model.py +++ b/vllm/model_executor/models/idefics2_vision_model.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://github.com/huggingface/transformers/blob/v4.43.2/src/transformers/models/idefics2/modeling_idefics2.py # Copyright 2024 The vLLM team. # Copyright 2024 the HuggingFace Inc. team. All rights reserved. diff --git a/vllm/model_executor/models/idefics3.py b/vllm/model_executor/models/idefics3.py index d16a77f862d9..9e2e677a652e 100644 --- a/vllm/model_executor/models/idefics3.py +++ b/vllm/model_executor/models/idefics3.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vllm/model_executor/models/interfaces.py b/vllm/model_executor/models/interfaces.py index c5fd0d933237..0fc5c4db179c 100644 --- a/vllm/model_executor/models/interfaces.py +++ b/vllm/model_executor/models/interfaces.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import (TYPE_CHECKING, ClassVar, Dict, List, Literal, Optional, Protocol, Type, Union, overload, runtime_checkable) diff --git a/vllm/model_executor/models/interfaces_base.py b/vllm/model_executor/models/interfaces_base.py index 37b91a803d71..c5f7be135d71 100644 --- a/vllm/model_executor/models/interfaces_base.py +++ b/vllm/model_executor/models/interfaces_base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import (TYPE_CHECKING, List, Optional, Protocol, Type, Union, overload, runtime_checkable) diff --git a/vllm/model_executor/models/intern_vit.py b/vllm/model_executor/models/intern_vit.py index 8ad009d5101e..0499f339b246 100644 --- a/vllm/model_executor/models/intern_vit.py +++ b/vllm/model_executor/models/intern_vit.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://huggingface.co/OpenGVLab/InternVL2-4B/blob/main/modeling_intern_vit.py # -------------------------------------------------------- # InternVL diff --git a/vllm/model_executor/models/internlm2.py b/vllm/model_executor/models/internlm2.py index 28c23edd4c8e..c211ca5f4f8e 100644 --- a/vllm/model_executor/models/internlm2.py +++ b/vllm/model_executor/models/internlm2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import partial from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Type, Union diff --git a/vllm/model_executor/models/internlm2_ve.py b/vllm/model_executor/models/internlm2_ve.py index 93ac2dcf8d58..106c3b6b78cc 100644 --- a/vllm/model_executor/models/internlm2_ve.py +++ b/vllm/model_executor/models/internlm2_ve.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple, Union import torch diff --git a/vllm/model_executor/models/internvl.py b/vllm/model_executor/models/internvl.py index f4b7e4478c16..c46a867a7683 100644 --- a/vllm/model_executor/models/internvl.py +++ b/vllm/model_executor/models/internvl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://huggingface.co/OpenGVLab/InternVL2-4B/blob/main/modeling_internvl_chat.py # -------------------------------------------------------- # InternVL diff --git a/vllm/model_executor/models/jais.py b/vllm/model_executor/models/jais.py index 8c81dff6b576..72bcef5e2282 100644 --- a/vllm/model_executor/models/jais.py +++ b/vllm/model_executor/models/jais.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/inceptionai/jais-30b-chat-v3/blob/main/modeling_jais.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/jamba.py b/vllm/model_executor/models/jamba.py index 890b5530b97d..d82c0815213b 100644 --- a/vllm/model_executor/models/jamba.py +++ b/vllm/model_executor/models/jamba.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Inference-only Jamba model.""" from typing import Iterable, List, Optional, Set, Tuple diff --git a/vllm/model_executor/models/llama.py b/vllm/model_executor/models/llama.py index e7c264c04f1a..d91c8782a121 100644 --- a/vllm/model_executor/models/llama.py +++ b/vllm/model_executor/models/llama.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/llava.py b/vllm/model_executor/models/llava.py index 296af2aac566..de3777cad058 100644 --- a/vllm/model_executor/models/llava.py +++ b/vllm/model_executor/models/llava.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import abstractmethod from functools import cached_property from typing import (Final, Iterable, List, Literal, Mapping, Optional, diff --git a/vllm/model_executor/models/llava_next.py b/vllm/model_executor/models/llava_next.py index fda4f22d366b..185edcb8de11 100644 --- a/vllm/model_executor/models/llava_next.py +++ b/vllm/model_executor/models/llava_next.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import abstractmethod from functools import cached_property from typing import (Final, Iterable, List, Literal, Mapping, Optional, diff --git a/vllm/model_executor/models/llava_next_video.py b/vllm/model_executor/models/llava_next_video.py index 5be85d7c0f03..a5002513554d 100644 --- a/vllm/model_executor/models/llava_next_video.py +++ b/vllm/model_executor/models/llava_next_video.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from functools import cached_property from typing import (Iterable, List, Literal, Mapping, Optional, Set, Tuple, diff --git a/vllm/model_executor/models/llava_onevision.py b/vllm/model_executor/models/llava_onevision.py index 5b0f35b08646..ac502000c3ee 100644 --- a/vllm/model_executor/models/llava_onevision.py +++ b/vllm/model_executor/models/llava_onevision.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from functools import cached_property from typing import (Final, Iterable, List, Literal, Mapping, Optional, diff --git a/vllm/model_executor/models/mamba.py b/vllm/model_executor/models/mamba.py index 553bc9c28cb2..5034b334564e 100644 --- a/vllm/model_executor/models/mamba.py +++ b/vllm/model_executor/models/mamba.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """PyTorch MAMBA model.""" from typing import Iterable, List, Optional, Set, Tuple diff --git a/vllm/model_executor/models/mamba_cache.py b/vllm/model_executor/models/mamba_cache.py index 79393421f3ae..353177f784b2 100644 --- a/vllm/model_executor/models/mamba_cache.py +++ b/vllm/model_executor/models/mamba_cache.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Dict, List diff --git a/vllm/model_executor/models/medusa.py b/vllm/model_executor/models/medusa.py index 66bdcb89a021..a19d7da5654b 100644 --- a/vllm/model_executor/models/medusa.py +++ b/vllm/model_executor/models/medusa.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Iterable, List, Optional, Set, Tuple import torch diff --git a/vllm/model_executor/models/minicpm.py b/vllm/model_executor/models/minicpm.py index 6254d26c7060..29473f5bbaa0 100644 --- a/vllm/model_executor/models/minicpm.py +++ b/vllm/model_executor/models/minicpm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/minicpm3.py b/vllm/model_executor/models/minicpm3.py index 5e1e6c6fa614..878f0c895c34 100644 --- a/vllm/model_executor/models/minicpm3.py +++ b/vllm/model_executor/models/minicpm3.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2024 The ModelBest team. diff --git a/vllm/model_executor/models/minicpmo.py b/vllm/model_executor/models/minicpmo.py index eb4282d62005..f1c1680768b8 100644 --- a/vllm/model_executor/models/minicpmo.py +++ b/vllm/model_executor/models/minicpmo.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/minicpmv.py b/vllm/model_executor/models/minicpmv.py index bf967d33a317..6964d6bdce9f 100644 --- a/vllm/model_executor/models/minicpmv.py +++ b/vllm/model_executor/models/minicpmv.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/mixtral.py b/vllm/model_executor/models/mixtral.py index fbb3704fa080..70880eb75224 100644 --- a/vllm/model_executor/models/mixtral.py +++ b/vllm/model_executor/models/mixtral.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/mixtral_quant.py b/vllm/model_executor/models/mixtral_quant.py index 7a9b8cd88cfd..fdc438917542 100644 --- a/vllm/model_executor/models/mixtral_quant.py +++ b/vllm/model_executor/models/mixtral_quant.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/mllama.py b/vllm/model_executor/models/mllama.py index f7f9d7a186d9..d1cb04cdb242 100644 --- a/vllm/model_executor/models/mllama.py +++ b/vllm/model_executor/models/mllama.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vllm/model_executor/models/mlp_speculator.py b/vllm/model_executor/models/mlp_speculator.py index f1d796ca26a1..cf4123a2c2b6 100644 --- a/vllm/model_executor/models/mlp_speculator.py +++ b/vllm/model_executor/models/mlp_speculator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from typing import Iterable, List, Set, Tuple diff --git a/vllm/model_executor/models/module_mapping.py b/vllm/model_executor/models/module_mapping.py index a9102a6073a2..23814e6322d2 100644 --- a/vllm/model_executor/models/module_mapping.py +++ b/vllm/model_executor/models/module_mapping.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/modelscope/ms-swift/blob/v2.4.2/swift/utils/module_mapping.py diff --git a/vllm/model_executor/models/molmo.py b/vllm/model_executor/models/molmo.py index 5c7ae0deefcd..b524a14977b1 100644 --- a/vllm/model_executor/models/molmo.py +++ b/vllm/model_executor/models/molmo.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math import re from array import array diff --git a/vllm/model_executor/models/mpt.py b/vllm/model_executor/models/mpt.py index 1235816413a4..676c960623ed 100644 --- a/vllm/model_executor/models/mpt.py +++ b/vllm/model_executor/models/mpt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from https://huggingface.co/mosaicml/mpt-7b/tree/main import math from typing import Iterable, List, Optional, Set, Tuple, Union diff --git a/vllm/model_executor/models/nemotron.py b/vllm/model_executor/models/nemotron.py index 2340283b6966..6f0b831ac272 100644 --- a/vllm/model_executor/models/nemotron.py +++ b/vllm/model_executor/models/nemotron.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/nvlm_d.py b/vllm/model_executor/models/nvlm_d.py index df4fd0a3256e..2aa04bd71726 100644 --- a/vllm/model_executor/models/nvlm_d.py +++ b/vllm/model_executor/models/nvlm_d.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://huggingface.co/nvidia/NVLM-D-72B/blob/main/modeling_nvlm_d.py # -------------------------------------------------------- # NVLM-D diff --git a/vllm/model_executor/models/olmo.py b/vllm/model_executor/models/olmo.py index 538e31ec9169..3b470dfdd05b 100644 --- a/vllm/model_executor/models/olmo.py +++ b/vllm/model_executor/models/olmo.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.40.1/src/transformers/models/olmo/modeling_olmo.py # Copyright 2024 The vLLM team. diff --git a/vllm/model_executor/models/olmo2.py b/vllm/model_executor/models/olmo2.py index a35c911f90d9..4b0455098eed 100644 --- a/vllm/model_executor/models/olmo2.py +++ b/vllm/model_executor/models/olmo2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo2/modeling_olmo2.py # Copyright 2024 The vLLM team. diff --git a/vllm/model_executor/models/olmoe.py b/vllm/model_executor/models/olmoe.py index fbe5d1aee04b..d6e24c6d67f3 100644 --- a/vllm/model_executor/models/olmoe.py +++ b/vllm/model_executor/models/olmoe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/vllm/model_executor/models/opt.py b/vllm/model_executor/models/opt.py index ea1185aa80dc..ad1d66902435 100644 --- a/vllm/model_executor/models/opt.py +++ b/vllm/model_executor/models/opt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/opt/modeling_opt.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/orion.py b/vllm/model_executor/models/orion.py index a3757b5c8808..f4f5cdff6437 100644 --- a/vllm/model_executor/models/orion.py +++ b/vllm/model_executor/models/orion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/OrionStarAI/Orion-14B-Base/blob/main/modeling_orion.py # Copyright (c) OrionStar Inc. diff --git a/vllm/model_executor/models/paligemma.py b/vllm/model_executor/models/paligemma.py index 5a28b1ffbb7b..65d810dc23bc 100644 --- a/vllm/model_executor/models/paligemma.py +++ b/vllm/model_executor/models/paligemma.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import (Iterable, List, Literal, Mapping, Optional, Set, Tuple, TypedDict, Union) diff --git a/vllm/model_executor/models/persimmon.py b/vllm/model_executor/models/persimmon.py index 14dd4b5b1b4d..6a80bea348ea 100644 --- a/vllm/model_executor/models/persimmon.py +++ b/vllm/model_executor/models/persimmon.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://github.com/huggingface/transformers/blob/v4.39.3/src/transformers/models/persimmon/modeling_persimmon.py # Copyright 2023 The vLLM team. # Copyright 2023 EleutherAI and the HuggingFace Inc. team. All rights reserved. diff --git a/vllm/model_executor/models/phi.py b/vllm/model_executor/models/phi.py index 59b7508a370f..6b05bfee9492 100644 --- a/vllm/model_executor/models/phi.py +++ b/vllm/model_executor/models/phi.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/microsoft/phi-1_5/blob/main/modeling_phi.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/phi3.py b/vllm/model_executor/models/phi3.py index 34141511ea79..8f84e0726951 100644 --- a/vllm/model_executor/models/phi3.py +++ b/vllm/model_executor/models/phi3.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from llama.py """Inference-only Phi3 model code inherit from Llama.py""" diff --git a/vllm/model_executor/models/phi3_small.py b/vllm/model_executor/models/phi3_small.py index f47676b934e4..a8b7e9b2a595 100644 --- a/vllm/model_executor/models/phi3_small.py +++ b/vllm/model_executor/models/phi3_small.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from typing import Iterable, List, Optional, Set, Tuple, Union diff --git a/vllm/model_executor/models/phi3v.py b/vllm/model_executor/models/phi3v.py index 0fcda81da280..f089fa5d295e 100644 --- a/vllm/model_executor/models/phi3v.py +++ b/vllm/model_executor/models/phi3v.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 The vLLM team. # Copyright 2024 Microsoft and the HuggingFace Inc. team. All rights reserved. # diff --git a/vllm/model_executor/models/phimoe.py b/vllm/model_executor/models/phimoe.py index 6367b770a0af..aa4bb52c444f 100644 --- a/vllm/model_executor/models/phimoe.py +++ b/vllm/model_executor/models/phimoe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/pixtral.py b/vllm/model_executor/models/pixtral.py index 37b9989e489e..003e9c84c1c0 100644 --- a/vllm/model_executor/models/pixtral.py +++ b/vllm/model_executor/models/pixtral.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from dataclasses import dataclass, fields from functools import cached_property diff --git a/vllm/model_executor/models/qwen.py b/vllm/model_executor/models/qwen.py index 86a9d3089c3e..d7f6662bc9a9 100644 --- a/vllm/model_executor/models/qwen.py +++ b/vllm/model_executor/models/qwen.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py # Copyright (c) Alibaba Cloud. diff --git a/vllm/model_executor/models/qwen2.py b/vllm/model_executor/models/qwen2.py index 82de1c357409..e3de6b64fbb3 100644 --- a/vllm/model_executor/models/qwen2.py +++ b/vllm/model_executor/models/qwen2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2/modeling_qwen2.py # Copyright 2024 The Qwen team. diff --git a/vllm/model_executor/models/qwen2_audio.py b/vllm/model_executor/models/qwen2_audio.py index fc5aed5c94ab..cf104ab00872 100644 --- a/vllm/model_executor/models/qwen2_audio.py +++ b/vllm/model_executor/models/qwen2_audio.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 The Qwen team. # Copyright 2023 The vLLM team. # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. diff --git a/vllm/model_executor/models/qwen2_moe.py b/vllm/model_executor/models/qwen2_moe.py index 95de6c21871b..35d9854a55d6 100644 --- a/vllm/model_executor/models/qwen2_moe.py +++ b/vllm/model_executor/models/qwen2_moe.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2_moe/modeling_qwen2_moe.py # Copyright 2024 The Qwen team. diff --git a/vllm/model_executor/models/qwen2_rm.py b/vllm/model_executor/models/qwen2_rm.py index 593ce4857af0..00e4159e28cf 100644 --- a/vllm/model_executor/models/qwen2_rm.py +++ b/vllm/model_executor/models/qwen2_rm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/Qwen/Qwen2.5-Math-RM-72B/blob/main/modeling_qwen2_rm.py # Copyright 2024 The Qwen team. diff --git a/vllm/model_executor/models/qwen2_vl.py b/vllm/model_executor/models/qwen2_vl.py index a2778ee73810..189ac41e8a6c 100644 --- a/vllm/model_executor/models/qwen2_vl.py +++ b/vllm/model_executor/models/qwen2_vl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/19e6e80e10118f855137b90740936c0b11ac397f/src/transformers/models/qwen2_vl/modeling_qwen2_vl.py # Copyright 2024 The Qwen team. diff --git a/vllm/model_executor/models/registry.py b/vllm/model_executor/models/registry.py index de05bf2b772f..40bbc7d16b81 100644 --- a/vllm/model_executor/models/registry.py +++ b/vllm/model_executor/models/registry.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """ Whenever you add an architecture to this page, please also update `tests/models/registry.py` with example HuggingFace models for it. diff --git a/vllm/model_executor/models/roberta.py b/vllm/model_executor/models/roberta.py index 5997a76890c9..742e63a065b1 100644 --- a/vllm/model_executor/models/roberta.py +++ b/vllm/model_executor/models/roberta.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from typing import Iterable, List, Optional, Tuple diff --git a/vllm/model_executor/models/siglip.py b/vllm/model_executor/models/siglip.py index 1e51018973e8..a81462f6fbf4 100644 --- a/vllm/model_executor/models/siglip.py +++ b/vllm/model_executor/models/siglip.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Implementation of SiglipVisionModel intended to be only used within a vision language model.""" diff --git a/vllm/model_executor/models/solar.py b/vllm/model_executor/models/solar.py index e6d919f23c85..6215ed814bf4 100644 --- a/vllm/model_executor/models/solar.py +++ b/vllm/model_executor/models/solar.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2023 The vLLM team. diff --git a/vllm/model_executor/models/stablelm.py b/vllm/model_executor/models/stablelm.py index c9d1af78246a..a5d4432669f4 100644 --- a/vllm/model_executor/models/stablelm.py +++ b/vllm/model_executor/models/stablelm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2023 Stability AI, EleutherAI, and The HuggingFace Inc. team. # All rights reserved. # diff --git a/vllm/model_executor/models/starcoder2.py b/vllm/model_executor/models/starcoder2.py index 1cd0dedfed2c..01ea43666482 100644 --- a/vllm/model_executor/models/starcoder2.py +++ b/vllm/model_executor/models/starcoder2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 BigCode and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX diff --git a/vllm/model_executor/models/telechat2.py b/vllm/model_executor/models/telechat2.py index 02ca7fe08e55..a38035e37ec7 100644 --- a/vllm/model_executor/models/telechat2.py +++ b/vllm/model_executor/models/telechat2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2023 The vLLM team. # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # diff --git a/vllm/model_executor/models/ultravox.py b/vllm/model_executor/models/ultravox.py index 605a0ecf4e0a..5e86b15db7a8 100644 --- a/vllm/model_executor/models/ultravox.py +++ b/vllm/model_executor/models/ultravox.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from https://github.com/fixie-ai/ultravox/blob/ecd58c4041030bae2ad15aa6bcf04ab43199ea02/ultravox/model/ultravox_model.py """PyTorch Ultravox model.""" import math diff --git a/vllm/model_executor/models/utils.py b/vllm/model_executor/models/utils.py index 01a232fdc76d..fff4be34ddbe 100644 --- a/vllm/model_executor/models/utils.py +++ b/vllm/model_executor/models/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import itertools from dataclasses import dataclass, field from typing import (Callable, Dict, Iterable, List, Literal, Mapping, Optional, diff --git a/vllm/model_executor/models/vision.py b/vllm/model_executor/models/vision.py index 57166f05cd9b..0d67ee7bb5dd 100644 --- a/vllm/model_executor/models/vision.py +++ b/vllm/model_executor/models/vision.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import Final, Generic, Optional, Protocol, TypeVar, Union diff --git a/vllm/model_executor/models/whisper.py b/vllm/model_executor/models/whisper.py index 15e35fa9cd2c..2319c3160930 100644 --- a/vllm/model_executor/models/whisper.py +++ b/vllm/model_executor/models/whisper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import math from typing import (Iterable, List, Mapping, Optional, Set, Tuple, TypedDict, Union) diff --git a/vllm/model_executor/parameter.py b/vllm/model_executor/parameter.py index a9ce8af15d3b..2b1294bf7baa 100644 --- a/vllm/model_executor/parameter.py +++ b/vllm/model_executor/parameter.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from fractions import Fraction from typing import Callable, Optional, Union diff --git a/vllm/model_executor/pooling_metadata.py b/vllm/model_executor/pooling_metadata.py index b86cafce85d1..dea8b0e9d471 100644 --- a/vllm/model_executor/pooling_metadata.py +++ b/vllm/model_executor/pooling_metadata.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Any, Dict, List, Tuple diff --git a/vllm/model_executor/sampling_metadata.py b/vllm/model_executor/sampling_metadata.py index 61e8881b64f5..0a580a4e907d 100644 --- a/vllm/model_executor/sampling_metadata.py +++ b/vllm/model_executor/sampling_metadata.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from array import array from dataclasses import dataclass from typing import Dict, List, Optional, Tuple diff --git a/vllm/model_executor/utils.py b/vllm/model_executor/utils.py index 6f1cc9d5e0c3..04f922dfd77a 100644 --- a/vllm/model_executor/utils.py +++ b/vllm/model_executor/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Utils for model executor.""" from typing import Any, Dict, Optional diff --git a/vllm/multimodal/__init__.py b/vllm/multimodal/__init__.py index 1d7f5d57fa24..741bd1a6a1c1 100644 --- a/vllm/multimodal/__init__.py +++ b/vllm/multimodal/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .base import MultiModalPlaceholderMap, MultiModalPlugin from .hasher import MultiModalHashDict, MultiModalHasher from .inputs import (BatchedTensorInputs, ModalityData, MultiModalDataBuiltins, diff --git a/vllm/multimodal/audio.py b/vllm/multimodal/audio.py index de80f22bac2a..f379ec1682a3 100644 --- a/vllm/multimodal/audio.py +++ b/vllm/multimodal/audio.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import base64 from io import BytesIO from pathlib import Path diff --git a/vllm/multimodal/base.py b/vllm/multimodal/base.py index fd3ec7e0ec8c..c48d07ba365b 100644 --- a/vllm/multimodal/base.py +++ b/vllm/multimodal/base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from collections import defaultdict from pathlib import Path diff --git a/vllm/multimodal/hasher.py b/vllm/multimodal/hasher.py index 24aa1ca65804..7d277fd67dec 100644 --- a/vllm/multimodal/hasher.py +++ b/vllm/multimodal/hasher.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle from typing import TYPE_CHECKING, Iterable, Mapping, Optional diff --git a/vllm/multimodal/image.py b/vllm/multimodal/image.py index da13a381c453..98ac8057e8f1 100644 --- a/vllm/multimodal/image.py +++ b/vllm/multimodal/image.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import base64 from functools import lru_cache from io import BytesIO diff --git a/vllm/multimodal/inputs.py b/vllm/multimodal/inputs.py index b35184f6855a..eb52551bbdb7 100644 --- a/vllm/multimodal/inputs.py +++ b/vllm/multimodal/inputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from collections import UserDict, defaultdict from collections.abc import Mapping, Sequence diff --git a/vllm/multimodal/parse.py b/vllm/multimodal/parse.py index ccff0e857eec..063f458b2c4d 100644 --- a/vllm/multimodal/parse.py +++ b/vllm/multimodal/parse.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from collections import UserDict from collections.abc import Callable, Iterator, Mapping, Sequence diff --git a/vllm/multimodal/processing.py b/vllm/multimodal/processing.py index 750646ac6e43..2ad42d1c1c05 100644 --- a/vllm/multimodal/processing.py +++ b/vllm/multimodal/processing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import re from abc import ABC, abstractmethod from collections import defaultdict diff --git a/vllm/multimodal/profiling.py b/vllm/multimodal/profiling.py index c68edaff8016..953c01000325 100644 --- a/vllm/multimodal/profiling.py +++ b/vllm/multimodal/profiling.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from collections.abc import Mapping from dataclasses import dataclass, field diff --git a/vllm/multimodal/registry.py b/vllm/multimodal/registry.py index 7a4b85385cac..29036691bfa4 100644 --- a/vllm/multimodal/registry.py +++ b/vllm/multimodal/registry.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import functools from collections import UserDict from dataclasses import dataclass diff --git a/vllm/multimodal/utils.py b/vllm/multimodal/utils.py index 900bed5929b3..583f53655124 100644 --- a/vllm/multimodal/utils.py +++ b/vllm/multimodal/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import lru_cache from itertools import groupby from pathlib import Path diff --git a/vllm/multimodal/video.py b/vllm/multimodal/video.py index 1ad1f5abc27a..88f184399722 100644 --- a/vllm/multimodal/video.py +++ b/vllm/multimodal/video.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import base64 from functools import lru_cache, partial from io import BytesIO diff --git a/vllm/outputs.py b/vllm/outputs.py index 25b2265285d1..786380c37f6c 100644 --- a/vllm/outputs.py +++ b/vllm/outputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from dataclasses import dataclass from typing import Dict, Generic, List, MutableSequence, Optional diff --git a/vllm/platforms/__init__.py b/vllm/platforms/__init__.py index ddbdc43ca571..d34b660df6a7 100644 --- a/vllm/platforms/__init__.py +++ b/vllm/platforms/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import logging import traceback from itertools import chain diff --git a/vllm/platforms/cpu.py b/vllm/platforms/cpu.py index 159ea94f99a2..4e0683b8a2de 100644 --- a/vllm/platforms/cpu.py +++ b/vllm/platforms/cpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import TYPE_CHECKING, Optional diff --git a/vllm/platforms/cuda.py b/vllm/platforms/cuda.py index 91dcdff006e3..44d2506f0e20 100644 --- a/vllm/platforms/cuda.py +++ b/vllm/platforms/cuda.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Code inside this file can safely assume cuda platform, e.g. importing pynvml. However, it should not initialize cuda context. """ diff --git a/vllm/platforms/hpu.py b/vllm/platforms/hpu.py index 0e1c4c0c5949..78ddb67bb3fa 100644 --- a/vllm/platforms/hpu.py +++ b/vllm/platforms/hpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import TYPE_CHECKING, Optional diff --git a/vllm/platforms/interface.py b/vllm/platforms/interface.py index 186fa54bfc14..dc6545c933de 100644 --- a/vllm/platforms/interface.py +++ b/vllm/platforms/interface.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum import platform import random diff --git a/vllm/platforms/neuron.py b/vllm/platforms/neuron.py index 23a7126fb05c..5a03f5f7acbc 100644 --- a/vllm/platforms/neuron.py +++ b/vllm/platforms/neuron.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import TYPE_CHECKING, Optional from vllm.logger import init_logger diff --git a/vllm/platforms/openvino.py b/vllm/platforms/openvino.py index 3282c061714d..41221de0afe5 100644 --- a/vllm/platforms/openvino.py +++ b/vllm/platforms/openvino.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import TYPE_CHECKING, Optional import torch diff --git a/vllm/platforms/rocm.py b/vllm/platforms/rocm.py index 888852163148..cd851c0d87a7 100644 --- a/vllm/platforms/rocm.py +++ b/vllm/platforms/rocm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from functools import lru_cache from typing import TYPE_CHECKING, Dict, List, Optional diff --git a/vllm/platforms/tpu.py b/vllm/platforms/tpu.py index 494a17633974..fffc61bbaaca 100644 --- a/vllm/platforms/tpu.py +++ b/vllm/platforms/tpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import TYPE_CHECKING, Optional import torch diff --git a/vllm/platforms/xpu.py b/vllm/platforms/xpu.py index 039cdd5adc9a..81bc85f9415e 100644 --- a/vllm/platforms/xpu.py +++ b/vllm/platforms/xpu.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import TYPE_CHECKING, Optional import torch diff --git a/vllm/plugins/__init__.py b/vllm/plugins/__init__.py index a78a05491775..389cb8728103 100644 --- a/vllm/plugins/__init__.py +++ b/vllm/plugins/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import logging import os from typing import Callable, Dict diff --git a/vllm/pooling_params.py b/vllm/pooling_params.py index b24b7e91a7ae..061232eb1183 100644 --- a/vllm/pooling_params.py +++ b/vllm/pooling_params.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Optional import msgspec diff --git a/vllm/profiler/__init__.py b/vllm/profiler/__init__.py index 3e25f5cc283f..00af72b1d41f 100644 --- a/vllm/profiler/__init__.py +++ b/vllm/profiler/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .layerwise_profile import layerwise_profile __all__ = [ diff --git a/vllm/profiler/layerwise_profile.py b/vllm/profiler/layerwise_profile.py index 29c0edd0ee53..6351ef63da2b 100644 --- a/vllm/profiler/layerwise_profile.py +++ b/vllm/profiler/layerwise_profile.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import copy from collections import defaultdict from dataclasses import asdict, dataclass, field diff --git a/vllm/profiler/utils.py b/vllm/profiler/utils.py index 033035e43432..62b39f510703 100644 --- a/vllm/profiler/utils.py +++ b/vllm/profiler/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import Callable, Dict, List, Type, Union diff --git a/vllm/prompt_adapter/layers.py b/vllm/prompt_adapter/layers.py index 27a61e692e1b..c2f9f16919b7 100644 --- a/vllm/prompt_adapter/layers.py +++ b/vllm/prompt_adapter/layers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Optional diff --git a/vllm/prompt_adapter/models.py b/vllm/prompt_adapter/models.py index 18a5f86c341a..3ba7d0896f95 100644 --- a/vllm/prompt_adapter/models.py +++ b/vllm/prompt_adapter/models.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import logging import math from typing import Any, Callable, Dict, List, Optional, Type diff --git a/vllm/prompt_adapter/request.py b/vllm/prompt_adapter/request.py index 775dd11db071..dfb8e61d786a 100644 --- a/vllm/prompt_adapter/request.py +++ b/vllm/prompt_adapter/request.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import msgspec from vllm.adapter_commons.request import AdapterRequest diff --git a/vllm/prompt_adapter/utils.py b/vllm/prompt_adapter/utils.py index 8b2732923c4e..dd179ab938f8 100644 --- a/vllm/prompt_adapter/utils.py +++ b/vllm/prompt_adapter/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # code borrowed from: https://github.com/huggingface/peft/blob/v0.12.0/src/peft/utils/save_and_load.py#L420 import os diff --git a/vllm/prompt_adapter/worker_manager.py b/vllm/prompt_adapter/worker_manager.py index ddc1ef893c6f..28dcc1687112 100644 --- a/vllm/prompt_adapter/worker_manager.py +++ b/vllm/prompt_adapter/worker_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import logging from typing import Any, Optional, Set, Type diff --git a/vllm/sampling_params.py b/vllm/sampling_params.py index 605c09b8d722..97f9e2129573 100644 --- a/vllm/sampling_params.py +++ b/vllm/sampling_params.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Sampling parameters for text generation.""" import copy from dataclasses import dataclass diff --git a/vllm/scalar_type.py b/vllm/scalar_type.py index 20063a5b4b08..9f6e85920ac7 100644 --- a/vllm/scalar_type.py +++ b/vllm/scalar_type.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import functools import struct from dataclasses import dataclass diff --git a/vllm/scripts.py b/vllm/scripts.py index 8101e6b3af7e..467cab28f02a 100644 --- a/vllm/scripts.py +++ b/vllm/scripts.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # The CLI entrypoint to vLLM. import argparse import os diff --git a/vllm/sequence.py b/vllm/sequence.py index 74320db709f9..534b9e60610a 100644 --- a/vllm/sequence.py +++ b/vllm/sequence.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Sequence and its related classes.""" import copy import enum diff --git a/vllm/spec_decode/batch_expansion.py b/vllm/spec_decode/batch_expansion.py index 56fb9ba506a4..e08ed742a522 100644 --- a/vllm/spec_decode/batch_expansion.py +++ b/vllm/spec_decode/batch_expansion.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from array import array from itertools import chain, count from typing import Iterator, List, Optional, Tuple diff --git a/vllm/spec_decode/draft_model_runner.py b/vllm/spec_decode/draft_model_runner.py index fe5fd39f42ac..3948298db40c 100644 --- a/vllm/spec_decode/draft_model_runner.py +++ b/vllm/spec_decode/draft_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional import torch diff --git a/vllm/spec_decode/interfaces.py b/vllm/spec_decode/interfaces.py index c39e98b6cca1..dd085ad77638 100644 --- a/vllm/spec_decode/interfaces.py +++ b/vllm/spec_decode/interfaces.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from dataclasses import dataclass from typing import List, Optional, Set, Union diff --git a/vllm/spec_decode/medusa_worker.py b/vllm/spec_decode/medusa_worker.py index 21a58fc42627..0b62a988e8b2 100644 --- a/vllm/spec_decode/medusa_worker.py +++ b/vllm/spec_decode/medusa_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import weakref from typing import List, Optional, Set, Tuple diff --git a/vllm/spec_decode/metrics.py b/vllm/spec_decode/metrics.py index d678f4578499..bc0e0a121cd5 100644 --- a/vllm/spec_decode/metrics.py +++ b/vllm/spec_decode/metrics.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from typing import Callable, Optional, Union diff --git a/vllm/spec_decode/mlp_speculator_worker.py b/vllm/spec_decode/mlp_speculator_worker.py index fc41bb82ea34..bdaf31895e25 100644 --- a/vllm/spec_decode/mlp_speculator_worker.py +++ b/vllm/spec_decode/mlp_speculator_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Set, Tuple import torch diff --git a/vllm/spec_decode/mqa_scorer.py b/vllm/spec_decode/mqa_scorer.py index 3aea2eabb414..6275c460ecef 100644 --- a/vllm/spec_decode/mqa_scorer.py +++ b/vllm/spec_decode/mqa_scorer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.sequence import (ExecuteModelRequest, SequenceData, SequenceGroupMetadata, get_all_seq_ids) from vllm.spec_decode.interfaces import (SpeculativeProposals, diff --git a/vllm/spec_decode/multi_step_worker.py b/vllm/spec_decode/multi_step_worker.py index 32197f8cc8f2..5474917a6fab 100644 --- a/vllm/spec_decode/multi_step_worker.py +++ b/vllm/spec_decode/multi_step_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import copy import weakref from typing import Dict, List, Set, Tuple diff --git a/vllm/spec_decode/ngram_worker.py b/vllm/spec_decode/ngram_worker.py index e906b1789cde..86390c99c2fb 100644 --- a/vllm/spec_decode/ngram_worker.py +++ b/vllm/spec_decode/ngram_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import weakref from typing import List, Optional, Set, Tuple diff --git a/vllm/spec_decode/proposer_worker_base.py b/vllm/spec_decode/proposer_worker_base.py index 28a537593f26..2bebf80fadae 100644 --- a/vllm/spec_decode/proposer_worker_base.py +++ b/vllm/spec_decode/proposer_worker_base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import List, Optional, Set, Tuple diff --git a/vllm/spec_decode/smaller_tp_proposer_worker.py b/vllm/spec_decode/smaller_tp_proposer_worker.py index c6ff5e52f938..a1466ba5db75 100644 --- a/vllm/spec_decode/smaller_tp_proposer_worker.py +++ b/vllm/spec_decode/smaller_tp_proposer_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Set, Tuple import torch diff --git a/vllm/spec_decode/spec_decode_worker.py b/vllm/spec_decode/spec_decode_worker.py index 8d6d05cbaea7..8653bece8b5a 100644 --- a/vllm/spec_decode/spec_decode_worker.py +++ b/vllm/spec_decode/spec_decode_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import copy from collections import defaultdict from functools import cached_property diff --git a/vllm/spec_decode/target_model_runner.py b/vllm/spec_decode/target_model_runner.py index 56540744b73a..08e773c562bf 100644 --- a/vllm/spec_decode/target_model_runner.py +++ b/vllm/spec_decode/target_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional from vllm.sequence import SequenceGroupMetadata diff --git a/vllm/spec_decode/top1_proposer.py b/vllm/spec_decode/top1_proposer.py index 6bf7587cdda1..b538923c03e7 100644 --- a/vllm/spec_decode/top1_proposer.py +++ b/vllm/spec_decode/top1_proposer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Set, Tuple import torch diff --git a/vllm/spec_decode/util.py b/vllm/spec_decode/util.py index c88820ab27b6..9c04680a6a7a 100644 --- a/vllm/spec_decode/util.py +++ b/vllm/spec_decode/util.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from contextlib import contextmanager from typing import Dict, List, Optional, Sequence, Tuple diff --git a/vllm/tracing.py b/vllm/tracing.py index 72a3f85118d3..bf069ad84fd4 100644 --- a/vllm/tracing.py +++ b/vllm/tracing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Mapping, Optional diff --git a/vllm/transformers_utils/__init__.py b/vllm/transformers_utils/__init__.py index eeec029fc051..01d5bb4b5748 100644 --- a/vllm/transformers_utils/__init__.py +++ b/vllm/transformers_utils/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.envs import VLLM_USE_MODELSCOPE if VLLM_USE_MODELSCOPE: diff --git a/vllm/transformers_utils/config.py b/vllm/transformers_utils/config.py index 5805f4ad0b7f..1c0f20a6e045 100644 --- a/vllm/transformers_utils/config.py +++ b/vllm/transformers_utils/config.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum import json import os diff --git a/vllm/transformers_utils/configs/__init__.py b/vllm/transformers_utils/configs/__init__.py index f065c5612460..c484a755ab4e 100644 --- a/vllm/transformers_utils/configs/__init__.py +++ b/vllm/transformers_utils/configs/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.transformers_utils.configs.chatglm import ChatGLMConfig from vllm.transformers_utils.configs.cohere2 import Cohere2Config from vllm.transformers_utils.configs.dbrx import DbrxConfig diff --git a/vllm/transformers_utils/configs/arctic.py b/vllm/transformers_utils/configs/arctic.py index 7780bf5e78d6..6625ccf0f2a8 100644 --- a/vllm/transformers_utils/configs/arctic.py +++ b/vllm/transformers_utils/configs/arctic.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # yapf: disable # ruff: noqa: E501 # coding=utf-8 diff --git a/vllm/transformers_utils/configs/chatglm.py b/vllm/transformers_utils/configs/chatglm.py index e563bf6268d7..43e9503ffe03 100644 --- a/vllm/transformers_utils/configs/chatglm.py +++ b/vllm/transformers_utils/configs/chatglm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://github.com/THUDM/ChatGLM2-6B from transformers import PretrainedConfig diff --git a/vllm/transformers_utils/configs/cohere2.py b/vllm/transformers_utils/configs/cohere2.py index 1509330fc217..e30409b3af5f 100644 --- a/vllm/transformers_utils/configs/cohere2.py +++ b/vllm/transformers_utils/configs/cohere2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # ruff: noqa # Adapted from diff --git a/vllm/transformers_utils/configs/dbrx.py b/vllm/transformers_utils/configs/dbrx.py index 0dc9664723d3..8f40b2b7df7a 100644 --- a/vllm/transformers_utils/configs/dbrx.py +++ b/vllm/transformers_utils/configs/dbrx.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # yapf: disable # ruff: noqa: E501 # coding=utf-8 diff --git a/vllm/transformers_utils/configs/deepseek_vl2.py b/vllm/transformers_utils/configs/deepseek_vl2.py index 681528c3c011..24d4052d8721 100644 --- a/vllm/transformers_utils/configs/deepseek_vl2.py +++ b/vllm/transformers_utils/configs/deepseek_vl2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L115-L268 from typing import Tuple diff --git a/vllm/transformers_utils/configs/eagle.py b/vllm/transformers_utils/configs/eagle.py index b357a785e4dc..b26aba66699f 100644 --- a/vllm/transformers_utils/configs/eagle.py +++ b/vllm/transformers_utils/configs/eagle.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Optional, Union diff --git a/vllm/transformers_utils/configs/exaone.py b/vllm/transformers_utils/configs/exaone.py index f60a59f55413..39364367e303 100644 --- a/vllm/transformers_utils/configs/exaone.py +++ b/vllm/transformers_utils/configs/exaone.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copied from # https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct/blob/main/configuration_exaone.py # Copyright 2021 The LG AI Research EXAONE Lab. All rights reserved. diff --git a/vllm/transformers_utils/configs/falcon.py b/vllm/transformers_utils/configs/falcon.py index c82cc6065c7e..f161a06f3423 100644 --- a/vllm/transformers_utils/configs/falcon.py +++ b/vllm/transformers_utils/configs/falcon.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/tiiuae/falcon-7b/blob/main/configuration_RW.py # Copyright 2023 The vLLM team. diff --git a/vllm/transformers_utils/configs/h2ovl.py b/vllm/transformers_utils/configs/h2ovl.py index b94c5b77e4b7..48b5d79ff950 100644 --- a/vllm/transformers_utils/configs/h2ovl.py +++ b/vllm/transformers_utils/configs/h2ovl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/configuration_h2ovl_chat.py # -------------------------------------------------------- diff --git a/vllm/transformers_utils/configs/internvl.py b/vllm/transformers_utils/configs/internvl.py index ac2492317aa3..8ea62546e213 100644 --- a/vllm/transformers_utils/configs/internvl.py +++ b/vllm/transformers_utils/configs/internvl.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/OpenGVLab/InternVL2-1B/blob/main/configuration_internvl_chat.py # -------------------------------------------------------- diff --git a/vllm/transformers_utils/configs/jais.py b/vllm/transformers_utils/configs/jais.py index 82f129eb2018..0cab2c42e579 100644 --- a/vllm/transformers_utils/configs/jais.py +++ b/vllm/transformers_utils/configs/jais.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2023 The OpenAI Team Authors and HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # Copyright 2023 Cerebras Systems. diff --git a/vllm/transformers_utils/configs/medusa.py b/vllm/transformers_utils/configs/medusa.py index d71a08343be2..885713c5d6cd 100644 --- a/vllm/transformers_utils/configs/medusa.py +++ b/vllm/transformers_utils/configs/medusa.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Optional, Union diff --git a/vllm/transformers_utils/configs/mllama.py b/vllm/transformers_utils/configs/mllama.py index 49e766d7fa1f..eb77e09adca4 100644 --- a/vllm/transformers_utils/configs/mllama.py +++ b/vllm/transformers_utils/configs/mllama.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from transformers.models.mllama import configuration_mllama as mllama_hf_config diff --git a/vllm/transformers_utils/configs/mlp_speculator.py b/vllm/transformers_utils/configs/mlp_speculator.py index 946af4e919f7..c761f659e5b2 100644 --- a/vllm/transformers_utils/configs/mlp_speculator.py +++ b/vllm/transformers_utils/configs/mlp_speculator.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional from transformers import PretrainedConfig diff --git a/vllm/transformers_utils/configs/mpt.py b/vllm/transformers_utils/configs/mpt.py index 0f047c8b0361..96356135f6b2 100644 --- a/vllm/transformers_utils/configs/mpt.py +++ b/vllm/transformers_utils/configs/mpt.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copied from # https://huggingface.co/mosaicml/mpt-7b/blob/main/configuration_mpt.py """A HuggingFace-style model configuration.""" diff --git a/vllm/transformers_utils/configs/nemotron.py b/vllm/transformers_utils/configs/nemotron.py index 1edf36329d83..fdf4fa2a53e5 100644 --- a/vllm/transformers_utils/configs/nemotron.py +++ b/vllm/transformers_utils/configs/nemotron.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2024 HuggingFace Inc. team. All rights reserved. # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. # diff --git a/vllm/transformers_utils/configs/nvlm_d.py b/vllm/transformers_utils/configs/nvlm_d.py index 8007176aecd9..300f6e21168e 100644 --- a/vllm/transformers_utils/configs/nvlm_d.py +++ b/vllm/transformers_utils/configs/nvlm_d.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from # https://huggingface.co/nvidia/NVLM-D-72B/blob/main/configuration_nvlm_d.py # -------------------------------------------------------- diff --git a/vllm/transformers_utils/configs/olmo2.py b/vllm/transformers_utils/configs/olmo2.py index 0e6d8e4879b0..c6e446333b43 100644 --- a/vllm/transformers_utils/configs/olmo2.py +++ b/vllm/transformers_utils/configs/olmo2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # yapf: disable # ruff: noqa: E501 # coding=utf-8 diff --git a/vllm/transformers_utils/configs/solar.py b/vllm/transformers_utils/configs/solar.py index 0c1c048f670e..0d5db896b93d 100644 --- a/vllm/transformers_utils/configs/solar.py +++ b/vllm/transformers_utils/configs/solar.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX diff --git a/vllm/transformers_utils/configs/telechat2.py b/vllm/transformers_utils/configs/telechat2.py index eb6f5a059169..5da6c5b4427e 100644 --- a/vllm/transformers_utils/configs/telechat2.py +++ b/vllm/transformers_utils/configs/telechat2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # adapted from https://www.modelscope.cn/models/TeleAI/TeleChat2-3B/resolve/master/configuration_telechat2.py """ Telechat configuration compatible with LlamaConfig. """ diff --git a/vllm/transformers_utils/configs/ultravox.py b/vllm/transformers_utils/configs/ultravox.py index f724bf7f2f1c..99715ba6d0b0 100644 --- a/vllm/transformers_utils/configs/ultravox.py +++ b/vllm/transformers_utils/configs/ultravox.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Adapted from https://github.com/fixie-ai/ultravox/blob/ecd58c4041030bae2ad15aa6bcf04ab43199ea02/ultravox/model/ultravox_config.py from typing import Any, Dict, Optional diff --git a/vllm/transformers_utils/detokenizer.py b/vllm/transformers_utils/detokenizer.py index 7c8423d2b0a3..9d1d4bb92e4a 100644 --- a/vllm/transformers_utils/detokenizer.py +++ b/vllm/transformers_utils/detokenizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List, Optional from vllm.sequence import (VLLM_INVALID_TOKEN_ID, Logprob, SamplingParams, diff --git a/vllm/transformers_utils/detokenizer_utils.py b/vllm/transformers_utils/detokenizer_utils.py index 37ff8a236e79..8160a35ff222 100644 --- a/vllm/transformers_utils/detokenizer_utils.py +++ b/vllm/transformers_utils/detokenizer_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional, Tuple from .tokenizer import AnyTokenizer diff --git a/vllm/transformers_utils/processor.py b/vllm/transformers_utils/processor.py index b12cc83a2297..3197b07d8a46 100644 --- a/vllm/transformers_utils/processor.py +++ b/vllm/transformers_utils/processor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from functools import lru_cache from typing import Any, cast diff --git a/vllm/transformers_utils/processors/__init__.py b/vllm/transformers_utils/processors/__init__.py index 9c71b8cada32..4696f0c49df9 100644 --- a/vllm/transformers_utils/processors/__init__.py +++ b/vllm/transformers_utils/processors/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.transformers_utils.processors.deepseek_vl2 import ( DeepseekVLV2Processor) diff --git a/vllm/transformers_utils/processors/deepseek_vl2.py b/vllm/transformers_utils/processors/deepseek_vl2.py index 27cdf6bc22d0..d37381ea9925 100644 --- a/vllm/transformers_utils/processors/deepseek_vl2.py +++ b/vllm/transformers_utils/processors/deepseek_vl2.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # yapf: disable # ruff: noqa: E501 # coding=utf-8 diff --git a/vllm/transformers_utils/s3_utils.py b/vllm/transformers_utils/s3_utils.py index 74a56cbf57ec..4fe744d285d3 100644 --- a/vllm/transformers_utils/s3_utils.py +++ b/vllm/transformers_utils/s3_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import fnmatch import os import shutil diff --git a/vllm/transformers_utils/tokenizer.py b/vllm/transformers_utils/tokenizer.py index 1f1d67fabb24..520870b563c9 100644 --- a/vllm/transformers_utils/tokenizer.py +++ b/vllm/transformers_utils/tokenizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import contextlib import os import warnings diff --git a/vllm/transformers_utils/tokenizer_group/__init__.py b/vllm/transformers_utils/tokenizer_group/__init__.py index 09569c564a58..c223768b16d6 100644 --- a/vllm/transformers_utils/tokenizer_group/__init__.py +++ b/vllm/transformers_utils/tokenizer_group/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Optional, Type from vllm.config import (LoRAConfig, ModelConfig, ParallelConfig, diff --git a/vllm/transformers_utils/tokenizer_group/base_tokenizer_group.py b/vllm/transformers_utils/tokenizer_group/base_tokenizer_group.py index e6cc7cd4e2e3..fbdfa3e57e17 100644 --- a/vllm/transformers_utils/tokenizer_group/base_tokenizer_group.py +++ b/vllm/transformers_utils/tokenizer_group/base_tokenizer_group.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from abc import ABC, abstractmethod from typing import List, Optional diff --git a/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py b/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py index 3f7627e11ae5..30cab752ccf3 100644 --- a/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py +++ b/vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os from typing import List, Optional diff --git a/vllm/transformers_utils/tokenizer_group/tokenizer_group.py b/vllm/transformers_utils/tokenizer_group/tokenizer_group.py index 6dc2f9056187..025971cb7e47 100644 --- a/vllm/transformers_utils/tokenizer_group/tokenizer_group.py +++ b/vllm/transformers_utils/tokenizer_group/tokenizer_group.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Optional from vllm.config import TokenizerPoolConfig diff --git a/vllm/transformers_utils/tokenizers/__init__.py b/vllm/transformers_utils/tokenizers/__init__.py index e68ad79b296b..2b64f3fc7056 100644 --- a/vllm/transformers_utils/tokenizers/__init__.py +++ b/vllm/transformers_utils/tokenizers/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from .mistral import MistralTokenizer, maybe_serialize_tool_calls __all__ = ["MistralTokenizer", "maybe_serialize_tool_calls"] diff --git a/vllm/transformers_utils/tokenizers/mistral.py b/vllm/transformers_utils/tokenizers/mistral.py index d801cf4e4c7b..cecafcc78fa1 100644 --- a/vllm/transformers_utils/tokenizers/mistral.py +++ b/vllm/transformers_utils/tokenizers/mistral.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import re from dataclasses import dataclass diff --git a/vllm/transformers_utils/utils.py b/vllm/transformers_utils/utils.py index 10a09fb4f566..71fe3ef0b23c 100644 --- a/vllm/transformers_utils/utils.py +++ b/vllm/transformers_utils/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from os import PathLike from pathlib import Path from typing import Union diff --git a/vllm/triton_utils/__init__.py b/vllm/triton_utils/__init__.py index 568185383aa5..c8f7a32ce7a8 100644 --- a/vllm/triton_utils/__init__.py +++ b/vllm/triton_utils/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from vllm.triton_utils.importing import HAS_TRITON __all__ = ["HAS_TRITON"] diff --git a/vllm/triton_utils/custom_cache_manager.py b/vllm/triton_utils/custom_cache_manager.py index 17039d7ba24c..4163969c9a52 100644 --- a/vllm/triton_utils/custom_cache_manager.py +++ b/vllm/triton_utils/custom_cache_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from triton.runtime.cache import (FileCacheManager, default_cache_dir, diff --git a/vllm/triton_utils/importing.py b/vllm/triton_utils/importing.py index 0c96e0632f64..a20700248c26 100644 --- a/vllm/triton_utils/importing.py +++ b/vllm/triton_utils/importing.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from importlib.util import find_spec from vllm.logger import init_logger diff --git a/vllm/usage/usage_lib.py b/vllm/usage/usage_lib.py index 7f5cc906382a..fbbb21c89370 100644 --- a/vllm/usage/usage_lib.py +++ b/vllm/usage/usage_lib.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import datetime import json import logging diff --git a/vllm/utils.py b/vllm/utils.py index 15481fb06e08..3089f0951d1e 100644 --- a/vllm/utils.py +++ b/vllm/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import argparse import asyncio import concurrent diff --git a/vllm/v1/attention/backends/flash_attn.py b/vllm/v1/attention/backends/flash_attn.py index ce83b1fac6c0..837d7faf4370 100755 --- a/vllm/v1/attention/backends/flash_attn.py +++ b/vllm/v1/attention/backends/flash_attn.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """Attention layer with FlashAttention.""" from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple, Type diff --git a/vllm/v1/core/encoder_cache_manager.py b/vllm/v1/core/encoder_cache_manager.py index 9d570b334c6c..651bc01aa5cf 100644 --- a/vllm/v1/core/encoder_cache_manager.py +++ b/vllm/v1/core/encoder_cache_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import TYPE_CHECKING, Dict, List, Set, Tuple from vllm.logger import init_logger diff --git a/vllm/v1/core/kv_cache_manager.py b/vllm/v1/core/kv_cache_manager.py index 7176ec9544f9..94086e4a1f75 100644 --- a/vllm/v1/core/kv_cache_manager.py +++ b/vllm/v1/core/kv_cache_manager.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import defaultdict from typing import DefaultDict, Dict, Iterable, List, Optional, Tuple diff --git a/vllm/v1/core/kv_cache_utils.py b/vllm/v1/core/kv_cache_utils.py index 2b6557ad3ce6..c801ab9e4cd5 100644 --- a/vllm/v1/core/kv_cache_utils.py +++ b/vllm/v1/core/kv_cache_utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """KV-Cache Utilities.""" from collections.abc import Sequence from dataclasses import dataclass diff --git a/vllm/v1/core/scheduler.py b/vllm/v1/core/scheduler.py index 27c9ac1ae353..f4738bb33c60 100644 --- a/vllm/v1/core/scheduler.py +++ b/vllm/v1/core/scheduler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import deque from dataclasses import dataclass from typing import (TYPE_CHECKING, Deque, Dict, Iterable, List, Optional, Set, diff --git a/vllm/v1/engine/__init__.py b/vllm/v1/engine/__init__.py index abe4952c4baf..912b92862c96 100644 --- a/vllm/v1/engine/__init__.py +++ b/vllm/v1/engine/__init__.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum from dataclasses import dataclass from typing import TYPE_CHECKING, List, Optional, Union diff --git a/vllm/v1/engine/async_llm.py b/vllm/v1/engine/async_llm.py index b9dc3561d175..3c4e35e4aa27 100644 --- a/vllm/v1/engine/async_llm.py +++ b/vllm/v1/engine/async_llm.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os from typing import AsyncGenerator, List, Mapping, Optional, Type, Union diff --git a/vllm/v1/engine/core.py b/vllm/v1/engine/core.py index f50303bda58f..29a9ac1868f2 100644 --- a/vllm/v1/engine/core.py +++ b/vllm/v1/engine/core.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle import queue import signal diff --git a/vllm/v1/engine/core_client.py b/vllm/v1/engine/core_client.py index f3b992d6873e..247380ef7cfe 100644 --- a/vllm/v1/engine/core_client.py +++ b/vllm/v1/engine/core_client.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio import os import signal diff --git a/vllm/v1/engine/detokenizer.py b/vllm/v1/engine/detokenizer.py index 4a8b61beec03..6d800f026b22 100644 --- a/vllm/v1/engine/detokenizer.py +++ b/vllm/v1/engine/detokenizer.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import List, Optional, Union diff --git a/vllm/v1/engine/llm_engine.py b/vllm/v1/engine/llm_engine.py index 55d314ebeb95..e0452bcad7ba 100644 --- a/vllm/v1/engine/llm_engine.py +++ b/vllm/v1/engine/llm_engine.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict, List, Mapping, Optional, Type, Union from typing_extensions import TypeVar diff --git a/vllm/v1/engine/mm_input_mapper.py b/vllm/v1/engine/mm_input_mapper.py index d83460a40ad2..83a0d9db161d 100644 --- a/vllm/v1/engine/mm_input_mapper.py +++ b/vllm/v1/engine/mm_input_mapper.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Any, Dict, List, Optional from vllm.config import ModelConfig diff --git a/vllm/v1/engine/output_processor.py b/vllm/v1/engine/output_processor.py index 234ef8194ca9..aeefd52399d5 100644 --- a/vllm/v1/engine/output_processor.py +++ b/vllm/v1/engine/output_processor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import asyncio from dataclasses import dataclass from typing import Dict, List, Optional diff --git a/vllm/v1/engine/processor.py b/vllm/v1/engine/processor.py index 6196c1105207..366287951ed0 100644 --- a/vllm/v1/engine/processor.py +++ b/vllm/v1/engine/processor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from typing import Mapping, Optional, Union diff --git a/vllm/v1/executor/abstract.py b/vllm/v1/executor/abstract.py index 131be759842c..ac10d43eb0d5 100644 --- a/vllm/v1/executor/abstract.py +++ b/vllm/v1/executor/abstract.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Type from vllm.config import VllmConfig diff --git a/vllm/v1/executor/multiproc_executor.py b/vllm/v1/executor/multiproc_executor.py index f6cf35da0106..e3f07172d8cd 100644 --- a/vllm/v1/executor/multiproc_executor.py +++ b/vllm/v1/executor/multiproc_executor.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os import pickle import signal diff --git a/vllm/v1/kv_cache_interface.py b/vllm/v1/kv_cache_interface.py index 6d5cc32ffc5b..eddfb5949ebe 100644 --- a/vllm/v1/kv_cache_interface.py +++ b/vllm/v1/kv_cache_interface.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Dict, List diff --git a/vllm/v1/metrics/loggers.py b/vllm/v1/metrics/loggers.py index f901822c7887..f736e38f192d 100644 --- a/vllm/v1/metrics/loggers.py +++ b/vllm/v1/metrics/loggers.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from abc import ABC, abstractmethod from typing import List diff --git a/vllm/v1/metrics/stats.py b/vllm/v1/metrics/stats.py index 5277505128a6..88f2c083530e 100644 --- a/vllm/v1/metrics/stats.py +++ b/vllm/v1/metrics/stats.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from dataclasses import dataclass from typing import TYPE_CHECKING, List diff --git a/vllm/v1/outputs.py b/vllm/v1/outputs.py index 32aee44e3f37..6e82bffd7e5c 100644 --- a/vllm/v1/outputs.py +++ b/vllm/v1/outputs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Dict, List, Optional diff --git a/vllm/v1/request.py b/vllm/v1/request.py index 80160c673012..0519d9e78751 100644 --- a/vllm/v1/request.py +++ b/vllm/v1/request.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum from typing import TYPE_CHECKING, List, Optional, Union diff --git a/vllm/v1/sample/metadata.py b/vllm/v1/sample/metadata.py index d60f7eb5d76f..8e54de34548d 100644 --- a/vllm/v1/sample/metadata.py +++ b/vllm/v1/sample/metadata.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from dataclasses import dataclass from typing import Dict, List, Optional, Set diff --git a/vllm/v1/sample/ops/penalties.py b/vllm/v1/sample/ops/penalties.py index 2796d049457d..ba368b44ab9c 100644 --- a/vllm/v1/sample/ops/penalties.py +++ b/vllm/v1/sample/ops/penalties.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List, Set, Tuple import torch diff --git a/vllm/v1/sample/ops/topk_topp_sampler.py b/vllm/v1/sample/ops/topk_topp_sampler.py index f2007d85c61a..27431001e3e7 100644 --- a/vllm/v1/sample/ops/topk_topp_sampler.py +++ b/vllm/v1/sample/ops/topk_topp_sampler.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import Dict import torch diff --git a/vllm/v1/sample/sampler.py b/vllm/v1/sample/sampler.py index 9ad665a64894..3da7498e0dae 100644 --- a/vllm/v1/sample/sampler.py +++ b/vllm/v1/sample/sampler.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A layer that samples the next tokens from the model's outputs.""" from typing import Tuple diff --git a/vllm/v1/serial_utils.py b/vllm/v1/serial_utils.py index b1cd5c11834f..1791dfa2b632 100644 --- a/vllm/v1/serial_utils.py +++ b/vllm/v1/serial_utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import pickle diff --git a/vllm/v1/stats/common.py b/vllm/v1/stats/common.py index 902800e0573b..09d382638bff 100644 --- a/vllm/v1/stats/common.py +++ b/vllm/v1/stats/common.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import time from dataclasses import dataclass from dataclasses import field as dataclass_field diff --git a/vllm/v1/utils.py b/vllm/v1/utils.py index 8dfcf2dd7860..5494542c181d 100644 --- a/vllm/v1/utils.py +++ b/vllm/v1/utils.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import multiprocessing import os import weakref diff --git a/vllm/v1/worker/block_table.py b/vllm/v1/worker/block_table.py index 26a2084b131f..8d0785243c71 100644 --- a/vllm/v1/worker/block_table.py +++ b/vllm/v1/worker/block_table.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from typing import List import numpy as np diff --git a/vllm/v1/worker/gpu_input_batch.py b/vllm/v1/worker/gpu_input_batch.py index 28d8e3905387..39708f833fd5 100644 --- a/vllm/v1/worker/gpu_input_batch.py +++ b/vllm/v1/worker/gpu_input_batch.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + # Datastructures defining an input batch from dataclasses import dataclass diff --git a/vllm/v1/worker/gpu_model_runner.py b/vllm/v1/worker/gpu_model_runner.py index a00c00c30733..0b5644525553 100644 --- a/vllm/v1/worker/gpu_model_runner.py +++ b/vllm/v1/worker/gpu_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import gc import time from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast diff --git a/vllm/v1/worker/gpu_worker.py b/vllm/v1/worker/gpu_worker.py index a8cf0aec3f17..0adb69073397 100644 --- a/vllm/v1/worker/gpu_worker.py +++ b/vllm/v1/worker/gpu_worker.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A GPU worker class.""" import gc import os diff --git a/vllm/version.py b/vllm/version.py index 66e189dcedf7..70cd0289b441 100644 --- a/vllm/version.py +++ b/vllm/version.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + try: from ._version import __version__, __version_tuple__ except Exception as e: diff --git a/vllm/worker/cache_engine.py b/vllm/worker/cache_engine.py index c427b759b2e9..252fe06600da 100644 --- a/vllm/worker/cache_engine.py +++ b/vllm/worker/cache_engine.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """CacheEngine class for managing the KV cache.""" from typing import List diff --git a/vllm/worker/cpu_enc_dec_model_runner.py b/vllm/worker/cpu_enc_dec_model_runner.py index fa6775cbd6c6..71e32c5f7aca 100644 --- a/vllm/worker/cpu_enc_dec_model_runner.py +++ b/vllm/worker/cpu_enc_dec_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, cast diff --git a/vllm/worker/cpu_model_runner.py b/vllm/worker/cpu_model_runner.py index 4b429b67b36f..1c3feece95a5 100644 --- a/vllm/worker/cpu_model_runner.py +++ b/vllm/worker/cpu_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import weakref from collections import defaultdict diff --git a/vllm/worker/cpu_pooling_model_runner.py b/vllm/worker/cpu_pooling_model_runner.py index d31ba89e1237..c0744d63b8d0 100644 --- a/vllm/worker/cpu_pooling_model_runner.py +++ b/vllm/worker/cpu_pooling_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import Any, Dict, List, Optional, Tuple, Type, Union diff --git a/vllm/worker/cpu_worker.py b/vllm/worker/cpu_worker.py index 3e5fcf11b9e1..27b1a2dd1be8 100644 --- a/vllm/worker/cpu_worker.py +++ b/vllm/worker/cpu_worker.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A CPU worker class.""" from typing import Dict, List, Optional, Set, Tuple, Type diff --git a/vllm/worker/enc_dec_model_runner.py b/vllm/worker/enc_dec_model_runner.py index 8a161b740042..e2d338f75761 100644 --- a/vllm/worker/enc_dec_model_runner.py +++ b/vllm/worker/enc_dec_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import itertools from typing import Any, Dict, List, Optional, Tuple, Type, cast diff --git a/vllm/worker/hpu_model_runner.py b/vllm/worker/hpu_model_runner.py index a339c97a8383..b846d4387ba5 100644 --- a/vllm/worker/hpu_model_runner.py +++ b/vllm/worker/hpu_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + ############################################################################### # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company ############################################################################### diff --git a/vllm/worker/hpu_worker.py b/vllm/worker/hpu_worker.py index aaf9cb40bf2a..a1f31bead729 100644 --- a/vllm/worker/hpu_worker.py +++ b/vllm/worker/hpu_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + ############################################################################### # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company ############################################################################### diff --git a/vllm/worker/model_runner.py b/vllm/worker/model_runner.py index 322d91d62ce4..90f08b1dfde8 100644 --- a/vllm/worker/model_runner.py +++ b/vllm/worker/model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import gc import inspect diff --git a/vllm/worker/model_runner_base.py b/vllm/worker/model_runner_base.py index aef4bdcdd4bf..9e33ef9f1bd0 100644 --- a/vllm/worker/model_runner_base.py +++ b/vllm/worker/model_runner_base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import pickle from abc import ABC, abstractmethod diff --git a/vllm/worker/multi_step_model_runner.py b/vllm/worker/multi_step_model_runner.py index 4aab09c80826..90771e8ac75d 100644 --- a/vllm/worker/multi_step_model_runner.py +++ b/vllm/worker/multi_step_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import functools from dataclasses import dataclass, field diff --git a/vllm/worker/multi_step_tpu_worker.py b/vllm/worker/multi_step_tpu_worker.py index e654f7172b26..3871199987ce 100644 --- a/vllm/worker/multi_step_tpu_worker.py +++ b/vllm/worker/multi_step_tpu_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import Dict, Optional, Tuple diff --git a/vllm/worker/multi_step_worker.py b/vllm/worker/multi_step_worker.py index 1f982fe10336..3518ab2f64fe 100644 --- a/vllm/worker/multi_step_worker.py +++ b/vllm/worker/multi_step_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from dataclasses import dataclass from typing import Dict, List, Optional, Tuple diff --git a/vllm/worker/neuron_model_runner.py b/vllm/worker/neuron_model_runner.py index 596c26eac28b..f2093fc42ad1 100644 --- a/vllm/worker/neuron_model_runner.py +++ b/vllm/worker/neuron_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from dataclasses import dataclass from importlib.util import find_spec diff --git a/vllm/worker/neuron_worker.py b/vllm/worker/neuron_worker.py index e02c72faace7..5f0eb0019eee 100644 --- a/vllm/worker/neuron_worker.py +++ b/vllm/worker/neuron_worker.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A Neuron worker class.""" from typing import List, Optional, Tuple diff --git a/vllm/worker/openvino_model_runner.py b/vllm/worker/openvino_model_runner.py index 42fe2cf668ad..44442cddbd4a 100644 --- a/vllm/worker/openvino_model_runner.py +++ b/vllm/worker/openvino_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + from collections import defaultdict from typing import Dict, List, NamedTuple, Optional, Tuple diff --git a/vllm/worker/openvino_worker.py b/vllm/worker/openvino_worker.py index f5b46cde3969..0690222d91af 100644 --- a/vllm/worker/openvino_worker.py +++ b/vllm/worker/openvino_worker.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """An OpenVINO worker class.""" from typing import Any, Dict, List, Optional, Tuple diff --git a/vllm/worker/pooling_model_runner.py b/vllm/worker/pooling_model_runner.py index 6de227f3cb2b..f43085b0e969 100644 --- a/vllm/worker/pooling_model_runner.py +++ b/vllm/worker/pooling_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses from typing import Any, Dict, List, Optional, Tuple, Type, Union diff --git a/vllm/worker/tpu_model_runner.py b/vllm/worker/tpu_model_runner.py index 874951828428..ecdf7aa88896 100644 --- a/vllm/worker/tpu_model_runner.py +++ b/vllm/worker/tpu_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import enum import time from dataclasses import dataclass diff --git a/vllm/worker/tpu_worker.py b/vllm/worker/tpu_worker.py index ea0e700545b1..12f10169f2db 100644 --- a/vllm/worker/tpu_worker.py +++ b/vllm/worker/tpu_worker.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import os from typing import List, Optional, Tuple, Union diff --git a/vllm/worker/utils.py b/vllm/worker/utils.py index ffa8c4cb0ff4..d925f088357b 100644 --- a/vllm/worker/utils.py +++ b/vllm/worker/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 ''' Worker-related helper functions. ''' diff --git a/vllm/worker/worker.py b/vllm/worker/worker.py index 1d2884d3ddf5..582aa460eb4f 100644 --- a/vllm/worker/worker.py +++ b/vllm/worker/worker.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A GPU worker class.""" import gc import os diff --git a/vllm/worker/worker_base.py b/vllm/worker/worker_base.py index 6eeb4aa17051..819b81fbfdbb 100644 --- a/vllm/worker/worker_base.py +++ b/vllm/worker/worker_base.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import os import time diff --git a/vllm/worker/xpu_model_runner.py b/vllm/worker/xpu_model_runner.py index b7b7b7227b22..9c726e1a107e 100644 --- a/vllm/worker/xpu_model_runner.py +++ b/vllm/worker/xpu_model_runner.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 + import dataclasses import time import weakref diff --git a/vllm/worker/xpu_worker.py b/vllm/worker/xpu_worker.py index e9cb623c8eb4..047c0bbbc355 100644 --- a/vllm/worker/xpu_worker.py +++ b/vllm/worker/xpu_worker.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 """A XPU worker class.""" import gc import os