Text Generation
Transformers
Safetensors
PEFT
llama
Trained with AutoTrain
text-generation-inference
conversational
Instructions to use neural-coder/llama-3-8b-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neural-coder/llama-3-8b-ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="neural-coder/llama-3-8b-ft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("neural-coder/llama-3-8b-ft") model = AutoModelForCausalLM.from_pretrained("neural-coder/llama-3-8b-ft", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use neural-coder/llama-3-8b-ft with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use neural-coder/llama-3-8b-ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "neural-coder/llama-3-8b-ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "neural-coder/llama-3-8b-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/neural-coder/llama-3-8b-ft
- SGLang
How to use neural-coder/llama-3-8b-ft 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 "neural-coder/llama-3-8b-ft" \ --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": "neural-coder/llama-3-8b-ft", "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 "neural-coder/llama-3-8b-ft" \ --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": "neural-coder/llama-3-8b-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use neural-coder/llama-3-8b-ft with Docker Model Runner:
docker model run hf.co/neural-coder/llama-3-8b-ft
Delete training_params.json
Browse files- training_params.json +0 -49
training_params.json
DELETED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"model": "Team-ACE/ToolACE-2-Llama-3.1-8B",
|
| 3 |
-
"project_name": "llama-3-8b-ft",
|
| 4 |
-
"data_path": "llama-3-8b-ft/autotrain-data",
|
| 5 |
-
"train_split": "train",
|
| 6 |
-
"valid_split": null,
|
| 7 |
-
"add_eos_token": true,
|
| 8 |
-
"block_size": -1,
|
| 9 |
-
"model_max_length": 2048,
|
| 10 |
-
"padding": "right",
|
| 11 |
-
"trainer": "sft",
|
| 12 |
-
"use_flash_attention_2": false,
|
| 13 |
-
"log": "none",
|
| 14 |
-
"disable_gradient_checkpointing": false,
|
| 15 |
-
"logging_steps": 5,
|
| 16 |
-
"eval_strategy": "epoch",
|
| 17 |
-
"save_total_limit": 3,
|
| 18 |
-
"auto_find_batch_size": false,
|
| 19 |
-
"mixed_precision": null,
|
| 20 |
-
"lr": 5e-06,
|
| 21 |
-
"epochs": 1,
|
| 22 |
-
"batch_size": 1,
|
| 23 |
-
"warmup_ratio": 0.1,
|
| 24 |
-
"gradient_accumulation": 1,
|
| 25 |
-
"optimizer": "adamw_torch",
|
| 26 |
-
"scheduler": "cosine_with_restarts",
|
| 27 |
-
"weight_decay": 0.0001,
|
| 28 |
-
"max_grad_norm": 0.3,
|
| 29 |
-
"seed": 42,
|
| 30 |
-
"chat_template": null,
|
| 31 |
-
"quantization": "int8",
|
| 32 |
-
"target_modules": "q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj",
|
| 33 |
-
"merge_adapter": true,
|
| 34 |
-
"peft": true,
|
| 35 |
-
"lora_r": 128,
|
| 36 |
-
"lora_alpha": 256,
|
| 37 |
-
"lora_dropout": 0.05,
|
| 38 |
-
"model_ref": null,
|
| 39 |
-
"dpo_beta": 0.1,
|
| 40 |
-
"max_prompt_length": 128,
|
| 41 |
-
"max_completion_length": null,
|
| 42 |
-
"prompt_text_column": "autotrain_prompt",
|
| 43 |
-
"text_column": "autotrain_text",
|
| 44 |
-
"rejected_text_column": "autotrain_rejected_text",
|
| 45 |
-
"push_to_hub": true,
|
| 46 |
-
"username": "neural-coder",
|
| 47 |
-
"unsloth": false,
|
| 48 |
-
"distributed_backend": null
|
| 49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|