sweatSmile commited on
Commit
4d7510e
·
verified ·
1 Parent(s): 3311e7c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -1
README.md CHANGED
@@ -7,4 +7,36 @@ language:
7
  base_model:
8
  - facebook/opt-350m
9
  new_version: sweatSmile/marx-opt350m-finetuned-v1
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  base_model:
8
  - facebook/opt-350m
9
  new_version: sweatSmile/marx-opt350m-finetuned-v1
10
+ ---
11
+
12
+ ## 🧠 Model: marx-opt350m-finetuned-v1
13
+
14
+ This is a fine-tuned version of [`facebook/opt-350m`](https://huggingface.co/facebook/opt-350m) on the [`sweatSmile/marx-dataset`](https://huggingface.co/datasets/sweatSmile/marx-dataset) — a conversational dataset consisting of question-answer dialogues about Marxist theory, history, and related political contexts.
15
+
16
+ The model is optimized for **dialogue-style QA** on political/philosophical topics.
17
+
18
+ ---
19
+
20
+ ## 📊 Training Details
21
+
22
+ - **Base model**: facebook/opt-350m
23
+ - **Dataset**: sweatSmile/marx-dataset
24
+ - **Epochs**: 5
25
+ - **Trainer**: TRL's `SFTTrainer` from `trl`
26
+ - **Loss**: Reduced steadily to ~0.36
27
+ - **ROUGE-L**: ~0.53 on evaluation set
28
+
29
+ ---
30
+
31
+ ## 🔍 Example Usage
32
+
33
+ ```python
34
+ from transformers import AutoModelForCausalLM, AutoTokenizer
35
+
36
+ model = AutoModelForCausalLM.from_pretrained("sweatSmile/marx-opt350m-finetuned-v1")
37
+ tokenizer = AutoTokenizer.from_pretrained("sweatSmile/marx-opt350m-finetuned-v1")
38
+
39
+ prompt = "### Human: Who were commissioned to prepare the party programme for the Communist League?\n### Assistant:"
40
+ inputs = tokenizer(prompt, return_tensors="pt")
41
+ outputs = model.generate(**inputs, max_length=100)
42
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))