Views
No views yet
{prompt}
| Name | Quant method | Bits | Size | Max RAM required | Model Evaluation | Application Scenarios |
|---|---|---|---|---|---|---|
| NT-Java-1.1B_Q2_K.gguf | Q2_K | 2 | 511 MB | 764 MB | poor quality | not advised for usage |
| NT-Java-1.1B_Q3_K_M.gguf | Q3_K_M | 3 | 663 MB | 912 MB | moderate quality | suitable for environments with low RAM |
| NT-Java-1.1B_Q4_0.gguf | Q4_0 | 4 | 726 MB | 1021 MB | moderate quality, prefer using Q3_K_M | not recommended, prefer Q3_K_M |
| NT-Java-1.1B_Q4_K_M.gguf | Q4_K_M | 4 | 792 MB | 1.1 GB | good quality | top recommendation due to optimal size and quality |
| NT-Java-1.1B_Q5_0.gguf | Q5_0 | 5 | 868 MB | 1.08 GB | good quality, prefer Q4_K_M | not recommended, prefer Q4_K_M |
| NT-Java-1.1B_Q5_K_M.gguf | Q5_K_M | 5 | 910 MB | 1.13 GB | excellent quality | recommended, second-best choice |
| NT-Java-1.1B_Q6_K.gguf | Q6_K | 6 | 1.02 GB | 1.24 GB | excellent quality | generally not suggested due to size compared to Q5_K_M |
| NT-Java-1.1B_Q8_0.gguf | Q8_0 | 8 | 1.32 GB | 1.54 GB | top-tier quality, near flawless | preferred in environments with sufficient RAM |
pip3 install huggingface-hubhuggingface-cli download infosys/NT-Java-1.1B-GGUF NT-Java-1.1B_Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falsehuggingface-cli download infosys/NT-Java-1.1B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'huggingface-cli, please see: HF -> Hub Python Library -> Download files -> Download from the CLI.hf_transfer:pip3 install hf_transferHF_HUB_ENABLE_HF_TRANSFER to 1:HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download infosys/NT-Java-1.1B-GGUF NT-Java-1.1B_Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falseset HF_HUB_ENABLE_HF_TRANSFER=1 before the download command.llama.cpp commandllama.cpp from commit d0cee0d or later../main -ngl 35 -m NT-Java-1.1B_Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}"-ngl 32 to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.-c 2048 to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.-p <PROMPT> argument with -i -inscurl -fsSL https://ollama.com/install.sh | shollama run infosys/nt-javaModelfilehuggingface-cli download infosys/NT-Java-1.1B-GGUF Modelfile_q4_k_m --local-dir /path/to/your/local/dirollama create NT-Java -f Modelfile_q4_k_mollama run NT-Java "Your prompt here"wget https://github.com/Mozilla-Ocho/llamafile/releases/download/0.7.3/llamafile-0.7.3public class HelloWorld {\n public static void main(String[] args) {./llamafile-0.7.3 -ngl 9999 -m NT-Java-1.1B_Q4_K_M.gguf --temp 0.6 -p "public class HelloWorld {\n public static void main(String[] args) {"./llamafile-0.7.3 -ngl 9999 -m NT-Java-1.1B_Q4_K_M.gguf1# Base ctransformers with no GPU acceleration
2pip install llama-cpp-python
3# With NVidia CUDA acceleration
4CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
5# Or with OpenBLAS acceleration
6CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
7# Or with CLBLast acceleration
8CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
9# Or with AMD ROCm GPU acceleration (Linux only)
10CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
11# Or with Metal GPU acceleration for macOS systems only
12CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
13
14# In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
15$env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
16pip install llama-cpp-python1from llama_cpp import Llama
2
3# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
4llm = Llama(
5 model_path="./NT-Java-1.1B_Q4_K_M.gguf", # Download the model file first
6 n_ctx=2048, # The max sequence length to use - note that longer sequence lengths require much more resources
7 n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
8 n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
9)
10
11# Simple inference example
12output = llm(
13 "{prompt}", # Prompt
14 max_tokens=512, # Generate up to 512 tokens
15 stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
16 echo=True # Whether to echo the prompt
17)@article{rathinasamy2024narrow,
title={Narrow Transformer: Starcoder-Based Java-LM For Desktop},
author={Kamalkumar Rathinasamy and Balaji A J and Rajab Ali Mondal and Ankush Kumar and Harshini K and Gagan Gayari and Sreenivasa Raghavan Karumboor Seshadri and Swayam Singh},
journal={arXiv preprint arXiv:2407.03941},
year={2024}
}