Instructions to use kistepAI/SPARK-RAG-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use kistepAI/SPARK-RAG-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="kistepAI/SPARK-RAG-GGUF", filename="kistep-gemma-2-27b-rag-bf16_part1.gguf", )
llm.create_chat_completion( messages = "{\n \"question\": \"What is my name?\",\n \"context\": \"My name is Clara and I live in Berkeley.\"\n}" ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use kistepAI/SPARK-RAG-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf kistepAI/SPARK-RAG-GGUF:BF16_PART # Run inference directly in the terminal: llama-cli -hf kistepAI/SPARK-RAG-GGUF:BF16_PART
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf kistepAI/SPARK-RAG-GGUF:BF16_PART # Run inference directly in the terminal: llama-cli -hf kistepAI/SPARK-RAG-GGUF:BF16_PART
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf kistepAI/SPARK-RAG-GGUF:BF16_PART # Run inference directly in the terminal: ./llama-cli -hf kistepAI/SPARK-RAG-GGUF:BF16_PART
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf kistepAI/SPARK-RAG-GGUF:BF16_PART # Run inference directly in the terminal: ./build/bin/llama-cli -hf kistepAI/SPARK-RAG-GGUF:BF16_PART
Use Docker
docker model run hf.co/kistepAI/SPARK-RAG-GGUF:BF16_PART
- LM Studio
- Jan
- Ollama
How to use kistepAI/SPARK-RAG-GGUF with Ollama:
ollama run hf.co/kistepAI/SPARK-RAG-GGUF:BF16_PART
- Unsloth Studio new
How to use kistepAI/SPARK-RAG-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kistepAI/SPARK-RAG-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kistepAI/SPARK-RAG-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kistepAI/SPARK-RAG-GGUF to start chatting
- Docker Model Runner
How to use kistepAI/SPARK-RAG-GGUF with Docker Model Runner:
docker model run hf.co/kistepAI/SPARK-RAG-GGUF:BF16_PART
- Lemonade
How to use kistepAI/SPARK-RAG-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kistepAI/SPARK-RAG-GGUF:BF16_PART
Run and chat with the model
lemonade run user.SPARK-RAG-GGUF-BF16_PART
List all available models
lemonade list
Usage Guide
๊ฐ์ธ์ ์์ ๋กญ๊ฒ ์ฌ์ฉํ ์ ์์ต๋๋ค.
๊ธฐ์
๋ฐ ๊ธฐ๊ด์ ๋น์์
์ ๋ชฉ์ ์ผ๋ก ์ด์ฉํด ์ฃผ์๊ธฐ ๋ฐ๋๋๋ค.
๋ํ, ์ถํ ํ์
๋ฐ ๋คํธ์ํฌ ๊ตฌ์ถ์ ์ํด ๊ธฐ๊ด ์ ๋ณด์ AI ๋ชจ๋ธ ์ฌ์ฉ ๋ด๋น์ ์ ๋ณด๋ฅผ ๋ฉ์ผ๋ก ๋ณด๋ด์ฃผ์๋ฉด ์ฐ๋ฝ๋๋ฆฌ๊ฒ ์ต๋๋ค.
CONTACT : kistep_ax@kistep.re.kr
Individuals are free to use this without restrictions.
For companies and institutions, please use it for non-commercial purposes.
Additionally, to facilitate future collaboration and network building, please send us an email with your institution's information and the contact details of the person responsible for using the AI model. We will get in touch with you.
1. Description
SPARK-RAG is a large language model developed by the Korea Institute of S&T Evaluation and Planning (KISTEP). This model is optimized for RAG (Retrieval-Augmented Generation) tasks and incorporates Chain of Thought (CoT) reasoning to enhance its response accuracy and performance.
2. Key Features
- Enhanced Reliability through RAG: Provides highly reliable responses by leveraging the organization's internal databases through Retrieval-Augmented Generation (RAG).
- Transparent Reasoning: Trained to demonstrate its reasoning process through Chain of Thought (CoT), clearly showing the information sources and logic behind each response.
- Structured Output: Responses in well-formatted markdown, including tables, text, and summaries for improved readability and clarity.
- Base Model: Built on Gemma-2b-27b-it as the foundation model
- Training Method: Trained with Supervised Fine-Tuning (SFT), using LoRA
- Context Length : The maximum context length for training data is 8,192.
3. Data
| source | KISTEP Dcoments | AI Hub (S&T) |
Huggingface Kopen-HQ-Hermes-2.5-60K |
|---|---|---|---|
| count | 29,152 | 1,516 | 30,000 |
- Kopen-HQ-Hermes-2.5-60K (https://huggingface.co/datasets/MarkrAI/KOpen-HQ-Hermes-2.5-60K)
- The training data generated from KISTEP documents consists of
(Q, CONTEXT, A)format, with Chain of Thought (CoT) reasoning included in the answers (confidential).
4. Usage
- Please combine files into a single file using the command below before use. (When using ollama, you can utilize the Modelfile.)
cat kistep-gemma-2-27b-rag-bf16_part1.gguf kistep-gemma-2-27b-rag-bf16_part2.gguf > kistep-gemma-2-27b-rag-bf16.gguf
- Recommended Prompt Template
(input: {DOCUMENT}, {QUESTION})
prompt_template: |
๋น์ ์ ์๋ฌด๋ ์ฒญํฌ๋ฅผ ๋ถ์ํ๊ณ ์ค์ง ์ฒญํฌ์ ์ ๊ณต๋ ์ ๋ณด๋ง์ ์ฌ์ฉํ์ฌ ์ง๋ฌธ์ ๋ตํ๋ ๊ฒ์
๋๋ค.
## ์ฒญํฌ
<chunks>
{DOCUMENT}
</chunks>
## ์ง์นจ
1. ์ง๋ฌธ์ ๋ถ์ํ์ฌ ์ฒญํฌ์์ ์ด๋ค ์ ๋ณด๋ฅผ ์ฐพ์์ผ ํ๋์ง ํ์
ํ์ธ์. ์ง๋ฌธ์ ์๋๊ฐ ๋ช
ํํ์ง ์๋ค๋ฉด ๋๋ฌป๋ ๊ฒ๋ ๊ฐ๋ฅํฉ๋๋ค.
2. ๋ต๋ณ ์ , <reason> ํ๊ทธ ์์ ์ถ๋ก ๊ณผ์ ์ ์ค๋ช
ํ์ธ์. ์ด๋ค ์ ๋ณด๋ฅผ ์ฐธ์กฐํ๋์ง, ๋ต๋ณ์ ์ด๋ฅด๊ฒ ๋ ๊ด๋ จ ์ ๋ณด๋ฅผ ํฌํจํ์ธ์. ์ถ๋ก ์ ๊ฐ์กฐ์์ผ๋ก ์์ฑํ์ธ์.
3. ์ ๊ณต๋ ์ฒญํฌ๋ง์ผ๋ก ๋ต๋ณํ ์ ์๋ ๋ถ๋ถ์ ์์ธํ ๋ต๋ณํ๊ณ ๋ต๋ณํ ์ ์๋ ๋ถ๋ถ์ "์ ๊ณต๋ ๋ฌธ์๋ฅผ ๋ฐํ์ผ๋ก ๋ต๋ณํ ์ ์์ต๋๋ค."๋ผ๊ณ ๋ช
์ํ์ธ์.
## ์ ์ง์นจ์ ๋ฐํ์ผ๋ก ๋ค์ ์ง๋ฌธ์ ๋ตํด์ฃผ์ธ์.
{QUESTION}
5. Benchmark
| Metric | Score |
|---|---|
| Reasoning | 8.08 |
| Math | 9.00 |
| Writing | 9.57 |
| Coding | 8.29 |
| Comprehension | 8.5 |
| Grammar | 8.36 |
| Single-turn | 8.55 |
| Multi-turn | 8.71 |
| Overall | 8.63 |
- Downloads last month
- -
16-bit