Update README.md
Browse files
README.md
CHANGED
|
@@ -72,26 +72,26 @@ The model consists of:
|
|
| 72 |
### Step 1: Clone the repo (to get the `nova_modelling.py`)
|
| 73 |
|
| 74 |
```bash
|
| 75 |
-
git clone https://huggingface.co/harshit36/Nova-
|
| 76 |
-
cd Nova-
|
| 77 |
```
|
| 78 |
|
| 79 |
```python
|
| 80 |
import sys
|
| 81 |
-
sys.path.append("./Nova-
|
| 82 |
|
| 83 |
from transformers import PreTrainedTokenizerFast
|
| 84 |
from nova_modelling import NovaConfig, NovaForCausalLM
|
| 85 |
|
| 86 |
# Load tokenizer
|
| 87 |
-
tokenizer = PreTrainedTokenizerFast.from_pretrained("harshit36/Nova-
|
| 88 |
|
| 89 |
# Load config
|
| 90 |
-
config = NovaConfig.from_pretrained("harshit36/Nova-
|
| 91 |
|
| 92 |
# Instantiate model using your custom class
|
| 93 |
model = NovaForCausalLM(config)
|
| 94 |
-
model = model.from_pretrained("harshit36/Nova-
|
| 95 |
|
| 96 |
# Use the model
|
| 97 |
input_ids = tokenizer("Hello world", return_tensors="pt").input_ids
|
|
|
|
| 72 |
### Step 1: Clone the repo (to get the `nova_modelling.py`)
|
| 73 |
|
| 74 |
```bash
|
| 75 |
+
git clone https://huggingface.co/harshit36/Nova-Verse
|
| 76 |
+
cd Nova-Verse
|
| 77 |
```
|
| 78 |
|
| 79 |
```python
|
| 80 |
import sys
|
| 81 |
+
sys.path.append("./Nova-Verse/") # add current dir to path
|
| 82 |
|
| 83 |
from transformers import PreTrainedTokenizerFast
|
| 84 |
from nova_modelling import NovaConfig, NovaForCausalLM
|
| 85 |
|
| 86 |
# Load tokenizer
|
| 87 |
+
tokenizer = PreTrainedTokenizerFast.from_pretrained("harshit36/Nova-Verse")
|
| 88 |
|
| 89 |
# Load config
|
| 90 |
+
config = NovaConfig.from_pretrained("harshit36/Nova-Verse")
|
| 91 |
|
| 92 |
# Instantiate model using your custom class
|
| 93 |
model = NovaForCausalLM(config)
|
| 94 |
+
model = model.from_pretrained("harshit36/Nova-Verse")
|
| 95 |
|
| 96 |
# Use the model
|
| 97 |
input_ids = tokenizer("Hello world", return_tensors="pt").input_ids
|