CoolFace
Modelpublic

benhaotang/mistral-small-physics-finetuned-adapter

sourceHugging Faceupdated 2y agoView on Hugging Face
1likes7downloads
Model Card

Mistral Physics Fine-tuned Model

This model is a Lora adapter to mistralai/Mistral-Small-Instruct-2409 finetuned on kejian/arxiv-physics-debug-v0. Mostly for concept proofing, don't trust it for real physics (I mean, even Claude 3.5 can be wrong on graduate physics plenty of times, let alone a 22B model, but this should perform a lot better than benhaotang/llama3.2-1B-physics-finetuned)!

Model description

Usage

python
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
import torch
model = AutoPeftModelForCausalLM.from_pretrained("benhaotang/mistral-small-physics-finetuned-adapter",device_map="auto",torch_dtype=torch.float16)
tokenizer = AutoTokenizer.from_pretrained("benhaotang/mistral-small-physics-finetuned-bnb-4bit")

# Example usage
text = "Give me a short intodcution to renormalization group(RG) flow in physcis?\n"
inputs = tokenizer(text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_length=2048)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Example output:

The Renormalization Group (RG) flow is a fundamental concept in physics, particularly in the study of phase transitions and critical phenomena. It describes how the behavior of a system changes with scale, such as the size of the system or the length scale of fluctuations. Here's a brief introduction: 1. Scale Dependence: Many physical systems exhibit properties that depend on the scale at which they are observed. For example, a fluid might appear smooth on a large scale but exhibit turbulent behavior on a small scale. 2. RG Transformation: The RG flow involves a transformation that systematically integrates out short-distance fluctuations to obtain an effective theory that describes the system at longer distances. This is often done by progressively eliminating high-momentum modes in the system. 3. Fixed Points and Universality: The RG flow can lead to fixed points, which are scale-invariant solutions. Systems that flow to the same fixed point under RG transformation exhibit universal behavior, meaning their large-scale properties are the same regardless of the details of the system at small scales. 4. Relevant and Irrelevant Operators: In the vicinity of a fixed point, operators can be classified as relevant (grow under RG flow), irrelevant (shrink), or marginal (remain constant). Relevant operators drive the system away from the fixed point, while irrelevant ones become negligible at large scales. 5. Applications: RG flow is crucial in understanding critical phenomena, such as phase transitions in statistical mechanics, and has applications in condensed matter physics, quantum field theory, and even in areas like biology and computer science. In essence, RG flow helps us understand how the microscopic details of a system influence its macroscopic behavior, and how universal properties emerge from complex systems.

Training

StepTraining LossValidation Loss
502.4074001.798349
1001.4520001.765856
1501.1613001.716366
2001.2237001.704631
2501.1359001.683653
3001.3719001.677721
3501.2085001.657915
4001.3034001.657678
4501.2337001.642972
5001.0819001.653393
5501.1177001.645338
6001.1095001.651868
6501.1901001.689853
7001.0000001.663633
7501.0201001.647308
8001.0334001.675173
8501.0823001.652737
9001.0740001.665859
9500.9753001.661394
10000.9550001.672116
10501.0170001.656730
11000.9415001.652197
11501.0031001.657381
12000.8911001.662021
12500.9310001.662401
13000.9328001.662421
13501.0420001.665535