# 高科大 雲端培訓計畫 112-02
> 周棟祥 教授
> 趙逢毅博士 aug.chao@gmail.com
[TOC]
## RAG with Ollama (0530)
> `git clone https://github.com/jacttp/simpleRAG`

```python=
def __init__(self):
self.model = ChatOllama(base_url="https://f39b-34-125-107-250.ngrok-free.app", model="willh/taide-lx-7b-chat-4bit")
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=100)
self.prompt = PromptTemplate.from_template(
"""
<s> [INST] 您是一個回答問題的助理。僅使用以下檢索到的內容來為用戶構建答案。如果您不知道答案,只需說您不知道。使用最多三個句子並保持答案簡潔。 [/INST] </s>
[INST] Question: {question}
Context: {context}
Answer: [/INST]
"""
)
```
### ChatGPT 4o
`
`
## RAG with Ollama (0509)
> `git clone https://github.com/Isa1asN/local-rag` :x: don't use
:point_up_2: 等我改一版
## Streamlit with Ollama (0502)
`git clone https://github.com/ChingWeiChan/ollama-streamlit-demo`


## Practice Ollama with TAIDE model (0425~)
1. try to install ollama in your laptop
{%youtube Qa1h7ygwQq8 %}
2. [steps instructions](https://www.largitdata.com/blog_detail/20240420)
## Previous Topics
Topic:
- Checkout leatest GenAI / GPU applications in [the Keynote of GTC 24'](https://www.nvidia.com/zh-tw/gtc/session-catalog/?tab.allsessions=1700692987788001F1cG&search=keynote&ncid=em-news-838065-vt26&mkt_tok=MTU2LU9GTi03NDIAAAGR1bL6vM0crVBjjGMb5YojXPb_ar6xsxewJkRWBllKi9YogbCxOs35Lyqg9cao1HCuUmq7oLeZKWmq_kTDlCW0uH7uSjK4V8-Ka-giqUkBBrah03vfrf8#/session/1696293067196001D5z3)
- **[Begin from March 25~]** Continuing work on the project objectives of each team
- Consolidating all components to develop a viable service
- Engaging in the GenAI hackathon based on the readiness level of each project
### Event: Register GTC
Please make sure to [check out the Keynote of GTC 24'](https://www.nvidia.com/zh-tw/gtc/session-catalog/?tab.allsessions=1700692987788001F1cG&search=keynote&ncid=em-news-838065-vt26&mkt_tok=MTU2LU9GTi03NDIAAAGR1bL6vM0crVBjjGMb5YojXPb_ar6xsxewJkRWBllKi9YogbCxOs35Lyqg9cao1HCuUmq7oLeZKWmq_kTDlCW0uH7uSjK4V8-Ka-giqUkBBrah03vfrf8#/session/1696293067196001D5z3) and other sessions to learn about the latest advancements in LLM and GPU applications.
:point_right: ToDo: email me before next meeting (Mar. 27 or 28)
### Materials: GPU resources
Please laverage CoLab T4 resources for inferencing LLM. Here is the workaround of using Colab and ollama.
{%youtube Qa1h7ygwQq8 %}
#### [Ollama](https://github.com/ollama/ollama)
An inference tool for opensource LLM. Avalable models are various, and it can be deployed in windows, linux and macos.
Here are [model lists](https://ollama.com/library).
- [mixtral](https://ollama.com/library/mixtral) can response in Chinese
### Event: [GenAI Starts](https://award.genaistars.org.tw)
Join the MOST project event to explore the potential of GenAI applications and discover new ways to prompt their development. All members are welcome to participate and contribute to this exciting initiative. Let's work together to push the boundaries of technology and create a better future for all.
<iframe src="https://docs.google.com/presentation/d/1uumyqOCkOSwY8qa6ANlV6wxGDhjrgg0VnfbH0SCHIZI/" frameborder="0" width="100%" height="600" ></iframe>
[簡章資料](https://drive.google.com/file/d/1SuWQoJCjx4ODUyOPb5oqjL9UkOIi2gWy/view?usp=sharing)