rustformers / llm

[Unmaintained, see README] An ecosystem of Rust libraries for working with large language models
https://docs.rs/llm/latest/llm/
Apache License 2.0
6.07k stars 355 forks source link

Fix snapshot serialization/deserialization: rename logits to last_logits #438

Closed lucksus closed 11 months ago

lucksus commented 11 months ago

Snapshot deserialization was broken.

InferenceSnapshotRef<'_> implements serde::Serialize while InferenceSnapshot implements serde::Deserialize. But trying to deserialize an InferenceSnapshot yielded:

missing field "last_logits"

The name for this field was different in the two structs. This fixes that.