START OF PREVIOUS DISCUSSION END OF PREVIOUS DISCUSSION
- User
START OF PREVIOUS DISCUSSION END OF PREVIOUS DISCUSSION user: from huggingface_hub import InferenceClient
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1") for token in client.text_generation("Tell me a huge story", stream=True, max_new_tokens=1024, ): print(token)
is it possible to avoid it caching the values?
- Assistant
If your concern is about the response getting cached and affecting subsequent requests, using the InferenceClient from
huggingface_hubas shown does not inherently cache responses between separate executions of your Python script. Each time you run your script, a new request is issued to the model endpoint, and the generated text should be unique to that request unless the model produces a deterministic response for the same prompt.