You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://yuval6957.github.io/reinautils/
https://yuval6957.github.io/./torchutils.html
HTTP Error 404: Not Found
https://yuval6957.github.io/./index.html
HTTP Error 404: Not Found
https://yuval6957.github.io/./parameters.html
HTTP Error 404: Not Found
Creating a file with all the text files in the directory
# Set the text column to be the raw text with the newlines removedimportpickletexts=text2data("/home/hd/GptQA/text",'txt',recursive=True)
print (texts[:5])
withopen("/home/hd/GptQA/text_accum.pkl","wb") asf:
pickle.dump(texts,f)
Asking a quation and getting the most relevant context
question='What are the language model I can use?'# question = 'How do I get access to GPT4'answers=top_scores(question, embedded,model,tokenizer)
print(answers)
Asking a question ang getting an answer (using relevant models from Huggingface)
Load the models
# Loading the models for context creationcontext_tokenizer=AutoTokenizer.from_pretrained('sentence-transformers/all-mpnet-base-v2')
context_model=AutoModel.from_pretrained('sentence-transformers/all-mpnet-base-v2').to('cuda')
# Loading the models for QAtokenizer=AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-7B-v0.1")
model=AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-7B-v0.1", torch_dtype=torch.float16).to('cuda')