Downloads · 30 days
14
21% of all-time downloads
Andyrasika/math_english_to_latex
math_english_to_latex is a text generation model from Andyrasika. Use it when you need the model to write or continue text. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
14
21% of all-time downloads
All-time downloads
67
Public
Repo size
8 GB
Likes
3
Public
Click a slice to open those files.
.pt5 GB · 62%
From the Hugging Face model README
This model was trained from scratch on the None dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.3664 | 1.0 | 10 | 1.6544 |
| 1.1415 | 2.0 | 20 | 0.9639 |
| 0.8763 | 3.0 | 30 | 0.9328 |
| 0.7064 | 4.0 | 40 | 0.8390 |
| 0.6468 | 5.0 | 50 | 0.8028 |
CONVERSION_PROMPT = 'LCT\n' # LaTeX conversion task
CONVERSION_TOKEN = 'LaTeX:'
loaded_model = GPT2LMHeadModel.from_pretrained('Andyrasika/math_english_to_latex')
latex_generator = pipeline('text-generation', model=loaded_model, tokenizer=tokenizer)
text_sample = 'r of x is sum from 0 to x of x squared'
conversion_text_sample = f'{CONVERSION_PROMPT}English: {text_sample}\n{CONVERSION_TOKEN}'
print(latex_generator(
conversion_text_sample, num_beams=5, early_stopping=True, temperature=0.7,
max_length=len(tokenizer.encode(conversion_text_sample)) + 20
)[0]['generated_text'])