Instructions to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("UsernameJustAnother/Nemo-12B-Marlin-v4-gguf", dtype="auto") - llama-cpp-python
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="UsernameJustAnother/Nemo-12B-Marlin-v4-gguf", filename="Nemo-12B-Marlin-v4_q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0 # Run inference directly in the terminal: llama-cli -hf UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
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 UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
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 UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
Use Docker
docker model run hf.co/UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
- LM Studio
- Jan
- Ollama
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with Ollama:
ollama run hf.co/UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
- Unsloth Studio
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-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 UsernameJustAnother/Nemo-12B-Marlin-v4-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 UsernameJustAnother/Nemo-12B-Marlin-v4-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for UsernameJustAnother/Nemo-12B-Marlin-v4-gguf to start chatting
- Docker Model Runner
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with Docker Model Runner:
docker model run hf.co/UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
- Lemonade
How to use UsernameJustAnother/Nemo-12B-Marlin-v4-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull UsernameJustAnother/Nemo-12B-Marlin-v4-gguf:Q8_0
Run and chat with the model
lemonade run user.Nemo-12B-Marlin-v4-gguf-Q8_0
List all available models
lemonade list
Uploaded model
- Developed by: UsernameJustAnother
- License: apache-2.0
- Finetuned from model : unsloth/Mistral-Nemo-Instruct-2407
This is the Q8_0 GGUF of the 4th (and likely final) experimental fine-tune of Nemo. I made these to teach myself the basics of fine-tuning, with notes extensively borrowed from https://huggingface.co/nothingiisreal/MN-12B-Celeste-V1.9
It is an RP finetune using 8,160 human-generated conversations of varying lengths from a variety of sources, trained in ChatML format.
The big differences from Celeste is a different LoRA scaling factor. Celeste uses 8; I did several tests with this data before concluding I got lower training loss with 2.
Training took around 4 hours on a single Colab A100 (but I didn't do an eval loop). Neat that I could get it all to fit into 40GB of vRAM thanks to Unsloth.
It was trained with the following settings:
==((====))== Unsloth - 2x faster free finetuning | Num GPUs = 1
\\ /| Num examples = 8,160 | Num Epochs = 2
O^O/ \_/ \ Batch size per device = 2 | Gradient Accumulation steps = 4
\ / Total batch size = 8 | Total steps = 2,040
"-____-" Number of trainable parameters = 912,261,120
[2040/2040 3:35:30, Epoch 2/2]
model = FastLanguageModel.get_peft_model(
model,
r = 256,
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
"gate_proj", "up_proj", "down_proj",],
lora_alpha = 32, # 32 / sqrt(256) gives a scaling factor of 2
lora_dropout = 0, # Supports any, but = 0 is optimized
bias = "none", # Supports any, but = "none" is optimized
# [NEW] "unsloth" uses 30% less VRAM, fits 2x larger batch sizes!
use_gradient_checkpointing = "unsloth", # True or "unsloth" for very long context
random_state = 3407,
use_rslora = True, # setting the adapter scaling factor to lora_alpha/math.sqrt(r) instead of lora_alpha/r
loftq_config = None, # And LoftQ
)
lr_scheduler_kwargs = {
'min_lr': 0.0000024 # Adjust this value as needed
}
trainer = SFTTrainer(
model = model,
tokenizer = tokenizer,
train_dataset = train_ds,
compute_metrics = compute_metrics,
dataset_text_field = "text",
max_seq_length = max_seq_length,
dataset_num_proc = 2,
packing = False, # Can make training 5x faster for short sequences.
args = TrainingArguments(
per_device_train_batch_size = 2,
per_device_eval_batch_size = 2, # defaults to 8!
gradient_accumulation_steps = 4,
warmup_steps = 5,
num_train_epochs = 2,
learning_rate = 8e-5,
fp16 = not is_bfloat16_supported(),
bf16 = is_bfloat16_supported(),
fp16_full_eval = True, # stops eval from trying to use fp32
eval_strategy = "no", # 'no', 'steps', 'epoch'. Don't use this without an eval dataset etc
eval_steps = 1, # is eval_strat is set to 'steps', do every N steps.
logging_steps = 1, # so eval and logging happen on the same schedule
optim = "adamw_8bit",
weight_decay = 0.01,
lr_scheduler_type = "cosine_with_min_lr", # linear, cosine, cosine_with_min_lr, default linear
lr_scheduler_kwargs = lr_scheduler_kwargs, # needed for cosine_with_min_lr
seed = 3407,
output_dir = "outputs",
),
)
This mistral model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 11
8-bit
Model tree for UsernameJustAnother/Nemo-12B-Marlin-v4-gguf
Base model
unsloth/Mistral-Nemo-Instruct-2407