Text Generation
Transformers
Safetensors
lfm2_moe
Generated from Trainer
trl
sft
unsloth
conversational
8-bit precision
compressed-tensors
Instructions to use Ba2han/augment-nvfp4a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/augment-nvfp4a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ba2han/augment-nvfp4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ba2han/augment-nvfp4a16") model = AutoModelForCausalLM.from_pretrained("Ba2han/augment-nvfp4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Ba2han/augment-nvfp4a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/augment-nvfp4a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/augment-nvfp4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ba2han/augment-nvfp4a16
- SGLang
How to use Ba2han/augment-nvfp4a16 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 "Ba2han/augment-nvfp4a16" \ --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": "Ba2han/augment-nvfp4a16", "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 "Ba2han/augment-nvfp4a16" \ --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": "Ba2han/augment-nvfp4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Ba2han/augment-nvfp4a16 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 Ba2han/augment-nvfp4a16 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 Ba2han/augment-nvfp4a16 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ba2han/augment-nvfp4a16 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ba2han/augment-nvfp4a16", max_seq_length=2048, ) - Docker Model Runner
How to use Ba2han/augment-nvfp4a16 with Docker Model Runner:
docker model run hf.co/Ba2han/augment-nvfp4a16
Upload folder using huggingface_hub
Browse files- README.md +59 -0
- config.json +1 -1
- model.safetensors +2 -2
- tokenizer_config.json +1 -1
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Ba2han/lqd-test
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: augment-multi-ft2
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
- unsloth
|
| 10 |
+
licence: license
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Model Card for augment-multi-ft2
|
| 14 |
+
|
| 15 |
+
This model is a fine-tuned version of [Ba2han/lqd-test](https://huggingface.co/Ba2han/lqd-test).
|
| 16 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
+
|
| 18 |
+
## Quick start
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import pipeline
|
| 22 |
+
|
| 23 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 24 |
+
generator = pipeline("text-generation", model="Ba2han/augment-multi-ft2", device="cuda")
|
| 25 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 26 |
+
print(output["generated_text"])
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
## Training procedure
|
| 30 |
+
|
| 31 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/batuhan409/huggingface/runs/bv8ijm8m)
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
This model was trained with SFT.
|
| 35 |
+
|
| 36 |
+
### Framework versions
|
| 37 |
+
|
| 38 |
+
- TRL: 0.24.0
|
| 39 |
+
- Transformers: 5.3.0
|
| 40 |
+
- Pytorch: 2.10.0
|
| 41 |
+
- Datasets: 4.3.0
|
| 42 |
+
- Tokenizers: 0.22.2
|
| 43 |
+
|
| 44 |
+
## Citations
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
Cite TRL as:
|
| 49 |
+
|
| 50 |
+
```bibtex
|
| 51 |
+
@misc{vonwerra2022trl,
|
| 52 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 53 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 54 |
+
year = 2020,
|
| 55 |
+
journal = {GitHub repository},
|
| 56 |
+
publisher = {GitHub},
|
| 57 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 58 |
+
}
|
| 59 |
+
```
|
config.json
CHANGED
|
@@ -81,7 +81,7 @@
|
|
| 81 |
"lm_head",
|
| 82 |
"re:.*norm.*",
|
| 83 |
"re:.*gate$",
|
| 84 |
-
"re:.*
|
| 85 |
"re:^model\\.layers\\.0\\..*",
|
| 86 |
"re:^model\\.layers\\.1\\..*",
|
| 87 |
"re:^model\\.layers\\.23\\..*"
|
|
|
|
| 81 |
"lm_head",
|
| 82 |
"re:.*norm.*",
|
| 83 |
"re:.*gate$",
|
| 84 |
+
"re:.*\\.conv\\..*",
|
| 85 |
"re:^model\\.layers\\.0\\..*",
|
| 86 |
"re:^model\\.layers\\.1\\..*",
|
| 87 |
"re:^model\\.layers\\.23\\..*"
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ecda9f768f211e756375c484ed0da72b02c11dcc92009032f61358291992db1
|
| 3 |
+
size 5954542880
|
tokenizer_config.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
],
|
| 12 |
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
"pad_token": "<|pad|>",
|
| 14 |
-
"padding_side": "
|
| 15 |
"sp_model_kwargs": {},
|
| 16 |
"spaces_between_special_tokens": false,
|
| 17 |
"tokenizer_class": "TokenizersBackend",
|
|
|
|
| 11 |
],
|
| 12 |
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
"pad_token": "<|pad|>",
|
| 14 |
+
"padding_side": "left",
|
| 15 |
"sp_model_kwargs": {},
|
| 16 |
"spaces_between_special_tokens": false,
|
| 17 |
"tokenizer_class": "TokenizersBackend",
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7928d5fe2940d9ea592a4c6f0915cfda6fcebd2bb72c86f511fd0cbb763bca2b
|
| 3 |
+
size 5713
|