GraySoft
Projects Models About FAQ Contact Download guIDE →

lmstudio-community/codegemma-2b-gguf IQ4_XS GGUF - Free GGUF Download is indexed on GraySoft with repository links, GGUF quant files, and Hugging Face metadata. This page helps you pick a local model for guIDE or other runtimes. See related models in the same shard below.

Model Intelligence Sheet

lmstudio-community/codegemma-2b-gguf overview

arr.sort() for i in arr: if i % 2 == 0: print(i) Explanation: While this model cannot be directly prompted, it can be hinted in the right direction by preceeding the fill in middle token by a comment explaning what comes next, then using followed immediately by In this example, the comment suggest that what comes next is sorting the array and printing out each one that is even. The model accurately fills in what should be at .

transformersgguftext-generationlicense:gemmaendpoints_compatibleregion:us
lmstudio-community/codegemma-2b-gguf visual
Downloads
382
Likes
4
Pipeline
text-generation
Library
transformers
Visibility
Public
Access
Open

Repository Files & Downloads

22 files detected
Direct downloads for all repository files
FileTypeQuantizationSizeLink
codegemma-2b-IQ1_M.gguf GGUF IQ1_M 776.14 MB Download
codegemma-2b-IQ1_S.gguf GGUF IQ1_S 735.24 MB Download
codegemma-2b-IQ2_M.gguf GGUF IQ2_M 972.24 MB Download
codegemma-2b-IQ2_S.gguf GGUF IQ2_S 917.71 MB Download
codegemma-2b-IQ2_XS.gguf GGUF IQ2_XS 901.09 MB Download
codegemma-2b-IQ2_XXS.gguf GGUF IQ2_XXS 844.31 MB Download
codegemma-2b-IQ3_M.gguf GGUF IQ3_M 1.22 GB Download
codegemma-2b-IQ3_S.gguf GGUF IQ3_S 1.20 GB Download
codegemma-2b-IQ3_XS.gguf GGUF IQ3_XS 1.16 GB Download
codegemma-2b-IQ3_XXS.gguf GGUF IQ3_XXS 1.05 GB Download
codegemma-2b-IQ4_NL.gguf GGUF IQ4_NL 1.45 GB Download
codegemma-2b-IQ4_XS.gguf GGUF IQ4_XS 1.39 GB Download
codegemma-2b-Q2_K.gguf GGUF Q2_K 1.08 GB Download
codegemma-2b-Q3_K_L.gguf GGUF Q3_K_L 1.36 GB Download
codegemma-2b-Q3_K_M.gguf GGUF Q3_K_M 1.29 GB Download
codegemma-2b-Q3_K_S.gguf GGUF Q3_K_S 1.20 GB Download
codegemma-2b-Q4_K_M.gguf GGUF Q4_K_M 1.52 GB Download
codegemma-2b-Q4_K_S.gguf GGUF Q4_K_S 1.45 GB Download
codegemma-2b-Q5_K_M.gguf GGUF Q5_K_M 1.71 GB Download
codegemma-2b-Q5_K_S.gguf GGUF Q5_K_S 1.68 GB Download
codegemma-2b-Q6_K.gguf GGUF Q6_K 1.92 GB Download
codegemma-2b-Q8_0.gguf GGUF 2.49 GB Download

Model Details Live

Model Slug
lmstudio-community/codegemma-2b-gguf
Author
lmstudio-community
Pipeline Task
text-generation
Library
transformers
Created
2024-04-09
Last Modified
2024-04-09
Gated
No
Private
No
HF SHA
8978e8846f2638de9d7a1d280ec7162d30b137fb
License
gemma
Language
Unknown
Base Model
Unknown

Metadata Inspector

Normalized metadata (stored in metadata_json)
{
  "metadata": {},
  "card_data": {
    "library_name": "transformers",
    "extra_gated_heading": "Access Gemma on Hugging Face",
    "extra_gated_prompt": "To access CodeGemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged-in to Hugging Face and click below. Requests are processed immediately.",
    "extra_gated_button_content": "Acknowledge license",
    "license": "gemma",
    "license_link": "https://ai.google.dev/gemma/terms",
    "quantized_by": "bartowski",
    "pipeline_tag": "text-generation",
    "lm_studio": {
      "param_count": "2b",
      "use_case": "coding",
      "release_date": "09-04-2024",
      "model_creator": "google",
      "prompt_template": "none",
      "system_prompt": "none",
      "base_model": "gemma",
      "original_repo": "google/codegemma-2b"
    },
    "frontmatter": {
      "library_name": "transformers",
      "extra_gated_heading": "Access Gemma on Hugging Face",
      "extra_gated_prompt": ">-",
      "extra_gated_button_content": "Acknowledge license",
      "license": "gemma",
      "license_link": "https://ai.google.dev/gemma/terms",
      "quantized_by": "bartowski",
      "pipeline_tag": "text-generation",
      "lm_studio": []
    },
    "hero_image_url": "",
    "summary": "arr.sort() for i in arr: if i % 2 == 0: print(i) ``` Explanation: While this model cannot be directly prompted, it can be hinted in the right direction by preceeding the fill in middle token by a comment explaning what comes next, then using  followed immediately by  In this example, the comment suggest that what comes next is sorting the array and printing out each one that is even. The model accurately fills in what should be at .",
    "quick_links": [],
    "benchmark_table_html": "",
    "readme_markdown": "---\nlibrary_name: transformers\nextra_gated_heading: Access Gemma on Hugging Face\nextra_gated_prompt: >-\n  To access CodeGemma on Hugging Face, you’re required to review and agree to\n  Google’s usage license. To do this, please ensure you’re logged-in to Hugging\n  Face and click below. Requests are processed immediately.\nextra_gated_button_content: Acknowledge license\nlicense: gemma\nlicense_link: https://ai.google.dev/gemma/terms\nquantized_by: bartowski\npipeline_tag: text-generation\nlm_studio:\n  param_count: 2b\n  use_case: coding\n  release_date: 09-04-2024\n  model_creator: google\n  prompt_template: none\n  system_prompt: none\n  base_model: gemma\n  original_repo: google/codegemma-2b\n---\n\n## 💫 Community Model> CodeGemma 2b by Google\n\n*👾 [LM Studio](https://lmstudio.ai) Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on [Discord](https://discord.gg/aPQfnNkxGC)*.\n\n**Model creator:** [Google](https://huggingface.co/google)<br>\n**Original model**: [google/codegemma-2b](https://huggingface.co/google/codegemma-2b)<br>\n**GGUF quantization:** provided by [bartowski](https://huggingface.co/bartowski) based on `llama.cpp` release [b2589](https://github.com/ggerganov/llama.cpp/releases/tag/b2589)<br>\n\n## Model Summary:\nCodeGemma 2B is the first in a series of coding models released by Google. This is a code completion model, and as such, cannot be prompted in the same way a chat or instruct model can be prompted.<br>\nThis model is perfect for code completion and use in tools like co-pilot, where its small size will make completions show up instantly while still being high performance.<br>\nThis model should not be used as a chat model, and will not answer questions.\n\n## Prompt Template:\n\nThis model does not support a typical prompt template, but instead uses the following tokens for specifying input parts:\n\n- <|fim_prefix|> precedes the context before the completion we want to run.\n- <|fim_suffix|> precedes the suffix. You must put this token exactly where the cursor would be positioned in an editor, as this is the location that will be completed by the model.-\n- <|fim_middle|> is the prompt that invites the model to run the generation.\n\nIn addition to these, there's also <|file_separator|>, which is used to provide multi-file contexts.\n\nSelect `LM Studio Blank Preset` to use your own proper format as below.\n\n## Use case and examples\n\nThis model will excel at code generation and fill-in-the-middle.\n\n### Coding 1\n\n```\n<|fim_prefix|>import datetime\ndef calculate_age(birth_year):\n    \"\"\"Calculates a person's age based on their birth year.\"\"\"\n    current_year = datetime.date.today().year\n    <|fim_suffix|>\n    return age<|fim_middle|>\nage = current_year - birth_year<|file_separator|>\n```\n\nExplanation: Here the model was given the fill-in-middle prefix and suffix. The model is then told to generate the fim_middle with the token `<|fim_middle|>` to which is replies with the code that would complete the function.\n\n### Coding 2\n\n```\n<|fim_prefix|>public class MergeSort {\n\n    public static void mergeSort(int[] arr) {\n        int n = arr.length;\n        if (n < 2) {\n            return;\n        }\n        <|fim_suffix|>\n        mergeSort(left);\n        mergeSort(right);\n        merge(arr, left, right);\n    }\n    \n        public static void merge(int[] arr, int[] left, int[] right) {\n            int i = 0;\n            int j = 0;\n            int k = 0;\n            while (i < left.length && j < right.length) {\n                if (left[i] <= right[j]) {\n                    arr[k] = left[i];\n                    i++;\n                } else {\n                    arr[k] = right[j];\n                    j++;\n                }\n                k++;\n            }\n            while (i < left.length) {\n                arr[k] = left[i];\n                i++;\n                k++;\n            }\n            while (j < right.length) {\n                arr[k] = right[j];\n                j++;\n                k++;\n            }\n        }\n    \n        public static void main(String[] args) {\n            int[] arr = {5, 2, 4, 6, 1, 3};\n            mergeSort(arr);\n            for (int i = 0; i < arr.length; i++) {\n                System.out.print(arr[i] + \" \");\n            }\n        }\n    }\n<|fim_middle|>\nint mid = n / 2;\nint[] left = new int[mid];\nint[] right = new int[n - mid];\nfor (int i = 0; i < mid; i++) {\n    left[i] = arr[i];\n}\nfor (int i = mid; i < n; i++) {\n    right[i - mid] = arr[i];\n}<|file_separator|>\n```\n\nExplanation: The model was given the majority of a merge sort implementation in Java with a portion in the middle removed. The model was able to fill in the missing code based on the surrounding details.\n\n### Coding 3\n\n```\n<|fim_prefix|>arr = [1, 5, 3, 76, 12, 154, 2, 56]\n\n# Sort the array then print only the even numbers\n<|fim_suffix|><|fim_middle|>\narr.sort()\nfor i in arr:\n    if i % 2 == 0:\n        print(i)<|file_separator|>\n```\n\nExplanation: While this model cannot be directly prompted, it can be hinted in the right direction by preceeding the fill in middle token by a comment explaning what comes next, then using <|fim_suffix|> followed immediately by <|fim_middle|><br>\nIn this example, the comment suggest that what comes next is sorting the array and printing out each one that is even. The model accurately fills in what should be at <|fim_suffix|>.\n\n## Technical Details\n\nCodeGemma 2b is based on the Gemma 2b model with additional training on exclusively code.\n\nThe code used is based on publicly avaialble code repositories.\n\nThe model was trained exclusively for the purposes of code completion and excels at it.\n\nAdditional details can be found on Google's official report PDF [here](https://storage.googleapis.com/deepmind-media/gemma/codegemma_report.pdf)\n\n## Special thanks\n\n🙏 Special thanks to [Georgi Gerganov](https://github.com/ggerganov) and the whole team working on [llama.cpp](https://github.com/ggerganov/llama.cpp/) for making all of this possible.\n\n🙏 Special thanks to [Kalomaze](https://github.com/kalomaze) for his dataset (linked [here](https://github.com/ggerganov/llama.cpp/discussions/5263)) that was used for calculating the imatrix for these quants, which improves the overall quality!\n\n## Disclaimers\n\nLM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model.  You understand that Community Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Community Model is the sole responsibility of the person or entity who originated such Model. LM Studio may not monitor or control the Community Models and cannot, and does not, take responsibility for any such Model. LM Studio disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Community Models.  LM Studio further disclaims any warranty that the Community Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Community Models, your downloading of any Community Model, or use of any other Community Model provided by or through LM Studio.\n",
    "related_quantizations": []
  },
  "tags": [
    "transformers",
    "gguf",
    "text-generation",
    "license:gemma",
    "endpoints_compatible",
    "region:us"
  ],
  "likes": 4,
  "downloads": 382,
  "gated": false,
  "private": false,
  "last_modified": "2024-04-09T18:16:15.000Z",
  "created_at": "2024-04-09T15:28:58.000Z",
  "pipeline_tag": "text-generation",
  "library_name": "transformers"
}
Source payload excerpt (from Hugging Face API)
{
  "_id": "66155eba1a49594d2b49f8a6",
  "id": "lmstudio-community/codegemma-2b-GGUF",
  "modelId": "lmstudio-community/codegemma-2b-GGUF",
  "sha": "8978e8846f2638de9d7a1d280ec7162d30b137fb",
  "createdAt": "2024-04-09T15:28:58.000Z",
  "lastModified": "2024-04-09T18:16:15.000Z",
  "author": "lmstudio-community",
  "downloads": 382,
  "likes": 4,
  "gated": false,
  "private": false,
  "pipeline_tag": "text-generation",
  "library_name": "transformers",
  "siblings_count": 25
}