Text Generation
Transformers
Safetensors
English
llama
solidity
code
ajibawa-2023/Code-Llama-3-8B
conversational
text-generation-inference
Instructions to use braindao/iq-code-evmind-v2-llama3-code-8b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use braindao/iq-code-evmind-v2-llama3-code-8b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="braindao/iq-code-evmind-v2-llama3-code-8b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("braindao/iq-code-evmind-v2-llama3-code-8b-instruct") model = AutoModelForCausalLM.from_pretrained("braindao/iq-code-evmind-v2-llama3-code-8b-instruct") 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]:])) - Inference
- Local Apps Settings
- vLLM
How to use braindao/iq-code-evmind-v2-llama3-code-8b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "braindao/iq-code-evmind-v2-llama3-code-8b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "braindao/iq-code-evmind-v2-llama3-code-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/braindao/iq-code-evmind-v2-llama3-code-8b-instruct
- SGLang
How to use braindao/iq-code-evmind-v2-llama3-code-8b-instruct 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 "braindao/iq-code-evmind-v2-llama3-code-8b-instruct" \ --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": "braindao/iq-code-evmind-v2-llama3-code-8b-instruct", "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 "braindao/iq-code-evmind-v2-llama3-code-8b-instruct" \ --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": "braindao/iq-code-evmind-v2-llama3-code-8b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use braindao/iq-code-evmind-v2-llama3-code-8b-instruct with Docker Model Runner:
docker model run hf.co/braindao/iq-code-evmind-v2-llama3-code-8b-instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,11 +9,11 @@ language:
|
|
| 9 |
tags:
|
| 10 |
- solidity
|
| 11 |
- code
|
| 12 |
-
-
|
| 13 |
---
|
| 14 |
-
|
| 15 |
|
| 16 |
-
Key Features:
|
| 17 |
|
| 18 |
Solidity Code Generation: The model can generate Solidity code snippets, offering quick and accurate solutions for various development needs.
|
| 19 |
Query Resolution: It answers technical and conceptual questions about Solidity, covering basic concepts to advanced topics, facilitating learning and problem-solving.
|
|
@@ -27,13 +27,13 @@ Base Model:
|
|
| 27 |
|
| 28 |
This model is based on ajibawa-2023/Code-Llama-3-8B, known for its advanced code generation capabilities and deep understanding of programming languages.
|
| 29 |
|
| 30 |
-
How to Use:
|
| 31 |
|
| 32 |
You can integrate this model into your projects via the Hugging Face platform, utilizing the provided APIs and tools to facilitate its implementation and use in various applications.
|
| 33 |
|
| 34 |
Example Usage:
|
| 35 |
|
| 36 |
-
python
|
| 37 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 38 |
|
| 39 |
model_name = "your-username/iq-code-evmind-v1-code-llama3-8b-instruct-pro"
|
|
@@ -44,4 +44,6 @@ input_text = "How can I define a basic contract structure in Solidity?"
|
|
| 44 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 45 |
outputs = model.generate(**inputs)
|
| 46 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
|
|
|
|
|
| 47 |
With iq-code-evmind-v1-code-llama3-8b-instruct-pro, you will have a powerful and specialized tool to handle everything related to Solidity development, from code generation to technical query resolution.
|
|
|
|
| 9 |
tags:
|
| 10 |
- solidity
|
| 11 |
- code
|
| 12 |
+
- ajibawa-2023/Code-Llama-3-8B
|
| 13 |
---
|
| 14 |
+
This model is a finely-tuned version specifically designed to generate and resolve queries related to the Solidity programming language. This model has been developed from the robust foundation provided by `ajibawa-2023/Code-Llama-3-8B` and has undergone specialized fine-tuning to optimize its performance in tasks associated with Solidity, the primary language used for developing smart contracts on the Ethereum blockchain.
|
| 15 |
|
| 16 |
+
## Key Features:
|
| 17 |
|
| 18 |
Solidity Code Generation: The model can generate Solidity code snippets, offering quick and accurate solutions for various development needs.
|
| 19 |
Query Resolution: It answers technical and conceptual questions about Solidity, covering basic concepts to advanced topics, facilitating learning and problem-solving.
|
|
|
|
| 27 |
|
| 28 |
This model is based on ajibawa-2023/Code-Llama-3-8B, known for its advanced code generation capabilities and deep understanding of programming languages.
|
| 29 |
|
| 30 |
+
## How to Use:
|
| 31 |
|
| 32 |
You can integrate this model into your projects via the Hugging Face platform, utilizing the provided APIs and tools to facilitate its implementation and use in various applications.
|
| 33 |
|
| 34 |
Example Usage:
|
| 35 |
|
| 36 |
+
```python
|
| 37 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 38 |
|
| 39 |
model_name = "your-username/iq-code-evmind-v1-code-llama3-8b-instruct-pro"
|
|
|
|
| 44 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 45 |
outputs = model.generate(**inputs)
|
| 46 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
With iq-code-evmind-v1-code-llama3-8b-instruct-pro, you will have a powerful and specialized tool to handle everything related to Solidity development, from code generation to technical query resolution.
|