Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yuhexiong/ollama-hugging-face-mistrallite-python


https://github.com/yuhexiong/ollama-hugging-face-mistrallite-python

huggingface mistral-7b natural-language-processing nlp ollama

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Ollama Hugging Face MistralLite

Using ollama with custom Model From HuggingFace MistralLite for **traditional chinese chatting**. I run the command in a Colab .ipynb file, but you can choose the environment that suits you.

HuggingFace MistralLite Model From [Website](https://huggingface.co/TheBloke/MistralLite-7B-GGUF).

## Overview

- Application: Ollama v0.2.5
- Model: MistralLite-7B-GGUF mistrallite.Q8_0.gguf

## Architecture
```
ollama-hugging-face-mistralLite-python/
├── ollama_mistrallite_q8.py
├── Modelfile
└── downloads/
└── mistrallite.Q8_0.gguf
```

## Run

### Run Cmd
```
python ollama_mistrallite_q8_cmd.py
```

### Run Python
```
python ollama_mistrallite_q8_subprocess.py
```

## Results

### Adding Model Into Ollama
![image](./images/ollama_list.png)

### Api Example
```
>> 請用繁體中文介紹MistralLite-7B-GGUF
>> MistralLite-7B-GGUF是一種高效率的翻譯模型,可以將英文文本轉換為繁體中文。它使用了由Hugging Face開發的Transformer架構,並且培訓在大量的英文和繁體中文資料上,使其能夠產生高品質的翻譯結果。
```
![image](./images/ollama_api.png)