LogicNet-Subnet/Aristole
Viewer • Updated • 303k • 13 • 2
How to use LogicNet-Subnet/LogicNet-7B with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("LogicNet-Subnet/LogicNet-7B", dtype="auto")How to use LogicNet-Subnet/LogicNet-7B with Unsloth Studio:
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 LogicNet-Subnet/LogicNet-7B to start chatting
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 LogicNet-Subnet/LogicNet-7B to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LogicNet-Subnet/LogicNet-7B to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="LogicNet-Subnet/LogicNet-7B",
max_seq_length=2048,
)This model is a fine-tuned version of Qwen/Qwen2-7B-Instruct on the LogicNet-Subnet/Aristole dataset. It achieves the following benchmarks on the evaluation set:
This fine-tuned Qwen2 model was trained 2x faster using Unsloth and Hugging Face's TRL library.
torch.bfloat16 True204816 16 0 "none" "unsloth" 3407 False None2 4 5 70 2e-4 not is_bfloat16_supported() is_bfloat16_supported() 1 "adamw_8bit" 0.01 "linear" 3407 "outputs"| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.4764 | 1.0 | 1150 | 1.1850 |
| 1.3102 | 2.0 | 2050 | 1.1091 |
| 1.1571 | 3.0 | 3100 | 1.0813 |
| 1.0922 | 4.0 | 3970 | 0.9906 |
| 0.9809 | 5.0 | 5010 | 0.9021 |
You can easily use the model for inference as shown below:
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load the model
tokenizer = AutoTokenizer.from_pretrained("LogicNet-Subnet/LogicNet-7B")
model = AutoModelForCausalLM.from_pretrained("LogicNet-Subnet/LogicNet-7B")
# Prepare the input
inputs = tokenizer(
[
"what is odd which is bigger than zero?" # Example prompt
],
return_tensors="pt"
).to("cuda")
# Generate an output
outputs = model.generate(**inputs)
# Decode and print the result
print(tokenizer.decode(outputs[0], skip_special_tokens=True))