diff --git a/LLama.Web/Common/InferenceOptions.cs b/LLama.Web/Common/InferenceOptions.cs
index c2420af37..0b38a04d8 100644
--- a/LLama.Web/Common/InferenceOptions.cs
+++ b/LLama.Web/Common/InferenceOptions.cs
@@ -23,7 +23,7 @@ public class InferenceOptions : IInferenceParams
///
/// Sequences where the model will stop generating further tokens.
///
- public IEnumerable AntiPrompts { get; set; } = Array.Empty();
+ public IReadOnlyList AntiPrompts { get; set; } = Array.Empty();
///
/// path to file for saving/loading model eval state
///
diff --git a/LLama/Abstractions/IInferenceParams.cs b/LLama/Abstractions/IInferenceParams.cs
index 93a9b52ba..a21c7306b 100644
--- a/LLama/Abstractions/IInferenceParams.cs
+++ b/LLama/Abstractions/IInferenceParams.cs
@@ -29,7 +29,7 @@ public interface IInferenceParams
///
/// Sequences where the model will stop generating further tokens.
///
- public IEnumerable AntiPrompts { get; set; }
+ public IReadOnlyList AntiPrompts { get; set; }
///
/// 0 or lower to use vocab size
diff --git a/LLama/Common/InferenceParams.cs b/LLama/Common/InferenceParams.cs
index bef64631a..d0217e2f8 100644
--- a/LLama/Common/InferenceParams.cs
+++ b/LLama/Common/InferenceParams.cs
@@ -28,7 +28,7 @@ public record InferenceParams : IInferenceParams
///
/// Sequences where the model will stop generating further tokens.
///
- public IEnumerable AntiPrompts { get; set; } = Array.Empty();
+ public IReadOnlyList AntiPrompts { get; set; } = Array.Empty();
///
/// 0 or lower to use vocab size