Instructions to use JamesAHowieson/SoftwareArchitecture with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use JamesAHowieson/SoftwareArchitecture with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct") model = PeftModel.from_pretrained(base_model, "JamesAHowieson/SoftwareArchitecture") - Transformers
How to use JamesAHowieson/SoftwareArchitecture with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JamesAHowieson/SoftwareArchitecture") 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("JamesAHowieson/SoftwareArchitecture") model = AutoModelForCausalLM.from_pretrained("JamesAHowieson/SoftwareArchitecture", 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 JamesAHowieson/SoftwareArchitecture with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JamesAHowieson/SoftwareArchitecture" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JamesAHowieson/SoftwareArchitecture", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JamesAHowieson/SoftwareArchitecture
- SGLang
How to use JamesAHowieson/SoftwareArchitecture 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 "JamesAHowieson/SoftwareArchitecture" \ --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": "JamesAHowieson/SoftwareArchitecture", "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 "JamesAHowieson/SoftwareArchitecture" \ --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": "JamesAHowieson/SoftwareArchitecture", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use JamesAHowieson/SoftwareArchitecture with Docker Model Runner:
docker model run hf.co/JamesAHowieson/SoftwareArchitecture
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,41 +6,29 @@ tags:
|
|
| 6 |
- base_model:adapter:Qwen/Qwen2.5-Coder-7B-Instruct
|
| 7 |
- lora
|
| 8 |
- transformers
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
-
|
| 14 |
|
|
|
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
-
## Model Details
|
| 18 |
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
- **Developed by:** [More Information Needed]
|
| 26 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 27 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 28 |
-
- **Model type:** [More Information Needed]
|
| 29 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 30 |
-
- **License:** [More Information Needed]
|
| 31 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 32 |
-
|
| 33 |
-
### Model Sources [optional]
|
| 34 |
-
|
| 35 |
-
<!-- Provide the basic links for the model. -->
|
| 36 |
-
|
| 37 |
-
- **Repository:** [More Information Needed]
|
| 38 |
-
- **Paper [optional]:** [More Information Needed]
|
| 39 |
-
- **Demo [optional]:** [More Information Needed]
|
| 40 |
|
| 41 |
## Uses
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
### Direct Use
|
| 46 |
|
|
@@ -48,35 +36,24 @@ tags:
|
|
| 48 |
|
| 49 |
[More Information Needed]
|
| 50 |
|
| 51 |
-
### Downstream Use [optional]
|
| 52 |
-
|
| 53 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 54 |
-
|
| 55 |
-
[More Information Needed]
|
| 56 |
-
|
| 57 |
-
### Out-of-Scope Use
|
| 58 |
-
|
| 59 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 60 |
-
|
| 61 |
-
[More Information Needed]
|
| 62 |
-
|
| 63 |
## Bias, Risks, and Limitations
|
| 64 |
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
[More Information Needed]
|
| 68 |
-
|
| 69 |
-
### Recommendations
|
| 70 |
-
|
| 71 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 72 |
-
|
| 73 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 74 |
|
| 75 |
## How to Get Started with the Model
|
| 76 |
|
| 77 |
-
|
|
|
|
| 78 |
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
## Training Details
|
| 82 |
|
|
|
|
| 6 |
- base_model:adapter:Qwen/Qwen2.5-Coder-7B-Instruct
|
| 7 |
- lora
|
| 8 |
- transformers
|
| 9 |
+
datasets:
|
| 10 |
+
- ajibawa-2023/Software-Architecture
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Software Architecture Model
|
| 14 |
|
| 15 |
+
Small model that aims to provide advice and guidance in Software Architecture.
|
| 16 |
|
| 17 |
+
Example Prompt:
|
| 18 |
+
"I am building a new back-end ingestion system in AWS. Please provide some architectural patterns that I could use."
|
| 19 |
|
| 20 |
|
|
|
|
| 21 |
|
| 22 |
+
- **Developed by:** James Howieson
|
| 23 |
+
- **Finetuned from model:** Qwen2.5-Coder-7B-Instruct
|
| 24 |
|
| 25 |
+
### Model Sources
|
| 26 |
|
| 27 |
+
- **Repository:** https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
## Uses
|
| 30 |
|
| 31 |
+
Intented to be used as a recommendation agent, not to implement the recommended pattern.
|
| 32 |
|
| 33 |
### Direct Use
|
| 34 |
|
|
|
|
| 36 |
|
| 37 |
[More Information Needed]
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
## Bias, Risks, and Limitations
|
| 40 |
|
| 41 |
+
Small Parameters mean it will be limited to contextual conversations beyond initial prompts. This should be factored into the inital prompt to ensure you are getting the most our of this agent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
## How to Get Started with the Model
|
| 44 |
|
| 45 |
+
```python
|
| 46 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 47 |
|
| 48 |
+
repo_id = "JamesAHowieson/SoftwareArchitecture"
|
| 49 |
+
|
| 50 |
+
tokenizer = AutoTokenizer.from_pretrained(repo_id)
|
| 51 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 52 |
+
repo_id,
|
| 53 |
+
device_map="auto",
|
| 54 |
+
dtype="auto",
|
| 55 |
+
)
|
| 56 |
+
```
|
| 57 |
|
| 58 |
## Training Details
|
| 59 |
|