Skip to content

Commit

Permalink
train
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed May 24, 2023
1 parent 8316535 commit adc1de2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@ for epoch in range(epochs):
optimizer.step()
```

## Training:
To run training use git clone method and navigate to experiments folder and if not then do the following:

```python
from Sophia import DecoupledSophia, trainer


#train model
trainer.train()


#eval the model
eval_results = trainer.evaluate()
print(f"Perplexity: {torch.exp(torch.tensor(eval_results['eval_loss']))}")

```


# Algorithmic pseudocode:

```
Expand Down
2 changes: 1 addition & 1 deletion Sophia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from Sophia.Sophia import Sophia
from decoupled_sophia.decoupled_sophia import DecoupledSophia
from experiments.training import
from experiments.training import trainer

0 comments on commit adc1de2

Please sign in to comment.