ISLAM-PO commited on
Commit
5ff77dd
Β·
verified Β·
1 Parent(s): 2deaa48

Correct model card for adapter-only repository

Browse files

Document the missing base model and prevent the adapter from being mistaken for a standalone model.

Files changed (1) hide show
  1. README.md +53 -89
README.md CHANGED
@@ -1,91 +1,55 @@
1
- # AraGPT2-Fresh-Forgotten Model
2
-
3
- ## Overview
4
-
5
- **aragpt2-fresh-forgotten** is an Arabic language model built on the **GPT-2 Small** architecture by OpenAI, trained for Arabic text generation.
6
-
7
- - **Type:** `GPT2LMHeadModel` (causal language modeling)
8
- - **Language:** Arabic (with support for Latin characters, digits, and punctuation)
9
- - **Size:** ~135M parameters (~515 MB in `safetensors` FP32 format)
10
- - **Vocabulary:** 64,000 tokens (ByteLevel-BPE)
11
- - **Context length:** 1024 tokens
12
-
13
- ## Folder Contents
14
-
15
- | File | Approx. Size | Description |
16
- |---|---|---|
17
- | `config.json` | 881 bytes | Architecture and hyperparameter settings |
18
- | `generation_config.json` | 204 bytes | Default generation settings |
19
- | `model.safetensors` | ~515 MB | Model weights |
20
- | `tokenizer.json` | ~4.6 MB | Tokenizer (BPE) |
21
- | `vocab.json` | ~1.9 MB | Vocabulary (64k) |
22
- | `merges.txt` | ~1.5 MB | Merge rules (63,740 merges) |
23
- | `README.md` | β€” | This document |
24
- | `ARCHITECTURE.md` | β€” | Detailed architecture description |
25
- | `USAGE.md` | β€” | Usage guide with code examples |
26
- | `TOKENIZER.md` | β€” | Tokenizer and vocabulary guide |
27
-
28
- ## Quick Specs (from `config.json`)
29
-
30
- ```json
31
- {
32
- "model_type": "gpt2",
33
- "architectures": ["GPT2LMHeadModel"],
34
- "n_layer": 12,
35
- "n_head": 12,
36
- "n_embd": 768,
37
- "n_positions": 1024,
38
- "n_ctx": 1024,
39
- "vocab_size": 64000,
40
- "activation_function": "gelu_new",
41
- "bos_token_id": 0,
42
- "eos_token_id": 0
43
- }
44
- ```
45
-
46
- ## Quickstart
47
-
48
- ```python
49
- from transformers import GPT2LMHeadModel, GPT2Tokenizer
50
-
51
- model_path = r"C:\Users\RDP\Desktop\aragpt2-fresh-forgotten"
52
- tokenizer = GPT2Tokenizer.from_pretrained(model_path)
53
- model = GPT2LMHeadModel.from_pretrained(model_path)
54
-
55
- prompt = "Artificial intelligence in the Arabic language"
56
- inputs = tokenizer(prompt, return_tensors="pt")
57
- outputs = model.generate(
58
- **inputs,
59
- max_length=100,
60
- do_sample=True,
61
- top_p=0.95,
62
- num_beams=5,
63
- repetition_penalty=3.0,
64
- no_repeat_ngram_size=3
65
- )
66
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
67
- ```
68
-
69
- > For full details see: `USAGE.md`, `ARCHITECTURE.md`, `TOKENIZER.md`
70
-
71
- ## Intended Uses
72
-
73
- - Arabic text generation (stories, articles, sentence completion).
74
- - Research and experimentation on Arabic language modeling.
75
- - Fine-tuning for tasks such as dialogue, summarization, and generative classification.
76
-
77
- ## Limitations and Cautions
78
-
79
- 1. **Hallucination:** May generate incorrect information β€” verify facts independently.
80
- 2. **Limited context:** Only 1024 tokens (~700–900 Arabic words approx.).
81
- 3. **Small size:** Only 12 layers β€” less capable than modern large models.
82
- 4. **Bias:** Reflects biases in the Arabic training data.
83
- 5. **Start/end tokens:** `bos_token_id = eos_token_id = 0` (`<|endoftext|>`) β€” take care during fine-tuning.
84
-
85
- ## License and Source
86
-
87
- - Architecture: GPT-2 (OpenAI).
88
- - Check the original training-data license before commercial use.
89
 
90
  ---
91
- *Automatically documented from the model files on 2026-09-03.*
 
 
1
+ ---
2
+ library_name: peft
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - peft
6
+ - lora
7
+ - adapter
8
+ - arabic
9
+ - text-generation
10
+ ---
11
+
12
+ # MasryGPT Flash β€” LoRA Adapter
13
+
14
+ ## Status
15
+
16
+ This repository contains a **LoRA/PEFT adapter only**, not a standalone language model.
17
+
18
+ The repository currently includes:
19
+
20
+ - `adapter_config.json`
21
+ - `adapter_model.safetensors`
22
+ - Tokenizer support files
23
+ - Chat template
24
+
25
+ It does **not** include:
26
+
27
+ - A base-model `config.json`
28
+ - Base-model weights
29
+ - A complete standalone `model.safetensors`
30
+ - A verified base-model repository ID
31
+
32
+ ## Important issue to fix before loading
33
+
34
+ The current `base_model_name_or_path` points to `ISLAM-PO/masrygpt-flash`, which is this adapter repository itself. That value must be replaced with the exact Hugging Face repository ID of the base model used during training.
35
+
36
+ Do not report this repository as a standalone model until the base checkpoint and adapter compatibility are verified.
37
+
38
+ ## Required setup
39
+
40
+ 1. Identify the exact base model and upload it or identify its existing Hub ID.
41
+ 2. Set `base_model_name_or_path` in `adapter_config.json` to that exact ID.
42
+ 3. Load the base model with `transformers`.
43
+ 4. Load this adapter with `peft.PeftModel`.
44
+
45
+ ## Intended use
46
+
47
+ Arabic text-generation experiments after the base model and adapter have been verified.
48
+
49
+ ## License
50
+
51
+ The license must follow the licenses of both the base model and the training data. Verify them before redistribution or commercial use.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  ---
54
+
55
+ *This card was corrected to match the files currently present in the repository.*