初始化项目,由ModelHub XC社区提供模型
Model: teleprint-me/refact-1.6b-fim Source: Original Platform
This commit is contained in:
41
.gitattributes
vendored
Normal file
41
.gitattributes
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
refact-1.6B-fim-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
refact-1.6B-fim-q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
refact-1.6B-fim-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-model-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-model-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
refact-1.6b-fim-bf16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
111
README.md
Normal file
111
README.md
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
library: llama.cpp
|
||||||
|
library_link: https://github.com/ggerganov/llama.cpp
|
||||||
|
base_model:
|
||||||
|
- smallcloudai/Refact-1_6B-fim
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
inference: true
|
||||||
|
widget:
|
||||||
|
- text: 'def print_hello_world():'
|
||||||
|
example_title: Hello world
|
||||||
|
group: Python
|
||||||
|
license: bigscience-openrail-m
|
||||||
|
pretrain-datasets:
|
||||||
|
- books
|
||||||
|
- arxiv
|
||||||
|
- c4
|
||||||
|
- falcon-refinedweb
|
||||||
|
- wiki
|
||||||
|
- github-issues
|
||||||
|
- stack_markdown
|
||||||
|
- self-made dataset of permissive github code
|
||||||
|
datasets:
|
||||||
|
- bigcode/the-stack-dedup
|
||||||
|
- rombodawg/2XUNCENSORED_MegaCodeTraining188k
|
||||||
|
- bigcode/commitpackft
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
tags:
|
||||||
|
- nlp
|
||||||
|
- code
|
||||||
|
- gguf
|
||||||
|
---
|
||||||
|
|
||||||
|
# Refact 1.6B FIM GGUF
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
The Refact 1.6B FIM GGUF model is a state-of-the-art AI-powered coding assistant developed by Small Magellanic Cloud AI Ltd. This model is designed to assist developers with code completion, refactoring, and chat-based interactions, excelling in code-related natural language understanding and generation tasks.
|
||||||
|
|
||||||
|
## Quantized Model Files
|
||||||
|
|
||||||
|
- **refact-1.6B-fim-bf16.gguf**: A half precision model with a file size of 3.17 GB.
|
||||||
|
|
||||||
|
## Features and Usage
|
||||||
|
|
||||||
|
The model is versatile and can be employed for:
|
||||||
|
|
||||||
|
- Code completion
|
||||||
|
- Code refactoring
|
||||||
|
- Chat-based interactions
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
Here's a sample shell command to invoke the model:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Sample shell command to use the model
|
||||||
|
./main -m models/smallcloudai/Refact-1_6B-fim/ggml-model-f16.gguf -n 300 -p "write a function to multiply two integers in python" --temp 1.0 --top-p 1.0 --top-k 1 --repeat_penalty 1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Performance Metrics
|
||||||
|
|
||||||
|
The model outperforms many existing models in both code completion and chat-based interactions, as evidenced by the HumanEval results.
|
||||||
|
|
||||||
|
| Model | Size | HumanEval pass@1 | HumanEval pass@10 |
|
||||||
|
|----------------------|-------|------------------|-------------------|
|
||||||
|
| **Refact-1.6-fim** | 1.6b | 32.0% | 53.0% |
|
||||||
|
| StableCode | 3b | 20.2% | 33.8% |
|
||||||
|
| ReplitCode v1 | 3b | 21.9% | N/A |
|
||||||
|
|
||||||
|
## Installation and Setup
|
||||||
|
|
||||||
|
The model can be integrated into your IDE via the [Refact plugin](https://refact.ai/). For self-hosting, an [open-source Docker container](https://github.com/smallcloudai/refact) is available.
|
||||||
|
|
||||||
|
## Limitations and Bias
|
||||||
|
|
||||||
|
The model primarily focuses on English text, which may result in lower performance for non-English languages.
|
||||||
|
|
||||||
|
## Technical Specifications
|
||||||
|
|
||||||
|
- **Architecture**: LLAMA-like model with multi-query attention
|
||||||
|
- **Training Tokens**: 1.2T for pretraining, 40B for fine-tuning
|
||||||
|
- **Precision**: bfloat16
|
||||||
|
- **Training Time**: 28 days
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The model is licensed under the BigScience OpenRAIL-M v1 license agreement.
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
|
||||||
|
If you use this model in your work, please cite it by linking back to the following page for proper attribution:
|
||||||
|
|
||||||
|
[Refact 1.6B FIM Model](https://huggingface.co/smallcloudai/Refact-1_6B-fim)
|
||||||
|
|
||||||
|
## Acknowledgments
|
||||||
|
|
||||||
|
Special thanks to [ds5t5](https://github.com/ggerganov/llama.cpp/pull/3329) for their contribution in implementing the source for converting the model's tensors from Hugging Face to GGUF format. Their work has been instrumental in enhancing the model's versatility.
|
||||||
|
|
||||||
|
### Example Command for Testing
|
||||||
|
|
||||||
|
To test the model against Hugging Face, you can use the following command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Example command for testing against Hugging Face
|
||||||
|
python convert-hf-to-gguf.py models/smallcloudai/Refact-1_6B-fim
|
||||||
|
|
||||||
|
./main --color -e -s 1 -c 256 -n 256 -m ./models/smallcloudai/Refact-1_6B-fim/ggml-model-f16.gguf -p "def multiply(a: int, b: int) -> int:"
|
||||||
|
```
|
||||||
|
|
||||||
|
This resolves llama.cpp issue [#3061](https://github.com/ggerganov/llama.cpp/issues/3061).
|
||||||
3
refact-1.6b-fim-bf16.gguf
Normal file
3
refact-1.6b-fim-bf16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2df2590ddb035e815d488623f547aaeb6afb30d5ad97b9f01fc47ee8df67c839
|
||||||
|
size 3173689696
|
||||||
Reference in New Issue
Block a user