# ModelPreference

# ModelPreference


```
@Retention(value = AnnotationRetention.SOURCE)
@IntDef(value = [1, 2])
public annotation ModelPreference
```

<br />

*** ** * ** ***

Defines the developer's preference to guide model selection, balancing characteristics like speed and capability.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/ModelPreference#FAST() = 1` Prefers models optimized for faster inference speed, typically resulting in lower latency. |
| `static final int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/ModelPreference#FULL() = 2` Prefers models offering the fullest capabilities, potentially including higher accuracy or more features, which may result in increased latency and resource consumption. |

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/ModelPreference#ModelPreference()()` |

## Constants

### FAST

```
public static final int FAST = 1
```

Prefers models optimized for faster inference speed, typically resulting in lower latency. This may be ideal for real-time applications.

### FULL

```
public static final int FULL = 2
```

Prefers models offering the fullest capabilities, potentially including higher accuracy or more features, which may result in increased latency and resource consumption.

## Public constructors

### ModelPreference

```
public ModelPreference()
```