import os os.system("pip install transformers") from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "ehartford/dolphin-2.2.1-mistral-7b" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id) text = "Hello my name is" inputs = tokenizer(text, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=20) print(tokenizer.decode(outputs[0], skip_special_tokens=True))