singtan commited on
Commit
f1b6942
ยท
verified ยท
1 Parent(s): f7d01d0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +60 -35
README.md CHANGED
@@ -1,44 +1,69 @@
1
  ---
2
- license: apache-2.0
3
- library_name: transformers
4
- base_model: google/gemma-2b
5
- tags:
6
- - text-generation
7
- - standalone
8
- - merged-weights
9
- - pdf-optimized
10
- - gemma
11
- language:
12
- - en
13
- pipeline_tag: text-generation
14
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- # Solvrays Finetuned Pdf (Standalone)
 
 
 
 
 
 
 
17
 
18
- ## Description
19
- This is a **STANDALONE** version of Gemma 2B, specifically fine-tuned for high-context document understanding. Unlike adapter-based models, this version has its weights **merged**, allowing for simplified loading and inference.
20
 
21
- ## Usage (Simplified)
22
- You can load this model using a single line of code, exactly like any standard Hugging Face model.
23
 
24
- ### Inference Code
25
- ```python
26
- from transformers import AutoTokenizer, AutoModelForCausalLM
27
- import torch
28
 
29
- model_id = "singtan/solvrays-finetuned-pdf"
30
- tokenizer = AutoTokenizer.from_pretrained(model_id)
31
- model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.float16)
 
 
 
 
32
 
33
- prompt = "What are the key insights from the documentation?"
34
- inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
35
- outputs = model.generate(**inputs, max_new_tokens=150)
36
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
37
- ```
38
 
39
- ## Performance
40
- - **Final Training Loss**: N/A
41
- - **Optimized for**: Technical documentation and PDF-source data.
42
 
43
- ## Authors
44
- Fine-tuned and Merged by **Bibek**.
 
 
1
  ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ base_model: google/gemma-2b
5
+ tags:
6
+ - text-generation
7
+ - standalone
8
+ - merged-weights
9
+ - pdf-optimized
10
+ - gemma
11
+ - vision-guided-training
12
+ language:
13
+ - en
14
+ pipeline_tag: text-generation
15
+ ---
16
+
17
+ # ๐Ÿš€ Solvrays Finetuned Pdf (Standalone Merged Weight)
18
+
19
+ ## ๐ŸŒŸ Overview
20
+ This model is a high-performance, standalone version of **Gemma 2B**, meticulously fine-tuned for **complex document understanding and technical metadata extraction**. Unlike standard PEFT adapters, this version features **merged weights**, enabling seamless integration into production pipelines without the overhead of loading separate adapter layers.
21
+
22
+ ### ๐Ÿ›  Key Features
23
+ - **Zero-Overhead Inference**: Merged weights allow loading as a native CausalLM.
24
+ - **Document Intelligence**: Fine-tuned on technical PDF structures, including infrastructure guides and architectural documentation.
25
+ - **Vision-Guided Data Pipeline**: Trained on text recovered through a hybrid Digital/OCR pipeline for maximum data fidelity.
26
+ - **Optimized Context**: Tailored for high-precision extraction and summary tasks from technical corpora.
27
+
28
+ ## ๐Ÿ’ป Quick Start (Inference)
29
+ You can deploy this model using standard Hugging Face `transformers` logic.
30
+
31
+ ```python
32
+ from transformers import AutoTokenizer, AutoModelForCausalLM
33
+ import torch
34
 
35
+ model_id = "singtan/solvrays-finetuned-pdf"
36
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
37
+ model = AutoModelForCausalLM.from_pretrained(
38
+ model_id,
39
+ device_map="auto",
40
+ torch_dtype=torch.float16,
41
+ trust_remote_code=True
42
+ )
43
 
44
+ prompt = "Analyze the provided technical documentation and summarize the key infrastructure recommendations."
45
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
46
 
47
+ with torch.no_grad():
48
+ outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7, top_p=0.9)
49
 
50
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
51
+ ```
 
 
52
 
53
+ ## ๐Ÿ“Š Training Specifications
54
+ - **Base Model**: google/gemma-2b
55
+ - **Training Strategy**: QLoRA (4-bit quantization) followed by FP16 weight merging.
56
+ - **Final Loss Performance**: N/A
57
+ - **Learning Rate**: 0.0001
58
+ - **Epochs**: 3
59
+ - **Hardware**: Optimized for NVIDIA L4/V100/H100 environments.
60
 
61
+ ## โš ๏ธ Limitations & Bias
62
+ While optimized for technical documentation, this model remains a generative LLM and may produce hallucinations if the input context is missing or highly ambiguous. It is recommended to use **Retrieval-Augmented Generation (RAG)** or **strict prompting** for mission-critical data extraction.
 
 
 
63
 
64
+ ## ๐Ÿ“œ License
65
+ This model follows the **Apache-2.0** license. Usage must adhere to the Google Gemma Prohibited Use Policy.
 
66
 
67
+ ---
68
+ **Fine-tuned and Merged by Bibek Lama Singtan**
69
+