nairanu6115 commited on
Commit
f91ce3f
·
verified ·
1 Parent(s): 5d3ab34

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -7
README.md CHANGED
@@ -1,12 +1,111 @@
1
  ---
2
- license: apache-2.0
3
  language:
4
  - en
5
- base_model:
6
- - microsoft/Phi-3-mini-4k-instruct
7
- pipeline_tag: text-generation
8
  tags:
9
- - llm
10
  - erp
11
- - qna
12
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
2
  language:
3
  - en
4
+ license: mit
5
+ base_model: microsoft/Phi-3-mini-4k-instruct
 
6
  tags:
7
+ - phi-3
8
  - erp
9
+ - finance
10
+ - enterprise
11
+ - lora
12
+ - qlora
13
+ - fine-tuned
14
+ - text-generation
15
+ pipeline_tag: text-generation
16
+ ---
17
+
18
+ # Phi-3 Mini · ERP Assistant
19
+
20
+ A fine-tuned version of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) trained on enterprise ERP documentation using QLoRA. This model is designed to answer questions about ERP concepts, workflows, and processes including procurement, accounts payable, purchase orders, inventory, and more.
21
+
22
+ ---
23
+
24
+ ## Model Details
25
+
26
+ | Property | Value |
27
+ |---|---|
28
+ | Base model | microsoft/Phi-3-mini-4k-instruct |
29
+ | Parameters | 3.8B |
30
+ | Fine-tuning technique | QLoRA (4-bit quantization) |
31
+ | Training data | ERP documentation |
32
+ | Language | English |
33
+ | License | MIT |
34
+
35
+ ---
36
+
37
+ ## How to Use
38
+
39
+ ```python
40
+ from transformers import AutoModelForCausalLM, AutoTokenizer
41
+ import torch
42
+
43
+ model_id = "nairanu6115/phi3-mini-erp"
44
+
45
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
46
+ model = AutoModelForCausalLM.from_pretrained(
47
+ model_id,
48
+ torch_dtype=torch.float16,
49
+ device_map="auto"
50
+ )
51
+
52
+ def ask(question: str) -> str:
53
+ prompt = f"<|user|>\n{question}<|end|>\n<|assistant|>\n"
54
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
55
+ outputs = model.generate(
56
+ **inputs,
57
+ max_new_tokens=300,
58
+ temperature=0.7,
59
+ do_sample=True,
60
+ pad_token_id=tokenizer.eos_token_id
61
+ )
62
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
63
+ return response.split("<|assistant|>")[-1].strip()
64
+
65
+ print(ask("What is a purchase order?"))
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Example Inputs & Outputs
71
+
72
+ **Example 1 — Purchase Order**
73
+
74
+ > **User:** What is a purchase order?
75
+ >
76
+ > **Assistant:** A Purchase Order (PO) is a formal document issued by a buyer to a vendor requesting goods or services. It specifies the items, quantities, agreed prices, and payment terms. In an ERP system, a PO is a key step in the procurement process that creates a legally binding agreement between the buyer and supplier before an invoice is received.
77
+
78
+ ---
79
+
80
+ **Example 2 — Accounts Payable**
81
+
82
+ > **User:** What is accounts payable and how does it work in ERP?
83
+ >
84
+ > **Assistant:** Accounts Payable (AP) refers to the money a company owes to its vendors and suppliers for goods or services received but not yet paid for. In an ERP system, the AP process typically follows these steps: (1) a purchase order is raised, (2) goods or services are received and matched against the PO, (3) the vendor invoice is received and verified, (4) the invoice is approved and posted, and (5) payment is processed on the due date. This three-way matching process ensures accuracy and prevents overpayment.
85
+
86
+ ---
87
+
88
+ **Example 3 — Inventory**
89
+
90
+ > **User:** How does inventory management work?
91
+ >
92
+ > **Assistant:** Inventory management in an ERP system tracks the quantity, location, and value of stock in real time. When goods are received from a vendor, stock levels are automatically updated. When goods are issued or sold, stock is decremented. The system can trigger automatic reorder points when stock falls below a defined threshold, ensuring continuity of supply without overstocking.
93
+
94
+ ---
95
+
96
+ ## Limitations
97
+
98
+ - This model is fine-tuned specifically on ERP documentation and performs best on ERP-related questions.
99
+ - It may not perform well on general-purpose tasks outside the ERP domain.
100
+ - As a 3.8B parameter model, responses may occasionally be incomplete or require prompt refinement.
101
+ - Always verify critical ERP configuration advice against your vendor's official documentation.
102
+
103
+ ---
104
+
105
+ ## Training Details
106
+
107
+ - **Base model:** microsoft/Phi-3-mini-4k-instruct
108
+ - **Technique:** QLoRA with 4-bit quantization (via `bitsandbytes`)
109
+ - **Framework:** HuggingFace `transformers` + `peft`
110
+ - **Dataset:** Internal ERP documentation corpus
111
+ - **Task:** Instruction following / question answering on ERP topics