Text Generation
Transformers
PyTorch
Safetensors
English
llama
text-generation-inference
unsloth
trl
4-bit precision
bitsandbytes
Instructions to use andrewatef/MyBloggerV0.21 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use andrewatef/MyBloggerV0.21 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="andrewatef/MyBloggerV0.21")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("andrewatef/MyBloggerV0.21") model = AutoModelForCausalLM.from_pretrained("andrewatef/MyBloggerV0.21", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use andrewatef/MyBloggerV0.21 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "andrewatef/MyBloggerV0.21" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "andrewatef/MyBloggerV0.21", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/andrewatef/MyBloggerV0.21
- SGLang
How to use andrewatef/MyBloggerV0.21 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 "andrewatef/MyBloggerV0.21" \ --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": "andrewatef/MyBloggerV0.21", "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 "andrewatef/MyBloggerV0.21" \ --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": "andrewatef/MyBloggerV0.21", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Studio
How to use andrewatef/MyBloggerV0.21 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 andrewatef/MyBloggerV0.21 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 andrewatef/MyBloggerV0.21 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for andrewatef/MyBloggerV0.21 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="andrewatef/MyBloggerV0.21", max_seq_length=2048, ) - Docker Model Runner
How to use andrewatef/MyBloggerV0.21 with Docker Model Runner:
docker model run hf.co/andrewatef/MyBloggerV0.21
Upload LlamaForCausalLM
Browse files- config.json +12 -0
- model.safetensors +3 -0
config.json
CHANGED
|
@@ -18,6 +18,18 @@
|
|
| 18 |
"num_key_value_heads": 4,
|
| 19 |
"pad_token_id": 0,
|
| 20 |
"pretraining_tp": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
"rms_norm_eps": 1e-05,
|
| 22 |
"rope_scaling": {
|
| 23 |
"factor": 2.0,
|
|
|
|
| 18 |
"num_key_value_heads": 4,
|
| 19 |
"pad_token_id": 0,
|
| 20 |
"pretraining_tp": 1,
|
| 21 |
+
"quantization_config": {
|
| 22 |
+
"bnb_4bit_compute_dtype": "float16",
|
| 23 |
+
"bnb_4bit_quant_type": "nf4",
|
| 24 |
+
"bnb_4bit_use_double_quant": true,
|
| 25 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 26 |
+
"llm_int8_has_fp16_weight": false,
|
| 27 |
+
"llm_int8_skip_modules": "null",
|
| 28 |
+
"llm_int8_threshold": 6.0,
|
| 29 |
+
"load_in_4bit": true,
|
| 30 |
+
"load_in_8bit": false,
|
| 31 |
+
"quant_method": "bitsandbytes"
|
| 32 |
+
},
|
| 33 |
"rms_norm_eps": 1e-05,
|
| 34 |
"rope_scaling": {
|
| 35 |
"factor": 2.0,
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32172849b926c5cbe1ca3020c2c703fb284f3c8215ce06f667c0fa4d44709926
|
| 3 |
+
size 762453357
|