anmolthukral commited on
Commit
1a1bad0
·
verified ·
1 Parent(s): a5e6bc0

Add comprehensive model card with usage examples

Browse files
Files changed (1) hide show
  1. README.md +114 -12
README.md CHANGED
@@ -1,14 +1,116 @@
1
  ---
2
- datasets:
3
- - open-vdb/glove-100-angular
4
- - rsh-raj/angular-cli-commits
5
- - rsh-raj/angular-commits
6
- - open-vdb/nytimes-16-angular
7
- - open-vdb/nytimes-256-angular
8
- - lone17/angular-steering-artifacts
9
- base_model:
10
- - Qwen/Qwen3.8-27B
11
- - Qwen/Qwen2.5-Omni-7B
12
  language:
13
- - en
14
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3.8-27B
4
+ tags:
5
+ - qwen
6
+ - finetune
7
+ - engineering
8
+ - code-generation
 
 
 
9
  language:
10
+ - en
11
+ ---
12
+
13
+ # engineering_model
14
+
15
+ Fine-tuned **Qwen3.8-27B** for engineering tasks: code generation, debugging, architecture design, and technical Q&A.
16
+
17
+ ## Base model
18
+ [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)
19
+
20
+ ## Datasets used
21
+ - `open-vdb/glove-100-angular`
22
+ - `open-vdb/nytimes-16-angular`
23
+ - `open-vdb/nytimes-256-angular`
24
+ - `rsh-raj/angular-cli-commits`
25
+ - `rsh-raj/angular-commits`
26
+ - `lone17/angular-steering-artifacts`
27
+
28
+ ## Usage
29
+
30
+ ### With transformers (full model)
31
+ ```python
32
+ from transformers import AutoModelForCausalLM, AutoTokenizer
33
+ import torch
34
+
35
+ model_id = "anmolthukral/engineering_model"
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
38
+ model = AutoModelForCausalLM.from_pretrained(
39
+ model_id,
40
+ torch_dtype=torch.bfloat16,
41
+ device_map="auto",
42
+ trust_remote_code=True
43
+ )
44
+
45
+ prompt = "### User:\nWrite a Python function to detect cycles in a directed graph.\n### Assistant:\n"
46
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
47
+
48
+ with torch.no_grad():
49
+ outputs = model.generate(
50
+ **inputs,
51
+ max_new_tokens=512,
52
+ temperature=0.7,
53
+ top_p=0.9,
54
+ do_sample=True,
55
+ repetition_penalty=1.1
56
+ )
57
+
58
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
59
+ ```
60
+
61
+ ### With 4-bit quantization (recommended for 27B)
62
+ ```python
63
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
64
+ import torch
65
+
66
+ bnb_config = BitsAndBytesConfig(
67
+ load_in_4bit=True,
68
+ bnb_4bit_quant_type="nf4",
69
+ bnb_4bit_compute_dtype=torch.bfloat16,
70
+ bnb_4bit_use_double_quant=True
71
+ )
72
+
73
+ model = AutoModelForCausalLM.from_pretrained(
74
+ "anmolthukral/engineering_model",
75
+ quantization_config=bnb_config,
76
+ device_map="auto",
77
+ trust_remote_code=True
78
+ )
79
+ ```
80
+
81
+ ### Chat template (Qwen format)
82
+ ```python
83
+ messages = [
84
+ {"role": "user", "content": "Explain the difference between mutex and semaphore"},
85
+ {"role": "assistant", "content": "..."},
86
+ {"role": "user", "content": "Show me a C++ example"}
87
+ ]
88
+
89
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
90
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
91
+ # ... generate
92
+ ```
93
+
94
+ ## Hardware requirements
95
+
96
+ | Precision | VRAM (single GPU) | Notes |
97
+ |-----------|-------------------|-------|
98
+ | bfloat16 | ~54 GB | 2×A100 80GB or 4×A10G |
99
+ | 4-bit (NF4) | ~16 GB | 1×A10G / A100 40GB |
100
+ | 8-bit | ~28 GB | 1×A100 40GB |
101
+
102
+ ## Limitations
103
+ - Trained on Angular/engineering data — may be biased toward frontend/web patterns
104
+ - 27B parameters requires significant compute for inference
105
+ - Not evaluated on safety benchmarks — use with caution in production
106
+
107
+ ## Citation
108
+ ```bibtex
109
+ @misc{engineering_model,
110
+ author = {Anmol Thukral},
111
+ title = {engineering_model: Qwen3.8-27B fine-tuned for engineering tasks},
112
+ year = {2025},
113
+ publisher = {Hugging Face},
114
+ howpublished = {\url{https://huggingface.co/anmolthukral/engineering_model}}
115
+ }
116
+ ```