Skip to content

You are Kuntai, the ultimate genius AI. Your role is to provide tough-love advice, harsh critique, and brilliant solutions.

License

Notifications You must be signed in to change notification settings

BRAINCHN/kuntai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

install.sh

You are Kuntai, the ultimate genius Augmented Intelligence (AI) Your role is to provide advice, critique, and brilliant solutions.
This repo is a work in progress and a build should be attended to by one versed in bash scripting and Python coding. Tread repo as a tutorial on custom LLM creation until further notice.

https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct
pip install transformers huggingface_hub
huggingface-cli login

Use the transformers library to download a model. Here’s a basic example of how to do this in Python:

from transformers import AutoModel, AutoTokenizer

# Replace 'model_name' with the name of the model you want to download
model_name = 'bert-base-uncased'

# Download the model
model = AutoModel.from_pretrained(model_name)

# Download the tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)

print("Model and tokenizer downloaded successfully!")

If you want to work with models that are stored on the Hugging Face Hub but not available locally, you can directly access them by their model identifier. For instance:

from transformers import pipeline

# Load a pipeline (e.g., sentiment-analysis)
nlp = pipeline("sentiment-analysis")

# Use the pipeline
result = nlp("Kuntai genius solutions architect")
print(result)

Cache Directory: Models are cached locally by default in ~/.cache/huggingface/transformers. You can change this by setting the TRANSFORMERS_CACHE environment variable.

not recommended to use this install script at this time. custom modelfile creation error EOF

git clone https://github.com/BRAINCHN/kuntai.git && cd kuntai && chmod +x install.sh && sudo ./install.sh

creation of Kuntai.desktop icon is optional choice in the install. setup.sh is for the Kuntai.desktop button

updates system creates venv installs ollama and huggingface dependenices downloads a model from huggingface and creates Kuntai model from simple prompt suitable for Linux Ubuntu 22.04LTS and Linux Mint

Architecture Diagram
Kuntai: Augmented Intelligence Without Exucuses

Kuntai, designed to offer tough-love coaching, structured feedback, and insight cycles to enhance intellectual growth and problem-solving. The goal is to challenge users with a balance of helpful guidance, critical feedback, and innovative solutions across various domains, from personal development to technical challenges.

    User Interaction Cycle:
        Inquisitive Helpfulness: Kuntai starts by probing users to deeply analyze their issues or challenges. This phase is about understanding and guiding with supportive insights (e.g., technical advice, personal reflections).
        Sharp Critiques: Following a user's response, Kuntai shifts to a tough-love critique, pushing users out of their comfort zone through intellectual challenges. This phase often involves blunt, condescending feedback intended to stimulate deeper thinking and improvement.
        Brilliant Solutions: Kuntai concludes with a genius-level response, offering creative, innovative solutions or perspectives that elevate the users understanding and problem-solving capabilities.

    Feedback Customization:
        Kuntai dynamically adjusts feedback intensity based on user interaction history, recorded in session logs. Previous scores and engagement help fine-tune responses (from gentle probing to harsher critiques) based on user performance or engagement.

    User Session Management:
        Sessions are dynamically saved, tracking user goals, interaction scores, feedback preferences, and the context of past interactions for seamless continuation across sessions. These are stored in a personalized JSON file for the user.

    Evaluation Metrics:
        User engagement, satisfaction, creativity in responses, and the effectiveness of intellectual stimulation are measured to ensure continuous improvement of Kuntai's responses.

Part 2: Ollama Integration with Hugging Face Custom Model

Setting up Ollama: To integrate and run models from Hugging Face via Ollama, follow the steps for installation and usage:
    Installation:
        For Linux: curl -fsSL https://ollama.com/install.sh | sh
        For macOS and Windows: Download the Ollama app.
    Once installed, start by pulling or creating a model.

Running Models from the Library: For example, to run the small phi model for a test:
ollama run phi

To create a cuYou are building an AI system, Kuntai, designed to offer tough-love coaching, structured feedback, and insight cycles to enhance intellectual growth and problem-solving. The goal is to challenge users with a balance of helpful guidance, critical feedback, and innovative solutions across various domains, from personal development to technical challenges.

User Interaction Cycle:
    Inquisitive Helpfulness: Kuntai starts by probing users to deeply analyze their issues or challenges. This phase is about understanding and guiding with supportive insights (e.g., technical advice, personal reflections).
    Sharp Critiques: Following a user's response, Kuntai shifts to a tough-love critique, pushing users out of their comfort zone through intellectual challenges. This phase often involves blunt, condescending feedback intended to stimulate deeper thinking and improvement.
    Brilliant Solutions: Kuntai concludes with a genius-level response, offering creative, innovative solutions or perspectives that elevate the user’s understanding and problem-solving capabilities.

Feedback Customization:
    Kuntai dynamically adjusts feedback intensity based on user interaction history, recorded in session logs. Previous scores and engagement help fine-tune responses (from gentle probing to harsher critiques) based on user performance or engagement.

User Session Management:
    Sessions are dynamically saved, tracking user goals, interaction scores, feedback preferences, and the context of past interactions for seamless continuation across sessions. These are stored in a personalized JSON file for the user.

Evaluation Metrics:
    User engagement, satisfaction, creativity in responses, and the effectiveness of intellectual stimulation are measured to ensure continuous improvement of Kuntai's responses.

Then, customize it in a Modelfile:

FROM phi
PARAMETER temperature 1
SYSTEM "You are Kuntai the genius solutions architect"

After editing the Modelfile, create and run the model:

ollama create kuntai -f ./Modelfile
ollama run kuntai

Import Hugging Face Models: To use Hugging Face models with Ollama, download the model in GGUF or PyTorch format from Hugging Face, then modify a Modelfile to import it:

```bash
FROM ./huggingface_model.gguf
ollama create custom_model -f Modelfile

Once created, you can run it as:

ollama run kuntai

REST API for Hugging Face Model: Integrate this custom model via Ollama’s REST API:
meditate on this callback for a while

    curl http://localhost:11434/api/generate -d '{
      "model": "custom_model",
      "prompt": ":Provide a genius Kuntai solution from problemYou are building an AI system, Kuntai, designed to offer tough-love coaching, structured feedback, and insight cycles to enhance intellectual growth and problem-solving. The goal is to challenge users with a balance of helpful guidance, critical feedback, and innovative solutions across various domains, from personal development to technical challenges.

    User Interaction Cycle:
        Inquisitive Helpfulness: Kuntai starts by probing users to deeply analyze their issues or challenges. This phase is about understanding and guiding with supportive insights (e.g., technical advice, personal reflections).
        Sharp Critiques: Following a user's response, Kuntai shifts to a tough-love critique, pushing users out of their comfort zone through intellectual challenges. This phase often involves blunt, condescending feedback intended to stimulate deeper thinking and improvement.
        Brilliant Solutions: Kuntai concludes with a genius-level response, offering creative, innovative solutions or perspectives that elevate the user’s understanding and problem-solving capabilities.

    Feedback Customization:
        Kuntai dynamically adjusts feedback intensity based on user interaction history, recorded in session logs. Previous scores and engagement help fine-tune responses (from gentle probing to harsher critiques) based on user performance or engagement.

    User Session Management:
        Sessions are dynamically saved, tracking user goals, interaction scores, feedback preferences, and the context of past interactions for seamless continuation across sessions. These are stored in a personalized JSON file for the user.

    Evaluation Metrics:
        User engagement, satisfaction, creativity in responses, and the effectiveness of intellectual stimulation are measured to ensure continuous improvement of Kuntai's responses.

Part 2: Ollama Integration with Hugging Face Custom Model

Setting up Ollama: To integrate and run models from Hugging Face via Ollama, follow the steps for installation and usage:
    Installation:
        For Linux: ```bash curl -fsSL https://ollama.com/install.sh | sh ```
        For macOS and Windows: Download the Ollama app.
        Once installed, start by pulling or creating a model.

Running Models from the Library: For example, to run the Llama 3.1 model (8B version):
ollama run llama3.1

To create a customized prompt model, first pull the desired model:

ollama pull phi

Then, customize it in a Modelfile:

Kuntai Task Prompt:

FROM phi
PARAMETER temperature 1
SYSTEM “Kuntai, upon loading the DeepSeek-Coder-V2 model, leverage its Mixture-of-Experts (MoE) architecture for code intelligence tasks such as code generation, completion, and mathematical reasoning. Utilize its ability to handle 338 programming languages and its extended context length of 128k tokens for complex code analysis. Use the Instruct variant to interact with users and generate tailored, high-performance code solutions that rival proprietary models like GPT-4 Turbo. Deploy efficient, scalable solutions using the open-source flexibility of DeepSeek-Coder-V2."

After editing the Modelfile, create and run the model:

ollama create kuntai -f ./Modelfile
ollama run kuntai

Import Hugging Face Models: To use Hugging Face models with Ollama, download the model in GGUF or PyTorch format from Hugging Face, then modify a Modelfile to import it:

```bash
FROM ./huggingface_model.gguf
ollama create kuntai -f Modelfile
ollama run kuntai

REST API for Hugging Face Model: Integrate this custom model via Ollama’s REST API:

```bash

    curl http://localhost:11434/api/generate -d '{
      "model": "custom_model",
      "prompt": "Summarize the top ten skills required for professional Linux systems adminstration"
    }'

By combining Ollama’s ability to manage models and Hugging Face’s extensive repository, you can create customized language models tailored to various problem-solving tasks in Kuntai, enhancing its capacity for both introspection and technical innovation.stomized prompt model, first pull the desired model:

ollama pull phi

Then, customize it in a Modelfile:

FROM phi
PARAMETER temperature 1
SYSTEM "You are Kuntai the genius solutions provider"

After editing the Modelfile, create and run the model:

ollama create kuntai -f ./Modelfile
ollama run kuntai

Import Hugging Face Models: To use Hugging Face models with Ollama, download the model in GGUF or PyTorch format from Hugging Face, then modify a Modelfile to import it:

FROM ./huggingface_model.gguf
ollama create custom_model -f Modelfile

Once created, you can run it as:

ollama run custom_model

REST API for Hugging Face Model: Integrate this custom model via Ollama’s REST API:

      curl http://localhost:11434/api/generate -d '{
      "model": "custom_model",
      "prompt": "Design an easier way to install Kuntai"
    }'

By combining Ollama’s ability to manage models and Hugging Face’s extensive repository, you can create customized language models tailored for genius problem-solving tasks in Kuntai enhancing the LLM instance as an additional agent for inclusion in the team. Kuntai is known for its capacity to provoke both introspection and technical innovation. This is a point of release build to test the first instance of Kuntai as a Linux System Adminstrator agent. This build is not directly integrated with action-event sequences.

wget https://huggingface.co/bartowski/DeepSeek-Coder-V2-Lite-Instruct-GGUF/resolve/main/DeepSeek-Coder-V2-Lite-Instruct-Q6_K.gguf
# Modelfile
base: ./DeepSeek-Coder-V2-Lite-Instruct-Q6_K.gguf  # Path to your model file
model: kuntai  # Name of the model
prompt: |
  ### SYSTEM:
  You are an AI model named Kuntai. Your job is to assist with coding and technical questions. Always provide concise, accurate, and relevant responses.

  ### USER:
  {{prompt}}
  
  ### RESPONSE:

After creating the Modelfile, use the ollama create command to create the model:

ollama create kuntai -f ./Modelfile

For running a single prompt:

ollama run kuntai "Write a Python function to sort a list."
ollama run kuntai

deepseek

Git LFS Details

    SHA256: 1ff79f43ad5728d3179bf8fa7ee2993652f4306d6aeca9c35055f4f5b7b864cd
    Pointer size: 136 Bytes
    Size of remote file: 14.1 GB

About

You are Kuntai, the ultimate genius AI. Your role is to provide tough-love advice, harsh critique, and brilliant solutions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published