aleynahukmet commited on
Commit
ba982e0
·
verified ·
1 Parent(s): 54c562b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -8
README.md CHANGED
@@ -15,22 +15,26 @@ Women's health is a critical and often underserved topic, with limited accessibl
15
 
16
  ## Usage
17
 
18
- ```
 
 
 
 
 
 
 
19
  model, tokenizer = FastLanguageModel.from_pretrained(
20
- model_name=model_path,
21
  max_seq_length=max_seq_length,
22
  dtype=dtype,
23
  load_in_4bit=load_in_4bit,
24
  )
25
- FastLanguageModel.for_inference(model)
26
 
27
  text_streamer = TextStreamer(tokenizer, skip_prompt = True)
28
 
29
- tokenizer = AutoTokenizer.from_pretrained('unsloth/gemma-2-2b-it')
30
-
31
 
32
  messages = [
33
- #{"role": "system", "content": system_prompt},
34
  {"role": "user", "content": user_prompt},
35
  ]
36
 
@@ -44,7 +48,6 @@ input_ids = tokenizer.apply_chat_template(
44
 
45
  terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<end_of_turn>")]
46
 
47
- #input_ids = tokenizer(wiki, return_tensors="pt").input_ids.cuda()
48
  outputs = model.generate(input_ids = input_ids,
49
  streamer = text_streamer if use_streamer else None,
50
  max_new_tokens = 1024,
@@ -59,7 +62,6 @@ if not use_streamer:
59
  ```
60
 
61
 
62
-
63
  ## Dataset
64
 
65
  The dataset was prepared through a comprehensive process to ensure quality and relevance. Health-related websites were scraped, open-source e-books and PDFs focusing on women's health were collected, and an instruction dataset was created from these sources. To generate high-quality questions, we utilized the gemini-flash model, ensuring the dataset’s alignment with the domain.
 
15
 
16
  ## Usage
17
 
18
+ ```python
19
+
20
+ max_seq_length = 2048
21
+ dtype = None
22
+ load_in_4bit = False
23
+ lora_path = "altaidevorg/gemma-women-health-checkpoint-1292"
24
+ use_streamer = False
25
+
26
  model, tokenizer = FastLanguageModel.from_pretrained(
27
+ lora_path,
28
  max_seq_length=max_seq_length,
29
  dtype=dtype,
30
  load_in_4bit=load_in_4bit,
31
  )
32
+ FastLanguageModel.for_inference(model)
33
 
34
  text_streamer = TextStreamer(tokenizer, skip_prompt = True)
35
 
 
 
36
 
37
  messages = [
 
38
  {"role": "user", "content": user_prompt},
39
  ]
40
 
 
48
 
49
  terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<end_of_turn>")]
50
 
 
51
  outputs = model.generate(input_ids = input_ids,
52
  streamer = text_streamer if use_streamer else None,
53
  max_new_tokens = 1024,
 
62
  ```
63
 
64
 
 
65
  ## Dataset
66
 
67
  The dataset was prepared through a comprehensive process to ensure quality and relevance. Health-related websites were scraped, open-source e-books and PDFs focusing on women's health were collected, and an instruction dataset was created from these sources. To generate high-quality questions, we utilized the gemini-flash model, ensuring the dataset’s alignment with the domain.