Instructions to use QuantFactory/Codepy-Deepthink-3B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/Codepy-Deepthink-3B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/Codepy-Deepthink-3B-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Codepy-Deepthink-3B-GGUF", filename="Codepy-Deepthink-3B.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
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 QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
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 QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Codepy-Deepthink-3B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Codepy-Deepthink-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "QuantFactory/Codepy-Deepthink-3B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Codepy-Deepthink-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "QuantFactory/Codepy-Deepthink-3B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Codepy-Deepthink-3B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with Ollama:
ollama run hf.co/QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/Codepy-Deepthink-3B-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 QuantFactory/Codepy-Deepthink-3B-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 QuantFactory/Codepy-Deepthink-3B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Codepy-Deepthink-3B-GGUF to start chatting
- Pi new
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Codepy-Deepthink-3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Codepy-Deepthink-3B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Codepy-Deepthink-3B-GGUF-Q4_K_M
List all available models
lemonade list
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("QuantFactory/Codepy-Deepthink-3B-GGUF", dtype="auto")QuantFactory/Codepy-Deepthink-3B-GGUF
This is quantized version of prithivMLmods/Codepy-Deepthink-3B created using llama.cpp
Original Model Card
Codepy 3B Deep Think Model File
The Codepy 3B Deep Think Model is a fine-tuned version of the meta-llama/Llama-3.2-3B-Instruct base model, designed for text generation tasks that require deep reasoning, logical structuring, and problem-solving. This model leverages its optimized architecture to provide accurate and contextually relevant outputs for complex queries, making it ideal for applications in education, programming, and creative writing.
With its robust natural language processing capabilities, Codepy 3B Deep Think excels in generating step-by-step solutions, creative content, and logical analyses. Its architecture integrates advanced understanding of both structured and unstructured data, ensuring precise text generation aligned with user inputs.
| Model Content | Size | Description | Upload Status |
|---|---|---|---|
.gitattributes |
1.57 kB | Git LFS configuration for large files. | Uploaded |
README.md |
221 Bytes | Basic repository information. | Updated |
config.json |
994 Bytes | Model configuration with architectural details. | Uploaded |
generation_config.json |
248 Bytes | Default generation parameters. | Uploaded |
pytorch_model-00001-of-00002.bin |
4.97 GB | Sharded PyTorch model weights (part 1 of 2). | Uploaded (LFS) |
pytorch_model-00002-of-00002.bin |
1.46 GB | Sharded PyTorch model weights (part 2 of 2). | Uploaded (LFS) |
pytorch_model.bin.index.json |
21.2 kB | Index file mapping model shards. | Uploaded |
special_tokens_map.json |
477 Bytes | Maps special tokens to their respective IDs. | Uploaded |
tokenizer.json |
17.2 MB | Full tokenizer vocabulary and merges. | Uploaded (LFS) |
tokenizer_config.json |
57.5 kB | Tokenizer configuration details. | Uploaded |
| Run with LM Studio | Details |
|---|---|
| Run with LM Studio | https://lmstudio.ai/ |
| Demo on LM Studio | https://drive.google.com/file/d/1CHdfjYrwMnk9ACvS40Abfy3xNXnCubKG/view?usp=sharing |
| Codepy-Deepthink-3B-GGUF | https://huggingface.co/prithivMLmods/Codepy-Deepthink-3B-GGUF |
Sample Deepthink Inference
Develop a Python program to generate random passwords that consist of 8 characters. Not applicable
# Random Password Generator
This Python program generates a random password of a specified length (default: 8 characters) that includes a mix of lowercase letters, uppercase letters, digits, and spaces. The program ensures the generated password meets basic security requirements while maintaining simplicity.
## Features
- Generates alphanumeric passwords with optional spaces.
- Ensures at least one lowercase letter, one uppercase letter, one digit, and one space in the password.
- Shuffles the characters to randomize the order.
- Includes error handling for invalid input lengths.
## Requirements
- Python 3.x
## Usage
1. Clone or download this repository.
2. Run the script using Python:
```bash
python password_generator.py
- The script will generate and print an 8-character random password to the console.
Code
import random
def generate_password(length):
"""
Generates a random alphanumeric password of the specified length.
Ensures that at least one lowercase letter, one uppercase letter,
one digit, and one space are included in the password.
Args:
length: The number of characters in the password.
Returns:
A string representing the generated password or None if the input is invalid.
"""
# Define a set of alphanumeric characters with spaces
characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '
# Validate the length
if length < 1:
return None
# Handle invalid length
if length > len(characters):
print("Invalid password length. It should be less than or equal to", len(characters))
return None
# Ensure at least one character from each required group
required_characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '
if length > 1:
password_length_without_requirements = length - 4
random_string = ''.join(random.choice(required_characters) for _ in range(password_length_without_requirements))
# Fill the rest of the password with random characters
remaining_chars_needed = length - len(random_string)
all_possible_chars = list(characters)
if length > 1:
random_character = random.choice('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ')
else:
random_character = random.choice('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ')
password = random_string + random_character * remaining_chars_needed
# Shuffle the password to avoid predictable patterns
password_list = list(password)
random.shuffle(password_list)
password = ''.join(password_list)
return password
# Example Usage
password_length = 8
generated_password = generate_password(password_length)
if generated_password is not None:
print(f"Generated Password: {generated_password}")
else:
print("Failed to generate a password. Please ensure the length is valid (between 1 and", len(characters), ").")
Example Output
Generated Password: g7x 2PqA
Customization
To customize the password length, modify the password_length variable in the script.
Security Notes
- This implementation uses Python's
randommodule, which is suitable for general-purpose randomness. For cryptographically secure passwords, consider using thesecretsmodule. - The character set includes spaces for additional complexity, but you can modify the
charactersstring to include other symbols (e.g.,!@#$%^&*).
Model Architecture
Llama 3.2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety.
Run with Ollama [ Ollama Run ]
Ollama simplifies running machine learning models. This guide walks you through downloading, installing, and running GGUF models in minutes.
Table of Contents
Download and Install
Download Ollama from https://ollama.com/download and install it on your Windows or Mac system.
Run GGUF Models
Create the Model File
Create a model file, e.g.,metallama.Add the Template Command
Include aFROMline in the file to specify the base model:FROM Llama-3.2-1B.F16.ggufCreate and Patch the Model
Run the following command:ollama create metallama -f ./metallamaVerify the model with:
ollama list
Running the Model
Run your model with:
ollama run metallama
Sample Usage
Interact with the model:
>>> write a mini passage about space x
Space X, the private aerospace company founded by Elon Musk, is revolutionizing the field of space exploration...
With these steps, you can easily run custom models using Ollama. Adjust as needed for your specific use case.
- Downloads last month
- 3,004
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/Codepy-Deepthink-3B-GGUF
Base model
meta-llama/Llama-3.2-3B-Instruct
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/Codepy-Deepthink-3B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)