francescofiamingo1 commited on
Commit
3ac0337
·
verified ·
1 Parent(s): 72a78fc

Initial release of FF_3 2.02B

Browse files
README.md CHANGED
@@ -1,3 +1,78 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - gpt2
9
+ - causal-lm
10
+ - ff-llm
11
+ ---
12
+
13
+ # FF_3 — FF-LLM 2.02B
14
+
15
+ FF_3 is a 2.02B parameter language model trained from scratch.
16
+
17
+ ## Model Details
18
+ - **Architecture**: GPT-2 decoder-only (custom)
19
+ - **Parameters**: 2,022,739,072
20
+ - **Vocabulary**: 50,257 (GPT-2 BPE tokenizer)
21
+ - **Context length**: 2,048 tokens
22
+ - **Training**: From scratch on 90B tokens
23
+
24
+ ## Training Pipeline
25
+ 1. **Pretraining**: 90B tokens (web + STEM data)
26
+ 2. **SFT**: 760K examples + 100K high-quality examples
27
+ 3. **DPO**: 38,863 preference pairs
28
+ 4. **Distillation**: 20K examples from Qwen2.5-32B teacher
29
+
30
+ ## Prompt Format
31
+ ```
32
+ ### System:
33
+ You are FF-LLM, a helpful assistant.
34
+
35
+ ### Instruction:
36
+ {your question here}
37
+
38
+ ### Response:
39
+ ```
40
+
41
+ ## Usage with Transformers
42
+
43
+ ```python
44
+ from transformers import GPT2LMHeadModel, GPT2Tokenizer
45
+
46
+ model = GPT2LMHeadModel.from_pretrained("ff-llm/FF_3")
47
+ tokenizer = GPT2Tokenizer.from_pretrained("ff-llm/FF_3")
48
+
49
+ prompt = (
50
+ "### System:\nYou are FF-LLM, a helpful assistant.\n\n"
51
+ "### Instruction:\nWhat is the capital of France?\n\n### Response:\n"
52
+ )
53
+ input_ids = tokenizer.encode(prompt, return_tensors="pt")
54
+ output = model.generate(
55
+ input_ids, max_new_tokens=256, do_sample=True,
56
+ temperature=0.7, top_p=0.9,
57
+ eos_token_id=tokenizer.eos_token_id,
58
+ pad_token_id=tokenizer.eos_token_id,
59
+ )
60
+ print(tokenizer.decode(output[0][input_ids.shape[1]:], skip_special_tokens=True))
61
+ ```
62
+
63
+ ## Usage with Ollama
64
+ ```bash
65
+ ollama run ff-llm/FF_3
66
+ ```
67
+
68
+ ## Limitations
69
+ - Weak mathematical reasoning
70
+ - May hallucinate on factual questions
71
+ - English only
72
+
73
+ ## Training Cost
74
+ ~\,000 total compute cost
75
+ Trained by a single researcher
76
+
77
+ ## License
78
+ Apache 2.0
config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": ["GPT2LMHeadModel"],
3
+ "model_type": "gpt2",
4
+ "vocab_size": 50257,
5
+ "n_embd": 2048,
6
+ "n_head": 16,
7
+ "n_inner": 8192,
8
+ "n_layer": 38,
9
+ "n_positions": 2048,
10
+ "n_ctx": 2048,
11
+ "bos_token_id": 50256,
12
+ "eos_token_id": 50256,
13
+ "activation_function": "gelu_new",
14
+ "attn_pdrop": 0.0,
15
+ "embd_pdrop": 0.0,
16
+ "resid_pdrop": 0.0,
17
+ "layer_norm_epsilon": 1e-05,
18
+ "initializer_range": 0.02,
19
+ "torch_dtype": "bfloat16",
20
+ "use_cache": true,
21
+ "tie_word_embeddings": true
22
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 50256,
3
+ "eos_token_id": 50256,
4
+ "pad_token_id": 50256,
5
+ "temperature": 0.7,
6
+ "top_p": 0.9,
7
+ "repetition_penalty": 1.1,
8
+ "max_new_tokens": 512,
9
+ "do_sample": true
10
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:245872baac62fb882200544b377f6225ef25fa067b0e3914f33468d5e58becb3
3
+ size 4247379640
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "50256": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ }
13
+ },
14
+ "bos_token": "<|endoftext|>",
15
+ "clean_up_tokenization_spaces": false,
16
+ "eos_token": "<|endoftext|>",
17
+ "errors": "replace",
18
+ "extra_special_tokens": {},
19
+ "model_max_length": 1024,
20
+ "pad_token": null,
21
+ "tokenizer_class": "GPT2Tokenizer",
22
+ "unk_token": "<|endoftext|>"
23
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff