rudranshn commited on
Commit
a622d2c
·
verified ·
1 Parent(s): 564b70e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +109 -97
README.md CHANGED
@@ -1,97 +1,109 @@
1
-
2
- <h1 align="center">Circuit</h1>
3
- <p align="center">Fine-tuned Phi-3 for Logical Reasoning</p>
4
-
5
- <p align="center">
6
- <img src="https://i.postimg.cc/Nfnst2F9/Circuit.png" alt="Circuit Logo" style="max-width:100%; height:auto;">
7
- </p>
8
-
9
-
10
- # Model performance
11
-
12
- ## Benchmark
13
-
14
-
15
- <p align="center">
16
- <img src="https://i.postimg.cc/85pjRhwf/daata.png" alt="App Screenshot" style="max-width:100%; height:auto;">
17
- </p>
18
-
19
- Trained on the [lucasmccabe/logiqa](https://huggingface.co/datasets/lucasmccabe/logiqa) dataset, Circuit enhances the model’s ability to reason through complex problems, answer multi-step logic questions, and provide consistent explanations.
20
-
21
-
22
- # Model Details
23
-
24
- | Property | Value |
25
- |-----------|--------|
26
- | **Base model** | `microsoft/Phi-3-mini-4k-instruct` |
27
- | **Fine-tuned for** | Logical Reasoning |
28
- | **Dataset** | [`lucasmccabe/logiqa`](https://huggingface.co/datasets/lucasmccabe/logiqa) |
29
- | **Technique** | LoRA fine-tuning, merged for direct use |
30
- | **Formats available** | Full (HF Transformers) + Quantized (`.gguf` for llama.cpp / Ollama) |
31
- | **Project** | **Circuit** |
32
- | **Fine-tuned by** | Rudransh |
33
-
34
-
35
-
36
-
37
-
38
- # Model Variants
39
-
40
- | Variant | Description | File |
41
- |----------|--------------|------|
42
- | **Full model** | Merged LoRA with base, compatible with `transformers` | `pytorch_model.bin` |
43
- | **Quantized model (GGUF)** | Optimized for CPU/GPU inference via `llama.cpp`, `text-generation-webui`, or `Ollama` | `circuit_phi3_q4.gguf` |
44
-
45
- # Example Usage (Transformers)
46
-
47
- ```python
48
- from transformers import AutoModelForCausalLM, AutoTokenizer
49
- import torch
50
-
51
- model = AutoModelForCausalLM.from_pretrained(
52
- "rudranshjoshi/circuit",
53
- torch_dtype=torch.float16,
54
- trust_remote_code=True
55
- )
56
- tokenizer = AutoTokenizer.from_pretrained(
57
- "rudranshjoshi/circuit",
58
- trust_remote_code=True
59
- )
60
-
61
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
62
- model.to(device)
63
-
64
- prompt = "Your prompt here"
65
- inputs = tokenizer(prompt, return_tensors="pt").to(device)
66
- outputs = model.generate(**inputs, max_new_tokens=150)
67
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
68
-
69
- ```
70
-
71
-
72
- # Training Summary
73
-
74
- Base model: Phi-3 Mini 4K Instruct
75
-
76
- Dataset: LogiQA (lucasmccabe/logiqa)
77
-
78
- Training method: LoRA fine-tuning, later merged
79
-
80
- Hardware: NVIDIA RTX 1080
81
-
82
- Epochs: ~3
83
-
84
- Objective: Improve reasoning consistency and structured explanations
85
-
86
-
87
-
88
- # Acknowledgements
89
-
90
- Microsoft
91
- for Phi-3
92
-
93
- Lucas McCabe
94
- for LogiQA dataset
95
-
96
- Fine-tuned and quantized by Rudransh under Project Circuit
97
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - lucasmccabe/logiqa
5
+ language:
6
+ - en
7
+ base_model:
8
+ - microsoft/Phi-3-mini-4k-instruct
9
+ tags:
10
+ - code
11
+ - logic
12
+ - efficiency
13
+ ---
14
+
15
+ <h1 align="center">Circuit</h1>
16
+ <p align="center">Fine-tuned Phi-3 for Logical Reasoning</p>
17
+
18
+ <p align="center">
19
+ <img src="https://i.postimg.cc/Nfnst2F9/Circuit.png" alt="Circuit Logo" style="max-width:100%; height:auto;">
20
+ </p>
21
+
22
+
23
+ # Model performance
24
+
25
+ ## Benchmark
26
+
27
+
28
+ <p align="center">
29
+ <img src="https://i.postimg.cc/85pjRhwf/daata.png" alt="App Screenshot" style="max-width:100%; height:auto;">
30
+ </p>
31
+
32
+ Trained on the [lucasmccabe/logiqa](https://huggingface.co/datasets/lucasmccabe/logiqa) dataset, Circuit enhances the model’s ability to reason through complex problems, answer multi-step logic questions, and provide consistent explanations.
33
+
34
+
35
+ # Model Details
36
+
37
+ | Property | Value |
38
+ |-----------|--------|
39
+ | **Base model** | `microsoft/Phi-3-mini-4k-instruct` |
40
+ | **Fine-tuned for** | Logical Reasoning |
41
+ | **Dataset** | [`lucasmccabe/logiqa`](https://huggingface.co/datasets/lucasmccabe/logiqa) |
42
+ | **Technique** | LoRA fine-tuning, merged for direct use |
43
+ | **Formats available** | Full (HF Transformers) + Quantized (`.gguf` for llama.cpp / Ollama) |
44
+ | **Project** | **Circuit** |
45
+ | **Fine-tuned by** | Rudransh |
46
+
47
+
48
+
49
+
50
+
51
+ # Model Variants
52
+
53
+ | Variant | Description | File |
54
+ |----------|--------------|------|
55
+ | **Full model** | Merged LoRA with base, compatible with `transformers` | `pytorch_model.bin` |
56
+ | **Quantized model (GGUF)** | Optimized for CPU/GPU inference via `llama.cpp`, `text-generation-webui`, or `Ollama` | `circuit_phi3_q4.gguf` |
57
+
58
+ # Example Usage (Transformers)
59
+
60
+ ```python
61
+ from transformers import AutoModelForCausalLM, AutoTokenizer
62
+ import torch
63
+
64
+ model = AutoModelForCausalLM.from_pretrained(
65
+ "rudranshjoshi/circuit",
66
+ torch_dtype=torch.float16,
67
+ trust_remote_code=True
68
+ )
69
+ tokenizer = AutoTokenizer.from_pretrained(
70
+ "rudranshjoshi/circuit",
71
+ trust_remote_code=True
72
+ )
73
+
74
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
75
+ model.to(device)
76
+
77
+ prompt = "Your prompt here"
78
+ inputs = tokenizer(prompt, return_tensors="pt").to(device)
79
+ outputs = model.generate(**inputs, max_new_tokens=150)
80
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
81
+
82
+ ```
83
+
84
+
85
+ # Training Summary
86
+
87
+ Base model: Phi-3 Mini 4K Instruct
88
+
89
+ Dataset: LogiQA (lucasmccabe/logiqa)
90
+
91
+ Training method: LoRA fine-tuning, later merged
92
+
93
+ Hardware: NVIDIA RTX 1080
94
+
95
+ Epochs: ~3
96
+
97
+ Objective: Improve reasoning consistency and structured explanations
98
+
99
+
100
+
101
+ # Acknowledgements
102
+
103
+ Microsoft
104
+ for Phi-3
105
+
106
+ Lucas McCabe
107
+ for LogiQA dataset
108
+
109
+ Fine-tuned and quantized by Rudransh under Project Circuit