Views
No views yet
1from astra.tokenizer import initial_gpt_tokenizer_with_vocabulary
2from astra.model import GPTForCausalLM
3
4# Load the tokenizer and model
5vocab_file = "./vocab.txt"
6tokenizer = initial_gpt_tokenizer_with_vocabulary(path=vocab_file)
7
8pretrained_path = "<path/to/pretrained/model>" # Replace with your actual paths
9model = GPTForCausalLM.from_pretrained(pretrained_gpt_path)