AnomalyLLM is a knowledge distillation-based approach for time series anomaly detection, where a student network is trained to mimic the features of a teacher network pretrained on large-scale datasets. The teacher network is based on a large language model (LLM), which is fine-tuned to generate time series representations. During testing, anomalies are detected when the discrepancy between the outputs of the teacher and student networks is large. To prevent the student network from overlearning the teacher's features, two strategies are employed: incorporating prototypical signals into the student network to focus on normal patterns and using synthetic anomalies to increase the representation gap between the networks. AnomalyLLM achieves state-of-the-art performance on 15 datasets, improving accuracy by at least 14.5% on the UCR dataset. The method demonstrates superior performance on both univariate and multivariate time series datasets, outperforming existing methods in terms of accuracy and F1 score. The approach leverages the strengths of LLMs and knowledge distillation to generate generalizable representations for time series anomaly detection. The method is evaluated on various datasets, including UCR, SMD, MSL, SMAP, PSM, NIPS-TS-GECCO, and NIPS-TS-SWAN, showing its effectiveness in detecting anomalies in diverse scenarios. The results indicate that AnomalyLLM is a promising approach for time series anomaly detection, with potential for further improvements in lightweight versions for deployment in resource-constrained environments.AnomalyLLM is a knowledge distillation-based approach for time series anomaly detection, where a student network is trained to mimic the features of a teacher network pretrained on large-scale datasets. The teacher network is based on a large language model (LLM), which is fine-tuned to generate time series representations. During testing, anomalies are detected when the discrepancy between the outputs of the teacher and student networks is large. To prevent the student network from overlearning the teacher's features, two strategies are employed: incorporating prototypical signals into the student network to focus on normal patterns and using synthetic anomalies to increase the representation gap between the networks. AnomalyLLM achieves state-of-the-art performance on 15 datasets, improving accuracy by at least 14.5% on the UCR dataset. The method demonstrates superior performance on both univariate and multivariate time series datasets, outperforming existing methods in terms of accuracy and F1 score. The approach leverages the strengths of LLMs and knowledge distillation to generate generalizable representations for time series anomaly detection. The method is evaluated on various datasets, including UCR, SMD, MSL, SMAP, PSM, NIPS-TS-GECCO, and NIPS-TS-SWAN, showing its effectiveness in detecting anomalies in diverse scenarios. The results indicate that AnomalyLLM is a promising approach for time series anomaly detection, with potential for further improvements in lightweight versions for deployment in resource-constrained environments.