Link model to paper and update GitHub repository URL

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +15 -12
README.md CHANGED
@@ -1,21 +1,23 @@
1
  ---
2
- license: llama3.1
3
  base_model: dlutIR/RexDrug-base
4
  library_name: peft
 
5
  pipeline_tag: text-generation
6
  tags:
7
- - drug-combination
8
- - relation-extraction
9
- - biomedical
10
- - llama
11
- - chain-of-thought
12
- - lora
13
- - grpo
14
  ---
15
 
16
  # RexDrug-adapter
17
 
18
- This is the LoRA adapter for **RexDrug**, trained via GRPO (Group Relative Policy Optimization) on top of [RexDrug-base](https://huggingface.co/dlutIR/RexDrug-base) for biomedical drug combination relation extraction with chain-of-thought reasoning.
 
 
19
 
20
  ## Model Details
21
 
@@ -45,7 +47,8 @@ model.eval()
45
  # 2. Prepare input
46
  messages = [
47
  {"role": "system", "content": "You are an expert in biomedical drug-drug relation extraction. ..."},
48
- {"role": "user", "content": "Target sentence: ... \nContext paragraph: ..."},
 
49
  ]
50
  input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
51
  inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
@@ -57,8 +60,8 @@ response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_spe
57
  print(response)
58
  ```
59
 
60
- See the full example in the [GitHub repository](https://github.com/your-org/RexDrug).
61
 
62
  ## License
63
 
64
- This model is built upon Llama 3.1 and is subject to the [Llama 3.1 Community License Agreement](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE).
 
1
  ---
 
2
  base_model: dlutIR/RexDrug-base
3
  library_name: peft
4
+ license: llama3.1
5
  pipeline_tag: text-generation
6
  tags:
7
+ - drug-combination
8
+ - relation-extraction
9
+ - biomedical
10
+ - llama
11
+ - chain-of-thought
12
+ - lora
13
+ - grpo
14
  ---
15
 
16
  # RexDrug-adapter
17
 
18
+ This is the LoRA adapter for **RexDrug**, presented in the paper [RexDrug: Reliable Multi-Drug Combination Extraction through Reasoning-Enhanced LLMs](https://huggingface.co/papers/2603.08166).
19
+
20
+ It was trained via GRPO (Group Relative Policy Optimization) on top of [RexDrug-base](https://huggingface.co/dlutIR/RexDrug-base) for biomedical drug combination relation extraction with chain-of-thought reasoning.
21
 
22
  ## Model Details
23
 
 
47
  # 2. Prepare input
48
  messages = [
49
  {"role": "system", "content": "You are an expert in biomedical drug-drug relation extraction. ..."},
50
+ {"role": "user", "content": "Target sentence: ...
51
+ Context paragraph: ..."},
52
  ]
53
  input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
54
  inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
 
60
  print(response)
61
  ```
62
 
63
+ See the full example and code in the [GitHub repository](https://github.com/DUTIR-BioNLP/RexDrug).
64
 
65
  ## License
66
 
67
+ This model is built upon Llama 3.1 and is subject to the [Llama 3.1 Community License Agreement](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE).