GGUF
conversational
sriyaflows commited on
Commit
65f401a
·
verified ·
1 Parent(s): 047454f

Update Readme.md

Browse files
Files changed (1) hide show
  1. README.md +88 -6
README.md CHANGED
@@ -1,7 +1,89 @@
 
 
1
  ---
2
- license: apache-2.0
3
- datasets:
4
- - IraGia/gprMax_Train
5
- base_model:
6
- - unsloth/Meta-Llama-3.1-8B-Instruct
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Below is a sample `README.md` file for your Hugging Face model repository, where the fine-tuned model has been uploaded in GGUF format. This file provides an overview of the model, its usage, and instructions for downloading and running it.
2
+
3
  ---
4
+
5
+ # Meta-Llama-3.1-8B-Instruct-bnb-4bit Fine-Tuned on gprmax_train (GGUF Format)
6
+
7
+ This repository contains the GGUF format of the fine-tuned `Meta-Llama-3.1-8B-Instruct-bnb-4bit` model, optimized for the `gprmax_train` dataset. The model was fine-tuned using the `unsloth` library for memory and time efficiency and has been converted to GGUF format for compatibility with popular inference frameworks like `llama.cpp`.
8
+
9
+ ## Model Details
10
+ - **Base Model**: `Meta-Llama-3.1-8B-Instruct-bnb-4bit`
11
+ - **Fine-Tuning Dataset**: `gprmax_train`
12
+ - **Fine-Tuning Framework**: `unsloth`
13
+ - **Quantization**: 4-bit (bnb)
14
+ - **GGUF Conversion**: The model has been converted to GGUF format for efficient inference.
15
+
16
+ ## Download the Model
17
+ You can download the GGUF model file from the "Files and versions" section of this repository or use the following command:
18
+
19
+ ```bash
20
+ huggingface-cli download sriyaflows/gprmax_8 --include "*.gguf"
21
+ ```
22
+
23
+ ## Usage with `llama.cpp`
24
+
25
+ To run the model using `llama.cpp`, follow these steps:
26
+
27
+ ### 1. Install `llama.cpp`
28
+ Clone and build `llama.cpp`:
29
+
30
+ ```bash
31
+ git clone https://github.com/ggerganov/llama.cpp
32
+ cd llama.cpp
33
+ make
34
+ ```
35
+
36
+ ### 2. Download the GGUF Model
37
+ Download the GGUF model file from this repository:
38
+
39
+ ```bash
40
+ wget https://huggingface.co/sriyaflows/gprmax_8/resolve/main/gprmax_8.gguf
41
+ ```
42
+
43
+ ### 3. Run Inference
44
+ Use the `main` executable from `llama.cpp` to run inference:
45
+
46
+ ```bash
47
+ ./main -m your-model-name.gguf -p "Your input text here" -n 512
48
+ ```
49
+
50
+ ### Example
51
+ ```bash
52
+ ./main -m your-model-name.gguf -p "What is the output for this input?" -n 512
53
+ ```
54
+
55
+ ## Usage with Python
56
+ You can also use the GGUF model with Python libraries like `llama-cpp-python`:
57
+
58
+ ### 1. Install `llama-cpp-python`
59
+ ```bash
60
+ pip install llama-cpp-python
61
+ ```
62
+
63
+ ### 2. Load and Run the Model
64
+ ```python
65
+ from llama_cpp import Llama
66
+
67
+ # Load the GGUF model
68
+ llm = Llama(model_path="gprmax_8.gguf")
69
+
70
+ # Generate text
71
+ output = llm("Your input text here", max_tokens=512)
72
+ print(output["choices"][0]["text"])
73
+ ```
74
+
75
+ ## Fine-Tuning Details
76
+ The model was fine-tuned on the `gprmax_train` dataset using the `unsloth` library, which optimized memory usage and training time. The fine-tuning process leveraged an L4 GPU with 32GB of RAM and 8 vCPUs.
77
+
78
+ ## License
79
+ This model is licensed under the same terms as the base `Meta-Llama-3.1-8B-Instruct-bnb-4bit` model. Refer to the [Hugging Face model card](https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct) for details.
80
+
81
+ ## Acknowledgments
82
+ - Thanks to Hugging Face for the `transformers` library.
83
+ - Thanks to the `unsloth` team for their memory-efficient fine-tuning tools.
84
+ - Thanks to the creators of the `gprmax_train` dataset.
85
+ - Thanks to `ggerganov` for `llama.cpp` and the GGUF format.
86
+
87
+ ---
88
+
89
+ This `README.md` file is designed to provide clear instructions for downloading and using the GGUF model.