Instructions to use MCES10/code-gen-gemma-2-2b-it-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use MCES10/code-gen-gemma-2-2b-it-GGUF with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("undefined") model.load_adapter("MCES10/code-gen-gemma-2-2b-it-GGUF", set_active=True) - llama-cpp-python
How to use MCES10/code-gen-gemma-2-2b-it-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MCES10/code-gen-gemma-2-2b-it-GGUF", filename="code-gen-gemma-2-2B-it-F16.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 MCES10/code-gen-gemma-2-2b-it-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MCES10/code-gen-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf MCES10/code-gen-gemma-2-2b-it-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MCES10/code-gen-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: llama-cli -hf MCES10/code-gen-gemma-2-2b-it-GGUF:F16
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 MCES10/code-gen-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf MCES10/code-gen-gemma-2-2b-it-GGUF:F16
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 MCES10/code-gen-gemma-2-2b-it-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf MCES10/code-gen-gemma-2-2b-it-GGUF:F16
Use Docker
docker model run hf.co/MCES10/code-gen-gemma-2-2b-it-GGUF:F16
- LM Studio
- Jan
- vLLM
How to use MCES10/code-gen-gemma-2-2b-it-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MCES10/code-gen-gemma-2-2b-it-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": "MCES10/code-gen-gemma-2-2b-it-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MCES10/code-gen-gemma-2-2b-it-GGUF:F16
- Ollama
How to use MCES10/code-gen-gemma-2-2b-it-GGUF with Ollama:
ollama run hf.co/MCES10/code-gen-gemma-2-2b-it-GGUF:F16
- Unsloth Studio new
How to use MCES10/code-gen-gemma-2-2b-it-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 MCES10/code-gen-gemma-2-2b-it-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 MCES10/code-gen-gemma-2-2b-it-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MCES10/code-gen-gemma-2-2b-it-GGUF to start chatting
- Docker Model Runner
How to use MCES10/code-gen-gemma-2-2b-it-GGUF with Docker Model Runner:
docker model run hf.co/MCES10/code-gen-gemma-2-2b-it-GGUF:F16
- Lemonade
How to use MCES10/code-gen-gemma-2-2b-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MCES10/code-gen-gemma-2-2b-it-GGUF:F16
Run and chat with the model
lemonade run user.code-gen-gemma-2-2b-it-GGUF-F16
List all available models
lemonade list
Code Generation and Problem Solving GGUF
Google's Gemma 2 2b it
Fine Tuned on Kaggle Dataset https://www.kaggle.com/datasets/thedevastator/coding-questions-with-solutions
Text Generation
Example:
Input:
Question: If Mikhail goes from the point $(x1, y1)$ to the point $(x2, y2)$ in one move, and $x1 \ne x2$ and $y1 \ne y2$, then such a move is called a diagonal move. Mikhail has $q$ queries. For the $i$-th query Mikhail's target is to go to the point $(n_i, m_i)$ from the point $(0, 0)$ in exactly $k_i$ moves. Among all possible movements he want to choose one with the maximum number of diagonal moves. Your task is to find the maximum number of diagonal moves or find that it is impossible to go from the point $(0, 0)$ to the point $(n_i, m_i)$ in $k_i$ moves. Note that Mikhail can visit any point any number of times (even the destination point!).
Output:
Let's break down this problem step-by-step.
Understanding the Problem
- Mikhail's Moves: Mikhail can move diagonally, meaning he can move in a way that forms a diagonal line between two points.
- Queries: Mikhail has a set of queries, each representing a target point.
- Target Point: The target point is the point Mikhail wants to reach.
- Moves: The number of moves Mikhail needs to make to reach the target point.
- Diagonal Moves: The maximum number of diagonal moves Mikhail can make.
Analyzing the Problem
The problem is about finding the maximum number of diagonal moves Mikhail can make to reach a target point.
Key Concepts
- Diagonal Movement: Mikhail can move diagonally, meaning he can move in a way that forms a diagonal line between two points.
- Distance: The distance between two points is important to determine the number of moves.
Solution Approach
Understanding the Constraints: The problem provides information about the starting point, the target point, and the number of queries.
Analyzing the Queries: The queries are the starting points for Mikhail's movements.
Finding the Maximum Number of Diagonal Moves: The maximum number of diagonal moves Mikhail can make is the maximum number of diagonal moves he can make to reach the target point.
Code Example (Python)
def find_max_diagonal_moves(queries, queries_index):
# ... (Implementation of the logic to find the maximum number of diagonal moves)
# ... (Implementation of the logic to find the maximum number of diagonal moves)
Important Notes
- Implementation: The code example is a starting point. You'll need to implement the logic to find the maximum number of diagonal moves.
- Constraints: The problem provides information about the starting point, the target point, and the number of queries.
- Constraints: The problem provides information about the starting point, the target point, and the number of queries.
Let me know if you have any other questions.
Prompt: 149 tokens, 386.395 tokens-per-sec Generation: 460 tokens, 24.677 tokens-per-sec Peak memory: 5.358 GB
- Downloads last month
- 5
16-bit