Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
gpt_neox
Generated from Trainer
axolotl
dpo
trl
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f") model = AutoModelForCausalLM.from_pretrained("dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f") 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 dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f
- SGLang
How to use dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f 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 "dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f" \ --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": "dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f", "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 "dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f" \ --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": "dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f with Docker Model Runner:
docker model run hf.co/dimasik1987/bd54402c-a21e-411b-adaa-e647f9191c7f
File size: 720 Bytes
1e29a96 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | {
"alpha_pattern": {},
"auto_mapping": null,
"base_model_name_or_path": "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
"bias": "none",
"fan_in_fan_out": null,
"inference_mode": true,
"init_lora_weights": true,
"layer_replication": null,
"layers_pattern": null,
"layers_to_transform": null,
"loftq_config": {},
"lora_alpha": 64,
"lora_dropout": 0.1,
"megatron_config": null,
"megatron_core": "megatron.core",
"modules_to_save": null,
"peft_type": "LORA",
"r": 32,
"rank_pattern": {},
"revision": null,
"target_modules": [
"dense_h_to_4h",
"dense_4h_to_h",
"query_key_value",
"dense"
],
"task_type": "CAUSAL_LM",
"use_dora": false,
"use_rslora": false
} |