Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
unsloth
trl
sft
conversational
4-bit precision
bitsandbytes
Instructions to use echojayechi/model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use echojayechi/model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="echojayechi/model") 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("echojayechi/model") model = AutoModelForCausalLM.from_pretrained("echojayechi/model", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use echojayechi/model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "echojayechi/model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "echojayechi/model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/echojayechi/model
- SGLang
How to use echojayechi/model 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 "echojayechi/model" \ --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": "echojayechi/model", "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 "echojayechi/model" \ --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": "echojayechi/model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use echojayechi/model with Docker Model Runner:
docker model run hf.co/echojayechi/model
Trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
Files changed (6)
- README.md+1
- config.jsonAdded+42
- generation_config.jsonAdded+9
- model-00001-of-00002.safetensorsAdded+3
- model-00002-of-00002.safetensorsAdded+3
- model.safetensors.index.jsonAdded
8 unmodified lines910111213148 unmodified lines- unsloth- llama- trl---# Uploaded model8 unmodified lines91011121314158 unmodified lines- unsloth- llama- trl- sft---# Uploaded model
123456789101112131415161718192021222324252627282930313233343536373839404142{ "_name_or_path": "unsloth/llama-3-8b-Instruct-bnb-4bit", "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 128000, "eos_token_id": 128009, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 14336, "max_position_embeddings": 8192, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 8, "pretraining_tp": 1, "quantization_config": { "bnb_4bit_compute_dtype": "float16", "bnb_4bit_quant_type": "nf4", "bnb_4bit_use_double_quant": true, "llm_int8_enable_fp32_cpu_offload": false, "llm_int8_has_fp16_weight": false, "llm_int8_skip_modules": null, "llm_int8_threshold": 6.0, "load_in_4bit": true, "load_in_8bit": false, "quant_method": "bitsandbytes" }, "rms_norm_eps": 1e-05, "rope_scaling": null, "rope_theta": 500000.0, "tie_word_embeddings": false, "torch_dtype": "float16", "transformers_version": "4.41.2", "unsloth_version": "2024.6", "use_cache": true, "vocab_size": 128256}123456789{ "_from_model_config": true, "bos_token_id": 128000, "eos_token_id": [ 128001, 128009 ], "transformers_version": "4.41.2"}123version https://git-lfs.github.com/spec/v1oid sha256:d7dda5fb7033252e01e9fab722aa60a756ecf52ed85f36c47e8a9fd7fd1f58desize 4652072870123version https://git-lfs.github.com/spec/v1oid sha256:8005050c5e27c8232d9ce04f03631ce67bcc362c80fc57079bda23b498695c20size 1050673280README.md+1
config.jsonAdded+42
generation_config.jsonAdded+9
model-00001-of-00002.safetensorsAdded+3
model-00002-of-00002.safetensorsAdded+3
model.safetensors.index.jsonAdded