File size: 355 Bytes
5fa1a76 |
1 2 3 4 5 6 7 8 9 |
Let's see an example with a chat LLM, which makes use of chat templating: thon tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-alpha") model = AutoModelForCausalLM.from_pretrained( "HuggingFaceH4/zephyr-7b-alpha", device_map="auto", load_in_4bit=True ) set_seed(0) prompt = """How many helicopters can a human eat in one sitting? |