dipeshmajithia commited on
Commit
fc2a5b9
·
verified ·
1 Parent(s): cc79f8e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -16
README.md CHANGED
@@ -16,26 +16,46 @@ library_name: transformers
16
  model_creator: "Dipesh Majithia"
17
  model_name: Mirror
18
  ---
19
- # Mirror Model License
20
 
21
- ## Option 1: Apache License 2.0
22
- Mirror is licensed under the Apache License, Version 2.0 (the "License");
23
- you may not use this model except in compliance with the License.
24
- You may obtain a copy of the License at:
25
 
26
- http://www.apache.org/licenses/LICENSE-2.0
 
27
 
28
- Unless required by applicable law or agreed to in writing, software
29
- distributed under the License is distributed on an "AS IS" BASIS,
30
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
 
32
- ## Option 2: Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA 4.0)
33
- This model's outputs (such as generated text) and non-code content are licensed under CC-BY-SA 4.0.
34
 
35
- Under this license:
36
- - You **must give credit** when using or sharing outputs.
37
- - You **must share modifications under the same license**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
- You can find the full license at:
 
40
 
41
- https://creativecommons.org/licenses/by-sa/4.0/
 
16
  model_creator: "Dipesh Majithia"
17
  model_name: Mirror
18
  ---
 
19
 
20
+ # **Mirror Model Card**
 
 
 
21
 
22
+ ## **Summary**
23
+ Mirror is a fine-tuned large language model built on **Mistral**, optimized for **code generation, debugging, and structured technical assistance**. It has been trained on the **GPT CodeFeedback dataset**, enhancing its ability to provide **precise, context-aware programming suggestions**. While not a state-of-the-art model, Mirror demonstrates strong **code understanding, refactoring capabilities, and instruction-following behavior**.
24
 
25
+ The model is fine-tuned using **LoRA** with a focus on **efficient inference** and is designed to assist developers in writing clean, optimized, and well-structured code.
 
 
26
 
27
+ Mirror is available in different configurations to support various deployment environments.
 
28
 
29
+ ---
30
+
31
+ ## **Model Overview**
32
+ Mirror is a **causal language model** based on **Mistral**, trained using **instruction tuning** on a dataset designed to enhance **code review, debugging, and structured programming responses**. The model is intended for:
33
+ - **Code generation** across multiple programming languages.
34
+ - **Code optimization and refactoring suggestions**.
35
+ - **Explaining and debugging errors**.
36
+ - **Providing structured, detailed coding assistance**.
37
+
38
+ ---
39
+
40
+ ## **LangChain Usage**
41
+ For applications using **LangChain**, set `return_full_text=True` to ensure the full response is returned.
42
+
43
+ ```python
44
+ from transformers import pipeline
45
+ from langchain import PromptTemplate, LLMChain
46
+ from langchain.llms import HuggingFacePipeline
47
+
48
+ generate_code = pipeline(model="your-huggingface-username/Mirror",
49
+ torch_dtype=torch.bfloat16,
50
+ trust_remote_code=True,
51
+ device_map="auto",
52
+ return_full_text=True)
53
+
54
+ prompt = PromptTemplate(
55
+ input_variables=["instruction"],
56
+ template="{instruction}")
57
 
58
+ hf_pipeline = HuggingFacePipeline(pipeline=generate_code)
59
+ llm_chain = LLMChain(llm=hf_pipeline, prompt=prompt)
60
 
61
+ print(llm_chain.predict(instruction="Write a Python function to check if a number is prime."))