Text Generation
MLX
Safetensors
GGUF
Rust
qwen3_5_text
4b
agentic-coding
android
apple-silicon
attested
bash
c
chain-of-custody
chinese
code
code-completion
code-generation
code-infill
coder
coding
consumer-gpu
cpp
cryptographically-verified
css
delta-forge
edge-inference
embedded
english
forge-alloy
function-calling
ggml
go
html
iphone
java
javascript
kotlin
llama-cpp
lm-studio
local-inference
macbook
mobile
multilingual
ollama
on-device
php
programming
python
q4-k-m
quantized
qwen
qwen3
qwen3.5
raspberry-pi
reproducible
ruby
software-engineering
sql
swift
typescript
Instructions to use continuum-ai/qwen3.5-4b-code-forged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use continuum-ai/qwen3.5-4b-code-forged with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("continuum-ai/qwen3.5-4b-code-forged") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use continuum-ai/qwen3.5-4b-code-forged with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "continuum-ai/qwen3.5-4b-code-forged" --prompt "Once upon a time"
Upload benchmark/refactoring.txt with huggingface_hub
Browse files- benchmark/refactoring.txt +41 -21
benchmark/refactoring.txt
CHANGED
|
@@ -2,24 +2,44 @@ Prompt: Refactor this 500-line God class into a proper domain model using the re
|
|
| 2 |
|
| 3 |
Generated:
|
| 4 |
Refactor this 500-line God class into a proper domain model using the repository pattern, dependency injection, and event sourcing. Show the key interfaces and one concrete implementation.
|
| 5 |
-
Here is an example of refactoring
|
| 6 |
-
|
| 7 |
-
##
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
Generated:
|
| 4 |
Refactor this 500-line God class into a proper domain model using the repository pattern, dependency injection, and event sourcing. Show the key interfaces and one concrete implementation.
|
| 5 |
+
Here is an example of refactoring the provided code:
|
| 6 |
+
|
| 7 |
+
## Domain Model
|
| 8 |
+
|
| 9 |
+
```java
|
| 10 |
+
public interface IDomainModel {
|
| 11 |
+
void addPerson(Person person);
|
| 12 |
+
void removePerson(String name);
|
| 13 |
+
Person getPerson(String name);
|
| 14 |
+
}
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
## Repository Pattern
|
| 18 |
+
|
| 19 |
+
```java
|
| 20 |
+
public interface IRepository<T> {
|
| 21 |
+
T get(String id);
|
| 22 |
+
void add(T entity);
|
| 23 |
+
void update(T entity);
|
| 24 |
+
void delete(String id);
|
| 25 |
+
}
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Dependency Injection
|
| 29 |
+
|
| 30 |
+
```java
|
| 31 |
+
public class GodService implements IDomainModel {
|
| 32 |
+
private final Repository<Person> personRepository;
|
| 33 |
+
|
| 34 |
+
public GodService(Repository<Person> personRepository) {
|
| 35 |
+
this.personRepository = personRepository;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
@Override
|
| 39 |
+
public void addPerson(Person person) {
|
| 40 |
+
personRepository.add(person);
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
@Override
|
| 44 |
+
public void removePerson(String name) {
|
| 45 |
+
Person person = personRepository.get(name);
|