Text Generation
Transformers
PyTorch
Safetensors
English
gpt2
Trained with AutoTrain
text-generation-inference
Instructions to use CrabfishAI/NeXGen-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CrabfishAI/NeXGen-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CrabfishAI/NeXGen-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CrabfishAI/NeXGen-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CrabfishAI/NeXGen-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CrabfishAI/NeXGen-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CrabfishAI/NeXGen-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CrabfishAI/NeXGen-small
- SGLang
How to use CrabfishAI/NeXGen-small 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 "CrabfishAI/NeXGen-small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CrabfishAI/NeXGen-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "CrabfishAI/NeXGen-small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CrabfishAI/NeXGen-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CrabfishAI/NeXGen-small with Docker Model Runner:
docker model run hf.co/CrabfishAI/NeXGen-small
Delete NeXGen
Browse files- NeXGen/added_tokens.json +0 -4
- NeXGen/config.json +0 -20
- NeXGen/merges.txt +0 -0
- NeXGen/pytorch_model.bin +0 -3
- NeXGen/special_tokens_map.json +0 -30
- NeXGen/tokenizer.json +0 -0
- NeXGen/tokenizer_config.json +0 -38
- NeXGen/training_args.bin +0 -3
- NeXGen/training_params.json +0 -47
- NeXGen/vocab.json +0 -0
NeXGen/added_tokens.json
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"<|pad|>": 50258,
|
| 3 |
-
"<|startoftext|>": 50257
|
| 4 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/config.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"auto_mapping": null,
|
| 3 |
-
"base_model_name_or_path": "farnhua/gpt2-small-self_instruct_human_eval",
|
| 4 |
-
"bias": "none",
|
| 5 |
-
"fan_in_fan_out": false,
|
| 6 |
-
"inference_mode": true,
|
| 7 |
-
"init_lora_weights": true,
|
| 8 |
-
"layers_pattern": null,
|
| 9 |
-
"layers_to_transform": null,
|
| 10 |
-
"lora_alpha": 32,
|
| 11 |
-
"lora_dropout": 0.05,
|
| 12 |
-
"modules_to_save": null,
|
| 13 |
-
"peft_type": "LORA",
|
| 14 |
-
"r": 16,
|
| 15 |
-
"revision": null,
|
| 16 |
-
"target_modules": [
|
| 17 |
-
"c_attn"
|
| 18 |
-
],
|
| 19 |
-
"task_type": "CAUSAL_LM"
|
| 20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/merges.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
NeXGen/pytorch_model.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:60f3ea3765c1b02514bb4b684bd3d1f5004f1101b81bc7c09b3ba0df014ff825
|
| 3 |
-
size 497805594
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/special_tokens_map.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"bos_token": {
|
| 3 |
-
"content": "<|startoftext|>",
|
| 4 |
-
"lstrip": false,
|
| 5 |
-
"normalized": true,
|
| 6 |
-
"rstrip": false,
|
| 7 |
-
"single_word": false
|
| 8 |
-
},
|
| 9 |
-
"eos_token": {
|
| 10 |
-
"content": "<|endoftext|>",
|
| 11 |
-
"lstrip": false,
|
| 12 |
-
"normalized": true,
|
| 13 |
-
"rstrip": false,
|
| 14 |
-
"single_word": false
|
| 15 |
-
},
|
| 16 |
-
"pad_token": {
|
| 17 |
-
"content": "<|pad|>",
|
| 18 |
-
"lstrip": false,
|
| 19 |
-
"normalized": true,
|
| 20 |
-
"rstrip": false,
|
| 21 |
-
"single_word": false
|
| 22 |
-
},
|
| 23 |
-
"unk_token": {
|
| 24 |
-
"content": "<|endoftext|>",
|
| 25 |
-
"lstrip": false,
|
| 26 |
-
"normalized": true,
|
| 27 |
-
"rstrip": false,
|
| 28 |
-
"single_word": false
|
| 29 |
-
}
|
| 30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
NeXGen/tokenizer_config.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"add_bos_token": false,
|
| 3 |
-
"add_prefix_space": false,
|
| 4 |
-
"added_tokens_decoder": {
|
| 5 |
-
"50256": {
|
| 6 |
-
"content": "<|endoftext|>",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": true,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false,
|
| 11 |
-
"special": true
|
| 12 |
-
},
|
| 13 |
-
"50257": {
|
| 14 |
-
"content": "<|startoftext|>",
|
| 15 |
-
"lstrip": false,
|
| 16 |
-
"normalized": true,
|
| 17 |
-
"rstrip": false,
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"special": true
|
| 20 |
-
},
|
| 21 |
-
"50258": {
|
| 22 |
-
"content": "<|pad|>",
|
| 23 |
-
"lstrip": false,
|
| 24 |
-
"normalized": true,
|
| 25 |
-
"rstrip": false,
|
| 26 |
-
"single_word": false,
|
| 27 |
-
"special": true
|
| 28 |
-
}
|
| 29 |
-
},
|
| 30 |
-
"bos_token": "<|startoftext|>",
|
| 31 |
-
"clean_up_tokenization_spaces": true,
|
| 32 |
-
"eos_token": "<|endoftext|>",
|
| 33 |
-
"errors": "replace",
|
| 34 |
-
"model_max_length": 1024,
|
| 35 |
-
"pad_token": "<|pad|>",
|
| 36 |
-
"tokenizer_class": "GPT2Tokenizer",
|
| 37 |
-
"unk_token": "<|endoftext|>"
|
| 38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/training_args.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:451c10f29d391c5977d9401a129c75070c1f9e21c563dee1c87aee84480bdc81
|
| 3 |
-
size 4472
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/training_params.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"model": "farnhua/gpt2-small-self_instruct_human_eval",
|
| 3 |
-
"data_path": "timdettmers/openassistant-guanaco",
|
| 4 |
-
"project_name": "NeXGen",
|
| 5 |
-
"train_split": "train",
|
| 6 |
-
"valid_split": null,
|
| 7 |
-
"text_column": "text",
|
| 8 |
-
"rejected_text_column": "rejected",
|
| 9 |
-
"token": null,
|
| 10 |
-
"lr": 0.0002,
|
| 11 |
-
"epochs": 3,
|
| 12 |
-
"batch_size": 2,
|
| 13 |
-
"warmup_ratio": 0.1,
|
| 14 |
-
"gradient_accumulation": 1,
|
| 15 |
-
"optimizer": "adamw_torch",
|
| 16 |
-
"scheduler": "linear",
|
| 17 |
-
"weight_decay": 0.0,
|
| 18 |
-
"max_grad_norm": 1.0,
|
| 19 |
-
"seed": 42,
|
| 20 |
-
"add_eos_token": false,
|
| 21 |
-
"block_size": -1,
|
| 22 |
-
"use_peft": true,
|
| 23 |
-
"lora_r": 16,
|
| 24 |
-
"lora_alpha": 32,
|
| 25 |
-
"lora_dropout": 0.05,
|
| 26 |
-
"logging_steps": -1,
|
| 27 |
-
"evaluation_strategy": "epoch",
|
| 28 |
-
"save_total_limit": 1,
|
| 29 |
-
"save_strategy": "epoch",
|
| 30 |
-
"auto_find_batch_size": false,
|
| 31 |
-
"fp16": false,
|
| 32 |
-
"push_to_hub": false,
|
| 33 |
-
"use_int8": false,
|
| 34 |
-
"model_max_length": 2048,
|
| 35 |
-
"repo_id": null,
|
| 36 |
-
"use_int4": true,
|
| 37 |
-
"trainer": "sft",
|
| 38 |
-
"target_modules": null,
|
| 39 |
-
"merge_adapter": false,
|
| 40 |
-
"username": null,
|
| 41 |
-
"use_flash_attention_2": false,
|
| 42 |
-
"log": "none",
|
| 43 |
-
"disable_gradient_checkpointing": false,
|
| 44 |
-
"model_ref": null,
|
| 45 |
-
"dpo_beta": 0.1,
|
| 46 |
-
"prompt_text_column": "prompt"
|
| 47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NeXGen/vocab.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|