aduncan94 commited on
Commit
0d880d2
·
verified ·
1 Parent(s): b1c7433

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -3
README.md CHANGED
@@ -30,12 +30,36 @@ EnhancAR-sorted is a generative enhancer model that can be used for:
30
  ## Getting Started with EnhancAR-Sorted
31
 
32
  **Requirements**:
33
- * PyTorch:
34
- * CUDA:
 
 
 
 
35
 
36
  **Example generation**:
 
 
 
 
 
 
37
  ```py
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
 
39
  ```
40
 
41
  ## Technical Specifications
@@ -46,4 +70,3 @@ EnhancAR-sorted is a generative enhancer model that can be used for:
46
  ## Citation
47
 
48
  If you use the code, models, or results, please cite our [preprint]()
49
- *
 
30
  ## Getting Started with EnhancAR-Sorted
31
 
32
  **Requirements**:
33
+ * PyTorch: 2.7.1
34
+ * CUDA: 12.8 and above
35
+
36
+ ```py
37
+ pip install transformers==4.48.2 huggingface_hub
38
+ ```
39
 
40
  **Example generation**:
41
+
42
+ The following shows an example for generating an unconditional sequence. To generate a sequence conditionally, replace the input_sequence with a string of the form:
43
+ {homolog A/homolog B/.../homolog N}.
44
+
45
+ For a full example, please see the [Google Colab]()
46
+
47
  ```py
48
+ import torch
49
+ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig
50
+
51
+ config = AutoConfig.from_pretrained("aduncan94/EnhancAR-Sorted", trust_remote_code=True)
52
+ config.use_mamba_kernels = False
53
+ model = AutoModelForCausalLM.from_pretrained("aduncan94/EnhancAR-Sorted", trust_remote_code=True, config=config).to("cuda")
54
+ tokenizer = AutoTokenizer.from_pretrained("aduncan94/EnhancAR-Sorted", trust_remote_code=True)
55
+
56
+ input_sequence = "{"
57
+ inputs = tokenizer(input_sequence, return_tensors="pt", return_token_type_ids=False, add_special_tokens=False)
58
+
59
+ outputs = generate_sequence(inputs, model, tokenizer)
60
+ output = tokenizer.batch_decode(outputs, skip_special_tokens=False)[0]
61
 
62
+ print(output)
63
  ```
64
 
65
  ## Technical Specifications
 
70
  ## Citation
71
 
72
  If you use the code, models, or results, please cite our [preprint]()