Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3# 모델 로드
4tokenizer = AutoTokenizer.from_pretrained("tklohj/windyllm_2.3")
5model = AutoModelForCausalLM.from_pretrained("tklohj/windyllm_2.3")
6
7# 추론 예시
8question = "What is the capital of France?"
9choices = ["London", "Paris", "Berlin", "Rome"]
10
11prompt = f'''Answer this question with A, B, C, or D.
12
13{question}
14
15A) {choices[0]}
16B) {choices[1]}
17C) {choices[2]}
18D) {choices[3]}
19
20Answer:'''
21
22inputs = tokenizer(prompt, return_tensors="pt")
23outputs = model.generate(**inputs, max_new_tokens=20, temperature=0.1)
24response = tokenizer.decode(outputs[0], skip_special_tokens=True)
25print(response)1@model{windyllm_2.3,
2 title={WindyLLM 2.3: MMLU Fine-tuned Language Model},
3 author={tklohj},
4 year={2025},
5 url={https://huggingface.co/tklohj/windyllm_2.3}
6}