LogicNet-Subnet/Aristole
Viewer • Updated • 303k • 55 • 4
How to use LogicNet-Subnet/LogicNet-7B with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("LogicNet-Subnet/LogicNet-7B", device_map="auto")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))