hieulum commited on
Commit
754e6fa
·
verified ·
1 Parent(s): 752ad26

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -3
README.md CHANGED
@@ -6,9 +6,47 @@ tags:
6
 
7
  # Model Card for Model ID
8
 
9
- <!-- Provide a quick summary of what the model is/does. -->
10
-
11
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  ## Model Details
14
 
 
6
 
7
  # Model Card for Model ID
8
 
9
+ Base Model: unsloth/DeepSeek-R1-Distill-Llama-8B
10
+ Fine-Tuning Dataset: hieulum/bacsiAI (first 200 rows)
11
+ LoRA Parameters: r=16, lora_alpha=16, target modules, etc.
12
+ Training Details: 1 epoch, 60 steps, batch size 8, learning rate 2e-4
13
+ Usage Instructions:
14
+ from unsloth import FastLanguageModel
15
+ model, tokenizer = FastLanguageModel.from_pretrained(
16
+ model_name="unsloth/DeepSeek-R1-Distill-Llama-8B",
17
+ max_seq_length=1024,
18
+ load_in_4bit=True,
19
+ )
20
+ model = FastLanguageModel.load_peft_model(model, "your_username/DeepSeek-R1-LoRA-medical")
21
+
22
+ Programmatically Create a Model Card: Use the huggingface_hub library to generate a basic model card:
23
+ from huggingface_hub import ModelCard, ModelCardData
24
+
25
+ card_data = ModelCardData(
26
+ language="en",
27
+ license="apache-2.0",
28
+ tags=["medical", "LoRA", "unsloth", "DeepSeek-R1"],
29
+ datasets=["hieulum/bacsiAI"],
30
+ )
31
+ card = ModelCard.from_template(
32
+ card_data,
33
+ model_name="DeepSeek-R1-LoRA-medical",
34
+ model_description="LoRA adapters for medical Q&A, fine-tuned on hieulum/bacsiAI dataset using unsloth.",
35
+ base_model="unsloth/DeepSeek-R1-Distill-Llama-8B",
36
+ training_details="Fine-tuned with r=16, lora_alpha=16, 1 epoch, 60 steps, batch size 8, learning rate 2e-4.",
37
+ usage="Load with unsloth: `FastLanguageModel.load_peft_model(model, 'your_username/DeepSeek-R1-LoRA-medical')`",
38
+ )
39
+
40
+ # Save the model card locally
41
+ card.save("model_card.md")
42
+
43
+ # Upload the model card
44
+ from huggingface_hub import upload_file
45
+ upload_file(
46
+ path_or_fileobj="model_card.md",
47
+ path_in_repo="README.md",
48
+ repo_id=repo_id,
49
+ )
50
 
51
  ## Model Details
52