Views
No views yet
| Fine-Tuned Model Name | Base Model | Fine-Tuning Dataset |
|---|---|---|
Meta-Llama-3-8B-CSQA-NdLinearLoRA | meta-llama/Llama-3-8B | commonsense_qa |
Meta-Llama-3-8B-Math10K-NdLinearLoRA | meta-llama/Llama-3-8B | lmms-lab/Math10K |
Qwen3-1.7B-CSQA-NdLinearLoRA | Qwen/Qwen3-1.7B-Base | commonsense_qa |
Qwen3-1.7B-Math10K-NdLinearLoRA | Qwen/Qwen3-1.7B-Base | lmms-lab/Math10K |
trust_remote_code=True when loading them. This allows the transformers library to download and use the modeling_ndlinear.py file that should be included in each model's repository.1pip install torch transformers safetensors huggingface_hub accelerate
2pip install ndlinearREPO_ID.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# --- Example Usage ---
5
6# 1. Choose the model you want to use from the table above
7# Replace "YourUsername" with your Hugging Face username or organization.
8REPO_ID = "YourUsername/Qwen3-1.7B-Math10K-NdLinearLoRA"
9
10# 2. Load the model and tokenizer
11# `trust_remote_code=True` is required to load the custom architecture.
12print(f"Loading model: {REPO_ID}")
13model = AutoModelForCausalLM.from_pretrained(
14 REPO_ID,
15 torch_dtype="auto",
16 device_map="auto",
17 trust_remote_code=True
18)
19tokenizer = AutoTokenizer.from_pretrained(REPO_ID)
20print("Model and tokenizer loaded successfully.")
21
22
23# 3. Generate text
24# This prompt is geared for a math model. Adjust it for a QA model if needed.
25prompt = "### Instruction:\\nSolve the following math problem: If a train travels at 60 miles per hour, how long does it take to travel 180 miles?\\n\\n### Solution:\\n"
26inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
27
28with torch.no_grad():
29 outputs = model.generate(**inputs, max_new_tokens=150, eos_token_id=tokenizer.eos_token_id)
30
31print("\\n--- Generated Output ---")
32print(tokenizer.decode(outputs[0], skip_special_tokens=True))