Views
No views yet
| Benchmark | Score |
|---|---|
| GSM8K (test) | 2.00% |
| MMLU-Pro (test) | 4.00% |
Results obtained via local evaluation. Given the model size (0.2B parameters), low benchmark scores are expected.
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4model_path = "FlameF0X/Qwen2-0.2B-it"
5
6tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_path,
9 torch_dtype="auto",
10 device_map="auto",
11 trust_remote_code=True
12)
13
14messages = [
15 {"role": "system", "content": "You are a helpful assistant."},
16 {"role": "user", "content": "Explain how a transformer model works in one sentence."}
17]
18
19text = tokenizer.apply_chat_template(
20 messages,
21 tokenize=False,
22 add_generation_prompt=True
23)
24
25model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
26
27generated_ids = model.generate(
28 **model_inputs,
29 max_new_tokens=128,
30 do_sample=True,
31 temperature=0.7
32)
33
34generated_ids = [
35 output_ids[len(input_ids):]
36 for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
37]
38
39response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
40print(f"--- Assistant Response ---\n{response}")Salesforce/wikitext — General textroneneldan/TinyStories — Short story generationFlameF0X/arXiv-AI-ML — AI/ML research papersSkylion007/openwebtext — Web textflytech/python-codes-25k — Python codebookcorpus/bookcorpus — BooksHuggingFaceH4/ultrachat_200k — Instruction followingopenai/gsm8k — Math reasoningmicrosoft/orca-math-word-problems-200k — Math word problemslaion/OIG — Open instruction generalistmicrosoft/wiki_qa — Question answering