Instructions to use arham-15/llama2_7B_qphysics with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arham-15/llama2_7B_qphysics with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arham-15/llama2_7B_qphysics", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use arham-15/llama2_7B_qphysics with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for arham-15/llama2_7B_qphysics to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for arham-15/llama2_7B_qphysics to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for arham-15/llama2_7B_qphysics to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="arham-15/llama2_7B_qphysics", max_seq_length=2048, )
Llama 2 7B Physics
A large language model specialized for quantum physics related queries. It has been fine tuned from llama 2 7B which is a chat model. The model was fine-tuned using the unsloth library in python.
Usage
You can import and use the model using unsloth:
from unsloth import FastLanguageModel
max_seq_length = 2048
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "arham-15/llama2_7B_qphysics",
max_seq_length = max_seq_length,
dtype = None,
load_in_4bit = True,
)
Or you can use the hugging face transformers library if you wish to, totally up to you.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "arham-15/llama2_7B_qphysics"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
Results
The model has been evaluated with its base model by perplexity score. The model has shown significant improvement on quantum physics related queries. Out of 200 test questions, the model outperformed the base model on 126 with a lower perplexity score.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for arham-15/llama2_7B_qphysics
Base model
meta-llama/Llama-2-7b-chat-hf