huggingface / huggingface/candle
Hallucination of a Mixtral model in Candle when trained with version 4.36.2 (HF Transformers)
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 1.8k
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 25
Description
# Description:
I trained a model with the Mixtral-8x7B architecture using the Hugging Face Transformers library version 4.36.2 in a Python environment. During evaluation in this Python environment, I used the same MixtralConfig and the same parameters (top_p, top_k, and temperature) as during training. The model did not exhibit any hallucinations.
However, when I switch to Hugging Face Transformers version 4.37.0 or 4.48.0 and evaluate the same model (trained with 4.36.2), hallucinations appear.
If I fine-tune the model using Hugging Face Transformers 4.48.0 and run this model with the same version, the hallucinations do not occur. This suggests that there is a difference in the way the model is loaded or evaluated between some versions of the Hugging Face Transformers library.
However, when I use the model in Candle, I encounter the same hallucinations, whether the model was trained with Hugging Face Transformers 4.36.2 or 4.48.0.
Do you have any idea why this behavior is occurring?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Mixtral-8x7B evaluation with the reported Hugging Face Transformers versions 4.36.2, 4.37.0, and 4.48.0, then compare the same model and sampling parameters in Candle. The issue does not name files or tests; done means identifying the loading or evaluation difference that causes the inconsistent hallucinations and documenting a verified explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python, rust
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100