You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-3
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ The experiment results will be stored in the directory named `results_low_level`
101
101
## Support for New Models
102
102
We rely on LangChain to provide a common interface to access different model APIs.
103
103
You can add new supported models in the `netconfeval/common/model_configs.py` file.
104
-
We currently support OpenAI models (`'type': 'openai'`) and HuggingFace models (`'type': 'HF'`) through a custom LangChain-compatible class (`netconfeval/foundation/langchain/hf.py`).
104
+
We currently support OpenAI models (`'type': 'openai'`), Ollama models (`'type': 'Ollama'`), and HuggingFace models (`'type': 'HF'`) through a custom LangChain-compatible class (`netconfeval/foundation/langchain/hf.py`).
105
105
106
106
To add a model, just add a new Dict element to the `model_configurations` Dict, by providing a unique key for it.
107
107
The new model key is then automatically visible using the `--model` command line parameter of the `.py` tests of the benchmarks.
@@ -131,6 +131,16 @@ model_configurations = {
131
131
}
132
132
```
133
133
134
+
### Ollama Models
135
+
The Ollama model Dict contains the following keys:
136
+
```python
137
+
{
138
+
'type': 'Ollama', # The type of the model, in this case 'Ollama'
139
+
'model_name': 'llama3:8b-instruct-fp16', # The model name taken from Ollama library
140
+
'num_predict': 4096, # Max output length
141
+
}
142
+
```
143
+
134
144
### HuggingFace Models
135
145
The HuggingFace model Dict contains the following keys:
136
146
```python
@@ -158,7 +168,7 @@ model_configurations = {
158
168
```
159
169
160
170
### Adding new model types
161
-
Aside from adding OpenAI and HuggingFace models, it is also possible to add new model types (for example Gemini by Google).
171
+
Aside from adding OpenAI, Ollama, and HuggingFace models, it is also possible to add new model types (for example Gemini by Google).
162
172
163
173
We will continuously improve support for different APIs, but if you want to contribute:
164
174
- Define a new `type`, coherent with the model types (e.g., `google` for Google models);
@@ -187,4 +197,4 @@ If you use NetConfEval, please cite our paper:
187
197
```
188
198
189
199
## Help
190
-
If you have any questions regarding our code or the paper, you can contact [Changjie Wang](https://www.kth.se/profile/changjie) (changjie at kth.se) and/or [Mariano Scazzariello](https://www.kth.se/profile/marianos) (mariano.scazzariello at ri.se).
200
+
If you have any questions regarding our code or the paper, you can contact [Changjie Wang](https://www.kth.se/profile/changjie) (changjie at kth.se) and/or [Mariano Scazzariello](https://www.ri.se/en/person/mariano-scazzariello) (mariano.scazzariello at ri.se).
0 commit comments