diff --git a/examples/run_generation.py b/examples/run_generation.py index c31ebeef..81423c38 100644 --- a/examples/run_generation.py +++ b/examples/run_generation.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import argparse import requests import time diff --git a/examples/tgi_client.py b/examples/tgi_client.py index 1f627068..ec358316 100644 --- a/examples/tgi_client.py +++ b/examples/tgi_client.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import os import statistics import threading diff --git a/launcher/src/main.rs b/launcher/src/main.rs index bbb4c8df..0a023234 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + use clap::{Parser, ValueEnum}; use nix::sys::signal::{self, Signal}; use nix::unistd::Pid; diff --git a/router/client/src/client.rs b/router/client/src/client.rs index 9522503d..486e13d9 100644 --- a/router/client/src/client.rs +++ b/router/client/src/client.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + /// Single shard Client use crate::pb::generate::v1::text_generation_service_client::TextGenerationServiceClient; use crate::pb::generate::v1::*; diff --git a/router/client/src/sharded_client.rs b/router/client/src/sharded_client.rs index 27462bce..062ec102 100644 --- a/router/client/src/sharded_client.rs +++ b/router/client/src/sharded_client.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + /// Multi shard Client use crate::{Batch, CachedBatch, Client, Generation, HealthResponse, ShardInfo}; use crate::{ClientError, Result}; diff --git a/router/src/infer.rs b/router/src/infer.rs index 6195a4fa..f108a1dc 100644 --- a/router/src/infer.rs +++ b/router/src/infer.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + /// Batching and inference logic use crate::validation::{Validation, ValidationError}; use crate::{Entry, Queue, Token}; diff --git a/router/src/main.rs b/router/src/main.rs index b6937a51..dd1ef7e2 100644 --- a/router/src/main.rs +++ b/router/src/main.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + /// Text Generation Inference webserver entrypoint use axum::http::HeaderValue; use clap::Parser; diff --git a/router/src/queue.rs b/router/src/queue.rs index 8590d82c..6734c6a6 100644 --- a/router/src/queue.rs +++ b/router/src/queue.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + use crate::infer::InferError; use crate::infer::InferStreamResponse; use crate::validation::ValidGenerateRequest; diff --git a/router/src/server.rs b/router/src/server.rs index ca339490..c2eab874 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + /// HTTP Server logic use crate::health::Health; use crate::infer::{InferError, InferResponse, InferStreamResponse}; diff --git a/router/src/validation.rs b/router/src/validation.rs index 9afdb0bb..0ec93109 100644 --- a/router/src/validation.rs +++ b/router/src/validation.rs @@ -1,3 +1,5 @@ +/// Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + /// Payload validation logic use crate::validation::ValidationError::{BestOfSampling, BestOfSeed, EmptyInput}; use crate::{GenerateParameters, GenerateRequest}; diff --git a/server/tests/utils/test_tokens.py b/server/tests/utils/test_tokens.py index 8ba775a7..ee080a28 100644 --- a/server/tests/utils/test_tokens.py +++ b/server/tests/utils/test_tokens.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import torch from text_generation_server.utils.tokens import ( StopSequenceCriteria, diff --git a/server/text_generation_server/cli.py b/server/text_generation_server/cli.py index 90a75f83..fead2297 100644 --- a/server/text_generation_server/cli.py +++ b/server/text_generation_server/cli.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import os import psutil import signal diff --git a/server/text_generation_server/habana_quantization_env.py b/server/text_generation_server/habana_quantization_env.py index 351f88a3..d92b6803 100644 --- a/server/text_generation_server/habana_quantization_env.py +++ b/server/text_generation_server/habana_quantization_env.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import os import sys diff --git a/server/text_generation_server/interceptor.py b/server/text_generation_server/interceptor.py index 3dab7695..cde71de3 100644 --- a/server/text_generation_server/interceptor.py +++ b/server/text_generation_server/interceptor.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import torch import grpc diff --git a/server/text_generation_server/models/bloom.py b/server/text_generation_server/models/bloom.py index 9d931faa..afcdf612 100644 --- a/server/text_generation_server/models/bloom.py +++ b/server/text_generation_server/models/bloom.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import torch from typing import Optional, Type diff --git a/server/text_generation_server/models/causal_lm.py b/server/text_generation_server/models/causal_lm.py index c7d82711..4490a908 100644 --- a/server/text_generation_server/models/causal_lm.py +++ b/server/text_generation_server/models/causal_lm.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import bisect from dataclasses import dataclass from functools import wraps diff --git a/server/text_generation_server/server.py b/server/text_generation_server/server.py index 99bd9517..67358d3c 100644 --- a/server/text_generation_server/server.py +++ b/server/text_generation_server/server.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import asyncio import os import sys diff --git a/server/text_generation_server/utils/__init__.py b/server/text_generation_server/utils/__init__.py index 6acbe22d..9ca8ebda 100644 --- a/server/text_generation_server/utils/__init__.py +++ b/server/text_generation_server/utils/__init__.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + from text_generation_server.utils.convert import convert_file, convert_files from text_generation_server.utils.dist import initialize_torch_distributed from text_generation_server.utils.weights import Weights diff --git a/server/text_generation_server/utils/debug.py b/server/text_generation_server/utils/debug.py index 1ecaca9d..ef8d437b 100644 --- a/server/text_generation_server/utils/debug.py +++ b/server/text_generation_server/utils/debug.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import os import glob import time diff --git a/server/text_generation_server/utils/tokens.py b/server/text_generation_server/utils/tokens.py index 1ea4d9bc..c50d10e3 100644 --- a/server/text_generation_server/utils/tokens.py +++ b/server/text_generation_server/utils/tokens.py @@ -1,3 +1,5 @@ +# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. + import re from typing import Callable, List, Optional, Tuple