from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "alphaedge-ai/Qwen.5-4B-bos-32768" # load the tokenizer and the modeltokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto", trust_remote_code=True) # prepare the model inputprompt = "Your prompt in Bosnian."messages = [ {"role": "user", "content": prompt}]text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True)model_inputs = tokenizer([text], return_tensors="pt").to(model.device) # conduct text completiongenerated_ids = model.generate( **model_inputs, max_new_tokens=32768)output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]content = tokenizer.decode(output_ids, skip_special_tokens=True) print("content:", content)