Text Generation
Transformers
Safetensors
English
Arabic
text-generation-inference
unsloth
llama
trl
text2text-generation
Instructions to use AbdulrhmanEldeeb/lora_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbdulrhmanEldeeb/lora_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AbdulrhmanEldeeb/lora_model")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbdulrhmanEldeeb/lora_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AbdulrhmanEldeeb/lora_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AbdulrhmanEldeeb/lora_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbdulrhmanEldeeb/lora_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AbdulrhmanEldeeb/lora_model
- SGLang
How to use AbdulrhmanEldeeb/lora_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 "AbdulrhmanEldeeb/lora_model" \ --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": "AbdulrhmanEldeeb/lora_model", "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 "AbdulrhmanEldeeb/lora_model" \ --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": "AbdulrhmanEldeeb/lora_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use AbdulrhmanEldeeb/lora_model with Docker Model Runner:
docker model run hf.co/AbdulrhmanEldeeb/lora_model
Eldeeb commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model: unsloth/meta-llama-3.1-8b-bnb-4bit
|
| 3 |
-
tags:
|
| 4 |
-
- text-generation-inference
|
| 5 |
-
- transformers
|
| 6 |
-
- unsloth
|
| 7 |
-
- llama
|
| 8 |
-
- trl
|
| 9 |
-
license: apache-2.0
|
| 10 |
-
language:
|
| 11 |
-
- en
|
| 12 |
-
- ar
|
| 13 |
-
datasets:
|
| 14 |
-
- Abdulrhman37/metallurgy-qa
|
| 15 |
-
pipeline_tag: text2text-generation
|
| 16 |
-
---
|
| 17 |
|
| 18 |
# Fine-Tuned Llama Model for Metallurgy and Materials Science
|
| 19 |
|
|
@@ -51,22 +51,15 @@ Fine-tuning focused on enhancing domain-specific knowledge using a dataset curat
|
|
| 51 |
|
| 52 |
## 📦 How to Use
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
```python
|
| 57 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 58 |
-
|
| 59 |
-
tokenizer = AutoTokenizer.from_pretrained("Abdulrhman37/metallurgy-llama")
|
| 60 |
-
model = AutoModelForCausalLM.from_pretrained("Abdulrhman37/metallurgy-llama")
|
| 61 |
-
|
| 62 |
-
# Example Query
|
| 63 |
-
prompt = "Explain the role of manganese in Mg-Al-Mn systems."
|
| 64 |
-
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 65 |
-
outputs = model.generate(**inputs, max_new_tokens=150)
|
| 66 |
-
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 67 |
|
| 68 |
-
|
|
|
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
| 72 |
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: unsloth/meta-llama-3.1-8b-bnb-4bit
|
| 3 |
+
tags:
|
| 4 |
+
- text-generation-inference
|
| 5 |
+
- transformers
|
| 6 |
+
- unsloth
|
| 7 |
+
- llama
|
| 8 |
+
- trl
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
- ar
|
| 13 |
+
datasets:
|
| 14 |
+
- Abdulrhman37/metallurgy-qa
|
| 15 |
+
pipeline_tag: text2text-generation
|
| 16 |
+
---
|
| 17 |
|
| 18 |
# Fine-Tuned Llama Model for Metallurgy and Materials Science
|
| 19 |
|
|
|
|
| 51 |
|
| 52 |
## 📦 How to Use
|
| 53 |
|
| 54 |
+
follow this [notebook](https://colab.research.google.com/drive/1pRNcAtybNF6w6mE1ZReFwfrIujZ5_t4S#scrollTo=wk4fCWOl0Ocd) for help to use the model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
+
## 📧 Contact
|
| 57 |
+
For any inquiries, feedback, or collaboration opportunities, feel free to reach out:
|
| 58 |
|
| 59 |
+
- Email: [abdodebo3@gmail.com](mailto:abdodebo3@gmail.com)
|
| 60 |
+
- [LinkedIn](https://www.linkedin.com/in/abdulrahman-eldeeb-8b4621253/)
|
| 61 |
+
- [GitHub](https://github.com/AdbulrhmanEldeeb)
|
| 62 |
+
- Phone: +20 1026821545
|
| 63 |
|
| 64 |
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
| 65 |
|