max_length, temperature, and top_p to control the style and length of the output.transformers library. Make sure you have installed the following dependencies:pip install transformers torch huggingface_hub1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3# Load the fine-tuned model and tokenizer
4model = AutoModelForCausalLM.from_pretrained("your_hf_username/mistral-malayalam-colloquial")
5tokenizer = AutoTokenizer.from_pretrained("your_hf_username/mistral-malayalam-colloquial")1from transformers import pipeline
2
3# Create the text generation pipeline
4pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
5
6# Test with a prompt
7input_text = "എന്റെ പേര് അരുൺ ആണ്. ഞാൻ കേരളത്തിൽ താമസിക്കുന്നു."
8output = pipe(input_text, max_length=50, do_sample=True)
9
10print(output[0]['generated_text'])