Text Generation
Transformers
Safetensors
PyTorch
Turkish
llama
legal
turkish
llama-3.1
fp8
bfloat16
mixed-precision
question-answering
fsdp-v2
distributed-training
conversational
text-generation-inference
Instructions to use newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp") model = AutoModelForCausalLM.from_pretrained("newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp
- SGLang
How to use newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp 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 "newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp" \ --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": "newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp", "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 "newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp" \ --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": "newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp with Docker Model Runner:
docker model run hf.co/newmindai/Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp
Update training_info.json
Browse files- training_info.json +3 -3
training_info.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
"seq_len": 4096,
|
| 12 |
"num_samples": null,
|
| 13 |
"combine_configs": true,
|
| 14 |
-
"output_dir": "/
|
| 15 |
"num_epochs": 1,
|
| 16 |
"max_steps": 1000,
|
| 17 |
"batch_size": 2,
|
|
@@ -38,7 +38,7 @@
|
|
| 38 |
"eval_samples": 1000,
|
| 39 |
"run_final_eval": true,
|
| 40 |
"logging_steps": 1,
|
| 41 |
-
"log_file": "/
|
| 42 |
"use_wandb": true,
|
| 43 |
"wandb_entity": null,
|
| 44 |
"use_tensorboard": false,
|
|
@@ -48,7 +48,7 @@
|
|
| 48 |
"seed": 100,
|
| 49 |
"fsdp_cpu_offload": false,
|
| 50 |
"enable_profiler": true,
|
| 51 |
-
"profiler_output_dir": "/
|
| 52 |
"profiler_wait_steps": 10,
|
| 53 |
"profiler_warmup_steps": 0,
|
| 54 |
"profiler_active_steps": 5,
|
|
|
|
| 11 |
"seq_len": 4096,
|
| 12 |
"num_samples": null,
|
| 13 |
"combine_configs": true,
|
| 14 |
+
"output_dir": "./Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp",
|
| 15 |
"num_epochs": 1,
|
| 16 |
"max_steps": 1000,
|
| 17 |
"batch_size": 2,
|
|
|
|
| 38 |
"eval_samples": 1000,
|
| 39 |
"run_final_eval": true,
|
| 40 |
"logging_steps": 1,
|
| 41 |
+
"log_file": "./Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp/logs/training.log",
|
| 42 |
"use_wandb": true,
|
| 43 |
"wandb_entity": null,
|
| 44 |
"use_tensorboard": false,
|
|
|
|
| 48 |
"seed": 100,
|
| 49 |
"fsdp_cpu_offload": false,
|
| 50 |
"enable_profiler": true,
|
| 51 |
+
"profiler_output_dir": "./Llama-3.1-8B-Instruct_w16a8_rw_with_gw_hp/profiler",
|
| 52 |
"profiler_wait_steps": 10,
|
| 53 |
"profiler_warmup_steps": 0,
|
| 54 |
"profiler_active_steps": 5,
|