FlameF0X commited on
Commit
6dc36b6
Β·
verified Β·
1 Parent(s): 4503a8c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -11
README.md CHANGED
@@ -24,8 +24,8 @@ model-index:
24
  type: text-generation
25
  name: Text Generation
26
  dataset:
27
- name: openai/gsm8k
28
- type: openai/gsm8k
29
  config: main
30
  split: test
31
  metrics:
@@ -40,7 +40,7 @@ model-index:
40
  type: text-generation
41
  name: Text Generation
42
  dataset:
43
- name: TIGER-Lab/MMLU-Pro
44
  type: TIGER-Lab/MMLU-Pro
45
  config: default
46
  split: test
@@ -53,37 +53,72 @@ model-index:
53
  name: Local Benchmark
54
  url: https://huggingface.co/FlameF0X/Qwen2-0.2B-it
55
  ---
56
- ## Model usage
57
- ```py
 
 
 
 
 
 
 
 
 
 
58
  import torch
59
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
60
  model_path = "FlameF0X/Qwen2-0.2B-it"
 
61
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
62
  model = AutoModelForCausalLM.from_pretrained(
63
- model_path,
64
- torch_dtype="auto",
65
  device_map="auto",
66
  trust_remote_code=True
67
  )
 
68
  messages = [
69
  {"role": "system", "content": "You are a helpful assistant."},
70
  {"role": "user", "content": "Explain how a transformer model works in one sentence."}
71
  ]
 
72
  text = tokenizer.apply_chat_template(
73
- messages,
74
- tokenize=False,
75
  add_generation_prompt=True
76
  )
 
77
  model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
 
78
  generated_ids = model.generate(
79
  **model_inputs,
80
  max_new_tokens=128,
81
  do_sample=True,
82
  temperature=0.7
83
  )
 
84
  generated_ids = [
85
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
 
86
  ]
 
87
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
88
  print(f"--- Assistant Response ---\n{response}")
89
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  type: text-generation
25
  name: Text Generation
26
  dataset:
27
+ name: GSM8K
28
+ type: gsm8k
29
  config: main
30
  split: test
31
  metrics:
 
40
  type: text-generation
41
  name: Text Generation
42
  dataset:
43
+ name: MMLU-Pro
44
  type: TIGER-Lab/MMLU-Pro
45
  config: default
46
  split: test
 
53
  name: Local Benchmark
54
  url: https://huggingface.co/FlameF0X/Qwen2-0.2B-it
55
  ---
56
+
57
+ ## Evaluation Results
58
+
59
+ | Benchmark | Score |
60
+ |-----------|-------|
61
+ | GSM8K (test) | 2.00% |
62
+ | MMLU-Pro (test) | 4.00% |
63
+
64
+ > Results obtained via local evaluation. Given the model size (0.2B parameters), low benchmark scores are expected.
65
+
66
+ ## Model Usage
67
+ ```python
68
  import torch
69
  from transformers import AutoTokenizer, AutoModelForCausalLM
70
+
71
  model_path = "FlameF0X/Qwen2-0.2B-it"
72
+
73
  tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
74
  model = AutoModelForCausalLM.from_pretrained(
75
+ model_path,
76
+ torch_dtype="auto",
77
  device_map="auto",
78
  trust_remote_code=True
79
  )
80
+
81
  messages = [
82
  {"role": "system", "content": "You are a helpful assistant."},
83
  {"role": "user", "content": "Explain how a transformer model works in one sentence."}
84
  ]
85
+
86
  text = tokenizer.apply_chat_template(
87
+ messages,
88
+ tokenize=False,
89
  add_generation_prompt=True
90
  )
91
+
92
  model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
93
+
94
  generated_ids = model.generate(
95
  **model_inputs,
96
  max_new_tokens=128,
97
  do_sample=True,
98
  temperature=0.7
99
  )
100
+
101
  generated_ids = [
102
+ output_ids[len(input_ids):]
103
+ for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
104
  ]
105
+
106
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
107
  print(f"--- Assistant Response ---\n{response}")
108
+ ```
109
+
110
+ ## Training Data
111
+
112
+ This model was instruction-tuned on a mixture of:
113
+
114
+ - `Salesforce/wikitext` β€” General text
115
+ - `roneneldan/TinyStories` β€” Short story generation
116
+ - `FlameF0X/arXiv-AI-ML` β€” AI/ML research papers
117
+ - `Skylion007/openwebtext` β€” Web text
118
+ - `flytech/python-codes-25k` β€” Python code
119
+ - `bookcorpus/bookcorpus` β€” Books
120
+ - `HuggingFaceH4/ultrachat_200k` β€” Instruction following
121
+ - `openai/gsm8k` β€” Math reasoning
122
+ - `microsoft/orca-math-word-problems-200k` β€” Math word problems
123
+ - `laion/OIG` β€” Open instruction generalist
124
+ - `microsoft/wiki_qa` β€” Question answering